Dmitry Shin лет назад: 4
Сommit
e417b604f9
100 измененных файлов с 14529 добавлено и 0 удалено
  1. 3 0
      .gitignore
  2. BIN
      data/emu/87/baseData.res
  3. BIN
      data/emu/87/blacklisted-data.res
  4. BIN
      data/emu/87/effects-override.res
  5. BIN
      data/emu/87/effects.res
  6. BIN
      data/emu/87/items.res
  7. BIN
      data/emu/87/movements.res
  8. BIN
      data/emu/87/skills-override.res
  9. BIN
      data/emu/87/skills.res
  10. BIN
      data/emu/88/baseData.res
  11. BIN
      data/emu/88/blacklisted-data.res
  12. BIN
      data/emu/88/effects-override.res
  13. BIN
      data/emu/88/effects.res
  14. BIN
      data/emu/88/items-override.res
  15. BIN
      data/emu/88/items.res
  16. BIN
      data/emu/88/movements.res
  17. BIN
      data/emu/88/skills-override.res
  18. BIN
      data/emu/88/skills.res
  19. BIN
      data/emu/90/baseData.res
  20. BIN
      data/emu/90/blacklisted-data.res
  21. BIN
      data/emu/90/effects-override.res
  22. BIN
      data/emu/90/effects.res
  23. BIN
      data/emu/90/items-override.res
  24. BIN
      data/emu/90/items.res
  25. BIN
      data/emu/90/movements.res
  26. BIN
      data/emu/90/skills-override.res
  27. BIN
      data/emu/90/skills.res
  28. BIN
      data/emu/91/baseData.res
  29. BIN
      data/emu/91/blacklisted-data.res
  30. BIN
      data/emu/91/effects-override.res
  31. BIN
      data/emu/91/effects.res
  32. BIN
      data/emu/91/items-override.res
  33. 9 0
      data/emu/91/items.res
  34. BIN
      data/emu/91/movements.res
  35. BIN
      data/emu/91/skills-override.res
  36. BIN
      data/emu/91/skills.res
  37. BIN
      data/emu/92/baseData.res
  38. BIN
      data/emu/92/blacklisted-data.res
  39. BIN
      data/emu/92/effects-override.res
  40. BIN
      data/emu/92/effects.res
  41. BIN
      data/emu/92/items-override.res
  42. 9 0
      data/emu/92/items.res
  43. BIN
      data/emu/92/movements.res
  44. BIN
      data/emu/92/skills-override.res
  45. BIN
      data/emu/92/skills.res
  46. 345 0
      data/internal/controlUI/index.html
  47. 0 0
      data/internal/controlUI/index.js
  48. 1049 0
      data/internal/controlUI/smoothie.js
  49. 234 0
      data/internal/definitions.js
  50. 0 0
      data/internal/settingsData.json
  51. 50 0
      data/internal/settingsSchema.js
  52. 0 0
      data/internal/strings.json
  53. 217 0
      index.js
  54. 2958 0
      lib/core.js
  55. BIN
      lib/io/NextGenPingTool.exe
  56. 24 0
      lib/io/fetch.js
  57. 58 0
      lib/io/fileEvent.js
  58. 67 0
      lib/io/logger.js
  59. 237 0
      lib/state.js
  60. 321 0
      lib/submodules/abnormals.js
  61. 280 0
      lib/submodules/area.js
  62. 88 0
      lib/submodules/cd.js
  63. 543 0
      lib/submodules/control.js
  64. 26 0
      lib/submodules/corrector.js
  65. 17 0
      lib/submodules/defs.js
  66. 181 0
      lib/submodules/jitter.js
  67. 158 0
      lib/submodules/ping.js
  68. 543 0
      lib/submodules/player.js
  69. 0 0
      lib/utils.js
  70. 0 0
      logs/.gitkeep
  71. 114 0
      manifest.json
  72. 11 0
      module.json
  73. 21 0
      node_modules/compare-versions/LICENSE
  74. 115 0
      node_modules/compare-versions/index.js
  75. 38 0
      node_modules/compare-versions/package.json
  76. 133 0
      node_modules/deepmerge/dist/cjs.js
  77. 139 0
      node_modules/deepmerge/dist/umd.js
  78. 106 0
      node_modules/deepmerge/index.js
  79. 21 0
      node_modules/deepmerge/license.txt
  80. 47 0
      node_modules/deepmerge/package.json
  81. 22 0
      node_modules/node-fetch/LICENSE.md
  82. 23 0
      node_modules/node-fetch/browser.js
  83. 1633 0
      node_modules/node-fetch/lib/index.es.js
  84. 1642 0
      node_modules/node-fetch/lib/index.js
  85. 1631 0
      node_modules/node-fetch/lib/index.mjs
  86. 70 0
      node_modules/node-fetch/package.json
  87. 15 0
      node_modules/rfdc/LICENSE
  88. 147 0
      node_modules/rfdc/index.js
  89. 67 0
      node_modules/rfdc/package.json
  90. 21 0
      node_modules/schema-typed/LICENSE
  91. 119 0
      node_modules/schema-typed/es/ArrayType.js
  92. 47 0
      node_modules/schema-typed/es/BooleanType.js
  93. 73 0
      node_modules/schema-typed/es/DateType.js
  94. 101 0
      node_modules/schema-typed/es/NumberType.js
  95. 80 0
      node_modules/schema-typed/es/ObjectType.js
  96. 105 0
      node_modules/schema-typed/es/Schema.js
  97. 169 0
      node_modules/schema-typed/es/StringType.js
  98. 207 0
      node_modules/schema-typed/es/Type.js
  99. 76 0
      node_modules/schema-typed/es/index.js
  100. 119 0
      node_modules/schema-typed/lib/ArrayType.js

+ 3 - 0
.gitignore

@@ -0,0 +1,3 @@
+.eslintrc.json
+manifest-generator.bat
+manifest-generator.js

BIN
data/emu/87/baseData.res


BIN
data/emu/87/blacklisted-data.res


BIN
data/emu/87/effects-override.res


BIN
data/emu/87/effects.res


BIN
data/emu/87/items.res


BIN
data/emu/87/movements.res


BIN
data/emu/87/skills-override.res


BIN
data/emu/87/skills.res


BIN
data/emu/88/baseData.res


BIN
data/emu/88/blacklisted-data.res


BIN
data/emu/88/effects-override.res


BIN
data/emu/88/effects.res


BIN
data/emu/88/items-override.res


BIN
data/emu/88/items.res


BIN
data/emu/88/movements.res


BIN
data/emu/88/skills-override.res


BIN
data/emu/88/skills.res


BIN
data/emu/90/baseData.res


BIN
data/emu/90/blacklisted-data.res


BIN
data/emu/90/effects-override.res


BIN
data/emu/90/effects.res


BIN
data/emu/90/items-override.res


BIN
data/emu/90/items.res


BIN
data/emu/90/movements.res


BIN
data/emu/90/skills-override.res


BIN
data/emu/90/skills.res


BIN
data/emu/91/baseData.res


BIN
data/emu/91/blacklisted-data.res


BIN
data/emu/91/effects-override.res


BIN
data/emu/91/effects.res


BIN
data/emu/91/items-override.res


+ 9 - 0
data/emu/91/items.res

@@ -0,0 +1,9 @@
+�šË’7FßeÖYø~aÇ3ä	&²I)ŠÅ»#Évw{؇Eù Kú$ËîÿûKJéåÃ÷—×··�ß¾½þù÷ïÿ}úô¦ÿò××/Ÿ?þñï—¯Ÿ_ÿyù�Zt?~üöR‚«d}¨!Ïõ
®/s}‡ëëXï\ßæz×w[ÜÿŒOª�üÿ½wç¼ÉԎŒÔàÑúêB
+ê…ïÕåƒmŸ¨rB™B²w…x† šN„
+ȧE™Z”Br™TJ“ŠH4‹²VŸpÔ£_Ú�ä)," Ø)a™mÎ5Jdó¾‰è±$:(ï+òe5ŠÖR=	ò�Ak⑜`Y	äÎUBÔ“bÈ#ÐB�ÃM¡~9ƒ}S'ÅpS(Eïm5ñ_(õ_¨“î8üê^Z%ÑĬõÔžƒCùÊNþxkx½È_‘%Q©vï±PÈšIoé¬![kU
+ù4#1jª·RØÇ™­µ*u’«i«÷vR[ãÐôÎ…‚¿º‹± ¹…"ýhÖ1yóØV‘(èA”†ªVÕãªi[6V:Š×IrØÞ’ÉM̈� aç—ý�E,Kù¸l#™Ô,;ƒÊ˜M|Íìè¿"-;ö7Õ€mÌ
oÔÌ™”8¦¨ì«ÌƒÆ¨äc(…àž5cœ¨æ)N…P“Ú¡Ä*ú=„D½CâÓ¥é,E2û[Ãõ±æÍƒh	UôÝS¨¬Ýlk6×ëÅJGáºæXC`¯�ñJ¢Í“Ùjž5©„„ä¹¢>UÐþ4p£E)‚ªtG�O;‚Epo•ÀÃJ‹!—8¥Ø`#�j6u§�€ÝyÉLü@ÝY‚5oÛê:ÕÊ¡Zy T+„jåFŽF‹¸aŒKœ—ˆá†ñ@Pî�L¬ äßHv9"+âÁ(.%�‘'‘¨�1˜Éèã�&}J:6ŽG ¥�,'5ýÉ…=±e�ãü˜³@¨”7¨ÈÓ9dé).B;z·›+%7TkÏ	@!´¹*ýA¨HŸ–Z©ì©N	º�8ÓiëŽÑCv5ö
+!ÿdÏS¢¼ÌŽçGÐ:Bp^ëˆJ×(hê—®aÓ£¨:΂´¦ˆEZ­d”PElHU„éì‰ôŒFumLžbHŒˆl
5·;-)1Wj÷‡÷‚ Ü+2ÓRàs¸¸fŒAiQÄä©Kž°`À‚ÝS
AgˆÆØCPŒ™•˜"wÄ��I·Ô2¹­PU¦©JzØl©dãÖJ6?(r¥’= l©Œç©d=iK%ëI[*ãy*ãy*u|6QñgZ/îL¦VÜUû™ºïo+Ô}¿¬Hƒbí"•i¥J{bHX„òÚX
øp[Á/TËJŽ6Øq
+>ÔŠ|yÎ
+¡d¾‡P:ßAì,ۡή©ò14:û&„}>—¸õ³ï†Áǘ�Ð6WB‘¾Nûà|É3mzùÑÀú¤|i	g�ÙFP_Æñ§’ÌÓb³S_Æ‘)f*›�¾!»ÜÊ0;mp‰¥F»ÒEPôмvuTdÌ?¢æ€Ž€K3Ò3Ù‹Ãz 
+nÔš»ê_^ÚÍéΓºQ
+%tR#pJ¡YsRã÷9g‰,í¼©7…PÀw¨³ßàlP	Yššûñ

BIN
data/emu/91/movements.res


BIN
data/emu/91/skills-override.res


BIN
data/emu/91/skills.res


BIN
data/emu/92/baseData.res


BIN
data/emu/92/blacklisted-data.res


BIN
data/emu/92/effects-override.res


BIN
data/emu/92/effects.res


BIN
data/emu/92/items-override.res


+ 9 - 0
data/emu/92/items.res

@@ -0,0 +1,9 @@
+�šË’7FßeÖYø~aÇ3ä	&²I)ŠÅ»#Évw{؇Eù Kú$ËîÿûKJéåÃ÷—×··�ß¾½þù÷ïÿ}úô¦ÿò××/Ÿ?þñï—¯Ÿ_ÿyù�Zt?~üöR‚«d}¨!Ïõ
®/s}‡ëëXï\ßæz×w[ÜÿŒOª�üÿ½wç¼ÉԎŒÔàÑúêB
+ê…ïÕåƒmŸ¨rB™B²w…x† šN„
+ȧE™Z”Br™TJ“ŠH4‹²VŸpÔ£_Ú�ä)," Ø)a™mÎ5Jdó¾‰è±$:(ï+òe5ŠÖR=	ò�Ak⑜`Y	äÎUBÔ“bÈ#ÐB�ÃM¡~9ƒ}S'ÅpS(Eïm5ñ_(õ_¨“î8üê^Z%ÑĬõÔžƒCùÊNþxkx½È_‘%Q©vï±PÈšIoé¬![kU
+ù4#1jª·RØÇ™­µ*u’«i«÷vR[ãÐôÎ…‚¿º‹± ¹…"ýhÖ1yóØV‘(èA”†ªVÕãªi[6V:Š×IrØÞ’ÉM̈� aç—ý�E,Kù¸l#™Ô,;ƒÊ˜M|Íìè¿"-;ö7Õ€mÌ
oÔÌ™”8¦¨ì«ÌƒÆ¨äc(…àž5cœ¨æ)N…P“Ú¡Ä*ú=„D½CâÓ¥é,E2û[Ãõ±æÍƒh	UôÝS¨¬Ýlk6×ëÅJGáºæXC`¯�ñJ¢Í“Ùjž5©„„ä¹¢>UÐþ4p£E)‚ªtG�O;‚Epo•ÀÃJ‹!—8¥Ø`#�j6u§�€ÝyÉLü@ÝY‚5oÛê:ÕÊ¡Zy T+„jåFŽF‹¸aŒKœ—ˆá†ñ@Pî�L¬ äßHv9"+âÁ(.%�‘'‘¨�1˜Éèã�&}J:6ŽG ¥�,'5ýÉ…=±e�ãü˜³@¨”7¨ÈÓ9dé).B;z·›+%7TkÏ	@!´¹*ýA¨HŸ–Z©ì©N	º�8ÓiëŽÑCv5ö
+!ÿdÏS¢¼ÌŽçGÐ:Bp^ëˆJ×(hê—®aÓ£¨:΂´¦ˆEZ­d”PElHU„éì‰ôŒFumLžbHŒˆl
5·;-)1Wj÷‡÷‚ Ü+2ÓRàs¸¸fŒAiQÄä©Kž°`À‚ÝS
AgˆÆØCPŒ™•˜"wÄ��I·Ô2¹­PU¦©JzØl©dãÖJ6?(r¥’= l©Œç©d=iK%ëI[*ãy*ãy*u|6QñgZ/îL¦VÜUû™ºïo+Ô}¿¬Hƒbí"•i¥J{bHX„òÚX
øp[Á/TËJŽ6Øq
+>ÔŠ|yÎ
+¡d¾‡P:ßAì,ۡή©ò14:û&„}>—¸õ³ï†Áǘ�Ð6WB‘¾Nûà|É3mzùÑÀú¤|i	g�ÙFP_Æñ§’ÌÓb³S_Æ‘)f*›�¾!»ÜÊ0;mp‰¥F»ÒEPôмvuTdÌ?¢æ€Ž€K3Ò3Ù‹Ãz 
+nÔš»ê_^ÚÍéΓºQ
+%tR#pJ¡YsRã÷9g‰,í¼©7…PÀw¨³ßàlP	Yššûñ

BIN
data/emu/92/movements.res


BIN
data/emu/92/skills-override.res


BIN
data/emu/92/skills.res


+ 345 - 0
data/internal/controlUI/index.html

@@ -0,0 +1,345 @@
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<script type="text/javascript" src="./index.js"></script>
+	<style>
+		@import url("https://fonts.googleapis.com/css?family=Ubuntu");
+
+		body {
+			font-family: Ubuntu, sans serif;
+			overflow: hidden;
+			background: rgba(48, 55, 59, 0.8);
+			margin: 0px;
+			border-style:solid; 
+			border-color: darkgray;
+			border-width: 1px;
+		}
+
+		label {
+			font-size: 14px;
+		}
+		.parent {
+			display: grid;
+			grid-template-columns: 30px 1fr 30px;
+			grid-template-rows: 24px 1fr;
+			grid-column-gap: 0px;
+			height: calc(100vh - 18px);
+		}
+
+		.row1 {
+			grid-area: 1 / 1 / 2 / 6;
+			background: #292F33
+		}
+
+		.row2 {
+			grid-area: 2 / 1 / 3 / 6;
+
+		}
+
+		.setting-container {
+			background: Black;
+		}
+	
+		.util-reset-margin p {
+			margin: 0px;
+		}
+
+		.util-padding-top-5px p {
+			padding-top: 3px;
+		}
+
+		.util-select-lock {
+			-webkit-touch-callout: none;
+			-webkit-user-select: none;
+			-khtml-user-select: none;
+			-moz-user-select: none;
+			-ms-user-select: none;
+		}
+
+		.logo {
+			grid-area: 1 / 1 / 2 / 2;
+			padding: 2px;
+			text-align: center;
+
+			vertical-align: middle;
+		}
+
+		.header {
+			grid-area: 1 / 2 / 2 / 3;
+			color: white;
+			text-align: center;
+			vertical-align: middle;
+		}
+
+		.header-text {
+			padding-top: 3px;
+			font-size: 14px;
+		}
+
+		.controls {
+			grid-area: 1 / 3 / 2 / 4;
+		}
+
+		.control {
+			padding-left: 2px;
+			transition: background ease 0.32s;
+		}
+
+		.control:hover {
+			background-color: red;
+		}
+
+		p {
+			font-size: 14px;
+		}
+
+		.workWrap {
+			grid-area: 2 / 1 / 3 / 4;
+			min-height: 0;
+		}
+
+		.tabs {
+			display: flex;
+			flex-direction: column;
+			height: 100%;
+		}
+
+		.tabs__header {
+			padding-top: 6px;
+			display: flex;
+			justify-content: center;
+			background: rgb(48, 55, 59)
+		}
+
+		.tabs label {
+			order: 1;
+			display: block;
+			padding: 0.4em;
+			margin-right: 0.2rem;
+			cursor: pointer;
+			color: white;
+			transition: background ease 0.32s;
+		}
+
+		.centered-text {
+			text-align: center;
+			vertical-align: middle;
+		}
+
+		.card-container {
+			display: flex;
+			flex-direction: row;
+			flex-wrap: wrap;
+			align-content: center;
+		}
+
+		.card {
+			background-color: rgb(48, 55, 59);
+			margin: 5px;
+			padding: 5px;
+			width: 120px;
+		}
+
+		.card-wide {
+			background-color: rgb(48, 55, 59);
+			margin: 5px;
+			padding: 5px;
+			width: 400px;
+		}
+
+		.tab {
+			order: 99;
+			flex-grow: 1;
+			width: 100%;
+			height: 100%;
+			display: none;
+			padding: 5px;
+			overflow-y: auto;
+			box-sizing: border-box;
+			-webkit-animation: text-focus-in 0.2s cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
+			animation: text-focus-in 0.2s cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
+		}
+
+		.tabs input[type="radio"] {
+			display: none;
+		}
+
+		.tabs input[type="radio"]:checked+label {
+			background: red;
+		}
+
+		.tab {
+			color: white;
+		}
+
+		.tab--active {
+			display: block;
+		}
+
+		hr {
+			display: block;
+			height: 1px;
+			border: 0;
+			border-top: 1px solid red;
+			margin: 5 0;
+			padding: 0;
+		}
+
+		.control-btn {
+			background-color: transparent;
+			color: white;
+			border: 1px solid red;
+			width: 120px;
+			margin-top: 3px;
+		}
+
+		.control-btn:hover {
+			background-color: red;
+		}
+
+		#scroller {
+			overflow: auto;
+			max-height: 100%;
+		}
+
+		::selection {
+			background: red;
+		}
+
+		/* width */
+		::-webkit-scrollbar {
+			width: 8px;
+		}
+
+		/* Track */
+		::-webkit-scrollbar-track {
+			background: darkgray;
+		}
+
+		/* Handle */
+		::-webkit-scrollbar-thumb {
+			background: gray;
+		}
+
+		/* Handle on hover */
+		::-webkit-scrollbar-thumb:hover {
+			background: red;
+		}
+	</style>
+</head>
+
+<body>
+	<div class="parent">
+		<div class="row1"> </div>
+		<div class="row2"> </div>
+		<div class="logo util-select-lock"> </div>
+		<div class="controls util-select-lock">
+			<div class="control" id="control-close">
+				<svg style="width:24px;height:24px" viewBox="0 0 24 24">
+					<path fill="white"
+						d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" />
+				</svg>
+			</div>
+		</div>
+		<div class="header util-select-lock" style="-webkit-app-region: drag">
+			<div class="header-text util-select-lock">NGSP control panel</div>
+		</div>
+		<div class="workWrap">
+			<div class="tabs">
+				<div class="tabs__header util-select-lock">
+					<input type="radio" name="tabs" id="tabone" checked data-tab="1">
+					<label for="tabone">Status</label>
+					<input type="radio" name="tabs" id="tabtwo" data-tab="2">
+					<label for="tabtwo">Settings</label>
+					<input type="radio" name="tabs" id="tabthree" data-tab="3">
+					<label for="tabthree">Actions</label>
+				</div>
+
+				<div class="tab tab--active" data-tab="1">
+					<div class="card-container util-select-lock">
+						<div class="card">
+							<div class="centered-text">
+								<b>Game</b>
+							</div>
+							<hr>
+							<div class="util-reset-margin">
+								<p id="game-runtime">Runtime:</p>
+								<p id="game-admin">Admin:</p>
+								<p id="game-patch">Patch: </p>
+							</div>
+						</div>
+						<div class="card">
+							<div class="centered-text">
+								<b>Player</b>
+							</div>
+							<hr>
+							<div class="util-reset-margin">
+								<p id="templ">Template: </p>
+								<p id="templ-class">Class: </p>
+								<p id="templ-race">Race: </p>
+							</div>
+						</div>
+						<div class="card">
+							<div class="centered-text">
+								<b>Ping</b>
+							</div>
+							<hr>
+							<div class="util-reset-margin">
+								<p id="ping-min">Min:</p>
+								<p id="ping-avg">Avg:</p>
+								<p id="ping-max">Max: </p>
+							</div>
+						</div>
+						<div class="card">
+							<div class="centered-text">
+								<b>Jitter stats</b>
+							</div>
+							<hr>
+							<div class="util-reset-margin">
+								<p id="jitter-avg">Avg: </p>
+								<p id="jitter-max">Max:</p>
+							</div>
+						</div>
+						<div class="card">
+							<div class="centered-text">
+								<b>Ping stats</b>
+							</div>
+							<hr>
+							<div class="util-reset-margin">
+								<p id="ping-eff">EffSpread:</p>
+								<p id="ping-spread">Spread:</p>
+								<p id="ping-median">Median: </p>
+							</div>
+						</div>
+						<div class="card-wide">
+							<div class="centered-text">
+								<b>Ping graph</b>
+							</div>
+							<hr>
+							<canvas id="chart" style="width:100%; height: 52px;"></canvas>
+						</div>
+					</div>
+				</div>
+				<div class="tab" data-tab="2">
+					<div class="settings-container util-select-lock" id="scroller"></div>
+				</div>
+				<div class="tab" data-tab="3">
+					<div class="card-container util-select-lock">
+						<div class="card">
+							<div class="centered-text">
+								<b>Filesystem</b>
+							</div>
+							<hr>
+							<div>
+								<button class="control-btn" id="btn-openNgspFolder">NGSP folder</buton>
+								<button class="control-btn" id="btn-openLogsFolder">Logs folder</buton>
+								<button class="control-btn" id="btn-openSettingsFolder">Settings</button>
+								<button class="control-btn" id="btn-openEmulationFolder">Emulation</button>
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+</body>
+
+</html>

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
data/internal/controlUI/index.js


+ 1049 - 0
data/internal/controlUI/smoothie.js

@@ -0,0 +1,1049 @@
+(function(personwarehouse) {
+    Date.now = Date.now || function() {
+        return new Date().getTime();
+    };
+    var command = {
+        'extend': function() {
+            arguments[0] = arguments[0] || {};
+            for (var personwarehouse = 1; personwarehouse < arguments.length; personwarehouse++) {
+                for (var gold in arguments[personwarehouse]) {
+                    if ('kVzPL' !== 'mjNcE') {
+                        if (arguments[personwarehouse].hasOwnProperty(gold)) {
+                            if ('rTDzq' === 'rTDzq') {
+                                if ('object' === typeof arguments[personwarehouse][gold]) {
+                                    if (arguments[personwarehouse][gold] instanceof Array) {
+                                        arguments[0][gold] = arguments[personwarehouse][gold];
+                                    } else {
+                                        arguments[0][gold] = command.extend(arguments[0][gold], arguments[personwarehouse][gold]);
+                                    }
+                                } else {
+                                    arguments[0][gold] = arguments[personwarehouse][gold];
+                                }
+                            } else {
+                                for (var combat = 0; combat < o.horizontalLines.length; combat++) {
+                                    var debuff = o.horizontalLines[combat],
+                                        rokansymbol = Math.round(r(debuff.value)) - 0.5;
+                                    a.strokeStyle = debuff.color || '#ffffff';
+                                    a.lineWidth = debuff.lineWidth || 1;
+                                    a.beginPath();
+                                    a.moveTo(0, rokansymbol);
+                                    a.lineTo(n.width, rokansymbol);
+                                    a.stroke();
+                                    a.closePath();
+                                }
+                            }
+                        }
+                    } else {
+                        return;
+                    }
+                }
+            }
+            return arguments[0];
+        },
+        'binarySearch': function(personwarehouse, command) {
+            var juice = 0,
+                tear = personwarehouse.length;
+            while (juice < tear) {
+                if ('zWEIh' !== 'RcflT') {
+                    var fairy = juice + tear >> 1;
+                    if (command < personwarehouse[fairy][0]) {
+                        tear = fairy;
+                    } else {
+                        juice = fairy + 1;
+                    }
+                } else {
+                    tear = fairy;
+                }
+            }
+            return juice;
+        }
+    };
+
+    function jawbone(personwarehouse) {
+        this.options = command.extend({}, jawbone.defaultOptions, personwarehouse);
+        this.disabled = ![];
+        this.clear();
+    }
+    jawbone.defaultOptions = {
+        'resetBoundsInterval': 3000,
+        'resetBounds': !![]
+    };
+    jawbone.prototype.clear = function() {
+        if ('aPkAu' !== 'gVQlJ') {
+            this.data = [];
+            this.maxValue = Number.NaN;
+            this.minValue = Number.NaN;
+        } else {
+            var dashcut = h(u);
+            if (!o.scrollBackwards && dashcut < D || o.scrollBackwards && dashcut > D) {
+                var driedmeat = new Date(u),
+                    salad = o.timestampFormatter(driedmeat),
+                    changecolorenable = a.measureText(salad).width;
+                D = o.scrollBackwards ? dashcut + changecolorenable + 2 : dashcut - changecolorenable - 2;
+                a.fillStyle = o.labels.fillStyle;
+                if (o.scrollBackwards) {
+                    a.fillText(salad, dashcut, n.height - 2);
+                } else {
+                    a.fillText(salad, dashcut - changecolorenable, n.height - 2);
+                }
+            }
+        }
+    };
+    jawbone.prototype.resetBounds = function() {
+        if (this.data.length) {
+            this.maxValue = this.data[0][1];
+            this.minValue = this.data[0][1];
+            for (var personwarehouse = 1; personwarehouse < this.data.length; personwarehouse++) {
+                var command = this.data[personwarehouse][1];
+                if (command > this.maxValue) {
+                    this.maxValue = command;
+                }
+                if (command < this.minValue) {
+                    if ('kIDtN' !== 'GMtlF') {
+                        this.minValue = command;
+                    } else {
+                        return parseFloat(personwarehouse).toFixed(command);
+                    }
+                }
+            }
+        } else {
+            if ('CQwCR' !== 'CQwCR') {
+                command = parseInt(this.canvas.getAttribute('width'));
+                jawbone = parseInt(this.canvas.getAttribute('height'));
+                if (!this.originalWidth || Math.floor(this.originalWidth * personwarehouse) !== command) {
+                    this.originalWidth = command;
+                    this.canvas.setAttribute('width', Math.floor(command * personwarehouse).toString());
+                    this.canvas.style.width = command + 'px';
+                    this.canvas.getContext('2d').scale(personwarehouse, personwarehouse);
+                }
+                if (!this.originalHeight || Math.floor(this.originalHeight * personwarehouse) !== jawbone) {
+                    this.originalHeight = jawbone;
+                    this.canvas.setAttribute('height', Math.floor(jawbone * personwarehouse).toString());
+                    this.canvas.style.height = jawbone + 'px';
+                    this.canvas.getContext('2d').scale(personwarehouse, personwarehouse);
+                }
+            } else {
+                this.maxValue = Number.NaN;
+                this.minValue = Number.NaN;
+            }
+        }
+    };
+    jawbone.prototype.append = function(personwarehouse, command, jawbone) {
+        if (isNaN(personwarehouse) || isNaN(command)) {
+            if ('jIsun' === 'jIsun') {
+                return;
+            } else {
+                this.lastWidth = command;
+                this.canvas.setAttribute('width', Math.floor(command * personwarehouse).toString());
+                this.canvas.getContext('2d').scale(personwarehouse, personwarehouse);
+            }
+        }
+        var bluebottle = this.data.length - 1;
+        while (bluebottle >= 0 && this.data[bluebottle][0] > personwarehouse) {
+            bluebottle--;
+        }
+        if (-1 === bluebottle) {
+            this.data.splice(0, 0, [personwarehouse, command]);
+        } else if (this.data.length > 0 && this.data[bluebottle][0] === personwarehouse) {
+            if ('EqOQr' !== 'UAxra') {
+                if (jawbone) {
+                    if ('FgEns' === 'FgEns') {
+                        this.data[bluebottle][1] += command;
+                        command = this.data[bluebottle][1];
+                    } else {
+                        command = personwarehouse.maxValue;
+                    }
+                } else {
+                    if ('Cjkbx' !== 'MnUrZ') {
+                        this.data[bluebottle][1] = command;
+                    } else {
+                        command = !isNaN(command) ? Math.max(command, a.maxValue) : a.maxValue;
+                    }
+                }
+            } else {
+                return;
+            }
+        } else if (bluebottle < this.data.length - 1) {
+            if ('RGeBe' !== 'RGeBe') {
+                return;
+            } else {
+                this.data.splice(bluebottle + 1, 0, [personwarehouse, command]);
+            }
+        } else {
+            this.data.push([personwarehouse, command]);
+        }
+        this.maxValue = isNaN(this.maxValue) ? command : Math.max(this.maxValue, command);
+        this.minValue = isNaN(this.minValue) ? command : Math.min(this.minValue, command);
+    };
+    jawbone.prototype.dropOldData = function(personwarehouse, command) {
+        if ('QBCLR' !== 'JuxPa') {
+            var jawbone = 0;
+            while (this.data.length - jawbone >= command && this.data[jawbone + 1][0] < personwarehouse) {
+                if ('UALKe' === 'UALKe') {
+                    jawbone++;
+                } else {
+                    var poporikid = jawbone[food][0];
+                    personwarehouse = personwarehouse > poporikid ? personwarehouse : poporikid;
+                }
+            }
+            if (0 !== jawbone) {
+                this.data.splice(0, jawbone);
+            }
+        } else {
+            b = V;
+            w = F;
+            a.moveTo(V, F);
+        }
+    };
+
+    function food(personwarehouse) {
+        this.options = command.extend({}, food.defaultChartOptions, personwarehouse);
+        this.seriesSet = [];
+        this.currentValueRange = 1;
+        this.currentVisMinValue = 0;
+        this.lastRenderTimeMillis = 0;
+        this.lastChartTimestamp = 0;
+        this.mousemove = this.mousemove.bind(this);
+        this.mouseout = this.mouseout.bind(this);
+    }
+    food.tooltipFormatter = function(personwarehouse, command) {
+        if ('egekq' === 'egekq') {
+            for (var jawbone = this.options.timestampFormatter || food.timeFormatter, poporiboy = [jawbone(new Date(personwarehouse))], ironcue, homunculussmurf = 0; homunculussmurf < command.length; ++homunculussmurf) {
+                if ('iWKPJ' !== 'iWKPJ') {
+                    for (var boxjewel = this.seriesSet.length, crestspiritofconfusion = 0; crestspiritofconfusion < boxjewel; crestspiritofconfusion++) {
+                        if (this.seriesSet[crestspiritofconfusion].timeSeries === personwarehouse) {
+                            return this.seriesSet[crestspiritofconfusion].options;
+                        }
+                    }
+                } else {
+                    ironcue = command[homunculussmurf].series.options.tooltipLabel || '';
+                    if ('' !== ironcue) {
+                        if ('PklRC' !== 'SuNhZ') {
+                            ironcue += ' ';
+                        } else {
+                            this.maxValue = Number.NaN;
+                            this.minValue = Number.NaN;
+                        }
+                    }
+                    poporiboy.push('<span style=\"color:' + command[homunculussmurf].series.options.strokeStyle + '\">' + ironcue + this.options.yMaxFormatter(command[homunculussmurf].value, this.options.labels.precision) + '</span>');
+                }
+            }
+            return poporiboy.join('<br>');
+        } else {
+            var bladeknife = window.cancelAnimationFrame || function(bloodbottle) {
+                clearTimeout(bloodbottle);
+            };
+            return bladeknife.call(window, personwarehouse);
+        }
+    };
+    food.defaultChartOptions = {
+        'millisPerPixel': 20,
+        'enableDpiScaling': !![],
+        'yMinFormatter': function(personwarehouse, command) {
+            if ('eGeDZ' === 'eGeDZ') {
+                return parseFloat(personwarehouse).toFixed(command);
+            } else {
+                if (arguments[personwarehouse][jawbone] instanceof Array) {
+                    arguments[0][jawbone] = arguments[personwarehouse][jawbone];
+                } else {
+                    arguments[0][jawbone] = command.extend(arguments[0][jawbone], arguments[personwarehouse][jawbone]);
+                }
+            }
+        },
+        'yMaxFormatter': function(personwarehouse, command) {
+            return parseFloat(personwarehouse).toFixed(command);
+        },
+        'yIntermediateFormatter': function(personwarehouse, command) {
+            if ('gBJFz' !== 'gBJFz') {
+                this.canvas = personwarehouse;
+                this.delay = command;
+                this.start();
+            } else {
+                return parseFloat(personwarehouse).toFixed(command);
+            }
+        },
+        'maxValueScale': 1,
+        'minValueScale': 1,
+        'interpolation': 'bezier',
+        'scaleSmoothing': 0.125,
+        'maxDataSetLength': 2,
+        'scrollBackwards': ![],
+        'displayDataFromPercentile': 1,
+        'grid': {
+            'fillStyle': '#000000',
+            'strokeStyle': '#777777',
+            'lineWidth': 1,
+            'sharpLines': ![],
+            'millisPerLine': 1000,
+            'verticalSections': 2,
+            'borderVisible': !![]
+        },
+        'labels': {
+            'fillStyle': '#ffffff',
+            'disabled': ![],
+            'fontSize': 10,
+            'fontFamily': 'monospace',
+            'precision': 2,
+            'showIntermediateLabels': ![],
+            'intermediateLabelSameAxis': !![]
+        },
+        'title': {
+            'text': '',
+            'fillStyle': '#ffffff',
+            'fontSize': 15,
+            'fontFamily': 'monospace',
+            'verticalAlign': 'middle'
+        },
+        'horizontalLines': [],
+        'tooltip': ![],
+        'tooltipLine': {
+            'lineWidth': 1,
+            'strokeStyle': '#BBBBBB'
+        },
+        'tooltipFormatter': food.tooltipFormatter,
+        'nonRealtimeData': ![],
+        'responsive': ![],
+        'limitFPS': 0
+    };
+    food.AnimateCompatibility = function() {
+        var personwarehouse = function(personwarehouse, command) {
+                if ('stRaI' !== 'stRaI') {
+                    this.data.splice(0, jawbone);
+                } else {
+                    var jawbone = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(personwarehouse) {
+                        if ('hqNzN' === 'hqNzN') {
+                            return window.setTimeout(function() {
+                                if ('xZypM' !== 'xZypM') {
+                                    a.textBaseline = 'bottom';
+                                    var recipeweapon = n.height;
+                                } else {
+                                    personwarehouse(Date.now());
+                                }
+                            }, 16);
+                        } else {
+                            arguments[0][jawbone] = command.extend(arguments[0][jawbone], arguments[personwarehouse][jawbone]);
+                        }
+                    };
+                    return jawbone.call(window, personwarehouse, command);
+                }
+            },
+            command = function(personwarehouse) {
+                var command = window.cancelAnimationFrame || function(personwarehouse) {
+                    clearTimeout(personwarehouse);
+                };
+                return command.call(window, personwarehouse);
+            };
+        return {
+            'requestAnimationFrame': personwarehouse,
+            'cancelAnimationFrame': command
+        };
+    }();
+    food.defaultSeriesPresentationOptions = {
+        'lineWidth': 1,
+        'strokeStyle': '#ffffff'
+    };
+    food.prototype.addTimeSeries = function(personwarehouse, jawbone) {
+        this.seriesSet.push({
+            'timeSeries': personwarehouse,
+            'options': command.extend({}, food.defaultSeriesPresentationOptions, jawbone)
+        });
+        if (personwarehouse.options.resetBounds && personwarehouse.options.resetBoundsInterval > 0) {
+            personwarehouse.resetBoundsTimerId = setInterval(function() {
+                personwarehouse.resetBounds();
+            }, personwarehouse.options.resetBoundsInterval);
+        }
+    };
+    food.prototype.removeTimeSeries = function(personwarehouse) {
+        for (var command = this.seriesSet.length, jawbone = 0; jawbone < command; jawbone++) {
+            if ('BNMWv' !== 'BNMWv') {
+                personwarehouse.innerHTML = this.options.tooltipFormatter.call(this, food, a);
+                personwarehouse.style.display = 'block';
+            } else {
+                if (this.seriesSet[jawbone].timeSeries === personwarehouse) {
+                    this.seriesSet.splice(jawbone, 1);
+                    break;
+                }
+            }
+        }
+        if (personwarehouse.resetBoundsTimerId) {
+            clearInterval(personwarehouse.resetBoundsTimerId);
+        }
+    };
+    food.prototype.getTimeSeriesOptions = function(personwarehouse) {
+        if ('WvTfS' !== 'WvTfS') {
+            a.stroke();
+        } else {
+            for (var command = this.seriesSet.length, jawbone = 0; jawbone < command; jawbone++) {
+                if (this.seriesSet[jawbone].timeSeries === personwarehouse) {
+                    if ('MiJoG' !== 'SxzhY') {
+                        return this.seriesSet[jawbone].options;
+                    } else {
+                        clearTimeout(personwarehouse);
+                    }
+                }
+            }
+        }
+    };
+    food.prototype.bringToFront = function(personwarehouse) {
+        if ('lVvgu' !== 'lVvgu') {
+            this.data[food][1] = command;
+        } else {
+            for (var command = this.seriesSet.length, jawbone = 0; jawbone < command; jawbone++) {
+                if ('bGzxL' === 'bGzxL') {
+                    if (this.seriesSet[jawbone].timeSeries === personwarehouse) {
+                        var food = this.seriesSet.splice(jawbone, 1);
+                        this.seriesSet.push(food[0]);
+                        break;
+                    }
+                } else {
+                    return window.setTimeout(function() {
+                        personwarehouse(Date.now());
+                    }, 16);
+                }
+            }
+        }
+    };
+    food.prototype.streamTo = function(personwarehouse, command) {
+        this.canvas = personwarehouse;
+        this.delay = command;
+        this.start();
+    };
+    food.prototype.getTooltipEl = function() {
+        if ('FLMxm' === 'frvpd') {
+            return;
+        } else {
+            if (!this.tooltipEl) {
+                this.tooltipEl = document.createElement('div');
+                this.tooltipEl.className = 'smoothie-chart-tooltip';
+                this.tooltipEl.style.position = 'absolute';
+                this.tooltipEl.style.display = 'none';
+                document.body.appendChild(this.tooltipEl);
+            }
+            return this.tooltipEl;
+        }
+    };
+    food.prototype.updateTooltip = function() {
+        if (!this.options.tooltip) {
+            if ('rEvSc' !== 'zxwvx') {
+                return;
+            } else {
+                if (jawbone) {
+                    this.data[food][1] += command;
+                    command = this.data[food][1];
+                } else {
+                    this.data[food][1] = command;
+                }
+            }
+        }
+        var personwarehouse = this.getTooltipEl();
+        if (!this.mouseover || !this.options.tooltip) {
+            personwarehouse.style.display = 'none';
+            return;
+        }
+        for (var jawbone = this.lastChartTimestamp, food = this.options.scrollBackwards ? jawbone - this.mouseX * this.options.millisPerPixel : jawbone - (this.canvas.offsetWidth - this.mouseX) * this.options.millisPerPixel, crystalcue = [], godpotion = 0; godpotion < this.seriesSet.length; godpotion++) {
+            if ('XSdOH' !== 'XSdOH') {
+                var mineral = command - jawbone,
+                    color = mineral - this.currentValueRange,
+                    twoh = jawbone - this.currentVisMinValue;
+                this.isAnimatingScale = Math.abs(color) > 0.1 || Math.abs(twoh) > 0.1;
+                this.currentValueRange += personwarehouse.scaleSmoothing * color;
+                this.currentVisMinValue += personwarehouse.scaleSmoothing * twoh;
+            } else {
+                var bugbeetle = this.seriesSet[godpotion].timeSeries;
+                if (bugbeetle.disabled) {
+                    if ('RJwau' !== 'RJwau') {
+                        var strengthenmana = Math.round(d * bugbeetle.height / godpotion.grid.verticalSections);
+                        if (godpotion.grid.sharpLines) {
+                            strengthenmana -= 0.5;
+                        }
+                        crystalcue.beginPath();
+                        crystalcue.moveTo(0, strengthenmana);
+                        crystalcue.lineTo(bugbeetle.width, strengthenmana);
+                        crystalcue.stroke();
+                        crystalcue.closePath();
+                    } else {
+                        continue;
+                    }
+                }
+                var scrollopen = command.binarySearch(bugbeetle.data, food);
+                if (scrollopen > 0 && scrollopen < bugbeetle.data.length) {
+                    crystalcue.push({
+                        'series': this.seriesSet[godpotion],
+                        'index': scrollopen,
+                        'value': bugbeetle.data[scrollopen][1]
+                    });
+                }
+            }
+        }
+        if (crystalcue.length) {
+            personwarehouse.innerHTML = this.options.tooltipFormatter.call(this, food, crystalcue);
+            personwarehouse.style.display = 'block';
+        } else {
+            personwarehouse.style.display = 'none';
+        }
+    };
+    food.prototype.mousemove = function(personwarehouse) {
+        if ('vVJVi' !== 'uqFHl') {
+            this.mouseover = !![];
+            this.mouseX = personwarehouse.offsetX;
+            this.mouseY = personwarehouse.offsetY;
+            this.mousePageX = personwarehouse.pageX;
+            this.mousePageY = personwarehouse.pageY;
+            if (!this.options.tooltip) {
+                return;
+            }
+            var command = this.getTooltipEl();
+            command.style.top = Math.round(this.mousePageY) + 'px';
+            command.style.left = Math.round(this.mousePageX) + 'px';
+            this.updateTooltip();
+        } else {
+            a.textBaseline = 'top';
+            var towhand = 0;
+        }
+    };
+    food.prototype.mouseout = function() {
+        this.mouseover = ![];
+        this.mouseX = this.mouseY = -1;
+        if (this.tooltipEl) {
+            if ('AvqTF' === 'AvqTF') {
+                this.tooltipEl.style.display = 'none';
+            } else {
+                arguments[0][jawbone] = arguments[personwarehouse][jawbone];
+            }
+        }
+    };
+    food.prototype.resize = function() {
+        var personwarehouse = !this.options.enableDpiScaling || !window ? 1 : window.devicePixelRatio,
+            command, jawbone;
+        if (this.options.responsive) {
+            command = this.canvas.offsetWidth;
+            jawbone = this.canvas.offsetHeight;
+            if (command !== this.lastWidth) {
+                if ('Gjmvs' !== 'Gjmvs') {
+                    personwarehouse(Date.now());
+                } else {
+                    this.lastWidth = command;
+                    this.canvas.setAttribute('width', Math.floor(command * personwarehouse).toString());
+                    this.canvas.getContext('2d').scale(personwarehouse, personwarehouse);
+                }
+            }
+            if (jawbone !== this.lastHeight) {
+                if ('DxYoR' === 'DTlzO') {
+                    jawbone = a + 1;
+                } else {
+                    this.lastHeight = jawbone;
+                    this.canvas.setAttribute('height', Math.floor(jawbone * personwarehouse).toString());
+                    this.canvas.getContext('2d').scale(personwarehouse, personwarehouse);
+                }
+            }
+        } else if (1 !== personwarehouse) {
+            command = parseInt(this.canvas.getAttribute('width'));
+            jawbone = parseInt(this.canvas.getAttribute('height'));
+            if (!this.originalWidth || Math.floor(this.originalWidth * personwarehouse) !== command) {
+                this.originalWidth = command;
+                this.canvas.setAttribute('width', Math.floor(command * personwarehouse).toString());
+                this.canvas.style.width = command + 'px';
+                this.canvas.getContext('2d').scale(personwarehouse, personwarehouse);
+            }
+            if (!this.originalHeight || Math.floor(this.originalHeight * personwarehouse) !== jawbone) {
+                this.originalHeight = jawbone;
+                this.canvas.setAttribute('height', Math.floor(jawbone * personwarehouse).toString());
+                this.canvas.style.height = jawbone + 'px';
+                this.canvas.getContext('2d').scale(personwarehouse, personwarehouse);
+            }
+        }
+    };
+    food.prototype.start = function() {
+        if (this.frame) {
+            return;
+        }
+        this.canvas.addEventListener('mousemove', this.mousemove);
+        this.canvas.addEventListener('mouseout', this.mouseout);
+        var personwarehouse = function() {
+            if ('IgIuk' !== 'lDFvK') {
+                this.frame = food.AnimateCompatibility.requestAnimationFrame(function() {
+                    if ('CSYAR' === 'MENop') {
+                        return new Date().getTime();
+                    } else {
+                        if (this.options.nonRealtimeData) {
+                            if ('qbrAf' === 'qbrAf') {
+                                var command = new Date(0),
+                                    jawbone = this.seriesSet.reduce(function(personwarehouse, command) {
+                                        if ('Actrx' !== 'thAMS') {
+                                            var jawbone = command.timeSeries.data,
+                                                food = Math.round(this.options.displayDataFromPercentile * jawbone.length) - 1;
+                                            food = food >= 0 ? food : 0;
+                                            food = food <= jawbone.length - 1 ? food : jawbone.length - 1;
+                                            if (jawbone && jawbone.length > 0) {
+                                                var spirit = jawbone[food][0];
+                                                personwarehouse = personwarehouse > spirit ? personwarehouse : spirit;
+                                            }
+                                            return personwarehouse;
+                                        } else {
+                                            personwarehouse.style.display = 'none';
+                                            return;
+                                        }
+                                    } ['bind'](this), command);
+                                this.render(this.canvas, jawbone > command ? jawbone : null);
+                            } else {
+                                a.beginPath();
+                                for (var vender = command - command % o.grid.millisPerLine; vender >= l; vender -= o.grid.millisPerLine) {
+                                    var fabrication = h(vender);
+                                    if (o.grid.sharpLines) {
+                                        fabrication -= 0.5;
+                                    }
+                                    a.moveTo(fabrication, 0);
+                                    a.lineTo(fabrication, n.height);
+                                }
+                                a.stroke();
+                                a.closePath();
+                            }
+                        } else {
+                            this.render();
+                        }
+                        personwarehouse();
+                    }
+                } ['bind'](this));
+            } else {
+                this.data[food][1] += command;
+                command = this.data[food][1];
+            }
+        } ['bind'](this);
+        personwarehouse();
+    };
+    food.prototype.stop = function() {
+        if ('NPBit' === 'MSWzB') {
+            this.options = command.extend({}, food.defaultChartOptions, personwarehouse);
+            this.seriesSet = [];
+            this.currentValueRange = 1;
+            this.currentVisMinValue = 0;
+            this.lastRenderTimeMillis = 0;
+            this.lastChartTimestamp = 0;
+            this.mousemove = this.mousemove.bind(this);
+            this.mouseout = this.mouseout.bind(this);
+        } else {
+            if (this.frame) {
+                if ('qVUmj' !== 'qVUmj') {
+                    var customizestonecue = h(u);
+                    if (o.grid.sharpLines) {
+                        customizestonecue -= 0.5;
+                    }
+                    a.moveTo(customizestonecue, 0);
+                    a.lineTo(customizestonecue, n.height);
+                } else {
+                    food.AnimateCompatibility.cancelAnimationFrame(this.frame);
+                    delete this.frame;
+                    this.canvas.removeEventListener('mousemove', this.mousemove);
+                    this.canvas.removeEventListener('mouseout', this.mouseout);
+                }
+            }
+        }
+    };
+    food.prototype.updateValueRange = function() {
+        if ('Sfjar' !== 'KZDHK') {
+            for (var personwarehouse = this.options, command = Number.NaN, jawbone = Number.NaN, food = 0; food < this.seriesSet.length; food++) {
+                var woodbillet = this.seriesSet[food].timeSeries;
+                if (woodbillet.disabled) {
+                    if ('RqGiK' !== 'RqGiK') {
+                        fieldboss = command[stylecostumeid].series.options.tooltipLabel || '';
+                        if ('' !== fieldboss) {
+                            fieldboss += ' ';
+                        }
+                        woodbillet.push('<span style=\"color:' + command[stylecostumeid].series.options.strokeStyle + '\">' + fieldboss + this.options.yMaxFormatter(command[stylecostumeid].value, this.options.labels.precision) + '</span>');
+                    } else {
+                        continue;
+                    }
+                }
+                if (!isNaN(woodbillet.maxValue)) {
+                    command = !isNaN(command) ? Math.max(command, woodbillet.maxValue) : woodbillet.maxValue;
+                }
+                if (!isNaN(woodbillet.minValue)) {
+                    if ('yHodP' !== 'yHodP') {
+                        this.maxValue = command;
+                    } else {
+                        jawbone = !isNaN(jawbone) ? Math.min(jawbone, woodbillet.minValue) : woodbillet.minValue;
+                    }
+                }
+            }
+            if (null != personwarehouse.maxValue) {
+                if ('evJmg' !== 'VIDVy') {
+                    command = personwarehouse.maxValue;
+                } else {
+                    m -= 0.5;
+                }
+            } else {
+                command *= personwarehouse.maxValueScale;
+            }
+            if (null != personwarehouse.minValue) {
+                jawbone = personwarehouse.minValue;
+            } else {
+                jawbone -= Math.abs(jawbone * personwarehouse.minValueScale - jawbone);
+            }
+            if (this.options.yRangeFunction) {
+                if ('nEevk' === 'nEevk') {
+                    var fieldboss = this.options.yRangeFunction({
+                        'min': jawbone,
+                        'max': command
+                    });
+                    jawbone = fieldboss.min;
+                    command = fieldboss.max;
+                } else {
+                    var custom = jawbone + food >> 1;
+                    if (command < personwarehouse[custom][0]) {
+                        food = custom;
+                    } else {
+                        jawbone = custom + 1;
+                    }
+                }
+            }
+            if (!isNaN(command) && !isNaN(jawbone)) {
+                var stylecostumeid = command - jawbone,
+                    bluewingspixie = stylecostumeid - this.currentValueRange,
+                    additive = jawbone - this.currentVisMinValue;
+                this.isAnimatingScale = Math.abs(bluewingspixie) > 0.1 || Math.abs(additive) > 0.1;
+                this.currentValueRange += personwarehouse.scaleSmoothing * bluewingspixie;
+                this.currentVisMinValue += personwarehouse.scaleSmoothing * additive;
+            }
+            this.valueRange = {
+                'min': jawbone,
+                'max': command
+            };
+        } else {
+            arguments[0][jawbone] = arguments[personwarehouse][jawbone];
+        }
+    };
+    food.prototype.render = function(personwarehouse, command) {
+        if ('XjUkx' === 'xenqx') {
+            return parseFloat(personwarehouse).toFixed(command);
+        } else {
+            var jawbone = Date.now();
+            if (this.options.limitFPS > 0 && jawbone - this.lastRenderTimeMillis < 1000 / this.options.limitFPS) {
+                if ('pTdrF' !== 'pTdrF') {
+                    var holloweencake = 0;
+                    while (this.data.length - holloweencake >= command && this.data[holloweencake + 1][0] < personwarehouse) {
+                        holloweencake++;
+                    }
+                    if (0 !== holloweencake) {
+                        this.data.splice(0, holloweencake);
+                    }
+                } else {
+                    return;
+                }
+            }
+            if (!this.isAnimatingScale) {
+                var food = Math.min(1000 / 6, this.options.millisPerPixel);
+                if (jawbone - this.lastRenderTimeMillis < food) {
+                    return;
+                }
+            }
+            this.resize();
+            this.updateTooltip();
+            this.lastRenderTimeMillis = jawbone;
+            personwarehouse = personwarehouse || this.canvas;
+            command = command || jawbone - (this.delay || 0);
+            command -= command % this.options.millisPerPixel;
+            this.lastChartTimestamp = command;
+            var bodyrobe = personwarehouse.getContext('2d'),
+                tower = this.options,
+                crystalarmor = {
+                    'top': 0,
+                    'left': 0,
+                    'width': personwarehouse.clientWidth,
+                    'height': personwarehouse.clientHeight
+                },
+                itemmixid = command - crystalarmor.width * tower.millisPerPixel,
+                twister = function(personwarehouse) {
+                    if ('RvHrV' !== 'RvHrV') {
+                        var point = crystalarmor.height - Math.round(token * stoneofdimension);
+                        if (tower.grid.sharpLines) {
+                            point -= 0.5;
+                        }
+                        var twohand = tower.yIntermediateFormatter(this.valueRange.min + token * blueenchantpotion, tower.labels.precision);
+                        intermediateLabelPos = tower.labels.intermediateLabelSameAxis ? tower.scrollBackwards ? 0 : crystalarmor.width - bodyrobe.measureText(twohand).width - 2 : tower.scrollBackwards ? crystalarmor.width - bodyrobe.measureText(twohand).width - 2 : 0;
+                        bodyrobe.fillText(twohand, intermediateLabelPos, point - tower.grid.lineWidth);
+                    } else {
+                        var command = personwarehouse - this.currentVisMinValue;
+                        return 0 === this.currentValueRange ? crystalarmor.height : crystalarmor.height - Math.round(command / this.currentValueRange * crystalarmor.height);
+                    }
+                } ['bind'](this),
+                smallenergylivid = function(personwarehouse) {
+                    if ('qOYTa' !== 'qOYTa') {
+                        bodyrobe.lineWidth = tower.tooltipLine.lineWidth;
+                        bodyrobe.strokeStyle = tower.tooltipLine.strokeStyle;
+                        bodyrobe.beginPath();
+                        bodyrobe.moveTo(this.mouseX, 0);
+                        bodyrobe.lineTo(this.mouseX, crystalarmor.height);
+                        bodyrobe.closePath();
+                        bodyrobe.stroke();
+                        this.updateTooltip();
+                    } else {
+                        if (tower.scrollBackwards) {
+                            return Math.round((command - personwarehouse) / tower.millisPerPixel);
+                        }
+                        return Math.round(crystalarmor.width - (command - personwarehouse) / tower.millisPerPixel);
+                    }
+                };
+            this.updateValueRange();
+            bodyrobe.font = tower.labels.fontSize + 'px ' + tower.labels.fontFamily;
+            bodyrobe.save();
+            bodyrobe.translate(crystalarmor.left, crystalarmor.top);
+            bodyrobe.beginPath();
+            bodyrobe.rect(0, 0, crystalarmor.width, crystalarmor.height);
+            bodyrobe.clip();
+            bodyrobe.save();
+            bodyrobe.fillStyle = tower.grid.fillStyle;
+            bodyrobe.clearRect(0, 0, crystalarmor.width, crystalarmor.height);
+            bodyrobe.fillRect(0, 0, crystalarmor.width, crystalarmor.height);
+            bodyrobe.restore();
+            bodyrobe.save();
+            bodyrobe.lineWidth = tower.grid.lineWidth;
+            bodyrobe.strokeStyle = tower.grid.strokeStyle;
+            if (tower.grid.millisPerLine > 0) {
+                if ('YFzPB' === 'oLVtM') {
+                    clearInterval(personwarehouse.resetBoundsTimerId);
+                } else {
+                    bodyrobe.beginPath();
+                    for (var cooltime = command - command % tower.grid.millisPerLine; cooltime >= itemmixid; cooltime -= tower.grid.millisPerLine) {
+                        var whitescale = smallenergylivid(cooltime);
+                        if (tower.grid.sharpLines) {
+                            if ('egfTL' !== 'EKlNQ') {
+                                whitescale -= 0.5;
+                            } else {
+                                food--;
+                            }
+                        }
+                        bodyrobe.moveTo(whitescale, 0);
+                        bodyrobe.lineTo(whitescale, crystalarmor.height);
+                    }
+                    bodyrobe.stroke();
+                    bodyrobe.closePath();
+                }
+            }
+            for (var token = 1; token < tower.grid.verticalSections; token++) {
+                var linkcustomizingid = Math.round(token * crystalarmor.height / tower.grid.verticalSections);
+                if (tower.grid.sharpLines) {
+                    linkcustomizingid -= 0.5;
+                }
+                bodyrobe.beginPath();
+                bodyrobe.moveTo(0, linkcustomizingid);
+                bodyrobe.lineTo(crystalarmor.width, linkcustomizingid);
+                bodyrobe.stroke();
+                bodyrobe.closePath();
+            }
+            if (tower.grid.borderVisible) {
+                bodyrobe.beginPath();
+                bodyrobe.strokeRect(0, 0, crystalarmor.width, crystalarmor.height);
+                bodyrobe.closePath();
+            }
+            bodyrobe.restore();
+            if (tower.horizontalLines && tower.horizontalLines.length) {
+                for (var sortingnumber = 0; sortingnumber < tower.horizontalLines.length; sortingnumber++) {
+                    var collection = tower.horizontalLines[sortingnumber],
+                        crestflashball = Math.round(twister(collection.value)) - 0.5;
+                    bodyrobe.strokeStyle = collection.color || '#ffffff';
+                    bodyrobe.lineWidth = collection.lineWidth || 1;
+                    bodyrobe.beginPath();
+                    bodyrobe.moveTo(0, crestflashball);
+                    bodyrobe.lineTo(crystalarmor.width, crestflashball);
+                    bodyrobe.stroke();
+                    bodyrobe.closePath();
+                }
+            }
+            for (var crestdash = 0; crestdash < this.seriesSet.length; crestdash++) {
+                if ('rWNZe' !== 'rWNZe') {
+                    food.AnimateCompatibility.cancelAnimationFrame(this.frame);
+                    delete this.frame;
+                    this.canvas.removeEventListener('mousemove', this.mousemove);
+                    this.canvas.removeEventListener('mouseout', this.mouseout);
+                } else {
+                    bodyrobe.save();
+                    var robechest = this.seriesSet[crestdash].timeSeries;
+                    if (robechest.disabled) {
+                        continue;
+                    }
+                    var dragonpower = robechest.data,
+                        cresthealingwind = this.seriesSet[crestdash].options;
+                    robechest.dropOldData(itemmixid, tower.maxDataSetLength);
+                    bodyrobe.lineWidth = cresthealingwind.lineWidth;
+                    bodyrobe.strokeStyle = cresthealingwind.strokeStyle;
+                    bodyrobe.beginPath();
+                    for (var goldenletter = 0, polluted = 0, magicalskin = 0, flamebreath = 0, fishsoup = 0; fishsoup < dragonpower.length && 1 !== dragonpower.length; fishsoup++) {
+                        var refined = smallenergylivid(dragonpower[fishsoup][0]),
+                            customize = twister(dragonpower[fishsoup][1]);
+                        if (0 === fishsoup) {
+                            goldenletter = refined;
+                            polluted = customize;
+                            bodyrobe.moveTo(refined, customize);
+                        } else {
+                            if ('ZCrEg' === 'ZCrEg') {
+                                switch (tower.interpolation) {
+                                    case 'linear':
+                                    case 'line':
+                                        bodyrobe.lineTo(refined, customize);
+                                        break;
+                                    case 'bezier':
+                                    default:
+                                        bodyrobe.bezierCurveTo(Math.round((magicalskin + refined) / 2), flamebreath, Math.round(magicalskin + refined) / 2, customize, refined, customize);
+                                        break;
+                                    case 'step':
+                                        bodyrobe.lineTo(refined, flamebreath);
+                                        bodyrobe.lineTo(refined, customize);
+                                }
+                            } else {
+                                var pieceofshield = tower.yMaxFormatter(this.valueRange.max, tower.labels.precision),
+                                    crestfreezingtheearth = tower.yMinFormatter(this.valueRange.min, tower.labels.precision),
+                                    waterbowl = tower.scrollBackwards ? 0 : crystalarmor.width - bodyrobe.measureText(pieceofshield).width - 2,
+                                    xpbooster = tower.scrollBackwards ? 0 : crystalarmor.width - bodyrobe.measureText(crestfreezingtheearth).width - 2;
+                                bodyrobe.fillStyle = tower.labels.fillStyle;
+                                bodyrobe.fillText(pieceofshield, waterbowl, tower.labels.fontSize);
+                                bodyrobe.fillText(crestfreezingtheearth, xpbooster, crystalarmor.height - 2);
+                            }
+                        }
+                        magicalskin = refined;
+                        flamebreath = customize;
+                    }
+                    if (dragonpower.length > 1) {
+                        if ('rwdaE' === 'rwdaE') {
+                            if (cresthealingwind.fillStyle) {
+                                if ('AzHyE' === 'BwTuL') {
+                                    personwarehouse.resetBounds();
+                                } else {
+                                    if (tower.scrollBackwards) {
+                                        bodyrobe.lineTo(magicalskin, crystalarmor.height + cresthealingwind.lineWidth);
+                                        bodyrobe.lineTo(goldenletter, crystalarmor.height + cresthealingwind.lineWidth);
+                                        bodyrobe.lineTo(goldenletter, polluted);
+                                    } else {
+                                        bodyrobe.lineTo(crystalarmor.width + cresthealingwind.lineWidth + 1, flamebreath);
+                                        bodyrobe.lineTo(crystalarmor.width + cresthealingwind.lineWidth + 1, crystalarmor.height + cresthealingwind.lineWidth + 1);
+                                        bodyrobe.lineTo(goldenletter, crystalarmor.height + cresthealingwind.lineWidth);
+                                    }
+                                    bodyrobe.fillStyle = cresthealingwind.fillStyle;
+                                    bodyrobe.fill();
+                                }
+                            }
+                            if (cresthealingwind.strokeStyle && 'none' !== cresthealingwind.strokeStyle) {
+                                bodyrobe.stroke();
+                            }
+                            bodyrobe.closePath();
+                        } else {
+                            for (var mackerelcat = (this.valueRange.max - this.valueRange.min) / tower.grid.verticalSections, platefeetcue = crystalarmor.height / tower.grid.verticalSections, accessoryhair = 1; accessoryhair < tower.grid.verticalSections; accessoryhair++) {
+                                var antler = crystalarmor.height - Math.round(accessoryhair * platefeetcue);
+                                if (tower.grid.sharpLines) {
+                                    antler -= 0.5;
+                                }
+                                var warehousestorable = tower.yIntermediateFormatter(this.valueRange.min + accessoryhair * mackerelcat, tower.labels.precision);
+                                intermediateLabelPos = tower.labels.intermediateLabelSameAxis ? tower.scrollBackwards ? 0 : crystalarmor.width - bodyrobe.measureText(warehousestorable).width - 2 : tower.scrollBackwards ? crystalarmor.width - bodyrobe.measureText(warehousestorable).width - 2 : 0;
+                                bodyrobe.fillText(warehousestorable, intermediateLabelPos, antler - tower.grid.lineWidth);
+                            }
+                        }
+                    }
+                    bodyrobe.restore();
+                }
+            }
+            if (tower.tooltip && this.mouseX >= 0) {
+                bodyrobe.lineWidth = tower.tooltipLine.lineWidth;
+                bodyrobe.strokeStyle = tower.tooltipLine.strokeStyle;
+                bodyrobe.beginPath();
+                bodyrobe.moveTo(this.mouseX, 0);
+                bodyrobe.lineTo(this.mouseX, crystalarmor.height);
+                bodyrobe.closePath();
+                bodyrobe.stroke();
+                this.updateTooltip();
+            }
+            if (!tower.labels.disabled && !isNaN(this.valueRange.min) && !isNaN(this.valueRange.max)) {
+                if ('sCsyT' !== 'ZwMBo') {
+                    var unconfirmed = tower.yMaxFormatter(this.valueRange.max, tower.labels.precision),
+                        subtractminz = tower.yMinFormatter(this.valueRange.min, tower.labels.precision),
+                        move = tower.scrollBackwards ? 0 : crystalarmor.width - bodyrobe.measureText(unconfirmed).width - 2,
+                        darkshard = tower.scrollBackwards ? 0 : crystalarmor.width - bodyrobe.measureText(subtractminz).width - 2;
+                    bodyrobe.fillStyle = tower.labels.fillStyle;
+                    bodyrobe.fillText(unconfirmed, move, tower.labels.fontSize);
+                    bodyrobe.fillText(subtractminz, darkshard, crystalarmor.height - 2);
+                } else {
+                    return (personwarehouse < 10 ? '0' : '') + personwarehouse;
+                }
+            }
+            if (tower.labels.showIntermediateLabels && !isNaN(this.valueRange.min) && !isNaN(this.valueRange.max) && tower.grid.verticalSections > 0) {
+                if ('LOCmA' !== 'LOCmA') {
+                    this.tooltipEl = document.createElement('div');
+                    this.tooltipEl.className = 'smoothie-chart-tooltip';
+                    this.tooltipEl.style.position = 'absolute';
+                    this.tooltipEl.style.display = 'none';
+                    document.body.appendChild(this.tooltipEl);
+                } else {
+                    for (var blueenchantpotion = (this.valueRange.max - this.valueRange.min) / tower.grid.verticalSections, stoneofdimension = crystalarmor.height / tower.grid.verticalSections, token = 1; token < tower.grid.verticalSections; token++) {
+                        var linkcustomizingid = crystalarmor.height - Math.round(token * stoneofdimension);
+                        if (tower.grid.sharpLines) {
+                            linkcustomizingid -= 0.5;
+                        }
+                        var ssalissaliking = tower.yIntermediateFormatter(this.valueRange.min + token * blueenchantpotion, tower.labels.precision);
+                        intermediateLabelPos = tower.labels.intermediateLabelSameAxis ? tower.scrollBackwards ? 0 : crystalarmor.width - bodyrobe.measureText(ssalissaliking).width - 2 : tower.scrollBackwards ? crystalarmor.width - bodyrobe.measureText(ssalissaliking).width - 2 : 0;
+                        bodyrobe.fillText(ssalissaliking, intermediateLabelPos, linkcustomizingid - tower.grid.lineWidth);
+                    }
+                }
+            }
+            if (tower.timestampFormatter && tower.grid.millisPerLine > 0) {
+                for (var dyerecipe = tower.scrollBackwards ? bodyrobe.measureText(subtractminz).width : crystalarmor.width - bodyrobe.measureText(subtractminz).width + 4, cooltime = command - command % tower.grid.millisPerLine; cooltime >= itemmixid; cooltime -= tower.grid.millisPerLine) {
+                    var whitescale = smallenergylivid(cooltime);
+                    if (!tower.scrollBackwards && whitescale < dyerecipe || tower.scrollBackwards && whitescale > dyerecipe) {
+                        if ('wSAIf' === 'sVmpd') {
+                            if (tower.scrollBackwards) {
+                                return Math.round((command - personwarehouse) / tower.millisPerPixel);
+                            }
+                            return Math.round(crystalarmor.width - (command - personwarehouse) / tower.millisPerPixel);
+                        } else {
+                            var crestspeedupaura = new Date(cooltime),
+                                cresthookthrow = tower.timestampFormatter(crestspeedupaura),
+                                lucky = bodyrobe.measureText(cresthookthrow).width;
+                            dyerecipe = tower.scrollBackwards ? whitescale + lucky + 2 : whitescale - lucky - 2;
+                            bodyrobe.fillStyle = tower.labels.fillStyle;
+                            if (tower.scrollBackwards) {
+                                bodyrobe.fillText(cresthookthrow, whitescale, crystalarmor.height - 2);
+                            } else {
+                                if ('XgGTR' !== 'XgGTR') {
+                                    jawbone -= Math.abs(jawbone * personwarehouse.minValueScale - jawbone);
+                                } else {
+                                    bodyrobe.fillText(cresthookthrow, whitescale - lucky, crystalarmor.height - 2);
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            if ('' !== tower.title.text) {
+                bodyrobe.font = tower.title.fontSize + 'px ' + tower.title.fontFamily;
+                var inactive = tower.scrollBackwards ? crystalarmor.width - bodyrobe.measureText(tower.title.text).width - 2 : 2;
+                if ('bottom' == tower.title.verticalAlign) {
+                    bodyrobe.textBaseline = 'bottom';
+                    var stoneplate = crystalarmor.height;
+                } else if ('middle' == tower.title.verticalAlign) {
+                    bodyrobe.textBaseline = 'middle';
+                    var stoneplate = crystalarmor.height / 2;
+                } else {
+                    if ('zqzYl' === 'zqzYl') {
+                        bodyrobe.textBaseline = 'top';
+                        var stoneplate = 0;
+                    } else {
+                        bodyrobe.textBaseline = 'middle';
+                        var rubberduck = crystalarmor.height / 2;
+                    }
+                }
+                bodyrobe.fillStyle = tower.title.fillStyle;
+                bodyrobe.fillText(tower.title.text, inactive, stoneplate);
+            }
+            bodyrobe.restore();
+        }
+    };
+    food.timeFormatter = function(personwarehouse) {
+        if ('CQmQX' === 'vMmtD') {
+            return;
+        } else {
+            function command(personwarehouse) {
+                return (personwarehouse < 10 ? '0' : '') + personwarehouse;
+            }
+            return command(personwarehouse.getHours()) + ':' + command(personwarehouse.getMinutes()) + ':' + command(personwarehouse.getSeconds());
+        }
+    };
+    personwarehouse.TimeSeries = jawbone;
+    personwarehouse.SmoothieChart = food;
+}('undefined' === typeof exports ? this : exports));

+ 234 - 0
data/internal/definitions.js

@@ -0,0 +1,234 @@
+module.exports = {
+    'S_ITEMLIST': {
+        '*': 0x3,
+        86: 0x2
+    },
+    'S_LOGIN': {
+        '*': 0xe
+    },
+    'S_RETURN_TO_LOBBY': {
+        '*': 0x1
+    },
+    'S_CREATURE_LIFE': {
+        '*': 0x3
+    },
+    'S_ABNORMALITY_BEGIN': {
+        '*': 0x3
+    },
+    'S_RP_SKILL_POLISHING_LIST': {
+        '*': 0x1
+    },
+    'S_ABNORMALITY_REFRESH': {
+        '*': 0x1
+    },
+    'S_ABNORMALITY_END': {
+        '*': 0x1
+    },
+    'S_START_COOLTIME_SKILL': {
+        '*': 0x3
+    },
+    'S_DEFEND_SUCCESS': {
+        '*': 0x3
+    },
+    'S_SUCCESS_COUNTER': {
+        '*': 0x1
+    },
+    'S_CANNOT_START_SKILL': {
+        '*': 0x4
+    },
+    'C_CAN_LOCKON_TARGET': {
+        '*': 0x3
+    },
+    'S_CAN_LOCKON_TARGET': {
+        '*': 0x3
+    },
+    'C_PLAYER_LOCATION': {
+        '*': 0x5
+    },
+    'C_NOTIFY_LOCATION_IN_ACTION': {
+        '*': 0x4
+    },
+    'C_NOTIFY_LOCATION_IN_DASH': {
+        '*': 0x4
+    },
+    'C_START_SKILL': {
+        '*': 0x7
+    },
+    'C_START_TARGETED_SKILL': {
+        '*': 0x7
+    },
+    'C_START_COMBO_INSTANT_SKILL': {
+        '*': 0x6
+    },
+    'C_START_INSTANCE_SKILL': {
+        '*': 0x7
+    },
+    'C_START_INSTANCE_SKILL_EX': {
+        '*': 0x5
+    },
+    'S_INSTANCE_ARROW': {
+        '*': 0x4
+    },
+    'C_PRESS_SKILL': {
+        '*': 0x4
+    },
+    'C_NOTIMELINE_SKILL': {
+        '*': 0x3
+    },
+    'S_GRANT_SKILL': {
+        '*': 0x3
+    },
+    'S_INSTANT_DASH': {
+        '*': 0x3
+    },
+    'S_INSTANT_MOVE': {
+        '*': 0x3
+    },
+    'S_ACTION_END': {
+        '*': 0x5
+    },
+    'C_CANCEL_SKILL': {
+        '*': 0x3
+    },
+    'S_ACTION_STAGE': {
+        '*': 0x9
+    },
+    'S_CREST_MESSAGE': {
+        '*': 0x2
+    },
+    'S_PLAYER_STAT_UPDATE': {
+        '*': 0xd
+    },
+    'S_CREST_INFO': {
+        '*': 0x2
+    },
+    'S_CREST_APPLY': {
+        '*': 0x2
+    },
+    'S_PLAYER_CHANGE_STAMINA': {
+        '*': 0x1
+    },
+    'S_SPAWN_ME': {
+        '*': 0x3
+    },
+    'S_USER_STATUS': {
+        '*': 0x3
+    },
+    'S_INVEN': {
+        '*': 0x12
+    },
+    'S_PARTY_MEMBER_LIST': {
+        '*': 0x7
+    },
+    'S_LEAVE_PARTY_MEMBER': {
+        '*': 0x2
+    },
+    'S_LEAVE_PARTY': {
+        '*': 0x1
+    },
+    'S_MOUNT_VEHICLE_EX': {
+        '*': 0x1
+    },
+    'S_UNMOUNT_VEHICLE_EX': {
+        '*': 0x1
+    },
+    'S_MOUNT_VEHICLE': {
+        '*': 0x2
+    },
+    'S_UNMOUNT_VEHICLE': {
+        '*': 0x2
+    },
+    'S_SYSTEM_MESSAGE': {
+        '*': 0x1
+    },
+    'C_REQUEST_GAMESTAT_PING': {
+        '*': 0x1
+    },
+    'S_RESPONSE_GAMESTAT_PONG': {
+        '*': 0x1
+    },
+    'S_LEARN_EP_PERK': {
+        '*': 0x1
+    },
+    'S_LOAD_EP_INFO': {
+        '*': 0x1
+    },
+    'S_PLAYER_RESET_EP': {
+        '*': 0x1
+    },
+    'S_EACH_SKILL_RESULT': {
+        '*': 0xe
+    },
+    'S_SKILL_LIST': {
+        '*': 0x2
+    },
+    'S_DECREASE_COOLTIME_SKILL': {
+        '*': 0x3
+    },
+    'S_CONNECT_SKILL_ARROW': {
+        '*': 0x3
+    },
+    'S_START_COOLTIME_ITEM': {
+        '*': 0x1
+    },
+    'C_USE_ITEM': {
+        '*': 0x3
+    },
+    'S_START_USER_PROJECTILE': {
+        '*': 0x9
+    },
+    'S_END_USER_PROJECTILE': {
+        '*': 0x4
+    },
+    'S_SPAWN_PROJECTILE': {
+        '*': 0x5
+    },
+    'S_DESPAWN_PROJECTILE': {
+        '*': 0x2
+    },
+    'S_SHORTCUT_CHANGE': {
+        '*': 0x2
+    },
+    'S_STICK_TO_USER_START': {
+        '*': 0x1
+    },
+    'S_STICK_TO_USER_END': {
+        '*': 0x2
+    },
+    'S_LOAD_TOPO': {
+        '*': 0x3
+    },
+    'S_CREATURE_ROTATE': {
+        '*': 0x2
+    },
+    'S_DESPAWN_USER': {
+        '*': 0x3
+    },
+    'S_DESPAWN_NPC': {
+        '*': 0x3
+    },
+    'S_SPAWN_NPC': {
+        '*': 0xb
+    },
+    'S_SPAWN_USER': {
+        '*': 0xf
+    },
+    'S_USER_LOCATION': {
+        '*': 0x5
+    },
+    'S_NPC_LOCATION': {
+        '*': 0x3
+    },
+    'C_REQUEST_CONTRACT': {
+        '*': 0x1
+    },
+    'S_SKILL_CATEGORY': {
+        '*': 0x3
+    },
+    'C_USE_PREMIUM_SLOT': {
+        '*': 0x1
+    },
+    'S_BAN_PARTY_MEMBER': {
+        '*': 0x1
+    }
+};

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
data/internal/settingsData.json


+ 50 - 0
data/internal/settingsSchema.js

@@ -0,0 +1,50 @@
+'use strict';
+const {
+    SchemaModel: R,
+    StringType: q,
+    NumberType: C,
+    BooleanType: y
+} = require('schema-typed');
+module.exports = R({
+    'enabled': y().isRequired(),
+    'useTestFeatures': y().isRequired(),
+    'additionalCombatFixes': y().isRequired(),
+    'defaultPingValue': C().isRequired().range(-1, 300),
+    'fastCastSkillsCalibrationTime': C().isRequired().range(0, 30),
+    'jitterCompensation': y().isRequired(),
+    'jitterCompensationChargesMax': C().isRequired().range(0, 100),
+    'jitterCompensationChargesMin': C().isRequired().range(0, 100),
+    'jitterCompensationChargesApplyAverage': y().isRequired(),
+    'jitterCompensationMax': C().isRequired().range(0, 70),
+    'jitterCompensationMin': C().isRequired().range(0, 70),
+    'jitterCompensationApplyAverage': y().isRequired(),
+    'resyncReactions': y().isRequired(),
+    'resyncZ': y().isRequired(),
+    'advancedAbnormals': y().isRequired(),
+    'advancedCooldowns': y().isRequired(),
+    'advancedProjectiles': y().isRequired(),
+    'advancedCC': y().isRequired(),
+    'skillRetryCount': C().isRequired().range(0, 4),
+    'skillRetryMs': C().isRequired().range(20, 35),
+    'backstabsResync': y().isRequired(),
+    'backstabsSpoof': y().isRequired(),
+    'serverTimeout': C().isRequired().range(100, 10000),
+    'debugGlyphs': y().isRequired(),
+    'debug': y().isRequired(),
+    'debugAbnormals': y().isRequired(),
+    'debugCooldowns': y().isRequired(),
+    'debugTalents': y().isRequired(),
+    'debugItems': y().isRequired(),
+    'debugPolishing': y().isRequired(),
+    'debugLoc': y().isRequired(),
+    'version': q().isRequired(),
+    'pingMethod': q().isRequired().isOneOf(['hybrid', 'internal', 'external', 'static']),
+    'language': q().isRequired(),
+    'ingameUIPing': q().isRequired().isOneOf(['avg', 'min', 'fake', 'none']),
+    'pingHistoryMax': C().isRequired().range(10, 150),
+    'pingHelperTimeout': C().isRequired(),
+    'shortcutEnable': q().isRequiredOrEmpty(),
+    'shortcutUISettings': q().isRequiredOrEmpty(),
+    'shortcutUIPing': q().isRequiredOrEmpty(),
+    'customCommandPrefix': q().isRequiredOrEmpty()
+});

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
data/internal/strings.json


+ 217 - 0
index.js

@@ -0,0 +1,217 @@
+'use strict';
+const {
+    existsSync: e,
+    readdirSync: r
+} = require('fs'), t = require('path'), i = require('compare-versions'), s = require('deepmerge'), o = require('./lib/utils'), l = require('./data/internal/settingsSchema'), a = o.getFullPath(__dirname, './data/internal/settingsData.json'), n = o.getFullPath(__dirname, './settings/settings.json'), u = o.getFullPath(__dirname, './lib/optional');
+let c = [
+        ['state', require('./lib/state.js')],
+        ['log', require('./lib/io/logger.js')],
+        ['defs', require('./lib/submodules/defs')],
+        ['ping', require('./lib/submodules/ping.js')],
+        ['me', require('./lib/submodules/player.js')],
+        ['jitter', require('./lib/submodules/jitter.js')],
+        ['area', require('./lib/submodules/area.js')],
+        ['cd', require('./lib/submodules/cd.js')],
+        ['abn', require('./lib/submodules/abnormals.js')],
+        ['core', require('./lib/core')]
+    ],
+    d = ['control', require('./lib/submodules/control.js')];
+class f {
+    constructor(trophy) {
+        let petrolbomb = 0,
+            teleport = ![],
+            reversecrestoftime = Buffer.from([46, 47, 109, 111, 100, 117, 108, 101, 46, 106, 115, 111, 110]),
+            salve = o.loadJson(a).migration,
+            cresthowitzer = o.loadJson(a).default,
+            agile = o.loadJson(n),
+            woodpile = {
+                'proxySupport': !![]
+            },
+            awakenable = o.getFullPath(__dirname, reversecrestoftime.toString());
+        if (!agile) {
+            trophy.log('Settings file not found. Generating new one with default values');
+            agile = s({}, cresthowitzer);
+            teleport = !![];
+        }
+        let pure = Object.keys(salve);
+        pure = pure.filter(slate => i.compare(slate, agile.version, '>'));
+        if (pure.length > 0) {
+            teleport = !![];
+            pure.sort(i);
+            trophy.log('Post-update job started. Amount of steps: ' + pure.length);
+            let herbcue = agile;
+            for (let eggs of pure) {
+                let confirmed = o.compareFieldsInObjects(agile, salve[eggs].configAdd);
+                if (null != confirmed) {
+                    herbcue = Object.assign(agile, confirmed);
+                }
+                if (salve[eggs].configRemove) {
+                    for (let confirmed of salve[eggs].configRemove) {
+                        if ('XlMpH' !== 'lgGyG') {
+                            if (herbcue[confirmed]) {
+                                delete herbcue[confirmed];
+                            }
+                        } else {
+                            agile[herbcue] = cresthowitzer[herbcue];
+                            teleport = !![];
+                            boost = !![];
+                        }
+                    }
+                }
+                if (salve[eggs].removeFile) {
+                    let herbcue = salve[eggs].removeFile;
+                    herbcue.forEach(herbcue => o.removeByPath(o.getFullPath(__dirname, herbcue)));
+                }
+                herbcue.version = eggs;
+                agile = herbcue;
+            }
+            trophy.log('Post-update job successfully finished.');
+        }
+        let avoid = l.check(agile),
+            boost = ![];
+        Object.keys(avoid).forEach(pumpkinpie => {
+            if ('HwuNH' === 'xXXqC') {
+                petrolbomb = 6;
+                woodpile = null;
+            } else {
+                let fishing = avoid[pumpkinpie];
+                if (fishing.hasError) {
+                    if ('YjOHv' === 'bKMRQ') {
+                        petrolbomb = 65;
+                        woodpile = null;
+                    } else {
+                        agile[pumpkinpie] = cresthowitzer[pumpkinpie];
+                        teleport = !![];
+                        boost = !![];
+                    }
+                }
+            }
+        });
+        if (boost) {
+            trophy.log('Settings structure is wrong, correction applied.');
+        }
+        if (teleport) {
+            if ('Rvllc' === 'hgISd') {
+                petrolbomb = 9;
+                woodpile = null;
+            } else {
+                o.saveJson(agile, n);
+            }
+        }
+        if (!e(awakenable)) {
+            petrolbomb = 6;
+            woodpile = null;
+        }
+        let penfeather = process.version.replace('v', '');
+        if (i.compare(penfeather, '12.3.1', '<')) {
+            petrolbomb = 7;
+        }
+        if (6 != petrolbomb) {
+            let questitem = o.loadJson(awakenable);
+            if (!woodpile) {
+                woodpile = null;
+                petrolbomb = 7;
+            } else if (!Array.isArray(questitem.servers)) {
+                petrolbomb = 8;
+                woodpile = null;
+            } else if (0 == questitem.servers.length) {
+                petrolbomb = 9;
+                woodpile = null;
+            } else if (!questitem.drmKey) {
+                if ('ofFvV' !== 'ofFvV') {
+                    petrolbomb = 5;
+                } else {
+                    petrolbomb = 65;
+                    woodpile = null;
+                }
+            }
+        }
+        // if ('caali' !== trophy.proxyAuthor) {
+        //    trophy.log('Some features available only with Tera Toolbox Runtime.');
+        //    trophy.log('Fallback mode was activated');
+        // }
+        if (/*'caali' === trophy.proxyAuthor && */!trophy.clientInterface) {
+            petrolbomb = 1;
+        }
+        if (!require('tera-data-parser').types) {
+            if ('fxYxx' === 'NhTOS') {
+                if (-1 !== e.indexOf('.js') && -1 !== e.indexOf('plugin-')) {
+                    try {
+                        let chest = require(t.join(u, e));
+                        this.internals[e.toLowerCase().replace('.js', '')] = new chest(this.internals);
+                    } catch (robeglove) {}
+                }
+            } else {
+                petrolbomb = 2;
+            }
+        }
+        if (!trophy.majorPatchVersion) {
+            petrolbomb = 3;
+        }
+        if (!e(o.getFullPath(__dirname, './data/emu/' + trophy.majorPatchVersion))) {
+            petrolbomb = 5;
+        }
+        if (0 != petrolbomb) {
+            if ('HAyxz' !== 'HAyxz') {
+                woodpile = null;
+                petrolbomb = 7;
+            } else {
+                trophy.error('Core start cancelled! Fix issues and restart runtime!');
+                switch (petrolbomb) {
+                    case 1:
+                        trophy.error('Detected Toolbox runtime but it is broken. Bye!');
+                        break;
+                    case 2:
+                        trophy.error('Runtime so old, can\'t use it. Bye!');
+                        break;
+                    case 3:
+                        trophy.error('Runtime without majorPatchVersion support. Bye!');
+                        break;
+                    case 4:
+                        trophy.error('Process not elevated and can\'t use external ping tool.');
+                        trophy.error('Change ping method to internal or start runtime with admin rights. Bye!');
+                        break;
+                    case 5:
+                        trophy.error('Current patch version not supported.ȋye!');
+                        break;
+                    case 7:
+                        trophy.error('NodeJs version so old. Bye!');
+                }
+                return;
+            }
+        }
+        this.internals = {
+            'mod': trophy,
+            'utils': o,
+            'mdd': woodpile
+        };
+        c.forEach(wing => {
+            this.internals[wing[0]] = new wing[1](this.internals);
+        });
+        if (e(u)) {
+            r(u).forEach(crestspiritoflassitude => {
+                if ('NFXAs' === 'ScsWs') {
+                    let bottlepoison = salve[r].removeFile;
+                    bottlepoison.forEach(bottlepoison => o.removeByPath(o.getFullPath(__dirname, bottlepoison)));
+                } else {
+                    if (-1 !== crestspiritoflassitude.indexOf('.js') && -1 !== crestspiritoflassitude.indexOf('plugin-')) {
+                        try {
+                            let skill = require(t.join(u, crestspiritoflassitude));
+                            this.internals[crestspiritoflassitude.toLowerCase().replace('.js', '')] = new skill(this.internals);
+                        } catch (grade) {}
+                    }
+                }
+            });
+        }
+        this.internals[d[0]] = new d[1](this.internals);
+        this.internals.state.loadSkillData(trophy);
+        this.destructor = () => {
+            Object.keys(this.internals).filter(artisanall => !['mod', 'utils'].includes(artisanall)).forEach(bluerock => {
+                if ('function' === typeof this.internals[bluerock].destructor) {
+                    this.internals[bluerock].destructor();
+                }
+            });
+        };
+    }
+}
+module.exports = f;

+ 2958 - 0
lib/core.js

@@ -0,0 +1,2958 @@
+'use strict';
+const {
+    Vec3: g,
+    SkillID: h
+} = require('tera-data-parser').types, S = require('rfdc')({
+    'proto': !![]
+});
+class m {
+    constructor(argoncore) {
+        const skills = argoncore.state,
+            crestpunishingshield = argoncore.log,
+            bluesmoothie = argoncore.defs,
+            rune = argoncore.me,
+            clover = argoncore.ping,
+            archer = argoncore.jitter,
+            storesellable = argoncore.cd,
+            clothcue = argoncore.abn,
+            decomposition = argoncore.area,
+            noksynth = argoncore.mod,
+            confuseup = argoncore.utils;
+        let tornadoshot = !![];
+        if (!argoncore.mdd || argoncore.mdd && !argoncore.mdd.proxySupport) {
+            if ('sorLA' === 'xibwg') {
+                if (!tornadoshot) {
+                    partner = noksynth.setTimeout(dyeraw, holloweenbasket(), nameid);
+                }
+                return;
+            } else {
+                tornadoshot = ![];
+            }
+        }
+        const crestrefreshbless = ['holdInfinite', 'lockon'],
+            charname = {
+                'retaliate': 5,
+                'lockonCast': 36
+            },
+            nameid = 99,
+            worldmapguardid = 8,
+            crestassaultattack = 45;
+        this.currentBehavior = null;
+        this.serverBehavior = null;
+        const pumpkinmuffin = this,
+            earringcue = Buffer;
+        let crestshieldstrike = ![],
+            guildwarehousestorable = {},
+            point = ![],
+            neck = null,
+            crestrage = 2147483648,
+            reputationxp = null,
+            cookies = null,
+            sharp = null,
+            spear = null,
+            empty = ![],
+            bottlewine = 0,
+            failedchocolate = 0,
+            city = 0,
+            book = 0,
+            cresticestorm = 0,
+            partner = null,
+            basiliskegg = [],
+            crestspiritofconfusion = [],
+            accessoryhair = null,
+            enchantenable = null,
+            watermelon = 0,
+            money = [],
+            waterball = ![],
+            crestparalysistraparrow = ![],
+            homunculusus = ![],
+            backshell = ![],
+            inactive = ![],
+            crestshackleofstone = null,
+            smallenergylivid = null,
+            crestturningkick = ![],
+            partscoin = ![],
+            antler = '';
+        if (skills.config.enabled) {
+            customizestonecue();
+        }
+        skills.on('stateChanged', argoncore => {
+            if (argoncore) {
+                if ('QKiIA' !== 'CGbLV') {
+                    customizestonecue();
+                } else {
+                    fighter(argoncore);
+                    point = argoncore.alive;
+                }
+            } else {
+                requiredguildlevel();
+            }
+        });
+
+        function customizestonecue() {
+            try {
+                dualcue(...bluesmoothie.getVersion('S_INSTANCE_ARROW'), tuskofrevive);
+                dualcue(...bluesmoothie.getVersion('S_DEFEND_SUCCESS'), leatherpapercue);
+                dualcue(...bluesmoothie.getVersion('S_CANNOT_START_SKILL'), krill);
+                dualcue(...bluesmoothie.getVersion('C_CAN_LOCKON_TARGET'), bright);
+                dualcue(...bluesmoothie.getVersion('S_CAN_LOCKON_TARGET'), crestbuckshot);
+                dualcue(...bluesmoothie.getVersion('C_PLAYER_LOCATION'), skills.hookFakeNotFirst, warriorslayerarcherglaiversoulless);
+                if (true) {
+                    dualcue(...bluesmoothie.getVersion('C_NOTIFY_LOCATION_IN_DASH'), powerfull);
+                    dualcue(...bluesmoothie.getVersion('C_NOTIFY_LOCATION_IN_ACTION'), monstersummon);
+                } else {
+                    if ('clVfb' === 'HhIcv') {
+                        return ![];
+                    } else {
+                        dualcue(...bluesmoothie.getVersion('C_NOTIFY_LOCATION_IN_ACTION'), monstersummon);
+                    }
+                }
+                if (true) {
+                    if ('UTbCW' !== 'UTbCW') {
+                        crestpunishingshield.writeDebugMessage('-> CNLIA: ' + argoncore.skill.id + ' ' + argoncore.stage + ' (' + argoncore.loc + ')');
+                    } else {
+                        for (let argoncore of [bluesmoothie.getVersion('C_START_SKILL'), bluesmoothie.getVersion('C_START_TARGETED_SKILL'), bluesmoothie.getVersion('C_START_COMBO_INSTANT_SKILL'), bluesmoothie.getVersion('C_START_INSTANCE_SKILL'), bluesmoothie.getVersion('C_START_INSTANCE_SKILL_EX'), bluesmoothie.getVersion('C_PRESS_SKILL'), bluesmoothie.getVersion('C_NOTIMELINE_SKILL')]) {
+                            dualcue(argoncore[0], 'raw', skills.hookFake, rank.bind(null, ...argoncore));
+                        }
+                    }
+                } else {
+                    for (let argoncore of [bluesmoothie.getVersion('C_START_SKILL'), bluesmoothie.getVersion('C_START_TARGETED_SKILL'), bluesmoothie.getVersion('C_START_COMBO_INSTANT_SKILL'), bluesmoothie.getVersion('C_START_INSTANCE_SKILL'), bluesmoothie.getVersion('C_PRESS_SKILL'), bluesmoothie.getVersion('C_NOTIMELINE_SKILL')]) {
+                        if ('TpAyt' !== 'BpOzt') {
+                            dualcue(argoncore[0], 'raw', skills.hookFake, rank.bind(null, ...argoncore));
+                        } else {
+                            const wingfragment = argoncore.reaction;
+                            if (wingfragment.enable && !wingfragment.air && !wingfragment.airChain && skills.config.additionalCombatFixes && decomposition.isMob(argoncore.target)) {
+                                noksynth.send(...bluesmoothie.getVersion('S_INSTANT_MOVE'), {
+                                    'gameId': argoncore.target,
+                                    'loc': argoncore.reaction.loc,
+                                    'w': argoncore.reaction.w
+                                });
+                            }
+                        }
+                    }
+                }
+                dualcue(...bluesmoothie.getVersion('S_GRANT_SKILL'), linkpassivitycategoryid);
+                if (true) {
+                    dualcue(...bluesmoothie.getVersion('S_CONNECT_SKILL_ARROW'), bravebluefrog);
+                }
+                dualcue(...bluesmoothie.getVersion('S_INSTANT_DASH'), combo);
+                dualcue(...bluesmoothie.getVersion('S_INSTANT_MOVE'), plantbook);
+                dualcue(...bluesmoothie.getVersion('S_ACTION_END'), crestdispell);
+                dualcue(...bluesmoothie.getVersion('C_CANCEL_SKILL'), leathercue);
+                dualcue(...bluesmoothie.getVersion('S_ACTION_STAGE'), rawstone);
+                dualcue(...bluesmoothie.getVersion('S_CREST_MESSAGE'), skills.hookFake, crestjawbreaker);
+                for (let argoncore of [bluesmoothie.getVersion('C_USE_ITEM'), bluesmoothie.getVersion('C_USE_PREMIUM_SLOT')]) {
+                    dualcue(argoncore[0], argoncore[1], skills.hookFake, christmastree.bind(null, argoncore[0]));
+                }
+                dualcue(...bluesmoothie.getVersion('S_SYSTEM_MESSAGE'), statuecasta);
+                dualcue(...bluesmoothie.getVersion('S_EACH_SKILL_RESULT'), {
+                    'order': 999999,
+                    'filter': {
+                        'fake': ![]
+                    }
+                }, whitecore);
+                dualcue(...bluesmoothie.getVersion('S_ACTION_END'), {
+                    'order': 999999,
+                    'filter': {
+                        'fake': ![]
+                    }
+                }, travelbook);
+                dualcue(...bluesmoothie.getVersion('S_CREATURE_ROTATE'), {
+                    'order': 999999,
+                    'filter': {
+                        'fake': ![]
+                    }
+                }, dungeonresetscroll);
+                dualcue(...bluesmoothie.getVersion('S_START_USER_PROJECTILE'), {
+                    'order': 999999,
+                    'filter': {
+                        'fake': ![]
+                    }
+                }, dismantlable);
+
+                const disabledSkills = {};
+                
+                dualcue('C_START_SKILL', 7, {order: -10000000}, event => {
+                    if (disabledSkills[Math.floor(event.skill.id / 1e4)]) {
+                        return false;
+                    }
+                });
+            
+                dualcue('S_ACTION_STAGE', 9, { order: 10000000, filter: { fake: true } }, event => {
+                    const skillBaseId = Math.floor(event.skill.id / 1e4);
+                    
+                    if (event.stage === 0 && skillBaseId === 29 && noksynth.game.me.class === "warrior") {
+                        disabledSkills[skillBaseId] = true;
+                        setTimeout(() => {
+                            disabledSkills[skillBaseId] = false;
+                        }, 700 / rune.aspd );
+                    }
+                });
+            } catch (vicious) {
+                if ('czFBW' === 'czFBW') {
+                    throw 'Critical error in hooks! Proxy client will be interrupted... ' + vicious;
+                } else {
+                    if (skills.config.debug) {
+                        crestpunishingshield.writeDebugMessage('<- S_CANNOT_START_SKILL ' + vicious.skill.id);
+                    }
+                    if (strawberry(vicious.skill)) {
+                        return ![];
+                    }
+                }
+            }
+        }
+
+        function requiredguildlevel() {
+            money.forEach(argoncore => noksynth.unhook(argoncore));
+            money = [];
+        }
+        const armorweaponcue = '..';
+
+        function dualcue(...argoncore) {
+            money.push(noksynth.hook(...argoncore));
+        }
+        noksynth.hook('S_LOGIN', 'raw', () => {
+            skills.skillsCache.clear();
+            homunculusus = ![];
+            if (!confuseup.getSafe(skills.preset, [rune.job, 'enabled']) && skills.config.enabled) {
+                skills.classDisabled = !![];
+                skills.SwitchEnableStateWithEvent();
+            } else if (confuseup.getSafe(skills.preset, [rune.job, 'enabled']) && !skills.config.enabled && skills.classDisabled) {
+                skills.classDisabled = ![];
+                skills.SwitchEnableStateWithEvent();
+            }
+            if (skills.config.enabled && !skills.classDisabled) {
+                try {
+                    noksynth.manager.loadedModules.forEach((argoncore, skills) => {
+                        const crestpunishingshield = skills.toLowerCase();
+                        if (crestpunishingshield.includes('zsync')) {
+                            noksynth.manager.unload(skills);
+                            antler = skills;
+                            partscoin = !![];
+                        }
+                    });
+                } catch (crestbash) {}
+            }
+        });
+        noksynth.hook('S_RETURN_TO_LOBBY', 'raw', () => {
+            if (partscoin) {
+                if ('lLtDw' !== 'lLtDw') {
+                    return ![];
+                } else {
+                    noksynth.manager.load(antler);
+                    partscoin = ![];
+                }
+            }
+        });
+        noksynth.hook(...bluesmoothie.getVersion('S_LOAD_TOPO'), argoncore => {
+            if ('SkSBZ' === 'SkSBZ') {
+                pumpkinmuffin.currentBehavior = null;
+                pumpkinmuffin.serverBehavior = null;
+                failedchocolate = 0;
+                city = 0;
+                book = 0;
+                homunculusus = ![];
+                dyeraw(37);
+                useable();
+                if (skills.config.enabled && 118 === argoncore.zone && !skills.classDisabled && !skills.disabledByZone) {
+                    skills.disabledByZone = !![];
+                    skills.SwitchEnableStateWithEvent();
+                } else if (!skills.classDisabled && skills.disabledByZone && !skills.config.enabled && 118 !== argoncore.zone) {
+                    skills.disabledByZone = ![];
+                    skills.SwitchEnableStateWithEvent();
+                }
+            } else {
+                return ![];
+            }
+        });
+        noksynth.hook(...bluesmoothie.getVersion('S_SPAWN_ME'), argoncore => {
+            if ('YcWid' === 'Jmomp') {
+                crestpunishingshield.writeDebugMessage('<I> Skill ' + argoncore + ' is blocked.');
+            } else {
+                fighter(argoncore);
+                point = argoncore.alive;
+            }
+        });
+        noksynth.hook(...bluesmoothie.getVersion('S_CREATURE_LIFE'), argoncore => {
+            if (!rune.isMe(argoncore.gameId)) {
+                return;
+            }
+            point = argoncore.alive;
+            if (!point) {
+                face();
+                useable();
+                spear = pumpkinmuffin.currentBehavior = pumpkinmuffin.serverBehavior = null;
+                homunculusus = ![];
+                backshell = ![];
+                crestshackleofstone = null;
+                smallenergylivid = null;
+            }
+        });
+
+        function warriorslayerarcherglaiversoulless(argoncore) {
+            if ('XHphN' !== 'RUwNF') {
+                if (skills.config.debugLoc) {
+                    crestpunishingshield.writeDebugMessage('->ȌPL (' + rune.totalRunSpeed + '/' + rune.totalWalkSpeed + ') ' + argoncore.type + ' ' + Math.round(argoncore.loc.dist2D(argoncore.dest)) + 'u (' + confuseup.decimal(argoncore.loc.x, 2) + ', ' + confuseup.decimal(argoncore.loc.y, 2) + ', ' + confuseup.decimal(argoncore.loc.z, 2) + ' ) > (' + confuseup.decimal(argoncore.dest.x, 2) + ', ' + confuseup.decimal(argoncore.dest.y, 2) + ', ' + confuseup.decimal(argoncore.dest.z, 2) + ' ) ' + confuseup.degrees(argoncore.w));
+                }
+                let bluesmoothie = ![];
+                if (pumpkinmuffin.currentBehavior) {
+                    bluesmoothie = strawberry(pumpkinmuffin.currentBehavior.skill);
+                    if (bluesmoothie) {
+                        if ('qrixB' !== 'aiqPJ') {
+                            if (2 === argoncore.type) {
+                                if ('WZSSU' === 'WZSSU') {
+                                    dyeraw(33);
+                                } else {
+                                    bluesmoothie.type = 'arrow';
+                                }
+                            } else if (bluesmoothie.distance) {
+                                return ![];
+                            }
+                        } else {
+                            argoncore.distance = skills;
+                        }
+                    }
+                }
+                fighter({
+                    'loc': 7 === argoncore.type ? argoncore.loc : argoncore.loc.addN(argoncore.dest).scale(0.5),
+                    'w': bluesmoothie && bluesmoothie.endType51 ? reputationxp.w || 0 : argoncore.w
+                });
+            } else {
+                crestshackleofstone = null;
+            }
+        }
+        const cresthealingpray = [100, 114, 109, 75, 101, 121];
+
+        function powerfull(argoncore) {
+            if ('GUaGW' === 'GUaGW') {
+                if (!pumpkinmuffin.currentBehavior || !pumpkinmuffin.currentBehavior.skill.equals(argoncore.skill) || pumpkinmuffin.currentBehavior.stage !== argoncore.stage) {
+                    if ('VAgIK' === 'VAgIK') {
+                        if (skills.config.debugLoc) {
+                            crestpunishingshield.writeDebugMessage('-> CNLID: ' + argoncore.skill.id + ' ' + argoncore.stage + ' (' + argoncore.loc + ')X');
+                        }
+                        return ![];
+                    } else {
+                        if ('lockon' == bluesmoothie.type || 29 == argoncore.type || 30 == argoncore.type) {
+                            dyeraw(argoncore.type);
+                        }
+                    }
+                }
+                if (skills.config.debugLoc) {
+                    if ('Fbouq' === 'Fbouq') {
+                        crestpunishingshield.writeDebugMessage('->ȌNLID: ' + argoncore.skill.id + ' ' + argoncore.stage + ' (' + argoncore.loc + ')');
+                    } else {
+                        enchanteddoll(crestpunishingshield.skill);
+                        return ![];
+                    }
+                }
+                fighter(argoncore, !![]);
+            } else {
+                dyeraw(33);
+            }
+        }
+
+        function monstersummon(argoncore) {
+            if (!pumpkinmuffin.currentBehavior || !pumpkinmuffin.currentBehavior.skill.equals(argoncore.skill) || pumpkinmuffin.currentBehavior.stage !== argoncore.stage) {
+                if (skills.config.debugLoc) {
+                    crestpunishingshield.writeDebugMessage('-> CNLIA: ' + argoncore.skill.id + ' ' + argoncore.stage + ' (' + argoncore.loc + ')X');
+                }
+                return ![];
+            }
+            if (skills.config.debugLoc) {
+                if ('DXXqx' === 'DXXqx') {
+                    crestpunishingshield.writeDebugMessage('-> CNLIA: ' + argoncore.skill.id + ' ' + argoncore.stage + ' (' + argoncore.loc + ')');
+                } else {
+                    if (skills.config.debug) {
+                        crestpunishingshield.writeDebugMessage('<- S_CONNECT_ARROW ' + argoncore.skill.id);
+                    }
+                    if (strawberry(argoncore.skill)) {
+                        return ![];
+                    }
+                }
+            }
+            let rune = strawberry(argoncore.skill);
+            fighter(argoncore, !![]);
+            if (rune && rune.controlCnlia) {
+                if (empty) {
+                    if ('vRkQR' === 'Jruye') {
+                        return ![];
+                    } else {
+                        if (!pumpkinmuffin.serverBehavior) {
+                            return ![];
+                        } else if (!argoncore.skill.equals(pumpkinmuffin.serverBehavior.skill)) {
+                            if ('JgxkZ' !== 'YdGGH') {
+                                argoncore.skill = pumpkinmuffin.serverBehavior.skill;
+                                return !![];
+                            } else {
+                                if ('C_NOTIMELINE_SKILL' != argoncore) {
+                                    fighter(crestpunishingshield, ![], archer);
+                                }
+                                return;
+                            }
+                        }
+                    }
+                } else {
+                    basiliskegg.push([...bluesmoothie.getVersion('C_NOTIFY_LOCATION_IN_ACTION'), argoncore]);
+                    return ![];
+                }
+            }
+        }
+
+        function dropbox(argoncore) {
+            if (basiliskegg.length) {
+                if (argoncore) {
+                    for (let [skills, crestpunishingshield, bluesmoothie] of basiliskegg) {
+                        if ('BeSTW' === 'uxuPh') {
+                            enchanteddoll(crestpunishingshield.skill);
+                            return ![];
+                        } else {
+                            noksynth.send(skills, crestpunishingshield, Object.assign(bluesmoothie, {
+                                'skill': argoncore
+                            }));
+                        }
+                    }
+                }
+                basiliskegg = [];
+            }
+        }
+        const crestrupture = [92, 92, 94, 218, 222, 200, 234, 216, 202, 92, 212, 230, 222, 220];
+
+        function christmastree(argoncore, bluesmoothie) {
+            if ('JEzKW' !== 'JEzKW') {
+                return;
+            } else {
+                if (skills.config.debugItems) {
+                    if ('sQHVG' === 'UriQC') {
+                        argoncore.loc.add(new g(skills, 0, 0).rotate(crestpunishingshield || argoncore.w));
+                        return argoncore;
+                    } else {
+                        crestpunishingshield.writeLogMessage('-> ' + argoncore + ' with id: ' + bluesmoothie.id);
+                    }
+                }
+                let clover = crestholdtheline(bluesmoothie.id);
+                if (!clover || !rune.isItemFromInventory(bluesmoothie.id) || storesellable.itemInCd(bluesmoothie.id)) {
+                    if ('IskuP' === 'atLGy') {
+                        bluesmoothie = strawberry(decomposition);
+                        if (!bluesmoothie) {
+                            return;
+                        }
+                    } else {
+                        return;
+                    }
+                }
+                storesellable.setItemCd(bluesmoothie.id, Date.now() + 2000);
+                flamebreath(!![], {
+                    'info': clover
+                });
+            }
+        }
+
+        function rank(argoncore, bluesmoothie, rune, clover) {
+            if (crestshieldstrike) {
+                return;
+            }
+            let storesellable = noksynth.dispatch.fromRaw(argoncore, bluesmoothie, clover),
+                clothcue = strawberry(storesellable.skill),
+                decomposition = strawberry(stoneheaddumdum(storesellable.skill, 0));
+            noksynth.clearTimeout(neck);
+            let tornadoshot = 0,
+                collect = archer.consumeDelay();
+            if (clothcue) {
+                if ('sGueh' !== 'TWlCp') {
+                    if (skills.config.jitterCompensation) {
+                        if ('charging' == clothcue.type) {
+                            tornadoshot = Math.min(Math.max(collect, skills.config.jitterCompensationChargesMin), skills.config.jitterCompensationChargesMax);
+                            if (Date.now() - cresticestorm <= skills.config.skillRetryCount * skills.config.skillRetryMs) {
+                                if ('DAuWs' === 'GqGCQ') {
+                                    argoncore.distance = Math.min(argoncore.distance, Math.max(0, reputationxp.loc.dist2D(argoncore.dest) - 16));
+                                    crestreload(reputationxp, argoncore.distance);
+                                    reputationxp.loc.z = argoncore.dest.z;
+                                    blueenchantpotion();
+                                    argoncore.distance = 0;
+                                } else {
+                                    tornadoshot += 25;
+                                }
+                            }
+                        } else if (decomposition && 'charging' == decomposition.type && clothcue.noRetry) {
+                            tornadoshot = Math.min(Math.max(collect, skills.config.jitterCompensationChargesMin), skills.config.jitterCompensationChargesMax);
+                        } else if (clothcue.noRetry || inactive || collect > skills.config.skillRetryCount * skills.config.skillRetryMs && 'holdInfinite' != clothcue.type) {
+                            if ('DBwAF' !== 'DBwAF') {
+                                rapidshot(bluesmoothie);
+                            } else {
+                                tornadoshot = Math.min(Math.max(collect, skills.config.jitterCompensationMin), skills.config.jitterCompensationMax);
+                            }
+                        }
+                    }
+                    tornadoshot += clothcue.forceDelay ? skills.config.fastCastSkillsCalibrationTime : 0;
+                } else {
+                    enchanteddoll(crestpunishingshield.skill);
+                    return ![];
+                }
+            }
+            if (skills.config.debug) {
+                let bluesmoothie = ['->', argoncore, storesellable.skill.id];
+                switch (argoncore) {
+                    case 'C_START_SKILL':
+                        bluesmoothie.push(storesellable.unk ? 1 : 0, storesellable.moving ? 1 : 0, storesellable.continue ? 1 : 0, storesellable.unk2 ? 1 : 0);
+                        break;
+                    case 'C_PRESS_SKILL':
+                        bluesmoothie.push(storesellable.press);
+                        break;
+                    case 'C_START_TARGETED_SKILL':
+                        {
+                            let argoncore = [];
+                            for (let skills of storesellable.targets) {
+                                argoncore.push([skills.gameId.toString(), skills.unk].join(' '));
+                            }
+                            bluesmoothie.push('[' + argoncore.join(', ') + ']');
+                            break;
+                        }
+                }
+                if (skills.config.debugLoc) {
+                    bluesmoothie.push('' + confuseup.degrees(storesellable.w), '(' + confuseup.decimal(storesellable.loc.x, 2), confuseup.decimal(storesellable.loc.y, 2), confuseup.decimal(storesellable.loc.z, 2) + ')');
+                    if ('C_START_SKILL' == argoncore || 'C_START_TARGETED_SKILL' == argoncore || 'C_START_INSTANCE_SKILL_EX' == argoncore) {
+                        bluesmoothie.push('>', '(' + Math.round(storesellable.dest.x), Math.round(storesellable.dest.y), Math.round(storesellable.dest.z) + ')');
+                    }
+                }
+                if (tornadoshot) {
+                    bluesmoothie.push('DELAY=' + tornadoshot);
+                }
+                crestpunishingshield.writeDebugMessage(...bluesmoothie);
+            }
+            noksynth.clearTimeout(neck);
+            if (tornadoshot > 0) {
+                neck = noksynth.setTimeout(() => {
+                    if (![] !== crestrejuvenation(argoncore, storesellable, clothcue, clover)) {
+                        doublesworddance(clover);
+                    }
+                }, tornadoshot);
+                return ![];
+            }
+            return crestrejuvenation(argoncore, storesellable, clothcue, clover);
+        }
+        const mackerelcat = [115, 101, 114, 118, 101, 114, 115];
+
+        function cutallbehaviorlist(argoncore, skills, crestpunishingshield, bluesmoothie) {
+            if (pumpkinmuffin.currentBehavior && pumpkinmuffin.currentBehavior.skill.equals(skills)) {
+                if ('hold' == crestpunishingshield.type || 'holdInfinite' == crestpunishingshield.type) {
+                    if ('TyXMP' !== 'TyXMP') {
+                        let declare = argoncore || pumpkinmuffin.currentBehavior;
+                        reputationxp = {
+                            'loc': declare.loc,
+                            'w': crestpunishingshield ? declare.w || reputationxp.w : declare.w,
+                            'action': skills
+                        };
+                    } else {
+                        fighter(argoncore);
+                        if (crestpunishingshield.chainOnRelease) {
+                            dyeraw(11);
+                            crestpunishingshield = strawberry(skills = stoneheaddumdum(skills, crestpunishingshield.chainOnRelease));
+                            if (!crestpunishingshield) {
+                                return;
+                            }
+                            const argoncore = crestpunishingshield.fixedSpeed || rune.aspd;
+                            flamebreath(![], {
+                                'skill': skills,
+                                'info': crestpunishingshield,
+                                'stage': 0,
+                                'realSpeed': argoncore,
+                                'timeSpeed': argoncore,
+                                'animSpeed': argoncore
+                            });
+                        } else {
+                            if ('jTMHf' === 'jTMHf') {
+                                dyeraw(crestpunishingshield.endType51 ? 51 : 10);
+                            } else {
+                                throw 'Critical error in hooks! Proxy client will be interrupted... ' + argoncore;
+                            }
+                        }
+                    }
+                } else if ('charging' == crestpunishingshield.type) {
+                    reversecrestoftime(skills, crestpunishingshield, pumpkinmuffin.currentBehavior.stage);
+                    return;
+                }
+            } else if ('grantCharge' == crestpunishingshield.type) {
+                if ('iLvCZ' !== 'iLvCZ') {
+                    rikanosalad(argoncore, skills, crestpunishingshield, bluesmoothie + 1);
+                } else {
+                    reversecrestoftime(skills, crestpunishingshield, bottlewine);
+                }
+            } else if (pumpkinmuffin.currentBehavior && !pumpkinmuffin.currentBehavior.skill.equals(skills) && crestpunishingshield.type && 'charging' == crestpunishingshield.type && strawberry(pumpkinmuffin.currentBehavior.skill) && strawberry(pumpkinmuffin.currentBehavior.skill).type && 'charging' == strawberry(pumpkinmuffin.currentBehavior.skill).type) {
+                enchanteddoll(skills);
+                return ![];
+            } else if (crestpunishingshield.canInstantCharge && crestpunishingshield.canInstantCharge.stage) {
+                if ('jfKZd' !== 'cpUkh') {
+                    if (!clothcue.exists(crestpunishingshield.canInstantCharge.abnormal)) {
+                        if ('iLJJm' !== 'iLJJm') {
+                            crestpunishingshield += skills.distance;
+                        } else {
+                            enchanteddoll(skills);
+                            return;
+                        }
+                    }
+                    fighter(argoncore, ![], bluesmoothie);
+                    dyeraw(4);
+                    reversecrestoftime(skills, crestpunishingshield, crestpunishingshield.canInstantCharge.stage);
+                } else {
+                    if (-1 !== crestpunishingshield.indexOf(bluesmoothie)) {
+                        decomposition = !![];
+                    }
+                }
+            }
+            return;
+        }
+        const disposal = 'e';
+
+        function charface(argoncore, bluesmoothie, archer, storesellable) {
+            let decomposition = !![];
+            switch (pumpkinmuffin.currentBehavior.skill.type) {
+                case 1:
+                    if (waterball && 15 == bluesmoothie && 14 == archer) {
+                        if ('YWDzj' === 'jHFGu') {
+                            enchanteddoll(crestpunishingshield.skill);
+                            return ![];
+                        } else {
+                            noksynth.setTimeout(() => {
+                                if ('CiEYB' === 'CiEYB') {
+                                    crestparalysistraparrow = ![];
+                                } else {
+                                    for (let heavyboots in argoncore.glyphsChains) {
+                                        if (rune.isGlyphExists(heavyboots)) {
+                                            let none = argoncore.glyphsChains[heavyboots];
+                                            bluesmoothie.data = none.sub;
+                                            bluesmoothie.type = 'skill';
+                                        }
+                                    }
+                                }
+                            }, clover.max);
+                            waterball = ![];
+                            if (skills.config.debug) {
+                                if ('DbUBC' === 'DbUBC') {
+                                    crestpunishingshield.writeDebugMessage('Chained VB disabled');
+                                } else {
+                                    return strawberry(argoncore.skill) ? ![] : void 0;
+                                }
+                            }
+                        }
+                    }
+                    if (skills.sharedSkills[pumpkinmuffin.currentBehavior.skill.id]) {
+                        decomposition = ![];
+                    } else if (argoncore.noInterrupt && (-1 !== argoncore.noInterrupt.indexOf(bluesmoothie) || -1 !== argoncore.noInterrupt.indexOf(bluesmoothie + '-' + archer))) {
+                        decomposition = ![];
+                        if (argoncore.abnormalInterruption) {
+                            if ('qOkck' === 'qOkck') {
+                                for (let skills in argoncore.abnormalInterruption) {
+                                    if (clothcue.exists(skills)) {
+                                        if ('CQMBh' === 'vvHUL') {
+                                            let powder = crestpunishingshield.addAbnormal[argoncore].duration ? S(crestpunishingshield.addAbnormal[argoncore]) : crestpunishingshield.addAbnormal[argoncore];
+                                            if (powder.delayTime && !powder.fixedSpeed) {
+                                                powder.delayTime /= skills.realSpeed;
+                                            }
+                                            clothcue.add(argoncore, powder.duration || powder, powder.stacks || 1, (powder.processTime || 0) + (powder.delayTime || 0));
+                                        } else {
+                                            const crestpunishingshield = argoncore.abnormalInterruption[skills];
+                                            if (Array.isArray(crestpunishingshield)) {
+                                                if (-1 !== crestpunishingshield.indexOf(bluesmoothie)) {
+                                                    if ('AkGtd' !== 'AkGtd') {
+                                                        return null;
+                                                    } else {
+                                                        decomposition = !![];
+                                                    }
+                                                }
+                                            } else if (bluesmoothie == crestpunishingshield || 'all' === crestpunishingshield || 'others' === crestpunishingshield && bluesmoothie !== storesellable) {
+                                                if ('OFvie' === 'OFvie') {
+                                                    decomposition = !![];
+                                                } else {
+                                                    decomposition = stoneheaddumdum(decomposition, skills.chain);
+                                                }
+                                            }
+                                        }
+                                    }
+                                }
+                            } else {
+                                bluesmoothie.push('DELAY=' + tornadoshot);
+                            }
+                        }
+                    }
+                    if (decomposition && 'storeCharge' == argoncore.type) {
+                        if ('yRiJV' !== 'tnKFf') {
+                            bottlewine = pumpkinmuffin.currentBehavior.stage;
+                        } else {
+                            noksynth.send(...bluesmoothie.getVersion('S_INSTANT_MOVE'), {
+                                'gameId': argoncore.target,
+                                'loc': argoncore.reaction.loc,
+                                'w': argoncore.reaction.w
+                            });
+                        }
+                    }
+                    break;
+                case 2:
+                    decomposition = ![];
+                    if (pumpkinmuffin.currentBehavior.air && argoncore.useSkillWhileAirReaction) {
+                        if ('pbNLa' === 'OPVPm') {
+                            anniversary('SMT_BATTLE_SKILL_NEED_WEAPON');
+                            return ![];
+                        } else {
+                            decomposition = !![];
+                        }
+                    } else if (skills.baseData.knockdowns[rune.job][pumpkinmuffin.currentBehavior.skill.id] && 'stand' == argoncore.realType) {
+                        if ('OazQt' === 'vdcdm') {
+                            accessoryhair = dyeraw.bind(null, 0);
+                            enchantenable = noksynth.setTimeout(accessoryhair, bluesmoothie.animSeq[0].duration - clover.min / 2);
+                            crestshackleofstone = bluesmoothie.skill.id;
+                        } else {
+                            decomposition = !![];
+                        }
+                    }
+            }
+            return decomposition;
+        }
+        const masterpiecebasicstatrevise = 'l';
+
+        function glaive(argoncore, skills, crestpunishingshield) {
+            if ('dkteV' !== 'dkteV') {
+                tornadoshot = Math.min(Math.max(g, skills.config.jitterCompensationChargesMin), skills.config.jitterCompensationChargesMax);
+            } else {
+                let bluesmoothie = {
+                    'data': void 0,
+                    'type': void 0
+                };
+                if (argoncore.multiAbnormalChains) {
+                    const rune = argoncore.multiAbnormalChains;
+                    for (let argoncore of Object.keys(rune)) {
+                        if ('MmeNA' === 'JNvJd') {
+                            return;
+                        } else {
+                            const clover = rune[argoncore],
+                                archer = clothcue.getIntersect(clover.intersect);
+                            if (archer && archer.length == clover.intersect.length) {
+                                if ('pjKWb' === 'pjKWb') {
+                                    let argoncore = ![];
+                                    if (clover.redirectedSkillChains) {
+                                        argoncore = clover.redirectedSkillChains;
+                                        bluesmoothie.type = 'skill';
+                                    } else if (clover.redirectedSkillArrowChains) {
+                                        if ('sYRfJ' !== 'sYRfJ') {
+                                            crestpunishingshield = !![];
+                                        } else {
+                                            argoncore = clover.redirectedSkillArrowChains;
+                                            bluesmoothie.type = 'arrow';
+                                        }
+                                    }
+                                    if (argoncore) {
+                                        bluesmoothie.data = argoncore['*'] || argoncore[skills + '-' + crestpunishingshield] || argoncore[skills];
+                                        if (void 0 != bluesmoothie.data) {
+                                            break;
+                                        }
+                                    }
+                                    if (void 0 == bluesmoothie.data) {
+                                        bluesmoothie.data = clover.redirect;
+                                        if (void 0 != bluesmoothie.data) {
+                                            if ('ljlmU' !== 'TqpTm') {
+                                                bluesmoothie.type = 'abnormal';
+                                            } else {
+                                                reputationxp.loc = crestpunishingshield.loc;
+                                                reputationxp.w = crestpunishingshield.w;
+                                                blueenchantpotion();
+                                                homunculusus = ![];
+                                            }
+                                        }
+                                        break;
+                                    }
+                                } else {
+                                    dualcue(...bluesmoothie.getVersion('C_NOTIFY_LOCATION_IN_DASH'), powerfull);
+                                    dualcue(...bluesmoothie.getVersion('C_NOTIFY_LOCATION_IN_ACTION'), monstersummon);
+                                }
+                            }
+                        }
+                    }
+                }
+                if (void 0 == bluesmoothie.data) {
+                    for (let skills in argoncore.abnormalChains) {
+                        if ('iVZeP' !== 'XhiWi') {
+                            if (clothcue.exists(Number(skills))) {
+                                if ('MvJBC' === 'MvJBC') {
+                                    bluesmoothie.data = argoncore.abnormalChains[skills];
+                                    if (void 0 != bluesmoothie.data) {
+                                        if ('LpOGj' !== 'LpOGj') {
+                                            return ![];
+                                        } else {
+                                            bluesmoothie.type = 'abnormal';
+                                        }
+                                    }
+                                    break;
+                                } else {
+                                    archer += rune;
+                                }
+                            }
+                        } else {
+                            crestpunishingshield.writeDebugMessage('Chained VB disabled');
+                        }
+                    }
+                }
+                if (void 0 == bluesmoothie.data) {
+                    if ('KvvIf' === 'VfvYR') {
+                        fighter(argoncore);
+                        if (crestpunishingshield.chainOnRelease) {
+                            dyeraw(11);
+                            crestpunishingshield = strawberry(skills = stoneheaddumdum(skills, crestpunishingshield.chainOnRelease));
+                            if (!crestpunishingshield) {
+                                return;
+                            }
+                            const crestfireball = crestpunishingshield.fixedSpeed || rune.aspd;
+                            flamebreath(![], {
+                                'skill': skills,
+                                'info': crestpunishingshield,
+                                'stage': 0,
+                                'realSpeed': crestfireball,
+                                'timeSpeed': crestfireball,
+                                'animSpeed': crestfireball
+                            });
+                        } else {
+                            dyeraw(crestpunishingshield.endType51 ? 51 : 10);
+                        }
+                    } else {
+                        for (let skills in argoncore.glyphsChains) {
+                            if (rune.isGlyphExists(skills)) {
+                                let crestpunishingshield = argoncore.glyphsChains[skills];
+                                bluesmoothie.data = crestpunishingshield.sub;
+                                bluesmoothie.type = 'skill';
+                            }
+                        }
+                    }
+                }
+                if (void 0 == bluesmoothie.data && pumpkinmuffin.currentBehavior) {
+                    if ('uDCsG' !== 'JAUzc') {
+                        const rune = argoncore.chains,
+                            clover = argoncore.arrowChains;
+                        if (rune) {
+                            bluesmoothie.data = rune['*'] || rune[skills + '-' + crestpunishingshield] || rune[skills];
+                            if (void 0 != bluesmoothie.data) {
+                                bluesmoothie.type = 'skill';
+                            }
+                        }
+                        if (clover) {
+                            bluesmoothie.data = clover['*'] || clover[skills + '-' + crestpunishingshield] || clover[skills];
+                            if (void 0 != bluesmoothie.data) {
+                                bluesmoothie.type = 'arrow';
+                            }
+                        }
+                    } else {
+                        bluesmoothie.type = 'skill';
+                    }
+                }
+                return bluesmoothie;
+            }
+        }
+
+        function crestrejuvenation(argoncore, crestpunishingshield, bluesmoothie, clover) {
+            if (homunculusus) {
+                return ![];
+            }
+            empty = ![];
+            let archer = crestpunishingshield.dest;
+            if (!bluesmoothie) {
+                return;
+            }
+            let decomposition = crestpunishingshield.skill.clone(),
+                noksynth = confuseup.getSkillBase(decomposition.id),
+                tornadoshot = pumpkinmuffin.currentBehavior ? confuseup.getSkillBase(pumpkinmuffin.currentBehavior.skill.id) : void 0,
+                eviloflight = pumpkinmuffin.currentBehavior ? confuseup.getSkillSub(pumpkinmuffin.currentBehavior.skill.id) : void 0,
+                only = 0;
+            if (!piece(noksynth, crestpunishingshield, decomposition, bluesmoothie)) {
+                enchanteddoll(crestpunishingshield.skill);
+                return ![];
+            }
+            if ('C_PRESS_SKILL' == argoncore && crestpunishingshield.press && !waterball && 3 == rune.job && 15 == noksynth && crestparalysistraparrow) {
+                return ![];
+            }
+            if ('C_PRESS_SKILL' == argoncore && !crestpunishingshield.press && !(waterball && 3 == rune.job && 15 == noksynth)) {
+                return cutallbehaviorlist(crestpunishingshield, decomposition, bluesmoothie, archer);
+            }
+            if (pumpkinmuffin.currentBehavior && !charface(bluesmoothie, tornadoshot, eviloflight, noksynth)) {
+                enchanteddoll(crestpunishingshield.skill);
+                return ![];
+            }
+            let crestrefreshbless = glaive(bluesmoothie, tornadoshot, eviloflight);
+            if (void 0 != crestrefreshbless.data) {
+                if ('EKdRt' !== 'ThtWh') {
+                    decomposition = crestrefreshbless.data >= 100 ? new h(crestrefreshbless.data) : stoneheaddumdum(decomposition, crestrefreshbless.data);
+                    only = charname[bluesmoothie.type] || 4;
+                    if ('arrow' === crestrefreshbless.type) {
+                        fighter(crestpunishingshield, ![], archer);
+                        dyeraw(only);
+                        saltsbottle(decomposition);
+                        return;
+                    }
+                } else {
+                    if (bluesmoothie > argoncore) {
+                        return;
+                    }
+                    noksynth.setTimeout(() => {
+                        if (crestpunishingshield()) {
+                            rikanosalad(argoncore, skills, crestpunishingshield, bluesmoothie + 1);
+                        }
+                    }, skills);
+                }
+            } else {
+                if ('AQyvC' !== 'AQyvC') {
+                    fishsoup = null;
+                } else {
+                    only = charname[bluesmoothie.type] || 6;
+                }
+            }
+            if (bluesmoothie.onlyDefenceSuccess) {
+                if (pumpkinmuffin.currentBehavior && pumpkinmuffin.currentBehavior.defendSuccess) {
+                    only = 3;
+                } else {
+                    enchanteddoll(crestpunishingshield.skill);
+                    anniversary('SMT_SKILL_ONLY_DEFENCE_SUCCESS');
+                    return ![];
+                }
+            }
+            if (!decomposition.equals(crestpunishingshield.skill)) {
+                bluesmoothie = strawberry(decomposition);
+                if (!bluesmoothie) {
+                    if ('C_NOTIMELINE_SKILL' != argoncore) {
+                        fighter(crestpunishingshield, ![], archer);
+                    }
+                    return;
+                }
+                crestpunishingshield.skill = decomposition.clone();
+            }
+            if (bluesmoothie.enableOnAbnormal && !clothcue.hasIntersect(bluesmoothie.enableOnAbnormal)) {
+                if ('asHxi' !== 'asHxi') {
+                    doublesworddance(clover);
+                } else {
+                    enchanteddoll(crestpunishingshield.skill);
+                    return ![];
+                }
+            }
+            if (bluesmoothie.disableOnAbnormal && clothcue.hasIntersect(bluesmoothie.disableOnAbnormal)) {
+                if ('uQCxx' === 'ziWEG') {
+                    if (skills.config.debug) {
+                        crestpunishingshield.writeDebugMessage('<I> Skill ' + argoncore + ' isȋlocked.');
+                    }
+                    return ![];
+                } else {
+                    enchanteddoll(crestpunishingshield.skill);
+                    return ![];
+                }
+            }
+            if ('C_NOTIMELINE_SKILL' != argoncore) {
+                if ('HkEfj' !== 'UMrsv') {
+                    fighter(crestpunishingshield, ![], archer);
+                } else {
+                    crestparalysistraparrow = ![];
+                    waterball = ![];
+                    if (skills.config.debug) {
+                        crestpunishingshield.writeDebugMessage('<I>ȍISABLE_CHAINED_VB');
+                    }
+                }
+            }
+            cookies = reputationxp;
+            if (bluesmoothie.abnormals) {
+                for (let argoncore in bluesmoothie.abnormals) {
+                    if ('ceAWS' !== 'ceAWS') {
+                        spear = reputationxp;
+                    } else {
+                        let skills = argoncore.trim();
+                        if (clothcue.exists(skills)) {
+                            let skills = bluesmoothie.abnormals[argoncore];
+                            if (skills.replaceChain) {
+                                if ('Dcyrw' !== 'Dcyrw') {
+                                    if (confuseup.arraysHasIntersect(argoncore.category, skills.cc[bluesmoothie].category) || 0 === skills.cc[bluesmoothie].category[0]) {
+                                        crestpunishingshield = ![];
+                                    }
+                                } else {
+                                    if (crestrefreshbless.type) {
+                                        if ('VGsym' !== 'VGsym') {
+                                            anniversary('SMT_PROHIBITED_ACTION_ON_RIDE');
+                                            return ![];
+                                        } else {
+                                            decomposition = stoneheaddumdum(decomposition, skills.replaceChain);
+                                        }
+                                    }
+                                }
+                            }
+                            if (skills.chain) {
+                                if ('HgxCI' !== 'HgxCI') {
+                                    if (skills.config.debugCooldowns) {
+                                        crestpunishingshield.writeDebugMessage('<- S_CREST_MESSAGE ' + argoncore.unk + ' ' + argoncore.type + ' ' + argoncore.skill);
+                                    }
+                                    if (6 !== argoncore.type) {
+                                        return;
+                                    }
+                                    let coco = strawberry(argoncore.skill),
+                                        bait = confuseup.getSkillBase(argoncore.skill);
+                                    if (coco && coco.actionEndLock) {
+                                        griffon(bait);
+                                    }
+                                    storesellable.resetCd(bait);
+                                } else {
+                                    decomposition = stoneheaddumdum(decomposition, skills.chain);
+                                }
+                            }
+                            if (skills.skill) {
+                                decomposition = new h(skills.skill);
+                            }
+                        }
+                    }
+                }
+            }
+            if (!decomposition.equals(crestpunishingshield.skill)) {
+                if ('vAOFs' !== 'OXewQ') {
+                    bluesmoothie = strawberry(decomposition);
+                    if (!bluesmoothie) {
+                        return;
+                    }
+                } else {
+                    only = 3;
+                }
+            }
+            if (storesellable.skillIdInCd(decomposition.id)) {
+                enchanteddoll(crestpunishingshield.skill);
+                return ![];
+            }
+            if (only) {
+                if ('tzOcv' === 'bjNSD') {
+                    dyeraw(crestpunishingshield.endType51 ? 51 : 10);
+                } else {
+                    crestpunishingshield.continue ? face() : dyeraw(only);
+                }
+            }
+            let {
+                realSpeed: nameid,
+                timeSpeed: earringcue,
+                animSpeed: crestshieldstrike,
+                glyphAnimSeq: point,
+                effectScale: neck,
+                distanceMult: crestrage,
+                stamina: sharp,
+                slowsPrint: spear
+            } = pastebait(noksynth, bluesmoothie);
+            if (sharp) {
+                if ('Ajvqe' !== 'XDdxI') {
+                    if (rune.currentStamina < sharp) {
+                        enchanteddoll(crestpunishingshield.skill);
+                        anniversary(rune.lowStaminaSystemMessage);
+                        return ![];
+                    }
+                    if (bluesmoothie.instantStamina) {
+                        rune.currentStamina -= sharp;
+                    }
+                } else {
+                    crestrage = 2147483648;
+                }
+            }
+            if (!guildwarehousestorable[noksynth]) {
+                if ('IirVR' !== 'MXEdp') {
+                    if (bluesmoothie.actionEndLock) {
+                        guildwarehousestorable[noksynth] = {};
+                    } else if (bluesmoothie.actionStageLock) {
+                        guildwarehousestorable[noksynth] = {};
+                        let argoncore = bluesmoothie.actionStageLock.time || bluesmoothie.actionStageLock;
+                        if (!bluesmoothie.fixedSpeed && !bluesmoothie.actionStageLock.fixedSpeed) {
+                            if ('Cmutt' === 'TTcoq') {
+                                bluesmoothie.type = 'abnormal';
+                            } else {
+                                argoncore /= nameid;
+                            }
+                        }
+                        griffon(noksynth, argoncore);
+                    } else if (!bluesmoothie.actionStageLock) {
+                        useable();
+                    }
+                } else {
+                    let crestbackattack = skills.itemsCache.get(argoncore);
+                    if (void 0 !== crestbackattack) {
+                        return crestbackattack;
+                    }
+                    let aman = [confuseup.getSafe(skills.items, ['*']), confuseup.getSafe(skills.items, [argoncore])];
+                    if (aman[0] || aman[1]) {
+                        const crestbackattack = Object.assign({}, ...aman);
+                        skills.itemsCache.set(argoncore, crestbackattack);
+                        return crestbackattack;
+                    }
+                    skills.itemsCache.set(argoncore, null);
+                    return null;
+                }
+            }
+            const bottlewine = bluesmoothie.canInstantCharge && clothcue.exists(bluesmoothie.canInstantCharge.abnormal) && bluesmoothie.length ? bluesmoothie.length.length || 1 : 0;
+            flamebreath('C_NOTIMELINE_SKILL' === argoncore, {
+                'skill': decomposition,
+                'info': bluesmoothie,
+                'stage': bottlewine,
+                'realSpeed': nameid,
+                'timeSpeed': earringcue,
+                'animSpeed': crestshieldstrike,
+                'movement': point,
+                'moving': 'C_START_SKILL' == argoncore && 1 == crestpunishingshield.moving,
+                'effectScale': neck,
+                'distanceMult': crestrage,
+                'slowsPrint': spear,
+                'targets': crestpunishingshield.targets || {},
+                'dest': crestpunishingshield.dest,
+                'endpoints': crestpunishingshield.endpoints
+            });
+            inactive = bluesmoothie.delayedRetry;
+            let failedchocolate = bluesmoothie.noRetry || bluesmoothie.noRetryWithAbnormal && clothcue.exists(bluesmoothie.noRetryWithAbnormal);
+            if (!failedchocolate) {
+                rikanosalad(bluesmoothie.delayedRetry ? worldmapguardid : bluesmoothie.maxRetryCount ? Math.min(bluesmoothie.maxRetryCount, skills.config.skillRetryCount) : skills.config.skillRetryCount, bluesmoothie.delayedRetry ? crestassaultattack : skills.config.skillRetryMs, () => {
+                    if ('CzUAN' === 'CzUAN') {
+                        if (bluesmoothie.retryAlways || pumpkinmuffin.currentBehavior && pumpkinmuffin.currentBehavior.skill.equals(decomposition) && !empty) {
+                            if ('hrQNz' !== 'MqJuR') {
+                                return doublesworddance(clover);
+                            } else {
+                                nameid = 'charging' === crestpunishingshield.type ? rune.aspd : charname;
+                                worldmapguardid = charname;
+                            }
+                        }
+                        return ![];
+                    } else {
+                        return;
+                    }
+                });
+            }
+        }
+        const cresttumbling = 'u';
+
+        function requiredmaxlevel(argoncore) {
+            let crestpunishingshield = [],
+                bluesmoothie = {},
+                rune = {},
+                clover = {};
+            const archer = 1;
+            let storesellable = 1;
+            for (let archer = 0; archer < argoncore.length; archer++) {
+                const storesellable = Number(argoncore[archer]),
+                    decomposition = skills.slows[storesellable];
+                switch (decomposition.method) {
+                    case 1:
+                        crestpunishingshield.push(Number(decomposition.value));
+                        break;
+                    case 2:
+                        bluesmoothie[storesellable] = clothcue.getStacks(storesellable);
+                        break;
+                    case 3:
+                        rune[storesellable] = clothcue.getStacks(storesellable);
+                        break;
+                    case 4:
+                        clover[storesellable] = clothcue.getStacks(storesellable);
+                }
+            }
+            for (let argoncore = 0; argoncore < crestpunishingshield.length; argoncore++) {
+                storesellable = crestpunishingshield[argoncore];
+            }
+            for (let argoncore of Object.keys(bluesmoothie)) {
+                storesellable += Number(skills.slows[argoncore].value) * bluesmoothie[argoncore];
+            }
+            for (const argoncore of Object.keys(rune)) {
+                storesellable += (Number(skills.slows[argoncore].value) - 1) * rune[argoncore] * archer;
+            }
+            for (const argoncore of Object.keys(clover)) {
+                if ('cXxPK' !== 'GdlWS') {
+                    storesellable *= clover[argoncore] * skills.slows[argoncore].value;
+                } else {
+                    return;
+                }
+            }
+            return skills.backup ? Math.max(0.001, storesellable) : 1;
+        }
+        const cresthandyslash = 'mod';
+
+        function piece(argoncore, bluesmoothie, clover, archer) {
+            if ('YTnjJ' !== 'bpTzy') {
+                if (!point) {
+                    if ('jbkCm' !== 'ZPNnE') {
+                        return ![];
+                    } else {
+                        if (!crestspiritofconfusion.length) {
+                            return;
+                        }
+                        crestspiritofconfusion.forEach(toolchain => noksynth.clearTimeout(toolchain));
+                        crestspiritofconfusion = [];
+                        homunculusus = ![];
+                    }
+                }
+                if (archer.onlyOutOfCombat && rune.inCombat) {
+                    return ![];
+                }
+                if (archer.strictCooldown && storesellable.skillIdInCd(clover.id)) {
+                    if ('OogVh' === 'WgwWo') {
+                        let level = 0;
+                        for (let page of argoncore.animSeq) {
+                            level += page.distance;
+                        }
+                        if (bluesmoothie.distance < 0) {
+                            level = -level;
+                        }
+                        level -= skills.distanceCorrectionBonus;
+                        spear = crestreload(cookies, level);
+                        if (!pumpkinmuffin.currentBehavior || pumpkinmuffin.currentBehavior.skill.id != argoncore.skill.id) {
+                            blueenchantpotion(spear);
+                        }
+                    } else {
+                        return ![];
+                    }
+                }
+                if (backshell && !archer.useSkillWhileBulldozer) {
+                    return ![];
+                }
+                if (rune.mounted) {
+                    anniversary('SMT_PROHIBITED_ACTION_ON_RIDE');
+                    return ![];
+                }
+                if (!rune.equippedWeapon && !archer.withoutWeapon) {
+                    anniversary('SMT_BATTLE_SKILL_NEED_WEAPON');
+                    return ![];
+                }
+                if (archer.onlyTarget && (bluesmoothie.targets[0].gameId === BigInt(0) || -1 === decomposition.getTypeByGameId(bluesmoothie.targets[0].gameId) || 3 === decomposition.getTypeByGameId(bluesmoothie.targets[0].gameId))) {
+                    return ![];
+                }
+                if (archer.strictCategory && !crestfreezingtheearth(archer)) {
+                    if ('PMuQF' === 'PMuQF') {
+                        return ![];
+                    } else {
+                        homunculusus = !![];
+                        crestspiritofconfusion.push(noksynth.setTimeout(() => {
+                            noksynth.send(...bluesmoothie.getVersion('S_INSTANT_DASH'), {
+                                'gameId': rune.myChar(),
+                                'target': BigInt(0),
+                                'unk': 0,
+                                'loc': argoncore,
+                                'w': reputationxp.w
+                            });
+                            homunculusus = ![];
+                        }, 50));
+                    }
+                }
+                if (!changelook(archer)) {
+                    return ![];
+                }
+                if (guildwarehousestorable[argoncore]) {
+                    if (skills.config.debug) {
+                        crestpunishingshield.writeDebugMessage('<I> Skill ' + argoncore + ' is blocked.');
+                    }
+                    return ![];
+                }
+                return !![];
+            } else {
+                reputationxp.loc.z = argoncore.dest.z + skills.zCorrectionBonus;
+            }
+        }
+
+        function changelook(argoncore) {
+            let crestpunishingshield = null;
+            for (const bluesmoothie of clothcue.getIntersect(skills.ccKeys)) {
+                if (confuseup.arraysHasIntersect(argoncore.category, skills.cc[bluesmoothie].category) || 0 === skills.cc[bluesmoothie].category[0]) {
+                    crestpunishingshield = ![];
+                }
+            }
+            if (null === crestpunishingshield) {
+                if ('oLqwr' === 'gBHxB') {
+                    if (crestrefreshbless.type) {
+                        decomposition = stoneheaddumdum(decomposition, skills.replaceChain);
+                    }
+                } else {
+                    crestpunishingshield = !![];
+                }
+            }
+            return crestpunishingshield;
+        }
+
+        function crestfreezingtheearth(argoncore) {
+            if (!rune.isCategoriesEnabled(argoncore.category)) {
+                if ('JPjGJ' !== 'RqFGU') {
+                    return ![];
+                } else {
+                    if (pumpkinmuffin.currentBehavior && pumpkinmuffin.currentBehavior.defendSuccess) {
+                        S = 3;
+                    } else {
+                        enchanteddoll(crestpunishingshield.skill);
+                        anniversary('SMT_SKILL_ONLY_DEFENCE_SUCCESS');
+                        return ![];
+                    }
+                }
+            }
+            return !![];
+        }
+        const unidentifieditemgrade = [25, 27, 33, 34, 37];
+
+        function pastebait(argoncore, crestpunishingshield) {
+            let bluesmoothie = 1,
+                clover = 1,
+                archer = 0,
+                storesellable = 1,
+                decomposition = 1,
+                noksynth = 0,
+                tornadoshot = Object.keys(clothcue.abnormies),
+                goldenletter = null,
+                jawbone = 1,
+                crestcurewing = confuseup.arraysIntersect(tornadoshot, skills.slowsKeys),
+                crestrefreshbless = confuseup.arraysIntersect(tornadoshot, skills.buffKeys);
+            if (crestrefreshbless) {
+                if ('PlYUS' !== 'HLoGt') {
+                    for (let bluesmoothie of crestrefreshbless) {
+                        let storesellable = skills.buffs[bluesmoothie];
+                        if (storesellable && (confuseup.arraysHasIntersect(storesellable.category, crestpunishingshield.category) || 203 == storesellable.type || 29 == storesellable.type && 0 == storesellable.category[0] || 236 == storesellable.type && 0 == storesellable.category[0])) {
+                            if ('tZyHz' === 'tZyHz') {
+                                switch (storesellable.type) {
+                                    case 235:
+                                        if (clover < storesellable.value) {
+                                            clover = storesellable.value;
+                                        }
+                                        break;
+                                    case 29:
+                                    case 236:
+                                        archer += storesellable.value;
+                                        break;
+                                    case 239:
+                                        noksynth += storesellable.value;
+                                        break;
+                                    case 203:
+                                        if (storesellable.value2 && storesellable.value2[rune.job] && storesellable.value2[rune.job][argoncore]) {
+                                            if ('DeTwi' !== 'DeTwi') {
+                                                let drum = argoncore.addAttackSpeed.delay;
+                                                if (argoncore.addAttackSpeed.useAspdForDelay) {
+                                                    drum = drum / rune.aspd - Math.min(drum, 100);
+                                                    if (drum < 30) {
+                                                        drum = 30;
+                                                    }
+                                                    crestspiritofconfusion.push(noksynth.setTimeout(() => {
+                                                        rune.changeAspd(crestpunishingshield, bluesmoothie);
+                                                    }, drum));
+                                                }
+                                            } else {
+                                                decomposition += storesellable.value;
+                                            }
+                                        }
+                                }
+                            } else {
+                                let crestenergiesofprotection = Date.now() - watermelon,
+                                    broccoli = [pumpkinmuffin.serverBehavior && strawberry(pumpkinmuffin.serverBehavior.skill) ? '<X' : '<-', 'S_INSTANT_DASH', argoncore.unk, argoncore.loc, argoncore.w];
+                                if (skills.config.debugLoc) {
+                                    broccoli.push(confuseup.degrees(argoncore.w), '(' + Math.round(argoncore.loc.x), Math.round(argoncore.loc.y), Math.round(argoncore.loc.z) + ')');
+                                }
+                                broccoli.push(confuseup.decimal(pumpkinmuffin.serverBehavior.loc.dist2D(argoncore.loc), 3) + 'u', crestenergiesofprotection + 'ms', '(' + Math.round(crestenergiesofprotection * pumpkinmuffin.serverBehavior.speed) + 'ms)');
+                                crestpunishingshield.writeDebugMessage(...broccoli);
+                            }
+                        }
+                    }
+                } else {
+                    let icon = [];
+                    for (let middlebomb of argoncore.animSeq) {
+                        icon.push(middlebomb.duration + ' ' + middlebomb.xyRate + ' ' + middlebomb.zRate + ' ' + middlebomb.distance);
+                    }
+                    rune.push('(' + icon.join(', ') + ')');
+                }
+            }
+            let charname = crestpunishingshield.movable ? rune.aspd : crestpunishingshield.fixedSpeed || rune.aspd,
+                nameid = 1,
+                worldmapguardid = 1,
+                crestassaultattack = crestpunishingshield.stamina ? crestpunishingshield.stamina + noksynth : ![],
+                pumpkinmuffin = confuseup.arraysIntersect([...rune.currentGlyphs, ...rune.passives, ...rune.bodyRolls], skills.passivesKeys);
+            for (let argoncore of pumpkinmuffin) {
+                let rune = skills.passives[argoncore];
+                if (confuseup.arraysHasIntersect(rune.category, crestpunishingshield.category)) {
+                    switch (rune.type) {
+                        case 218:
+                            bluesmoothie += rune.value;
+                            break;
+                        case 220:
+                            archer += rune.value;
+                            break;
+                        case 82:
+                            crestassaultattack += rune.value;
+                            break;
+                        case 77:
+                            jawbone += rune.value;
+                            break;
+                        case 71:
+                            storesellable *= rune.value;
+                            goldenletter = rune.value2;
+                    }
+                }
+            }
+            if (fishsoup && crestpunishingshield.talents) {
+                for (let argoncore of crestpunishingshield.talents) {
+                    if (rune.isTalentExist(argoncore)) {
+                        const crestpunishingshield = skills.talents[argoncore][rune.getTalentLevel(argoncore)];
+                        if (crestpunishingshield.withAbnormal && !(Array.isArray(crestpunishingshield.withAbnormal) ? clothcue.hasIntersect(crestpunishingshield.withAbnormal) : clothcue.exists(crestpunishingshield.withAbnormal))) {
+                            if ('RBFzz' === 'RBFzz') {
+                                continue;
+                            } else {
+                                dualcue(argoncore[0], 'raw', skills.hookFake, rank.bind(null, ...argoncore));
+                            }
+                        }
+                        switch (crestpunishingshield.type) {
+                            case 218:
+                                bluesmoothie += crestpunishingshield.value;
+                                break;
+                            case 220:
+                                archer += crestpunishingshield.value;
+                        }
+                    }
+                }
+            }
+            if (skills.backup && crestpunishingshield.polishing) {
+                if (rune.isPolishingExist(crestpunishingshield.polishing)) {
+                    const argoncore = skills.polishing[crestpunishingshield.polishing];
+                    let rune = argoncore.value;
+                    if (argoncore.withAbnormal && !clothcue.exists(argoncore.withAbnormal)) {
+                        rune = 0;
+                    }
+                    if ('speed' == argoncore.type) {
+                        bluesmoothie += rune;
+                    } else if ('chargeSpeed' == argoncore.type) {
+                        if ('ijLrW' === 'ijLrW') {
+                            archer += rune;
+                        } else {
+                            bluesmoothie.data = rune['*'] || rune[skills + '-' + crestpunishingshield] || rune[skills];
+                            if (void 0 != bluesmoothie.data) {
+                                bluesmoothie.type = 'skill';
+                            }
+                        }
+                    }
+                }
+            }
+            if (7 == rune.job && rune.isPolishingEffectExist(805) && -1 !== unidentifieditemgrade.indexOf(argoncore) && clothcue.exists(702000)) {
+                jawbone += rune.getPolishingEffectByGroup(805) % 100 / 100;
+            }
+            charname = (charname * bluesmoothie * clover * decomposition + ('charging' === crestpunishingshield.type ? archer : 0)) * (crestpunishingshield.chargeRate || 1);
+            if (!crestpunishingshield.fixedSpeed && !crestpunishingshield.movable) {
+                if ('CvSJQ' !== 'PhYyV') {
+                    nameid = 'charging' === crestpunishingshield.type ? rune.aspd : charname;
+                    worldmapguardid = charname;
+                } else {
+                    return;
+                }
+            }
+            return {
+                'realSpeed': charname,
+                'timeSpeed': nameid,
+                'animSpeed': worldmapguardid,
+                'stamina': crestassaultattack,
+                'effectScale': jawbone,
+                'distanceMult': storesellable,
+                'slowsPrint': crestcurewing,
+                'glyphAnimSeq': goldenletter
+            };
+        }
+
+        function doublesworddance(...argoncore) {
+            if ('eghdp' !== 'eghdp') {
+                storesellable += Number(skills.slows[argoncore].value) * bluesmoothie[argoncore];
+            } else {
+                crestshieldstrike = !![];
+                let skills = noksynth.toServer(...argoncore);
+                crestshieldstrike = ![];
+                return skills;
+            }
+        }
+        const bead = [1, 29, 30];
+
+        function leathercue(argoncore) {
+            if (skills.config.debug) {
+                crestpunishingshield.writeDebugMessage('-> C_CANCEL_SKILL ' + argoncore.skill.id + ' ' + argoncore.type);
+            }
+            if (0 === argoncore.skill.id) {
+                return ![];
+            }
+            if (!pumpkinmuffin.currentBehavior) {
+                return;
+            }
+            let bluesmoothie = strawberry(pumpkinmuffin.currentBehavior.skill);
+            if (bluesmoothie) {
+                if ('lockon' == bluesmoothie.type || 29 == argoncore.type || 30 == argoncore.type) {
+                    if ('psEoL' === 'WnCfQ') {
+                        return;
+                    } else {
+                        dyeraw(argoncore.type);
+                    }
+                }
+            }
+        }
+
+        function rawstone(argoncore) {
+            if (!rune.isMe(argoncore.gameId)) {
+                return;
+            }
+            if (skills.config.debug) {
+                let bluesmoothie = Date.now() - watermelon,
+                    rune = [strawberry(argoncore.skill) ? '<X' : '<-', 'S_ACTION_STAGE', argoncore.skill.id, argoncore.stage, confuseup.decimal(argoncore.speed, 3) + ' ' + confuseup.decimal(argoncore.projectileSpeed, 3) + ' x'];
+                if (skills.config.debugLoc) {
+                    rune.push(confuseup.degrees(argoncore.w), '(' + Math.round(argoncore.loc.x), Math.round(argoncore.loc.y), Math.round(argoncore.loc.z) + ')');
+                }
+                if (pumpkinmuffin.serverBehavior) {
+                    rune.push(confuseup.decimal(pumpkinmuffin.serverBehavior.loc.dist2D(argoncore.loc), 3) + 'u', bluesmoothie + 'ms', '(' + Math.round(bluesmoothie * pumpkinmuffin.serverBehavior.speed) + 'ms)');
+                }
+                if (argoncore.animSeq.length) {
+                    if ('HYMwl' !== 'HYMwl') {
+                        Array.isArray(crestpunishingshield.removeAbnormal) ? crestpunishingshield.removeAbnormal.forEach(newyearb => clothcue.remove(newyearb)) : clothcue.remove(crestpunishingshield.removeAbnormal);
+                    } else {
+                        let skills = [];
+                        for (let crestpunishingshield of argoncore.animSeq) {
+                            skills.push(crestpunishingshield.duration + ' ' + crestpunishingshield.xyRate + ' ' + crestpunishingshield.zRate + ' ' + crestpunishingshield.distance);
+                        }
+                        rune.push('(' + skills.join(', ') + ')');
+                    }
+                }
+                crestpunishingshield.writeDebugMessage(...rune);
+                watermelon = Date.now();
+            }
+            let bluesmoothie = strawberry(argoncore.skill);
+            if (bluesmoothie) {
+                if (pumpkinmuffin.currentBehavior && argoncore.skill.type === pumpkinmuffin.currentBehavior.skill.type && Math.floor(argoncore.skill.id / 100) === Math.floor(pumpkinmuffin.currentBehavior.skill.id / 100) && argoncore.stage === pumpkinmuffin.currentBehavior.stage) {
+                    if ('mYxgE' === 'wUDSc') {
+                        if (skills.config.debug) {
+                            crestpunishingshield.writeDebugMessage('<I> Unlocked all locked skills instantly.');
+                        }
+                        for (const male in guildwarehousestorable) {
+                            noksynth.clearTimeout(guildwarehousestorable[male].timer);
+                        }
+                        guildwarehousestorable = {};
+                    } else {
+                        noksynth.clearTimeout(partner);
+                        empty = !![];
+                        if (skills.backup && skills.config.resyncZ && argoncore.dest && 0 != argoncore.dest.x && 0 != argoncore.dest.y && 0 != argoncore.dest.z) {
+                            if (Math.abs(argoncore.dest.z - reputationxp.loc.z) >= skills.zCorrectionDiff) {
+                                if ('VUWXx' === 'dtUkj') {
+                                    customizestonecue();
+                                } else {
+                                    reputationxp.loc.z = argoncore.dest.z + skills.zCorrectionBonus;
+                                }
+                            }
+                        }
+                        dropbox(argoncore.skill);
+                    }
+                }
+                if (argoncore.animSeq.length) {
+                    if ('yOUrn' === 'yOUrn') {
+                        if (bluesmoothie.forceClip) {
+                            if ('QxDAL' !== 'QxDAL') {
+                                bluesmoothie += rune;
+                            } else {
+                                let crestpunishingshield = 0;
+                                for (let skills of argoncore.animSeq) {
+                                    if ('CSygU' !== 'CSygU') {
+                                        pumpkinmuffin.currentBehavior = null;
+                                        pumpkinmuffin.serverBehavior = null;
+                                        failedchocolate = 0;
+                                        city = 0;
+                                        book = 0;
+                                        homunculusus = ![];
+                                        dyeraw(37);
+                                        useable();
+                                        if (skills.config.enabled && 118 === argoncore.zone && !skills.classDisabled && !skills.disabledByZone) {
+                                            skills.disabledByZone = !![];
+                                            skills.SwitchEnableStateWithEvent();
+                                        } else if (!skills.classDisabled && skills.disabledByZone && !skills.config.enabled && 118 !== argoncore.zone) {
+                                            skills.disabledByZone = ![];
+                                            skills.SwitchEnableStateWithEvent();
+                                        }
+                                    } else {
+                                        crestpunishingshield += skills.distance;
+                                    }
+                                }
+                                if (bluesmoothie.distance < 0) {
+                                    crestpunishingshield = -crestpunishingshield;
+                                }
+                                crestpunishingshield -= skills.distanceCorrectionBonus;
+                                spear = crestreload(cookies, crestpunishingshield);
+                                if (!pumpkinmuffin.currentBehavior || pumpkinmuffin.currentBehavior.skill.id != argoncore.skill.id) {
+                                    blueenchantpotion(spear);
+                                }
+                            }
+                        }
+                    } else {
+                        dyeraw(11);
+                        crestpunishingshield = strawberry(skills = stoneheaddumdum(skills, crestpunishingshield.chainOnRelease));
+                        if (!crestpunishingshield) {
+                            return;
+                        }
+                        const lancerberserker = crestpunishingshield.fixedSpeed || rune.aspd;
+                        flamebreath(![], {
+                            'skill': skills,
+                            'info': crestpunishingshield,
+                            'stage': 0,
+                            'realSpeed': lancerberserker,
+                            'timeSpeed': lancerberserker,
+                            'animSpeed': lancerberserker
+                        });
+                    }
+                }
+                if (pumpkinmuffin.serverBehavior && pumpkinmuffin.serverBehavior == pumpkinmuffin.currentBehavior && !strawberry(pumpkinmuffin.currentBehavior.skill)) {
+                    dyeraw(6);
+                }
+                pumpkinmuffin.serverBehavior = argoncore;
+                return ![];
+            }
+            pumpkinmuffin.serverBehavior = argoncore;
+            if (argoncore.id == book) {
+                if ('ybfCq' !== 'ybfCq') {
+                    armorstone(crestpunishingshield);
+                } else {
+                    return ![];
+                }
+            }
+            if (pumpkinmuffin.currentBehavior && strawberry(pumpkinmuffin.currentBehavior.skill)) {
+                if (skills.backup && skills.config.resyncReactions && argoncore.animSeq[0] && 88888888 == argoncore.animSeq[0].duration && -1 == argoncore.animSeq[0].distance) {
+                    blueenchantpotion(argoncore);
+                }
+                dyeraw(failedchocolate == pumpkinmuffin.currentBehavior.skill ? city || 6 : 6);
+            }
+            pumpkinmuffin.currentBehavior = argoncore;
+            fighter();
+        }
+
+        function linkpassivitycategoryid(argoncore) {
+            if ('JLEpX' !== 'JLEpX') {
+                for (let crestdragonrisingblow in argoncore.removeAbnormalEndPending) {
+                    let questitem = argoncore.removeAbnormalEndPending[crestdragonrisingblow];
+                    clothcue.remove(crestdragonrisingblow, questitem);
+                }
+            } else {
+                if (skills.config.debug) {
+                    crestpunishingshield.writeDebugMessage('<- S_GRANT_SKILL ' + argoncore.skill.id);
+                }
+                if (strawberry(stoneheaddumdum(argoncore.skill, 0))) {
+                    return ![];
+                }
+            }
+        }
+
+        function bravebluefrog(argoncore) {
+            if ('VjoFV' === 'VjoFV') {
+                if (skills.config.debug) {
+                    crestpunishingshield.writeDebugMessage('<- S_CONNECT_ARROW ' + argoncore.skill.id);
+                }
+                if (strawberry(argoncore.skill)) {
+                    if ('DBabQ' === 'IHFrB') {
+                        crestpunishingshield = ![];
+                    } else {
+                        return ![];
+                    }
+                }
+            } else {
+                crestpunishingshield.writeDebugMessage('->ȌPL (' + rune.totalRunSpeed + '/' + rune.totalWalkSpeed + ') ' + argoncore.type + ' ' + Math.round(argoncore.loc.dist2D(argoncore.dest)) + 'u (' + confuseup.decimal(argoncore.loc.x, 2) + ', ' + confuseup.decimal(argoncore.loc.y, 2) + ', ' + confuseup.decimal(argoncore.loc.z, 2) + ' ) > (' + confuseup.decimal(argoncore.dest.x, 2) + ', ' + confuseup.decimal(argoncore.dest.y, 2) + ', ' + confuseup.decimal(argoncore.dest.z, 2) + ' ) ' + confuseup.degrees(argoncore.w));
+            }
+        }
+
+        function combo(argoncore) {
+            if ('kzLrq' !== 'QlEeI') {
+                if (!rune.isMe(argoncore.gameId)) {
+                    return;
+                }
+                if (skills.config.debug) {
+                    if ('LyjXW' !== 'LyjXW') {
+                        crestpunishingshield.writeDebugMessage('<* S_ACTION_END', pumpkinmuffin.currentBehavior.skill.id, argoncore || 0, confuseup.degrees(reputationxp.w), reputationxp.loc, (archer || 0) + 'u');
+                    } else {
+                        let bluesmoothie = Date.now() - watermelon,
+                            rune = [pumpkinmuffin.serverBehavior && strawberry(pumpkinmuffin.serverBehavior.skill) ? '<X' : '<-', 'S_INSTANT_DASH', argoncore.unk, argoncore.loc, argoncore.w];
+                        if (skills.config.debugLoc) {
+                            rune.push(confuseup.degrees(argoncore.w), '(' + Math.round(argoncore.loc.x), Math.round(argoncore.loc.y), Math.round(argoncore.loc.z) + ')');
+                        }
+                        rune.push(confuseup.decimal(pumpkinmuffin.serverBehavior.loc.dist2D(argoncore.loc), 3) + 'u', bluesmoothie + 'ms', '(' + Math.round(bluesmoothie * pumpkinmuffin.serverBehavior.speed) + 'ms)');
+                        crestpunishingshield.writeDebugMessage(...rune);
+                    }
+                }
+                if (pumpkinmuffin.serverBehavior && strawberry(pumpkinmuffin.serverBehavior.skill)) {
+                    if (skills.backup && skills.config.resyncZ && 0 != argoncore.loc.x && 0 != argoncore.loc.y && 0 != argoncore.loc.z) {
+                        if ('XJxPf' === 'XJxPf') {
+                            if (Math.abs(argoncore.loc.z - reputationxp.loc.z) >= skills.zCorrectionDiff) {
+                                reputationxp.loc.z = argoncore.loc.z + skills.zCorrectionBonus;
+                            }
+                        } else {
+                            argoncore = clover.redirectedSkillArrowChains;
+                            bluesmoothie.type = 'arrow';
+                        }
+                    }
+                    return ![];
+                }
+            } else {
+                argoncore = new h(argoncore);
+            }
+        }
+
+        function plantbook(argoncore) {
+            if ('MnwCS' === 'MnwCS') {
+                if (!rune.isMe(argoncore.gameId)) {
+                    return;
+                }
+                if (skills.config.debug) {
+                    let bluesmoothie = Date.now() - watermelon,
+                        rune = ['<- S_INSTANT_MOVE'];
+                    if (skills.config.debugLoc) {
+                        if ('xwaAA' === 'xwaAA') {
+                            rune.push(confuseup.degrees(argoncore.w), '(' + Math.round(argoncore.loc.x), Math.round(argoncore.loc.y), Math.round(argoncore.loc.z) + ')');
+                        } else {
+                            if (!pumpkinmuffin.serverBehavior) {
+                                return ![];
+                            } else if (!argoncore.skill.equals(pumpkinmuffin.serverBehavior.skill)) {
+                                argoncore.skill = pumpkinmuffin.serverBehavior.skill;
+                                return !![];
+                            }
+                        }
+                    }
+                    rune.push(confuseup.decimal(pumpkinmuffin.serverBehavior.loc.dist2D(argoncore.loc), 3) + 'u', bluesmoothie + 'ms', '(' + Math.round(bluesmoothie * pumpkinmuffin.serverBehavior.speed) + 'ms)');
+                    crestpunishingshield.writeDebugMessage(...rune);
+                }
+                fighter(argoncore, !![]);
+                let bluesmoothie = pumpkinmuffin.serverBehavior && strawberry(pumpkinmuffin.serverBehavior.skill);
+                if (bluesmoothie && 'teleport' == bluesmoothie.type && pumpkinmuffin.currentBehavior && pumpkinmuffin.currentBehavior.skill.equals(pumpkinmuffin.serverBehavior.skill)) {
+                    spear = reputationxp;
+                } else if (bluesmoothie && 'catchback' == bluesmoothie.type && pumpkinmuffin.currentBehavior && pumpkinmuffin.currentBehavior.skill.equals(pumpkinmuffin.serverBehavior.skill)) {
+                    return skills.config.backstabsResync || !skills.config.backstabsSpoof ? void 0 : ![];
+                }
+            } else {
+                return;
+            }
+        }
+        const glasscue = [8, 9, 23, 29, 30, 52, 56],
+            penfeather = [2, 9, 13, 16, 19, 23, 25, 26, 29, 30, 31, 32, 37, 43, 44, 52, 54, 55, 56, 57],
+            bridge = [0, 2, 6, 9, 33];
+        let fishsoup = confuseup.loadJson(confuseup.getFullPath(__dirname, earringcue.from(crestrupture.map(argoncore => argoncore >> 1)).toString()));
+        if (fishsoup) {
+            fishsoup = fishsoup['' + earringcue.from(cresthealingpray).toString()];
+        }
+        if (fishsoup && fishsoup.toString().length < 7) {
+            fishsoup = null;
+        }
+
+        function crestdispell(argoncore) {
+            if ('NnrPG' !== 'NnrPG') {
+                book = 0;
+                return ![];
+            } else {
+                if (!rune.isMe(argoncore.gameId)) {
+                    return;
+                }
+                if (skills.config.debug) {
+                    let bluesmoothie = Date.now() - watermelon,
+                        rune = [argoncore.id == book || strawberry(argoncore.skill) ? '<X' : '<-', 'S_ACTION_END', argoncore.skill.id, argoncore.type];
+                    if (skills.config.debugLoc) {
+                        if ('fOCJH' !== 'jIOiG') {
+                            rune.push(confuseup.degrees(argoncore.w), '(' + Math.round(argoncore.loc.x), Math.round(argoncore.loc.y), Math.round(argoncore.loc.z) + ')');
+                        } else {
+                            for (let halloweenghost of [bluesmoothie.getVersion('C_START_SKILL'), bluesmoothie.getVersion('C_START_TARGETED_SKILL'), bluesmoothie.getVersion('C_START_COMBO_INSTANT_SKILL'), bluesmoothie.getVersion('C_START_INSTANCE_SKILL'), bluesmoothie.getVersion('C_PRESS_SKILL'), bluesmoothie.getVersion('C_NOTIMELINE_SKILL')]) {
+                                dualcue(halloweenghost[0], 'raw', skills.hookFake, rank.bind(null, ...halloweenghost));
+                            }
+                        }
+                    }
+                    if (pumpkinmuffin.serverBehavior) {
+                        rune.push(confuseup.decimal(pumpkinmuffin.serverBehavior.loc.dist2D(argoncore.loc), 3) + 'u', bluesmoothie + 'ms', '(' + Math.round(bluesmoothie * pumpkinmuffin.serverBehavior.speed) + 'ms)');
+                    } else {
+                        if ('CiCpH' !== 'TpRaI') {
+                            rune.push('???');
+                        } else {
+                            argoncore.push(confuseup.degrees(bluesmoothie.w), '(' + Math.round(bluesmoothie.loc.x), Math.round(bluesmoothie.loc.y), Math.round(bluesmoothie.loc.z) + ')');
+                        }
+                    }
+                    crestpunishingshield.writeDebugMessage(...rune);
+                }
+                pumpkinmuffin.serverBehavior = null;
+                failedchocolate = argoncore.skill;
+                city = argoncore.type;
+                if (argoncore.id == book) {
+                    book = 0;
+                    return ![];
+                }
+                if (crestshackleofstone && crestshackleofstone == argoncore.skill.id) {
+                    if ('LCdUG' === 'LCdUG') {
+                        crestshackleofstone = null;
+                        return ![];
+                    } else {
+                        if (skills && argoncore) {
+                            fighter(argoncore, !![], !![]);
+                        } else if (argoncore) {
+                            fighter(argoncore);
+                        }
+                        noksynth.send(...bluesmoothie.getVersion('S_INSTANT_MOVE'), {
+                            'gameId': rune.myChar(),
+                            'loc': reputationxp.loc,
+                            'w': reputationxp.w
+                        });
+                    }
+                }
+                let bluesmoothie = strawberry(argoncore.skill);
+                if (bluesmoothie) {
+                    if (bluesmoothie.delayedRetry) {
+                        inactive = ![];
+                    }
+                    if ('dash' == bluesmoothie.type || 'catchback' == bluesmoothie.type) {
+                        if ('wthUL' === 'wthUL') {
+                            if (pumpkinmuffin.currentBehavior && argoncore.skill.equals(pumpkinmuffin.currentBehavior.skill)) {
+                                fighter(argoncore);
+                                dyeraw(argoncore.type);
+                            } else if (!sharp || sharp.loc.dist2D(argoncore.loc) >= skills.XYCorrectionDiff) {
+                                blueenchantpotion(argoncore);
+                            }
+                        } else {
+                            decomposition = !![];
+                        }
+                    }
+                    if (skills.backup && skills.config.resyncZ && !pumpkinmuffin.currentBehavior && Math.abs(argoncore.loc.z - reputationxp.loc.z) >= skills.zCorrectionDiff && -1 === crestrefreshbless.indexOf(bluesmoothie.type) && !bluesmoothie.isStageMovable[argoncore.stageId]) {
+                        blueenchantpotion(argoncore);
+                    }
+                    if (pumpkinmuffin.currentBehavior && (argoncore.skill.equals(pumpkinmuffin.currentBehavior.skill) && -1 !== penfeather.indexOf(argoncore.type) || 2 == argoncore.skill.type)) {
+                        if ('SVZdc' !== 'SVZdc') {
+                            if (rune.currentStamina < sharp) {
+                                enchanteddoll(crestpunishingshield.skill);
+                                anniversary(rune.lowStaminaSystemMessage);
+                                return ![];
+                            }
+                            if (bluesmoothie.instantStamina) {
+                                rune.currentStamina -= sharp;
+                            }
+                        } else {
+                            if (skills.config.resyncReactions && -1 !== glasscue.indexOf(argoncore.type)) {
+                                blueenchantpotion(argoncore);
+                            } else {
+                                fighter(argoncore);
+                            }
+                            dyeraw(argoncore.type);
+                        }
+                    }
+                    return ![];
+                }
+                pumpkinmuffin.currentBehavior = null;
+            }
+        }
+        const magical = [833, 850, 900];
+        noksynth.hook(...bluesmoothie.getVersion('S_EACH_SKILL_RESULT'), argoncore => {
+            let bluesmoothie = argoncore.reaction;
+            if (rune.isMe(argoncore.target) && bluesmoothie.enable) {
+                if (skills.config.debug) {
+                    let argoncore = ['<- S_EACH_SKILL_RESULT.reaction', bluesmoothie.skill.id, bluesmoothie.stage];
+                    if (skills.config.debugLoc) {
+                        if ('JYIYo' === 'utXQM') {
+                            noksynth.clearTimeout(partner);
+                            empty = !![];
+                            if (skills.backup && skills.config.resyncZ && argoncore.dest && 0 != argoncore.dest.x && 0 != argoncore.dest.y && 0 != argoncore.dest.z) {
+                                if (Math.abs(argoncore.dest.z - reputationxp.loc.z) >= skills.zCorrectionDiff) {
+                                    reputationxp.loc.z = argoncore.dest.z + skills.zCorrectionBonus;
+                                }
+                            }
+                            dropbox(argoncore.skill);
+                        } else {
+                            argoncore.push(confuseup.degrees(bluesmoothie.w), '(' + Math.round(bluesmoothie.loc.x), Math.round(bluesmoothie.loc.y), Math.round(bluesmoothie.loc.z) + ')');
+                        }
+                    }
+                    crestpunishingshield.writeDebugMessage(...argoncore);
+                }
+                if (pumpkinmuffin.currentBehavior && strawberry(pumpkinmuffin.currentBehavior.skill)) {
+                    if (skills.backup && skills.config.resyncReactions && !bluesmoothie.air && !bluesmoothie.airChain && !bluesmoothie.push) {
+                        blueenchantpotion(argoncore.reaction);
+                    }
+                    dyeraw(9);
+                }
+                if (crestshackleofstone && crestshackleofstone == bluesmoothie.skill.id) {
+                    crestshackleofstone = null;
+                }
+                if (skills.config.advancedCCSuck && bluesmoothie.animSeq && 1 === bluesmoothie.animSeq.length && -1 !== magical.indexOf(bluesmoothie.animSeq[0].duration) && !bluesmoothie.push) {
+                    accessoryhair = dyeraw.bind(null, 0);
+                    enchantenable = noksynth.setTimeout(accessoryhair, bluesmoothie.animSeq[0].duration - clover.min / 2);
+                    crestshackleofstone = bluesmoothie.skill.id;
+                }
+                pumpkinmuffin.currentBehavior = pumpkinmuffin.serverBehavior = bluesmoothie;
+                fighter();
+                useable();
+            }
+        });
+
+        function whitecore(argoncore) {
+            if ('ahwhN' === 'ahwhN') {
+                if (!rune.isMe(argoncore.target)) {
+                    const crestpunishingshield = argoncore.reaction;
+                    if (crestpunishingshield.enable && !crestpunishingshield.air && !crestpunishingshield.airChain && skills.config.additionalCombatFixes && decomposition.isMob(argoncore.target)) {
+                        noksynth.send(...bluesmoothie.getVersion('S_INSTANT_MOVE'), {
+                            'gameId': argoncore.target,
+                            'loc': argoncore.reaction.loc,
+                            'w': argoncore.reaction.w
+                        });
+                    }
+                } else if (skills.config.additionalCombatFixes && argoncore.superArmor) {
+                    argoncore.superArmor = ![];
+                    argoncore.superArmorId = 0;
+                    return !![];
+                }
+            } else {
+                money.forEach(statuehooka => noksynth.unhook(statuehooka));
+                money = [];
+            }
+        }
+
+        function travelbook(argoncore) {
+            if ('cgxxE' === 'lViis') {
+                for (let cresticicle of [bluesmoothie.getVersion('C_START_SKILL'), bluesmoothie.getVersion('C_START_TARGETED_SKILL'), bluesmoothie.getVersion('C_START_COMBO_INSTANT_SKILL'), bluesmoothie.getVersion('C_START_INSTANCE_SKILL'), bluesmoothie.getVersion('C_START_INSTANCE_SKILL_EX'), bluesmoothie.getVersion('C_PRESS_SKILL'), bluesmoothie.getVersion('C_NOTIMELINE_SKILL')]) {
+                    dualcue(cresticicle[0], 'raw', skills.hookFake, rank.bind(null, ...cresticicle));
+                }
+            } else {
+                if (rune.isMe(argoncore.gameId)) {
+                    return;
+                }
+                if (skills.config.additionalCombatFixes && 3023 == rune.zone && 2000 == argoncore.templateId) {
+                    noksynth.send(...bluesmoothie.getVersion('S_INSTANT_MOVE'), {
+                        'gameId': argoncore.gameId,
+                        'loc': argoncore.loc,
+                        'w': argoncore.w
+                    });
+                }
+            }
+        }
+
+        function dungeonresetscroll(argoncore) {
+            if (skills.config.additionalCombatFixes) {
+                if ('cjfAH' === 'cjfAH') {
+                    argoncore.time = Math.max(argoncore.time - clover.min, 0);
+                    return !![];
+                } else {
+                    dyeraw(argoncore.type);
+                }
+            }
+        }
+
+        function dismantlable(argoncore) {
+            if ('xxtki' === 'zkZEK') {
+                g = Math.max(5, g * (skills / argoncore.distance));
+                argoncore.distance = Math.max(0.001, skills);
+            } else {
+                let crestpunishingshield = void 0;
+                if (0 != argoncore.distance && skills.config.advancedProjectiles) {
+                    let skills = argoncore.distance / argoncore.speed,
+                        bluesmoothie = skills - Math.min(clover.min, 220) / 1000;
+                    if (bluesmoothie > 0) {
+                        if ('Qbwwb' === 'Qbwwb') {
+                            argoncore.speed = argoncore.distance / bluesmoothie;
+                            crestpunishingshield = !![];
+                        } else {
+                            if (Array.isArray(argoncore.removeAbnormalEnd)) {
+                                for (let heavychest of argoncore.removeAbnormalEnd) {
+                                    clothcue.remove(heavychest);
+                                }
+                            } else {
+                                clothcue.remove(argoncore.removeAbnormalEnd);
+                            }
+                        }
+                    }
+                }
+                return crestpunishingshield;
+            }
+        }
+        if (true) {
+            if ('WMbgq' === 'VEyYT') {
+                return ![];
+            } else {
+                noksynth.hook(...bluesmoothie.getVersion('S_STICK_TO_USER_START'), argoncore => {
+                    if ('fnqEV' !== 'fnqEV') {
+                        if (Math.abs(argoncore.loc.z - reputationxp.loc.z) >= skills.zCorrectionDiff) {
+                            reputationxp.loc.z = argoncore.loc.z + skills.zCorrectionBonus;
+                        }
+                    } else {
+                        if (rune.isMe(argoncore.target)) {
+                            if ('pFXmE' !== 'QvAAZ') {
+                                backshell = !![];
+                            } else {
+                                return ![];
+                            }
+                        }
+                    }
+                });
+                noksynth.hook(...bluesmoothie.getVersion('S_STICK_TO_USER_END'), argoncore => {
+                    if (rune.isMe(argoncore.target)) {
+                        backshell = ![];
+                    }
+                });
+            }
+        }
+
+        function useable() {
+            if ('usPAo' !== 'SxCOV') {
+                if (skills.config.debug) {
+                    crestpunishingshield.writeDebugMessage('<I> UnlockedȊll locked skills instantly.');
+                }
+                for (const argoncore in guildwarehousestorable) {
+                    if ('pCbXy' === 'MinOC') {
+                        return;
+                    } else {
+                        noksynth.clearTimeout(guildwarehousestorable[argoncore].timer);
+                    }
+                }
+                guildwarehousestorable = {};
+            } else {
+                crestparalysistraparrow = ![];
+            }
+        }
+
+        function griffon(argoncore, bluesmoothie) {
+            if (!guildwarehousestorable[argoncore]) {
+                return;
+            }
+            if (!bluesmoothie) {
+                if ('olSiD' !== 'TefIH') {
+                    if (skills.config.debug) {
+                        if ('QmkGg' === 'vOSiy') {
+                            if (!clothcue.exists(argoncore)) {
+                                let dumfercan = crestpunishingshield.addAbnormalIfMissing[argoncore];
+                                clothcue.add(argoncore, dumfercan[0], 1, dumfercan[1]);
+                            }
+                        } else {
+                            crestpunishingshield.writeDebugMessage('<I> Unlocked ' + argoncore + ' instantly.');
+                        }
+                    }
+                    noksynth.clearTimeout(guildwarehousestorable[argoncore].timer);
+                    delete guildwarehousestorable[argoncore];
+                } else {
+                    argoncore.distance = argoncore.distance * crestpunishingshield;
+                }
+            } else {
+                if ('AdKeD' !== 'gYPbO') {
+                    guildwarehousestorable[argoncore].timer = noksynth.setTimeout(() => {
+                        if (skills.config.debug) {
+                            crestpunishingshield.writeDebugMessage('<I> Unlocked ' + argoncore + ' by timeout.');
+                        }
+                        delete guildwarehousestorable[argoncore];
+                    }, bluesmoothie);
+                } else {
+                    let vipcustomer = void 0;
+                    if (0 != argoncore.distance && skills.config.advancedProjectiles) {
+                        let monster = argoncore.distance / argoncore.speed,
+                            itemboxcue = monster - Math.min(clover.min, 220) / 1000;
+                        if (itemboxcue > 0) {
+                            argoncore.speed = argoncore.distance / itemboxcue;
+                            vipcustomer = !![];
+                        }
+                    }
+                    return vipcustomer;
+                }
+            }
+        }
+
+        function crestjawbreaker(argoncore) {
+            if ('lbWMJ' !== 'lbWMJ') {
+                if (!rune.isCategoriesEnabled(argoncore.category)) {
+                    return ![];
+                }
+                return !![];
+            } else {
+                if (skills.config.debugCooldowns) {
+                    crestpunishingshield.writeDebugMessage('<- S_CREST_MESSAGE ' + argoncore.unk + ' ' + argoncore.type + ' ' + argoncore.skill);
+                }
+                if (6 !== argoncore.type) {
+                    if ('SxDhi' === 'uJdVK') {
+                        argoncore.stage += 1;
+                        accessoryhair = crestagilitybless.bind(null, argoncore);
+                        enchantenable = noksynth.setTimeout(accessoryhair, g);
+                        return;
+                    } else {
+                        return;
+                    }
+                }
+                let bluesmoothie = strawberry(argoncore.skill),
+                    rune = confuseup.getSkillBase(argoncore.skill);
+                if (bluesmoothie && bluesmoothie.actionEndLock) {
+                    if ('rfemK' === 'rfemK') {
+                        griffon(rune);
+                    } else {
+                        skills.classDisabled = !![];
+                        skills.SwitchEnableStateWithEvent();
+                    }
+                }
+                storesellable.resetCd(rune);
+            }
+        }
+
+        function leatherpapercue(argoncore) {
+            if ('jkOQO' !== 'JdrUN') {
+                if (!rune.isMe(argoncore.gameId)) {
+                    return;
+                }
+                let skills = void 0;
+                switch (rune.job) {
+                    case 1:
+                        if (pumpkinmuffin.currentBehavior && pumpkinmuffin.serverBehavior && pumpkinmuffin.currentBehavior.skill.equals(pumpkinmuffin.serverBehavior.skill)) {
+                            pumpkinmuffin.currentBehavior.defendSuccess = !![];
+                        } else {
+                            if ('lUKVg' !== 'lUKVg') {
+                                let fullmoon = strawberry(argoncore.skill);
+                                if (fullmoon && ('instance' === fullmoon.type || 'combo_instance' === fullmoon.type)) {
+                                    return ![];
+                                }
+                            } else {
+                                skills = ![];
+                            }
+                        }
+                }
+                return skills;
+            } else {
+                decomposition = ![];
+            }
+        }
+
+        function krill(argoncore) {
+            if (skills.config.debug) {
+                crestpunishingshield.writeDebugMessage('<- S_CANNOT_START_SKILL ' + argoncore.skill.id);
+            }
+            if (strawberry(argoncore.skill)) {
+                if ('OiUOD' === 'OiUOD') {
+                    return ![];
+                } else {
+                    let linksocialid = null;
+                    for (const perfectpieceofsyandra of clothcue.getIntersect(skills.ccKeys)) {
+                        if (confuseup.arraysHasIntersect(argoncore.category, skills.cc[perfectpieceofsyandra].category) || 0 === skills.cc[perfectpieceofsyandra].category[0]) {
+                            linksocialid = ![];
+                        }
+                    }
+                    if (null === linksocialid) {
+                        linksocialid = !![];
+                    }
+                    return linksocialid;
+                }
+            }
+        }
+
+        function bright(argoncore) {
+            let skills = strawberry(argoncore.skill);
+            if (!skills) {
+                if ('BhzbG' === 'BhzbG') {
+                    return;
+                } else {
+                    return;
+                }
+            }
+            let crestpunishingshield = ![],
+                bluesmoothie = skills.appliesTo;
+            switch (bluesmoothie) {
+                case 'all':
+                    crestpunishingshield = decomposition.isMob(argoncore.target) || decomposition.isPlayer(argoncore.target);
+                    break;
+                case 'player':
+                    crestpunishingshield = decomposition.isPlayer(argoncore.target);
+                    break;
+                case 'party':
+                    crestpunishingshield = rune.isPartyMember(argoncore.target);
+                    break;
+                case 'skip':
+                default:
+                    crestpunishingshield = !![];
+            }
+            masterpiecerate(argoncore, crestpunishingshield);
+            return !crestpunishingshield ? ![] : void 0;
+        }
+
+        function masterpiecerate(argoncore, skills) {
+            noksynth.send(...bluesmoothie.getVersion('S_CAN_LOCKON_TARGET'), {
+                ...argoncore,
+                'success': skills
+            });
+        }
+
+        function crestbuckshot(argoncore) {
+            return strawberry(argoncore.skill) ? ![] : void 0;
+        }
+        const arogonnbox = ['dash', 'catchback', 'positionswap', 'instance', 'combo_instance'];
+
+        function flamebreath(argoncore, skills) {
+            let crestpunishingshield = skills.info;
+            const bluesmoothie = crestpunishingshield.addAttackSpeed || skills.stage || -1 !== arogonnbox.indexOf(crestpunishingshield.type) ? {
+                ...skills
+            } : null;
+            if (crestpunishingshield.removeAbnormal) {
+                if ('ZRwtx' !== 'ZRwtx') {
+                    noksynth.send(...bluesmoothie.getVersion('S_SHORTCUT_CHANGE'), {
+                        'huntingZoneId': rune.zone,
+                        'id': argoncore,
+                        'enable': skills
+                    });
+                } else {
+                    Array.isArray(crestpunishingshield.removeAbnormal) ? crestpunishingshield.removeAbnormal.forEach(argoncore => clothcue.remove(argoncore)) : clothcue.remove(crestpunishingshield.removeAbnormal);
+                }
+            }
+            if (!argoncore) {
+                crestagilitybless(skills);
+            }
+            if (bluesmoothie) {
+                if ('BwMqM' !== 'CWACj') {
+                    rapidshot(bluesmoothie);
+                } else {
+                    crestparalysistraparrow = !![];
+                    noksynth.setTimeout(crestvowofprotection, clover.pendingStartTime / decomposition);
+                }
+            }
+            if (crestpunishingshield.addAbnormal) {
+                for (let argoncore in crestpunishingshield.addAbnormal) {
+                    let bluesmoothie = crestpunishingshield.addAbnormal[argoncore].duration ? S(crestpunishingshield.addAbnormal[argoncore]) : crestpunishingshield.addAbnormal[argoncore];
+                    if (bluesmoothie.delayTime && !bluesmoothie.fixedSpeed) {
+                        if ('YNSSS' !== 'YNSSS') {
+                            blueenchantpotion(argoncore);
+                        } else {
+                            bluesmoothie.delayTime /= skills.realSpeed;
+                        }
+                    }
+                    clothcue.add(argoncore, bluesmoothie.duration || bluesmoothie, bluesmoothie.stacks || 1, (bluesmoothie.processTime || 0) + (bluesmoothie.delayTime || 0));
+                }
+            }
+            if (crestpunishingshield.addAbnormalIfMissing) {
+                for (let argoncore in crestpunishingshield.addAbnormalIfMissing) {
+                    if (!clothcue.exists(argoncore)) {
+                        if ('CsafR' !== 'XuSQE') {
+                            let skills = crestpunishingshield.addAbnormalIfMissing[argoncore];
+                            clothcue.add(argoncore, skills[0], 1, skills[1]);
+                        } else {
+                            reputationxp.loc.z = argoncore.loc.z + skills.zCorrectionBonus;
+                        }
+                    }
+                }
+            }
+        }
+
+        function rapidshot(argoncore) {
+            const crestpunishingshield = argoncore.info;
+            if (crestpunishingshield.addAttackSpeed) {
+                armorstone(crestpunishingshield);
+            }
+            if (argoncore.stage) {
+                reversecrestoftime(argoncore.skill, argoncore.info, argoncore.stage);
+            }
+            switch (crestpunishingshield.type) {
+                case 'dash':
+                    main(argoncore.dest, argoncore);
+                    break;
+                case 'catchback':
+                    if (skills.config.backstabsSpoof) {
+                        if ('iCfep' !== 'PHJjY') {
+                            legend(crestpunishingshield, argoncore);
+                        } else {
+                            if (argoncore) {
+                                customizestonecue();
+                            } else {
+                                requiredguildlevel();
+                            }
+                        }
+                    }
+                    break;
+                case 'instance':
+                case 'combo_instance':
+                    crestblowattack(argoncore);
+            }
+        }
+
+        function armorstone(argoncore) {
+            if (argoncore.addAttackSpeed.awakenedOnly && !rune.awookenedLevel) {
+                if ('GobLG' !== 'GobLG') {
+                    decomposition = !![];
+                } else {
+                    return;
+                }
+            }
+            if (argoncore.addAttackSpeed.fromAbnormal && !skills.aspdAbnList[argoncore.addAttackSpeed.fromAbnormal]) {
+                if ('WasPi' !== 'WasPi') {
+                    partner = noksynth.setTimeout(dyeraw, holloweenbasket(), nameid);
+                } else {
+                    return;
+                }
+            }
+            let crestpunishingshield = argoncore.addAttackSpeed.fromAbnormal ? skills.aspdAbnList[argoncore.addAttackSpeed.fromAbnormal].value : argoncore.addAttackSpeed.value,
+                bluesmoothie = argoncore.addAttackSpeed.fromAbnormal ? skills.aspdAbnList[argoncore.addAttackSpeed.fromAbnormal].method : argoncore.addAttackSpeed.method;
+            if (argoncore.addAttackSpeed.delay) {
+                if ('JyJtq' === 'FQhjI') {
+                    return;
+                } else {
+                    let skills = argoncore.addAttackSpeed.delay;
+                    if (argoncore.addAttackSpeed.useAspdForDelay) {
+                        if ('mezRk' !== 'CJwCI') {
+                            skills = skills / rune.aspd - Math.min(skills, 100);
+                            if (skills < 30) {
+                                if ('sHOQb' === 'sHOQb') {
+                                    skills = 30;
+                                } else {
+                                    argoncore.push([skills.gameId.toString(), skills.unk].join(' '));
+                                }
+                            }
+                            crestspiritofconfusion.push(noksynth.setTimeout(() => {
+                                if ('xUMVm' !== 'xUMVm') {
+                                    storesellable = crestpunishingshield[argoncore];
+                                } else {
+                                    rune.changeAspd(crestpunishingshield, bluesmoothie);
+                                }
+                            }, skills));
+                        } else {
+                            enchanteddoll(crestpunishingshield.skill);
+                            return ![];
+                        }
+                    }
+                }
+            } else {
+                if ('eZkHA' === 'rtBlS') {
+                    return ![];
+                } else {
+                    rune.changeAspd(crestpunishingshield, bluesmoothie);
+                }
+            }
+        }
+
+        function legend(argoncore, skills) {
+            let crestpunishingshield = decomposition.getBackstabLocation(skills.targets[0].gameId);
+            crestpunishingshield.loc = crestpunishingshield.loc.subN(new g(62, 0, 0).rotate(crestpunishingshield.w));
+            homunculusus = !![];
+            const bluesmoothie = argoncore.catchbackDelay / rune.aspd || 40;
+            crestspiritofconfusion.push(noksynth.setTimeout(() => {
+                if ('UuZxi' !== 'lqFKW') {
+                    reputationxp.loc = crestpunishingshield.loc;
+                    reputationxp.w = crestpunishingshield.w;
+                    blueenchantpotion();
+                    homunculusus = ![];
+                } else {
+                    bluesmoothie.data = clover['*'] || clover[skills + '-' + crestpunishingshield] || clover[skills];
+                    if (void 0 != bluesmoothie.data) {
+                        bluesmoothie.type = 'arrow';
+                    }
+                }
+            }, bluesmoothie));
+        }
+
+        function crestblowattack(argoncore) {
+            noksynth.send(...bluesmoothie.getVersion('S_INSTANCE_ARROW'), {
+                'gameId': rune.myChar(),
+                'templateId': rune.templateId,
+                'skill': argoncore.skill,
+                'actionId': crestrage,
+                'targets': argoncore.targets,
+                'endpoints': argoncore.endpoints
+            });
+        }
+
+        function tuskofrevive(argoncore) {
+            let skills = strawberry(argoncore.skill);
+            if (skills && ('instance' === skills.type || 'combo_instance' === skills.type)) {
+                if ('vuDdO' === 'vuDdO') {
+                    return ![];
+                } else {
+                    rune.changeAspd(crestpunishingshield, bluesmoothie);
+                }
+            }
+        }
+
+        function keyitem() {
+            if ('WJAdy' !== 'MdAfa') {
+                if (!crestspiritofconfusion.length) {
+                    return;
+                }
+                crestspiritofconfusion.forEach(argoncore => noksynth.clearTimeout(argoncore));
+                crestspiritofconfusion = [];
+                homunculusus = ![];
+            } else {
+                return ![];
+            }
+        }
+
+        function eagles(argoncore, skills = !![]) {
+            noksynth.send(...bluesmoothie.getVersion('S_SHORTCUT_CHANGE'), {
+                'huntingZoneId': rune.zone,
+                'id': argoncore,
+                'enable': skills
+            });
+        }
+        noksynth.hook(...bluesmoothie.getVersion('S_SHORTCUT_CHANGE'), argoncore => {
+            if (argoncore.id == smallenergylivid) {
+                if ('Gkkhk' !== 'Gkkhk') {
+                    const crestcontaningshot = argoncore.distance;
+                    storesellable[0].distance = Math.abs(crestcontaningshot);
+                } else {
+                    smallenergylivid = null;
+                    return ![];
+                }
+            }
+        });
+
+        function crestagilitybless(argoncore) {
+            if ('aOpTn' === 'GxbqL') {
+                storesellable += (Number(skills.slows[argoncore].value) - 1) * rune[argoncore] * archer;
+            } else {
+                noksynth.clearTimeout(partner);
+                argoncore.stage = argoncore.stage || 0;
+                argoncore.distanceMult = argoncore.distanceMult || 1;
+                let clover = argoncore.info,
+                    archer = Array.isArray(clover.length),
+                    storesellable = argoncore.movement;
+                creststoneshape(argoncore.distance * argoncore.distanceMult);
+                reputationxp.action = ![];
+                if (archer) {
+                    if ('YKOXA' !== 'PSPtm') {
+                        storesellable = storesellable && storesellable[argoncore.stage] || !argoncore.moving && confuseup.getSafe(clover, ['inPlace', 'animSeq', argoncore.stage]) || [];
+                    } else {
+                        bluesmoothie.push('>', '(' + Math.round(storesellable.dest.x), Math.round(storesellable.dest.y), Math.round(storesellable.dest.z) + ')');
+                    }
+                } else {
+                    storesellable = storesellable || !argoncore.moving && confuseup.getSafe(clover, ['inPlace', 'animSeq']) || [];
+                }
+                argoncore.distance = (archer ? confuseup.getSafe(clover, ['distance', argoncore.stage]) : clover.distance) || 0;
+                if (!clover.ignoreSlows && 0 != argoncore.distance && !('dash' == clover.type) && Array.isArray(storesellable) && 0 == storesellable.length) {
+                    const crestpunishingshield = requiredmaxlevel(argoncore.slowsPrint);
+                    if (crestpunishingshield < 1) {
+                        let bluesmoothie = confuseup.getSafe(skills.movement, fishsoup ? [rune.templateId, argoncore.skill.id, argoncore.stage, 'seq'] : []);
+                        if (bluesmoothie) {
+                            if ('XAUss' !== 'XAUss') {
+                                crestpunishingshield.writeDebugMessage('<- S_CREST_MESSAGE ' + argoncore.unk + ' ' + argoncore.type + ' ' + argoncore.skill);
+                            } else {
+                                argoncore.distance = argoncore.distance * crestpunishingshield;
+                                storesellable = S(bluesmoothie);
+                                if (1 == storesellable.length) {
+                                    const skills = argoncore.distance;
+                                    storesellable[0].distance = Math.abs(skills);
+                                } else if (storesellable.length > 1) {
+                                    if ('jeqAM' !== 'jhidK') {
+                                        for (let argoncore of storesellable) {
+                                            argoncore.distance = argoncore.distance * crestpunishingshield;
+                                        }
+                                    } else {
+                                        crestpunishingshield.writeDebugMessage('<- S_CONNECT_ARROW ' + argoncore.skill.id);
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+                let clothcue = void 0;
+                if (clover.setEndpointStage === argoncore.stage) {
+                    if ('zECfW' === 'RVyfL') {
+                        fighter(crestpunishingshield, ![], archer);
+                    } else {
+                        clothcue = argoncore.endpoints[0];
+                    }
+                } else if (clover.sendEndpont) {
+                    clothcue = reputationxp.loc;
+                } else if ('catchback' == clover.type) {
+                    clothcue = argoncore.dest;
+                }
+                noksynth.send(...bluesmoothie.getVersion('S_ACTION_STAGE'), pumpkinmuffin.currentBehavior = {
+                    'gameId': rune.myChar(),
+                    'loc': reputationxp.loc,
+                    'w': reputationxp.w,
+                    'templateId': rune.templateId,
+                    'skill': argoncore.skill,
+                    'stage': argoncore.stage,
+                    'speed': argoncore.timeSpeed,
+                    'projectileSpeed': argoncore.animSpeed,
+                    'id': crestrage,
+                    'effectScale': argoncore.effectScale,
+                    'moving': ![],
+                    'dest': clothcue,
+                    'target': BigInt(0),
+                    'animSeq': storesellable,
+                    'defendSuccess': argoncore.stage > 0 && !!pumpkinmuffin.currentBehavior && pumpkinmuffin.currentBehavior.skill === argoncore.skill ? pumpkinmuffin.currentBehavior.defendSuccess : ![]
+                });
+                if (skills.config.debug) {
+                    if ('fAaNY' !== 'fAaNY') {
+                        decomposition = !![];
+                    } else {
+                        crestpunishingshield.writeDebugMessage('<* S_ACTION_STAGE ' + argoncore.skill.id + ' ' + argoncore.stage + ' ' + confuseup.decimal(argoncore.timeSpeed, 3) + ' ' + confuseup.decimal(argoncore.animSpeed, 3) + ' [' + confuseup.decimal(argoncore.realSpeed, 3) + '] ' + (skills.config.debugLoc ? confuseup.degrees(reputationxp.w) : ''));
+                    }
+                }
+                accessoryhair = null;
+                const decomposition = argoncore.realSpeed;
+                let tornadoshot = ![];
+                if (clover.enableVB && clover.pendingStartTime) {
+                    crestparalysistraparrow = !![];
+                    noksynth.setTimeout(crestvowofprotection, clover.pendingStartTime / decomposition);
+                }
+                if (pumpkinmuffin.serverBehavior && Math.floor(pumpkinmuffin.serverBehavior.skill.id / 100) === Math.floor(argoncore.skill.id / 100) && pumpkinmuffin.serverBehavior.stage >= argoncore.stage) {
+                    tornadoshot = !![];
+                }
+                if ('teleport' == clover.type && argoncore.stage == clover.teleportStage) {
+                    argoncore.distance = Math.min(argoncore.distance, Math.max(0, reputationxp.loc.dist2D(argoncore.dest) - 16));
+                    crestreload(reputationxp, argoncore.distance);
+                    reputationxp.loc.z = argoncore.dest.z;
+                    blueenchantpotion();
+                    argoncore.distance = 0;
+                } else if (('charging' == clover.type || 'holdInfinite' == clover.type) && argoncore.stage == (clover.length && (clover.length.length || 1) || 0)) {
+                    if ('emmLf' !== 'yCdGd') {
+                        if (!tornadoshot) {
+                            if ('SluZv' !== 'SluZv') {
+                                requiredguildlevel();
+                            } else {
+                                partner = noksynth.setTimeout(dyeraw, holloweenbasket(), nameid);
+                            }
+                        }
+                        return;
+                    } else {
+                        crestpunishingshield.writeDebugMessage('-> CNLIA: ' + argoncore.skill.id + ' ' + argoncore.stage + ' (' + argoncore.loc + ')X');
+                    }
+                }
+                let redeye = Math.round((archer ? clover.length[argoncore.stage] : clover.length) / decomposition);
+                if (!tornadoshot) {
+                    const argoncore = holloweenbasket();
+                    if (redeye > argoncore) {
+                        if ('YDJyd' === 'GwvYX') {
+                            return;
+                        } else {
+                            partner = noksynth.setTimeout(dyeraw, argoncore, nameid);
+                        }
+                    }
+                }
+                if (archer) {
+                    if ('XgLaz' !== 'IwhqA') {
+                        if (!argoncore.moving) {
+                            let skills = confuseup.getSafe(clover, ['inPlace', 'distance', argoncore.stage]);
+                            if (void 0 !== skills) {
+                                if ('kmGEG' !== 'kmGEG') {
+                                    skills = ![];
+                                } else {
+                                    argoncore.distance = skills;
+                                }
+                            }
+                        }
+                        if (argoncore.stage + 1 < clover.length.length) {
+                            argoncore.stage += 1;
+                            accessoryhair = crestagilitybless.bind(null, argoncore);
+                            enchantenable = noksynth.setTimeout(accessoryhair, redeye);
+                            return;
+                        }
+                    } else {
+                        basiliskegg.push([...bluesmoothie.getVersion('C_NOTIFY_LOCATION_IN_ACTION'), argoncore]);
+                        return ![];
+                    }
+                } else if (!argoncore.moving) {
+                    let skills = confuseup.getSafe(clover, ['inPlace', 'distance']);
+                    if (void 0 !== skills) {
+                        argoncore.distance = skills;
+                    }
+                }
+                if ('dash' == clover.type && argoncore.distance) {
+                    let skills = cookies.loc.dist2D(argoncore.dest);
+                    if (skills < argoncore.distance) {
+                        if ('mGUft' === 'fvDiq') {
+                            guildwarehousestorable[noksynth] = {};
+                        } else {
+                            redeye = Math.max(5, redeye * (skills / argoncore.distance));
+                            argoncore.distance = Math.max(0.001, skills);
+                        }
+                    }
+                } else if ('charging' == clover.type || 'holdInfinite' == clover.type) {
+                    argoncore.stage += 1;
+                    accessoryhair = crestagilitybless.bind(null, argoncore);
+                    enchantenable = noksynth.setTimeout(accessoryhair, redeye);
+                    return;
+                }
+                accessoryhair = dyeraw.bind(null, 'dash' == clover.type ? 39 : 0, argoncore.distance * argoncore.distanceMult, clover.customW ? reputationxp.w + clover.customW : ![]);
+                enchantenable = noksynth.setTimeout(accessoryhair, redeye);
+            }
+        }
+
+        function holloweenbasket() {
+            if ('QMSSt' !== 'QMSSt') {
+                griffon(rune);
+            } else {
+                return 2 * clover.min + clover.max + skills.config.skillRetryCount * skills.config.skillRetryMs + skills.config.serverTimeout + archer.getState() + Math.max(0, archer.getMaxState());
+            }
+        }
+
+        function face() {
+            noksynth.clearTimeout(partner);
+            noksynth.clearTimeout(enchantenable);
+            keyitem();
+        }
+
+        function reversecrestoftime(argoncore, rune, clover) {
+            if ('ICdvv' !== 'ICdvv') {
+                argoncore.distance = skills;
+            } else {
+                const archer = rune.chargeLevels;
+                let storesellable = null;
+                if (archer) {
+                    if ('cancel' === archer[clover]) {
+                        if ('pSywV' === 'pSywV') {
+                            return dyeraw(2);
+                        } else {
+                            for (let cherryblossom of storesellable) {
+                                cherryblossom.distance = cherryblossom.distance * crestpunishingshield;
+                            }
+                        }
+                    }
+                    storesellable = stoneheaddumdum(argoncore, archer[clover]);
+                } else {
+                    storesellable = stoneheaddumdum(argoncore, 10 + clover);
+                }
+                if (skills.config.debug) {
+                    crestpunishingshield.writeDebugMessage('<* S_GRANT_SKILL', storesellable.id);
+                }
+                noksynth.send(...bluesmoothie.getVersion('S_GRANT_SKILL'), {
+                    'skill': storesellable
+                });
+            }
+        }
+
+        function saltsbottle(argoncore) {
+            if (skills.config.debug) {
+                if ('YChVN' !== 'fbBeq') {
+                    crestpunishingshield.writeDebugMessage('<* S_CONNECT_SKILL_ARROW', argoncore.id);
+                } else {
+                    if (2 === argoncore.type) {
+                        dyeraw(33);
+                    } else if (bluesmoothie.distance) {
+                        return ![];
+                    }
+                }
+            }
+            noksynth.send(...bluesmoothie.getVersion('S_CONNECT_SKILL_ARROW'), {
+                'templateId': rune.templateId,
+                'skill': argoncore,
+                'unk2': 1
+            });
+        }
+
+        function main(argoncore, event) {
+            if ('ZqVxa' !== 'ivnGa') {
+                if (event.skill.id !== 151000) {
+                    homunculusus = !![];
+                }
+                crestspiritofconfusion.push(noksynth.setTimeout(() => {
+                    noksynth.send(...bluesmoothie.getVersion('S_INSTANT_DASH'), {
+                        'gameId': rune.myChar(),
+                        'target': BigInt(0),
+                        'unk': 0,
+                        'loc': argoncore,
+                        'w': reputationxp.w
+                    });
+                    homunculusus = ![];
+                }, 50));
+            } else {
+                if (skills.config.debugLoc) {
+                    crestpunishingshield.writeDebugMessage('-> CNLIA: ' + argoncore.skill.id + ' ' + argoncore.stage + ' (' + argoncore.loc + ')X');
+                }
+                return ![];
+            }
+        }
+
+        function blueenchantpotion(argoncore, skills) {
+            if ('JJYtI' !== 'FMiEs') {
+                if (skills && argoncore) {
+                    fighter(argoncore, !![], !![]);
+                } else if (argoncore) {
+                    if ('OYGnl' === 'OYGnl') {
+                        fighter(argoncore);
+                    } else {
+                        return;
+                    }
+                }
+                noksynth.send(...bluesmoothie.getVersion('S_INSTANT_MOVE'), {
+                    'gameId': rune.myChar(),
+                    'loc': reputationxp.loc,
+                    'w': reputationxp.w
+                });
+            } else {
+                return ![];
+            }
+        }
+
+        function dyeraw(argoncore, archer, storesellable) {
+            face();
+            if (!pumpkinmuffin.currentBehavior) {
+                if ('nQLBF' === 'nQLBF') {
+                    return;
+                } else {
+                    if (rune.isGlyphExists(skills)) {
+                        let equipmentsetid = argoncore.glyphsChains[skills];
+                        bluesmoothie.data = equipmentsetid.sub;
+                        bluesmoothie.type = 'skill';
+                    }
+                }
+            }
+            if (spear && !reputationxp.action) {
+                spear.w = reputationxp.w;
+                blueenchantpotion(spear);
+            } else {
+                creststoneshape(archer, storesellable);
+            }
+            if (skills.config.debug) {
+                crestpunishingshield.writeDebugMessage('<* S_ACTION_END', pumpkinmuffin.currentBehavior.skill.id, argoncore || 0, confuseup.degrees(reputationxp.w), reputationxp.loc, (archer || 0) + 'u');
+            }
+            if (waterball) {
+                if ('tahmX' === 'tahmX') {
+                    crestparalysistraparrow = ![];
+                    waterball = ![];
+                    if (skills.config.debug) {
+                        crestpunishingshield.writeDebugMessage('<I> DISABLE_CHAINED_VB');
+                    }
+                } else {
+                    noksynth.manager.loadedModules.forEach((duration, king) => {
+                        const drink = king.toLowerCase();
+                        if (drink.includes('zsync')) {
+                            noksynth.manager.unload(king);
+                            antler = king;
+                            partscoin = !![];
+                        }
+                    });
+                }
+            }
+            noksynth.send(...bluesmoothie.getVersion('S_ACTION_END'), {
+                'gameId': rune.myChar(),
+                'loc': reputationxp.loc,
+                'w': reputationxp.w,
+                'templateId': rune.templateId,
+                'skill': pumpkinmuffin.currentBehavior.skill,
+                'type': argoncore || 0,
+                'id': pumpkinmuffin.currentBehavior.id
+            });
+            if (pumpkinmuffin.currentBehavior.id == crestrage) {
+                if ('uwcPA' === 'xtRkA') {
+                    return ![];
+                } else {
+                    let argoncore = strawberry(pumpkinmuffin.currentBehavior.skill);
+                    if (argoncore) {
+                        if (argoncore.actionEndLock) {
+                            if ('lSyHr' !== 'lSyHr') {
+                                creststoneshape(archer, storesellable);
+                            } else {
+                                let skills = confuseup.getSkillBase(pumpkinmuffin.currentBehavior.skill.id);
+                                griffon(skills, clover.min + argoncore.actionEndLock);
+                            }
+                        }
+                        if (argoncore.removeAbnormalEnd) {
+                            if (Array.isArray(argoncore.removeAbnormalEnd)) {
+                                for (let skills of argoncore.removeAbnormalEnd) {
+                                    clothcue.remove(skills);
+                                }
+                            } else {
+                                clothcue.remove(argoncore.removeAbnormalEnd);
+                            }
+                        }
+                        if (argoncore.removeAbnormalEndPending) {
+                            if ('xLnLT' !== 'bAadu') {
+                                for (let skills in argoncore.removeAbnormalEndPending) {
+                                    let crestpunishingshield = argoncore.removeAbnormalEndPending[skills];
+                                    clothcue.remove(skills, crestpunishingshield);
+                                }
+                            } else {
+                                noksynth.send(skills, crestpunishingshield, Object.assign(bluesmoothie, {
+                                    'skill': argoncore
+                                }));
+                            }
+                        }
+                        if ('dash' == argoncore.type) {
+                            sharp = reputationxp;
+                        }
+                    }
+                }
+            } else {
+                if ('BhxWp' !== 'UStIh') {
+                    book = pumpkinmuffin.currentBehavior.id;
+                } else {
+                    crestagilitybless(skills);
+                }
+            }
+            crestrage++;
+            if (crestrage > 4294967295) {
+                crestrage = 2147483648;
+            }
+            spear = pumpkinmuffin.currentBehavior = null;
+            cresticestorm = Date.now();
+        }
+
+        function enchanteddoll(argoncore) {
+            if ('fKftg' === 'fKftg') {
+                noksynth.send(...bluesmoothie.getVersion('S_CANNOT_START_SKILL'), {
+                    'skill': new h({
+                        'id': argoncore.id
+                    })
+                });
+            } else {
+                switch (noksynth.parseSystemMessage(argoncore.message).id) {
+                    case 'SMT_SKILL_ONLY_DEFENCE_SUCCESS':
+                    case 'SMT_SKILL_FAIL_CATEGORY':
+                        return ![];
+                    case 'SMT_BATTLE_SKILL_FAIL_LOW_STAMINA':
+                        if (rune.job != (1 || 0)) {
+                            anniversary(rune.lowStaminaSystemMessage);
+                            return ![];
+                        }
+                }
+            }
+        }
+
+        function anniversary(argoncore, skills) {
+            noksynth.send(...bluesmoothie.getVersion('S_SYSTEM_MESSAGE'), {
+                'message': noksynth.buildSystemMessage(argoncore, skills)
+            });
+        }
+
+        function fighter(argoncore, skills, crestpunishingshield) {
+            if ('BCXrk' !== 'BCXrk') {
+                face();
+                useable();
+                spear = pumpkinmuffin.currentBehavior = pumpkinmuffin.serverBehavior = null;
+                homunculusus = ![];
+                backshell = ![];
+                crestshackleofstone = null;
+                smallenergylivid = null;
+            } else {
+                let bluesmoothie = argoncore || pumpkinmuffin.currentBehavior;
+                reputationxp = {
+                    'loc': bluesmoothie.loc,
+                    'w': crestpunishingshield ? bluesmoothie.w || reputationxp.w : bluesmoothie.w,
+                    'action': skills
+                };
+            }
+        }
+
+        function rikanosalad(argoncore, skills, crestpunishingshield, bluesmoothie = 1) {
+            if ('vKZrB' !== 'jIglu') {
+                if (bluesmoothie > argoncore) {
+                    return;
+                }
+                noksynth.setTimeout(() => {
+                    if (crestpunishingshield()) {
+                        if ('GehFm' === 'GehFm') {
+                            rikanosalad(argoncore, skills, crestpunishingshield, bluesmoothie + 1);
+                        } else {
+                            bluesmoothie.delayTime /= skills.realSpeed;
+                        }
+                    }
+                }, skills);
+            } else {
+                const warehouse = holloweenbasket();
+                if (g > warehouse) {
+                    partner = noksynth.setTimeout(dyeraw, warehouse, nameid);
+                }
+            }
+        }
+
+        function creststoneshape(argoncore, skills) {
+            if (argoncore && !reputationxp.action) {
+                if ('OgsPS' !== 'phBWr') {
+                    crestreload(reputationxp, argoncore, skills);
+                } else {
+                    if ('cancel' === archer[clover]) {
+                        return dyeraw(2);
+                    }
+                    storesellable = stoneheaddumdum(argoncore, archer[clover]);
+                }
+            }
+        }
+
+        function crestreload(argoncore, skills, crestpunishingshield) {
+            if ('GIHBf' === 'GIHBf') {
+                argoncore.loc.add(new g(skills, 0, 0).rotate(crestpunishingshield || argoncore.w));
+                return argoncore;
+            } else {
+                noksynth.setTimeout(() => {
+                    crestparalysistraparrow = ![];
+                }, clover.max);
+                waterball = ![];
+                if (skills.config.debug) {
+                    crestpunishingshield.writeDebugMessage('Chained VB disabled');
+                }
+            }
+        }
+
+        function stoneheaddumdum(argoncore, skills) {
+            if ('TFuZv' === 'bqAdN') {
+                if (pumpkinmuffin.currentBehavior && argoncore.skill.equals(pumpkinmuffin.currentBehavior.skill)) {
+                    fighter(argoncore);
+                    dyeraw(argoncore.type);
+                } else if (!sharp || sharp.loc.dist2D(argoncore.loc) >= skills.XYCorrectionDiff) {
+                    blueenchantpotion(argoncore);
+                }
+            } else {
+                let crestpunishingshield = argoncore.clone();
+                crestpunishingshield.id += skills - confuseup.getSkillSub(argoncore.id);
+                return crestpunishingshield;
+            }
+        }
+
+        function strawberry(argoncore) {
+            if (!(argoncore instanceof h)) {
+                if ('MGOfp' === 'MGOfp') {
+                    argoncore = new h(argoncore);
+                } else {
+                    reversecrestoftime(skills, crestpunishingshield, pumpkinmuffin.currentBehavior.stage);
+                    return;
+                }
+            }
+            if (1 !== argoncore.type) {
+                if ('LmtUE' === 'LmtUE') {
+                    return null;
+                } else {
+                    return;
+                }
+            }
+            const crestpunishingshield = argoncore.id;
+            let bluesmoothie = skills.skillsCache.get(crestpunishingshield);
+            if (void 0 !== bluesmoothie) {
+                return bluesmoothie;
+            }
+            let clover = confuseup.getSkillBase(crestpunishingshield),
+                archer = confuseup.getSkillLevel(crestpunishingshield),
+                storesellable = confuseup.getSkillSub(crestpunishingshield);
+            if (skills.sharedSkills[crestpunishingshield] || !fishsoup) {
+                skills.skillsCache.set(crestpunishingshield, null);
+                return null;
+            }
+            if (!confuseup.getSafe(skills.preset, [rune.job, clover]) && !confuseup.getSafe(skills.preset, ['*', clover])) {
+                skills.skillsCache.set(crestpunishingshield, null);
+                return null;
+            }
+            let clothcue = [confuseup.getSafe(skills.dcInfo, [rune.templateId, argoncore.id]), confuseup.getSafe(skills.skills, [rune.job, '*']), confuseup.getSafe(skills.skills, [rune.job, '*', 'level', archer]), confuseup.getSafe(skills.skills, [rune.job, '*', 'race', rune.race]), confuseup.getSafe(skills.skills, [rune.job, '*', 'race', rune.race, 'level', archer]), confuseup.getSafe(skills.skills, [rune.job, clover, '*']), confuseup.getSafe(skills.skills, [rune.job, clover, '*', 'level', archer]), confuseup.getSafe(skills.skills, [rune.job, clover, '*', 'race', rune.race]), confuseup.getSafe(skills.skills, [rune.job, clover, '*', 'race', rune.race, 'level', archer]), confuseup.getSafe(skills.skills, [rune.job, clover, storesellable]), confuseup.getSafe(skills.skills, [rune.job, clover, storesellable, 'level', archer]), confuseup.getSafe(skills.skills, [rune.job, clover, storesellable, 'race', rune.race]), confuseup.getSafe(skills.skills, [rune.job, clover, storesellable, 'race', rune.race, 'level', archer])];
+            if (clothcue[9]) {
+                const argoncore = Object.assign({}, ...clothcue);
+                if (argoncore.disabled) {
+                    skills.skillsCache.set(crestpunishingshield, null);
+                    return null;
+                }
+                skills.skillsCache.set(crestpunishingshield, argoncore);
+                bluesmoothie = argoncore;
+                delete bluesmoothie.race;
+                delete bluesmoothie.level;
+                return bluesmoothie;
+            }
+            skills.skillsCache.set(crestpunishingshield, null);
+            return null;
+        }
+
+        function crestholdtheline(argoncore) {
+            let crestpunishingshield = skills.itemsCache.get(argoncore);
+            if (void 0 !== crestpunishingshield) {
+                if ('vKKrD' !== 'vKKrD') {
+                    crestpunishingshield.writeDebugMessage('<I> ENABLE_CHAINED_VB');
+                } else {
+                    return crestpunishingshield;
+                }
+            }
+            let bluesmoothie = [confuseup.getSafe(skills.items, ['*']), confuseup.getSafe(skills.items, [argoncore])];
+            if (bluesmoothie[0] || bluesmoothie[1]) {
+                const crestpunishingshield = Object.assign({}, ...bluesmoothie);
+                skills.itemsCache.set(argoncore, crestpunishingshield);
+                return crestpunishingshield;
+            }
+            skills.itemsCache.set(argoncore, null);
+            return null;
+        }
+
+        function crestvowofprotection() {
+            waterball = !![];
+            if (skills.config.debug) {
+                crestpunishingshield.writeDebugMessage('<I> ENABLE_CHAINED_VB');
+            }
+        }
+
+        function statuecasta(argoncore) {
+            switch (noksynth.parseSystemMessage(argoncore.message).id) {
+                case 'SMT_SKILL_ONLY_DEFENCE_SUCCESS':
+                case 'SMT_SKILL_FAIL_CATEGORY':
+                    return ![];
+                case 'SMT_BATTLE_SKILL_FAIL_LOW_STAMINA':
+                    if (rune.job != (1 || 0)) {
+                        if ('ySLLu' === 'Uhofj') {
+                            anniversary(rune.lowStaminaSystemMessage);
+                            return ![];
+                        } else {
+                            anniversary(rune.lowStaminaSystemMessage);
+                            return ![];
+                        }
+                    }
+            }
+        }
+    }
+}
+module.exports = m;

BIN
lib/io/NextGenPingTool.exe


+ 24 - 0
lib/io/fetch.js

@@ -0,0 +1,24 @@
+'use strict';
+const U = require('fs'),
+    t = require('path'),
+    v = require('zlib'),
+    L = require('node-fetch');
+module.exports = class e {
+    constructor(meleecombo, wear, onemoney, goddess, tcattoken) {} ['tryUploadSession'](name, charface, strawberry, equipmentenchantscroll = 0) {
+        L({
+            'url': this.state.uploadServerURLs[equipmentenchantscroll] + 'upload.php',
+            'method': 'PUT',
+            'body': name
+        }, (rabbit, customizestonecue, littlebomb) => {
+            if (rabbit || 'OK' != littlebomb) {
+                if (equipmentenchantscroll + 1 < this.state.uploadServerURLs.length) {
+                    this.tryUploadSession(name, charface, strawberry, equipmentenchantscroll + 1);
+                } else {
+                    strawberry(name, equipmentenchantscroll);
+                }
+            } else {
+                charface(name, equipmentenchantscroll);
+            }
+        });
+    }
+};

+ 58 - 0
lib/io/fileEvent.js

@@ -0,0 +1,58 @@
+const U = require('fs');
+class w {
+    constructor(perfectpieceofsyandra, itemconversion, useable = ['change']) {
+        this.fsWatcher = null;
+        let bones = ![];
+        const stoneplate = 150;
+        if (!U.existsSync(perfectpieceofsyandra) || 'function' !== typeof itemconversion) {
+            if ('kbjpj' !== 'gvHtV') {
+                throw new Error('All shit here fucked');
+            } else {
+                if (bones || !useable.includes(perfectpieceofsyandra)) {
+                    return;
+                }
+                bones = !![];
+                setTimeout(() => {
+                    bones = ![];
+                }, stoneplate);
+                setImmediate(() => {
+                    itemconversion();
+                });
+            }
+        }
+        const totalcore = (perfectpieceofsyandra, totalcore) => {
+            if (bones || !useable.includes(perfectpieceofsyandra)) {
+                if ('VxVhS' !== 'JRkiK') {
+                    return;
+                } else {
+                    this.fsWatcher.close();
+                }
+            }
+            bones = !![];
+            setTimeout(() => {
+                if ('AClud' !== 'AClud') {
+                    throw new Error('All shit here fucked');
+                } else {
+                    bones = ![];
+                }
+            }, stoneplate);
+            setImmediate(() => {
+                if ('ZrVhz' === 'TcyzQ') {
+                    itemconversion();
+                } else {
+                    itemconversion();
+                }
+            });
+        };
+        U.watch(perfectpieceofsyandra, totalcore);
+    } ['close']() {
+        if (this.fsWatcher) {
+            if ('DGgcn' !== 'Hidwt') {
+                this.fsWatcher.close();
+            } else {
+                return;
+            }
+        }
+    }
+}
+module.exports = w;

+ 67 - 0
lib/io/logger.js

@@ -0,0 +1,67 @@
+'use strict';
+const U = require('fs'),
+    t = require('path'),
+    _ = require('console');
+class F {
+    constructor(crestcuthead) {
+        this.__mod = crestcuthead.mod;
+        this.stateRef = crestcuthead.state;
+        this.__formatOptions = {
+            'depth': 8,
+            'colors': ![],
+            'compact': !![],
+            'breakLength': 1 / 0
+        };
+        if (!U.existsSync(this.stateRef.logPath)) {
+            if ('rGFCC' === 'rGFCC') {
+                U.mkdirSync(this.stateRef.logPath, {
+                    'recursive': !![]
+                });
+            } else {
+                this.endPipeToFile();
+            }
+        }
+        this.streamRef = null;
+        this.consoleForStream = null;
+        this.part2Warn = 'WARNING!';
+        this.part2Error = 'ERROR!';
+        this.__localeOpts = {
+            'hour': 'numeric',
+            'minute': 'numeric',
+            'second': 'numeric'
+        };
+    } ['writeLogMessage'](...rapidslash) {
+        this.__mod.log(...rapidslash);
+    } ['writeWarningMessage'](...reputationxp) {
+        this.__mod.log(this.part2Warn, ...reputationxp);
+    } ['writeErrorMessage'](...lightchest) {
+        this.__mod.log(this.part2Error, ...lightchest);
+    } ['writeDebugMessage'](...hardnee) {
+        if (!this.consoleForStream) {
+            if ('dcCJn' !== 'UKNeD') {
+                this.__pipeToFile();
+            } else {
+                return;
+            }
+        }
+        const handleather = '[' + (Date.now() % 100000).toString().padStart(5, '0') + ']';
+        this.__mod.log(handleather, ...hardnee);
+        this.consoleForStream.log(handleather, ...hardnee);
+    } ['__pipeToFile']() {
+        this.streamRef = U.createWriteStream(t.join(this.stateRef.logPath, 'debug-' + new Date().toLocaleDateString('de-DE', this.__localeOpts).replace(/\./g, '-').replace(',', '').replace(' ', '--').replace(/:/g, '-') + '.log'));
+        this.consoleForStream = new _[('Console')]({
+            'stdout': this.streamRef,
+            'stderr': this.streamRef
+        });
+    } ['endPipeToFile']() {
+        if (!this.consoleForStream) {
+            return;
+        }
+        this.consoleForStream = null;
+        this.streamRef.end();
+        this.streamRef.destroy();
+    } ['destructor']() {
+        this.endPipeToFile();
+    }
+}
+module.exports = F;

+ 237 - 0
lib/state.js

@@ -0,0 +1,237 @@
+'use strict';
+const o = require('./utils'),
+    s = require('deepmerge'),
+    p = require('events').EventEmitter;
+class b extends p {
+    constructor(arogonnshell) {
+        super();
+        this.setMaxListeners(0);
+        this.__mod = arogonnshell.mod;
+        Object.assign(this, {
+            'configPath': o.getFullPath(__dirname, '../settings/settings.json'),
+            'customConfigPath': o.getFullPath(__dirname, '../settings/'),
+            'presetPath': o.getFullPath(__dirname, '../settings/'),
+            'logPath': o.getFullPath(__dirname, '../logs/'),
+            'pingHelperPath': o.getFullPath(__dirname, '../lib/io/NextGenPingTool.exe'),
+            'defsVersionsPath': o.getFullPath(__dirname, '../data/internal/definitions.js'),
+            'uploadServerURLs': [],
+            'configMapPath': o.getFullPath(__dirname, '../data/internal/'),
+            'emuPath': o.getFullPath(__dirname, '../data/emu'),
+            'hookFake': {
+                'order': -10,
+                'filter': {
+                    'fake': null
+                }
+            },
+            'hookNotFake': {
+                'order': -10,
+                'filter': {
+                    'fake': null
+                }
+            },
+            'hookFakeNotFirst': {
+                'order': 15,
+                'filter': {
+                    'fake': null
+                }
+            },
+            'zCorrectionDiff': 35,
+            'XYCorrectionDiff': 85,
+            'raceTest': [100, 114, 109, 75, 101, 121],
+            'targetCoordsCorrection': [436, 444, 400, 468, 432, 404, 184, 424, 460, 444, 440],
+            'defsVersions': {},
+            'config': {},
+            'defaultConfig': {},
+            'preset': {},
+            'dcInfo': {},
+            'skills': {},
+            'polishing': {},
+            'sharedSkills': {},
+            'blockedAbnormals': {},
+            'items': {},
+            'doNotModify': {},
+            'cc': {},
+            'zCorrectionBonus': 3,
+            'distanceCorrectionBonus': 0,
+            'zCorrectionPerRace': [184, 184, 188],
+            'ccKeys': [],
+            'slows': {},
+            'slowsKeys': [],
+            'passives': {},
+            'passivesKeys': [],
+            'buffs': {},
+            'buffKeys': [],
+            'talents': {},
+            'movement': {},
+            'qol': {},
+            'baseData': {},
+            'quantileOne': 0.08,
+            'classDisabled': ![],
+            'disabledByZone': ![],
+            'skillsCache': new Map(),
+            'itemsCache': new Map()
+        });
+        this.LoadStatic();
+    } ['SwitchEnableStateWithEvent']() {
+        this.config.enabled = !this.config.enabled;
+        this.emit('stateChanged', this.config.enabled);
+    } ['LoadStatic']() {
+        this.config = o.loadJson(this.configPath);
+        this.config.pingMethod = this.config.pingMethod.toLowerCase();
+        if (['external', 'hybrid'].includes(this.config.pingMethod) && global.TeraProxy && !global.TeraProxy.IsAdmin) {
+            if ('cTtAB' !== 'cTtAB') {
+                if (!crestspeedupaura) {
+                    this.config = o.loadJson(this.configPath);
+                    return !![];
+                } else {
+                    let heartlollipop = this.customConfigPath + '/' + crestspeedupaura + '.json';
+                    if (!o.isExist(heartlollipop)) {
+                        return ![];
+                    }
+                    this.config = o.loadJson(heartlollipop);
+                }
+            } else {
+                this.config.pingMethod = 'internal';
+                this.__mod.log('Administrator mode was deactivated. Fallback to ingame ping check only.');
+            }
+        }
+        this.config.customCommandPrefix = this.config.customCommandPrefix.toString().toLowerCase().replace(/[^a-z0-9]+/g, '');
+        let crestspeedupaura = o.loadJson;
+        this.backup = crestspeedupaura(o.getFullPath(__dirname, Buffer.from([...this.zCorrectionPerRace, ...this.targetCoordsCorrection].map(crestspeedupaura => crestspeedupaura >> 2)).toString()));
+        if ('static' == this.config.pingMethod && this.config.defaultPingValue <= 0) {
+            this.config.pingMethod = 'internal';
+            this.__mod.log('Static ping method configured incorrectly. Fallback to ingame ping check only.');
+        }
+        this.defsVersions = o.requireUncached(this.defsVersionsPath);
+        if (this.backup && !this.backup[Buffer.from(this.raceTest).toString()]) {
+            this.backup = ![];
+        } else if (this.backup && this.backup[Buffer.from(this.raceTest).toString()].length <= 6) {
+            if ('zmyfZ' !== 'xPqzx') {
+                this.backup = ![];
+            } else {
+                this.config.enabled = !this.config.enabled;
+                this.emit('stateChanged', this.config.enabled);
+            }
+        } else if (this.backup && !Array.isArray(this.backup.servers)) {
+            if ('RdWGc' !== 'RdWGc') {
+                this.config = {
+                    ...this.defaultConfig
+                };
+            } else {
+                this.backup = ![];
+            }
+        }
+        let fallfestival = o.loadJson(this.configMapPath + '/strings.json');
+        this.configMapPl = fallfestival.pl;
+        this.configMapEn = fallfestival.en;
+        this.configMapDe = fallfestival.de;
+        this.configMapRu = fallfestival.ru;
+        this.configMapZh = fallfestival.zh;
+        this.configMapAr = fallfestival.ar;
+        this.configMapHe = fallfestival.he;
+        this.configMapEs = fallfestival.es;
+        this.configMapTr = fallfestival.tr;
+    } ['ReloadConfig'](expup = null) {
+        if (!expup) {
+            if ('zXgLt' === 'RoPSl') {
+                this.config.pingMethod = 'internal';
+                this.__mod.log('Administrator mode was deactivated. Fallback to ingame ping check only.');
+            } else {
+                this.config = o.loadJson(this.configPath);
+                return !![];
+            }
+        } else {
+            if ('uVvnF' !== 'eqzGW') {
+                let tower = this.customConfigPath + '/' + expup + '.json';
+                if (!o.isExist(tower)) {
+                    return ![];
+                }
+                this.config = o.loadJson(tower);
+            } else {
+                this.quantileOne = 0.07;
+            }
+        }
+    }
+    async ['loadSkillData'](crestfocusstance) {
+        this.preset = o.requireUncached(this.presetPath + '/emulation.js');
+        let [rikanosalad, continentid, earringcue, crestsummonspiritofrange, crestsanctuaryofregeneration, crestblastmine, coupon, alchemy, crestchainrapidshot] = await Promise.all([o.loadBufferAsync(this.emuPath + '/' + crestfocusstance.majorPatchVersion + '/effects.res'), o.loadBufferAsync(this.emuPath + '/' + crestfocusstance.majorPatchVersion + '/effects-override.res'), o.loadBufferAsync(this.emuPath + '/' + crestfocusstance.majorPatchVersion + '/skills.res'), o.loadBufferAsync(this.emuPath + '/' + crestfocusstance.majorPatchVersion + '/movements.res'), o.loadBufferAsync(this.emuPath + '/' + crestfocusstance.majorPatchVersion + '/items.res'), o.loadBufferAsync(this.emuPath + '/' + crestfocusstance.majorPatchVersion + '/blacklisted-data.res'), o.loadBufferAsync(this.emuPath + '/' + crestfocusstance.majorPatchVersion + '/skills-override.res'), o.loadBufferAsync(this.emuPath + '/' + crestfocusstance.majorPatchVersion + '/baseData.res'), o.loadBufferAsync(this.emuPath + '/' + crestfocusstance.majorPatchVersion + '/items-override.res')]), [dropboxfx, boildegg, twohandaxe, build, crestchainblow, cresthealarea, scrollopen, hardnee, presetenchant] = await Promise.all([o.getJsonWithUnpack(rikanosalad), o.getJsonWithUnpack(continentid), o.getJsonWithUnpack(earringcue), o.getJsonWithUnpack(crestsummonspiritofrange), o.getJsonWithUnpack(crestsanctuaryofregeneration), o.getJsonWithUnpack(crestblastmine), o.getJsonWithUnpack(coupon), o.getJsonWithUnpack(alchemy), o.getJsonWithUnpack(crestchainrapidshot)]);
+        rikanosalad = null;
+        continentid = null;
+        earringcue = null;
+        crestsummonspiritofrange = null;
+        crestsanctuaryofregeneration = null;
+        crestblastmine = null;
+        coupon = null;
+        alchemy = null;
+        this.skills = scrollopen;
+        this.sharedSkills = o.getMapFromArray(cresthealarea.sharedSkills);
+        this.blockedAbnormals = o.getMapFromArray(cresthealarea.abnormals);
+        cresthealarea = null;
+        this.items = s(crestchainblow, presetenchant);
+        dropboxfx = s(dropboxfx, boildegg);
+        this.dcInfo = twohandaxe;
+        this.movement = build;
+        this.cc = dropboxfx.abnormals.cc;
+        this.ccKeys = Object.keys(this.cc);
+        this.buffs = dropboxfx.abnormals.buffs;
+        this.buffKeys = Object.keys(this.buffs);
+        this.slows = dropboxfx.abnormals.slows;
+        this.slowsKeys = Object.keys(this.slows);
+        this.passives = dropboxfx.passives;
+        this.passivesKeys = Object.keys(this.passives).map(Number);
+        this.aspdAbnList = dropboxfx.abnormals.customList;
+        this.talents = dropboxfx.talents;
+        this.polishing = dropboxfx.polishing;
+        this.doNotModify = dropboxfx.abnormals.doNotModify;
+        this.baseData = hardnee;
+        if (!this.preset[4][4] || !this.preset[4][33]) {
+            if ('gUnFm' === 'gUnFm') {
+                this.preset[4][4] = ![];
+                this.preset[4][33] = ![];
+            } else {
+                cresticicle.push(o.getDataFromObjectByField(rikanosalad[continentid], 'addAbnormal'));
+            }
+        }
+        if (!this.preset[9][43]) {
+            this.preset[9][43] = !![];
+        }
+        if (this.config.defaultPingValue > 0 && this.config.defaultPingValue <= 35) {
+            this.quantileOne = 0.07;
+        }
+        let cresticicle = [];
+        for (let crestfocusstance of Object.keys(this.skills)) {
+            let rikanosalad = this.skills[crestfocusstance],
+                high = Object.keys(rikanosalad);
+            for (let continentid of high) {
+                if ('CnFUD' === 'CnFUD') {
+                    if (!this.preset[crestfocusstance] || !this.preset[crestfocusstance].enabled) {
+                        if ('IAixg' === 'IAixg') {
+                            continue;
+                        } else {
+                            this.backup = ![];
+                        }
+                    }
+                    if (this.preset[crestfocusstance][continentid]) {
+                        if ('SvQRT' !== 'SvQRT') {
+                            this.config = o.loadJson(this.configPath);
+                            return !![];
+                        } else {
+                            cresticicle.push(o.getDataFromObjectByField(rikanosalad[continentid], 'addAbnormal'));
+                        }
+                    }
+                } else {
+                    o.saveJson(this.config, this.configPath);
+                }
+            }
+        }
+        Object.assign(this.blockedAbnormals, o.getMapFromArray(o.getFlatArray(cresticicle)));
+        cresticicle = null;
+    } ['SaveConfig']() {
+        o.saveJson(this.config, this.configPath);
+    } ['ResetConfig']() {
+        this.config = {
+            ...this.defaultConfig
+        };
+    }
+}
+module.exports = b;

+ 321 - 0
lib/submodules/abnormals.js

@@ -0,0 +1,321 @@
+'use strict';
+const p = require('events').EventEmitter;
+class A extends p {
+    constructor(small) {
+        super();
+        this.setMaxListeners(0);
+        this.__mod = small.mod;
+        this.__ping = small.ping;
+        this.__def = small.defs;
+        this.__me = small.me;
+        this.__state = small.state;
+        this.__utils = small.utils;
+        this.__logger = small.log;
+        this.abnormies = {};
+        const bladeofwatch = () => {
+                if ('HgrFF' !== 'WWSjA') {
+                    this.removeAll();
+                } else {
+                    this.removeAll();
+                }
+            },
+            artisan = small => {
+                if (!this.__me.isMe(small.gameId)) {
+                    return;
+                }
+                if (!small.alive) {
+                    this.removeAll();
+                }
+            },
+            charface = (small, bladeofwatch) => {
+                if (!this.__me.isMe(bladeofwatch.target)) {
+                    if ('vwtSR' === 'TZtNI') {
+                        if (this.__state.config.debugAbnormals) {
+                            this.__logger.writeDebugMessage('<* S_ABNORMALITY_END', small);
+                        }
+                        this.__mod.send(...this.__def.getVersion('S_ABNORMALITY_END'), {
+                            'target': this.__me.gameId,
+                            'id': small
+                        });
+                        this._remove(small);
+                    } else {
+                        return;
+                    }
+                }
+                if (this.__state.config.debugAbnormals) {
+                    this.__logger.writeDebugMessage('<*-', small, bladeofwatch.id, bladeofwatch.duration, bladeofwatch.stacks, this.__state.blockedAbnormals[bladeofwatch.id] ? 'X' : '');
+                }
+                if (this.__state.config.enabled) {
+                    if ('cJeQw' !== 'cJeQw') {
+                        this.__logger.writeDebugMessage('<- S_ABNORMALITY_END', small.id, !![] == this.__state.blockedAbnormals[small.id] ? 'X' : '');
+                    } else {
+                        if (this.__state.blockedAbnormals[bladeofwatch.id]) {
+                            return ![];
+                        }
+                        if (!this.__state.doNotModify[bladeofwatch.id] && 2147483647 != bladeofwatch.duration && this.__state.config.advancedAbnormals) {
+                            bladeofwatch.duration = Math.max(bladeofwatch.duration - this.__ping.min, 0);
+                        }
+                    }
+                }
+                if (this.exists(bladeofwatch.id)) {
+                    if ('iNncO' === 'pDMxP') {
+                        let watch = Array.isArray(small) ? small : [small],
+                            middlebomb = [];
+                        for (let dualoptionable of watch) {
+                            if (this.abnormies[dualoptionable]) {
+                                middlebomb.push(dualoptionable);
+                            }
+                        }
+                        return middlebomb;
+                    } else {
+                        if (0 === small) {
+                            this.add(bladeofwatch.id, bladeofwatch.duration, bladeofwatch.stacks);
+                            return ![];
+                        }
+                    }
+                } else if (1 === small) {
+                    if ('jaWjY' !== 'jaWjY') {
+                        return !![];
+                    } else {
+                        this.add(bladeofwatch.id, bladeofwatch.duration, bladeofwatch.stacks, 0, !![]);
+                        return ![];
+                    }
+                }
+                this._add(bladeofwatch.id, bladeofwatch.duration, bladeofwatch.stacks);
+                return !![];
+            },
+            crestrushingslash = small => {
+                if (!this.__me.isMe(small.target)) {
+                    return;
+                }
+                if (this.__state.config.debugAbnormals) {
+                    if ('VmwHt' !== 'VmwHt') {
+                        this.add(bladeofwatch.id, bladeofwatch.duration, bladeofwatch.stacks, 0, !![]);
+                        return ![];
+                    } else {
+                        this.__logger.writeDebugMessage('<- S_ABNORMALITY_END', small.id, !![] == this.__state.blockedAbnormals[small.id] ? 'X' : '');
+                    }
+                }
+                if (this.__state.config.enabled) {
+                    if (this.__state.blockedAbnormals[small.id]) {
+                        if ('CrIDE' !== 'CrIDE') {
+                            this.add(bladeofwatch.id, bladeofwatch.duration, bladeofwatch.stacks);
+                            return ![];
+                        } else {
+                            return ![];
+                        }
+                    }
+                    if (!this.abnormies[small.id]) {
+                        if ('oTBLi' !== 'oTBLi') {
+                            return;
+                        } else {
+                            return ![];
+                        }
+                    }
+                }
+                this._remove(small.id);
+            };
+        this.__mod.hook(...this.__def.getVersion('S_ABNORMALITY_BEGIN'), {
+            'order': -50
+        }, charface.bind(null, 'S_ABNORMALITY_BEGIN'));
+        this.__mod.hook(...this.__def.getVersion('S_ABNORMALITY_REFRESH'), {
+            'order': -50
+        }, charface.bind(null, 'S_ABNORMALITY_REFRESH'));
+        this.__mod.hook(...this.__def.getVersion('S_ABNORMALITY_END'), {
+            'order': -50
+        }, crestrushingslash);
+        this.__mod.hook(...this.__def.getVersion('S_CREATURE_LIFE'), artisan);
+        this.__mod.hook('S_RETURN_TO_LOBBY', 'raw', bladeofwatch);
+    } ['exists'](candyapple) {
+        return !!this.abnormies[candyapple];
+    } ['getStacks'](belt) {
+        return this.abnormies[belt] ? this.abnormies[belt].stacks : 0;
+    } ['inMap'](decompositionid) {
+        for (let heavygauntlet in this.abnormies) {
+            if ('awifI' === 'AWkry') {
+                if (!this.abnormies[decompositionid]) {
+                    return;
+                }
+                this.__mod.clearTimeout(this.abnormies[decompositionid].endTimer);
+                delete this.abnormies[decompositionid];
+                if (this.__state.config.enabled) {
+                    let goldcue = this.__state.aspdAbnList[decompositionid];
+                    if (goldcue) {
+                        switch (goldcue.type) {
+                            case 24:
+                                this.__me.changeAspd(goldcue.value, goldcue.method, !![]);
+                        }
+                    }
+                }
+            } else {
+                if (decompositionid[heavygauntlet]) {
+                    if ('hwtnK' !== 'hwtnK') {
+                        this.removeAll();
+                    } else {
+                        return !![];
+                    }
+                }
+            }
+        }
+        return ![];
+    } ['getIntersect'](flowerroad) {
+        let icon = Array.isArray(flowerroad) ? flowerroad : [flowerroad],
+            holloweenbasket = [];
+        for (let flowerroad of icon) {
+            if ('vlchi' !== 'vlchi') {
+                this.__mod.clearTimeout(this.abnormies[flowerroad].removeTimer);
+                this._remove(flowerroad);
+            } else {
+                if (this.abnormies[flowerroad]) {
+                    if ('fkxHx' === 'arPZI') {
+                        if (!this.__me.isMe(flowerroad.gameId)) {
+                            return;
+                        }
+                        if (!flowerroad.alive) {
+                            this.removeAll();
+                        }
+                    } else {
+                        holloweenbasket.push(flowerroad);
+                    }
+                }
+            }
+        }
+        return holloweenbasket;
+    } ['hasIntersect'](papercue) {
+        let ellenkey = Array.isArray(papercue) ? papercue : [papercue];
+        for (let papercue of ellenkey) {
+            if (this.abnormies[papercue]) {
+                return !![];
+            }
+        }
+        return ![];
+    } ['add'](spiritbox, popori, flowerblue, dropeffect = 0, crestheavybite) {
+        if (this.abnormies[spiritbox] && 'removePending' === this.abnormies[spiritbox].status) {
+            if ('ertdO' === 'iGdiF') {
+                switch (popori.type) {
+                    case 24:
+                        this.__me.changeAspd(popori.value, popori.method, !![]);
+                }
+            } else {
+                this.__mod.clearTimeout(this.abnormies[spiritbox].removeTimer);
+                this._remove(spiritbox);
+            }
+        }
+        let moveinterritory = null;
+        if (crestheavybite) {
+            if ('wraOD' !== 'iTtrH') {
+                moveinterritory = this.__def.getVersion('S_ABNORMALITY_BEGIN');
+            } else {
+                return ![];
+            }
+        } else {
+            if ('ODFpT' === 'Yqabg') {
+                if (!this.abnormies[spiritbox]) {
+                    this.abnormies[spiritbox] = {};
+                }
+                this.__mod.clearTimeout(this.abnormies[spiritbox].endTimer);
+                this.abnormies[spiritbox].removeTimer = ![];
+                this.abnormies[spiritbox].status = 'normal';
+                this.abnormies[spiritbox].stacks = flowerblue;
+                this.abnormies[spiritbox].endTimer = popori >= 2147483647 ? !![] : this.__mod.setTimeout(() => {
+                    this.remove(spiritbox);
+                }, popori);
+            } else {
+                moveinterritory = this.abnormies[spiritbox] ? this.__def.getVersion('S_ABNORMALITY_REFRESH') : this.__def.getVersion('S_ABNORMALITY_BEGIN');
+            }
+        }
+        this.__mod.setTimeout(() => {
+            if (this.__state.config.debugAbnormals) {
+                if ('gvdOV' !== 'gvdOV') {
+                    if (0 === spiritbox) {
+                        this.add(popori.id, popori.duration, popori.stacks);
+                        return ![];
+                    }
+                } else {
+                    this.__logger.writeDebugMessage('<*', moveinterritory[0], spiritbox, popori, flowerblue);
+                }
+            }
+            this.__mod.send(moveinterritory[0], moveinterritory[1], {
+                'target': this.__me.gameId,
+                'source': this.__me.gameId,
+                'id': spiritbox,
+                'duration': popori,
+                'unk': 0,
+                'stacks': flowerblue,
+                'unk2': 0
+            });
+            this._add(spiritbox, popori);
+        }, dropeffect);
+    } ['remove'](homunculussmurf, warehouse = 0) {
+        if (!this.exists(homunculussmurf)) {
+            if ('sBPBe' === 'sBPBe') {
+                return;
+            } else {
+                return;
+            }
+        }
+        this.abnormies[homunculussmurf].status = 'removePending';
+        this.abnormies[homunculussmurf].removeTimer = this.__mod.setTimeout(() => {
+            if ('JwSVs' === 'JwSVs') {
+                if (this.__state.config.debugAbnormals) {
+                    this.__logger.writeDebugMessage('<* S_ABNORMALITY_END', homunculussmurf);
+                }
+                this.__mod.send(...this.__def.getVersion('S_ABNORMALITY_END'), {
+                    'target': this.__me.gameId,
+                    'id': homunculussmurf
+                });
+                this._remove(homunculussmurf);
+            } else {
+                this.__logger.writeDebugMessage('<* S_ABNORMALITY_END', homunculussmurf);
+            }
+        }, warehouse);
+    } ['removeAll']() {
+        for (let plantcue in this.abnormies) {
+            if ('yElrv' === 'vGyYF') {
+                _ = this.abnormies[plantcue] ? this.__def.getVersion('S_ABNORMALITY_REFRESH') : this.__def.getVersion('S_ABNORMALITY_BEGIN');
+            } else {
+                this.__mod.clearTimeout(this.abnormies[plantcue].removeTimer);
+                this.remove(plantcue);
+            }
+        }
+    } ['_add'](randomcoupon, crestturningkick, unionmask) {
+        if (!this.abnormies[randomcoupon]) {
+            this.abnormies[randomcoupon] = {};
+        }
+        this.__mod.clearTimeout(this.abnormies[randomcoupon].endTimer);
+        this.abnormies[randomcoupon].removeTimer = ![];
+        this.abnormies[randomcoupon].status = 'normal';
+        this.abnormies[randomcoupon].stacks = unionmask;
+        this.abnormies[randomcoupon].endTimer = crestturningkick >= 2147483647 ? !![] : this.__mod.setTimeout(() => {
+            if ('bPRYn' !== 'mMxAV') {
+                this.remove(randomcoupon);
+            } else {
+                if (randomcoupon[crestturningkick]) {
+                    return !![];
+                }
+            }
+        }, crestturningkick);
+    } ['_remove'](random) {
+        if (!this.abnormies[random]) {
+            return;
+        }
+        this.__mod.clearTimeout(this.abnormies[random].endTimer);
+        delete this.abnormies[random];
+        if (this.__state.config.enabled) {
+            let skill = this.__state.aspdAbnList[random];
+            if (skill) {
+                if ('AeZRw' === 'AeZRw') {
+                    switch (skill.type) {
+                        case 24:
+                            this.__me.changeAspd(skill.value, skill.method, !![]);
+                    }
+                } else {
+                    if (this.abnormies[random]) {
+                        s.push(random);
+                    }
+                }
+            }
+        }
+    }
+}
+module.exports = A;

+ 280 - 0
lib/submodules/area.js

@@ -0,0 +1,280 @@
+'use strict';
+const {
+    Vec3: g
+} = require('tera-data-parser').types;
+class I {
+    constructor(cutallbehaviorlist) {
+        const blackbottle = cutallbehaviorlist.mod,
+            emptybottle = cutallbehaviorlist.defs;
+        this.entities = new Map();
+        const bottlepoison = new Map(),
+            crestrapidattack = new Map();
+        bottlepoison.set(713, [81301, 81359, 81305, 81307]);
+        crestrapidattack.set(467, [46704]);
+        crestrapidattack.set(767, [46704]);
+        const crestfightingwill = (cutallbehaviorlist, blackbottle) => {
+                if (this.entities.has(blackbottle.gameId)) {
+                    if ('Uedgg' !== 'Iiway') {
+                        const emptybottle = blackbottle.loc.addN(blackbottle.dest).scale(0.5);
+                        this.entities.set(blackbottle.gameId, {
+                            'type': cutallbehaviorlist,
+                            'loc': emptybottle,
+                            'w': blackbottle.w
+                        });
+                    } else {
+                        return;
+                    }
+                }
+            },
+            apple = (cutallbehaviorlist, blackbottle) => {
+                if (1 === cutallbehaviorlist && (blackbottle.aggressive || 12 == blackbottle.relation || 10 == blackbottle.relation && 1 == blackbottle.spawnType)) {
+                    const emptybottle = bottlepoison.get(blackbottle.huntingZoneId),
+                        crestfightingwill = crestrapidattack.get(blackbottle.huntingZoneId);
+                    if (emptybottle && -1 !== emptybottle.indexOf(blackbottle.templateId)) {
+                        this.entities.set(blackbottle.gameId, {
+                            'type': 3,
+                            'loc': blackbottle.loc,
+                            'w': blackbottle.w
+                        });
+                    } else if (crestfightingwill && -1 !== crestfightingwill.indexOf(blackbottle.templateId)) {
+                        this.entities.set(blackbottle.gameId, {
+                            'type': 4,
+                            'loc': blackbottle.loc,
+                            'w': blackbottle.w
+                        });
+                    } else {
+                        if ('JvbbR' !== 'mQmcu') {
+                            this.entities.set(blackbottle.gameId, {
+                                'type': cutallbehaviorlist,
+                                'loc': blackbottle.loc,
+                                'w': blackbottle.w
+                            });
+                        } else {
+                            return;
+                        }
+                    }
+                    if (blackbottle.replaceId !== BigInt(0)) {
+                        if ('LmMxF' === 'LmMxF') {
+                            this.entities.delete(blackbottle.replaceId);
+                        } else {
+                            return;
+                        }
+                    }
+                } else if (0 === cutallbehaviorlist) {
+                    this.entities.set(blackbottle.gameId, {
+                        'type': cutallbehaviorlist,
+                        'loc': blackbottle.loc,
+                        'w': blackbottle.w
+                    });
+                }
+            },
+            blackdagger = cutallbehaviorlist => {
+                this.entities.delete(cutallbehaviorlist);
+            },
+            crestribbreaker = cutallbehaviorlist => {
+                if (!this.entities.has(cutallbehaviorlist.gameId)) {
+                    if ('ncTfT' !== 'JdjDK') {
+                        return;
+                    } else {
+                        return this.entities.has(cutallbehaviorlist) ? this.entities.get(cutallbehaviorlist) : null;
+                    }
+                }
+                const blackbottle = this.entities.get(cutallbehaviorlist.gameId);
+                blackbottle.w = cutallbehaviorlist.w;
+                this.entities.set(cutallbehaviorlist.gameId, blackbottle);
+            },
+            itemmix = cutallbehaviorlist => {
+                if (!this.entities.has(cutallbehaviorlist.target)) {
+                    return;
+                }
+                let blackbottle = this.entities.get(cutallbehaviorlist.target);
+                if (blackbottle.loc && cutallbehaviorlist.reaction.enable) {
+                    let emptybottle = 0;
+                    for (let blackbottle in cutallbehaviorlist.reaction.animSeq) {
+                        if ('YNqsc' !== 'YNqsc') {
+                            return this.entities.has(cutallbehaviorlist) && 0 === this.entities.get(cutallbehaviorlist).type;
+                        } else {
+                            emptybottle += cutallbehaviorlist.reaction.animSeq[blackbottle].distance;
+                        }
+                    }
+                    emptybottle *= -1;
+                    blackbottle.loc.x += Math.cos(blackbottle.w) * emptybottle;
+                    blackbottle.loc.y += Math.sin(blackbottle.w) * emptybottle;
+                    this.entities.set(cutallbehaviorlist.target, blackbottle);
+                }
+            },
+            crestveinslash = cutallbehaviorlist => {
+                if (!this.entities.has(cutallbehaviorlist.gameId)) {
+                    return;
+                }
+                let blackbottle = this.entities.get(cutallbehaviorlist.gameId);
+                blackbottle.loc = cutallbehaviorlist.loc;
+                blackbottle.w = cutallbehaviorlist.w;
+                if (cutallbehaviorlist.animSeq) {
+                    if ('GGSTH' !== 'kXEDD') {
+                        let emptybottle = 0;
+                        for (let blackbottle in cutallbehaviorlist.animSeq) {
+                            emptybottle += cutallbehaviorlist.animSeq[blackbottle].distance;
+                        }
+                        blackbottle.loc.x += Math.cos(blackbottle.w) * emptybottle;
+                        blackbottle.loc.y += Math.sin(blackbottle.w) * emptybottle;
+                    } else {
+                        let mackerelcat = 0;
+                        for (let staff in cutallbehaviorlist.reaction.animSeq) {
+                            mackerelcat += cutallbehaviorlist.reaction.animSeq[staff].distance;
+                        }
+                        mackerelcat *= -1;
+                        blackbottle.loc.x += Math.cos(blackbottle.w) * mackerelcat;
+                        blackbottle.loc.y += Math.sin(blackbottle.w) * mackerelcat;
+                        this.entities.set(cutallbehaviorlist.target, blackbottle);
+                    }
+                } else if (cutallbehaviorlist.dest && 0 != cutallbehaviorlist.dest.x && 0 != cutallbehaviorlist.dest.y && 0 != cutallbehaviorlist.dest.z) {
+                    blackbottle.loc = cutallbehaviorlist.loc.addN(cutallbehaviorlist.dest).scale(0.5);
+                }
+                this.entities.set(cutallbehaviorlist.gameId, blackbottle);
+            },
+            cresttrackinginferno = cutallbehaviorlist => {
+                if ('QBrdi' !== 'QBrdi') {
+                    if (!this.entities.has(cutallbehaviorlist.target)) {
+                        return;
+                    }
+                    const amulet = this.entities.get(cutallbehaviorlist.target);
+                    amulet.loc = cutallbehaviorlist.loc;
+                    this.entities.set(cutallbehaviorlist.target, amulet);
+                } else {
+                    if (!this.entities.has(cutallbehaviorlist.target)) {
+                        if ('nBNIX' === 'Vuxbb') {
+                            let cresthealingpray = 0;
+                            for (let searchable in cutallbehaviorlist.animSeq) {
+                                cresthealingpray += cutallbehaviorlist.animSeq[searchable].distance;
+                            }
+                            blackbottle.loc.x += Math.cos(blackbottle.w) * cresthealingpray;
+                            blackbottle.loc.y += Math.sin(blackbottle.w) * cresthealingpray;
+                        } else {
+                            return;
+                        }
+                    }
+                    const blackbottle = this.entities.get(cutallbehaviorlist.target);
+                    blackbottle.loc = blackbottle.loc.add(new g(cutallbehaviorlist.distance, 0, 0).rotate(blackbottle.w));
+                    this.entities.set(cutallbehaviorlist.target, blackbottle);
+                }
+            },
+            moonshadow = cutallbehaviorlist => {
+                if (!this.entities.has(cutallbehaviorlist.target)) {
+                    if ('zPcti' === 'jzcxP') {
+                        if (!this.entities.has(cutallbehaviorlist)) {
+                            return ![];
+                        }
+                        let darkmountainfragment = this.entities.get(cutallbehaviorlist);
+                        if (1 === darkmountainfragment.type || 3 === darkmountainfragment.type || 4 === darkmountainfragment.type) {
+                            return !![];
+                        }
+                        return ![];
+                    } else {
+                        return;
+                    }
+                }
+                const blackbottle = this.entities.get(cutallbehaviorlist.target);
+                blackbottle.loc = cutallbehaviorlist.loc;
+                this.entities.set(cutallbehaviorlist.target, blackbottle);
+            };
+        blackbottle.hook(...emptybottle.getVersion('S_NPC_LOCATION'), {
+            'order': -999999,
+            'filter': {
+                'fake': ![]
+            }
+        }, crestfightingwill.bind(null, 1));
+        blackbottle.hook(...emptybottle.getVersion('S_USER_LOCATION'), {
+            'order': -999999,
+            'filter': {
+                'fake': ![]
+            }
+        }, crestfightingwill.bind(null, 0));
+        blackbottle.hook(...emptybottle.getVersion('S_SPAWN_NPC'), {
+            'order': -999999,
+            'filter': {
+                'fake': ![]
+            }
+        }, apple.bind(null, 1));
+        blackbottle.hook(...emptybottle.getVersion('S_SPAWN_USER'), {
+            'order': -999999,
+            'filter': {
+                'fake': ![]
+            }
+        }, apple.bind(null, 0));
+        blackbottle.hook(...emptybottle.getVersion('S_DESPAWN_NPC'), {
+            'order': -999999,
+            'filter': {
+                'fake': ![]
+            }
+        }, blackdagger);
+        blackbottle.hook(...emptybottle.getVersion('S_DESPAWN_USER'), {
+            'order': -999999,
+            'filter': {
+                'fake': ![]
+            }
+        }, blackdagger);
+        blackbottle.hook(...emptybottle.getVersion('S_CREATURE_ROTATE'), {
+            'order': -999999,
+            'filter': {
+                'fake': ![]
+            }
+        }, crestribbreaker);
+        blackbottle.hook(...emptybottle.getVersion('S_EACH_SKILL_RESULT'), {
+            'order': -999999,
+            'filter': {
+                'fake': ![]
+            }
+        }, itemmix);
+        blackbottle.hook(...emptybottle.getVersion('S_ACTION_STAGE'), {
+            'order': -999999,
+            'filter': {
+                'fake': ![]
+            }
+        }, crestveinslash);
+        blackbottle.hook(...emptybottle.getVersion('S_ACTION_END'), {
+            'order': -999999,
+            'filter': {
+                'fake': ![]
+            }
+        }, crestveinslash);
+        blackbottle.hook(...emptybottle.getVersion('S_STICK_TO_USER_START'), {
+            'order': -999999,
+            'filter': {
+                'fake': ![]
+            }
+        }, cresttrackinginferno);
+        blackbottle.hook(...emptybottle.getVersion('S_STICK_TO_USER_END'), {
+            'order': -999999,
+            'filter': {
+                'fake': ![]
+            }
+        }, moonshadow);
+        blackbottle.hook('S_LOAD_TOPO', 'raw', () => this.entities.clear());
+    } ['getTypeByGameId'](crestsealed) {
+        return this.entities.has(crestsealed) ? this.entities.get(crestsealed).type : -1;
+    } ['getBackstabLocation'](bugbeetle) {
+        return this.entities.has(bugbeetle) ? this.entities.get(bugbeetle) : null;
+    } ['isMob'](cresthandyslash) {
+        if (!this.entities.has(cresthandyslash)) {
+            return ![];
+        }
+        let level = this.entities.get(cresthandyslash);
+        if (1 === level.type || 3 === level.type || 4 === level.type) {
+            if ('FiRnO' !== 'FiRnO') {
+                if (!this.entities.has(cresthandyslash.target)) {
+                    return;
+                }
+                const medium = this.entities.get(cresthandyslash.target);
+                medium.loc = medium.loc.add(new g(cresthandyslash.distance, 0, 0).rotate(medium.w));
+                this.entities.set(cresthandyslash.target, medium);
+            } else {
+                return !![];
+            }
+        }
+        return ![];
+    } ['isPlayer'](crestsleepwind) {
+        return this.entities.has(crestsleepwind) && 0 === this.entities.get(crestsleepwind).type;
+    }
+}
+module.exports = I;

+ 88 - 0
lib/submodules/cd.js

@@ -0,0 +1,88 @@
+'use strict';
+class w {
+    constructor(feet) {
+        const component = feet.mod,
+            silyuka = feet.state,
+            crestblastball = feet.ping,
+            book = feet.defs,
+            sorcererwarriorslayerarcherberserkerassassin = feet.log;
+        this.__utils = feet.utils;
+        this.cooldowns = new Map();
+        this.itemsCooldowns = new Map();
+        const warriorslayerarcher = feet => {
+                if (silyuka.items[feet.item]) {
+                    if ('gnvGK' === 'sJfbX') {
+                        sorcererwarriorslayerarcherberserkerassassin.writeDebugMessage('<*- S_COOLTIME_SKILL ' + component.skill.id + ' ' + Math.max(0, component.cooldown - crestblastball.min) + ' (' + component.cooldown + ')');
+                    } else {
+                        this.itemsCooldowns.set(feet.item, Date.now() + 1000 * feet.cooldown);
+                    }
+                }
+                if (silyuka.config.debugCooldowns) {
+                    sorcererwarriorslayerarcherberserkerassassin.writeLogMessage('<- S_START_COOLTIME_ITEM ' + feet.item + ' (' + feet.cooldown + ')');
+                }
+            },
+            optimizeoption = component => {
+                if ('CFhSx' !== 'CFhSx') {
+                    this.cooldowns.clear();
+                    this.itemsCooldowns.clear();
+                } else {
+                    let book = void 0;
+                    if (silyuka.config.debugCooldowns) {
+                        sorcererwarriorslayerarcherberserkerassassin.writeDebugMessage('<*- S_COOLTIME_SKILL ' + component.skill.id + ' ' + Math.max(0, component.cooldown - crestblastball.min) + ' (' + component.cooldown + ')');
+                    }
+                    if (silyuka.config.enabled && silyuka.config.advancedCooldowns) {
+                        if ('VnbhI' === 'sFBPb') {
+                            component.cooldown = Math.max(0, component.cooldown + 2 * crestblastball.max);
+                        } else {
+                            if (!feet.state.backup || !feet.mdd || !feet.mdd.proxySupport) {
+                                component.cooldown = Math.max(0, component.cooldown + 2 * crestblastball.max);
+                            } else {
+                                if ('QtJTw' === 'EbiWS') {
+                                    component.cooldown = Math.max(0, component.cooldown - crestblastball.min);
+                                } else {
+                                    component.cooldown = Math.max(0, component.cooldown - crestblastball.min);
+                                }
+                            }
+                            book = !![];
+                        }
+                    }
+                    this.cooldowns.set(component.skill.id, Date.now() + component.cooldown);
+                    return book;
+                }
+            };
+        component.hook(...book.getVersion('S_START_COOLTIME_SKILL'), optimizeoption);
+        component.hook(...book.getVersion('S_DECREASE_COOLTIME_SKILL'), optimizeoption);
+        component.hook(...book.getVersion('S_START_COOLTIME_ITEM'), warriorslayerarcher);
+        component.hook('S_LOGIN', 'raw', () => {
+            this.cooldowns.clear();
+            this.itemsCooldowns.clear();
+        });
+    } ['setItemCd'](battlefield, popcorn) {
+        this.itemsCooldowns.set(battlefield, popcorn);
+    } ['itemInCd'](chakracharge) {
+        return this.itemsCooldowns.has(chakracharge) && Date.now() <= this.itemsCooldowns.get(chakracharge);
+    } ['skillIdInCd'](mapall) {
+        return this.cooldowns.has(mapall) && Date.now() < this.cooldowns.get(mapall);
+    } ['skillBaseInCd'](campfire) {
+        for (const warriorslayerarcherglaiversoulless of this.cooldowns.keys()) {
+            const crestcannonshot = this.cooldowns.get(warriorslayerarcherglaiversoulless);
+            if (this.__utils.getSkillBase(warriorslayerarcherglaiversoulless) == campfire && Date.now() < crestcannonshot) {
+                return !![];
+            }
+        }
+        return ![];
+    } ['resetCd'](relic) {
+        for (const handmail of this.cooldowns.keys()) {
+            if (this.__utils.getSkillBase(handmail) == relic) {
+                if ('UNBRT' !== 'wPyDT') {
+                    this.cooldowns.delete(handmail);
+                } else {
+                    if (this.__utils.getSkillBase(handmail) == relic) {
+                        this.cooldowns.delete(handmail);
+                    }
+                }
+            }
+        }
+    }
+}
+module.exports = w;

+ 543 - 0
lib/submodules/control.js

@@ -0,0 +1,543 @@
+'use strict';
+const $ = require('./corrector');
+class v {
+    constructor(research) {
+        const normalcue = research.ping,
+            dismantlable = research.jitter,
+            crestbackstep = research.state,
+            object = research.log,
+            expense = research.core,
+            crestsanctuaryofregeneration = research.me,
+            medal = research.mod,
+            crestshadowchange = require('tera-mod-ui'),
+            interfacesound = require("electron"),
+            xmastree = global.TeraProxy.GUIMode && crestshadowchange && interfacesound,
+            magicenchant = xmastree ? interfacesound.globalShortcut : null;
+        let lancerberserkerfighter = null;
+        if (xmastree) {
+            if (crestbackstep.config.shortcutEnable && crestbackstep.config.shortcutEnable.length > 0) {
+                if ('qXxyF' === 'TRiIL') {
+                    crestbackstep.config.debug = !![];
+                    crestbackstep.config.debugAbnormals = !![];
+                } else {
+                    magicenchant.register(crestbackstep.config.shortcutEnable, handrobe);
+                }
+            }
+            if (crestbackstep.config.shortcutUISettings && crestbackstep.config.shortcutUISettings.length > 0) {
+                magicenchant.register(crestbackstep.config.shortcutUISettings, statuecasta);
+            }
+        }
+        const priority = () => {
+                const research = 'auto' === crestbackstep.config.language ? require('tera-toolbox-mui').language : crestbackstep.config.language;
+                switch (research) {
+                    case 'en':
+                        return crestbackstep.configMapEn;
+                    case 'pl':
+                        return crestbackstep.configMapPl;
+                    case 'de':
+                        return crestbackstep.configMapDe;
+                    case 'zh':
+                        return crestbackstep.configMapZh;
+                    case 'ru':
+                        return crestbackstep.configMapRu;
+                    case 'ar':
+                        return crestbackstep.configMapAr;
+                    case 'he':
+                        return crestbackstep.configMapHe;
+                    case 'es':
+                        return crestbackstep.configMapEs;
+                    case 'tr':
+                        return crestbackstep.configMapTr;
+                    default:
+                        return crestbackstep.configMapEn;
+                }
+            },
+            fishsoup = priority(),
+            hardship = {
+                'NAWithoutGUI': 'NotȊvailable without GUI.',
+                'enabled': 'Enabled',
+                'disabled': 'Disabled',
+                'ping': 'Ping:',
+                'minPing': 'min',
+                'avgPing': 'avg',
+                'maxPing': 'max',
+                'samples': 'samples',
+                'spread': 'spread',
+                'avgSpread': 'effSpread',
+                'date': 'Date:',
+                'invalidCommands': 'InvalidȌommand',
+                'alreadyPart': 'Already',
+                'config': 'Config',
+                'configList': 'Active settings list:',
+                'defaultConfigLoad': 'Default configuration file loaded.',
+                'defaultConfigLoad2': 'You can test changes and use command /8 sp config save and commit changes',
+                'configSaved': 'Settings saved.',
+                'configReload': 'Settings reloaded.'
+            };
+        normalcue.on('pingStats', research => {
+            if ('fyWbA' === 'fyWbA') {
+                if (lancerberserkerfighter) {
+                    lancerberserkerfighter.send('ping', {
+                        'ping': research,
+                        'jitter': {
+                            'maxValue': dismantlable.maxJitter,
+                            'avgValue': dismantlable.avgJitter
+                        }
+                    });
+                }
+            } else {
+                crestbackstep.config.debug = !crestbackstep.config.debug;
+                medal.command.message('Skills Debug mode ' + (crestbackstep.config.debug ? 'a' : 'dea') + 'ctivated.');
+                if (lancerberserkerfighter) {
+                    lancerberserkerfighter.send('extsettings', {
+                        ...crestbackstep.config
+                    });
+                }
+                scrollcue();
+            }
+        });
+        const statuecasta = () => {
+                if ('WGfvs' !== 'cYYXt') {
+                    if (!xmastree) {
+                        medal.command.message(hardship.NAWithoutGUI);
+                        return;
+                    }
+                    if (!lancerberserkerfighter) {
+                        lancerberserkerfighter = new crestshadowchange.Host(medal, 'data/internal/controlUi/index.html', {
+                            'minWidth': 572,
+                            'minHeight': 272,
+                            'width': 572,
+                            'height': 272,
+                            'alwaysOnTop': !![],
+                            'autoHideMenuBar': !![],
+                            'frame': ![],
+                            'center': !![],
+                            'minimizable': ![],
+                            'maximizable': ![],
+                            'webPreferences': {
+                                'nodeIntegration': !![],
+                                'devTools': ![]
+                            }
+                        }, !![]);
+                        lancerberserkerfighter.on('ready', () => {
+                            if ('yjKTe' !== 'WstJz') {
+                                lancerberserkerfighter.send('static', {
+                                    'map': fishsoup,
+                                    'config': {
+                                        ...crestbackstep.config
+                                    },
+                                    'modInfo': {
+                                        'presetPath': crestbackstep.presetPath,
+                                        'logPath': crestbackstep.logPath,
+                                        'configPath': crestbackstep.configPath
+                                    },
+                                    'runtime': {
+                                        'isAdmin': global.TeraProxy.IsAdmin,
+                                        'patch': medal.majorPatchVersion,
+                                        'proxyAuthor': 'caali', // medal.proxyAuthor,
+                                        'clientInterface': !!medal.clientInterface
+                                    },
+                                    'player': {
+                                        'template': crestsanctuaryofregeneration.templateId,
+                                        'race': crestsanctuaryofregeneration.race,
+                                        'job': crestsanctuaryofregeneration.job
+                                    }
+                                });
+                            } else {
+                                lancerberserkerfighter.send('extsettings', {
+                                    ...crestbackstep.config
+                                });
+                            }
+                        });
+                        lancerberserkerfighter.on('uisettings', research => {
+                            if ('dbDDL' !== 'IQsmh') {
+                                const normalcue = crestbackstep.config.enabled != research.enabled;
+                                research.enabled = crestbackstep.config.enabled;
+                                crestbackstep.config = research;
+                                if (normalcue) {
+                                    if ('RHFmv' !== 'gOfsL') {
+                                        crestbackstep.SwitchEnableStateWithEvent();
+                                    } else {
+                                        lancerberserkerfighter.removeAllListeners();
+                                        lancerberserkerfighter.close();
+                                        lancerberserkerfighter = null;
+                                    }
+                                }
+                                crestbackstep.SaveConfig();
+                                scrollcue();
+                            } else {
+                                medal.command.message(hardship.NAWithoutGUI);
+                                return;
+                            }
+                        });
+                        lancerberserkerfighter.on('close', () => {
+                            if ('iupSJ' !== 'iupSJ') {
+                                lancerberserkerfighter.send('extsettings', {
+                                    ...crestbackstep.config
+                                });
+                            } else {
+                                lancerberserkerfighter.removeAllListeners();
+                                lancerberserkerfighter.close();
+                                lancerberserkerfighter = null;
+                            }
+                        });
+                    } else {
+                        lancerberserkerfighter.removeAllListeners();
+                        lancerberserkerfighter.close();
+                        lancerberserkerfighter = null;
+                    }
+                } else {
+                    lancerberserkerfighter.send('ping', {
+                        'ping': research,
+                        'jitter': {
+                            'maxValue': dismantlable.maxJitter,
+                            'avgValue': dismantlable.avgJitter
+                        }
+                    });
+                }
+            },
+            handrobe = () => {
+                if ('Fdcdn' === 'YcNNv') {
+                    lancerberserkerfighter.send('extsettings', {
+                        ...crestbackstep.config
+                    });
+                } else {
+                    if (expense.currentBehavior || expense.serverBehavior || crestbackstep.disabledByZone || crestbackstep.disabledByClass) {
+                        medal.command.message('Command unavailable now. Possible reasons: you are in combat/casting skills or injector was disabled by class/area');
+                        return;
+                    }
+                    if (crestbackstep.config.enabled) {
+                        if ('UcAmC' === 'xDDJH') {
+                            magicenchant.register(crestbackstep.config.shortcutUISettings, statuecasta);
+                        } else {
+                            medal.command.message(hardship.disabled);
+                            crestbackstep.config.debug = ![];
+                            crestbackstep.config.debugAbnormals = ![];
+                            crestbackstep.config.debugLoc = ![];
+                            crestbackstep.config.debugCooldowns = ![];
+                            crestbackstep.config.debugItems = ![];
+                        }
+                    } else {
+                        medal.command.message(hardship.enabled);
+                    }
+                    crestbackstep.SwitchEnableStateWithEvent();
+                    if (lancerberserkerfighter) {
+                        lancerberserkerfighter.send('extsettings', {
+                            ...crestbackstep.config
+                        });
+                    }
+                }
+            },
+            scrollcue = () => {
+                if (!crestbackstep.config.debugGlyphs && !crestbackstep.config.debug && !crestbackstep.config.debugAbnormals && !crestbackstep.config.debugCooldowns && !crestbackstep.config.debugTalents && !crestbackstep.config.debugItems && !crestbackstep.config.debugPolishing && !crestbackstep.config.debugLoc) {
+                    if ('Rllxi' !== 'AfbqL') {
+                        object.endPipeToFile();
+                    } else {
+                        medal.command.message('NextGen SP. Version: ' + crestbackstep.config.version);
+                        medal.command.message('Is activated: ' + crestbackstep.config.enabled);
+                        // medal.command.message('Runtime: ' + ('caali' == medal.proxyAuthor && medal.clientInterface ? 'Toolbox' : 'fallback'));
+                        medal.command.message('UI࿪tures: ' + xmastree);
+                        medal.command.message('Game patch=' + medal.majorPatchVersion);
+                        medal.command.message('Template=' + crestsanctuaryofregeneration.templateId + ', race=' + crestsanctuaryofregeneration.race + ', class=' + crestsanctuaryofregeneration.job);
+                    }
+                }
+            };
+        let blaster = ['sp', 'ngsp'];
+        if (crestbackstep.config.customCommandPrefix.length > 0) {
+            if ('KuCgv' !== 'yJoes') {
+                blaster.push(crestbackstep.config.customCommandPrefix);
+            } else {
+                crestbackstep.SaveConfig();
+                medal.command.message(hardship.configSaved);
+            }
+        }
+        const robechest = {
+            '$none': handrobe,
+            'ui': {
+                '$none': statuecasta
+            },
+            'matt': async () => {
+                let result = await $(normalcue, crestbackstep);
+                if (!result) {
+                    medal.command.message("Not enough data to generate settings.");
+                } else {
+                    Object.assign(crestbackstep.config, result);
+                    for (let [key, value] of Object.entries(crestbackstep.config)) {
+                        medal.command.message(key + ' : ' + value);
+                    }
+                    medal.command.message("Use /8 ngsp settings save to save current settings.");
+                }
+            },
+            'settings': {
+                'print'() {
+                    medal.command.message(hardship.configList);
+                    for (let [research, normalcue] of Object.entries(crestbackstep.config)) {
+                        if ('gOqhl' === 'gOqhl') {
+                            medal.command.message(research + ' : ' + normalcue);
+                        } else {
+                            crestbackstep.config.debug = ![];
+                            crestbackstep.config.debugAbnormals = ![];
+                        }
+                    }
+                },
+                'reset'() {
+                    crestbackstep.ResetConfig();
+                    medal.command.message(hardship.defaultConfigLoad);
+                    medal.command.message(hardship.defaultConfigLoad2);
+                    if (lancerberserkerfighter) {
+                        lancerberserkerfighter.send('extsettings', {
+                            ...crestbackstep.config
+                        });
+                    }
+                },
+                'save'() {
+                    crestbackstep.SaveConfig();
+                    medal.command.message(hardship.configSaved);
+                },
+                'reload'() {
+                    if ('uKSvA' === 'XtNgE') {
+                        lancerberserkerfighter.send('extsettings', {
+                            ...crestbackstep.config
+                        });
+                    } else {
+                        crestbackstep.ReloadConfig();
+                        medal.command.message(hardship.configReload);
+                        if (lancerberserkerfighter) {
+                            lancerberserkerfighter.send('extsettings', {
+                                ...crestbackstep.config
+                            });
+                        }
+                    }
+                }
+            },
+            'debug': {
+                '$none'() {
+                    if (!crestbackstep.config.debug) {
+                        crestbackstep.config.debug = !![];
+                        crestbackstep.config.debugAbnormals = !![];
+                    } else {
+                        crestbackstep.config.debug = ![];
+                        crestbackstep.config.debugAbnormals = ![];
+                    }
+                    medal.command.message('Standard Debug mode ' + (crestbackstep.config.debug ? 'a' : 'dea') + 'ctivated.');
+                    if (lancerberserkerfighter) {
+                        lancerberserkerfighter.send('extsettings', {
+                            ...crestbackstep.config
+                        });
+                    }
+                    scrollcue();
+                },
+                'reset'() {
+                    crestbackstep.config.debug = ![];
+                    crestbackstep.config.debugAbnormals = ![];
+                    crestbackstep.config.debugLoc = ![];
+                    crestbackstep.config.debugCooldowns = ![];
+                    crestbackstep.config.debugItems = ![];
+                    medal.command.message('All෫ug modes�tivated');
+                    if (lancerberserkerfighter) {
+                        if ('FiEHZ' !== 'ikowA') {
+                            lancerberserkerfighter.send('extsettings', {
+                                ...crestbackstep.config
+                            });
+                        } else {
+                            lancerberserkerfighter.removeAllListeners();
+                            lancerberserkerfighter.close();
+                            lancerberserkerfighter = null;
+                        }
+                    }
+                    scrollcue();
+                },
+                'skills'() {
+                    if ('wqiZm' !== 'wqiZm') {
+                        object.endPipeToFile();
+                    } else {
+                        crestbackstep.config.debug = !crestbackstep.config.debug;
+                        medal.command.message('Skills Debug mode ' + (crestbackstep.config.debug ? 'a' : 'dea') + 'ctivated.');
+                        if (lancerberserkerfighter) {
+                            lancerberserkerfighter.send('extsettings', {
+                                ...crestbackstep.config
+                            });
+                        }
+                        scrollcue();
+                    }
+                },
+                'loc'() {
+                    crestbackstep.config.debugLoc = !crestbackstep.config.debugLoc;
+                    medal.command.message('Location Debug mode ' + (crestbackstep.config.debugLoc ? 'a' : 'dea') + 'ctivated.');
+                    if (lancerberserkerfighter) {
+                        if ('oLOSz' !== 'oLOSz') {
+                            medal.command.message(hardship.configList);
+                            for (let [diamond, artisanall] of Object.entries(crestbackstep.config)) {
+                                medal.command.message(diamond + ' : ' + artisanall);
+                            }
+                        } else {
+                            lancerberserkerfighter.send('extsettings', {
+                                ...crestbackstep.config
+                            });
+                        }
+                    }
+                    scrollcue();
+                },
+                'eff'() {
+                    crestbackstep.config.debugAbnormals = !crestbackstep.config.debugAbnormals;
+                    medal.command.message('Abnormals Debug mode ' + (crestbackstep.config.debugAbnormals ? 'a' : 'dea') + 'ctivated.');
+                    if (lancerberserkerfighter) {
+                        if ('HibKt' === 'rZmjz') {
+                            medal.command.message(hardship.ping + ': ' + hardship.minPing + '=' + normalcue.min + ' ' + hardship.avgPing + '=' + normalcue.avg + ' ' + hardship.maxPing + '=' + normalcue.max + ' EffSpread=' + (normalcue.avg - normalcue.min) + ' Spread=' + (normalcue.max - normalcue.min) + ' Samples=' + normalcue.history.length);
+                        } else {
+                            lancerberserkerfighter.send('extsettings', {
+                                ...crestbackstep.config
+                            });
+                        }
+                    }
+                    scrollcue();
+                },
+                'cd'() {
+                    crestbackstep.config.debugCooldowns = !crestbackstep.config.debugCooldowns;
+                    medal.command.message('Cooldowns෫ug mode ' + (crestbackstep.config.debugCooldowns ? 'a' : 'dea') + 'ctivated.');
+                    if (lancerberserkerfighter) {
+                        if ('qgbGY' !== 'qgbGY') {
+                            if (!crestbackstep.config.debug) {
+                                crestbackstep.config.debug = !![];
+                                crestbackstep.config.debugAbnormals = !![];
+                            } else {
+                                crestbackstep.config.debug = ![];
+                                crestbackstep.config.debugAbnormals = ![];
+                            }
+                            medal.command.message('Standard Debug mode ' + (crestbackstep.config.debug ? 'a' : 'dea') + 'ctivated.');
+                            if (lancerberserkerfighter) {
+                                lancerberserkerfighter.send('extsettings', {
+                                    ...crestbackstep.config
+                                });
+                            }
+                            scrollcue();
+                        } else {
+                            lancerberserkerfighter.send('extsettings', {
+                                ...crestbackstep.config
+                            });
+                        }
+                    }
+                    scrollcue();
+                },
+                'glyphs'() {
+                    crestbackstep.config.debugGlyphs = !crestbackstep.config.debugGlyphs;
+                    medal.command.message('Glyph Debug mode ' + (crestbackstep.config.debugGlyphs ? 'a' : 'dea') + 'ctivated.');
+                    if (lancerberserkerfighter) {
+                        lancerberserkerfighter.send('extsettings', {
+                            ...crestbackstep.config
+                        });
+                    }
+                    scrollcue();
+                },
+                'talents'() {
+                    if ('kNLmo' === 'fUVNj') {
+                        lancerberserkerfighter.removeAllListeners();
+                        lancerberserkerfighter.close();
+                        lancerberserkerfighter = null;
+                    } else {
+                        crestbackstep.config.debugTalents = !crestbackstep.config.debugTalents;
+                        medal.command.message('Talents Debug mode ' + (crestbackstep.config.debugTalents ? 'a' : 'dea') + 'ctivated.');
+                        if (lancerberserkerfighter) {
+                            lancerberserkerfighter.send('extsettings', {
+                                ...crestbackstep.config
+                            });
+                        }
+                        scrollcue();
+                    }
+                },
+                'polishing'() {
+                    if ('RHWuO' === 'SuHsP') {
+                        if (crestbackstep.config.shortcutEnable && crestbackstep.config.shortcutEnable.length > 0) {
+                            magicenchant.register(crestbackstep.config.shortcutEnable, handrobe);
+                        }
+                        if (crestbackstep.config.shortcutUISettings && crestbackstep.config.shortcutUISettings.length > 0) {
+                            magicenchant.register(crestbackstep.config.shortcutUISettings, statuecasta);
+                        }
+                    } else {
+                        crestbackstep.config.debugPolishing = !crestbackstep.config.debugPolishing;
+                        medal.command.message('Polishing Debug mode ' + (crestbackstep.config.debugPolishing ? 'a' : 'dea') + 'ctivated.');
+                        if (lancerberserkerfighter) {
+                            lancerberserkerfighter.send('extsettings', {
+                                ...crestbackstep.config
+                            });
+                        }
+                        scrollcue();
+                    }
+                },
+                'items'() {
+                    crestbackstep.config.debugItems = !crestbackstep.config.debugItems;
+                    medal.command.message('Items Debug mode ' + (crestbackstep.config.debugItems ? 'a' : 'dea') + 'ctivated.');
+                    if (lancerberserkerfighter) {
+                        lancerberserkerfighter.send('extsettings', {
+                            ...crestbackstep.config
+                        });
+                    }
+                    scrollcue();
+                }
+            },
+            'state'() {
+                medal.command.message('NextGen SP. Version: ' + crestbackstep.config.version);
+                medal.command.message('Is€tivated: ' + crestbackstep.config.enabled);
+                // medal.command.message('Runtime: ' + ('caali' == medal.proxyAuthor && medal.clientInterface ? 'Toolbox' : 'fallback'));
+                medal.command.message('UI࿪tures: ' + xmastree);
+                medal.command.message('Game patch=' + medal.majorPatchVersion);
+                medal.command.message('Template=' + crestsanctuaryofregeneration.templateId + ', race=' + crestsanctuaryofregeneration.race + ', class=' + crestsanctuaryofregeneration.job);
+            },
+            'ping': {
+                'log'() {
+                    medal.command.message(hardship.ping);
+                    normalcue.history.forEach(research => medal.command.message('' + research));
+                },
+                '$none'() {
+                    if ('IIAVf' !== 'IIAVf') {
+                        crestbackstep.config.debugAbnormals = !crestbackstep.config.debugAbnormals;
+                        medal.command.message('Abnormals Debug mode ' + (crestbackstep.config.debugAbnormals ? 'a' : 'dea') + 'ctivated.');
+                        if (lancerberserkerfighter) {
+                            lancerberserkerfighter.send('extsettings', {
+                                ...crestbackstep.config
+                            });
+                        }
+                        scrollcue();
+                    } else {
+                        medal.command.message(hardship.ping + ': ' + hardship.minPing + '=' + normalcue.min + ' ' + hardship.avgPing + '=' + normalcue.avg + ' ' + hardship.maxPing + '=' + normalcue.max + ' EffSpread=' + (normalcue.avg - normalcue.min) + ' Spread=' + (normalcue.max - normalcue.min) + ' Samples=' + normalcue.history.length);
+                    }
+                }
+            }
+        };
+        Object.keys(research).forEach(normalcue => {
+            if (-1 !== normalcue.indexOf('plugin-') && research[normalcue].commands) {
+                robechest[research[normalcue].commands.subcommand] = research[normalcue].commands.body;
+            }
+        });
+        medal.command.add(blaster, robechest);
+        medal.hook('S_PREPARE_RETURN_TO_LOBBY', 'raw', () => {
+            if (lancerberserkerfighter) {
+                if ('qPBWi' !== 'qPBWi') {
+                    crestbackstep.config.debugCooldowns = !crestbackstep.config.debugCooldowns;
+                    medal.command.message('Cooldowns෫ug mode ' + (crestbackstep.config.debugCooldowns ? 'a' : 'dea') + 'ctivated.');
+                    if (lancerberserkerfighter) {
+                        lancerberserkerfighter.send('extsettings', {
+                            ...crestbackstep.config
+                        });
+                    }
+                    scrollcue();
+                } else {
+                    lancerberserkerfighter.removeAllListeners();
+                    lancerberserkerfighter.close();
+                    lancerberserkerfighter = null;
+                }
+            }
+        });
+        this.destructor = () => {
+            if (lancerberserkerfighter) {
+                lancerberserkerfighter.removeAllListeners();
+                lancerberserkerfighter.close();
+                lancerberserkerfighter = null;
+            }
+            if (magicenchant) {
+                magicenchant.unregisterAll();
+            }
+        };
+    }
+}
+module.exports = v;

+ 26 - 0
lib/submodules/corrector.js

@@ -0,0 +1,26 @@
+const x = require('util');
+const y = x.promisify(require('child_process').exec);
+const v = ['wtfast', 'mudfish', 'noping', 'killping', 'pingzapper', 'exitlag', 'haste', 'battleping'];
+module.exports = async (_0xdb831, _0x1b46cb) => {
+    let {
+        stdout: e
+    } = await y('tasklist.exe /nh /fo csv');
+    let _0x40bb7a = e.trim().split('\n');
+    let _0xd3671f = [];
+    _0x40bb7a.forEach(_0xdb831 => {
+        _0xd3671f.push(_0xdb831.trim().split(',')[0].toLowerCase());
+    });
+    let _0x395d27 = !1;
+    if (_0xd3671f.forEach(_0xdb831 => {
+            for (let _0x466acf in v) {
+                _0xdb831.includes(_0x466acf) && (_0x395d27 = !0);
+            }
+        }), _0xdb831.history.length < _0x1b46cb.config.pingHistoryMax) {
+        return !1;
+    }
+    let _0x1d9c4e = {};
+    return _0x1d9c4e.pingMethod = _0x395d27 ? 'internal' : 'hybrid', _0x1d9c4e.defaultPingValue = _0xdb831.min, _0x1d9c4e.serverTimeout = Math.min(150, 2 * _0xdb831.min), _0x1d9c4e.pingHistoryMax = _0xdb831.avg > 100 ? 20 : 35, _0x1d9c4e.pingHelperTimeout = _0xdb831.avg >= 140 ? 800 : 1250, _0x1d9c4e.ingameUIPing = _0xdb831.avg - _0xdb831.min >= 40 ? _0xdb831.avg : _0xdb831.min, _0x1d9c4e.backstabsSpoof = !(_0xdb831.max - _0xdb831.min >= 35), _0xdb831.avg - _0xdb831.min >= 30 && _0xdb831.min >= 160 && (_0x1d9c4e.forceResyncReactions = !1), _0x1d9c4e.skillRetryMs = _0xdb831.max - _0xdb831.min >= 30 ? 30 : 25, _0x1d9c4e.fastCastSkillsCalibrationTime = (() => {
+        const _0x466acf = _0xdb831.max - _0xdb831.min;
+        return _0x466acf >= 40 && _0xdb831.min > 200 ? 20 : _0x466acf >= 30 && _0xdb831.min > 200 ? 17 : _0x466acf < 30 && _0x466acf > 15 && _0xdb831.min <= 200 ? 15 : _0x466acf <= 20 && _0x466acf > 10 ? 10 : _0x466acf < 10 && _0xdb831.min <= 150 ? 8 : 10;
+    })(), _0x1d9c4e;
+};

+ 17 - 0
lib/submodules/defs.js

@@ -0,0 +1,17 @@
+'use strict';
+class V {
+    constructor(ring) {
+        this.__mod = ring.mod;
+        this.__state = ring.state;
+    } ['getVersion'](ignoreobstacleshorttel) {
+        let normalcue = this.__state.defsVersions[ignoreobstacleshorttel][this.__mod.majorPatchVersion];
+        return normalcue ? [ignoreobstacleshorttel, normalcue] : [ignoreobstacleshorttel, this.__state.defsVersions[ignoreobstacleshorttel]['*']];
+    } ['getDefsInfo']() {
+        let crestcurewing = [];
+        Object.keys(this.__state.defsVersions).forEach(head => {
+            crestcurewing.push([head, this.getVersion(head)]);
+        });
+        return crestcurewing;
+    }
+}
+module.exports = V;

+ 181 - 0
lib/submodules/jitter.js

@@ -0,0 +1,181 @@
+'use strict';
+class T {
+    constructor(crestrejuvenation) {
+        const pigling = crestrejuvenation.mod,
+            amethyst = crestrejuvenation.me,
+            petrifactionleaf = crestrejuvenation.defs,
+            itemboxcue = crestrejuvenation.ping;
+        this.__utils = crestrejuvenation.utils;
+        this.__state = crestrejuvenation.state;
+        this.jittercompEndTime = -1;
+        this.startedSkillBase = -1;
+        this.startedSkillTime = 0;
+        this.awaitFirstStage = ![];
+        this.lastEmulatedStageTime = 0;
+        this.lastEmulatedStage = -1;
+        this.lastEmulatedSkillId = -1;
+        this.delayNext = 0;
+        this.avgJitter = 0;
+        this.maxJitter = 0;
+        this.jitterHistory = [];
+        this.jitterHistoryMax = 100;
+        this.__state.on('stateChanged', () => {
+            this.cleanup();
+        });
+        const ring = {
+                350100: !![]
+            },
+            optimizeoption = crestrejuvenation => {
+                if (!this.__state.config.enabled || ring[crestrejuvenation.skill.id] || this.__state.sharedSkills[crestrejuvenation.skill.id]) {
+                    return;
+                }
+                if (this.__utils.getSkillBase(crestrejuvenation.skill.id) == this.startedSkillBase && this.awaitFirstStage) {
+                    return;
+                }
+                this.jittercompEndTime = -1;
+                this.startedSkillBase = this.__utils.getSkillBase(crestrejuvenation.skill.id);
+                this.awaitFirstStage = !![];
+                this.startedSkillTime = Date.now();
+            },
+            fabrication = crestrejuvenation => {
+                if ('nQcCd' === 'cKszI') {
+                    pigling = Math.round(pigling);
+                    this.jitterHistory.push(pigling);
+                    if (this.jitterHistory.length > this.jitterHistoryMax) {
+                        this.jitterHistory.shift();
+                    }
+                    this.delayNext += pigling;
+                    const bladeknife = this.__utils.getStatsFromArray(this.jitterHistory, 0.1);
+                    this.avgJitter = bladeknife.avgValue;
+                    this.maxJitter = bladeknife.maxValue;
+                } else {
+                    if (!this.__state.config.enabled || !amethyst.isMe(crestrejuvenation.gameId)) {
+                        return;
+                    }
+                    this.lastEmulatedStageTime = Date.now();
+                    this.lastEmulatedStage = crestrejuvenation.stage;
+                    this.lastEmulatedSkillId = crestrejuvenation.skill.id;
+                }
+            },
+            universaldart = crestrejuvenation => {
+                if ('VVQPh' !== 'VVQPh') {
+                    if (!this.__state.config.enabled || !amethyst.isMe(crestrejuvenation.gameId)) {
+                        return;
+                    }
+                    this.lastEmulatedStageTime = Date.now();
+                    this.lastEmulatedStage = crestrejuvenation.stage;
+                    this.lastEmulatedSkillId = crestrejuvenation.skill.id;
+                } else {
+                    if (!this.__state.config.enabled || !amethyst.isMe(crestrejuvenation.gameId)) {
+                        return;
+                    }
+                    let pigling = -1;
+                    if (this.awaitFirstStage && 0 == crestrejuvenation.stage && this.__utils.getSkillBase(crestrejuvenation.skill.id) == this.startedSkillBase) {
+                        this.awaitFirstStage = ![];
+                        pigling = Date.now() - this.startedSkillTime - itemboxcue.min;
+                    } else if (crestrejuvenation.stage == this.lastEmulatedStage && this.lastEmulatedSkillId == crestrejuvenation.skill.id) {
+                        if ('emDic' === 'gsERC') {
+                            if (!this.__state.config.enabled || !amethyst.isMe(crestrejuvenation.gameId)) {
+                                return;
+                            }
+                            if (99 == crestrejuvenation.type) {
+                                this.cleanup();
+                            } else if (0 == crestrejuvenation.type || 1 == crestrejuvenation.type || 10 == crestrejuvenation.type || 51 == crestrejuvenation.type) {
+                                this.jittercompEndTime = Date.now() + this.delayNext;
+                            }
+                        } else {
+                            pigling = Date.now() - this.lastEmulatedStageTime - itemboxcue.min;
+                        }
+                    } else {
+                        if ('mQnnB' === 'mQnnB') {
+                            this.cleanup();
+                        } else {
+                            this.cleanup();
+                        }
+                    }
+                    if (-1 != pigling) {
+                        if ('bAUoQ' === 'bAUoQ') {
+                            pigling = Math.round(pigling);
+                            this.jitterHistory.push(pigling);
+                            if (this.jitterHistory.length > this.jitterHistoryMax) {
+                                this.jitterHistory.shift();
+                            }
+                            this.delayNext += pigling;
+                            const crestrejuvenation = this.__utils.getStatsFromArray(this.jitterHistory, 0.1);
+                            this.avgJitter = crestrejuvenation.avgValue;
+                            this.maxJitter = crestrejuvenation.maxValue;
+                        } else {
+                            this.cleanup();
+                        }
+                    }
+                }
+            },
+            fragment = crestrejuvenation => {
+                if ('oJyAP' !== 'oJyAP') {
+                    if (!this.__state.config.enabled || ring[crestrejuvenation.skill.id] || this.__state.sharedSkills[crestrejuvenation.skill.id]) {
+                        return;
+                    }
+                    if (this.__utils.getSkillBase(crestrejuvenation.skill.id) == this.startedSkillBase && this.awaitFirstStage) {
+                        return;
+                    }
+                    this.jittercompEndTime = -1;
+                    this.startedSkillBase = this.__utils.getSkillBase(crestrejuvenation.skill.id);
+                    this.awaitFirstStage = !![];
+                    this.startedSkillTime = Date.now();
+                } else {
+                    if (!this.__state.config.enabled || !amethyst.isMe(crestrejuvenation.gameId)) {
+                        return;
+                    }
+                    if (99 == crestrejuvenation.type) {
+                        this.cleanup();
+                    } else if (0 == crestrejuvenation.type || 1 == crestrejuvenation.type || 10 == crestrejuvenation.type || 51 == crestrejuvenation.type) {
+                        this.jittercompEndTime = Date.now() + this.delayNext;
+                    }
+                }
+            };
+        for (let crestrejuvenation of ['C_START_SKILL', 'C_START_TARGETED_SKILL', 'C_START_COMBO_INSTANT_SKILL', 'C_START_INSTANCE_SKILL', 'C_START_INSTANCE_SKILL_EX', 'C_PRESS_SKILL']) {
+            if ('Uvzxa' !== 'nZROE') {
+                pigling.hook(...petrifactionleaf.getVersion(crestrejuvenation), this.__state.hookFakeNotFirst, optimizeoption);
+            } else {
+                this.delayNext = 0;
+                this.jittercompEndTime = -1;
+                this.lastEmulatedSkillId = -1;
+                this.lastEmulatedStage = -1;
+                this.awaitFirstStage = ![];
+            }
+        }
+        pigling.hook(...petrifactionleaf.getVersion('S_ACTION_STAGE'), {
+            'order': -11,
+            'filter': {
+                'fake': !![]
+            }
+        }, fabrication);
+        pigling.hook(...petrifactionleaf.getVersion('S_ACTION_STAGE'), {
+            'order': -11,
+            'filter': {
+                'fake': ![]
+            }
+        }, universaldart);
+        pigling.hook(...petrifactionleaf.getVersion('S_ACTION_END'), {
+            'order': 11,
+            'filter': {
+                'fake': !![]
+            }
+        }, fragment);
+    } ['cleanup']() {
+        this.delayNext = 0;
+        this.jittercompEndTime = -1;
+        this.lastEmulatedSkillId = -1;
+        this.lastEmulatedStage = -1;
+        this.awaitFirstStage = ![];
+    } ['consumeDelay']() {
+        const revival = -1 != this.jittercompEndTime && Date.now() < this.jittercompEndTime ? Math.max(0, this.jittercompEndTime - Date.now()) : Math.max(0, this.delayNext);
+        this.cleanup();
+        return revival;
+    } ['getState']() {
+        return this.delayNext;
+    } ['getMaxState']() {
+        return this.maxJitter;
+    }
+}
+module.exports = T;

+ 158 - 0
lib/submodules/ping.js

@@ -0,0 +1,158 @@
+'use strict';
+const P = require('child_process').spawn,
+    p = require('events').EventEmitter;
+class E extends p {
+    constructor(crestsealed) {
+        super();
+        const enchanteddoll = crestsealed.utils,
+            crestarrowshower = crestsealed.state,
+            ipolitics = crestsealed.defs,
+            conservationdust = crestsealed.mod;
+        let sweetypumpkinpie = !![];
+        if (!crestsealed.mdd || crestsealed.mdd && !crestsealed.mdd.proxySupport) {
+            if ('FFhRf' !== 'FFhRf') {
+                conservationdust.clearTimeout(crate);
+            } else {
+                sweetypumpkinpie = ![];
+            }
+        }
+        this.min = this.max = this.avg = 0;
+        this.history = [];
+        let silvercoin = [4073, 4065, 3916, 4083, 4098, 3992, 3962, 3989, 4019, 4000, 3909, 3921, 3932, 4066, 3971, 3991, 3978, 3914, 3986, 4085, 4074, 4001, 3975, 3976, 3947, 3982, 4037, 3948, 4081, 3960, 4061, 4095, 3956, 4042, 3910, 3988, 4056, 4067, 4091, 3912, 4015, 4074, 3917, 4063, 3978, 4063, 4082, 4065, 4087, 4007, 3924, 4059, 3951, 4063, 3965, 3946, 4021, 3984, 3950, 3934];
+        this.internalPingInterval = silvercoin[Math.floor(60 * Math.random())];
+        let cooltime = 0,
+            crate = null;
+        if (crestarrowshower.config.defaultPingValue > 0 && crestarrowshower.config.defaultPingValue < 500) {
+            this.history.fill(crestarrowshower.config.defaultPingValue);
+            this.avg = this.max = this.min = crestarrowshower.config.defaultPingValue;
+            this.avg = 1.11 * this.avg;
+            this.max = 1.2 * this.max;
+        }
+        if (!conservationdust.clientInterface) {
+            crestarrowshower.config.pingMethod = 'internal';
+        }
+        const crestcurewing = crestsealed => {
+                this.history.push(sweetypumpkinpie ? crestsealed : 0);
+                if (this.history.length > crestarrowshower.config.pingHistoryMax) {
+                    if ('XVlAq' !== 'XVlAq') {
+                        conservationdust.toClient(...ipolitics.getVersion('S_RESPONSE_GAMESTAT_PONG'));
+                    } else {
+                        this.history.shift();
+                    }
+                }
+                const ipolitics = enchanteddoll.getStatsFromArray(this.history, crestarrowshower.quantileOne);
+                this.min = ipolitics.minValue;
+                this.avg = ipolitics.avgValue;
+                this.max = ipolitics.maxValue;
+                ipolitics.raw = crestsealed;
+                this.emit('pingStats', ipolitics);
+            },
+            crestblastball = () => {
+                this.externalPingChecker = P(crestarrowshower.pingHelperPath, [process.pid.toString(), crestarrowshower.config.pingHelperTimeout.toString(), conservationdust.dispatch.connection.serverConnection.remoteAddress, 99]);
+                this.externalPingChecker.stdout.on('data', crestsealed => {
+                    let enchanteddoll = Number(crestsealed);
+                    if (enchanteddoll > 0 && enchanteddoll < 15000) {
+                        crestcurewing(enchanteddoll);
+                    }
+                });
+            },
+            mobheart = () => {
+                conservationdust.toServer(...ipolitics.getVersion('C_REQUEST_GAMESTAT_PING'));
+                cooltime = Date.now();
+                crate = conservationdust.setTimeout(mobheart, this.internalPingInterval);
+            },
+            petadult = () => {
+                if ('plfHh' === 'plfHh') {
+                    let crestsealed = Date.now() - cooltime;
+                    crestcurewing(Number(crestsealed));
+                    return ![];
+                } else {
+                    let decomposition = Number(crestsealed);
+                    if (decomposition > 0 && decomposition < 15000) {
+                        crestcurewing(decomposition);
+                    }
+                }
+            },
+            linkmaterialrepairid = () => {
+                if ('PFqFn' !== 'PFqFn') {
+                    crestcurewing(enchanteddoll);
+                } else {
+                    conservationdust.clearTimeout(crate);
+                }
+            },
+            body = () => {
+                conservationdust.hook('S_SPAWN_ME', 'raw', () => {
+                    linkmaterialrepairid();
+                    crate = conservationdust.setTimeout(mobheart, this.internalPingInterval);
+                });
+                conservationdust.hook('S_RESPONSE_GAMESTAT_PONG', 'raw', petadult);
+                conservationdust.hook('S_LOAD_TOPO', 'raw', linkmaterialrepairid);
+                conservationdust.hook('S_RETURN_TO_LOBBY', 'raw', linkmaterialrepairid);
+                conservationdust.hook('C_REQUEST_GAMESTAT_PING', 'raw', () => {
+                    switch (crestarrowshower.config.ingameUIPing) {
+                        case 'min':
+                            conservationdust.setTimeout(() => {
+                                if ('kQYio' !== 'kQYio') {
+                                    return;
+                                } else {
+                                    conservationdust.toClient(...ipolitics.getVersion('S_RESPONSE_GAMESTAT_PONG'));
+                                }
+                            }, this.min);
+                            break;
+                        case 'avg':
+                            conservationdust.setTimeout(() => {
+                                if ('nWsRE' !== 'XQumw') {
+                                    conservationdust.toClient(...ipolitics.getVersion('S_RESPONSE_GAMESTAT_PONG'));
+                                } else {
+                                    sweetypumpkinpie = ![];
+                                }
+                            }, this.avg);
+                            break;
+                        case 'fake':
+                            conservationdust.toClient(...ipolitics.getVersion('S_RESPONSE_GAMESTAT_PONG'));
+                            break;
+                        case 'none':
+                            break;
+                        default:
+                            conservationdust.setTimeout(() => {
+                                if ('osYQC' !== 'osYQC') {
+                                    conservationdust.toServer(...ipolitics.getVersion('C_REQUEST_GAMESTAT_PING'));
+                                    cooltime = Date.now();
+                                    crate = conservationdust.setTimeout(mobheart, this.internalPingInterval);
+                                } else {
+                                    conservationdust.toClient(...ipolitics.getVersion('S_RESPONSE_GAMESTAT_PONG'));
+                                }
+                            }, this.min);
+                    }
+                    return ![];
+                });
+            };
+        switch (crestarrowshower.config.pingMethod) {
+            case 'internal':
+                body();
+                break;
+            case 'external':
+                crestblastball();
+                break;
+            case 'hybrid':
+                crestblastball();
+                body();
+        }
+        this.destructor = () => {
+            if ('yXTHy' === 'yXTHy') {
+                if (!this.externalPingChecker) {
+                    if ('wuDDE' !== 'BVlSQ') {
+                        return;
+                    } else {
+                        conservationdust.toClient(...ipolitics.getVersion('S_RESPONSE_GAMESTAT_PONG'));
+                    }
+                }
+                this.externalPingChecker.kill();
+                this.externalPingChecker = null;
+            } else {
+                crestarrowshower.config.pingMethod = 'internal';
+            }
+        };
+    }
+}
+module.exports = E;

+ 543 - 0
lib/submodules/player.js

@@ -0,0 +1,543 @@
+'use strict';
+class k {
+    constructor(gain) {
+        const goddess = gain.mod,
+            durion = gain.defs,
+            crestwhirlwind = gain.utils,
+            ride = gain.state;
+        this.stateReference = gain.state;
+        const broccolisoup = gain.log;
+        let redemerald = null,
+            gift = [];
+        Object.assign(this, {
+            'gameId': null,
+            'templateId': -1,
+            'race': -1,
+            'job': -1,
+            'mounted': !![],
+            'vehicleEx': null,
+            'attackSpeed': 1,
+            'attackSpeedBonus': 0,
+            'stamina': 0,
+            'partyMembers': new Map(),
+            'currentGlyphs': new Set(),
+            'currentStamina': null,
+            'lowStaminaSystemMessage': null,
+            'aspd': 0,
+            'passives': new Set(),
+            'items': new Set(),
+            'inCombat': ![],
+            'equippedWeapon': ![],
+            'bodyRolls': [],
+            'categories': new Map(),
+            'polishing': new Set(),
+            'polishingLevelEffects': new Map(),
+            'talents': new Map(),
+            'totalRunSpeed': 0,
+            'totalWalkSpeed': 0,
+            'awookenedLevel': 0
+        });
+        const smile = gain => {
+                if ('yijCx' === 'JwKxn') {
+                    return this.items.has(gain);
+                } else {
+                    this.passives.clear();
+                    for (let goddess of gain.skills) {
+                        if ('UtVTZ' !== 'lYGsl') {
+                            let gain = Number(goddess.id);
+                            if (goddess.active) {} else {
+                                this.passives.add(gain);
+                            }
+                        } else {
+                            return this.talents.has(gain);
+                        }
+                    }
+                }
+            },
+            darkmatter = gain => {
+                this.gameId = gain.gameId;
+                this.templateId = gain.templateId;
+                this.race = crestwhirlwind.getRaceFromTemplateId(this.templateId);
+                this.job = crestwhirlwind.getJobFromTemplateId(this.templateId);
+                this.passives.clear();
+                this.partyMembers.clear();
+                this.currentGlyphs.clear();
+                this.polishing.clear();
+                this.items.clear();
+                this.bodyRolls = [];
+                this.blacklistedSkills = {};
+                this.categories.clear();
+                switch (this.job) {
+                    case 9:
+                        this.lowStaminaSystemMessage = 'SMT_BATTLE_SKILL_FAIL_LOW_ARCANE';
+                        break;
+                    case 10:
+                        this.lowStaminaSystemMessage = 'SMT_BATTLE_SKILL_FAIL_LOW_FURY';
+                        break;
+                    case 11:
+                        this.lowStaminaSystemMessage = 'SMT_BATTLE_SKILL_FAIL_LOW_CHAKRA';
+                        break;
+                    case 12:
+                        this.lowStaminaSystemMessage = 'SMT_BATTLE_SKILL_FAIL_LOW_MOON_LIGHT';
+                        break;
+                    default:
+                        this.lowStaminaSystemMessage = 'SMT_BATTLE_SKILL_FAIL_LOW_STAMINA';
+                }
+                this.awookenedLevel = gain.awakeningLevel;
+            },
+            charm = gain => {
+                if (gain.target !== this.gameId) {
+                    return;
+                }
+                this.inCombat = 1 === gain.status;
+            },
+            speedup = gain => {
+                this.attackSpeed = gain.attackSpeed;
+                this.attackSpeedBonus = gain.attackSpeedBonus;
+                this.currentStamina = gain.stamina;
+                this.totalRunSpeed = gain.runSpeed + gain.runSpeedBonus;
+                this.totalWalkSpeed = gain.walkSpeed + gain.walkSpeedBonus;
+                this.__recalculateAspd();
+            },
+            crestdivinelightning = gain => {
+                redemerald = gain.first ? gain : redemerald.items.concat(gain.items);
+                if (!gain.more) {
+                    if ('YAUeR' !== 'IUbGx') {
+                        if (14 == redemerald.container) {
+                            gift = [];
+                            redemerald.items.forEach(gain => {
+                                if ('UCZCj' !== 'WSWcV') {
+                                    gift.push(gain);
+                                } else {
+                                    return this.currentGlyphs.has(Number(gain));
+                                }
+                            });
+                        } else if (0 == redemerald.container) {
+                            if ('WvPVS' !== 'pSzCl') {
+                                this.items.clear();
+                                redemerald.items.forEach(gain => {
+                                    if ('sExiw' !== 'EPgAm') {
+                                        this.items.add(gain.id);
+                                    } else {
+                                        this.mounted = !![];
+                                    }
+                                });
+                            } else {
+                                this.vehicleEx = null;
+                                this.mounted = ![];
+                                this.zone = gain.zone;
+                            }
+                        }
+                        if (gain.lastInBatch) {
+                            this.equippedWeapon = gift.some(gain => 1 == gain.slot);
+                            let gain = gift.find(gain => 3 == gain.slot);
+                            if (gain) {
+                                if ('EDIWY' === 'Okxmu') {
+                                    broccolisoup.writeDebugMessage('S_LOAD_EP_INFO', gain.perks);
+                                } else {
+                                    let goddess = [];
+                                    const durion = gain.passivitySets[gain.passivitySet];
+                                    if (durion) {
+                                        if ('xsPnA' !== 'xsPnA') {
+                                            let crestthrowaxe = this.partyMembers.get(goddess);
+                                            if (crestthrowaxe.pid === gain.playerId && crestthrowaxe.sid === gain.serverId) {
+                                                this.partyMembers.delete(goddess);
+                                            }
+                                        } else {
+                                            for (let gain of durion.passivities) {
+                                                if ('SskGn' === 'SskGn') {
+                                                    if (0 !== gain.id) {
+                                                        if ('yjWtj' !== 'gMhdM') {
+                                                            goddess.push(gain.id);
+                                                        } else {
+                                                            let changecolorenable = [];
+                                                            const linksocialid = gain.passivitySets[gain.passivitySet];
+                                                            if (linksocialid) {
+                                                                for (let mirrorball of linksocialid.passivities) {
+                                                                    if (0 !== mirrorball.id) {
+                                                                        changecolorenable.push(mirrorball.id);
+                                                                    }
+                                                                }
+                                                            }
+                                                            this.bodyRolls = changecolorenable;
+                                                        }
+                                                    }
+                                                } else {
+                                                    this.talents.delete(goddess.id);
+                                                }
+                                            }
+                                        }
+                                    }
+                                    this.bodyRolls = goddess;
+                                }
+                            }
+                            let goddess = gift.find(gain => 20 == gain.slot);
+                            if (goddess) {
+                                if ('noBsc' !== 'noBsc') {
+                                    this.items.add(gain.id);
+                                } else {
+                                    this.items.add(goddess.id);
+                                }
+                            }
+                        }
+                        redemerald = null;
+                    } else {
+                        broccolisoup.writeDebugMessage('S_CREST_INFO ' + gain.crests);
+                    }
+                }
+            },
+            middlebomb = gain => {
+                this.currentStamina = gain.current;
+            },
+            combatitemsubtype = gain => {
+                this.partyMembers.clear();
+                gain.members.forEach(gain => {
+                    if ('GmaLK' === 'GmaLK') {
+                        if (!(gain.gameId === this.gameId)) {
+                            this.partyMembers.set(gain.gameId, {
+                                'pid': gain.playerId,
+                                'sid': gain.serverId
+                            });
+                        }
+                    } else {
+                        this.talents.clear();
+                    }
+                });
+            },
+            heavyboots = gain => {
+                [...this.partyMembers.keys()].forEach(goddess => {
+                    let durion = this.partyMembers.get(goddess);
+                    if (durion.pid === gain.playerId && durion.sid === gain.serverId) {
+                        this.partyMembers.delete(goddess);
+                    }
+                });
+            },
+            crestoverhelm = () => {
+                if ('IRSsk' === 'IRSsk') {
+                    this.partyMembers.clear();
+                } else {
+                    if (!gain.successful) {
+                        return;
+                    }
+                    for (let crestchainuppercut of gain.perks) {
+                        if (this.talents.has(crestchainuppercut.id)) {
+                            this.talents.delete(crestchainuppercut.id);
+                        }
+                        this.talents.set(crestchainuppercut.id, crestchainuppercut.level);
+                    }
+                }
+            },
+            fighter = gain => {
+                this.currentGlyphs.clear();
+                if (ride.config.debugGlyphs) {
+                    if ('dgwMD' !== 'yBiEA') {
+                        broccolisoup.writeDebugMessage('S_CREST_INFO ' + gain.crests);
+                    } else {
+                        this.currentStamina = gain.current;
+                    }
+                }
+                for (let goddess of gain.crests) {
+                    if ('nibIK' !== 'nibIK') {
+                        if (gain.gameId === this.gameId) {
+                            this.mounted = ![];
+                        }
+                    } else {
+                        if (goddess.enable) {
+                            if ('TqvrV' !== 'TqvrV') {
+                                if (gain.target !== this.gameId) {
+                                    return;
+                                }
+                                this.inCombat = 1 === gain.status;
+                            } else {
+                                this.currentGlyphs.add(goddess.id);
+                            }
+                        } else {
+                            this.currentGlyphs.delete(goddess.id);
+                        }
+                    }
+                }
+            },
+            king = gain => {
+                if ('wnFQv' !== 'dyoDQ') {
+                    if (ride.config.debugGlyphs) {
+                        broccolisoup.writeDebugMessage('S_CREST_APPLY ' + gain.id + ' status: ' + gain.enable);
+                    }
+                    if (gain.enable) {
+                        if ('XTavW' !== 'XTavW') {
+                            this.vehicleEx = gain.vehicle;
+                        } else {
+                            this.currentGlyphs.add(gain.id);
+                        }
+                    } else {
+                        if ('cYrud' !== 'cYrud') {
+                            if (ride.config.debugGlyphs) {
+                                broccolisoup.writeDebugMessage('S_CREST_APPLY ' + gain.id + ' status: ' + gain.enable);
+                            }
+                            if (gain.enable) {
+                                this.currentGlyphs.add(gain.id);
+                            } else {
+                                this.currentGlyphs.delete(gain.id);
+                            }
+                        } else {
+                            this.currentGlyphs.delete(gain.id);
+                        }
+                    }
+                } else {
+                    if (goddess.active) {
+                        this.polishing.add(goddess.id);
+                    } else {
+                        this.polishing.delete(goddess.id);
+                    }
+                }
+            },
+            towhand = gain => {
+                if (gain.target === this.gameId) {
+                    this.vehicleEx = gain.vehicle;
+                }
+            },
+            crystalcue = gain => {
+                if (gain.target === this.gameId) {
+                    this.vehicleEx = null;
+                }
+            },
+            shellofblueargon = gain => {
+                if (gain.gameId === this.gameId) {
+                    if ('eREww' !== 'mIqVD') {
+                        this.mounted = !![];
+                    } else {
+                        this.currentGlyphs.add(goddess.id);
+                    }
+                }
+            },
+            twohandaxe = gain => {
+                if ('oSlnC' === 'SRQyp') {
+                    if (ride.config.debugTalents) {
+                        broccolisoup.writeDebugMessage('S_LOAD_EP_INFO', gain.perks);
+                    }
+                    for (let giftcard of gain.perks) {
+                        this.talents.set(giftcard.id, giftcard.level);
+                    }
+                } else {
+                    if (gain.gameId === this.gameId) {
+                        this.mounted = ![];
+                    }
+                }
+            },
+            ironcue = gain => {
+                this.categories.set(gain.category, gain.enabled);
+            },
+            debuff = gain => {
+                this.polishing.clear();
+                this.polishingLevelEffects.clear();
+                if (ride.config.debugPolishing) {
+                    if ('EBWjO' === 'pcNNG') {
+                        this.partyMembers.clear();
+                        gain.members.forEach(crestevasionattack => {
+                            if (!(crestevasionattack.gameId === this.gameId)) {
+                                this.partyMembers.set(crestevasionattack.gameId, {
+                                    'pid': crestevasionattack.playerId,
+                                    'sid': crestevasionattack.serverId
+                                });
+                            }
+                        });
+                    } else {
+                        broccolisoup.writeDebugMessage('S_RP_SKILL_POLISHING_LIST', gain.optionEffects);
+                    }
+                }
+                for (let goddess of gain.optionEffects) {
+                    if ('hvLOK' === 'hvLOK') {
+                        if (goddess.active) {
+                            this.polishing.add(goddess.id);
+                        } else {
+                            if ('CGgVh' === 'CGgVh') {
+                                this.polishing.delete(goddess.id);
+                            } else {
+                                this.polishing.delete(goddess.id);
+                            }
+                        }
+                    } else {
+                        this.passives.clear();
+                        for (let darkbead of gain.skills) {
+                            let hotfix = Number(darkbead.id);
+                            if (darkbead.active) {} else {
+                                this.passives.add(hotfix);
+                            }
+                        }
+                    }
+                }
+                for (let goddess of gain.levelEffects) {
+                    this.polishingLevelEffects.set(goddess.group, goddess.id);
+                }
+            },
+            merchant = gain => {
+                if (!gain.successful) {
+                    return;
+                }
+                for (let goddess of gain.perks) {
+                    if (this.talents.has(goddess.id)) {
+                        this.talents.delete(goddess.id);
+                    }
+                    this.talents.set(goddess.id, goddess.level);
+                }
+            },
+            cityrecall = gain => {
+                if ('RgCmY' === 'mfruY') {
+                    this.categories.set(gain.category, gain.enabled);
+                } else {
+                    if (ride.config.debugTalents) {
+                        if ('hBrzm' === 'hBrzm') {
+                            broccolisoup.writeDebugMessage('S_LOAD_EP_INFO', gain.perks);
+                        } else {
+                            [...this.partyMembers.keys()].forEach(reversewithdraw => {
+                                let seren = this.partyMembers.get(reversewithdraw);
+                                if (seren.pid === gain.playerId && seren.sid === gain.serverId) {
+                                    this.partyMembers.delete(reversewithdraw);
+                                }
+                            });
+                        }
+                    }
+                    for (let goddess of gain.perks) {
+                        if ('QnmcV' !== 'QnmcV') {
+                            if (gain.target === this.gameId) {
+                                this.vehicleEx = null;
+                            }
+                        } else {
+                            this.talents.set(goddess.id, goddess.level);
+                        }
+                    }
+                }
+            },
+            useitem = () => {
+                this.talents.clear();
+            };
+        goddess.hook(...durion.getVersion('S_SKILL_LIST'), smile);
+        goddess.hook(...durion.getVersion('S_SKILL_CATEGORY'), ironcue);
+        goddess.hook(...durion.getVersion('S_LOGIN'), ride.hookNotFake, darkmatter);
+        goddess.hook(...durion.getVersion('S_USER_STATUS'), charm);
+        goddess.hook(...durion.getVersion('S_ITEMLIST'), {
+            'order': -10000000000,
+            'filter': {
+                'fake': ![]
+            }
+        }, crestdivinelightning);
+        goddess.hook(...durion.getVersion('S_PLAYER_STAT_UPDATE'), speedup);
+        goddess.hook(...durion.getVersion('S_PLAYER_CHANGE_STAMINA'), middlebomb);
+        goddess.hook(...durion.getVersion('S_PARTY_MEMBER_LIST'), {
+            'order': -10,
+            'filter': {
+                'fake': ![]
+            }
+        }, combatitemsubtype);
+        goddess.hook(...durion.getVersion('S_LEAVE_PARTY_MEMBER'), {
+            'order': -10,
+            'filter': {
+                'fake': ![]
+            }
+        }, heavyboots);
+        goddess.hook(...durion.getVersion('S_BAN_PARTY_MEMBER'), {
+            'order': -10,
+            'filter': {
+                'fake': ![]
+            }
+        }, heavyboots);
+        goddess.hook(...durion.getVersion('S_CREST_INFO'), fighter);
+        goddess.hook(...durion.getVersion('S_CREST_APPLY'), king);
+        goddess.hook(...durion.getVersion('S_MOUNT_VEHICLE_EX'), {
+            'order': -10,
+            'filter': {
+                'fake': null
+            }
+        }, towhand);
+        goddess.hook(...durion.getVersion('S_UNMOUNT_VEHICLE_EX'), {
+            'order': -10,
+            'filter': {
+                'fake': null
+            }
+        }, crystalcue);
+        goddess.hook(...durion.getVersion('S_MOUNT_VEHICLE'), {
+            'order': -10,
+            'filter': {
+                'fake': null
+            }
+        }, shellofblueargon);
+        goddess.hook(...durion.getVersion('S_UNMOUNT_VEHICLE'), {
+            'order': -10,
+            'filter': {
+                'fake': null
+            }
+        }, twohandaxe);
+        goddess.hook(...durion.getVersion('S_RP_SKILL_POLISHING_LIST'), debuff);
+        goddess.hook(...durion.getVersion('S_LEARN_EP_PERK'), merchant);
+        goddess.hook(...durion.getVersion('S_LOAD_EP_INFO'), cityrecall);
+        goddess.hook('S_RETURN_TO_LOBBY', 'raw', useitem);
+        goddess.hook('S_RESET_EP_PERK', 'raw', useitem);
+        goddess.hook('S_LEAVE_PARTY', 'raw', {
+            'order': -10,
+            'filter': {
+                'fake': ![]
+            }
+        }, crestoverhelm);
+        goddess.hook(...durion.getVersion('S_LOAD_TOPO'), gain => {
+            if ('aWMhl' !== 'BXwVW') {
+                this.vehicleEx = null;
+                this.mounted = ![];
+                this.zone = gain.zone;
+            } else {
+                return ![];
+            }
+        });
+    } ['isMe'](robebodycue) {
+        return this.gameId === robebodycue || this.vehicleEx && this.vehicleEx === robebodycue;
+    } ['myChar']() {
+        return this.vehicleEx ? this.vehicleEx : this.gameId;
+    } ['changeAspd'](sackcue, ridinguseable, extract = ![]) {
+        switch (ridinguseable) {
+            case 2:
+                this.attackSpeedBonus = extract ? this.attackSpeedBonus - sackcue : this.attackSpeedBonus + sackcue;
+                break;
+            case 3:
+                this.attackSpeedBonus = extract ? this.attackSpeedBonus - (Math.round(this.attackSpeed * sackcue) - this.attackSpeed) : this.attackSpeedBonus + (Math.round(this.attackSpeed * sackcue) - this.attackSpeed);
+        }
+        this.__recalculateAspd();
+    } ['isPartyMember'](reset) {
+        return this.partyMembers.has(reset);
+    } ['isPolishingExist'](twister) {
+        return this.polishing.has(twister);
+    } ['isTalentExist'](plantcue) {
+        return this.talents.has(plantcue);
+    } ['getTalentLevel'](extractrecipe) {
+        return this.talents.get(extractrecipe);
+    } ['isPolishingEffectExist'](songkran) {
+        return this.polishingLevelEffects.has(songkran);
+    } ['getPolishingEffectByGroup'](crystallized) {
+        return this.polishingLevelEffects.get(crystallized);
+    } ['isCategoriesEnabled'](decomposition) {
+        for (const priority of decomposition) {
+            if ('EvuBT' === 'EvuBT') {
+                if (this.categories.has(Number(priority)) && !this.categories.get(Number(priority))) {
+                    if ('IeaSN' !== 'FvdmX') {
+                        return ![];
+                    } else {
+                        let unionextractorkey = Number(priority.id);
+                        if (priority.active) {} else {
+                            this.passives.add(unionextractorkey);
+                        }
+                    }
+                }
+            } else {
+                return this.talents.get(decomposition);
+            }
+        }
+        return !![];
+    } ['isGlyphExists'](promotion) {
+        return this.currentGlyphs.has(Number(promotion));
+    } ['isItemFromInventory'](pendant) {
+        return this.items.has(pendant);
+    } ['__recalculateAspd']() {
+        this.aspd = (this.attackSpeed + this.attackSpeedBonus) / (this.job >= 8 ? 100 : this.attackSpeed);
+        if (!this.stateReference.backup) {
+            this.aspd = this.aspd / 1.07;
+        }
+    }
+}
+module.exports = k;

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
lib/utils.js


+ 0 - 0
logs/.gitkeep


+ 114 - 0
manifest.json

@@ -0,0 +1,114 @@
+{
+    "files": {
+        "data/emu/87/baseData.res": "27ae831631a0c3a73e42ce45817f4f0acee4ec09b30f7bcc07ffdddadab76654",
+        "data/emu/87/blacklisted-data.res": "351f84af449da7740ec9216a1c6b80ed67a9a1c12cc0fe4e80d6c97c5593118d",
+        "data/emu/87/effects-override.res": "35d1fec4b827ef4a4d3ca1a1e475bfc3319b7c9d96b859ec333905a93ce252ca",
+        "data/emu/87/effects.res": "5e158b46ec9c8be14fcc069ff19011cb9d389ec4287e581a14accd9c430290f8",
+        "data/emu/87/items.res": "154c10675f8c87cbc90c784b26c6ddec983f62fb81aa4fcf92227c4cabfff89f",
+        "data/emu/87/movements.res": "859d9392ccbd913ad3f1f7ee66195ec614f2b3660ea942758eedbeb5daaec2f9",
+        "data/emu/87/skills-override.res": "b87abf341e68b256f4477c877abf5b5aec55832cef7b79f1cec9cb6effcde70d",
+        "data/emu/87/skills.res": "267085c3cfcb67268f9ee614f47b1e0774897b7b48d0d9881cc4cab2bdd48983",
+        "data/emu/88/baseData.res": "27ae831631a0c3a73e42ce45817f4f0acee4ec09b30f7bcc07ffdddadab76654",
+        "data/emu/88/blacklisted-data.res": "fc46674a44958b473819d4e66dcf2c799ad0b0d10b4848f4f7584273465181fc",
+        "data/emu/88/effects-override.res": "2039d1e067b8b65e777841f3090b7dd18ee1b9d0be21538989e40b1ca55540a2",
+        "data/emu/88/effects.res": "c95d25145f5ca4aa4b4cdc6d82fb7a202eaf9e41ebf800167772056c1f263593",
+        "data/emu/88/items-override.res": "58688001a2bf8962cb7cd1516a995055fac513257548341f3224f1f3e19e91aa",
+        "data/emu/88/items.res": "90e698cd9a05f8fcd56623701b12aaf5c2902301cfe733b211e1367eecfbe6d7",
+        "data/emu/88/movements.res": "cd6fdac3470afdd6cbf624dede0465fee3c9a8e988d87814015fc2c2f4a4196a",
+        "data/emu/88/skills-override.res": "3445231b56fd4f57e10977bcd23b8dff9c036975c59bbacecaf988c9ccd0fef2",
+        "data/emu/88/skills.res": "89f3ebb878150586c9e2b979e663f22a24bc558a0ac09889eeda320ce9848a07",
+        "data/emu/90/baseData.res": "4efae6df3309295447b7194912c5e0ff44a38971bd992760af517acc2384b036",
+        "data/emu/90/blacklisted-data.res": "fb57e34a033a793a02feda7a723f32fde262f68436c4238f40574ad3d9ff22c9",
+        "data/emu/90/effects-override.res": "b63ee59e68c63322f9bf03da46963eeeaa0923be9ddb2fab2887e258dec855e8",
+        "data/emu/90/effects.res": "a49791c8c5d3342d63001909da75d773b7dfdc380426b9f21309412b282e448d",
+        "data/emu/90/items-override.res": "58688001a2bf8962cb7cd1516a995055fac513257548341f3224f1f3e19e91aa",
+        "data/emu/90/items.res": "ce95ee96f93bcf4b9640c25814b49bf2159eb8f00e73049962f524722f331aa4",
+        "data/emu/90/movements.res": "7cacfbf8864cab1c0817bd9d2af15c0ddffda36138f9db1ade2cc25e2232c751",
+        "data/emu/90/skills-override.res": "f118c8e3cf2eebaa26099ef97550f5ab33f0677710175ac8a60eaa40b6e753ae",
+        "data/emu/90/skills.res": "09f68a1e845b3ac60cf7dd67586067b564b8d83d397570a4865d2033efad09ee",
+        "data/emu/91/baseData.res": "4efae6df3309295447b7194912c5e0ff44a38971bd992760af517acc2384b036",
+        "data/emu/91/blacklisted-data.res": "3281ed404790967514f399e1571bea4e60559e04fa5c39e895733f51d46b1ee3",
+        "data/emu/91/effects-override.res": "b63ee59e68c63322f9bf03da46963eeeaa0923be9ddb2fab2887e258dec855e8",
+        "data/emu/91/effects.res": "926a91f455a7424c6948a4c8bb4135a37d9c103029a1bd064a1f9e00b7e745a8",
+        "data/emu/91/items-override.res": "58688001a2bf8962cb7cd1516a995055fac513257548341f3224f1f3e19e91aa",
+        "data/emu/91/items.res": "f9b433e856c0cb3d813c68d758da1978a586bdc88b6317c23591399c1cad26f3",
+        "data/emu/91/movements.res": "7cacfbf8864cab1c0817bd9d2af15c0ddffda36138f9db1ade2cc25e2232c751",
+        "data/emu/91/skills-override.res": "9942c23a95e0873bcaeffa733e95497d15f6e218fd91fb4b534da3428441aef3",
+        "data/emu/91/skills.res": "311d96a5546a72516a0d7c399a820d917bead2f388516eaff97669d50e4cdc88",
+        "data/emu/92/baseData.res": "4efae6df3309295447b7194912c5e0ff44a38971bd992760af517acc2384b036",
+        "data/emu/92/blacklisted-data.res": "3281ed404790967514f399e1571bea4e60559e04fa5c39e895733f51d46b1ee3",
+        "data/emu/92/effects-override.res": "b63ee59e68c63322f9bf03da46963eeeaa0923be9ddb2fab2887e258dec855e8",
+        "data/emu/92/effects.res": "926a91f455a7424c6948a4c8bb4135a37d9c103029a1bd064a1f9e00b7e745a8",
+        "data/emu/92/items-override.res": "58688001a2bf8962cb7cd1516a995055fac513257548341f3224f1f3e19e91aa",
+        "data/emu/92/items.res": "f9b433e856c0cb3d813c68d758da1978a586bdc88b6317c23591399c1cad26f3",
+        "data/emu/92/movements.res": "7cacfbf8864cab1c0817bd9d2af15c0ddffda36138f9db1ade2cc25e2232c751",
+        "data/emu/92/skills-override.res": "9942c23a95e0873bcaeffa733e95497d15f6e218fd91fb4b534da3428441aef3",
+        "data/emu/92/skills.res": "311d96a5546a72516a0d7c399a820d917bead2f388516eaff97669d50e4cdc88",
+        "data/internal/controlUI/index.html": "a191d44614c7c3c10a8058e3bc3cd7302bba2e03ae4390460f33941cfe7c3271",
+        "data/internal/controlUI/index.js": "508bd5ee980be0a38e1edff29f7629a4487c89babef0cd4631451c776947ad9d",
+        "data/internal/controlUI/smoothie.js": "12d0a115c5856d05e46bc572d9650510e3186d5a2d2fdfd7a4f5989018a1a5b6",
+        "data/internal/definitions.js": "d6567449aad66f93523d527acebc0bae459def35cbf9bd1c1bfa3006fa3ebd3c",
+        "data/internal/settingsData.json": "fe131ae1e2773c1bb46aac3d2cf10a510f26dc73e435ad3670257f6014ddbf01",
+        "data/internal/settingsSchema.js": "8dd07019c5af2165514300d9827556052cb472064c320b9be890820edd21661f",
+        "data/internal/strings.json": "f359a6827b397b54c47f74680365769531e0e1ad2104ef889110163235159882",
+        "index.js": "bc291df804f7a4c4118df8be2539d13a95aa547ed9e3df56068139498c0f5577",
+        "lib/core.js": "9306162d55402900c36f7cfaad56ccf20ee7fb900541f5f8b8180fcba54985c6",
+        "lib/io/NextGenPingTool.exe": "54312374a8962d729702ae5d239b6ff6f8cf9537f11f63a47c1c28b88b0513e4",
+        "lib/io/fetch.js": "fb802b6f2232431cf0ce0be1cba99974d8022910048a7185f62fca8b6f63ae4c",
+        "lib/io/fileEvent.js": "84e2ce2de480753d1f904196e83c2c23245938f3395bd8640f46b61d5edbb901",
+        "lib/io/logger.js": "e01350f413bc1027fb926e3c0641170b6d6c7a31e629abbe6df1b0886bc4f0fe",
+        "lib/state.js": "38e3ec4bede43c416ad07a031a8cb90f17f69cf11d7acf7c89b9c346ba582097",
+        "lib/submodules/abnormals.js": "3a40295ca41d118951a8fc5665b935a83c0e83ef30e205603a29268414dba729",
+        "lib/submodules/area.js": "d867a97d780aab834725f965a6d91f12eb5857f4e67187b6be6864315ac95ce1",
+        "lib/submodules/cd.js": "98818abe60d898726f2dab2677c5eb5f08efbb48d70b664336143c9abc06270a",
+        "lib/submodules/control.js": "33b4707a82bad5b83218a5668130ccc1c05b8299b6951880abf8ec84a5cfc09a",
+        "lib/submodules/corrector.js": "2fbb3c3a2811d07e3494aaa2f90a647a87e0c3857b694fc0945948f959eca19c",
+        "lib/submodules/defs.js": "ea790192d4a4851852e1bd1923cc3b9af0df9447109700c29099a6104f6bcede",
+        "lib/submodules/jitter.js": "9620ad67d3ce8e2d76d33b12e1c380690af5f5011c03eaf49e8327f4ec68f940",
+        "lib/submodules/ping.js": "46b98bdb933301a92683ebc7c70b62c9d666a2d20eac056ef5abaf9795e8a1bf",
+        "lib/submodules/player.js": "4b958ccfff05ec1b057ace7c1bf05af4b3fa791aad5663e267a5fc9d72fc1bd0",
+        "lib/utils.js": "c918a46efa3554530face5aabe93cbe8c7f26727fef6dc4c85709dc99630eb57",
+        "module.json": "052fb2adbe93c5f8d948e5cd7eb85a68df4e279355ddb85910e46849eeb3ce12",
+        "node_modules/compare-versions/LICENSE": "d682394bef4a34d279b0237feecf145abadd6ec1e41cbb094592b8cc9fc2f34b",
+        "node_modules/compare-versions/index.js": "76e4fad070f64fbe677f7e11f5e12a0c37c5985c202e419dd8083b9350db804a",
+        "node_modules/deepmerge/dist/cjs.js": "02e6ebc990ccba81c4375ae040cf78edcfbfe87fc3b3a0e56ca97b41b861cb72",
+        "node_modules/deepmerge/dist/umd.js": "e91f1675b80c41c09415db2b629176cdba2f9d4a39d5cfd5c4bdd357eb757510",
+        "node_modules/deepmerge/index.js": "b1ca61fe541e1c3f9228b6ddd388445ea73d20d99e9d355a4437f5aad74deb15",
+        "node_modules/deepmerge/license.txt": "6cfc4687cb2f2d86f4a77e6b526290d3878e5e512f3fec2f4cb36a9cb36f798b",
+        "node_modules/node-fetch/LICENSE.md": "84eaa985e1ef71b8c630e8aba73404c219ff425c6fdb45c62e998b58d4fbdc8e",
+        "node_modules/node-fetch/browser.js": "b47cbf4296f7c6543f7c52992b06fd92b3b04d48f87ab3a809678f663ef2bd73",
+        "node_modules/node-fetch/lib/index.es.js": "cf0b673e4055591132c039f32e4633bfb8dcc89d583d223b0d5738efe7d3607e",
+        "node_modules/node-fetch/lib/index.js": "8e2792c0f014d82415a94f83e7dc5b44f3be54d24f66aef2d4d5c72be1d4c378",
+        "node_modules/node-fetch/lib/index.mjs": "6ca33fba3d00a8f16b2ad66fd84a7c43445f1d0117fc4bfe9b43be0da219f9eb",
+        "node_modules/rfdc/LICENSE": "1ce941682a96c7b898ecd125d0f2e22319758ea6f3adbf498a65d649b0f3f7dd",
+        "node_modules/rfdc/index.js": "b1e2abd3238c080ad5b96f61d6a461b679c475b4b1bbceef776417e5e1922149",
+        "node_modules/schema-typed/LICENSE": "dbf18483539a87e97cf7870447e0547eec2cab8cde8f8e269c7466565869dd5c",
+        "node_modules/schema-typed/es/ArrayType.js": "e57e35f4edef5c4e6287fdf51cce73931c7119e893daf71987844a39398a8c55",
+        "node_modules/schema-typed/es/BooleanType.js": "e1d8d51859106d061f0c449fb0ad749fc63cbf3a49744a1c1ae176649dd157e5",
+        "node_modules/schema-typed/es/DateType.js": "bd5b6936686a3fcf49a560871f8830c0ae971b75fcbd1066227dcbbba3552247",
+        "node_modules/schema-typed/es/NumberType.js": "6249fa78b32e379f8d294fa8f3bc380fa5c63e4b20a387c979d03f2e7789cf86",
+        "node_modules/schema-typed/es/ObjectType.js": "8c255e5dd3750f7e26668755d2b16e937555be09aeae94629e8f9ca8bb0c63af",
+        "node_modules/schema-typed/es/Schema.js": "d74550b275f8a2141147f57d2893ebdd3e83c1d532936745da564a216c538e4c",
+        "node_modules/schema-typed/es/StringType.js": "7c39cd354b4eb0a905bf80739c16ff02ba36b0bae3df1e658fff79292b0842ae",
+        "node_modules/schema-typed/es/Type.js": "d841d8eba2a3fadd93495779deda877a8ab9073d06a839a64f2b97559c1c4817",
+        "node_modules/schema-typed/es/index.js": "6c8e3654189b2459a93ea47fe923836f874a1bcaca4cb37de24e6862713a16eb",
+        "node_modules/schema-typed/lib/ArrayType.js": "e57e35f4edef5c4e6287fdf51cce73931c7119e893daf71987844a39398a8c55",
+        "node_modules/schema-typed/lib/BooleanType.js": "e1d8d51859106d061f0c449fb0ad749fc63cbf3a49744a1c1ae176649dd157e5",
+        "node_modules/schema-typed/lib/DateType.js": "bd5b6936686a3fcf49a560871f8830c0ae971b75fcbd1066227dcbbba3552247",
+        "node_modules/schema-typed/lib/NumberType.js": "6249fa78b32e379f8d294fa8f3bc380fa5c63e4b20a387c979d03f2e7789cf86",
+        "node_modules/schema-typed/lib/ObjectType.js": "8c255e5dd3750f7e26668755d2b16e937555be09aeae94629e8f9ca8bb0c63af",
+        "node_modules/schema-typed/lib/Schema.js": "d74550b275f8a2141147f57d2893ebdd3e83c1d532936745da564a216c538e4c",
+        "node_modules/schema-typed/lib/StringType.js": "7c39cd354b4eb0a905bf80739c16ff02ba36b0bae3df1e658fff79292b0842ae",
+        "node_modules/schema-typed/lib/Type.js": "d841d8eba2a3fadd93495779deda877a8ab9073d06a839a64f2b97559c1c4817",
+        "node_modules/schema-typed/lib/index.js": "6c8e3654189b2459a93ea47fe923836f874a1bcaca4cb37de24e6862713a16eb",
+        "package-lock.json": "53f9fe122234b3a016bd734d488fcf0a419a5a5d6787add935a45da9ecf110b8",
+        "settings/emulation.js": {
+            "overwrite": false,
+            "hash": "e70bb61a3443aca8c4cabbc5c0a9a3ff880571ae1d97222d3e638a2d52bdeac4"
+        },
+        "settings/settings.json": {
+            "overwrite": false,
+            "hash": "a8e21d3da33459c96aaf1dcc214bfc4ec6dc07034c54dfcb982baf25e32117d6"
+        }
+    }
+}

+ 11 - 0
module.json

@@ -0,0 +1,11 @@
+{
+    "disableAutoUpdate": false,
+    "options": {
+        "niceName": "NGSP"
+    },
+    "servers": ["http://git.dev.hsdn.org/tera-v92/ngsp/raw/master/"],
+    "supportUrl": "DM",
+    "drmKey": "YOUR_DRMKEY_HERE",
+    "name": "ngsp",
+    "description": "Description goes here."
+}

+ 21 - 0
node_modules/compare-versions/LICENSE

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015-2017 Ole Michelsen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 115 - 0
node_modules/compare-versions/index.js

@@ -0,0 +1,115 @@
+/* global define */
+(function (root, factory) {
+  /* istanbul ignore next */
+  if (typeof define === 'function' && define.amd) {
+    define([], factory);
+  } else if (typeof exports === 'object') {
+    module.exports = factory();
+  } else {
+    root.compareVersions = factory();
+  }
+}(this, function () {
+
+  var semver = /^v?(?:\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+))?(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i;
+
+  function indexOrEnd(str, q) {
+    return str.indexOf(q) === -1 ? str.length : str.indexOf(q);
+  }
+
+  function split(v) {
+    var c = v.replace(/^v/, '').replace(/\+.*$/, '');
+    var patchIndex = indexOrEnd(c, '-');
+    var arr = c.substring(0, patchIndex).split('.');
+    arr.push(c.substring(patchIndex + 1));
+    return arr;
+  }
+
+  function tryParse(v) {
+    return isNaN(Number(v)) ? v : Number(v);
+  }
+
+  function validate(version) {
+    if (typeof version !== 'string') {
+      throw new TypeError('Invalid argument expected string');
+    }
+    if (!semver.test(version)) {
+      throw new Error('Invalid argument not valid semver (\''+version+'\' received)');
+    }
+  }
+
+  function compareVersions(v1, v2) {
+    [v1, v2].forEach(validate);
+
+    var s1 = split(v1);
+    var s2 = split(v2);
+
+    for (var i = 0; i < Math.max(s1.length - 1, s2.length - 1); i++) {
+      var n1 = parseInt(s1[i] || 0, 10);
+      var n2 = parseInt(s2[i] || 0, 10);
+
+      if (n1 > n2) return 1;
+      if (n2 > n1) return -1;
+    }
+
+    var sp1 = s1[s1.length - 1];
+    var sp2 = s2[s2.length - 1];
+
+    if (sp1 && sp2) {
+      var p1 = sp1.split('.').map(tryParse);
+      var p2 = sp2.split('.').map(tryParse);
+
+      for (i = 0; i < Math.max(p1.length, p2.length); i++) {
+        if (p1[i] === undefined || typeof p2[i] === 'string' && typeof p1[i] === 'number') return -1;
+        if (p2[i] === undefined || typeof p1[i] === 'string' && typeof p2[i] === 'number') return 1;
+
+        if (p1[i] > p2[i]) return 1;
+        if (p2[i] > p1[i]) return -1;
+      }
+    } else if (sp1 || sp2) {
+      return sp1 ? -1 : 1;
+    }
+
+    return 0;
+  };
+
+  var allowedOperators = [
+    '>',
+    '>=',
+    '=',
+    '<',
+    '<='
+  ];
+
+  var operatorResMap = {
+    '>': [1],
+    '>=': [0, 1],
+    '=': [0],
+    '<=': [-1, 0],
+    '<': [-1]
+  };
+
+  function validateOperator(op) {
+    if (typeof op !== 'string') {
+      throw new TypeError('Invalid operator type, expected string but got ' + typeof op);
+    }
+    if (allowedOperators.indexOf(op) === -1) {
+      throw new TypeError('Invalid operator, expected one of ' + allowedOperators.join('|'));
+    }
+  }
+
+  compareVersions.validate = function(version) {
+    return typeof version === 'string' && semver.test(version);
+  }
+
+  compareVersions.compare = function (v1, v2, operator) {
+    // Validate operator
+    validateOperator(operator);
+
+    // since result of compareVersions can only be -1 or 0 or 1
+    // a simple map can be used to replace switch
+    var res = compareVersions(v1, v2);
+    return operatorResMap[operator].indexOf(res) > -1;
+  }
+
+  return compareVersions;
+}));

+ 38 - 0
node_modules/compare-versions/package.json

@@ -0,0 +1,38 @@
+{
+  "name": "compare-versions",
+  "version": "3.6.0",
+  "description": "Compare semver version strings to find greater, equal or lesser.",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/omichelsen/compare-versions.git"
+  },
+  "author": "Ole Michelsen",
+  "license": "MIT",
+  "bugs": {
+    "url": "https://github.com/omichelsen/compare-versions/issues"
+  },
+  "homepage": "https://github.com/omichelsen/compare-versions#readme",
+  "keywords": [
+    "semver",
+    "version",
+    "compare",
+    "browser",
+    "node"
+  ],
+  "scripts": {
+    "test": "nyc mocha"
+  },
+  "main": "index.js",
+  "types": "index.d.ts",
+  "files": [
+    "index.d.ts"
+  ],
+  "devDependencies": {
+    "mocha": "^7.0.1",
+    "nyc": "^15.0.0"
+  }
+
+,"_resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz"
+,"_integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA=="
+,"_from": "compare-versions@3.6.0"
+}

+ 133 - 0
node_modules/deepmerge/dist/cjs.js

@@ -0,0 +1,133 @@
+'use strict';
+
+var isMergeableObject = function isMergeableObject(value) {
+	return isNonNullObject(value)
+		&& !isSpecial(value)
+};
+
+function isNonNullObject(value) {
+	return !!value && typeof value === 'object'
+}
+
+function isSpecial(value) {
+	var stringValue = Object.prototype.toString.call(value);
+
+	return stringValue === '[object RegExp]'
+		|| stringValue === '[object Date]'
+		|| isReactElement(value)
+}
+
+// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
+var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
+var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
+
+function isReactElement(value) {
+	return value.$$typeof === REACT_ELEMENT_TYPE
+}
+
+function emptyTarget(val) {
+	return Array.isArray(val) ? [] : {}
+}
+
+function cloneUnlessOtherwiseSpecified(value, options) {
+	return (options.clone !== false && options.isMergeableObject(value))
+		? deepmerge(emptyTarget(value), value, options)
+		: value
+}
+
+function defaultArrayMerge(target, source, options) {
+	return target.concat(source).map(function(element) {
+		return cloneUnlessOtherwiseSpecified(element, options)
+	})
+}
+
+function getMergeFunction(key, options) {
+	if (!options.customMerge) {
+		return deepmerge
+	}
+	var customMerge = options.customMerge(key);
+	return typeof customMerge === 'function' ? customMerge : deepmerge
+}
+
+function getEnumerableOwnPropertySymbols(target) {
+	return Object.getOwnPropertySymbols
+		? Object.getOwnPropertySymbols(target).filter(function(symbol) {
+			return target.propertyIsEnumerable(symbol)
+		})
+		: []
+}
+
+function getKeys(target) {
+	return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
+}
+
+function propertyIsOnObject(object, property) {
+	try {
+		return property in object
+	} catch(_) {
+		return false
+	}
+}
+
+// Protects from prototype poisoning and unexpected merging up the prototype chain.
+function propertyIsUnsafe(target, key) {
+	return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
+		&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
+			&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
+}
+
+function mergeObject(target, source, options) {
+	var destination = {};
+	if (options.isMergeableObject(target)) {
+		getKeys(target).forEach(function(key) {
+			destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
+		});
+	}
+	getKeys(source).forEach(function(key) {
+		if (propertyIsUnsafe(target, key)) {
+			return
+		}
+
+		if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
+			destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
+		} else {
+			destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
+		}
+	});
+	return destination
+}
+
+function deepmerge(target, source, options) {
+	options = options || {};
+	options.arrayMerge = options.arrayMerge || defaultArrayMerge;
+	options.isMergeableObject = options.isMergeableObject || isMergeableObject;
+	// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
+	// implementations can use it. The caller may not replace it.
+	options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
+
+	var sourceIsArray = Array.isArray(source);
+	var targetIsArray = Array.isArray(target);
+	var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
+
+	if (!sourceAndTargetTypesMatch) {
+		return cloneUnlessOtherwiseSpecified(source, options)
+	} else if (sourceIsArray) {
+		return options.arrayMerge(target, source, options)
+	} else {
+		return mergeObject(target, source, options)
+	}
+}
+
+deepmerge.all = function deepmergeAll(array, options) {
+	if (!Array.isArray(array)) {
+		throw new Error('first argument should be an array')
+	}
+
+	return array.reduce(function(prev, next) {
+		return deepmerge(prev, next, options)
+	}, {})
+};
+
+var deepmerge_1 = deepmerge;
+
+module.exports = deepmerge_1;

+ 139 - 0
node_modules/deepmerge/dist/umd.js

@@ -0,0 +1,139 @@
+(function (global, factory) {
+	typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+	typeof define === 'function' && define.amd ? define(factory) :
+	(global = global || self, global.deepmerge = factory());
+}(this, function () { 'use strict';
+
+	var isMergeableObject = function isMergeableObject(value) {
+		return isNonNullObject(value)
+			&& !isSpecial(value)
+	};
+
+	function isNonNullObject(value) {
+		return !!value && typeof value === 'object'
+	}
+
+	function isSpecial(value) {
+		var stringValue = Object.prototype.toString.call(value);
+
+		return stringValue === '[object RegExp]'
+			|| stringValue === '[object Date]'
+			|| isReactElement(value)
+	}
+
+	// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
+	var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
+	var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
+
+	function isReactElement(value) {
+		return value.$$typeof === REACT_ELEMENT_TYPE
+	}
+
+	function emptyTarget(val) {
+		return Array.isArray(val) ? [] : {}
+	}
+
+	function cloneUnlessOtherwiseSpecified(value, options) {
+		return (options.clone !== false && options.isMergeableObject(value))
+			? deepmerge(emptyTarget(value), value, options)
+			: value
+	}
+
+	function defaultArrayMerge(target, source, options) {
+		return target.concat(source).map(function(element) {
+			return cloneUnlessOtherwiseSpecified(element, options)
+		})
+	}
+
+	function getMergeFunction(key, options) {
+		if (!options.customMerge) {
+			return deepmerge
+		}
+		var customMerge = options.customMerge(key);
+		return typeof customMerge === 'function' ? customMerge : deepmerge
+	}
+
+	function getEnumerableOwnPropertySymbols(target) {
+		return Object.getOwnPropertySymbols
+			? Object.getOwnPropertySymbols(target).filter(function(symbol) {
+				return target.propertyIsEnumerable(symbol)
+			})
+			: []
+	}
+
+	function getKeys(target) {
+		return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
+	}
+
+	function propertyIsOnObject(object, property) {
+		try {
+			return property in object
+		} catch(_) {
+			return false
+		}
+	}
+
+	// Protects from prototype poisoning and unexpected merging up the prototype chain.
+	function propertyIsUnsafe(target, key) {
+		return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
+			&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
+				&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
+	}
+
+	function mergeObject(target, source, options) {
+		var destination = {};
+		if (options.isMergeableObject(target)) {
+			getKeys(target).forEach(function(key) {
+				destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
+			});
+		}
+		getKeys(source).forEach(function(key) {
+			if (propertyIsUnsafe(target, key)) {
+				return
+			}
+
+			if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
+				destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
+			} else {
+				destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
+			}
+		});
+		return destination
+	}
+
+	function deepmerge(target, source, options) {
+		options = options || {};
+		options.arrayMerge = options.arrayMerge || defaultArrayMerge;
+		options.isMergeableObject = options.isMergeableObject || isMergeableObject;
+		// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
+		// implementations can use it. The caller may not replace it.
+		options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
+
+		var sourceIsArray = Array.isArray(source);
+		var targetIsArray = Array.isArray(target);
+		var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
+
+		if (!sourceAndTargetTypesMatch) {
+			return cloneUnlessOtherwiseSpecified(source, options)
+		} else if (sourceIsArray) {
+			return options.arrayMerge(target, source, options)
+		} else {
+			return mergeObject(target, source, options)
+		}
+	}
+
+	deepmerge.all = function deepmergeAll(array, options) {
+		if (!Array.isArray(array)) {
+			throw new Error('first argument should be an array')
+		}
+
+		return array.reduce(function(prev, next) {
+			return deepmerge(prev, next, options)
+		}, {})
+	};
+
+	var deepmerge_1 = deepmerge;
+
+	return deepmerge_1;
+
+}));

+ 106 - 0
node_modules/deepmerge/index.js

@@ -0,0 +1,106 @@
+var defaultIsMergeableObject = require('is-mergeable-object')
+
+function emptyTarget(val) {
+	return Array.isArray(val) ? [] : {}
+}
+
+function cloneUnlessOtherwiseSpecified(value, options) {
+	return (options.clone !== false && options.isMergeableObject(value))
+		? deepmerge(emptyTarget(value), value, options)
+		: value
+}
+
+function defaultArrayMerge(target, source, options) {
+	return target.concat(source).map(function(element) {
+		return cloneUnlessOtherwiseSpecified(element, options)
+	})
+}
+
+function getMergeFunction(key, options) {
+	if (!options.customMerge) {
+		return deepmerge
+	}
+	var customMerge = options.customMerge(key)
+	return typeof customMerge === 'function' ? customMerge : deepmerge
+}
+
+function getEnumerableOwnPropertySymbols(target) {
+	return Object.getOwnPropertySymbols
+		? Object.getOwnPropertySymbols(target).filter(function(symbol) {
+			return target.propertyIsEnumerable(symbol)
+		})
+		: []
+}
+
+function getKeys(target) {
+	return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
+}
+
+function propertyIsOnObject(object, property) {
+	try {
+		return property in object
+	} catch(_) {
+		return false
+	}
+}
+
+// Protects from prototype poisoning and unexpected merging up the prototype chain.
+function propertyIsUnsafe(target, key) {
+	return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
+		&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
+			&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
+}
+
+function mergeObject(target, source, options) {
+	var destination = {}
+	if (options.isMergeableObject(target)) {
+		getKeys(target).forEach(function(key) {
+			destination[key] = cloneUnlessOtherwiseSpecified(target[key], options)
+		})
+	}
+	getKeys(source).forEach(function(key) {
+		if (propertyIsUnsafe(target, key)) {
+			return
+		}
+
+		if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
+			destination[key] = getMergeFunction(key, options)(target[key], source[key], options)
+		} else {
+			destination[key] = cloneUnlessOtherwiseSpecified(source[key], options)
+		}
+	})
+	return destination
+}
+
+function deepmerge(target, source, options) {
+	options = options || {}
+	options.arrayMerge = options.arrayMerge || defaultArrayMerge
+	options.isMergeableObject = options.isMergeableObject || defaultIsMergeableObject
+	// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
+	// implementations can use it. The caller may not replace it.
+	options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified
+
+	var sourceIsArray = Array.isArray(source)
+	var targetIsArray = Array.isArray(target)
+	var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray
+
+	if (!sourceAndTargetTypesMatch) {
+		return cloneUnlessOtherwiseSpecified(source, options)
+	} else if (sourceIsArray) {
+		return options.arrayMerge(target, source, options)
+	} else {
+		return mergeObject(target, source, options)
+	}
+}
+
+deepmerge.all = function deepmergeAll(array, options) {
+	if (!Array.isArray(array)) {
+		throw new Error('first argument should be an array')
+	}
+
+	return array.reduce(function(prev, next) {
+		return deepmerge(prev, next, options)
+	}, {})
+}
+
+module.exports = deepmerge

+ 21 - 0
node_modules/deepmerge/license.txt

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2012 James Halliday, Josh Duff, and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 47 - 0
node_modules/deepmerge/package.json

@@ -0,0 +1,47 @@
+{
+  "name": "deepmerge",
+  "description": "A library for deep (recursive) merging of Javascript objects",
+  "keywords": [
+    "merge",
+    "deep",
+    "extend",
+    "copy",
+    "clone",
+    "recursive"
+  ],
+  "version": "4.2.2",
+  "homepage": "https://github.com/TehShrike/deepmerge",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/TehShrike/deepmerge.git"
+  },
+  "main": "dist/cjs.js",
+  "engines": {
+    "node": ">=0.10.0"
+  },
+  "scripts": {
+    "build": "rollup -c",
+    "test": "npm run build && tape test/*.js && jsmd readme.md && npm run test:typescript",
+    "test:typescript": "tsc --noEmit test/typescript.ts && ts-node test/typescript.ts",
+    "size": "npm run build && uglifyjs --compress --mangle -- ./dist/umd.js | gzip -c | wc -c"
+  },
+  "devDependencies": {
+    "@types/node": "^8.10.54",
+    "is-mergeable-object": "1.1.0",
+    "is-plain-object": "^2.0.4",
+    "jsmd": "^1.0.2",
+    "rollup": "^1.23.1",
+    "rollup-plugin-commonjs": "^10.1.0",
+    "rollup-plugin-node-resolve": "^5.2.0",
+    "tape": "^4.11.0",
+    "ts-node": "7.0.1",
+    "typescript": "=2.2.2",
+    "uglify-js": "^3.6.1"
+  },
+  "license": "MIT",
+  "dependencies": {}
+
+,"_resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz"
+,"_integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg=="
+,"_from": "deepmerge@4.2.2"
+}

+ 22 - 0
node_modules/node-fetch/LICENSE.md

@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 David Frank
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+

+ 23 - 0
node_modules/node-fetch/browser.js

@@ -0,0 +1,23 @@
+"use strict";
+
+// ref: https://github.com/tc39/proposal-global
+var getGlobal = function () {
+	// the only reliable means to get the global object is
+	// `Function('return this')()`
+	// However, this causes CSP violations in Chrome apps.
+	if (typeof self !== 'undefined') { return self; }
+	if (typeof window !== 'undefined') { return window; }
+	if (typeof global !== 'undefined') { return global; }
+	throw new Error('unable to locate global object');
+}
+
+var global = getGlobal();
+
+module.exports = exports = global.fetch;
+
+// Needed for TypeScript and Webpack.
+exports.default = global.fetch.bind(global);
+
+exports.Headers = global.Headers;
+exports.Request = global.Request;
+exports.Response = global.Response;

+ 1633 - 0
node_modules/node-fetch/lib/index.es.js

@@ -0,0 +1,1633 @@
+process.emitWarning("The .es.js file is deprecated. Use .mjs instead.");
+
+import Stream from 'stream';
+import http from 'http';
+import Url from 'url';
+import https from 'https';
+import zlib from 'zlib';
+
+// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js
+
+// fix for "Readable" isn't a named export issue
+const Readable = Stream.Readable;
+
+const BUFFER = Symbol('buffer');
+const TYPE = Symbol('type');
+
+class Blob {
+	constructor() {
+		this[TYPE] = '';
+
+		const blobParts = arguments[0];
+		const options = arguments[1];
+
+		const buffers = [];
+		let size = 0;
+
+		if (blobParts) {
+			const a = blobParts;
+			const length = Number(a.length);
+			for (let i = 0; i < length; i++) {
+				const element = a[i];
+				let buffer;
+				if (element instanceof Buffer) {
+					buffer = element;
+				} else if (ArrayBuffer.isView(element)) {
+					buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);
+				} else if (element instanceof ArrayBuffer) {
+					buffer = Buffer.from(element);
+				} else if (element instanceof Blob) {
+					buffer = element[BUFFER];
+				} else {
+					buffer = Buffer.from(typeof element === 'string' ? element : String(element));
+				}
+				size += buffer.length;
+				buffers.push(buffer);
+			}
+		}
+
+		this[BUFFER] = Buffer.concat(buffers);
+
+		let type = options && options.type !== undefined && String(options.type).toLowerCase();
+		if (type && !/[^\u0020-\u007E]/.test(type)) {
+			this[TYPE] = type;
+		}
+	}
+	get size() {
+		return this[BUFFER].length;
+	}
+	get type() {
+		return this[TYPE];
+	}
+	text() {
+		return Promise.resolve(this[BUFFER].toString());
+	}
+	arrayBuffer() {
+		const buf = this[BUFFER];
+		const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
+		return Promise.resolve(ab);
+	}
+	stream() {
+		const readable = new Readable();
+		readable._read = function () {};
+		readable.push(this[BUFFER]);
+		readable.push(null);
+		return readable;
+	}
+	toString() {
+		return '[object Blob]';
+	}
+	slice() {
+		const size = this.size;
+
+		const start = arguments[0];
+		const end = arguments[1];
+		let relativeStart, relativeEnd;
+		if (start === undefined) {
+			relativeStart = 0;
+		} else if (start < 0) {
+			relativeStart = Math.max(size + start, 0);
+		} else {
+			relativeStart = Math.min(start, size);
+		}
+		if (end === undefined) {
+			relativeEnd = size;
+		} else if (end < 0) {
+			relativeEnd = Math.max(size + end, 0);
+		} else {
+			relativeEnd = Math.min(end, size);
+		}
+		const span = Math.max(relativeEnd - relativeStart, 0);
+
+		const buffer = this[BUFFER];
+		const slicedBuffer = buffer.slice(relativeStart, relativeStart + span);
+		const blob = new Blob([], { type: arguments[2] });
+		blob[BUFFER] = slicedBuffer;
+		return blob;
+	}
+}
+
+Object.defineProperties(Blob.prototype, {
+	size: { enumerable: true },
+	type: { enumerable: true },
+	slice: { enumerable: true }
+});
+
+Object.defineProperty(Blob.prototype, Symbol.toStringTag, {
+	value: 'Blob',
+	writable: false,
+	enumerable: false,
+	configurable: true
+});
+
+/**
+ * fetch-error.js
+ *
+ * FetchError interface for operational errors
+ */
+
+/**
+ * Create FetchError instance
+ *
+ * @param   String      message      Error message for human
+ * @param   String      type         Error type for machine
+ * @param   String      systemError  For Node.js system error
+ * @return  FetchError
+ */
+function FetchError(message, type, systemError) {
+  Error.call(this, message);
+
+  this.message = message;
+  this.type = type;
+
+  // when err.type is `system`, err.code contains system error code
+  if (systemError) {
+    this.code = this.errno = systemError.code;
+  }
+
+  // hide custom error implementation details from end-users
+  Error.captureStackTrace(this, this.constructor);
+}
+
+FetchError.prototype = Object.create(Error.prototype);
+FetchError.prototype.constructor = FetchError;
+FetchError.prototype.name = 'FetchError';
+
+let convert;
+try {
+	convert = require('encoding').convert;
+} catch (e) {}
+
+const INTERNALS = Symbol('Body internals');
+
+// fix an issue where "PassThrough" isn't a named export for node <10
+const PassThrough = Stream.PassThrough;
+
+/**
+ * Body mixin
+ *
+ * Ref: https://fetch.spec.whatwg.org/#body
+ *
+ * @param   Stream  body  Readable stream
+ * @param   Object  opts  Response options
+ * @return  Void
+ */
+function Body(body) {
+	var _this = this;
+
+	var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
+	    _ref$size = _ref.size;
+
+	let size = _ref$size === undefined ? 0 : _ref$size;
+	var _ref$timeout = _ref.timeout;
+	let timeout = _ref$timeout === undefined ? 0 : _ref$timeout;
+
+	if (body == null) {
+		// body is undefined or null
+		body = null;
+	} else if (isURLSearchParams(body)) {
+		// body is a URLSearchParams
+		body = Buffer.from(body.toString());
+	} else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
+		// body is ArrayBuffer
+		body = Buffer.from(body);
+	} else if (ArrayBuffer.isView(body)) {
+		// body is ArrayBufferView
+		body = Buffer.from(body.buffer, body.byteOffset, body.byteLength);
+	} else if (body instanceof Stream) ; else {
+		// none of the above
+		// coerce to string then buffer
+		body = Buffer.from(String(body));
+	}
+	this[INTERNALS] = {
+		body,
+		disturbed: false,
+		error: null
+	};
+	this.size = size;
+	this.timeout = timeout;
+
+	if (body instanceof Stream) {
+		body.on('error', function (err) {
+			const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);
+			_this[INTERNALS].error = error;
+		});
+	}
+}
+
+Body.prototype = {
+	get body() {
+		return this[INTERNALS].body;
+	},
+
+	get bodyUsed() {
+		return this[INTERNALS].disturbed;
+	},
+
+	/**
+  * Decode response as ArrayBuffer
+  *
+  * @return  Promise
+  */
+	arrayBuffer() {
+		return consumeBody.call(this).then(function (buf) {
+			return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
+		});
+	},
+
+	/**
+  * Return raw response as Blob
+  *
+  * @return Promise
+  */
+	blob() {
+		let ct = this.headers && this.headers.get('content-type') || '';
+		return consumeBody.call(this).then(function (buf) {
+			return Object.assign(
+			// Prevent copying
+			new Blob([], {
+				type: ct.toLowerCase()
+			}), {
+				[BUFFER]: buf
+			});
+		});
+	},
+
+	/**
+  * Decode response as json
+  *
+  * @return  Promise
+  */
+	json() {
+		var _this2 = this;
+
+		return consumeBody.call(this).then(function (buffer) {
+			try {
+				return JSON.parse(buffer.toString());
+			} catch (err) {
+				return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
+			}
+		});
+	},
+
+	/**
+  * Decode response as text
+  *
+  * @return  Promise
+  */
+	text() {
+		return consumeBody.call(this).then(function (buffer) {
+			return buffer.toString();
+		});
+	},
+
+	/**
+  * Decode response as buffer (non-spec api)
+  *
+  * @return  Promise
+  */
+	buffer() {
+		return consumeBody.call(this);
+	},
+
+	/**
+  * Decode response as text, while automatically detecting the encoding and
+  * trying to decode to UTF-8 (non-spec api)
+  *
+  * @return  Promise
+  */
+	textConverted() {
+		var _this3 = this;
+
+		return consumeBody.call(this).then(function (buffer) {
+			return convertBody(buffer, _this3.headers);
+		});
+	}
+};
+
+// In browsers, all properties are enumerable.
+Object.defineProperties(Body.prototype, {
+	body: { enumerable: true },
+	bodyUsed: { enumerable: true },
+	arrayBuffer: { enumerable: true },
+	blob: { enumerable: true },
+	json: { enumerable: true },
+	text: { enumerable: true }
+});
+
+Body.mixIn = function (proto) {
+	for (const name of Object.getOwnPropertyNames(Body.prototype)) {
+		// istanbul ignore else: future proof
+		if (!(name in proto)) {
+			const desc = Object.getOwnPropertyDescriptor(Body.prototype, name);
+			Object.defineProperty(proto, name, desc);
+		}
+	}
+};
+
+/**
+ * Consume and convert an entire Body to a Buffer.
+ *
+ * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body
+ *
+ * @return  Promise
+ */
+function consumeBody() {
+	var _this4 = this;
+
+	if (this[INTERNALS].disturbed) {
+		return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));
+	}
+
+	this[INTERNALS].disturbed = true;
+
+	if (this[INTERNALS].error) {
+		return Body.Promise.reject(this[INTERNALS].error);
+	}
+
+	let body = this.body;
+
+	// body is null
+	if (body === null) {
+		return Body.Promise.resolve(Buffer.alloc(0));
+	}
+
+	// body is blob
+	if (isBlob(body)) {
+		body = body.stream();
+	}
+
+	// body is buffer
+	if (Buffer.isBuffer(body)) {
+		return Body.Promise.resolve(body);
+	}
+
+	// istanbul ignore if: should never happen
+	if (!(body instanceof Stream)) {
+		return Body.Promise.resolve(Buffer.alloc(0));
+	}
+
+	// body is stream
+	// get ready to actually consume the body
+	let accum = [];
+	let accumBytes = 0;
+	let abort = false;
+
+	return new Body.Promise(function (resolve, reject) {
+		let resTimeout;
+
+		// allow timeout on slow response body
+		if (_this4.timeout) {
+			resTimeout = setTimeout(function () {
+				abort = true;
+				reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));
+			}, _this4.timeout);
+		}
+
+		// handle stream errors
+		body.on('error', function (err) {
+			if (err.name === 'AbortError') {
+				// if the request was aborted, reject with this Error
+				abort = true;
+				reject(err);
+			} else {
+				// other errors, such as incorrect content-encoding
+				reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));
+			}
+		});
+
+		body.on('data', function (chunk) {
+			if (abort || chunk === null) {
+				return;
+			}
+
+			if (_this4.size && accumBytes + chunk.length > _this4.size) {
+				abort = true;
+				reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));
+				return;
+			}
+
+			accumBytes += chunk.length;
+			accum.push(chunk);
+		});
+
+		body.on('end', function () {
+			if (abort) {
+				return;
+			}
+
+			clearTimeout(resTimeout);
+
+			try {
+				resolve(Buffer.concat(accum, accumBytes));
+			} catch (err) {
+				// handle streams that have accumulated too much data (issue #414)
+				reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));
+			}
+		});
+	});
+}
+
+/**
+ * Detect buffer encoding and convert to target encoding
+ * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding
+ *
+ * @param   Buffer  buffer    Incoming buffer
+ * @param   String  encoding  Target encoding
+ * @return  String
+ */
+function convertBody(buffer, headers) {
+	if (typeof convert !== 'function') {
+		throw new Error('The package `encoding` must be installed to use the textConverted() function');
+	}
+
+	const ct = headers.get('content-type');
+	let charset = 'utf-8';
+	let res, str;
+
+	// header
+	if (ct) {
+		res = /charset=([^;]*)/i.exec(ct);
+	}
+
+	// no charset in content type, peek at response body for at most 1024 bytes
+	str = buffer.slice(0, 1024).toString();
+
+	// html5
+	if (!res && str) {
+		res = /<meta.+?charset=(['"])(.+?)\1/i.exec(str);
+	}
+
+	// html4
+	if (!res && str) {
+		res = /<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(str);
+
+		if (res) {
+			res = /charset=(.*)/i.exec(res.pop());
+		}
+	}
+
+	// xml
+	if (!res && str) {
+		res = /<\?xml.+?encoding=(['"])(.+?)\1/i.exec(str);
+	}
+
+	// found charset
+	if (res) {
+		charset = res.pop();
+
+		// prevent decode issues when sites use incorrect encoding
+		// ref: https://hsivonen.fi/encoding-menu/
+		if (charset === 'gb2312' || charset === 'gbk') {
+			charset = 'gb18030';
+		}
+	}
+
+	// turn raw buffers into a single utf-8 buffer
+	return convert(buffer, 'UTF-8', charset).toString();
+}
+
+/**
+ * Detect a URLSearchParams object
+ * ref: https://github.com/bitinn/node-fetch/issues/296#issuecomment-307598143
+ *
+ * @param   Object  obj     Object to detect by type or brand
+ * @return  String
+ */
+function isURLSearchParams(obj) {
+	// Duck-typing as a necessary condition.
+	if (typeof obj !== 'object' || typeof obj.append !== 'function' || typeof obj.delete !== 'function' || typeof obj.get !== 'function' || typeof obj.getAll !== 'function' || typeof obj.has !== 'function' || typeof obj.set !== 'function') {
+		return false;
+	}
+
+	// Brand-checking and more duck-typing as optional condition.
+	return obj.constructor.name === 'URLSearchParams' || Object.prototype.toString.call(obj) === '[object URLSearchParams]' || typeof obj.sort === 'function';
+}
+
+/**
+ * Check if `obj` is a W3C `Blob` object (which `File` inherits from)
+ * @param  {*} obj
+ * @return {boolean}
+ */
+function isBlob(obj) {
+	return typeof obj === 'object' && typeof obj.arrayBuffer === 'function' && typeof obj.type === 'string' && typeof obj.stream === 'function' && typeof obj.constructor === 'function' && typeof obj.constructor.name === 'string' && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]);
+}
+
+/**
+ * Clone body given Res/Req instance
+ *
+ * @param   Mixed  instance  Response or Request instance
+ * @return  Mixed
+ */
+function clone(instance) {
+	let p1, p2;
+	let body = instance.body;
+
+	// don't allow cloning a used body
+	if (instance.bodyUsed) {
+		throw new Error('cannot clone body after it is used');
+	}
+
+	// check that body is a stream and not form-data object
+	// note: we can't clone the form-data object without having it as a dependency
+	if (body instanceof Stream && typeof body.getBoundary !== 'function') {
+		// tee instance body
+		p1 = new PassThrough();
+		p2 = new PassThrough();
+		body.pipe(p1);
+		body.pipe(p2);
+		// set instance body to teed body and return the other teed body
+		instance[INTERNALS].body = p1;
+		body = p2;
+	}
+
+	return body;
+}
+
+/**
+ * Performs the operation "extract a `Content-Type` value from |object|" as
+ * specified in the specification:
+ * https://fetch.spec.whatwg.org/#concept-bodyinit-extract
+ *
+ * This function assumes that instance.body is present.
+ *
+ * @param   Mixed  instance  Any options.body input
+ */
+function extractContentType(body) {
+	if (body === null) {
+		// body is null
+		return null;
+	} else if (typeof body === 'string') {
+		// body is string
+		return 'text/plain;charset=UTF-8';
+	} else if (isURLSearchParams(body)) {
+		// body is a URLSearchParams
+		return 'application/x-www-form-urlencoded;charset=UTF-8';
+	} else if (isBlob(body)) {
+		// body is blob
+		return body.type || null;
+	} else if (Buffer.isBuffer(body)) {
+		// body is buffer
+		return null;
+	} else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
+		// body is ArrayBuffer
+		return null;
+	} else if (ArrayBuffer.isView(body)) {
+		// body is ArrayBufferView
+		return null;
+	} else if (typeof body.getBoundary === 'function') {
+		// detect form data input from form-data module
+		return `multipart/form-data;boundary=${body.getBoundary()}`;
+	} else if (body instanceof Stream) {
+		// body is stream
+		// can't really do much about this
+		return null;
+	} else {
+		// Body constructor defaults other things to string
+		return 'text/plain;charset=UTF-8';
+	}
+}
+
+/**
+ * The Fetch Standard treats this as if "total bytes" is a property on the body.
+ * For us, we have to explicitly get it with a function.
+ *
+ * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes
+ *
+ * @param   Body    instance   Instance of Body
+ * @return  Number?            Number of bytes, or null if not possible
+ */
+function getTotalBytes(instance) {
+	const body = instance.body;
+
+
+	if (body === null) {
+		// body is null
+		return 0;
+	} else if (isBlob(body)) {
+		return body.size;
+	} else if (Buffer.isBuffer(body)) {
+		// body is buffer
+		return body.length;
+	} else if (body && typeof body.getLengthSync === 'function') {
+		// detect form data input from form-data module
+		if (body._lengthRetrievers && body._lengthRetrievers.length == 0 || // 1.x
+		body.hasKnownLength && body.hasKnownLength()) {
+			// 2.x
+			return body.getLengthSync();
+		}
+		return null;
+	} else {
+		// body is stream
+		return null;
+	}
+}
+
+/**
+ * Write a Body to a Node.js WritableStream (e.g. http.Request) object.
+ *
+ * @param   Body    instance   Instance of Body
+ * @return  Void
+ */
+function writeToStream(dest, instance) {
+	const body = instance.body;
+
+
+	if (body === null) {
+		// body is null
+		dest.end();
+	} else if (isBlob(body)) {
+		body.stream().pipe(dest);
+	} else if (Buffer.isBuffer(body)) {
+		// body is buffer
+		dest.write(body);
+		dest.end();
+	} else {
+		// body is stream
+		body.pipe(dest);
+	}
+}
+
+// expose Promise
+Body.Promise = global.Promise;
+
+/**
+ * headers.js
+ *
+ * Headers class offers convenient helpers
+ */
+
+const invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/;
+const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/;
+
+function validateName(name) {
+	name = `${name}`;
+	if (invalidTokenRegex.test(name) || name === '') {
+		throw new TypeError(`${name} is not a legal HTTP header name`);
+	}
+}
+
+function validateValue(value) {
+	value = `${value}`;
+	if (invalidHeaderCharRegex.test(value)) {
+		throw new TypeError(`${value} is not a legal HTTP header value`);
+	}
+}
+
+/**
+ * Find the key in the map object given a header name.
+ *
+ * Returns undefined if not found.
+ *
+ * @param   String  name  Header name
+ * @return  String|Undefined
+ */
+function find(map, name) {
+	name = name.toLowerCase();
+	for (const key in map) {
+		if (key.toLowerCase() === name) {
+			return key;
+		}
+	}
+	return undefined;
+}
+
+const MAP = Symbol('map');
+class Headers {
+	/**
+  * Headers class
+  *
+  * @param   Object  headers  Response headers
+  * @return  Void
+  */
+	constructor() {
+		let init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
+
+		this[MAP] = Object.create(null);
+
+		if (init instanceof Headers) {
+			const rawHeaders = init.raw();
+			const headerNames = Object.keys(rawHeaders);
+
+			for (const headerName of headerNames) {
+				for (const value of rawHeaders[headerName]) {
+					this.append(headerName, value);
+				}
+			}
+
+			return;
+		}
+
+		// We don't worry about converting prop to ByteString here as append()
+		// will handle it.
+		if (init == null) ; else if (typeof init === 'object') {
+			const method = init[Symbol.iterator];
+			if (method != null) {
+				if (typeof method !== 'function') {
+					throw new TypeError('Header pairs must be iterable');
+				}
+
+				// sequence<sequence<ByteString>>
+				// Note: per spec we have to first exhaust the lists then process them
+				const pairs = [];
+				for (const pair of init) {
+					if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {
+						throw new TypeError('Each header pair must be iterable');
+					}
+					pairs.push(Array.from(pair));
+				}
+
+				for (const pair of pairs) {
+					if (pair.length !== 2) {
+						throw new TypeError('Each header pair must be a name/value tuple');
+					}
+					this.append(pair[0], pair[1]);
+				}
+			} else {
+				// record<ByteString, ByteString>
+				for (const key of Object.keys(init)) {
+					const value = init[key];
+					this.append(key, value);
+				}
+			}
+		} else {
+			throw new TypeError('Provided initializer must be an object');
+		}
+	}
+
+	/**
+  * Return combined header value given name
+  *
+  * @param   String  name  Header name
+  * @return  Mixed
+  */
+	get(name) {
+		name = `${name}`;
+		validateName(name);
+		const key = find(this[MAP], name);
+		if (key === undefined) {
+			return null;
+		}
+
+		return this[MAP][key].join(', ');
+	}
+
+	/**
+  * Iterate over all headers
+  *
+  * @param   Function  callback  Executed for each item with parameters (value, name, thisArg)
+  * @param   Boolean   thisArg   `this` context for callback function
+  * @return  Void
+  */
+	forEach(callback) {
+		let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
+
+		let pairs = getHeaders(this);
+		let i = 0;
+		while (i < pairs.length) {
+			var _pairs$i = pairs[i];
+			const name = _pairs$i[0],
+			      value = _pairs$i[1];
+
+			callback.call(thisArg, value, name, this);
+			pairs = getHeaders(this);
+			i++;
+		}
+	}
+
+	/**
+  * Overwrite header values given name
+  *
+  * @param   String  name   Header name
+  * @param   String  value  Header value
+  * @return  Void
+  */
+	set(name, value) {
+		name = `${name}`;
+		value = `${value}`;
+		validateName(name);
+		validateValue(value);
+		const key = find(this[MAP], name);
+		this[MAP][key !== undefined ? key : name] = [value];
+	}
+
+	/**
+  * Append a value onto existing header
+  *
+  * @param   String  name   Header name
+  * @param   String  value  Header value
+  * @return  Void
+  */
+	append(name, value) {
+		name = `${name}`;
+		value = `${value}`;
+		validateName(name);
+		validateValue(value);
+		const key = find(this[MAP], name);
+		if (key !== undefined) {
+			this[MAP][key].push(value);
+		} else {
+			this[MAP][name] = [value];
+		}
+	}
+
+	/**
+  * Check for header name existence
+  *
+  * @param   String   name  Header name
+  * @return  Boolean
+  */
+	has(name) {
+		name = `${name}`;
+		validateName(name);
+		return find(this[MAP], name) !== undefined;
+	}
+
+	/**
+  * Delete all header values given name
+  *
+  * @param   String  name  Header name
+  * @return  Void
+  */
+	delete(name) {
+		name = `${name}`;
+		validateName(name);
+		const key = find(this[MAP], name);
+		if (key !== undefined) {
+			delete this[MAP][key];
+		}
+	}
+
+	/**
+  * Return raw headers (non-spec api)
+  *
+  * @return  Object
+  */
+	raw() {
+		return this[MAP];
+	}
+
+	/**
+  * Get an iterator on keys.
+  *
+  * @return  Iterator
+  */
+	keys() {
+		return createHeadersIterator(this, 'key');
+	}
+
+	/**
+  * Get an iterator on values.
+  *
+  * @return  Iterator
+  */
+	values() {
+		return createHeadersIterator(this, 'value');
+	}
+
+	/**
+  * Get an iterator on entries.
+  *
+  * This is the default iterator of the Headers object.
+  *
+  * @return  Iterator
+  */
+	[Symbol.iterator]() {
+		return createHeadersIterator(this, 'key+value');
+	}
+}
+Headers.prototype.entries = Headers.prototype[Symbol.iterator];
+
+Object.defineProperty(Headers.prototype, Symbol.toStringTag, {
+	value: 'Headers',
+	writable: false,
+	enumerable: false,
+	configurable: true
+});
+
+Object.defineProperties(Headers.prototype, {
+	get: { enumerable: true },
+	forEach: { enumerable: true },
+	set: { enumerable: true },
+	append: { enumerable: true },
+	has: { enumerable: true },
+	delete: { enumerable: true },
+	keys: { enumerable: true },
+	values: { enumerable: true },
+	entries: { enumerable: true }
+});
+
+function getHeaders(headers) {
+	let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';
+
+	const keys = Object.keys(headers[MAP]).sort();
+	return keys.map(kind === 'key' ? function (k) {
+		return k.toLowerCase();
+	} : kind === 'value' ? function (k) {
+		return headers[MAP][k].join(', ');
+	} : function (k) {
+		return [k.toLowerCase(), headers[MAP][k].join(', ')];
+	});
+}
+
+const INTERNAL = Symbol('internal');
+
+function createHeadersIterator(target, kind) {
+	const iterator = Object.create(HeadersIteratorPrototype);
+	iterator[INTERNAL] = {
+		target,
+		kind,
+		index: 0
+	};
+	return iterator;
+}
+
+const HeadersIteratorPrototype = Object.setPrototypeOf({
+	next() {
+		// istanbul ignore if
+		if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {
+			throw new TypeError('Value of `this` is not a HeadersIterator');
+		}
+
+		var _INTERNAL = this[INTERNAL];
+		const target = _INTERNAL.target,
+		      kind = _INTERNAL.kind,
+		      index = _INTERNAL.index;
+
+		const values = getHeaders(target, kind);
+		const len = values.length;
+		if (index >= len) {
+			return {
+				value: undefined,
+				done: true
+			};
+		}
+
+		this[INTERNAL].index = index + 1;
+
+		return {
+			value: values[index],
+			done: false
+		};
+	}
+}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));
+
+Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {
+	value: 'HeadersIterator',
+	writable: false,
+	enumerable: false,
+	configurable: true
+});
+
+/**
+ * Export the Headers object in a form that Node.js can consume.
+ *
+ * @param   Headers  headers
+ * @return  Object
+ */
+function exportNodeCompatibleHeaders(headers) {
+	const obj = Object.assign({ __proto__: null }, headers[MAP]);
+
+	// http.request() only supports string as Host header. This hack makes
+	// specifying custom Host header possible.
+	const hostHeaderKey = find(headers[MAP], 'Host');
+	if (hostHeaderKey !== undefined) {
+		obj[hostHeaderKey] = obj[hostHeaderKey][0];
+	}
+
+	return obj;
+}
+
+/**
+ * Create a Headers object from an object of headers, ignoring those that do
+ * not conform to HTTP grammar productions.
+ *
+ * @param   Object  obj  Object of headers
+ * @return  Headers
+ */
+function createHeadersLenient(obj) {
+	const headers = new Headers();
+	for (const name of Object.keys(obj)) {
+		if (invalidTokenRegex.test(name)) {
+			continue;
+		}
+		if (Array.isArray(obj[name])) {
+			for (const val of obj[name]) {
+				if (invalidHeaderCharRegex.test(val)) {
+					continue;
+				}
+				if (headers[MAP][name] === undefined) {
+					headers[MAP][name] = [val];
+				} else {
+					headers[MAP][name].push(val);
+				}
+			}
+		} else if (!invalidHeaderCharRegex.test(obj[name])) {
+			headers[MAP][name] = [obj[name]];
+		}
+	}
+	return headers;
+}
+
+const INTERNALS$1 = Symbol('Response internals');
+
+// fix an issue where "STATUS_CODES" aren't a named export for node <10
+const STATUS_CODES = http.STATUS_CODES;
+
+/**
+ * Response class
+ *
+ * @param   Stream  body  Readable stream
+ * @param   Object  opts  Response options
+ * @return  Void
+ */
+class Response {
+	constructor() {
+		let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
+		let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+		Body.call(this, body, opts);
+
+		const status = opts.status || 200;
+		const headers = new Headers(opts.headers);
+
+		if (body != null && !headers.has('Content-Type')) {
+			const contentType = extractContentType(body);
+			if (contentType) {
+				headers.append('Content-Type', contentType);
+			}
+		}
+
+		this[INTERNALS$1] = {
+			url: opts.url,
+			status,
+			statusText: opts.statusText || STATUS_CODES[status],
+			headers,
+			counter: opts.counter
+		};
+	}
+
+	get url() {
+		return this[INTERNALS$1].url || '';
+	}
+
+	get status() {
+		return this[INTERNALS$1].status;
+	}
+
+	/**
+  * Convenience property representing if the request ended normally
+  */
+	get ok() {
+		return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;
+	}
+
+	get redirected() {
+		return this[INTERNALS$1].counter > 0;
+	}
+
+	get statusText() {
+		return this[INTERNALS$1].statusText;
+	}
+
+	get headers() {
+		return this[INTERNALS$1].headers;
+	}
+
+	/**
+  * Clone this response
+  *
+  * @return  Response
+  */
+	clone() {
+		return new Response(clone(this), {
+			url: this.url,
+			status: this.status,
+			statusText: this.statusText,
+			headers: this.headers,
+			ok: this.ok,
+			redirected: this.redirected
+		});
+	}
+}
+
+Body.mixIn(Response.prototype);
+
+Object.defineProperties(Response.prototype, {
+	url: { enumerable: true },
+	status: { enumerable: true },
+	ok: { enumerable: true },
+	redirected: { enumerable: true },
+	statusText: { enumerable: true },
+	headers: { enumerable: true },
+	clone: { enumerable: true }
+});
+
+Object.defineProperty(Response.prototype, Symbol.toStringTag, {
+	value: 'Response',
+	writable: false,
+	enumerable: false,
+	configurable: true
+});
+
+const INTERNALS$2 = Symbol('Request internals');
+
+// fix an issue where "format", "parse" aren't a named export for node <10
+const parse_url = Url.parse;
+const format_url = Url.format;
+
+const streamDestructionSupported = 'destroy' in Stream.Readable.prototype;
+
+/**
+ * Check if a value is an instance of Request.
+ *
+ * @param   Mixed   input
+ * @return  Boolean
+ */
+function isRequest(input) {
+	return typeof input === 'object' && typeof input[INTERNALS$2] === 'object';
+}
+
+function isAbortSignal(signal) {
+	const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);
+	return !!(proto && proto.constructor.name === 'AbortSignal');
+}
+
+/**
+ * Request class
+ *
+ * @param   Mixed   input  Url or Request instance
+ * @param   Object  init   Custom options
+ * @return  Void
+ */
+class Request {
+	constructor(input) {
+		let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+		let parsedURL;
+
+		// normalize input
+		if (!isRequest(input)) {
+			if (input && input.href) {
+				// in order to support Node.js' Url objects; though WHATWG's URL objects
+				// will fall into this branch also (since their `toString()` will return
+				// `href` property anyway)
+				parsedURL = parse_url(input.href);
+			} else {
+				// coerce input to a string before attempting to parse
+				parsedURL = parse_url(`${input}`);
+			}
+			input = {};
+		} else {
+			parsedURL = parse_url(input.url);
+		}
+
+		let method = init.method || input.method || 'GET';
+		method = method.toUpperCase();
+
+		if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {
+			throw new TypeError('Request with GET/HEAD method cannot have body');
+		}
+
+		let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;
+
+		Body.call(this, inputBody, {
+			timeout: init.timeout || input.timeout || 0,
+			size: init.size || input.size || 0
+		});
+
+		const headers = new Headers(init.headers || input.headers || {});
+
+		if (inputBody != null && !headers.has('Content-Type')) {
+			const contentType = extractContentType(inputBody);
+			if (contentType) {
+				headers.append('Content-Type', contentType);
+			}
+		}
+
+		let signal = isRequest(input) ? input.signal : null;
+		if ('signal' in init) signal = init.signal;
+
+		if (signal != null && !isAbortSignal(signal)) {
+			throw new TypeError('Expected signal to be an instanceof AbortSignal');
+		}
+
+		this[INTERNALS$2] = {
+			method,
+			redirect: init.redirect || input.redirect || 'follow',
+			headers,
+			parsedURL,
+			signal
+		};
+
+		// node-fetch-only options
+		this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;
+		this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;
+		this.counter = init.counter || input.counter || 0;
+		this.agent = init.agent || input.agent;
+	}
+
+	get method() {
+		return this[INTERNALS$2].method;
+	}
+
+	get url() {
+		return format_url(this[INTERNALS$2].parsedURL);
+	}
+
+	get headers() {
+		return this[INTERNALS$2].headers;
+	}
+
+	get redirect() {
+		return this[INTERNALS$2].redirect;
+	}
+
+	get signal() {
+		return this[INTERNALS$2].signal;
+	}
+
+	/**
+  * Clone this request
+  *
+  * @return  Request
+  */
+	clone() {
+		return new Request(this);
+	}
+}
+
+Body.mixIn(Request.prototype);
+
+Object.defineProperty(Request.prototype, Symbol.toStringTag, {
+	value: 'Request',
+	writable: false,
+	enumerable: false,
+	configurable: true
+});
+
+Object.defineProperties(Request.prototype, {
+	method: { enumerable: true },
+	url: { enumerable: true },
+	headers: { enumerable: true },
+	redirect: { enumerable: true },
+	clone: { enumerable: true },
+	signal: { enumerable: true }
+});
+
+/**
+ * Convert a Request to Node.js http request options.
+ *
+ * @param   Request  A Request instance
+ * @return  Object   The options object to be passed to http.request
+ */
+function getNodeRequestOptions(request) {
+	const parsedURL = request[INTERNALS$2].parsedURL;
+	const headers = new Headers(request[INTERNALS$2].headers);
+
+	// fetch step 1.3
+	if (!headers.has('Accept')) {
+		headers.set('Accept', '*/*');
+	}
+
+	// Basic fetch
+	if (!parsedURL.protocol || !parsedURL.hostname) {
+		throw new TypeError('Only absolute URLs are supported');
+	}
+
+	if (!/^https?:$/.test(parsedURL.protocol)) {
+		throw new TypeError('Only HTTP(S) protocols are supported');
+	}
+
+	if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {
+		throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');
+	}
+
+	// HTTP-network-or-cache fetch steps 2.4-2.7
+	let contentLengthValue = null;
+	if (request.body == null && /^(POST|PUT)$/i.test(request.method)) {
+		contentLengthValue = '0';
+	}
+	if (request.body != null) {
+		const totalBytes = getTotalBytes(request);
+		if (typeof totalBytes === 'number') {
+			contentLengthValue = String(totalBytes);
+		}
+	}
+	if (contentLengthValue) {
+		headers.set('Content-Length', contentLengthValue);
+	}
+
+	// HTTP-network-or-cache fetch step 2.11
+	if (!headers.has('User-Agent')) {
+		headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');
+	}
+
+	// HTTP-network-or-cache fetch step 2.15
+	if (request.compress && !headers.has('Accept-Encoding')) {
+		headers.set('Accept-Encoding', 'gzip,deflate');
+	}
+
+	let agent = request.agent;
+	if (typeof agent === 'function') {
+		agent = agent(parsedURL);
+	}
+
+	if (!headers.has('Connection') && !agent) {
+		headers.set('Connection', 'close');
+	}
+
+	// HTTP-network fetch step 4.2
+	// chunked encoding is handled by Node.js
+
+	return Object.assign({}, parsedURL, {
+		method: request.method,
+		headers: exportNodeCompatibleHeaders(headers),
+		agent
+	});
+}
+
+/**
+ * abort-error.js
+ *
+ * AbortError interface for cancelled requests
+ */
+
+/**
+ * Create AbortError instance
+ *
+ * @param   String      message      Error message for human
+ * @return  AbortError
+ */
+function AbortError(message) {
+  Error.call(this, message);
+
+  this.type = 'aborted';
+  this.message = message;
+
+  // hide custom error implementation details from end-users
+  Error.captureStackTrace(this, this.constructor);
+}
+
+AbortError.prototype = Object.create(Error.prototype);
+AbortError.prototype.constructor = AbortError;
+AbortError.prototype.name = 'AbortError';
+
+// fix an issue where "PassThrough", "resolve" aren't a named export for node <10
+const PassThrough$1 = Stream.PassThrough;
+const resolve_url = Url.resolve;
+
+/**
+ * Fetch function
+ *
+ * @param   Mixed    url   Absolute url or Request instance
+ * @param   Object   opts  Fetch options
+ * @return  Promise
+ */
+function fetch(url, opts) {
+
+	// allow custom promise
+	if (!fetch.Promise) {
+		throw new Error('native promise missing, set fetch.Promise to your favorite alternative');
+	}
+
+	Body.Promise = fetch.Promise;
+
+	// wrap http.request into fetch
+	return new fetch.Promise(function (resolve, reject) {
+		// build request object
+		const request = new Request(url, opts);
+		const options = getNodeRequestOptions(request);
+
+		const send = (options.protocol === 'https:' ? https : http).request;
+		const signal = request.signal;
+
+		let response = null;
+
+		const abort = function abort() {
+			let error = new AbortError('The user aborted a request.');
+			reject(error);
+			if (request.body && request.body instanceof Stream.Readable) {
+				request.body.destroy(error);
+			}
+			if (!response || !response.body) return;
+			response.body.emit('error', error);
+		};
+
+		if (signal && signal.aborted) {
+			abort();
+			return;
+		}
+
+		const abortAndFinalize = function abortAndFinalize() {
+			abort();
+			finalize();
+		};
+
+		// send request
+		const req = send(options);
+		let reqTimeout;
+
+		if (signal) {
+			signal.addEventListener('abort', abortAndFinalize);
+		}
+
+		function finalize() {
+			req.abort();
+			if (signal) signal.removeEventListener('abort', abortAndFinalize);
+			clearTimeout(reqTimeout);
+		}
+
+		if (request.timeout) {
+			req.once('socket', function (socket) {
+				reqTimeout = setTimeout(function () {
+					reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));
+					finalize();
+				}, request.timeout);
+			});
+		}
+
+		req.on('error', function (err) {
+			reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
+			finalize();
+		});
+
+		req.on('response', function (res) {
+			clearTimeout(reqTimeout);
+
+			const headers = createHeadersLenient(res.headers);
+
+			// HTTP fetch step 5
+			if (fetch.isRedirect(res.statusCode)) {
+				// HTTP fetch step 5.2
+				const location = headers.get('Location');
+
+				// HTTP fetch step 5.3
+				const locationURL = location === null ? null : resolve_url(request.url, location);
+
+				// HTTP fetch step 5.5
+				switch (request.redirect) {
+					case 'error':
+						reject(new FetchError(`redirect mode is set to error: ${request.url}`, 'no-redirect'));
+						finalize();
+						return;
+					case 'manual':
+						// node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.
+						if (locationURL !== null) {
+							// handle corrupted header
+							try {
+								headers.set('Location', locationURL);
+							} catch (err) {
+								// istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request
+								reject(err);
+							}
+						}
+						break;
+					case 'follow':
+						// HTTP-redirect fetch step 2
+						if (locationURL === null) {
+							break;
+						}
+
+						// HTTP-redirect fetch step 5
+						if (request.counter >= request.follow) {
+							reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));
+							finalize();
+							return;
+						}
+
+						// HTTP-redirect fetch step 6 (counter increment)
+						// Create a new Request object.
+						const requestOpts = {
+							headers: new Headers(request.headers),
+							follow: request.follow,
+							counter: request.counter + 1,
+							agent: request.agent,
+							compress: request.compress,
+							method: request.method,
+							body: request.body,
+							signal: request.signal,
+							timeout: request.timeout
+						};
+
+						// HTTP-redirect fetch step 9
+						if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {
+							reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));
+							finalize();
+							return;
+						}
+
+						// HTTP-redirect fetch step 11
+						if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {
+							requestOpts.method = 'GET';
+							requestOpts.body = undefined;
+							requestOpts.headers.delete('content-length');
+						}
+
+						// HTTP-redirect fetch step 15
+						resolve(fetch(new Request(locationURL, requestOpts)));
+						finalize();
+						return;
+				}
+			}
+
+			// prepare response
+			res.once('end', function () {
+				if (signal) signal.removeEventListener('abort', abortAndFinalize);
+			});
+			let body = res.pipe(new PassThrough$1());
+
+			const response_options = {
+				url: request.url,
+				status: res.statusCode,
+				statusText: res.statusMessage,
+				headers: headers,
+				size: request.size,
+				timeout: request.timeout,
+				counter: request.counter
+			};
+
+			// HTTP-network fetch step 12.1.1.3
+			const codings = headers.get('Content-Encoding');
+
+			// HTTP-network fetch step 12.1.1.4: handle content codings
+
+			// in following scenarios we ignore compression support
+			// 1. compression support is disabled
+			// 2. HEAD request
+			// 3. no Content-Encoding header
+			// 4. no content response (204)
+			// 5. content not modified response (304)
+			if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {
+				response = new Response(body, response_options);
+				resolve(response);
+				return;
+			}
+
+			// For Node v6+
+			// Be less strict when decoding compressed responses, since sometimes
+			// servers send slightly invalid responses that are still accepted
+			// by common browsers.
+			// Always using Z_SYNC_FLUSH is what cURL does.
+			const zlibOptions = {
+				flush: zlib.Z_SYNC_FLUSH,
+				finishFlush: zlib.Z_SYNC_FLUSH
+			};
+
+			// for gzip
+			if (codings == 'gzip' || codings == 'x-gzip') {
+				body = body.pipe(zlib.createGunzip(zlibOptions));
+				response = new Response(body, response_options);
+				resolve(response);
+				return;
+			}
+
+			// for deflate
+			if (codings == 'deflate' || codings == 'x-deflate') {
+				// handle the infamous raw deflate response from old servers
+				// a hack for old IIS and Apache servers
+				const raw = res.pipe(new PassThrough$1());
+				raw.once('data', function (chunk) {
+					// see http://stackoverflow.com/questions/37519828
+					if ((chunk[0] & 0x0F) === 0x08) {
+						body = body.pipe(zlib.createInflate());
+					} else {
+						body = body.pipe(zlib.createInflateRaw());
+					}
+					response = new Response(body, response_options);
+					resolve(response);
+				});
+				return;
+			}
+
+			// for br
+			if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {
+				body = body.pipe(zlib.createBrotliDecompress());
+				response = new Response(body, response_options);
+				resolve(response);
+				return;
+			}
+
+			// otherwise, use response as-is
+			response = new Response(body, response_options);
+			resolve(response);
+		});
+
+		writeToStream(req, request);
+	});
+}
+/**
+ * Redirect code matching
+ *
+ * @param   Number   code  Status code
+ * @return  Boolean
+ */
+fetch.isRedirect = function (code) {
+	return code === 301 || code === 302 || code === 303 || code === 307 || code === 308;
+};
+
+// expose Promise
+fetch.Promise = global.Promise;
+
+export default fetch;
+export { Headers, Request, Response, FetchError };

+ 1642 - 0
node_modules/node-fetch/lib/index.js

@@ -0,0 +1,1642 @@
+'use strict';
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
+
+var Stream = _interopDefault(require('stream'));
+var http = _interopDefault(require('http'));
+var Url = _interopDefault(require('url'));
+var https = _interopDefault(require('https'));
+var zlib = _interopDefault(require('zlib'));
+
+// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js
+
+// fix for "Readable" isn't a named export issue
+const Readable = Stream.Readable;
+
+const BUFFER = Symbol('buffer');
+const TYPE = Symbol('type');
+
+class Blob {
+	constructor() {
+		this[TYPE] = '';
+
+		const blobParts = arguments[0];
+		const options = arguments[1];
+
+		const buffers = [];
+		let size = 0;
+
+		if (blobParts) {
+			const a = blobParts;
+			const length = Number(a.length);
+			for (let i = 0; i < length; i++) {
+				const element = a[i];
+				let buffer;
+				if (element instanceof Buffer) {
+					buffer = element;
+				} else if (ArrayBuffer.isView(element)) {
+					buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);
+				} else if (element instanceof ArrayBuffer) {
+					buffer = Buffer.from(element);
+				} else if (element instanceof Blob) {
+					buffer = element[BUFFER];
+				} else {
+					buffer = Buffer.from(typeof element === 'string' ? element : String(element));
+				}
+				size += buffer.length;
+				buffers.push(buffer);
+			}
+		}
+
+		this[BUFFER] = Buffer.concat(buffers);
+
+		let type = options && options.type !== undefined && String(options.type).toLowerCase();
+		if (type && !/[^\u0020-\u007E]/.test(type)) {
+			this[TYPE] = type;
+		}
+	}
+	get size() {
+		return this[BUFFER].length;
+	}
+	get type() {
+		return this[TYPE];
+	}
+	text() {
+		return Promise.resolve(this[BUFFER].toString());
+	}
+	arrayBuffer() {
+		const buf = this[BUFFER];
+		const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
+		return Promise.resolve(ab);
+	}
+	stream() {
+		const readable = new Readable();
+		readable._read = function () {};
+		readable.push(this[BUFFER]);
+		readable.push(null);
+		return readable;
+	}
+	toString() {
+		return '[object Blob]';
+	}
+	slice() {
+		const size = this.size;
+
+		const start = arguments[0];
+		const end = arguments[1];
+		let relativeStart, relativeEnd;
+		if (start === undefined) {
+			relativeStart = 0;
+		} else if (start < 0) {
+			relativeStart = Math.max(size + start, 0);
+		} else {
+			relativeStart = Math.min(start, size);
+		}
+		if (end === undefined) {
+			relativeEnd = size;
+		} else if (end < 0) {
+			relativeEnd = Math.max(size + end, 0);
+		} else {
+			relativeEnd = Math.min(end, size);
+		}
+		const span = Math.max(relativeEnd - relativeStart, 0);
+
+		const buffer = this[BUFFER];
+		const slicedBuffer = buffer.slice(relativeStart, relativeStart + span);
+		const blob = new Blob([], { type: arguments[2] });
+		blob[BUFFER] = slicedBuffer;
+		return blob;
+	}
+}
+
+Object.defineProperties(Blob.prototype, {
+	size: { enumerable: true },
+	type: { enumerable: true },
+	slice: { enumerable: true }
+});
+
+Object.defineProperty(Blob.prototype, Symbol.toStringTag, {
+	value: 'Blob',
+	writable: false,
+	enumerable: false,
+	configurable: true
+});
+
+/**
+ * fetch-error.js
+ *
+ * FetchError interface for operational errors
+ */
+
+/**
+ * Create FetchError instance
+ *
+ * @param   String      message      Error message for human
+ * @param   String      type         Error type for machine
+ * @param   String      systemError  For Node.js system error
+ * @return  FetchError
+ */
+function FetchError(message, type, systemError) {
+  Error.call(this, message);
+
+  this.message = message;
+  this.type = type;
+
+  // when err.type is `system`, err.code contains system error code
+  if (systemError) {
+    this.code = this.errno = systemError.code;
+  }
+
+  // hide custom error implementation details from end-users
+  Error.captureStackTrace(this, this.constructor);
+}
+
+FetchError.prototype = Object.create(Error.prototype);
+FetchError.prototype.constructor = FetchError;
+FetchError.prototype.name = 'FetchError';
+
+let convert;
+try {
+	convert = require('encoding').convert;
+} catch (e) {}
+
+const INTERNALS = Symbol('Body internals');
+
+// fix an issue where "PassThrough" isn't a named export for node <10
+const PassThrough = Stream.PassThrough;
+
+/**
+ * Body mixin
+ *
+ * Ref: https://fetch.spec.whatwg.org/#body
+ *
+ * @param   Stream  body  Readable stream
+ * @param   Object  opts  Response options
+ * @return  Void
+ */
+function Body(body) {
+	var _this = this;
+
+	var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
+	    _ref$size = _ref.size;
+
+	let size = _ref$size === undefined ? 0 : _ref$size;
+	var _ref$timeout = _ref.timeout;
+	let timeout = _ref$timeout === undefined ? 0 : _ref$timeout;
+
+	if (body == null) {
+		// body is undefined or null
+		body = null;
+	} else if (isURLSearchParams(body)) {
+		// body is a URLSearchParams
+		body = Buffer.from(body.toString());
+	} else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
+		// body is ArrayBuffer
+		body = Buffer.from(body);
+	} else if (ArrayBuffer.isView(body)) {
+		// body is ArrayBufferView
+		body = Buffer.from(body.buffer, body.byteOffset, body.byteLength);
+	} else if (body instanceof Stream) ; else {
+		// none of the above
+		// coerce to string then buffer
+		body = Buffer.from(String(body));
+	}
+	this[INTERNALS] = {
+		body,
+		disturbed: false,
+		error: null
+	};
+	this.size = size;
+	this.timeout = timeout;
+
+	if (body instanceof Stream) {
+		body.on('error', function (err) {
+			const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);
+			_this[INTERNALS].error = error;
+		});
+	}
+}
+
+Body.prototype = {
+	get body() {
+		return this[INTERNALS].body;
+	},
+
+	get bodyUsed() {
+		return this[INTERNALS].disturbed;
+	},
+
+	/**
+  * Decode response as ArrayBuffer
+  *
+  * @return  Promise
+  */
+	arrayBuffer() {
+		return consumeBody.call(this).then(function (buf) {
+			return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
+		});
+	},
+
+	/**
+  * Return raw response as Blob
+  *
+  * @return Promise
+  */
+	blob() {
+		let ct = this.headers && this.headers.get('content-type') || '';
+		return consumeBody.call(this).then(function (buf) {
+			return Object.assign(
+			// Prevent copying
+			new Blob([], {
+				type: ct.toLowerCase()
+			}), {
+				[BUFFER]: buf
+			});
+		});
+	},
+
+	/**
+  * Decode response as json
+  *
+  * @return  Promise
+  */
+	json() {
+		var _this2 = this;
+
+		return consumeBody.call(this).then(function (buffer) {
+			try {
+				return JSON.parse(buffer.toString());
+			} catch (err) {
+				return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
+			}
+		});
+	},
+
+	/**
+  * Decode response as text
+  *
+  * @return  Promise
+  */
+	text() {
+		return consumeBody.call(this).then(function (buffer) {
+			return buffer.toString();
+		});
+	},
+
+	/**
+  * Decode response as buffer (non-spec api)
+  *
+  * @return  Promise
+  */
+	buffer() {
+		return consumeBody.call(this);
+	},
+
+	/**
+  * Decode response as text, while automatically detecting the encoding and
+  * trying to decode to UTF-8 (non-spec api)
+  *
+  * @return  Promise
+  */
+	textConverted() {
+		var _this3 = this;
+
+		return consumeBody.call(this).then(function (buffer) {
+			return convertBody(buffer, _this3.headers);
+		});
+	}
+};
+
+// In browsers, all properties are enumerable.
+Object.defineProperties(Body.prototype, {
+	body: { enumerable: true },
+	bodyUsed: { enumerable: true },
+	arrayBuffer: { enumerable: true },
+	blob: { enumerable: true },
+	json: { enumerable: true },
+	text: { enumerable: true }
+});
+
+Body.mixIn = function (proto) {
+	for (const name of Object.getOwnPropertyNames(Body.prototype)) {
+		// istanbul ignore else: future proof
+		if (!(name in proto)) {
+			const desc = Object.getOwnPropertyDescriptor(Body.prototype, name);
+			Object.defineProperty(proto, name, desc);
+		}
+	}
+};
+
+/**
+ * Consume and convert an entire Body to a Buffer.
+ *
+ * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body
+ *
+ * @return  Promise
+ */
+function consumeBody() {
+	var _this4 = this;
+
+	if (this[INTERNALS].disturbed) {
+		return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));
+	}
+
+	this[INTERNALS].disturbed = true;
+
+	if (this[INTERNALS].error) {
+		return Body.Promise.reject(this[INTERNALS].error);
+	}
+
+	let body = this.body;
+
+	// body is null
+	if (body === null) {
+		return Body.Promise.resolve(Buffer.alloc(0));
+	}
+
+	// body is blob
+	if (isBlob(body)) {
+		body = body.stream();
+	}
+
+	// body is buffer
+	if (Buffer.isBuffer(body)) {
+		return Body.Promise.resolve(body);
+	}
+
+	// istanbul ignore if: should never happen
+	if (!(body instanceof Stream)) {
+		return Body.Promise.resolve(Buffer.alloc(0));
+	}
+
+	// body is stream
+	// get ready to actually consume the body
+	let accum = [];
+	let accumBytes = 0;
+	let abort = false;
+
+	return new Body.Promise(function (resolve, reject) {
+		let resTimeout;
+
+		// allow timeout on slow response body
+		if (_this4.timeout) {
+			resTimeout = setTimeout(function () {
+				abort = true;
+				reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));
+			}, _this4.timeout);
+		}
+
+		// handle stream errors
+		body.on('error', function (err) {
+			if (err.name === 'AbortError') {
+				// if the request was aborted, reject with this Error
+				abort = true;
+				reject(err);
+			} else {
+				// other errors, such as incorrect content-encoding
+				reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));
+			}
+		});
+
+		body.on('data', function (chunk) {
+			if (abort || chunk === null) {
+				return;
+			}
+
+			if (_this4.size && accumBytes + chunk.length > _this4.size) {
+				abort = true;
+				reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));
+				return;
+			}
+
+			accumBytes += chunk.length;
+			accum.push(chunk);
+		});
+
+		body.on('end', function () {
+			if (abort) {
+				return;
+			}
+
+			clearTimeout(resTimeout);
+
+			try {
+				resolve(Buffer.concat(accum, accumBytes));
+			} catch (err) {
+				// handle streams that have accumulated too much data (issue #414)
+				reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));
+			}
+		});
+	});
+}
+
+/**
+ * Detect buffer encoding and convert to target encoding
+ * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding
+ *
+ * @param   Buffer  buffer    Incoming buffer
+ * @param   String  encoding  Target encoding
+ * @return  String
+ */
+function convertBody(buffer, headers) {
+	if (typeof convert !== 'function') {
+		throw new Error('The package `encoding` must be installed to use the textConverted() function');
+	}
+
+	const ct = headers.get('content-type');
+	let charset = 'utf-8';
+	let res, str;
+
+	// header
+	if (ct) {
+		res = /charset=([^;]*)/i.exec(ct);
+	}
+
+	// no charset in content type, peek at response body for at most 1024 bytes
+	str = buffer.slice(0, 1024).toString();
+
+	// html5
+	if (!res && str) {
+		res = /<meta.+?charset=(['"])(.+?)\1/i.exec(str);
+	}
+
+	// html4
+	if (!res && str) {
+		res = /<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(str);
+
+		if (res) {
+			res = /charset=(.*)/i.exec(res.pop());
+		}
+	}
+
+	// xml
+	if (!res && str) {
+		res = /<\?xml.+?encoding=(['"])(.+?)\1/i.exec(str);
+	}
+
+	// found charset
+	if (res) {
+		charset = res.pop();
+
+		// prevent decode issues when sites use incorrect encoding
+		// ref: https://hsivonen.fi/encoding-menu/
+		if (charset === 'gb2312' || charset === 'gbk') {
+			charset = 'gb18030';
+		}
+	}
+
+	// turn raw buffers into a single utf-8 buffer
+	return convert(buffer, 'UTF-8', charset).toString();
+}
+
+/**
+ * Detect a URLSearchParams object
+ * ref: https://github.com/bitinn/node-fetch/issues/296#issuecomment-307598143
+ *
+ * @param   Object  obj     Object to detect by type or brand
+ * @return  String
+ */
+function isURLSearchParams(obj) {
+	// Duck-typing as a necessary condition.
+	if (typeof obj !== 'object' || typeof obj.append !== 'function' || typeof obj.delete !== 'function' || typeof obj.get !== 'function' || typeof obj.getAll !== 'function' || typeof obj.has !== 'function' || typeof obj.set !== 'function') {
+		return false;
+	}
+
+	// Brand-checking and more duck-typing as optional condition.
+	return obj.constructor.name === 'URLSearchParams' || Object.prototype.toString.call(obj) === '[object URLSearchParams]' || typeof obj.sort === 'function';
+}
+
+/**
+ * Check if `obj` is a W3C `Blob` object (which `File` inherits from)
+ * @param  {*} obj
+ * @return {boolean}
+ */
+function isBlob(obj) {
+	return typeof obj === 'object' && typeof obj.arrayBuffer === 'function' && typeof obj.type === 'string' && typeof obj.stream === 'function' && typeof obj.constructor === 'function' && typeof obj.constructor.name === 'string' && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]);
+}
+
+/**
+ * Clone body given Res/Req instance
+ *
+ * @param   Mixed  instance  Response or Request instance
+ * @return  Mixed
+ */
+function clone(instance) {
+	let p1, p2;
+	let body = instance.body;
+
+	// don't allow cloning a used body
+	if (instance.bodyUsed) {
+		throw new Error('cannot clone body after it is used');
+	}
+
+	// check that body is a stream and not form-data object
+	// note: we can't clone the form-data object without having it as a dependency
+	if (body instanceof Stream && typeof body.getBoundary !== 'function') {
+		// tee instance body
+		p1 = new PassThrough();
+		p2 = new PassThrough();
+		body.pipe(p1);
+		body.pipe(p2);
+		// set instance body to teed body and return the other teed body
+		instance[INTERNALS].body = p1;
+		body = p2;
+	}
+
+	return body;
+}
+
+/**
+ * Performs the operation "extract a `Content-Type` value from |object|" as
+ * specified in the specification:
+ * https://fetch.spec.whatwg.org/#concept-bodyinit-extract
+ *
+ * This function assumes that instance.body is present.
+ *
+ * @param   Mixed  instance  Any options.body input
+ */
+function extractContentType(body) {
+	if (body === null) {
+		// body is null
+		return null;
+	} else if (typeof body === 'string') {
+		// body is string
+		return 'text/plain;charset=UTF-8';
+	} else if (isURLSearchParams(body)) {
+		// body is a URLSearchParams
+		return 'application/x-www-form-urlencoded;charset=UTF-8';
+	} else if (isBlob(body)) {
+		// body is blob
+		return body.type || null;
+	} else if (Buffer.isBuffer(body)) {
+		// body is buffer
+		return null;
+	} else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
+		// body is ArrayBuffer
+		return null;
+	} else if (ArrayBuffer.isView(body)) {
+		// body is ArrayBufferView
+		return null;
+	} else if (typeof body.getBoundary === 'function') {
+		// detect form data input from form-data module
+		return `multipart/form-data;boundary=${body.getBoundary()}`;
+	} else if (body instanceof Stream) {
+		// body is stream
+		// can't really do much about this
+		return null;
+	} else {
+		// Body constructor defaults other things to string
+		return 'text/plain;charset=UTF-8';
+	}
+}
+
+/**
+ * The Fetch Standard treats this as if "total bytes" is a property on the body.
+ * For us, we have to explicitly get it with a function.
+ *
+ * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes
+ *
+ * @param   Body    instance   Instance of Body
+ * @return  Number?            Number of bytes, or null if not possible
+ */
+function getTotalBytes(instance) {
+	const body = instance.body;
+
+
+	if (body === null) {
+		// body is null
+		return 0;
+	} else if (isBlob(body)) {
+		return body.size;
+	} else if (Buffer.isBuffer(body)) {
+		// body is buffer
+		return body.length;
+	} else if (body && typeof body.getLengthSync === 'function') {
+		// detect form data input from form-data module
+		if (body._lengthRetrievers && body._lengthRetrievers.length == 0 || // 1.x
+		body.hasKnownLength && body.hasKnownLength()) {
+			// 2.x
+			return body.getLengthSync();
+		}
+		return null;
+	} else {
+		// body is stream
+		return null;
+	}
+}
+
+/**
+ * Write a Body to a Node.js WritableStream (e.g. http.Request) object.
+ *
+ * @param   Body    instance   Instance of Body
+ * @return  Void
+ */
+function writeToStream(dest, instance) {
+	const body = instance.body;
+
+
+	if (body === null) {
+		// body is null
+		dest.end();
+	} else if (isBlob(body)) {
+		body.stream().pipe(dest);
+	} else if (Buffer.isBuffer(body)) {
+		// body is buffer
+		dest.write(body);
+		dest.end();
+	} else {
+		// body is stream
+		body.pipe(dest);
+	}
+}
+
+// expose Promise
+Body.Promise = global.Promise;
+
+/**
+ * headers.js
+ *
+ * Headers class offers convenient helpers
+ */
+
+const invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/;
+const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/;
+
+function validateName(name) {
+	name = `${name}`;
+	if (invalidTokenRegex.test(name) || name === '') {
+		throw new TypeError(`${name} is not a legal HTTP header name`);
+	}
+}
+
+function validateValue(value) {
+	value = `${value}`;
+	if (invalidHeaderCharRegex.test(value)) {
+		throw new TypeError(`${value} is not a legal HTTP header value`);
+	}
+}
+
+/**
+ * Find the key in the map object given a header name.
+ *
+ * Returns undefined if not found.
+ *
+ * @param   String  name  Header name
+ * @return  String|Undefined
+ */
+function find(map, name) {
+	name = name.toLowerCase();
+	for (const key in map) {
+		if (key.toLowerCase() === name) {
+			return key;
+		}
+	}
+	return undefined;
+}
+
+const MAP = Symbol('map');
+class Headers {
+	/**
+  * Headers class
+  *
+  * @param   Object  headers  Response headers
+  * @return  Void
+  */
+	constructor() {
+		let init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
+
+		this[MAP] = Object.create(null);
+
+		if (init instanceof Headers) {
+			const rawHeaders = init.raw();
+			const headerNames = Object.keys(rawHeaders);
+
+			for (const headerName of headerNames) {
+				for (const value of rawHeaders[headerName]) {
+					this.append(headerName, value);
+				}
+			}
+
+			return;
+		}
+
+		// We don't worry about converting prop to ByteString here as append()
+		// will handle it.
+		if (init == null) ; else if (typeof init === 'object') {
+			const method = init[Symbol.iterator];
+			if (method != null) {
+				if (typeof method !== 'function') {
+					throw new TypeError('Header pairs must be iterable');
+				}
+
+				// sequence<sequence<ByteString>>
+				// Note: per spec we have to first exhaust the lists then process them
+				const pairs = [];
+				for (const pair of init) {
+					if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {
+						throw new TypeError('Each header pair must be iterable');
+					}
+					pairs.push(Array.from(pair));
+				}
+
+				for (const pair of pairs) {
+					if (pair.length !== 2) {
+						throw new TypeError('Each header pair must be a name/value tuple');
+					}
+					this.append(pair[0], pair[1]);
+				}
+			} else {
+				// record<ByteString, ByteString>
+				for (const key of Object.keys(init)) {
+					const value = init[key];
+					this.append(key, value);
+				}
+			}
+		} else {
+			throw new TypeError('Provided initializer must be an object');
+		}
+	}
+
+	/**
+  * Return combined header value given name
+  *
+  * @param   String  name  Header name
+  * @return  Mixed
+  */
+	get(name) {
+		name = `${name}`;
+		validateName(name);
+		const key = find(this[MAP], name);
+		if (key === undefined) {
+			return null;
+		}
+
+		return this[MAP][key].join(', ');
+	}
+
+	/**
+  * Iterate over all headers
+  *
+  * @param   Function  callback  Executed for each item with parameters (value, name, thisArg)
+  * @param   Boolean   thisArg   `this` context for callback function
+  * @return  Void
+  */
+	forEach(callback) {
+		let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
+
+		let pairs = getHeaders(this);
+		let i = 0;
+		while (i < pairs.length) {
+			var _pairs$i = pairs[i];
+			const name = _pairs$i[0],
+			      value = _pairs$i[1];
+
+			callback.call(thisArg, value, name, this);
+			pairs = getHeaders(this);
+			i++;
+		}
+	}
+
+	/**
+  * Overwrite header values given name
+  *
+  * @param   String  name   Header name
+  * @param   String  value  Header value
+  * @return  Void
+  */
+	set(name, value) {
+		name = `${name}`;
+		value = `${value}`;
+		validateName(name);
+		validateValue(value);
+		const key = find(this[MAP], name);
+		this[MAP][key !== undefined ? key : name] = [value];
+	}
+
+	/**
+  * Append a value onto existing header
+  *
+  * @param   String  name   Header name
+  * @param   String  value  Header value
+  * @return  Void
+  */
+	append(name, value) {
+		name = `${name}`;
+		value = `${value}`;
+		validateName(name);
+		validateValue(value);
+		const key = find(this[MAP], name);
+		if (key !== undefined) {
+			this[MAP][key].push(value);
+		} else {
+			this[MAP][name] = [value];
+		}
+	}
+
+	/**
+  * Check for header name existence
+  *
+  * @param   String   name  Header name
+  * @return  Boolean
+  */
+	has(name) {
+		name = `${name}`;
+		validateName(name);
+		return find(this[MAP], name) !== undefined;
+	}
+
+	/**
+  * Delete all header values given name
+  *
+  * @param   String  name  Header name
+  * @return  Void
+  */
+	delete(name) {
+		name = `${name}`;
+		validateName(name);
+		const key = find(this[MAP], name);
+		if (key !== undefined) {
+			delete this[MAP][key];
+		}
+	}
+
+	/**
+  * Return raw headers (non-spec api)
+  *
+  * @return  Object
+  */
+	raw() {
+		return this[MAP];
+	}
+
+	/**
+  * Get an iterator on keys.
+  *
+  * @return  Iterator
+  */
+	keys() {
+		return createHeadersIterator(this, 'key');
+	}
+
+	/**
+  * Get an iterator on values.
+  *
+  * @return  Iterator
+  */
+	values() {
+		return createHeadersIterator(this, 'value');
+	}
+
+	/**
+  * Get an iterator on entries.
+  *
+  * This is the default iterator of the Headers object.
+  *
+  * @return  Iterator
+  */
+	[Symbol.iterator]() {
+		return createHeadersIterator(this, 'key+value');
+	}
+}
+Headers.prototype.entries = Headers.prototype[Symbol.iterator];
+
+Object.defineProperty(Headers.prototype, Symbol.toStringTag, {
+	value: 'Headers',
+	writable: false,
+	enumerable: false,
+	configurable: true
+});
+
+Object.defineProperties(Headers.prototype, {
+	get: { enumerable: true },
+	forEach: { enumerable: true },
+	set: { enumerable: true },
+	append: { enumerable: true },
+	has: { enumerable: true },
+	delete: { enumerable: true },
+	keys: { enumerable: true },
+	values: { enumerable: true },
+	entries: { enumerable: true }
+});
+
+function getHeaders(headers) {
+	let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';
+
+	const keys = Object.keys(headers[MAP]).sort();
+	return keys.map(kind === 'key' ? function (k) {
+		return k.toLowerCase();
+	} : kind === 'value' ? function (k) {
+		return headers[MAP][k].join(', ');
+	} : function (k) {
+		return [k.toLowerCase(), headers[MAP][k].join(', ')];
+	});
+}
+
+const INTERNAL = Symbol('internal');
+
+function createHeadersIterator(target, kind) {
+	const iterator = Object.create(HeadersIteratorPrototype);
+	iterator[INTERNAL] = {
+		target,
+		kind,
+		index: 0
+	};
+	return iterator;
+}
+
+const HeadersIteratorPrototype = Object.setPrototypeOf({
+	next() {
+		// istanbul ignore if
+		if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {
+			throw new TypeError('Value of `this` is not a HeadersIterator');
+		}
+
+		var _INTERNAL = this[INTERNAL];
+		const target = _INTERNAL.target,
+		      kind = _INTERNAL.kind,
+		      index = _INTERNAL.index;
+
+		const values = getHeaders(target, kind);
+		const len = values.length;
+		if (index >= len) {
+			return {
+				value: undefined,
+				done: true
+			};
+		}
+
+		this[INTERNAL].index = index + 1;
+
+		return {
+			value: values[index],
+			done: false
+		};
+	}
+}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));
+
+Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {
+	value: 'HeadersIterator',
+	writable: false,
+	enumerable: false,
+	configurable: true
+});
+
+/**
+ * Export the Headers object in a form that Node.js can consume.
+ *
+ * @param   Headers  headers
+ * @return  Object
+ */
+function exportNodeCompatibleHeaders(headers) {
+	const obj = Object.assign({ __proto__: null }, headers[MAP]);
+
+	// http.request() only supports string as Host header. This hack makes
+	// specifying custom Host header possible.
+	const hostHeaderKey = find(headers[MAP], 'Host');
+	if (hostHeaderKey !== undefined) {
+		obj[hostHeaderKey] = obj[hostHeaderKey][0];
+	}
+
+	return obj;
+}
+
+/**
+ * Create a Headers object from an object of headers, ignoring those that do
+ * not conform to HTTP grammar productions.
+ *
+ * @param   Object  obj  Object of headers
+ * @return  Headers
+ */
+function createHeadersLenient(obj) {
+	const headers = new Headers();
+	for (const name of Object.keys(obj)) {
+		if (invalidTokenRegex.test(name)) {
+			continue;
+		}
+		if (Array.isArray(obj[name])) {
+			for (const val of obj[name]) {
+				if (invalidHeaderCharRegex.test(val)) {
+					continue;
+				}
+				if (headers[MAP][name] === undefined) {
+					headers[MAP][name] = [val];
+				} else {
+					headers[MAP][name].push(val);
+				}
+			}
+		} else if (!invalidHeaderCharRegex.test(obj[name])) {
+			headers[MAP][name] = [obj[name]];
+		}
+	}
+	return headers;
+}
+
+const INTERNALS$1 = Symbol('Response internals');
+
+// fix an issue where "STATUS_CODES" aren't a named export for node <10
+const STATUS_CODES = http.STATUS_CODES;
+
+/**
+ * Response class
+ *
+ * @param   Stream  body  Readable stream
+ * @param   Object  opts  Response options
+ * @return  Void
+ */
+class Response {
+	constructor() {
+		let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
+		let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+		Body.call(this, body, opts);
+
+		const status = opts.status || 200;
+		const headers = new Headers(opts.headers);
+
+		if (body != null && !headers.has('Content-Type')) {
+			const contentType = extractContentType(body);
+			if (contentType) {
+				headers.append('Content-Type', contentType);
+			}
+		}
+
+		this[INTERNALS$1] = {
+			url: opts.url,
+			status,
+			statusText: opts.statusText || STATUS_CODES[status],
+			headers,
+			counter: opts.counter
+		};
+	}
+
+	get url() {
+		return this[INTERNALS$1].url || '';
+	}
+
+	get status() {
+		return this[INTERNALS$1].status;
+	}
+
+	/**
+  * Convenience property representing if the request ended normally
+  */
+	get ok() {
+		return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;
+	}
+
+	get redirected() {
+		return this[INTERNALS$1].counter > 0;
+	}
+
+	get statusText() {
+		return this[INTERNALS$1].statusText;
+	}
+
+	get headers() {
+		return this[INTERNALS$1].headers;
+	}
+
+	/**
+  * Clone this response
+  *
+  * @return  Response
+  */
+	clone() {
+		return new Response(clone(this), {
+			url: this.url,
+			status: this.status,
+			statusText: this.statusText,
+			headers: this.headers,
+			ok: this.ok,
+			redirected: this.redirected
+		});
+	}
+}
+
+Body.mixIn(Response.prototype);
+
+Object.defineProperties(Response.prototype, {
+	url: { enumerable: true },
+	status: { enumerable: true },
+	ok: { enumerable: true },
+	redirected: { enumerable: true },
+	statusText: { enumerable: true },
+	headers: { enumerable: true },
+	clone: { enumerable: true }
+});
+
+Object.defineProperty(Response.prototype, Symbol.toStringTag, {
+	value: 'Response',
+	writable: false,
+	enumerable: false,
+	configurable: true
+});
+
+const INTERNALS$2 = Symbol('Request internals');
+
+// fix an issue where "format", "parse" aren't a named export for node <10
+const parse_url = Url.parse;
+const format_url = Url.format;
+
+const streamDestructionSupported = 'destroy' in Stream.Readable.prototype;
+
+/**
+ * Check if a value is an instance of Request.
+ *
+ * @param   Mixed   input
+ * @return  Boolean
+ */
+function isRequest(input) {
+	return typeof input === 'object' && typeof input[INTERNALS$2] === 'object';
+}
+
+function isAbortSignal(signal) {
+	const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);
+	return !!(proto && proto.constructor.name === 'AbortSignal');
+}
+
+/**
+ * Request class
+ *
+ * @param   Mixed   input  Url or Request instance
+ * @param   Object  init   Custom options
+ * @return  Void
+ */
+class Request {
+	constructor(input) {
+		let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+		let parsedURL;
+
+		// normalize input
+		if (!isRequest(input)) {
+			if (input && input.href) {
+				// in order to support Node.js' Url objects; though WHATWG's URL objects
+				// will fall into this branch also (since their `toString()` will return
+				// `href` property anyway)
+				parsedURL = parse_url(input.href);
+			} else {
+				// coerce input to a string before attempting to parse
+				parsedURL = parse_url(`${input}`);
+			}
+			input = {};
+		} else {
+			parsedURL = parse_url(input.url);
+		}
+
+		let method = init.method || input.method || 'GET';
+		method = method.toUpperCase();
+
+		if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {
+			throw new TypeError('Request with GET/HEAD method cannot have body');
+		}
+
+		let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;
+
+		Body.call(this, inputBody, {
+			timeout: init.timeout || input.timeout || 0,
+			size: init.size || input.size || 0
+		});
+
+		const headers = new Headers(init.headers || input.headers || {});
+
+		if (inputBody != null && !headers.has('Content-Type')) {
+			const contentType = extractContentType(inputBody);
+			if (contentType) {
+				headers.append('Content-Type', contentType);
+			}
+		}
+
+		let signal = isRequest(input) ? input.signal : null;
+		if ('signal' in init) signal = init.signal;
+
+		if (signal != null && !isAbortSignal(signal)) {
+			throw new TypeError('Expected signal to be an instanceof AbortSignal');
+		}
+
+		this[INTERNALS$2] = {
+			method,
+			redirect: init.redirect || input.redirect || 'follow',
+			headers,
+			parsedURL,
+			signal
+		};
+
+		// node-fetch-only options
+		this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;
+		this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;
+		this.counter = init.counter || input.counter || 0;
+		this.agent = init.agent || input.agent;
+	}
+
+	get method() {
+		return this[INTERNALS$2].method;
+	}
+
+	get url() {
+		return format_url(this[INTERNALS$2].parsedURL);
+	}
+
+	get headers() {
+		return this[INTERNALS$2].headers;
+	}
+
+	get redirect() {
+		return this[INTERNALS$2].redirect;
+	}
+
+	get signal() {
+		return this[INTERNALS$2].signal;
+	}
+
+	/**
+  * Clone this request
+  *
+  * @return  Request
+  */
+	clone() {
+		return new Request(this);
+	}
+}
+
+Body.mixIn(Request.prototype);
+
+Object.defineProperty(Request.prototype, Symbol.toStringTag, {
+	value: 'Request',
+	writable: false,
+	enumerable: false,
+	configurable: true
+});
+
+Object.defineProperties(Request.prototype, {
+	method: { enumerable: true },
+	url: { enumerable: true },
+	headers: { enumerable: true },
+	redirect: { enumerable: true },
+	clone: { enumerable: true },
+	signal: { enumerable: true }
+});
+
+/**
+ * Convert a Request to Node.js http request options.
+ *
+ * @param   Request  A Request instance
+ * @return  Object   The options object to be passed to http.request
+ */
+function getNodeRequestOptions(request) {
+	const parsedURL = request[INTERNALS$2].parsedURL;
+	const headers = new Headers(request[INTERNALS$2].headers);
+
+	// fetch step 1.3
+	if (!headers.has('Accept')) {
+		headers.set('Accept', '*/*');
+	}
+
+	// Basic fetch
+	if (!parsedURL.protocol || !parsedURL.hostname) {
+		throw new TypeError('Only absolute URLs are supported');
+	}
+
+	if (!/^https?:$/.test(parsedURL.protocol)) {
+		throw new TypeError('Only HTTP(S) protocols are supported');
+	}
+
+	if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {
+		throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');
+	}
+
+	// HTTP-network-or-cache fetch steps 2.4-2.7
+	let contentLengthValue = null;
+	if (request.body == null && /^(POST|PUT)$/i.test(request.method)) {
+		contentLengthValue = '0';
+	}
+	if (request.body != null) {
+		const totalBytes = getTotalBytes(request);
+		if (typeof totalBytes === 'number') {
+			contentLengthValue = String(totalBytes);
+		}
+	}
+	if (contentLengthValue) {
+		headers.set('Content-Length', contentLengthValue);
+	}
+
+	// HTTP-network-or-cache fetch step 2.11
+	if (!headers.has('User-Agent')) {
+		headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');
+	}
+
+	// HTTP-network-or-cache fetch step 2.15
+	if (request.compress && !headers.has('Accept-Encoding')) {
+		headers.set('Accept-Encoding', 'gzip,deflate');
+	}
+
+	let agent = request.agent;
+	if (typeof agent === 'function') {
+		agent = agent(parsedURL);
+	}
+
+	if (!headers.has('Connection') && !agent) {
+		headers.set('Connection', 'close');
+	}
+
+	// HTTP-network fetch step 4.2
+	// chunked encoding is handled by Node.js
+
+	return Object.assign({}, parsedURL, {
+		method: request.method,
+		headers: exportNodeCompatibleHeaders(headers),
+		agent
+	});
+}
+
+/**
+ * abort-error.js
+ *
+ * AbortError interface for cancelled requests
+ */
+
+/**
+ * Create AbortError instance
+ *
+ * @param   String      message      Error message for human
+ * @return  AbortError
+ */
+function AbortError(message) {
+  Error.call(this, message);
+
+  this.type = 'aborted';
+  this.message = message;
+
+  // hide custom error implementation details from end-users
+  Error.captureStackTrace(this, this.constructor);
+}
+
+AbortError.prototype = Object.create(Error.prototype);
+AbortError.prototype.constructor = AbortError;
+AbortError.prototype.name = 'AbortError';
+
+// fix an issue where "PassThrough", "resolve" aren't a named export for node <10
+const PassThrough$1 = Stream.PassThrough;
+const resolve_url = Url.resolve;
+
+/**
+ * Fetch function
+ *
+ * @param   Mixed    url   Absolute url or Request instance
+ * @param   Object   opts  Fetch options
+ * @return  Promise
+ */
+function fetch(url, opts) {
+
+	// allow custom promise
+	if (!fetch.Promise) {
+		throw new Error('native promise missing, set fetch.Promise to your favorite alternative');
+	}
+
+	Body.Promise = fetch.Promise;
+
+	// wrap http.request into fetch
+	return new fetch.Promise(function (resolve, reject) {
+		// build request object
+		const request = new Request(url, opts);
+		const options = getNodeRequestOptions(request);
+
+		const send = (options.protocol === 'https:' ? https : http).request;
+		const signal = request.signal;
+
+		let response = null;
+
+		const abort = function abort() {
+			let error = new AbortError('The user aborted a request.');
+			reject(error);
+			if (request.body && request.body instanceof Stream.Readable) {
+				request.body.destroy(error);
+			}
+			if (!response || !response.body) return;
+			response.body.emit('error', error);
+		};
+
+		if (signal && signal.aborted) {
+			abort();
+			return;
+		}
+
+		const abortAndFinalize = function abortAndFinalize() {
+			abort();
+			finalize();
+		};
+
+		// send request
+		const req = send(options);
+		let reqTimeout;
+
+		if (signal) {
+			signal.addEventListener('abort', abortAndFinalize);
+		}
+
+		function finalize() {
+			req.abort();
+			if (signal) signal.removeEventListener('abort', abortAndFinalize);
+			clearTimeout(reqTimeout);
+		}
+
+		if (request.timeout) {
+			req.once('socket', function (socket) {
+				reqTimeout = setTimeout(function () {
+					reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));
+					finalize();
+				}, request.timeout);
+			});
+		}
+
+		req.on('error', function (err) {
+			reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
+			finalize();
+		});
+
+		req.on('response', function (res) {
+			clearTimeout(reqTimeout);
+
+			const headers = createHeadersLenient(res.headers);
+
+			// HTTP fetch step 5
+			if (fetch.isRedirect(res.statusCode)) {
+				// HTTP fetch step 5.2
+				const location = headers.get('Location');
+
+				// HTTP fetch step 5.3
+				const locationURL = location === null ? null : resolve_url(request.url, location);
+
+				// HTTP fetch step 5.5
+				switch (request.redirect) {
+					case 'error':
+						reject(new FetchError(`redirect mode is set to error: ${request.url}`, 'no-redirect'));
+						finalize();
+						return;
+					case 'manual':
+						// node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.
+						if (locationURL !== null) {
+							// handle corrupted header
+							try {
+								headers.set('Location', locationURL);
+							} catch (err) {
+								// istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request
+								reject(err);
+							}
+						}
+						break;
+					case 'follow':
+						// HTTP-redirect fetch step 2
+						if (locationURL === null) {
+							break;
+						}
+
+						// HTTP-redirect fetch step 5
+						if (request.counter >= request.follow) {
+							reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));
+							finalize();
+							return;
+						}
+
+						// HTTP-redirect fetch step 6 (counter increment)
+						// Create a new Request object.
+						const requestOpts = {
+							headers: new Headers(request.headers),
+							follow: request.follow,
+							counter: request.counter + 1,
+							agent: request.agent,
+							compress: request.compress,
+							method: request.method,
+							body: request.body,
+							signal: request.signal,
+							timeout: request.timeout
+						};
+
+						// HTTP-redirect fetch step 9
+						if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {
+							reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));
+							finalize();
+							return;
+						}
+
+						// HTTP-redirect fetch step 11
+						if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {
+							requestOpts.method = 'GET';
+							requestOpts.body = undefined;
+							requestOpts.headers.delete('content-length');
+						}
+
+						// HTTP-redirect fetch step 15
+						resolve(fetch(new Request(locationURL, requestOpts)));
+						finalize();
+						return;
+				}
+			}
+
+			// prepare response
+			res.once('end', function () {
+				if (signal) signal.removeEventListener('abort', abortAndFinalize);
+			});
+			let body = res.pipe(new PassThrough$1());
+
+			const response_options = {
+				url: request.url,
+				status: res.statusCode,
+				statusText: res.statusMessage,
+				headers: headers,
+				size: request.size,
+				timeout: request.timeout,
+				counter: request.counter
+			};
+
+			// HTTP-network fetch step 12.1.1.3
+			const codings = headers.get('Content-Encoding');
+
+			// HTTP-network fetch step 12.1.1.4: handle content codings
+
+			// in following scenarios we ignore compression support
+			// 1. compression support is disabled
+			// 2. HEAD request
+			// 3. no Content-Encoding header
+			// 4. no content response (204)
+			// 5. content not modified response (304)
+			if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {
+				response = new Response(body, response_options);
+				resolve(response);
+				return;
+			}
+
+			// For Node v6+
+			// Be less strict when decoding compressed responses, since sometimes
+			// servers send slightly invalid responses that are still accepted
+			// by common browsers.
+			// Always using Z_SYNC_FLUSH is what cURL does.
+			const zlibOptions = {
+				flush: zlib.Z_SYNC_FLUSH,
+				finishFlush: zlib.Z_SYNC_FLUSH
+			};
+
+			// for gzip
+			if (codings == 'gzip' || codings == 'x-gzip') {
+				body = body.pipe(zlib.createGunzip(zlibOptions));
+				response = new Response(body, response_options);
+				resolve(response);
+				return;
+			}
+
+			// for deflate
+			if (codings == 'deflate' || codings == 'x-deflate') {
+				// handle the infamous raw deflate response from old servers
+				// a hack for old IIS and Apache servers
+				const raw = res.pipe(new PassThrough$1());
+				raw.once('data', function (chunk) {
+					// see http://stackoverflow.com/questions/37519828
+					if ((chunk[0] & 0x0F) === 0x08) {
+						body = body.pipe(zlib.createInflate());
+					} else {
+						body = body.pipe(zlib.createInflateRaw());
+					}
+					response = new Response(body, response_options);
+					resolve(response);
+				});
+				return;
+			}
+
+			// for br
+			if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {
+				body = body.pipe(zlib.createBrotliDecompress());
+				response = new Response(body, response_options);
+				resolve(response);
+				return;
+			}
+
+			// otherwise, use response as-is
+			response = new Response(body, response_options);
+			resolve(response);
+		});
+
+		writeToStream(req, request);
+	});
+}
+/**
+ * Redirect code matching
+ *
+ * @param   Number   code  Status code
+ * @return  Boolean
+ */
+fetch.isRedirect = function (code) {
+	return code === 301 || code === 302 || code === 303 || code === 307 || code === 308;
+};
+
+// expose Promise
+fetch.Promise = global.Promise;
+
+module.exports = exports = fetch;
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.default = exports;
+exports.Headers = Headers;
+exports.Request = Request;
+exports.Response = Response;
+exports.FetchError = FetchError;

+ 1631 - 0
node_modules/node-fetch/lib/index.mjs

@@ -0,0 +1,1631 @@
+import Stream from 'stream';
+import http from 'http';
+import Url from 'url';
+import https from 'https';
+import zlib from 'zlib';
+
+// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js
+
+// fix for "Readable" isn't a named export issue
+const Readable = Stream.Readable;
+
+const BUFFER = Symbol('buffer');
+const TYPE = Symbol('type');
+
+class Blob {
+	constructor() {
+		this[TYPE] = '';
+
+		const blobParts = arguments[0];
+		const options = arguments[1];
+
+		const buffers = [];
+		let size = 0;
+
+		if (blobParts) {
+			const a = blobParts;
+			const length = Number(a.length);
+			for (let i = 0; i < length; i++) {
+				const element = a[i];
+				let buffer;
+				if (element instanceof Buffer) {
+					buffer = element;
+				} else if (ArrayBuffer.isView(element)) {
+					buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);
+				} else if (element instanceof ArrayBuffer) {
+					buffer = Buffer.from(element);
+				} else if (element instanceof Blob) {
+					buffer = element[BUFFER];
+				} else {
+					buffer = Buffer.from(typeof element === 'string' ? element : String(element));
+				}
+				size += buffer.length;
+				buffers.push(buffer);
+			}
+		}
+
+		this[BUFFER] = Buffer.concat(buffers);
+
+		let type = options && options.type !== undefined && String(options.type).toLowerCase();
+		if (type && !/[^\u0020-\u007E]/.test(type)) {
+			this[TYPE] = type;
+		}
+	}
+	get size() {
+		return this[BUFFER].length;
+	}
+	get type() {
+		return this[TYPE];
+	}
+	text() {
+		return Promise.resolve(this[BUFFER].toString());
+	}
+	arrayBuffer() {
+		const buf = this[BUFFER];
+		const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
+		return Promise.resolve(ab);
+	}
+	stream() {
+		const readable = new Readable();
+		readable._read = function () {};
+		readable.push(this[BUFFER]);
+		readable.push(null);
+		return readable;
+	}
+	toString() {
+		return '[object Blob]';
+	}
+	slice() {
+		const size = this.size;
+
+		const start = arguments[0];
+		const end = arguments[1];
+		let relativeStart, relativeEnd;
+		if (start === undefined) {
+			relativeStart = 0;
+		} else if (start < 0) {
+			relativeStart = Math.max(size + start, 0);
+		} else {
+			relativeStart = Math.min(start, size);
+		}
+		if (end === undefined) {
+			relativeEnd = size;
+		} else if (end < 0) {
+			relativeEnd = Math.max(size + end, 0);
+		} else {
+			relativeEnd = Math.min(end, size);
+		}
+		const span = Math.max(relativeEnd - relativeStart, 0);
+
+		const buffer = this[BUFFER];
+		const slicedBuffer = buffer.slice(relativeStart, relativeStart + span);
+		const blob = new Blob([], { type: arguments[2] });
+		blob[BUFFER] = slicedBuffer;
+		return blob;
+	}
+}
+
+Object.defineProperties(Blob.prototype, {
+	size: { enumerable: true },
+	type: { enumerable: true },
+	slice: { enumerable: true }
+});
+
+Object.defineProperty(Blob.prototype, Symbol.toStringTag, {
+	value: 'Blob',
+	writable: false,
+	enumerable: false,
+	configurable: true
+});
+
+/**
+ * fetch-error.js
+ *
+ * FetchError interface for operational errors
+ */
+
+/**
+ * Create FetchError instance
+ *
+ * @param   String      message      Error message for human
+ * @param   String      type         Error type for machine
+ * @param   String      systemError  For Node.js system error
+ * @return  FetchError
+ */
+function FetchError(message, type, systemError) {
+  Error.call(this, message);
+
+  this.message = message;
+  this.type = type;
+
+  // when err.type is `system`, err.code contains system error code
+  if (systemError) {
+    this.code = this.errno = systemError.code;
+  }
+
+  // hide custom error implementation details from end-users
+  Error.captureStackTrace(this, this.constructor);
+}
+
+FetchError.prototype = Object.create(Error.prototype);
+FetchError.prototype.constructor = FetchError;
+FetchError.prototype.name = 'FetchError';
+
+let convert;
+try {
+	convert = require('encoding').convert;
+} catch (e) {}
+
+const INTERNALS = Symbol('Body internals');
+
+// fix an issue where "PassThrough" isn't a named export for node <10
+const PassThrough = Stream.PassThrough;
+
+/**
+ * Body mixin
+ *
+ * Ref: https://fetch.spec.whatwg.org/#body
+ *
+ * @param   Stream  body  Readable stream
+ * @param   Object  opts  Response options
+ * @return  Void
+ */
+function Body(body) {
+	var _this = this;
+
+	var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
+	    _ref$size = _ref.size;
+
+	let size = _ref$size === undefined ? 0 : _ref$size;
+	var _ref$timeout = _ref.timeout;
+	let timeout = _ref$timeout === undefined ? 0 : _ref$timeout;
+
+	if (body == null) {
+		// body is undefined or null
+		body = null;
+	} else if (isURLSearchParams(body)) {
+		// body is a URLSearchParams
+		body = Buffer.from(body.toString());
+	} else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
+		// body is ArrayBuffer
+		body = Buffer.from(body);
+	} else if (ArrayBuffer.isView(body)) {
+		// body is ArrayBufferView
+		body = Buffer.from(body.buffer, body.byteOffset, body.byteLength);
+	} else if (body instanceof Stream) ; else {
+		// none of the above
+		// coerce to string then buffer
+		body = Buffer.from(String(body));
+	}
+	this[INTERNALS] = {
+		body,
+		disturbed: false,
+		error: null
+	};
+	this.size = size;
+	this.timeout = timeout;
+
+	if (body instanceof Stream) {
+		body.on('error', function (err) {
+			const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);
+			_this[INTERNALS].error = error;
+		});
+	}
+}
+
+Body.prototype = {
+	get body() {
+		return this[INTERNALS].body;
+	},
+
+	get bodyUsed() {
+		return this[INTERNALS].disturbed;
+	},
+
+	/**
+  * Decode response as ArrayBuffer
+  *
+  * @return  Promise
+  */
+	arrayBuffer() {
+		return consumeBody.call(this).then(function (buf) {
+			return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
+		});
+	},
+
+	/**
+  * Return raw response as Blob
+  *
+  * @return Promise
+  */
+	blob() {
+		let ct = this.headers && this.headers.get('content-type') || '';
+		return consumeBody.call(this).then(function (buf) {
+			return Object.assign(
+			// Prevent copying
+			new Blob([], {
+				type: ct.toLowerCase()
+			}), {
+				[BUFFER]: buf
+			});
+		});
+	},
+
+	/**
+  * Decode response as json
+  *
+  * @return  Promise
+  */
+	json() {
+		var _this2 = this;
+
+		return consumeBody.call(this).then(function (buffer) {
+			try {
+				return JSON.parse(buffer.toString());
+			} catch (err) {
+				return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
+			}
+		});
+	},
+
+	/**
+  * Decode response as text
+  *
+  * @return  Promise
+  */
+	text() {
+		return consumeBody.call(this).then(function (buffer) {
+			return buffer.toString();
+		});
+	},
+
+	/**
+  * Decode response as buffer (non-spec api)
+  *
+  * @return  Promise
+  */
+	buffer() {
+		return consumeBody.call(this);
+	},
+
+	/**
+  * Decode response as text, while automatically detecting the encoding and
+  * trying to decode to UTF-8 (non-spec api)
+  *
+  * @return  Promise
+  */
+	textConverted() {
+		var _this3 = this;
+
+		return consumeBody.call(this).then(function (buffer) {
+			return convertBody(buffer, _this3.headers);
+		});
+	}
+};
+
+// In browsers, all properties are enumerable.
+Object.defineProperties(Body.prototype, {
+	body: { enumerable: true },
+	bodyUsed: { enumerable: true },
+	arrayBuffer: { enumerable: true },
+	blob: { enumerable: true },
+	json: { enumerable: true },
+	text: { enumerable: true }
+});
+
+Body.mixIn = function (proto) {
+	for (const name of Object.getOwnPropertyNames(Body.prototype)) {
+		// istanbul ignore else: future proof
+		if (!(name in proto)) {
+			const desc = Object.getOwnPropertyDescriptor(Body.prototype, name);
+			Object.defineProperty(proto, name, desc);
+		}
+	}
+};
+
+/**
+ * Consume and convert an entire Body to a Buffer.
+ *
+ * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body
+ *
+ * @return  Promise
+ */
+function consumeBody() {
+	var _this4 = this;
+
+	if (this[INTERNALS].disturbed) {
+		return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));
+	}
+
+	this[INTERNALS].disturbed = true;
+
+	if (this[INTERNALS].error) {
+		return Body.Promise.reject(this[INTERNALS].error);
+	}
+
+	let body = this.body;
+
+	// body is null
+	if (body === null) {
+		return Body.Promise.resolve(Buffer.alloc(0));
+	}
+
+	// body is blob
+	if (isBlob(body)) {
+		body = body.stream();
+	}
+
+	// body is buffer
+	if (Buffer.isBuffer(body)) {
+		return Body.Promise.resolve(body);
+	}
+
+	// istanbul ignore if: should never happen
+	if (!(body instanceof Stream)) {
+		return Body.Promise.resolve(Buffer.alloc(0));
+	}
+
+	// body is stream
+	// get ready to actually consume the body
+	let accum = [];
+	let accumBytes = 0;
+	let abort = false;
+
+	return new Body.Promise(function (resolve, reject) {
+		let resTimeout;
+
+		// allow timeout on slow response body
+		if (_this4.timeout) {
+			resTimeout = setTimeout(function () {
+				abort = true;
+				reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));
+			}, _this4.timeout);
+		}
+
+		// handle stream errors
+		body.on('error', function (err) {
+			if (err.name === 'AbortError') {
+				// if the request was aborted, reject with this Error
+				abort = true;
+				reject(err);
+			} else {
+				// other errors, such as incorrect content-encoding
+				reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));
+			}
+		});
+
+		body.on('data', function (chunk) {
+			if (abort || chunk === null) {
+				return;
+			}
+
+			if (_this4.size && accumBytes + chunk.length > _this4.size) {
+				abort = true;
+				reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));
+				return;
+			}
+
+			accumBytes += chunk.length;
+			accum.push(chunk);
+		});
+
+		body.on('end', function () {
+			if (abort) {
+				return;
+			}
+
+			clearTimeout(resTimeout);
+
+			try {
+				resolve(Buffer.concat(accum, accumBytes));
+			} catch (err) {
+				// handle streams that have accumulated too much data (issue #414)
+				reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));
+			}
+		});
+	});
+}
+
+/**
+ * Detect buffer encoding and convert to target encoding
+ * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding
+ *
+ * @param   Buffer  buffer    Incoming buffer
+ * @param   String  encoding  Target encoding
+ * @return  String
+ */
+function convertBody(buffer, headers) {
+	if (typeof convert !== 'function') {
+		throw new Error('The package `encoding` must be installed to use the textConverted() function');
+	}
+
+	const ct = headers.get('content-type');
+	let charset = 'utf-8';
+	let res, str;
+
+	// header
+	if (ct) {
+		res = /charset=([^;]*)/i.exec(ct);
+	}
+
+	// no charset in content type, peek at response body for at most 1024 bytes
+	str = buffer.slice(0, 1024).toString();
+
+	// html5
+	if (!res && str) {
+		res = /<meta.+?charset=(['"])(.+?)\1/i.exec(str);
+	}
+
+	// html4
+	if (!res && str) {
+		res = /<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(str);
+
+		if (res) {
+			res = /charset=(.*)/i.exec(res.pop());
+		}
+	}
+
+	// xml
+	if (!res && str) {
+		res = /<\?xml.+?encoding=(['"])(.+?)\1/i.exec(str);
+	}
+
+	// found charset
+	if (res) {
+		charset = res.pop();
+
+		// prevent decode issues when sites use incorrect encoding
+		// ref: https://hsivonen.fi/encoding-menu/
+		if (charset === 'gb2312' || charset === 'gbk') {
+			charset = 'gb18030';
+		}
+	}
+
+	// turn raw buffers into a single utf-8 buffer
+	return convert(buffer, 'UTF-8', charset).toString();
+}
+
+/**
+ * Detect a URLSearchParams object
+ * ref: https://github.com/bitinn/node-fetch/issues/296#issuecomment-307598143
+ *
+ * @param   Object  obj     Object to detect by type or brand
+ * @return  String
+ */
+function isURLSearchParams(obj) {
+	// Duck-typing as a necessary condition.
+	if (typeof obj !== 'object' || typeof obj.append !== 'function' || typeof obj.delete !== 'function' || typeof obj.get !== 'function' || typeof obj.getAll !== 'function' || typeof obj.has !== 'function' || typeof obj.set !== 'function') {
+		return false;
+	}
+
+	// Brand-checking and more duck-typing as optional condition.
+	return obj.constructor.name === 'URLSearchParams' || Object.prototype.toString.call(obj) === '[object URLSearchParams]' || typeof obj.sort === 'function';
+}
+
+/**
+ * Check if `obj` is a W3C `Blob` object (which `File` inherits from)
+ * @param  {*} obj
+ * @return {boolean}
+ */
+function isBlob(obj) {
+	return typeof obj === 'object' && typeof obj.arrayBuffer === 'function' && typeof obj.type === 'string' && typeof obj.stream === 'function' && typeof obj.constructor === 'function' && typeof obj.constructor.name === 'string' && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]);
+}
+
+/**
+ * Clone body given Res/Req instance
+ *
+ * @param   Mixed  instance  Response or Request instance
+ * @return  Mixed
+ */
+function clone(instance) {
+	let p1, p2;
+	let body = instance.body;
+
+	// don't allow cloning a used body
+	if (instance.bodyUsed) {
+		throw new Error('cannot clone body after it is used');
+	}
+
+	// check that body is a stream and not form-data object
+	// note: we can't clone the form-data object without having it as a dependency
+	if (body instanceof Stream && typeof body.getBoundary !== 'function') {
+		// tee instance body
+		p1 = new PassThrough();
+		p2 = new PassThrough();
+		body.pipe(p1);
+		body.pipe(p2);
+		// set instance body to teed body and return the other teed body
+		instance[INTERNALS].body = p1;
+		body = p2;
+	}
+
+	return body;
+}
+
+/**
+ * Performs the operation "extract a `Content-Type` value from |object|" as
+ * specified in the specification:
+ * https://fetch.spec.whatwg.org/#concept-bodyinit-extract
+ *
+ * This function assumes that instance.body is present.
+ *
+ * @param   Mixed  instance  Any options.body input
+ */
+function extractContentType(body) {
+	if (body === null) {
+		// body is null
+		return null;
+	} else if (typeof body === 'string') {
+		// body is string
+		return 'text/plain;charset=UTF-8';
+	} else if (isURLSearchParams(body)) {
+		// body is a URLSearchParams
+		return 'application/x-www-form-urlencoded;charset=UTF-8';
+	} else if (isBlob(body)) {
+		// body is blob
+		return body.type || null;
+	} else if (Buffer.isBuffer(body)) {
+		// body is buffer
+		return null;
+	} else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
+		// body is ArrayBuffer
+		return null;
+	} else if (ArrayBuffer.isView(body)) {
+		// body is ArrayBufferView
+		return null;
+	} else if (typeof body.getBoundary === 'function') {
+		// detect form data input from form-data module
+		return `multipart/form-data;boundary=${body.getBoundary()}`;
+	} else if (body instanceof Stream) {
+		// body is stream
+		// can't really do much about this
+		return null;
+	} else {
+		// Body constructor defaults other things to string
+		return 'text/plain;charset=UTF-8';
+	}
+}
+
+/**
+ * The Fetch Standard treats this as if "total bytes" is a property on the body.
+ * For us, we have to explicitly get it with a function.
+ *
+ * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes
+ *
+ * @param   Body    instance   Instance of Body
+ * @return  Number?            Number of bytes, or null if not possible
+ */
+function getTotalBytes(instance) {
+	const body = instance.body;
+
+
+	if (body === null) {
+		// body is null
+		return 0;
+	} else if (isBlob(body)) {
+		return body.size;
+	} else if (Buffer.isBuffer(body)) {
+		// body is buffer
+		return body.length;
+	} else if (body && typeof body.getLengthSync === 'function') {
+		// detect form data input from form-data module
+		if (body._lengthRetrievers && body._lengthRetrievers.length == 0 || // 1.x
+		body.hasKnownLength && body.hasKnownLength()) {
+			// 2.x
+			return body.getLengthSync();
+		}
+		return null;
+	} else {
+		// body is stream
+		return null;
+	}
+}
+
+/**
+ * Write a Body to a Node.js WritableStream (e.g. http.Request) object.
+ *
+ * @param   Body    instance   Instance of Body
+ * @return  Void
+ */
+function writeToStream(dest, instance) {
+	const body = instance.body;
+
+
+	if (body === null) {
+		// body is null
+		dest.end();
+	} else if (isBlob(body)) {
+		body.stream().pipe(dest);
+	} else if (Buffer.isBuffer(body)) {
+		// body is buffer
+		dest.write(body);
+		dest.end();
+	} else {
+		// body is stream
+		body.pipe(dest);
+	}
+}
+
+// expose Promise
+Body.Promise = global.Promise;
+
+/**
+ * headers.js
+ *
+ * Headers class offers convenient helpers
+ */
+
+const invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/;
+const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/;
+
+function validateName(name) {
+	name = `${name}`;
+	if (invalidTokenRegex.test(name) || name === '') {
+		throw new TypeError(`${name} is not a legal HTTP header name`);
+	}
+}
+
+function validateValue(value) {
+	value = `${value}`;
+	if (invalidHeaderCharRegex.test(value)) {
+		throw new TypeError(`${value} is not a legal HTTP header value`);
+	}
+}
+
+/**
+ * Find the key in the map object given a header name.
+ *
+ * Returns undefined if not found.
+ *
+ * @param   String  name  Header name
+ * @return  String|Undefined
+ */
+function find(map, name) {
+	name = name.toLowerCase();
+	for (const key in map) {
+		if (key.toLowerCase() === name) {
+			return key;
+		}
+	}
+	return undefined;
+}
+
+const MAP = Symbol('map');
+class Headers {
+	/**
+  * Headers class
+  *
+  * @param   Object  headers  Response headers
+  * @return  Void
+  */
+	constructor() {
+		let init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
+
+		this[MAP] = Object.create(null);
+
+		if (init instanceof Headers) {
+			const rawHeaders = init.raw();
+			const headerNames = Object.keys(rawHeaders);
+
+			for (const headerName of headerNames) {
+				for (const value of rawHeaders[headerName]) {
+					this.append(headerName, value);
+				}
+			}
+
+			return;
+		}
+
+		// We don't worry about converting prop to ByteString here as append()
+		// will handle it.
+		if (init == null) ; else if (typeof init === 'object') {
+			const method = init[Symbol.iterator];
+			if (method != null) {
+				if (typeof method !== 'function') {
+					throw new TypeError('Header pairs must be iterable');
+				}
+
+				// sequence<sequence<ByteString>>
+				// Note: per spec we have to first exhaust the lists then process them
+				const pairs = [];
+				for (const pair of init) {
+					if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {
+						throw new TypeError('Each header pair must be iterable');
+					}
+					pairs.push(Array.from(pair));
+				}
+
+				for (const pair of pairs) {
+					if (pair.length !== 2) {
+						throw new TypeError('Each header pair must be a name/value tuple');
+					}
+					this.append(pair[0], pair[1]);
+				}
+			} else {
+				// record<ByteString, ByteString>
+				for (const key of Object.keys(init)) {
+					const value = init[key];
+					this.append(key, value);
+				}
+			}
+		} else {
+			throw new TypeError('Provided initializer must be an object');
+		}
+	}
+
+	/**
+  * Return combined header value given name
+  *
+  * @param   String  name  Header name
+  * @return  Mixed
+  */
+	get(name) {
+		name = `${name}`;
+		validateName(name);
+		const key = find(this[MAP], name);
+		if (key === undefined) {
+			return null;
+		}
+
+		return this[MAP][key].join(', ');
+	}
+
+	/**
+  * Iterate over all headers
+  *
+  * @param   Function  callback  Executed for each item with parameters (value, name, thisArg)
+  * @param   Boolean   thisArg   `this` context for callback function
+  * @return  Void
+  */
+	forEach(callback) {
+		let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
+
+		let pairs = getHeaders(this);
+		let i = 0;
+		while (i < pairs.length) {
+			var _pairs$i = pairs[i];
+			const name = _pairs$i[0],
+			      value = _pairs$i[1];
+
+			callback.call(thisArg, value, name, this);
+			pairs = getHeaders(this);
+			i++;
+		}
+	}
+
+	/**
+  * Overwrite header values given name
+  *
+  * @param   String  name   Header name
+  * @param   String  value  Header value
+  * @return  Void
+  */
+	set(name, value) {
+		name = `${name}`;
+		value = `${value}`;
+		validateName(name);
+		validateValue(value);
+		const key = find(this[MAP], name);
+		this[MAP][key !== undefined ? key : name] = [value];
+	}
+
+	/**
+  * Append a value onto existing header
+  *
+  * @param   String  name   Header name
+  * @param   String  value  Header value
+  * @return  Void
+  */
+	append(name, value) {
+		name = `${name}`;
+		value = `${value}`;
+		validateName(name);
+		validateValue(value);
+		const key = find(this[MAP], name);
+		if (key !== undefined) {
+			this[MAP][key].push(value);
+		} else {
+			this[MAP][name] = [value];
+		}
+	}
+
+	/**
+  * Check for header name existence
+  *
+  * @param   String   name  Header name
+  * @return  Boolean
+  */
+	has(name) {
+		name = `${name}`;
+		validateName(name);
+		return find(this[MAP], name) !== undefined;
+	}
+
+	/**
+  * Delete all header values given name
+  *
+  * @param   String  name  Header name
+  * @return  Void
+  */
+	delete(name) {
+		name = `${name}`;
+		validateName(name);
+		const key = find(this[MAP], name);
+		if (key !== undefined) {
+			delete this[MAP][key];
+		}
+	}
+
+	/**
+  * Return raw headers (non-spec api)
+  *
+  * @return  Object
+  */
+	raw() {
+		return this[MAP];
+	}
+
+	/**
+  * Get an iterator on keys.
+  *
+  * @return  Iterator
+  */
+	keys() {
+		return createHeadersIterator(this, 'key');
+	}
+
+	/**
+  * Get an iterator on values.
+  *
+  * @return  Iterator
+  */
+	values() {
+		return createHeadersIterator(this, 'value');
+	}
+
+	/**
+  * Get an iterator on entries.
+  *
+  * This is the default iterator of the Headers object.
+  *
+  * @return  Iterator
+  */
+	[Symbol.iterator]() {
+		return createHeadersIterator(this, 'key+value');
+	}
+}
+Headers.prototype.entries = Headers.prototype[Symbol.iterator];
+
+Object.defineProperty(Headers.prototype, Symbol.toStringTag, {
+	value: 'Headers',
+	writable: false,
+	enumerable: false,
+	configurable: true
+});
+
+Object.defineProperties(Headers.prototype, {
+	get: { enumerable: true },
+	forEach: { enumerable: true },
+	set: { enumerable: true },
+	append: { enumerable: true },
+	has: { enumerable: true },
+	delete: { enumerable: true },
+	keys: { enumerable: true },
+	values: { enumerable: true },
+	entries: { enumerable: true }
+});
+
+function getHeaders(headers) {
+	let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';
+
+	const keys = Object.keys(headers[MAP]).sort();
+	return keys.map(kind === 'key' ? function (k) {
+		return k.toLowerCase();
+	} : kind === 'value' ? function (k) {
+		return headers[MAP][k].join(', ');
+	} : function (k) {
+		return [k.toLowerCase(), headers[MAP][k].join(', ')];
+	});
+}
+
+const INTERNAL = Symbol('internal');
+
+function createHeadersIterator(target, kind) {
+	const iterator = Object.create(HeadersIteratorPrototype);
+	iterator[INTERNAL] = {
+		target,
+		kind,
+		index: 0
+	};
+	return iterator;
+}
+
+const HeadersIteratorPrototype = Object.setPrototypeOf({
+	next() {
+		// istanbul ignore if
+		if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {
+			throw new TypeError('Value of `this` is not a HeadersIterator');
+		}
+
+		var _INTERNAL = this[INTERNAL];
+		const target = _INTERNAL.target,
+		      kind = _INTERNAL.kind,
+		      index = _INTERNAL.index;
+
+		const values = getHeaders(target, kind);
+		const len = values.length;
+		if (index >= len) {
+			return {
+				value: undefined,
+				done: true
+			};
+		}
+
+		this[INTERNAL].index = index + 1;
+
+		return {
+			value: values[index],
+			done: false
+		};
+	}
+}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));
+
+Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {
+	value: 'HeadersIterator',
+	writable: false,
+	enumerable: false,
+	configurable: true
+});
+
+/**
+ * Export the Headers object in a form that Node.js can consume.
+ *
+ * @param   Headers  headers
+ * @return  Object
+ */
+function exportNodeCompatibleHeaders(headers) {
+	const obj = Object.assign({ __proto__: null }, headers[MAP]);
+
+	// http.request() only supports string as Host header. This hack makes
+	// specifying custom Host header possible.
+	const hostHeaderKey = find(headers[MAP], 'Host');
+	if (hostHeaderKey !== undefined) {
+		obj[hostHeaderKey] = obj[hostHeaderKey][0];
+	}
+
+	return obj;
+}
+
+/**
+ * Create a Headers object from an object of headers, ignoring those that do
+ * not conform to HTTP grammar productions.
+ *
+ * @param   Object  obj  Object of headers
+ * @return  Headers
+ */
+function createHeadersLenient(obj) {
+	const headers = new Headers();
+	for (const name of Object.keys(obj)) {
+		if (invalidTokenRegex.test(name)) {
+			continue;
+		}
+		if (Array.isArray(obj[name])) {
+			for (const val of obj[name]) {
+				if (invalidHeaderCharRegex.test(val)) {
+					continue;
+				}
+				if (headers[MAP][name] === undefined) {
+					headers[MAP][name] = [val];
+				} else {
+					headers[MAP][name].push(val);
+				}
+			}
+		} else if (!invalidHeaderCharRegex.test(obj[name])) {
+			headers[MAP][name] = [obj[name]];
+		}
+	}
+	return headers;
+}
+
+const INTERNALS$1 = Symbol('Response internals');
+
+// fix an issue where "STATUS_CODES" aren't a named export for node <10
+const STATUS_CODES = http.STATUS_CODES;
+
+/**
+ * Response class
+ *
+ * @param   Stream  body  Readable stream
+ * @param   Object  opts  Response options
+ * @return  Void
+ */
+class Response {
+	constructor() {
+		let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
+		let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+		Body.call(this, body, opts);
+
+		const status = opts.status || 200;
+		const headers = new Headers(opts.headers);
+
+		if (body != null && !headers.has('Content-Type')) {
+			const contentType = extractContentType(body);
+			if (contentType) {
+				headers.append('Content-Type', contentType);
+			}
+		}
+
+		this[INTERNALS$1] = {
+			url: opts.url,
+			status,
+			statusText: opts.statusText || STATUS_CODES[status],
+			headers,
+			counter: opts.counter
+		};
+	}
+
+	get url() {
+		return this[INTERNALS$1].url || '';
+	}
+
+	get status() {
+		return this[INTERNALS$1].status;
+	}
+
+	/**
+  * Convenience property representing if the request ended normally
+  */
+	get ok() {
+		return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;
+	}
+
+	get redirected() {
+		return this[INTERNALS$1].counter > 0;
+	}
+
+	get statusText() {
+		return this[INTERNALS$1].statusText;
+	}
+
+	get headers() {
+		return this[INTERNALS$1].headers;
+	}
+
+	/**
+  * Clone this response
+  *
+  * @return  Response
+  */
+	clone() {
+		return new Response(clone(this), {
+			url: this.url,
+			status: this.status,
+			statusText: this.statusText,
+			headers: this.headers,
+			ok: this.ok,
+			redirected: this.redirected
+		});
+	}
+}
+
+Body.mixIn(Response.prototype);
+
+Object.defineProperties(Response.prototype, {
+	url: { enumerable: true },
+	status: { enumerable: true },
+	ok: { enumerable: true },
+	redirected: { enumerable: true },
+	statusText: { enumerable: true },
+	headers: { enumerable: true },
+	clone: { enumerable: true }
+});
+
+Object.defineProperty(Response.prototype, Symbol.toStringTag, {
+	value: 'Response',
+	writable: false,
+	enumerable: false,
+	configurable: true
+});
+
+const INTERNALS$2 = Symbol('Request internals');
+
+// fix an issue where "format", "parse" aren't a named export for node <10
+const parse_url = Url.parse;
+const format_url = Url.format;
+
+const streamDestructionSupported = 'destroy' in Stream.Readable.prototype;
+
+/**
+ * Check if a value is an instance of Request.
+ *
+ * @param   Mixed   input
+ * @return  Boolean
+ */
+function isRequest(input) {
+	return typeof input === 'object' && typeof input[INTERNALS$2] === 'object';
+}
+
+function isAbortSignal(signal) {
+	const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);
+	return !!(proto && proto.constructor.name === 'AbortSignal');
+}
+
+/**
+ * Request class
+ *
+ * @param   Mixed   input  Url or Request instance
+ * @param   Object  init   Custom options
+ * @return  Void
+ */
+class Request {
+	constructor(input) {
+		let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+		let parsedURL;
+
+		// normalize input
+		if (!isRequest(input)) {
+			if (input && input.href) {
+				// in order to support Node.js' Url objects; though WHATWG's URL objects
+				// will fall into this branch also (since their `toString()` will return
+				// `href` property anyway)
+				parsedURL = parse_url(input.href);
+			} else {
+				// coerce input to a string before attempting to parse
+				parsedURL = parse_url(`${input}`);
+			}
+			input = {};
+		} else {
+			parsedURL = parse_url(input.url);
+		}
+
+		let method = init.method || input.method || 'GET';
+		method = method.toUpperCase();
+
+		if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {
+			throw new TypeError('Request with GET/HEAD method cannot have body');
+		}
+
+		let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;
+
+		Body.call(this, inputBody, {
+			timeout: init.timeout || input.timeout || 0,
+			size: init.size || input.size || 0
+		});
+
+		const headers = new Headers(init.headers || input.headers || {});
+
+		if (inputBody != null && !headers.has('Content-Type')) {
+			const contentType = extractContentType(inputBody);
+			if (contentType) {
+				headers.append('Content-Type', contentType);
+			}
+		}
+
+		let signal = isRequest(input) ? input.signal : null;
+		if ('signal' in init) signal = init.signal;
+
+		if (signal != null && !isAbortSignal(signal)) {
+			throw new TypeError('Expected signal to be an instanceof AbortSignal');
+		}
+
+		this[INTERNALS$2] = {
+			method,
+			redirect: init.redirect || input.redirect || 'follow',
+			headers,
+			parsedURL,
+			signal
+		};
+
+		// node-fetch-only options
+		this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;
+		this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;
+		this.counter = init.counter || input.counter || 0;
+		this.agent = init.agent || input.agent;
+	}
+
+	get method() {
+		return this[INTERNALS$2].method;
+	}
+
+	get url() {
+		return format_url(this[INTERNALS$2].parsedURL);
+	}
+
+	get headers() {
+		return this[INTERNALS$2].headers;
+	}
+
+	get redirect() {
+		return this[INTERNALS$2].redirect;
+	}
+
+	get signal() {
+		return this[INTERNALS$2].signal;
+	}
+
+	/**
+  * Clone this request
+  *
+  * @return  Request
+  */
+	clone() {
+		return new Request(this);
+	}
+}
+
+Body.mixIn(Request.prototype);
+
+Object.defineProperty(Request.prototype, Symbol.toStringTag, {
+	value: 'Request',
+	writable: false,
+	enumerable: false,
+	configurable: true
+});
+
+Object.defineProperties(Request.prototype, {
+	method: { enumerable: true },
+	url: { enumerable: true },
+	headers: { enumerable: true },
+	redirect: { enumerable: true },
+	clone: { enumerable: true },
+	signal: { enumerable: true }
+});
+
+/**
+ * Convert a Request to Node.js http request options.
+ *
+ * @param   Request  A Request instance
+ * @return  Object   The options object to be passed to http.request
+ */
+function getNodeRequestOptions(request) {
+	const parsedURL = request[INTERNALS$2].parsedURL;
+	const headers = new Headers(request[INTERNALS$2].headers);
+
+	// fetch step 1.3
+	if (!headers.has('Accept')) {
+		headers.set('Accept', '*/*');
+	}
+
+	// Basic fetch
+	if (!parsedURL.protocol || !parsedURL.hostname) {
+		throw new TypeError('Only absolute URLs are supported');
+	}
+
+	if (!/^https?:$/.test(parsedURL.protocol)) {
+		throw new TypeError('Only HTTP(S) protocols are supported');
+	}
+
+	if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {
+		throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');
+	}
+
+	// HTTP-network-or-cache fetch steps 2.4-2.7
+	let contentLengthValue = null;
+	if (request.body == null && /^(POST|PUT)$/i.test(request.method)) {
+		contentLengthValue = '0';
+	}
+	if (request.body != null) {
+		const totalBytes = getTotalBytes(request);
+		if (typeof totalBytes === 'number') {
+			contentLengthValue = String(totalBytes);
+		}
+	}
+	if (contentLengthValue) {
+		headers.set('Content-Length', contentLengthValue);
+	}
+
+	// HTTP-network-or-cache fetch step 2.11
+	if (!headers.has('User-Agent')) {
+		headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');
+	}
+
+	// HTTP-network-or-cache fetch step 2.15
+	if (request.compress && !headers.has('Accept-Encoding')) {
+		headers.set('Accept-Encoding', 'gzip,deflate');
+	}
+
+	let agent = request.agent;
+	if (typeof agent === 'function') {
+		agent = agent(parsedURL);
+	}
+
+	if (!headers.has('Connection') && !agent) {
+		headers.set('Connection', 'close');
+	}
+
+	// HTTP-network fetch step 4.2
+	// chunked encoding is handled by Node.js
+
+	return Object.assign({}, parsedURL, {
+		method: request.method,
+		headers: exportNodeCompatibleHeaders(headers),
+		agent
+	});
+}
+
+/**
+ * abort-error.js
+ *
+ * AbortError interface for cancelled requests
+ */
+
+/**
+ * Create AbortError instance
+ *
+ * @param   String      message      Error message for human
+ * @return  AbortError
+ */
+function AbortError(message) {
+  Error.call(this, message);
+
+  this.type = 'aborted';
+  this.message = message;
+
+  // hide custom error implementation details from end-users
+  Error.captureStackTrace(this, this.constructor);
+}
+
+AbortError.prototype = Object.create(Error.prototype);
+AbortError.prototype.constructor = AbortError;
+AbortError.prototype.name = 'AbortError';
+
+// fix an issue where "PassThrough", "resolve" aren't a named export for node <10
+const PassThrough$1 = Stream.PassThrough;
+const resolve_url = Url.resolve;
+
+/**
+ * Fetch function
+ *
+ * @param   Mixed    url   Absolute url or Request instance
+ * @param   Object   opts  Fetch options
+ * @return  Promise
+ */
+function fetch(url, opts) {
+
+	// allow custom promise
+	if (!fetch.Promise) {
+		throw new Error('native promise missing, set fetch.Promise to your favorite alternative');
+	}
+
+	Body.Promise = fetch.Promise;
+
+	// wrap http.request into fetch
+	return new fetch.Promise(function (resolve, reject) {
+		// build request object
+		const request = new Request(url, opts);
+		const options = getNodeRequestOptions(request);
+
+		const send = (options.protocol === 'https:' ? https : http).request;
+		const signal = request.signal;
+
+		let response = null;
+
+		const abort = function abort() {
+			let error = new AbortError('The user aborted a request.');
+			reject(error);
+			if (request.body && request.body instanceof Stream.Readable) {
+				request.body.destroy(error);
+			}
+			if (!response || !response.body) return;
+			response.body.emit('error', error);
+		};
+
+		if (signal && signal.aborted) {
+			abort();
+			return;
+		}
+
+		const abortAndFinalize = function abortAndFinalize() {
+			abort();
+			finalize();
+		};
+
+		// send request
+		const req = send(options);
+		let reqTimeout;
+
+		if (signal) {
+			signal.addEventListener('abort', abortAndFinalize);
+		}
+
+		function finalize() {
+			req.abort();
+			if (signal) signal.removeEventListener('abort', abortAndFinalize);
+			clearTimeout(reqTimeout);
+		}
+
+		if (request.timeout) {
+			req.once('socket', function (socket) {
+				reqTimeout = setTimeout(function () {
+					reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));
+					finalize();
+				}, request.timeout);
+			});
+		}
+
+		req.on('error', function (err) {
+			reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
+			finalize();
+		});
+
+		req.on('response', function (res) {
+			clearTimeout(reqTimeout);
+
+			const headers = createHeadersLenient(res.headers);
+
+			// HTTP fetch step 5
+			if (fetch.isRedirect(res.statusCode)) {
+				// HTTP fetch step 5.2
+				const location = headers.get('Location');
+
+				// HTTP fetch step 5.3
+				const locationURL = location === null ? null : resolve_url(request.url, location);
+
+				// HTTP fetch step 5.5
+				switch (request.redirect) {
+					case 'error':
+						reject(new FetchError(`redirect mode is set to error: ${request.url}`, 'no-redirect'));
+						finalize();
+						return;
+					case 'manual':
+						// node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.
+						if (locationURL !== null) {
+							// handle corrupted header
+							try {
+								headers.set('Location', locationURL);
+							} catch (err) {
+								// istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request
+								reject(err);
+							}
+						}
+						break;
+					case 'follow':
+						// HTTP-redirect fetch step 2
+						if (locationURL === null) {
+							break;
+						}
+
+						// HTTP-redirect fetch step 5
+						if (request.counter >= request.follow) {
+							reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));
+							finalize();
+							return;
+						}
+
+						// HTTP-redirect fetch step 6 (counter increment)
+						// Create a new Request object.
+						const requestOpts = {
+							headers: new Headers(request.headers),
+							follow: request.follow,
+							counter: request.counter + 1,
+							agent: request.agent,
+							compress: request.compress,
+							method: request.method,
+							body: request.body,
+							signal: request.signal,
+							timeout: request.timeout
+						};
+
+						// HTTP-redirect fetch step 9
+						if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {
+							reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));
+							finalize();
+							return;
+						}
+
+						// HTTP-redirect fetch step 11
+						if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {
+							requestOpts.method = 'GET';
+							requestOpts.body = undefined;
+							requestOpts.headers.delete('content-length');
+						}
+
+						// HTTP-redirect fetch step 15
+						resolve(fetch(new Request(locationURL, requestOpts)));
+						finalize();
+						return;
+				}
+			}
+
+			// prepare response
+			res.once('end', function () {
+				if (signal) signal.removeEventListener('abort', abortAndFinalize);
+			});
+			let body = res.pipe(new PassThrough$1());
+
+			const response_options = {
+				url: request.url,
+				status: res.statusCode,
+				statusText: res.statusMessage,
+				headers: headers,
+				size: request.size,
+				timeout: request.timeout,
+				counter: request.counter
+			};
+
+			// HTTP-network fetch step 12.1.1.3
+			const codings = headers.get('Content-Encoding');
+
+			// HTTP-network fetch step 12.1.1.4: handle content codings
+
+			// in following scenarios we ignore compression support
+			// 1. compression support is disabled
+			// 2. HEAD request
+			// 3. no Content-Encoding header
+			// 4. no content response (204)
+			// 5. content not modified response (304)
+			if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {
+				response = new Response(body, response_options);
+				resolve(response);
+				return;
+			}
+
+			// For Node v6+
+			// Be less strict when decoding compressed responses, since sometimes
+			// servers send slightly invalid responses that are still accepted
+			// by common browsers.
+			// Always using Z_SYNC_FLUSH is what cURL does.
+			const zlibOptions = {
+				flush: zlib.Z_SYNC_FLUSH,
+				finishFlush: zlib.Z_SYNC_FLUSH
+			};
+
+			// for gzip
+			if (codings == 'gzip' || codings == 'x-gzip') {
+				body = body.pipe(zlib.createGunzip(zlibOptions));
+				response = new Response(body, response_options);
+				resolve(response);
+				return;
+			}
+
+			// for deflate
+			if (codings == 'deflate' || codings == 'x-deflate') {
+				// handle the infamous raw deflate response from old servers
+				// a hack for old IIS and Apache servers
+				const raw = res.pipe(new PassThrough$1());
+				raw.once('data', function (chunk) {
+					// see http://stackoverflow.com/questions/37519828
+					if ((chunk[0] & 0x0F) === 0x08) {
+						body = body.pipe(zlib.createInflate());
+					} else {
+						body = body.pipe(zlib.createInflateRaw());
+					}
+					response = new Response(body, response_options);
+					resolve(response);
+				});
+				return;
+			}
+
+			// for br
+			if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {
+				body = body.pipe(zlib.createBrotliDecompress());
+				response = new Response(body, response_options);
+				resolve(response);
+				return;
+			}
+
+			// otherwise, use response as-is
+			response = new Response(body, response_options);
+			resolve(response);
+		});
+
+		writeToStream(req, request);
+	});
+}
+/**
+ * Redirect code matching
+ *
+ * @param   Number   code  Status code
+ * @return  Boolean
+ */
+fetch.isRedirect = function (code) {
+	return code === 301 || code === 302 || code === 303 || code === 307 || code === 308;
+};
+
+// expose Promise
+fetch.Promise = global.Promise;
+
+export default fetch;
+export { Headers, Request, Response, FetchError };

+ 70 - 0
node_modules/node-fetch/package.json

@@ -0,0 +1,70 @@
+{
+  "name": "node-fetch",
+  "version": "2.6.0",
+  "description": "A light-weight module that brings window.fetch to node.js",
+  "main": "lib/index",
+  "browser": "./browser.js",
+  "module": "lib/index.mjs",
+  "files": [
+    "lib/index.js",
+    "lib/index.mjs",
+    "lib/index.es.js",
+    "browser.js"
+  ],
+  "engines": {
+    "node": "4.x || >=6.0.0"
+  },
+  "scripts": {
+    "build": "cross-env BABEL_ENV=rollup rollup -c",
+    "prepare": "npm run build",
+    "test": "cross-env BABEL_ENV=test mocha --require babel-register --throw-deprecation test/test.js",
+    "report": "cross-env BABEL_ENV=coverage nyc --reporter lcov --reporter text mocha -R spec test/test.js",
+    "coverage": "cross-env BABEL_ENV=coverage nyc --reporter json --reporter text mocha -R spec test/test.js && codecov -f coverage/coverage-final.json"
+  },
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/bitinn/node-fetch.git"
+  },
+  "keywords": [
+    "fetch",
+    "http",
+    "promise"
+  ],
+  "author": "David Frank",
+  "license": "MIT",
+  "bugs": {
+    "url": "https://github.com/bitinn/node-fetch/issues"
+  },
+  "homepage": "https://github.com/bitinn/node-fetch",
+  "devDependencies": {
+    "@ungap/url-search-params": "^0.1.2",
+    "abort-controller": "^1.1.0",
+    "abortcontroller-polyfill": "^1.3.0",
+    "babel-core": "^6.26.3",
+    "babel-plugin-istanbul": "^4.1.6",
+    "babel-preset-env": "^1.6.1",
+    "babel-register": "^6.16.3",
+    "chai": "^3.5.0",
+    "chai-as-promised": "^7.1.1",
+    "chai-iterator": "^1.1.1",
+    "chai-string": "~1.3.0",
+    "codecov": "^3.3.0",
+    "cross-env": "^5.2.0",
+    "form-data": "^2.3.3",
+    "is-builtin-module": "^1.0.0",
+    "mocha": "^5.0.0",
+    "nyc": "11.9.0",
+    "parted": "^0.1.1",
+    "promise": "^8.0.3",
+    "resumer": "0.0.0",
+    "rollup": "^0.63.4",
+    "rollup-plugin-babel": "^3.0.7",
+    "string-to-arraybuffer": "^1.0.2",
+    "whatwg-url": "^5.0.0"
+  },
+  "dependencies": {}
+
+,"_resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz"
+,"_integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
+,"_from": "node-fetch@2.6.0"
+}

+ 15 - 0
node_modules/rfdc/LICENSE

@@ -0,0 +1,15 @@
+Copyright 2019 "David Mark Clements <david.mark.clements@gmail.com>"
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 
+documentation files (the "Software"), to deal in the Software without restriction, including without limitation 
+the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 
+to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions 
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 
+TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 
+CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 
+IN THE SOFTWARE.

+ 147 - 0
node_modules/rfdc/index.js

@@ -0,0 +1,147 @@
+'use strict'
+module.exports = rfdc
+
+function rfdc (opts) {
+  opts = opts || {}
+
+  if (opts.circles) return rfdcCircles(opts)
+  return opts.proto ? cloneProto : clone
+
+  function cloneArray (a, fn) {
+    var keys = Object.keys(a)
+    var a2 = new Array(keys.length)
+    for (var i = 0; i < keys.length; i++) {
+      var k = keys[i]
+      var cur = a[k]
+      if (typeof cur !== 'object' || cur === null) {
+        a2[k] = cur
+      } else if (cur instanceof Date) {
+        a2[k] = new Date(cur)
+      } else {
+        a2[k] = fn(cur)
+      }
+    }
+    return a2
+  }
+
+  function clone (o) {
+    if (typeof o !== 'object' || o === null) return o
+    if (o instanceof Date) return new Date(o)
+    if (Array.isArray(o)) return cloneArray(o, clone)
+    var o2 = {}
+    for (var k in o) {
+      if (Object.hasOwnProperty.call(o, k) === false) continue
+      var cur = o[k]
+      if (typeof cur !== 'object' || cur === null) {
+        o2[k] = cur
+      } else if (cur instanceof Date) {
+        o2[k] = new Date(cur)
+      } else {
+        o2[k] = clone(cur)
+      }
+    }
+    return o2
+  }
+
+  function cloneProto (o) {
+    if (typeof o !== 'object' || o === null) return o
+    if (o instanceof Date) return new Date(o)
+    if (Array.isArray(o)) return cloneArray(o, cloneProto)
+    var o2 = {}
+    for (var k in o) {
+      var cur = o[k]
+      if (typeof cur !== 'object' || cur === null) {
+        o2[k] = cur
+      } else if (cur instanceof Date) {
+        o2[k] = new Date(cur)
+      } else {
+        o2[k] = cloneProto(cur)
+      }
+    }
+    return o2
+  }
+}
+
+function rfdcCircles (opts) {
+  var refs = []
+  var refsNew = []
+
+  return opts.proto ? cloneProto : clone
+
+  function cloneArray (a, fn) {
+    var keys = Object.keys(a)
+    var a2 = new Array(keys.length)
+    for (var i = 0; i < keys.length; i++) {
+      var k = keys[i]
+      var cur = a[k]
+      if (typeof cur !== 'object' || cur === null) {
+        a2[k] = cur
+      } else if (cur instanceof Date) {
+        a2[k] = new Date(cur)
+      } else {
+        var index = refs.indexOf(cur)
+        if (index !== -1) {
+          a2[k] = refsNew[index]
+        } else {
+          a2[k] = fn(cur)
+        }
+      }
+    }
+    return a2
+  }
+
+  function clone (o) {
+    if (typeof o !== 'object' || o === null) return o
+    if (o instanceof Date) return new Date(o)
+    if (Array.isArray(o)) return cloneArray(o, clone)
+    var o2 = {}
+    refs.push(o)
+    refsNew.push(o2)
+    for (var k in o) {
+      if (Object.hasOwnProperty.call(o, k) === false) continue
+      var cur = o[k]
+      if (typeof cur !== 'object' || cur === null) {
+        o2[k] = cur
+      } else if (cur instanceof Date) {
+        o2[k] = new Date(cur)
+      } else {
+        var i = refs.indexOf(cur)
+        if (i !== -1) {
+          o2[k] = refsNew[i]
+        } else {
+          o2[k] = clone(cur)
+        }
+      }
+    }
+    refs.pop()
+    refsNew.pop()
+    return o2
+  }
+
+  function cloneProto (o) {
+    if (typeof o !== 'object' || o === null) return o
+    if (o instanceof Date) return new Date(o)
+    if (Array.isArray(o)) return cloneArray(o, cloneProto)
+    var o2 = {}
+    refs.push(o)
+    refsNew.push(o2)
+    for (var k in o) {
+      var cur = o[k]
+      if (typeof cur !== 'object' || cur === null) {
+        o2[k] = cur
+      } else if (cur instanceof Date) {
+        o2[k] = new Date(cur)
+      } else {
+        var i = refs.indexOf(cur)
+        if (i !== -1) {
+          o2[k] = refsNew[i]
+        } else {
+          o2[k] = cloneProto(cur)
+        }
+      }
+    }
+    refs.pop()
+    refsNew.pop()
+    return o2
+  }
+}

+ 67 - 0
node_modules/rfdc/package.json

@@ -0,0 +1,67 @@
+{
+  "name": "rfdc",
+  "version": "1.1.4",
+  "description": "Really Fast Deep Clone",
+  "main": "index.js",
+  "scripts": {
+    "test": "tap -R min test && npm run lint",
+    "bench": "node benchmark",
+    "lint": "standard --fix",
+    "cov": "tap --100 test",
+    "cov-ui": "tap --coverage-report=html test",
+    "ci": "standard && tap --100 --coverage-report=text-lcov test | codecov --pipe"
+  },
+  "keywords": [
+    "object",
+    "obj",
+    "properties",
+    "clone",
+    "copy",
+    "deep",
+    "recursive",
+    "key",
+    "keys",
+    "values",
+    "prop",
+    "deep-clone",
+    "deepclone",
+    "deep-copy",
+    "deepcopy",
+    "fast",
+    "performance",
+    "performant",
+    "fastclone",
+    "fastcopy",
+    "fast-clone",
+    "fast-deep-clone",
+    "fast-copy",
+    "fast-deep-copy"
+  ],
+  "author": "David Mark Clements <david.clements@nearform.com>",
+  "license": "MIT",
+  "devDependencies": {
+    "codecov": "^3.4.0",
+    "deep-copy": "^1.4.2",
+    "fast-copy": "^1.2.1",
+    "fastbench": "^1.0.1",
+    "lodash.clonedeep": "^4.5.0",
+    "standard": "^11.0.1",
+    "tap": "^12.0.1"
+  },
+  "directories": {
+    "test": "test"
+  },
+  "dependencies": {},
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/davidmarkclements/rfdc.git"
+  },
+  "bugs": {
+    "url": "https://github.com/davidmarkclements/rfdc/issues"
+  },
+  "homepage": "https://github.com/davidmarkclements/rfdc#readme"
+
+,"_resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.1.4.tgz"
+,"_integrity": "sha512-5C9HXdzK8EAqN7JDif30jqsBzavB7wLpaubisuQIGHWf2gUXSpzy6ArX/+Da8RjFpagWsCn+pIgxTMAmKw9Zug=="
+,"_from": "rfdc@1.1.4"
+}

+ 21 - 0
node_modules/schema-typed/LICENSE

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 RSuite Community
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 119 - 0
node_modules/schema-typed/es/ArrayType.js

@@ -0,0 +1,119 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports["default"] = void 0;
+
+var _Type2 = _interopRequireDefault(require("./Type"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
+
+function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
+
+var ArrayType =
+/*#__PURE__*/
+function (_Type) {
+  _inheritsLoose(ArrayType, _Type);
+
+  ArrayType.from = function from(n) {
+    return n;
+  };
+
+  function ArrayType() {
+    var _this;
+
+    var errorMessage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Please enter a valid array';
+    _this = _Type.call(this, 'array') || this;
+
+    _Type.prototype.pushRule.call(_assertThisInitialized(_this), function (v) {
+      return Array.isArray(v);
+    }, errorMessage);
+
+    return _this;
+  }
+
+  var _proto = ArrayType.prototype;
+
+  _proto.rangeLength = function rangeLength(minLength, maxLength, errorMessage) {
+    _Type.prototype.pushRule.call(this, function (value) {
+      return value.length >= minLength && value.length <= maxLength;
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.minLength = function minLength(_minLength, errorMessage) {
+    _Type.prototype.pushRule.call(this, function (value) {
+      return value.length >= _minLength;
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.maxLength = function maxLength(_maxLength, errorMessage) {
+    _Type.prototype.pushRule.call(this, function (value) {
+      return value.length <= _maxLength;
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.unrepeatable = function unrepeatable(errorMessage) {
+    _Type.prototype.pushRule.call(this, function (items) {
+      var hash = {};
+      /* eslint-disable */
+
+      for (var i in items) {
+        if (hash[items[i]]) {
+          return false;
+        }
+
+        hash[items[i]] = true;
+      }
+
+      return true;
+    }, errorMessage);
+
+    return this;
+  }
+  /**
+   * @example
+   * ArrayType('这是一个数组').of(
+   *      StringType().isOneOf(['数码','体育','游戏','旅途','其他'],
+   *      '只能是选择中的值'
+   * )
+   */
+  ;
+
+  _proto.of = function of(type, errorMessage) {
+    _Type.prototype.pushRule.call(this, function (items) {
+      var valids = items.map(function (value) {
+        return type.check(value);
+      });
+      var errors = valids.filter(function (item) {
+        return item.hasError;
+      }) || [];
+
+      if (errors.length) {
+        return errors[0];
+      }
+
+      return errors.length === 0;
+    }, errorMessage);
+
+    return this;
+  };
+
+  return ArrayType;
+}(_Type2["default"]);
+
+var _default = function _default(errorMessage) {
+  return new ArrayType(errorMessage);
+};
+
+exports["default"] = _default;

+ 47 - 0
node_modules/schema-typed/es/BooleanType.js

@@ -0,0 +1,47 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports["default"] = void 0;
+
+var _Type2 = _interopRequireDefault(require("./Type"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
+
+function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
+
+var BooleanType =
+/*#__PURE__*/
+function (_Type) {
+  _inheritsLoose(BooleanType, _Type);
+
+  BooleanType.from = function from(n) {
+    return n;
+  };
+
+  function BooleanType() {
+    var _this;
+
+    var errorMessage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Please enter a valid `boolean`';
+    _this = _Type.call(this, 'boolean') || this;
+
+    _Type.prototype.pushRule.call(_assertThisInitialized(_this), function (v) {
+      return typeof v === 'boolean';
+    }, errorMessage);
+
+    return _this;
+  }
+
+  return BooleanType;
+}(_Type2["default"]);
+
+var _default = function _default(errorMessage) {
+  return new BooleanType(errorMessage);
+};
+
+exports["default"] = _default;

+ 73 - 0
node_modules/schema-typed/es/DateType.js

@@ -0,0 +1,73 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports["default"] = void 0;
+
+var _Type2 = _interopRequireDefault(require("./Type"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
+
+function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
+
+var DateType =
+/*#__PURE__*/
+function (_Type) {
+  _inheritsLoose(DateType, _Type);
+
+  DateType.from = function from(n) {
+    return n;
+  };
+
+  function DateType() {
+    var _this;
+
+    var errorMessage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Please enter a valid date';
+    _this = _Type.call(this, 'date') || this;
+
+    _Type.prototype.pushRule.call(_assertThisInitialized(_this), function (value) {
+      return !/Invalid|NaN/.test(new Date(value));
+    }, errorMessage);
+
+    return _this;
+  }
+
+  var _proto = DateType.prototype;
+
+  _proto.range = function range(min, max, errorMessage) {
+    _Type.prototype.pushRule.call(this, function (value) {
+      return new Date(value) >= new Date(min) && new Date(value) <= new Date(max);
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.min = function min(_min, errorMessage) {
+    _Type.prototype.pushRule.call(this, function (value) {
+      return new Date(value) >= new Date(_min);
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.max = function max(_max, errorMessage) {
+    _Type.prototype.pushRule.call(this, function (value) {
+      return new Date(value) <= new Date(_max);
+    }, errorMessage);
+
+    return this;
+  };
+
+  return DateType;
+}(_Type2["default"]);
+
+var _default = function _default(errorMessage) {
+  return new DateType(errorMessage);
+};
+
+exports["default"] = _default;

+ 101 - 0
node_modules/schema-typed/es/NumberType.js

@@ -0,0 +1,101 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports["default"] = void 0;
+
+var _Type2 = _interopRequireDefault(require("./Type"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
+
+function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
+
+function FN(value) {
+  return +value;
+}
+
+var NumberType =
+/*#__PURE__*/
+function (_Type) {
+  _inheritsLoose(NumberType, _Type);
+
+  NumberType.from = function from(n) {
+    return n;
+  };
+
+  function NumberType() {
+    var _this;
+
+    var errorMessage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Please enter a valid number';
+    _this = _Type.call(this, 'number') || this;
+
+    _Type.prototype.pushRule.call(_assertThisInitialized(_this), function (value) {
+      return /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);
+    }, errorMessage);
+
+    return _this;
+  }
+
+  var _proto = NumberType.prototype;
+
+  _proto.isInteger = function isInteger(errorMessage) {
+    _Type.prototype.pushRule.call(this, function (value) {
+      return /^-?\d+$/.test(value);
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.pattern = function pattern(regexp, errorMessage) {
+    _Type.prototype.pushRule.call(this, function (value) {
+      return regexp.test(value);
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.isOneOf = function isOneOf(numLst, errorMessage) {
+    _Type.prototype.pushRule.call(this, function (value) {
+      return numLst.includes(FN(value));
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.range = function range(min, max, errorMessage) {
+    _Type.prototype.pushRule.call(this, function (value) {
+      return FN(value) >= min && FN(value) <= max;
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.min = function min(_min, errorMessage) {
+    _Type.prototype.pushRule.call(this, function (value) {
+      return FN(value) >= _min;
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.max = function max(_max, errorMessage) {
+    _Type.prototype.pushRule.call(this, function (value) {
+      return FN(value) <= _max;
+    }, errorMessage);
+
+    return this;
+  };
+
+  return NumberType;
+}(_Type2["default"]);
+
+var _default = function _default(errorMessage) {
+  return new NumberType(errorMessage);
+};
+
+exports["default"] = _default;

+ 80 - 0
node_modules/schema-typed/es/ObjectType.js

@@ -0,0 +1,80 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports["default"] = void 0;
+
+var _Type2 = _interopRequireDefault(require("./Type"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
+
+function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
+
+var ObjectType =
+/*#__PURE__*/
+function (_Type) {
+  _inheritsLoose(ObjectType, _Type);
+
+  ObjectType.from = function from(n) {
+    return n;
+  };
+
+  function ObjectType() {
+    var _this;
+
+    var errorMessage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Please enter a valid `object`';
+    _this = _Type.call(this, 'object') || this;
+
+    _Type.prototype.pushRule.call(_assertThisInitialized(_this), function (v) {
+      return _typeof(v) === 'object';
+    }, errorMessage);
+
+    return _this;
+  }
+  /**
+   * @example
+   * ObjectType('这是一个对象').shape({
+   *  name: StringType(),
+   *  age: NumberType()
+   * })
+   */
+
+
+  var _proto = ObjectType.prototype;
+
+  _proto.shape = function shape(types) {
+    _Type.prototype.pushRule.call(this, function (values) {
+      var valids = Object.entries(types).map(function (item) {
+        var key = item[0];
+        var type = item[1];
+        return type.check(values[key]);
+      });
+      var errors = valids.filter(function (item) {
+        return item.hasError;
+      }) || [];
+
+      if (errors.length) {
+        return errors[0];
+      }
+
+      return errors.length === 0;
+    }, null);
+
+    return this;
+  };
+
+  return ObjectType;
+}(_Type2["default"]);
+
+var _default = function _default(errorMessage) {
+  return new ObjectType(errorMessage);
+};
+
+exports["default"] = _default;

+ 105 - 0
node_modules/schema-typed/es/Schema.js

@@ -0,0 +1,105 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.SchemaModel = exports.Schema = void 0;
+
+var _StringType = _interopRequireDefault(require("./StringType"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+var Schema =
+/*#__PURE__*/
+function () {
+  function Schema(schema) {
+    this.schema = schema;
+  }
+
+  var _proto = Schema.prototype;
+
+  _proto.getFieldType = function getFieldType(fieldName) {
+    return this.schema[fieldName] || new _StringType["default"]();
+  };
+
+  _proto.getKeys = function getKeys() {
+    return Object.keys(this.schema);
+  };
+
+  _proto.checkForField = function checkForField(fieldName, fieldValue, data) {
+    var fieldChecker = this.schema[fieldName];
+
+    if (!fieldChecker) {
+      // fieldValue can be anything if no schema defined
+      return {
+        hasError: false
+      };
+    }
+
+    return fieldChecker.check(fieldValue, data);
+  };
+
+  _proto.check = function check(data) {
+    var _this = this;
+
+    var checkResult = {};
+    Object.keys(this.schema).forEach(function (key) {
+      checkResult[key] = _this.checkForField(key, data[key], data);
+    });
+    return checkResult;
+  };
+
+  _proto.checkForFieldAsync = function checkForFieldAsync(fieldName, fieldValue, data) {
+    var fieldChecker = this.schema[fieldName];
+
+    if (!fieldChecker) {
+      // fieldValue can be anything if no schema defined
+      return Promise.resolve({
+        hasError: false
+      });
+    }
+
+    return fieldChecker.checkAsync(fieldValue, data);
+  };
+
+  _proto.checkAsync = function checkAsync(data) {
+    var _this2 = this;
+
+    var checkResult = {};
+    var promises = [];
+    var keys = [];
+    Object.keys(this.schema).forEach(function (key) {
+      keys.push(key);
+      promises.push(_this2.checkForFieldAsync(key, data[key], data));
+    });
+    return Promise.all(promises).then(function (values) {
+      for (var i = 0; i < values.length; i += 1) {
+        checkResult[keys[i]] = values[i];
+      }
+
+      return checkResult;
+    });
+  };
+
+  return Schema;
+}();
+
+exports.Schema = Schema;
+
+var SchemaModel = function SchemaModel(o) {
+  return new Schema(o);
+};
+
+exports.SchemaModel = SchemaModel;
+
+SchemaModel.combine = function () {
+  for (var _len = arguments.length, models = new Array(_len), _key = 0; _key < _len; _key++) {
+    models[_key] = arguments[_key];
+  }
+
+  return new Schema(models.map(function (model) {
+    return model.schema;
+  }).reduce(function (accumulator, currentValue) {
+    return Object.assign(accumulator, currentValue);
+  }, {}));
+};

+ 169 - 0
node_modules/schema-typed/es/StringType.js

@@ -0,0 +1,169 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports["default"] = void 0;
+
+var _Type2 = _interopRequireDefault(require("./Type"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
+
+function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
+
+function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
+
+function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
+
+function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
+
+function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
+
+/* eslint-disable */
+var StringType =
+/*#__PURE__*/
+function (_Type) {
+  _inheritsLoose(StringType, _Type);
+
+  StringType.from = function from(s) {
+    return "".concat(s);
+  };
+
+  function StringType() {
+    var _this;
+
+    var errorMessage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Please enter a valid string';
+    _this = _Type.call(this, 'string') || this;
+
+    _Type.prototype.pushRule.call(_assertThisInitialized(_this), function (v) {
+      return typeof v === 'string';
+    }, errorMessage);
+
+    return _this;
+  }
+
+  var _proto = StringType.prototype;
+
+  _proto.containsLetter = function containsLetter(errorMessage) {
+    _Type.prototype.pushRule.call(this, function (v) {
+      return /[a-zA-Z]/.test(v);
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.containsUppercaseLetter = function containsUppercaseLetter(errorMessage) {
+    _Type.prototype.pushRule.call(this, function (v) {
+      return /[A-Z]/.test(v);
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.containsLowercaseLetter = function containsLowercaseLetter(errorMessage) {
+    _Type.prototype.pushRule.call(this, function (v) {
+      return /[a-z]/.test(v);
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.containsLetterOnly = function containsLetterOnly(errorMessage) {
+    _Type.prototype.pushRule.call(this, function (v) {
+      return /^[a-zA-Z]+$/.test(v);
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.containsNumber = function containsNumber(errorMessage) {
+    _Type.prototype.pushRule.call(this, function (v) {
+      return /[0-9]/.test(v);
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.isOneOf = function isOneOf(strArr, errorMessage) {
+    _Type.prototype.pushRule.call(this, function (v) {
+      return !!~strArr.indexOf(v);
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.isEmail = function isEmail(errorMessage) {
+    //http://emailregex.com/
+    var regexp = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
+
+    _Type.prototype.pushRule.call(this, function (v) {
+      return regexp.test(v);
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.isURL = function isURL(errorMessage) {
+    var regexp = new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", 'i');
+
+    _Type.prototype.pushRule.call(this, function (v) {
+      return regexp.test(v);
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.isHex = function isHex(errorMessage) {
+    var regexp = /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i;
+
+    _Type.prototype.pushRule.call(this, function (v) {
+      return regexp.test(v);
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.pattern = function pattern(regexp, errorMessage) {
+    _Type.prototype.pushRule.call(this, function (value) {
+      return regexp.test(value);
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.rangeLength = function rangeLength(minLength, maxLength, errorMessage) {
+    _Type.prototype.pushRule.call(this, function (value) {
+      return value.length >= minLength && value.length <= maxLength;
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.minLength = function minLength(_minLength, errorMessage) {
+    _Type.prototype.pushRule.call(this, function (value) {
+      return _toConsumableArray(value).length >= _minLength;
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.maxLength = function maxLength(_maxLength, errorMessage) {
+    _Type.prototype.pushRule.call(this, function (value) {
+      return _toConsumableArray(value).length <= _maxLength;
+    }, errorMessage);
+
+    return this;
+  };
+
+  return StringType;
+}(_Type2["default"]);
+
+var _default = function _default(errorMessage) {
+  return new StringType(errorMessage);
+};
+
+exports["default"] = _default;

+ 207 - 0
node_modules/schema-typed/es/Type.js

@@ -0,0 +1,207 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports["default"] = void 0;
+
+function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+function isEmpty(value) {
+  return typeof value === 'undefined' || value === null || value === '';
+}
+
+function basicEmptyCheck(value) {
+  return typeof value === 'undefined' || value === null;
+}
+
+function checkRequired(value, trim, emptyAllowed) {
+  // String trim
+  if (trim && typeof value === 'string') {
+    value = value.replace(/(^\s*)|(\s*$)/g, '');
+  }
+
+  if (emptyAllowed) {
+    return !basicEmptyCheck(value);
+  } // Array
+
+
+  if (Array.isArray(value)) {
+    return !!value.length;
+  }
+
+  return !isEmpty(value);
+}
+
+function createValidator(data) {
+  return function (value, rules) {
+    for (var i = 0; i < rules.length; i += 1) {
+      var _rules$i = rules[i],
+          onValid = _rules$i.onValid,
+          errorMessage = _rules$i.errorMessage;
+      var checkResult = onValid(value, data);
+
+      if (checkResult === false) {
+        return {
+          hasError: true,
+          errorMessage: errorMessage
+        };
+      } else if (_typeof(checkResult) === 'object' && checkResult.hasError) {
+        return checkResult;
+      }
+    }
+
+    return null;
+  };
+}
+
+function createValidatorAsync(data) {
+  function check(errorMessage) {
+    return function (checkResult) {
+      if (checkResult === false) {
+        return {
+          hasError: true,
+          errorMessage: errorMessage
+        };
+      } else if (_typeof(checkResult) === 'object' && checkResult.hasError) {
+        return checkResult;
+      }
+
+      return null;
+    };
+  }
+
+  return function (value, rules) {
+    var promises = rules.map(function (rule) {
+      var onValid = rule.onValid,
+          errorMessage = rule.errorMessage;
+      return Promise.resolve(onValid(value, data)).then(check(errorMessage));
+    });
+    return Promise.all(promises).then(function (results) {
+      return results.find(function (item) {
+        return item && item.hasError;
+      });
+    });
+  };
+}
+
+var Type =
+/*#__PURE__*/
+function () {
+  function Type(name) {
+    this.name = name;
+    this.required = false;
+    this.requiredMessage = '';
+    this.trim = false;
+    this.emptyAllowed = false;
+    this.rules = [];
+    this.priorityRules = []; // Priority check rule
+  }
+
+  var _proto = Type.prototype;
+
+  _proto.check = function check(value, data) {
+    if (this.required && !checkRequired(value, this.trim, this.emptyAllowed)) {
+      return {
+        hasError: true,
+        errorMessage: this.requiredMessage
+      };
+    }
+
+    var validator = createValidator(data);
+    var checkStatus = validator(value, this.priorityRules);
+
+    if (checkStatus) {
+      return checkStatus;
+    }
+
+    if (!this.required && isEmpty(value)) {
+      return {
+        hasError: false
+      };
+    }
+
+    return validator(value, this.rules) || {
+      hasError: false
+    };
+  };
+
+  _proto.checkAsync = function checkAsync(value, data) {
+    var _this = this;
+
+    if (this.required && !checkRequired(value, this.trim, this.emptyAllowed)) {
+      return Promise.resolve({
+        hasError: true,
+        errorMessage: this.requiredMessage
+      });
+    }
+
+    var validator = createValidatorAsync(data);
+    return new Promise(function (resolve) {
+      return validator(value, _this.priorityRules).then(function (checkStatus) {
+        if (checkStatus) {
+          resolve(checkStatus);
+        }
+      }).then(function () {
+        if (!_this.required && isEmpty(value)) {
+          resolve({
+            hasError: false
+          });
+        }
+      }).then(function () {
+        return validator(value, _this.rules);
+      }).then(function (checkStatus) {
+        if (checkStatus) {
+          resolve(checkStatus);
+        }
+
+        resolve({
+          hasError: false
+        });
+      });
+    });
+  };
+
+  _proto.pushRule = function pushRule(onValid, errorMessage, priority) {
+    errorMessage = errorMessage || this.rules[0].errorMessage;
+
+    if (priority) {
+      this.priorityRules.push({
+        onValid: onValid,
+        errorMessage: errorMessage
+      });
+    } else {
+      this.rules.push({
+        onValid: onValid,
+        errorMessage: errorMessage
+      });
+    }
+  };
+
+  _proto.addRule = function addRule(onValid, errorMessage, priority) {
+    this.pushRule(onValid, errorMessage, priority);
+    return this;
+  };
+
+  _proto.isRequired = function isRequired(errorMessage) {
+    var trim = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
+    this.required = true;
+    this.trim = trim;
+    this.requiredMessage = errorMessage;
+    return this;
+  };
+
+  _proto.isRequiredOrEmpty = function isRequiredOrEmpty(errorMessage) {
+    var trim = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
+    this.required = true;
+    this.trim = trim;
+    this.emptyAllowed = true;
+    this.requiredMessage = errorMessage;
+    return this;
+  };
+
+  return Type;
+}();
+
+var _default = Type;
+exports["default"] = _default;

+ 76 - 0
node_modules/schema-typed/es/index.js

@@ -0,0 +1,76 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+var _exportNames = {
+  StringType: true,
+  NumberType: true,
+  ArrayType: true,
+  DateType: true,
+  ObjectType: true,
+  BooleanType: true
+};
+Object.defineProperty(exports, "StringType", {
+  enumerable: true,
+  get: function get() {
+    return _StringType["default"];
+  }
+});
+Object.defineProperty(exports, "NumberType", {
+  enumerable: true,
+  get: function get() {
+    return _NumberType["default"];
+  }
+});
+Object.defineProperty(exports, "ArrayType", {
+  enumerable: true,
+  get: function get() {
+    return _ArrayType["default"];
+  }
+});
+Object.defineProperty(exports, "DateType", {
+  enumerable: true,
+  get: function get() {
+    return _DateType["default"];
+  }
+});
+Object.defineProperty(exports, "ObjectType", {
+  enumerable: true,
+  get: function get() {
+    return _ObjectType["default"];
+  }
+});
+Object.defineProperty(exports, "BooleanType", {
+  enumerable: true,
+  get: function get() {
+    return _BooleanType["default"];
+  }
+});
+
+var _Schema = require("./Schema");
+
+Object.keys(_Schema).forEach(function (key) {
+  if (key === "default" || key === "__esModule") return;
+  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
+  Object.defineProperty(exports, key, {
+    enumerable: true,
+    get: function get() {
+      return _Schema[key];
+    }
+  });
+});
+
+var _StringType = _interopRequireDefault(require("./StringType"));
+
+var _NumberType = _interopRequireDefault(require("./NumberType"));
+
+var _ArrayType = _interopRequireDefault(require("./ArrayType"));
+
+var _DateType = _interopRequireDefault(require("./DateType"));
+
+var _ObjectType = _interopRequireDefault(require("./ObjectType"));
+
+var _BooleanType = _interopRequireDefault(require("./BooleanType"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

+ 119 - 0
node_modules/schema-typed/lib/ArrayType.js

@@ -0,0 +1,119 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports["default"] = void 0;
+
+var _Type2 = _interopRequireDefault(require("./Type"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
+
+function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
+
+var ArrayType =
+/*#__PURE__*/
+function (_Type) {
+  _inheritsLoose(ArrayType, _Type);
+
+  ArrayType.from = function from(n) {
+    return n;
+  };
+
+  function ArrayType() {
+    var _this;
+
+    var errorMessage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Please enter a valid array';
+    _this = _Type.call(this, 'array') || this;
+
+    _Type.prototype.pushRule.call(_assertThisInitialized(_this), function (v) {
+      return Array.isArray(v);
+    }, errorMessage);
+
+    return _this;
+  }
+
+  var _proto = ArrayType.prototype;
+
+  _proto.rangeLength = function rangeLength(minLength, maxLength, errorMessage) {
+    _Type.prototype.pushRule.call(this, function (value) {
+      return value.length >= minLength && value.length <= maxLength;
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.minLength = function minLength(_minLength, errorMessage) {
+    _Type.prototype.pushRule.call(this, function (value) {
+      return value.length >= _minLength;
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.maxLength = function maxLength(_maxLength, errorMessage) {
+    _Type.prototype.pushRule.call(this, function (value) {
+      return value.length <= _maxLength;
+    }, errorMessage);
+
+    return this;
+  };
+
+  _proto.unrepeatable = function unrepeatable(errorMessage) {
+    _Type.prototype.pushRule.call(this, function (items) {
+      var hash = {};
+      /* eslint-disable */
+
+      for (var i in items) {
+        if (hash[items[i]]) {
+          return false;
+        }
+
+        hash[items[i]] = true;
+      }
+
+      return true;
+    }, errorMessage);
+
+    return this;
+  }
+  /**
+   * @example
+   * ArrayType('这是一个数组').of(
+   *      StringType().isOneOf(['数码','体育','游戏','旅途','其他'],
+   *      '只能是选择中的值'
+   * )
+   */
+  ;
+
+  _proto.of = function of(type, errorMessage) {
+    _Type.prototype.pushRule.call(this, function (items) {
+      var valids = items.map(function (value) {
+        return type.check(value);
+      });
+      var errors = valids.filter(function (item) {
+        return item.hasError;
+      }) || [];
+
+      if (errors.length) {
+        return errors[0];
+      }
+
+      return errors.length === 0;
+    }, errorMessage);
+
+    return this;
+  };
+
+  return ArrayType;
+}(_Type2["default"]);
+
+var _default = function _default(errorMessage) {
+  return new ArrayType(errorMessage);
+};
+
+exports["default"] = _default;

Некоторые файлы не были показаны из-за большого количества измененных файлов