UNPKG

homm3-parsers

Version:

Collection of binary parsers able to parse various file formats related to Heroes of Might and Magic III

2 lines 112 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var binaryMarkup=require("binary-markup"),pako=require("pako");const H3M_MAX_PLAYERS=8;!function(e){e.ROE="RoE",e.AB="AB",e.SOD="SoD",e.CHR="Chr",e.WOG="WoG"}(exports.MapFormat||(exports.MapFormat={}));const formatEnum={[exports.MapFormat.ROE]:14,[exports.MapFormat.AB]:21,[exports.MapFormat.SOD]:28,[exports.MapFormat.CHR]:29,[exports.MapFormat.WOG]:51};!function(e){e.Easy="Easy",e.Normal="Normal",e.Hard="Hard",e.Expert="Expert",e.Impossible="Impossible"}(exports.Difficulty||(exports.Difficulty={}));const difficultyEnum={[exports.Difficulty.Easy]:0,[exports.Difficulty.Normal]:1,[exports.Difficulty.Hard]:2,[exports.Difficulty.Expert]:3,[exports.Difficulty.Impossible]:4};!function(e){e.Random="Random",e.Warrior="Warrior",e.Builder="Builder",e.Explorer="Explorer"}(exports.Behavior||(exports.Behavior={}));const behaviorEnum={[exports.Behavior.Random]:0,[exports.Behavior.Warrior]:1,[exports.Behavior.Builder]:2,[exports.Behavior.Explorer]:3};!function(e){e.Town="Town",e.City="City",e.Capitol="Capitol"}(exports.HallLevel||(exports.HallLevel={}));const hallLevelEnum={[exports.HallLevel.Town]:0,[exports.HallLevel.City]:1,[exports.HallLevel.Capitol]:2};!function(e){e.Fort="Fort",e.Citadel="Citadel",e.Castle="Castle"}(exports.CastleLevel||(exports.CastleLevel={}));const castleLevelEnum={[exports.CastleLevel.Fort]:0,[exports.CastleLevel.Citadel]:1,[exports.CastleLevel.Castle]:2};!function(e){e.Default="Default",e.Male="Male",e.Female="Female"}(exports.Gender||(exports.Gender={}));const genderEnum={[exports.Gender.Default]:255,[exports.Gender.Male]:0,[exports.Gender.Female]:1};!function(e){e.Spellbook="Spellbook",e.SpellScroll="SpellScroll",e.Grail="Grail",e.Catapult="Catapult",e.Ballista="Ballista",e.AmmoCart="AmmoCart",e.FirstAidTent="FirstAidTent",e.CentaurAxe="CentaurAxe",e.BlackshardOfTheDeadKnight="BlackshardOfTheDeadKnight",e.GreaterGnollsFlail="GreaterGnollsFlail",e.OgresClubOfHavoc="OgresClubOfHavoc",e.SwordOfHellfire="SwordOfHellfire",e.TitansGladius="TitansGladius",e.ShieldOfTheDwarvenLords="ShieldOfTheDwarvenLords",e.ShieldOfTheYawningDead="ShieldOfTheYawningDead",e.BucklerOfTheGnollKing="BucklerOfTheGnollKing",e.TargOfTheRampagingOgre="TargOfTheRampagingOgre",e.ShieldOfTheDamned="ShieldOfTheDamned",e.SentinelsShield="SentinelsShield",e.HelmOfTheAlabasterUnicorn="HelmOfTheAlabasterUnicorn",e.SkullHelmet="SkullHelmet",e.HelmOfChaos="HelmOfChaos",e.CrownOfTheSupremeMagi="CrownOfTheSupremeMagi",e.HellstormHelmet="HellstormHelmet",e.ThunderHelmet="ThunderHelmet",e.BreastplateOfPetrifiedWood="BreastplateOfPetrifiedWood",e.RibCage="RibCage",e.ScalesOfTheGreaterBasilisk="ScalesOfTheGreaterBasilisk",e.TunicOfTheCyclopsKing="TunicOfTheCyclopsKing",e.BreastplateOfBrimstone="BreastplateOfBrimstone",e.TitansCuirass="TitansCuirass",e.ArmorOfWonder="ArmorOfWonder",e.SandalsOfTheSaint="SandalsOfTheSaint",e.CelestialNecklaceOfBliss="CelestialNecklaceOfBliss",e.LionsShieldOfCourage="LionsShieldOfCourage",e.SwordOfJudgement="SwordOfJudgement",e.HelmOfHeavenlyEnlightenment="HelmOfHeavenlyEnlightenment",e.QuietEyeOfTheDragon="QuietEyeOfTheDragon",e.RedDragonFlameTongue="RedDragonFlameTongue",e.DragonScaleShield="DragonScaleShield",e.DragonScaleArmor="DragonScaleArmor",e.DragonboneGreaves="DragonboneGreaves",e.DragonWingTabard="DragonWingTabard",e.NecklaceOfDragonteeth="NecklaceOfDragonteeth",e.CrownOfDragontooth="CrownOfDragontooth",e.StillEyeOfTheDragon="StillEyeOfTheDragon",e.CloverOfFortune="CloverOfFortune",e.CardsOfProphecy="CardsOfProphecy",e.LadybirdOfLuck="LadybirdOfLuck",e.BadgeOfCourage="BadgeOfCourage",e.CrestOfValor="CrestOfValor",e.GlyphOfGallantry="GlyphOfGallantry",e.Speculum="Speculum",e.Spyglass="Spyglass",e.AmuletOfTheUndertaker="AmuletOfTheUndertaker",e.VampiresCowl="VampiresCowl",e.DeadMansBoots="DeadMansBoots",e.GarnitureOfInterference="GarnitureOfInterference",e.SurcoatOfCounterpoise="SurcoatOfCounterpoise",e.BootsOfPolarity="BootsOfPolarity",e.BowOfElvenCherrywood="BowOfElvenCherrywood",e.BowstringOfTheUnicornsMane="BowstringOfTheUnicornsMane",e.AngelFeatherArrows="AngelFeatherArrows",e.BirdOfPerception="BirdOfPerception",e.StoicWatchman="StoicWatchman",e.EmblemOfCognizance="EmblemOfCognizance",e.StatesmansMedal="StatesmansMedal",e.DiplomatsRing="DiplomatsRing",e.AmbassadorsSash="AmbassadorsSash",e.RingOfTheWayfarer="RingOfTheWayfarer",e.EquestriansGloves="EquestriansGloves",e.NecklaceOfOceanGuidance="NecklaceOfOceanGuidance",e.AngelWings="AngelWings",e.CharmOfMana="CharmOfMana",e.TalismanOfMana="TalismanOfMana",e.MysticOrbOfMana="MysticOrbOfMana",e.CollarOfConjuring="CollarOfConjuring",e.RingOfConjuring="RingOfConjuring",e.CapeOfConjuring="CapeOfConjuring",e.OrbOfTheFirmament="OrbOfTheFirmament",e.OrbOfSilt="OrbOfSilt",e.OrbOfTempestuousFire="OrbOfTempestuousFire",e.OrbOfDrivingRain="OrbOfDrivingRain",e.RecantersCloak="RecantersCloak",e.SpiritOfOppression="SpiritOfOppression",e.HourglassOfTheEvilHour="HourglassOfTheEvilHour",e.TomeOfFireMagic="TomeOfFireMagic",e.TomeOfAirMagic="TomeOfAirMagic",e.TomeOfWaterMagic="TomeOfWaterMagic",e.TomeOfEarthMagic="TomeOfEarthMagic",e.BootsOfLevitation="BootsOfLevitation",e.GoldenBow="GoldenBow",e.SphereOfPermanence="SphereOfPermanence",e.OrbOfVulnerability="OrbOfVulnerability",e.RingOfVitality="RingOfVitality",e.RingOfLife="RingOfLife",e.VialOfLifeblood="VialOfLifeblood",e.NecklaceOfSwiftness="NecklaceOfSwiftness",e.BootsOfSpeed="BootsOfSpeed",e.CapeOfVelocity="CapeOfVelocity",e.PendantOfDispassion="PendantOfDispassion",e.PendantOfSecondSight="PendantOfSecondSight",e.PendantOfHoliness="PendantOfHoliness",e.PendantOfLife="PendantOfLife",e.PendantOfDeath="PendantOfDeath",e.PendantOfFreeWill="PendantOfFreeWill",e.PendantOfNegativity="PendantOfNegativity",e.PendantOfTotalRecall="PendantOfTotalRecall",e.PendantOfCourage="PendantOfCourage",e.EverflowingCrystalCloak="EverflowingCrystalCloak",e.RingOfInfiniteGems="RingOfInfiniteGems",e.EverpouringVialOfMercury="EverpouringVialOfMercury",e.InexhaustibleCartOfOre="InexhaustibleCartOfOre",e.EversmokingRingOfSulfur="EversmokingRingOfSulfur",e.InexhaustibleCartOfLumber="InexhaustibleCartOfLumber",e.EndlessSackOfGold="EndlessSackOfGold",e.EndlessBagOfGold="EndlessBagOfGold",e.EndlessPurseOfGold="EndlessPurseOfGold",e.LegsOfLegion="LegsOfLegion",e.LoinsOfLegion="LoinsOfLegion",e.TorsoOfLegion="TorsoOfLegion",e.ArmsOfLegion="ArmsOfLegion",e.HeadOfLegion="HeadOfLegion",e.SeaCaptainsHat="SeaCaptainsHat",e.SpellbindersHat="SpellbindersHat",e.ShacklesOfWar="ShacklesOfWar",e.OrbOfInhibition="OrbOfInhibition",e.VialOfDragonBlood="VialOfDragonBlood",e.ArmageddonsBlade="ArmageddonsBlade",e.AngelicAlliance="AngelicAlliance",e.CloakOfTheUndeadKing="CloakOfTheUndeadKing",e.ElixirOfLife="ElixirOfLife",e.ArmorOfTheDamned="ArmorOfTheDamned",e.StatueOfLegion="StatueOfLegion",e.PowerOfTheDragonFather="PowerOfTheDragonFather",e.TitansThunder="TitansThunder",e.AdmiralsHat="AdmiralsHat",e.BowOfTheSharpshooter="BowOfTheSharpshooter",e.WizardsWell="WizardsWell",e.RingOfTheMagi="RingOfTheMagi",e.Cornucopia="Cornucopia",e.MagicWand="MagicWand",e.GoldTowerArrow="GoldTowerArrow",e.MonstersPower="MonstersPower",e.HighlightedSlot="HighlightedSlot",e.ArtifactLock="ArtifactLock",e.AxeOfSmashing="AxeOfSmashing",e.MithrilMail="MithrilMail",e.SwordOfSharpness="SwordOfSharpness",e.HelmOfImmortality="HelmOfImmortality",e.PendantOfSorcery="PendantOfSorcery",e.BootsOfHaste="BootsOfHaste",e.BowOfSeeking="BowOfSeeking",e.DragonEyeRing="DragonEyeRing",e.HardenedShield="HardenedShield",e.SlavasRingOfPower="SlavasRingOfPower",e.WarlordsBanner="WarlordsBanner",e.CrimsonShieldOfRetribution="CrimsonShieldOfRetribution",e.BarbarianLordsAxeOfFerocity="BarbarianLordsAxeOfFerocity",e.Dragonheart="Dragonheart",e.GateKey="GateKey",e.BlankHelmet="BlankHelmet",e.BlankSword="BlankSword",e.BlankShield="BlankShield",e.BlankHornedRing="BlankHornedRing",e.BlankGemmedRing="BlankGemmedRing",e.BlankNeckBroach="BlankNeckBroach",e.BlankArmor="BlankArmor",e.BlankSurcoat="BlankSurcoat",e.BlankBoots="BlankBoots",e.BlankHorn="BlankHorn"}(exports.Artifact||(exports.Artifact={}));const artifactEnum={[exports.Artifact.Spellbook]:0,[exports.Artifact.SpellScroll]:1,[exports.Artifact.Grail]:2,[exports.Artifact.Catapult]:3,[exports.Artifact.Ballista]:4,[exports.Artifact.AmmoCart]:5,[exports.Artifact.FirstAidTent]:6,[exports.Artifact.CentaurAxe]:7,[exports.Artifact.BlackshardOfTheDeadKnight]:8,[exports.Artifact.GreaterGnollsFlail]:9,[exports.Artifact.OgresClubOfHavoc]:10,[exports.Artifact.SwordOfHellfire]:11,[exports.Artifact.TitansGladius]:12,[exports.Artifact.ShieldOfTheDwarvenLords]:13,[exports.Artifact.ShieldOfTheYawningDead]:14,[exports.Artifact.BucklerOfTheGnollKing]:15,[exports.Artifact.TargOfTheRampagingOgre]:16,[exports.Artifact.ShieldOfTheDamned]:17,[exports.Artifact.SentinelsShield]:18,[exports.Artifact.HelmOfTheAlabasterUnicorn]:19,[exports.Artifact.SkullHelmet]:20,[exports.Artifact.HelmOfChaos]:21,[exports.Artifact.CrownOfTheSupremeMagi]:22,[exports.Artifact.HellstormHelmet]:23,[exports.Artifact.ThunderHelmet]:24,[exports.Artifact.BreastplateOfPetrifiedWood]:25,[exports.Artifact.RibCage]:26,[exports.Artifact.ScalesOfTheGreaterBasilisk]:27,[exports.Artifact.TunicOfTheCyclopsKing]:28,[exports.Artifact.BreastplateOfBrimstone]:29,[exports.Artifact.TitansCuirass]:30,[exports.Artifact.ArmorOfWonder]:31,[exports.Artifact.SandalsOfTheSaint]:32,[exports.Artifact.CelestialNecklaceOfBliss]:33,[exports.Artifact.LionsShieldOfCourage]:34,[exports.Artifact.SwordOfJudgement]:35,[exports.Artifact.HelmOfHeavenlyEnlightenment]:36,[exports.Artifact.QuietEyeOfTheDragon]:37,[exports.Artifact.RedDragonFlameTongue]:38,[exports.Artifact.DragonScaleShield]:39,[exports.Artifact.DragonScaleArmor]:40,[exports.Artifact.DragonboneGreaves]:41,[exports.Artifact.DragonWingTabard]:42,[exports.Artifact.NecklaceOfDragonteeth]:43,[exports.Artifact.CrownOfDragontooth]:44,[exports.Artifact.StillEyeOfTheDragon]:45,[exports.Artifact.CloverOfFortune]:46,[exports.Artifact.CardsOfProphecy]:47,[exports.Artifact.LadybirdOfLuck]:48,[exports.Artifact.BadgeOfCourage]:49,[exports.Artifact.CrestOfValor]:50,[exports.Artifact.GlyphOfGallantry]:51,[exports.Artifact.Speculum]:52,[exports.Artifact.Spyglass]:53,[exports.Artifact.AmuletOfTheUndertaker]:54,[exports.Artifact.VampiresCowl]:55,[exports.Artifact.DeadMansBoots]:56,[exports.Artifact.GarnitureOfInterference]:57,[exports.Artifact.SurcoatOfCounterpoise]:58,[exports.Artifact.BootsOfPolarity]:59,[exports.Artifact.BowOfElvenCherrywood]:60,[exports.Artifact.BowstringOfTheUnicornsMane]:61,[exports.Artifact.AngelFeatherArrows]:62,[exports.Artifact.BirdOfPerception]:63,[exports.Artifact.StoicWatchman]:64,[exports.Artifact.EmblemOfCognizance]:65,[exports.Artifact.StatesmansMedal]:66,[exports.Artifact.DiplomatsRing]:67,[exports.Artifact.AmbassadorsSash]:68,[exports.Artifact.RingOfTheWayfarer]:69,[exports.Artifact.EquestriansGloves]:70,[exports.Artifact.NecklaceOfOceanGuidance]:71,[exports.Artifact.AngelWings]:72,[exports.Artifact.CharmOfMana]:73,[exports.Artifact.TalismanOfMana]:74,[exports.Artifact.MysticOrbOfMana]:75,[exports.Artifact.CollarOfConjuring]:76,[exports.Artifact.RingOfConjuring]:77,[exports.Artifact.CapeOfConjuring]:78,[exports.Artifact.OrbOfTheFirmament]:79,[exports.Artifact.OrbOfSilt]:80,[exports.Artifact.OrbOfTempestuousFire]:81,[exports.Artifact.OrbOfDrivingRain]:82,[exports.Artifact.RecantersCloak]:83,[exports.Artifact.SpiritOfOppression]:84,[exports.Artifact.HourglassOfTheEvilHour]:85,[exports.Artifact.TomeOfFireMagic]:86,[exports.Artifact.TomeOfAirMagic]:87,[exports.Artifact.TomeOfWaterMagic]:88,[exports.Artifact.TomeOfEarthMagic]:89,[exports.Artifact.BootsOfLevitation]:90,[exports.Artifact.GoldenBow]:91,[exports.Artifact.SphereOfPermanence]:92,[exports.Artifact.OrbOfVulnerability]:93,[exports.Artifact.RingOfVitality]:94,[exports.Artifact.RingOfLife]:95,[exports.Artifact.VialOfLifeblood]:96,[exports.Artifact.NecklaceOfSwiftness]:97,[exports.Artifact.BootsOfSpeed]:98,[exports.Artifact.CapeOfVelocity]:99,[exports.Artifact.PendantOfDispassion]:100,[exports.Artifact.PendantOfSecondSight]:101,[exports.Artifact.PendantOfHoliness]:102,[exports.Artifact.PendantOfLife]:103,[exports.Artifact.PendantOfDeath]:104,[exports.Artifact.PendantOfFreeWill]:105,[exports.Artifact.PendantOfNegativity]:106,[exports.Artifact.PendantOfTotalRecall]:107,[exports.Artifact.PendantOfCourage]:108,[exports.Artifact.EverflowingCrystalCloak]:109,[exports.Artifact.RingOfInfiniteGems]:110,[exports.Artifact.EverpouringVialOfMercury]:111,[exports.Artifact.InexhaustibleCartOfOre]:112,[exports.Artifact.EversmokingRingOfSulfur]:113,[exports.Artifact.InexhaustibleCartOfLumber]:114,[exports.Artifact.EndlessSackOfGold]:115,[exports.Artifact.EndlessBagOfGold]:116,[exports.Artifact.EndlessPurseOfGold]:117,[exports.Artifact.LegsOfLegion]:118,[exports.Artifact.LoinsOfLegion]:119,[exports.Artifact.TorsoOfLegion]:120,[exports.Artifact.ArmsOfLegion]:121,[exports.Artifact.HeadOfLegion]:122,[exports.Artifact.SeaCaptainsHat]:123,[exports.Artifact.SpellbindersHat]:124,[exports.Artifact.ShacklesOfWar]:125,[exports.Artifact.OrbOfInhibition]:126,[exports.Artifact.VialOfDragonBlood]:127,[exports.Artifact.ArmageddonsBlade]:128,[exports.Artifact.AngelicAlliance]:129,[exports.Artifact.CloakOfTheUndeadKing]:130,[exports.Artifact.ElixirOfLife]:131,[exports.Artifact.ArmorOfTheDamned]:132,[exports.Artifact.StatueOfLegion]:133,[exports.Artifact.PowerOfTheDragonFather]:134,[exports.Artifact.TitansThunder]:135,[exports.Artifact.AdmiralsHat]:136,[exports.Artifact.BowOfTheSharpshooter]:137,[exports.Artifact.WizardsWell]:138,[exports.Artifact.RingOfTheMagi]:139,[exports.Artifact.Cornucopia]:140,[exports.Artifact.MagicWand]:141,[exports.Artifact.GoldTowerArrow]:142,[exports.Artifact.MonstersPower]:143,[exports.Artifact.HighlightedSlot]:144,[exports.Artifact.ArtifactLock]:145,[exports.Artifact.AxeOfSmashing]:146,[exports.Artifact.MithrilMail]:147,[exports.Artifact.SwordOfSharpness]:148,[exports.Artifact.HelmOfImmortality]:149,[exports.Artifact.PendantOfSorcery]:150,[exports.Artifact.BootsOfHaste]:151,[exports.Artifact.BowOfSeeking]:152,[exports.Artifact.DragonEyeRing]:153,[exports.Artifact.HardenedShield]:154,[exports.Artifact.SlavasRingOfPower]:155,[exports.Artifact.WarlordsBanner]:156,[exports.Artifact.CrimsonShieldOfRetribution]:157,[exports.Artifact.BarbarianLordsAxeOfFerocity]:158,[exports.Artifact.Dragonheart]:159,[exports.Artifact.GateKey]:160,[exports.Artifact.BlankHelmet]:161,[exports.Artifact.BlankSword]:162,[exports.Artifact.BlankShield]:163,[exports.Artifact.BlankHornedRing]:164,[exports.Artifact.BlankGemmedRing]:165,[exports.Artifact.BlankNeckBroach]:166,[exports.Artifact.BlankArmor]:167,[exports.Artifact.BlankSurcoat]:168,[exports.Artifact.BlankBoots]:169,[exports.Artifact.BlankHorn]:170};!function(e){e.EMPTY="EMPTY",e.Pikeman="Pikeman",e.Halberdier="Halberdier",e.Archer="Archer",e.Marksman="Marksman",e.Griffin="Griffin",e.RoyalGriffin="RoyalGriffin",e.Swordsman="Swordsman",e.Crusader="Crusader",e.Monk="Monk",e.Zealot="Zealot",e.Cavalier="Cavalier",e.Champion="Champion",e.Angel="Angel",e.Archangel="Archangel",e.Centaur="Centaur",e.CentaurCaptain="CentaurCaptain",e.Dwarf="Dwarf",e.BattleDwarf="BattleDwarf",e.WoodElf="WoodElf",e.GrandElf="GrandElf",e.Pegasus="Pegasus",e.SilverPegasus="SilverPegasus",e.DendroidGuard="DendroidGuard",e.DendroidSoldier="DendroidSoldier",e.Unicorn="Unicorn",e.WarUnicorn="WarUnicorn",e.GreenDragon="GreenDragon",e.GoldDragon="GoldDragon",e.Gremlin="Gremlin",e.MasterGremlin="MasterGremlin",e.StoneGargoyle="StoneGargoyle",e.ObsidianGargoyle="ObsidianGargoyle",e.StoneGolem="StoneGolem",e.IronGolem="IronGolem",e.Mage="Mage",e.ArchMage="ArchMage",e.Genie="Genie",e.MasterGenie="MasterGenie",e.Naga="Naga",e.NagaQueen="NagaQueen",e.Giant="Giant",e.Titan="Titan",e.Imp="Imp",e.Familiar="Familiar",e.Gog="Gog",e.Magog="Magog",e.HellHound="HellHound",e.Cerberus="Cerberus",e.Demon="Demon",e.HornedDemon="HornedDemon",e.PitFiend="PitFiend",e.PitLord="PitLord",e.Efreeti="Efreeti",e.EfreetSultan="EfreetSultan",e.Devil="Devil",e.ArchDevil="ArchDevil",e.Skeleton="Skeleton",e.SkeletonWarrior="SkeletonWarrior",e.WalkingDead="WalkingDead",e.Zombie="Zombie",e.Wight="Wight",e.Wraith="Wraith",e.Vampire="Vampire",e.VampireLord="VampireLord",e.Lich="Lich",e.PowerLich="PowerLich",e.BlackKnight="BlackKnight",e.DreadKnight="DreadKnight",e.BoneDragon="BoneDragon",e.GhostDragon="GhostDragon",e.Troglodyte="Troglodyte",e.InfernalTroglodyte="InfernalTroglodyte",e.Harpy="Harpy",e.HarpyHag="HarpyHag",e.Beholder="Beholder",e.EvilEye="EvilEye",e.Medusa="Medusa",e.MedusaQueen="MedusaQueen",e.Minotaur="Minotaur",e.MinotaurKing="MinotaurKing",e.Manticore="Manticore",e.Scorpicore="Scorpicore",e.RedDragon="RedDragon",e.BlackDragon="BlackDragon",e.Goblin="Goblin",e.Hobgoblin="Hobgoblin",e.WolfRider="WolfRider",e.WolfRaider="WolfRaider",e.Orc="Orc",e.OrcChieftain="OrcChieftain",e.Ogre="Ogre",e.OgreMage="OgreMage",e.Roc="Roc",e.Thunderbird="Thunderbird",e.Cyclop="Cyclop",e.CyclopKing="CyclopKing",e.Behemoth="Behemoth",e.AncientBehemoth="AncientBehemoth",e.Gnoll="Gnoll",e.GnollMarauder="GnollMarauder",e.Lizardman="Lizardman",e.LizardWarrior="LizardWarrior",e.Gorgon="Gorgon",e.MightyGorgon="MightyGorgon",e.SerpentFly="SerpentFly",e.DragonFly="DragonFly",e.Basilisk="Basilisk",e.GreaterBasilisk="GreaterBasilisk",e.Wyvern="Wyvern",e.WyvernMonarch="WyvernMonarch",e.Hydra="Hydra",e.ChaosHydra="ChaosHydra",e.AirElemental="AirElemental",e.EarthElemental="EarthElemental",e.FireElemental="FireElemental",e.WaterElemental="WaterElemental",e.GoldGolem="GoldGolem",e.DiamondGolem="DiamondGolem",e.Pixie="Pixie",e.Sprite="Sprite",e.PsychicElemental="PsychicElemental",e.MagicElemental="MagicElemental",e.IceElemental="IceElemental",e.MagmaElemental="MagmaElemental",e.StormElemental="StormElemental",e.EnergyElemental="EnergyElemental",e.Firebird="Firebird",e.Phoenix="Phoenix",e.AzureDragon="AzureDragon",e.CrystalDragon="CrystalDragon",e.FaerieDragon="FaerieDragon",e.RustDragon="RustDragon",e.Enchanter="Enchanter",e.Sharpshooter="Sharpshooter",e.Halfling="Halfling",e.Peasant="Peasant",e.Boar="Boar",e.Mummy="Mummy",e.Nomad="Nomad",e.Rogue="Rogue",e.Troll="Troll"}(exports.Creature||(exports.Creature={}));const creatureEnum={[exports.Creature.EMPTY]:-1,[exports.Creature.Pikeman]:0,[exports.Creature.Halberdier]:1,[exports.Creature.Archer]:2,[exports.Creature.Marksman]:3,[exports.Creature.Griffin]:4,[exports.Creature.RoyalGriffin]:5,[exports.Creature.Swordsman]:6,[exports.Creature.Crusader]:7,[exports.Creature.Monk]:8,[exports.Creature.Zealot]:9,[exports.Creature.Cavalier]:10,[exports.Creature.Champion]:11,[exports.Creature.Angel]:12,[exports.Creature.Archangel]:13,[exports.Creature.Centaur]:14,[exports.Creature.CentaurCaptain]:15,[exports.Creature.Dwarf]:16,[exports.Creature.BattleDwarf]:17,[exports.Creature.WoodElf]:18,[exports.Creature.GrandElf]:19,[exports.Creature.Pegasus]:20,[exports.Creature.SilverPegasus]:21,[exports.Creature.DendroidGuard]:22,[exports.Creature.DendroidSoldier]:23,[exports.Creature.Unicorn]:24,[exports.Creature.WarUnicorn]:25,[exports.Creature.GreenDragon]:26,[exports.Creature.GoldDragon]:27,[exports.Creature.Gremlin]:28,[exports.Creature.MasterGremlin]:29,[exports.Creature.StoneGargoyle]:30,[exports.Creature.ObsidianGargoyle]:31,[exports.Creature.StoneGolem]:32,[exports.Creature.IronGolem]:33,[exports.Creature.Mage]:34,[exports.Creature.ArchMage]:35,[exports.Creature.Genie]:36,[exports.Creature.MasterGenie]:37,[exports.Creature.Naga]:38,[exports.Creature.NagaQueen]:39,[exports.Creature.Giant]:40,[exports.Creature.Titan]:41,[exports.Creature.Imp]:42,[exports.Creature.Familiar]:43,[exports.Creature.Gog]:44,[exports.Creature.Magog]:45,[exports.Creature.HellHound]:46,[exports.Creature.Cerberus]:47,[exports.Creature.Demon]:48,[exports.Creature.HornedDemon]:49,[exports.Creature.PitFiend]:50,[exports.Creature.PitLord]:51,[exports.Creature.Efreeti]:52,[exports.Creature.EfreetSultan]:53,[exports.Creature.Devil]:54,[exports.Creature.ArchDevil]:55,[exports.Creature.Skeleton]:56,[exports.Creature.SkeletonWarrior]:57,[exports.Creature.WalkingDead]:58,[exports.Creature.Zombie]:59,[exports.Creature.Wight]:60,[exports.Creature.Wraith]:61,[exports.Creature.Vampire]:62,[exports.Creature.VampireLord]:63,[exports.Creature.Lich]:64,[exports.Creature.PowerLich]:65,[exports.Creature.BlackKnight]:66,[exports.Creature.DreadKnight]:67,[exports.Creature.BoneDragon]:68,[exports.Creature.GhostDragon]:69,[exports.Creature.Troglodyte]:70,[exports.Creature.InfernalTroglodyte]:71,[exports.Creature.Harpy]:72,[exports.Creature.HarpyHag]:73,[exports.Creature.Beholder]:74,[exports.Creature.EvilEye]:75,[exports.Creature.Medusa]:76,[exports.Creature.MedusaQueen]:77,[exports.Creature.Minotaur]:78,[exports.Creature.MinotaurKing]:79,[exports.Creature.Manticore]:80,[exports.Creature.Scorpicore]:81,[exports.Creature.RedDragon]:82,[exports.Creature.BlackDragon]:83,[exports.Creature.Goblin]:84,[exports.Creature.Hobgoblin]:85,[exports.Creature.WolfRider]:86,[exports.Creature.WolfRaider]:87,[exports.Creature.Orc]:88,[exports.Creature.OrcChieftain]:89,[exports.Creature.Ogre]:90,[exports.Creature.OgreMage]:91,[exports.Creature.Roc]:92,[exports.Creature.Thunderbird]:93,[exports.Creature.Cyclop]:94,[exports.Creature.CyclopKing]:95,[exports.Creature.Behemoth]:96,[exports.Creature.AncientBehemoth]:97,[exports.Creature.Gnoll]:98,[exports.Creature.GnollMarauder]:99,[exports.Creature.Lizardman]:100,[exports.Creature.LizardWarrior]:101,[exports.Creature.Gorgon]:102,[exports.Creature.MightyGorgon]:103,[exports.Creature.SerpentFly]:104,[exports.Creature.DragonFly]:105,[exports.Creature.Basilisk]:106,[exports.Creature.GreaterBasilisk]:107,[exports.Creature.Wyvern]:108,[exports.Creature.WyvernMonarch]:109,[exports.Creature.Hydra]:110,[exports.Creature.ChaosHydra]:111,[exports.Creature.AirElemental]:112,[exports.Creature.EarthElemental]:113,[exports.Creature.FireElemental]:114,[exports.Creature.WaterElemental]:115,[exports.Creature.GoldGolem]:116,[exports.Creature.DiamondGolem]:117,[exports.Creature.Pixie]:118,[exports.Creature.Sprite]:119,[exports.Creature.PsychicElemental]:120,[exports.Creature.MagicElemental]:121,[exports.Creature.IceElemental]:123,[exports.Creature.MagmaElemental]:125,[exports.Creature.StormElemental]:127,[exports.Creature.EnergyElemental]:129,[exports.Creature.Firebird]:130,[exports.Creature.Phoenix]:131,[exports.Creature.AzureDragon]:132,[exports.Creature.CrystalDragon]:133,[exports.Creature.FaerieDragon]:134,[exports.Creature.RustDragon]:135,[exports.Creature.Enchanter]:136,[exports.Creature.Sharpshooter]:137,[exports.Creature.Halfling]:138,[exports.Creature.Peasant]:139,[exports.Creature.Boar]:140,[exports.Creature.Mummy]:141,[exports.Creature.Nomad]:142,[exports.Creature.Rogue]:143,[exports.Creature.Troll]:144};!function(e){e.NONE="NONE",e.Orrin="Orrin",e.Valeska="Valeska",e.Edric="Edric",e.Sylvia="Sylvia",e.LordHaart="LordHaart",e.Sorsha="Sorsha",e.Christian="Christian",e.Tyris="Tyris",e.Rion="Rion",e.Adela="Adela",e.Cuthbert="Cuthbert",e.Adelaide="Adelaide",e.Ingham="Ingham",e.Sanya="Sanya",e.Loynis="Loynis",e.Caitlin="Caitlin",e.Mephala="Mephala",e.Ufretin="Ufretin",e.Jenova="Jenova",e.Ryland="Ryland",e.Thorgrim="Thorgrim",e.Ivor="Ivor",e.Clancy="Clancy",e.Kyrre="Kyrre",e.Coronius="Coronius",e.Uland="Uland",e.Elleshar="Elleshar",e.Gem="Gem",e.Malcom="Malcom",e.Melodia="Melodia",e.Alagar="Alagar",e.Aeris="Aeris",e.Piquedram="Piquedram",e.Thane="Thane",e.Josephine="Josephine",e.Neela="Neela",e.Torosar="Torosar",e.Fafner="Fafner",e.Rissa="Rissa",e.Iona="Iona",e.Astral="Astral",e.Halon="Halon",e.Serena="Serena",e.Daremyth="Daremyth",e.Theodorus="Theodorus",e.Solmyr="Solmyr",e.Cyra="Cyra",e.Aine="Aine",e.Fiona="Fiona",e.Rashka="Rashka",e.Marius="Marius",e.Ignatius="Ignatius",e.Octavia="Octavia",e.Calh="Calh",e.Pyre="Pyre",e.Nymus="Nymus",e.Ayden="Ayden",e.Xyron="Xyron",e.Axsis="Axsis",e.Olema="Olema",e.Calid="Calid",e.Ash="Ash",e.Zydar="Zydar",e.Xarfax="Xarfax",e.Straker="Straker",e.Vokial="Vokial",e.Moandor="Moandor",e.Charna="Charna",e.Tamika="Tamika",e.Isra="Isra",e.Clavius="Clavius",e.Galthran="Galthran",e.Septienna="Septienna",e.Aislinn="Aislinn",e.Sandro="Sandro",e.Nimbus="Nimbus",e.Thant="Thant",e.Xsi="Xsi",e.Vidomina="Vidomina",e.Nagash="Nagash",e.Lorelei="Lorelei",e.Arlach="Arlach",e.Dace="Dace",e.Ajit="Ajit",e.Damacon="Damacon",e.Gunnar="Gunnar",e.Synca="Synca",e.Shakti="Shakti",e.Alamar="Alamar",e.Jaegar="Jaegar",e.Malekith="Malekith",e.Jeddite="Jeddite",e.Geon="Geon",e.Deemer="Deemer",e.Sephinroth="Sephinroth",e.Darkstorm="Darkstorm",e.Yog="Yog",e.Gurnisson="Gurnisson",e.Jabarkas="Jabarkas",e.Shiva="Shiva",e.Gretchin="Gretchin",e.Krellion="Krellion",e.CragHack="CragHack",e.Tyraxor="Tyraxor",e.Gird="Gird",e.Vey="Vey",e.Dessa="Dessa",e.Terek="Terek",e.Zubin="Zubin",e.Gundula="Gundula",e.Oris="Oris",e.Saurug="Saurug",e.Bron="Bron",e.Drakon="Drakon",e.Wystan="Wystan",e.Tazar="Tazar",e.Alkin="Alkin",e.Korbac="Korbac",e.Gerwulf="Gerwulf",e.Broghild="Broghild",e.Mirlanda="Mirlanda",e.Rosic="Rosic",e.Voy="Voy",e.Verdish="Verdish",e.Merist="Merist",e.Styg="Styg",e.Andra="Andra",e.Tiva="Tiva",e.Pasis="Pasis",e.Thunar="Thunar",e.Ignissa="Ignissa",e.Lacus="Lacus",e.Monere="Monere",e.Erdamon="Erdamon",e.Fiur="Fiur",e.Kalt="Kalt",e.Luna="Luna",e.Brissa="Brissa",e.Ciele="Ciele",e.Labetha="Labetha",e.Inteus="Inteus",e.Aenain="Aenain",e.Gelare="Gelare",e.Grindan="Grindan",e.SirMullich="SirMullich",e.Adrienne="Adrienne",e.Catherine="Catherine",e.Dracon="Dracon",e.Gelu="Gelu",e.Kilgor="Kilgor",e.UndeadLordHaart="UndeadLordHaart",e.Mutare="Mutare",e.Roland="Roland",e.MutareDrake="MutareDrake",e.Boragus="Boragus",e.Xeron="Xeron"}(exports.Hero||(exports.Hero={})),function(e){e.Knight="Knight",e.Cleric="Cleric",e.Ranger="Ranger",e.Druid="Druid",e.Alchemist="Alchemist",e.Wizard="Wizard",e.Demoniac="Demoniac",e.Heretic="Heretic",e.DeathKnignt="DeathKnignt",e.Necromancer="Necromancer",e.Overlord="Overlord",e.Warlock="Warlock",e.Barbarian="Barbarian",e.BattleMage="BattleMage",e.Beastmaster="Beastmaster",e.Witch="Witch",e.Planeswalker="Planeswalker",e.Elementalist="Elementalist"}(exports.HeroClass||(exports.HeroClass={}));const heroEnum={[exports.Hero.Orrin]:0,[exports.Hero.Valeska]:1,[exports.Hero.Edric]:2,[exports.Hero.Sylvia]:3,[exports.Hero.LordHaart]:4,[exports.Hero.Sorsha]:5,[exports.Hero.Christian]:6,[exports.Hero.Tyris]:7,[exports.Hero.Rion]:8,[exports.Hero.Adela]:9,[exports.Hero.Cuthbert]:10,[exports.Hero.Adelaide]:11,[exports.Hero.Ingham]:12,[exports.Hero.Sanya]:13,[exports.Hero.Loynis]:14,[exports.Hero.Caitlin]:15,[exports.Hero.Mephala]:16,[exports.Hero.Ufretin]:17,[exports.Hero.Jenova]:18,[exports.Hero.Ryland]:19,[exports.Hero.Thorgrim]:20,[exports.Hero.Ivor]:21,[exports.Hero.Clancy]:22,[exports.Hero.Kyrre]:23,[exports.Hero.Coronius]:24,[exports.Hero.Uland]:25,[exports.Hero.Elleshar]:26,[exports.Hero.Gem]:27,[exports.Hero.Malcom]:28,[exports.Hero.Melodia]:29,[exports.Hero.Alagar]:30,[exports.Hero.Aeris]:31,[exports.Hero.Piquedram]:32,[exports.Hero.Thane]:33,[exports.Hero.Josephine]:34,[exports.Hero.Neela]:35,[exports.Hero.Torosar]:36,[exports.Hero.Fafner]:37,[exports.Hero.Rissa]:38,[exports.Hero.Iona]:39,[exports.Hero.Astral]:40,[exports.Hero.Halon]:41,[exports.Hero.Serena]:42,[exports.Hero.Daremyth]:43,[exports.Hero.Theodorus]:44,[exports.Hero.Solmyr]:45,[exports.Hero.Cyra]:46,[exports.Hero.Aine]:47,[exports.Hero.Fiona]:48,[exports.Hero.Rashka]:49,[exports.Hero.Marius]:50,[exports.Hero.Ignatius]:51,[exports.Hero.Octavia]:52,[exports.Hero.Calh]:53,[exports.Hero.Pyre]:54,[exports.Hero.Nymus]:55,[exports.Hero.Ayden]:56,[exports.Hero.Xyron]:57,[exports.Hero.Axsis]:58,[exports.Hero.Olema]:59,[exports.Hero.Calid]:60,[exports.Hero.Ash]:61,[exports.Hero.Zydar]:62,[exports.Hero.Xarfax]:63,[exports.Hero.Straker]:64,[exports.Hero.Vokial]:65,[exports.Hero.Moandor]:66,[exports.Hero.Charna]:67,[exports.Hero.Tamika]:68,[exports.Hero.Isra]:69,[exports.Hero.Clavius]:70,[exports.Hero.Galthran]:71,[exports.Hero.Septienna]:72,[exports.Hero.Aislinn]:73,[exports.Hero.Sandro]:74,[exports.Hero.Nimbus]:75,[exports.Hero.Thant]:76,[exports.Hero.Xsi]:77,[exports.Hero.Vidomina]:78,[exports.Hero.Nagash]:79,[exports.Hero.Lorelei]:80,[exports.Hero.Arlach]:81,[exports.Hero.Dace]:82,[exports.Hero.Ajit]:83,[exports.Hero.Damacon]:84,[exports.Hero.Gunnar]:85,[exports.Hero.Synca]:86,[exports.Hero.Shakti]:87,[exports.Hero.Alamar]:88,[exports.Hero.Jaegar]:89,[exports.Hero.Malekith]:90,[exports.Hero.Jeddite]:91,[exports.Hero.Geon]:92,[exports.Hero.Deemer]:93,[exports.Hero.Sephinroth]:94,[exports.Hero.Darkstorm]:95,[exports.Hero.Yog]:96,[exports.Hero.Gurnisson]:97,[exports.Hero.Jabarkas]:98,[exports.Hero.Shiva]:99,[exports.Hero.Gretchin]:100,[exports.Hero.Krellion]:101,[exports.Hero.CragHack]:102,[exports.Hero.Tyraxor]:103,[exports.Hero.Gird]:104,[exports.Hero.Vey]:105,[exports.Hero.Dessa]:106,[exports.Hero.Terek]:107,[exports.Hero.Zubin]:108,[exports.Hero.Gundula]:109,[exports.Hero.Oris]:110,[exports.Hero.Saurug]:111,[exports.Hero.Bron]:112,[exports.Hero.Drakon]:113,[exports.Hero.Wystan]:114,[exports.Hero.Tazar]:115,[exports.Hero.Alkin]:116,[exports.Hero.Korbac]:117,[exports.Hero.Gerwulf]:118,[exports.Hero.Broghild]:119,[exports.Hero.Mirlanda]:120,[exports.Hero.Rosic]:121,[exports.Hero.Voy]:122,[exports.Hero.Verdish]:123,[exports.Hero.Merist]:124,[exports.Hero.Styg]:125,[exports.Hero.Andra]:126,[exports.Hero.Tiva]:127,[exports.Hero.Pasis]:128,[exports.Hero.Thunar]:129,[exports.Hero.Ignissa]:130,[exports.Hero.Lacus]:131,[exports.Hero.Monere]:132,[exports.Hero.Erdamon]:133,[exports.Hero.Fiur]:134,[exports.Hero.Kalt]:135,[exports.Hero.Luna]:136,[exports.Hero.Brissa]:137,[exports.Hero.Ciele]:138,[exports.Hero.Labetha]:139,[exports.Hero.Inteus]:140,[exports.Hero.Aenain]:141,[exports.Hero.Gelare]:142,[exports.Hero.Grindan]:143,[exports.Hero.SirMullich]:144,[exports.Hero.Adrienne]:145,[exports.Hero.Catherine]:146,[exports.Hero.Dracon]:147,[exports.Hero.Gelu]:148,[exports.Hero.Kilgor]:149,[exports.Hero.UndeadLordHaart]:150,[exports.Hero.Mutare]:151,[exports.Hero.Roland]:152,[exports.Hero.MutareDrake]:153,[exports.Hero.Boragus]:154,[exports.Hero.Xeron]:155,[exports.Hero.NONE]:255},heroClassEnum={[exports.HeroClass.Knight]:0,[exports.HeroClass.Cleric]:1,[exports.HeroClass.Ranger]:2,[exports.HeroClass.Druid]:3,[exports.HeroClass.Alchemist]:4,[exports.HeroClass.Wizard]:5,[exports.HeroClass.Demoniac]:6,[exports.HeroClass.Heretic]:7,[exports.HeroClass.DeathKnignt]:8,[exports.HeroClass.Necromancer]:9,[exports.HeroClass.Overlord]:10,[exports.HeroClass.Warlock]:11,[exports.HeroClass.Barbarian]:12,[exports.HeroClass.BattleMage]:13,[exports.HeroClass.Beastmaster]:14,[exports.HeroClass.Witch]:15,[exports.HeroClass.Planeswalker]:16,[exports.HeroClass.Elementalist]:17};!function(e){e.None="None",e.AbandonedMine="AbandonedMine",e.Artifact="Artifact",e.Dwelling="Dwelling",e.Event="Event",e.Garrison="Garrison",e.Boat="Boat",e.ImpassableTerrain="ImpassableTerrain",e.PassableTerrain="PassableTerrain",e.Treasure="Treasure",e.Visitable="Visitable",e.Grail="Grail",e.Hero="Hero",e.Lighthouse="Lighthouse",e.MonolithTwoWay="MonolithTwoWay",e.Creature="Creature",e.OceanBottle="OceanBottle",e.PandorasBox="PandorasBox",e.PlaceholderHero="PlaceholderHero",e.Prison="Prison",e.QuestGuard="QuestGuard",e.RandomDwelling="RandomDwelling",e.RandomDwellingAlignment="RandomDwellingAlignment",e.RandomDwellingLevel="RandomDwellingLevel",e.RandomHero="RandomHero",e.Resource="Resource",e.ResourceGenerator="ResourceGenerator",e.Scholar="Scholar",e.SeersHut="SeersHut",e.Shipyard="Shipyard",e.Shrine="Shrine",e.Sign="Sign",e.SpellScroll="SpellScroll",e.SubterraneanGate="SubterraneanGate",e.Town="Town",e.WitchHut="WitchHut"}(exports.MetaType||(exports.MetaType={})),function(e){e.NoObj="NoObj",e.None0="None0",e.DecorativeTown="DecorativeTown",e.AltarOfSacrifice="AltarOfSacrifice",e.AnchorPoint="AnchorPoint",e.Arena="Arena",e.Artifact="Artifact",e.PandorasBox="PandorasBox",e.BlackMarket="BlackMarket",e.Boat="Boat",e.Borderguard="Borderguard",e.Keymaster="Keymaster",e.Buoy="Buoy",e.Campfire="Campfire",e.Cartographer="Cartographer",e.SwanPond="SwanPond",e.CoverOfDarkness="CoverOfDarkness",e.CreatureBank="CreatureBank",e.CreatureGenerator1="CreatureGenerator1",e.CreatureGenerator2="CreatureGenerator2",e.CreatureGenerator3="CreatureGenerator3",e.CreatureGenerator4="CreatureGenerator4",e.CursedGround1="CursedGround1",e.Corpse="Corpse",e.MarlettoTower="MarlettoTower",e.DerelictShip="DerelictShip",e.DragonUtopia="DragonUtopia",e.Event="Event",e.EyeOfMagi="EyeOfMagi",e.FaerieRing="FaerieRing",e.Flotsam="Flotsam",e.FountainOfFortune="FountainOfFortune",e.FountainOfYouth="FountainOfYouth",e.GardenOfRevelation="GardenOfRevelation",e.Garrison="Garrison",e.Hero="Hero",e.HillFort="HillFort",e.Grail="Grail",e.HutOfMagi="HutOfMagi",e.IdolOfFortune="IdolOfFortune",e.LeanTo="LeanTo",e.Blank40="Blank40",e.LibraryOfEnlightenment="LibraryOfEnlightenment",e.Lighthouse="Lighthouse",e.MonolithOneWayEntrance="MonolithOneWayEntrance",e.MonolithOneWayExit="MonolithOneWayExit",e.MonolithTwoWay="MonolithTwoWay",e.MagicPlains1="MagicPlains1",e.SchoolOfMagic="SchoolOfMagic",e.MagicSpring="MagicSpring",e.MagicWell="MagicWell",e.MarketOfTime="MarketOfTime",e.MercenaryCamp="MercenaryCamp",e.Mermaid="Mermaid",e.Mine="Mine",e.Creature="Creature",e.MysticalGarden="MysticalGarden",e.Oasis="Oasis",e.Obelisk="Obelisk",e.RedwoodObservatory="RedwoodObservatory",e.OceanBottle="OceanBottle",e.PillarOfFire="PillarOfFire",e.StarAxis="StarAxis",e.Prison="Prison",e.Pyramid="Pyramid",e.WogObject="WogObject",e.RallyFlag="RallyFlag",e.RandomArt="RandomArt",e.RandomTreasureArt="RandomTreasureArt",e.RandomMinorArt="RandomMinorArt",e.RandomMajorArt="RandomMajorArt",e.RandomRelicArt="RandomRelicArt",e.RandomHero="RandomHero",e.RandomCreature="RandomCreature",e.RandomCreatureL1="RandomCreatureL1",e.RandomCreatureL2="RandomCreatureL2",e.RandomCreatureL3="RandomCreatureL3",e.RandomCreatureL4="RandomCreatureL4",e.RandomResource="RandomResource",e.RandomTown="RandomTown",e.RefugeeCamp="RefugeeCamp",e.Resource="Resource",e.Sanctuary="Sanctuary",e.Scholar="Scholar",e.SeaChest="SeaChest",e.SeerHut="SeerHut",e.Crypt="Crypt",e.Shipwreck="Shipwreck",e.ShipwreckSurvivor="ShipwreckSurvivor",e.Shipyard="Shipyard",e.ShrineOfMagicIncantation="ShrineOfMagicIncantation",e.ShrineOfMagicGesture="ShrineOfMagicGesture",e.ShrineOfMagicThought="ShrineOfMagicThought",e.Sign="Sign",e.Sirens="Sirens",e.SpellScroll="SpellScroll",e.Stables="Stables",e.Tavern="Tavern",e.Temple="Temple",e.DenOfThieves="DenOfThieves",e.Town="Town",e.TradingPost="TradingPost",e.LearningStone="LearningStone",e.TreasureChest="TreasureChest",e.TreeOfKnowledge="TreeOfKnowledge",e.SubterraneanGate="SubterraneanGate",e.University="University",e.Wagon="Wagon",e.WarMachineFactory="WarMachineFactory",e.SchoolOfWar="SchoolOfWar",e.WarriorsTomb="WarriorsTomb",e.WaterWheel="WaterWheel",e.WateringHole="WateringHole",e.Whirlpool="Whirlpool",e.Windmill="Windmill",e.WitchHut="WitchHut",e.ImpassableBrush="ImpassableBrush",e.ImpassableBush="ImpassableBush",e.ImpassableCactus="ImpassableCactus",e.ImpassableCanyon="ImpassableCanyon",e.ImpassableCrater="ImpassableCrater",e.ImpassableDeadvegetation="ImpassableDeadvegetation",e.ImpassableFlowers="ImpassableFlowers",e.ImpassableFrozenlike="ImpassableFrozenlike",e.ImpassableHedge="ImpassableHedge",e.ImpassableHill="ImpassableHill",e.Hole="Hole",e.PassableKelp="PassableKelp",e.ImpassableLake="ImpassableLake",e.ImpassableLavaflow="ImpassableLavaflow",e.ImpassableLavalake="ImpassableLavalake",e.ImpassableMushrooms="ImpassableMushrooms",e.ImpassableLog="ImpassableLog",e.ImpassableMandrake="ImpassableMandrake",e.ImpassableMoss="ImpassableMoss",e.ImpassableMound="ImpassableMound",e.ImpassableMountain="ImpassableMountain",e.ImpassableOaktrees="ImpassableOaktrees",e.ImpassableOutcropping="ImpassableOutcropping",e.ImpassablePinetrees="ImpassablePinetrees",e.ImpassablePlant="ImpassablePlant",e.Passable139="Passable139",e.Passable140="Passable140",e.Passable141="Passable141",e.Passable142="Passable142",e.ImpassableRiverdelta="ImpassableRiverdelta",e.Passable144="Passable144",e.Passable145="Passable145",e.Passable146="Passable146",e.ImpassableRock="ImpassableRock",e.ImpassableSanddune="ImpassableSanddune",e.ImpassableSandpit="ImpassableSandpit",e.ImpassableShrub="ImpassableShrub",e.ImpassableSkull="ImpassableSkull",e.ImpassableStalagmite="ImpassableStalagmite",e.ImpassableStump="ImpassableStump",e.ImpassableTarpit="ImpassableTarpit",e.ImpassableTrees="ImpassableTrees",e.ImpassableVine="ImpassableVine",e.ImpassableVolcanicvent="ImpassableVolcanicvent",e.ImpassableVolcano="ImpassableVolcano",e.ImpassableWillowtrees="ImpassableWillowtrees",e.ImpassableYuccatrees="ImpassableYuccatrees",e.ImpassableReef="ImpassableReef",e.RandomCreatureL5="RandomCreatureL5",e.RandomCreatureL6="RandomCreatureL6",e.RandomCreatureL7="RandomCreatureL7",e.ImpassableBrush2="ImpassableBrush2",e.ImpassableBush2="ImpassableBush2",e.ImpassableCactus2="ImpassableCactus2",e.ImpassableCanyon2="ImpassableCanyon2",e.ImpassableCrater2="ImpassableCrater2",e.ImpassableDeadvegetation2="ImpassableDeadvegetation2",e.ImpassableFlowers2="ImpassableFlowers2",e.ImpassableFrozenlike2="ImpassableFrozenlike2",e.ImpassableHedge2="ImpassableHedge2",e.ImpassableHill2="ImpassableHill2",e.PassableHole2="PassableHole2",e.PassableKelp2="PassableKelp2",e.ImpassableLake2="ImpassableLake2",e.ImpassableLavaflow2="ImpassableLavaflow2",e.ImpassableLavalake2="ImpassableLavalake2",e.ImpassableMushrooms2="ImpassableMushrooms2",e.ImpassableLog2="ImpassableLog2",e.ImpassableMandrake2="ImpassableMandrake2",e.ImpassableMoss2="ImpassableMoss2",e.ImpassableMound2="ImpassableMound2",e.ImpassableMountain2="ImpassableMountain2",e.ImpassableOaktrees2="ImpassableOaktrees2",e.ImpassableOutcropping2="ImpassableOutcropping2",e.ImpassablePinetrees2="ImpassablePinetrees2",e.ImpassablePlant2="ImpassablePlant2",e.ImpassableRiverdelta2="ImpassableRiverdelta2",e.ImpassableRock2="ImpassableRock2",e.ImpassableSanddune2="ImpassableSanddune2",e.ImpassableSandpit2="ImpassableSandpit2",e.ImpassableShrub2="ImpassableShrub2",e.ImpassableSkull2="ImpassableSkull2",e.ImpassableStalagmite2="ImpassableStalagmite2",e.ImpassableStump2="ImpassableStump2",e.ImpassableTarpit2="ImpassableTarpit2",e.ImpassableTrees2="ImpassableTrees2",e.ImpassableVine2="ImpassableVine2",e.ImpassableVolcanicvent2="ImpassableVolcanicvent2",e.ImpassableVolcano2="ImpassableVolcano2",e.ImpassableWillowtrees2="ImpassableWillowtrees2",e.ImpassableYuccatrees2="ImpassableYuccatrees2",e.ImpassableReef2="ImpassableReef2",e.ImpassableDeserthills="ImpassableDeserthills",e.ImpassableDirthills="ImpassableDirthills",e.ImpassableGrasshills="ImpassableGrasshills",e.ImpassableRoughhills="ImpassableRoughhills",e.ImpassableSubterraneanrocks="ImpassableSubterraneanrocks",e.ImpassableSwampFoliage="ImpassableSwampFoliage",e.BorderGate="BorderGate",e.FreelancersGuild="FreelancersGuild",e.HeroPlaceholder="HeroPlaceholder",e.QuestGuard="QuestGuard",e.RandomDwelling="RandomDwelling",e.RandomDwellingLevel="RandomDwellingLevel",e.RandomDwellingAlignment="RandomDwellingAlignment",e.Garrison2="Garrison2",e.AbandonedMine="AbandonedMine",e.TradingPostSnow="TradingPostSnow",e.CloverField="CloverField",e.CursedGround2="CursedGround2",e.EvilFog="EvilFog",e.FavorableWinds="FavorableWinds",e.FieryFields="FieryFields",e.HolyGrounds="HolyGrounds",e.LucidPools="LucidPools",e.MagicClouds="MagicClouds",e.MagicPlains2="MagicPlains2",e.Rocklands="Rocklands"}(exports.ObjectType||(exports.ObjectType={}));const objectTypeEnum={[exports.ObjectType.NoObj]:-1,[exports.ObjectType.None0]:0,[exports.ObjectType.DecorativeTown]:1,[exports.ObjectType.AltarOfSacrifice]:2,[exports.ObjectType.AnchorPoint]:3,[exports.ObjectType.Arena]:4,[exports.ObjectType.Artifact]:5,[exports.ObjectType.PandorasBox]:6,[exports.ObjectType.BlackMarket]:7,[exports.ObjectType.Boat]:8,[exports.ObjectType.Borderguard]:9,[exports.ObjectType.Keymaster]:10,[exports.ObjectType.Buoy]:11,[exports.ObjectType.Campfire]:12,[exports.ObjectType.Cartographer]:13,[exports.ObjectType.SwanPond]:14,[exports.ObjectType.CoverOfDarkness]:15,[exports.ObjectType.CreatureBank]:16,[exports.ObjectType.CreatureGenerator1]:17,[exports.ObjectType.CreatureGenerator2]:18,[exports.ObjectType.CreatureGenerator3]:19,[exports.ObjectType.CreatureGenerator4]:20,[exports.ObjectType.CursedGround1]:21,[exports.ObjectType.Corpse]:22,[exports.ObjectType.MarlettoTower]:23,[exports.ObjectType.DerelictShip]:24,[exports.ObjectType.DragonUtopia]:25,[exports.ObjectType.Event]:26,[exports.ObjectType.EyeOfMagi]:27,[exports.ObjectType.FaerieRing]:28,[exports.ObjectType.Flotsam]:29,[exports.ObjectType.FountainOfFortune]:30,[exports.ObjectType.FountainOfYouth]:31,[exports.ObjectType.GardenOfRevelation]:32,[exports.ObjectType.Garrison]:33,[exports.ObjectType.Hero]:34,[exports.ObjectType.HillFort]:35,[exports.ObjectType.Grail]:36,[exports.ObjectType.HutOfMagi]:37,[exports.ObjectType.IdolOfFortune]:38,[exports.ObjectType.LeanTo]:39,[exports.ObjectType.Blank40]:40,[exports.ObjectType.LibraryOfEnlightenment]:41,[exports.ObjectType.Lighthouse]:42,[exports.ObjectType.MonolithOneWayEntrance]:43,[exports.ObjectType.MonolithOneWayExit]:44,[exports.ObjectType.MonolithTwoWay]:45,[exports.ObjectType.MagicPlains1]:46,[exports.ObjectType.SchoolOfMagic]:47,[exports.ObjectType.MagicSpring]:48,[exports.ObjectType.MagicWell]:49,[exports.ObjectType.MarketOfTime]:50,[exports.ObjectType.MercenaryCamp]:51,[exports.ObjectType.Mermaid]:52,[exports.ObjectType.Mine]:53,[exports.ObjectType.Creature]:54,[exports.ObjectType.MysticalGarden]:55,[exports.ObjectType.Oasis]:56,[exports.ObjectType.Obelisk]:57,[exports.ObjectType.RedwoodObservatory]:58,[exports.ObjectType.OceanBottle]:59,[exports.ObjectType.PillarOfFire]:60,[exports.ObjectType.StarAxis]:61,[exports.ObjectType.Prison]:62,[exports.ObjectType.Pyramid]:63,[exports.ObjectType.WogObject]:63,[exports.ObjectType.RallyFlag]:64,[exports.ObjectType.RandomArt]:65,[exports.ObjectType.RandomTreasureArt]:66,[exports.ObjectType.RandomMinorArt]:67,[exports.ObjectType.RandomMajorArt]:68,[exports.ObjectType.RandomRelicArt]:69,[exports.ObjectType.RandomHero]:70,[exports.ObjectType.RandomCreature]:71,[exports.ObjectType.RandomCreatureL1]:72,[exports.ObjectType.RandomCreatureL2]:73,[exports.ObjectType.RandomCreatureL3]:74,[exports.ObjectType.RandomCreatureL4]:75,[exports.ObjectType.RandomResource]:76,[exports.ObjectType.RandomTown]:77,[exports.ObjectType.RefugeeCamp]:78,[exports.ObjectType.Resource]:79,[exports.ObjectType.Sanctuary]:80,[exports.ObjectType.Scholar]:81,[exports.ObjectType.SeaChest]:82,[exports.ObjectType.SeerHut]:83,[exports.ObjectType.Crypt]:84,[exports.ObjectType.Shipwreck]:85,[exports.ObjectType.ShipwreckSurvivor]:86,[exports.ObjectType.Shipyard]:87,[exports.ObjectType.ShrineOfMagicIncantation]:88,[exports.ObjectType.ShrineOfMagicGesture]:89,[exports.ObjectType.ShrineOfMagicThought]:90,[exports.ObjectType.Sign]:91,[exports.ObjectType.Sirens]:92,[exports.ObjectType.SpellScroll]:93,[exports.ObjectType.Stables]:94,[exports.ObjectType.Tavern]:95,[exports.ObjectType.Temple]:96,[exports.ObjectType.DenOfThieves]:97,[exports.ObjectType.Town]:98,[exports.ObjectType.TradingPost]:99,[exports.ObjectType.LearningStone]:100,[exports.ObjectType.TreasureChest]:101,[exports.ObjectType.TreeOfKnowledge]:102,[exports.ObjectType.SubterraneanGate]:103,[exports.ObjectType.University]:104,[exports.ObjectType.Wagon]:105,[exports.ObjectType.WarMachineFactory]:106,[exports.ObjectType.SchoolOfWar]:107,[exports.ObjectType.WarriorsTomb]:108,[exports.ObjectType.WaterWheel]:109,[exports.ObjectType.WateringHole]:110,[exports.ObjectType.Whirlpool]:111,[exports.ObjectType.Windmill]:112,[exports.ObjectType.WitchHut]:113,[exports.ObjectType.ImpassableBrush]:114,[exports.ObjectType.ImpassableBush]:115,[exports.ObjectType.ImpassableCactus]:116,[exports.ObjectType.ImpassableCanyon]:117,[exports.ObjectType.ImpassableCrater]:118,[exports.ObjectType.ImpassableDeadvegetation]:119,[exports.ObjectType.ImpassableFlowers]:120,[exports.ObjectType.ImpassableFrozenlike]:121,[exports.ObjectType.ImpassableHedge]:122,[exports.ObjectType.ImpassableHill]:123,[exports.ObjectType.Hole]:124,[exports.ObjectType.PassableKelp]:125,[exports.ObjectType.ImpassableLake]:126,[exports.ObjectType.ImpassableLavaflow]:127,[exports.ObjectType.ImpassableLavalake]:128,[exports.ObjectType.ImpassableMushrooms]:129,[exports.ObjectType.ImpassableLog]:130,[exports.ObjectType.ImpassableMandrake]:131,[exports.ObjectType.ImpassableMoss]:132,[exports.ObjectType.ImpassableMound]:133,[exports.ObjectType.ImpassableMountain]:134,[exports.ObjectType.ImpassableOaktrees]:135,[exports.ObjectType.ImpassableOutcropping]:136,[exports.ObjectType.ImpassablePinetrees]:137,[exports.ObjectType.ImpassablePlant]:138,[exports.ObjectType.Passable139]:139,[exports.ObjectType.Passable140]:140,[exports.ObjectType.Passable141]:141,[exports.ObjectType.Passable142]:142,[exports.ObjectType.ImpassableRiverdelta]:143,[exports.ObjectType.Passable144]:144,[exports.ObjectType.Passable145]:145,[exports.ObjectType.Passable146]:146,[exports.ObjectType.ImpassableRock]:147,[exports.ObjectType.ImpassableSanddune]:148,[exports.ObjectType.ImpassableSandpit]:149,[exports.ObjectType.ImpassableShrub]:150,[exports.ObjectType.ImpassableSkull]:151,[exports.ObjectType.ImpassableStalagmite]:152,[exports.ObjectType.ImpassableStump]:153,[exports.ObjectType.ImpassableTarpit]:154,[exports.ObjectType.ImpassableTrees]:155,[exports.ObjectType.ImpassableVine]:156,[exports.ObjectType.ImpassableVolcanicvent]:157,[exports.ObjectType.ImpassableVolcano]:158,[exports.ObjectType.ImpassableWillowtrees]:159,[exports.ObjectType.ImpassableYuccatrees]:160,[exports.ObjectType.ImpassableReef]:161,[exports.ObjectType.RandomCreatureL5]:162,[exports.ObjectType.RandomCreatureL6]:163,[exports.ObjectType.RandomCreatureL7]:164,[exports.ObjectType.ImpassableBrush2]:165,[exports.ObjectType.ImpassableBush2]:166,[exports.ObjectType.ImpassableCactus2]:167,[exports.ObjectType.ImpassableCanyon2]:168,[exports.ObjectType.ImpassableCrater2]:169,[exports.ObjectType.ImpassableDeadvegetation2]:170,[exports.ObjectType.ImpassableFlowers2]:171,[exports.ObjectType.ImpassableFrozenlike2]:172,[exports.ObjectType.ImpassableHedge2]:173,[exports.ObjectType.ImpassableHill2]:174,[exports.ObjectType.PassableHole2]:175,[exports.ObjectType.PassableKelp2]:176,[exports.ObjectType.ImpassableLake2]:177,[exports.ObjectType.ImpassableLavaflow2]:178,[exports.ObjectType.ImpassableLavalake2]:179,[exports.ObjectType.ImpassableMushrooms2]:180,[exports.ObjectType.ImpassableLog2]:181,[exports.ObjectType.ImpassableMandrake2]:182,[exports.ObjectType.ImpassableMoss2]:183,[exports.ObjectType.ImpassableMound2]:184,[exports.ObjectType.ImpassableMountain2]:185,[exports.ObjectType.ImpassableOaktrees2]:186,[exports.ObjectType.ImpassableOutcropping2]:187,[exports.ObjectType.ImpassablePinetrees2]:188,[exports.ObjectType.ImpassablePlant2]:189,[exports.ObjectType.ImpassableRiverdelta2]:190,[exports.ObjectType.ImpassableRock2]:191,[exports.ObjectType.ImpassableSanddune2]:192,[exports.ObjectType.ImpassableSandpit2]:193,[exports.ObjectType.ImpassableShrub2]:194,[exports.ObjectType.ImpassableSkull2]:195,[exports.ObjectType.ImpassableStalagmite2]:196,[exports.ObjectType.ImpassableStump2]:197,[exports.ObjectType.ImpassableTarpit2]:198,[exports.ObjectType.ImpassableTrees2]:199,[exports.ObjectType.ImpassableVine2]:200,[exports.ObjectType.ImpassableVolcanicvent2]:201,[exports.ObjectType.ImpassableVolcano2]:202,[exports.ObjectType.ImpassableWillowtrees2]:203,[exports.ObjectType.ImpassableYuccatrees2]:204,[exports.ObjectType.ImpassableReef2]:205,[exports.ObjectType.ImpassableDeserthills]:206,[exports.ObjectType.ImpassableDirthills]:207,[exports.ObjectType.ImpassableGrasshills]:208,[exports.ObjectType.ImpassableRoughhills]:209,[exports.ObjectType.ImpassableSubterraneanrocks]:210,[exports.ObjectType.ImpassableSwampFoliage]:211,[exports.ObjectType.BorderGate]:212,[exports.ObjectType.FreelancersGuild]:213,[exports.ObjectType.HeroPlaceholder]:214,[exports.ObjectType.QuestGuard]:215,[exports.ObjectType.RandomDwelling]:216,[exports.ObjectType.RandomDwellingLevel]:217,[exports.ObjectType.RandomDwellingAlignment]:218,[exports.ObjectType.Garrison2]:219,[exports.ObjectType.AbandonedMine]:220,[exports.ObjectType.TradingPostSnow]:221,[exports.ObjectType.CloverField]:222,[exports.ObjectType.CursedGround2]:223,[exports.ObjectType.EvilFog]:224,[exports.ObjectType.FavorableWinds]:225,[exports.ObjectType.FieryFields]:226,[exports.ObjectType.HolyGrounds]:227,[exports.ObjectType.LucidPools]:228,[exports.ObjectType.MagicClouds]:229,[exports.ObjectType.MagicPlains2]:230,[exports.ObjectType.Rocklands]:231},objectTypeToMeta={[exports.ObjectType.NoObj]:exports.MetaType.None,[exports.ObjectType.None0]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.Blank40]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableBrush]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableBush]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableCactus]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableCanyon]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableCrater]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableDeadvegetation]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableFlowers]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableFrozenlike]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableHedge]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableHill]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableLake]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableLavaflow]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableLavalake]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableMushrooms]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableLog]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableMandrake]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableMoss]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableMound]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableMountain]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableOaktrees]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableOutcropping]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassablePinetrees]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassablePlant]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableRiverdelta]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableRock]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableSanddune]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableSandpit]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableShrub]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableSkull]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableStalagmite]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableStump]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableTarpit]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableTrees]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableVine]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableVolcanicvent]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableVolcano]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableWillowtrees]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableYuccatrees]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableReef]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableBrush2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableBush2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableCactus2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableCanyon2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableCrater2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableDeadvegetation2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableFlowers2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableFrozenlike2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableHedge2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableHill2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableLake2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableLavaflow2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableLavalake2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableMushrooms2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableLog2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableMandrake2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableMoss2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableMound2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableMountain2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableOaktrees2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableOutcropping2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassablePinetrees2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassablePlant2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableRiverdelta2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableRock2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableSanddune2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableSandpit2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableShrub2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableSkull2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableStalagmite2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableStump2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableTarpit2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableTrees2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableVine2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableVolcanicvent2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableVolcano2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableWillowtrees2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableYuccatrees2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableReef2]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableDeserthills]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableDirthills]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableGrasshills]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableRoughhills]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableSubterraneanrocks]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.ImpassableSwampFoliage]:exports.MetaType.ImpassableTerrain,[exports.ObjectType.AltarOfSacrifice]:exports.MetaType.Visitable,[exports.ObjectType.AnchorPoint]:exports.MetaType.Visitable,[exports.ObjectType.Arena]:exports.MetaType.Visitable,[exports.ObjectType.BlackMarket]:exports.MetaType.Visitable,[exports.ObjectType.Cartographer]:exports.MetaType.Visitable,[exports.ObjectType.Buoy]:exports.MetaType.Visitable,[exports.ObjectType.SwanPond]:exports.MetaType.Visitable,[exports.ObjectType.CoverOfDarkness]:exports.MetaType.Visitable,[exports.ObjectType.CreatureBank]:exports.MetaType.Visitable,[exports.ObjectType.Corpse]:exports.MetaType.Visitable,[exports.ObjectType.MarlettoTower]:exports.MetaType.Visitable,[exports.ObjectType.DerelictShip]:exports.MetaType.Visitable,[exports.ObjectType.DragonUtopia]:exports.MetaType.Visitable,[exports.ObjectType.EyeOfMagi]:exports.MetaType.Visitable,[exports.ObjectType.FaerieRing]:exports.MetaType.Visitable,[exports.ObjectType.FountainOfFortune]:exports.MetaType.Visitable,[exports.ObjectType.FountainOfYouth]:exports.MetaType.Visitable,[exports.ObjectType.GardenOfRevelation]:exports.MetaType.Visitable,[exports.ObjectType.HillFort]:exports.MetaType.Visitable,[exports.ObjectType.HutOfMagi]:exports.MetaType.Visitable,[exports.ObjectType.IdolOfFortune]:exports.MetaType.Visitable,[exports.ObjectType.LeanTo]:exports.MetaType.Visitable,[exports.ObjectType.LibraryOfEnlightenment]:exports.MetaType.Visitable,[exports.ObjectType.SchoolOfMagic]:exports.MetaType.Visitable,[exports.ObjectType.MagicSpring]:exports.MetaType.Visitable,[exports.ObjectType.MagicWell]:exports.MetaType.Visitable,[exports.ObjectType.MercenaryCamp]:exports.MetaType.Visitable,[exports.ObjectType.Mermaid]:exports.MetaType.Visitable,[exports.ObjectType.MysticalGarden]:exports.MetaType.Visitable,[exports.ObjectType.Oasis]:exports.MetaType.Visitable,[exports.ObjectType.Obelisk]:exports.MetaType.Visitable,[exports.ObjectType.RedwoodObservatory]:exports.MetaType.Visitable,[exports.ObjectType.PillarOfFire]:exports.MetaType.Visitable,[exports.ObjectType.StarAxis]:exports.MetaType.Visitable,[exports.ObjectType.RallyFlag]:exports.MetaType.Visitable,[exports.ObjectType.Borderguard]:exports.MetaType.Visitable,[exports.ObjectType.Keymaster]:exports.MetaType.Visitable,[exports.ObjectType.RefugeeCamp]:exports.MetaType.Visitable,[exports.ObjectType.Sanctuary]:exports.MetaType.Visitable,[exports.ObjectType.Crypt]:exports.MetaType.Visitable,[exports.ObjectType.Shipwreck]:exports.MetaType.Visitable,[exports.ObjectType.Sirens]:exports.MetaType.Visitable,[exports.ObjectType.Stables]:exports.MetaType.Visitable,[exports.ObjectType.Tavern]:exports.MetaType.Visitable,[exports.ObjectType.Temple]:exports.MetaType.Visitable,[exports.ObjectType.DenOfThieves]:exports.MetaType.Visitable,[exports.ObjectType.TradingPost]:exports.MetaType.Visitable,[exports.ObjectType.LearningStone]:exports.MetaType.Visitable,[exports.ObjectType.TreeOfKnowledge]:exports.MetaType.Visitable,[exports.ObjectType.University]:exports.MetaType.Visitable,[exports.ObjectType.Wagon]:exports.MetaType.Visitable,[exports.ObjectType.WarMachineFactory]:exports.MetaType.Visitable,[exports.ObjectType.SchoolOfWar]:exports.MetaType.Visitable,[exports.ObjectType.WarriorsTomb]:exports.MetaType.Visitable,[exports.ObjectType.WaterWheel]:exports.MetaType.Visitable,[exports.ObjectType.WateringHole]:exports.MetaType.Visitable,[exports.ObjectType.Whirlpool]:exports.MetaType.Visitable,[exports.ObjectType.Windmill]:exports.MetaType.Visitable,[exports.ObjectType.MarketOfTime]:exports.MetaType.Visitable,[exports.ObjectType.DecorativeTown]:exports.MetaType.Visitable,[exports.ObjectType.TradingPostSnow]:exports.MetaType.Visitable,[exports.ObjectType.Pyramid]:exports.MetaType.Visitable,[exports.ObjectType.BorderGate]:exports.MetaType.Visitable,[exports.ObjectType.FreelancersGuild]:exports.MetaType.Visitable,[exports.ObjectType.Artifact]:exports.MetaType.Artifact,[exports.ObjectType.RandomArt]:exports.MetaType.Artifact,[exports.ObjectType.RandomTreasureArt]:exports.MetaType.Artifact,[exports.ObjectType.RandomMinorArt]:exports.MetaType.Artifact,[exports.ObjectType.RandomMajorArt]:exports.MetaType.Artifact,[exports.ObjectType.RandomRelicArt]:exports.MetaType.Artifact,[exports.ObjectType.AbandonedMine]:exports.MetaType.AbandonedMine,[exports.ObjectType.CreatureGenerator1]:exports.MetaType.Dwelling,[exports.ObjectType.CreatureGenerator2]:exports.MetaType.Dwelling,[exports.ObjectType.CreatureGenerator3]:exports.MetaType.Dwelling,[exports.ObjectType.CreatureGenerator4]:exports.MetaType.Dwelling,[exports.ObjectType.Event]:exports.MetaType.Event,[exports.ObjectType.Garrison]:exports.MetaType.Garrison,[exports.ObjectType.Garrison2]:exports.MetaType.Garrison,[exports.ObjectType.Boat]:exports.MetaType.Boat,[exports.ObjectType.CloverField]:exports.MetaType.PassableTerrain,[exports.ObjectType.EvilFog]:exports.MetaType.PassableTerrain,[exports.ObjectType.FavorableWinds]:exports.MetaType.PassableTerrain,[exports.ObjectType.FieryFields]:exports.MetaType.PassableTerrain,[exports.ObjectType.HolyGrounds]:exports.MetaType.PassableTerrain,[exports.ObjectType.LucidPools]:exports.MetaType.PassableTerrain,[exports.ObjectType.MagicClouds]:exports.MetaType.PassableTerrain,[exports.ObjectType.Rocklands]:exports.MetaType.PassableTerrain,[exports.ObjectType.CursedGround2]:exports.MetaType.PassableTerrain,[exports.ObjectType.MagicPlains2]:exports.MetaType.PassableTerrain,[exports.ObjectType.Passable139]:exports.MetaType.PassableTerrain,[exports.ObjectType.Passable140]:exports.MetaType.PassableTerrain,[exports.ObjectType.Passable141]:exports.MetaType.PassableTerrain,[exports.ObjectType.Passable142]:exports.MetaType.PassableTerrain,[exports.ObjectType.Passable144]:exports.MetaType.PassableTerrain,[exports.ObjectType.Passable145]:exports.MetaType.PassableTerrain,[exports.ObjectType.Passable146]:exports.MetaType.PassableTerrain,[exports.ObjectType.Hole]:exports.MetaType.PassableTerrain,[exports.ObjectType.CursedGround1]:exports.MetaType.PassableTerrain,[exports.ObjectType.MagicPlains1]:exports.MetaType.PassableTerrain,[exports.ObjectType.PassableKelp]:exports.MetaType.PassableTerrain,[exports.ObjectType.PassableKelp2]:exports.MetaType.PassableTerrain,[exports.ObjectType.PassableHole2]:exports.MetaType.PassableTerrain,[exports.ObjectType.PandorasBox]:exports.MetaType.PandorasBox,[exports.ObjectType.Grail]:exports.MetaType.Grail,[exports.ObjectType.Hero]:exports.MetaType.Hero,[exports.ObjectType.Lighthouse]:exports.MetaType.Lighthouse,[exports.ObjectType.MonolithTwoWay]:exports.MetaType.Visitable,[exports.ObjectType.MonolithOneWayEntrance]:exports.MetaType.Visitable,[exports.ObjectType.MonolithOneWayExit]:exports.MetaType.Visitable,[exports.ObjectType.Creature]:exports.MetaType.Creature,[exports.ObjectType.RandomCreature]:exports.MetaType.Creature,[exports.ObjectType.RandomCreatureL1]:exports.MetaType.Creature,[exports.ObjectType.RandomCreatureL2]:exports.MetaType.Creature,[exports.ObjectType.RandomCreatureL3]:exports.MetaType.Creature,[exports.ObjectType.RandomCreatureL4]:exports.MetaType.Creature,[exports.ObjectType.RandomCreatureL5]:exports.MetaType.Creature,[exports.ObjectType.RandomCreatureL6]:exports.MetaType.Creature,[exports.ObjectType.RandomCreatureL7]:exports.MetaType.Creature,[exports.ObjectType.OceanBottle]:exports.MetaType.OceanBottle,[exports.ObjectType.Prison]:exports.MetaType.Prison,[exports.ObjectType.QuestGuard]:exports.MetaType.QuestGuard,[exports.ObjectType.RandomDwelling]:exports.MetaType.RandomDwelling,[exports.ObjectType.RandomDwellingLevel]:exports.MetaType.RandomDwellingLevel,[exports.ObjectType.RandomDwellingAlignment]:exports.MetaType.RandomDwellingAlignment,[exports.ObjectType.RandomHero]:exports.MetaType.RandomHero,[exports.ObjectType.HeroPlaceholder]:exports.MetaType.PlaceholderHero,[exports.ObjectType.Resource]:exports.MetaType.Resource,[exports.ObjectType.RandomResource]:exports.MetaType.Resource,[exports.ObjectType.Mine]:exports.MetaType.ResourceGenerator,[exports.ObjectType.Scholar]:exports.MetaType.Scholar,[exports.ObjectType.SeerHut]:exports.MetaType.SeersHut,[exports.ObjectType.Shipyard]:exports.MetaType.Shipyard,[exports.ObjectType.ShrineOfMagicIncantation]:exports.MetaType.Shrine,[exports.ObjectType.ShrineOfMagicGesture]:exports.MetaType.Shrine,[exports.ObjectType.ShrineOfMagicThought]:exports.MetaType.Shrine,[exports.ObjectType.Sign]:exports.MetaType.Sign,[exports.ObjectType.SpellScroll]:exports.MetaType.SpellScroll,[exports.ObjectType.SubterraneanGate]:exports.MetaType.SubterraneanGate,[exports.ObjectType.Town]:exports.MetaType.Town,[exports.ObjectType.RandomTown]:exports.MetaType.Town,[exports.ObjectType.WitchHut]:exports.MetaType.WitchHut,[exports.ObjectType.Campfire]:exports.MetaType.Treasure,[exports.ObjectType.Flotsam]:exports.MetaType.Treasure,[exports.ObjectType.SeaChest]:exports.MetaType.Treasure,[exports.ObjectType.ShipwreckSurvivor]:exports.MetaType.Treasure,[exports.ObjectType.TreasureChest]:exports.MetaType.Treasure,[exports.ObjectType.WogObject]:exports.MetaType.None};!function(e){e.Towns="Towns",e.Creatures="Creatures",e.Heroes="Heroes",e.Artifacts="Artifacts",e.Treasure="Treasure"}(exports.ObjectGroup||(exports.ObjectGroup={}));const objectGroupEnum={[exports.ObjectGroup.Towns]:1,[exports.ObjectGroup.Creatures]:2,[exports.ObjectGroup.Heroes]:3,[exports.ObjectGroup.Artifacts]:4,[exports.ObjectGroup.Treasure]:5};function getMetaType(e){return e in objectTypeToMeta?objectTypeToMeta[e]:exports.MetaType.None}const bitMasksArray=(e,r)=>binaryMarkup.createAdapter(e,e=>e.reduce((e,a,t)=>{const s=r[t];for(const[r,t]of s)a&r&&e.push(t);return e},[]),e=>r.map(r=>{let a=0;for(const[t,s]of r)e.includes(s)&&(a|=t);return a}));!function(e){e.Attack="Attack",e.Defence="Defence",e.SpellPower="SpellPower",e.Knowledge="Knowledge"}(exports.PrimarySkill||(exports.PrimarySkill={})),function(e){e.Pathfinding="Pathfinding",e.Archery="Archery",e.Logistics="Logistics",e.Scouting="Scouting",e.Diplomacy="Diplomacy",e.Navigation="Navigation",e.Leadership="Leadership",e.Wisdom="Wisdom",e.Mysticism="Mysticism",e.Luck="Luck",e.Ballistics="Ballistics",e.EagleEye="EagleEye",e.Necromancy="Necromancy",e.Estates="Estates",e.FireMagic="FireMagic",e.AirMagic="AirMagic",e.WaterMagic="WaterMagic",e.EarthMagic="EarthMagic",e.Scholar="Scholar",e.Tactics="Tactics",e.Artillery="Artillery",e.Learning="Learning",e.Offense="Offense",e.Armorer="Armorer",e.Intelligence="Intelligence",e.Sorcery="Sorcery",e.Resistance="Resistance",e.FirstAid="FirstAid"}(exports.SecondarySkillType||(exports.SecondarySkillType={})),function(e){e.Basic="Basic",e.Advanced="Advanced",e.Expert="Expert"}(exports.SecondarySkillMastery||(exports.SecondarySkillMastery={}));const primarySkillEnum={[exports.PrimarySkill.Attack]:0,[exports.PrimarySkill.Defence]:1,[exports.PrimarySkill.SpellPower]:2,[exports.PrimarySkill.Knowledge]:3},secondarySkillEnum={[exports.SecondarySkillType.Pathfinding]:0,[exports.SecondarySkillType.Archery]:1,[exports.SecondarySkillType.Logistics]:2,[exports.SecondarySkillType.Scouting]:3,[exports.SecondarySkillType.Diplomacy]:4,[exports.SecondarySkillType.Navigation]:5,[exports.SecondarySkillType.Leadership]:6,[exports.SecondarySkillType.Wisdom]:7,[exports.SecondarySkillType.Mysticism]:8,[exports.SecondarySkillType.Luck]:9,[exports.SecondarySkillType.Ballistics]:10,[exports.SecondarySkillType.EagleEye]:11,[exports.SecondarySkillType.Necromancy]:12,[exports.SecondarySkillType.Estates]:13,[exports.SecondarySkillType.FireMagic]:14,[exports.SecondarySkillType.AirMagic]:15,[exports.SecondarySkillType.WaterMagic]:16,[exports.SecondarySkillType.EarthMagic]:17,[exports.SecondarySkillType.Scholar]:18,[exports.SecondarySkillType.Tactics]:19,[exports.SecondarySkillType.Artillery]:20,[exports.SecondarySkillType.Learning]:21,[exports.SecondarySkillType.Offense]:22,[exports.SecondarySkillType.Armorer]:23,[exports.SecondarySkillType.Intelligence]:24,[exports.SecondarySkillType.Sorcery]:25,[exports.SecondarySkillType.Resistance]:26,[exports.SecondarySkillType.FirstAid]:27},skillBits=[[[1,exports.SecondarySkillType.Pathfinding],[2,exports.SecondarySkillType.Archery],[4,exports.SecondarySkillType.Logistics],[8,exports.SecondarySkillType.Scouting],[16,exports.SecondarySkillType.Diplomacy],[32,exports.SecondarySkillType.Navigation],[64,exports.SecondarySkillType.Leadership],[128,exports.SecondarySkillType.Wisdom]],[[1,exports.SecondarySkillType.Mysticism],[2,exports.SecondarySkillType.Luck],[4,exports.SecondarySkillType.Ballistics],[8,exports.SecondarySkillType.EagleEye],[16,exports.SecondarySkillType.Necromancy],[32,exports.SecondarySkillType.Estates],[64,exports.SecondarySkillType.FireMagic],[128,exports.SecondarySkillType.AirMagic]],[[1,exports.SecondarySkillType.WaterMagic],[2,exports.SecondarySkillType.EarthMagic],[4,exports.SecondarySkillType.Scholar],[8,exports.SecondarySkillType.Tactics],[16,exports.SecondarySkillType.Artillery],[32,exports.SecondarySkillType.Learning],[64,exports.SecondarySkillType.Offense],[128,exports.SecondarySkillType.Armorer]],[[1,exports.SecondarySkillType.Intelligence],[2,exports.SecondarySkillType.Sorcery],[4,exports.SecondarySkillType.Resistance],[8,exports.SecondarySkillType.FirstAid]]],skillsMask=bitMasksArray(binaryMarkup.bytes(4),skillBits),secondarySkillMasteryEnum={[exports.SecondarySkillMastery.Basic]:1,[exports.SecondarySkillMastery.Advanced]:2,[exports.SecondarySkillMastery.Expert]:3};!function(e){e.SummonBoat="SummonBoat",e.ScuttleBoat="ScuttleBoat",e.Visions="Visions",e.ViewEarth="ViewEarth",e.Disguise="Disguise",e.ViewAir="ViewAir",e.Fly="Fly",e.WaterWalk="WaterWalk",e.DimensionDoor="DimensionDoor",e.TownPortal="TownPortal",e.QuickSand="QuickSand",e.LandMine="LandMine",e.ForceField="ForceField",e.FireWall="FireWall",e.Earthquake="Earthquake",e.MagicArrow="MagicArrow",e.IceBolt="IceBolt",e.LightningBolt="LightningBolt",e.Implosion="Implosion",e.ChainLightning="ChainLightning",e.FrostRing="FrostRing",e.Fireball="Fireball",e.Inferno="Inferno",e.MeteorShower="MeteorShower",e.DeathRipple="DeathRipple",e.DestroyUndead="DestroyUndead",e.Armageddon="Armageddon",e.Shield="Shield",e.AirShield="AirShield",e.FireShield="FireShield",e.ProtectionFromAir="ProtectionFromAir",e.ProtectionFromFire="ProtectionFromFire",e.ProtectionFromWater="ProtectionFromWater",e.ProtectionFromEarth="ProtectionFromEarth",e.AntiMagic="AntiMagic",e.Dispel="Dispel",e.MagicMirror="MagicMirror",e.Cure="Cure",e.Resurrection="Resurrection",e.AnimateDead="AnimateDead",e.Sacrifice="Sacrifice",e.Bless="Bless",e.Curse="Curse",e.Bloodlust="Bloodlust",e.Precision="Precision",e.Weakness="Weakness",e.StoneSkin="StoneSkin",e.DisruptingRay="DisruptingRay",e.Prayer="Prayer",e.Mirth="Mirth",e.Sorrow="Sorrow",e.Fortune="Fortune",e.Misfortune="Misfortune",e.Haste="Haste",e.Slow="Slow",e.Slayer="Slayer",e.Frenzy="Frenzy",e.TitansLightningBolt="TitansLightningBolt",e.Counterstrike="Counterstrike",e.Berserk="Berserk",e.Hypnotize="Hypnotize",e.Forgetfulness="Forgetfulness",e.Blind="Blind",e.Teleport="Teleport",e.RemoveObstacle="RemoveObstacle",e.Clone="Clone",e.FireElemental="FireElemental",e.EarthElemental="EarthElemental",e.WaterElemental="WaterElemental",e.AirElemental="AirElemental",e.Stone="Stone",e.Poison="Poison",e.Bind="Bind",e.Disease="Disease",e.Paralyze="Paralyze",e.Aging="Aging",e.DeathCloud="DeathCloud",e.Thunderbolt="Thunderbolt",e.DragonflyDispel="DragonflyDispel",e.DeathStare="DeathStare",e.AcidBreath="AcidBreath"}(exports.Spell||(exports.Spell={}));const spellEnum={[exports.Spell.SummonBoat]:0,[exports.Spell.ScuttleBoat]:1,[exports.Spell.Visions]:2,[exports.Spell.ViewEarth]:3,[exports.Spell.Disguise]:4,[exports.Spell.ViewAir]:5,[exports.Spell.Fly]:6,[exports.Spell.WaterWalk]:7,[exports.Spell.DimensionDoor]:8,[exports.Spell.TownPortal]:9,[exports.Spell.QuickSand]:10,[exports.Spell.LandMine]:11,[exports.Spell.ForceField]:12,[exports.Spell.FireWall]:13,[exports.Spell.Earthquake]:14,[exports.Spell.MagicArrow]:15,[exports.Spell.IceBolt]:16,[exports.Spell.LightningBolt]:17,[exports.Spell.Implosion]:18,[exports.Spell.ChainLightning]:19,[exports.Spell.FrostRing]:20,[exports.Spell.Fireball]:21,[exports.Spell.Inferno]:22,[exports.Spell.MeteorShower]:23,[exports.Spell.DeathRipple]:24,[exports.Spell.DestroyUndead]:25,[exports.Spell.Armageddon]:26,[exports.Spell.Shield]:27,[exports.Spell.AirShield]:28,[exports.Spell.FireShield]:29,[exports.Spell.ProtectionFromAir]:30,[exports.Spell.ProtectionFromFire]:31,[exports.Spell.ProtectionFromWater]:32,[exports.Spell.ProtectionFromEarth]:33,[exports.Spell.AntiMagic]:34,[exports.Spell.Dispel]:35,[exports.Spell.MagicMirror]:36,[exports.Spell.Cure]:37,[exports.Spell.Resurrection]:38,[exports.Spell.AnimateDead]:39,[exports.Spell.Sacrifice]:40,[exports.Spell.Bless]:41,[exports.Spell.Curse]:42,[exports.Spell.Bloodlust]:43,[exports.Spell.Precision]:44,[exports.Spell.Weakness]:45,[exports.Spell.StoneSkin]:46,[exports.Spell.DisruptingRay]:47,[exports.Spell.Prayer]:48,[exports.Spell.Mirth]:49,[exports.Spell.Sorrow]:50,[exports.Spell.Fortune]:51,[exports.Spell.Misfortune]:52,[exports.Spell.Haste]:53,[exports.Spell.Slow]:54,[exports.Spell.Slayer]:55,[exports.Spell.Frenzy]:56,[exports.Spell.TitansLightningBolt]:57,[exports.Spell.Counterstrike]:58,[exports.Spell.Berserk]:59,[exports.Spell.Hypnotize]:60,[exports.Spell.Forgetfulness]:61,[exports.Spell.Blind]:62,[exports.Spell.Teleport]:63,[exports.Spell.RemoveObstacle]:64,[exports.Spell.Clone]:65,[exports.Spell.FireElemental]:66,[exports.Spell.EarthElemental]:67,[exports.Spell.WaterElemental]:68,[exports.Spell.AirElemental]:69,[exports.Spell.Stone]:70,[exports.Spell.Poison]:71,[exports.Spell.Bind]:72,[exports.Spell.Disease]:73,[exports.Spell.Paralyze]:74,[exports.Spell.Aging]:75,[exports.Spell.DeathCloud]:76,[exports.Spell.Thunderbolt]:77,[exports.Spell.DragonflyDispel]:78,[exports.Spell.DeathStare]:79,[exports.Spell.AcidBreath]:80},spellBits=[[[1,exports.Spell.SummonBoat],[2,exports.Spell.ScuttleBoat],[4,exports.Spell.Visions],[8,exports.Spell.ViewEarth],[16,exports.Spell.Disguise],[32,exports.Spell.ViewAir],[64,exports.Spell.Fly],[128,exports.Spell.WaterWalk]],[[1,exports.Spell.DimensionDoor],[2,exports.Spell.TownPortal],[4,exports.Spell.QuickSand],[8,exports.Spell.LandMine],[16,exports.Spell.ForceField],[32,exports.Spell.FireWall],[64,exports.Spell.Earthquake],[128,exports.Spell.MagicArrow]],[[1,exports.Spell.IceBolt],[2,exports.Spell.LightningBolt],[4,exports.Spell.Implosion],[8,exports.Spell.ChainLightning],[16,exports.Spell.FrostRing],[32,exports.Spell.Fireball],[64,exports.Spell.Inferno],[128,exports.Spell.MeteorShower]],[[1,exports.Spell.DeathRipple],[2,exports.Spell.DestroyUndead],[4,exports.Spell.Armageddon],[8,exports.Spell.Shield],[16,exports.Spell.AirShield],[32,exports.Spell.FireShield],[64,exports.Spell.ProtectionFromAir],[128,exports.Spell.ProtectionFromFire]],[[1,exports.Spell.ProtectionFromWater],[2,exports.Spell.ProtectionFromEarth],[4,exports.Spell.AntiMagic],[8,exports.Spell.Dispel],[16,exports.Spell.MagicMirror],[32,exports.Spell.Cure],[64,exports.Spell.Resurrection],[128,exports.Spell.AnimateDead]],[[1,exports.Spell.Sacrifice],[2,exports.Spell.Bless],[4,exports.Spell.Curse],[8,exports.Spell.Bloodlust],[16,exports.Spell.Precision],[32,exports.Spell.Weakness],[64,exports.Spell.StoneSkin],[128,exports.Spell.DisruptingRay]],[[1,exports.Spell.Prayer],[2,exports.Spell.Mirth],[4,exports.Spell.Sorrow],[8,exports.Spell.Fortune],[16,exports.Spell.Misfortune],[32,exports.Spell.Haste],[64,exports.Spell.Slow],[128,exports.Spell.Slayer]],[[1,exports.Spell.Frenzy],[2,exports.Spell.TitansLightningBolt],[4,exports.Spell.Counterstrike],[8,exports.Spell.Berserk],[16,exports.Spell.Hypnotize],[32,exports.Spell.Forgetfulness],[64,exports.Spell.Blind],[128,exports.Spell.Teleport]],[[1,exports.Spell.RemoveObstacle],[2,exports.Spell.Clone],[4,exports.Spell.FireElemental],[8,exports.Spell.EarthElemental],[16,exports.Spell.WaterElemental],[32,exports.Spell.AirElemental]]],spellsMask=bitMasksArray(binaryMarkup.bytes(9),spellBits);!function(e){e.Wood="Wood",e.Mercury="Mercury",e.Ore="Ore",e.Sulfur="Sulfur",e.Crystal="Crystal",e.Gems="Gems",e.Gold="Gold"}(exports.Resource||(exports.Resource={}));const resourceEnum={[exports.Resource.Wood]:0,[exports.Resource.Mercury]:1,[exports.Resource.Ore]:2,[exports.Resource.Sulfur]:3,[exports.Resource.Crystal]:4,[exports.Resource.Gems]:5,[exports.Resource.Gold]:6};!function(e){e.Red="Red",e.Blue="Blue",e.Tan="Tan",e.Green="Green",e.Orange="Orange",e.Purple="Purple",e.Teal="Teal",e.Pink="Pink",e.Neutral="Neutral"}(exports.Player||(exports.Player={}));const playerEnum={[exports.Player.Red]:0,[exports.Player.Blue]:1,[exports.Player.Tan]:2,[exports.Player.Green]:3,[exports.Player.Orange]:4,[exports.Player.Purple]:5,[exports.Player.Teal]:6,[exports.Player.Pink]:7,[exports.Player.Neutral]:255},isRoE=e=>e.get("format")===exports.MapFormat.ROE,isSoD=e=>e.get("format")===exports.MapFormat.SOD,isNotRoE=e=>e.get("format")!==exports.MapFormat.ROE,hommString=binaryMarkup.pascalString(binaryMarkup.uint32),primarySkills=binaryMarkup.struct(binaryMarkup.uint8`attack`,binaryMarkup.uint8`defense`,binaryMarkup.uint8`spellPower`,binaryMarkup.uint8`knowledge`),skill=binaryMarkup.enums(binaryMarkup.byte,secondarySkillEnum),secondarySkill=binaryMarkup.struct(skill`type`,binaryMarkup.enums(binaryMarkup.uint8,secondarySkillMasteryEnum)`level`),experience=binaryMarkup.uint32,heroType=binaryMarkup.uint8,artifactType=binaryMarkup.when(isRoE,binaryMarkup.uint8,binaryMarkup.uint16),creatureType=binaryMarkup.when(isRoE,binaryMarkup.int8,binaryMarkup.int16),resourceType=binaryMarkup.uint8,spellType=binaryMarkup.uint8,absodId=binaryMarkup.uint32,playerFlag=binaryMarkup.enums(binaryMarkup.uint8,playerEnum),artifact=binaryMarkup.enums(artifactType,artifactEnum),creature=binaryMarkup.enums(creatureType,creatureEnum),hero=binaryMarkup.enums(heroType,heroEnum),spell=binaryMarkup.enums(spellType,spellEnum),resource=binaryMarkup.enums(resourceType,resourceEnum),creatureSlot=binaryMarkup.struct(creature`type`,binaryMarkup.uint16`quantity`),army=binaryMarkup.array(creatureSlot,7),resources=binaryMarkup.array(binaryMarkup.int32,7),wornArtifacts=binaryMarkup.struct(artifact`headwear`,artifact`shoulders`,artifact`rightHand`,artifact`leftHand`,artifact`torso`,artifact`rightRing`,artifact`leftRing`,artifact`feet`,artifact`misc1`,artifact`misc2`,artifact`misc3`,artifact`misc4`,artifact`device1`,artifact`device2`,artifact`device3`,artifact`device4`,binaryMarkup.when(isSoD,binaryMarkup.uint16),artifact`spellbook`,artifact`misc5`),backpack=binaryMarkup.struct(binaryMarkup.uint16`count`,binaryMarkup.array(artifact,binaryMarkup.ctx`count`)`artifacts`),artifacts=binaryMarkup.struct(wornArtifacts`worn`,backpack`backpack`),owner=binaryMarkup.enums(binaryMarkup.byte,playerEnum),info=binaryMarkup.struct(binaryMarkup.flag`hasHero`,binaryMarkup.uint32`mapSize`,binaryMarkup.flag`hasTwoLevels`,hommString`name`,hommString`description`,binaryMarkup.enums(binaryMarkup.uint8,difficultyEnum)`difficulty`,binaryMarkup.when(isNotRoE,binaryMarkup.uint8)`masteryCap`),mainTown=binaryMarkup.struct(binaryMarkup.when(isNotRoE,binaryMarkup.byte)`createHero`,binaryMarkup.when(isNotRoE,binaryMarkup.byte)`type`,binaryMarkup.byte`x`,binaryMarkup.byte`y`,binaryMarkup.byte`z`),startingHeroRoE=binaryMarkup.struct(binaryMarkup.flag`isRandom`,hero`hero`,binaryMarkup.when(binaryMarkup.ctx`hero`.neq(exports.Hero.NONE),binaryMarkup.byte)`face`,binaryMarkup.when(binaryMarkup.ctx`hero`.neq(exports.Hero.NONE),hommString)`name`),startingHeroAbSoD=binaryMarkup.struct(binaryMarkup.flag`isRandom`,hero`hero`,binaryMarkup.byte`face`,hommString`name`),startingHero=binaryMarkup.when(isRoE,startingHeroRoE,startingHeroAbSoD),additionalHeroInfo=binaryMarkup.struct(hero`hero`,hommString`name`),additionalInfo=binaryMarkup.struct(binaryMarkup.skip(1),binaryMarkup.uint32`heroesCount`,binaryMarkup.array(additionalHeroInfo,binaryMarkup.ctx`heroesCount`)`heroes`),player=binaryMarkup.struct(binaryMarkup.flag`canBeHuman`,binaryMarkup.flag`canBeComputer`,binaryMarkup.enums(binaryMarkup.uint8,behaviorEnum)`behavior`,binaryMarkup.when(isSoD,binaryMarkup.uint8)`allowedAlignments`,binaryMarkup.uint8`townTypes`,binaryMarkup.when(isNotRoE,binaryMarkup.uint8)`townConflux`,binaryMarkup.flag`hasRandomTown`,binaryMarkup.flag`hasMainTown`,binaryMarkup.when(binaryMarkup.ctx`hasMainTown`,mainTown)`mainTown`,startingHero`startingHero`,binaryMarkup.when(e=>isNotRoE(e)&&e.get("startingHero").hero!==exports.Hero.NONE,additionalInfo)`additionaInfo`);!function(e){e.LoseTown="LoseTown",e.LoseHero="LoseHero",e.Time="Time"}(exports.LoseCondition||(exports.LoseCondition={}));const loseConditionsEnum={[exports.LoseCondition.LoseTown]:0,[exports.LoseCondition.LoseHero]:1,[exports.LoseCondition.Time]:2},position=binaryMarkup.struct(binaryMarkup.uint8`x`,binaryMarkup.uint8`y`,binaryMarkup.uint8`z`),time=binaryMarkup.struct(binaryMarkup.uint16`days`),loseConditionsBranches={[exports.LoseCondition.LoseTown]:position,[exports.LoseCondition.LoseHero]:position,[exports.LoseCondition.Time]:time};!function(e){e.AcquireArtifact="AcquireArtifact",e.AccumulateCreatures="AccumulateCreatures",e.AccumulateResources="AccumulateResources",e.UpgradeTown="UpgradeTown",e.BuildGrail="BuildGrail",e.DefeatHero="DefeatHero",e.CaptureTown="CaptureTown",e.DefeatMonster="DefeatMonster",e.FlagDwellings="FlagDwellings",e.FlagMines="FlagMines",e.TransportArtifact="TransportArtifact"}(exports.WinCondition||(exports.WinCondition={}));const winConditionsEnum={[exports.WinCondition.AcquireArtifact]:0,[exports.WinCondition.AccumulateCreatures]:1,[exports.WinCondition.AccumulateResources]:2,[exports.WinCondition.UpgradeTown]:3,[exports.WinCondition.BuildGrail]:4,[exports.WinCondition.DefeatHero]:5,[exports.WinCondition.CaptureTown]:6,[exports.WinCondition.DefeatMonster]:7,[exports.WinCondition.FlagDwellings]:8,[exports.WinCondition.FlagMines]:9,[exports.WinCondition.TransportArtifact]:10},aquireArtifact=binaryMarkup.struct(binaryMarkup.flag`allowNormalWin`,binaryMarkup.flag`appliesToComputer`,artifact`type`),accumulateCreatures=binaryMarkup.struct(binaryMarkup.flag`allowNormalWin`,binaryMarkup.flag`appliesToComputer`,creature`type`,binaryMarkup.uint32`amount`),accumulateResources=binaryMarkup.struct(binaryMarkup.flag`allowNormalWin`,binaryMarkup.flag`appliesToComputer`,resource`resource`,binaryMarkup.uint32`amount`),upgradeTown=binaryMarkup.struct(binaryMarkup.flag`allowNormalWin`,binaryMarkup.flag`appliesToComputer`,binaryMarkup.uint8`x`,binaryMarkup.uint8`y`,binaryMarkup.uint8`z`,binaryMarkup.enums(binaryMarkup.uint8,hallLevelEnum)`hallLevel`,binaryMarkup.enums(binaryMarkup.uint8,castleLevelEnum)`castleLevel`),position$1=binaryMarkup.struct(binaryMarkup.flag`allowNormalWin`,binaryMarkup.flag`appliesToComputer`,binaryMarkup.uint8`x`,binaryMarkup.uint8`y`,binaryMarkup.uint8`z`),flagWin=binaryMarkup.struct(binaryMarkup.flag`allowNormalWin`,binaryMarkup.flag`appliesToComputer`),transportArtifact=binaryMarkup.struct(binaryMarkup.flag`allowNormalWin`,binaryMarkup.flag`appliesToComputer`,binaryMarkup.uint8`type`,binaryMarkup.uint8`x`,binaryMarkup.uint8`y`,binaryMarkup.uint8`z`),winConditionsBranches={[exports.WinCondition.AcquireArtifact]:aquireArtifact,[exports.WinCondition.AccumulateCreatures]:accumulateCreatures,[exports.WinCondition.AccumulateResources]:accumulateResources,[exports.WinCondition.UpgradeTown]:upgradeTown,[exports.WinCondition.BuildGrail]:position$1,[exports.WinCondition.DefeatHero]:position$1,[exports.WinCondition.CaptureTown]:position$1,[exports.WinCondition.DefeatHero]:position$1,[exports.WinCondition.FlagDwellings]:flagWin,[exports.WinCondition.FlagMines]:flagWin,[exports.WinCondition.TransportArtifact]:transportArtifact},rumor=binaryMarkup.struct(hommString`name`,hommString`desciption`),customHero=binaryMarkup.struct(hero`hero`,binaryMarkup.uint8`face`,hommString`name`,binaryMarkup.uint8`allowed_players`),secondarySkills=binaryMarkup.struct(binaryMarkup.uint32`count`,binaryMarkup.array(secondarySkill,binaryMarkup.ctx`count`)`entries`),heroData=binaryMarkup.struct(binaryMarkup.flag`hasExperience`,binaryMarkup.when(binaryMarkup.ctx`hasExperience`,binaryMarkup.uint32)`experience`,binaryMarkup.flag`hasSecondarySkills`,binaryMarkup.when(binaryMarkup.ctx`hasSecondarySkills`,secondarySkills)`secondarySkills`,binaryMarkup.flag`hasArtifacts`,binaryMarkup.when(binaryMarkup.ctx`hasArtifacts`,artifacts)`artifacts`,binaryMarkup.flag`hasBiography`,binaryMarkup.when(binaryMarkup.ctx`hasBiography`,hommString)`biography`,binaryMarkup.enums(binaryMarkup.uint8,genderEnum)`gender`,binaryMarkup.flag`hasSpells`,binaryMarkup.when(binaryMarkup.ctx`hasSpells`,spellsMask)`spells`,binaryMarkup.flag`hasPrimarySkills`,binaryMarkup.when(binaryMarkup.ctx`hasPrimarySkills`,primarySkills)`primarySkills`),heroSettings=binaryMarkup.struct(binaryMarkup.flag`hasSettings`,binaryMarkup.when(binaryMarkup.ctx`hasSettings`,heroData)`settings`),additionalInfo$1=binaryMarkup.struct(binaryMarkup.enums(binaryMarkup.uint8,winConditionsEnum)`winCondition`,binaryMarkup.branch(binaryMarkup.ctx`winCondition`,winConditionsBranches)`winConditionData`,binaryMarkup.enums(binaryMarkup.uint8,loseConditionsEnum)`loseCondition`,binaryMarkup.branch(binaryMarkup.ctx`loseCondition`,loseConditionsBranches)`loseConditionData`,binaryMarkup.uint8`teamsCount`,binaryMarkup.when(binaryMarkup.ctx`teamsCount`.gt(0),binaryMarkup.array(binaryMarkup.byte,8))`teams`,binaryMarkup.bytes(e=>isRoE(e)?16:20)`availableHeroes`,binaryMarkup.when(isNotRoE,binaryMarkup.uint32),binaryMarkup.when(isSoD,binaryMarkup.uint8)`customHeroesCount`,binaryMarkup.when(isSoD,binaryMarkup.array(customHero,binaryMarkup.ctx`customHeroesCount`))`customHeroes`,binaryMarkup.skip(31),binaryMarkup.when(isNotRoE,binaryMarkup.bytes(e=>isSoD(e)?18:17))`availableArtifacts`,binaryMarkup.when(isSoD,spellsMask)`availableSpells`,binaryMarkup.when(isSoD,skillsMask)`availableSkills`,binaryMarkup.uint32`rumorsRount`,binaryMarkup.array(rumor,binaryMarkup.ctx`rumorsRount`)`rumors`,binaryMarkup.when(isSoD,binaryMarkup.array(heroSettings,156))`heroSettings`);!function(e){e.Dirt="Dirt",e.Sand="Sand",e.Grass="Grass",e.Snow="Snow",e.Swamp="Swamp",e.Rough="Rough",e.Sub="Sub",e.Lava="Lava",e.Water="Water",e.Rock="Rock"}(exports.Terrain||(exports.Terrain={})),function(e){e.None="None",e.Clear="Clear",e.Icy="Icy",e.Muddy="Muddy",e.Lava="Lava"}(exports.River||(exports.River={})),function(e){e.None="None",e.Dirt="Dirt",e.Gravel="Gravel",e.Cobble="Cobble"}(exports.Road||(exports.Road={}));const terrainsEnum={[exports.Terrain.Dirt]:0,[exports.Terrain.Sand]:1,[exports.Terrain.Grass]:2,[exports.Terrain.Snow]:3,[exports.Terrain.Swamp]:4,[exports.Terrain.Rough]:5,[exports.Terrain.Sub]:6,[exports.Terrain.Lava]:7,[exports.Terrain.Water]:8,[exports.Terrain.Rock]:9},riversEnum={[exports.River.None]:0,[exports.River.Clear]:1,[exports.River.Icy]:2,[exports.River.Muddy]:3,[exports.River.Lava]:4},roadsEnum={[exports.Road.None]:0,[exports.Road.Dirt]:1,[exports.Road.Gravel]:2,[exports.Road.Cobble]:3};!function(e){e.TerrainVertical="TerrainVertical",e.TerrainHorizontal="TerrainHorizontal",e.RiverVertical="RiverVertical",e.RiverHorizontal="RiverHorizontal",e.RoadVertical="RoadVertical",e.RoadHorizontal="RoadHorizontal"}(exports.TileMirror||(exports.TileMirror={}));const mirrorBits=[[[1,exports.TileMirror.TerrainVertical],[2,exports.TileMirror.TerrainHorizontal],[4,exports.TileMirror.RiverVertical],[8,exports.TileMirror.RiverHorizontal],[16,exports.TileMirror.RoadVertical],[32,exports.TileMirror.RoadHorizontal]]],tilePart=e=>binaryMarkup.struct(binaryMarkup.enums(binaryMarkup.byte,e)`type`,binaryMarkup.byte`sprite`),tile=binaryMarkup.struct(tilePart(terrainsEnum)`terrain`,tilePart(riversEnum)`river`,tilePart(roadsEnum)`road`,bitMasksArray(binaryMarkup.bytes(1),mirrorBits)`mirror`);function calculateTiles(e){const r=e.get("info");return r.mapSize*r.mapSize*(r.hasTwoLevels?2:1)}!function(e){e.Random="Random",e.Castle="Castle",e.Rampart="Rampart",e.Tower="Tower",e.Inferno="Inferno",e.Necropolis="Necropolis",e.Dungeon="Dungeon",e.Stronghold="Stronghold",e.Fortress="Fortress",e.Conflux="Conflux",e.Neutral="Neutral"}(exports.Alignment||(exports.Alignment={}));const alignmentEnum={[exports.Alignment.Random]:-1,[exports.Alignment.Castle]:0,[exports.Alignment.Rampart]:1,[exports.Alignment.Tower]:2,[exports.Alignment.Inferno]:3,[exports.Alignment.Necropolis]:4,[exports.Alignment.Dungeon]:5,[exports.Alignment.Stronghold]:6,[exports.Alignment.Fortress]:7,[exports.Alignment.Conflux]:8},objectSubType=binaryMarkup.branch(binaryMarkup.ctx`objectType`,{[exports.ObjectType.Artifact]:binaryMarkup.enums(binaryMarkup.uint32,artifactEnum),[exports.ObjectType.Creature]:binaryMarkup.enums(binaryMarkup.uint32,creatureEnum),[exports.ObjectType.RandomDwellingAlignment]:binaryMarkup.enums(binaryMarkup.uint32,alignmentEnum)},binaryMarkup.uint32),entry=binaryMarkup.struct(hommString`header`,binaryMarkup.bytes(6)`passable`,binaryMarkup.bytes(6)`active`,binaryMarkup.uint16`allowedLandscapes`,binaryMarkup.uint16`landscapeGroup`,binaryMarkup.enums(binaryMarkup.uint32,objectTypeEnum)`objectType`,binaryMarkup.computed(e=>{return getMetaType(e.get("objectType"))})`metaType`,objectSubType`objectSubType`,binaryMarkup.enums(binaryMarkup.uint8,objectGroupEnum)`objectGroup`,binaryMarkup.uint8`above`,binaryMarkup.skip(16)),objectAttributes=binaryMarkup.struct(binaryMarkup.uint32`count`,binaryMarkup.array(entry,binaryMarkup.ctx`count`)`entries`);!function(e){e.NONE="NONE",e.Experience="Experience",e.PrimarySkills="PrimarySkills",e.DefeatHero="DefeatHero",e.DefeatMonster="DefeatMonster",e.Artifacts="Artifacts",e.Creatures="Creatures",e.Resources="Resources",e.BeHero="BeHero",e.BePlayer="BePlayer"}(exports.QuestType||(exports.QuestType={})),function(e){e.NONE="NONE",e.Experience="Experience",e.SpellPoints="SpellPoints",e.Morale="Morale",e.Luck="Luck",e.Resource="Resource",e.PrimarySkill="PrimarySkill",e.SecondarySkill="SecondarySkill",e.Artifact="Artifact",e.Spell="Spell",e.Creature="Creature"}(exports.QuestReward||(exports.QuestReward={}));const questEnum={[exports.QuestType.NONE]:0,[exports.QuestType.Experience]:1,[exports.QuestType.PrimarySkills]:2,[exports.QuestType.DefeatHero]:3,[exports.QuestType.DefeatMonster]:4,[exports.QuestType.Artifacts]:5,[exports.QuestType.Creatures]:6,[exports.QuestType.Resources]:7,[exports.QuestType.BeHero]:8,[exports.QuestType.BePlayer]:9},questRewardEnum={[exports.QuestReward.NONE]:0,[exports.QuestReward.Experience]:1,[exports.QuestReward.SpellPoints]:2,[exports.QuestReward.Morale]:3,[exports.QuestReward.Luck]:4,[exports.QuestReward.Resource]:5,[exports.QuestReward.PrimarySkill]:6,[exports.QuestReward.SecondarySkill]:7,[exports.QuestReward.Artifact]:8,[exports.QuestReward.Spell]:9,[exports.QuestReward.Creature]:10},questBranches={[exports.QuestType.NONE]:binaryMarkup.pass,[exports.QuestType.Experience]:experience,[exports.QuestType.PrimarySkills]:primarySkills,[exports.QuestType.DefeatHero]:absodId,[exports.QuestType.DefeatMonster]:absodId,[exports.QuestType.Resources]:resources,[exports.QuestType.BeHero]:hero,[exports.QuestType.BePlayer]:playerFlag,[exports.QuestType.Creatures]:binaryMarkup.struct(binaryMarkup.byte`count`,binaryMarkup.array(creatureSlot,binaryMarkup.ctx`count`)`creatures`),[exports.QuestType.Artifacts]:binaryMarkup.struct(binaryMarkup.byte`count`,binaryMarkup.array(artifact,binaryMarkup.ctx`count`)`artifacts`)},messages=binaryMarkup.struct(hommString`proposalMessage`,hommString`progressMessage`,hommString`completionMessage`),quest=binaryMarkup.struct(binaryMarkup.enums(binaryMarkup.byte,questEnum)`questType`,binaryMarkup.branch(binaryMarkup.ctx`questType`,questBranches)`objective`,binaryMarkup.when(binaryMarkup.ctx`questType`.neq(exports.QuestType.NONE),binaryMarkup.int32)`deadline`,binaryMarkup.when(binaryMarkup.ctx`questType`.neq(exports.QuestType.NONE),messages)`messages`),rewardBranches={[exports.QuestReward.NONE]:binaryMarkup.pass,[exports.QuestReward.Experience]:experience,[exports.QuestReward.SpellPoints]:binaryMarkup.uint32,[exports.QuestReward.Artifact]:artifact,[exports.QuestReward.Luck]:binaryMarkup.byte,[exports.QuestReward.Morale]:binaryMarkup.byte,[exports.QuestReward.Spell]:spell,[exports.QuestReward.Resource]:binaryMarkup.struct(resource`resource`,binaryMarkup.uint32`quantity`),[exports.QuestReward.PrimarySkill]:binaryMarkup.struct(binaryMarkup.enums(binaryMarkup.byte,primarySkillEnum)`skill`,binaryMarkup.byte`bonus`),[exports.QuestReward.SecondarySkill]:secondarySkill,[exports.QuestReward.Creature]:creatureSlot},seersHut=binaryMarkup.struct(binaryMarkup.when(isRoE,artifact)`artifactType`,binaryMarkup.when(isNotRoE,quest)`quest`,binaryMarkup.enums(binaryMarkup.byte,questRewardEnum)`rewardType`,binaryMarkup.branch(binaryMarkup.ctx`rewardType`,rewardBranches)`reward`,binaryMarkup.skip(2));!function(e){e.VillageHall="VillageHall",e.TownHall="TownHall",e.CityHall="CityHall",e.Capitol="Capitol",e.Fort="Fort",e.Citadel="Citadel",e.Castle="Castle",e.Tavern="Tavern",e.Blacksmith="Blacksmith",e.Marketplace="Marketplace",e.ResourceSilo="ResourceSilo",e.ArtifactMerchants="ArtifactMerchants",e.MageGuild1="MageGuild1",e.MageGuild2="MageGuild2",e.MageGuild3="MageGuild3",e.MageGuild4="MageGuild4",e.MageGuild5="MageGuild5",e.Shipyard="Shipyard",e.Grail="Grail",e.Special1="Special1",e.Special2="Special2",e.Special3="Special3",e.Special4="Special4",e.Dwelling1="Dwelling1",e.Horde1="Horde1",e.DwellingUp1="DwellingUp1",e.Dwelling2="Dwelling2",e.Horde2="Horde2",e.DwellingUp2="DwellingUp2",e.Dwelling3="Dwelling3",e.Horde3="Horde3",e.DwellingUp3="DwellingUp3",e.Dwelling4="Dwelling4",e.Horde4="Horde4",e.DwellingUp4="DwellingUp4",e.Dwelling5="Dwelling5",e.Horde5="Horde5",e.DwellingUp5="DwellingUp5",e.Dwelling6="Dwelling6",e.DwellingUp6="DwellingUp6",e.Dwelling7="Dwelling7",e.DwellingUp7="DwellingUp7"}(exports.Building||(exports.Building={}));const buildingsBits=[[[1,exports.Building.TownHall],[2,exports.Building.CityHall],[4,exports.Building.Capitol],[8,exports.Building.Fort],[16,exports.Building.Citadel],[32,exports.Building.Castle],[64,exports.Building.Tavern],[128,exports.Building.Blacksmith]],[[1,exports.Building.Marketplace],[2,exports.Building.ResourceSilo],[4,exports.Building.ArtifactMerchants],[8,exports.Building.MageGuild1],[16,exports.Building.MageGuild2],[32,exports.Building.MageGuild3],[64,exports.Building.MageGuild4],[128,exports.Building.MageGuild5]],[[1,exports.Building.Shipyard],[2,exports.Building.Grail],[4,exports.Building.Special1],[8,exports.Building.Special2],[16,exports.Building.Special3],[32,exports.Building.Special4],[64,exports.Building.Dwelling1],[128,exports.Building.DwellingUp1]],[[1,exports.Building.Horde1],[2,exports.Building.Dwelling2],[4,exports.Building.DwellingUp2],[8,exports.Building.Horde2],[16,exports.Building.Dwelling3],[32,exports.Building.Dwelling4],[64,exports.Building.Horde3],[128,exports.Building.Dwelling4]],[[1,exports.Building.DwellingUp4],[2,exports.Building.Horde4],[4,exports.Building.Dwelling5],[8,exports.Building.DwellingUp5],[16,exports.Building.Horde5],[32,exports.Building.Dwelling6],[64,exports.Building.DwellingUp6],[128,exports.Building.Dwelling7]],[[1,exports.Building.DwellingUp7]]],buildingsAdapter=bitMasksArray(binaryMarkup.bytes(6),buildingsBits),townEvent=binaryMarkup.struct(hommString`name`,hommString`message`,resources`resources`,binaryMarkup.flag`appliesToPlayers`,binaryMarkup.when(isSoD,binaryMarkup.flag)`appliesToHuman`,binaryMarkup.flag`appliesToComputer`,binaryMarkup.uint16`firstOccurence`,binaryMarkup.byte`subsequentOccurences`,binaryMarkup.skip(17),buildingsAdapter`buildings`,binaryMarkup.array(binaryMarkup.uint16,7)`creatureQuantities`,binaryMarkup.skip(4)),town=binaryMarkup.struct(binaryMarkup.when(isNotRoE,binaryMarkup.uint32)`absodId`,owner`owner`,binaryMarkup.byte`hasName`,binaryMarkup.when(binaryMarkup.ctx`hasName`,hommString)`name`,binaryMarkup.byte`hasGarrison`,binaryMarkup.when(binaryMarkup.ctx`hasGarrison`,army)`garrison`,binaryMarkup.byte`formation`,binaryMarkup.flag`buildingsCustomized`,binaryMarkup.when(binaryMarkup.ctx`buildingsCustomized`,binaryMarkup.struct(buildingsAdapter`built`,buildingsAdapter`disabled`))`buildings`,binaryMarkup.when(binaryMarkup.ctx`buildingsCustomized`.eq(!1),binaryMarkup.flag)`hasFort`,binaryMarkup.when(isNotRoE,spellsMask)`mustHaveSpells`,spellsMask`mayHaveSpells`,binaryMarkup.uint32`eventCount`,binaryMarkup.array(townEvent,binaryMarkup.ctx`eventCount`)`events`,binaryMarkup.when(isSoD,binaryMarkup.byte)`alignment`,binaryMarkup.skip(3));!function(e){e.Random="Random",e.PrimarySkill="PrimarySkill",e.SecondarySkill="SecondarySkill",e.Spell="Spell"}(exports.ScholarRaward||(exports.ScholarRaward={}));const schoalrRewardEnum={[exports.ScholarRaward.Random]:-1,[exports.ScholarRaward.PrimarySkill]:0,[exports.ScholarRaward.SecondarySkill]:1,[exports.ScholarRaward.Spell]:2},scholar=binaryMarkup.struct(binaryMarkup.enums(binaryMarkup.int8,schoalrRewardEnum)`rewardType`,binaryMarkup.branch(binaryMarkup.ctx`rewardType`,{[exports.ScholarRaward.PrimarySkill]:binaryMarkup.enums(binaryMarkup.uint8,primarySkillEnum),[exports.ScholarRaward.SecondarySkill]:binaryMarkup.enums(binaryMarkup.uint8,secondarySkillEnum),[exports.ScholarRaward.Spell]:binaryMarkup.enums(binaryMarkup.uint8,spellEnum)},binaryMarkup.uint8)`rewardValue`,binaryMarkup.skip(6)),alignmentBits=[[[1,exports.Alignment.Castle],[2,exports.Alignment.Rampart],[4,exports.Alignment.Tower],[8,exports.Alignment.Inferno],[16,exports.Alignment.Necropolis],[32,exports.Alignment.Dungeon],[64,exports.Alignment.Stronghold],[128,exports.Alignment.Fortress],[256,exports.Alignment.Conflux]]],alignmentMask=bitMasksArray(binaryMarkup.array(binaryMarkup.uint16,1),alignmentBits),randomDwelling=binaryMarkup.struct(binaryMarkup.enums(binaryMarkup.uint32,playerEnum)`owner`,binaryMarkup.struct(binaryMarkup.uint32`castleAbsodId`,binaryMarkup.when(binaryMarkup.ctx`castleAbsodId`.eq(0),alignmentMask)`alignments`)`castle`,binaryMarkup.struct(binaryMarkup.uint8`min`,binaryMarkup.uint8`max`)`level`),randomDwellingAlignment=binaryMarkup.struct(binaryMarkup.enums(binaryMarkup.uint32,playerEnum)`owner`,binaryMarkup.struct(binaryMarkup.uint8`min`,binaryMarkup.uint8`max`)`level`),randomDwellingLevel=binaryMarkup.struct(binaryMarkup.enums(binaryMarkup.uint32,playerEnum)`owner`,binaryMarkup.struct(binaryMarkup.uint32`castleAbsodId`,binaryMarkup.when(binaryMarkup.ctx`castleAbsodId`.eq(0),alignmentMask)`alignments`)`castle`),guardians=binaryMarkup.struct(hommString`message`,binaryMarkup.flag`hasCreatures`,binaryMarkup.when(binaryMarkup.ctx`hasCreatures`,army)`creatures`,binaryMarkup.skip(4)),contents=binaryMarkup.struct(binaryMarkup.uint32`experience`,binaryMarkup.int32`spellPoints`,binaryMarkup.int8`morale`,binaryMarkup.int8`luck`,resources`resources`,primarySkills`primarySkills`,binaryMarkup.uint8`secondarySkillsCount`,binaryMarkup.array(secondarySkill,binaryMarkup.ctx`secondarySkillsCount`)`secondarySkills`,binaryMarkup.uint8`artifactsCount`,binaryMarkup.array(artifact,binaryMarkup.ctx`artifactsCount`)`artifacts`,binaryMarkup.uint8`spellsCount`,binaryMarkup.array(spell,binaryMarkup.ctx`spellsCount`)`spells`,binaryMarkup.uint8`creaturesCount`,binaryMarkup.array(creatureSlot,binaryMarkup.ctx`creaturesCount`)`creatures`,binaryMarkup.skip(8));!function(e){e.Spread="Spread",e.Grouped="Grouped"}(exports.Formation||(exports.Formation={}));const formationEnum={[exports.Formation.Spread]:0,[exports.Formation.Grouped]:1},heroData$1=binaryMarkup.struct(binaryMarkup.when(isNotRoE,binaryMarkup.uint32)`absodId`,owner`owner`,hero`hero`,binaryMarkup.flag`hasName`,binaryMarkup.when(binaryMarkup.ctx`hasName`,hommString)`name`,binaryMarkup.when(isSoD,binaryMarkup.flag)`hasExperience`,binaryMarkup.branch(binaryMarkup.ctx`format`,{[exports.MapFormat.ROE]:binaryMarkup.uint32,[exports.MapFormat.AB]:binaryMarkup.uint32,[exports.MapFormat.SOD]:binaryMarkup.when(binaryMarkup.ctx`hasExperience`,binaryMarkup.uint32)})`experience`,binaryMarkup.flag`hasFace`,binaryMarkup.when(binaryMarkup.ctx`hasFace`,binaryMarkup.uint8)`face`,binaryMarkup.flag`hasSecondarySkills`,binaryMarkup.when(binaryMarkup.ctx`hasSecondarySkills`,binaryMarkup.struct(binaryMarkup.uint32`count`,binaryMarkup.array(secondarySkill,binaryMarkup.ctx`count`)`skills`))`secondarySkills`,binaryMarkup.flag`hasCreatures`,binaryMarkup.when(binaryMarkup.ctx`hasCreatures`,army)`creatures`,binaryMarkup.enums(binaryMarkup.uint8,formationEnum)`formation`,binaryMarkup.flag`hasArtifacts`,binaryMarkup.when(binaryMarkup.ctx`hasArtifacts`,artifacts)`artifacts`,binaryMarkup.uint8`patrolRadius`,binaryMarkup.when(isNotRoE,binaryMarkup.struct(binaryMarkup.flag`hasBiography`,binaryMarkup.when(binaryMarkup.ctx`hasBiography`,hommString)`biography`))`biography`,binaryMarkup.when(isNotRoE,binaryMarkup.enums(binaryMarkup.uint8,genderEnum))`gender`,binaryMarkup.when(isSoD,binaryMarkup.flag)`hasSpells`,binaryMarkup.branch(binaryMarkup.ctx`format`,{[exports.MapFormat.ROE]:binaryMarkup.pass,[exports.MapFormat.AB]:binaryMarkup.enums(binaryMarkup.uint8,spellEnum),[exports.MapFormat.SOD]:binaryMarkup.when(binaryMarkup.ctx`hasSpells`,spellsMask,binaryMarkup.pass)})`spells`,binaryMarkup.when(isSoD,binaryMarkup.flag)`hasPrimarySkills`,binaryMarkup.when(binaryMarkup.ctx`hasPrimarySkills`,primarySkills)`primarySkills`,binaryMarkup.skip(16)),heroPlaceholder=binaryMarkup.struct(owner`owner`,binaryMarkup.uint8`type`,binaryMarkup.when(binaryMarkup.ctx`type`.eq(255),binaryMarkup.uint8)`powerRating`),pandoraBox=binaryMarkup.struct(binaryMarkup.flag`hasGuardians`,binaryMarkup.when(binaryMarkup.ctx`hasGuardians`,guardians)`guardians`,contents`contents`);!function(e){e.Compliant="Compliant",e.Friendly="Friendly",e.Aggressive="Aggressive",e.Hostile="Hostile",e.Savage="Savage"}(exports.Disposition||(exports.Disposition={}));const dispositioEnum={[exports.Disposition.Compliant]:0,[exports.Disposition.Friendly]:1,[exports.Disposition.Aggressive]:2,[exports.Disposition.Hostile]:3,[exports.Disposition.Savage]:4},treasure=binaryMarkup.struct(resources`resources`,artifact`artifact`),messageAndTreasure=binaryMarkup.struct(hommString`message`,treasure`treasure`),creatureData=binaryMarkup.struct(binaryMarkup.when(isNotRoE,binaryMarkup.uint32)`absodId`,binaryMarkup.uint16`quantity`,binaryMarkup.enums(binaryMarkup.uint8,dispositioEnum)`disposition`,binaryMarkup.flag`hasMessageAndTreasure`,binaryMarkup.when(binaryMarkup.ctx`hasMessageAndTreasure`,messageAndTreasure)`messageAndTreasure`,binaryMarkup.flag`neverFlees`,binaryMarkup.flag`doesNotGrow`,binaryMarkup.skip(2)),event=binaryMarkup.struct(binaryMarkup.flag`hasGuardians`,binaryMarkup.when(binaryMarkup.ctx`hasGuardians`,guardians)`guardians`,contents`contents`,bitMasksArray(binaryMarkup.bytes(1),[[[1,exports.Player.Red],[2,exports.Player.Blue],[4,exports.Player.Tan],[8,exports.Player.Green],[16,exports.Player.Orange],[32,exports.Player.Purple],[64,exports.Player.Teal],[128,exports.Player.Pink]]])`appliesToPlayers`,binaryMarkup.flag`appliesToComputer`,binaryMarkup.flag`cancelAfterVisit`,binaryMarkup.skip(4)),messageBearer=binaryMarkup.struct(hommString`message`,binaryMarkup.skip(4)),garrison=binaryMarkup.struct(binaryMarkup.enums(binaryMarkup.uint32,playerEnum)`owner`,army`creatures`,binaryMarkup.when(isNotRoE,binaryMarkup.uint8)`removableUnits`,binaryMarkup.skip(8)),grail=binaryMarkup.struct(binaryMarkup.uint32`allowableRadius`),flagged=binaryMarkup.struct(binaryMarkup.uint32`owner`),artifactObject=binaryMarkup.struct(binaryMarkup.flag`hasGuardians`,binaryMarkup.when(binaryMarkup.ctx`hasGuardians`,guardians)`guardians`),shrine=binaryMarkup.struct(binaryMarkup.uint32`spell`),spellScroll=binaryMarkup.struct(binaryMarkup.flag`hasGuardians`,binaryMarkup.when(binaryMarkup.ctx`hasGuardians`,guardians)`guardians`,binaryMarkup.enums(binaryMarkup.uint32,spellEnum)`spell`),resource$1=binaryMarkup.struct(binaryMarkup.flag`hasGuardians`,binaryMarkup.when(binaryMarkup.ctx`hasGuardians`,guardians)`hasGuardians`,binaryMarkup.uint32`quantity`,binaryMarkup.skip(4)),witchHut=binaryMarkup.struct(skillsMask`potentialSkills`),bodyMap={[exports.MetaType.PlaceholderHero]:heroPlaceholder,[exports.MetaType.QuestGuard]:quest,[exports.MetaType.PandorasBox]:pandoraBox,[exports.MetaType.Sign]:messageBearer,[exports.MetaType.OceanBottle]:messageBearer,[exports.MetaType.Garrison]:garrison,[exports.MetaType.Event]:event,[exports.MetaType.Grail]:grail,[exports.MetaType.Dwelling]:flagged,[exports.MetaType.Lighthouse]:flagged,[exports.MetaType.ResourceGenerator]:flagged,[exports.MetaType.Shipyard]:flagged,[exports.MetaType.AbandonedMine]:flagged,[exports.MetaType.Boat]:binaryMarkup.pass,[exports.MetaType.PassableTerrain]:binaryMarkup.pass,[exports.MetaType.ImpassableTerrain]:binaryMarkup.pass,[exports.MetaType.Visitable]:binaryMarkup.pass,[exports.MetaType.Treasure]:binaryMarkup.pass,[exports.MetaType.MonolithTwoWay]:binaryMarkup.pass,[exports.MetaType.SubterraneanGate]:binaryMarkup.pass,[exports.MetaType.Town]:town,[exports.MetaType.RandomDwelling]:randomDwelling,[exports.MetaType.RandomDwellingAlignment]:randomDwellingAlignment,[exports.MetaType.RandomDwellingLevel]:randomDwellingLevel,[exports.MetaType.Hero]:heroData$1,[exports.MetaType.RandomHero]:heroData$1,[exports.MetaType.Prison]:heroData$1,[exports.MetaType.Creature]:creatureData,[exports.MetaType.Artifact]:artifactObject,[exports.MetaType.Shrine]:shrine,[exports.MetaType.SpellScroll]:spellScroll,[exports.MetaType.Resource]:resource$1,[exports.MetaType.WitchHut]:binaryMarkup.when(isNotRoE,witchHut),[exports.MetaType.SeersHut]:seersHut,[exports.MetaType.Scholar]:scholar},objectBody=binaryMarkup.struct(binaryMarkup.computed(binaryMarkup.ctx`attributes.metaType`)`type`,binaryMarkup.branch(binaryMarkup.ctx`type`,bodyMap)`data`),attributes=binaryMarkup.computed(e=>{const r=e.get("oaIndex");return e.get("objectAttributes").entries[r]}),entry$1=binaryMarkup.struct(binaryMarkup.uint8`x`,binaryMarkup.uint8`y`,binaryMarkup.uint8`z`,binaryMarkup.uint32`oaIndex`,attributes`attributes`,binaryMarkup.skip(5),objectBody`body`),objectDetails=binaryMarkup.struct(binaryMarkup.uint32`count`,binaryMarkup.array(entry$1,binaryMarkup.ctx`count`)`entries`),event$1=binaryMarkup.struct(hommString`name`,hommString`message`,resources`resources`,binaryMarkup.flag`appliesToPlayers`,binaryMarkup.when(isSoD,binaryMarkup.flag)`appliesToHuman`,binaryMarkup.flag`appliesToComputer`,binaryMarkup.uint16`firstOccurence`,binaryMarkup.uint8`subsequentOccurences`,binaryMarkup.skip(17)),events=binaryMarkup.struct(binaryMarkup.uint32`count`,binaryMarkup.array(event$1,binaryMarkup.ctx`count`)`entries`),h3mFile=binaryMarkup.struct(binaryMarkup.endian(binaryMarkup.Endian.LE),binaryMarkup.enums(binaryMarkup.uint32,formatEnum)`format`,info`info`,binaryMarkup.array(player,8)`players`,additionalInfo$1`additionalInfo`,binaryMarkup.array(tile,calculateTiles)`tiles`,objectAttributes`objectAttributes`,objectDetails`objectDetails`,events`events`),file=binaryMarkup.struct(binaryMarkup.cString()`name`,binaryMarkup.skip(e=>16-(e.get("name").length+1)),binaryMarkup.uint32`offset`,binaryMarkup.uint32`size`,binaryMarkup.uint32,binaryMarkup.uint32`csize`,binaryMarkup.computed(binaryMarkup.ctx`csize`.neq(0))`compressed`,binaryMarkup.pointer(binaryMarkup.ctx`offset`,binaryMarkup.when(binaryMarkup.ctx`compressed`,binaryMarkup.bytes(binaryMarkup.ctx`csize`),binaryMarkup.bytes(binaryMarkup.ctx`size`)))`content`),lodFile=binaryMarkup.struct(binaryMarkup.endian(binaryMarkup.Endian.LE),binaryMarkup.constant(binaryMarkup.cString(),"LOD"),binaryMarkup.seek(8),binaryMarkup.uint32`count`,binaryMarkup.seek(92),binaryMarkup.array(file,binaryMarkup.ctx`count`)`entries`),rgb=binaryMarkup.bytes(3),filePointer=e=>{const r=e.get("index"),a=e.get("offsets");return e.set("offset",a[r]),a[r]},linePointer=e=>{const r=e.get("index"),a=e.get("lineOffsets");return e.get("offset")+32+a[r]},repeatCondition=(e,r,a,t)=>t.reduce((e,r)=>e+r.content.length,0)<e.get("width"),codeFragment=binaryMarkup.struct(binaryMarkup.byte`code`,binaryMarkup.byte`length`,binaryMarkup.branch(binaryMarkup.ctx`code`,{255:binaryMarkup.bytes(e=>e.get("length")+1)},binaryMarkup.computed(e=>new Array(e.get("length")+1).fill(e.get("code"))))`content`),segmentFragment=binaryMarkup.struct(binaryMarkup.byte`segment`,binaryMarkup.computed(e=>e.get("segment")>>5)`code`,binaryMarkup.computed(e=>1+(31&e.get("segment")))`length`,binaryMarkup.branch(binaryMarkup.ctx`code`,{7:binaryMarkup.bytes(binaryMarkup.ctx`length`)},binaryMarkup.computed(e=>new Array(e.get("length")).fill(e.get("code"))))`content`),lineReducer=(e,r)=>e.concat(r.reduce((e,r)=>e.concat(r.content),[])),file$1=binaryMarkup.struct(binaryMarkup.uint32`size`,binaryMarkup.uint32`encoding`,binaryMarkup.uint32`fullWidth`,binaryMarkup.uint32`fullHeight`,binaryMarkup.uint32`width`,binaryMarkup.uint32`height`,binaryMarkup.int32`left`,binaryMarkup.int32`top`,binaryMarkup.branch(binaryMarkup.ctx`encoding`,{0:binaryMarkup.bytes(e=>e.get("width")*e.get("height")),1:binaryMarkup.struct(binaryMarkup.array(binaryMarkup.uint32,binaryMarkup.ctx`height`)`lineOffsets`,binaryMarkup.array(binaryMarkup.pointer(linePointer,binaryMarkup.repeatWhile(codeFragment,repeatCondition)),binaryMarkup.ctx`height`)`lines`),2:binaryMarkup.struct(binaryMarkup.array(binaryMarkup.uint16,binaryMarkup.ctx`height`)`lineOffsets`,binaryMarkup.skip(2),binaryMarkup.array(binaryMarkup.pointer(linePointer,binaryMarkup.repeatWhile(segmentFragment,repeatCondition)),binaryMarkup.ctx`height`)`lines`),3:binaryMarkup.struct(binaryMarkup.array(binaryMarkup.array(binaryMarkup.uint16,e=>Math.ceil(e.get("width")/32)),binaryMarkup.ctx`height`)`lineOffsets`,binaryMarkup.array(binaryMarkup.array(binaryMarkup.repeatWhile(segmentFragment,repeatCondition),e=>Math.ceil(e.get("width")/32))`line`,binaryMarkup.ctx`height`)`lines`)})`content`,binaryMarkup.branch(binaryMarkup.ctx`encoding`,{0:binaryMarkup.computed(binaryMarkup.ctx`content`),1:binaryMarkup.computed(e=>e.get("content.lines").reduce(lineReducer,[])),2:binaryMarkup.computed(e=>e.get("content.lines").reduce(lineReducer,[])),3:binaryMarkup.computed(e=>e.get("content.lines").reduce((e,r)=>e.concat(r.reduce(lineReducer,[])),[]))})`pixels`),block=binaryMarkup.struct(binaryMarkup.uint32`blockId`,binaryMarkup.uint32`entriesCount`,binaryMarkup.uint32`unknown`,binaryMarkup.uint32`unknown`,binaryMarkup.array(binaryMarkup.string(13),binaryMarkup.ctx`entriesCount`)`filenames`,binaryMarkup.array(binaryMarkup.uint32,binaryMarkup.ctx`entriesCount`)`offsets`,binaryMarkup.array(binaryMarkup.pointer(filePointer,file$1),binaryMarkup.ctx`entriesCount`)`files`),defFile=binaryMarkup.struct(binaryMarkup.endian(binaryMarkup.Endian.LE),binaryMarkup.uint32`type`,binaryMarkup.uint32`width`,binaryMarkup.uint32`height`,binaryMarkup.uint32`blockCount`,binaryMarkup.array(rgb,256)`palette`,binaryMarkup.array(block,binaryMarkup.ctx`blockCount`)`blocks`),bgr=binaryMarkup.bytes(3),pcxFile=binaryMarkup.struct(binaryMarkup.endian(binaryMarkup.Endian.LE),binaryMarkup.uint32`size`,binaryMarkup.uint32`width`,binaryMarkup.uint32`height`,binaryMarkup.computed(e=>e.get("size")===e.get("width")*e.get("height"))`hasPalette`,binaryMarkup.when(binaryMarkup.ctx`hasPalette`,binaryMarkup.struct(binaryMarkup.bytes(binaryMarkup.ctx`size`)`pixels`,binaryMarkup.array(bgr,256)`palette`))`paletteData`,binaryMarkup.computed(e=>e.get("size")===e.get("width")*e.get("height")*3)`hasBgr`,binaryMarkup.when(binaryMarkup.ctx`hasBgr`,binaryMarkup.greedyArray(bgr))`bgr`);function parseH3M(e){return binaryMarkup.parse(h3mFile,e)}function parseH3MFile(e){return parseH3M(pako.inflate(e).buffer)}function parseAsset(e,r){return binaryMarkup.parse(e,r)}exports.H3M_MAX_PLAYERS=8,exports.alignmentEnum=alignmentEnum,exports.artifactEnum=artifactEnum,exports.behaviorEnum=behaviorEnum,exports.castleLevelEnum=castleLevelEnum,exports.creatureEnum=creatureEnum,exports.defFile=defFile,exports.difficultyEnum=difficultyEnum,exports.dispositioEnum=dispositioEnum,exports.formatEnum=formatEnum,exports.formationEnum=formationEnum,exports.genderEnum=genderEnum,exports.hallLevelEnum=hallLevelEnum,exports.heroClassEnum=heroClassEnum,exports.heroEnum=heroEnum,exports.lodFile=lodFile,exports.loseConditionsEnum=loseConditionsEnum,exports.objectGroupEnum=objectGroupEnum,exports.objectTypeEnum=objectTypeEnum,exports.objectTypeToMeta=objectTypeToMeta,exports.parseAsset=parseAsset,exports.parseH3M=parseH3M,exports.parseH3MFile=parseH3MFile,exports.pcxFile=pcxFile,exports.playerEnum=playerEnum,exports.primarySkillEnum=primarySkillEnum,exports.questEnum=questEnum,exports.questRewardEnum=questRewardEnum,exports.resourceEnum=resourceEnum,exports.riversEnum=riversEnum,exports.roadsEnum=roadsEnum,exports.schoalrRewardEnum=schoalrRewardEnum,exports.secondarySkillEnum=secondarySkillEnum,exports.secondarySkillMasteryEnum=secondarySkillMasteryEnum,exports.skillsMask=skillsMask,exports.spellEnum=spellEnum,exports.spellsMask=spellsMask,exports.terrainsEnum=terrainsEnum,exports.winConditionsEnum=winConditionsEnum;