function arrayUnique(a) { for (var i = 0; i < a.length; ++i) { for (var j = i + 1; j < a.length; ++j) { if (a[i] === a[j]) a.splice(j--, 1); } } return a; } function arrayUniqueNewArray(a) { a = a.slice(); arrayUnique(a); return a; } function arrayShuffle(a) { for (let i = 0; i < a.length; i++) { let pos = Math.floor(Math.random() * (a.length - i)) + i; let temp = a[i]; a[i] = a[pos]; a[pos] = temp; } } function arrayShuffleNewArray(a) { let nA = a.slice(); arrayShuffle(nA); return nA; } class StoredVariable { constructor(options) { this.id = options.id; this.value = options.value; this.defValue = this.value; StoredVariable.registerVariable(this); } reset() { this.value = this.defValue; } updateFromObject(obj) { this.value = obj; } exportAsObject() { return this.value; } static registerVariable(variable) { if (StoredVariable.storedVariables[variable.id] == undefined) { StoredVariable.storedVariables[variable.id] = variable; } else { console.warn("[StoredVariable] " + variable.id + " already defined. Ignoring:", variable); } } static getVariable(id) { return StoredVariable.storedVariables[id]; } static getVariables() { let list = []; for (let key in StoredVariable.storedVariables) { list.push(StoredVariable.storedVariables[key]); } return list; } static exportAsObject() { let list = {}; for (let key in StoredVariable.storedVariables) { list[key] = StoredVariable.storedVariables[key].value; } return list; } static updateFromObject(obj) { for (let key in StoredVariable.storedVariables) { if (obj[key] != undefined) { StoredVariable.storedVariables[key].updateFromObject(obj[key]); } else { StoredVariable.storedVariables[key].reset(); } } } } StoredVariable.storedVariables = {}; class RulebookRunner { constructor(rulebook, noun) { this.rulesToExecute = []; this.ruleRunner = -1; this.rulebook = rulebook; this.noun = noun; } addRulebooks(...rulebooks) { rulebooks = arrayUniqueNewArray(rulebooks); rulebooks.forEach((rulebook) => { this.addRules(...rulebook.rules); }); } addRules(...rules) { if (this.ruleRunner < 0) { this.rulesToExecute.push(...rules); } } skipRule(rule) { if (this.ruleRunner >= 0) { let index = this.rulesToExecute.indexOf(rule); if (index > this.ruleRunner) { this.rulesToExecute.splice(index, 1); console.debug("[Rulebook]" + this.rulebook.name + ", skipping Rule " + rule.name + " due to request."); } else { console.warn("[Rulebook]" + this.rulebook.name + ": uname to skip Rule" + rule.name + " due to it being too late to stop it."); } } } async execute() { arrayUnique(this.rulesToExecute).sort(function (a, b) { return a.compareTo(b); }); for (this.ruleRunner = 0; this.ruleRunner < this.rulesToExecute.length; this.ruleRunner++) { this.rule = this.rulesToExecute[this.ruleRunner]; let result = await this.rule.execute(this); if (result != undefined) { return result; } } } } class Rulebook { constructor(name) { this.rules = []; this.name = name; } static getStack() { let stack = []; Rulebook.rulebookStack.forEach((rl) => { if (rl instanceof Object && rl.name != undefined) { stack.push(rl.name); } else if (typeof rl == "string") { stack.push(rl); } else if (rl instanceof Object && rl.id != undefined) { stack.push(rl.id); } else { stack.push("Undefined"); } }); return stack; } static getIndentation() { return " ".repeat(Rulebook.indentantionSpaces).repeat(Rulebook.rulebookStack.length); } static increaseIndentation(rulebook) { Rulebook.rulebookStack.push(rulebook); } static decreaseIndentation() { Rulebook.rulebookStack.pop(); } static isRunning(r) { return Rulebook.rulebookStack.indexOf(r) != -1; } isRunning() { return Rulebook.isRunning(this); } async execute(options, ...rulebooks) { options = options == undefined ? {} : options; let runner = new RulebookRunner(this, options.noun); runner.addRulebooks(this, ...rulebooks); var names = []; for (let i = 0; i < rulebooks.length; i++) { if (rulebooks[i] === this) continue; names.push(rulebooks[i].name); } console.debug(Rulebook.getIndentation() + "[RULEBOOK] " + this.name + (names.length > 0 ? (" merged with " + names.join(", ")) : "")); Rulebook.increaseIndentation(this); let result = await runner.execute(); Rulebook.decreaseIndentation(); return result; } createAndAddRule(r) { let rule = new Rule(r); this.addRule(rule); return rule; } addRule(r) { this.rules.push(r); } sortRules() { this.rules.sort(function (a, b) { return a.compareTo(b); }); } } Rulebook.indentantionSpaces = 2; Rulebook.rulebookStack = []; var Settings; (function (Settings) { var debug = console.debug; var debugEmpty = () => { }; Settings.hardDebug = false; Settings.sayTurnTime = true; function setDebug(isDebug) { if (isDebug) { console.debug = debug; } else { console.debug = debugEmpty; } } Settings.setDebug = setDebug; function isDebug() { return console.debug == debug; } Settings.isDebug = isDebug; function setHardDebug(isHardDebug) { Settings.hardDebug = isHardDebug; } Settings.setHardDebug = setHardDebug; })(Settings || (Settings = {})); class Rule { constructor(options) { this._priority = 0; this.firstPriority = 0; this.priority = options.priority != undefined ? options.priority : Rule.PRIORITY_MEDIUM; this.firstPriority = options.firstPriority != undefined ? options.firstPriority : Rule.PRIORITY_MEDIUM; this.name = options.name; this.code = options.code; this.createdWhere = (new Error()); this.conditions = options.conditions != undefined ? options.conditions : () => { return true; }; } async execute(rulebook) { if (!this.conditions(rulebook)) { return; } console.debug(Rulebook.getIndentation() + "[RULE] " + this.name); Settings.hardDebug && console.debug(this.name, this.createdWhere); Rulebook.increaseIndentation(this); rulebook.rule = this; let result = this.code(rulebook); if (result instanceof Promise) { result = await result; } if (result != undefined) { console.debug(Rulebook.getIndentation() + "Result:", result); } Rulebook.decreaseIndentation(); return result; } get priority() { return this._priority; } set priority(value) { this._priority = value; } compareTo(b) { var a = this; if (b.firstPriority < a.firstPriority) return -1; if (a.firstPriority < b.firstPriority) return 1; if (b.priority < a.priority) return -1; if (a.priority < b.priority) return 1; return 0; } } Rule.PRIORITY_HIGHEST = 20; Rule.PRIORITY_HIGH = 15; Rule.PRIORITY_MEDIUM = 10; Rule.PRIORITY_LOW = 5; Rule.PRIORITY_LOWEST = 0; var TurnSequence; (function (TurnSequence) { TurnSequence.rulebook = new Rulebook("Turn Sequence"); TurnSequence.playerActions = []; TurnSequence.lastTurnTime = 0; async function execute(action) { if (TurnSequence.playerActions.push(action) == 1) { let t0 = performance.now(); console.debug(Rulebook.getIndentation() + " Player Action: " + (action ? action.getCommandText() : "none")); await TurnSequence.rulebook.execute({ noun: action }); TurnSequence.playerActions = []; let t1 = performance.now(); TurnSequence.lastTurnTime = t1 - t0; console.debug("Total: " + (t1 - t0) + " milliseconds."); if (Settings.sayTurnTime) { Elements.CurrentTurnHandler.printAsContent(new Say(new SayBold("Time taken for turn: "), (t1 - t0), " milliseconds.")); } } } TurnSequence.execute = execute; TurnSequence.PrepareElementsRule = new Rule({ firstPriority: Rule.PRIORITY_HIGHEST, priority: Rule.PRIORITY_MEDIUM, name: "Begin Turn (Elements Side)", code: function (runner) { Elements.CurrentTurnHandler.startTurn(runner.noun); } }); TurnSequence.rulebook.addRule(TurnSequence.PrepareElementsRule); TurnSequence.PlayerActionRule = new Rule({ firstPriority: Rule.PRIORITY_HIGH, priority: Rule.PRIORITY_MEDIUM, name: "Do Player Action", code: async (rulebook) => { let playerAction = rulebook.noun; if (playerAction != undefined) { let promise = playerAction.execute(); await promise; Elements.CurrentTurnHandler.printAsContent(playerAction.say); if (playerAction.requiresTurn) { WorldState.incrementPlayerTurn(); } } } }); TurnSequence.rulebook.addRule(TurnSequence.PlayerActionRule); TurnSequence.RunEveryTurnRulesRule = new Rule({ firstPriority: Rule.PRIORITY_MEDIUM, priority: Rule.PRIORITY_MEDIUM, name: "Run Every Turn Rules", code: async function () { while (WorldState.isTurnWaiting()) { await EveryTurn.EveryTurn.execute({}); } } }); TurnSequence.rulebook.addRule(TurnSequence.RunEveryTurnRulesRule); TurnSequence.RemoveTurnFromElementsRule = new Rule({ firstPriority: Rule.PRIORITY_LOWEST, priority: Rule.PRIORITY_MEDIUM, name: "End Turn (Elements/Controls Side)", code: async function (rulebook) { Elements.CurrentTurnHandler.endTurn(); Controls.KeyHandler.reset(); await Elements.HyperlinkHandler.hyperlinkCommonActions(); await Elements.RoomHandler.updateRoom(); await Elements.RememberedHandler.updateMap(); let playerAction = rulebook.noun; if (playerAction) { await Elements.HyperlinkHandler.hyperlinkObject(playerAction.getNoun(0)); } else { await Elements.HyperlinkHandler.hyperlinkObject(); } await Elements.InventoryHandler.updateInventory(); await Elements.AppearanceHandler.updateAppearance(); } }); TurnSequence.rulebook.addRule(TurnSequence.RemoveTurnFromElementsRule); })(TurnSequence || (TurnSequence = {})); var Version; (function (Version) { Version.currentVersion = [0, 1, 0]; function compareVersion(v1, v2) { if (v1[0] < v2[0]) return -1; else if (v1[0] > v2[0]) return 1; if (v1[1] < v2[1]) return -1; else if (v1[1] > v2[1]) return 1; if (v1[2] < v2[2]) return -1; else if (v1[2] > v2[2]) return 1; return 0; } Version.compareVersion = compareVersion; function getCurrentVersion() { let v = Version.currentVersion; return v[0] + "." + v[1] + "." + v[2]; } Version.getCurrentVersion = getCurrentVersion; document.title = document.title + " [" + getCurrentVersion() + "] "; })(Version || (Version = {})); var Controls; (function (Controls) { var Memory; (function (Memory) { let versionSet = false; let settingsVersion = Version.currentVersion; let versionId = "Version"; let memoryPrefix = "obelisk_"; let memories = {}; function getValue(id, defValue) { let storage = localStorage.getItem(memoryPrefix + id); return storage == undefined ? defValue : JSON.parse(storage); } Memory.getValue = getValue; function setValue(id, value) { localStorage.setItem(memoryPrefix + id, JSON.stringify(value)); if (!versionSet) { versionSet = true; settingsVersion = getValue(versionId, Version.currentVersion); setValue(versionId, Version.currentVersion); } if (settingsVersion == undefined) { } } Memory.setValue = setValue; function registerMemory(mem) { if (memories[mem.getId()] != undefined) { console.error("[Controls.Memory] Memory already registered on id " + mem.getId(), "Old:", memories[mem.getId()], "New:", mem); } else { memories[mem.getId()] = mem; mem.setValueFromLocalStorageDoNotInvoke(getValue(mem.getId(), mem.getValue())); let updateF = () => { Controls.Memory.setValue(mem.getId(), mem.getValue()); }; mem.addListener(updateF); updateF(); } } Memory.registerMemory = registerMemory; })(Memory = Controls.Memory || (Controls.Memory = {})); })(Controls || (Controls = {})); class StoredMemory { constructor(id, value) { this.listeners = []; this.id = id; this.value = value; Controls.Memory.registerMemory(this); } setValueFromLocalStorageDoNotInvoke(value) { this.value = value; } storeValue(value) { if (JSON.stringify(value) !== JSON.stringify(this.value)) { this.value = value; this.triggerListeners(); } } getValue() { return this.value; } getId() { return this.id; } addListener(listener) { this.listeners.push(listener); } triggerListeners() { for (var i = 0; i < this.listeners.length; i++) { this.listeners[i](this); } } } var SaveHandler; (function (SaveHandler) { let saveName = "Obelisk_Save"; let saveExtension = "obsav"; let storagePrefix = "save_"; let saveSlot = 0; let errors = []; let erasing = false; let virgin = new StoredMemory("First time saving", true); SaveHandler.AfterLoad = new Rulebook("After loading"); async function readFile() { let element = document.createElement("input"); element.type = "file"; element.accept = "." + saveExtension; let promise = new Promise((resolve, reject) => { element.onchange = () => { if (element.files.length == 0) { resolve(undefined); } else { var fr = new FileReader(); fr.onload = (ev) => { resolve(ev.target['result']); }; fr.readAsText(element.files[0]); } }; }); element.click(); return promise; } SaveHandler.readFile = readFile; function download(filename, text) { var element = document.createElement('a'); element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); element.setAttribute('download', filename); element.style.display = 'none'; document.body.appendChild(element); element.click(); document.body.removeChild(element); } function loadSave() { let input = document.createElement("input"); input.type = "file"; input.accept = "." + saveExtension; document.body.appendChild(input); input.addEventListener("change", () => { let reader = new FileReader(); reader.onload = () => { let text = reader.result; SaveHandler.loadGame(JSON.parse(text)); }; reader.readAsText(input.files[0]); }); input.click(); document.body.removeChild(input); } SaveHandler.loadSave = loadSave; function getItem(thing) { let item; if (thing.Unique) { item = Thing.getUnique(thing.Name); } else { let items = Thing.getNonUnique(thing.Name); if (items.length > 0) { item = items[0]; } if (item == undefined) { let error = thing.Name + " no longer exists."; console.error("[SaveHandler] " + error); errors.push(error); return undefined; } else { item = item.clone(true); } } item.setChanges(thing.Changes); return item; } function loadGame(saveStruc) { let player = WorldState.player; StoredVariable.updateFromObject(saveStruc.Variables); WorldState.setCurrentTurn(saveStruc.Rounds); Thing.WearRelation.getRight(player).forEach((thing) => { Thing.WearRelation.unsetRight(thing); }); Thing.WieldRelation.getRight(player).forEach((thing) => { Thing.WieldRelation.unsetRight(thing); }); Thing.CarryRelation.getRight(player).forEach((thing) => { Thing.CarryRelation.unsetRight(thing); }); saveStruc.Wielded.forEach((thing) => { let item = getItem(thing); if (item != undefined) WorldState.player.setWielded(item); }); saveStruc.Worn.forEach((thing) => { let item = getItem(thing); if (item != undefined) WorldState.player.setWorn(item); }); saveStruc.Carried.forEach((thing) => { let item = getItem(thing); if (item != undefined) WorldState.player.setCarried(item); }); let savedPlayer = saveStruc.Player; player.setName(savedPlayer.Name); player.setChanges(savedPlayer.PlayerChanges); savedPlayer.Parts.forEach((part) => { let bpList = player.getPartsByName(part.Name); if (bpList != undefined) { bpList[0].setChanges(part.Changes); } }); saveStruc.UniqueThings.forEach((savedThing) => { let thing = Thing.getUnique(savedThing.Name); if (thing != undefined) { thing.setChanges(savedThing.Changes); } }); } SaveHandler.loadGame = loadGame; function exportPlayer() { return { Name: WorldState.player.getName(), PlayerChanges: WorldState.player.getChanges(), Parts: exportThings(WorldState.player.getParts()) }; } function exportThings(arr, changedOnly) { let obj = []; for (let i = 0; i < arr.length; i++) { let thing = arr[i]; let savedThing = { Unique: thing.isUnique(), Name: thing.getName(), Changes: thing.getChanges() }; if (!changedOnly || Object.keys(savedThing.Changes).length > 0) { obj.push(savedThing); } } return obj; } SaveHandler.exportThings = exportThings; function getSaveStructure() { let variables = StoredVariable.getVariables(); let savedVariables = {}; for (let i = 0; i < variables.length; i++) { savedVariables[variables[i].id] = variables[i].exportAsObject(); } let wielded = Thing.WieldRelation.getRight(WorldState.player); let worn = Thing.WearRelation.getRight(WorldState.player); let carried = Thing.CarryRelation.getRight(WorldState.player); let saveStruc = { Variables: savedVariables, UniqueThings: exportThings(Thing.getUniques()), Wielded: exportThings(wielded), Worn: exportThings(worn), Carried: exportThings(carried), Player: exportPlayer(), Rounds: WorldState.getCurrentTurn(), Date: new Date().toLocaleString() }; console.debug("[SaveHandler] Created Save Structure", saveStruc); return saveStruc; } SaveHandler.getSaveStructure = getSaveStructure; function setSlot(slotN) { saveSlot = slotN; } SaveHandler.setSlot = setSlot; function saveToStorage() { Controls.Memory.setValue(storagePrefix + saveSlot, getSaveStructure()); } SaveHandler.saveToStorage = saveToStorage; async function loadFromStorage() { if (!erasing) { let saveStruct = (Controls.Memory.getValue(storagePrefix + saveSlot, undefined)); if (saveStruct != undefined) { loadGame(saveStruct); return await SaveHandler.AfterLoad.execute({ noun: saveStruct }); } } await CharacterCreation.rulebook.execute({}); } SaveHandler.loadFromStorage = loadFromStorage; async function loadFromFile() { PlayBegins.LOAD_FAILED = false; let promise = readFile(); let finishedAny; let realPromise = new Promise((resolve) => { finishedAny = resolve; }); let say = new Say("No save file was loaded.", Say.PARAGRAPH_BREAK, Say.CENTERED, new SayBold("Press any key to return.")); let sayElements = await Elements.CurrentTurnHandler.getSayElementsAsContent(say); Elements.CurrentTurnHandler.print(...sayElements); let nextKey = Controls.KeyHandler.getNextKey(); promise.then((file) => { Controls.KeyHandler.stopGivingNextKey(nextKey); Elements.CurrentTurnHandler.unprint(...sayElements); loadGame(getFromFile(file)); finishedAny(); }); nextKey.then((keyCode) => { PlayBegins.LOAD_FAILED = true; finishedAny(); }); await realPromise; } SaveHandler.loadFromFile = loadFromFile; function getSayForSlot(slotNumber) { let saveStruct = (Controls.Memory.getValue(storagePrefix + slotNumber, undefined)); if (saveStruct == undefined) { return new Say("New Game"); } else { let erasingText = erasing ? "(ERASE) - " : ""; return new Say(erasingText, saveStruct.Player.Name + " - Turns: " + saveStruct.Rounds + " - Last Played: " + saveStruct.Date); } } SaveHandler.getSayForSlot = getSayForSlot; function getFromFile(saveText) { return JSON.parse(decodeURIComponent(atob(saveText))); } SaveHandler.getFromFile = getFromFile; function saveToFile() { download(saveName + "." + saveExtension, btoa(unescape(encodeURIComponent((JSON.stringify(getSaveStructure())))))); } SaveHandler.saveToFile = saveToFile; function isErasing() { return erasing; } SaveHandler.isErasing = isErasing; function toggleErasing() { erasing = !erasing; } SaveHandler.toggleErasing = toggleErasing; function isVirgin() { let was = virgin.getValue(); virgin.storeValue(false); return was; } SaveHandler.isVirgin = isVirgin; })(SaveHandler || (SaveHandler = {})); TurnSequence.rulebook.createAndAddRule({ name: "Save game to Storage", priority: Rule.PRIORITY_LOWEST, firstPriority: Rule.PRIORITY_LOWEST, code: () => { SaveHandler.saveToStorage(); } }); class CharacterOrigin { constructor(id) { this.confirmPicked = () => { }; this.id = id; CharacterOrigin.storeOrigin(this); } static storeOrigin(origin) { CharacterOrigin.origins[origin.id] = origin; } static getOrigin(id) { return CharacterOrigin.origins[id]; } static getOrigins() { let origins = []; for (let id in CharacterOrigin.origins) { origins.push(CharacterOrigin.origins[id]); } origins.sort((a, b) => { let na = a.name.toUpperCase(); let nb = b.name.toUpperCase(); if (na < nb) return -1; if (na > nb) return 1; return 0; }); return origins; } } CharacterOrigin.origins = {}; var CharacterCreation; (function (CharacterCreation) { CharacterCreation.ChampionOrigin = new CharacterOrigin("Champion"); CharacterCreation.ChampionOrigin.name = "Champion"; CharacterCreation.ChampionOrigin.description = "You were born in the small village of Southwood in the post-Tower world. Chosen by the village elder, you were trained relentlessly as soon as you became able to walk. Your mission: get to the Tower and find a way to destroy it. Unbeknownst to you, this is little more than a sacrifice ritual and you are just it's latest victim. The village doesn't actually expect you to succeed, you are merely a gift to the Tower, so that it will not destroy Southwood."; CharacterCreation.ChampionOrigin.bonusStats = "This origin grants a +1 Bonus to every attribute, but you will be stuck with some perks gained through your training."; CharacterCreation.ChampionOrigin.confirmPicked = () => { let player = WorldState.player; function increaseStat(attr) { player.setStat(attr, player.getStat(attr) + 1); } increaseStat(Attributes.Strength); increaseStat(Attributes.Charm); increaseStat(Attributes.Agility); increaseStat(Attributes.Intelligence); }; })(CharacterCreation || (CharacterCreation = {})); var CharacterCreation; (function (CharacterCreation) { CharacterCreation.PlayerOrigin = new StoredVariable({ id: "Player Origin", value: CharacterCreation.ChampionOrigin.id }); function getOrigin() { return CharacterOrigin.getOrigin(CharacterCreation.PlayerOrigin.value); } CharacterCreation.getOrigin = getOrigin; CharacterCreation.rulebook = new Rulebook("Character Creation"); })(CharacterCreation || (CharacterCreation = {})); class Perk extends StoredVariable { constructor(id) { super({ id: "Perk_" + id, value: false }); this.forcedStatus = () => { return undefined; }; this.description = "Undefined"; this.confirmPicked = () => { }; this.name = id; Perk.storePerk(this); } isEnabled(valueOnly) { if (valueOnly != true) { let forced = this.forcedStatus(this); if (forced != undefined) { return forced; } } return this.value; } isForced() { return this.forcedStatus(this) != undefined; } getDescription() { if (typeof this.description == "function") { return this.description(this); } else { return this.description; } } static storePerk(perk) { Perk.perks[perk.id] = perk; } static getPerk(id) { return Perk.perks[id]; } static getPerks() { let perks = []; for (let id in Perk.perks) { perks.push(Perk.perks[id]); } perks.sort((a, b) => { let na = a.name.toUpperCase(); let nb = b.name.toUpperCase(); if (na < nb) return -1; if (na > nb) return 1; return 0; }); return perks; } static updatePerks() { for (let id in Perk.perks) { let perk = Perk.perks[id]; if (perk.isForced()) { perk.value = perk.forcedStatus(perk); } } } } Perk.perks = {}; class OneOf { constructor(randomMode, ...poss) { this.possibilities = []; this.cyclingOrder = 0; this.randomMode = randomMode; this.possibilities = poss; if (this.randomMode == OneOf.ROTATING_RANDOM) { this.availablePossibilites = this.possibilities.slice(); } } getOne() { if (this.randomMode == OneOf.PURELY_AT_RANDOM) { return this.possibilities[Math.floor(Math.random() * this.possibilities.length)]; } else if (this.randomMode == OneOf.ROTATING_RANDOM) { if (this.availablePossibilites.length < 1) { this.availablePossibilites = this.possibilities.slice(); } return this.availablePossibilites.splice(Math.floor(Math.random() * this.availablePossibilites.length), 1)[0]; } else if (this.randomMode == OneOf.CYCLING) { var r = this.possibilities[this.cyclingOrder++]; if (this.cyclingOrder > this.possibilities.length) { this.cyclingOrder = 0; } return r; } } } OneOf.PURELY_AT_RANDOM = 0; OneOf.ROTATING_RANDOM = 1; OneOf.CYCLING = 2; var MachineBegins; (function (MachineBegins) { MachineBegins.rulebook = new Rulebook("Machine Begins"); function execute() { MachineBegins.rulebook.execute({}); } MachineBegins.execute = execute; })(MachineBegins || (MachineBegins = {})); document.addEventListener("DOMContentLoaded", () => { MachineBegins.execute(); }); var Elements; (function (Elements) { Elements.animationTime = 1000; Elements.isMobile = /Mobi/i.test(navigator.userAgent); Elements.screenWidth = document.body.clientWidth; Elements.screenHeight = document.body.clientHeight; function getLinkElements(image) { if (Elements.CurrentTurnHandler == undefined) return []; if (Elements.CurrentTurnHandler.isTurn() || image) { return [Elements.CurrentTurnHandler.currentTurnTab]; } else { return [Elements.HyperlinkHandler.linkedActionsTab, Elements.RoomHandler.currentRoomTab, Elements.HyperlinkHandler.commonActionsTab, Elements.CurrentTurnHandler.currentTurnTab, Elements.RoomHandler.currentRoomExits]; } } Elements.getLinkElements = getLinkElements; function updateScreenSize() { Elements.screenWidth = document.body.clientWidth; Elements.screenHeight = document.body.clientHeight; } Elements.updateScreenSize = updateScreenSize; Elements.mainPage = document.getElementById("mainPage"); function startTurn() { Elements.mainPage.classList.add("turn"); } Elements.startTurn = startTurn; function endTurn() { Elements.mainPage.classList.remove("turn"); } Elements.endTurn = endTurn; function isInTurn() { return Elements.mainPage.classList.contains("turn"); } Elements.isInTurn = isInTurn; let menuOutsideofTurn = false; let menus = 0; function startMenu() { if (!isInTurn()) { menuOutsideofTurn = true; startTurn(); } Elements.mainPage.classList.add("mainmenu"); menus++; Elements.CurrentTurnHandler.clear(); Controls.KeyHandler.reset(); } Elements.startMenu = startMenu; function endMenu() { Elements.CurrentTurnHandler.clear(); if (--menus == 0) { if (menuOutsideofTurn) { endTurn(); } resetMenus(); } } Elements.endMenu = endMenu; function resetMenus() { if (menus != 0) { console.error("A menu wasn't finished properly. Please correct the dialogue."); } menus = 0; menuOutsideofTurn = false; Elements.mainPage.classList.remove("mainmenu"); } Elements.resetMenus = resetMenus; function clearMainScreen() { Elements.CurrentTurnHandler.clear(); } Elements.clearMainScreen = clearMainScreen; let loadingScreen = document.getElementById("loadingScreen"); function stopLoading() { document.body.removeChild(loadingScreen); } Elements.stopLoading = stopLoading; async function waitForAnyKey() { let say = new Say(Say.CENTERED, new SayBold("Press any key to continue.")); let elements = await say.getHTML("p", ["content"]); Elements.CurrentTurnHandler.print(...elements); await Controls.KeyHandler.getNextKey(); Elements.CurrentTurnHandler.unprint(...elements); } Elements.waitForAnyKey = waitForAnyKey; async function waitForSpaceKey() { let say = new Say(Say.CENTERED, new SayBold("Press Space to continue.")); let elements = await say.getHTML("p", ["content"]); Elements.CurrentTurnHandler.print(...elements); let lastKey = "notSpace"; while (lastKey != "Space" && lastKey != "Click") { lastKey = (await Controls.KeyHandler.getNextKey()).evCode; } Elements.CurrentTurnHandler.unprint(...elements); } Elements.waitForSpaceKey = waitForSpaceKey; function printObeliskLogo() { let say = new Say(Say.CENTERED, new SayImage("introLogo"), Say.LINE_BREAK, new SayItalic("The Obelisk is an adult interactive fiction game set in a post-apocalyptic world ravaged by a magical structure.")); Elements.CurrentTurnHandler.printAsContent(say); } Elements.printObeliskLogo = printObeliskLogo; })(Elements || (Elements = {})); if (Elements.isMobile) { Elements.mainPage.classList.add("mobile"); } window.addEventListener("resize", function () { Elements.updateScreenSize(); }); var MachineBegins; (function (MachineBegins) { MachineBegins.HideLoadingDivRule = MachineBegins.rulebook.createAndAddRule({ name: "Hide loading div", code: runner => { Elements.stopLoading(); } }); })(MachineBegins || (MachineBegins = {})); var TurnSequence; (function (TurnSequence) { TurnSequence.LazilyFixMenus = TurnSequence.rulebook.createAndAddRule({ name: "Fix menus that were never closed because the dev is stupid", firstPriority: Rule.PRIORITY_LOWEST, priority: Rule.PRIORITY_LOWEST, code: () => { Elements.resetMenus(); } }); })(TurnSequence || (TurnSequence = {})); var Controls; (function (Controls) { var KeyHandler; (function (KeyHandler) { let promiseStack = []; let promiseOriginalStack = []; function rejectPromise(promise) { promiseStack.splice(promiseStack.indexOf(promise), 1); promiseOriginalStack.splice(promiseStack.indexOf(promise), 1); } KeyHandler.rejectPromise = rejectPromise; function createKeyCode(ev) { let name = ev.key.toUpperCase(); let representation = name; let evCode = ev.code; if (ev.shiftKey) { name = "Shift + " + name; evCode = "Sh" + evCode; representation = "S" + representation; } if (ev.altKey) { name = "Alt + " + name; evCode = "Al" + evCode; representation = "A" + representation; } if (ev.ctrlKey) { name = "Control + " + name; evCode = "Ct" + evCode; representation = "C" + representation; } let keyCode = { evCode: evCode, name: name, representation: representation }; return keyCode; } KeyHandler.createKeyCode = createKeyCode; window.addEventListener("mousedown", function (event) { let keyCode = { representation: "Click", evCode: "Click", name: "Click" }; let promise = promiseStack.shift(); if (promise != undefined) { promise(keyCode); promiseOriginalStack.shift(); return; } }); window.addEventListener("keydown", function (event) { let keyCode = createKeyCode(event); let promise = promiseStack.shift(); if (promise != undefined) { promise(keyCode); promiseOriginalStack.shift(); return; } if (keyCode.evCode == KeyHandler.scrollKeyCode.getValue().evCode) { Elements.CurrentTurnHandler.scrollSpace(); return; } else if (keyCode.evCode == KeyHandler.imageKeyCode.getValue().evCode) { if (SayImage.imageViewer.style.display == "block") { SayImage.imageViewer.style.display = "none"; } else { let images = Elements.CurrentTurnHandler.currentTurnTab.getElementsByClassName("contentImage"); if (images.length > 0) { images[images.length - 1].click(); } } return; } let ele; Elements.getLinkElements().some((element) => { let keyables = element.getElementsByClassName("keyable"); for (let i = 0; i < keyables.length; i++) { if (keyables[i].dataset['shortcutcode'] == keyCode.evCode) { ele = keyables[i]; return true; } } return false; }); if (ele != undefined) { ele.click(); } }); function createKeyCodes(codes, keys, mods) { let arr = []; for (let mod = 0; mod < 4; mod++) { if (mod == 0 || mods[mod] == true) { for (let i = 0; i < codes.length; i++) { let name = keys[i]; let representation = keys[i]; let evCode = codes[i]; if (mod == 1) { name = "Shift + " + name; evCode = "Sh" + evCode; representation = "S" + representation; } if (mod == 2) { name = "Alt + " + name; evCode = "Al" + evCode; representation = "A" + representation; } if (mod == 3) { name = "Control + " + name; evCode = "Ct" + evCode; representation = "C" + representation; } let keyCode = { evCode: evCode, representation: representation, name: name }; arr.push(keyCode); } } } return arr; } KeyHandler.createKeyCodes = createKeyCodes; KeyHandler.scrollKeyCode = new StoredMemory("scrollKeyCode", { evCode: "Space", representation: "Space" }); KeyHandler.imageKeyCode = new StoredMemory("imageKeyCode", { evCode: "KeyI", representation: "I" }); KeyHandler.keyCodes1 = new StoredMemory("keyCodesRoom", createKeyCodes(["Digit1", "Digit2", "Digit3", "Digit4", "Digit5"], ["1", "2", "3", "4", "5"], [true, true, true, true])); KeyHandler.keyCodes2 = new StoredMemory("keyCodesActions", createKeyCodes(["KeyQ", "KeyW", "KeyE", "KeyR", "KeyT"], ["Q", "W", "E", "R", "T"], [true, true, true, true])); KeyHandler.keyCodes3 = new StoredMemory("keyCodesGlobal", createKeyCodes(["KeyF", "KeyV", "KeyG", "KeyB"], ["F", "V", "G", "B"], [true, true, true, true])); KeyHandler.keyCodeNorth = new StoredMemory("keyCodeNorth", { evCode: "KeyS", representation: "S" }); KeyHandler.keyCodeEast = new StoredMemory("keyCodeEast", { evCode: "KeyC", representation: "C" }); KeyHandler.keyCodeSouth = new StoredMemory("keyCodeSouth", { evCode: "KeyX", representation: "X" }); KeyHandler.keyCodeWest = new StoredMemory("keyCodeWest", { evCode: "KeyZ", representation: "Z" }); KeyHandler.keyCodeUp = new StoredMemory("keyCodeUp", { evCode: "KeyA", representation: "A" }); KeyHandler.keyCodeDown = new StoredMemory("keyCodeDown", { evCode: "KeyD", representation: "D" }); var directionCodeByIndex = [KeyHandler.keyCodeNorth, undefined, KeyHandler.keyCodeEast, undefined, KeyHandler.keyCodeSouth, undefined, KeyHandler.keyCodeWest, undefined, KeyHandler.keyCodeUp, KeyHandler.keyCodeDown]; function getDirectionCode(direction) { return getDirectionCodeByIndex(Room.DIRECTIONS.indexOf(direction)); } KeyHandler.getDirectionCode = getDirectionCode; function getDirectionCodeByIndex(index) { return directionCodeByIndex[index].getValue(); } KeyHandler.getDirectionCodeByIndex = getDirectionCodeByIndex; KeyHandler.available1 = []; KeyHandler.available2 = []; KeyHandler.available3 = []; function reset() { KeyHandler.available1 = KeyHandler.keyCodes1.getValue().slice(); KeyHandler.available2 = KeyHandler.keyCodes2.getValue().slice(); KeyHandler.available3 = KeyHandler.keyCodes3.getValue().slice(); } KeyHandler.reset = reset; let showKeys = new StoredMemory("ShowKeys", !Elements.isMobile); function applyCode(element, code) { if (code == undefined) { delete (element.dataset['shortcut']); delete (element.dataset['shortcutcode']); element.classList.remove("keyable"); } else { element.dataset['shortcutcode'] = code.evCode; if (showKeys.getValue()) { element.dataset['shortcut'] = code.representation; } element.classList.add("keyable"); } } KeyHandler.applyCode = applyCode; function getFirstKeyCode() { let chosen = KeyHandler.available1.length > 0 ? KeyHandler.available1 : KeyHandler.available2.length > 0 ? KeyHandler.available2 : KeyHandler.available3.length > 0 ? KeyHandler.available3 : undefined; if (chosen != undefined) { return chosen.shift(); } return undefined; } KeyHandler.getFirstKeyCode = getFirstKeyCode; function getSecondKeyCode() { let chosen = KeyHandler.available2.length > 0 ? KeyHandler.available2 : KeyHandler.available3.length > 0 ? KeyHandler.available3 : undefined; if (chosen != undefined) { return chosen.splice(0, 1)[0]; } return undefined; } KeyHandler.getSecondKeyCode = getSecondKeyCode; function getThirdKeyCode() { let chosen = KeyHandler.available3.length > 0 ? KeyHandler.available3 : undefined; if (chosen != undefined) { return chosen.splice(0, 1)[0]; } return undefined; } KeyHandler.getThirdKeyCode = getThirdKeyCode; function getNextKey(timeout) { let timeoutNumber; let promise = (new Promise((resolve, reject) => { promiseStack.push(resolve); if (timeout != undefined) { timeoutNumber = setTimeout(() => { KeyHandler.rejectPromise(resolve); reject(); }, timeout * 1000); } })); promise.then(() => { clearTimeout(timeoutNumber); }); return promise; } KeyHandler.getNextKey = getNextKey; function stopGivingNextKey(originalPromise) { let index = promiseOriginalStack.indexOf(originalPromise); if (index != -1) { rejectPromise(promiseStack[index]); } } KeyHandler.stopGivingNextKey = stopGivingNextKey; })(KeyHandler = Controls.KeyHandler || (Controls.KeyHandler = {})); })(Controls || (Controls = {})); class SayImage { constructor(imgName) { this.imgName = imgName; if (!SayImage.loadTimeCheck && SayImage.imageNames.indexOf(this) == -1) { SayImage.imageNames.push(this); } } isImageDefined() { try { for (var i = 0; i < document.styleSheets.length; i++) { var rules = document.styleSheets[i]['rules'] || document.styleSheets[i]['cssRules']; for (var x in rules) { if (typeof rules[x].selectorText == 'string' && rules[x].selectorText == "." + this.imgName) { return true; } } } return false; } catch (e) { console.warn("Can't check for undefined images."); return true; } } getImageElement() { let img = document.createElement("div"); if (this.isImageDefined()) { img.classList.add(this.imgName); img.classList.add("contentImage"); } else { img.classList.add("error"); img.appendChild(document.createTextNode("Image \"" + this.imgName + "\" not found.")); } img.addEventListener("click", () => { SayImage.showInViewer(this); }); Controls.KeyHandler.applyCode(img, Controls.KeyHandler.imageKeyCode.getValue()); return img; } getPrintedElement() { return [this.getImageElement()]; } static doLoadTimeCheck() { for (let i = 0; i < SayImage.imageNames.length; i++) { let image = SayImage.imageNames[i]; if (!image.isImageDefined()) { if (Settings.hardDebug) { Elements.CurrentTurnHandler.printAsError("Image \"" + image.imgName + "\" was not found."); } console.error("Image \"" + image.imgName + "\" was not found."); } } SayImage.loadTimeCheck = true; } static showInViewer(image) { if (!(SayImage.imageViewer.style.display == 'block')) { SayImage.imageViewer.addEventListener("click", () => { SayImage.imageViewer.style.display = "none"; }); SayImage.imageViewer.className = image.imgName; SayImage.imageViewer.style.display = "block"; } else { SayImage.imageViewer.style.display = "none"; } } } SayImage.imageNames = []; SayImage.loadTimeCheck = false; SayImage.imageViewer = document.getElementById("imageViewer"); var MachineBegins; (function (MachineBegins) { MachineBegins.ImageLoadTimeCheck = MachineBegins.rulebook.createAndAddRule({ firstPriority: Rule.PRIORITY_HIGHEST, name: "Check for undefined images", code: () => { try { SayImage.doLoadTimeCheck(); } catch (e) { console.warn("Can't check for undefined images."); } } }); })(MachineBegins || (MachineBegins = {})); class SayableObject { } class Say { constructor(...objs) { this.sequence = []; this.skipbreaks = false; this.centered = false; this.add(...objs); } add(...objs) { this.sequence.push(...objs); } remove(...objs) { for (let i = 0; i < objs.length; i++) { let index = this.sequence.indexOf(objs[i]); if (index >= 0) { this.sequence.splice(index, 1); } } } isEmpty() { return this.sequence.length < 1; } async getTextOf(index, seq) { let elements = await this.getElementFor(index, seq); let div = document.createElement("div"); for (let i = 0; i < elements.length; i++) { if (typeof elements[i] != "number") { div.appendChild(elements[i]); } } return div.innerText; } doLineBreak() { if (this.currentParagraph.length > 0 && !this.skipbreaks) { let br = document.createElement("br"); br.classList.add("linebreak"); let ti = document.createElement("span"); ti.classList.add("textIndenter"); this.currentParagraph.push(br, ti); } } doParagraphBreak() { if (this.currentParagraph.length > 0 && !this.skipbreaks) { this.paragraphs.push(this.currentParagraph); this.currentParagraph = []; } } async getParagraphs() { this.paragraphs = []; this.currentParagraph = []; this.skipbreaks = false; for (this.sequenceRunner = 0; this.sequenceRunner < this.sequence.length; this.sequenceRunner++) { let seq = this.sequence[this.sequenceRunner]; if (seq instanceof OneOf) { seq = seq.getOne(); } if (seq == Say.CENTERED) { this.setCentered(true); } else if (seq == Say.b) { let boldObjects = []; for (let i = this.sequenceRunner + 1; i < this.sequence.length; i++) { let candidate = this.sequenceRunner[i]; if (candidate == Say.b) { this.sequence.splice(i, 1); break; } else { boldObjects.push(this.sequence.splice(i, 1)); } } if (boldObjects.length > 0) { let bold = new SayBold(...boldObjects); this.sequence.splice(this.sequenceRunner + 1, 0, bold); } } else if (seq == Say.COCK) { if (HumanoidPenis != undefined) { let cock = HumanoidPenis.getSynonym(); this.currentParagraph.push(document.createTextNode(cock)); } } else if (seq == Say.PUSSY) { if (HumanoidVagina != undefined) { let vagina = HumanoidVagina.getSynonym(); this.currentParagraph.push(document.createTextNode(vagina)); } } else if (seq == Say.LINE_BREAK) { this.doLineBreak(); } else if (seq == Say.PARAGRAPH_BREAK) { this.doParagraphBreak(); } else if (seq == Say.RUN_PARAGRAPH) { this.skipbreaks = true; } else if (seq == Say.RUN_PARAGRAPH_OFF) { this.skipbreaks = false; } else if (typeof seq == "function") { let fObj = seq(this); if (Array.isArray(fObj)) { for (let k = fObj.length - 1; k >= 0; k--) { this.sequence.splice(this.sequenceRunner + 1, 0, fObj[k]); } } else if (fObj != undefined) { this.sequence.splice(this.sequenceRunner + 1, 0, fObj); } this.sequence.splice(this.sequenceRunner, 1); this.sequenceRunner--; } else if (seq.constructor == this.constructor) { for (let k = seq.sequence.length - 1; k >= 0; k--) { this.sequence.splice(this.sequenceRunner + 1, 0, seq.sequence[k]); } this.sequence.splice(this.sequenceRunner, 1); this.sequenceRunner--; } else if (seq != undefined) { let elements = await this.getElementFor(this.sequenceRunner, seq); for (let i = 0; i < elements.length; i++) { if (elements[i] === Say.DO_LINE_BREAK) { this.doLineBreak(); } else if (elements[i] === Say.DO_PARAGRAPH_BREAK) { this.doParagraphBreak(); } else { this.currentParagraph.push(elements[i]); } } } } if (this.currentParagraph.length > 0) { this.paragraphs.push(this.currentParagraph); } return this.paragraphs; } async getElementFor(index, obj) { if (obj instanceof Promise) { obj = await obj; } if (typeof obj == "string" || obj instanceof String) { return [document.createTextNode(obj)]; } else if (typeof obj == "number" || obj instanceof Number) { return [document.createTextNode((parseFloat(obj.toFixed(2)) / 1).toString())]; } else if (typeof obj == "function") { let elements = await this.getElementFor(-1, obj(this)); return elements; } else if (obj instanceof SayImage) { return [obj.getImageElement()]; } else if (obj instanceof SayLeftRight) { return (await obj.getPureElements()); } else if (obj instanceof Say) { let elements = await obj.getPureElements(this); return elements; } else if (this.isProperElement(obj)) { return [obj]; } else if (obj instanceof Object) { let elements = await this.printName(obj); return elements; } } async getPureElements(say) { let paragraphs = await this.getParagraphs(); return paragraphs.length == 1 ? paragraphs[0] : Array.prototype.concat.apply([], paragraphs); } setCentered(bool) { this.centered = bool; } async getHTML(tagName, classList, singleParagraph) { let paragraphs = await this.getParagraphs(); if (singleParagraph == true && paragraphs.length > 1) { paragraphs = [Array.prototype.concat.apply([], paragraphs)]; } let elements = []; for (let i = 0, paragraph = paragraphs[i]; paragraph != undefined; paragraph = paragraphs[++i]) { let parent = document.createElement(tagName); if (classList.length > 0) { parent.classList.add(...classList); } for (let k = 0, ele = paragraph[k]; ele != undefined; ele = paragraph[++k]) { parent.appendChild(ele); } elements.push(parent); if (this.centered) { parent.classList.add("centered"); } } return elements; } getHTMLContent() { return this.getHTML("p", ["content"]); } isProperElement(o) { return (typeof Node === "object" ? o instanceof Node : o && typeof o === "object" && typeof o.nodeType === "number" && typeof o.nodeName === "string") || (typeof HTMLElement === "object" ? o instanceof HTMLElement : o && typeof o === "object" && o !== null && o.nodeType === 1 && typeof o.nodeName === "string"); } async printName(thing) { this.currentNoun = thing; this.currentNounElements = []; let before = Say.beforePrinting.execute({ noun: this }); await before; let print = Say.printing.execute({ noun: this }); await print; let after = Say.afterPrinting.execute({ noun: this }); await after; return this.currentNounElements; } static hisHersIts(target, startOfSentence) { return new SayHisHersIts(target); } } Say.LINE_BREAK = new SayableObject(); Say.PARAGRAPH_BREAK = new SayableObject(); Say.RUN_PARAGRAPH = new SayableObject(); Say.RUN_PARAGRAPH_OFF = new SayableObject(); Say.CENTERED = new SayableObject(); Say.b = new SayableObject(); Say.DO_PARAGRAPH_BREAK = new SayableObject(); Say.DO_LINE_BREAK = new SayableObject(); Say.COCK = new SayableObject(); Say.PUSSY = new SayableObject(); Say.beforePrinting = new Rulebook("Before printing the name of something"); Say.printing = new Rulebook("Printing the name of something"); Say.afterPrinting = new Rulebook("After printing the name of something"); Say.printing.addRule(new Rule({ name: "Printing the name of a Printable Element", firstPriority: Rule.PRIORITY_LOW, code: (rulebook) => { let say = rulebook.noun; if (say.currentNoun.getPrintedElement) { say.currentNounElements.push(...say.currentNoun.getPrintedElement()); return true; } } })); Say.printing.addRule(new Rule({ name: "Printing the name of a Printable", firstPriority: Rule.PRIORITY_LOW, code: (rulebook) => { let say = rulebook.noun; if (say.currentNoun.getPrintedName) { let thingEle = document.createTextNode(say.currentNoun.getPrintedName()); say.currentNounElements.push(thingEle); return true; } } })); Say.printing.addRule(new Rule({ name: "Printing the name of an unknown object", firstPriority: Rule.PRIORITY_LOWEST, priority: Rule.PRIORITY_LOWEST, code: (rulebook) => { let say = rulebook.noun; if (say.currentNoun.getPrintedName) { say.currentNounElements.push((document.createTextNode(say.currentNoun.toString()))); return true; } } })); var CharacterCreation; (function (CharacterCreation) { CharacterCreation.FalselyAccused = new CharacterOrigin("Falsely Accused"); CharacterCreation.FalselyAccused.name = "Falsely Accused"; CharacterCreation.FalselyAccused.description = new Say("You made some allegations against a powerful man in your village. Whether those were true or not didn't matter, he was most displeased with your actions and did all he could to end your life as you knew it. Just as you were about to be executed for your inexistent crimes, the man asked for mercy. You thought he wasn't willing to go this far with his lies, only to have your hopes crushed when you noticed a smirk in his evil face.\n", Say.PARAGRAPH_BREAK, "The man claimed he wanted to forgive you, but would need proof of your regret. You received an alternative sentence: go to the Tower and find a way to destroy it. Surely an impossible task. Surely just another death sentence... or worse. But it's not like you have a choice in the matter."); CharacterCreation.FalselyAccused.bonusStats = "This origin confers no bonuses, but you have complete freedom with your perks."; })(CharacterCreation || (CharacterCreation = {})); var CharacterCreation; (function (CharacterCreation) { CharacterCreation.HornyVirgin = new Perk("Horny Virgin"); CharacterCreation.HornyVirgin.description = new Say("Whichever life you led up to this point never allowed you to explore your sexuality. As a result, you're both virgin AND extremely horny. This perk makes it so that the World Depravity around the Tower is initially higher and rises faster, however you are not as affected by this rising Depravity around you.", Say.PARAGRAPH_BREAK, "This perk is mandatory for Champions and is not compatible with most sex-related perks."); CharacterCreation.HornyVirgin.forcedStatus = (hornyVirgin) => { if (CharacterCreation.getOrigin() == CharacterCreation.ChampionOrigin) { return true; } else if (CharacterCreation.Slut.isEnabled(true)) { return false; } }; CharacterCreation.Slut = new Perk("Unredeemable Slut"); CharacterCreation.Slut.description = new Say("Simply put: you really like sex. Your Depravity starts off higher and rises even faster, also affecting World Depravity. However, you level up sex-related Skills faster.", Say.PARAGRAPH_BREAK, "This perk is not compatible with ", CharacterCreation.HornyVirgin.name, "."); CharacterCreation.Slut.forcedStatus = () => { if (CharacterCreation.HornyVirgin.isEnabled(true)) { return false; } }; CharacterCreation.SensitiveHoles = new Perk("Sensitive Holes"); CharacterCreation.SensitiveHoles.description = "You are very sensitive to any kind of receptive penetration. You have a harder time escaping grapples while being penetrated and an easier time orgasming from it, but getting aroused faster also means you take less damage from it."; })(CharacterCreation || (CharacterCreation = {})); var ContentHandler; (function (ContentHandler) { let contentHash = {}; let contentArray = []; function registerContentType(type) { if (contentHash[type.getId()] != undefined) { console.error("[ContentHandler} Can't register the content.", type, "Old:", contentHash[type.getId()]); return; } else { contentHash[type.getId()] = type; contentArray.push(type); } } ContentHandler.registerContentType = registerContentType; function getContentTypes() { return contentArray.slice(); } ContentHandler.getContentTypes = getContentTypes; })(ContentHandler || (ContentHandler = {})); class ContentType extends StoredMemory { constructor(options) { super(ContentType.memoryPrefix + options.id, options.defaultValue); this.valueDescription = () => { return new Say(JSON.stringify(this.getValue())); }; this.changeable = true; this.description = options.description instanceof Say ? options.description : new Say(options.description); this.valueDescription = options.currentValueDescription == undefined ? this.valueDescription : options.currentValueDescription; if (options.changeable == false) { this.storeValue(options.defaultValue); this.changeable = false; } ContentHandler.registerContentType(this); } getDescription() { return this.description; } getValueDescription() { let desc = this.valueDescription(this); if (desc instanceof Say) { return desc; } else { return new Say(desc); } } toggle() { if (this.changeable) { this.storeValue(!this.getValue()); } } isAllowed() { return this.getValue(); } } ContentType.memoryPrefix = "ct_"; ContentType.MM = new ContentType({ changeable: false, description: "Homosexual (M/M) sexual events", id: "MM", defaultValue: true }); ContentType.FF = new ContentType({ changeable: false, description: "Homosexual (F/F) sexual events", id: "FF", defaultValue: true }); ContentType.MF = new ContentType({ changeable: false, description: "Heterosexual (M/F) sexual events", id: "MF", defaultValue: true }); ContentType.Beast = new ContentType({ changeable: true, description: "Sexual events with either monsters or magical beasts. MM/MF/FF take precedence over this one if blocked. Sufficiently human creatures do not get counted into this.", id: "Beast", defaultValue: true }); ContentType.Scat = new ContentType({ changeable: false, description: "Scatologic sexual events", id: "Scat", defaultValue: false }); ContentType.Pee = new ContentType({ changeable: false, description: "Sexual events with urine", id: "Urophilia", defaultValue: false }); var Elements; (function (Elements) { var CurrentTurnHandler; (function (CurrentTurnHandler) { CurrentTurnHandler.currentTurnTab = document.getElementById("currentTurnTab"); CurrentTurnHandler.currentTurn = document.getElementById("currentTurn"); CurrentTurnHandler.turnHr = document.createElement("p"); CurrentTurnHandler.lastReadOffset = CurrentTurnHandler.currentTurnTab.clientHeight / 2; CurrentTurnHandler.turnHr.classList.add("turnStart"); CurrentTurnHandler.turnHr.appendChild(document.createTextNode("Start of Turn")); function startTurn(action) { let oldContent = CurrentTurnHandler.currentTurnTab.getElementsByClassName("content"); for (let i = 0; i < oldContent.length; i++) { oldContent[i].classList.add("contentOld"); oldContent[i].classList.remove("content"); } CurrentTurnHandler.currentTurnTab.appendChild(CurrentTurnHandler.turnHr); Elements.startTurn(); scrollToNewTurn(); } CurrentTurnHandler.startTurn = startTurn; function isTurn() { return Elements.isInTurn(); } CurrentTurnHandler.isTurn = isTurn; function endTurn() { Elements.endTurn(); } CurrentTurnHandler.endTurn = endTurn; function getSayElementsAsContent(say) { return say.getHTML("p", ["content"]); } CurrentTurnHandler.getSayElementsAsContent = getSayElementsAsContent; function printAsContent(say) { let node = getMarker(); getSayElementsAsContent(say).then(value => { insertBefore(value, node); unprint(node); }); } CurrentTurnHandler.printAsContent = printAsContent; function simplePrint(...sayValues) { printAsContent(new Say(...sayValues)); } CurrentTurnHandler.simplePrint = simplePrint; function printAsError(msg) { if (msg instanceof Say) { msg.getHTML("div", ["error"], true).then(value => { print(...value); }); } else { let div = document.createElement("div"); div.classList.add("error"); div.appendChild(document.createTextNode(msg)); print(div); } } CurrentTurnHandler.printAsError = printAsError; function clear() { while (CurrentTurnHandler.currentTurnTab.firstChild != undefined) { CurrentTurnHandler.currentTurnTab.removeChild(CurrentTurnHandler.currentTurnTab.firstChild); } Controls.KeyHandler.reset(); } CurrentTurnHandler.clear = clear; function print(...elements) { if (elements.length > 0) { elements.forEach((element) => { CurrentTurnHandler.currentTurnTab.appendChild(element); }); scrollTo(CurrentTurnHandler.lastReadOffset); } } CurrentTurnHandler.print = print; function getMarker() { let node = document.createTextNode(""); CurrentTurnHandler.currentTurnTab.appendChild(node); return node; } CurrentTurnHandler.getMarker = getMarker; function insertBefore(newChilds, oldChild) { newChilds.forEach((newChild) => { CurrentTurnHandler.currentTurnTab.insertBefore(newChild, oldChild); }); scrollTo(CurrentTurnHandler.lastReadOffset); } CurrentTurnHandler.insertBefore = insertBefore; function unprint(...elements) { elements.forEach((element) => { if (element.parentElement == CurrentTurnHandler.currentTurnTab) { CurrentTurnHandler.currentTurnTab.removeChild(element); } }); } CurrentTurnHandler.unprint = unprint; function scrollToNewTurn() { let target = CurrentTurnHandler.turnHr.offsetTop + CurrentTurnHandler.turnHr.offsetHeight; CurrentTurnHandler.lastReadOffset = target; if (target < CurrentTurnHandler.currentTurn.scrollTop) { return; } scrollTo(target); } CurrentTurnHandler.scrollToNewTurn = scrollToNewTurn; function scrollToBottom() { scrollTo(CurrentTurnHandler.currentTurn.scrollHeight - CurrentTurnHandler.currentTurn.clientHeight); } CurrentTurnHandler.scrollToBottom = scrollToBottom; function scrollSpace() { scrollTo(CurrentTurnHandler.currentTurn.scrollTop + (CurrentTurnHandler.currentTurn.clientHeight / 2)); } CurrentTurnHandler.scrollSpace = scrollSpace; CurrentTurnHandler.currentTurn.addEventListener("scroll", () => { let currentRead = CurrentTurnHandler.currentTurn.scrollTop + CurrentTurnHandler.currentTurn.clientHeight; if (currentRead > CurrentTurnHandler.lastReadOffset) { CurrentTurnHandler.lastReadOffset = currentRead; } }); var startOffset; var targetOffset; var startTime; var finishTime; var totalTime; var animationRequest; function scrollTo(offset) { if (offset <= CurrentTurnHandler.lastReadOffset) { startOffset = CurrentTurnHandler.currentTurn.scrollTop; targetOffset = offset; startTime = new Date().getTime(); finishTime = startTime + Elements.animationTime; totalTime = finishTime - startTime; startScrolling(); } } CurrentTurnHandler.scrollTo = scrollTo; function startScrolling() { if (animationRequest == undefined) { animationRequest = requestAnimationFrame(CurrentTurnHandler.updateFrame); } } CurrentTurnHandler.startScrolling = startScrolling; CurrentTurnHandler.updateFrame = () => { animationRequest = undefined; let movingOffset = (targetOffset - startOffset); let timePassed = new Date().getTime() - startTime; let idealOffset = movingOffset * (timePassed / totalTime); let maxScroll = CurrentTurnHandler.currentTurn.scrollHeight - CurrentTurnHandler.currentTurn.clientHeight; CurrentTurnHandler.currentTurn.scrollTop = startOffset + idealOffset; if (CurrentTurnHandler.currentTurn.scrollTop < targetOffset && CurrentTurnHandler.currentTurn.scrollTop < maxScroll) { startScrolling(); } }; })(CurrentTurnHandler = Elements.CurrentTurnHandler || (Elements.CurrentTurnHandler = {})); })(Elements || (Elements = {})); var Controls; (function (Controls) { var Links; (function (Links) { function makeCustomLink(element, options) { if (options.mouseover != undefined && options.mouseout != undefined) { element.addEventListener("mouseover", options.mouseover); element.addEventListener("mouseout", options.mouseout); } element.addEventListener("click", options.click); } Links.makeCustomLink = makeCustomLink; function makeLink(element, action) { makeCustomLink(element, { mouseover: () => { Elements.HyperlinkHandler.hoverAction(action); }, mouseout: () => { Elements.HyperlinkHandler.unhoverAction(); }, click: (e) => { TurnSequence.execute(action); Elements.HyperlinkHandler.unhoverAction(); e.stopPropagation(); e.preventDefault(); } }); } Links.makeLink = makeLink; })(Links = Controls.Links || (Controls.Links = {})); })(Controls || (Controls = {})); class RoomNode { constructor(room) { this.mainDiv = document.createElement("div"); this.room = room; this.mainDiv.classList.add("mapRoom"); if (room != undefined) { this.mainDiv.classList.add("linked", room.getBackgroundClass()); Room.DIRECTIONS.forEach((direction) => { if (room.connections[direction] != undefined) { let directionDiv = document.createElement("div"); directionDiv.classList.add("mapRoomConnection" + DirectionNames[Direction[direction]]); this.mainDiv.appendChild(directionDiv); } }); Controls.Links.makeLink(this.mainDiv, new ActionGo(WorldState.player, room)); } } async createRoomNameFloater() { if (this.room != undefined) { let roomName = document.createElement("div"); let sayName = new Say(this.room); await sayName.getPureElements().then(value => { value.forEach(element => { roomName.appendChild(element); }); Elements.HoverInfo.makeHoverable(this.mainDiv, value); }); } } async update() { if (this.room != undefined) { if (WorldState.player.getRoom() == this.room) { this.mainDiv.classList.add("current"); } else { this.mainDiv.classList.remove("current"); } let isRemembered = await WorldState.isRoomRemembered(this.room); if (!isRemembered) { this.mainDiv.classList.add("unknown"); } else { this.mainDiv.classList.remove("unknown"); } } } getElement() { return this.mainDiv; } } class SayAn extends Say { constructor(autoUppercase) { super(); this.node = document.createTextNode("a "); this.uppercase = true; if (autoUppercase != undefined) { this.uppercase = autoUppercase; } } async getPureElements(say) { let next = say.sequence[say.sequenceRunner + 1]; if (next == undefined || (next instanceof Thing && next.properlyNamed)) { this.node.nodeValue = ""; } else { let aan = AvsAn.query((await say.getTextOf(say.sequenceRunner + 1, next)).trim()); if (aan.prefix != "") { this.node.nodeValue = aan.article + " "; } if (this.uppercase && say.currentParagraph.length == 0) { this.node.nodeValue = this.node.nodeValue.charAt(0).toUpperCase() + this.node.nodeValue.substr(1, this.node.nodeValue.length - 1); } this.node.nodeValue = this.node.nodeValue + " "; } return [this.node]; } } var AvsAn = (function () { var dict = "p3ezz;4wrlg;2h;#2rg;22;2;a;7;;if;z;;&4h;1c;1;N;6;;*yp;6a;4;a2;q;;e1;q;;i1;h;;o;7;;/op;5n;9;a3;i;;e5;h;;h;;1;o5;;;i;r;;l;;1;/;6;;n;;1;o6;;;o1;a;;r;;1;e7;;;s;;1;/2;j;;09pa;y3;1;8e;10;;17qoq;qmm;2;12hp;7nw;a;0o4;45;1;0n;2w;;15r;1n;2;8;7;;9;5;;28s;x;;34q;z;1;7;5;;45n;n;;598;w;;65k;u;;74j;y;;850;y;;93x;g;;81ux;hgk;a;0zb;el;a;0p;4h;;11;16;;21;10;;32;15;;4;18;;54;v;;6;12;;7;s;;8;v;;9;17;;11k;bq;1; v;2;;229;f3;2; 1a;3;;–5;;;31x;jc;1; 12;2;;41w;kq;2; z;4;;–5;;;559;sp;5; 2k;1;;,h;;;h7;;;kd;;;m6;;;62p;rm;2; 1b;5;;k5;;;72n;y6;2; 14;;;–5;;;82r;192;2; 19;4;;,5;;;93i;1ig;2; 10;4;;–5;;;8ys;nsu;;= n[1] ? "a" : "an" }; dict = dict.substr(1 + a.join(';').length); for (var i = 0; i < n[2]; i++) dict = fill(prefix + dict[0], node[dict[0]] = {}, dict.substr(1)); return dict; } fill("", root, dict); return { raw: root, query: function (word) { var node = root, sI = 0, result, c; do { c = word[sI++]; } while ('"‘’“”$\'-('.indexOf(c) >= 0); while (1) { result = node.data || result; node = node[c]; if (!node) return result; c = word[sI++] || " "; } } }; })(); class SayBold extends Say { async getPureElements() { let paragraphs = await this.getParagraphs(); let elements = paragraphs.length == 1 ? paragraphs[0] : Array.prototype.concat.apply([], paragraphs); let b = document.createElement("b"); elements.forEach((element) => { b.appendChild(element); }); return [b]; } } class SayHeSheIt extends Say { constructor(target, autoUppercase) { super(); this.node = document.createTextNode("a "); this.uppercase = true; this.target = target; if (autoUppercase != undefined) { this.uppercase = autoUppercase; } } async getPureElements(say) { let next = this.target; if (next == undefined) { this.node.nodeValue = ""; } else { if (next instanceof Humanoid) { let gender = next.getGenderValue(); if (gender.genderValueCorrected > 65) { this.node.nodeValue = "she "; } else if (gender.genderValueCorrected < 35) { this.node.nodeValue = "he "; } else { if (gender.hasPenisBulge || gender.hasPenis) { this.node.nodeValue = "he "; } else if (gender.hasVagina || gender.hasTits) { this.node.nodeValue = "she "; } else { this.node.nodeValue = "they "; } } } else { this.node.nodeValue = "it "; } if (this.uppercase && say.currentParagraph.length == 0) { this.node.nodeValue = this.node.nodeValue.charAt(0).toUpperCase() + this.node.nodeValue.substr(1, this.node.nodeValue.length - 1); } } return [this.node]; } } class SayHimHerIt extends Say { constructor(target, autoUppercase) { super(); this.node = document.createTextNode("a "); this.uppercase = true; this.target = target; if (autoUppercase != undefined) { this.uppercase = autoUppercase; } } async getPureElements(say) { let next = this.target; if (next == undefined) { this.node.nodeValue = ""; } else { if (next instanceof Humanoid) { let gender = next.getGenderValue(); if (gender.genderValueCorrected > 65) { this.node.nodeValue = "her "; } else if (gender.genderValueCorrected < 35) { this.node.nodeValue = "him "; } else { if (gender.hasPenisBulge || gender.hasPenis) { this.node.nodeValue = "him "; } else if (gender.hasVagina || gender.hasTits) { this.node.nodeValue = "her "; } else { this.node.nodeValue = "them "; } } } else { this.node.nodeValue = "it "; } if (this.uppercase && say.currentParagraph.length == 0) { this.node.nodeValue = this.node.nodeValue.charAt(0).toUpperCase() + this.node.nodeValue.substr(1, this.node.nodeValue.length - 1); } } return [this.node]; } } class SayHisHersIts extends Say { constructor(target, autoUppercase) { super(); this.node = document.createTextNode("a "); this.uppercase = true; this.target = target; if (autoUppercase != undefined) { this.uppercase = autoUppercase; } } async getPureElements(say) { let next = this.target; if (next == undefined) { this.node.nodeValue = ""; } else { if (next instanceof Humanoid) { let gender = next.getGenderValue(); if (gender.genderValueCorrected > 65) { this.node.nodeValue = "hers "; } else if (gender.genderValueCorrected < 35) { this.node.nodeValue = "his "; } else { if (gender.hasPenisBulge || gender.hasPenis) { this.node.nodeValue = "his "; } else if (gender.hasVagina || gender.hasTits) { this.node.nodeValue = "hers "; } else { this.node.nodeValue = "their "; } } } else { this.node.nodeValue = "its "; } if (this.uppercase && say.currentParagraph.length == 0) { this.node.nodeValue = this.node.nodeValue.charAt(0).toUpperCase() + this.node.nodeValue.substr(1, this.node.nodeValue.length - 1); } } return [this.node]; } } class SayIf extends Say { constructor(condition, ...objs) { super(...objs); this.condition = condition != undefined ? condition : () => { return true; }; } async getPureElements() { if (this.condition()) { let paragraphs = await this.getParagraphs(); return paragraphs.length == 1 ? paragraphs[0] : Array.prototype.concat.apply([], paragraphs); } return []; } } class SayItalic extends Say { async getPureElements() { let paragraphs = await this.getParagraphs(); let elements = paragraphs.length == 1 ? paragraphs[0] : Array.prototype.concat.apply([], paragraphs); let b = document.createElement("i"); elements.forEach((element) => { b.appendChild(element); }); return [b]; } } class SayLeftRight extends Say { constructor() { super(); this.left = new Say(); this.right = new Say(); } addLeft(...objs) { this.left.add(...objs); } addRight(...objs) { this.right.add(...objs); } async getPureElements() { if (this.left.sequence.length == 0) { return await this.right.getPureElements(); } else if (this.right.sequence.length == 0) { return await this.left.getPureElements(); } let mainDiv = document.createElement("div"); mainDiv.classList.add("horFlex"); let left = document.createElement("div"); left.classList.add("horFlexColumn"); mainDiv.appendChild(left); let right = document.createElement("div"); right.classList.add("horFlexColumn"); mainDiv.appendChild(right); await this.left.getPureElements().then(value => { value.forEach(element => { left.appendChild(element); }); }); await this.right.getPureElements().then(value => { value.forEach(element => { right.appendChild(element); }); }); return [mainDiv]; } } class SayLink extends Say { setAction(action) { this.linkedAction = action; } async getPureElements() { let paragraphs = await this.getParagraphs(); let elements = paragraphs.length == 1 ? paragraphs[0] : Array.prototype.concat.apply([], paragraphs); let b = document.createElement("b"); b.classList.add("textLink"); elements.forEach((element) => { b.appendChild(element); }); Controls.Links.makeLink(b, this.linkedAction); return [b]; } } class SayThe extends Say { constructor(autoUppercase, alwaysPrint) { super(); this.node = document.createTextNode(""); this.uppercase = true; this.alwaysPrint = false; if (autoUppercase != undefined) { this.uppercase = autoUppercase; } if (alwaysPrint) { this.alwaysPrint = alwaysPrint; } } async getPureElements(say) { let next = say.sequence[say.sequenceRunner + 1]; if (this.alwaysPrint) { this.node.nodeValue = "the "; } else if (next == undefined) { this.node.nodeValue = ""; } else { if (next instanceof Thing) { if (!next.properlyNamed) { this.node.nodeValue = "the "; } else { this.node.nodeValue = ""; } } else { this.node.nodeValue = ""; } } if (this.node.nodeValue != "") { if (this.uppercase && say.currentParagraph.length == 0) { this.node.nodeValue = this.node.nodeValue.charAt(0).toUpperCase() + this.node.nodeValue.substr(1, this.node.nodeValue.length - 1); } } return [this.node]; } } var Elements; (function (Elements) { var AppearanceHandler; (function (AppearanceHandler) { var target = document.getElementById("appearanceTarget"); function empty() { while (target.firstChild) { target.removeChild(target.firstChild); } } async function print(say) { await say.getHTML("p", ["appearanceDescription"]).then(value => { for (let i = 0; i < value.length; i++) { target.appendChild(value[i]); } }); } AppearanceHandler.print = print; async function updateAppearance() { empty(); let player = WorldState.player; let playerGender = player.getGenderValue(); let playerSluttiness = player.getSluttiness(); let you = new SayLink("You"); you.setAction(new ActionExamine(WorldState.player, WorldState.player)); let presentation = new Say(you, " are presenting as ", new SayAn(), player.getShortestDescription(), "."); if (playerSluttiness.naked) { presentation.add(" You are naked."); } else if (playerSluttiness.halfNaked) { presentation.add(" You are almost naked."); } let tits = Thing.PartRelation.getRightTypeOne(player, HumanoidBreasts); let penis = Thing.PartRelation.getRightTypeOne(player, HumanoidPenis); let bulges = player.getBulges(); if (bulges.breasts > 0 || playerGender.genderValueCorrected > 60) { let realTits = tits.getSizeText(); let fakeTits = HumanoidBreasts.getSizeText(bulges.breasts); presentation.add(" You have " + realTits + " breasts"); if (bulges.breasts != tits.getSize() && realTits != fakeTits) { presentation.add(", padded to appear as " + fakeTits + " through your clothing."); } else { if (!tits.isUncovered()) { presentation.add(", safely covered."); } else { presentation.add("."); } } } if (penis == undefined) { presentation.add(" You have ", new SayAn(), HumanoidPenis.getSizeText(bulges.crotch) + " crotch bulge visible through your clothing."); } else { let realDick = penis.getSizeText(); let fakeDick = HumanoidPenis.getSizeText(bulges.crotch); presentation.add(" You have ", new SayAn(), realDick + " dick"); if (penis.getActualSize() != bulges.crotch && realDick != fakeDick) { presentation.add(", which looks like it is " + fakeDick + " due to your clothing."); } else { if (!penis.isUncovered()) { presentation.add(", which is covered."); } else { presentation.add("."); } } } await print(presentation); } AppearanceHandler.updateAppearance = updateAppearance; })(AppearanceHandler = Elements.AppearanceHandler || (Elements.AppearanceHandler = {})); })(Elements || (Elements = {})); function updateFontSize() { var minWidth = Elements.isMobile ? 800 : 1280; var proportion = Elements.isMobile ? 17 : 14.5; var width = document.body.clientWidth < minWidth ? minWidth : document.body.clientWidth; document.documentElement.style["font-size"] = (width * proportion / 1280) + "px"; } updateFontSize(); window.addEventListener("resize", updateFontSize); function toggleFullScreen() { var doc = window.document; var docEl = doc.documentElement; var requestFullScreen = docEl.requestFullscreen || docEl.mozRequestFullScreen || docEl.webkitRequestFullScreen || docEl.msRequestFullscreen; var cancelFullScreen = doc.exitFullscreen || doc.mozCancelFullScreen || doc.webkitExitFullscreen || doc.msExitFullscreen; if (!doc.fullscreenElement && !doc.mozFullScreenElement && !doc.webkitFullscreenElement && !doc.msFullscreenElement) { requestFullScreen.call(docEl); } else { cancelFullScreen.call(doc); } } var Elements; (function (Elements) { var HoverInfo; (function (HoverInfo) { var hoverbox = document.getElementById("hoverInfo"); var contentTarget = document.getElementById("hoverContent"); var width = 0; var height = 0; function empty() { while (contentTarget.firstChild != undefined) { contentTarget.removeChild(contentTarget.firstChild); } } function makeHoverable(element, contents) { element.addEventListener("mouseenter", (e) => { Elements.HoverInfo.hoverStart(e, contents); }); element.addEventListener("mousemove", (e) => { Elements.HoverInfo.hoverMove(e); }); element.addEventListener("mouseout", (e) => { Elements.HoverInfo.hoverEnd(); }); } HoverInfo.makeHoverable = makeHoverable; function hoverStart(e, contents) { empty(); for (let i = 0; i < contents.length; i++) { contentTarget.appendChild(contents[i]); } hoverbox.style.display = "block"; hoverbox.style.left = "0px"; hoverbox.style.top = "0px"; width = hoverbox.offsetWidth; height = hoverbox.offsetHeight; hoverMove(e); } HoverInfo.hoverStart = hoverStart; function hoverMove(e) { let left = e.clientX - (width / 2); let top = e.clientY - (height) - 6; if (top < 0) { top = e.clientY + 6; } if (left < width) { left = width; } if (left + width > Elements.screenWidth) { left = Elements.screenWidth - width; } hoverbox.style.left = Math.round(left) + "px"; hoverbox.style.top = Math.round(top) + "px"; } HoverInfo.hoverMove = hoverMove; function hoverEnd() { hoverbox.style.display = "none"; } HoverInfo.hoverEnd = hoverEnd; })(HoverInfo = Elements.HoverInfo || (Elements.HoverInfo = {})); })(Elements || (Elements = {})); var Elements; (function (Elements) { var HyperlinkHandler; (function (HyperlinkHandler) { HyperlinkHandler.linkedActionsTab = document.getElementById("linkActions"); HyperlinkHandler.commonActionsTab = document.getElementById("commonActionsTab"); var currentCommand = document.createTextNode(""); document.getElementById("currentCommand").appendChild(currentCommand); var currentActionTarget = document.createTextNode(""); document.getElementById("linkTarget").appendChild(currentActionTarget); var commonActions = []; var availableActions = []; function resetCommonActions() { commonActions.splice(0, commonActions.length); while (HyperlinkHandler.commonActionsTab.firstChild) { HyperlinkHandler.commonActionsTab.removeChild(HyperlinkHandler.commonActionsTab.firstChild); } } HyperlinkHandler.resetCommonActions = resetCommonActions; function addCommonAction(name, action) { commonActions.push([name, action]); } HyperlinkHandler.addCommonAction = addCommonAction; function resetAvailableActions() { availableActions = []; currentActionTarget.nodeValue = ""; while (HyperlinkHandler.linkedActionsTab.firstChild) { HyperlinkHandler.linkedActionsTab.removeChild(HyperlinkHandler.linkedActionsTab.firstChild); } } function addAvailableAction(name, action) { availableActions.push([name, action]); } HyperlinkHandler.addAvailableAction = addAvailableAction; function hoverAction(action) { currentCommand.nodeValue = action.getCommandText().toLowerCase(); } HyperlinkHandler.hoverAction = hoverAction; function unhoverAction() { currentCommand.nodeValue = ""; } HyperlinkHandler.unhoverAction = unhoverAction; async function hyperlinkObject(thing) { resetAvailableActions(); if (thing instanceof Thing && thing != WorldState.player) { await HyperlinkHandler.HyperlinkingRulebook.execute({ noun: thing }); currentActionTarget.nodeValue = thing.getPrintedName() + ": "; for (let i = 0, value = availableActions[i]; value != undefined; value = availableActions[++i]) { let link = createLink(value); link.classList.add("columnLink"); Controls.KeyHandler.applyCode(link, Controls.KeyHandler.getSecondKeyCode()); HyperlinkHandler.linkedActionsTab.appendChild(link); } } } HyperlinkHandler.hyperlinkObject = hyperlinkObject; function createLink(value) { let link = document.createElement("a"); link.appendChild(document.createTextNode(value[0])); Controls.Links.makeLink(link, value[1]); return link; } async function hyperlinkCommonActions() { resetCommonActions(); await HyperlinkHandler.CommonActionsRulebook.execute({}); for (let i = 0, value = commonActions[i]; value != undefined; value = commonActions[++i]) { let link = createLink(value); link.classList.add("lineLink"); Controls.KeyHandler.applyCode(link, Controls.KeyHandler.getThirdKeyCode()); HyperlinkHandler.commonActionsTab.appendChild(link); } } HyperlinkHandler.hyperlinkCommonActions = hyperlinkCommonActions; HyperlinkHandler.HyperlinkingRulebook = new Rulebook("Hyperlinking something"); HyperlinkHandler.CommonActionsRulebook = new Rulebook("Common Actions Rulebook"); })(HyperlinkHandler = Elements.HyperlinkHandler || (Elements.HyperlinkHandler = {})); })(Elements || (Elements = {})); class Action { constructor(actor, ...nouns) { this.extraChecks = []; this.extraCarries = []; this.nouns = []; this.say = new Say(); this.actingAgressively = false; this.actingSubmissively = false; this.requiresTurn = true; this.requiresNoun = true; this.requiresVisibility = true; this.actor = actor; nouns.forEach((value, index, array) => { this.setNoun(index, value); }); } async execute() { this.say = new Say(); let checkRulebooks = []; let carryRulebooks = []; let cClass = this.constructor; while (cClass != Action) { if (cClass.check != undefined) { checkRulebooks.push(cClass.check); } if (cClass.carry != undefined) { carryRulebooks.push(cClass.carry); } cClass = Object.getPrototypeOf(cClass); } let result = await Action.check.execute({ noun: this }, ...checkRulebooks); if (result == false) { return; } else if (result instanceof Action) { console.debug(Rulebook.getIndentation() + "[ACTION] Instead of..."); await result.execute(); this.say.add(result.say); this.nouns = result.nouns; return; } await Action.carry.execute({ noun: this }, ...carryRulebooks); return this.say; } get actor() { return this._actor; } set actor(value) { this._actor = value; } getNoun(n) { if (this.nouns.length > n) { return this.nouns[n]; } return undefined; } setNoun(n, noun) { while (this.nouns.length < n) { this.nouns.push(undefined); } this.nouns[n] = noun; } getCommandText() { return "do"; } stop() { this.requiresTurn = false; } } Action.check = new Rulebook("Check any Action"); Action.carry = new Rulebook("Carry out any Action"); Action.check.addRule(new Rule({ name: "Check any Action - Requires Noun", firstPriority: Rule.PRIORITY_HIGHEST, code: (rulebook) => { let action = rulebook.noun; if (action.getNoun(0) == undefined) { return false; } }, conditions: runner => { return runner.noun.requiresNoun; } })); Action.check.addRule(new Rule({ name: "Check any Action - Requires Visibility", code: (rulebook) => { let action = rulebook.noun; let actor = action.actor; if (!action.getNoun(0).isVisibleTo(actor)) { return false; } }, conditions: runner => { return runner.noun.requiresVisibility; } })); class ActionExamine extends Action { constructor() { super(...arguments); this.requiresTurn = false; } getCommandText() { if (this.getNoun(0) == WorldState.player) { return "examine myself"; } return "examine " + (this.getNoun(0) != undefined ? this.getNoun(0).getPrintedName() : ""); } } ActionExamine.check = new Rulebook("Check Examining"); ActionExamine.carry = new Rulebook("Carry out Examining"); ActionExamine.PrintDescriptionOfExaminedThingRule = ActionExamine.carry.createAndAddRule({ name: "Examine - Print Description of Examined Thing", code: (rulebook) => { let action = rulebook.noun; let noun = action.getNoun(0); if (noun instanceof Thing && noun.image != undefined) { action.say.add(noun.image, Say.PARAGRAPH_BREAK); } action.say.add(action.getNoun(0).getPrintedDescription()); } }); Elements.HyperlinkHandler.CommonActionsRulebook.addRule(new Rule({ name: "Look at me!", firstPriority: Rule.PRIORITY_LOWEST, priority: Rule.PRIORITY_HIGH, code: (rulebook) => { Elements.HyperlinkHandler.addCommonAction("Inspect", new ActionExamine(WorldState.player, WorldState.player)); } })); class RelationHandler { constructor(...relations) { relations.forEach(relation => { relation.setHandler(this); }); this.relations = relations; } addRelation(relation) { this.relations.push(relation); relation.setHandler(this); } } class Relation { setHandler(handler) { this.handler = handler; } hasHandler() { return this.handler != undefined; } static createString(obj1, obj2) { if (obj1 instanceof Object && obj2 instanceof Object) { let id1 = Relation.getId(obj1); let id2 = Relation.getId(obj2); return id1 < id2 ? (id1 + ";" + id2) : (id2 + ";" + id1); } } static getId(obj) { if (obj[Relation.objectIdField] == undefined) { obj[Relation.objectIdField] = Relation.objectCount++; } return obj[Relation.objectIdField]; } } Relation.objectCount = 0; Relation.objectIdField = "_RELATIONINTERNALID"; class RelationHandlerStrictOneToMany extends RelationHandler { setRelation(relation, left, right, value) { let parents = this.getAllLeft(left); if (parents.indexOf(right) != -1) { console.warn("[Relation] Attempt to create a circular relation:", this, left, right); return false; } this.unsetRight(right); return true; } unset(thing) { this.unsetLeft(thing); this.unsetRight(thing); } unsetLeft(left) { this.relations.forEach(relation => { relation.unsetLeft(left); }); } unsetRight(right) { this.relations.forEach(relation => { relation.unsetRight(right); }); } getLeft(right) { let result; for (let i = 0; i < this.relations.length; i++) { result = this.relations[i].getLeft(right); if (result != undefined) { return result; } } } getAllLeft(right) { let newParent = this.getLeft(right); let parents = []; while (newParent != undefined) { parents.push(newParent); newParent = this.getLeft(newParent); } return parents; } getAllLeftType(right, type) { return this.getAllLeft(right).filter(left => { return left instanceof type; }); } getLastLeft(right) { let parent = this.getLeft(right); let newParent = this.getLeft(parent); while (newParent != undefined) { parent = newParent; newParent = this.getLeft(parent); } return parent; } getAllRight(left) { let rights = []; this.relations.forEach(relation => { rights.push(...relation.getRight(left)); }); arrayUnique(rights); return rights; } getAllRightTypes(left, rightType) { return this.getAllRight(left).filter(right => { return right instanceof rightType; }); } } class RelationOneToMany extends Relation { constructor() { super(...arguments); this.valuesHash = {}; this.oneMap = new Map(); this.manyMap = new Map(); } getValue(left, right) { return this.valuesHash[Relation.createString(left, right)]; } setValue(left, right, value) { if (this.manyMap.get(right) == left) { let string = Relation.createString(left, right); if (string != undefined) { this.valuesHash[string] = value; } } } setRelation(left, right, value) { let proceed; if (this.handler != undefined) { proceed = this.handler.setRelation(this, left, right, value); } if (proceed) { this.unsetRight(left); this.unsetLeft(right); this.unsetRight(right); let string = Relation.createString(left, right); if (string != undefined) { this.valuesHash[string] = value; } this.manyMap.set(right, left); if (this.oneMap.get(left) == undefined) { this.oneMap.set(left, [right]); } else { this.oneMap.get(left).push(right); } } } getLeft(right) { return this.manyMap.get(right); } getAnyLeft() { let left = []; this.oneMap.forEach((value, key) => { left.push(key); }); arrayUnique(left); return left; } getAnyRight() { let rights = []; this.oneMap.forEach((value) => { rights.push(...value); }); arrayUnique(rights); return rights; } getAnyRightType(type) { return this.getAnyRight().filter(value => { return value instanceof type; }); } isRight(left, needle) { let right = this.oneMap.get(left); if (right != undefined) { return right.indexOf(needle) != -1; } return false; } getRight(left) { let right = this.oneMap.get(left); if (right != undefined) { return [].concat(...right); } return []; } getRightType(left, type) { return this.getRight(left).filter(right => { return right instanceof type; }); } getRightTypeOne(left, type) { let rights = this.getRightType(left, type); if (rights.length > 0) { return rights[0]; } } getRelationValue(left, right) { return this.valuesHash[Relation.createString(left, right)]; } unsetRight(right) { let left = this.manyMap.get(right); if (left != undefined) { let allRight = this.oneMap.get(left); allRight.splice(allRight.indexOf(right), 1); this.manyMap.delete(right); if (allRight.length == 0) { this.oneMap.delete(left); } let string = Relation.createString(left, right); if (string != undefined) { delete (this.valuesHash[string]); } } } unsetLeft(left) { let allRight = this.oneMap.get(left); if (allRight != undefined) { allRight.forEach((right) => { this.manyMap.delete(right); let string = Relation.createString(left, right); if (string != undefined) { delete (this.valuesHash[string]); } }); this.oneMap.delete(left); } } } class Thing { constructor(options) { this.properlyNamed = false; this.scenery = false; this.fixedInPlace = false; this.animated = false; this.visible = true; this.unique = false; this.shiny = false; this.setAlterations = []; this.getAlterations = []; this.clone = function () { throw new Error("Non-unique Objects can't be cloned."); }; options = options == undefined ? {} : options; if (options.properName != undefined) { this.name = options.properName; this.properlyNamed = true; } else if (options.name != undefined) { this.name = options.name; } else { this.name = this.constructor.name; } if (options.description != undefined) { if (options.description instanceof Say) { this.description = options.description; } else { this.description = new Say(options.description); } } if (options.unique) { Thing.storeUnique(this); this.unique = true; } else { Thing.storeNonUnique(this); this.cloneOptions = options; this.clone = (includeChanges) => { let cons = eval(this.constructor.name); let newThing = new cons(this.cloneOptions); if (includeChanges == undefined || includeChanges) { newThing.setChanges(this.getChanges()); } return newThing; }; } if (options.image != undefined) { if (options.image instanceof SayImage) { this.image = options.image; } else { this.image = new SayImage(options.image); } } this.shiny = options.shiny == true; this.addGetAlterations((thing) => { function getClosestRoom(currentRoom, rooms) { if (currentRoom instanceof RoomRandom && rooms.length > 0) { rooms.sort((a, b) => { if (!(a instanceof RoomRandom)) return -1; if (!(b instanceof RoomRandom)) return 1; let da = a.getDistanceTo(currentRoom); let db = b.getDistanceTo(currentRoom); return da - db; }); return { Location: rooms[0].getName() }; } } if (Thing.EnclosedRelation.getLeft(thing) == thing.getRoom() && thing.getRoom() != undefined) { if (thing.getRoom().fodder) { if (thing.isPlayer()) { let rooms = WorldState.getRememberedRoomsAsRooms(); let currentRoom = thing.getRoom(); return getClosestRoom(currentRoom, rooms); } else { let rooms = thing.getRoom().getConnectedRooms(); let currentRoom = thing.getRoom(); let foundRoom = getClosestRoom(currentRoom, rooms); if (foundRoom != undefined) { return foundRoom; } else { rooms = Region.InRelation.getLeft(thing.getRoom()).getRooms(); return getClosestRoom(currentRoom, rooms); } } } else { return { Location: thing.getRoom().getName() }; } } }); this.addSetAlterations((thing, changes) => { if (changes.Location != undefined) { let room = Room.getRoom(changes.Location); if (room != undefined) { room.place(thing); } else { console.error("Unable to place ", thing, " at room ", changes.Location); } } }); } addGetAlterations(newGet) { this.getAlterations.push(newGet); } addSetAlterations(newSet) { this.setAlterations.push(newSet); } getChanges() { let changes = {}; for (let i = 0; i < this.getAlterations.length; i++) { let change = this.getAlterations[i](this); for (let key in change) { changes[key] = change[key]; } } return changes; } setChanges(simpleAlterationObject) { for (let i = 0; i < this.setAlterations.length; i++) { this.setAlterations[i](this, simpleAlterationObject); } } getShiny() { return this.shiny; } setName(name) { this.name = name; } getName() { return this.name; } static storeNonUnique(thing) { if (Thing.things[thing.name] == undefined) { Thing.things[thing.name] = [thing]; } else { Thing.things[thing.name].push(thing); } } static getNonUnique(name) { return Thing.things[name] == undefined ? [] : Thing.things[name]; } static getOneThing(name) { let thing = Thing.getUnique(name); if (thing == undefined) { let things = Thing.getNonUnique(name); if (things.length > 0) { thing = things[0]; } } return thing; } static storeUnique(unique) { if (Thing.uniqueThings[unique.name] != undefined) { console.warn(unique.name, Thing.uniqueThings[unique.name], new Error("Unique Thing Already Exists")); } else { Thing.uniqueThings[unique.name] = unique; } } static getUnique(name) { return Thing.uniqueThings[name]; } static getUniques() { let things = []; for (let name in Thing.uniqueThings) { things.push(Thing.uniqueThings[name]); } return things; } getPrintedName() { return this.name; } getPrintedDescription() { if (this.description == undefined) { return new Say("You see nothing special about ", new SayThe(), this, "."); } else { return this.description; } } getPartOne() { return Thing.PartRelation.getLeft(this); } getCarryOne() { return Thing.CarryRelation.getLeft(this); } getWieldOne() { return Thing.WieldRelation.getLeft(this); } getWearOne() { return Thing.WearRelation.getLeft(this); } getEnclosedOne() { return Thing.EnclosedRelation.getLeft(this); } removeParts(partType) { let parts = this.getParts(partType); for (let i = 0; i < parts.length; i++) { Thing.PartRelation.unsetRight(parts[i]); } } getParts(partType) { if (partType != undefined) { return Thing.PartRelation.getRightType(this, partType); } return Thing.PartRelation.getRight(this); } getPartsByName(name) { let parts = this.getParts(); return parts.filter((part) => { return (part.getName() == name); }); } getPart(partType) { if (partType != undefined) { return Thing.PartRelation.getRightTypeOne(this, partType); } return Thing.PartRelation.getRight(this); } getHighestEnclosedOne() { return Thing.EnclosedRelation.getLastLeft(this); } getHighestEnclosedOneNotRoom() { let parent = Thing.EnclosedRelation.getLeft(this); if (parent != undefined) { let newParent = Thing.EnclosedRelation.getLeft(parent); while (newParent != undefined) { parent = newParent; newParent = Thing.EnclosedRelation.getLeft(parent); } return parent; } return this; } getRoom() { var partOf = Thing.EnclosedRelation.getLeft(this); if (partOf instanceof Room) { return partOf; } else if (partOf instanceof Thing) { return partOf.getRoom(); } } removeFromRoom() { this.getRoom().remove(this); } isVisibleTo(thing) { return (this.getRoom() == thing.getRoom() && this.visible); } isPlayer() { return false; } addParts(...parts) { parts.forEach(part => { Thing.PartRelation.setRelation(this, part); }); } isUnique() { return this.unique; } setCarried(thing) { Thing.CarryRelation.setRelation(this, thing); } setWorn(thing) { Thing.WearRelation.setRelation(this, thing); } setWielded(thing) { Thing.WieldRelation.setRelation(this, thing); } unsetCarried(thing) { if (Thing.EnclosedRelation.getAllRight(this).indexOf(thing) != -1) { Thing.EnclosedRelation.unsetRight(thing); this.getRoom().place(thing); } } destroy() { let relatedRight = Thing.EnclosedRelation.getAllRight(this); relatedRight.push(this); relatedRight.forEach(related => { Thing.EnclosedRelation.unset(related); }); } } Thing.uniqueThings = {}; Thing.things = {}; Thing.InsideRoomRelation = new RelationOneToMany(); Thing.PartRelation = new RelationOneToMany(); Thing.CarryRelation = new RelationOneToMany(); Thing.WieldRelation = new RelationOneToMany(); Thing.WearRelation = new RelationOneToMany(); Thing.EnclosedRelation = new RelationHandlerStrictOneToMany(Thing.InsideRoomRelation, Thing.PartRelation, Thing.CarryRelation, Thing.WieldRelation, Thing.WearRelation); class ActionTake extends Action { getCommandText() { return "take " + (this.getNoun(0) != undefined ? this.getNoun(0).getPrintedName() : ""); } } ActionTake.check = new Rulebook("Check Taking"); ActionTake.carry = new Rulebook("Carry out Taking"); ActionTake.defaultCarryTakingRule = new Rule({ name: "Taking - Add the thing to your inventory", code: (rulebook) => { let action = rulebook.noun; let actor = action.actor; let thing = action.getNoun(0); if (thing.getEnclosedOne() != undefined) { Thing.EnclosedRelation.unsetRight(thing); } else { thing.removeFromRoom(); } Thing.CarryRelation.setRelation(actor, action.getNoun(0)); if (actor == WorldState.player) { action.say.add(new SayBold(action.getNoun(0).getPrintedName() + ": "), "Taken."); } else { action.say.add(new SayThe(), actor, " takes ", new SayThe(undefined, true), action.getNoun(0), "."); } } }); ActionTake.check.addRule(new Rule({ name: "Check Taking - Who has it, really?", priority: Rule.PRIORITY_HIGHEST, code: (rulebook) => { let action = rulebook.noun; let actor = action.actor; let thing = action.getNoun(0); let owner = thing.getEnclosedOne(); if (owner == actor) { if (owner == WorldState.player) { action.say.add("You already have it."); } return false; } } })); ActionTake.check.addRule(new Rule({ name: "Check Taking - Donut steal", code: (rulebook) => { let action = rulebook.noun; let actor = action.actor; let thing = action.getNoun(0); let owner = thing.getEnclosedOne(); if (owner != undefined && owner.animated) { if (actor == WorldState.player) { action.say.add(owner.getPrintedName() + " wouldn't like that."); } return false; } } })); ActionTake.check.addRule(new Rule({ name: "Check Taking - Can't take fixed in place", code: (rulebook) => { let action = rulebook.noun; let actor = action.actor; let thing = action.getNoun(0); if (thing.fixedInPlace) { if (actor == WorldState.player) { action.say.add("You can't take that."); } return false; } } })); ActionTake.carry.addRule(ActionTake.defaultCarryTakingRule); Elements.HyperlinkHandler.HyperlinkingRulebook.addRule(new Rule({ name: "Hyperlink - Take", firstPriority: Rule.PRIORITY_HIGHEST, code: (rulebook) => { let thing = rulebook.noun; if (!thing.animated && !thing.fixedInPlace && thing.getRoom() == WorldState.player.getRoom() && thing.getEnclosedOne() instanceof Room) { Elements.HyperlinkHandler.addAvailableAction("Take", new ActionTake(WorldState.player, thing)); } } })); class ActionGo extends Action { constructor(actor, ...nouns) { super(actor, ...nouns); this.originalTarget = nouns[0]; this.requiresNoun = false; this.requiresVisibility = false; } getCommandText() { let name; if (typeof this.originalTarget == "number") { name = DirectionNames[Direction[this.originalTarget]]; } else if (this.originalTarget instanceof Room) { name = "to " + this.originalTarget.getPrintedName(); } return "go " + name; } } ActionGo.check = new Rulebook("Check Going"); ActionGo.carry = new Rulebook("Carry out Going"); ActionGo.ruleCheckRestoreOriginalNoun = ActionGo.check.createAndAddRule({ firstPriority: Rule.PRIORITY_HIGHEST, priority: Rule.PRIORITY_HIGHEST, name: "Check Going - Restore original noun", code: (rulebook) => { let action = rulebook.noun; action.setNoun(0, action.originalTarget); } }); ActionGo.ruleCheckIsthereactor = ActionGo.check.createAndAddRule({ firstPriority: Rule.PRIORITY_HIGHEST, priority: Rule.PRIORITY_HIGHEST, name: "Check Going - Is there an actor?", code: (rulebook) => { let action = rulebook.noun; if (action.actor == undefined) { return false; } } }); ActionGo.ruleCheckConvertRoomToDirection = ActionGo.check.createAndAddRule({ firstPriority: Rule.PRIORITY_HIGHEST, priority: Rule.PRIORITY_HIGH, name: "Change Room to Direction", code: (rulebook) => { let action = rulebook.noun; if (action.getNoun(0) instanceof RoomRandom) { let actor = action.actor; let cRoom = actor.getRoom(); if (cRoom instanceof RoomRandom) { let dRoom = action.getNoun(0); if (cRoom == dRoom) { if (actor.isPlayer()) { action.say.add("You are already there!"); } return false; } let code; if (actor == WorldState.player) { code = (room) => { return WorldState.isRoomRemembered(room); }; } let direction = cRoom.getAStarBestDirectionTo(dRoom, code); if (direction == undefined) { if (actor.isPlayer()) { action.say.add("You don't remember how to get there."); } return false; } else { action.setNoun(0, direction); } } } } }); ActionGo.ruleCheckIstheredirectionandroom = ActionGo.check.createAndAddRule({ name: "Check Going - is there a direction? Does it lead anywhere?", code: (rulebook) => { let action = rulebook.noun; let cRoom = action.actor.getRoom(); if (cRoom == undefined) { return false; } let direction = action.getNoun(0); if (direction == undefined) { return false; } let nextRoom = cRoom.connections[direction]; if (nextRoom == undefined) { return false; } action.roomGoneFrom = action.actor.getRoom(); action.roomGoneTo = nextRoom; } }); ActionGo.ruleCarryMove = ActionGo.carry.createAndAddRule({ name: "Going - Move Actor to Next Room", code: (rulebook) => { let action = rulebook.noun; let roomGoneFrom = action.actor.getRoom(); let direction = action.getNoun(0); let roomGoneInto = roomGoneFrom.connections[direction]; roomGoneInto.place(action.actor); let actor = action.actor; if (actor == WorldState.player) { action.say.add("You go " + DirectionNames[Direction[direction]].toLowerCase() + "."); } else { if (roomGoneFrom == WorldState.player.getRoom()) { action.say.add(new SayThe(), actor, " goes " + DirectionNames[Direction[direction]].toLowerCase() + "."); } else { let oppositeName = DirectionNames[OppositeDirection[direction]]; action.say.add(new SayThe(), actor, " arrives from the " + oppositeName.toLowerCase() + "."); } } } }); ActionGo.ruleCarryRememberRooms = ActionGo.carry.createAndAddRule({ name: "Going - Remember the involved rooms", code: (rulebook) => { let action = rulebook.noun; let actor = action.actor; let roomGoneInto = action.actor.getRoom(); let direction = action.getNoun(0); let roomGoneFrom = roomGoneInto.connections[OppositeDirection[Direction[direction]]]; if (actor.isPlayer()) { WorldState.rememberRoom(roomGoneFrom, roomGoneInto); } } }); var Elements; (function (Elements) { var RoomHandler; (function (RoomHandler) { RoomHandler.currentRoomTab = document.getElementById("currentRoomTab"); RoomHandler.currentRoomDescription = document.getElementById("roomDescription"); RoomHandler.currentRoomExits = document.getElementById("roomExits"); RoomHandler.currentRoomName = document.createTextNode(""); document.getElementById("roomName").appendChild(RoomHandler.currentRoomName); function linkObjects() { let objs = RoomHandler.currentRoomTab.getElementsByClassName("roomObject"); for (let i = 0; i < objs.length; i++) { let linkKeyCode = Controls.KeyHandler.getFirstKeyCode(); Controls.KeyHandler.applyCode(objs[i], linkKeyCode); } } RoomHandler.linkObjects = linkObjects; function emptyRoom() { while (RoomHandler.currentRoomDescription.firstChild) { RoomHandler.currentRoomDescription.removeChild(RoomHandler.currentRoomDescription.firstChild); } while (RoomHandler.currentRoomExits.firstChild) { RoomHandler.currentRoomExits.removeChild(RoomHandler.currentRoomExits.firstChild); } RoomHandler.currentRoomName.nodeValue = ""; } RoomHandler.emptyRoom = emptyRoom; async function updateRoom() { emptyRoom(); let room = WorldState.player.getRoom(); if (room != undefined) { RoomHandler.currentRoomName.nodeValue = room.getPrintedName(); let description = room.description.getHTML("p", ["roomDescription"]); await description.then(value => { for (let i = 0, p = value[i]; p != undefined; p = value[++i]) { RoomHandler.currentRoomDescription.appendChild(p); } }); let things = room.getContainedAndVisible(); if (things.length > 0) { let thingList = document.createElement("p"); thingList.classList.add("roomDescription"); await RoomHandler.PrintingVisibleThingsRulebook.execute({ noun: { things: things, container: thingList } }); RoomHandler.currentRoomDescription.appendChild(thingList); } for (let index = 0, value = room.connections[index]; index < room.connections.length; value = room.connections[++index]) { if (value != undefined) { let p = document.createElement("p"); p.classList.add("roomExit"); let link = document.createElement("a"); link.classList.add("roomDirection"); link.appendChild(document.createTextNode(DirectionNames[Direction[index]])); Controls.Links.makeLink(link, new ActionGo(WorldState.player, index)); Controls.KeyHandler.applyCode(link, Controls.KeyHandler.getDirectionCodeByIndex(index)); p.appendChild(link); let directionResult = ": "; if (WorldState.isRoomRemembered(value)) { directionResult += value.getPrintedName(); } else { directionResult += "A new place"; } p.appendChild(document.createTextNode(directionResult)); RoomHandler.currentRoomExits.appendChild(p); } } } } RoomHandler.updateRoom = updateRoom; RoomHandler.PrintingVisibleThingsRulebook = new Rulebook("Printing the name of visible things in a room"); RoomHandler.PrintIntroToVisibleThingsRule = new Rule({ name: "Print \"You can see\" text", firstPriority: Rule.PRIORITY_HIGH, code: (rulebook) => { let noun = rulebook.noun; noun.container.appendChild(document.createTextNode("You can see ")); } }); RoomHandler.PrintingVisibleThingsRulebook.addRule(RoomHandler.PrintIntroToVisibleThingsRule); RoomHandler.PrintVisibleThingsRule = new Rule({ name: "Print all visible things", code: async (rulebook) => { let noun = rulebook.noun; for (let i = 0; i < noun.things.length; i++) { let value = noun.things[i]; let link = document.createElement("a"); link.classList.add("roomObject"); let say; if (value instanceof Thing && value.unique) { say = new Say(new SayThe(false), value); } else { say = new Say(new SayAn(false), value); } await say.getPureElements().then(value2 => { for (let i = 0, element = value2[i]; element != undefined; element = value2[++i]) { link.appendChild(element); } }); Controls.Links.makeLink(link, new ActionExamine(WorldState.player, value)); Controls.KeyHandler.applyCode(link, Controls.KeyHandler.getFirstKeyCode()); noun.container.appendChild(link); if ((i + 1) < noun.things.length) { noun.container.appendChild(document.createTextNode(", ")); } } } }); RoomHandler.PrintingVisibleThingsRulebook.addRule(RoomHandler.PrintVisibleThingsRule); RoomHandler.PrintOutroToVisibleThingsRule = new Rule({ name: "Print \"... here\" text", firstPriority: Rule.PRIORITY_LOW, code: (rulebook) => { let noun = rulebook.noun; noun.container.appendChild(document.createTextNode(" here.")); } }); RoomHandler.PrintingVisibleThingsRulebook.addRule(RoomHandler.PrintOutroToVisibleThingsRule); })(RoomHandler = Elements.RoomHandler || (Elements.RoomHandler = {})); })(Elements || (Elements = {})); class CoinPouch extends Thing { constructor(options) { super(options); this.coins = 0; this.addGetAlterations((purse) => { return { coins: purse.getCoins() }; }); this.addSetAlterations((purse, changeObj) => { purse.coins = (changeObj.coins); }); } addCoins(coins) { this.coins += coins; } removeCoins(coins) { this.coins -= coins; } getCoins() { return this.coins; } getShiny() { return this.coins > 0; } } CoinPouch.carryOutTakingCoinPouches = new Rule({ name: "Carry out taking coin pouches", firstPriority: ActionTake.defaultCarryTakingRule.firstPriority, priority: ActionTake.defaultCarryTakingRule.priority + 1, code: async (rulebook) => { let action = rulebook.noun; let actor = action.actor; let thing = action.getNoun(0); let actorPouches = Thing.CarryRelation.getRightType(actor, CoinPouch); if (actorPouches.length > 0) { let thingCoins = thing.getCoins(); if (thingCoins > 0) { rulebook.skipRule(ActionTake.defaultCarryTakingRule); actorPouches[0].addCoins(thingCoins); thing.removeCoins(thing.getCoins()); if (actor == WorldState.player) { action.say.add("You empty ", new SayThe(), thing, " into your ", actorPouches[0], ". Your ", actorPouches[0], " now has " + actorPouches[0].getCoins().toString() + " coins."); } else { action.say.add(new SayThe(), actor, " empties ", new SayThe(), thing, " into ", Say.hisHersIts(actor), actorPouches[0], "."); } } else { let myCoins = actorPouches[0].getCoins(); actorPouches[0].removeCoins(myCoins); thing.addCoins(myCoins); if (actor == WorldState.player) { action.say.add("You empty your ", actorPouches[0], " into ", new SayThe(), thing, ".", Say.PARAGRAPH_BREAK); } let drop = new ActionDrop(actor, actorPouches[0]); await drop.execute(); if (Thing.EnclosedRelation.getLeft(actorPouches[0]) == actor) { if (actor == WorldState.player) { action.say.add("You can't get rid of your ", actorPouches[0], "!"); } return false; } } } }, conditions: (rulebook) => { return (rulebook.noun.getNoun(0) instanceof CoinPouch); } }); ActionTake.carry.addRule(CoinPouch.carryOutTakingCoinPouches); Say.afterPrinting.addRule(new Rule({ name: "Include contents of Coin Pouch while Printing Visible Things in a Room", code: (rulebook) => { let say = rulebook.noun; let pouch = say.currentNoun; say.currentNounElements.push(document.createTextNode(" with " + pouch.getCoins().toString() + " coins")); }, conditions: (rulebook) => { return Elements.RoomHandler.PrintingVisibleThingsRulebook.isRunning() && rulebook.noun.currentNoun instanceof CoinPouch && rulebook.noun.currentNoun.getCoins() > 0; } })); ActionExamine.carry.addRule(new Rule({ name: "Print description of coins in Coin Pouch", firstPriority: ActionExamine.PrintDescriptionOfExaminedThingRule.firstPriority, priority: ActionExamine.PrintDescriptionOfExaminedThingRule.priority - 1, code: (rulebook) => { let action = rulebook.noun; let thing = action.getNoun(0); if (thing.getCoins() > 0) { action.say.add(" There are " + thing.getCoins().toString() + " coins in it."); } else { action.say.add(" There are no coins in it."); } }, conditions: (rulebook) => { return (rulebook.noun.getNoun(0) instanceof CoinPouch); } })); var Elements; (function (Elements) { var InventoryHandler; (function (InventoryHandler) { var container = document.getElementById("inventoryTarget"); function empty() { while (container.firstChild) { container.removeChild(container.firstChild); } } function printHeader(header) { let p = document.createElement("p"); p.classList.add("inventoryHeader"); p.appendChild(document.createTextNode(header + ":")); container.appendChild(p); } let currentRow; InventoryHandler.LinkingThing = new Rulebook("Inventory - Links for a Thing"); function printThingLink(shortcut, action) { let nameLink = document.createElement("div"); nameLink.classList.add("inventoryLink"); nameLink.appendChild(document.createTextNode(shortcut)); currentRow.appendChild(nameLink); Controls.Links.makeLink(nameLink, action); } InventoryHandler.printThingLink = printThingLink; async function printThing(thing) { currentRow = document.createElement("div"); currentRow.classList.add("inventoryRow"); let nameLink = document.createElement("div"); nameLink.classList.add("inventoryLink", "name"); nameLink.appendChild(document.createTextNode(thing.getPrintedName())); currentRow.appendChild(nameLink); Controls.Links.makeLink(nameLink, new ActionExamine(WorldState.player, thing)); await InventoryHandler.LinkingThing.execute({ noun: thing }); container.appendChild(currentRow); } function thingSort(a, b) { let na = a.getPrintedName().toLowerCase(); let nb = b.getPrintedName().toLowerCase(); if (na < nb) return -1; if (na > nb) return 1; return 0; } InventoryHandler.thingSort = thingSort; async function updateInventory() { let player = WorldState.player; empty(); let wielded = Thing.WieldRelation.getRight(player).sort(thingSort); let worn = Thing.WearRelation.getRight(player).sort(thingSort); let carried = Thing.CarryRelation.getRight(player).sort(thingSort); if (wielded.length > 0) { printHeader("Wielded"); for (let i = 0; i < wielded.length; i++) { await printThing(wielded[i]); } } if (worn.length > 0) { printHeader("Worn"); for (let i = 0; i < worn.length; i++) { await printThing(worn[i]); } } if (carried.length > 0) { printHeader("Carried"); for (let i = 0; i < carried.length; i++) { await printThing(carried[i]); } } let pouch = Thing.CarryRelation.getRightType(WorldState.player, CoinPouch); if (pouch.length > 0) { let p = document.createElement("p"); p.classList.add("inventoryGold"); let s; if (pouch[0].getCoins() > 0) { s = new Say("There are " + pouch[0].getCoins().toString() + " coins in your ", pouch[0], "."); } else { s = new Say("There are no coins in your ", pouch[0], "."); } await s.getPureElements().then(elements => { elements.forEach(element => { p.appendChild(element); }); }); container.appendChild(p); } } InventoryHandler.updateInventory = updateInventory; })(InventoryHandler = Elements.InventoryHandler || (Elements.InventoryHandler = {})); })(Elements || (Elements = {})); class ActionRetrace extends Action { constructor(actor, ...nouns) { super(actor, ...nouns); this.requiresNoun = false; this.requiresVisibility = false; this.requiresTurn = false; } getCommandText() { let name; if (typeof this.getNoun(0) == "number") { name = DirectionNames[Direction[this.getNoun(0)]]; } else if (this.getNoun(0) instanceof Room) { name = this.getNoun(0).getPrintedName(); } return "think about how to get to " + name; } } ActionRetrace.check = new Rulebook("Check Retracing"); ActionRetrace.carry = new Rulebook("Carry out Retracing"); ActionRetrace.check.addRule(new Rule({ firstPriority: Rule.PRIORITY_HIGHEST, priority: Rule.PRIORITY_HIGH, name: "Change Room to Direction", code: (rulebook) => { let action = rulebook.noun; if (action.getNoun(0) instanceof Room) { let actor = action.actor; let cRoom = actor.getRoom(); if (cRoom == undefined) { return false; } let dRoom = action.getNoun(0); if (cRoom == dRoom) { if (actor.isPlayer()) { action.say.add("You are already there!"); } return false; } let code; if (actor == WorldState.player) { code = (room) => { return WorldState.isRoomRemembered(room); }; } let direction = cRoom.bestDirectionTo(dRoom, code); if (direction == undefined) { if (actor.isPlayer()) { action.say.add("You don't remember how to get there."); } return false; } else { action.setNoun(0, direction); } } } })); ActionRetrace.carry.addRule(new Rule({ name: "Retracing - Find Direction", code: (rulebook) => { let action = rulebook.noun; action.say.add("To get there, you should go " + DirectionNames[Direction[action.getNoun(0)]] + "."); } })); var Elements; (function (Elements) { var RememberedHandler; (function (RememberedHandler) { var mapTarget = document.getElementById("mapTarget"); var lastMap; var elements; function empty() { elements = {}; lastMap = undefined; while (mapTarget.firstChild) { mapTarget.removeChild(mapTarget.firstChild); } } RememberedHandler.empty = empty; async function updateMap() { console.debug(Rulebook.getIndentation() + "[MAP] Creating Map"); let regions = Region.InRelation.getAllLeftType(WorldState.player.getRoom(), RegionRandom); let biggestRegion = regions[regions.length - 1]; if (biggestRegion == undefined) { empty(); return; } if (biggestRegion.map != lastMap) { empty(); } else { await updateOldMap(); return; } let map = biggestRegion.map; lastMap = map; map.updateAllLimits(); for (let y = map.highestY; y >= map.lowestY; y--) { let row = document.createElement("div"); row.classList.add("mapRow"); for (let x = map.lowestX; x <= map.highestX; x++) { let room = map.getRoom(x, y); let roomNode = new RoomNode(room); await roomNode.createRoomNameFloater(); let roomDiv = roomNode.getElement(); row.appendChild(roomDiv); elements[x.toString() + ";" + y.toString()] = roomNode; } mapTarget.appendChild(row); } await updateOldMap(); } RememberedHandler.updateMap = updateMap; async function updateOldMap() { let map = lastMap; for (let y = map.highestY; y >= map.lowestY; y--) { for (let x = map.lowestX; x <= map.highestX; x++) { await elements[x.toString() + ";" + y.toString()].update(); } } } RememberedHandler.updateOldMap = updateOldMap; })(RememberedHandler = Elements.RememberedHandler || (Elements.RememberedHandler = {})); })(Elements || (Elements = {})); var Debug; (function (Debug) { function knowdewae() { let map = new MapNote({ name: "De Wae", description: "This map shows de wae all de wae to Zimbabwe." }); map.addRoom(...Region.RegionRoom.getAnyRightType(RoomRandom)); WorldState.player.setCarried(map); } Debug.knowdewae = knowdewae; function hurt(target, amount) { let bp; if (target instanceof Person) { bp = target.getPart(HumanoidTorso); if (bp == undefined) return; } else if (target instanceof Bodypart) { bp = target; } bp.changeSoreness(amount); } Debug.hurt = hurt; function goTo(str) { } Debug.goTo = goTo; })(Debug || (Debug = {})); class AI { constructor(options) { this.wanderer = true; this.wanderChance = 50; this.picksShinies = true; this.extraRules = []; this.extraCombatRules = []; for (let key in options) { this[key] = options[key]; } } async execute(actor) { let promise; if (promise != undefined) { promise = AI.combatRules.execute({ noun: actor }, ...this.extraCombatRules); } else { promise = AI.rules.execute({ noun: actor }, ...this.extraRules); } let result = await promise; return result; } addRulesBook(...books) { this.extraRules.push(...books); arrayUnique(this.extraRules); } addCombatRulesBook(...books) { this.extraCombatRules.push(...books); arrayUnique(this.extraCombatRules); } } AI.rules = new Rulebook("Default AI Rules"); AI.combatRules = new Rulebook("Default AI Combat Rules"); var AIRules; (function (AIRules) { AIRules.PRIORITY_ACTING_ON_SITUATION = 5; AIRules.PRIORITY_ACTING_ON_PLACE = 3; AIRules.PRIORITY_ACTING_ON_IDLE = 1; })(AIRules || (AIRules = {})); class PersonStat { constructor(id, description) { this.defaultValue = 0; this.maxValue = 10; this.id = id; this.description = description == undefined ? "Not defined" : description; } getDescription(value) { if (typeof this.description == "string" || this.description instanceof Say) { return this.description; } else { return this.description(value); } } } class Attribute extends PersonStat { constructor(id, description, defValue, maxValue) { super(id, description); this.defaultValue = 2; this.maxValue = 5; if (defValue != undefined) { this.defaultValue = defValue; } if (maxValue != undefined) { this.maxValue = maxValue; } Attribute.Attributes[id] = this; } static getAttributes() { let attributes = []; for (let key in Attribute.Attributes) { attributes.push(Attribute.Attributes[key]); } return attributes; } static getAttribute(id) { return Attribute.Attributes[id]; } } Attribute.Attributes = {}; var Attributes; (function (Attributes) { Attributes.Strength = new Attribute("Strength", value => { switch (value) { case 5: return "Hercules' Bigger Cousin"; case 4: return ("Circus Strong" + (WorldState.player.isMale() ? "man" : "woman")); case 3: return "Beach Bully"; case 2: return ("Average " + (WorldState.player.isMale() ? "Joe" : "Jane")); case 1: return "Wet Noodle"; default: return "Out of bounds."; } }); Attributes.Agility = new Attribute("Agility", value => { switch (value) { case 5: return "Catlike"; case 4: return "Gymnast"; case 3: return "Accurate"; case 2: return "Common"; case 1: return "Accident-prone"; default: return "Out of bounds."; } }); Attributes.Intelligence = new Attribute("Intelligence", value => { switch (value) { case 5: return "Genius"; case 4: return "Gifted"; case 3: return "Knowledgeable"; case 2: return "Normal"; case 1: return "Door"; default: return "Out of bounds."; } }); Attributes.Charm = new Attribute("Charm", value => { switch (value) { case 5: return (WorldState.player.isMale() ? "Casanova" : "Seductress"); case 4: return "Diplomat"; case 3: return ("Cheery Sales" + (WorldState.player.isMale() ? "man" : "woman")); case 2: return "Not even trying"; case 1: return "Unpleasant"; default: return "Out of bounds."; } }); Attributes.Corruption = new Attribute("Corruption", value => { return "Not defined"; }, 0, 100); Attributes.GenderIdentity = new Attribute("Gender Identity", value => { if (value >= 75) { return "You strongly feel, and act, like a woman."; } else if (value >= 60) { return "You feel, and act, like a woman."; } else if (value >= 40) { return "You don't feel nor act like any particular gender."; } else if (value >= 20) { return "You feel, and act, like a man."; } else { return "You strongly feel, and act, like a man."; } }, 50, 100); Attributes.Degeneration = new Attribute("Degeneration", value => { if (value >= 75) { return "Sex is about the only thing on your mind, and you don't even try to hide it anymore."; } else if (value >= 60) { return "Sometimes you can't hide how naughty you'd like to be."; } else if (value >= 40) { return ""; } else if (value >= 20) { return "Your composure is prudish and calm."; } else { return "You have the composure of a saint."; } }, 30, 100); })(Attributes || (Attributes = {})); class Skill extends PersonStat { constructor(id, description) { super(id, description); this.defaultValue = 0; this.maxValue = 5; Skill.Skills[id] = this; } static getSkills() { let skills = []; for (let key in Skill.Skills) { skills.push(Skill.Skills[key]); } skills.sort((a, b) => { let na = a.id.toUpperCase(); let nb = b.id.toUpperCase(); if (na > nb) return 1; if (na < nb) return -1; return 0; }); return skills; } static getSkill(id) { return Skill.Skills[id]; } } Skill.Skills = {}; var Skills; (function (Skills) { Skills.Survival = new Skill("Survival", (value) => { switch (value) { case 5: return ""; case 4: return ""; case 3: return ""; case 2: return ""; case 1: return "Alert Chihuahua"; } }); })(Skills || (Skills = {})); class Container extends Thing { put(...things) { } } class Corpse extends Container { } class Person extends Thing { constructor(options) { super(options); this.AI = new AI({}); this.animated = true; this.soreness = 0; this.lastHealthUpdate = 0; this.stamina = 10; this.lastStaminaUpdate = 0; this.staminaPerTurn = 1; this.attributeValue = {}; this.skillValue = {}; this.addGetAlterations((person) => { if (person.isPlayer()) { return { Stats: this.attributeValue, Skills: this.skillValue }; } }); this.addSetAlterations((person, changes) => { if (person.isPlayer()) { if (changes.Stats != undefined) { for (let name in changes.Stats) { let attr = Attribute.getAttribute(name); if (attr != undefined) { this.setStat(attr, changes.Stats[name]); } } } if (changes.Skills != undefined) { for (let name in changes.Skills) { let attr = Skill.getSkill(name); if (attr != undefined) { this.setSkill(attr, changes.Skills[name]); } } } } }); } changeHealth(n) { let bodyparts = this.getParts(Bodypart); for (let i = 0; i < bodyparts.length; i++) { bodyparts[i].changeSoreness(n); } this.updateHealth(); } getHealthOnScale() { return Math.round(((this.getHealth() * 10) / (this.getStat(Attributes.Strength) * 2))); } getHealth(important) { if (important === true || this.lastHealthUpdate != WorldState.getCurrentTurn()) { this.updateHealth(); } return this.soreness / (this.getStat(Attributes.Strength) * Person.STRENGTH_SORENESS_MULTIPLIER); } updateHealth() { let health = 0; let bodyparts = this.getParts(Bodypart); for (let i = 0; i < bodyparts.length; i++) { health += bodyparts[i].getWeightedSoreness(); } this.soreness = health; this.lastHealthUpdate = WorldState.getCurrentTurn(); } changeStamina(n) { this.updateStamina(); this.stamina += n; if (this.stamina > Person.MAX_STAMINA) { this.stamina = Person.MAX_STAMINA; } else if (this.stamina < 0) { this.stamina = 0; } } getStaminaOnScale() { return Math.round(((this.stamina * 10) / Person.MAX_STAMINA)); } updateStamina() { var nTurns = WorldState.getCurrentTurn() - this.lastStaminaUpdate; this.stamina += this.staminaPerTurn * nTurns; if (this.stamina > Person.MAX_STAMINA) { this.stamina = Person.MAX_STAMINA; } } isPlayer() { return this == WorldState.player; } getStat(stat) { if (this.attributeValue[stat.id] == undefined) { this.attributeValue[stat.id] = stat.defaultValue; } return this.attributeValue[stat.id]; } setStat(stat, value) { this.attributeValue[stat.id] = value; } getSkill(stat) { if (this.skillValue[stat.id] == undefined) { this.skillValue[stat.id] = stat.defaultValue; } return this.skillValue[stat.id]; } setSkill(stat, value) { this.skillValue[stat.id] = value; } die() { let corpse = new Corpse({ name: this.name + "'s corpse", unique: false, description: new Say("The lifeless body of ", this, ". May ", new SayHeSheIt(this), " rest in peace.") }); corpse.put(...Thing.CarryRelation.getRight(this)); corpse.put(...Thing.WearRelation.getRight(this)); this.getRoom().place(corpse); OutOfPlay.removeFromPlay(this); } } Person.MAX_STAMINA = 10; Person.STRENGTH_SORENESS_MULTIPLIER = 4; var EveryTurn; (function (EveryTurn_1) { EveryTurn_1.EveryTurn = new Rulebook("Every Turn"); EveryTurn_1.RunAIRule = EveryTurn_1.EveryTurn.createAndAddRule({ name: "Run NPC AI Rule", code: async function () { function isAIAvailable(person) { return (person != WorldState.player && ((person.getRoom() instanceof RoomRandom && person.getRoom().placed))); } let people = Thing.InsideRoomRelation.getAnyRightType(Person).filter(isAIAvailable); for (let i = 0; i < people.length; i++) { let action = await people[i].AI.execute(people[i]); let person = people[i]; let visible = people[i].isVisibleTo(WorldState.player); if (action != undefined) { let printValue = await action.execute(); if ((visible || person.isVisibleTo(WorldState.player)) && printValue != undefined) { Elements.CurrentTurnHandler.printAsContent(printValue); } } } } }); EveryTurn_1.incrementTurnCounterRule = EveryTurn_1.EveryTurn.createAndAddRule({ firstPriority: Rule.PRIORITY_LOWEST, priority: Rule.PRIORITY_LOWEST, name: "Increment Turn Counter", code: function () { WorldState.incrementWorldTurn(); } }); })(EveryTurn || (EveryTurn = {})); var Direction; (function (Direction) { Direction[Direction["NORTH"] = 0] = "NORTH"; Direction[Direction["NORTHEAST"] = 1] = "NORTHEAST"; Direction[Direction["EAST"] = 2] = "EAST"; Direction[Direction["SOUTHEAST"] = 3] = "SOUTHEAST"; Direction[Direction["SOUTH"] = 4] = "SOUTH"; Direction[Direction["SOUTHWEST"] = 5] = "SOUTHWEST"; Direction[Direction["WEST"] = 6] = "WEST"; Direction[Direction["NORTHWEST"] = 7] = "NORTHWEST"; Direction[Direction["UP"] = 8] = "UP"; Direction[Direction["DOWN"] = 9] = "DOWN"; })(Direction || (Direction = {})); var DirectionNames = (() => { let names; (function (names) { names["NORTH"] = "North"; names["SOUTH"] = "South"; names["EAST"] = "East"; names["WEST"] = "West"; names["SOUTHEAST"] = "Southeast"; names["NORTHWEST"] = "Northwest"; names["SOUTHWEST"] = "Southwest"; names["NORTHEAST"] = "Northeast"; names["UP"] = "Down"; names["DOWN"] = "Up"; })(names || (names = {})); ; let obj = {}; for (let name in names) { obj[name] = names[name]; obj[Direction[name]] = names[name]; } return obj; })(); var OppositeDirection = (() => { let obj = {}; obj[Direction.NORTH] = Direction.SOUTH; obj[Direction.SOUTH] = Direction.NORTH; obj[Direction.EAST] = Direction.WEST; obj[Direction.WEST] = Direction.EAST; obj[Direction.SOUTHEAST] = Direction.NORTHWEST; obj[Direction.NORTHWEST] = Direction.SOUTHEAST; obj[Direction.SOUTHWEST] = Direction.NORTHEAST; obj[Direction.NORTHEAST] = Direction.SOUTHWEST; obj[Direction.UP] = Direction.DOWN; obj[Direction.DOWN] = Direction.UP; for (let i = 0; i < Object.keys(Direction).length / 2; i++) { obj[Direction[i]] = obj[i]; } return obj; })(); class Room { constructor(id, fodder) { this.description = new Say(); this.name = id == undefined ? "Room" : id; this.connections = new Array(Room.DIRECTIONS.length); this.fodder = fodder; if (fodder != true) { Room.addRoom(this); } } getName() { return this.name; } place(thing) { Thing.InsideRoomRelation.setRelation(this, thing); } remove(thing) { if (Thing.InsideRoomRelation.getLeft(thing) == this) { Thing.InsideRoomRelation.unsetRight(thing); } } getContained() { return Thing.InsideRoomRelation.getRight(this); } getContainedAndVisibleTo(observer) { let contained = this.getContained(); let result = []; contained.forEach((value) => { if (value.visible && value !== observer) { result.push(value); } }); return result; } getContainedAndVisible() { return this.getContainedAndVisibleTo(WorldState.player); } mapRoom(r, direction) { let oppositeDirection = OppositeDirection[direction]; if (this.connections[direction] != undefined) { console.warn("Replacing a connected room.", this, " connected through ", direction, " to ", this.connections[direction]); this.connections[direction].unmapRoom(oppositeDirection); } this.connections[direction] = r; if (r.connections[oppositeDirection] != undefined) { console.warn("Replacing a connected room.", r, " connected through ", oppositeDirection, " to ", r.connections[oppositeDirection]); r.unmapRoom(oppositeDirection); } r.connections[oppositeDirection] = this; } unmapRoom(direction) { if (this.connections[direction] != undefined) { let r = this.connections[direction]; this.connections[direction] = undefined; r.unmapRoom(OppositeDirection[direction]); } } getPrintedName() { return this.name; } getConnectedRooms() { let rooms = []; this.connections.forEach(room => { if (room != undefined) { rooms.push(room); } }); return rooms; } bestDirectionTo(room, validityCode) { if (validityCode == undefined) validityCode = () => { return true; }; let maxSteps = 10; maxSteps = maxSteps > WorldState.getMaximumRememberedRooms() ? maxSteps : WorldState.getMaximumRememberedRooms(); let recursiveBestPath = (cPath, cRoom, destination) => { if (!validityCode(cRoom)) { return; } if (cRoom == destination) { maxSteps = maxSteps > cPath.length ? cPath.length : maxSteps; return cPath; } else if (cPath.length > maxSteps) { return undefined; } else { let paths = []; for (let index in Room.DIRECTIONS) { let direction = Room.DIRECTIONS[index]; let nextRoom = cRoom.connections[direction]; if (nextRoom != undefined && cPath.indexOf(nextRoom) == -1 && validityCode(nextRoom)) { let path = recursiveBestPath(cPath.concat([nextRoom]), nextRoom, destination); if (path != undefined) { paths.push(path); } } } let shortestIndex = 0; paths.forEach((value, index, array) => { if (value.length < paths[shortestIndex].length) { shortestIndex = index; } }); return paths[shortestIndex]; } }; let paths = Array(Room.DIRECTIONS.length); let shortestIndex; for (let index in Room.DIRECTIONS) { let direction = Room.DIRECTIONS[index]; let nextRoom = this.connections[direction]; if (nextRoom != undefined) { paths[direction] = recursiveBestPath([this, nextRoom], nextRoom, room); if (paths[direction] != undefined && (shortestIndex == undefined || paths[shortestIndex].length > paths[direction].length)) { shortestIndex = direction; } } } return shortestIndex; } static getDirectionXYZ(direction) { var y = 0; if ([Direction.NORTH, Direction.NORTHEAST, Direction.NORTHWEST].indexOf(direction) != -1) { y = 1; } else if ([Direction.SOUTH, Direction.SOUTHEAST, Direction.SOUTHWEST].indexOf(direction) != -1) { y = -1; } var x = 0; if ([Direction.EAST, Direction.SOUTHEAST, Direction.NORTHEAST].indexOf(direction) != -1) { x = 1; } else if ([Direction.WEST, Direction.SOUTHWEST, Direction.NORTHWEST].indexOf(direction) != -1) { x = -1; } var z = direction == Direction.UP ? 1 : direction == Direction.DOWN ? -1 : 0; return [x, y, z]; } static shift(coordinates, direction) { let coordinatesVector = Room.getDirectionXYZ(direction); coordinates.forEach((value, index, array) => { coordinatesVector[index] += coordinates[index]; }); return coordinatesVector; } static addRoom(room) { Room.rooms[room.name] = room; } static getRooms() { let rooms = []; for (let name in Room.rooms) { rooms.push(Room.rooms[name]); } return rooms; } static getRoom(id) { return Room.rooms[id]; } } Room.DIRECTIONS = (() => { let directions = []; for (let i = 0; i < Object.keys(Direction).length / 2; i++) { directions.push(i); } return directions; })(); Room.rooms = {}; var OutOfPlay; (function (OutOfPlay) { OutOfPlay.Heaven = new Room("__Heaven__RIP__"); function removeFromPlay(thing) { OutOfPlay.Heaven.place(thing); } OutOfPlay.removeFromPlay = removeFromPlay; })(OutOfPlay || (OutOfPlay = {})); var PlayBegins; (function (PlayBegins) { PlayBegins.rulebook = new Rulebook("Play Begins"); PlayBegins.LOAD_FAILED = false; let startingRoom; function execute() { PlayBegins.rulebook.execute({}); } PlayBegins.execute = execute; function setStartingRoom(room) { if (startingRoom != undefined) { console.warn("[InitialRoom] Multiple requests for starting room, please check.", startingRoom, room); } startingRoom = room; } PlayBegins.setStartingRoom = setStartingRoom; PlayBegins.PutPlayerIntoFirstRoom = PlayBegins.rulebook.createAndAddRule({ name: "Place player into initial room", firstPriority: Rule.PRIORITY_HIGHEST, priority: Rule.PRIORITY_MEDIUM, code: () => { if (WorldState.player.getRoom() != undefined) { console.debug(Rulebook.getIndentation() + "[InitialRoom] Player already in a room.", WorldState.player.getRoom()); } else { startingRoom.place(WorldState.player); } } }); PlayBegins.RunEmptyTurnSequenceRule = new Rule({ name: "Run Empty Turn Sequence Rule", firstPriority: Rule.PRIORITY_LOWEST, priority: Rule.PRIORITY_LOWEST, code: (rulebook2) => { TurnSequence.execute(); } }); PlayBegins.rulebook.addRule(PlayBegins.RunEmptyTurnSequenceRule); })(PlayBegins || (PlayBegins = {})); var MachineBegins; (function (MachineBegins) { MachineBegins.RunPlayBegins = MachineBegins.rulebook.createAndAddRule({ firstPriority: Rule.PRIORITY_LOW, name: "Run Play Begins", code: () => { PlayBegins.execute(); } }); })(MachineBegins || (MachineBegins = {})); var Tests; (function (Tests) { Tests.MIN_DICE = 0; Tests.MAX_DICE = 3; function rollDice() { return Math.floor(Math.random() * (Tests.MAX_DICE - Tests.MIN_DICE)) + 1 + Tests.MIN_DICE; } Tests.rollDice = rollDice; function test(attr, difficulty) { return (attr + rollDice()) >= difficulty; } Tests.test = test; })(Tests || (Tests = {})); class MapNote extends Thing { constructor() { super(...arguments); this.rooms = []; this.regions = []; } addRoom(...rooms) { rooms.forEach((room) => { this.rooms.push(room); }); } addRegion(...regions) { regions.forEach(region => { this.regions.push(region); }); } contains(room) { if (this.rooms.indexOf(room) != -1) { return true; } else { for (var i = 0; i < this.regions.length; i++) { if (this.regions[i].getRooms().indexOf(room) != -1) { return true; } } } } } class Bodypart extends Thing { constructor(options) { super(options); this.sorenessWeight = 1; this.soreness = 0; this.sorenessPerTurn = 0.05; this.lastSorenessUpdate = 0; this.slots = []; this.visibleSlots = []; this.genderValue = Bodypart.GENDER_MEDIUM_ANDROGYNE; this.genderWeight = 1; this.sluttiness = 10; this.sluttinessWeight = Bodypart.WEIGHT_LOWEST; this.addGetAlterations((bp) => { return { Soreness: bp.soreness, GenderValue: bp.genderValue, Sluttiness: bp.getSluttiness() }; }); this.addSetAlterations((bp, changes) => { this.soreness = changes.Soreness; this.genderValue = changes.GenderValue; this.sluttiness = changes.Sluttiness; }); } updateSoreness() { let cTurn = WorldState.getCurrentTurn(); if (cTurn > this.lastSorenessUpdate) { if (this.soreness > 0) { this.soreness -= (this.sorenessPerTurn * (cTurn - this.lastSorenessUpdate)); if (this.soreness < 0) { this.soreness = 0; } } this.lastSorenessUpdate = cTurn; } } changeSoreness(soreness) { this.updateSoreness(); this.soreness += soreness; if (this.soreness < 0) { this.soreness = 0; } } getSoreness() { this.updateSoreness(); return this.soreness; } getWeightedSoreness() { return this.getSoreness() * this.sorenessWeight; } getSorenessWeight() { return this.sorenessWeight; } getGenderWeight() { if (this.slots.length == 0) { return 0; } return this.genderWeight * (this.visibleSlots.length / this.slots.length); } getGenderValue() { return this.genderValue; } getWeightedGenderValue() { return this.getGenderValue() * this.getGenderWeight(); } getSluttiness() { return this.sluttiness; } getSluttinessWeight() { if (this.slots.length == 0) { return 0; } return this.sluttinessWeight * (this.visibleSlots.length / this.slots.length); } getWeightedSluttinessValue() { return this.getSluttiness() * this.getSluttinessWeight(); } updateVisibility() { this.visibleSlots = this.slots.slice(0); let parent = Thing.PartRelation.getLeft(this); if (parent != undefined) { let clothing = Thing.WearRelation.getRight(parent); for (let i = 0; i < clothing.length; i++) { let covering = clothing[i].getCoveringSlots(); for (let k = 0; k < covering.length; k++) { let idx = this.visibleSlots.indexOf(covering[k]); if (idx >= 0) { this.visibleSlots.splice(idx, 1); } } if (this.visibleSlots.length == 0) break; } } } isUncovered() { this.updateVisibility(); return this.visibleSlots.length == this.slots.length && this.slots.length > 0; } updateStatus() { this.updateVisibility(); } static getSoreness(thing) { let bodyparts = Thing.PartRelation.getRightType(thing, Bodypart); let soreness = 0; bodyparts.forEach((bodypart) => { soreness += bodypart.getWeightedSoreness(); }); return soreness; } static getGenderValueOn(thing) { let weight = 0; let value = 0; let bodyparts = Thing.PartRelation.getRightType(thing, Bodypart); bodyparts.forEach((bodypart) => { weight += bodypart.getGenderWeight(); value += bodypart.getWeightedGenderValue(); }); return { weight: weight, value: value }; } static getSluttinessValueOn(thing) { let weight = 0; let value = 0; let bodyparts = Thing.PartRelation.getRightType(thing, Bodypart); bodyparts.forEach((bodypart) => { weight += bodypart.getSluttinessWeight(); value += bodypart.getWeightedSluttinessValue(); }); return { weight: weight, value: value }; } arrangeGenderValue(genderValue) { this.genderValue = genderValue; this.getPartOne().invalidateCaches(); } increaseFemininity(amount) { let currentGV = this.getGenderValue(); this.arrangeGenderValue(currentGV + (5 * amount)); } increaseMasculinity(amount) { let currentGV = this.getGenderValue(); this.arrangeGenderValue(currentGV - (5 * amount)); } } Bodypart.WEIGHT_LOWEST = 1; Bodypart.WEIGHT_LOW = 3; Bodypart.WEIGHT_MEDIUM = 5; Bodypart.WEIGHT_HIGH = 7; Bodypart.WEIGHT_HIGHEST = 9; Bodypart.SLUTTINESS_LOWEST_SAINTLY = 0; Bodypart.SLUTTINESS_LOW_PRUDE = 25; Bodypart.SLUTTINESS_MEDIUM_AVERAGE = 50; Bodypart.SLUTTINESS_HIGH_SLUT = 75; Bodypart.SLUTTINESS_HIGHEST_WHORE = 100; Bodypart.GENDER_LOWEST_MANLIEST = 0; Bodypart.GENDER_LOW_MANLY = 25; Bodypart.GENDER_MEDIUM_ANDROGYNE = 50; Bodypart.GENDER_HIGH_FEMININE = 75; Bodypart.GENDER_HIGHEST_FEMININEST = 100; class SexStick extends Bodypart { getWide() { return new Measure(); } getLong() { return new Measure(); } } class SexHole extends Bodypart { } class Measure { constructor(...sides) { this.superscript = ["", "", "²", "³", "⁴", "⁵", "⁶", "⁷", "⁸", "⁹"]; this.units = 1; sides.forEach((side) => { this.units *= side; }); this.sides = sides.length; } getText() { let meters = Math.pow(this.sides, 100); if (this.units > meters) { return (+(this.units / meters).toFixed(2)).toString() + "m" + this.superscript[this.sides]; } else { return this.units.toString() + "cm" + this.superscript[this.sides]; } } getNumber() { return this.units; } getSides() { return this.sides; } static fromInches(inches) { return inches * 2.54; } static fromFeet(feet) { return feet * 30.48; } } class MeasureLiquid { constructor(milliliters) { this.units = milliliters; } getText() { if (this.units > 1000) { return (+(this.units / 1000).toFixed(2)).toString() + "L"; } else { return this.units.toString() + "mL"; } } static fromLiters(liters) { return liters * 1000; } } class HumanoidArms extends Bodypart { constructor() { super(...arguments); this.sorenessWeight = Bodypart.WEIGHT_LOW; this.genderWeight = Bodypart.WEIGHT_MEDIUM; this.slots = [Humanoid.SLOT_ARMS]; } get sluttinessWeight() { if (this.getPartOne().isMale()) { return Bodypart.WEIGHT_HIGHEST; } else { return Bodypart.WEIGHT_MEDIUM; } } set sluttinessWeight(val) { } getSluttiness() { if (this.getPartOne().isMale()) { return this.getGenderValue(); } else { return 100 - this.getGenderValue(); } } getDescription() { let humanoid = this.getPartOne(); let str = humanoid.getStat(Attributes.Strength); if (str > 4) { return "Your arms and legs are ridiculously huge, showing off just how strong you are."; } else if (str > 2) { return "Your arms and legs are pretty big because of your muscles."; } else if (str == 2) { return ""; } else { return "You look like you don't even lift."; } } getGenderValue() { let humanoid = this.getPartOne(); let str = humanoid.getStat(Attributes.Strength); return 20 * str; } } class HumanoidBreasts extends Bodypart { constructor(options) { super(options); this.size = 0; this.silicone = 0; this.milk = 0; this.sorenessWeight = Bodypart.WEIGHT_MEDIUM; this.genderWeight = Bodypart.WEIGHT_HIGH; this.slots = [Humanoid.SLOT_BREASTS]; this.sluttiness = Bodypart.SLUTTINESS_HIGH_SLUT; this.sluttinessWeight = Bodypart.WEIGHT_MEDIUM; this.addGetAlterations((thing) => { return { Size: this.size, Silicone: this.silicone, Milk: this.milk }; }); this.addSetAlterations((thing, changes) => { this.size = changes.Size; this.silicone = changes.Silicone; this.milk = changes.Milk; }); } getSize() { return this.size + this.silicone + this.milk; } getSizeText() { return HumanoidBreasts.getSizeText(this.getSize()); } static getSizeText(size) { let names = ["flat", "AA-cup", "A-cup", "B-cup", "C-cup", "D-cup", "E-cup", "F-cup", "G-cup", "H-cup"]; if (size >= names.length) { return "HUGE"; } else { return names[size]; } } getGenderValue() { return HumanoidBreasts.getGenderFromSize(this.getSize()); } getSluttiness() { return this.getGenderValue(); } static getGenderFromSize(size) { if (size <= 0) { return 20; } else if (size <= 3) { return 20 * size; } else { return 80; } } arrangeGenderValue(gv) { if (gv <= 20) { this.size = 0; this.silicone = 0; this.milk = 0; } else if (gv < 80) { this.size = Math.round(gv / 20); } else { this.size = 4; } } } class HumanoidButt extends Bodypart { constructor(options) { super(options); this.size = 0; this.silicone = 0; this.sorenessWeight = Bodypart.WEIGHT_MEDIUM; this.genderWeight = Bodypart.WEIGHT_MEDIUM; this.slots = [Humanoid.SLOT_BUTT]; this.sluttiness = Bodypart.SLUTTINESS_HIGH_SLUT; this.sluttinessWeight = Bodypart.WEIGHT_MEDIUM; this.addGetAlterations((thing) => { return { Size: this.size, Silicone: this.silicone }; }); this.addSetAlterations((thing, changes) => { this.size = changes.Size; this.silicone = changes.Silicone; }); } getSluttiness() { return this.getSize() * 33; } getSize() { return this.size + this.silicone; } getSizeText() { return HumanoidButt.getSizeText(this.getSize()); } static getSizeText(size) { let names = ["flat", "tiny", "round", "plump"]; if (size >= names.length) { return "gargantuan"; } else { return names[size]; } } getGenderValue() { return HumanoidBreasts.getGenderFromSize(this.getSize()); } static getGenderFromSize(size) { if (size <= 0) { return 20; } else if (size <= 2) { return 30 * size; } else { return 80; } } arrangeGenderValue(gv) { if (gv <= 20) { this.size = 0; } else if (gv <= 60) { this.size = 1; } else { this.size = 3; } } } class HumanoidExtremity extends Bodypart { constructor(options) { super(options); this.nailsPainted = false; this.nailColor = 0; this.addGetAlterations((thing) => { return { Painted: this.nailsPainted, Color: this.nailColor }; }); this.addSetAlterations((thing, changes) => { this.nailsPainted = changes.Painted; this.nailColor = changes.Color; }); } static getColor(index) { return HumanoidExtremity.nailColorNames[index]; } getSluttiness() { return this.getGenderValue(); } getGenderValue() { let nailPaintedCorrection = this.nailColor * 50; let nailPaintedCorrectionWeight = this.nailsPainted ? 3 : 0; let gv = this.genderValue; let gw = this.genderWeight; return ((gv * gw) + (nailPaintedCorrection * nailPaintedCorrectionWeight)) / (gw + nailPaintedCorrectionWeight); } arrangeGenderValue(gv) { this.genderValue = gv; this.nailsPainted = gv > 60; if (this.nailsPainted) { if (gv > 70) { this.nailColor = 2; } else { this.nailColor = 1; } } this.getPartOne().invalidateCaches(); } } HumanoidExtremity.nailColorNames = ['none', 'red', 'pink']; class HumanoidFeet extends HumanoidExtremity { constructor() { super(...arguments); this.sorenessWeight = Bodypart.WEIGHT_LOW; this.genderWeight = Bodypart.WEIGHT_LOW; this.slots = [Humanoid.SLOT_FEET]; } getDescription() { let say = new Say(); if (this.genderValue > 55) { say.add("Your feet are small and cute."); } else if (this.genderValue < 45) { say.add("Your feet are big and mannish."); } if (this.nailsPainted) { say.add(" Your toenails are painted " + HumanoidExtremity.getColor(this.nailColor) + "."); } return say; } } class HumanoidHands extends HumanoidExtremity { constructor() { super(...arguments); this.sorenessWeight = Bodypart.WEIGHT_LOW; this.genderWeight = Bodypart.WEIGHT_MEDIUM; this.slots = [Humanoid.SLOT_HANDS]; } getDescription() { let say = new Say(); if (this.genderValue > 55) { say.add("Your hands are delicate and slender."); } else if (this.genderValue < 45) { say.add("Your hands are rough and large."); } if (this.nailsPainted) { say.add(" Your toenails are painted " + HumanoidExtremity.getColor(this.nailColor) + "."); } return say; } } class HumanoidHead extends Bodypart { constructor() { super(...arguments); this.sorenessWeight = Bodypart.WEIGHT_MEDIUM; this.genderWeight = Bodypart.WEIGHT_LOW; this.slots = [Humanoid.SLOT_HEADGEAR, Humanoid.SLOT_HAIR, Humanoid.SLOT_EARS, Humanoid.SLOT_FACE, Humanoid.SLOT_EYES, , Humanoid.SLOT_NOSE, Humanoid.SLOT_MOUTH]; } } class HumanoidPenis extends SexStick { constructor(options) { super(options); this.sorenessWeight = Bodypart.WEIGHT_HIGH; this.genderValue = 25; this.genderWeight = Bodypart.WEIGHT_HIGHEST; this.slots = [Humanoid.SLOT_CROTCH_FRONT]; this.sluttiness = Bodypart.SLUTTINESS_HIGH_SLUT; this.sluttinessWeight = Bodypart.WEIGHT_MEDIUM; this.flaccidSize = new Measure(6); this.flaccidWidth = new Measure(3); this.erectSize = new Measure(15); this.erectWidth = new Measure(6); this.arousalMinimum = 5; this.arousalErect = 25; if (Math.random() >= 0.5) { this.flaccidMult = 0.33; } else { this.flaccidMult = 0.77; } this.addGetAlterations((thing) => { return { FSize: this.flaccidSize.getNumber(), FWidth: this.flaccidWidth.getNumber(), ESize: this.erectSize.getNumber(), EWidth: this.erectWidth.getNumber(), AMin: this.arousalMinimum, AErect: this.arousalErect, FMult: this.flaccidMult }; }); this.addSetAlterations((thing, changes) => { this.flaccidSize = new Measure(changes.FSize); this.flaccidWidth = new Measure(changes.FWidth); this.erectSize = new Measure(changes.ESize); this.erectWidth = new Measure(changes.EWidth); this.arousalMinimum = changes.AMin; this.arousalErect = changes.AErect; this.flaccidMult = changes.FMult; }); } getSluttiness() { return this.getBulgeSize() * 3; } isGrower() { return this.flaccidMult < 0.5; } getActualSize() { let min = this.flaccidSize.getNumber(); let max = this.erectSize.getNumber(); let variableSize = (max - min); let finalSize = min + (variableSize * this.getArousalPerc()); return finalSize; } isBig() { return this.getBulgeSize() > 22; } getArousalPerc() { let arousal = 0; let numSteps = this.arousalErect - this.arousalMinimum; let arousalPerc = (arousal - this.arousalMinimum) / numSteps; arousalPerc = arousalPerc < 0 ? 0 : arousalPerc > 1 ? 1 : arousalPerc; return arousalPerc; } isFlaccid() { return this.getArousalPerc() < 0.6; } isErect() { return !this.isFlaccid(); } getActualWidth() { let min = this.flaccidWidth.getNumber(); let max = this.erectWidth.getNumber(); let variableSize = (max - min); let numSteps = this.arousalErect - this.arousalMinimum; let arousal = 0; let arousalPerc = (arousal - this.arousalMinimum) / numSteps; arousalPerc = arousalPerc < 0 ? 0 : arousalPerc > 1 ? 1 : arousalPerc; let finalSize = min + (variableSize * arousalPerc); return finalSize; } getLong() { return new Measure(this.getActualSize()); } getWide() { return new Measure(this.getActualWidth()); } getBulgeSize() { return this.getActualSize() + (3 * this.getActualWidth()); } getSizeText() { return HumanoidPenis.getSizeText(this.getBulgeSize()); } static getSizeText(size) { let sizeTable = [ [0, "nonexistent"], [1, "tiny"], [20, "small"], [23, "medium"], [27, "big"], [32, "huge"], [36, "monstrous"] ]; let i; for (i = 1; i < sizeTable.length && sizeTable[i][0] < size; i++) { } return sizeTable[i - 1][1]; } getGenderValue() { let sizeTable = [ [10, 60], [20, 45], [23, 35], [27, 28], [32, 24], [36, 18] ]; let i; for (i = 1; i < sizeTable.length && sizeTable[i][0] < this.getActualSize(); i++) { } return sizeTable[i - 1][1]; } arrangeGenderValue(gv) { let sizeTable = [ [60, 3, 2], [45, 10, 3], [35, 14, 3], [28, 17, 3], [24, 19, 4], [18, 22, 4.5] ]; let i; for (i = 1; i < sizeTable.length && sizeTable[i][0] > gv; i++) { } this.flaccidSize = new Measure(this.flaccidMult * sizeTable[i - 1][1]); this.flaccidWidth = new Measure(this.flaccidMult * sizeTable[i - 1][2]); this.erectSize = new Measure(sizeTable[i - 1][1]); this.erectWidth = new Measure(sizeTable[i - 1][2]); this.getPartOne().invalidateCaches(); } static getSynonym() { let cockNames = [ "cock", "dick" ]; return (new OneOf(OneOf.PURELY_AT_RANDOM, ...cockNames).getOne()); } } class HumanoidSkin extends Bodypart { constructor(options) { super(options); this.sorenessWeight = 0; this.genderWeight = Bodypart.WEIGHT_MEDIUM; this.slots = [ Humanoid.SLOT_FACE, Humanoid.SLOT_NECK, Humanoid.SLOT_SHOULDERS, Humanoid.SLOT_ARMS, Humanoid.SLOT_HANDS, Humanoid.SLOT_UPPER_CHEST, Humanoid.SLOT_MIDRIFF, Humanoid.SLOT_WAIST, Humanoid.SLOT_BACK, Humanoid.SLOT_HIPS, Humanoid.SLOT_BUTT, Humanoid.SLOT_LEG_UPPER, Humanoid.SLOT_LEG_LOWER ]; this.skinSoftness = 5; this.skinHairiness = 2; this.addGetAlterations((thing) => { return { Softness: this.skinSoftness, Hairiness: this.skinHairiness }; }); this.addSetAlterations((thing, changes) => { this.skinSoftness = changes.Softness; this.skinHairiness = changes.Hairiness; }); } getSluttiness() { return this.getGenderValue(); } getDescription() { let owner = this.getPartOne(); let green = (owner.getStat(Attributes.Corruption) > 50); let say = new Say("Your skin is "); if (this.skinSoftness > 7) { say.add("perfectly smooth"); } else if (this.skinSoftness > 4) { say.add("smooth"); } else { say.add("rough"); } say.add(" and "); if (this.skinHairiness > 8) { say.add("hairy, like a gorilla's"); } else if (this.skinHairiness > 6) { say.add("hairy"); } else if (this.skinHairiness > 3) { say.add("somewhat hairless"); } else { say.add("completely hairless"); } say.add("."); if (green) { say.add(" The taint of your corruption has turned your skin green, like an orc's."); } return say; } getGenderValue() { let softnessRank = this.skinSoftness * 100; let hairinessRank = 1000 - (this.skinHairiness * 100); return (softnessRank + hairinessRank) / 20; } arrangeGenderValue(genderValue) { let ideal = genderValue / 10; this.skinHairiness = 10 - Math.round(ideal); this.skinSoftness = Math.round(ideal); this.getPartOne().invalidateCaches(); } } class HumanoidTesticles extends Bodypart { constructor(options) { super(options); this.size = 1; this.sorenessWeight = Bodypart.WEIGHT_HIGH; this.genderWeight = Bodypart.WEIGHT_HIGHEST; this.slots = [Humanoid.SLOT_CROTCH_FRONT]; this.sluttiness = Bodypart.SLUTTINESS_MEDIUM_AVERAGE; this.sluttinessWeight = Bodypart.WEIGHT_MEDIUM; this.addGetAlterations((thing) => { return { Size: this.size }; }); this.addSetAlterations((thing, changes) => { this.size = changes.Size; }); } getBulgeSize() { return this.size; } getGenderWeight() { return 80; } } class HumanoidVagina extends SexHole { constructor() { super(...arguments); this.genderValue = 85; this.genderWeight = Bodypart.WEIGHT_HIGHEST; this.slots = [Humanoid.SLOT_CROTCH_FRONT]; this.sluttiness = 50; this.sluttinessWeight = Bodypart.WEIGHT_MEDIUM; } getSluttiness() { let slut = 100 - this.genderValue; let obscenelyOpen = false; slut += obscenelyOpen ? 25 : 0; return slut; } getDescription() { let say = new Say("Your "); let hairless = this.genderValue >= 80; let smallClit = this.genderValue >= 55; let innie = this.genderValue > 70; let obscenelyOpen = false; if (hairless) { say.add("hairless ", Say.PUSSY); } else { say.add("hairy ", Say.PUSSY); } say.add(" "); if (innie) { say.add("is usually completely covered by its lips"); } else { say.add("has some curtains escaping its lips"); } if (!smallClit) { say.add(" and has an oversized clit"); } say.add("."); if (obscenelyOpen) { say.add(" It is currently stretched open obscenely."); } return say; } arrangeGenderValue(gv) { gv = (gv / 2) + 50; this.genderValue = gv; this.getPartOne().invalidateCaches(); return; } static getSynonym() { let cockNames = [ "pussy", "womanhood" ]; return (new OneOf(OneOf.PURELY_AT_RANDOM, ...cockNames).getOne()); } } class HumanoidTorso extends Bodypart { constructor() { super(...arguments); this.genderWeight = 0; this.sluttinessWeight = 0; } } class Clothing extends Thing { constructor() { super(...arguments); this.slots = []; this.transparentSlots = []; this.layer = Clothing.LAYER_MEDIUM; this.isVisible = false; this.visibleOn = []; this.breastPadding = 0; this.maxBreastSize = -1; this.tightBreastSize = -1; this.looseBreastSize = 0; this.crotchPadding = 0; this.maxCrotchSize = -1; this.tightCrotchSize = -1; this.looseCrotchSize = 0; this.buttPadding = 0; this.maxButtSize = -1; this.tightButtSize = -1; this.looseButtSize = 0; this.genderValue = 50; this.sluttinessValue = 40; } updateStatus() { this.visibleOn = []; this.visibleOn.push(...this.slots); let wearer = Thing.WearRelation.getLeft(this); if (wearer == undefined) return; let cloths = Thing.WearRelation.getRight(wearer); let coveredSlots = []; for (let i = 0; i < cloths.length; i++) { let worn = cloths[i]; if ((worn != this) && worn.layer > this.layer) { coveredSlots.push(...worn.getCoveringSlots()); } } this.visibleOn = this.visibleOn.filter(visible => { return coveredSlots.indexOf(visible) == -1; }); this.isVisible = this.visibleOn.length > 0; } getCoveringSlots() { if (this.transparentSlots.length == 0) { return this.slots.slice(0); } return this.slots.filter((value, index, array) => { return this.transparentSlots.indexOf(value) == -1; }); } getGenderWeight() { return this.visibleOn.length; } getGenderValue() { return this.genderValue; } getSluttinessWeight() { return this.visibleOn.length; } getSluttinessValue() { return this.sluttinessValue; } static getGenderValueOn(p) { let weight = 0; let value = 0; let clothes = Thing.WearRelation.getRight(p); for (let i = 0; i < clothes.length; i++) { weight += clothes[i].getGenderWeight(); value += clothes[i].getGenderWeight() * clothes[i].getGenderValue(); } return { weight: weight, value: value }; } static getSluttinessValueOn(p) { let weight = 0; let value = 0; let clothes = Thing.WearRelation.getRight(p); for (let i = 0; i < clothes.length; i++) { weight += clothes[i].getSluttinessWeight(); value += clothes[i].getSluttinessWeight() * clothes[i].getSluttinessValue(); } return { weight: weight, value: value }; } } Clothing.LAYER_LOWEST = 0; Clothing.LAYER_LOW = 5; Clothing.LAYER_MEDIUM = 10; Clothing.LAYER_HIGH = 15; Clothing.LAYER_HIGHEST = 20; class ActionRemove extends Action { getCommandText() { return "take off " + (this.getNoun(0) != undefined ? this.getNoun(0).getPrintedName() : ""); } getClothing() { return this.getNoun(0); } } ActionRemove.check = new Rulebook("Check Removing"); ActionRemove.carry = new Rulebook("Carry out Removing"); ActionRemove.checkIsWearable = ActionRemove.check.createAndAddRule({ name: "Is noun a clothing", firstPriority: Rule.PRIORITY_HIGHEST, code: (runner) => { let action = runner.noun; let noun = action.getClothing(); if (!(noun instanceof Clothing)) { if (action.actor == WorldState.player) { action.say.add("You can only remove Clothing."); } return false; } } }); ActionRemove.checkIsHeld = ActionRemove.check.createAndAddRule({ name: "Is noun worn", firstPriority: Rule.PRIORITY_HIGH, code: async (runner) => { let action = runner.noun; let noun = action.getClothing(); if (!Thing.WearRelation.isRight(action.actor, noun)) { if (action.actor == WorldState.player) { action.say.add("You are not wearing it."); } return false; } } }); ActionRemove.carryDefault = ActionRemove.carry.createAndAddRule({ name: "Set Clothing as Carried", firstPriority: Rule.PRIORITY_MEDIUM, code: (runner) => { let action = runner.noun; let noun = action.getClothing(); Thing.CarryRelation.setRelation(action.actor, noun); let actor = action.actor; let thing = action.getNoun(0); if (actor == WorldState.player) { action.say.add(new SayBold(thing, ": "), "Removed."); } else { action.say.add(new SayThe(), actor, " takes off ", new SayThe(), thing, "."); } } }); Elements.HyperlinkHandler.HyperlinkingRulebook.addRule(new Rule({ name: "Hyperlink - Remove", firstPriority: Rule.PRIORITY_HIGHEST, code: (rulebook) => { let thing = rulebook.noun; if (thing instanceof Clothing && (Thing.WearRelation.isRight(WorldState.player, thing))) { Elements.HyperlinkHandler.addAvailableAction("Remove", new ActionRemove(WorldState.player, thing)); } } })); Elements.InventoryHandler.LinkingThing.addRule(new Rule({ name: "Inventory - Remove", firstPriority: Rule.PRIORITY_LOWEST, code: (rulebook) => { let thing = rulebook.noun; if (thing instanceof Clothing && (Thing.WearRelation.isRight(WorldState.player, thing))) { Elements.InventoryHandler.printThingLink("R", new ActionRemove(WorldState.player, thing)); } } })); class ActionWear extends Action { getCommandText() { return "wear " + (this.getNoun(0) != undefined ? this.getNoun(0).getPrintedName() : ""); } getClothing() { return this.getNoun(0); } } ActionWear.check = new Rulebook("Check Wearing"); ActionWear.carry = new Rulebook("Carry out Wearing"); ActionWear.checkIsWearable = ActionWear.check.createAndAddRule({ name: "Is noun a clothing", firstPriority: Rule.PRIORITY_HIGHEST, code: (runner) => { let action = runner.noun; let noun = action.getClothing(); if (!(noun instanceof Clothing)) { if (action.actor == WorldState.player) { action.say.add("You can only wear Clothing."); } return false; } } }); ActionWear.checkIsHeld = ActionWear.check.createAndAddRule({ name: "Is noun held", firstPriority: Rule.PRIORITY_HIGH, code: async (runner) => { let action = runner.noun; let noun = action.getClothing(); if (!Thing.CarryRelation.isRight(action.actor, noun)) { if (action.actor == WorldState.player) { action.say.add("(first taking the ", noun, ")", Say.LINE_BREAK); } let takingAction = new ActionTake(action.actor, noun); await takingAction.execute(); action.say.add(takingAction.say); if (!Thing.CarryRelation.isRight(action.actor, noun)) { return false; } } } }); ActionWear.carryDefault = ActionWear.carry.createAndAddRule({ name: "Set Clothing as Worn", firstPriority: Rule.PRIORITY_MEDIUM, code: (runner) => { let action = runner.noun; let noun = action.getClothing(); Thing.WearRelation.setRelation(action.actor, noun); let actor = action.actor; let thing = action.getNoun(0); if (actor == WorldState.player) { action.say.add(new SayBold(thing, ": "), "Worn."); } else { action.say.add(new SayThe(), actor, " puts on ", new SayThe(), thing, "."); } } }); Elements.HyperlinkHandler.HyperlinkingRulebook.addRule(new Rule({ name: "Hyperlink - Wear", firstPriority: Rule.PRIORITY_HIGHEST, code: (rulebook) => { let thing = rulebook.noun; if (thing instanceof Clothing && !(Thing.WearRelation.isRight(WorldState.player, thing))) { Elements.HyperlinkHandler.addAvailableAction("Wear", new ActionWear(WorldState.player, thing)); } } })); Elements.InventoryHandler.LinkingThing.addRule(new Rule({ name: "Inventory - Wear", firstPriority: Rule.PRIORITY_LOWEST, code: (rulebook) => { let thing = rulebook.noun; if (thing instanceof Clothing && !(Thing.WearRelation.isRight(WorldState.player, thing))) { Elements.InventoryHandler.printThingLink("W", new ActionWear(WorldState.player, thing)); } } })); class Humanoid extends Person { constructor(options) { super(options); this.breastVisibleSize = 0; this.isBreastVisible = false; this.isBreastTight = false; this.isBreastLoose = false; this.crotchVisibleSize = 0; this.isCrotchVisible = false; this.isCrotchTight = false; this.buttVisibleSize = 0; this.isButtVisible = false; this.isButtTight = false; this.isGenderCached = false; this.isSluttinessCached = false; this.uncoveredSlots = []; this.addParts(new HumanoidSkin(), new HumanoidHead(), new HumanoidArms(), new HumanoidHands(), new HumanoidBreasts(), new HumanoidFeet(), new HumanoidTorso(), new HumanoidButt()); if (options.isMale) { this.addMaleParts(); this.setGenderValue(25); } else { this.addFemaleParts(); this.setGenderValue(75); } this.addGetAlterations((humanoid) => { if (humanoid.isPlayer()) { return { HumanoidGender: humanoid.isMale() ? Humanoid.SEX_MALE : humanoid.isFemale() ? Humanoid.SEX_FEMALE : Humanoid.SEX_HERM }; } }); this.addSetAlterations((humanoid, changes) => { if (humanoid.isPlayer()) { humanoid.removeGenderedParts(); if (changes.HumanoidGender == Humanoid.SEX_MALE) { humanoid.addMaleParts(); } else if (changes.HumanoidGender == Humanoid.SEX_FEMALE) { humanoid.addFemaleParts(); } else { humanoid.addMaleParts(); humanoid.addFemaleParts(); } } }); } invalidateCaches() { this.isGenderCached = false; this.isSluttinessCached = false; } getGenderValue() { if (!this.isSluttinessCached) { this.updateCaches(); } return this.cachedGenderValue; } getSluttiness() { if (!this.isSluttinessCached) { this.updateCaches(); } return this.cachedSluttiness; } getBulges() { if (!this.isGenderCached) { this.updateCaches(); } return this.cachedBulges; } updateCaches() { this.updateClothing(); this.updateSlots(); this.updateBodyparts(); this.updateBulges(); this.updateGenderValue(); this.updateSluttiness(); } updateSlots() { this.uncoveredSlots = []; for (let i = 0; i < Humanoid.SLOT_SLOT_COUNT; i++) { this.uncoveredSlots.push(i); } let clothing = Thing.WearRelation.getRightType(this, Clothing); for (let i = 0; i < clothing.length; i++) { let covering = clothing[i].getCoveringSlots(); for (let k = 0; k < covering.length; k++) { let idx = this.uncoveredSlots.indexOf(covering[k]); if (idx >= 0) { this.uncoveredSlots.splice(idx, 1); } } if (this.uncoveredSlots.length == 0) break; } } updateGenderValue() { let clothingGender = Clothing.getGenderValueOn(this); let bodypartGender = Bodypart.getGenderValueOn(this); let genderWeight = clothingGender.weight + bodypartGender.weight; let genderValue = clothingGender.value + bodypartGender.value; let correctionWeight = Bodypart.WEIGHT_HIGHEST; let correctionValue = this.getStat(Attributes.GenderIdentity) * Bodypart.WEIGHT_HIGHEST; let hasPenis = false; let hasVagina = false; if (this.isCrotchVisible) { if (Thing.PartRelation.getRightTypeOne(this, HumanoidPenis) != undefined) { hasPenis = true; hasVagina = false; correctionValue += 0 * Bodypart.WEIGHT_LOWEST; correctionWeight += Bodypart.WEIGHT_LOWEST; } else if (Thing.PartRelation.getRightTypeOne(this, HumanoidVagina) != undefined) { hasPenis = false; hasVagina = true; correctionValue += 100 * Bodypart.WEIGHT_LOWEST; correctionWeight += Bodypart.WEIGHT_LOWEST; } } if (this.breastVisibleSize > 0) { correctionValue += 100 * Bodypart.WEIGHT_LOWEST; correctionWeight += Bodypart.WEIGHT_LOWEST; } if (this.crotchVisibleSize > 0 && !hasVagina) { correctionValue += 0 * Bodypart.WEIGHT_LOWEST; correctionWeight += Bodypart.WEIGHT_LOWEST; } let genderValueFinal = genderValue / genderWeight; let genderValueCorrected = (genderValue + correctionValue) / (genderWeight + correctionWeight); this.cachedGenderValue = { hasTits: this.breastVisibleSize > 1, hasPenisBulge: this.crotchVisibleSize > 0 && !hasVagina, hasPenis: hasPenis, hasVagina: hasVagina, genderValue: genderValueFinal, genderValueCorrected: genderValueCorrected }; this.isGenderCached = true; } isVisibleOn(slot) { return this.uncoveredSlots.indexOf(slot) != -1; } updateSluttiness() { let clothingSluttiness = Clothing.getSluttinessValueOn(this); let bodypartSluttiness = Bodypart.getSluttinessValueOn(this); let sluttinessWeight = clothingSluttiness.weight + bodypartSluttiness.weight; let sluttinessValue = clothingSluttiness.value + bodypartSluttiness.value; let correctionWeight = 0; let correctionValue = 0; let somewhatSlutty = [Humanoid.SLOT_MIDRIFF, Humanoid.SLOT_LEG_UPPER, Humanoid.SLOT_WAIST, Humanoid.SLOT_HIPS, Humanoid.SLOT_BACK]; for (let i = 0; i < somewhatSlutty.length; i++) { if (this.isVisibleOn(somewhatSlutty[i])) { correctionWeight += 1; correctionValue += 75; } } let verySlutty = [Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_BUTT]; for (let i = 0; i < verySlutty.length; i++) { if (this.isVisibleOn(verySlutty[i])) { correctionWeight += 3; correctionValue += 75; } } if ((this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) > 0.75) { let extremeSlutty = [Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_BUTT]; for (let i = 0; i < extremeSlutty.length; i++) { if (this.isVisibleOn(extremeSlutty[i])) { correctionWeight += 5; correctionValue += 85; } } } let halfNaked; let naked; if (!this.isMale()) { halfNaked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.5 && !this.isVisibleOnArray([Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK]); naked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.3 && this.isVisibleOnArray([Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_BUTT]); } else { if (this.hasBreasts()) { halfNaked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.5 && !this.isVisibleOnArray([Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK]); naked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.3 && this.isVisibleOnArray([Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_BUTT]); } else { halfNaked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.5 && !this.isVisibleOnArray([Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK]); naked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.3 && this.isVisibleOnArray([Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_BUTT]); } } let sluttinessValueFinal = sluttinessValue / sluttinessWeight; let sluttinessCorrected = (sluttinessValue + correctionValue) / (sluttinessWeight + correctionWeight); this.cachedSluttiness = { halfNaked: halfNaked, naked: naked, sluttiness: sluttinessValueFinal, sluttinessCorrected: sluttinessCorrected }; this.isSluttinessCached = true; } isVisibleOnArray(arr) { for (let i = 0; i < arr.length; i++) { if (!this.isVisibleOn(arr[i])) { return false; } } return true; } addMaleParts() { if (!this.isMale() && !this.isHerm()) { this.addParts(new HumanoidTesticles(), new HumanoidPenis()); } this.invalidateCaches(); } addFemaleParts() { if (!this.isFemale() && !this.isHerm()) { this.addParts(new HumanoidVagina()); } this.invalidateCaches(); } removeGenderedParts() { this.removeParts(HumanoidVagina); this.removeParts(HumanoidPenis); this.removeParts(HumanoidTesticles); this.invalidateCaches(); } setGenderValue(value) { let bp = this.getParts(Bodypart); for (let i = 0; i < bp.length; i++) { if (bp[i] instanceof HumanoidBreasts && this.isMale()) { bp[i].arrangeGenderValue(0); } else { bp[i].arrangeGenderValue(value); } } } updateBodyparts() { let parts = Thing.PartRelation.getRightType(this, Bodypart); for (let i = 0; i < parts.length; i++) { parts[i].updateStatus(); } } updateClothing() { let clothes = Thing.WearRelation.getRightType(this, Clothing); for (let i = 0; i < clothes.length; i++) { clothes[i].updateStatus(); } } updateBulges() { let clothes = Thing.WearRelation.getRightType(this, Clothing).sort(function (a, b) { return a.layer - b.layer; }); this.isBreastVisible = true; this.isCrotchVisible = true; this.isButtVisible = true; let bras = []; let butts = []; let junks = []; clothes.forEach((cloth) => { cloth.updateStatus(); if (cloth.slots.indexOf(Humanoid.SLOT_BREASTS) != -1) { bras.push(cloth); if (cloth.transparentSlots.indexOf(Humanoid.SLOT_BREASTS) == -1) { this.isBreastVisible = false; } } if (cloth.slots.indexOf(Humanoid.SLOT_BUTT) != -1) { butts.push(cloth); if (cloth.transparentSlots.indexOf(Humanoid.SLOT_BUTT) == -1) { this.isButtVisible = false; } } if (cloth.slots.indexOf(Humanoid.SLOT_CROTCH_FRONT) != -1) { junks.push(cloth); if (cloth.transparentSlots.indexOf(Humanoid.SLOT_CROTCH_FRONT) == -1) { this.isCrotchVisible = false; } } }); this.updateBreastSizes(bras); this.updateCrotchSizes(junks); this.updateButtSizes(butts); this.cachedBulges = { breasts: this.breastVisibleSize, butt: this.buttVisibleSize, crotch: this.crotchVisibleSize, waist: 0 }; } getTopClothOn(slot) { return Thing.WearRelation.getRightType(this, Clothing).filter(otherCloth => { return otherCloth.visibleOn.includes(slot); }).sort((a, b) => { return a.layer - b.layer; })[0]; } updateBreastSizes(bras) { this.isBreastTight = false; this.isBreastLoose = true; let breasts = Thing.PartRelation.getRightTypeOne(this, HumanoidBreasts); this.breastVisibleSize = breasts.getSize(); bras.forEach((bra) => { if (bra.tightBreastSize >= 0 && this.breastVisibleSize > bra.tightBreastSize) { this.isBreastTight = true; } if (bra.maxBreastSize >= 0 && this.breastVisibleSize > bra.maxBreastSize) { this.breastVisibleSize = bra.maxBreastSize; } if (this.breastVisibleSize >= bra.looseBreastSize) { this.isBreastLoose = false; } this.breastVisibleSize += bra.breastPadding; if (this.breastVisibleSize < 0) { this.breastVisibleSize = 0; } }); } updateCrotchSizes(cloths) { this.isCrotchTight = false; this.crotchVisibleSize = 0; let penis = Thing.PartRelation.getRightTypeOne(this, HumanoidPenis); let testicles = Thing.PartRelation.getRightTypeOne(this, HumanoidTesticles); this.crotchVisibleSize = 0; if (penis != undefined) { this.crotchVisibleSize += penis.getBulgeSize(); } if (testicles != undefined) { this.crotchVisibleSize += testicles.getBulgeSize(); } this.crotchVisibleSize = Math.floor(this.crotchVisibleSize * 10) / 10; cloths.forEach((worn) => { if (worn.tightCrotchSize >= 0 && this.crotchVisibleSize > worn.tightCrotchSize) { this.isCrotchTight = true; } if (worn.maxCrotchSize >= 0 && this.crotchVisibleSize > worn.maxCrotchSize) { this.crotchVisibleSize = worn.maxCrotchSize; } this.crotchVisibleSize += worn.crotchPadding; if (this.crotchVisibleSize < 0) { this.crotchVisibleSize = 0; } }); } updateButtSizes(cloths) { this.isButtTight = false; let butt = Thing.PartRelation.getRightTypeOne(this, HumanoidButt); this.buttVisibleSize = butt == undefined ? 0 : butt.getSize(); cloths.forEach((worn) => { if (worn.tightButtSize >= 0 && this.buttVisibleSize > worn.tightButtSize) { this.isButtTight = true; } if (worn.maxButtSize >= 0 && this.buttVisibleSize > worn.maxButtSize) { this.buttVisibleSize = worn.maxButtSize; } this.buttVisibleSize += worn.buttPadding; if (this.buttVisibleSize < 0) { this.buttVisibleSize = 0; } }); } hasBreasts() { let breasts = this.getPart(HumanoidBreasts); if (breasts.size > 1) { return true; } return false; } isMale() { return this.getParts(HumanoidPenis).length > 0 && this.getParts(HumanoidVagina).length == 0; } isFemale() { return this.getParts(HumanoidPenis).length == 0 && this.getParts(HumanoidVagina).length > 0; } isHerm() { return this.getParts(HumanoidPenis).length > 0 && this.getParts(HumanoidVagina).length > 0; } getShortestDescription() { let playerGender = this.getGenderValue(); let playerSluttiness = this.getSluttiness(); let presentation = ""; if (playerSluttiness.sluttinessCorrected > 75) { presentation += ("slutty, "); } else if (playerSluttiness.sluttinessCorrected > 35) { } else if (playerSluttiness.sluttinessCorrected > 20) { presentation += ("prude, "); } else { presentation += ("saintly, "); } if (playerGender.genderValueCorrected < 40) { presentation += ("masculine "); } else if (playerGender.genderValueCorrected < 60) { presentation += ("androgynous "); } else { presentation += ("feminine "); } if (playerGender.hasTits) { if (playerGender.hasPenis || playerGender.hasPenisBulge) { presentation += ("shemale"); } else if (playerGender.hasVagina) { presentation += ("woman"); } } else { if (playerGender.hasPenis) { if (playerGender.genderValueCorrected < 60) { presentation += ("man"); } else { presentation += ("trap"); } } else if (playerGender.hasPenisBulge) { if (playerGender.genderValueCorrected < 60) { presentation += ("man"); } else { presentation += ("trap"); } } else if (playerGender.hasVagina) { presentation += ("woman"); } } return presentation; } static getPlayerDescription() { let say = new Say(); say.add("You are "); let player = WorldState.player; let male = player.getParts(HumanoidPenis).length > 0; let female = player.getParts(HumanoidVagina).length > 0; if (male && female) { say.add("hermaphrodite"); } else if (male) { say.add("male"); } else { say.add("female"); } say.add(". You are presenting as ", new SayAn(), player.getShortestDescription() + ". "); say.add(Attributes.GenderIdentity.getDescription(player.getStat(Attributes.GenderIdentity))); let sv = player.getSluttiness(); let bulges = player.getBulges(); let coveredPerc = 1 - (player.uncoveredSlots.length / Humanoid.SLOT_SLOT_COUNT); say.add(" ", player.getPart(HumanoidSkin).getDescription()); if (sv.halfNaked) { say.add(" You are almost naked. "); } else if (sv.naked) { say.add(" You are naked. "); } else if (coveredPerc < 0.2) { say.add("You are not showing much of it, though."); } say.add(Attributes.Degeneration.getDescription(player.getStat(Attributes.Degeneration))); say.add(Say.PARAGRAPH_BREAK); say.add(player.getPart(HumanoidArms).getDescription(), " "); say.add(player.getPart(HumanoidHands).getDescription(), " "); say.add(player.getPart(HumanoidFeet).getDescription(), " "); let penis = player.getPart(HumanoidPenis); let vagina = player.getPart(HumanoidVagina); if (penis != undefined) { say.add("You have a ", penis.getSizeText(), (penis.isFlaccid() ? " flaccid " : " erect "), Say.COCK, " between your legs"); if (!penis.isBig() && penis.isGrower() && penis.isFlaccid()) { say.add(", which is okay, since you're a grower, not a shower"); } if (penis.isUncovered()) { let oneOf = new OneOf(OneOf.PURELY_AT_RANDOM, ...[ ", it is not covered by any clothing", ", it is not covered by any clothes", ", it is uncovered", ", it is visible to all", ", it is hanging freely" ]); say.add(oneOf.getOne()); } let testicles = player.getPart(HumanoidTesticles); if (HumanoidPenis.getSizeText(bulges.crotch) != HumanoidPenis.getSizeText(penis.getBulgeSize() + testicles.getBulgeSize())) { say.add(", but it looks like it's actually ", HumanoidPenis.getSizeText(bulges.crotch), " due to your clothing"); } say.add(". "); if (testicles != undefined) { } } else { say.add(vagina.getDescription()); } say.add(" "); let breasts = player.getPart(HumanoidBreasts); let butt = player.getPart(HumanoidButt); say.add("You have ", breasts.getSizeText(), " breasts and a ", butt.getSizeText(), " butt."); if (bulges.breasts != breasts.getSize() && bulges.butt != butt.getSize()) { say.add(" Your clothing makes your breasts look like they're actually ", HumanoidBreasts.getSizeText(bulges.breasts), " and make your butt appear ", HumanoidButt.getSizeText(bulges.butt), "."); } else if (bulges.breasts != breasts.getSize()) { say.add(" Your clothing makes your breasts look like they're actually ", HumanoidBreasts.getSizeText(bulges.breasts), "."); } else if (bulges.butt != butt.getSize()) { say.add(" Your clothing makes your butt appear ", HumanoidButt.getSizeText(bulges.butt), "."); } say.add(Say.PARAGRAPH_BREAK); let clothingSluttiness = Clothing.getSluttinessValueOn(player); let bodypartSluttiness = Bodypart.getSluttinessValueOn(player); if (clothingSluttiness.weight > 0) { let clothingSluttinessFinal = clothingSluttiness.value / clothingSluttiness.weight; if (clothingSluttinessFinal > 75) { say.add("Your outfit can only be described as \"whore-ish\", it is far too nasty."); } else if (clothingSluttinessFinal > 60) { say.add("Your clothing are obviously making you look a bit naughty."); } else if (clothingSluttinessFinal < 30 && sv.sluttinessCorrected < 30) { say.add("Your clothing are definitely a bit prude."); } else if (clothingSluttinessFinal < 15 && sv.sluttinessCorrected < 30) { say.add("Your outfit is so prude that it could be worn by a saint."); } } say.add(" "); if (bodypartSluttiness.weight > 0) { let bodypartSluttinessFinal = bodypartSluttiness.value / bodypartSluttiness.weight; if (bodypartSluttinessFinal > 75) { say.add("The way your body is makes you look like you were made purely for sex"); if (coveredPerc > 0.7) { say.add(", thankfully it's mostly covered"); } else if (coveredPerc < 0.2) { say.add(", and you didn't even bother covering it up"); } say.add("."); } else if (bodypartSluttinessFinal > 60) { say.add("Your body definitely has a lot of sex-appeal going on"); if (coveredPerc > 0.7) { say.add(", although it's covered"); } else if (coveredPerc < 0.2) { say.add(", proudly displayed for all to see"); } say.add("."); } else if (bodypartSluttinessFinal < 30) { say.add("You have very little sex-appeal, maybe you are a kitchen table?"); if (coveredPerc > 0.7) { say.add(" At least you covered it up."); } else if (coveredPerc < 0.2) { say.add(" Maybe you could cover it up a bit."); } } } say.add(Say.PARAGRAPH_BREAK); let stats = new SayLeftRight(); stats.addLeft(new SayBold("Strength: "), Attributes.Strength.getDescription(player.getStat(Attributes.Strength))); stats.addLeft(Say.LINE_BREAK); stats.addLeft(new SayBold("Agility: "), Attributes.Agility.getDescription(player.getStat(Attributes.Agility))); stats.addLeft(Say.LINE_BREAK); stats.addLeft(new SayBold("Charm: "), Attributes.Charm.getDescription(player.getStat(Attributes.Charm))); stats.addLeft(Say.LINE_BREAK); stats.addLeft(new SayBold("Intelligence: "), Attributes.Intelligence.getDescription(player.getStat(Attributes.Intelligence))); Skill.getSkills().forEach((skill) => { if (player.getSkill(skill) > 0) { stats.addRight(new SayBold(skill.id + ": "), skill.getDescription(player.getSkill(skill))); } }); say.add(stats); return say; } } Humanoid.SEX_MALE = 0; Humanoid.SEX_FEMALE = 1; Humanoid.SEX_HERM = 2; Humanoid.SLOT_HAIR = 0; Humanoid.SLOT_HEADGEAR = 1; Humanoid.SLOT_FACE = 2; Humanoid.SLOT_EARS = 3; Humanoid.SLOT_EYES = 4; Humanoid.SLOT_NOSE = 5; Humanoid.SLOT_MOUTH = 6; Humanoid.SLOT_NECK = 7; Humanoid.SLOT_SHOULDERS = 8; Humanoid.SLOT_ARMS = 9; Humanoid.SLOT_HANDS = 10; Humanoid.SLOT_FINGERS = 11; Humanoid.SLOT_FINGERNAILS = 12; Humanoid.SLOT_UPPER_CHEST = 13; Humanoid.SLOT_MIDRIFF = 14; Humanoid.SLOT_WAIST = 15; Humanoid.SLOT_BACK = 16; Humanoid.SLOT_HIPS = 17; Humanoid.SLOT_CROTCH_FRONT = 18; Humanoid.SLOT_CROTCH_BACK = 19; Humanoid.SLOT_BUTT = 20; Humanoid.SLOT_LEG_UPPER = 21; Humanoid.SLOT_LEG_LOWER = 22; Humanoid.SLOT_FEET = 23; Humanoid.SLOT_FEET_NAILS = 24; Humanoid.SLOT_BREASTS = 25; Humanoid.SLOT_SLOT_COUNT = 26; Humanoid.cacheInvalidationActionRule = new Rule({ name: "Invalidate humanoid caches", firstPriority: Rule.PRIORITY_LOWEST, code: (runner) => { runner.noun.actor.invalidateCaches(); }, conditions: (runner) => { return runner.noun.actor instanceof Humanoid; } }); ActionWear.carry.addRule(Humanoid.cacheInvalidationActionRule); ActionRemove.carry.addRule(Humanoid.cacheInvalidationActionRule); var WorldState; (function (WorldState) { var worldTurn = 0; var playerTurn = 0; WorldState.player = new Humanoid({ isMale: false }); WorldState.player.description = Humanoid.getPlayerDescription; var rememberedRooms = new StoredVariable({ id: "Remembered Rooms", value: [] }); var rememberedFodder = []; let rememberedRoomsForIntelligence = 2; let rememberedRoomsForSurvival = 1; WorldState.RememberingRoomRulebook = new Rulebook("Remembering Room something"); function isTurnWaiting() { return worldTurn < playerTurn; } WorldState.isTurnWaiting = isTurnWaiting; function incrementWorldTurn() { worldTurn++; } WorldState.incrementWorldTurn = incrementWorldTurn; function incrementPlayerTurn() { playerTurn++; } WorldState.incrementPlayerTurn = incrementPlayerTurn; function getCurrentTurn() { return playerTurn; } WorldState.getCurrentTurn = getCurrentTurn; function setCurrentTurn(turn) { playerTurn = turn; worldTurn = turn; } WorldState.setCurrentTurn = setCurrentTurn; WorldState.RememberingRoomInList = WorldState.RememberingRoomRulebook.createAndAddRule({ name: "Is room listed in remembered rooms?", firstPriority: Rule.PRIORITY_LOWEST, priority: Rule.PRIORITY_LOW, code: runner => { if (rememberedRooms.value.indexOf(runner.noun.getName()) != -1 || rememberedFodder.indexOf(runner.noun) != -1) { return true; } } }); WorldState.RememberingRoomInMap = WorldState.RememberingRoomRulebook.createAndAddRule({ name: "Is room shown on a map?", firstPriority: Rule.PRIORITY_LOWEST, priority: Rule.PRIORITY_LOWEST, code: runner => { let maps = Thing.CarryRelation.getRightType(WorldState.player, MapNote); for (let i = 0; i < maps.length; i++) { if (maps[i].contains(runner.noun)) { return true; } } } }); async function isRoomRemembered(room) { let result = await WorldState.RememberingRoomRulebook.execute({ noun: room }); return result == true; } WorldState.isRoomRemembered = isRoomRemembered; function getRememberedRooms() { return rememberedRooms.value; } WorldState.getRememberedRooms = getRememberedRooms; function getRememberedRoomsAsRooms() { let rooms = []; rememberedRooms.value.forEach(roomName => { let room = Room.getRoom(roomName); if (room != undefined) rooms.push(room); }); return rooms; } WorldState.getRememberedRoomsAsRooms = getRememberedRoomsAsRooms; function getMaximumRememberedRooms() { let intRooms = WorldState.player.getStat(Attributes.Intelligence) * rememberedRoomsForIntelligence; let skillRooms = WorldState.player.getSkill(Skills.Survival) * rememberedRoomsForSurvival; return intRooms + skillRooms; } WorldState.getMaximumRememberedRooms = getMaximumRememberedRooms; function truncateRooms() { while (rememberedRooms.value.length > getMaximumRememberedRooms()) { rememberedRooms.value.pop(); } } WorldState.truncateRooms = truncateRooms; function rememberRoom(...rooms) { rooms.forEach((value) => { if (value instanceof Room) { if (value.fodder) { if (rememberedFodder.indexOf(value) == -1) { rememberedFodder.push(value); } } else { let idx = rememberedRooms.value.indexOf(value.getName()); if (idx != -1) { rememberedRooms.value.splice(idx, 1); } rememberedRooms.value.unshift(value.getName()); } } }); truncateRooms(); } WorldState.rememberRoom = rememberRoom; function saveState() { let things = { carried: [], worn: [], wielded: [] }; return { Things: things }; } WorldState.saveState = saveState; WorldState.CorrectRememberedRoomsRule = PlayBegins.rulebook.createAndAddRule({ name: "Correct remembered rooms", firstPriority: Rule.PRIORITY_LOWEST, priority: Rule.PRIORITY_MEDIUM, code: () => { let allRooms = rememberedRooms.value; let currentRoom = WorldState.player.getRoom(); if (allRooms.length == 0) { rememberedRooms.value = [currentRoom.getName()]; return; } let newRooms = []; function recursivelyAddRooms(room) { if (room instanceof RoomRandom) { if (room.fodder) { rememberedFodder.push(room); room.connections.forEach((newRoom) => { recursivelyAddRooms(newRoom); }); } else if (allRooms.indexOf(room.getName()) != -1 && newRooms.indexOf(room.getName()) == -1) { newRooms.push(room.getName()); room.connections.forEach((newRoom) => { recursivelyAddRooms(newRoom); }); } } } recursivelyAddRooms(currentRoom); rememberedRooms.value = newRooms; } }); })(WorldState || (WorldState = {})); class Region { constructor(name) { this.name = name; } place(...rooms) { rooms.forEach(room => { if (room instanceof Room) { Region.RegionRoom.setRelation(this, room); } else { Region.RegionRegion.setRelation(this, room); } }); } getRooms() { let rooms = Region.RegionRoom.getRight(this); Region.RegionRegion.getRight(this).forEach((region) => { Region.RegionRoom.getRight(region).forEach((room) => { rooms.push(room); }); }); return rooms; } containsRoom(room) { let directlyContained = Region.RegionRoom.getLeft(room) == this; if (directlyContained) { return true; } else if (Region.RegionRegion.getLeft(this) != undefined) { return this.getRooms().indexOf(room) != -1; } return false; } contains(thing) { let room = thing.getRoom(); if (room == undefined) { return false; } else { let regions = Region.InRelation.getAllLeft(room); return regions.indexOf(this) != -1; } } } Region.RegionRoom = new RelationOneToMany(); Region.RegionRegion = new RelationOneToMany(); Region.InRelation = new RelationHandlerStrictOneToMany(Region.RegionRegion, Region.RegionRoom); class Shuffler { constructor(array, rng) { this.position = 0; this.rng = rng == undefined ? Math.random : rng; this.array = array; } restart() { this.position = 0; } getOne() { if (this.position >= this.array.length) { return undefined; } let randomIndex = Math.floor(this.rng() * (this.array.length - this.position)) + this.position; let localCopy = this.array[this.position]; this.array[this.position] = this.array[randomIndex]; this.array[randomIndex] = localCopy; return this.array[this.position++]; } getShuffled() { let array = this.array.slice(0); var m = array.length, t, i; while (m) { i = Math.floor(this.rng() * m--); t = array[m]; array[m] = array[i]; array[i] = t; } return array; } } var AIRules; (function (AIRules) { AIRules.PickShiny = AI.rules.createAndAddRule({ name: "Pick Shinies", firstPriority: AIRules.PRIORITY_ACTING_ON_PLACE, conditions: (runner) => { let person = runner.noun; return person.AI.picksShinies; }, code: (runner) => { let person = runner.noun; let room = person.getRoom(); let visibleThings = room.getContainedAndVisibleTo(person); if (visibleThings.length > 0) { for (let i = 0; i < visibleThings.length; i++) { if (!visibleThings[i].fixedInPlace && visibleThings[i].getShiny()) { return new ActionTake(person, visibleThings[i]); } } } } }); })(AIRules || (AIRules = {})); var AIRules; (function (AIRules) { AIRules.Wander = AI.rules.createAndAddRule({ name: "Wander", firstPriority: AIRules.PRIORITY_ACTING_ON_IDLE, conditions: (runner) => { let person = runner.noun; return person.AI.wanderer && (Math.random() * 100) > person.AI.wanderChance; }, code: (runner) => { let person = runner.noun; let room = person.getRoom(); if (person.AI.wandersOn != undefined) { if (person.AI.wandersOn.containsRoom(room)) { let connections = room.connections.slice(); let realConnections = []; for (let i = 0; i < connections.length; i++) { if (connections[i] != undefined && person.AI.wandersOn.containsRoom(connections[i])) { realConnections.push(i); } } let direction = ((new Shuffler(realConnections)).getOne()); return new ActionGo(person, direction); } else { let regionRooms = person.AI.wandersOn.getRooms().filter((a) => { if (a instanceof RoomRandom && a.placed) { return true; } }); regionRooms.sort((a, b) => { let dist = a.getDistanceTo(b); if (dist != undefined) { return -dist; } else { return 0; } }); let targetRoom = regionRooms.pop(); return new ActionGo(person, targetRoom); } } else { let direction = room.getConnectedDirection(); return new ActionGo(person, direction); } } }); })(AIRules || (AIRules = {})); class ActionDrop extends Action { getCommandText() { return "drop " + (this.getNoun(0) != undefined ? this.getNoun(0).getPrintedName() : ""); } } ActionDrop.check = new Rulebook("Check Dropping"); ActionDrop.carry = new Rulebook("Carry out Dropping"); ActionDrop.check.addRule(new Rule({ name: "Check Dropping - Are you Wearing it?", firstPriority: Rule.PRIORITY_LOWEST, code: async (rulebook) => { let action = rulebook.noun; let actor = action.actor; let thing = action.getNoun(0); if (Thing.WearRelation.getLeft(thing) == actor || Thing.WieldRelation.getLeft(thing) == actor) { if (action.actor == WorldState.player) { action.say.add("(first taking off the ", thing, ")", Say.LINE_BREAK); } let takingAction = new ActionRemove(actor, thing); await takingAction.execute(); action.say.add(takingAction.say); if (Thing.WearRelation.getLeft(thing) == actor || Thing.WieldRelation.getLeft(thing) == actor) { return false; } action.say.add(Say.LINE_BREAK); } } })); ActionDrop.check.addRule(new Rule({ name: "Check Dropping - Do you have it??", firstPriority: Rule.PRIORITY_LOWEST, code: (rulebook) => { let action = rulebook.noun; let actor = action.actor; let thing = action.getNoun(0); if (Thing.CarryRelation.getLeft(thing) != actor) { if (actor == WorldState.player) { action.say.add("You don't have it."); } return false; } } })); ActionDrop.carry.addRule(new Rule({ name: "Dropping - Place the noun on the floor", code: (rulebook) => { let action = rulebook.noun; let actor = action.actor; let thing = action.getNoun(0); Thing.EnclosedRelation.unsetRight(thing); actor.getRoom().place(thing); if (actor == WorldState.player) { action.say.add(new SayBold(action.getNoun(0).getPrintedName() + ": "), "Dropped."); } else { action.say.add(new SayThe(), actor, " drops ", new SayThe(), action.getNoun(0), " on the floor."); } } })); Elements.HyperlinkHandler.HyperlinkingRulebook.addRule(new Rule({ name: "Hyperlink - Drop", firstPriority: Rule.PRIORITY_HIGHEST, code: (rulebook) => { let thing = rulebook.noun; if (Thing.CarryRelation.getLeft(thing) == WorldState.player || Thing.WieldRelation.getLeft(thing) == WorldState.player || Thing.WearRelation.getLeft(thing) == WorldState.player) { Elements.HyperlinkHandler.addAvailableAction("Drop", new ActionDrop(WorldState.player, thing)); } } })); Elements.InventoryHandler.LinkingThing.addRule(new Rule({ name: "Inventory - Drop", firstPriority: Rule.PRIORITY_LOWEST, code: (rulebook) => { let thing = rulebook.noun; Elements.InventoryHandler.printThingLink("D", new ActionDrop(WorldState.player, thing)); } })); class ActionInventory extends Action { constructor() { super(...arguments); this.requiresTurn = false; this.requiresNoun = false; this.requiresVisibility = false; } getCommandText() { return "take inventory"; } static async createButton(thing, resolve) { let p = document.createElement("p"); p.classList.add("choice"); let elements = await ((new Say(thing)).getPureElements()); elements.forEach(ele => { p.appendChild(ele); }); p.addEventListener("click", () => { resolve(thing); }); Controls.KeyHandler.applyCode(p, Controls.KeyHandler.getFirstKeyCode()); return p; } } ActionInventory.check = new Rulebook("Check Taking Inventory"); ActionInventory.carry = new Rulebook("Carry out Taking Inventory"); ActionInventory.checkInventoryRule = ActionInventory.check.createAndAddRule({ name: "List inventory as options", code: async (rulebook) => { let player = WorldState.player; let wielded = Thing.WieldRelation.getRight(player).sort(Elements.InventoryHandler.thingSort); let worn = Thing.WearRelation.getRight(player).sort(Elements.InventoryHandler.thingSort); let carried = Thing.CarryRelation.getRight(player).sort(Elements.InventoryHandler.thingSort); let buttons; let chosenPromise = new Promise((async (resolve) => { Controls.KeyHandler.reset(); let say = new Say(); if (wielded.length > 0) { say.add(new SayBold("Wielded:"), Say.LINE_BREAK); for (let i = 0; i < wielded.length; i++) { say.add(await ActionInventory.createButton(wielded[i], resolve)); } } if (worn.length > 0) { if (say.sequence.length > 0) { say.add(Say.PARAGRAPH_BREAK); } say.add(new SayBold("Worn:"), Say.LINE_BREAK); for (let i = 0; i < worn.length; i++) { say.add(await ActionInventory.createButton(worn[i], resolve)); } } if (carried.length > 0) { if (say.sequence.length > 0) { say.add(Say.PARAGRAPH_BREAK); } say.add(new SayBold("Carried:"), Say.LINE_BREAK); for (let i = 0; i < carried.length; i++) { say.add(await ActionInventory.createButton(carried[i], resolve)); } } if (say.sequence.length == 0) { return resolve(undefined); } buttons = await say.getHTMLContent(); Elements.CurrentTurnHandler.print(...(buttons)); })); let chosenThing = await chosenPromise; if (chosenThing != undefined) { Elements.CurrentTurnHandler.unprint(...buttons); Controls.KeyHandler.reset(); return new ActionExamine(WorldState.player, chosenThing); } else { rulebook.noun.say.add("You have nothing."); return false; } } }); Elements.HyperlinkHandler.CommonActionsRulebook.addRule(new Rule({ name: "Add Take Inventory Command Rule", firstPriority: Rule.PRIORITY_LOWEST, priority: Rule.PRIORITY_MEDIUM, code: (rulebook) => { Elements.HyperlinkHandler.addCommonAction("Inventory", new ActionInventory(WorldState.player)); } })); class ActionSaveGame extends Action { constructor() { super(...arguments); this.requiresTurn = false; this.requiresNoun = false; this.requiresVisibility = false; } getCommandText() { return "save to file"; } } ActionSaveGame.check = new Rulebook("Check Saving"); ActionSaveGame.carry = new Rulebook("Carry out Saving"); ActionSaveGame.carry.addRule(new Rule({ name: "Save the game", code: runner => { SaveHandler.saveToFile(); runner.noun.say.add("Saved."); } })); Elements.HyperlinkHandler.CommonActionsRulebook.addRule(new Rule({ name: "Add Save Command Rule", firstPriority: Rule.PRIORITY_LOWEST, priority: Rule.PRIORITY_LOWEST, code: (rulebook) => { Elements.HyperlinkHandler.addCommonAction("Save", new ActionSaveGame(WorldState.player)); } })); class ActionTalk extends Action { getCommandText() { return "talk to " + (this.getNoun(0) != undefined ? this.getNoun(0).getPrintedName() : ""); } } ActionTalk.PRIORITY_SITUATION_DIALOGUE = 9; ActionTalk.PRIORITY_POSSESSION_DIALOGUE = 7; ActionTalk.PRIORITY_LOCATION_DIALOGUE = 5; ActionTalk.PRIORITY_COMMON_DIALOGUE = 3; ActionTalk.PRIORITY_GLOBAL_DIALOGUE = 1; ActionTalk.check = new Rulebook("Check Talking"); ActionTalk.carry = new Rulebook("Carry out Talking"); ActionTalk.defaultCarryTalkingRule = ActionTalk.carry.createAndAddRule({ name: "Talking - Doesn't want to talk", firstPriority: -1, priority: -1, code: (rulebook) => { let action = rulebook.noun; let thing = action.getNoun(0); if (thing instanceof Person) { action.say = new Say("It doesn't look like ", new SayHeSheIt(thing), " wants to talk."); } else { action.say = new Say("How are you going to talk to that?"); } } }); Elements.HyperlinkHandler.HyperlinkingRulebook.addRule(new Rule({ name: "Hyperlink - Talk", firstPriority: Rule.PRIORITY_HIGHEST, code: (rulebook) => { let thing = rulebook.noun; if (thing instanceof Person && thing.getRoom() == WorldState.player.getRoom()) { Elements.HyperlinkHandler.addAvailableAction("Talk", new ActionTalk(WorldState.player, thing)); } } })); class ActionWait extends Action { constructor() { super(...arguments); this.requiresTurn = true; this.requiresNoun = false; this.requiresVisibility = false; } getCommandText() { return "wait"; } } ActionWait.check = new Rulebook("Check Waiting"); ActionWait.carry = new Rulebook("Carry out Waiting"); ActionWait.carry.addRule(new Rule({ name: "Print waiting message", code: runner => { if (runner.noun.actor == WorldState.player) { runner.noun.say.add("You wait."); } } })); Elements.HyperlinkHandler.CommonActionsRulebook.addRule(new Rule({ name: "Add Wait Command Rule", firstPriority: Rule.PRIORITY_HIGHEST, priority: Rule.PRIORITY_MEDIUM, code: (rulebook) => { Elements.HyperlinkHandler.addCommonAction("Wait", new ActionWait(WorldState.player)); } })); class ContentDescription { constructor(name, group) { this.saidCount = 0; this.name = name; this.group = group; } getScore() { return (this.group).getScore(); } getDescription(group) { this.saidCount++; if (typeof this.description == "function") { return this.description(this, group); } return this.description; } setDescription(description) { if (!(description instanceof Say)) { this.description = new Say(description); } else { this.description = description; } return this; } static pickDescriptions(cda, target) { let a = cda.slice(); let groups = []; for (let i = 0; i < a.length; i++) { let randomIndex = Math.floor(Math.random() * (a.length - i)) + i; let temp = a[i]; a[i] = a[randomIndex]; a[randomIndex] = temp; } a.sort((a, b) => { let scoreA = a.getScore() / (a.saidCount + 1); let scoreB = b.getScore() / (b.saidCount + 1); if (scoreA != scoreB) return scoreB - scoreA; return 0; }); a.forEach(description => { groups.push(description.group); }); let matches = target.matchAgainst(groups); if (matches != undefined) { let result = []; matches.forEach(i => { result.push(a[i].getDescription(target)); result.push(new Say(" ")); }); return result; } else { console.warn("No description available for", target); return [new Say("Warning: No description available for the current situation. Please report so it can be corrected.")]; } } } class ContentDifferential { constructor(...nouns) { this.nouns = []; this.score = 0; this.addNoun(...nouns); } addNoun(...nouns) { nouns.forEach(noun => { this.nouns.push(noun); }); this.score = this.getScore(); return this; } getNouns() { return this.nouns; } replaceNouns(...nouns) { this.nouns = nouns; return this; } isMatch(cd, allowPartial = false) { let check = this.getUnmatched(cd); if ((allowPartial || check.unmatched.length == 0) && check.matching.length == 0) { return true; } else if (check.matching.length == 0) { for (let i = 0; i < check.unmatched.length; i++) { if (!(check.unmatched[i] instanceof ContentMarker)) { return false; } else { if (check.unmatched[i].isImportant()) { return false; } } } return true; } return false; } getUnmatched(cd) { let unmatched = cd.nouns.slice(); let matching = this.nouns.slice(); for (let i = matching.length - 1; i >= 0; i--) { for (let k = unmatched.length - 1; k >= 0; k--) { if (ContentDifferential.compareNouns(matching[i], unmatched[k])) { unmatched.splice(k, 1); matching.splice(i, 1); break; } } } return { matching: matching, unmatched: unmatched }; } getScore() { let highest = 0; let count = this.nouns.length; this.nouns.forEach((noun) => { let level = ContentDifferential.getNounLevel(noun); if (highest < level) { highest = level; } }); return highest + (count / 100); } static getNounLevel(noun) { if (noun == undefined || noun == null) { return 0; } else if (typeof noun == "function") { if (noun.prototype instanceof Thing) { let specifity = 2; let parentClass = Object.getPrototypeOf(noun); while (parentClass != Thing) { specifity += 0.1; parentClass = Object.getPrototypeOf(parentClass); } return specifity; } else { return 2.5; } } else if (noun instanceof Thing) { return 4; } else if (noun instanceof ContentDifferential) { return 1; } else { return 0.5; } } static compareNouns(a, b) { if (a == undefined || a == null) { return true; } if (typeof a == "function") { return b == a || b instanceof a || (typeof b == "function" && b.prototype instanceof a); } else if (a instanceof Thing) { return b == a; } return a === b; } static isMatch(matchFrom, matchAgainst) { let unmatched = matchAgainst.slice(); let matching = matchFrom.slice(); for (let i = matching.length - 1; i >= 0; i--) { for (let k = unmatched.length - 1; k >= 0; k--) { if (matching[i].isMatch(unmatched[k])) { unmatched.splice(k, 1); matching.splice(i, 1); break; } } } if (unmatched.length == 0 && matching.length == 0) { return true; } else if (unmatched.length == 0) { for (let i = 0; i < matching.length; i++) { let nouns = matching[i].getNouns(); for (let k = 0; k < nouns.length; k++) { if (!(nouns[k] instanceof ContentMarker)) { return false; } else { if (nouns[k].isImportant()) { return false; } } } } return true; } return false; } } var ContentGroupMatch; (function (ContentGroupMatch) { ContentGroupMatch[ContentGroupMatch["NO_MATCH"] = 0] = "NO_MATCH"; ContentGroupMatch[ContentGroupMatch["PARTIAL_MATCH"] = 1] = "PARTIAL_MATCH"; ContentGroupMatch[ContentGroupMatch["PERFECT_MATCH"] = 2] = "PERFECT_MATCH"; })(ContentGroupMatch || (ContentGroupMatch = {})); class ContentGroup { constructor(...units) { this.units = []; units.forEach(unit => { this.addUnit(unit); }); } addUnit(unit) { this.units.push(unit); return this; } reset() { this.matching = this.units.slice(); } isMatching() { return this.matching.length; } setMatching(matching) { this.matching = matching; } isMatch(cg) { let unmatched = cg.matching.slice(); let matching = this.units.slice(); for (let i = matching.length - 1; i >= 0; i--) { for (let k = unmatched.length - 1; k >= 0; k--) { if (matching[i].isMatch(unmatched[k])) { unmatched.splice(k, 1); matching.splice(i, 1); break; } } } return { type: matching.length > 0 ? ContentGroupMatch.NO_MATCH : unmatched.length == 0 ? ContentGroupMatch.PERFECT_MATCH : ContentGroupMatch.PARTIAL_MATCH, unmatched: unmatched }; } getScore() { let score = 0; this.units.forEach(unit => { score += unit.getScore(); }); return Math.floor((score / this.units.length) * 10) + this.units.length; } matchAgainst(a) { let matches = []; this.reset(); for (let i = 0; i < a.length; i++) { let match = a[i].isMatch(this); if (match.type != ContentGroupMatch.NO_MATCH) { matches.push(i); this.setMatching(match.unmatched); } if (!this.isMatching()) { return matches; } } return undefined; } } class ContentMarker { constructor(name, important) { this.important = false; this.name = name; this.important = important == true; } isImportant() { return this.important; } } class ContentUnit { constructor() { this.categories = []; } addCategory(...nouns) { this.categories.push(new ContentDifferential(...nouns)); } isMatch(cu) { return ContentDifferential.isMatch(this.categories, cu.categories); } getScore() { let score = 0; this.categories.forEach(diff => { score += diff.score; }); return score / this.categories.length; } matchAgainst(a) { for (let i = 0; i < a.length; i++) { if (a[i].isMatch(this)) { return [i]; } } } } class CombatHit extends ContentMarker { } CombatHit.FULL_DODGE = new CombatHit("Full Dodge", true); CombatHit.PARTIAL_DODGE = new CombatHit("Partial Dodge", true); CombatHit.FULL_HIT = new CombatHit("Full Hit", true); class CombatDamage extends ContentMarker { } CombatDamage.LOW_DAMAGE = new CombatDamage("Low Damage"); CombatDamage.MEDIUM_DAMAGE = new CombatDamage("Medium Damage"); CombatDamage.HIGH_DAMAGE = new CombatDamage("High Damage"); class CombatResult extends ContentMarker { } CombatResult.KNOCKED = new CombatResult("Target was knocked down by the attack", true); CombatResult.KNOCKED_OFF = new CombatResult("Target was knocked off by the attack, becoming unconscious", true); CombatResult.KILLED = new CombatResult("Target was killed by this attack", true); class CombatUnit extends ContentUnit { constructor() { super(); this.actor = new ContentDifferential(Person); this.target = new ContentDifferential(Person); this.weapon = new ContentDifferential(Thing); this.markers = new ContentDifferential(); } setActor(it) { this.actor = new ContentDifferential(it); return this; } setTarget(it) { this.target = new ContentDifferential(it); return this; } setWeapon(it) { this.weapon = new ContentDifferential(it); return this; } addMarker(marker) { this.markers.addNoun(marker); return this; } getScore() { return this.actor.getScore() + this.target.getScore() + this.weapon.getScore() + this.markers.getScore(); } isMatch(cu) { if (cu instanceof CombatUnit) { return this.actor.isMatch(cu.actor) && this.target.isMatch(cu.target) && this.weapon.isMatch(cu.weapon) && this.markers.isMatch(cu.markers); } return false; } } class FuckingDescription extends ContentDescription { constructor(name) { super(name, new ContentGroup()); FuckingDescription.DESCRIPTIONS.push(this); } addUnit() { let unit = new FuckingUnit(); this.group.addUnit(unit); return unit; } } FuckingDescription.DESCRIPTIONS = []; class FuckingStyle extends ContentMarker { } FuckingStyle.GENTLE = new FuckingStyle("Gentle"); FuckingStyle.ROUGH = new FuckingStyle("Rough"); class FuckingState extends ContentMarker { } FuckingState.PENETRATING = new FuckingState("Penetration Start", true); FuckingState.NORMAL = new FuckingState("Normal fucking", true); FuckingState.SPEEDING_UP = new FuckingState("Speeding up", true); FuckingState.CUM_START = new FuckingState("Started Cumming", true); FuckingState.CUMMING = new FuckingState("Cumming", true); FuckingState.CUM_END = new FuckingState("Finished Cumming", true); class FuckingUnit extends ContentUnit { constructor() { super(); this.fucker = new ContentDifferential(Person); this.fucked = new ContentDifferential(Person); this.hole = new ContentDifferential(SexHole); this.stick = new ContentDifferential(SexStick); this.markers = new ContentDifferential(); } setFucker(it) { this.fucker = new ContentDifferential(it); return this; } setFucked(it) { this.fucked = new ContentDifferential(it); return this; } setHole(it) { this.hole = new ContentDifferential(it); return this; } setStick(it) { this.stick = new ContentDifferential(it); return this; } addMarker(marker) { this.markers.addNoun(marker); return this; } getScore() { return this.fucker.getScore() + this.fucked.getScore() + this.hole.getScore() + this.stick.getScore() + this.markers.getScore(); } isMatch(fu) { if (fu instanceof FuckingUnit) { return this.fucker.isMatch(fu.fucker) && this.fucked.isMatch(fu.fucked) && this.hole.isMatch(fu.hole) && this.stick.isMatch(fu.stick) && this.markers.isMatch(fu.markers); } return false; } } class BranchingOption { constructor(say, appearCondition) { this.previouslyPicked = false; this.say = say; this.appearCondition = appearCondition; } } class BranchingDialogue { constructor(...options) { this.options = []; this.addOptions(...options); } addOptions(...options) { this.options.push(...options); arrayUnique(this.options); } async getChosenOption() { let validOptions = []; for (let i = 0, value = this.options[i]; value != undefined; value = this.options[++i]) { if (value.appearCondition == undefined || (typeof value.appearCondition == "function" && value.appearCondition()) || value.appearCondition) { validOptions.push(value); } } let choiceButtons = []; for (let i = 0; i < validOptions.length; i++) { let value = validOptions[i]; let classes = ["choice"]; if (value.previouslyPicked) { classes.push("picked"); } choiceButtons.push((await value.say.getHTML("p", classes))[0]); } let PlayerInput = new Promise((resolve, reject) => { this.resolve = resolve; }); Controls.KeyHandler.reset(); for (let index = 0, value = choiceButtons[index]; value != undefined; value = choiceButtons[++index]) { Controls.KeyHandler.applyCode(value, Controls.KeyHandler.getFirstKeyCode()); value.addEventListener("click", (e) => { validOptions[index].previouslyPicked = true; this.resolve(validOptions[index]); e.preventDefault(); }); } await Elements.CurrentTurnHandler.print(...choiceButtons); let choice = await PlayerInput; await Elements.CurrentTurnHandler.unprint(...choiceButtons); return choice; } } var NodeType; (function (NodeType) { NodeType[NodeType["Node"] = 0] = "Node"; NodeType[NodeType["Tree"] = 1] = "Tree"; NodeType[NodeType["Text"] = 2] = "Text"; NodeType[NodeType["Set"] = 3] = "Set"; NodeType[NodeType["Choice"] = 4] = "Choice"; NodeType[NodeType["Branch"] = 5] = "Branch"; })(NodeType || (NodeType = {})); class DialogueNode { constructor(id) { this.type = NodeType.Node; this.id = id; } setName(name) { this.name = name; } setNext(next) { this.next = next; } getNext() { return this.next; } setChoices(choices) { this.choices = choices; } hasChoices() { return this.choices != undefined && this.choices.length > 0; } } class DialogueBranch extends DialogueNode { constructor() { super(...arguments); this.type = NodeType.Branch; this.variable = () => { return false; }; this.branchIds = []; this.branchConditions = []; } setVariable(varFunc) { this.variable = varFunc; } addBranch(targetid, valueFunc) { this.branchIds.push(targetid); this.branchConditions.push(valueFunc); } getNext() { let variable = this.variable(); for (let i = 0; i < this.branchIds.length; i++) { let comparing = this.branchConditions[i](); if (comparing == variable) { return this.branchIds[i]; } } return this.next; } } class DialogueText extends DialogueNode { constructor() { super(...arguments); this.type = NodeType.Text; } setSay(sayCreator) { this.sayCreator = sayCreator; } getSay() { return this.sayCreator(); } } class DialogueChoice extends DialogueText { constructor() { super(...arguments); this.type = NodeType.Choice; this.conditions = () => { return true; }; } isAvailable() { return this.conditions(); } setConditions(conditions) { this.conditions = conditions; } } class DialogueNodeTree extends DialogueNode { constructor() { super(...arguments); this.type = NodeType.Tree; } setTree(treeFinder) { this.tree = treeFinder; } } class DialogueSet extends DialogueNode { constructor() { super(...arguments); this.type = NodeType.Set; } setFunction(code) { this.code = code; } run() { return this.code(); } } class DialogueTree { constructor(id) { this.nodes = {}; this.startNode = undefined; this.repeatChoices = true; this.id = id; } addNode(node) { this.nodes[node.id] = node; if (node.type == NodeType.Node) { this.nodes[node.name] = node; } } addStartNode(node) { this.addNode(node); this.startNode = node; } getNode(id) { return this.nodes[id]; } getNext(node) { let next = node.getNext(); if (next != undefined) { return this.getNode(next); } } setRepeatChoices(doIt) { this.repeatChoices = doIt; } async execute(startId) { console.debug(Rulebook.getIndentation() + "[DialogueTree] Running " + this.id); Rulebook.increaseIndentation(this); let node; if (startId == undefined) { node = this.startNode; } else { node = this.getNode(startId); } if (node == undefined) { Elements.CurrentTurnHandler.printAsError("Unable to start dialogue " + this.id + ": A starting node could not be found."); return; } let previousNode; while (node != undefined) { let nextNode = await this.processNode(node, previousNode); previousNode = node; node = nextNode; } Rulebook.decreaseIndentation(); } async processNode(node, previousNode) { console.debug(Rulebook.getIndentation() + "[" + node.type + "] " + node.id); Rulebook.increaseIndentation(node); let doChoices = node.hasChoices(); if (node.type == NodeType.Tree) { await node.tree().execute(); } else if (node.type == NodeType.Text) { let say = node.getSay(); Elements.CurrentTurnHandler.printAsContent(say); } else if (node.type == NodeType.Set) { let runningSet = node.run(); if (runningSet instanceof Promise) { await runningSet; } } if (doChoices) { let branchingDialogue = new BranchingDialogue(); let choices = node.choices; let options = []; for (let i = 0; i < choices.length; i++) { let choice = this.getNode(choices[i]); let branchingOption = new BranchingOption(choice.getSay(), choice.isAvailable()); options.push(branchingOption); branchingDialogue.addOptions(branchingOption); } let chosenOption = await branchingDialogue.getChosenOption(); let chosenNodeId = choices[options.indexOf(chosenOption)]; let chosenNode = this.getNode(chosenNodeId); if (this.repeatChoices) { let say = new Say(new SayBold(" > ", chosenNode.getSay())); this.lastPrintedChoice = await Elements.CurrentTurnHandler.getSayElementsAsContent(say); await Elements.CurrentTurnHandler.print(...this.lastPrintedChoice); } console.debug(Rulebook.getIndentation() + "[Choice] Picked " + chosenNodeId); console.debug(Rulebook.getIndentation() + "[Choice] Going to " + chosenNode.getNext()); Rulebook.increaseIndentation(chosenNodeId); Rulebook.decreaseIndentation(); Rulebook.decreaseIndentation(); return this.getNext(chosenNode); } else { Rulebook.decreaseIndentation(); return this.getNext(node); } } unprintLastChoice() { Elements.CurrentTurnHandler.unprint(...this.lastPrintedChoice); } } var DialogueTrees; (function (DialogueTrees) { function findUnusedTrees() { let allCode = document.getElementById("appCode").innerHTML; let useCount = {}; let unused = []; for (let dialogueName in DialogueTrees) { if (dialogueName != "findUnusedTrees") { let count = occurrences(allCode, "DialogueTrees." + dialogueName, false) - 1; if (count > 0) { useCount[dialogueName] = count; } else { unused.push(dialogueName); } } } for (let dialogueName in useCount) { let times = useCount[dialogueName]; console.debug("[DialogueUsage] " + dialogueName + " is referenced " + times + (times > 1 ? " times." : " time.")); } for (let i = 0; i < unused.length; i++) { console.error("[DialogueUsage] " + unused[i] + " is never referenced and will not appear in-game."); } } DialogueTrees.findUnusedTrees = findUnusedTrees; function occurrences(string, subString, allowOverlapping) { string += ""; subString += ""; if (subString.length <= 0) return (string.length + 1); var n = 0, pos = 0, step = allowOverlapping ? 1 : subString.length; while (true) { pos = string.indexOf(subString, pos); if (pos >= 0) { ++n; pos += step; } else break; } return n; } })(DialogueTrees || (DialogueTrees = {})); class RoomRandom extends Room { constructor(id, fodder) { super(id, fodder); this.connectableOn = [Direction.NORTH, Direction.SOUTH, Direction.EAST, Direction.WEST]; this.randomizable = true; this.placed = false; this.appearChance = 75; this.extraConnectionChance = 75; this.backgroundImage = "tomato"; } getBackgroundClass() { if (this.isImageDefined()) { return this.backgroundImage; } return "tomato"; } isImageDefined() { try { for (var i = 0; i < document.styleSheets.length; i++) { var rules = document.styleSheets[i]['rules'] || document.styleSheets[i]['cssRules']; for (var x in rules) { if (typeof rules[x].selectorText == 'string' && rules[x].selectorText == "." + this.backgroundImage) { return true; } } } return false; } catch (e) { console.warn("Unable to read image"); return true; } } isConnectableOn(oppositeDirection) { return this.connectableOn.indexOf(oppositeDirection) != -1; } getAnyDirection(options) { let directionShuffler = new Shuffler(this.connectableOn); for (let direction = directionShuffler.getOne(); direction != undefined; direction = directionShuffler.getOne()) { let oppositeDirection = OppositeDirection[Direction[direction]]; let otherCoordinates = options.map.getCoordinates(options.otherRoom); let wouldbeCoordinates = Room.shift(otherCoordinates, oppositeDirection); let trickyOptions = { otherRoom: options.otherRoom, otherRoomDirection: oppositeDirection, trickyRoomDirection: direction, map: options.map, region: options.region, x: wouldbeCoordinates[0], y: wouldbeCoordinates[1] }; if (this.isPlaceable(trickyOptions)) { return trickyOptions; } } } isPlaceable(options) { if (!this.isConnectableOn(options.trickyRoomDirection) || !options.map.isFree(options.x, options.y)) { return false; } if (options.otherRoom == undefined || !options.otherRoom.isConnectableOn(options.otherRoomDirection)) { return false; } if (this.trickyCode != undefined) { return this.trickyCode(options); } return true; } getDistanceTo(room) { let myCoordinates = this.lastMap.getCoordinates(this); let otherCoordinates = this.lastMap.getCoordinates(room); if (myCoordinates != undefined && otherCoordinates != undefined) { let c1 = myCoordinates; let c2 = otherCoordinates; return Math.abs(c1[0] - c2[0]) + Math.abs(c1[1] - c2[1]); } } findPathTo(pathEnd, validRoom) { validRoom = validRoom == undefined ? () => { return true; } : validRoom; let map = this.lastMap; let endPosition = map.getCoordinates(pathEnd); let open = []; let distance = (c1, c2) => { return Math.abs(c1[0] - c2[0]) + Math.abs(c1[1] - c2[1]); }; let neighbors = (room, x, y) => { let neighs = []; for (let direction = 0; direction < room.connections.length; direction++) { let otherRoom = room.connections[direction]; if (otherRoom != undefined && open.indexOf(otherRoom) == -1 && validRoom(otherRoom)) { let dirCoordinates = Room.shift([x, y], direction); let dir = [otherRoom, dirCoordinates, distance(endPosition, dirCoordinates)]; neighs.push(dir); } } return neighs.sort((a, b) => { return a[2] - b[2]; }); }; let shortestPath = { length: map.getRoomCount() }; let noPath = shortestPath; let cPath = []; let findPath = (myArray) => { let room = myArray[0]; cPath.push(myArray); if (room == pathEnd) { if (shortestPath.length >= cPath.length) { shortestPath = cPath.slice(0); } } else if (shortestPath.length > (cPath.length)) { open.push(room); let otherRooms = neighbors(room, myArray[1][0], myArray[1][1]); for (let i = 0; i < otherRooms.length; i++) { if ((cPath.length + 1) < shortestPath.length) { findPath(otherRooms[i]); } } open.pop(); } cPath.pop(); }; findPath([this, map.getCoordinates(this)]); return shortestPath != noPath ? shortestPath : undefined; } getBestDirectionTo(otherRoom, validRoom) { let path = this.findPathTo(otherRoom, validRoom); if (path != undefined) { if (path.length == 1) { return undefined; } return this.connections.indexOf(path[1][0]); } } getAStarPathTo(otherRoom, validRoom) { validRoom = validRoom != undefined ? validRoom : () => { return true; }; let distance = (c1, c2) => { return Math.abs(c1[0] - c2[0]) + Math.abs(c1[1] - c2[1]); }; let isVisited = (room) => { return visited.indexOf(room) != -1; }; let getNeighbors = (node) => { let neighbors = []; for (let direction = 0; direction < node.room.connections.length; direction++) { if (node.room.connections[direction] != undefined && !isVisited(node.room.connections[direction]) && validRoom(node.room.connections[direction])) { let coordinates = Room.shift(node.coordinates, direction); neighbors.push({ room: node.room.connections[direction], coordinates: coordinates, distance: distance(coordinates, endNode.coordinates) }); visited.push(node.room.connections[direction]); } } return neighbors; }; let getClosestPath = () => { let shortest = 0; for (let i = 1; i < open.length; i++) { let lastPoint = open[i][open[i].length - 1]; if (lastPoint.distance < open[shortest][open[shortest].length - 1].distance) { shortest = i; } } return shortest; }; let endNode = { room: otherRoom, coordinates: this.lastMap.getCoordinates(otherRoom), distance: 0 }; let startCoordinates = this.lastMap.getCoordinates(this); let startNode = { room: this, coordinates: startCoordinates, distance: distance(startCoordinates, endNode.coordinates) }; let open = [[startNode]]; let closed = []; let shortestPath = this.lastMap.getRoomCount(); let shortestIndex; let myPath; let closest = 0; let visited = [this]; while (open.length > 0) { myPath = open.splice(closest, 1)[0]; if (myPath[myPath.length - 1].distance == 0) { let push = closed.push(myPath); if (myPath.length < shortestPath) { shortestPath = myPath.length; shortestIndex = push - 1; } break; } else { let neighbors = getNeighbors(myPath[myPath.length - 1]); for (let i = 0; i < neighbors.length; i++) { open.push(myPath.concat([neighbors[i]])); } } for (let i = open.length - 1; i >= 0; i--) { if (open[i].length >= shortestPath) { open.splice(i, 1); } } closest = getClosestPath(); } return closed[shortestIndex]; } getAStarBestDirectionTo(otherRoom, validRoom) { let path = this.getAStarPathTo(otherRoom, validRoom); if (path != undefined) { if (path.length == 1) { return undefined; } return this.connections.indexOf(path[1].room); } } getConnectedDirection() { let shuffler = new Shuffler(Room.DIRECTIONS); for (let direction = shuffler.getOne(); direction != undefined; direction = shuffler.getOne()) { if (this.connections[direction] != undefined) { return direction; } } } static getActive(type) { } } class RoomRandomMap { constructor() { this.positionTable = {}; this.roomMap = new Map(); this.lowestX = 0; this.lowestY = 0; this.highestX = 0; this.highestY = 0; this.limitsInvalid = false; } emptyCache() { this.availableConnections = []; Room.DIRECTIONS.forEach(() => { this.availableConnections.push([]); }); this.rooms = 0; } getAvailableConnections() { return this.availableConnections.reduce((previousValue, currentValue, currentIndex, array) => { return previousValue + (currentValue.length); }, 0); } removeFromCache(coordinatesToRemove, direction) { let directionArray = this.availableConnections[direction]; for (let k = 0, coordinates = directionArray[k]; coordinates != undefined; coordinates = directionArray[++k]) { if (coordinates.x == coordinatesToRemove.x && coordinates.y == coordinatesToRemove.y) { directionArray.splice(k, 1); return; } } } addToCache(coordinatesToAdd, direction) { let directionArray = this.availableConnections[direction]; for (let k = 0, coordinates = directionArray[k]; coordinates != undefined; coordinates = directionArray[++k]) { if (coordinates.x == coordinatesToAdd.x && coordinates.y == coordinatesToAdd.y) { return; } } directionArray.push(coordinatesToAdd); } getAnyFromCache(direction) { let array = this.availableConnections[direction]; if (array.length > 0) { let randomIndex = Math.floor(Math.random() * (array.length)); let randomCoordinates = array[randomIndex]; if (randomCoordinates != undefined) { return this.getRoom(randomCoordinates.x, randomCoordinates.y); } } } isFree(x, y) { return (this.positionTable[x] == undefined || this.positionTable[x][y] === undefined); } block(x, y) { if (this.isFree(x, y)) { if (this.positionTable[x] == undefined) { this.positionTable[x] = {}; } this.positionTable[x][y] = null; this.updateCacheOnPosition(x, y); this.updateLimits(x, y); } } updateAllLimits() { this.highestX = 0; this.highestY = 0; this.lowestX = 0; this.lowestY = 0; for (let x in this.positionTable) { for (let y in this.positionTable[x]) { if (this.positionTable[x][y] != undefined && this.positionTable[x][y] != null) { this.updateLimits(parseInt(x), parseInt(y)); } } } this.limitsInvalid = false; } updateLimits(x, y) { if (x > this.highestX) this.highestX = x; if (y > this.highestY) this.highestY = y; if (y < this.lowestY) this.lowestY = y; if (x < this.lowestX) this.lowestX = x; } map(room, x, y) { if (this.positionTable[x] == undefined) { this.positionTable[x] = {}; } this.positionTable[x][y] = room; this.roomMap.set(room, [x, y]); this.updateCacheOnPosition(x, y); this.updateLimits(x, y); room.placed = true; room.lastMap = this; this.rooms++; } unmap(x, y) { if (this.positionTable[x] != undefined && this.positionTable[x][y] != undefined) { this.roomMap.delete(this.positionTable[x][y]); delete (this.positionTable[x][y]); this.rooms--; this.updateCacheOnPosition(x, y); this.limitsInvalid = true; } } updateCacheOnPosition(x, y) { let coordinates = [x, y, 0]; let coordinatesMap = { x: x, y: y }; let coordinatesBlocked = !this.isFree(x, y); let coordinatesRoom = this.getRoom(x, y); Room.DIRECTIONS.forEach(direction => { let oppositeDirection = OppositeDirection[Direction[direction]]; let shifted = Room.shift(coordinates, direction); let shiftedMap = { x: shifted[0], y: shifted[1] }; let shiftedBlocked = !this.isFree(shifted[0], shifted[1]); let shiftedRoom = this.getRoom(shifted[0], shifted[1]); if (coordinatesRoom != undefined) { if (shiftedBlocked) { this.removeFromCache(coordinatesMap, direction); } else if (coordinatesRoom.isConnectableOn(direction)) { this.addToCache(coordinatesMap, direction); } } else { this.removeFromCache(coordinatesMap, direction); } if (shiftedRoom != undefined) { if (coordinatesBlocked) { this.removeFromCache(shiftedMap, oppositeDirection); } else if (shiftedRoom.isConnectableOn(oppositeDirection)) { this.addToCache(shiftedMap, oppositeDirection); } } else { this.removeFromCache(shiftedMap, oppositeDirection); } }); } getRoom(x, y) { if (this.positionTable[x] != undefined) { if (this.positionTable[x][y] != null) { return this.positionTable[x][y]; } } return undefined; } getCoordinates(room) { return this.roomMap.get(room); } getRoomCount() { return this.roomMap.size; } getWidth() { return this.highestX - this.lowestX; } getHeight() { return this.highestY - this.lowestY; } getPreferredGrowth() { let ratio = this.getHeight() / this.getWidth(); let idealRatio = 2.5; let difference = Math.abs(ratio - idealRatio); if (difference < 0.5) { return RoomRandomMap.PREFERRED_GROWTH_ANY; } else { if (ratio < idealRatio) { return RoomRandomMap.PREFERRED_GROWTH_VERTICAL; } else { return RoomRandomMap.PREFERRED_GROWTH_HORIZONTAL; } } } static isDirectionPreferred(direction, growth) { if (growth == RoomRandomMap.PREFERRED_GROWTH_ANY) { return true; } else if (direction == Direction.NORTH || direction == Direction.SOUTH) { return growth == RoomRandomMap.PREFERRED_GROWTH_VERTICAL; } else { return growth == RoomRandomMap.PREFERRED_GROWTH_HORIZONTAL; } } } RoomRandomMap.PREFERRED_GROWTH_HORIZONTAL = 0; RoomRandomMap.PREFERRED_GROWTH_VERTICAL = 1; RoomRandomMap.PREFERRED_GROWTH_ANY = 2; class ShufflerDirection extends Shuffler { constructor(array, preferredGrowth, rng) { super(array, rng); this.runner = 0; this.preferredGrowth = preferredGrowth; let goodDirections = []; let badDirections = []; for (let direction = this.getOne(); direction != undefined; direction = this.getOne()) { if (RoomRandomMap.isDirectionPreferred(direction, this.preferredGrowth)) { goodDirections.push(direction); } else { badDirections.push(direction); } } this.directionsArray = goodDirections.concat(badDirections); } getDirection() { return this.directionsArray[this.runner++]; } } class RoomRandomFodder extends RoomRandom { constructor(id) { super(id, true); } } class RegionRandom extends Region { constructor(name, map) { super(name); this.randomized = false; this.fodderRoomClass = RoomRandomFodder; this.placedRooms = []; this.map = map == undefined ? new RoomRandomMap() : map; } async randomize() { if (!this.randomized) { await RegionRandom.rulebookRandomizeRegion.execute({ noun: this }); } } } RegionRandom.rng = () => { return Math.random(); }; RegionRandom.rulebookRandomizeRegion = new Rulebook("Randomizing Random Region something"); RegionRandom.rulebookPlaceRoom = new Rulebook("Placing Random Room something"); RegionRandom.rulebookBeforePlaceRoom = new Rulebook("Before placing Random Room something"); RegionRandom.rulebookAfterPlaceRoom = new Rulebook("After placing Random Room something"); RegionRandom.ruleFirstRandomizeRegion = RegionRandom.rulebookRandomizeRegion.createAndAddRule({ name: "Empty map cache to start randomizing region", firstPriority: Rule.PRIORITY_HIGHEST, code: runner => { let region = runner.noun; region.map.emptyCache(); } }); RegionRandom.ruleBasicRandomizeRegion = RegionRandom.rulebookRandomizeRegion.createAndAddRule({ name: "Randomize all unplaced, randomizable rooms in region something", code: async (runner) => { let region = runner.noun; let roomShuffler = new Shuffler(Region.InRelation.getAllRightTypes(region, RoomRandom).filter((room) => { return room.randomizable && !room.placed && (room == WorldState.player.getRoom() || (RegionRandom.rng() * 100) <= room.appearChance); }), RegionRandom.rng); for (let room = roomShuffler.getOne(); room != undefined; room = roomShuffler.getOne()) { while (region.map.rooms > 0 && region.map.getAvailableConnections() < 4) { let fodder = new region.fodderRoomClass(); let options = { map: region.map, room: fodder, region: region }; region.place(fodder); await RegionRandom.rulebookBeforePlaceRoom.execute({ noun: options }); await RegionRandom.rulebookPlaceRoom.execute({ noun: options }); await RegionRandom.rulebookAfterPlaceRoom.execute({ noun: options }); } let options = { map: region.map, room: room, region: region }; await RegionRandom.rulebookBeforePlaceRoom.execute({ noun: options }); await RegionRandom.rulebookPlaceRoom.execute({ noun: options }); await RegionRandom.rulebookAfterPlaceRoom.execute({ noun: options }); if (!room.placed) { Elements.CurrentTurnHandler.printAsError(new Say("Was unable to place room ", room, ". Game might be unplayable.")); } } } }); RegionRandom.ruleAddExtraConnections = RegionRandom.rulebookRandomizeRegion.createAndAddRule({ firstPriority: Rule.PRIORITY_LOWEST, name: "Add extra connections to rooms in region", code: runner => { let region = runner.noun; let placedRooms = Region.InRelation.getAllRightTypes(region, RoomRandom).filter((room) => { return room.randomizable && room.placed; }); placedRooms.forEach((room) => { let myCoordinates = region.map.getCoordinates(room); let directionShuffler = new Shuffler(room.connectableOn.slice(0), RegionRandom.rng); for (let direction = directionShuffler.getOne(); direction != undefined && (RegionRandom.rng() * 100) <= room.extraConnectionChance; direction = directionShuffler.getOne()) { if (room.connections[direction] == undefined) { let otherCoordinates = Room.shift(myCoordinates, direction); let otherRoom = region.map.getRoom(otherCoordinates[0], otherCoordinates[1]); if (otherRoom != undefined && otherRoom.randomizable && otherRoom.isConnectableOn(OppositeDirection[Direction[direction]]) && (RegionRandom.rng() * 100) <= otherRoom.extraConnectionChance) { room.mapRoom(otherRoom, direction); } } } }); } }); RegionRandom.rulePlaceFirstRoom = RegionRandom.rulebookPlaceRoom.createAndAddRule({ name: "Placing First room something", firstPriority: Rule.PRIORITY_HIGHEST, code: runner => { let placingOptions = runner.noun; if (placingOptions.map.isFree(0, 0)) { placingOptions.map.map(placingOptions.room, 0, 0); return true; } }, conditions: runner => { return runner.noun.map.rooms == 0; } }); RegionRandom.rulePlaceNonTrickyRoom = RegionRandom.rulebookPlaceRoom.createAndAddRule({ name: "Placing non-tricky room something", firstPriority: Rule.PRIORITY_HIGH, code: runner => { let placingOptions = runner.noun; let preferredGrowthDirection = placingOptions.map.getPreferredGrowth(); let directionShuffler = new ShufflerDirection(placingOptions.room.connectableOn, preferredGrowthDirection); for (let direction = directionShuffler.getDirection(); direction != undefined; direction = directionShuffler.getDirection()) { let oppositeDirection = OppositeDirection[Direction[direction]]; let connectableRoom = placingOptions.map.getAnyFromCache(oppositeDirection); if (connectableRoom != undefined) { let otherCoordinates = placingOptions.map.getCoordinates(connectableRoom); let myCoordinates = Room.shift(otherCoordinates, oppositeDirection); placingOptions.room.mapRoom(connectableRoom, direction); placingOptions.map.map(placingOptions.room, myCoordinates[0], myCoordinates[1]); return true; } } }, conditions: runner => { return runner.noun.room.trickyCode == undefined; } }); RegionRandom.rulePlaceTrickyRoom = RegionRandom.rulebookPlaceRoom.createAndAddRule({ name: "Placing tricky room something", code: runner => { let placingOptions = runner.noun; let placedRooms = placingOptions.region.getRooms().filter((room) => { return room instanceof RoomRandom && room.placed; }); if (placedRooms.length == 0) { Elements.CurrentTurnHandler.printAsError("Unable to place room " + placingOptions.room.getPrintedName() + ": There are no rooms to connect to!"); return false; } let roomShuffler = new Shuffler(placedRooms, RegionRandom.rng); for (let connectableRoom = roomShuffler.getOne(); connectableRoom != undefined; connectableRoom = roomShuffler.getOne()) { let trickier = { region: placingOptions.region, map: placingOptions.map, otherRoom: connectableRoom }; let tricky = placingOptions.room.getAnyDirection(trickier); if (tricky != undefined) { placingOptions.room.mapRoom(connectableRoom, tricky.trickyRoomDirection); placingOptions.map.map(placingOptions.room, tricky.x, tricky.y); return true; } } let connectableThroughFodder = (fodderStep, connectingRoom) => { let trickier = { region: placingOptions.region, map: placingOptions.map, otherRoom: connectingRoom }; if (fodderStep == 0) { return placingOptions.room.getAnyDirection(trickier); } else { let newFodder = new (placingOptions.region.fodderRoomClass)(); let preferredGrowthDirection = placingOptions.map.getPreferredGrowth(); let directionShuffler = new ShufflerDirection(placingOptions.room.connectableOn, preferredGrowthDirection); for (let direction = directionShuffler.getDirection(); direction != undefined; direction = directionShuffler.getDirection()) { let oppositeDirection = OppositeDirection[Direction[direction]]; let otherCoordinates = placingOptions.map.getCoordinates(connectingRoom); let wouldbeCoordinates = Room.shift(otherCoordinates, oppositeDirection); let fodderTricky = { otherRoom: connectingRoom, otherRoomDirection: oppositeDirection, trickyRoomDirection: direction, map: placingOptions.map, region: placingOptions.region, x: wouldbeCoordinates[0], y: wouldbeCoordinates[1] }; if (newFodder.isPlaceable(fodderTricky)) { newFodder.mapRoom(connectingRoom, fodderTricky.trickyRoomDirection); placingOptions.map.map(newFodder, fodderTricky.x, fodderTricky.y); let nextTricky = connectableThroughFodder(fodderStep - 1, newFodder); if (nextTricky != undefined) { placingOptions.region.place(newFodder); return nextTricky; } else { newFodder.unmapRoom(fodderTricky.trickyRoomDirection); placingOptions.map.unmap(fodderTricky.x, fodderTricky.y); } } } } }; for (let fodderLevel = 1; fodderLevel < 10; fodderLevel++) { roomShuffler.restart(); for (let connectableRoom = roomShuffler.getOne(); connectableRoom != undefined; connectableRoom = roomShuffler.getOne()) { let tricky = connectableThroughFodder(fodderLevel, connectableRoom); if (tricky != undefined) { placingOptions.room.mapRoom(tricky.otherRoom, tricky.trickyRoomDirection); placingOptions.map.map(placingOptions.room, tricky.x, tricky.y); return true; } } } Elements.CurrentTurnHandler.printAsError("Unable to place room " + placingOptions.room.getPrintedName() + ": All attempts failed"); return false; } }); class SavedEvent extends StoredVariable { constructor(options) { super(options); this.description = options.description; this.getValueDescription = options.valueDescription; } getDescription() { return this.description; } } let EVENT_ORC_CHIEF_KILLED = new SavedEvent({ id: "EVENT_ORC_CHIEF_KILLED", description: "Describer whether the orc chief is alive or dead.", value: false, valueDescription: (value) => { if (EVENT_ORC_CHIEF_KILLED.value) { return "The orc chief has been killed."; } else { return "The orc chief is alive."; } } }); class Dice { constructor(testString) { this.range = [0, 0, 1, 1]; this.minResult = 0; this.testString = testString; } roll(stat) { let rng = this.range.slice(); if (stat >= 10) { rng.push(2, 1); } else if (stat >= 7) { rng.push(1, 1); } else if (stat >= 4) { rng.push(1); } let results = []; for (let i = 0; i < stat; i++) { let index = Math.floor(Math.random() * (rng.length)); results.push(rng[index]); } return results; } static sum(a, b) { return a + b; } getSay(results) { let finalResult = results.reduce(Dice.sum); return new Say(new SayBold("[", this.testString, "] "), " = [", results.join("] ["), "]", results.length == 1 ? "" : (" = " + finalResult)); } static testAgainstRoll(player, enemy) { let playerDice = new Dice(player.name); let playerResult = playerDice.roll(player.value); let enemyDice = new Dice(enemy.name); let enemyResult = enemyDice.roll(enemy.value); return playerResult.reduce(Dice.sum) - enemyResult.reduce(Dice.sum); } static testAgainstDifficulty(player, difficulty) { let playerDice = new Dice(player.name); let playerResult = playerDice.roll(player.value); return playerResult.reduce(Dice.sum) - difficulty; } } class DiceCommon extends Dice { constructor() { super(...arguments); this.range = [-1, 0, 0, 0, 1, 1, 1]; this.minResult = -1; } static testAgainstRoll(player, enemy) { let playerDice = new DiceCommon(player.name); let playerResult = playerDice.roll(player.value); let enemyDice = new DiceCommon(enemy.name); let enemyResult = enemyDice.roll(enemy.value); return playerResult.reduce(Dice.sum) - enemyResult.reduce(Dice.sum); } static testAgainstDifficulty(player, difficulty) { let playerDice = new DiceCommon(player.name); let playerResult = playerDice.roll(player.value); return playerResult.reduce(Dice.sum) - difficulty; } } class DiceDangerous extends Dice { constructor() { super(...arguments); this.range = [-2, -1, 0, 0, 0, 0, 1, 1, 1, 1]; this.minResult = -2; } static testAgainstRoll(player, enemy) { let playerDice = new DiceDangerous(player.name); let playerResult = playerDice.roll(player.value); let enemyDice = new DiceDangerous(enemy.name); let enemyResult = enemyDice.roll(enemy.value); return playerResult.reduce(Dice.sum) - enemyResult.reduce(Dice.sum); } static testAgainstDifficulty(player, difficulty) { let playerDice = new DiceDangerous(player.name); let playerResult = playerDice.roll(player.value); return playerResult.reduce(Dice.sum) - difficulty; } } class Liquid extends Thing { constructor(options) { super(options); options = options == undefined ? {} : options; if (options.taste != undefined) { this.taste = options.taste; } else { this.taste = new OneOf(OneOf.ROTATING_RANDOM, "It goes easily through your throat with no particular taste.", "You taste nothing as it softly slides through your tongue."); } } static async mix(container) { let result = await Liquid.rulebookMixing.execute({ noun: container }); if (result != undefined) { let finalQuantity = result.quantityMultiplier != undefined ? (result.quantityMultiplier * container.liquidContents.length) : (container.liquidContents.length); container.liquidContents = new Array(finalQuantity); for (let i = 0; i < finalQuantity; i++) { container.liquidContents[i] = result.result; } } } static getMixtures() { if (Liquid.sortedMixtures) { return Liquid.mixtures; } Liquid.mixtures.sort((a, b) => { if (b.firstPriority < a.firstPriority) return -1; if (a.firstPriority < b.firstPriority) return 1; if (b.priority < a.priority) return -1; if (a.priority < b.priority) return 1; return 0; }); Liquid.sortedMixtures = true; return Liquid.mixtures; } static addMixture(mixture) { Liquid.mixtures.push(mixture); Liquid.sortedMixtures = false; } } Liquid.rulebookMixing = new Rulebook("Mixing the liquid contents of something"); Liquid.mixtures = []; Liquid.sortedMixtures = false; Liquid.ruleDefaultMixing = Liquid.rulebookMixing.createAndAddRule({ name: "Mixing through Mixtures", code: runner => { if (runner.noun.liquidContents.length == 0) { return; } let mixture; for (let i = 0; i < Liquid.mixtures.length; i++) { mixture = Liquid.mixtures[i]; let proportions = []; let mixtureIterator = mixture.quantities.entries(); for (let mixtureLiquid = mixtureIterator.next(); !mixtureLiquid.done; mixtureLiquid = mixtureIterator.next()) { let mixtureType = mixtureLiquid.value[0]; let mixtureQuantity = mixtureLiquid.value[1]; let matchedQuantity = 0; runner.noun.liquidContents.forEach((liquidType) => { try { if (liquidType == mixtureType || (typeof mixtureType == "function" && (liquidType instanceof mixtureType || mixtureType(liquidType)))) { matchedQuantity++; } } catch (e) { } }); proportions.push(matchedQuantity / mixtureQuantity); } if (proportions.every(function (element, index, array) { return element === array[0]; })) { return mixture; } } } }); class Scenery extends Thing { constructor() { super(...arguments); this.fixedInPlace = true; this.scenery = true; } } class OrcDebugger extends Humanoid { constructor() { super({ isMale: true, name: (() => { let nameMod = OrcDebugger.nameModifier.getOne(); if (nameMod == undefined) { nameMod = (OrcDebugger.counter++).toString(); } return nameMod + " Orc"; })(), unique: true, description: "This is one extremely ugly fellow." }); this.AI.wanderer = true; this.AI.picksShinies = true; } } OrcDebugger.nameModifier = new Shuffler([ "Ugly", "Muscular", "Veiny", "Angry", "Sad", "Smart", "Agile", "Short", "Bulging", "Intense", "Smouldering" ]); OrcDebugger.counter = 1; ActionTalk.carry.createAndAddRule({ name: "Talking to the orc", firstPriority: ActionTalk.PRIORITY_GLOBAL_DIALOGUE, priority: ActionTalk.PRIORITY_COMMON_DIALOGUE, conditions: (runner) => { return runner.noun.getNoun(0) instanceof OrcDebugger; }, code: (runner) => { let orc = runner.noun.getNoun(0); let result = Dice.testAgainstRoll({ name: "Charm + 2", value: WorldState.player.getStat(Attributes.Charm) + 2 }, { name: "Orc's wits + 2", value: orc.getStat(Attributes.Intelligence) + 2 }); if (result > 0) { Elements.CurrentTurnHandler.printAsContent(new Say("You win!")); } else { Elements.CurrentTurnHandler.printAsContent(new Say("You lose.")); } return true; } }); class Semen extends Liquid { constructor(cummer, options) { super(options); this.cummer = cummer; } } var rooma = new RoomRandom("Room A"); rooma.description = new Say("You are inside a box of metal painted blue. Your head almost touches the ceiling, making the room look smaller than it really is.", Say.LINE_BREAK, new SayIf(() => { return Thing.InsideRoomRelation.getLeft(vase) == rooma || Thing.InsideRoomRelation.getLeft(urn) == rooma; }, " Still, there are some things thrown about.")); PlayBegins.setStartingRoom(rooma); let paddedBra = new Clothing({ name: "Padded Bra", unique: true }); paddedBra.breastPadding = 3; paddedBra.slots = [Humanoid.SLOT_BREASTS]; let paddedUnderwear = new Clothing({ name: "Padded Underwear", unique: true }); paddedUnderwear.crotchPadding = 15; paddedUnderwear.slots = [Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_CROTCH_FRONT]; let player = WorldState.player; WorldState.player = player; var vase = new Thing({ name: "Vase" }); vase.description = new Say("This is an ornamental vase that'd look very nice on your lap. Why? Who knows."); rooma.place(vase); let mapOfTest = new MapNote({ name: "Map of this Region", description: "This is a simple map showing all the rooms here.", unique: true }); rooma.place(mapOfTest); let urn = new Thing({ unique: true, name: "Urn of Dreams", image: "image001" }); urn.description = new Say("This appears to be a simple, black urn containing the ashes of your dreams."); rooma.place(urn); var roomb = new RoomRandom("Room B"); roomb.place(vase); let frillyPouch = new CoinPouch({ name: "Frilly Pouch", description: new Say("This is a very gay little pink pouch full of little hearts.") }); frillyPouch.addCoins(502); rooma.place(frillyPouch); let bigSack = new CoinPouch({ name: "Big Sack" }); bigSack.addCoins(100); rooma.place(bigSack); let region = new RegionRandom("Test Region"); region.place(rooma, roomb); for (let i = 1; i < 6; i++) { let room = new RoomRandom("Room " + i.toString()); region.place(room); if (Math.random() > 0.5) { } } mapOfTest.addRegion(region); let southestRoom = new RoomRandom("Southest Room"); region.place(southestRoom); southestRoom.appearChance = 100; southestRoom.backgroundImage = "bloo"; southestRoom.trickyCode = (options) => { let myCoordinates = [options.x, options.y]; for (let i = 0; i < Room.DIRECTIONS.length; i++) { let direction = Room.DIRECTIONS[i]; if (direction != Direction.NORTH) { let coordinates = Room.shift(myCoordinates, direction); if (!options.map.isFree(coordinates[0], coordinates[1])) { return false; } coordinates = Room.shift(coordinates, direction); if (!options.map.isFree(coordinates[0], coordinates[1])) { return false; } } } return true; }; RegionRandom.rulebookAfterPlaceRoom.addRule(new Rule({ name: "After placing the southest room", code: runner => { let options = runner.noun; let myCoordinates = options.map.getCoordinates(options.room); if (myCoordinates != undefined) { for (let i = 0; i < Room.DIRECTIONS.length; i++) { let direction = Room.DIRECTIONS[i]; if (direction != Direction.NORTH) { let coordinates = Room.shift(myCoordinates, direction); options.map.block(coordinates[0], coordinates[1]); coordinates = Room.shift(coordinates, direction); options.map.block(coordinates[0], coordinates[1]); } } } }, conditions: runner => { return runner.noun.room == southestRoom; } })); Thing.CarryRelation.setRelation(WorldState.player, mapOfTest); PlayBegins.rulebook.addRule(new Rule({ name: "randomize region", firstPriority: Rule.PRIORITY_HIGHEST, code: async (runner) => { await region.randomize(); } })); RegionRandom.rulebookRandomizeRegion.addRule(new Rule({ name: "Add room A and B to region", firstPriority: Rule.PRIORITY_HIGHEST, code: async (runner) => { await RegionRandom.rulebookPlaceRoom.execute({ noun: { map: region.map, room: rooma, region: region } }).then(); await RegionRandom.rulebookPlaceRoom.execute({ noun: { map: region.map, room: roomb, region: region } }).then(); }, conditions: runner => { return runner.noun == region; } })); function getPath(rooma, roomb) { console.debug("The best path from " + rooma.getPrintedName() + " to " + roomb.getPrintedName() + " is:"); let t0, dir, t1; t0 = performance.now(); dir = rooma.bestDirectionTo(roomb); t1 = performance.now(); if (dir != undefined) { console.debug(DirectionNames[Direction[dir]]); } else { console.debug("There is no path."); } console.debug("Call to doSomething took " + (t1 - t0) + " milliseconds."); } let wanderRegion = new RegionRandom("OrcableRegion"); wanderRegion.place(rooma, roomb); region.place(wanderRegion); let rooms = region.getRooms(); let shuffler = new Shuffler(rooms); for (let i = 0; i < 0; i++) { AI.rules.createAndAddRule({ name: "Pick Shinies", firstPriority: AIRules.PRIORITY_ACTING_ON_PLACE, conditions: (runner) => { let person = runner.noun; return person.AI.picksShinies; }, code: (runner) => { let person = runner.noun; let room = person.getRoom(); let visibleThings = room.getContainedAndVisibleTo(person); if (visibleThings.length > 0) { for (let i = 0; i < visibleThings.length; i++) { if (!visibleThings[i].fixedInPlace && visibleThings[i].getShiny()) { return new ActionTake(person, visibleThings[i]); } } } } }); } let randomOrc; let randomOrc2; for (let i = 0; i < 10; i++) { let orc = new OrcDebugger(); randomOrc = orc; if (randomOrc2 == undefined) { randomOrc2 = orc; } orc.AI.wanderer = true; orc.AI.picksShinies = true; orc.AI.wandersOn = wanderRegion; let room = new Shuffler(region.getRooms()).getOne(); room.place(orc); } var fTarget = new ContentGroup(); fTarget.addUnit(new FuckingUnit() .setFucked(WorldState.player) .setFucker(randomOrc) .setHole(WorldState.player.getPart(HumanoidVagina)) .setStick(randomOrc.getPart(HumanoidPenis)) .addMarker(FuckingState.CUM_START)); (new FuckingDescription("Specific Orc in Vagina")) .setDescription(new Say("Specific Orc in Vagina")) .addUnit() .setFucker(randomOrc) .setHole(WorldState.player.getPart(HumanoidVagina)) .setStick(randomOrc.getPart(HumanoidPenis)); (new FuckingDescription("Specific Orc Starts Cumming in Vagina")) .setDescription(new Say("Specific Orc Starts Cumming in Vagina")) .addUnit() .setFucker(randomOrc) .setHole(WorldState.player.getPart(HumanoidVagina)) .addMarker(FuckingState.CUM_START) .setStick(randomOrc.getPart(HumanoidPenis)); var DialogueTrees; (function (DialogueTrees) { DialogueTrees.CreationIntro = (function () { let tree = new DialogueTree("CreationIntro"); let node; let text; let set; node = new DialogueNode("ae981322-9151-49c8-a889-94455db7c262"); node.setNext("81582dea-ba27-4baa-8df2-a77fbb5ed9ef"); tree.addStartNode(node); text = new DialogueText("f72bf099-bae2-49df-9433-c9c3ec6a020d"); text.setSay(() => { return new Say("As you approach the Obelisk, many dreams and nightmares will become reality as it attempts to dissuade you from getting too close, with the intensity increasing the closer you get to your objective.", Say.PARAGRAPH_BREAK, "Ultimately, the Obelisk wishes you no harm, for it is better to have you around as a protector than as a dead enemy, so the Obelisk will attempt to give you exactly what you want deep in your heart, trying to make you completely satisfied so that you no longer wish for the Obelisk's destruction or become unable to continue your quest. Of course, what your heart wants is not necessarily what you think it wants.", Say.PARAGRAPH_BREAK, "Orcs, the most common creature to come out of the Obelisk, are nothing more than humans warped by their own desire for unbridled violence. What will the Obelisk do to you?", Say.PARAGRAPH_BREAK, "On the following screens, you will define who you will be in this story. Please confirm carefully, as there is no turning back."); }); text.setNext("66d4b27a-ff40-4a8e-a749-2b5e8237695a"); tree.addNode(text); set = new DialogueSet("81582dea-ba27-4baa-8df2-a77fbb5ed9ef"); set.setFunction(() => { Elements.startMenu(); }); set.setNext("f72bf099-bae2-49df-9433-c9c3ec6a020d"); tree.addNode(set); set = new DialogueSet("0b4fec87-a2b0-4e3b-81ed-a4150f94fc10"); set.setFunction(() => { Elements.endMenu(); }); tree.addNode(set); set = new DialogueSet("66d4b27a-ff40-4a8e-a749-2b5e8237695a"); set.setFunction(() => { return Elements.waitForAnyKey(); }); set.setNext("0b4fec87-a2b0-4e3b-81ed-a4150f94fc10"); tree.addNode(set); return tree; })(); })(DialogueTrees || (DialogueTrees = {})); var CharacterCreation; (function (CharacterCreation) { CharacterCreation.CreationIntro = CharacterCreation.rulebook.createAndAddRule({ name: "Show small Intro", firstPriority: Rule.PRIORITY_HIGHEST, priority: Rule.PRIORITY_HIGHEST, code: async () => { await DialogueTrees.CreationIntro.execute(); } }); })(CharacterCreation || (CharacterCreation = {})); var CharacterCreation; (function (CharacterCreation) { let ccDiv = document.createElement("div"); ccDiv.id = "characterCreation"; let rightSide = document.createElement("div"); rightSide.id = "ccRight"; let leftSide = document.createElement("div"); leftSide.id = "ccLeft"; ccDiv.appendChild(leftSide); ccDiv.appendChild(rightSide); let resolver; async function printTable() { printOrigin(); while (leftSide.firstChild) leftSide.removeChild(leftSide.firstChild); await (new Say(new SayBold("Character Origin:")).getHTMLContent().then(eles => { eles.forEach(ele => { leftSide.appendChild(ele); }); })); let origins = CharacterOrigin.getOrigins(); for (let i = 0; i < origins.length; i++) { let origin = origins[i]; let say = new Say(origin.name); if (origin.id == CharacterCreation.PlayerOrigin.value) { say.add(" - SELECTED"); } await (say).getHTML("p", ["choice"]).then(elementArray => { Controls.Links.makeCustomLink(elementArray[0], { mouseover: () => { printOrigin(origin); }, mouseout: () => { printOrigin(); }, click: () => { CharacterCreation.PlayerOrigin.value = origin.id; reset(); } }); Controls.KeyHandler.applyCode(elementArray[0], Controls.KeyHandler.getSecondKeyCode()); leftSide.appendChild(elementArray[0]); }); } } function printConfirm() { (new Say("Confirm")).getHTML("p", ["choice"]).then(elementArray => { elementArray[0].addEventListener("click", () => { resolver(); }); Controls.KeyHandler.applyCode(elementArray[0], Controls.KeyHandler.getSecondKeyCode()); Elements.CurrentTurnHandler.print(elementArray[0]); }); } function printOrigin(origin) { if (origin == undefined) { origin = CharacterOrigin.getOrigin(CharacterCreation.PlayerOrigin.value); } let say = new Say(origin.description); if (origin.bonusStats != undefined) { say.add(Say.PARAGRAPH_BREAK, origin.bonusStats); } say.getHTMLContent().then((eles => { while (rightSide.firstChild) rightSide.removeChild(rightSide.firstChild); for (let i = 0; i < eles.length; i++) { rightSide.appendChild(eles[i]); } })); } function reset() { Elements.CurrentTurnHandler.clear(); Elements.CurrentTurnHandler.print(ccDiv); printTable(); Elements.CurrentTurnHandler.print(document.createElement("br")); Elements.CurrentTurnHandler.print(document.createElement("br")); printConfirm(); } CharacterCreation.CCOrigin = CharacterCreation.rulebook.createAndAddRule({ name: "Character Creation - Origin", firstPriority: Rule.PRIORITY_MEDIUM, priority: Rule.PRIORITY_HIGH, code: async () => { Elements.startMenu(); let promise = new Promise(resolve => { resolver = resolve; }); reset(); await promise; CharacterCreation.getOrigin().confirmPicked(); Elements.endMenu(); } }); })(CharacterCreation || (CharacterCreation = {})); var CharacterCreation; (function (CharacterCreation) { let ccDiv = document.createElement("div"); ccDiv.id = "characterCreation"; let rightSide = document.createElement("div"); rightSide.id = "ccRight"; let leftSide = document.createElement("div"); leftSide.id = "ccLeft"; ccDiv.appendChild(leftSide); ccDiv.appendChild(rightSide); let resolver; async function printTable() { while (leftSide.firstChild) leftSide.removeChild(leftSide.firstChild); await (new Say(new SayBold("Perks (Choose any):")).getHTMLContent().then(eles => { eles.forEach(ele => { leftSide.appendChild(ele); }); })); let perks = Perk.getPerks(); for (let i = 0; i < perks.length; i++) { let perk = perks[i]; let say = new Say(perk.name); if (perk.isEnabled()) { if (perk.isForced()) { say.add(" (Mandatory)"); } else { say.add(" - Selected"); } } else if (perk.isForced()) { say.add(" (Forbidden)"); } await (say).getHTML("p", ["choice"]).then(elementArray => { Controls.Links.makeCustomLink(elementArray[0], { mouseover: () => { printPerk(perk); }, mouseout: () => { emptyPerk(); }, click: () => { if (!perk.isForced()) { perk.value = !perk.value; } reset(); } }); Controls.KeyHandler.applyCode(elementArray[0], Controls.KeyHandler.getSecondKeyCode()); leftSide.appendChild(elementArray[0]); }); } } function printConfirm() { (new Say("Confirm")).getHTML("p", ["choice"]).then(elementArray => { elementArray[0].addEventListener("click", () => { resolver(); }); Controls.KeyHandler.applyCode(elementArray[0], Controls.KeyHandler.getSecondKeyCode()); Elements.CurrentTurnHandler.print(elementArray[0]); }); } function emptyPerk() { while (rightSide.firstChild) rightSide.removeChild(rightSide.firstChild); } function printPerk(perk) { let say = new Say(perk.description); say.getHTMLContent().then((eles => { emptyPerk(); for (let i = 0; i < eles.length; i++) { rightSide.appendChild(eles[i]); } })); } function reset() { Perk.updatePerks(); Elements.CurrentTurnHandler.clear(); Elements.CurrentTurnHandler.print(ccDiv); printTable(); Elements.CurrentTurnHandler.print(document.createElement("br")); Elements.CurrentTurnHandler.print(document.createElement("br")); printConfirm(); } CharacterCreation.CCPerk = CharacterCreation.rulebook.createAndAddRule({ name: "Character Creation - Origin", firstPriority: Rule.PRIORITY_LOW, priority: Rule.PRIORITY_HIGH, code: async () => { Elements.startMenu(); let promise = new Promise(resolve => { resolver = resolve; }); reset(); await promise; let perks = Perk.getPerks(); perks.forEach(perk => { if (perk.isEnabled()) { perk.confirmPicked(); } }); Elements.endMenu(); } }); })(CharacterCreation || (CharacterCreation = {})); var CharacterCreation; (function (CharacterCreation) { function createRange(options) { let valueNode = document.createTextNode(String(options.value)); let div = document.createElement("div"); div.classList.add("ccOption"); if (options.topLabel != undefined) { let topLabel = document.createElement("div"); topLabel.classList.add("ccOptionTopLabel"); topLabel.appendChild(document.createTextNode(options.topLabel + ":")); div.appendChild(topLabel); } let label = document.createElement("div"); if (options.showValue != false) { label.classList.add("rangeValue"); if (options.label != undefined) { let b = document.createElement("b"); b.appendChild(document.createTextNode(options.label + ": ")); label.appendChild(b); } label.appendChild(valueNode); } let input = document.createElement("input"); input.classList.add("ccRange"); input.type = "range"; input.min = options.minValue.toString(); input.max = options.maxValue.toString(); input.step = options.step.toString(); input.value = options.value.toString(); let onChange = () => { valueNode.nodeValue = input.value; options.onChange(Number(input.value), valueNode, input); }; input.addEventListener("change", onChange); let leftButton = document.createElement("a"); leftButton.classList.add("ccButton"); leftButton.addEventListener("click", () => { input.value = String(Number(input.value) - options.step); onChange(); }); Controls.KeyHandler.applyCode(leftButton, Controls.KeyHandler.getFirstKeyCode()); if (options.leftLabel != undefined) { leftButton.appendChild(document.createTextNode(options.leftLabel)); } let rightButton = document.createElement("a"); rightButton.classList.add("ccButton"); rightButton.addEventListener("click", () => { input.value = String(Number(input.value) + options.step); onChange(); }); Controls.KeyHandler.applyCode(rightButton, Controls.KeyHandler.getFirstKeyCode()); ; if (options.rightLabel != undefined) { rightButton.appendChild(document.createTextNode(options.rightLabel)); } div.appendChild(leftButton); div.appendChild(input); div.appendChild(rightButton); div.appendChild(label); onChange(); return div; } CharacterCreation.CCSexStats = CharacterCreation.rulebook.createAndAddRule({ name: "Character Creation - Sex and Stats", firstPriority: Rule.PRIORITY_HIGH, priority: Rule.PRIORITY_HIGH, code: () => { Elements.startMenu(); let ccDiv = document.createElement("div"); ccDiv.id = "characterCreation"; let ccLeft = document.createElement("div"); ccLeft.id = "ccLeft"; ccDiv.appendChild(ccLeft); let ccRight = document.createElement("div"); ccRight.id = "ccRight"; ccDiv.appendChild(ccRight); let onChange = () => { (new Say(WorldState.player.description)).getHTMLContent().then((value => { while (ccRight.firstChild) ccRight.removeChild(ccRight.firstChild); value.forEach(val => { ccRight.appendChild(val); }); })); }; ccLeft.appendChild(createRange({ minValue: 0, maxValue: 1, step: 1, value: 0, leftLabel: "Male", rightLabel: "Female", topLabel: "Sex", onChange: (value, labelValue, input) => { labelValue.nodeValue = (value == 0 ? "Male" : "Female"); WorldState.player.removeGenderedParts(); if (value == 0) { WorldState.player.addMaleParts(); } else { WorldState.player.addFemaleParts(); } let otherInputs = ccDiv.getElementsByTagName("input"); for (let i = 0; i < otherInputs.length; i++) { let otherInput = otherInputs[i]; if (otherInput != input) { otherInput.dispatchEvent(new Event("change")); } } onChange(); } })); ccLeft.appendChild(createRange({ minValue: 0, maxValue: 4, step: 1, value: 2, leftLabel: "Masculine", rightLabel: "Feminine", topLabel: "Gender", onChange: (value, labelValue) => { let names = ["Masculine", "Somewhat masculine", "Androgynous", "Somewhat feminine", "Feminine"]; labelValue.nodeValue = names[value]; let player = WorldState.player; let intendedValue; if (player.isMale()) { let values = [10, 25, 50, 55, 60]; intendedValue = values[value]; } else { let values = [35, 40, 50, 65, 75]; intendedValue = values[value]; } WorldState.player.setGenderValue(intendedValue); WorldState.player.setStat(Attributes.GenderIdentity, intendedValue); onChange(); } })); let statsHeader = document.createElement("div"); ccLeft.appendChild(statsHeader); statsHeader.classList.add("ccHeader"); statsHeader.appendChild(document.createTextNode("Stats (")); let maxStats = 12; let statsRemaining = document.createTextNode("4 points remaining"); statsHeader.appendChild(statsRemaining); statsHeader.appendChild(document.createTextNode(")")); let setStat = (attr, value, input) => { player.setStat(attr, value); let remaining = maxStats - player.getStat(Attributes.Strength) - player.getStat(Attributes.Agility) - player.getStat(Attributes.Intelligence) - player.getStat(Attributes.Charm); if (remaining < 0) { value += remaining; remaining = 0; input.value = value.toString(); input.dispatchEvent(new Event("change")); return; } statsRemaining.nodeValue = (remaining == 0 ? "Done" : remaining > 1 ? remaining.toString() + " points remaining" : remaining.toString() + " point remaining"); }; ccLeft.appendChild(createRange({ minValue: 1, maxValue: 5, step: 1, value: 2, leftLabel: "-", rightLabel: "+", topLabel: "Strength", onChange: (value, labelValue, input) => { setStat(Attributes.Strength, value, input); onChange(); } })); ccLeft.appendChild(createRange({ minValue: 1, maxValue: 5, step: 1, value: 2, leftLabel: "-", rightLabel: "+", topLabel: "Agility", onChange: (value, labelValue, input) => { setStat(Attributes.Agility, value, input); onChange(); } })); ccLeft.appendChild(createRange({ minValue: 1, maxValue: 5, step: 1, value: 2, leftLabel: "-", rightLabel: "+", topLabel: "Charm", onChange: (value, labelValue, input) => { setStat(Attributes.Charm, value, input); onChange(); } })); ccLeft.appendChild(createRange({ minValue: 1, maxValue: 5, step: 1, value: 2, leftLabel: "-", rightLabel: "+", topLabel: "Intelligence", onChange: (value, labelValue, input) => { setStat(Attributes.Intelligence, value, input); onChange(); } })); let creationDone = new Promise((resolve) => { (new Say("Confirm")).getHTML("p", ["choice"]).then(elementArray => { elementArray[0].addEventListener("click", () => { Elements.endMenu(); resolve(); }); Controls.KeyHandler.applyCode(elementArray[0], Controls.KeyHandler.getSecondKeyCode()); Elements.CurrentTurnHandler.print(elementArray[0]); }); }); Elements.CurrentTurnHandler.print(ccDiv); return creationDone; } }); })(CharacterCreation || (CharacterCreation = {})); var PlayBegins; (function (PlayBegins) { PlayBegins.LOAD_FAILED = false; PlayBegins.CONTINUE_FAILED = false; PlayBegins.IntroMenuRule = PlayBegins.rulebook.createAndAddRule({ name: "Intro Menu Rule", firstPriority: Rule.PRIORITY_HIGHEST, priority: Rule.PRIORITY_HIGHEST, code: async (runner) => { await DialogueTrees.IntroMenu.execute(); } }); })(PlayBegins || (PlayBegins = {})); var DialogueTrees; (function (DialogueTrees) { DialogueTrees.IntroMenu = (function () { let tree = new DialogueTree("IntroMenu"); let node; let choice; let text; let branch; let set; node = new DialogueNode("b018bb28-4efc-493b-ac37-31634c4e6406"); node.setNext("f448e718-9d24-4191-9913-ccc36d97c4c0"); tree.addStartNode(node); choice = new DialogueChoice("3b8c8bcb-0ac8-40dc-9f62-4abbde0d0f7f"); choice.setSay(() => { return new Say("Start Game"); }); choice.setNext("719e71dd-9989-4015-93af-9fb7096002c1"); tree.addNode(choice); choice = new DialogueChoice("53710087-4002-41b7-b089-cadabedbcafd"); choice.setSay(() => { return new Say("Load from file"); }); choice.setNext("f25f6525-dad6-45d7-a391-246c1b02b569"); tree.addNode(choice); choice = new DialogueChoice("b4593a36-ca83-4afc-b01b-e71344ca6e1f"); choice.setSay(() => { return new Say("Settings"); }); choice.setNext("d4a379b5-06c9-4fca-a25c-b1a31b6bf93d"); tree.addNode(choice); choice = new DialogueChoice("4c5032a5-5509-4a00-b8c7-788e7ddbf17d"); choice.setSay(() => { return new Say("About"); }); choice.setNext("6b3f385b-8283-4635-9c73-e2303d77642d"); tree.addNode(choice); node = new DialogueNode("674841a6-3752-4c81-977d-19e111536203"); node.setName("2"); node.setChoices(["3b8c8bcb-0ac8-40dc-9f62-4abbde0d0f7f", "53710087-4002-41b7-b089-cadabedbcafd", "4c5032a5-5509-4a00-b8c7-788e7ddbf17d", "b4593a36-ca83-4afc-b01b-e71344ca6e1f", "a55f46fa-98a9-4dff-9f1c-4f88c18ce8dd"]); tree.addNode(node); text = new DialogueText("bc32e411-3c54-4747-ad79-506fc5a9d6c9"); text.setSay(() => { return new Say(Say.CENTERED, new SayImage("introLogo"), Say.LINE_BREAK, new SayItalic("The Obelisk is an adult interactive fiction game set in a post-apocalyptic world ravaged by a magical structure.")); }); text.setNext("36da9ea6-909c-4c0c-94d1-a17fef44452d"); tree.addNode(text); text = new DialogueText("36da9ea6-909c-4c0c-94d1-a17fef44452d"); text.setSay(() => { return new Say("A sleek, black obelisk appeared, monsters pouring from it, threatening the world. Many tried to reach the obelisk, only to return changed - monstrous. Civilization was unable to cope with the creatures and humanity soon returned to its old, tribal ways, humans becoming rarer with each passing day. Centuries have passed and technology is now scarce, with people leading simpler lives in small settlements.", Say.PARAGRAPH_BREAK, "You were born in the ashes of the old world, living in isolation as you and your fellow men attempt to stay safe from the evils of The Obelisk. ", Say.PARAGRAPH_BREAK, "Now, fate has decided you must go, reach The Obelisk and destroy it. Will you succeed in stopping it, or will you lose yourself to all the changes it will bring to you?"); }); text.setNext("674841a6-3752-4c81-977d-19e111536203"); tree.addNode(text); node = new DialogueNode("9f11871f-eebd-4b9a-b3db-ed9be8cf78e7"); node.setName("1"); node.setNext("9eeb2100-917d-41fd-b756-6d3b80e92463"); tree.addNode(node); branch = new DialogueBranch("5d1dfb86-abd9-4ad6-bf07-8ced5476e401"); branch.setVariable(() => { return PlayBegins.LOAD_FAILED; }); branch.addBranch("415dc32a-1549-429d-9ac4-8cd1b4c92c14", () => { return true; }); branch.setNext("f82fc177-b4bd-4f06-b7ab-216259e056a5"); tree.addNode(branch); set = new DialogueSet("f82fc177-b4bd-4f06-b7ab-216259e056a5"); set.setFunction(() => { Elements.endMenu(); }); tree.addNode(set); set = new DialogueSet("9eeb2100-917d-41fd-b756-6d3b80e92463"); set.setFunction(() => { Elements.clearMainScreen(); }); set.setNext("bc32e411-3c54-4747-ad79-506fc5a9d6c9"); tree.addNode(set); node = new DialogueNode("415dc32a-1549-429d-9ac4-8cd1b4c92c14"); node.setNext("1"); tree.addNode(node); set = new DialogueSet("f448e718-9d24-4191-9913-ccc36d97c4c0"); set.setFunction(() => { Elements.startMenu(); tree.setRepeatChoices(false); }); set.setNext("9f11871f-eebd-4b9a-b3db-ed9be8cf78e7"); tree.addNode(set); choice = new DialogueChoice("ef9253b9-5c24-46cc-8e2d-5562a1544f07"); choice.setSay(() => { return new Say(SaveHandler.getSayForSlot(0)); }); choice.setNext("9594cf06-6062-4952-b378-6aedaafe2951"); tree.addNode(choice); choice = new DialogueChoice("82c512c6-0115-4d72-a413-5728a623f04b"); choice.setSay(() => { return new Say(SaveHandler.getSayForSlot(1)); }); choice.setNext("fe95cfb3-b9f5-4b12-83aa-94d26e5bcac0"); tree.addNode(choice); choice = new DialogueChoice("7315835a-4d95-4377-828c-8a4ca7e49f87"); choice.setSay(() => { return new Say(SaveHandler.getSayForSlot(2)); }); choice.setNext("dc884974-7bb2-436f-b3a4-cdf8550bd494"); tree.addNode(choice); choice = new DialogueChoice("50afd6f8-87ce-49bf-b689-4819bc5dc8e7"); choice.setSay(() => { return new Say(SaveHandler.getSayForSlot(3)); }); choice.setNext("62f5ea88-c6f0-4469-87f2-ea3b37638509"); tree.addNode(choice); choice = new DialogueChoice("d79e9955-f81e-4ac9-8246-a02b0bd49dae"); choice.setSay(() => { return new Say(SaveHandler.getSayForSlot(4)); }); choice.setNext("ee4ecd8b-59e2-43a6-8150-8a835d6eeae1"); tree.addNode(choice); node = new DialogueNode("719e71dd-9989-4015-93af-9fb7096002c1"); node.setName("SlotChoices"); node.setChoices(["ef9253b9-5c24-46cc-8e2d-5562a1544f07", "82c512c6-0115-4d72-a413-5728a623f04b", "7315835a-4d95-4377-828c-8a4ca7e49f87", "50afd6f8-87ce-49bf-b689-4819bc5dc8e7", "d79e9955-f81e-4ac9-8246-a02b0bd49dae", "9483a087-04d0-48dd-884f-946930771b95", "defe0f4c-4452-40f3-aff1-ba076263fcbc"]); tree.addNode(node); set = new DialogueSet("9594cf06-6062-4952-b378-6aedaafe2951"); set.setFunction(() => { SaveHandler.setSlot(0); }); set.setNext("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9"); tree.addNode(set); set = new DialogueSet("fe95cfb3-b9f5-4b12-83aa-94d26e5bcac0"); set.setFunction(() => { SaveHandler.setSlot(1); }); set.setNext("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9"); tree.addNode(set); set = new DialogueSet("dc884974-7bb2-436f-b3a4-cdf8550bd494"); set.setFunction(() => { SaveHandler.setSlot(2); }); set.setNext("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9"); tree.addNode(set); set = new DialogueSet("62f5ea88-c6f0-4469-87f2-ea3b37638509"); set.setFunction(() => { SaveHandler.setSlot(3); }); set.setNext("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9"); tree.addNode(set); set = new DialogueSet("ee4ecd8b-59e2-43a6-8150-8a835d6eeae1"); set.setFunction(() => { SaveHandler.setSlot(4); }); set.setNext("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9"); tree.addNode(set); set = new DialogueSet("f25f6525-dad6-45d7-a391-246c1b02b569"); set.setFunction(() => { return SaveHandler.loadFromFile(); }); set.setNext("5d1dfb86-abd9-4ad6-bf07-8ced5476e401"); tree.addNode(set); choice = new DialogueChoice("9483a087-04d0-48dd-884f-946930771b95"); choice.setSay(() => { return new Say("Erase a save"); }); choice.setConditions(() => { return !SaveHandler.isErasing(); }); choice.setNext("ee65c84a-021f-44d3-aa34-50235f438c96"); tree.addNode(choice); choice = new DialogueChoice("defe0f4c-4452-40f3-aff1-ba076263fcbc"); choice.setSay(() => { return new Say("Don't erase my saves!"); }); choice.setConditions(() => { return SaveHandler.isErasing(); }); choice.setNext("ee65c84a-021f-44d3-aa34-50235f438c96"); tree.addNode(choice); set = new DialogueSet("ee65c84a-021f-44d3-aa34-50235f438c96"); set.setFunction(() => { SaveHandler.toggleErasing(); }); set.setNext("6f15f7d6-4944-4b93-9d47-7046e8ae1f15"); tree.addNode(set); node = new DialogueNode("6f15f7d6-4944-4b93-9d47-7046e8ae1f15"); node.setNext("SlotChoices"); tree.addNode(node); set = new DialogueSet("915492f1-8fa7-4ddc-9dc0-6b0340f738c8"); set.setFunction(() => { return SaveHandler.loadFromStorage(); }); set.setNext("f82fc177-b4bd-4f06-b7ab-216259e056a5"); tree.addNode(set); node = new DialogueNode("d4a379b5-06c9-4fca-a25c-b1a31b6bf93d"); node.setNext("Settings"); tree.addNode(node); node = new DialogueNode("6b3f385b-8283-4635-9c73-e2303d77642d"); node.setNext("About"); tree.addNode(node); node = new DialogueNode("b75c038c-654c-4c62-8f49-2f4518f52cff"); node.setName("Settings"); node.setNext("d33456b8-72b6-4214-90b3-3eba2442b287"); tree.addNode(node); text = new DialogueText("d33456b8-72b6-4214-90b3-3eba2442b287"); text.setSay(() => { return new Say("Not implemented."); }); text.setNext("bc24b446-d6a2-4284-93fb-67ad3598fcd1"); tree.addNode(text); set = new DialogueSet("bc24b446-d6a2-4284-93fb-67ad3598fcd1"); set.setFunction(() => { return Elements.waitForAnyKey(); }); set.setNext("81f9d62b-907e-48ae-84fe-78c7cecc4fe3"); tree.addNode(set); node = new DialogueNode("81f9d62b-907e-48ae-84fe-78c7cecc4fe3"); node.setNext("1"); tree.addNode(node); node = new DialogueNode("c342e112-5c73-4c82-8882-47ca3a71c914"); node.setName("About"); node.setNext("d33456b8-72b6-4214-90b3-3eba2442b287"); tree.addNode(node); choice = new DialogueChoice("a55f46fa-98a9-4dff-9f1c-4f88c18ce8dd"); choice.setSay(() => { return new Say("Note about content (Spoiler Alert)"); }); choice.setNext("7c2060aa-66ce-4dbb-88d2-0c8f190e0a6c"); tree.addNode(choice); text = new DialogueText("59a3cb30-d4ba-4b46-8157-b900fc7022dd"); text.setSay(() => { return new Say(Say.CENTERED, new SayImage("introLogo"), Say.LINE_BREAK, new SayItalic("The Obelisk is an adult interactive fiction game set in a post-apocalyptic world ravaged by a magical structure.")); }); text.setNext("1b8bdc9d-a4bf-40aa-a382-f7813c158840"); tree.addNode(text); set = new DialogueSet("c27829b7-7199-4b1e-9334-536258546cfc"); set.setFunction(() => { return Elements.waitForAnyKey(); }); set.setNext("42401145-9154-40c3-a9d3-4f83df97b89e"); tree.addNode(set); node = new DialogueNode("42401145-9154-40c3-a9d3-4f83df97b89e"); node.setNext("1"); tree.addNode(node); set = new DialogueSet("7c2060aa-66ce-4dbb-88d2-0c8f190e0a6c"); set.setFunction(() => { Elements.clearMainScreen(); }); set.setNext("59a3cb30-d4ba-4b46-8157-b900fc7022dd"); tree.addNode(set); text = new DialogueText("1b8bdc9d-a4bf-40aa-a382-f7813c158840"); text.setSay(() => { return new Say("In this story, the Obelisk will attempt to give the player exactly what the player wants, but that's not always what the player thinks they want. This is a pornographic game first and a roleplaying game second, which means that it is assumed that the player character wants sex - even if they don't act like it.", Say.PARAGRAPH_BREAK, "Therefore, this game will \"fit\" for players who go in with that mentality, but it ", new SayBold("will"), " look differently for players with a different point of view for their characters. While roleplaying is encouraged, that is not how the game was written, so if you're playing it that way, it's just your choice.", Say.PARAGRAPH_BREAK, "There is no sex without explicit consent from the NPCs: implicit consent is only used for the player character, because that's part of the story. It is possible to remove the player's consent, thereby having no unwanted sex scenes occur, by setting up the content options, which will disable content without explicit consent (i.e. disabling M/M Sex Scenes means this kind of thing will only happen if you actively ask an NPC for it).", Say.PARAGRAPH_BREAK, "While the content options are there to tailor your experience, the game is made with \"all content is available\" in mind, which might result in a playthrough that's not much fun if you disable too many things. Still, that's your choice. Game on."); }); text.setNext("c27829b7-7199-4b1e-9334-536258546cfc"); tree.addNode(text); branch = new DialogueBranch("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9"); branch.setVariable(() => { return SaveHandler.isVirgin(); }); branch.addBranch("d0dcd7c6-26ae-41d0-99a6-e0cae17ae381", () => { return true; }); branch.setNext("915492f1-8fa7-4ddc-9dc0-6b0340f738c8"); tree.addNode(branch); text = new DialogueText("b8ee6702-8d38-4bd7-9b24-df8c901a50d4"); text.setSay(() => { return new Say(new SayBold("A note on saves: "), "The selected slot will be saved to browser storage, so it will be deleted if the browser ever decides to delete it. The game will write to that save slot every turn, so you don't need to worry about that. Alternatively, you can manually save in-game, which will save to a file."); }); text.setNext("50876e13-23b9-43c0-b6b1-a89b1683d5e7"); tree.addNode(text); set = new DialogueSet("50876e13-23b9-43c0-b6b1-a89b1683d5e7"); set.setFunction(() => { return Elements.waitForAnyKey(); }); set.setNext("915492f1-8fa7-4ddc-9dc0-6b0340f738c8"); tree.addNode(set); set = new DialogueSet("d0dcd7c6-26ae-41d0-99a6-e0cae17ae381"); set.setFunction(() => { Elements.clearMainScreen(); }); set.setNext("b8ee6702-8d38-4bd7-9b24-df8c901a50d4"); tree.addNode(set); return tree; })(); })(DialogueTrees || (DialogueTrees = {})); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXBwbGljYXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9hcHAvRnVuY3Rpb25zLnRzIiwiLi4vYXBwL1dvcmxkL0NsYXNzZXMvU2F2ZS9TdG9yZWRWYXJpYWJsZS50cyIsIi4uL2FwcC9Xb3JsZC9DbGFzc2VzL1J1bGVib29rLnRzIiwiLi4vYXBwL1dvcmxkL1NldHRpbmdzLnRzIiwiLi4vYXBwL1dvcmxkL0NsYXNzZXMvUnVsZS50cyIsIi4uL2FwcC9Xb3JsZC9UdXJuU2VxdWVuY2UudHMiLCIuLi9hcHAvVmVyc2lvbi50cyIsIi4uL2FwcC9Db250cm9scy9Nb2R1bGVzL01lbW9yeS50cyIsIi4uL2FwcC9Db250cm9scy9DbGFzc2VzL1N0b3JlZE1lbW9yeS50cyIsIi4uL2FwcC9TYXZlSGFuZGxlci50cyIsIi4uL2FwcC9DaGFyYWN0ZXJDcmVhdGlvbi9DaGFyYWN0ZXJPcmlnaW4udHMiLCIuLi9hcHAvQ2hhcmFjdGVyQ3JlYXRpb24vT3JpZ2lucy9DaGFtcGlvbk9yaWdpbi50cyIsIi4uL2FwcC9DaGFyYWN0ZXJDcmVhdGlvbi9DaGFyYWN0ZXJDcmV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blxyXG4gICAgICAgIGZvciAodGhpcy5ydWxlUnVubmVyID0gMDsgdGhpcy5ydWxlUnVubmVyIDwgdGhpcy5ydWxlc1RvRXhlY3V0ZS5sZW5ndGg7IHRoaXMucnVsZVJ1bm5lcisrKSB7XHJcbiAgICAgICAgICAgIHRoaXMucnVsZSA9IHRoaXMucnVsZXNUb0V4ZWN1dGVbdGhpcy5ydWxlUnVubmVyXTtcclxuICAgICAgICAgICAgbGV0IHJlc3VsdCA9IGF3YWl0IHRoaXMucnVsZS5leGVjdXRlKHRoaXMpO1xyXG5cclxuICAgICAgICAgICAgaWYgKHJlc3VsdCAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcbn1cclxuXHJcbmNsYXNzIFJ1bGVib29rPFQ+IHtcclxuICAgIHB1YmxpYyBydWxlcyA6IEFycmF5PFJ1bGU+ID0gW107XHJcbiAgICBwdWJsaWMgbmFtZSA6IHN0cmluZztcclxuICAgIHByaXZhdGUgc3RhdGljIGluZGVudGFudGlvblNwYWNlcyA9IDI7XHJcbiAgICBwdWJsaWMgc3RhdGljIHJ1bGVib29rU3RhY2sgOiBBcnJheTxhbnk+ID0gW107XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBnZXRTdGFjayAoKSB7XHJcbiAgICAgICAgbGV0IHN0YWNrID0gW107XHJcbiAgICAgICAgUnVsZWJvb2sucnVsZWJvb2tTdGFjay5mb3JFYWNoKChybCkgPT4ge1xyXG4gICAgICAgICAgICBpZiAocmwgaW5zdGFuY2VvZiBPYmplY3QgJiYgcmwubmFtZSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIHN0YWNrLnB1c2gocmwubmFtZSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIHJsID09IFwic3RyaW5nXCIpIHtcclxuICAgICAgICAgICAgICAgIHN0YW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0IGEgdGltZVxyXG4gICAgICAgIGlmIChwbGF5ZXJBY3Rpb25zLnB1c2goYWN0aW9uKSA9PSAxKSB7XHJcbiAgICAgICAgICAgIGxldCB0MCA9IHBlcmZvcm1hbmNlLm5vdygpO1xyXG4gICAgICAgICAgICBjb25zb2xlLmRlYnVnKFJ1bGVib29rLmdldEluZGVudGF0aW9uKCkgKyBcIiAgIFBsYXllciBBY3Rpb246IFwiICsgKGFjdGlvbiA/IGFjdGlvbi5nZXRDb21tYW5kVGV4dCgpIDogXCJub25lXCIpKTtcclxuICAgICAgICAgICAgYXdhaXQgcnVsZWJvb2suZXhlY3V0ZSh7XHJcbiAgICAgICAgICAgICAgICBub3VuOiBhY3Rpb25cclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICBwbGF5ZXJBY3Rpb25zID0gW107XHJcbiAgICAgICAgICAgIGxldCB0MSA9IHBlcmZvcm1hbmNlLm5vdygpO1xyXG4gICAgICAgICAgICBsYXN0VHVyblRpbWUgPSB0MSAtIHQwO1xyXG4gICAgICAgICAgICBjb25zb2xlLmRlYnVnKFwiVG90YWw6IFwiICsgKHQxIC0gdDApICsgXCIgbWlsbGlzZWNvbmRzLlwiKTtcclxuICAgICAgICAgICAgaWYgKFNldHRpbmdzLnNheVR1cm5UaW1lKSB7XHJcbiAgICAgICAgICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIucHJpbnRBc0NvbnRlbnQobmV3IFNheShuZXcgU2F5Qm9sZChcIlRpbWUgdGFrZW4gZm9yIHR1cm46IFwiKSwgKHQxIC0gdDApLCBcIiBtaWxsaXNlY29uZHMuXCIpKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIFRoaXMgaXMgdGhlIFByZXBhcmUgRWxlbWVudHMgZm9yIHRoZSB0dXJuIHJ1bGUuXHJcbiAgICAgKiBAdHlwZSB7UnVsZX1cclxuICAgICAqL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0sXHJcbiAgICAgICAgbmFtZTogXCJEbyBQbGF5ZXIgQWN0aW9uXCIsXHJcbiAgICAgICAgY29kZTogYXN5bmMgKHJ1bGVib29rIDogUnVsZWJvb2tSdW5uZXI8QWN0aW9uPikgPT4ge1xyXG4gICAgICAgICAgICBsZXQgcGxheWVyQWN0aW9uID0gPEFjdGlvbj4gcnVsZWJvb2subm91bjtcclxuICAgICAgICAgICAgaWYgKHBsYXllckFjdGlvbiAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIGxldCBwcm9taXNlID0gcGxheWVyQWN0aW9uLmV4ZWN1dGUoKTtcclxuXHJcbiAgICAgICAgICAgICAgICBhd2FpdCBwcm9taXNlO1xyXG5cclxuICAgICAgICAgICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci5wcmludEFzQ29udGVudChwbGF5ZXJBY3Rpb24uc2F5KTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAocGxheWVyQWN0aW9uLnJlcXVpcmVzVHVybikge1xyXG4gICAgICAgICAgICAgICAgICAgIFdvcmxkU3RhdGUuaW5jcmVtZW50UGxheWVyVHVybigpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcbiAgICBydWxlYm9vay5hZGRSdWxlKFBsYXllckFjdGlvblJ1bGUpO1xyXG5cclxuICAgIC8qKlxyXG4gICAgICogVGhpcyBpcyB0aGUgUnVuIEV2ZXJ5IFR1cm4gUnVsZXMuXHJcbiAgICAgKiBAdHlwZSB7UnVsZX1cclxuICAgICAqL1xyXG4gICAgZXhwb3J0IHZhciBSdW5FdmVyeVR1cm5SdWxlc1J1bGUgPSBuZXcgUnVsZSh7XHJcbiAgICAgICAgZmlyc3RQcmlvcml0eTogUnVsZS5QUklPUklUWV9NRURJVU0sXHJcbiAgICAgICAgcHJpb3JpdHk6IFJ1bGUuUFJJT1JJVFlfTUVESVVNLFxyXG4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xyXG4gICAgICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIuZW5kVHVybigpO1xyXG5cclxuICAgICAgICAgICAgQ29udHJvbHMuS2V5SGFuZGxlci5yZXNldCgpO1xyXG5cclxuICAgICAgICAgICAgYXdhaXQgRWxlbWVudHMuSHlwZXJsaW5rSGFuZGxlci5oeXBlcmxpbmtDb21tb25BY3Rpb25zKCk7XHJcbiAgICAgICAgICAgIGF3YWl0IEVsZW1lbnRzLlJvb21IYW5kbGVyLnVwZGF0ZVJvb20oKTtcclxuICAgICAgICAgICAgYXdhaXQgRWxlbWVudHMuUmVtZW1iZXJlZEhhbmRsZXIudXBkYXRlTWFwKCk7XHJcblxyXG4gICAgICAgICAgICBsZXQgcGxheWVyQWN0aW9uID0gPEFjdGlvbj4gcnVsZWJvb2subm91bjtcclxuICAgICAgICAgICAgaWYgKHBsYXllckFjdGlvbikge1xyXG4gICAgICAgICAgICAgICAgYXdhaXQgRWxlbWVudHMuSHlwZXJsaW5rSGFuZGxlci5oeXBlcmxpbmtPYmplY3QocGxheWVyQWN0aW9uLmdldE5vdW4oMCkpO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgYXdhaXQgRWxlbWVudHMuSHlwZXJsaW5rSGFuZGxlci5oeXBlcmxpbmtPYmplY3QoKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgYXdhaXQgRWxlbWVudHMuSW52ZW50b3J5SGFuZGxlci51cGRhdGVJbnZlbnRvcnkoKTtcclxuICAgICAgICAgICAgYXdhaXQgRWxlbWVudHMuQXBwZWFyYW5jZUhhbmRsZXIudXBkYXRlQXBwZWFyYW5jZSgpO1xyXG4gICAgICAgICAgICAvL2F3YWl0IEVsZW1lbnRzLlN0YXR1c0xpbmVIYW5kbGVyLnVwZGF0ZVN0YXR1c0xpbmUoKTtcclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuICAgIFR1cm5TZXF1ZW5jZS5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XCIpO1xyXG5cclxuICAgIGV4cG9ydCBhc3luYyBmdW5jdGlvbiByZWFkRmlsZSAoKSA6IFByb21pc2U8c3RyaW5nPiB7XHJcbiAgICAgICAgbGV0IGVsZW1lbnQgPSA8SFRNTElucHV0RWxlbWVudD4gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImlucHV0XCIpO1xyXG4gICAgICAgIGVsZW1lbnQudHlwZSA9IFwiZmlsZVwiO1xyXG4gICAgICAgIGVsZW1lbnQuYWNjZXB0ID0gXCIuXCIgKyBzYXZlRXh0ZW5zaW9uO1xyXG5cclxuICAgICAgICBsZXQgcHJvbWlzZSA6IFByb21pc2U8c3RyaW5nPiA9IG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcclxuICAgICAgICAgICAgZWxlbWVudC5vbmNoYW5nZSA9ICgpID0+IHtcclxuICAgICAgICAgICAgICAgIGlmIChlbGVtZW50LmZpbGVzLmxlbmd0aCA9PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSh1bmRlZmluZWQpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgZnIgPSBuZXcgRmlsZVJlYWRlcigpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBmci5vbmxvYWQgPSAoZXYpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShldi50YXJnZXRbJ3Jlc3VsdCddKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGZyLnJlYWRBc1RleHQoZWxlbWVudC5maWxlc1swXSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgZWxlbWVudC5jbGljaygpO1xyXG4gICAgICAgIHJldHVybiBwcm9taXNlO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uI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xyXG4gICAgICAgICAgICBpZiAodGhpbmcgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICB0aGluZy5zZXRDaGFuZ2VzKHNhdmVkVGhpbmcuQ2hhbmdlcyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBleHBvcnRQbGF5ZXIgKCkgOiBTYXZlZFBsYXllciB7XHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgTmFtZSA6IFdvcmxkU3RhdGUucGxheWVyLmdldE5hbWUoKSxcclxuICAgICAgICAgICAgUGxheWVyQ2hhbmdlcyA6IFdvcmxkU3RhdGUucGxheWVyLmdldENoYW5nZXMoKSxcclxuICAgICAgICAgICAgUGFydHMgOiBleHBvcnRUaGluZ3MoV29ybGRTdGF0ZS5wbGF5ZXIuZ2V0UGFydHMoKSlcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZXhwb3J0IGZ1bmN0aW9uIGV4cG9ydFRoaW5ncyAoYXJyIDogQXJyYXk8VGhpbmc+LCBjaGFuZ2VkT25seT8gOiBib29sZWFuKSA6IEFycmF5PFNhdmVkVGhpbmc+IHtcclxuICAgICAgICBsZXQgb2JqID0gW107XHJcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcnIubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgbGV0IHRoaW5nID0gPFRoaW5nPiBhcnJbaV07XHJcbiAgICAgICAgICAgIGxldCBzYXZlZFRoaW5nID0ge1xyXG4gICAgICAgICAgICAgICAgVW5pcXVlIDogdGhpbmcuaXNVbmlxdWUoKSxcclxuICAgICAgICAgICAgICAgIE5hbWUgOiB0aGluZy5nZXROYW1lKCksXHJcbiAgICAgICAgICAgICAgICBDaGFuZ2VzIDogdGhpbmcuZ2V0Q2hhbmdlcygpXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIGlmICghY2h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4gICAgICAgIHN1cGVyKHtcclxuICAgICAgICAgICAgaWQgOiBcIlBlcmtfXCIgKyBpZCxcclxuICAgICAgICAgICAgdmFsdWUgOiBmYWxzZVxyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIHRoaXMubmFtZSA9IGlkO1xyXG5cclxuICAgICAgICBQZXJrLnN0b3JlUGVyayh0aGlzKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgaXNFbmFibGVkICh2YWx1ZU9ubHk/IDogYm9vbGVhbikgOiBib29sZWFuIHtcclxuICAgICAgICBpZiAodmFsdWVPbmx5ICE9IHRydWUpIHtcclxuICAgICAgICAgICAgbGV0IGZvcmNlZCA9IHRoaXMuZm9yY2VkU3RhdHVzKHRoaXMpO1xyXG4gICAgICAgICAgICBpZiAoZm9yY2VkICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIDxib29sZWFuPiBmb3JjZWQ7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHRoaXMudmFsdWU7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGlzRm9yY2VkICgpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5mb3JjZWRTdGF0dXModGhpcykgIT0gdW5kZWZpbmVkO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXREZXNjcmlwdGlvbiAoKSB7XHJcbiAgICAgICAgaWYgKHR5cGVvZiB0aGlzLmRlc2NyaXB0aW9uID09IFwiZnVuY3Rpb25cIikge1xyXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5kZXNjcmlwdGlvbih0aGlzKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5kZXNjcmlwdGlvbjtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBwZXJrcyA6IHtbaWQgOiBzdHJpbmddIDogUGVya30gPSB7fTtcclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIHN0b3JlUGVyayAocGVyayA6IFBlcmspIHtcclxuICAgICAgICBQZXJrLnBlcmtzW3BlcmsuaWRdID0gcGVyaztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGdldFBlcmsgKGlkIDogc3RyaW5nKSB7XHJcbiAgICAgICAgcmV0dXJuIFBlcmsucGVya3NbaWRdO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBzdGF0aWMgZ2V0UGVya3MgKCkgOiBBcnJheTxQZXJrPiB7XHJcbiAgICAgICAgbGV0IHBlcmtzID0gW107XHJcbiAgICAgICAgZm9yIChsZXQgaWQgaW4gUGVyay5wZXJrcykge1xyXG4gICAgICAgICAgICBwZXJrcy5wdXNoKFBlcmsucGVya3NbaWRdKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcGVya3Muc29ydCgoYSA6IFBlcmssIGIgOiBQZXJrKSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBuYSA9IGEubmFtZS50b1VwcGVyQ2FzZSgpO1xyXG4gICAgICAgICAgICBsZXQgbmIgPSBiLm5hbWUudG9VcHBlckNhc2UoKTtcclxuICAgICAgICAgICAgaWYgKG5hIDwgbmIpIHJldHVybiAtMTtcclxuICAgICAgICAgICAgaWYgKG5hID4gbmIpIHJldHVybiAxO1xyXG4gICAgICAgICAgICByZXR1cm4gMDtcclxuICAgICAgICB9KTtcclxuICAgICAgICByZXR1cm4gcGVya3M7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyB1cGRhdGVQZXJrcygpIHtcclxuICAgICAgICBmb3IgKGxldCBpZCBpbiBQZXJrLnBlcmtzKSB7XHJcbiAgICAgICAgICAgIGxldCBwZXJrID0gUGVyay5wZXJrc1tpZF07XHJcbiAgICAgICAgICAgIGlmIChwZXJrLmlzRm9yY2VkKCkpIHtcclxuICAgICAgICAgICAgICAgIHBlcmsudmFsdWUgPSA8Ym9vb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ICAgICAgICBtYWluUGFnZS5jbGFzc0xpc3QuYWRkKFwidHVyblwiKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIFJlbW92ZSB0aGUgYmx1ciBlZmZlY3QgZnJvbSB0aGUgc2NyZWVuXHJcbiAgICAgKi9cclxuICAgIGV4cG9ydCBmdW5jdGlvbiBlbmRUdXJuICgpIHtcclxuICAgICAgICBtYWluUGFnZS5jbGFzc0xpc3QucmVtb3ZlKFwidHVyblwiKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIEFyZSB3ZSBjdXJyZW50bHkgaW4gYSB0dXJuP1xyXG4gICAgICogQHJldHVybnMge2Jvb2xlYW59XHJcbiAgICAgKi9cclxuICAgIGV4cG9ydCBmdW5jdGlvbiBpc0luVHVybiAoKSB7XHJcbiAgICAgICAgcmV0dXJuIG1haW5QYWdlLmNsYXNzTGlzdC5jb250YWlucyhcInR1cm5cIik7XHJcbiAgICB9XHJcblxyXG5cclxuICAgIGxldCBtZW51T3V0c2lkZW9mVHVybiA9IGZhbHNlO1xyXG4gICAgbGV0IG1lbnVzID0gMDtcclxuXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gc3RhcnRNZW51ICgpIHtcclxuICAgICAgICBpZiAoIWlzSW5UdXJuKCkpIHtcclxuICAgICAgICAgICAgbWVudU91dHNpZGVvZlR1cm4gPSB0cnVlO1xyXG4gICAgICAgICAgICBzdGFydFR1cm4oKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgbWFpblBhZ2UuY2xhc3NMaXN0LmFkZChcIm1haW5tZW51XCIpO1xyXG4gICAgICAgIG1lbnVzKys7XHJcbiAgICAgICAgRWxlbWVudHMuQ3VycmVudFR1cm5IYW5kbGVyLmNsZWFyKCk7XHJcbiAgICAgICAgQ29udHJvbHMuS2V5SGFuZGxlci5yZXNldCgpO1xyXG4gICAgfVxyXG5cclxuICAgIGV4cG9ydCBmdW5jdGlvbiBlbmRNZW51ICgpIHtcclxuICAg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gW107XHJcblxyXG4gICAgZXhwb3J0IGZ1bmN0aW9uIHJlamVjdFByb21pc2UgKHByb21pc2UgOiAodmFsdWU/OiBLZXlDb2RlIHwgUHJvbWlzZUxpa2U8S2V5Q29kZT4pID0+IHZvaWQpIHtcclxuICAgICAgICBwcm9taXNlU3RhY2suc3BsaWNlKHByb21pc2VTdGFjay5pbmRleE9mKHByb21pc2UpLCAxKTtcclxuICAgICAgICBwcm9taXNlT3JpZ2luYWxTdGFjay5zcGxpY2UocHJvbWlzZVN0YWNrLmluZGV4T2YocHJvbWlzZSksIDEpO1xyXG4gICAgfVxyXG5cclxuICAgIGV4cG9ydCBmdW5jdGlvbiBjcmVhdGVLZXlDb2RlIChldiA6IEtleWJvYXJkRXZlbnQpIHtcclxuICAgICAgICBsZXQgbmFtZSA9IGV2LmtleS50b1VwcGVyQ2FzZSgpO1xyXG4gICAgICAgIGxldCByZXByZXNlbnRhdGlvbiA9IG5hbWU7XHJcbiAgICAgICAgbGV0IGV2Q29kZSA9IGV2LmNvZGU7XHJcbiAgICAgICAgaWYgKGV2LnNoaWZ0S2V5KSB7XHJcbiAgICAgICAgICAgIG5hbWUgPSBcIlNoaWZ0ICsgXCIgKyBuYW1lO1xyXG4gICAgICAgICAgICBldkNvZGUgPSBcIlNoXCIgKyBldkNvZGU7XHJcbiAgICAgICAgICAgIHJlcHJlc2VudGF0aW9uID0gXCJTXCIgKyByZXByZXNlbnRhdGlvbjtcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKGV2LmFsdEtleSkge1xyXG4gICAgICAgICAgICBuYW1lID0gXCJBbHQgKyBcIiArIG5hbWU7XHJcbiAgICAgICAgICAgIGV2Q29kZSA9IFwiQWxcIiArIGV2Q29kZTtcclxuICAgICAgICAgICAgcmVwcmVzZW50YXRpb24gPSBcIkFcIiArIHJlcHJlc2VudGF0aW9uO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoZXYuY3RybEtleSkge1xyXG4gICAgICAgICAgICBuYW1lID0gXCJDb250cm9sICsgXCIgKyBuYW1lO1xyXG4gICAgICAgICAgICBldkNvZGUgPSBcIkN0XCIgKyBldkNvZGU7XHJcbiAgICAgICAgICAgIHJlcHJlc2VudGF0aW9uID0gXCJDXCIgKyByZXByZXNlbnRhdGlvbjtcclxuICAgICAgICB9XHJcbiAgICAgICAgbGV0IGtleUNvZGUgOiBLZXlDb2RlID0gIHtcclxuICAgICAgICAgICAgZXZDb2RlIDogZXZDb2RlLFxyXG4gICAgICAgICAgICBuYW1lIDogbmFtZSxcclxuICAgICAgICAgICAgcmVwcmVzZW50YXRpb24gOiByZXByZXNlbnRhdGlvblxyXG4gICAgICAgIH07XHJcbiAgICAgICAgcmV0dXJuIGtleUNvZGU7XHJcbiAgICB9XHJcblxyXG4gICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoXCJtb3VzZWRvd25cIiwgZnVuY3Rpb24gKGV2ZW50KSB7XHJcbiAgICAgICAgbGV0IGtleUNvZGUgOiBLZXlDb2RlID0ge1xyXG4gICAgICAgICAgICByZXByZXNlbnRhdGlvbiA6IFwiQ2xpY2tcIixcclxuICAgICAgICAgICAgZXZDb2RlIDogXCJDbGlja1wiLFxyXG4gICAgICAgICAgICBuYW1lIDogXCJDbGlja1wiXHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgbGV0IHByb21pc2UgPSBwcm9taXNlU3RhY2suc2hpZnQoKTtcclxuICAgICAgICBpZiAocHJvbWlzZSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgcHJvbWlzZShrZXlDb2RlKTtcclxuICAgICAgICAgICAgcHJvbWlzZU9yaWdpbmFsU3RhY2suc2hpZnQoKTtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKFwia2V5ZG93blwiLCBmdW5jdGlvbiAoZXZlbnQpIHtcclxuICAgICAgICAvL2V2ZW50LnByZ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UdXJuVGFiLmdldEVsZW1lbnRzQnlDbGFzc05hbWUoXCJjb250ZW50SW1hZ2VcIik7XHJcbiAgICAgICAgICAgICAgICBpZiAoaW1hZ2VzLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAoPEhUTUxFbGVtZW50PiBpbWFnZXNbaW1hZ2VzLmxlbmd0aCAtIDFdKS5jbGljaygpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGxldCBlbGU7XHJcblxyXG4gICAgICAgIEVsZW1lbnRzLmdldExpbmtFbGVtZW50cygpLnNvbWUoKGVsZW1lbnQgOiBIVE1MRWxlbWVudCkgPT4ge1xyXG4gICAgICAgICAgICBsZXQga2V5YWJsZXMgPSBlbGVtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoXCJrZXlhYmxlXCIpO1xyXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGtleWFibGVzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoKDxIVE1MRWxlbWVudD4ga2V5YWJsZXNbaV0pLmRhdGFzZXRbJ3Nob3J0Y3V0Y29kZSddID09IGtleUNvZGUuZXZDb2RlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZWxlID0ga2V5YWJsZXNbaV07XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICBpZiAoZWxlICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBlbGUuY2xpY2soKTtcclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gY3JlYXRlS2V5Q29kZXMgKGNvZGVzIDogQXJyYXk8c3RyaW5nPiwga2V5cyA6IEFycmF5PHN0cmluZz4sIG1vZHM/IDogQXJyYXk8Ym9vbGVhbj4pIHtcclxuICAgICAgICBsZXQgYXJyID0gW107XHJcbiAgICAgICAgZm9yIChsZXQgbW9kID0gMDsgbW9kIDwgNDsgbW9kKyspIHtcclxuICAgICAgICAgICAgaWYgKG1vZCA9PSAwIHx8IG1vZHNbbW9kXSA9PSB0cnVlKSB7XHJcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNvZGVzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWUgPSBrZXlzW2ldO1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCByZXByZXNlbnRhdGlvbiA9IGtleXNbaV07XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGV2Q29kZSA9IGNvZGVzW2ldO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChtb2QgPT0gMSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lID0gXCJTaGlmdCArIFwiICsgbmFtZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXZDb2RlID0gXCJTaFwiICsgZXZDb2RlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXByZXNlbnRhdGlvbiA9IFwiU1wiICsgcmVwcmVzZW50YXRpb247XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChtb2QgPT0gMikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lID0gXCJBbHQgKyBcIiArIG5hbWU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2Q29kZSA9IFwiQWxcIiArIGV2Q29kZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVwcmVzZW50YXRpb24gPSBcIkFcIiArIHJlcHJlc2VudGF0aW9uO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAobW9kID09IDMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZSA9IFwiQ29udHJvbCArIFwiICsgbmFtZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXZDb2RlID0gXCJDdFwiICsgZXZDb2RlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXByZXNlbnRhdGlvbiA9IFwiQ1wiICsgcmVwcmVzZW50YXRpb247XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGxldCBrZXlDb2RlOiBLZXlDb2RlID0ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBldkNvZGU6IGV2Q29kZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVwcmVzZW50YXRpb246IHJlcHJlc2VudGF0aW9uLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lIDogbmFtZVxyXG4gICAgICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICAgICAgYXJyLnB1c2goa2V5Q29kZSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIGFycjtcclxuICAgIH1cclxuXHJcbiAgICBleHBvcnQgdmFyIHNjcm9sbEtleUNvZGUgPSBuZXcgU3RvcmVkTWVtb3J5KFwic2Nyb2xsS2V5Q29kZVwiLCA8S2V5Q29kZT4ge1xyXG4gICAgICAgIGV2Q29kZSA6IFwiU3BhY2VcIixcclxuICAgICAgICByZXByZXNlbnRhdGlvbiA6IFwiU3BhY2VcIlxyXG4gICAgfSk7XHJcblxyXG4gICAgZXhwb3J0IHZhciBpbWFnZUtleUNvZGUgPSBuZXcgU3RvcmVkTWVtb3J5KFwiaW1hZ2VLZXlDb2RlXCIsIDxLZXlDb2RlPiB7XHJcbiAgICAgICAgZXZDb2RlIDogXCJLZXlJXCIsXHJcbiAgICAgICAgc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BbdHJ1ZSwgdHJ1ZSwgdHJ1ZSwgdHJ1ZV0pXHJcbiAgICApO1xyXG5cclxuICAgIGV4cG9ydCB2YXIga2V5Q29kZU5vcnRoID0gbmV3IFN0b3JlZE1lbW9yeShcclxuICAgICAgICBcImtleUNvZGVOb3J0aFwiLFxyXG4gICAgICAgIDxLZXlDb2RlPiB7XHJcbiAgICAgICAgICAgIGV2Q29kZSA6IFwiS2V5U1wiLFxyXG4gICAgICAgICAgICByZXByZXNlbnRhdGlvbiA6IFwiU1wiXHJcbiAgICAgICAgfVxyXG4gICAgKTtcclxuXHJcbiAgICBleHBvcnQgdmFyIGtleUNvZGVFYXN0ID0gbmV3IFN0b3JlZE1lbW9yeShcclxuICAgICAgICBcImtleUNvZGVFYXN0XCIsXHJcbiAgICAgICAgPEtleUNvZGU+IHtcclxuICAgICAgICAgICAgZXZDb2RlIDogXCJLZXlDXCIsXHJcbiAgICAgICAgICAgIHJlcHJlc2VudGF0aW9uIDogXCJDXCJcclxuICAgICAgICB9XHJcbiAgICApO1xyXG5cclxuICAgIGV4cG9ydCB2YXIga2V5Q29kZVNvdXRoID0gbmV3IFN0b3JlZE1lbW9yeShcclxuICAgICAgICBcImtleUNvZGVTb3V0aFwiLFxyXG4gICAgICAgIDxLZXlDb2RlPiB7XHJcbiAgICAgICAgICAgIGV2Q29kZSA6IFwiS2V5WFwiLFxyXG4gICAgICAgICAgICByZXByZXNlbnRhdGlvbiA6IFwiWFwiXHJcbiAgICAgICAgfVxyXG4gICAgKTtcclxuXHJcbiAgICBleHBvcnQgdmFyIGtleUNvZGVXZXN0ID0gbmV3IFN0b3JlZE1lbW9yeShcclxuICAgICAgICBcImtleUNvZGVXZXN0XCIsXHJcbiAgICAgICAgPEtleUNvZGU+IHtcclxuICAgICAgICAgICAgZXZDb2RlIDogXCJLZXlaXCIsXHJcbiAgICAgICAgICAgIHJlcHJlc2VudGF0aW9uIDogXCJaXCJcclxuICAgICAgICB9XHJcbiAgICApO1xyXG5cclxuIC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AgICByZXR1cm4gY2hvc2VuLnNwbGljZSgwLCAxKVswXTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcclxuICAgIH1cclxuXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gZ2V0VGhpcmRLZXlDb2RlICgpIHtcclxuICAgICAgICBsZXQgY2hvc2VuID0gYXZhaWxhYmxlMy5sZW5ndGggPiAwID8gYXZhaWxhYmxlMyA6IHVuZGVmaW5lZDtcclxuICAgICAgICBpZiAoY2hvc2VuICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICByZXR1cm4gY2hvc2VuLnNwbGljZSgwLCAxKVswXTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIFJldHVybnMgYSBwcm9taXNlIG9mIGEga2V5IHByZXNzLlxyXG4gICAgICogSWYgYWZ0ZXIgdGltZW91dCBzZWNvbmRzIGEga2V5IHdhcyBub3QgcHJlc3NlZCwgdGhlIHByb21pc2UgZmFpbHMuXHJcbiAgICAgKiBAcGFyYW0ge251bWJlcn0gdGltZW91dFxyXG4gICAgICovXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gZ2V0TmV4dEtleSAodGltZW91dD8gOiBudW1iZXIpIDogUHJvbWlzZTxLZXlDb2RlPiB7XHJcbiAgICAgICAgbGV0IHRpbWVvdXROdW1iZXI7XHJcbiAgICAgICAgbGV0IHByb21pc2UgPSA8UHJvbWlzZTxLZXlDb2RlPj4gKG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcclxuICAgICAgICAgICAgcHJvbWlzZVN0YWNrLnB1c2gocmVzb2x2ZSk7XHJcblxyXG4gICAgICAgICAgICBpZiAodGltZW91dCAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIHRpbWVvdXROdW1iZXIgPSBzZXRUaW1lb3V0KCgpID0+IHtc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WJsaWMgc3RhdGljIGxvYWRUaW1lQ2hlY2sgOiBib29sZWFuID0gZmFsc2U7XHJcbiAgICBwdWJsaWMgc3RhdGljIGltYWdlVmlld2VyIDogSFRNTEVsZW1lbnQgPSA8SFRNTEVsZW1lbnQ+IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKFwiaW1hZ2VWaWV3ZXJcIik7XHJcbiAgICBwcml2YXRlIGltZ05hbWUgOiBzdHJpbmc7XHJcblxyXG4gICAgcHJpdmF0ZSBpc0ltYWdlRGVmaW5lZCAoKSB7XHJcbiAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgZm9yKHZhciBpID0gMDsgaSA8IGRvY3VtZW50LnN0eWxlU2hlZXRzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgcnVsZXMgPSBkb2N1bWVudC5zdHlsZVNoZWV0c1tpXVsncnVsZXMnXSB8fCBkb2N1bWVudC5zdHlsZVNoZWV0c1tpXVsnY3NzUnVsZXMnXTtcclxuICAgICAgICAgICAgICAgIGZvcih2YXIgeCBpbiBydWxlcykge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmKHR5cGVvZiBydWxlc1t4XS5zZWxlY3RvclRleHQgPT0gJ3N0cmluZycgJiYgcnVsZXNbeF0uc2VsZWN0b3JUZXh0ID09IFwiLlwiICsgdGhpcy5pbWdOYW1lKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgfSBjYXRjaCAoZSkge1xyXG4gICAgICAgICAgICBjb25zb2xlLndhcm4oXCJDYW4ndCBjaGVjayBmb3IgdW5kZWZpbmVkIGltYWdlcy5cIik7XHJcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgIH1cclxuICAg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W5jZVJ1bm5lcltpXTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoY2FuZGlkYXRlID09IFNheS5iKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2VxdWVuY2Uuc3BsaWNlKGksIDEpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBib2xkT2JqZWN0cy5wdXNoKHRoaXMuc2VxdWVuY2Uuc3BsaWNlKGksIDEpKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoYm9sZE9iamVjdHMubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBib2xkID0gbmV3IFNheUJvbGQoLi4uYm9sZE9iamVjdHMpO1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2VxdWVuY2Uuc3BsaWNlKHRoaXMuc2VxdWVuY2VSdW5uZXIgKyAxLCAwLCBib2xkKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIGlmIChzZXEgPT0gU2F5LkNPQ0spIHtcclxuICAgICAgICAgICAgICAgIGlmIChIdW1hbm9pZFBlbmlzICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb2NrID0gSHVtYW5vaWRQZW5pcy5nZXRTeW5vbnltKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jdXJyZW50UGFyYWdyYXBoLnB1c2goZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUoY29jaykpXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gIGVsc2UgaWYgKHNlcSA9PSBTYXkuUFVTU1kpIHtcclxuICAgICAgICAgICAgICAgIGlmIChIdW1hbm9pZFZhZ2luYSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgdmFnaW5hID0gSHVtYW5vaWRWYWdpbmEuZ2V0U3lub255bSgpO1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudFBhcmFncmFwaC5wdXNoKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKHZhZ2luYSkpXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoc2VxID09IFNheS5MSU5FX0JSRUFLKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmRvTGluZUJyZWFrKCk7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoc2VxID09IFNheS5QQVJBR1JBUEhfQlJFQUspIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuZG9QYXJhZ3JhcGhCcmVhaygpO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHNlcSA9PSBTYXkuUlVOX1BBUkFHUkFQSCkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5za2lwYnJlYWtzID0gdHJ1ZTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmIChzZXEgPT0gU2F5LlJVTl9QQVJBR1JBUEhfT0ZGKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLnNraXBicmVha3MgPSBmYWxzZTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2Ygc2VxID09IFwiZnVuY3Rpb25cIikge1xyXG4gICAgICAgICAgICAgICAgbGV0IGZPYmogPSAoPChzOiBTYXkpID0+IGFueT4gc2VxKSh0aGlzKTtcclxuICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGZPYmopKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgayA9IGZPYmoubGVuZ3RoIC0gMTsgayA+PSAwOyBrLS0pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXF1ZW5jZS5zcGxpY2UodGhpcy5zZXF1ZW5jZVJ1bm5lciArIDEsIDAsIGZPYmpba10pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZk9iaiAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLnNlcXVlbmNlLnNwbGljZSh0aGlzLnNlcXVlbmNlUnVubmVyICsgMSwgMCwgZk9iaik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB0aGlzLnNlcXVlbmNlLnNwbGljZSh0aGlzLnNlcXVlbmNlUnVubmVyLCAxKTtcclxuICAgICAgICAgICAgICAgIHRoaXMuc2VxdWVuY2VSdW5uZXItLTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmIChzZXEuY29uc3RydWN0b3IgPT0gdGhpcy5jb25zdHJ1Y3Rvcikge1xyXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgayA9ICg8U2F5PiBzZXEpLnNlcXVlbmNlLmxlbmd0aCAtIDE7IGsgPj0gMDsgay0tKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXF1ZW5jZS5zcGxpY2UodGhpcy5zZXF1ZW5jZVJ1bm5lciArIDEsIDAsICg8U2F5PiBzZXEpLnNlcXVlbmNlW2tdKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHRoaXMuc2VxdWVuY2Uuc3BsaWNlKHRoaXMuc2VxdWVuY2VSdW5uZXIsIDEpO1xyXG4gICAgICAgICAgICAgICAgdGhpcy5zZXF1ZW5jZVJ1bm5lci0tO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHNlcSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIGxldCBlbGVtZW50cyA9IGF3YWl0IHRoaXMuZ2V0RWxlbWVudEZvcih0aGlzLnNlcXVlbmNlUnVubmVyLCBzZXEpO1xyXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBlbGVtZW50cy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChlbGVtZW50c1tpXSA9PT0gU2F5LkRPX0xJTkVfQlJFQUspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kb0xpbmVCcmVhaygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZWxlbWVudHNbaV0gPT09IFNheS5ET19QQVJBR1JBUEhfQlJFQUspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kb1BhcmFncmFwaEJyZWFrKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jdXJyZW50UGFyYWdyYXBoLnB1c2goZWxlbWVudHNbaV0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gVE9ETzogUmVtb3ZlIGxpbmUgYnJlYWsgKyB0ZXh0IGluZGVudGVyIGlmIHRoZXkgYXJlIHRoZSBsYXN0IGluIHRoZSBzYXlcclxuICAgICAgICBpZiAodGhpcy5jdXJyZW50UGFyYWdyYXBoLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgdGhpcy5wYXJhZ3JhcGhzLnB1c2godGhpcy5jdXJyZW50UGFyYWdyYXBoKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHJldHVybiB0aGlzLnBhcmFncmFwaHM7XHJcbiAgICB9XHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBMb3JkIEhhdmUgbWVyY3ksIEkgd2lzaCB0byBuZXZlciBoYXZlIHRvIGRlYnVnIHRoaXMgcGllY2Ugb2YgZ29kLlxyXG4gICAgICogQHBhcmFtIHtudW1iZXJ9IGluZGV4XHJcbiAgICAgKiBAcGFyYW0ge1NheSB8IE9uZU9mIHwgT2J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IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQodGFnTmFtZSk7XHJcbiAgICAgICAgICAgIGlmIChjbGFzc0xpc3QubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgcGFyZW50LmNsYXNzTGlzdC5hZGQoLi4uY2xhc3NMaXN0KTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgZm9yIChsZXQgayA9IDAsIGVsZSA9IHBhcmFncmFwaFtrXTsgZWxlIT0gdW5kZWZpbmVkOyBlbGUgPSBwYXJhZ3JhcGhbKytrXSkge1xyXG4gICAgICAgICAgICAgICAgcGFyZW50LmFwcGVuZENoaWxkKGVsZSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxlbWVudHMucHVzaChwYXJlbnQpO1xyXG5cclxuICAgICAgICAgICAgaWYgKHRoaXMuY2VudGVyZWQpIHtcclxuICAgICAgICAgICAgICAgIHBhcmVudC5jbGFzc0xpc3QuYWRkKFwiY2VudGVyZWRcIik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHJldHVybiBlbGVtZW50cztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0SFRNTENvbnRlbnQgKCkgOiBQcm9taXNlPEFycmF5PEhUTUxFbGVtZW50Pj4ge1xyXG4gICAgICAgIHJldHVybiB0aGlzLmdldEhUTUwoXCJwXCIsIFtcImNvbnRlbnRcIl0pO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBpc1Byb3BlckVsZW1lbnQgKG8pIDogYm9vbGVhbiB7XHJcbiAgICAgICAgcmV0dXJuIChcclxuICAgICAgICAgICAgdHlwZW9mIE5vZGUgPT09IFwib2JqZWN0XCIgPyBvIGluc3RhbmNlb2YgTm9kZSA6XHJcbiAgICAgICAgICAgICAgICBvICYmIHR5cGVvZiBvID09PSBcIm9iamVjdFwiICYmIHR5cGVvZiBvLm5vZGVUeXBlID09PSBcIm51bWJ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B1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgZGlyZWN0aW9uRGl2ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImRpdlwiKTtcclxuICAgICAgICAgICAgICAgICAgICBkaXJlY3Rpb25EaXYuY2xhc3NMaXN0LmFkZChcIm1hcFJvb21Db25uZWN0aW9uXCIgKyBEaXJlY3Rpb25OYW1lc1tEaXJlY3Rpb25bZGlyZWN0aW9uXV0pO1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMubWFpbkRpdi5hcHBlbmRDaGlsZChkaXJlY3Rpb25EaXYpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIENvbnRyb2xzLkxpbmtzLm1ha2VMaW5rKHRoaXMubWFpbkRpdiwgbmV3IEFjdGlvbkdvKFdvcmxkU3RhdGUucGxheWVyLCByb29tKSk7XHJcblxyXG4gICAgICAgICAgICAvLyBBU1NVTUUgVEhJUyBJUyBOT1QgVVBEQVRFRFxyXG4gICAgICAgICAgICAvL3RoaXMudXBkYXRlKCk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhc3luYyBjcmVhdGVSb29tTmFtZUZsb2F0ZXIgKCkge1xyXG4gICAgICAgIGlmICh0aGlzLnJvb20gIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIGxldCByb29tTmFtZSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJkaXZcIik7XHJcblxyXG4gICAgICAgICAgICBsZXQgc2F5TmFtZSA9IG5ldyBTYXkodGhpcy5yb29tKTtcclxuICAgICAgICAgICAgYXdhaXQgc2F5TmFtZS5nZXRQdXJlRWxlbWVudHMoKS50aGVuKHZhbHVlID0+IHtcclxuICAgICAgICAgICAgICAgIHZhbHVlLmZvckVhY2goZWxlbWVudCA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcm9vbU5hbWUuYXBwZW5kQ2hpbGQoZWxlbWVudCk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgICAgICBFbGVtZW50cy5Ib3ZlckluZm8ubWFrZUhvdmVyYWJsZSh0aGlzLm1haW5EaXYsIHZhbHVlKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhc3luYyB1cGRhdGUgKCkge1xyXG4gICAgICAgIGlmICh0aGlzLnJvb20gIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIGlmIChXb3JsZFN0YXRlLnBsYXllci5nZXRSb29tKCkgPT0gdGhpcy5yb29tKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLm1haW5EaXYuY2xhc3NMaXN0LmFkZChcImN1cnJlbnRcIik7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLm1haW5EaXYuY2xhc3NMaXN0LnJlbW92ZShcImN1cnJlbnRcIik7XHJcbiAgICAgICAgICAgIH1cclxuXHJcblxyXG4gICAgICAgICAgICBsZXQgaXNSZW1lbWJlcmVkID0gYXdhaXQgV29ybGRTdGF0ZS5pc1Jvb21SZW1lbWJlcmVkKHRoaXMucm9vbSk7XHJcbiAgICAgICAgICAgIGlmICghaXNSZW1lbWJlcmVkKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLm1haW5EaXYuY2xhc3NMaXN0LmFkZChcInVua25vd25cIik7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLm1haW5EaXYuY2xhc3NMaXN0LnJlbW92ZShcInVua25vd25cIik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldEVsZW1lbnQgKCkge1xyXG4gICAgICAgIHJldHVybiB0aGlzLm1haW5EaXY7XHJcbiAgICB9XHJ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SA9IFwiaGUgXCI7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgcGVyc29uIGlzIGFuZHJvZ3lub3VzLi4uXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGdlbmRlci5oYXNQZW5pc0J1bGdlIHx8IGdlbmRlci5oYXNQZW5pcykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gXCJoZSBcIjtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGdlbmRlci5oYXNWYWdpbmEgfHwgZ2VuZGVyLmhhc1RpdHMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwic2hlIFwiO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcInRoZXkgXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgLy8gVE9ETzogSWYgd2UgZXZlciBoYXZlIGdlbmRlcmVkIG5vbi1odW1hbm9pZHMsIHRoZXkgbXVzdCBiZSBhZGRlZCBoZXJlLlxyXG4gICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwiaXQgXCI7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmICh0aGlzLnVwcGVyY2FzZSAmJiBzYXkuY3VycmVudFBhcmFncmFwaC5sZW5ndGggPT0gMCkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IHRoaXMubm9kZS5ub2RlVmFsdWUuY2hhckF0KDApLnRvVXBwZXJDYXNlKClcclxuICAgICAgICAgICAgICA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yID0gbmV4dC5nZXRHZW5kZXJWYWx1ZSgpO1xyXG4gICAgICAgICAgICAgICAgaWYgKGdlbmRlci5nZW5kZXJWYWx1ZUNvcnJlY3RlZCA+IDY1KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwiaGVyIFwiO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChnZW5kZXIuZ2VuZGVyVmFsdWVDb3JyZWN0ZWQgPCAzNSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcImhpbSBcIjtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gVGhpcyBwZXJzb24gaXMgYW5kcm9neW5vdXMuLi5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoZ2VuZGVyLmhhc1BlbmlzQnVsZ2UgfHwgZ2VuZGVyLmhhc1BlbmlzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcImhpbSBcIjtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGdlbmRlci5oYXNWYWdpbmEgfHwgZ2VuZGVyLmhhc1RpdHMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwiaGVyIFwiO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcInRoZW0gXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgLy8gVE9ETzogSWYgd2UgZXZlciBoYXZlIGdlbmRlcmVkIG5vbi1odW1hbm9pZHMsIHRoZXkgbXVzdCBi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QdXJlRWxlbWVudHMgKHNheSA6IFNheSkgOiBQcm9taXNlPEFycmF5PEVsZW1lbnQgfCBUZXh0Pj4ge1xyXG4gICAgICAgIGxldCBuZXh0ID0gdGhpcy50YXJnZXQ7XHJcbiAgICAgICAgaWYgKG5leHQgPT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcIlwiO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGlmIChuZXh0IGluc3RhbmNlb2YgSHVtYW5vaWQpIHtcclxuICAgICAgICAgICAgICAgIGxldCBnZW5kZXIgPSBuZXh0LmdldEdlbmRlclZhbHVlKCk7XHJcbiAgICAgICAgICAgICAgICBpZiAoZ2VuZGVyLmdlbmRlclZhbHVlQ29ycmVjdGVkID4gNjUpIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gXCJoZXJzIFwiO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChnZW5kZXIuZ2VuZGVyVmFsdWVDb3JyZWN0ZWQgPCAzNSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcImhpcyBcIjtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gVGhpcyBwZXJzb24gaXMgYW5kcm9neW5vdXMuLi5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoZ2VuZGVyLmhhc1BlbmlzQnVsZ2UgfHwgZ2VuZGVyLmhhc1BlbmlzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcImhpcyBcIjtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGdlbmRlci5oYXNWYWdpbmEgfHwgZ2VuZGVyLmhhc1RpdHMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwiaGVycyBcIjtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gXCJ0aGVpciBcIjtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAvLyBUT0RPOiBJZiB3ZSBldmVyIGhhdmUgZ2VuZGVyZWQgbm9uLWh1bWFub2lkcywgdGhleSBtdXN0IGJlIGFkZGVkIGhlcmUuXHJcbiAgICAgICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gXCJpdHMgXCI7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmICh0aGlzLnVwcGVyY2FzZSAmJiBzYXkuY3VycmVudFBhcmFncmFwaC5sZW5ndGggPT0gMCkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IHRoaXMubm9kZS5ub2RlVmFsdWUuY2hhckF0KDApLnRvVXBwZXJDYXNlKClcclxuICAgICAgICAgICAgICAgICAgICArIHRoaXMubm9kZS5ub2RlVmFsdWUuc3Vic3RyKDEsIHRoaXMubm9kZS5ub2RlVmFsdWUubGVuZ3RoIC0gMSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIFt0aGlzLm5vZGVdO1xyXG4gICAgfVxyXG59IiwiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4uL1NheS50c1wiIC8+XHJcbmNsYXNzIFNheUlmIGV4dGVuZHMgU2F5IHtcclxuICAgIHByaXZhdGUgY29uZGl0aW9uIDogKCkgPT4gYm9vbGVhbjtcclxuICAgIHB1YmxpYyBjb25zdHJ1Y3RvciAoY29uZGl0aW9uIDogKCkgPT4gYm9vbGVhbiwgLi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WxzZSBpZiAobmV4dCA9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwiXCI7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgaWYgKG5leHQgaW5zdGFuY2VvZiBUaGluZykge1xyXG4gICAgICAgICAgICAgICAgaWYgKCEoPFRoaW5nPiBuZXh0KS5wcm9wZXJseU5hbWVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwidGhlIFwiO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gXCJcIjtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcIlwiO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmICh0aGlzLm5vZGUubm9kZVZhbHVlICE9IFwiXCIpIHtcclxuICAgICAgICAgICAgaWYgKHRoaXMudXBwZXJjYXNlICYmIHNheS5jdXJyZW50UGFyYWdyYXBoLmxlbmd0aCA9PSAwKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gdGhpcy5ub2RlLm5vZGVWYWx1ZS5jaGFyQXQoMCkudG9VcHBlckNhc2UoKVxyXG4gICAgICAgICAgICAgICAgICAgICsgdGhpcy5ub2RlLm5vZGVWYWx1ZS5zdWJzdHIoMSwgdGhpcy5ub2RlLm5vZGVWYWx1ZS5sZW5ndGggLSAxKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gW3RoaXMubm9kZV07XHJcbiAgICB9XHJcbn0iLCIvLy8gPHJlZmVyZW5jZSBwYXRoPVwiLi4vRWxlbWVudHMudH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NoKTtcclxuICAgICAgICAgICAgcHJlc2VudGF0aW9uLmFkZChcIiBZb3UgaGF2ZSBcIiwgbmV3IFNheUFuKCksIHJlYWxEaWNrICsgXCIgZGlja1wiKTtcclxuICAgICAgICAgICAgaWYgKHBlbmlzLmdldEFjdHVhbFNpemUoKSAhPSBidWxnZXMuY3JvdGNoICYmIHJlYWxEaWNrICE9IGZha2VEaWNrKSB7XHJcbiAgICAgICAgICAgICAgICBwcmVzZW50YXRpb24uYWRkKFwiLCB3aGljaCBsb29rcyBsaWtlIGl0IGlzIFwiICsgZmFrZURpY2sgKyBcIiBkdWUgdG8geW91ciBjbG90aGluZy5cIilcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGlmICghcGVuaXMuaXNVbmNvdmVyZWQoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHByZXNlbnRhdGlvbi5hZGQoXCIsIHdoaWNoIGlzIGNvdmVyZWQuXCIpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBwcmVzZW50YXRpb24uYWRkKFwiLlwiKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gaWYgKHBlbmlzID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgIC8vICAgICBpZiAoYnVsZ2VzLmNyb3RjaCA+IDApIHtcclxuICAgICAgICAvLyAgICAgICAgIHByZXNlbnRhdGlvbi5hZGQoU2F5LlBBUkFHUkFQSF9CUkVBSywgXCJZb3UgaGF2ZSBcIiwgbmV3IFNheUFuKCksIEh1bWFub2lkUGVuaXMuZ2V0U2l6ZVRleHQoYnVsZ2VzLmNyb3RjaCkgKyBcIiBidWxnZSB2aXNpYmxlIG9uIHlvdXIgY3JvdGNoLlwiKTtcclxuICAgICAgICAvLyAgICAgfVxyXG4gICAgICAgIC8vIH0gZWxzZSB7XHJcbiAgICAgICAg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ICAgbm91biA6IHRoaXNcclxuICAgICAgICB9LCAuLi5jYXJyeVJ1bGVib29rcyk7XHJcblxyXG4gICAgICAgIHJldHVybiB0aGlzLnNheTtcclxuICAgIH1cclxuXHJcbiAgICBnZXQgYWN0b3IoKTogVGhpbmcge1xyXG4gICAgICAgIHJldHVybiB0aGlzLl9hY3RvcjtcclxuICAgIH1cclxuXHJcbiAgICBzZXQgYWN0b3IodmFsdWU6IFRoaW5nKSB7XHJcbiAgICAgICAgdGhpcy5fYWN0b3IgPSB2YWx1ZTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0Tm91biAobiA6IG51bWJlcikgOiBhbnkge1xyXG4gICAgICAgIGlmICh0aGlzLm5vdW5zLmxlbmd0aCA+IG4pIHtcclxuICAgICAgICAgICAgcmV0dXJuIHRoaXMubm91bnNbbl07XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHNldE5vdW4gKG4gOiBudW1iZXIsIG5vdW4gOiBhbnkpIHtcclxuICAgICAgICB3aGlsZSAodGhpcy5ub3Vucy5sZW5ndGggPCBuKSB7XHJcbiAgICAgICAgICAgIHRoaXMubm91bnMucHVzaCh1bmRlZmluZWQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICB0aGlzLm5vdW5zW25dID0gbm91bjtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIE5lZWRzIHRvIHJldHVybiBhIHN0cmluZyBleHBsYWluaW5nIHdoYXQgdGhlIHBsYXllciB3aWxsIGRvIGlmIGhlIGRvZXMgdGhpcyBhY3Rpb24uXHJcbiAgICAgKiBGb3IgaW5zdGFuY2UsIEFjdGlvblRha2luZyBzaG91bGQgcmV0dXJuIHNvbWV0aGluZyBsaWtlIHJldHVybiBcInRha2UgXCIgKyB0aGlzLm5vdW5zWzBdLmdldE5hbWUoKSxcclxuICAgICAqICAgd2hpY2ggd291bGQgcmVh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Z2h0IGNhbiBvbmx5IGhhdmUgb25lIGxlZnRcclxuICAgICAgICAgICAgdGhpcy51bnNldFJpZ2h0KHJpZ2h0KTtcclxuXHJcbiAgICAgICAgICAgIGxldCBzdHJpbmcgPSBSZWxhdGlvbi5jcmVhdGVTdHJpbmcobGVmdCwgcmlnaHQpO1xyXG4gICAgICAgICAgICBpZiAoc3RyaW5nICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy52YWx1ZXNIYXNoW3N0cmluZ10gPSB2YWx1ZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB0aGlzLm1hbnlNYXAuc2V0KHJpZ2h0LCBsZWZ0KTtcclxuICAgICAgICAgICAgaWYgKHRoaXMub25lTWFwLmdldChsZWZ0KSA9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMub25lTWFwLnNldChsZWZ0LCBbcmlnaHRdKTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHRoaXMub25lTWFwLmdldChsZWZ0KS5wdXNoKHJpZ2h0KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0TGVmdCAocmlnaHQgOiBhbnkpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5tYW55TWFwLmdldChyaWdodCk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldEFueUxlZnQgKCkge1xyXG4gICAgICAgIGxldCBsZWZ0ID0gW107XHJcbiAgICAgICAgdGhpcy5vbmVNYXAuZm9yRWFjaCgodmFsdWUsIGtleSkgPT4ge1xyXG4gICAgICAgICAgICBsZWZ0LnB1c2goa2V5KTtcclxuICAgICAgICB9KTtcclxuICAgICAgICBhcnJheVVuaXF1ZShsZWZ0KTtcclxuICAgICAgICByZXR1cm4gbGVmdDtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0QW55UmlnaHQgKCkge1xyXG4gICAgICAgIGxldCByaWdodHMgPSBbXTtcclxuICAgICAgICB0aGlzLm9uZU1hcC5mb3JFYWNoKCh2YWx1ZSkgPT4ge1xyXG4gICAgICAgICAgICByaWdodHMucHVzaCguLi52YWx1ZSk7XHJcbiAgICAgICAgfSk7XHJcbiAgICAgICAgYXJyYXlVbmlxdWUocmlnaHRzKTtcclxuICAgICAgICByZXR1cm4gcmlnaHRzO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRBbnlSaWdodFR5cGUgKHR5cGUgOiBhbnkpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5nZXRBbnlSaWdodCgpLmZpbHRlcih2YWx1ZSA9PiB7XHJcbiAgICAgICAgICAgIHJldHVybiB2YWx1ZSBpbnN0YW5jZW9mIHR5cGU7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGlzUmlnaHQgKGxlZnQgOiBhbnksIG5lZWRsZSA6IGFueSkge1xyXG4gICAgICAgIGxldCByaWdodCA9IHRoaXMub25lTWFwLmdldChsZWZ0KTtcclxuICAgICAgICBpZiAocmlnaHQgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIHJldHVybiByaWdodC5pbmRleE9mKG5lZWRsZSkgIT0gLTE7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0UmlnaHQgKGxlZnQgOiBhbnkpIHtcclxuICAgICAgICBsZXQgcmlnaHQgPSB0aGlzLm9uZU1hcC5nZXQobGVmdCk7XHJcbiAgICAgICAgaWYgKHJpZ2h0ICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICByZXR1cm4gW10uY29uY2F0KC4uLnJpZ2h0KTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIFtdO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRSaWdod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KSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLm9uZU1hcC5kZWxldGUobGVmdCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgbGV0IHN0cmluZyA9IFJlbGF0aW9uLmNyZWF0ZVN0cmluZyhsZWZ0LCByaWdodCk7XHJcbiAgICAgICAgICAgIGlmIChzdHJpbmcgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICBkZWxldGUodGhpcy52YWx1ZXNIYXNoW3N0cmluZ10pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyB1bnNldExlZnQgKGxlZnQgOiBhbnkpIHtcclxuICAgICAgICBsZXQgYWxsUmlnaHQgPSB0aGlzLm9uZU1hcC5nZXQobGVmdCk7XHJcbiAgICAgICAgaWYgKGFsbFJpZ2h0ICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBhbGxSaWdodC5mb3JFYWNoKChyaWdodCA6IGFueSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5tYW55TWFwLmRlbGV0ZShyaWdodCk7XHJcbiAgICAgICAgICAgICAgICBsZXQgc3RyaW5nID0gUmVsYXRpb24uY3JlYXRlU3RyaW5nKGxlZnQsIHJpZ2h0KTtcclxuICAgICAgICAgICAgICAgIGlmIChzdHJpbmcgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlKHRoaXMudmFsdWVzSGFzaFtzdHJpbmddKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIHRoaXMub25lTWFwLmRlbGV0ZShsZWZ0KTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbn0iLCIvLy8gPHJlZmVyZW5jZSBwYXRoPVwiLi4vLi4vRWxlbWVudHMvQ2xhc3Nlcy9TYXkudHNcIiAvPlxyXG4vLy8gPHJlZmVyZW5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AgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuZGVzY3JpcHRpb24gPSBuZXcgU2F5KG9wdGlvbnMuZGVzY3JpcHRpb24pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZiAob3B0aW9ucy51bmlxdWUpIHtcclxuICAgICAgICAgICAgVGhpbmcuc3RvcmVVbmlxdWUodGhpcyk7XHJcbiAgICAgICAgICAgIHRoaXMudW5pcXVlID0gdHJ1ZTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBUaGluZy5zdG9yZU5vblVuaXF1ZSh0aGlzKTtcclxuICAgICAgICAgICAgdGhpcy5jbG9uZU9wdGlvbnMgPSBvcHRpb25zO1xyXG4gICAgICAgICAgICB0aGlzLmNsb25lID0gKGluY2x1ZGVDaGFuZ2VzPyA6IGJvb2xlYW4pID0+IHtcclxuICAgICAgICAgICAgICAgIGxldCBjb25zID0gPGFueT4gZXZhbCgoPGFueT4gdGhpcy5jb25zdHJ1Y3RvcikubmFtZSk7XHJcbiAgICAgICAgICAgICAgICBsZXQgbmV3VGhpbmcgPSA8VGhpbmc+IG5ldyBjb25zKHRoaXMuY2xvbmVPcHRpb25zKTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoaW5jbHVkZUNoYW5nZXMgPT0gdW5kZWZpbmVkIHx8IGluY2x1ZGVDaGFuZ2VzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmV3VGhpbmcuc2V0Q2hhbmdlcyh0aGlzLmdldENoYW5nZXMoKSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ld1RoaW5nO1xyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKG9wdGlvbnMuaW1hZ2UgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIGlmIChvcHRpb25zLmltYWdlIGluc3RhbmNlb2YgU2F5SW1hZ2UpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuaW1hZ2UgPSBvcHRpb25zLmltYWdlO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5pbWFnZSA9IG5ldyBTYXlJbWFnZShvcHRpb25zLmltYWdlKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgdGhpcy5zaGlueSA9IG9wdGlvbnMuc2hpbnkgPT0gdHJ1ZTtcclxuXHJcbiAgICAgICAgdGhpcy5hZGRHZXRBbHRlcmF0aW9ucygodGhpbmcgOiBUaGluZykgPT4ge1xyXG4gICAgICAgICAgICBmdW5jdGlvbiBnZXRDbG9zZXN0Um9vbSAoY3VycmVudFJvb20gOiBSb29tUmFuZG9tLCByb29tcyA6IEFycmF5PFJvb21SYW5kb20+KSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoY3VycmVudFJvb20gaW5zdGFuY2VvZiBSb29tUmFuZG9tICYmIHJvb21zLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICByb29tcy5zb3J0KChhIDogUm9vbVJhbmRvbSwgYiA6IFJvb21SYW5kb20pID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCEoYSBpbnN0YW5jZW9mIFJvb21SYW5kb20pKSByZXR1cm4gLTE7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghKGIgaW5zdGFuY2VvZiBSb29tUmFuZG9tKSkgcmV0dXJuIDE7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYSA9IGEuZ2V0RGlzdGFuY2VUbyg8Um9vbVJhbmRvbT4gY3VycmVudFJvb20pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGIgPSBiLmdldERpc3RhbmNlVG8oPFJvb21SYW5kb20+IGN1cnJlbnRSb29tKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRhIC0gZGI7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgTG9jYXRpb24gOiByb29tc1swXS5nZXROYW1lKClcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmIChUaGluZy5FbmNsb3NlZFJlbGF0aW9uLmdldExlZnQodGhpbmcpID09IHRoaW5nLmdldFJvb20oKSAmJiB0aGluZy5nZXRSb29tKCkgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAodGhpbmcuZ2V0Um9vbSgpLmZvZGRlcikge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGluZy5pc1BsYXllcigpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHB1dCBhdCBjbG9zZXN0IHJlbWVtYmVyZWQgcm9vbVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgcm9vbXMgPSBXb3JsZFN0YXRlLmdldFJlbWVtYmVyZWRSb29tc0FzUm9vbXMoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGN1cnJlbnRSb29tID0gdGhpbmcuZ2V0Um9vbSgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ2V0Q2xvc2VzdFJvb20oPFJvb21SYW5kb20+IGN1cnJlbnRSb29tLCA8QXJyYXk8Um9vbVJhbmRvbT4+IHJvb21zKTtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBwdXQgYXQgY2xvc2VzdCByb29tXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCByb29tcyA9IHRoaW5nLmdldFJvb20oKS5nZXRDb25uZWN0ZWRSb29tcygpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgY3VycmVudFJvb20gPSB0aGluZy5nZXRSb29tKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBmb3VuZFJvb20gPSBnZXRDbG9zZXN0Um9vbSg8Um9vbVJhbmRvbT4gY3VycmVudFJvb20sIDxBcnJheTxSb29tUmFuZG9tPj4gcm9vbXMpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZm91bmRSb29tICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZvdW5kUm9vbTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvb21zID0gKDxSZWdpb24+IFJlZ2lvbi5JblJlbGF0aW9uLmdldExlZnQodGhpbmcuZ2V0Um9vbSgpKSkuZ2V0Um9vbXMoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBnZXRDbG9zZXN0Um9vbSg8Um9vbVJhbmRvbT4gY3VycmVudFJvb20sIDxBcnJheTxSb29tUmFuZG9tPj4gcm9vbXMpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBMb2NhdGlvbjogdGhpbmcuZ2V0Um9vbSgpLmdldE5hbWUoKVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICB0aGlzLmFkZFNldEFsdGVyYXRpb25zKCh0aGluZyA6IFRoaW5nLCBjaGFuZ2VzKSA9PiB7XHJcbiAgICAgICAgICAgIGlmIChjaGFuZ2VzLkxvY2F0aW9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29rUnVubmVyPEFjdGlvblRha2U+KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBhY3Rpb24gPSA8QWN0aW9uR28+IHJ1bGVib29rLm5vdW47XHJcbiAgICAgICAgICAgIGxldCBhY3RvciA9IGFjdGlvbi5hY3RvcjtcclxuICAgICAgICAgICAgbGV0IHRoaW5nID0gKDxUaGluZz5hY3Rpb24uZ2V0Tm91bigwKSk7XHJcbiAgICAgICAgICAgIGxldCBvd25lciA9IDxUaGluZz4gdGhpbmcuZ2V0RW5jbG9zZWRPbmUoKTtcclxuXHJcbiAgICAgICAgICAgIGlmIChvd25lciA9PSBhY3Rvcil7XHJcbiAgICAgICAgICAgICAgICBpZiAob3duZXIgPT0gV29ybGRTdGF0ZS5wbGF5ZXIpIHtcclxuICAgICAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChcIllvdSBhbHJlYWR5IGhhdmUgaXQuXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSlcclxuKTtcclxuXHJcbkFjdGlvblRha2UuY2hlY2suYWRkUnVsZShcclxuICAgIG5ldyBSdWxlKHtcclxuICAgICAgICBuYW1lIDogXCJDaGVjayBUYWtpbmcgLSBEb251dCBzdGVhbFwiLFxyXG4gICAgICAgIGNvZGUgOiAocnVsZWJvb2sgOiBSdWxlYm9va1J1bm5lcjxBY3Rpb25UYWtlPikgPT4ge1xyXG4gICAgICAgICAgICBsZXQgYWN0aW9uID0gPEFjdGlvbkdvPiBydWxlYm9vay5ub3VuO1xyXG4gICAgICAgICAgICBsZXQgYWN0b3IgPSBhY3Rpb24uYWN0b3I7XHJcbiAgICAgICAgICAgIGxldCB0aGluZyA9ICg8VGhpbmc+YWN0aW9uLmdldE5vdW4oMCkpO1xyXG4gICAgICAgICAgICBsZXQgb3duZXIgPSA8VGhpbmc+IHRoaW5nLmdldEVuY2xvc2VkT25lKCk7XHJcblxyXG4gICAgICAgICAgICBpZiAob3duZXIgIT0gdW5kZWZpbmVkICYmIG93bmVyLmFuaW1hdGVkKXtcclxuICAgICAgICAgICAgICAgIGlmIChhY3RvciA9PSBXb3JsZFN0YXRlLnBsYXllcikge1xyXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKG93bmVyLmdldFByaW50ZWROYW1lKCkgKyBcIiB3b3VsZG4ndCBsaWtlIHRoYXQuXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSlcclxuKTtcclxuXHJcbkFjdGlvblRha2UuY2hlY2suYWRkUnVsZShcclxuICAgIG5ldyBSdWxlKHtcclxuICAgICAgICBuYW1lIDogXCJDaGVjayBUYWtpbmcgLSBDYW4ndCB0YWtlIGZpeGVkIGluIHBsYWNlXCIsXHJcbiAgICAgICAgY29kZSA6IChydWxlYm9vayA6IFJ1bGVib29rUnVubmVyPEFjdGlvblRha2U+KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBhY3Rpb24gPSA8QWN0aW9uR28+IHJ1bGVib29rLm5vdW47XHJcbiAgICAgICAgICAgIGxldCBhY3RvciA9IGFjdGlvbi5hY3RvcjtcclxuICAgICAgICAgICAgbGV0IHRoaW5nID0gKDxUaGluZz5hY3Rpb24uZ2V0Tm91bigwKSk7XHJcblxyXG4gICAgICAgICAgICBpZiAodGhpbmcuZml4ZWRJblBsYWNlKXtcclxuICAgICAgICAgICAgICAgIGlmIChhY3RvciA9PSBXb3JsZFN0YXRlLnBsYXllcikge1xyXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKFwiWW91IGNhbid0IHRha2UgdGhhdC5cIik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcb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4gcnVsZWJvb2subm91bjtcclxuXHJcbiAgICAgICAgICAgIC8vIFNvbWVvbmUgYXNrZWQgZm9yIGEgcm9vbS4uLlxyXG4gICAgICAgICAgICBpZiAoYWN0aW9uLmdldE5vdW4oMCkgaW5zdGFuY2VvZiBSb29tUmFuZG9tKSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgYWN0b3IgPSBhY3Rpb24uYWN0b3I7XHJcbiAgICAgICAgICAgICAgICBsZXQgY1Jvb20gPSBhY3Rvci5nZXRSb29tKCk7XHJcbiAgICAgICAgICAgICAgICBpZiAoY1Jvb20gaW5zdGFuY2VvZiBSb29tUmFuZG9tKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGRSb29tID0gYWN0aW9uLmdldE5vdW4oMCk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChjUm9vbSA9PSBkUm9vbSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYWN0b3IuaXNQbGF5ZXIoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQoXCJZb3UgYXJlIGFscmVhZHkgdGhlcmUhXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb2RlO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoYWN0b3IgPT0gV29ybGRTdGF0ZS5wbGF5ZXIpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29kZSA9IChyb29tOiBSb29tKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gV29ybGRTdGF0ZS5pc1Jvb21SZW1lbWJlcmVkKHJvb20pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBsZXQgZGlyZWN0aW9uID0gY1Jvb20uZ2V0QVN0YXJCZXN0RGlyZWN0aW9uVG8oZFJvb20sIGNvZGUpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChkaXJlY3Rpb24gPT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhY3Rvci5pc1BsYXllcigpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChcIllvdSBkb24ndCByZW1lbWJlciBob3cgdG8gZ2V0IHRoZXJlLlwiKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNldE5vdW4oMCwgZGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIHJ1bGVDaGVja0lzdGhlcmVkaXJlY3Rpb25hbmRyb29tID0gQWN0aW9uR28uY2hlY2suY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiQ2hlY2sgR29pbmcgLSBpcyB0aGVyZSBhIGRpcmVjdGlvbj8gRG9lcyBpdCBsZWFkIGFueXdoZXJlP1wiLFxyXG4gICAgICAgIGNvZGUgOiAocnVsZWJvb2spID0+IHtcclxuICAgICAgICAgICAgbGV0IGFjdGlvbiA9IDxBY3Rpb25Hbz4gcnVsZWJvb2subm91bjtcclxuICAgICAgICAgICAgbGV0IGNSb29tID0gYWN0aW9uLmFjdG9yLmdldFJvb20oKTtcclxuICAgICAgICAgICAgaWYgKGNSb29tID09I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gICAgICAgICAgICBsZXQgcm9vbUdvbmVGcm9tID0gYWN0aW9uLmFjdG9yLmdldFJvb20oKTtcclxuICAgICAgICAgICAgbGV0IGRpcmVjdGlvbiA9IGFjdGlvbi5nZXROb3VuKDApO1xyXG4gICAgICAgICAgICBsZXQgcm9vbUdvbmVJbnRvID0gcm9vbUdvbmVGcm9tLmNvbm5lY3Rpb25zW2RpcmVjdGlvbl07XHJcbiAgICAgICAgICAgIHJvb21Hb25lSW50by5wbGFjZShhY3Rpb24uYWN0b3IpO1xyXG5cclxuICAgICAgICAgICAgbGV0IGFjdG9yID0gYWN0aW9uLmFjdG9yO1xyXG4gICAgICAgICAgICBpZiAoYWN0b3IgPT0gV29ybGRTdGF0ZS5wbGF5ZXIpIHtcclxuICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKFwiWW91IGdvIFwiICsgRGlyZWN0aW9uTmFtZXNbRGlyZWN0aW9uW2RpcmVjdGlvbl1dLnRvTG93ZXJDYXNlKCkgKyBcIi5cIik7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBpZiAocm9vbUdvbmVGcm9tID09IFdvcmxkU3RhdGUucGxheWVyLmdldFJvb20oKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKG5ldyBTYXlUaGUoKSwgYWN0b3IsIFwiIGdvZXMgXCIgKyBEaXJlY3Rpb25OYW1lc1tEaXJlY3Rpb25bZGlyZWN0aW9uXV0udG9Mb3dlckNhc2UoKSArIFwiLlwiKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IG9wcG9zaXRlTmFtZSA9IERpcmVjdGlvbk5hbWVzW1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBPcHBvc2l0ZURpcmVjdGlvbltkaXJlY3Rpb25dXHJcbiAgICAgICAgICAgICAgICAgICAgXTtcclxuICAgICAgICAgICAgICAgICAgICBh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uXCJdKTtcclxuICAgICAgICAgICAgYXdhaXQgZGVzY3JpcHRpb24udGhlbih2YWx1ZSA9PiB7XHJcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMCwgcCA9IHZhbHVlW2ldOyBwICE9IHVuZGVmaW5lZDsgcCA9IHZhbHVlWysraV0pIHtcclxuICAgICAgICAgICAgICAgICAgICBjdXJyZW50Um9vbURlc2NyaXB0aW9uLmFwcGVuZENoaWxkKHApO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIGxldCB0aGluZ3MgPSByb29tLmdldENvbnRhaW5lZEFuZFZpc2libGUoKTtcclxuICAgICAgICAgICAgaWYgKHRoaW5ncy5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgdGhpbmdMaXN0ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcInBcIik7XHJcbiAgICAgICAgICAgICAgICB0aGluZ0xpc3QuY2xhc3NMaXN0LmFkZChcInJvb21EZXNjcmlwdGlvblwiKTtcclxuXHJcbiAgICAgICAgICAgICAgICBhd2FpdCBQcmludGluZ1Zpc2libGVUaGluZ3NSdWxlYm9vay5leGVjdXRlKHtcclxuICAgICAgICAgICAgICAgICAgICBub3VuIDogPFZpc2libGVUaGluZ3NPcHRpb25zPiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaW5ncyA6IHRoaW5ncyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGFpbmVyIDogdGhpbmdMaXN0XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICAgICAgY3VycmVudFJvb21EZXNjcmlwdGlvbi5hcHBlbmRDaGlsZCh0aGluZ0xpc3QpO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBmb3IgKGxldCBpbmRleCA9IDAsIHZhbHVlID0gcm9vbS5jb25uZWN0aW9uc1tpbmRleF07IGluZGV4IDwgcm9vbS5jb25uZWN0aW9ucy5sZW5ndGg7IHZhbHVlID0gcm9vbS5jb25uZWN0aW9uc1srK2luZGV4XSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKHZhbHVlICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBwID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcInBcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgcC5jbGFzc0xpc3QuYWRkKFwicm9vbUV4aXRcIik7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGxldCBsaW5rID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImFcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgbGluay5jbGFzc0xpc3QuYWRkKFwicm9vbURpcmVjdGlvblwiKTtcclxuICAgICAgICAgICAgICAgICAgICBsaW5rLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKERpcmVjdGlvbk5hbWVzW0RpcmVjdGlvbltpbmRleF1dKSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIENvbnRyb2xzLkxpbmtzLm1ha2VMaW5rKGxpbmssIG5ldyBBY3Rpb25HbyhXb3JsZFN0YXRlLnBsYXllciwgaW5kZXgpKTtcclxuICAgICAgICAgICAgICAgICAgICBDb250cm9scy5LZXlIYW5kbGVyLmFwcGx5Q29kZShsaW5rLCBDb250cm9scy5LZXlIYW5kbGVyLmdldERpcmVjdGlvbkNvZGVCeUluZGV4KGluZGV4KSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHAuYXBwZW5kQ2hpbGQobGluayk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGxldCBkaXJlY3Rpb25SZXN1bHQgPSBcIjogXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKFdvcmxkU3RhdGUuaXNSb29tUmVtZW1iZXJlZCh2YWx1ZSkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGlyZWN0aW9uUmVzdWx0ICs9IHZhbHVlLmdldFByaW50ZWROYW1lKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGlyZWN0aW9uUmVzdWx0ICs9IFwiQSBuZXcgcGxhY2VcIjtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHAuYXBwZW5kQ2hpbGQoZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUoZGlyZWN0aW9uUmVzdWx0KSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbnRSb29tRXhpdHMuYXBwZW5kQ2hpbGQocCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZXhwb3J0IGludGVyZmFjZSBWaXNpYmxlVGhpbmdzT3B0aW9ucyB7XHJcbiAgICAgICAgY29udGFpbmVyIDogSFRNTEVsZW1lbnQsXHJcbiAgICAgICAgdGhpbmdzIDogQXJyYXk8VGhpbmc+XHJcbiAgICB9XHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBOb3VuID0gVmlzaWJsZVRoaW5nc09wdGlvbnNcclxuICAgICAqIEB0eXBlIHtSdWxlYm9va31cclxuICAgICAqL1xyXG4gICAgZXhwb3J0IHZhciBQcmludGluZ1Zpc2libGVUaGluZ3NSdWxlYm9vayA9IG5ldyBSdWxlYm9vayhcIlByaW50aW5nIHRoZSBuYW1lIG9mIHZpc2libGUgdGhpbmdzIGluIGEgcm9vbVwiKTtcclxuXHJcbiAgICBleHBvcnQgdmFyIFByaW50SW50cm9Ub1Zpc2libGVUaGluZ3NSdWxlID0gbmV3IFJ1bGUoe1xyXG4gICAgICAgIG5hbWUgOiBcIlByaW50IFxcXCJZb3UgY2FuIHNlZVxcXCIgdGV4dFwiLFxyXG4gICA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cclxuICAgICAgICAgICAgICAgIGxldCBzYXkgOiBTYXlcclxuICAgICAgICAgICAgICAgIGlmICh2YWx1ZSBpbnN0YW5jZW9mIFRoaW5nICYmIHZhbHVlLnVuaXF1ZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHNheSA9IG5ldyBTYXkobmV3IFNheVRoZShmYWxzZSksIHZhbHVlKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2F5ID0gbmV3IFNheShuZXcgU2F5QW4oZmFsc2UpLCB2YWx1ZSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBhd2FpdCBzYXkuZ2V0UHVyZUVsZW1lbnRzKCkudGhlbih2YWx1ZTIgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwLCBlbGVtZW50ID0gdmFsdWUyW2ldOyBlbGVtZW50ICE9IHVuZGVmaW5lZDsgZWxlbWVudCA9IHZhbHVlMlsrK2ldKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmsuYXBwZW5kQ2hpbGQoZWxlbWVudCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICAgICAgQ29udHJvbHMuTGlua3MubWFrZUxpbmsobGluaywgbmV3IEFjdGlvbkV4YW1pbmUoV29ybGRTdGF0ZS5wbGF5ZXIsIHZhbHVlKSk7XHJcbiAgICAgICAgICAgICAgICBDb250cm9scy5LZXlIYW5kbGVyLmFwcGx5Q29kZShsaW5rLCBDb250cm9scy5LZXlIYW5kbGVyLmdldEZpcnN0S2V5Q29kZSgpKTtcclxuXHJcbiAgICAgICAgICAgICAgICBub3VuLmNvbnRhaW5lci5hcHBlbmRDaGlsZChsaW5rKTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoKGkgKyAxKSA8IG5vdW4udGhpbmdzLmxlbmd0aCkge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Li8uLi8uLi9FbGVtZW50cy9Nb2R1bGVzL1Jvb21IYW5kbGVyLnRzXCIgLz5cclxuXHJcbmNsYXNzIENvaW5Qb3VjaCBleHRlbmRzIFRoaW5nIHtcclxuICAgIHByaXZhdGUgY29pbnMgOiBudW1iZXIgPSAwO1xyXG5cclxuICAgIHB1YmxpYyBhZGRDb2lucyAoY29pbnMgOiBudW1iZXIpIHtcclxuICAgICAgICB0aGlzLmNvaW5zICs9IGNvaW5zO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyByZW1vdmVDb2lucyAoY29pbnMgOiBudW1iZXIpIHtcclxuICAgICAgICB0aGlzLmNvaW5zIC09IGNvaW5zO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRDb2lucyAoKSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuY29pbnM7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFNoaW55ICgpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5jb2lucyA+IDA7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGNvbnN0cnVjdG9yIChvcHRpb25zIDogVGhpbmdPcHRpb25zKSB7XHJcbiAgICAgICAgc3VwZXIob3B0aW9ucyk7XHJcblxyXG4gICAgICAgIHRoaXMuYWRkR2V0QWx0ZXJhdGlvbnMoKHB1cnNlKSA9PiB7XHJcbiAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICBjb2lucyA6IHB1cnNlLmdldENvaW5zKClcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgdGhpcy5hZGRTZXRBbHRlcmF0aW9ucygocHVyc2UsIGNoYW5nZU9iaikgPT4ge1xyXG4gICAgICAgICAgICBwdXJzZS5jb2lucyA9IChjaGFuZ2VPYmouY29pbnMpO1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBzdGF0aWMgY2FycnlPdXRUY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HJcbiAgICAgICAgICAgICAgICAgICAgdGhpbmcucmVtb3ZlQ29pbnModGhpbmcuZ2V0Q29pbnMoKSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChhY3RvciA9PSBXb3JsZFN0YXRlLnBsYXllcikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChcIllvdSBlbXB0eSBcIiwgbmV3IFNheVRoZSgpLCB0aGluZywgXCIgaW50byB5b3VyIFwiLCBhY3RvclBvdWNoZXNbMF0sIFwiLiBZb3VyIFwiLCBhY3RvclBvdWNoZXNbMF0sIFwiIG5vdyBoYXMgXCIgKyBhY3RvclBvdWNoZXNbMF0uZ2V0Q29pbnMoKS50b1N0cmluZygpICsgXCIgY29pbnMuXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKG5ldyBTYXlUaGUoKSwgYWN0b3IsIFwiIGVtcHRpZXMgXCIsIG5ldyBTYXlUaGUoKSwgdGhpbmcsIFwiIGludG8gXCIsIFNheS5oaXNIZXJzSXRzKGFjdG9yKSwgYWN0b3JQb3VjaGVzWzBdLCBcIi5cIik7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAvLyBnaXZlIHRoZW0gdGhlIG9sJyBzd2l0Y2hhcm9vXHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IG15Q29pbnMgPSBhY3RvclBvdWNoZXNbMF0uZ2V0Q29pbnMoKTtcclxuICAgICAgICAgICAgICAgICAgICBhY3RvclBvdWNoZXNbMF0ucmVtb3ZlQ29pbnMobXlDb2lucyk7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpbmcuYWRkQ29pbnMobXlDb2lucyk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGFjdG9yID09IFdvcmxkU3RhdGUucGxheWVyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKFwiWW91IGVtcHR5IHlvdXIgXCIsIGFjdG9yUG91Y2hlc1swXSwgXCIgaW50byBcIiwgbmV3IFNheVRoZSgpLCB0aGluZywgXCIuXCIsIFNheS5QQVJBR1JBUEhfQlJFQUspO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBsZXQgZHJvcCA9IG5ldyBBY3Rpb25Ecm9wKGFjdG9yLCBhY3RvclBvdWNoZXNbMF0pO1xyXG4gICAgICAgICAgICAgICAgICAgIGF3YWl0IGRyb3AuZXhlY3V0ZSgpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoVGhpbmcuRW5jbG9zZWRSZWxhdGlvbi5nZXRMZWZ0KGFjdG9yUG91Y2hlc1swXSkgPT0gYWN0b3IpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFjdG9yID09IFdvcmxkU3RhdGUucGxheWVyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChcIllvdSBjYW4ndCBnZXQgcmlkIG9mIHlvdXIgXCIsIGFjdG9yUG91Y2hlc1swXSwgXCIhXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIGNvbmRpdGlvbnMgOiAocnVsZWJvb2sgOiBSdWxlYm9va1J1bm5lcjxBY3Rpb25UYWtlPikgPT4ge1xyXG4gICAgICAgICAgICByZXR1cm4gKCg8QWN0aW9uVGFrZT4gcnVsZWJvb2subm91bikuZ2V0Tm91bigwKSBpbnN0YW5jZW9mIENvaW5Qb3VjaCk7XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcbn1cclxuXHJcbkFjdGlvblRha2UuY2FycnkuYWRkUnVsZShDb2luUG91Y2guY2FycnlPdXRUYWtpbmdDb2luUG91Y2hlcyk7XHJcblxyXG5TYXkuYWZ0ZXJQcmludGluZy5hZGRSdWxlKG5ldyBSdWxlKFxyXG4gICAge1xyXG4gICAgICAgIG5hbWUgOiBcIkluY2x1ZGUgY29udGVudHMgb2YgQ29pbiBQb3VjaCB3aGlsZSBQcmludGluZyBWaXNpYmxlIFRoaW5ncyBpbiBhIFJvb21cIixcclxuICAgICAgICBjb2RlIDogKHJ1bGVib29rIDogUnVsZWJvb2tSdW5uZXI8U2F5PikgPT4ge1xyXG4gICAgICAgICAgICBsZXQgc2F5ID0gPFNheT4gcnVsZWJvb2subm91bjtcclxuICAgICAgICAgICAgbGV0IHBvdWNoID0gPENvaW5Qb3VjaD4gc2F5LmN1cnJlbnROb3VuO1xyXG4gICAgICAgICAgICBzYXkuY3VycmVudE5vdW5FbGVtZW50cy5wdXNoKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKFwiIHdpdGggXCIgKyBwb3VjaC5nZXRDb2lucygpLnRvU3RyaW5nKCkgKyBcIiBjb2luc1wiKSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBjb25kaXRpb25zIDogKHJ1bGVib29rIDogUnVsZWJvb2tSdW5uZXI8U2F5PikgPT4ge1xyXG4gICAgICAgICAgICByZXR1cm4gRWxlbWVudHMuUm9vbUhhbmRsZXIuUHJpbnRpbmdWaXNpYmxlVGhpbmdzUnVsZWJvb2suaXNSdW5uaW5nKClcclxuICAgICAgICAgICAgICAgICYmICg8U2F5PiBydWxlYm9vay5ub3VuKS5jdXJyZW50Tm91biBpbnN0YW5jZW9mIENvaW5Qb3VjaFxyXG4gICAgICAgICAgICAgICAgJiYgKDxDb2luUG91Y2g+ICg8U2F5PiBydWxlYm9vay5ub3VuKS5jdXJyZW50Tm91bikuZ2V0Q29pbnMoKS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IpLnNvcnQodGhpbmdTb3J0KTtcclxuICAgICAgICBsZXQgd29ybiA9IFRoaW5nLldlYXJSZWxhdGlvbi5nZXRSaWdodChwbGF5ZXIpLnNvcnQodGhpbmdTb3J0KTtcclxuICAgICAgICBsZXQgY2FycmllZCA9IFRoaW5nLkNhcnJ5UmVsYXRpb24uZ2V0UmlnaHQocGxheWVyKS5zb3J0KHRoaW5nU29ydCk7XHJcblxyXG4gICAgICAgIGlmICh3aWVsZGVkLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgcHJpbnRIZWFkZXIoXCJXaWVsZGVkXCIpO1xyXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHdpZWxkZWQubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIGF3YWl0IHByaW50VGhpbmcod2llbGRlZFtpXSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmICh3b3JuLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgcHJpbnRIZWFkZXIoXCJXb3JuXCIpO1xyXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHdvcm4ubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIGF3YWl0IHByaW50VGhpbmcod29ybltpXSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmIChjYXJyaWVkLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgcHJpbnRIZWFkZXIoXCJDYXJyaWVkXCIpO1xyXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNhcnJpZWQubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIGF3YWl0IHByaW50VGhpbmcoY2FycmllZFtpXSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGxldCBwb3VjaCA9IDxBcnJheTxDb2luUG91Y2g+PiBUaGluZy5DYXJyeVJlbGF0aW9uLmdldFJpZ2h0VHlwZShXb3JsZFN0YXRlLnBsYXllciwgQ29pblBvdWNoKTtcclxuICAgICAgICBpZiAocG91Y2gubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICBsZXQgcCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJwXCIpO1xyXG4gICAgICAgICAgICBwLmNsYXNzTGlzdC5hZGQoXCJpbnZlbnRvcnlHb2xkXCIpO1xyXG4gICAgICAgICAgICBsZXQgcyA6IFNheTtcclxuICAgICAgICAgICAgaWYgKHBvdWNoWzBdLmdldENvaW5zKCkgPiAwKSB7XHJcbiAgICAgICAgICAgICAgICBzID0gbmV3IFNheShcIlRoZXJlIGFyZSBcIiArIHBvdWNoWzBdLmdldENvaW5zKCkudG9TdHJpbmcoKSArIFwiIGNvaW5zIGluIHlvdXIgXCIsIHBvdWNoWzBdLCBcIi5cIik7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBzID0gbmV3IFNheShcIlRoZXJlIGFyZSBubyBjb2lucyBpbiB5b3VyIFwiLCBwb3VjaFswXSwgXCIuXCIpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGF3YWl0IHMuZ2V0UHVyZUVsZW1lbnRzKCkudGhlbihlbGVtZW50cyA9PiB7XHJcbiAgICAgICAgICAgICAgICBlbGVtZW50cy5mb3JFYWNoKGVsZW1lbnQgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHAuYXBwZW5kQ2hpbGQoZWxlbWVudCk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIGNvbnRhaW5lci5hcHBlbmRDaGlsZChwKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbn0iLCIvLy8gPHJlZmVyZW5jZSBwYXRoPVwiLi4vQWN0aW9uLnRzXCIgLz5cclxuLy8vIDxyZWZlcm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wKSBpbnN0YW5jZW9mIFJvb20pIHtcclxuICAgICAgICAgICAgbGV0IGFjdG9yID0gYWN0aW9uLmFjdG9yO1xyXG4gICAgICAgICAgICBsZXQgY1Jvb20gPSBhY3Rvci5nZXRSb29tKCk7XHJcbiAgICAgICAgICAgIGlmIChjUm9vbSA9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBsZXQgZFJvb20gPSBhY3Rpb24uZ2V0Tm91bigwKTtcclxuXHJcbiAgICAgICAgICAgIGlmIChjUm9vbSA9PSBkUm9vbSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKGFjdG9yLmlzUGxheWVyKCkpIHtcclxuICAgICAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChcIllvdSBhcmUgYWxyZWFkeSB0aGVyZSFcIik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGxldCBjb2RlO1xyXG5cclxuICAgICAgICAgICAgaWYgKGFjdG9yID09IFdvcmxkU3RhdGUucGxheWVyKSB7XHJcbiAgICAgICAgICAgICAgICBjb2RlID0gKHJvb20gOiBSb29tKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFdvcmxkU3RhdGUuaXNSb29tUmVtZW1iZXJlZChyb29tKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgbGV0IGRpcmVjdGlvbiA9IGNSb29tLmJlc3REaXJlY3Rpb25UbyhkUm9vbSwgY29kZSk7XHJcbiAgICAgICAgICAgIGlmIChkaXJlY3Rpb24gPT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoYWN0b3IuaXNQbGF5ZXIoKSkge1xyXG4gICAgICAgICAgIC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uICAgICAgICAgICAgICAgIGxldCByb29tID0gbWFwLmdldFJvb20oeCwgeSk7XHJcbiAgICAgICAgICAgICAgICBsZXQgcm9vbU5vZGUgPSBuZXcgUm9vbU5vZGUocm9vbSk7XHJcbiAgICAgICAgICAgICAgICBhd2FpdCByb29tTm9kZS5jcmVhdGVSb29tTmFtZUZsb2F0ZXIoKTtcclxuXHJcbiAgICAgICAgICAgICAgICBsZXQgcm9vbURpdiA9IHJvb21Ob2RlLmdldEVsZW1lbnQoKTtcclxuICAgICAgICAgICAgICAgIHJvdy5hcHBlbmRDaGlsZChyb29tRGl2KTtcclxuXHJcbiAgICAgICAgICAgICAgICBlbGVtZW50c1t4LnRvU3RyaW5nKCkgKyBcIjtcIiArIHkudG9TdHJpbmcoKV0gPSByb29tTm9kZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBtYXBUYXJnZXQuYXBwZW5kQ2hpbGQocm93KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGF3YWl0IHVwZGF0ZU9sZE1hcCgpO1xyXG4gICAgfVxyXG5cclxuICAgIGV4cG9ydCBhc3luYyBmdW5jdGlvbiB1cGRhdGVPbGRNYXAgKCkge1xyXG4gICAgICAgIGxldCBtYXAgPSBsYXN0TWFwO1xyXG4gICAgICAgIGZvciAobGV0IHkgPSBtYXAuaGlnaGVzdFk7IHkgPj0gbWFwLmxvd2VzdFk7IHktLSkge1xyXG4gICAgICAgICAgICBmb3IgKGxldCB4ID0gbWFwLmxvd2VzdFg7IHggPD0gbWFwLmhpZ2hlc3RYOyB4KyspIHtcclxuICAgICAgICAgICAgICAgIGF3YWl0IGVsZW1lbnRzW3gudG9TdHJpbmcoKSArIFwiO1wiICsgeS50b1N0cmluZygpXS51cGRhdGUoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxufSIsIi8vIC8vLyA8cmVmZXJlbmNlIHBhdGg9XCIuLi9FbGVtZW50cy50c1wiIC8+XHJcbi8v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pLmlzTWFsZSgpID8gXCJKb2VcIiA6IFwiSmFuZVwiKSk7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDE6IHJldHVybiBcIldldCBOb29kbGVcIjtcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJldHVybiBcIk91dCBvZiBib3VuZHMuXCI7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICApO1xyXG4gICAgZXhwb3J0IGxldCBBZ2lsaXR5ID0gbmV3IEF0dHJpYnV0ZShcclxuICAgICAgICBcIkFnaWxpdHlcIixcclxuICAgICAgICB2YWx1ZSA9PiB7XHJcbiAgICAgICAgICAgIHN3aXRjaCAodmFsdWUpIHtcclxuICAgICAgICAgICAgICAgIGNhc2UgNTogcmV0dXJuIFwiQ2F0bGlrZVwiO1xyXG4gICAgICAgICAgICAgICAgY2FzZSA0OiByZXR1cm4gXCJHeW1uYXN0XCI7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDM6IHJldHVybiBcIkFjY3VyYXRlXCI7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDI6IHJldHVybiBcIkNvbW1vblwiO1xyXG4gICAgICAgICAgICAgICAgY2FzZSAxOiByZXR1cm4gXCJBY2NpZGVudC1wcm9uZVwiO1xyXG4gICAgICAgICAgICAgICAgZGVmYXVsdDogcmV0dXJuIFwiT3V0IG9mIGJvdW5kcy5cIjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICk7XHJcblxyXG4gICAgZXhwb3J0IGxldCBJbnRlbGxpZ2VuY2UgPSBuZXcgQXR0cmlidXRlKFxyXG4gICAgICAgIFwiSW50ZWxsaWdlbmNlXCIsXHJcbiAgICAgICAgdmFsdWUgPT4ge1xyXG4gICAgICAgICAgICBzd2l0Y2ggKHZhbHVlKSB7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDU6IHJldHVybiBcIkdlbml1c1wiO1xyXG4gICAgICAgICAgICAgICAgY2FzZSA0OiByZXR1cm4gXCJHaWZ0ZWRcIjtcclxuICAgICAgICAgICAgICAgIGNhc2UgMzogcmV0dXJuIFwiS25vd2xlZGdlYWJsZVwiO1xyXG4gICAgICAgICAgICAgICAgY2FzZSAyOiByZXR1cm4gXCJOb3JtYWxcIjtcclxuICAgICAgICAgICAgICAgIGNhc2UgMTogcmV0dXJuIFwiRG9vclwiO1xyXG4gICAgICAgICAgICAgICAgZGVmYXVsdDogcmV0dXJuIFwiT3V0IG9mIGJvdW5kcy5cIjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICk7XHJcblxyXG4gICAgZXhwb3J0IGxldCBDaGFybSA9IG5ldyBBdHRyaWJ1dGUoXHJcbiAgICAgICAgXCJDaGFybVwiLFxyXG4gICAgICAgIHZhbHVlID0+IHtcclxuICAgICAgICAgICAgc3dpdGNoICh2YWx1ZSkge1xyXG4gICAgICAgICAgICAgICAgY2FzZSA1OiByZXR1cm4gKCg8SHVtYW5vaWQ+IFdvcmxkU3RhdGUucGxheWVyKS5pc01hbGUoKSA/IFwiQ2FzYW5vdmFcIiA6IFwiU2VkdWN0cmVzc1wiKTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNDogcmV0dXJuIFwiRGlwbG9tYXRcIjtcclxuICAgICAgICAgICAgICAgIGNhc2UgMzogcmV0dXJuIChcIkNoZWVyeSBTYWxlc1wiICsgKCg8SHVtYW5vaWQ+IFdvcmxkU3RhdGUucGxheWVyKS5pc01hbGUoKSA/IFwibWFuXCIgOiBcIndvbWFuXCIpKTtcclxuICAgICAgICAgICAgICAgIGNhc2UgMjogcmV0dXJuIFwiTm90IGV2ZW4gdHJ5aW5nXCI7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDE6IHJldHVybiBcIlVucGxlYXNhbnRcIjtcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJldHVybiBcIk91dCBvZiBib3VuZHMuXCI7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICApO1xyXG5cclxuICAgIGV4cG9ydCBsZXQgQ29ycnVwdGlvbiA9IG5ldyBBdHRyaWJ1dGUoXHJcbiAgICAgICAgXCJDb3JydXB0aW9uXCIsXHJcbiAgICAgICAgdmFsdWUgPT4ge1xyXG4gICAgICAgICAgICByZXR1cm4gXCJOb3QgZGVmaW5lZFwiXHJcbiAgICAgICAgfSxcclxuICAgICAgICAwLCAxMDBcclxuICAgICk7XHJcblxyXG5cclxuICAgIGV4cG9ydCBsZXQgR2VuZGVySWRlbnRpdHkgPSBuZXcgQXR0cmlidXRlKFxyXG4gICAgICAgIFwiR2VuZGVyIElkZW50aXR5XCIsXHJcbiAgICAgICAgdmFsdWUgPT4ge1xyXG4gICAgICAgICAgICBpZiAodmFsdWUgPj0gNzUpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBcIllvdSBzdHJvbmdseSBmZWVsLCBhbmQgYWN0LCBsaWtlIGEgd29tYW4uXCI7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodmFsdWUgPj0gNjApIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBcIllvdSBmZWVsLCBhbmQgYWN0LCBsaWtlIGEgd29tYW4uXCI7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodmFsdWUgPj0gNDApIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBcIllvdSBkb24ndCBmZWVsIG5vciBhY3QgbGlrZSBhbnkgcGFydGljdWxhciBnZW5kZXIuXCI7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodmFsdWUgPj0gMjApIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBcIllvdSBmZWVsLCBhbmQgYWN0LCBsaWtlIGEgbWFuLlwiO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIFwiWW91IHN0cm9uZ2x5IGZlZWwsIGFuZCBhY3QsIGxpa2UgYSBtYW4uXCI7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxy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gICAgICAgICAgICAgIGxldCBhdHRyID0gQXR0cmlidXRlLmdldEF0dHJpYnV0ZShuYW1lKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGF0dHIgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNldFN0YXQoYXR0ciwgY2hhbmdlcy5TdGF0c1tuYW1lXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoY2hhbmdlcy5Ta2lsbHMgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgbmFtZSBpbiBjaGFuZ2VzLlNraWxscykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXR0ciA9IFNraWxsLmdldFNraWxsKG5hbWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYXR0ciAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0U2tpbGwoYXR0ciwgY2hhbmdlcy5Ta2lsbHNbbmFtZV0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGNoYW5nZUhlYWx0aCAobiA6IG51bWJlcikge1xyXG4gICAgICAgIGxldCBib2R5cGFydHMgPSA8QXJyYXk8Qm9keXBhcnQ+PiB0aGlzLmdldFBhcnRzKEJvZHlwYXJ0KTtcclxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGJvZHlwYXJ0cy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICBib2R5cGFydHNbaV0uY2hhbmdl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wZXJzb24uZ2V0Um9vbSgpIGluc3RhbmNlb2YgUm9vbVJhbmRvbVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAmJiAoPFJvb21SYW5kb20+IHBlcnNvbi5nZXRSb29tKCkpLnBsYWNlZCkpKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuXHJcbiAgICAgICAgICAgIGxldCBwZW9wbGUgPSA8QXJyYXk8UGVyc29uPj4gVGhpbmcuSW5zaWRlUm9vbVJlbGF0aW9uLmdldEFueVJpZ2h0VHlwZShQZXJzb24pLmZpbHRlcihpc0FJQXZhaWxhYmxlKTtcclxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBwZW9wbGUubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIGxldCBhY3Rpb24gPSBhd2FpdCBwZW9wbGVbaV0uQUkuZXhlY3V0ZShwZW9wbGVbaV0pO1xyXG4gICAgICAgICAgICAgICAgbGV0IHBlcnNvbiA9IHBlb3BsZVtpXTtcclxuICAgICAgICAgICAgICAgIGxldCB2aXNpYmxlID0gcGVvcGxlW2ldLmlzVmlzaWJsZVRvKFdvcmxkU3RhdGUucGxheWVyKTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoYWN0aW9uICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBwcmludFZhbHVlOiBTYXkgPSBhd2FpdCBhY3Rpb24uZXhlY3V0ZSgpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIChcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpc2libGUgfHxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBlcnNvbi5pc1Zpc2libGVUbyhXb3JsZFN0YXRlLnBsYXllcilcclxuICAgICAgICAgICAgICAgICAgICAgICAgKSAmJiBwcmludFZhbHVlICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgIC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F4aW11bVJlbWVtYmVyZWRSb29tcygpID8gbWF4U3RlcHMgOiBXb3JsZFN0YXRlLmdldE1heGltdW1SZW1lbWJlcmVkUm9vbXMoKTtcclxuXHJcbiAgICAgICAgbGV0IHJlY3Vyc2l2ZUJlc3RQYXRoID0gKGNQYXRoIDogQXJyYXk8Um9vbT4sIGNSb29tIDogUm9vbSwgZGVzdGluYXRpb24gOiBSb29tKSA9PiB7XHJcbiAgICAgICAgICAgIC8vIElnbm9yZSBcImJhZFwiIHJvb21zXHJcbiAgICAgICAgICAgIGlmICghdmFsaWRpdHlDb2RlKGNSb29tKSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIC8vIFByZXZlbnQgdGhlIGNvZGUgZnJvbSBzdHJheWluZyB0b28gZmFyXHJcbiAgICAgICAgICAgIGlmIChjUm9vbSA9PSBkZXN0aW5hdGlvbikge1xyXG4gICAgICAgICAgICAgICAgbWF4U3RlcHMgPSBtYXhTdGVwcyA+IGNQYXRoLmxlbmd0aCA/IGNQYXRoLmxlbmd0aCA6IG1heFN0ZXBzOyAvLyBTdG9wIGNvbnNpZGVyaW5nIHdvcnNlIHJvdXRlc1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGNQYXRoO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNQYXRoLmxlbmd0aCA+IG1heFN0ZXBzKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgbGV0IHBhdGhzID0gW107XHJcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpbmRleCBpbiBSb29tLkRJUkVDVElPTlMpIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgZGlyZWN0aW9uID0gUm9vbS5ESVJFQ1RJT05TW2luZGV4XTtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgbmV4dFJvb20gPSBjUm9vbS5jb25uZWN0aW9uc1tkaXJlY3Rpb25dO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChuZXh0Um9vbSAhPSB1bmRlZmluZWQgJiYgY1BhdGguaW5kZXhPZihuZXh0Um9vbSkgPT0gLTEgJiYgdmFsaWRpdHlDb2RlKG5leHRSb29tKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGF0aCA9IHJlY3Vyc2l2ZUJlc3RQYXRoKGNQYXRoLmNvbmNhdChbbmV4dFJvb21dKSwgbmV4dFJvb20sIGRlc3RpbmF0aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBhdGggIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXRocy5wdXNoKHBhdGgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgbGV0IHNob3J0ZXN0SW5kZXggPSAwO1xyXG4gICAgICAgICAgICAgICAgcGF0aHMuZm9yRWFjaCgodmFsdWUsIGluZGV4LCBhcnJheSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICh2YWx1ZS5sZW5ndGggPCBwYXRoc1tzaG9ydGVzdEluZGV4XS5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2hvcnRlc3RJbmRleCA9IGluZGV4O1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhdGhzW3Nob3J0ZXN0SW5kZXhdO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgbGV0IHBhdGhzID0gQXJyYXkoUm9vbS5ESVJFQ1RJT05TLmxlbmd0aCk7XHJcbiAgICAgICAgbGV0IHNob3J0ZXN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pemUgOiBudW1iZXIgPSAwO1xyXG4gICAgcHVibGljIHNpbGljb25lIDogbnVtYmVyID0gMDtcclxuXHJcbiAgICBwdWJsaWMgc29yZW5lc3NXZWlnaHQgPSBCb2R5cGFydC5XRUlHSFRfTUVESVVNO1xyXG4gICAgcHVibGljIGdlbmRlcldlaWdodCA9IEJvZHlwYXJ0LldFSUdIVF9NRURJVU07XHJcbiAgICBwdWJsaWMgc2xvdHMgOiBBcnJheTxudW1iZXI+ID0gW0h1bWFub2lkLlNMT1RfQlVUVF07XHJcbiAgICBwdWJsaWMgc2x1dHRpbmVzcyA9IEJvZHlwYXJ0LlNMVVRUSU5FU1NfSElHSF9TTFVUO1xyXG4gICAgcHVibGljIHNsdXR0aW5lc3NXZWlnaHQgPSBCb2R5cGFydC5XRUlHSFRfTUVESVVNO1xyXG5cclxuICAgIHB1YmxpYyBnZXRTbHV0dGluZXNzICgpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5nZXRTaXplKCkgKiAzMztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgY29uc3RydWN0b3IgKG9wdGlvbnM/IDogVGhpbmdPcHRpb25zKSB7XHJcbiAgICAgICAgc3VwZXIob3B0aW9ucyk7XHJcbiAgICAgICAgdGhpcy5hZGRHZXRBbHRlcmF0aW9ucygodGhpbmcpID0+IHtcclxuICAgICAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgICAgIFNpemUgOiB0aGlzLnNpemUsXHJcbiAgICAgICAgICAgICAgICBTaWxpY29uZSA6IHRoaXMuc2lsaWNvbmVcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICB0aGlzLmFkZFNldEFsdGVyYXRpb25zKCh0aGluZywgY2hhbmdlcykgPT4ge1xyXG4gICAgICAgICAgICB0aGlzLnNpemUgPSBjaGFuZ2VzLlNpemU7XHJcbiAgICAgICAgICAgIHRoaXMuc2lsaWNvbmUgPSBjaGFuZ2VzLlNpbGljb25lO1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WzM2LCBcIm1vbnN0cm91c1wiXVxyXG4gICAgICAgIF07XHJcblxyXG4gICAgICAgIGxldCBpO1xyXG4gICAgICAgIGZvciAoaSA9IDE7IGkgPCBzaXplVGFibGUubGVuZ3RoICYmIHNpemVUYWJsZVtpXVswXSA8IHNpemU7IGkrKykge31cclxuICAgICAgICByZXR1cm4gc2l6ZVRhYmxlW2kgLSAxXVsxXTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0R2VuZGVyVmFsdWUgKCkge1xyXG4gICAgICAgIGxldCBzaXplVGFibGUgPSBbXHJcbiAgICAgICAgICAgIFsxMCwgNjBdLCAvLyAzbCAydyA9IDlcclxuICAgICAgICAgICAgWzIwLCA0NV0sIC8vIDEwbCAzdyA9IDE5XHJcbiAgICAgICAgICAgIFsyMywgMzVdLCAvLyAxNGwgM3cgPSAyNFxyXG4gICAgICAgICAgICBbMjcsIDI4XSxcclxuICAgICAgICAgICAgWzMyLCAyNF0sXHJcbiAgICAgICAgICAgIFszNiwgMThdXHJcbiAgICAgICAgXTtcclxuXHJcbiAgICAgICAgbGV0IGk7XHJcbiAgICAgICAgZm9yIChpID0gMTsgaSA8IHNpemVUYWJsZS5sZW5ndGggJiYgc2l6ZVRhYmxlW2ldWzBdIDwgdGhpcy5nZXRBY3R1YWxTaXplKCk7IGkrKykge31cclxuICAgICAgICByZXR1cm4gc2l6ZVRhYmxlW2kgLSAxXVsxXTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgYXJyYW5nZUdlbmRlclZhbHVlIChndiA6IG51bWJlcikge1xyXG4gICAgICAgIGxldCBzaXplVGFibGUgPSBbXHJcbiAgICAgICAgICAgIFs2MCwgMywgMl0sIC8vIDNsIDJ3ID0gOVxyXG4gICAgICAgICAgICBbNDUsIDEwLCAzXSwgLy8gMTBsIDN3ID0gMTlcclxuICAgICAgICAgICAgWzM1LCAxNCwgM10sIC8vIDE0bCAzdyA9IDI0XHJcbiAgICAgICAgICAgIFsyOCwgM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WVuID0gKG93bmVyLmdldFN0YXQoQXR0cmlidXRlcy5Db3JydXB0aW9uKSA+IDUwKTtcclxuXHJcbiAgICAgICAgbGV0IHNheSA9IG5ldyBTYXkoXCJZb3VyIHNraW4gaXMgXCIpO1xyXG5cclxuICAgICAgICBpZiAodGhpcy5za2luU29mdG5lc3MgPiA3KSB7XHJcbiAgICAgICAgICAgIHNheS5hZGQoXCJwZXJmZWN0bHkgc21vb3RoXCIpO1xyXG4gICAgICAgIH0gZWxzZSBpZiAodGhpcy5za2luU29mdG5lc3MgPiA0KSB7XHJcbiAgICAgICAgICAgIHNheS5hZGQoXCJzbW9vdGhcIik7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgc2F5LmFkZChcInJvdWdoXCIpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgc2F5LmFkZChcIiBhbmQgXCIpO1xyXG5cclxuICAgICAgICBpZiAodGhpcy5za2luSGFpcmluZXNzID4gOCkge1xyXG4gICAgICAgICAgICBzYXkuYWRkKFwiaGFpcnksIGxpa2UgYSBnb3JpbGxhJ3NcIilcclxuICAgICAgICB9IGVsc2UgaWYgKHRoaXMuc2tpbkhhaXJpbmVzcyA+IDYpIHtcclxuICAgICAgICAgICAgc2F5LmFkZChcImhhaXJ5XCIpXHJcbiAgICAgICAgfSBlbHNlIGlmICh0aGlzLnNraW5IYWlyaW5lc3MgPiAzKSB7XHJcbiAgICAgICAgICAgIHNheS5hZGQoXCJzb21ld2hhdCBoYWlybGVzc1wiKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBzYXkuYWRkKFwiY29tcGxldGVseSBoYWlybGVzc1wiKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHNheS5hZGQoXCIuXCIpO1xyXG5cclxuICAgICAgICBpZiAoZ3JlZW4pIHtcclxuICAgICAgICAgICAgc2F5LmFkZChcIiBUaGUgdGFpbnQgb2YgeW91ciBjb3JydXB0aW9uIGhhcyB0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jdGlvbi5hY3RvciA9PSBXb3JsZFN0YXRlLnBsYXllcikge1xyXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKFwiWW91IGNhbiBvbmx5IHJlbW92ZSBDbG90aGluZy5cIik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGNoZWNrSXNIZWxkID0gQWN0aW9uUmVtb3ZlLmNoZWNrLmNyZWF0ZUFuZEFkZFJ1bGUoe1xyXG4gICAgICAgIG5hbWUgOiBcIklzIG5vdW4gd29yblwiLFxyXG4gICAgICAgIGZpcnN0UHJpb3JpdHkgOiBSdWxlLlBSSU9SSVRZX0hJR0gsXHJcbiAgICAgICAgY29kZSA6IGFzeW5jIChydW5uZXIgOiBSdWxlYm9va1J1bm5lcjxBY3Rpb25SZW1vdmU+KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBhY3Rpb24gPSBydW5uZXIubm91bjtcclxuICAgICAgICAgICAgbGV0IG5vdW4gPSBhY3Rpb24uZ2V0Q2xvdGhpbmcoKTtcclxuICAgICAgICAgICAgaWYgKCFUaGluZy5XZWFyUmVsYXRpb24uaXNSaWdodChhY3Rpb24uYWN0b3IsIG5vdW4pKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoYWN0aW9uLmFjdG9yID09IFdvcmxkU3RhdGUucGxheWVyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQoXCJZb3UgYXJlIG5vdCB3ZWFyaW5nIGl0LlwiKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHB1YmxpYyBzdGF0aWMgY2FycnlEZW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lua2luZ1J1bGVib29rLmFkZFJ1bGUobmV3IFJ1bGUoXHJcbiAgICB7XHJcbiAgICAgICAgbmFtZSA6IFwiSHlwZXJsaW5rIC0gUmVtb3ZlXCIsXHJcbiAgICAgICAgZmlyc3RQcmlvcml0eSA6IFJ1bGUuUFJJT1JJVFlfSElHSEVTVCxcclxuICAgICAgICBjb2RlIDogKHJ1bGVib29rIDogUnVsZWJvb2tSdW5uZXI8VGhpbmc+KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCB0aGluZyA9IDxUaGluZz4gcnVsZWJvb2subm91bjtcclxuXHJcbiAgICAgICAgICAgIGlmICh0aGluZyBpbnN0YW5jZW9mIENsb3RoaW5nICYmIChUaGluZy5XZWFyUmVsYXRpb24uaXNSaWdodChXb3JsZFN0YXRlLnBsYXllciwgdGhpbmcpKSkge1xyXG4gICAgICAgICAgICAgICAgRWxlbWVudHMuSHlwZXJsaW5rSGFuZGxlci5hZGRBdmFpbGFibGVBY3Rpb24oXCJSZW1vdmVcIiwgbmV3IEFjdGlvblJlbW92ZShXb3JsZFN0YXRlLnBsYXllciwgdGhpbmcpKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuKSk7XHJcblxyXG4vKipcclxuIEludmVudG9yeVxyXG4gKi9cclxuRWxlbWVudHMuSW52ZW50b3J5SGFuZGxlci5MaW5raW5nVGhpbmcuYWRkUnVsZShuZXcgUnVsZShcclxuICAgIHtcclxuICAgICAgICBuYW1lIDogXCJJbnZlbnRvcnkgLSBSZW1vdmVcIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9MT1dFU1QsXHJcbiAgICAgICAgY29kZSA6IChydWxlYm9vayA6IFJ1bGVib29rUnVubmVyPFRoaW5nPikgPT4ge1xyXG4gICAgICAgICAgICBsZXQgdGhpbmcgPSA8VGhpbmc+IHJ1bGVib29rLm5vdW47XHJcblxyXG4gICAgICAgICAgICBpZiAodGhpbmcgaW5zd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YXI+KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBhY3Rpb24gPSBydW5uZXIubm91bjtcclxuICAgICAgICAgICAgbGV0IG5vdW4gPSBhY3Rpb24uZ2V0Q2xvdGhpbmcoKTtcclxuICAgICAgICAgICAgaWYgKCEobm91biBpbnN0YW5jZW9mIENsb3RoaW5nKSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKGFjdGlvbi5hY3RvciA9PSBXb3JsZFN0YXRlLnBsYXllcikge1xyXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKFwiWW91IGNhbiBvbmx5IHdlYXIgQ2xvdGhpbmcuXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBjaGVja0lzSGVsZCA9IEFjdGlvbldlYXIuY2hlY2suY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiSXMgbm91biBoZWxkXCIsXHJcbiAgICAgICAgZmlyc3RQcmlvcml0eSA6IFJ1bGUuUFJJT1JJVFlfSElHSCxcclxuICAgICAgICBjb2RlIDogYXN5bmMgKHJ1bm5lciA6IFJ1bGVib29rUnVubmVyPEFjdGlvbldlYXI+KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBhY3Rpb24gPSBydW5uZXIubm91bjtcclxuICAgICAgICAgICAgbGV0IG5vdW4gPSBhY3Rpb24uZ2V0Q2xvdGhpbmcoKTtcclxuICAgICAgICAgICAgaWYgKCFUaGluZy5DYXJyeVJlbGF0aW9uLmlzUmlnaHQoYWN0aW9uLmFjdG9yLCBub3VuKSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKGFjdGlvbi5hY3RvciA9PSBXb3JsZFN0YXRlLnBsYXllcikge1xyXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKFwiKGZpcnN0IHRha2luZyB0aGUgXCIsIG5vdW4sIFwiKVwiLCBTYXkuTElORV9CUkVBSyk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBsZXQgdGFraW5nQWN0aW9uID0gbmV3IEFjdGlvblRha2UoYWN0aW9uLmFjdG9yLCBub3VuKTtcclxuICAgICAgICAgICAgICAgIGF3YWl0IHRha2luZ0FjdGlvbi5leGVjdXRlKCk7XHJcbiAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZCh0YWtpbmdBY3Rpb24uc2F5KTtcclxuICAgICAgICAgICAgICAgIGlmICghVGhpbmcuQ2FycnlSZWxhdGlvbi5pc1JpZ2h0KGFjdGlvbi5hY3Rvciwgbm91bikpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGNhcnJ5RGVmYXVsdCA9IEFjdGlvbldlYXIuY2FycnkuY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiU2V0IENsb3RoaW5nIGFzIFdvcm5cIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9NRURJVU0sXHJcbiAgICAgICAgY29kZSA6IChydW5uZXIgOiBSdWxlYm9va1J1bm5lcjxBY3Rpb25XZWFyPikgPT4ge1xyXG4gICAgICAgICAgICBsZXQgYWN0aW9uID0gcnVubmVyLm5vdW47XHJcbiAgICAgICAgICAgIGxldCBub3VuID0gYWN0aW9uLmdldENsb3RoaW5nKCk7XHJcbiAgICAgICAgICAgIFRoaW5nLldlYXJSZWxhdGlvbi5zZXRSZWxhdGlvbihhY3Rpb24uYWN0b3IsIG5vdW4pO1xyXG5cclxuICAgICAgICAgICAgbGV0IGFjdG9yID0gYWN0aW9uLmFjdG9yO1xyXG4gICAgICAgICAgICBsZXQgdGhpbmcgPSAoPFRoaW5nPmFjdGlvbi5nZXROb3VuKDApKTtcclxuXHJcbiAgICAgICAgICAgIGlmIChhY3RvciA9PSBXb3JsZFN0YXRlLnBsYXllcikge1xyXG4gICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQobmV3IFNheUJvbGQodGhpbmcsIFwiOiBcIiksIFwiV29ybi5cIik7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChuZXcgU2F5VGhlKCksIGFjdG9yLCBcIiBwdXRzIG9uIFwiLCBuZXcgU2F5VGhlKCksIHRoaW5nLCBcIi5cIik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9KTtcclxufVxyXG5cclxuLyoqXHJcbiAqIEh5cGVybGlua2luZ1xyXG4gKi9cclxuRWxlbWVudHMuSHlwZXJsaW5rSGFuZGxlci5IeXBlcmxpbmtpbmdSdWxlYm9vay5hZGRSdWxlKG5ldyBSdWxlKFxyXG4gICAge1xyXG4gICAgICAgIG5hbWUgOiBcIkh5cGVybGluayAtIFdlYXJcIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9ISUdIRVNULFxyXG4gICAgICAgIGNvZGUgOiAocnVsZWJvb2sgOiBSdWxlYm9va1J1bm5lcjxUaGluZz4pID0+IHtcclxuICAgICAgICAgICAgbGV0IHRoaW5nID0gPFRoaW5nPiBydWxlYm9vay5ub3VuO1xyXG5cclxuICAgICAgICAgICAgaWYgKHRoaW5nIGluc3RhbmNlb2YgQ2xvdGhpbmcgJiYgIShUaGluZy5XZWFyUmVsYXRpb24uaXNSaWdodChXb3JsZFN0YXRlLnBsYXllciwgdGhpbmcpKSkge1xyXG4gICAgICAgICAgICAgICAgRWxlbWVudHMuSHlwZXJsaW5rSGFuZGxlci5hZGRBdmFpbGFibGVBY3R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XG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgdGhpcy5hZGRHZXRBbHRlcmF0aW9ucygoaHVtYW5vaWQgOiBIdW1hbm9pZCkgPT4ge1xyXG4gICAgICAgICAgICAvLyBMZXQncyBub3QgZG8gdGhpcyBmb3IgTlBDcy4gSXQgY2FuIGJyZWFrIHBhdGNoZXMuXHJcbiAgICAgICAgICAgIGlmIChodW1hbm9pZC5pc1BsYXllcigpKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgICAgIEh1bWFub2lkR2VuZGVyOiBodW1hbm9pZC5pc01hbGUoKSA/IEh1bWFub2lkLlNFWF9NQUxFIDpcclxuICAgICAgICAgICAgICAgICAgICAgICAgaHVtYW5vaWQuaXNGZW1hbGUoKSA/IEh1bWFub2lkLlNFWF9GRU1BTEUgOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgSHVtYW5vaWQuU0VYX0hFUk1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICB0aGlzLmFkZFNldEFsdGVyYXRpb25zKChodW1hbm9pZCA6IEh1bWFub2lkLCBjaGFuZ2VzKSA9PiB7XHJcbiAgICAgICAgICAgIC8vIExldCdzIG5vdCBkbyB0aGlzIGZvciBOUENzLiBJdCBjYW4gYnJlYWsgcGF0Y2hlcy5cclxuICAgICAgICAgICAgaWYgKGh1bWFub2lkLmlzUGxheWVyKCkpIHtcclxuICAgICAgICAgICAgICAgIGh1bWFub2lkLnJlbW92ZUdlbmRlcmVkUGFydHMoKTtcclxuICAgICAgICAgICAgICAgIGlmIChjaGFuZ2VzLkh1bWFub2lkR2VuZGVyID09IEh1bWFub2lkLlNFWF9NQUxFKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaHVtYW5vaWQuYWRkTWFsZVBhcnRzKCk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNoYW5nZ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bmcuV2VhclJlbGF0aW9uLmdldFJpZ2h0VHlwZSh0aGlzLCBDbG90aGluZykuc29ydChmdW5jdGlvbiAoYSA6IENsb3RoaW5nLCBiIDogQ2xvdGhpbmcpIHtcclxuICAgICAgICAgICAgcmV0dXJuIGEubGF5ZXIgLSBiLmxheWVyO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICB0aGlzLmlzQnJlYXN0VmlzaWJsZSA9IHRydWU7XHJcbiAgICAgICAgdGhpcy5pc0Nyb3RjaFZpc2libGUgPSB0cnVlO1xyXG4gICAgICAgIHRoaXMuaXNCdXR0VmlzaWJsZSA9IHRydWU7XHJcblxyXG4gICAgICAgIGxldCBicmFzID0gW107XHJcbiAgICAgICAgbGV0IGJ1dHRzID0gW107XHJcbiAgICAgICAgbGV0IGp1bmtzID0gW107XHJcblxyXG4gICAgICAgIGNsb3RoZXMuZm9yRWFjaCgoY2xvdGggOiBDbG90aGluZykgPT4ge1xyXG4gICAgICAgICAgICBjbG90aC51cGRhdGVTdGF0dXMoKTtcclxuICAgICAgICAgICAgaWYgKGNsb3RoLnNsb3RzLmluZGV4T2YoSHVtYW5vaWQuU0xPVF9CUkVBU1RTKSAhPSAtMSkge1xyXG4gICAgICAgICAgICAgICAgYnJhcy5wdXNoKGNsb3RoKTtcclxuICAgICAgICAgICAgICAgIGlmIChjbG90aC50cmFuc3BhcmVudFNsb3RzLmluZGV4T2YoSHVtYW5vaWQuU0xPVF9CUkVBU1RTKSA9PSAtMSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaXNCcmVhc3RWaXNpYmxlID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKGNsb3RoLnNsb3RzLmluZGV4T2YoSHVtYW5vaWQuU0xPVF9CVVRUKSAhPSAtMSkge1xyXG4gICAgICAgICAgICAgICAgYnV0dHMucHVzaChjbG90aCk7XHJcbiAgICAgICAgICAgICAgICB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Zpc2libGVTaXplIDwgMCkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5jcm90Y2hWaXNpYmxlU2l6ZSA9IDA7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgdXBkYXRlQnV0dFNpemVzIChjbG90aHMgOiBBcnJheTxDbG90aGluZz4pIHtcclxuICAgICAgICB0aGlzLmlzQnV0dFRpZ2h0ID0gZmFsc2U7XHJcbiAgICAgICAgbGV0IGJ1dHQgPSA8SHVtYW5vaWRCdXR0PiBUaGluZy5QYXJ0UmVsYXRpb24uZ2V0UmlnaHRUeXBlT25lKHRoaXMsIEh1bWFub2lkQnV0dCk7XHJcbiAgICAgICAgdGhpcy5idXR0VmlzaWJsZVNpemUgPSBidXR0ID09IHVuZGVmaW5lZCA/IDAgOiBidXR0LmdldFNpemUoKTtcclxuXHJcbiAgICAgICAgY2xvdGhzLmZvckVhY2goKHdvcm4gOiBDbG90aGluZykgPT4ge1xyXG4gICAgICAgICAgICBpZiAod29ybi50aWdodEJ1dHRTaXplID49IDAgJiYgdGhpcy5idXR0VmlzaWJsZVNpemUgPiB3b3JuLnRpZ2h0QnV0dFNpemUpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuaXNCdXR0VGlnaHQgPSB0cnVlO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBpZiAod29ybi5tYXhCdXR0U2l6ZSA+PSAwICYmIHRoaXMuYnV0dFZpc2libGVTaXplID4gd29ybi5tYXhCdXR0U2l6ZSkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5idXR0VmlzaWJsZVNpemUgPSB3b3JuLm1heEJ1dHRTaXplO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICB0aGlzLmJ1dHRWaXNpYmxlU2l6ZSArPSB3b3JuLmJ1dHRQYWRkaW5nO1xyXG4gICAgICAgICAgICBpZiAodGhpcy5idXR0VmlzaWJsZVNpem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0R2VuZGVyVmFsdWUoKTtcclxuICAgICAgICBsZXQgcGxheWVyU2x1dHRpbmVzcyA9IHRoaXMuZ2V0U2x1dHRpbmVzcygpO1xyXG5cclxuICAgICAgICBsZXQgcHJlc2VudGF0aW9uID0gXCJcIjtcclxuICAgICAgICBpZiAocGxheWVyU2x1dHRpbmVzcy5zbHV0dGluZXNzQ29ycmVjdGVkID4gNzUpIHtcclxuICAgICAgICAgICAgcHJlc2VudGF0aW9uICs9IChcInNsdXR0eSwgXCIpO1xyXG4gICAgICAgIH0gZWxzZSBpZiAocGxheWVyU2x1dHRpbmVzcy5zbHV0dGluZXNzQ29ycmVjdGVkID4gMzUpIHtcclxuXHJcbiAgICAgICAgfSBlbHNlIGlmIChwbGF5ZXJTbHV0dGluZXNzLnNsdXR0aW5lc3NDb3JyZWN0ZWQgPiAyMCkge1xyXG4gICAgICAgICAgICBwcmVzZW50YXRpb24gKz0gKFwicHJ1ZGUsIFwiKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBwcmVzZW50YXRpb24gKz0gKFwic2FpbnRseSwgXCIpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKHBsYXllckdlbmRlci5nZW5kZXJWYWx1ZUNvcnJlY3RlZCA8IDQwKSB7XHJcbiAgICAgICAgICAgIHByZXNlbnRhdGlvbiArPSAoXCJtYXNjdWxpbmUgXCIpO1xyXG4gICAgICAgIH0gZWxzZSBpZiAocGxheWVyR2VuZGVyLmdlbmRlclZhbHVlQ29ycmVjdGVkIDwgNjApIHtcclxuICAgICAgICAgICAgcHJlc2VudGF0aW9uICs9IChcImFuZHJvZ3lub3VzIFwiKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBwcmVzZW50YXRpb24gKz0gKFwiZmVtaW5pbmUgXCIpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKHBsYXllckdlbmRlci5oYXNUaXRzKSB7XHJcbiAgICAgICAgICAgIGlmIChwbGF5ZXJHZW5kZXIuaGFzUGVuaXMgfHwgcGxheWVyR2VuZGVyLmhhc1BlbmlzQnVsZ2UpIHtcclxuICAgICAgICAgICAgICAgIC8vIFNoZW1hbGUgU3RhdHVzIChUaXRzICsgUGVuaXMpXHJcbiAgICAgICAgICAgICAgICBwcmVzZW50YXRpb24gKz0gKFwic2hlbWFsZVwiKTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmIChwbGF5ZXJHZW5kZXIuaGFzVmFnaW5hKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBpcyBhIHdvbWFuXHJcbiAgICAgICAgICAgICAgICBwcmVzZW50YXRpb24gKz0gKFwid29tYW5cIik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAvLyBObyB0aXRzXHJcbiAgICAgICAgICAgIGlmIChwbGF5ZXJHZW5kZXIuaGFzUGVuaXMpIHtcclxuICAgICAgICAgICAgICAgIC8vIFNpbXBseSBtYWxlXHJcbiAgICAgICAgICAgICAgICBpZiAocGxheWVyR2VuZGVyLmdlbmRlclZhbHVlQ29ycmVjdGVkIDwgNjApIHtcclxuICAgICAgICAgICAgICAgICAgICBwcmVzZW50YXRpb24gKz0gKFwibWFuXCIpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBwcmVzZW50YXRpb24gKz0gKFwidHJhcFwiKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIGlmIChwbGF5ZXJHZW5kZXIuaGFzUGVuaXNCdWxnZSkge1xyXG4gICAgICAgICAgICAgICAgLy8gUG9zc2libGUgU2hlbWFsZSBzdGF0dXMgLSBoYXMgYnVsZ2UgYW5kIHRpdHMgbWF5YmUgZ2V0IGJldHRlciB0ZXJtcyBzb21ldGltZVxyXG4gICAgICAgICAgICAgICAgaWYgKHBsYXllckdlbmRlci5nZW5kZXJWYWx1ZUNvcnJ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gcGVuaXMuaXNGbGFjY2lkKCkpIHtcclxuICAgICAgICAgICAgICAgIHNheS5hZGQoXCIsIHdoaWNoIGlzIG9rYXksIHNpbmNlIHlvdSdyZSBhIGdyb3dlciwgbm90IGEgc2hvd2VyXCIpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChwZW5pcy5pc1VuY292ZXJlZCgpKSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgb25lT2YgPSBuZXcgT25lT2YoT25lT2YuUFVSRUxZX0FUX1JBTkRPTSwgLi4uW1xyXG4gICAgICAgICAgICAgICAgICAgIFwiLCBpdCBpcyBub3QgY292ZXJlZCBieSBhbnkgY2xvdGhpbmdcIixcclxuICAgICAgICAgICAgICAgICAgICBcIiwgaXQgaXMgbm90IGNvdmVyZWQgYnkgYW55IGNsb3RoZXNcIixcclxuICAgICAgICAgICAgICAgICAgICBcIiwgaXQgaXMgdW5jb3ZlcmVkXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgXCIsIGl0IGlzIHZpc2libGUgdG8gYWxsXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgXCIsIGl0IGlzIGhhbmdpbmcgZnJlZWx5XCJcclxuICAgICAgICAgICAgICAgIF0pO1xyXG4gICAgICAgICAgICAgICAgc2F5LmFkZChvbmVPZi5nZXRPbmUoKSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgbGV0IHRlc3RpY2xlcyA9IDxIdW1hbm9pZFRlc3RpY2xlcz4gcGxheWVyLmdldFBhcnQoSHVtYW5vaWRUZXN0aWNsZXMpO1xyXG4gICAgICAgICAgICBpZiAoSHVtYW5vaWRQZW5pcy5nZXRTaXplVGV4dChidWxnZXMuY3JvdGNoKSAhPSBIdW1hbm9pZFBlbmlzLmdldFNpemVUZXh0KHBlbmlzLmdldEJ1bGdlU2l6ZSgpICsgdGVzdGljbGVzLmdldEJ1bGdlU2l6ZSgpKSkge1xyXG4gICAgICAgICAgICAgICAgc2F5LmFkZ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ICAgICAgc2F5LmFkZChcIiBcIik7XHJcblxyXG4gICAgICAgIGlmIChib2R5cGFydFNsdXR0aW5lc3Mud2VpZ2h0ID4gMCkge1xyXG4gICAgICAgICAgICBsZXQgYm9keXBhcnRTbHV0dGluZXNzRmluYWwgPSBib2R5cGFydFNsdXR0aW5lc3MudmFsdWUgLyBib2R5cGFydFNsdXR0aW5lc3Mud2VpZ2h0O1xyXG4gICAgICAgICAgICBpZiAoYm9keXBhcnRTbHV0dGluZXNzRmluYWwgPiA3NSkge1xyXG4gICAgICAgICAgICAgICAgc2F5LmFkZChcIlRoZSB3YXkgeW91ciBib2R5IGlzIG1ha2VzIHlvdSBsb29rIGxpa2UgeW91IHdlcmUgbWFkZSBwdXJlbHkgZm9yIHNleFwiKTtcclxuICAgICAgICAgICAgICAgIGlmIChjb3ZlcmVkUGVyYyA+IDAuNykge1xyXG4gICAgICAgICAgICAgICAgICAgIHNheS5hZGQoXCIsIHRoYW5rZnVsbHkgaXQncyBtb3N0bHkgY292ZXJlZFwiKVxyXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjb3ZlcmVkUGVyYyA8IDAuMikge1xyXG4gICAgICAgICAgICAgICAgICAgIHNheS5hZGQoXCIsIGFuZCB5b3UgZGlkbid0IGV2ZW4gYm90aGVyIGNvdmVyaW5nIGl0IHVwXCIpXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBzYXkuYWRkKFwiLlwiKTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmIChib2R5cGFydFNsdXR0aW5lc3NGaW5hbCA+IDYwKSB7XHJcbiAgICAgICAgICAgICAgICBzYXkuYWRkKFwiWW91ciBib2R5IGRlZmluaXRlbHkgaGFzIGEgbG90IG9mIHNleC1hcHBlYWwgZ29pbmcgb25cIik7XHJcbiAgICAgICAgICAgICAgICBpZiAoY292ZXJlZFBlcmMgPiAwLjcpIHtcclxuICAgICAgICAgICAgICAgICAgICBzYXkuYWRkKFwiLCBhbHRob3VnaCBpdCdzIGNvdmVyZWRcIilcclxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY292ZXJlZFBlcmMgPCAwLjIpIHtcclxuICAgICAgICAgICAgICAgICAgICBzYXkuYWRkKFwiLCBwcm91ZGx5IGRpc3BsYXllZCBmb3IgYWxsIHRvIHNlZVwiKVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgc2F5LmFkZChcIi5cIik7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoYm9keXBhcnRTbHV0dGluZXNzRmluYWwgPCAzMCkge1xyXG4gICAgICAgICAgICAgICAgc2F5LmFkZChcIllvdSBoYXZlIHZlcnkgbGl0dGxlIHNleC1hcHBlYWwsIG1heWJlIHlvdSBhcmUgYSBraXRjaGVuIHRhYmxlP1wiKTtcclxuICAgICAgICAgICAgICAgIGlmIChjb3ZlcmVkUGVyYyA+IDAuNykge1xyXG4gICAgICAgICAgICAgICAgICAgIHNheS5hZGQoXCIgQXQgbGVhc3QgeW91IGNvdmVyZWQgaXQgdXAuXCIpXHJcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNvdmVyZWRQZXJjIDwgMC4yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2F5LmFkZChcIiBNYXliZSB5b3UgY291bGQgY292ZXIgaXQgdXAgYSBiaXQuXCIpXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHNheS5hZGQoU2F5LlBBUkFHUkFQSF9CUkVBSyk7XHJcblxyXG5cclxuXHJcbiAgICAgICAgbGV0IHN0YXRzID0gbmV3IFNheUxlZnRSaWdodCgpO1xyXG5cclxuICAgICAgICBzdGF0cy5hZGRMZWZ0KG5ldyBTYXlCb2xkKFwiU3RyZW5ndGg6IFwiKSwgQXR0cmlidXRlcy5TdHJlbmd0aC5nZXREZXNjcmlwdGlvbihwbGF5ZXIuZ2V0U3RhdChBdHR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yXG4gICAgICAgIHJldHVybiByb29tcztcclxuICAgIH1cclxuXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gZ2V0TWF4aW11bVJlbWVtYmVyZWRSb29tcyAoKSB7XHJcbiAgICAgICAgbGV0IGludFJvb21zID0gcGxheWVyLmdldFN0YXQoQXR0cmlidXRlcy5JbnRlbGxpZ2VuY2UpICogcmVtZW1iZXJlZFJvb21zRm9ySW50ZWxsaWdlbmNlO1xyXG4gICAgICAgIGxldCBza2lsbFJvb21zID0gcGxheWVyLmdldFNraWxsKFNraWxscy5TdXJ2aXZhbCkgKiByZW1lbWJlcmVkUm9vbXNGb3JTdXJ2aXZhbDtcclxuICAgICAgICByZXR1cm4gaW50Um9vbXMgKyBza2lsbFJvb21zO1xyXG4gICAgfVxyXG5cclxuICAgIGV4cG9ydCBmdW5jdGlvbiB0cnVuY2F0ZVJvb21zICgpIHtcclxuICAgICAgICB3aGlsZSAocmVtZW1iZXJlZFJvb21zLnZhbHVlLmxlbmd0aCA+IGdldE1heGltdW1SZW1lbWJlcmVkUm9vbXMoKSl7XHJcbiAgICAgICAgICAgIHJlbWVtYmVyZWRSb29tcy52YWx1ZS5wb3AoKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZXhwb3J0IGZ1bmN0aW9uIHJlbWVtYmVyUm9vbSAoLi4ucm9vbXMgOiBBcnJheTxSb29tPikge1xyXG4gICAgICAgIHJvb21zLmZvckVhY2goKHZhbHVlKSA9PiB7XHJcbiAgICAgICAgICAgIGlmICh2YWx1ZSBpbnN0YW5jZW9mIFJvb20pIHtcclxuICAgICAgICAgICAgICAgIGlmICh2YWx1ZS5mb2RkZXIpIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAocmVtZW1iZXJlZEZvZGRlci5pbmRleE9mKHZhbHVlKSA9PSAtMSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZW1lbWJlcmVkRm9kZGVyLnB1c2godmFsdWUpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGlkeCA9IHJlbWVtYmVyZWRSb29tcy52YWx1ZS5pbmRleE9mKHZhbHVlLmdldE5hbWUoKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlkeCAhPSAtMSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZW1lbWJlcmVkUm9vbXMudmFsdWUuc3BsaWNlKGlkeCwgMSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHJlbWVtYmVyZWRSb29tcy52YWx1ZS51bnNoaWZ0KHZhbHVlLmdldE5hbWUoKSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgICAgICB0cnVuY2F0ZVJvb21zKCk7XHJcbiAgICB9XHJcblxyXG4gICAgZXhwb3J0IGZ1bmN0aW9uIHNhdmVTdGF0ZSAoKSB7XHJcbiAgICAgICAgbGV0IHRoaW5ncyA9IHtcclxuICAgICAgICAgICAgY2FycmllZDogW10sXHJcbiAgICAgICAgICAgIHdvcm46IFtdLFxyXG4gICAgICAgICAgICB3aWVsZGVkOiBbXVxyXG4gICAgICAgIH07XHJcblxyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIFRoaW5ncyA6IHRoaW5nc1xyXG4gICAgICAgIH07XHJcbiAgICB9XHJcblxyXG4gICAgZXhwb3J0IGxldCBDb3JyZWN0UmVtZW1iZXJlZFJvb21zUnVsZSA9IFBsYXlCZWdpbnMucnVsZWJvb2suY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiQ29ycmVjdCByZW1lbWJlcmVkIHJvb21zXCIsXHJcbiAgICAgICAgZmlyc3RQcmlvcml0eSA6IFJ1bGUuUFJJT1JJVFlfTE9XRVNULFxyXG4gICAgICAgIHByaW9yaXR5IDogUnVsZS5QUklPUklUWV9NRURJVU0sXHJcbiAgICAgICAgY29kZSA6ICgpID0+IHtcclxuICAgICAgICAgICAgbGV0IGFsbFJvb21zID0gcmVtZW1iZXJlZFJvb21zLnZhbHVlO1xyXG4gICAgICAgICAgICBsZXQgY3VycmVudFJvb20gPSBXb3JsZFN0YXRlLnBsYXllci5nZXRSb29tKCk7XHJcbiAgICAgICAgICAgIGlmIChhbGxSb29tcy5sZW5ndGggPT0gMCkge1xyXG4gICAgICAgICAgICAgICAgcmVtZW1iZXJlZFJvb21zLnZhbHVlID0gW2N1cnJlbnRSb29tLmdldE5hbWUoKV07XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgbGV0IG5ld1Jvb21zID0gW107XHJcblxyXG4gICAgICAgICAgICBmdW5jdGlvbiByZWN1cnNpdmVseUFkZFJvb21zIChyb29tIDogUm9vbSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKHJvb20gaW5zdGFuY2VvZiBSb29tUmFuZG9tKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJvb20uZm9kZGVyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlbWVtYmVyZWRGb2RkZXIucHVzaChyb29tKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcm9vbS5jb25uZWN0aW9ucy5mb3JFYWNoKChuZXdSb29tKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWN1cnNpdmVseUFkZFJvb21zKG5ld1Jvb20pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGFsbFJvb21zLmluZGV4T2Yocm9vbS5nZXROYW1lKCkpICE9IC0xICYmIG5ld1Jvb21zLmluZGV4T2Yocm9vbS5nZXROYW1lKCkpID09IC0xKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ld1Jvb21zLnB1c2gocm9vbS5nZXROYW1lKCkpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByb29tLmNvbm5lY3Rpb25zLmZvckVhY2goKG5ld1Jvb20pID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlY3Vyc2l2ZWx5QWRkUm9vbXMobmV3Um9vbSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgcmVjdXJzaXZlbHlBZGRSb29tcyhjdXJyZW50Um9vbSk7XHJcbiAgICAgICAgICAgIHJlbWVtYmVyZWRSb29tcy52YWx1ZSA9IG5ld1Jvb21zO1xyXG4gICAgICAgIH1cclxuICAgIH0pXHJcbn0iLCIvLy8gPHJlZmVyZW5jZSBwYXRoPVwiUmVsYXRpb25zL1JlbGF0aW9uT25lVG9NYW55LnRzXCIgLz5cclxuY2xhc3MgUmVnaW9uIHtcclxuICAgIHB1YmxpYyBuYW1lIDogc3RyaW5nO1xyXG5cclxuICAgIHB1YmxpYyBjb25zdHJ1Y3RvciAobmFtZSA6IHN0cmluZykge1xyXG4gICAgICAgIHRoaXMubmFtZSA9IG5hbWU7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBSZWdpb25Sb29tID0gbmV3IFJlbGF0aW9uT25lVG9NYW55KCk7XHJcbiAgICBwdWJsaWMgc3RhdGljIFJlZ2lvblJlZ2lvbiA9IG5ldyBSZWxhdGlvbk9uZVRvTWFueSgpO1xyXG4gICAgcHVibGljIHN0YXRpYyBJblJlbGF0aW9uID0gbmV3IFJlbGF0aW9uSGFuZGxlclN0cmljdE9uZVRvTWFueShSZWdpb24uUmVnaW9uUmVnaW9uLCBSZWdpb24uUmVnaW9uUm9vbSk7XHJcblxyXG4gICAgcHVibGljIHBsYWNlICguLi5yb29tcyA6IEFycmF5PFJvb20gfCBSZWdpb24+KSB7XHJcbiAgICAgICAgcm9vbXMuZm9yRWFjaChyb29tID0+IHtcclxuICAgICAgICAgICAgaWYgKHJvb20gaW5zdGFuY2VvZiBSb29tKSB7XHJcbiAgICAgICAgICAgICAgICBSZWdpb24uUmVnaW9uUm9vbS5zZXRSZWxhdGlvbih0aGlzLCByb29tKTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIFJlZ2lvbi5SZWdpb25SZWdpb24uc2V0UmVsYXRpb24odGhpcywgcm9vbSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0Um9vbXMgKCkge1xyXG4gICAgICAgIGxldCByb29tcyA9IDxBcnJheTxSb29tPj4gUmVnaW9uLlJlZ2lvblJvb20uZ2V0UmlnaHQodGhpcyk7XHJcbiAgICAgICAgUmVnaW9uLlJlZ2lvblJlZ2lvbi5nZXRSaWdodCh0aGlzKS5mb3JFYWNoKChyZWdpb24gOiBSZWdpb24pID0+IHtcclxuICAgICAgICAgICAgKDxBcnJheTxSb29tPj4gUmVnaW9uLlJlZ2lvblJvb20uZ2V0UmlnaHQocmVnaW9uKSkuZm9yRWFjaCgocm9vbSA6IFJvb20pID0+IHtcclxuICAgICAgICAgICAgICAgIHJvb21zLnB1c2gocm9vbSk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIHJldHVybiByb29tcztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgY29udGFpbnNSb29tIChyb29tIDogUm9vbSkge1xyXG4gICAgICAgIGxldCBkaXJlY3RseUNvbnRhaW5lZCA9IFJlZ2lvbi5SZWdpb25Sb29tLmdldExlZnQocm9vbSkgPT0gdGhpcztcclxuICAgICAgICBpZiAoZGlyZWN0bHlDb250YWluZWQpIHtcclxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgfSBlbHN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bm1vZHVsZSBBSVJ1bGVzIHtcclxuICAgIGV4cG9ydCB2YXIgUGlja1NoaW55ID0gQUkucnVsZXMuY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiUGljayBTaGluaWVzXCIsXHJcbiAgICAgICAgZmlyc3RQcmlvcml0eSA6IEFJUnVsZXMuUFJJT1JJVFlfQUNUSU5HX09OX1BMQUNFLFxyXG4gICAgICAgIGNvbmRpdGlvbnMgOiAocnVubmVyIDogUnVsZWJvb2tSdW5uZXI8UGVyc29uPikgPT4ge1xyXG4gICAgICAgICAgICBsZXQgcGVyc29uID0gcnVubmVyLm5vdW47XHJcbiAgICAgICAgICAgIHJldHVybiBwZXJzb24uQUkucGlja3NTaGluaWVzO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgY29kZSA6IChydW5uZXIgOiBSdWxlYm9va1J1bm5lcjxQZXJzb24+KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBwZXJzb24gPSBydW5uZXIubm91bjtcclxuICAgICAgICAgICAgbGV0IHJvb20gPSBwZXJzb24uZ2V0Um9vbSgpO1xyXG4gICAgICAgICAgICBsZXQgdmlzaWJsZVRoaW5ncyA9IHJvb20uZ2V0Q29udGFpbmVkQW5kVmlzaWJsZVRvKHBlcnNvbik7XHJcblxyXG4gICAgICAgICAgICBpZiAodmlzaWJsZVRoaW5ncy5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHZpc2libGVUaGluZ3MubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIXZpc2libGVUaGluZ3NbaV0uZml4ZWRJblBsYWNlICYmIHZpc2libGVUaGluZ3NbaV0uZ2V0U2hpbnkoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEFjdGlvblRha2UocGVyc29uLCB2aXNpYmxlVGhpbmdzW2ldKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9KTtcclxufSIsIi8vLyA8cmVmZXJlbmNlIHBhdGg9XCIuLi9BSS50c1wiIC8+XHJcbm1vZHVsZSBBSVJ1bGVzIHtcclxuICAgIGV4cG9ydCB2YXIgV2FuZGVyID0gQUkucnVsZXMuY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiV2FuZGVyXCIsXHJcbiAgICAgICAgZmlyc3RQcmlvcml0eSA6IEFJUnVsZXMuUFJJT1JJVFlfQUNUSU5HX09OX0lETEUsXHJcbiAgICAgICAgY29uZGl0aW9ucyA6IChydW5uZXIgOiBSdWxlYm9va1J1bm5lcjxQZXJzb24+KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBwZXJzb24gPSBydW5uZXIubm91bjtcclxuICAgICAgICAgICAgcmV0dXJuIHBlcnNvbi5BSS53YW5kZXJlciAmJiAoTWF0aC5yYW5kb20oKSAqIDEwMCkgPiBwZXJzb24uQUkud2FuZGVyQ2hhbmNlO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgY29kZSA6IChydW5uZXIgOiBSdWxlYm9va1J1bm5lcjxQZXJzb24+KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBwZXJzb24gPSBydW5uZXIubm91bjtcclxuICAgICAgICAgICAgbGV0IHJvb20gPSA8Um9vbVJhbmRvbT4gcGVyc29uLmdldFJvb20oKTtcclxuXHJcbiAgICAgICAgICAgIGlmIChwZXJzb24uQUkud2FuZGVyc09uICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgLy8gc3RpY2sgdG8gcmVnaW9uIHdoaWxlIHdhbmRlcmluZ1xyXG4gICAgICAgICAgICAgICAgaWYgKHBlcnNvbi5BSS53YW5kZXJzT24uY29udGFpbnNSb29tKHJvb20pKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gQWxyZWR5IGluIHJlZ2lvbiwgc28ganVzdCB3YW5kZXIgb2ZmIGluc2lkZSBpdFxyXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb25uZWN0aW9ucyA9IHJvb20uY29ubmVjdGlvbnMuc2xpY2UoKTtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgcmVhbENvbm5lY3Rpb25zID0gW107XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjb25uZWN0aW9ucy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29ubmVjdGlvbnNbaV0gIT0gdW5kZWZpbmVkICYmIHBlcnNvbi5BSS53YW5kZXJzT24uY29udGFpbnNSb29tKGNvbm5lY3Rpb25zW2ldKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVhbENvbm5lY3Rpb25zLnB1c2goaSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGRpcmVjdGlvbiA9ICgobmV3IFNodWZmbGVyKHJlYWxDb25uZWN0aW9ucykpLmdldE9uZSgpKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEFjdGlvbkdvKHBlcnNvbiwgZGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gcmV0dXJuIHRvIHJlZ2lvblxyXG4gICAgICAgICAgICAgICAgICAgIGxldCByZWdpb25Sb29tcyA9IHBlcnNvbi5BSS53YW5kZXJzT24uZ2V0Um9vbXMoKS5maWx0ZXIoKGEgOiBSb29tKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhIGluc3RhbmNlb2YgUm9vbVJhbmRvbSAmJiBhLnBsYWNlZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0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SB5b3UgV2VhcmluZyBpdD9cIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9MT1dFU1QsXHJcbiAgICAgICAgY29kZSA6IGFzeW5jIChydWxlYm9vayA6IFJ1bGVib29rUnVubmVyPEFjdGlvbkRyb3A+KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBhY3Rpb24gPSA8QWN0aW9uR28+IHJ1bGVib29rLm5vdW47XHJcbiAgICAgICAgICAgIGxldCBhY3RvciA9IGFjdGlvbi5hY3RvcjtcclxuICAgICAgICAgICAgbGV0IHRoaW5nID0gKDxUaGluZz5hY3Rpb24uZ2V0Tm91bigwKSk7XHJcblxyXG4gICAgICAgICAgICBpZiAoVGhpbmcuV2VhclJlbGF0aW9uLmdldExlZnQodGhpbmcpID09IGFjdG9yIHx8IFRoaW5nLldpZWxkUmVsYXRpb24uZ2V0TGVmdCh0aGluZykgPT0gYWN0b3Ipe1xyXG4gICAgICAgICAgICAgICAgaWYgKGFjdGlvbi5hY3RvciA9PSBXb3JsZFN0YXRlLnBsYXllcikge1xyXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKFwiKGZpcnN0IHRha2luZyBvZmYgdGhlIFwiLCB0aGluZywgXCIpXCIsIFNheS5MSU5FX0JSRUFLKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGxldCB0YWtpbmdBY3Rpb24gPSBuZXcgQWN0aW9uUmVtb3ZlKGFjdG9yLCB0aGluZyk7XHJcbiAgICAgICAgICAgICAgICBhd2FpdCB0YWtpbmdBY3Rpb24uZXhlY3V0ZSgpO1xyXG4gICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQodGFraW5nQWN0aW9uLnNheSk7XHJcbiAgICAgICAgICAgICAgICBpZiAoVGhpbmcuV2VhclJlbGF0aW9uLmdldExlZnQodGhpbmcpID09IGFjdG9yIHx8IFRoaW5nLldpZWxkUmVsYXRpb24uZ2V0TGVmdCh0aGluZykgPT0gYWN0b3IpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChTYXkuTElORV9CUkVBSyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9KVxyXG4pO1xyXG5cclxuQWN0aW9uRHJvcC5jaGVjay5hZGRSdWxlKFxyXG4gICAgbmV3IFJ1bGUoe1xyXG4gICAgICAgIG5hbWUgOiBcIkNoZWNrIERyb3BwaW5nIC0gRG8geW91IGhhdmUgaXQ/P1wiLFxyXG4gICAgICAgIGZpcnN0UHJpb3JpdHkgOiBSdWxlLlBSSU9SSVRZX0xPV0VTVCxcclxuICAgICAgICBjb2RlIDogKHJ1bGVib29rIDogUnVsZWJvb2tSdW5uZXI8QWN0aW9uRHJvcD4pID0+IHtcclxuICAgICAgICAgICAgbGV0IGFjdGlvbiA9IDxBY3Rpb25Hbz4gcnVsZWJvb2subm91bjtcclxuICAgICAgICAgICAgbGV0IGFjdG9yID0gYWN0aW9uLmFjdG9yO1xyXG4gICAgICAgICAgICBsZXQgdGhpbmcgPSAoPFRoaW5nPmFjdGlvbi5nZXROb3VuKDApKTtcclxuXHJcbiAgICAgICAgICAgIGlmIChUaGluZy5DYXJyeVJlbGF0aW9uLmdldExlZnQodGhpbmcpICE9IGFjdG9yKXtcclxuICAgICAgICAgICAgICAgIGlmIChhY3RvciA9PSBXb3JsZFN0YXRlLnBsYXllcikge1xyXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKFwiWW91IGRvbid0IGhhdmUgaXQuXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSlcclxuKTtcclxuXHJcbkFjdGlvbkRyb3AuY2FycnkuY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CBidXR0b25zO1xyXG4gICAgICAgICAgICBsZXQgY2hvc2VuUHJvbWlzZSA9IG5ldyBQcm9taXNlKChhc3luYyByZXNvbHZlID0+IHtcclxuICAgICAgICAgICAgICAgIENvbnRyb2xzLktleUhhbmRsZXIucmVzZXQoKTtcclxuICAgICAgICAgICAgICAgIGxldCBzYXkgPSBuZXcgU2F5KCk7XHJcbiAgICAgICAgICAgICAgICBpZiAod2llbGRlZC5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2F5LmFkZChuZXcgU2F5Qm9sZChcIldpZWxkZWQ6XCIpLCBTYXkuTElORV9CUkVBSyk7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB3aWVsZGVkLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNheS5hZGQoYXdhaXQgQWN0aW9uSW52ZW50b3J5LmNyZWF0ZUJ1dHRvbih3aWVsZGVkW2ldLCByZXNvbHZlKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGlmICh3b3JuLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoc2F5LnNlcXVlbmNlLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2F5LmFkZChTYXkuUEFSQUdSQVBIX0JSRUFLKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgc2F5LmFkZChuZXcgU2F5Qm9sZChcIldvcm46XCIpLCBTYXkuTElORV9CUkVBSyk7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB3b3JuLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNheS5hZGQoYXdhaXQgQWN0aW9uSW52ZW50b3J5LmNyZWF0ZUJ1dHRvbih3b3JuW2ldLCByZXNvbHZlKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGlmIChjYXJyaWVkLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoc2F5LnNlcXVlbmNlLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2F5LmFkZChTYXkuUEFSQUdSQVBIX0JSRUFLKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgc2F5LmFkZChuZXcgU2F5Qm9sZChcIkNhcnJpZWQ6XCIpLCBTYXkuTElORV9CUkVBSyk7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjYXJyaWVkLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNheS5hZGQoYXdhaXQgQWN0aW9uSW52ZW50b3J5LmNyZWF0ZUJ1dHRvbihjYXJyaWVkW2ldLCByZXNvbHZlKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGlmIChzYXkuc2VxdWVuY2UubGVuZ3RoID09IDApIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzb2x2ZSh1bmRlZmluZWQpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGJ1dHRvbnMgPSBhd2FpdCBzYXkuZ2V0SFRNTENvbnRlbnQoKTtcclxuICAgICAgICAgICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci5wcmludCguLi4oYnV0dG9ucykpO1xyXG4gICAgICAgICAgICB9KSk7XHJcblxyXG4gICAgICAgICAgICBsZXQgY2hvc2VuVGhpbmcgPSBhd2FpdCBjaG9zZW5Qcm9taXNlO1xyXG4gICAgICAgICAgICBpZiAoY2hvc2VuVGhpbmcgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIudW5wcmludCguLi5idXR0b25zKTtcclxuICAgICAgICAgICAgICAgIENvbnRyb2xzLktleUhhbmRsZXIucmVzZXQoKTtcclxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgQWN0aW9uRXhhbWluZShXb3JsZFN0YXRlLnBsYXllciwgY2hvc2VuVGhpbmcpO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgcnVsZWJvb2subm91bi5zYXkuYWRkKFwiWW91IGhhdmUgbm90aGluZy5cIik7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9KTtcclxufVxyXG5cclxuRWxlbWVudHMuSHlwZXJsaW5rSGFuZGxlci5Db21tb25BY3Rpb25zUnVsZWJvb2suYWRkUnVsZShuZXcgUnVsZSh7XHJcbiAgICBuYW1lIDogXCJBZGQgVGFrZSBJbnZlbnRvcnkgQ29tbWFuZCBSdWxlXCIsXHJcbiAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9MT1dFU1QsXHJcbiAgICBwcmlvcml0eSA6IFJ1bGUuUFJJT1JJVFlfTUVESVVNLFxyXG4gICAgY29kZSA6IChydWxlYm9vayA6IFJ1bGVib29rUnVubmVyPHZvaWQ+KSA9PiB7XHJcbiAgICAgICAgRWxlbWVudHMuSHlwZXJsaW5rSGFuZGxlci5hZGRDb21tb25BY3Rpb24oXCJJbnZlbnRvcnlcIiwgbmV3IEFjdGlvbkludmVudG9yeShXb3JsZFN0YXRlLnBsYXllcikpO1xyXG4gICAgfVxyXG59KSk7IiwiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4uL0FjdGlvbi50c1wiIC8+XHJcbi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YgKCEoY2hlY2sudW5tYXRjaGVkW2ldIGluc3RhbmNlb2YgQ29udGVudE1hcmtlcikpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICgoPENvbnRlbnRNYXJrZXI+IGNoZWNrLnVubWF0Y2hlZFtpXSkuaXNJbXBvcnRhbnQoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFVubWF0Y2hlZCAoY2QgOiBDb250ZW50RGlmZmVyZW50aWFsKSA6IENvbnRlbnREaWZmZXJlbnRpYWxDb21wYXJpc29uUmVzdWx0IHtcclxuICAgICAgICBsZXQgdW5tYXRjaGVkID0gY2Qubm91bnMuc2xpY2UoKTtcclxuICAgICAgICBsZXQgbWF0Y2hpbmcgPSB0aGlzLm5vdW5zLnNsaWNlKCk7XHJcbiAgICAgICAgZm9yIChsZXQgaSA9IG1hdGNoaW5nLmxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKSB7XHJcbiAgICAgICAgICAgIGZvciAobGV0IGsgPSB1bm1hdGNoZWQubGVuZ3RoIC0gMTsgayA+PSAwOyBrLS0pIHtcclxuICAgICAgICAgICAgICAgIGlmIChDb250ZW50RGlmZmVyZW50aWFsLmNvbXBhcmVOb3VucyhtYXRjaGluZ1tpXSwgdW5tYXRjaGVkW2tdKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHVubWF0Y2hlZC5zcGxpY2UoaywgMSk7XHJcbiAgICAgICAgICAgICAgICAgICAgbWF0Y2hpbmcuc3BsaWNlKGksIDEpO1xyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIG1hdGNoaW5nIDogbWF0Y2hpbmcsXHJcbiAgICAgICAgICAgIHVubWF0Y2hlZCA6IHVubWF0Y2hlZFxyXG4gICAgICAgIH07XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFNjb3JlICgpIHtcclxuICAgICAgICBsZXQgaGlnaGVzdCA9IDA7XHJcbiAgICAgICAgbGV0IGNvdW50ID0gdGhpcy5ub3Vucy5sZW5ndGg7XHJcblxyXG4gICAgICAgIHRoaXMubm91bnMuZm9yRWFjaCgobm91bikgPT4ge1xyXG4gICAgICAgICAgICBsZXQgbGV2ZWwgPSBDb250ZW50RGlmZmVyZW50aWFsLmdldE5vdW5MZXZlbChub3VuKTtcclxuICAgICAgICAgICAgaWYgKGhpZ2hlc3QgPCBsZXZlbCkge1xyXG4gICAgICAgICAgICAgICAgaGlnaGVzdCA9IGxldmVsO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIHJldHVybiBoaWdoZXN0ICsgKGNvdW50IC8gMTAwKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGdldE5vdW5MZXZlbCAobm91biA6IFRoaW5nIHwgdHlwZW9mIFRoaW5nIHwgQ29udGVudERpZmZlcmVudGlhbCB8IENvbnRlbnRNYXJrZXIpIHtcclxuICAgICAgICBpZiAobm91biA9PSB1bmRlZmluZWQgfHwgbm91biA9PSBudWxsKSB7XHJcbiAgICAgICAgICAgIHJldHVybiAwO1xyXG4gICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIG5vdW4gPT0gXCJmdW5jdGlvblwiKSB7XHJcbiAgICAgICAgICAgIGlmICg8YW55Pm5vdW4ucHJvdG90eXBlIGluc3RhbmNlb2YgVGhpbmcpIHtcclxuICAgICAgICAgICAgICAgIGxldCBzcGVjaWZpdHkgPSAyOyAvLyBWYWd1ZSBUaGluZ1xyXG4gICAgICAgICAgICAgICAgbGV0IHBhcmVudENsYXNzID0gT2JqZWN0LmdldFByb3RvdHlwZU9mKG5vdW4pO1xyXG4gICAgICAgICAgICAgICAgd2hpbGUgKHBhcmVudENsYXNzICE9IFRoaW5nKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc3BlY2lmaXR5ICs9IDAuMTtcclxuICAgICAgICAgICAgICAgICAgICBwYXJlbnRDbGFzcyA9IE9iamVjdC5nZXRQcm90b3R5cGVPZihwYXJlbnRDbGFzcyk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gc3BlY2lmaXR5O1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIDIuNTsgLy8gSXQncyBub3QgYSBcIlRoaW5nXCIsIHNvIGl0J3MgcHJvYmFibHkgYSB3ZWlyZCBjbGFzcywgd2hpY2ggaXMga2luZCBvZiBzcGVjaWZpY1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSBlbHNlIGlmIChub3VuIGluc3RhbmNlb2YgVGhpbmcpIHtcclxuICAgICAgICAgICAgcmV0dXJuIDQ7IC8vIFNwZWNpZmljIHRoaW5nXHJcbiAgICAgICAgfSBlbHNlIGlmIChub3VuIGluc3RhbmNlb2YgQ29udGVudERpZmZlcmVudGlhbCkge1xyXG4gICAgICAgICAgICByZXR1cm4gMTsgLy8gTWlub3IgdGhpbmdcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICByZXR1cm4gMC41O1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGNvbXBhcmVOb3VucyAoYSA6IFRoaW5nIHwgdHlwZW9mIFRoaW5nIHwgQ29udGVudERpZmZ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NoZWQubGVuZ3RoIC0gMTsgayA+PSAwOyBrLS0pIHtcclxuICAgICAgICAgICAgICAgIGlmIChtYXRjaGluZ1tpXS5pc01hdGNoKHVubWF0Y2hlZFtrXSkpIHtcclxuICAgICAgICAgICAgICAgICAgICB1bm1hdGNoZWQuc3BsaWNlKGssIDEpO1xyXG4gICAgICAgICAgICAgICAgICAgIG1hdGNoaW5nLnNwbGljZShpLCAxKTtcclxuICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAodW5tYXRjaGVkLmxlbmd0aCA9PSAwICYmIG1hdGNoaW5nLmxlbmd0aCA9PSAwKSB7XHJcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgIH0gZWxzZSBpZiAodW5tYXRjaGVkLmxlbmd0aCA9PSAwKSB7XHJcbiAgICAgICAgICAgIC8vIENoZWNrIGlmIHRoZSBvbmx5IHRoaW5nIG1pc3NpbmcgYXJlIHVuaW1wb3J0YW50IENvbnRlbnRNYXJrZXJzXHJcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbWF0Y2hpbmcubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIGxldCBub3VucyA9IG1hdGNoaW5nW2ldLmdldE5vdW5zKCk7XHJcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBrID0gMDsgayA8IG5vdW5zLmxlbmd0aDsgaysrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEobm91bnNba10gaW5zdGFuY2VvZiBDb250ZW50TWFya2VyKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCg8Q29udGVudE1hcmtlcj4gbm91bnNba10pLmlzSW1wb3J0YW50KCkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAvLyBOb3RoaW5nIGltcG9ydGFudCBmb3VuZFxyXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgfVxyXG59IiwiZW51bSBDb250ZW50R3JvdXBNYXRjaCB7XHJcbiAgICBOT19NQVRDSCxcclxuICAgIFBBUlRJQUxfTUFUQ0gsXHJcbiAgICBQRVJGRUNUX01BVENIXHJcbn1cclxuXHJcbmludGVyZmFjZSBDb250ZW50R3JvdXBNYXRjaFJlc3VsdCB7XHJcbiAgICB0eXBlIDogQ29udGVudEdyb3VwTWF0Y2g7XHJcbiAgICB1bm1hdGNoZWQgOiBBcnJheTxDb250ZW50VW5pdD47XHJcbn1cclxuXHJcbmNsYXNzIENvbnRlbnRHcm91cCB7XHJcbiAgICBwcml2YXRlIHVuaXRzIDogQXJyYXk8Q29udGVudFVuaXQ+ID0gW107XHJcbiAgICBwcml2YXRlIG1hdGNoaW5nIDogQXJyYXk8Q29udGVudFVuaXQ+O1xyXG5cclxuICAgIGNvbnN0cnVjdG9yICguLi51bml0cyA6IEFycmF5PENvbnRlbnRVbml0Pikge1xyXG4gICAgICAgIHVuaXRzLmZvckVhY2godW5pdCA9PiB7XHJcbiAgICAgICAgICAgIHRoaXMuYWRkVW5pdCh1bml0KTtcclxuICAgICAgICB9KVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhZGRVbml0ICh1bml0IDogQ29udGVudFVuaXQpIHtcclxuICAgICAgICB0aGlzLnVuaXRzLnB1c2godW5pdCk7XHJcbiAgICAgICAgcmV0dXJuIHRoaXM7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHJlc2V0ICgpIHtcclxuICAgICAgICB0aGlzLm1hdGNoaW5nID0gdGhpcy51bml0cy5zbGljZSgpO1xyXG4gICAgfVxyXG5cdFxyXG5cdHB1YmxpYyBpc01hdGNoaW5nICgpIHtcclxuXHRcdHJldHVybiB0aGlzLm1hdGNoaW5nLmxlbmd0aDtcclxuXHR9XHJcblxyXG4gICAgcHVibGljIHNldE1hdGNoaW5nIChtYXRjaGluZyA6IEFycmF5PENvbnRlbnRVbml0Pikge1xyXG4gICAgICAgIHRoaXMubWF0Y2hpbmcgPSBtYXRjaGluZztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgaXNNYXRjaCAoY2cgOiBDb250ZW50R3JvdXApIDogQ29udGVudEdyb3VwTWF0Y2hSZXN1bHQge1xyXG4gICAgICAgIGxldCB1bm1hdGNoZWQgPSBjZy5tYXRjaGluZy5zbGljZSgpO1xyXG4gICAgICAgIGxldCBtYXRjaGluZyA9IHRoaXMudW5pdHMuc2xpY2UoKTtcclxuXHJcbiAgICAgICAgZm9yIChsZXQgaSA9IG1hdGNoaW5nLmxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKSB7XHJcbiAgICAgICAgICAgIGZvciAobGV0IGsgPSB1bm1hdGNoZWQubGVuZ3RoIC0gMTsgayA+PSAwOyBrLS0pIHtcclxuICAgICAgICAgICAgICAgIGlmIChtYXRjaGluZ1tpXS5pc01hdGNoKHVubWF0Y2hlZFtrXSkpIHtcclxuICAgICAgICAgICAgICAgICAgICB1bm1hdGNoZWQuc3BsaWNlKGssIDEpO1xyXG4gICAgICAgICAgICAgICAgICAgIG1hdGNoaW5nLnNwbGljZShpLCAxKTtcclxuICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgdHlwZSA6IG1hdGNoaW5nLmxlb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yZW50aWFsKFNleEhvbGUpO1xuICAgIHByaXZhdGUgc3RpY2sgOiBDb250ZW50RGlmZmVyZW50aWFsID0gbmV3IENvbnRlbnREaWZmZXJlbnRpYWwoU2V4U3RpY2spO1xuICAgIHByaXZhdGUgbWFya2VycyA6IENvbnRlbnREaWZmZXJlbnRpYWwgPSBuZXcgQ29udGVudERpZmZlcmVudGlhbCgpO1xuXG4gICAgcHVibGljIGNvbnN0cnVjdG9yICgpIHtcbiAgICAgICAgc3VwZXIoKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgc2V0RnVja2VyIChpdCA6IFRoaW5nIHwgdHlwZW9mIFRoaW5nKSB7XG4gICAgICAgIHRoaXMuZnVja2VyID0gbmV3IENvbnRlbnREaWZmZXJlbnRpYWwoaXQpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBwdWJsaWMgc2V0RnVja2VkIChpdCA6IFRoaW5nIHwgdHlwZW9mIFRoaW5nKSB7XG4gICAgICAgIHRoaXMuZnVja2VkID0gbmV3IENvbnRlbnREaWZmZXJlbnRpYWwoaXQpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBwdWJsaWMgc2V0SG9sZSAoaXQgOiBUaGluZyB8IHR5cGVvZiBUaGluZykge1xuICAgICAgICB0aGlzLmhvbGUgPSBuZXcgQ29udGVudERpZmZlcmVudGlhbChpdCk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIHB1YmxpYyBzZXRTdGljayAoaXQgOiBUaGluZyB8IHR5cGVvZiBUaGluZykge1xuICAgICAgICB0aGlzLnN0aWNrID0gbmV3IENvbnRlbnREaWZmZXJlbnRpYWwoaXQpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBwdWJsaWMgYWRkTWFya2VyIChtYXJrZXIgOiBDb250ZW50TWFya2VyKSB7XG4gICAgICAgIHRoaXMubWFya2Vycy5hZGROb3VuKG1hcmtlcik7XG4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PyA6IHN0cmluZykge1xyXG5cclxuICAgICAgICBjb25zb2xlLmRlYnVnKFJ1bGVib29rLmdldEluZGVudGF0aW9uKCkgKyBcIltEaWFsb2d1ZVRyZWVdIFJ1bm5pbmcgXCIgKyB0aGlzLmlkKTtcclxuICAgICAgICBSdWxlYm9vay5pbmNyZWFzZUluZGVudGF0aW9uKHRoaXMpO1xyXG5cclxuICAgICAgICBsZXQgbm9kZSA6IERpYWxvZ3VlTm9kZTtcclxuICAgICAgICBpZiAoc3RhcnRJZCA9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgbm9kZSA9IHRoaXMuc3RhcnROb2RlO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIG5vZGUgPSB0aGlzLmdldE5vZGUoc3RhcnRJZCk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmIChub2RlID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIucHJpbnRBc0Vycm9yKFwiVW5hYmxlIHRvIHN0YXJ0IGRpYWxvZ3VlIFwiICsgdGhpcy5pZCArIFwiOiBBIHN0YXJ0aW5nIG5vZGUgY291bGQgbm90IGJlIGZvdW5kLlwiKTtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgbGV0IHByZXZpb3VzTm9kZSA6IERpYWxvZ3VlTm9kZTtcclxuICAgICAgICB3aGlsZSAobm9kZSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgbGV0IG5leHROb2RlID0gYXdhaXQgdGhpcy5wcm9jZXNzTm9kZShub2RlLCBwcmV2aW91c05vZGUpO1xyXG4gICAgICAgICAgICBwcmV2aW91c05vZGUgPSBub2RlO1xyXG4gICAgICAgICAgICBub2RlID0gbmV4dE5vZGU7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIFJ1bGVib29rLmRlY3JlYXNlSW5kZW50YXRpb24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uIHRoaXMuYmFja2dyb3VuZEltYWdlO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gXCJ0b21hdG9cIjtcclxuICAgIH1cclxuXHJcbiAgICBwcml2YXRlIGlzSW1hZ2VEZWZpbmVkICgpIHtcclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGRvY3VtZW50LnN0eWxlU2hlZXRzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgcnVsZXMgPSBkb2N1bWVudC5zdHlsZVNoZWV0c1tpXVsncnVsZXMnXSB8fCBkb2N1bWVudC5zdHlsZVNoZWV0c1tpXVsnY3NzUnVsZXMnXTtcclxuICAgICAgICAgICAgICAgIGZvciAodmFyIHggaW4gcnVsZXMpIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHJ1bGVzW3hdLnNlbGVjdG9yVGV4dCA9PSAnc3RyaW5nJyAmJiBydWxlc1t4XS5zZWxlY3RvclRleHQgPT0gXCIuXCIgKyB0aGlzLmJhY2tncm91bmRJbWFnZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcclxuICAgICAgICAgICAgY29uc29sZS53YXJuKFwiVW5hYmxlIHRvIHJlYWQgaW1hZ2VcIik7XHJcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgaXNDb25uZWN0YWJsZU9uIChvcHBvc2l0ZURpcmVjdGlvbiA6IG51bWJlcikge1xyXG4gICAgICAgIHJldHVybiB0aGlzLmNvbm5lY3RhYmxlT24uaW5kZXhPZihvcHBvc2l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HJcbiAgICAgKiBAcGFyYW0gYXZhaWxhYmxlUm9vbXNcclxuICAgICAqIEByZXR1cm5zIHtBcnJheX1cclxuICAgICAqL1xyXG4gICAgcHVibGljIGZpbmRQYXRoVG8gKHBhdGhFbmQgOiBSb29tUmFuZG9tLCB2YWxpZFJvb20/IDogKHJvb20gOiBSb29tUmFuZG9tKSA9PiBib29sZWFuKSB7XHJcbiAgICAgICAgdmFsaWRSb29tID0gdmFsaWRSb29tID09IHVuZGVmaW5lZCA/ICgpID0+IHtyZXR1cm4gdHJ1ZTt9IDogdmFsaWRSb29tO1xyXG4gICAgICAgIGxldCBtYXAgPSB0aGlzLmxhc3RNYXA7XHJcbiAgICAgICAgbGV0IGVuZFBvc2l0aW9uID0gbWFwLmdldENvb3JkaW5hdGVzKHBhdGhFbmQpO1xyXG4gICAgICAgIGxldCBvcGVuID0gW107XHJcblxyXG4gICAgICAgIGxldCBkaXN0YW5jZSA9IChjMSwgYzIpID0+IHtcclxuICAgICAgICAgICAgcmV0dXJuIE1hdGguYWJzKGMxWzBdIC0gYzJbMF0pICsgTWF0aC5hYnMoYzFbMV0gLSBjMlsxXSk7XHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgbGV0IG5laWdoYm9ycyA9IChyb29tIDogUm9vbVJhbmRvbSwgeCA6IG51bWJlciwgeSA6IG51bWJlcikgPT4ge1xyXG4gICAgICAgICAgICBsZXQgbmVpZ2hzID0gW107XHJcbiAgICAgICAgICAgIGZvciAobGV0IGRpcmVjdGlvbiA9IDA7IGRpcmVjdGlvbiA8IHJvb20uY29ubmVjdGlvbnMubGVuZ3RoOyBkaXJlY3Rpb24rKykge1xyXG4gICAgICAgICAgICAgICAgbGV0IG90aGVyUm9vbSA9IHJvb20uY29ubmVjdGlvbnNbZGlyZWN0aW9uXTtcclxuICAgICAgICAgICAgICAgIGlmIChvdGhlclJvb20gIT0gdW5kZWZpbmVkICYmIG9wZW4uaW5kZXhPZihvdGhlclJvb20pID09IC0xICYmIHZhbGlkUm9vbSg8Um9vbVJhbmRvbT4gb3RoZXJSb29tKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBkaXJDb29yZGluYXRlcyA9IFJvb20uc2hpZnQoW3gsIHldLCBkaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBkaXIgPSBbb3RoZXJSb29tLCBkaXJDb29yZGluYXRlcywgZGlzdGFuY2UoZW5kUG9zaXRpb24sIGRpckNvb3JkaW5hdGVzKV07XHJcbiAgICAgICAgICAgICAgICAgICAgbmVpZ2hzLnB1c2goZGlyKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gbmVpZ2hzLnNvcnQoKGEsYikgPT4geyByZXR1cm4gKDxudW1iZXI+IGFbMl0pIC0gKDxudW1iZXI+IGJbMl0pO30pO1xyXG4gICAgICAgIH07XHJcblxyXG5cclxuICAgICAgICBsZXQgc2hvcnRlc3RQYXRoID0ge1xyXG4gICAgICAgICAgICBsZW5ndGggOiBtYXAuZ2V0Um9vbUNvdW50KClcclxuICAgICAgICB9O1xyXG4gICAgICAgIGxldCBub1BhdGggPSBzaG9ydGVzdFBhdGg7XHJcbiAgICAgICAgbGV0IGNQYXRoID0gW107XHJcbiAgICAgICAgbGV0IGZpbmRQYXRoID0gKG15QXJyYXkpID0+IHtcclxuICAgICAgICAgICAgbGV0IHJvb20gPSBteUFycmF5WzBdO1xyXG4gICAgICAgICAgICBjUGF0aC5wdXNoKG15QXJyYXkpO1xyXG4gICAgICAgICAgICBpZiAocm9vbSA9PSBwYXRoRW5kKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoc2hvcnRlc3RQYXRoLmxlbmd0aCA+PSBjUGF0aC5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgICAgICBzaG9ydGVzdFBhdGggPSBjUGF0aC5zbGljZSgwKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIGlmIChzaG9ydGVzdFBhdGgubGVuZ3RoID4gKGNQYXRoLmxlbmd0aCkpIHtcclxuICAgICAgICAgICAgICAgIG9wZW4ucHVzaChyb29tKTtcclxuICAgICAgICAgICAgICAgIGxldCBvdGhlclJvb21zID0gbmVpZ2hib3JzKHJvb20sIG15QXJyYXlbMV1bMF0sIG15QXJyYXlbMV1bMV0pO1xyXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBvdGhlclJvb21zLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKChjUGF0aC5sZW5ndGggKyAxKSA8IHNob3J0ZXN0UGF0aC5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZmluZFBhdGgob3RoZXJSb29tc1tpXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgb3Blbi5wb3AoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBjUGF0aC5wb3AoKTtcclxuICAgICAgICB9O1xyXG5cclxuICAgICAgICBmaW5kUGF0aChbdGhpcywgbWFwLmdldENvb3JkaW5hdGVzKHRoaXMpXSk7XHJcbiAgICAgICAgcmV0dXJuIHNob3J0ZXN0UGF0aCAhPSBub1BhdGggPyBzaG9ydGVzdFBhdGggOiB1bmRlZmluZWQ7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldEJlc3REaXJlY3Rpb25UbyAob3RoZXJSb29tIDogUm9vbVJhbmRvbSwgdmFsaWRSb29tPyA6IChyb29tIDogUm9vbVJhbmRvbSkgPT4gYm9vbGVhbikge1xyXG4gICAgICAgIGxldCBwYXRoID0gdGhpcy5maW5kUGF0aFRvKG90aGVyUm9vbSwgdmFsaWRSb29tKTtcclxuICAgICAgICBpZiAocGF0aCAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgaWYgKHBhdGgubGVuZ3RoID09IDEpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29ubmVjdGlvbnMuaW5kZXhPZihwYXRoWzFdWzBdKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldEFTdGFyUGF0aFRvIChvdGhlclJvb20gOiBSb29tUmFuZG9tLCB2YWxpZFJvb20/IDogKHJvb20gOiBSb29tUmFuZG9tKSA9PiBib29sZWFuKSB7XHJcbiAgICAgICAgdmFsaWRSb29tID0gdmFsaWRSb29tICE9IHVuZGVmaW5lZCA/IHZhbGlkUm9vbSA6ICgpID0+IHtyZXR1cm4gdHJ1ZX07XHJcblxyXG4gICAgICAgIGxldCBkaXN0YW5jZSA9IChjMSwgYzIpID0+IHtcclxuICAgICAgICAgICAgcmV0dXJuIE1hdGguYWJzKGMxWzBdIC0gYzJbMF0pICsgTWF0aC5hYnMoYzFbMV0gLSBjMlsxXSk7XHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgbGV0IGlzVmlzaXRlZCA9IChyb29tKSA9PiB7XHJcbiAgICAgICAgICAgIHJldHVybiB2aXNpdGVkLmluZGV4T2Yocm9vbSkgIT0gLTE7XHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgbGV0IGdldE5laWdoYm9ycyA9IChub2RlIDogUm9vbVJhbmRvbU5vZGUpID0+IHtcclxuICAgICAgICAgICAgbGV0IG5laWdoYm9ycyA6IEFycmF5PFJvb21SYW5kb21Ob2RlPiA9IFtdO1xyXG4gICAgICAgICAgICBmb3IgKGxldCBkaXJlY3Rpb24gPSAwOyBkaXJlY3Rpb24gPCBub2RlLnJvb20uY29ubmVjdGlvbnMubGVuZ3RoOyBkaXJlY3Rpb24rKykge1xyXG4gICAgICAgICAgICAgICAgaWYgKG5vZGUucm9vbS5jb25uZWN0aW9uc1tkaXJlY3Rpb25dICE9IHVuZGVmaW5lZCAmJiAhaXNWaXNpdGVkKG5vZGUucm9vbS5jb25uZWN0aW9uc1tkaXJlY3Rpb25dKSAmJiB2YWxpZFJvb20oPFJvb21SYW5kb20+IG5vZGUucm9vbS5jb25uZWN0aW9uc1tkaXJlY3Rpb25dKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb29yZGluYXRlcyA9IFJvb20uc2hpZnQobm9kZS5jb29yZGluYXRlcywgZGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICBuZWlnaGJvcnMucHVzaCh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvb20gOiA8Um9vbVJhbmRvbT4gbm9kZS5yb29tLmNvbm5lY3Rpb25zW2RpcmVjdGlvbl0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvb3JkaW5hdGVzIDogY29vcmRpbmF0ZXMsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpc3RhbmNlIDogZGlzdGFuY2UoY29vcmRpbmF0ZXMsIGVuZE5vZGUuY29vcmRpbmF0ZXMpXHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgdmlzaXRlZC5wdXNoKDxSb29tUmFuZG9tPiBub2RlLnJvb20uY29ubmVjdGlvbnNbZGlyZWN0aW9uXSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIG5laWdoYm9ycztcclxuICAgICAgICB9O1xyXG5cclxuICAgICAgICBsZXQgZ2V0Q2xvc2VzdFBhdGggPSAoKSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBzaG9ydGVzdCA9IDA7XHJcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAxOyBpIDwgb3Blbi5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgbGV0IGxhc3RQb2ludCA9IG9wZW5baV1bb3BlbltpXS5sZW5ndGggLSAxXTtcclxuICAgICAg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mF5PFJvb21SYW5kb20+ID0gW3RoaXNdO1xyXG4gICAgICAgIHdoaWxlIChvcGVuLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgbXlQYXRoID0gb3Blbi5zcGxpY2UoY2xvc2VzdCwgMSlbMF07XHJcblxyXG4gICAgICAgICAgICBpZiAobXlQYXRoW215UGF0aC5sZW5ndGggLSAxXS5kaXN0YW5jZSA9PSAwKSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgcHVzaCA9IGNsb3NlZC5wdXNoKG15UGF0aCk7XHJcbiAgICAgICAgICAgICAgICBpZiAobXlQYXRoLmxlbmd0aCA8IHNob3J0ZXN0UGF0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHNob3J0ZXN0UGF0aCA9IG15UGF0aC5sZW5ndGg7XHJcbiAgICAgICAgICAgICAgICAgICAgc2hvcnRlc3RJbmRleCA9IHB1c2ggLSAxO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgLy8gbGF6eSwgZmlyc3QgcGF0aCBpcyB2ZXJ5IGxpa2VseSB0byBiZSB0aGUgYmVzdFxyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgbmVpZ2hib3JzID0gZ2V0TmVpZ2hib3JzKG15UGF0aFtteVBhdGgubGVuZ3RoIC0gMV0pO1xyXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBuZWlnaGJvcnMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBvcGVuLnB1c2gobXlQYXRoLmNvbmNhdChbbmVpZ2hib3JzW2ldXSkpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSBvcGVuLmxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKSB7XHJcbiAgICAgICAgICAgICAgICB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W5hdGVzLngsIHJhbmRvbUNvb3JkaW5hdGVzLnkpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBpc0ZyZWUgKHggOiBudW1iZXIsIHkgOiBudW1iZXIpIHtcclxuICAgICAgICByZXR1cm4gKHRoaXMucG9zaXRpb25UYWJsZVt4XSA9PSB1bmRlZmluZWQgfHwgdGhpcy5wb3NpdGlvblRhYmxlW3hdW3ldID09PSB1bmRlZmluZWQpO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBibG9jayAoeCA6IG51bWJlciwgeSA6IG51bWJlcikge1xyXG4gICAgICAgIGlmICh0aGlzLmlzRnJlZSh4LCB5KSkge1xyXG4gICAgICAgICAgICBpZiAodGhpcy5wb3NpdGlvblRhYmxlW3hdID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5wb3NpdGlvblRhYmxlW3hdID0ge307XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgdGhpcy5wb3NpdGlvblRhYmxlW3hdW3ldID0gbnVsbDtcclxuICAgICAgICAgICAgdGhpcy51cGRhdGVDYWNoZU9uUG9zaXRpb24oeCwgeSk7XHJcbiAgICAgICAgICAgIHRoaXMudXBkYXRlTGltaXRzKHgsIHkpO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgdXBkYXRlQWxsTGltaXRzICgpIHtcclxuICAgICAgICB0aGlzLmhpZ2hlc3RYID0gMDtcclxuICAgICAgICB0aGlzLmhpZ2hlc3RZID0gMDtcclxuICAgICAgICB0aGlzLmxvd2VzdFggPSAwO1xyXG4gICAgICAgIHRoaXMubG93ZXN0WSA9IDA7XHJcbiAgICAgICAgZm9yIChsZXQgeCBpbiB0aGlzLnBvc2l0aW9uVGFibGUpIHtcclxuICAgICAgICAgICAgZm9yIChsZXQgeSBpbiB0aGlzLnBvc2l0aW9uVGFibGVbeF0pIH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AgICAgICAgICAgdGhpcy5yZW1vdmVGcm9tQ2FjaGUoY29vcmRpbmF0ZXNNYXAsIGRpcmVjdGlvbik7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmIChzaGlmdGVkUm9vbSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIGlmIChjb29yZGluYXRlc0Jsb2NrZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLnJlbW92ZUZyb21DYWNoZShzaGlmdGVkTWFwLCBvcHBvc2l0ZURpcmVjdGlvbik7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHNoaWZ0ZWRSb29tLmlzQ29ubmVjdGFibGVPbihvcHBvc2l0ZURpcmVjdGlvbikpIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLmFkZFRvQ2FjaGUoc2hpZnRlZE1hcCwgb3Bwb3NpdGVEaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5yZW1vdmVGcm9tQ2FjaGUoc2hpZnRlZE1hcCwgb3Bwb3NpdGVEaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFJvb20gKHggOiBudW1iZXIsIHkgOiBudW1iZXIpIHtcclxuICAgICAgICBpZiAodGhpcy5wb3NpdGlvblRhYmxlW3hdICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBpZiAodGhpcy5wb3NpdGlvblRhYmxlW3hdW3ldICE9IG51bGwpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnBvc2l0aW9uVGFibGVbeF1beV07XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcclxuICAgIH1cclxuXHJcbiAgICBwdW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b20ucm5nXHJcbiAgICAgICAgICAgICk7XHJcblxyXG4gICAgICAgICAgICBmb3IgKGxldCByb29tID0gcm9vbVNodWZmbGVyLmdldE9uZSgpOyByb29tICE9IHVuZGVmaW5lZDsgcm9vbSA9IHJvb21TaHVmZmxlci5nZXRPbmUoKSkge1xyXG4gICAgICAgICAgICAgICAgLy8gUHJldmVudCBhdmFpbGFibGUgY29ubmVjdGlvbnMgZnJvbSBnZXR0aW5nIHRvbyBsb3dcclxuICAgICAgICAgICAgICAgIC8vIElmIHdlJ3JlIHBsYWNpbmcgcm9vbXMgd2l0aCB0b28gZmV3IGF2YWlsYWJsZUNvbm5lY3Rpb25zLCB3ZSBtaWdodCBlbmQgdXAgcmVhY2hpbmcgMCBhdmFpbGFibGVDb25uZWN0aW9uc1xyXG4gICAgICAgICAgICAgICAgLy8gV2hpY2ggd291bGQgbWVhbiBubyBtb3JlIHJvb21zIGNhbiBiZSBwbGFjZWQuXHJcbiAgICAgICAgICAgICAgICB3aGlsZSAocmVnaW9uLm1hcC5yb29tcyA+IDAgJiYgcmVnaW9uLm1hcC5nZXRBdmFpbGFibGVDb25uZWN0aW9ucygpIDwgNCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBmb2RkZXIgPSBuZXcgcmVnaW9uLmZvZGRlclJvb21DbGFzcygpO1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBvcHRpb25zID0gPFJhbmRvbWl6aW5nUm9vbU9wdGlvbnM+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbWFwIDogcmVnaW9uLm1hcCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgcm9vbSA6IGZvZGRlcixcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVnaW9uIDogcmVnaW9uXHJcbiAgICAgICAgICAgICAgICAgICAgfTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgcmVnaW9uLnBsYWNlKGZvZGRlcik7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGF3YWl0IFJlZ2lvblJhbmRvbS5ydWxlYm9va0JlZm9yZVBsYWNlUm9vbS5leGVjdXRlKHtub3VuIDogb3B0aW9uc30pO1xyXG4gICAgICAgICAgICAgICAgICAgIGF3YWl0IFJlZ2lvblJhbmRvbS5ydWxlYm9va1BsYWNlUm9vbS5leGVjdXRlKHtub3VuIDogb3B0aW9uc30pO1xyXG4gICAgICAgICAgICAgICAgICAgIGF3YWl0IFJlZ2lvblJhbmRvbS5ydWxlYm9va0FmdGVyUGxhY2VSb29tLmV4ZWN1dGUoe25vdW4gOiBvcHRpb25zfSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IG9wdGlvbnMgPSA8UmFuZG9taXppbmdSb29tT3B0aW9ucz4ge1xyXG4gICAgICAgICAgICAgICAgICAgIG1hcCA6IHJlZ2lvbi5tYXAsXHJcbiAgICAgICAgICAgICAgICAgICAgcm9vbSA6IHJvb20sXHJcbiAgICAgICAgICAgICAgICAgICAgcmVnaW9uIDogcmVnaW9uXHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgYXdhaXQgUmVnaW9uUmFuZG9tLnJ1bGVib29rQmVmb3JlUGxhY2VSb29tLmV4ZWN1dGUoe25vdW4gOiBvcHRpb25zfSk7XHJcbiAgICAgICAgICAgICAgICBhd2FpdCBSZWdpb25SYW5kb20ucnVsZWJvb2tQbGFjZVJvb20uZXhlY3V0ZSh7bm91biA6IG9wdGlvbnN9KTtcclxuICAgICAgICAgICAgICAgIGF3YWl0IFJlZ2lvblJhbmRvbS5ydWxlYm9va0FmdGVyUGxhY2VSb29tLmV4ZWN1dGUoe25vdW4gOiBvcHRpb25zfSk7XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKCFyb29tLnBsYWNlZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci5wcmludEFzRXJyb3IobmV3IFNheShcIldhcyB1bmFib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ubmVjdGFibGVPbi5zbGljZSgwKSwgUmVnaW9uUmFuZG9tLnJuZyk7XHJcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBkaXJlY3Rpb24gPSBkaXJlY3Rpb25TaHVmZmxlci5nZXRPbmUoKTsgZGlyZWN0aW9uICE9IHVuZGVmaW5lZCAmJiAoUmVnaW9uUmFuZG9tLnJuZygpICogMTAwKSA8PSByb29tLmV4dHJhQ29ubmVjdGlvbkNoYW5jZTsgZGlyZWN0aW9uID0gZGlyZWN0aW9uU2h1ZmZsZXIuZ2V0T25lKCkpIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAocm9vbS5jb25uZWN0aW9uc1tkaXJlY3Rpb25dID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgb3RoZXJDb29yZGluYXRlcyA9IFJvb20uc2hpZnQobXlDb29yZGluYXRlcywgZGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG90aGVyUm9vbSA9IHJlZ2lvbi5tYXAuZ2V0Um9vbShvdGhlckNvb3JkaW5hdGVzWzBdLCBvdGhlckNvb3JkaW5hdGVzWzFdKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG90aGVyUm9vbSAhPSB1bmRlZmluZWQgJiYgb3RoZXJSb29tLnJhbmRvbWl6YWJsZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3RoZXJSb29tLmlzQ29ubmVjdGFibGVPbihPcHBvc2l0ZURpcmVjdGlvbltEaXJlY3Rpb25bZGlyZWN0aW9uXV0pXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAoUmVnaW9uUmFuZG9tLnJuZygpICogMTAwKSA8PSBvdGhlclJvb20uZXh0cmFDb25uZWN0aW9uQ2hhbmNlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByb29tLm1hcFJvb20ob3RoZXJSb29tLCBkaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIHJ1bGVQbGFjZUZpcnN0Um9vbSA9IFJlZ2lvblJhbmRvbS5ydWxlYm9va1BsYWNlUm9vbS5jcmVhdGVBbmRBZGRSdWxlKHtcclxuICAgICAgICBuYW1lIDogXCJQbGFjaW5nIEZpcnN0IHJvb20gc29tZXRoaW5nXCIsXHJcbiAgICAgICAgZmlyc3RQcmlvcml0eSA6IFJ1bGUuUFJJT1JJVFlfSElHSEVTVCxcclxuICAgICAgICBjb2RlIDogcnVubmVyID0+IHtcclxuICAgICAgICAgICAgbGV0IHBsYWNpbmdPcHRpb25zID0gPFJhbmRvbWl6aW5nUm9vbU9wdGlvbnM+IHJ1bm5lci5ub3VuO1xyXG5cclxuICAgICAgICAgICAgaWYgKHBsYWNpbmdPcHRpb25zLm1hcC5pc0ZyZWUoMCwgMCkpIHtcclxuICAgICAgICAgICAgICAgIHBsYWNpbmdPcHRpb25zLm1hcC5tYXAocGxhY2luZ09wdGlvbnMucm9vbSwgMCwgMCk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgY29uZGl0aW9ucyA6IHJ1bm5lciA9PiB7XHJcbiAgICAgICAgICAgIHJldHVybiBydW5uZXIubm91bi5tYXAucm9vbXMgPT0gMDtcclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIHJ1bGVQbGFjZU5vblRyaWNreVJvb20gPSBSZWdpb25SYW5kb20ucnVsZWJvb2tQbGFjZVJvb20uY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiUGxhY2luZyBub24td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bltEaXJlY3Rpb25bZGlyZWN0aW9uXV07XHJcbiAgICAgICAgICAgICAgICBsZXQgY29ubmVjdGFibGVSb29tID0gcGxhY2luZ09wdGlvbnMubWFwLmdldEFueUZyb21DYWNoZShvcHBvc2l0ZURpcmVjdGlvbik7XHJcbiAgICAgICAgICAgICAgICBpZiAoY29ubmVjdGFibGVSb29tICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBvdGhlckNvb3JkaW5hdGVzID0gcGxhY2luZ09wdGlvbnMubWFwLmdldENvb3JkaW5hdGVzKGNvbm5lY3RhYmxlUm9vbSk7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IG15Q29vcmRpbmF0ZXMgPSBSb29tLnNoaWZ0KG90aGVyQ29vcmRpbmF0ZXMsIG9wcG9zaXRlRGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICBwbGFjaW5nT3B0aW9ucy5yb29tLm1hcFJvb20oY29ubmVjdGFibGVSb29tLCBkaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICAgICAgICAgIHBsYWNpbmdPcHRpb25zLm1hcC5tYXAocGxhY2luZ09wdGlvbnMucm9vbSwgbXlDb29yZGluYXRlc1swXSwgbXlDb29yZGluYXRlc1sxXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIGNvbmRpdGlvbnMgOiBydW5uZXIgPT4ge1xyXG4gICAgICAgICAgICByZXR1cm4gcnVubmVyLm5vdW4ucm9vbS50cmlja3lDb2RlID09IHVuZGVmaW5lZDtcclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIHJ1bGVQbGFjZVRyaWNreVJvb20gPSBSZWdpb25SYW5kb20ucnVsZWJvb2tQbGFjZVJvb20uY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiUGxhY2luZyB0cmlja3kgcm9vbSBzb21ldGhpbmdcIixcclxuICAgICAgICBjb2RlIDogcnVubmVyID0+IHtcclxuICAgICAgICAgICAgbGV0IHBsYWNpbmdPcHRpb25zID0gPFJhbmRvbWl6aW5nUm9vbU9wdGlvbnM+IHJ1bm5lci5ub3VuO1xyXG4gICAgICAgICAgICBsZXQgcGxhY2VkUm9vbXMgPSA8QXJyYXk8Um9vbVJhbmRvbT4+IHBsYWNpbmdPcHRpb25zLnJlZ2lvbi5nZXRSb29tcygpLmZpbHRlcigocm9vbSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHJvb20gaW5zdGFuY2VvZiBSb29tUmFuZG9tICYmIHJvb20ucGxhY2VkO1xyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIGlmIChwbGFjZWRSb29tcy5sZW5ndGggPT0gMCkge1xyXG4gICAgICAgICAgICAgICAgRWxlbWVudHMuQ3VycmVudFR1cm5IYW5kbGVyLnByaW50QXNFcnJvcihcIlVuYWJsZSB0byBwbGFjZSByb29tIFwiICsgcGxhY2luZ09wdGlvbnMucm9vbS5nZXRQcmludGVkTmFtZSgpICsgXCI6IFRoZXJlIGFyZSBubyByb29tcyB0byBjb25uZWN0IHRvIVwiKTtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgbGV0IHJvb21TaHVmZmxlciA9IG5ldyBTaHVmZmxlcihwbGFjZWRSb29tcywgUmVnaW9uUmFuZG9tLnJuZyk7XHJcbiAgICAgICAgICAgIGZvciAobGV0IGNvbm5lY3RhYmxlUm9vbSA9IHJvb21TaHVmZmxlci5nZXRPbmUoKTsgY29ubmVjdGFibGVSb29tICE9IHVuZGVmaW5lZDsgY29ubmVjdGFibGVSb29tID0gcm9vbVNodWZmbGVyLmdldE9uZSgpKSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgdHJpY2tpZXIgPSA8VHJpY2tpZXJPcHRpb25zPiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVnaW9uIDogcGxhY2luZ09wdGlvbnMucmVnaW9uLFxyXG4gICAgICAgICAgICAgICAgICAgIG1hcCA6IHBsYWNpbmdPcHRpb25zLm1hcCxcclxuICAgICAgICAgICAgICAgICAgICBvdGhlclJvb20gOiBjb25uZWN0YWJsZVJvb21cclxuICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICBsZXQgdHJpY2t5ID0gcGxhY2luZ09wdGlvbnMucm9vbS5nZXRBbnlEaXJlY3Rpb24odHJpY2tpZXIpO1xyXG4gICAgICAgICAgICAgICAgaWYgKHRyaWNreSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBwbGFjaW5nT3B0aW9ucy5yb29tLm1hcFJvb20oY29ubmVjdGFibGVSb29tLCB0cmlja3kudHJpY2t5Um9vbURpcmVjdGlvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgcGxhY2luZ09wdGlvbnMubWFwLm1hcChwbGFjaW5nT3B0aW9ucy5yb29tLCB0cmlja3kueCwgdHJpY2t5LnkpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvLyBUSElTIFdPUktTXHJcbiAgICAgICAgICAgIC8vIEkgRE9OJ1QgS05PVyBXSFlcclxuICAgICAgICAgICAgLy8gSSBET04nVCBDQVJFIFdIWVxyXG4gICAgICAgICAgICAvLyBMRUFWRVxyXG4gICAgICAgICAgICBsZXQgY29ubmVjdGFibGVUaHJvdWdoRm9kZGVyID0gKGZvZGRlclN0ZXAgOiBudW1iZXIsIGNvbm5lY3RpbmdSb29tIDogUm9vbVJhbmRvbSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgbGV0IHRyaWNraWVyID0gPFRyaWNraWVyT3B0aW9ucz4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlZ2lvbiA6IHBsYWNpbmdPcHRpb25zLnJlZ2lvbixcclxuICAgICAgICAgICAgICAgICAgICBtYXAgOiBwbGFjaW5nT3B0aW9ucy5tYXAsXHJcbiAgICAgICAgICAgICAgICAgICAgb3RoZXJSb29tIDogY29ubmVjdGluZ1Jvb21cclxuICAgICAgICAgICAgICAgIH07XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKGZvZGRlclN0ZXAgPT0gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBwbGFjaW5nT3B0aW9ucy5yb29tLmdldEFueURpcmVjdGlvbih0cmlja2llcik7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBuZXdGb2RkZXIgPSBuZXcgKHBsYWNpbmdPcHRpb25zLnJlZ2lvbi5mb2RkZXJSb29tQ2xhc3MpKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgLy9sZXQgZGlyZWN0aW9uU2h1ZmZsZXIgPSBuZXcgU2h1ZmZsZXI8bnVtYmVyPihuZXdGb2RkZXIuY29ubmVjdGFibGVPbiwgUmVnaW9uUmFuZG9tLnJuZyk7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IHByZWZlcnJlZEdyb3d0aERpcmVjdGlvbiA9IHBsYWNpbmdPcHRpb25zLm1hcC5nZXRQcmVmZXJyZWRHcm93dGgoKTtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgZGlyZWN0aW9uU2h1ZmZsZXIgPSBuZXcgU2h1ZmZsZXJEaXJlY3Rpb24ocGxhY2luZ09wdGlvbnMucm9vbS5jb25uZWN0YWJsZU9uLCBwcmVmZXJyZWRHcm93dGhEaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGRpcmVjdGlvbiA9IGRpcmVjdGlvblNodWZmbGVyLmdldERpcmVjdGlvbigpOyBkaXJlY3Rpb24gIT0gdW5kZWZpbmVkOyBkaXJlY3Rpb24gPSBkaXJlY3Rpb25TaHVmZmxlci5nZXREaXJlY3Rpb24oKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgb3Bwb3NpdGVEaXJlY3Rpb24gPSBPcHBvc2l0ZURpcmVjdGlvbltEaXJlY3Rpb25bZGlyZWN0aW9uXV07XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBvdGhlckNvb3JkaW5hdGVzID0gcGxhY2luZ09wdGlvbnMubWFwLmdldENvb3JkaW5hdGVzKGNvbm5lY3RpbmdSb29tKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHdvdWxkYmVDb29yZGluYXRlcyA9IFJvb20uc2hpZnQob3RoZXJDb29yZGluYXRlcywgb3Bwb3NpdGVEaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgZm9kZGVyVHJpY2t5ID0ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb3RoZXJSb29tIDogY29ubmVjdGluZ1Jvb20sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdGhlclJvb21EaXJlY3Rpb24gOiBvcHBvc2l0ZURpcmVjdGlvbixcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyaWNreVJvb21EaXJlY3Rpb24gOiBkaXJlY3Rpb24sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXAgOiBwbGFjaW5nT3B0aW9ucy5tYXAsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWdpb24gOiBwbGFjaW5nT3B0aW9ucy5yZWdpb24sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB4IDogd291bGRiZUNvb3JkaW5hdGVzWzBdLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeSA6IHdvdWxkYmVDb29yZGluYXRlc1sxXVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5ld0ZvZGRlci5pc1BsYWNlYWJsZShmb2RkZXJUcmlja3kpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdGb2RkZXIubWFwUm9vbShjb25uZWN0aW5nUm9vbSwgZm9kZGVyVHJpY2t5LnRyaWNreVJvb21EaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxhY2luZ09wdGlvbnMubWFwLm1hcChuZXdGb2RkZXIsIGZvZGRlclRyaWNreS54LCBmb2RkZXJUcmlja3kueSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5leHRUcmlja3kgPSBjb25uZWN0YWJsZVRocm91Z2hGb2RkZXIoZm9kZGVyU3RlcCAtIDEsIG5ld0ZvZGRlcik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobmV4dFRyaWNreSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGFjaW5nT3B0aW9ucy5yZWdpb24ucGxhY2UobmV3Rm9kZGVyKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV4dFRyaWNreTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3Rm9kZGVyLnVubWFwUm9vbShmb2RkZXJUcmlja3kudHJpY2t5Um9vbURpcmVjdGlvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxhY2luZ09wdGlvbnMubWFwLnVubWFwKGZvZGRlclRyaWNreS54LCBmb2RkZXJUcmlja3kueSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH07XHJcblxyXG4gICAgICAgICAgICBmb3IgKGxldCBmb2RkZXJMZXZlbCA9IDE7IGZvZGRlckxldmVsIDwgMTA7IGZvZGRlckxldmVsKyspIHtcclxuICAgICAgICAgICAgICAgIHJvb21TaHVmZmxlci5yZXN0YXJ0KCk7XHJcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBjb25uZWN0YWJsZVJvb20gPSByb29tU2h1ZmZsZXIuZ2V0T25lKCk7IGNvbm5lY3RhYmxlUm9vbSAhPSB1bmRlZmluZWQ7IGNvbm5lY3RhYmxlUm9vbSA9IHJvb21TaHVmZmxlci5nZXRPbmUoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCB0cmlja3kgPSBjb25uZWN0YWJsZVRocm91Z2hGb2RkZXIoZm9kZGVyTGV2ZWwsIGNvbm5lY3RhYmxlUm9vbSk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRyaWNreSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcGxhY2luZ09wdGlvbnMucm9vbS5tYXBSb29tKHRyaWNreS5vdGhlclJvb20sIHRyaWNreS50cmlja3lSb29tRGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcGxhY2luZ09wdGlvbnMubWFwLm1hcChwbGFjaW5nT3B0aW9ucy5yb29tLCB0cmlja3kueCwgdHJpY2t5LnkpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci5wcmludEFzRXJyb3IoXCJVbmFibGUgdG8gcGxhY2Ugcm9vbSBcIiArIHBsYWNpbmdPcHRpb25zLnJvb20uZ2V0UHJpbnRlZE5hbWUoKSArIFwiO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Byb2xsIChzdGF0IDogbnVtYmVyKSA6IEFycmF5PG51bWJlcj4gIHtcclxuICAgICAgICBsZXQgcm5nID0gdGhpcy5yYW5nZS5zbGljZSgpO1xyXG4gICAgICAgIGlmIChzdGF0ID49IDEwKSB7XHJcbiAgICAgICAgICAgIHJuZy5wdXNoKDIsIDEpO1xyXG4gICAgICAgIH0gZWxzZSBpZiAoc3RhdCA+PSA3KSB7XHJcbiAgICAgICAgICAgIHJuZy5wdXNoKDEsIDEpO1xyXG4gICAgICAgIH0gZWxzZSBpZiAoc3RhdCA+PSA0KSB7XHJcbiAgICAgICAgICAgIHJuZy5wdXNoKDEpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBsZXQgcmVzdWx0cyA9IFtdO1xyXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgc3RhdDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGxldCBpbmRleCA9IE1hdGguZmxvb3IoTWF0aC5yYW5kb20oKSAqIChybmcubGVuZ3RoKSk7XHJcbiAgICAgICAgICAgIHJlc3VsdHMucHVzaChybmdbaW5kZXhdKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIFRPRE86IFByaW50IHRoZSBkaWNlIHJlc3VsdHMgaWYgTWVtb3J5LlNob3dEaWNlID0gMVxyXG5cclxuICAgICAgICByZXR1cm4gcmVzdWx0cztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIHN1bSAoYSwgYikge1xyXG4gICAgICAgIHJldHVybiBhICsgYjtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0U2F5IChyZXN1bHRzIDogQXJyYXk8bnVtYmVyPikgOiBTYXkge1xyXG4gICAgICAgIGxldCBmaW5hbFJlc3VsdCA9IHJlc3VsdHMucmVkdWNlKERpY2Uuc3VtKTtcclxuICAgICAgICByZXR1cm4gbmV3IFNheShcclxuICAgICAgICAgICAgbmV3IFNheUJvbGQoXCJbXCIsIHRoaXMudGVzdFN0cm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W107XHJcbiAgICBwdWJsaWMgc3RhdGljIHNvcnRlZE1peHR1cmVzID0gZmFsc2U7XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBhc3luYyBtaXggKGNvbnRhaW5lciA6IExpcXVpZENvbnRhaW5lcikge1xyXG4gICAgICAgIGxldCByZXN1bHQgPSBhd2FpdCBMaXF1aWQucnVsZWJvb2tNaXhpbmcuZXhlY3V0ZSh7bm91biA6IGNvbnRhaW5lcn0pO1xyXG4gICAgICAgIC8vIERpZCB3ZSBmaW5kIGEgbGlxdWlkP1xyXG4gICAgICAgIGlmIChyZXN1bHQgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIGxldCBmaW5hbFF1YW50aXR5ID0gcmVzdWx0LnF1YW50aXR5TXVsdGlwbGllciAhPSB1bmRlZmluZWQgP1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocmVzdWx0LnF1YW50aXR5TXVsdGlwbGllciAqIGNvbnRhaW5lci5saXF1aWRDb250ZW50cy5sZW5ndGgpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNvbnRhaW5lci5saXF1aWRDb250ZW50cy5sZW5ndGgpO1xyXG5cclxuXHJcbiAgICAgICAgICAgIGNvbnRhaW5lci5saXF1aWRDb250ZW50cyA9IG5ldyBBcnJheShmaW5hbFF1YW50aXR5KTtcclxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBmaW5hbFF1YW50aXR5OyBpKyspIHtcclxuICAgICAgICAgICAgICAgIGNvbnRhaW5lci5saXF1aWRDb250ZW50c1tpXSA9IHJlc3VsdC5yZXN1bHQ7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBnZXRNaXh0dXJlcyAoKSB7XHJcbiAgICAgICAgaWYgKExpcXVpZC5z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mxlbmd0aCA9PSAwKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGxldCBtaXh0dXJlIDogTGlxdWlkTWl4dHVyZTtcclxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBMaXF1aWQubWl4dHVyZXMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIG1peHR1cmUgPSBMaXF1aWQubWl4dHVyZXNbaV07XHJcbiAgICAgICAgICAgICAgICBsZXQgcHJvcG9ydGlvbnMgPSBbXTtcclxuICAgICAgICAgICAgICAgIGxldCBtaXh0dXJlSXRlcmF0b3IgPSBtaXh0dXJlLnF1YW50aXRpZXMuZW50cmllcygpO1xyXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgbWl4dHVyZUxpcXVpZCA9IG1peHR1cmVJdGVyYXRvci5uZXh0KCk7ICFtaXh0dXJlTGlxdWlkLmRvbmU7IG1peHR1cmVMaXF1aWQgPSBtaXh0dXJlSXRlcmF0b3IubmV4dCgpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IG1peHR1cmVUeXBlID0gbWl4dHVyZUxpcXVpZC52YWx1ZVswXTtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgbWl4dHVyZVF1YW50aXR5ID0gbWl4dHVyZUxpcXVpZC52YWx1ZVsxXTtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgbWF0Y2hlZFF1YW50aXR5ID0gMDtcclxuICAgICAgICAgICAgICAgICAgICBydW5uZXIubm91bi5saXF1aWRDb250ZW50cy5mb3JFYWNoKChsaXF1aWRUeXBlKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobGlxdWlkVHlwZSA9PSBtaXh0dXJlVHlwZSB8fFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0eXBlb2YgbWl4dHVyZVR5cGUgPT0gXCJmdW5jdGlvblwiICYmXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChsaXF1aWRUeXBlIGluc3RhbmNlb2YgbWl4dHVyZVR5cGUgfHwgbWl4dHVyZVR5cGUobGlxdWlkVHlwZSkpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF0Y2hlZFF1YW50aXR5Kys7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBtaXh0dXJlVHlwZSBpcyBub3QgYWx3YXlzIGNhbGxhYmxlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHt9XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHByb3BvcnRpb25zLnB1c2gobWF0Y2hlZFF1YW50aXR5IC8gbWl4dHVyZVF1YW50aXR5KTtcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAvLyBJZiB0aGlzIGlzIGEgdmFsaWQgbWl4LCB0aGVuIGV2ZXJ5IHBhcnQgb2YgdGhlIHJlY2lwZSBpcyByZXByZXNlbnRlZCBwcm9wb3J0aW9uYWxseVxyXG4gICAgICAgICAgICAgICAgaWYgKHByb3BvcnRpb25zLmV2ZXJ5KGZ1bmN0aW9uKGVsZW1lbnQsIGluZGV4LCBhcnJheSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZWxlbWVudCA9PT0gYXJyYXlbMF07XHJcbiAgICAgICAgICAgICAgICAgICAgfSkpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbWl4dHVyZTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgf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2hpbmllc1wiLFxuICAgICAgICBmaXJzdFByaW9yaXR5IDogQUlSdWxlcy5QUklPUklUWV9BQ1RJTkdfT05fUExBQ0UsXG4gICAgICAgIGNvbmRpdGlvbnMgOiAocnVubmVyIDogUnVsZWJvb2tSdW5uZXI8UGVyc29uPikgPT4ge1xuICAgICAgICAgICAgbGV0IHBlcnNvbiA9IHJ1bm5lci5ub3VuO1xuICAgICAgICAgICAgcmV0dXJuIHBlcnNvbi5BSS5waWNrc1NoaW5pZXM7XG4gICAgICAgIH0sXG4gICAgICAgIGNvZGUgOiAocnVubmVyIDogUnVsZWJvb2tSdW5uZXI8UGVyc29uPikgPT4ge1xuICAgICAgICAgICAgbGV0IHBlcnNvbiA9IHJ1bm5lci5ub3VuO1xuICAgICAgICAgICAgbGV0IHJvb20gPSBwZXJzb24uZ2V0Um9vbSgpO1xuICAgICAgICAgICAgbGV0IHZpc2libGVUaGluZ3MgPSByb29tLmdldENvbnRhaW5lZEFuZFZpc2libGVUbyhwZXJzb24pO1xuXG4gICAgICAgICAgICBpZiAodmlzaWJsZVRoaW5ncy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB2aXNpYmxlVGhpbmdzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghdmlzaWJsZVRoaW5nc1tpXS5maXhlZEluUGxhY2UgJiYgdmlzaWJsZVRoaW5nc1tpXS5nZXRTaGlueSgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEFjdGlvblRha2UocGVyc29uLCB2aXNpYmxlVGhpbmdzW2ldKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0pO1xufVxubGV0IHJhbmRvbU9yYztcbmxldCByYW5kb21PcmMyO1xuZm9yIChsZXQgaSA9IDA7IGkgPCAxMDsgaSsrKSB7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obGVmdFNpZGUuZmlyc3RDaGlsZCk7XHJcblxyXG4gICAgICAgIGF3YWl0IChuZXcgU2F5KG5ldyBTYXlCb2xkKFwiQ2hhcmFjdGVyIE9yaWdpbjpcIikpLmdldEhUTUxDb250ZW50KCkudGhlbihlbGVzID0+IHtcclxuICAgICAgICAgICAgZWxlcy5mb3JFYWNoKGVsZSA9PiB7XHJcbiAgICAgICAgICAgICAgICBsZWZ0U2lkZS5hcHBlbmRDaGlsZChlbGUpO1xyXG4gICAgICAgICAgICB9KVxyXG4gICAgICAgIH0pKTtcclxuXHJcbiAgICAgICAgbGV0IG9yaWdpbnMgPSBDaGFyYWN0ZXJPcmlnaW4uZ2V0T3JpZ2lucygpO1xyXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgb3JpZ2lucy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICBsZXQgb3JpZ2luID0gb3JpZ2luc1tpXTtcclxuICAgICAgICAgICAgbGV0IHNheSA9IG5ldyBTYXkob3JpZ2luLm5hbWUpO1xyXG4gICAgICAgICAgICBpZiAob3JpZ2luLmlkID09IENoYXJhY3RlckNyZWF0aW9uLlBsYXllck9yaWdpbi52YWx1ZSkge1xyXG4gICAgICAgICAgICAgICAgc2F5LmFkZChcIiAtIFNFTEVDVEVEXCIpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGF3YWl0IChzYXkpLmdldEhUTUwoXCJwXCIsIFtcImNob2ljZVwiXSkudGhlbihlbGVtZW50QXJyYXkgPT4ge1xyXG4gICAgICAgICAgICAgICAgQ29udHJvbHMuTGlua3MubWFrZUN1c3RvbUxpbmsoZWxlbWVudEFycmF5WzBdLCB7XHJcbiAgICAgICAgICAgICAgICAgICAgbW91c2VvdmVyOiAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHByaW50T3JpZ2luKG9yaWdpbik7XHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICBtb3VzZW91dDogKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBwcmludE9yaWdpbigpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgY2xpY2s6ICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgQ2hhcmFjdGVyQ3JlYXRpb24uUGxheWVyT3JpZ2luLnZhbHVlID0gb3JpZ2luLmlkO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXNldCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgQ29udHJvbHMuS2V5SGFuZGxlci5hcHBseUNvZGUoZWxlbWVudEFycmF5WzBdLCBDb250cm9scy5LZXlIYW5kbGVyLmdldFNlY29uZEtleUNvZGUoKSk7XHJcbiAgICAgICAgICAgICAgICBsZWZ0U2lkZS5hcHBlbmRDaGlsZChlbGVtZW50QXJyYXlbMF0pO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gcHJpbnRDb25maXJtICgpIHtcclxuICAgICAgICAobmV3IFNheShcIkNvbmZpcm1cIikpLmdldEhUTUwoXCJwXCIsIFtcImNob2ljZVwiXSkudGhlbihlbGVtZW50QXJyYXkgPT4ge1xyXG4gICAgICAgICAgICBlbGVtZW50QXJyYXlbMF0uYWRkRXZlbnRMaXN0ZW5lcihcImNsaWNrXCIsICgpID0+IHtcclxuICAgICAgICAgICAgICAgIHJlc29sdmVyKCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBDb250cm9scy5LZXlIYW5kbGVyLmFwcGx5Q29kZShlbGVtZW50QXJyYXlbMF0sIENvbnRyb2xzLktleUhhbmRsZXIuZ2V0U2Vjb25kS2V5Q29kZSgpKTtcclxuICAgICAgICAgICAgRWxlbWVudHMuQ3VycmVudFR1cm5IYW5kbGV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oY2NEaXYpO1xyXG4gICAgICAgIHByaW50VGFibGUoKTtcclxuICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIucHJpbnQoZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImJyXCIpKTtcclxuICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIucHJpbnQoZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImJyXCIpKTtcclxuICAgICAgICBwcmludENvbmZpcm0oKTtcclxuICAgIH1cclxuXHJcbiAgICBleHBvcnQgbGV0IENDT3JpZ2luID0gQ2hhcmFjdGVyQ3JlYXRpb24ucnVsZWJvb2suY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgbmFtZTogXCJDaGFyYWN0ZXIgQ3JlYXRpb24gLSBPcmlnaW5cIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5OiBSdWxlLlBSSU9SSVRZX01FRElVTSxcclxuICAgICAgICBwcmlvcml0eTogUnVsZS5QUklPUklUWV9ISUdILFxyXG4gICAgICAgIGNvZGU6IGFzeW5jICgpID0+IHtcclxuICAgICAgICAgICAgRWxlbWVudHMuc3RhcnRNZW51KCk7XHJcblxyXG4gICAgICAgICAgICBsZXQgcHJvbWlzZSA9IG5ldyBQcm9taXNlKHJlc29sdmUgPT4ge1xyXG4gICAgICAgICAgICAgICAgcmVzb2x2ZXIgPSByZXNvbHZlO1xyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIHJlc2V0KCk7XHJcblxyXG4gICAgICAgICAgICBhd2FpdCBwcm9taXNlO1xyXG5cclxuICAgICAgICAgICAgQ2hhcmFjdGVyQ3JlYXRpb24uZ2V0T3JpZ2luKCkuY29uZmlybVBpY2tlZCgpO1xyXG5cclxuICAgICAgICAgICAgRWxlbWVudHMuZW5kTWVudSgpO1xyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG59IiwibW9kdWxlIENoYXJhY3RlckNyZWF0aW9uIHtcclxuIC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0IHBlcmsgPSBwZXJrc1tpXTtcclxuICAgICAgICAgICAgbGV0IHNheSA9IG5ldyBTYXkocGVyay5uYW1lKTtcclxuICAgICAgICAgICAgaWYgKHBlcmsuaXNFbmFibGVkKCkpIHtcclxuICAgICAgICAgICAgICAgIGlmIChwZXJrLmlzRm9yY2VkKCkpIHtcclxuICAgICAgICAgICAgICAgICAgICBzYXkuYWRkIChcIiAoTWFuZGF0b3J5KVwiKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2F5LmFkZChcIiAtIFNlbGVjdGVkXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHBlcmsuaXNGb3JjZWQoKSkge1xyXG4gICAgICAgICAgICAgICAgc2F5LmFkZChcIiAoRm9yYmlkZGVuKVwiKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBhd2FpdCAoc2F5KS5nZXRIVE1MKFwicFwiLCBbXCJjaG9pY2VcIl0pLnRoZW4oZWxlbWVudEFycmF5ID0+IHtcclxuICAgICAgICAgICAgICAgIENvbnRyb2xzLkxpbmtzLm1ha2VDdXN0b21MaW5rKGVsZW1lbnRBcnJheVswXSwge1xyXG4gICAgICAgICAgICAgICAgICAgIG1vdXNlb3ZlcjogKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBwcmludFBlcmsocGVyayk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICBtb3VzZW91dDogKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBlbXB0eVBlcmsoKTtcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIGNsaWNrOiAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghcGVyay5pc0ZvcmNlZCgpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwZXJrLnZhbHVlID0gIXBlcmsudmFsdWU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzZXQoKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIENvbnRyb2xzLktleUhhbmRsZXIuYXBwbHlDb2RlKGVsZW1lbnRBcnJheVswXSwgQ29udHJvbHMuS2V5SGFuZGxlci5nZXRTZWNvbmRLZXlDb2RlKCkpO1xyXG4gICAgICAgICAgICAgICAgbGVmdFNpZGUuYXBwZW5kQ2hpbGQoZWxlbWVudEFycmF5WzBdKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIHByaW50Q29uZmlybSAoKSB7XHJcbiAgICAgICAgKG5ldyBTYXkoXCJDb25maXJtXCIpKS5nZXRIVE1MKFwicFwiLCBbXCJjaG9pY2VcIl0pLnRoZW4oZWxlbWVudEFycmF5ID0+IHtcclxuICAgICAgICAgICAgZWxlbWVudEFycmF5WzBdLmFkZEV2ZW50TGlzdGVuZXIoXCJjbGlja1wiLCAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICByZXNvbHZlcigpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgQ29udHJvbHMuS2V5SGFuZGxlci5hcHBseUNvZGUoZWxlbWVudEFycmF5WzBdLCBDb250cm9scy5LZXlIYW5kbGVyLmdldFNlY29uZEtleUNvZGUoKSk7XHJcbiAgICAgICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci5wcmludChlbGVtZW50QXJyYXlbMF0pO1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGVtcHR5UGVyayAoKSB7XHJcbiAgICAgICAgd2hpbGUgKHJpZ2h0U2lkZS5maXJzdENoaWxkKSBy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AgICBuYW1lOiBcIkNoYXJhY3RlciBDcmVhdGlvbiAtIE9yaWdpblwiLFxyXG4gICAgICAgIGZpcnN0UHJpb3JpdHk6IFJ1bGUuUFJJT1JJVFlfTE9XLFxyXG4gICAgICAgIHByaW9yaXR5OiBSdWxlLlBSSU9SSVRZX0hJR0gsXHJcbiAgICAgICAgY29kZTogYXN5bmMgKCkgPT4ge1xyXG4gICAgICAgICAgICBFbGVtZW50cy5zdGFydE1lbnUoKTtcclxuXHJcbiAgICAgICAgICAgIGxldCBwcm9taXNlID0gbmV3IFByb21pc2UocmVzb2x2ZSA9PiB7XHJcbiAgICAgICAgICAgICAgICByZXNvbHZlciA9IHJlc29sdmU7XHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgcmVzZXQoKTtcclxuXHJcbiAgICAgICAgICAgIGF3YWl0IHByb21pc2U7XHJcblxyXG4gICAgICAgICAgICBsZXQgcGVya3MgPSBQZXJrLmdldFBlcmtzKCk7XHJcbiAgICAgICAgICAgIHBlcmtzLmZvckVhY2gocGVyayA9PiB7XHJcbiAgICAgICAgICAgICAgICBpZiAocGVyay5pc0VuYWJsZWQoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHBlcmsuY29uZmlybVBpY2tlZCgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIEVsZW1lbnRzLmVuZE1lbnUoKTtcclxuICAgICAgICB9XHJcbiAgICB9KTtcclxufSIsIm1vZHVsZSBDaGFyYWN0ZXJDcmVhdGlvbiB7XHJcbiAgICBpbnRlcmZhY2UgcmFuZ2VPcHRpb25zIHtcclxuICAgICAgICBsYWJlbD8gOiBzdHJpbmc7XHJcbiAgICAgICAgc2hvd1ZhbHVlPyA6IGJvb2xlYW47XHJcbiAgICAgICAgb25DaGFuZ2UgOiAodmFsdWUgOiBudW1iZXIsIGxhYmVsVmFsdWUgOiBUZXh0LCBpbnB1dCA6IEhUT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gICBwcmlvcml0eTogUnVsZS5QUklPUklUWV9ISUdILFxyXG4gICAgICAgIGNvZGUgOiAoKSA9PiB7XHJcbiAgICAgICAgICAgIEVsZW1lbnRzLnN0YXJ0TWVudSgpO1xyXG5cclxuICAgICAgICAgICAgbGV0IGNjRGl2ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImRpdlwiKTtcclxuICAgICAgICAgICAgY2NEaXYuaWQgPSBcImNoYXJhY3RlckNyZWF0aW9uXCI7XHJcblxyXG4gICAgICAgICAgICBsZXQgY2NMZWZ0ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImRpdlwiKTtcclxuICAgICAgICAgICAgY2NMZWZ0LmlkID0gXCJjY0xlZnRcIjtcclxuICAgICAgICAgICAgY2NEaXYuYXBwZW5kQ2hpbGQoY2NMZWZ0KTtcclxuXHJcbiAgICAgICAgICAgIGxldCBjY1JpZ2h0ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImRpdlwiKTtcclxuICAgICAgICAgICAgY2NSaWdodC5pZCA9IFwiY2NSaWdodFwiO1xyXG4gICAgICAgICAgICBjY0Rpdi5hcHBlbmRDaGlsZChjY1JpZ2h0KTtcclxuXHJcbiAgICAgICAgICAgIGxldCBvbkNoYW5nZSA9ICgpID0+IHtcclxuICAgICAgICAgICAgICAgIChuZXcgU2F5KFdvcmxkU3RhdGUucGxheWVyLmRlc2NyaXB0aW9uKSkuZ2V0SFRNTENvbnRlbnQoKS50aGVuKCh2YWx1ZSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKGNjUmlnaHQuZmlyc3RDaGlsZCkgY2NSaWdodC5yZW1vdmVDaGlsZChjY1JpZ2h0LmZpcnN0Q2hpbGQpO1xyXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlLmZvckVhY2godmFsID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2NSaWdodC5hcHBlbmRDaGlsZCh2YWwpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfSkpO1xyXG4gICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgY2NMZWZ0LmFwcGVuZENoaWxkKGNyZWF0ZVJhbmdlKHtcclxuICAgICAgICAgICAgICAgIG1pblZhbHVlIDogMCwgbWF4VmFsdWUgOiAxLCBzdGVwOiAxLCB2YWx1ZSA6IDAsIGxlZnRMYWJlbCA6IFwiTWFsZVwiLCByaWdodExhYmVsIDogXCJGZW1hbGVcIiwgdG9wTGFiZWwgOiBcIlNleFwiLFxyXG4gICAgICAgICAgICAgICAgb25DaGFuZ2UgOiAodmFsdWUgOiBudW1iZXIsIGxhYmVsVmFsdWUgOiBUZXh0LCBpbnB1dCA6IEhUTUxJbnB1dEVsZW1lbnQpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICBsYWJlbFZhbHVlLm5vZGVWYWx1ZSA9ICh2YWx1ZSA9PSAwID8gXCJNYWxlXCIgOiBcIkZlbWFsZVwiKTtcclxuICAgICAgICAgICAgICAgICAgICAoPEh1bWFub2lkPiBXb3JsZFN0YXRlLnBsYXllcikucmVtb3ZlR2VuZGVyZWRQYXJ0cygpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICh2YWx1ZSA9PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICg8SHVtYW5vaWQ+IFdvcmxkU3RhdGUucGxheWVyKS5hZGRNYWxlUGFydHMoKTtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAoPEh1bWFub2lkPiBXb3JsZFN0YXRlLnBsYXllcikuYWRkRmVtYWxlUGFydHMoKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gU29tZSBzdGF0cyBiZWNvbWUgZGlmZmVyZW50IHdoZXRoZXIgdGUgcGxheWVyIGlzIG1hbGUgb3IgZmVtYWxlLCBzbyB3ZSBoYXZlIHRvIHVwZGF0ZSB0aGVtIGFsbC5cclxuICAgICAgICAgICAgICAgICAgICBsZXQgb3RoZXJJbnB1dHMgPSBjY0Rpdi5nZXRFbGVtZW50c0J5VGFnTmFtZShcImlucHV0XCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgb3RoZXJJbnB1dHMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG90aGVySW5wdXQgPSBvdGhlcklucHV0c1tpXTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG90aGVySW5wdXQgIT0gaW5wdXQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG90aGVySW5wdXQuZGlzcGF0Y2hFdmVudChuZXcgRXZlbnQoXCJjaGFuZ2VcIikpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlKCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pKTtcclxuXHJcblxyXG5cclxuICAgICAgICAgICAgY2NMZWZ0LmFwcGVuZENoaWxkKGNyZWF0ZVJhbmdlKHtcclxuICAgICAgICAgICAgICAgIG1pblZhbHVlIDogMCwgbWF4VmFsdWUgOiA0LCBzdGVwOiAxLCB2YWx1ZSA6IDIsIGxlZnRMYWJlbCA6IFwiTWFzY3VsaW5lXCIsIHJpZ2h0TGFiZWwgOiBcIkZlbWluaW5lXCIsIHRvcExhYmVsIDogXCJHZW5kZXJcIixcclxuICAgICAgICAgICAgICAgIG9uQ2hhbmdlIDogKHZhbHVlIDogbnVtYmVyLCBsYWJlbFZhbHVlIDogVGV4dCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBuYW1lcyA9IFtcIk1hc2N1bGluZVwiLCBcIlNvbWV3aGF0IG1hc2N1bGluZVwiLCBcIkFuZHJvZ3lub3VzXCIsIFwiU29tZXdoYXQgZmVtaW5pbmVcIiwgXCJGZW1pbmluZVwiXTtcclxuICAgICAgICAgICAgICAgICAgICBsYWJlbFZhbHVlLm5vZGVWYWx1ZSA9IG5hbWVzW3ZhbHVlXTtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgcGxheWVyID0gKDxIdW1hbm9pZD4gV29ybGRTdGF0ZS5wbGF5ZXIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBpbnRlbmRlZFZhbHVlIDogbnVtYmVyO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChwbGF5ZXIuaXNNYWxlKCkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZhbHVlcyA9IFsxMCwgMjUsIDUwLCA1NSwgNjBdO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnRlbmRlZFZhbHVlID0gdmFsdWVzW3ZhbHVlXTtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmFsdWVzID0gWzM1LCA0MCwgNTAsIDY1LCA3NV07XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGludGVuZGVkVmFsdWUgPSB2YWx1ZXNbdmFsdWVdO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAoPEh1bWFub2lkPiBXb3JsZFN0YXRlLnBsYXllcikuc2V0R2VuZGVyVmFsdWUoaW50ZW5kZWRWYWx1ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgV29ybGRTdGF0ZS5wbGF5ZXIuc2V0U3RhdChBdHRyaWJ1dGVzLkdlbmRlcklkZW50aXR5LCBpbnRlbmRlZFZhbHVlKTtcclxuICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZSgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KSk7XHJcblxyXG4gICAgICAgICAgICBsZXQgc3RhdHNIZWFkZXIgPS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JbnRlbGxpZ2VuY2UpXHJcbiAgICAgICAgICAgICAgICAgICAgLSBwbGF5ZXIuZ2V0U3RhdChBdHRyaWJ1dGVzLkNoYXJtKTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAocmVtYWluaW5nIDwgMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlICs9IHJlbWFpbmluZztcclxuICAgICAgICAgICAgICAgICAgICByZW1haW5pbmcgPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgIGlucHV0LnZhbHVlID0gdmFsdWUudG9TdHJpbmcoKTtcclxuICAgICAgICAgICAgICAgICAgICBpbnB1dC5kaXNwYXRjaEV2ZW50KG5ldyBFdmVudChcImNoYW5nZVwiKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIHN0YXRzUmVtYWluaW5nLm5vZGVWYWx1ZSA9IChyZW1haW5pbmcgPT0gMCA/IFwiRG9uZVwiIDpcclxuICAgICAgICAgICAgICAgICAgICByZW1haW5pbmcgPiAxID8gcmVtYWluaW5nLnRvU3RyaW5nKCkgKyBcIiBwb2ludHMgcmVtYWluaW5nXCIgOlxyXG4gICAgICAgICAgICAgICAgICAgIHJlbWFpbmluZy50b1N0cmluZygpICsgXCIgcG9pbnQgcmVtYWluaW5nXCIpO1xyXG4gICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgY2NMZWZ0LmFwcGVuZENoaWxkKGNyZWF0ZVJhbmdlKHtcclxuICAgICAgICAgICAgICAgIG1pblZhbHVlIDogMSwgbWF4VmFsdWUgOiA1LCBzdGVwOiAxLCB2YWx1ZSA6IDIsIGxlZnRMYWJlbCA6IFwiLVwiLCByaWdodExhYmVsIDogXCIrXCIsIHRvcExhYmVsIDogXCJTdHJlbmd0aFwiLFxyXG4gICAgICAgICAgICAgICAgb25DaGFuZ2UgOiAodmFsdWUgOiBudW1iZXIsIGxhYmVsVmF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tcIiwgKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBFbGVtZW50cy5lbmRNZW51KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUoKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICBDb250cm9scy5LZXlIYW5kbGVyLmFwcGx5Q29kZShlbGVtZW50QXJyYXlbMF0sIENvbnRyb2xzLktleUhhbmRsZXIuZ2V0U2Vjb25kS2V5Q29kZSgpKTtcclxuICAgICAgICAgICAgICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIucHJpbnQoZWxlbWVudEFycmF5WzBdKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci5wcmludChjY0Rpdik7XHJcblxyXG4gICAgICAgICAgICByZXR1cm4gY3JlYXRpb25Eb25lO1xyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuXHJcbiAgICAvLyBUT0RPOiBQaWNrIG9yaWdpblxyXG4gICAgLy8gVE9ETzogUGljayBQZXJrc1xyXG59IiwibW9kdWxlIFBsYXlCZWdpbnMge1xyXG4gICAgZXhwb3J0IHZhciBMT0FEX0ZBSUxFRCA9IGZhbHNlO1xyXG4gICAgZXhwb3J0IHZhciBDT05USU5VRV9GQUlMRUQgPSBmYWxzZTtcclxuXHJcbiAgICBleHBvcnQgdmFyIEludHJvTWVudVJ1bGUgPSBQbGF5QmVnaW5zLnJ1bGVib29rLmNyZWF0ZUFuZEFkZFJ1bGUoe1xyXG4gICAgICAgIG5hbWUgOiBcIkludHJvIE1lbnUgUnVsZVwiLFxyXG4gICAgICAgIGZpcnN0UHJpb3JpdHkgOiBSdWxlLlBSSU9SSVRZX0hJR0hFU1QsXHJcbiAgICAgICAgcHJpb3JpdHkgOiBSdWxlLlBSSU9SSVRZX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