(() => { var __defProp = Object.defineProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; // desktop/log.js var log_exports = {}; __export(log_exports, { LogDebug: () => LogDebug, LogError: () => LogError, LogFatal: () => LogFatal, LogInfo: () => LogInfo, LogLevel: () => LogLevel, LogPrint: () => LogPrint, LogTrace: () => LogTrace, LogWarning: () => LogWarning, SetLogLevel: () => SetLogLevel }); function sendLogMessage(level, message) { window.WailsInvoke("L" + level + message); } function LogTrace(message) { sendLogMessage("T", message); } function LogPrint(message) { sendLogMessage("P", message); } function LogDebug(message) { sendLogMessage("D", message); } function LogInfo(message) { sendLogMessage("I", message); } function LogWarning(message) { sendLogMessage("W", message); } function LogError(message) { sendLogMessage("E", message); } function LogFatal(message) { sendLogMessage("F", message); } function SetLogLevel(loglevel) { sendLogMessage("S", loglevel); } var LogLevel = { TRACE: 1, DEBUG: 2, INFO: 3, WARNING: 4, ERROR: 5 }; // desktop/events.js var Listener = class { constructor(eventName, callback, maxCallbacks) { this.eventName = eventName; this.maxCallbacks = maxCallbacks || -1; this.Callback = (data) => { callback.apply(null, data); if (this.maxCallbacks === -1) { return false; } this.maxCallbacks -= 1; return this.maxCallbacks === 0; }; } }; var eventListeners = {}; function EventsOnMultiple(eventName, callback, maxCallbacks) { eventListeners[eventName] = eventListeners[eventName] || []; const thisListener = new Listener(eventName, callback, maxCallbacks); eventListeners[eventName].push(thisListener); return () => listenerOff(thisListener); } function EventsOn(eventName, callback) { return EventsOnMultiple(eventName, callback, -1); } function EventsOnce(eventName, callback) { return EventsOnMultiple(eventName, callback, 1); } function notifyListeners(eventData) { let eventName = eventData.name; const newEventListenerList = eventListeners[eventName]?.slice() || []; if (newEventListenerList.length) { for (let count = newEventListenerList.length - 1; count >= 0; count -= 1) { const listener = newEventListenerList[count]; let data = eventData.data; const destroy = listener.Callback(data); if (destroy) { newEventListenerList.splice(count, 1); } } if (newEventListenerList.length === 0) { removeListener(eventName); } else { eventListeners[eventName] = newEventListenerList; } } } function EventsNotify(notifyMessage) { let message; try { message = JSON.parse(notifyMessage); } catch (e) { const error = "Invalid JSON passed to Notify: " + notifyMessage; throw new Error(error); } notifyListeners(message); } function EventsEmit(eventName) { const payload = { name: eventName, data: [].slice.apply(arguments).slice(1) }; notifyListeners(payload); window.WailsInvoke("EE" + JSON.stringify(payload)); } function removeListener(eventName) { delete eventListeners[eventName]; window.WailsInvoke("EX" + eventName); } function EventsOff(eventName, ...additionalEventNames) { removeListener(eventName); if (additionalEventNames.length > 0) { additionalEventNames.forEach((eventName2) => { removeListener(eventName2); }); } } function listenerOff(listener) { const eventName = listener.eventName; eventListeners[eventName] = eventListeners[eventName].filter((l) => l !== listener); if (eventListeners[eventName].length === 0) { removeListener(eventName); } } // desktop/calls.js var callbacks = {}; function cryptoRandom() { var array = new Uint32Array(1); return window.crypto.getRandomValues(array)[0]; } function basicRandom() { return Math.random() * 9007199254740991; } var randomFunc; if (window.crypto) { randomFunc = cryptoRandom; } else { randomFunc = basicRandom; } function Call(name, args, timeout) { if (timeout == null) { timeout = 0; } return new Promise(function(resolve, reject) { var callbackID; do { callbackID = name + "-" + randomFunc(); } while (callbacks[callbackID]); var timeoutHandle; if (timeout > 0) { timeoutHandle = setTimeout(function() { reject(Error("Call to " + name + " timed out. Request ID: " + callbackID)); }, timeout); } callbacks[callbackID] = { timeoutHandle, reject, resolve }; try { const payload = { name, args, callbackID }; window.WailsInvoke("C" + JSON.stringify(payload)); } catch (e) { console.error(e); } }); } window.ObfuscatedCall = (id, args, timeout) => { if (timeout == null) { timeout = 0; } return new Promise(function(resolve, reject) { var callbackID; do { callbackID = id + "-" + randomFunc(); } while (callbacks[callbackID]); var timeoutHandle; if (timeout > 0) { timeoutHandle = setTimeout(function() { reject(Error("Call to method " + id + " timed out. Request ID: " + callbackID)); }, timeout); } callbacks[callbackID] = { timeoutHandle, reject, resolve }; try { const payload = { id, args, callbackID }; window.WailsInvoke("c" + JSON.stringify(payload)); } catch (e) { console.error(e); } }); }; function Callback(incomingMessage) { let message; try { message = JSON.parse(incomingMessage); } catch (e) { const error = `Invalid JSON passed to callback: ${e.message}. Message: ${incomingMessage}`; runtime.LogDebug(error); throw new Error(error); } let callbackID = message.callbackid; let callbackData = callbacks[callbackID]; if (!callbackData) { const error = `Callback '${callbackID}' not registered!!!`; console.error(error); throw new Error(error); } clearTimeout(callbackData.timeoutHandle); delete callbacks[callbackID]; if (message.error) { callbackData.reject(message.error); } else { callbackData.resolve(message.result); } } // desktop/bindings.js window.go = {}; function SetBindings(bindingsMap) { try { bindingsMap = JSON.parse(bindingsMap); } catch (e) { console.error(e); } window.go = window.go || {}; Object.keys(bindingsMap).forEach((packageName) => { window.go[packageName] = window.go[packageName] || {}; Object.keys(bindingsMap[packageName]).forEach((structName) => { window.go[packageName][structName] = window.go[packageName][structName] || {}; Object.keys(bindingsMap[packageName][structName]).forEach((methodName) => { window.go[packageName][structName][methodName] = function() { let timeout = 0; function dynamic() { const args = [].slice.call(arguments); return Call([packageName, structName, methodName].join("."), args, timeout); } dynamic.setTimeout = function(newTimeout) { timeout = newTimeout; }; dynamic.getTimeout = function() { return timeout; }; return dynamic; }(); }); }); }); } // desktop/window.js var window_exports = {}; __export(window_exports, { WindowCenter: () => WindowCenter, WindowFullscreen: () => WindowFullscreen, WindowGetPosition: () => WindowGetPosition, WindowGetSize: () => WindowGetSize, WindowHide: () => WindowHide, WindowIsFullscreen: () => WindowIsFullscreen, WindowIsMaximised: () => WindowIsMaximised, WindowIsMinimised: () => WindowIsMinimised, WindowIsNormal: () => WindowIsNormal, WindowMaximise: () => WindowMaximise, WindowMinimise: () => WindowMinimise, WindowReload: () => WindowReload, WindowReloadApp: () => WindowReloadApp, WindowSetAlwaysOnTop: () => WindowSetAlwaysOnTop, WindowSetBackgroundColour: () => WindowSetBackgroundColour, WindowSetDarkTheme: () => WindowSetDarkTheme, WindowSetLightTheme: () => WindowSetLightTheme, WindowSetMaxSize: () => WindowSetMaxSize, WindowSetMinSize: () => WindowSetMinSize, WindowSetPosition: () => WindowSetPosition, WindowSetSize: () => WindowSetSize, WindowSetSystemDefaultTheme: () => WindowSetSystemDefaultTheme, WindowSetTitle: () => WindowSetTitle, WindowShow: () => WindowShow, WindowToggleMaximise: () => WindowToggleMaximise, WindowUnfullscreen: () => WindowUnfullscreen, WindowUnmaximise: () => WindowUnmaximise, WindowUnminimise: () => WindowUnminimise }); function WindowReload() { window.location.reload(); } function WindowReloadApp() { window.WailsInvoke("WR"); } function WindowSetSystemDefaultTheme() { window.WailsInvoke("WASDT"); } function WindowSetLightTheme() { window.WailsInvoke("WALT"); } function WindowSetDarkTheme() { window.WailsInvoke("WADT"); } function WindowCenter() { window.WailsInvoke("Wc"); } function WindowSetTitle(title) { window.WailsInvoke("WT" + title); } function WindowFullscreen() { window.WailsInvoke("WF"); } function WindowUnfullscreen() { window.WailsInvoke("Wf"); } function WindowIsFullscreen() { return Call(":wails:WindowIsFullscreen"); } function WindowSetSize(width, height) { window.WailsInvoke("Ws:" + width + ":" + height); } function WindowGetSize() { return Call(":wails:WindowGetSize"); } function WindowSetMaxSize(width, height) { window.WailsInvoke("WZ:" + width + ":" + height); } function WindowSetMinSize(width, height) { window.WailsInvoke("Wz:" + width + ":" + height); } function WindowSetAlwaysOnTop(b) { window.WailsInvoke("WATP:" + (b ? "1" : "0")); } function WindowSetPosition(x, y) { window.WailsInvoke("Wp:" + x + ":" + y); } function WindowGetPosition() { return Call(":wails:WindowGetPos"); } function WindowHide() { window.WailsInvoke("WH"); } function WindowShow() { window.WailsInvoke("WS"); } function WindowMaximise() { window.WailsInvoke("WM"); } function WindowToggleMaximise() { window.WailsInvoke("Wt"); } function WindowUnmaximise() { window.WailsInvoke("WU"); } function WindowIsMaximised() { return Call(":wails:WindowIsMaximised"); } function WindowMinimise() { window.WailsInvoke("Wm"); } function WindowUnminimise() { window.WailsInvoke("Wu"); } function WindowIsMinimised() { return Call(":wails:WindowIsMinimised"); } function WindowIsNormal() { return Call(":wails:WindowIsNormal"); } function WindowSetBackgroundColour(R, G, B, A) { let rgba = JSON.stringify({ r: R || 0, g: G || 0, b: B || 0, a: A || 255 }); window.WailsInvoke("Wr:" + rgba); } // desktop/screen.js var screen_exports = {}; __export(screen_exports, { ScreenGetAll: () => ScreenGetAll }); function ScreenGetAll() { return Call(":wails:ScreenGetAll"); } // desktop/browser.js var browser_exports = {}; __export(browser_exports, { BrowserOpenURL: () => BrowserOpenURL }); function BrowserOpenURL(url) { window.WailsInvoke("BO:" + url); } // desktop/clipboard.js var clipboard_exports = {}; __export(clipboard_exports, { ClipboardGetText: () => ClipboardGetText, ClipboardSetText: () => ClipboardSetText }); function ClipboardSetText(text) { return Call(":wails:ClipboardSetText", [text]); } function ClipboardGetText() { return Call(":wails:ClipboardGetText"); } // desktop/draganddrop.js var draganddrop_exports = {}; __export(draganddrop_exports, { CanResolveFilePaths: () => CanResolveFilePaths, OnFileDrop: () => OnFileDrop, OnFileDropOff: () => OnFileDropOff, ResolveFilePaths: () => ResolveFilePaths }); var flags = { registered: false, defaultUseDropTarget: true, useDropTarget: true, nextDeactivate: null, nextDeactivateTimeout: null }; var DROP_TARGET_ACTIVE = "wails-drop-target-active"; function checkStyleDropTarget(style) { const cssDropValue = style.getPropertyValue(window.wails.flags.cssDropProperty).trim(); if (cssDropValue) { if (cssDropValue === window.wails.flags.cssDropValue) { return true; } return false; } return false; } function onDragOver(e) { if (!window.wails.flags.enableWailsDragAndDrop) { return; } e.preventDefault(); if (!flags.useDropTarget) { return; } const element = e.target; if (flags.nextDeactivate) flags.nextDeactivate(); if (!element || !checkStyleDropTarget(getComputedStyle(element))) { return; } let currentElement = element; while (currentElement) { if (checkStyleDropTarget(currentElement.style)) { currentElement.classList.add(DROP_TARGET_ACTIVE); } currentElement = currentElement.parentElement; } } function onDragLeave(e) { if (!window.wails.flags.enableWailsDragAndDrop) { return; } e.preventDefault(); if (!flags.useDropTarget) { return; } if (!e.target || !checkStyleDropTarget(getComputedStyle(e.target))) { return null; } if (flags.nextDeactivate) flags.nextDeactivate(); flags.nextDeactivate = () => { Array.from(document.getElementsByClassName(DROP_TARGET_ACTIVE)).forEach((el) => el.classList.remove(DROP_TARGET_ACTIVE)); flags.nextDeactivate = null; if (flags.nextDeactivateTimeout) { clearTimeout(flags.nextDeactivateTimeout); flags.nextDeactivateTimeout = null; } }; flags.nextDeactivateTimeout = setTimeout(() => { if (flags.nextDeactivate) flags.nextDeactivate(); }, 50); } function onDrop(e) { if (!window.wails.flags.enableWailsDragAndDrop) { return; } e.preventDefault(); if (CanResolveFilePaths()) { let files = []; if (e.dataTransfer.items) { files = [...e.dataTransfer.items].map((item, i) => { if (item.kind === "file") { return item.getAsFile(); } }); } else { files = [...e.dataTransfer.files]; } window.runtime.ResolveFilePaths(e.x, e.y, files); } if (!flags.useDropTarget) { return; } if (flags.nextDeactivate) flags.nextDeactivate(); Array.from(document.getElementsByClassName(DROP_TARGET_ACTIVE)).forEach((el) => el.classList.remove(DROP_TARGET_ACTIVE)); } function CanResolveFilePaths() { return window.chrome?.webview?.postMessageWithAdditionalObjects != null; } function ResolveFilePaths(x, y, files) { if (window.chrome?.webview?.postMessageWithAdditionalObjects) { chrome.webview.postMessageWithAdditionalObjects(`file:drop:${x}:${y}`, files); } } function OnFileDrop(callback, useDropTarget) { if (typeof callback !== "function") { console.error("DragAndDropCallback is not a function"); return; } if (flags.registered) { return; } flags.registered = true; const uDTPT = typeof useDropTarget; flags.useDropTarget = uDTPT === "undefined" || uDTPT !== "boolean" ? flags.defaultUseDropTarget : useDropTarget; window.addEventListener("dragover", onDragOver); window.addEventListener("dragleave", onDragLeave); window.addEventListener("drop", onDrop); let cb = callback; if (flags.useDropTarget) { cb = function(x, y, paths) { const element = document.elementFromPoint(x, y); if (!element || !checkStyleDropTarget(getComputedStyle(element))) { return null; } callback(x, y, paths); }; } EventsOn("wails:file-drop", cb); } function OnFileDropOff() { window.removeEventListener("dragover", onDragOver); window.removeEventListener("dragleave", onDragLeave); window.removeEventListener("drop", onDrop); EventsOff("wails:file-drop"); flags.registered = false; } // desktop/contextmenu.js function processDefaultContextMenu(event) { const element = event.target; const computedStyle = window.getComputedStyle(element); const defaultContextMenuAction = computedStyle.getPropertyValue("--default-contextmenu").trim(); switch (defaultContextMenuAction) { case "show": return; case "hide": event.preventDefault(); return; default: if (element.isContentEditable) { return; } const selection = window.getSelection(); const hasSelection = selection.toString().length > 0; if (hasSelection) { for (let i = 0; i < selection.rangeCount; i++) { const range = selection.getRangeAt(i); const rects = range.getClientRects(); for (let j = 0; j < rects.length; j++) { const rect = rects[j]; if (document.elementFromPoint(rect.left, rect.top) === element) { return; } } } } if (element.tagName === "INPUT" || element.tagName === "TEXTAREA") { if (hasSelection || !element.readOnly && !element.disabled) { return; } } event.preventDefault(); } } // desktop/main.js function Quit() { window.WailsInvoke("Q"); } function Show() { window.WailsInvoke("S"); } function Hide() { window.WailsInvoke("H"); } function Environment() { return Call(":wails:Environment"); } window.runtime = { ...log_exports, ...window_exports, ...browser_exports, ...screen_exports, ...clipboard_exports, ...draganddrop_exports, EventsOn, EventsOnce, EventsOnMultiple, EventsEmit, EventsOff, Environment, Show, Hide, Quit }; window.wails = { Callback, EventsNotify, SetBindings, eventListeners, callbacks, flags: { disableScrollbarDrag: false, disableDefaultContextMenu: false, enableResize: false, defaultCursor: null, borderThickness: 6, shouldDrag: false, deferDragToMouseMove: true, cssDragProperty: "--wails-draggable", cssDragValue: "drag", cssDropProperty: "--wails-drop-target", cssDropValue: "drop", enableWailsDragAndDrop: false } }; if (window.wailsbindings) { window.wails.SetBindings(window.wailsbindings); delete window.wails.SetBindings; } if (false) { delete window.wailsbindings; } var dragTest = function(e) { var val = window.getComputedStyle(e.target).getPropertyValue(window.wails.flags.cssDragProperty); if (val) { val = val.trim(); } if (val !== window.wails.flags.cssDragValue) { return false; } if (e.buttons !== 1) { return false; } if (e.detail !== 1) { return false; } return true; }; window.wails.setCSSDragProperties = function(property, value) { window.wails.flags.cssDragProperty = property; window.wails.flags.cssDragValue = value; }; window.wails.setCSSDropProperties = function(property, value) { window.wails.flags.cssDropProperty = property; window.wails.flags.cssDropValue = value; }; window.addEventListener("mousedown", (e) => { if (window.wails.flags.resizeEdge) { window.WailsInvoke("resize:" + window.wails.flags.resizeEdge); e.preventDefault(); return; } if (dragTest(e)) { if (window.wails.flags.disableScrollbarDrag) { if (e.offsetX > e.target.clientWidth || e.offsetY > e.target.clientHeight) { return; } } if (window.wails.flags.deferDragToMouseMove) { window.wails.flags.shouldDrag = true; } else { e.preventDefault(); window.WailsInvoke("drag"); } return; } else { window.wails.flags.shouldDrag = false; } }); window.addEventListener("mouseup", () => { window.wails.flags.shouldDrag = false; }); function setResize(cursor) { document.documentElement.style.cursor = cursor || window.wails.flags.defaultCursor; window.wails.flags.resizeEdge = cursor; } window.addEventListener("mousemove", function(e) { if (window.wails.flags.shouldDrag) { window.wails.flags.shouldDrag = false; let mousePressed = e.buttons !== void 0 ? e.buttons : e.which; if (mousePressed > 0) { window.WailsInvoke("drag"); return; } } if (!window.wails.flags.enableResize) { return; } if (window.wails.flags.defaultCursor == null) { window.wails.flags.defaultCursor = document.documentElement.style.cursor; } if (window.outerWidth - e.clientX < window.wails.flags.borderThickness && window.outerHeight - e.clientY < window.wails.flags.borderThickness) { document.documentElement.style.cursor = "se-resize"; } let rightBorder = window.outerWidth - e.clientX < window.wails.flags.borderThickness; let leftBorder = e.clientX < window.wails.flags.borderThickness; let topBorder = e.clientY < window.wails.flags.borderThickness; let bottomBorder = window.outerHeight - e.clientY < window.wails.flags.borderThickness; if (!leftBorder && !rightBorder && !topBorder && !bottomBorder && window.wails.flags.resizeEdge !== void 0) { setResize(); } else if (rightBorder && bottomBorder) setResize("se-resize"); else if (leftBorder && bottomBorder) setResize("sw-resize"); else if (leftBorder && topBorder) setResize("nw-resize"); else if (topBorder && rightBorder) setResize("ne-resize"); else if (leftBorder) setResize("w-resize"); else if (topBorder) setResize("n-resize"); else if (bottomBorder) setResize("s-resize"); else if (rightBorder) setResize("e-resize"); }); window.addEventListener("contextmenu", function(e) { if (true) return; if (window.wails.flags.disableDefaultContextMenu) { e.preventDefault(); } else { processDefaultContextMenu(e); } }); window.WailsInvoke("runtime:ready"); })(); //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiZGVza3RvcC9sb2cuanMiLCAiZGVza3RvcC9ldmVudHMuanMiLCAiZGVza3RvcC9jYWxscy5qcyIsICJkZXNrdG9wL2JpbmRpbmdzLmpzIiwgImRlc2t0b3Avd2luZG93LmpzIiwgImRlc2t0b3Avc2NyZWVuLmpzIiwgImRlc2t0b3AvYnJvd3Nlci5qcyIsICJkZXNrdG9wL2NsaXBib2FyZC5qcyIsICJkZXNrdG9wL2RyYWdhbmRkcm9wLmpzIiwgImRlc2t0b3AvY29udGV4dG1lbnUuanMiLCAiZGVza3RvcC9tYWluLmpzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyIvKlxyXG4gXyAgICAgICBfXyAgICAgIF8gX19cclxufCB8ICAgICAvIC9fX18gXyhfKSAvX19fX1xyXG58IHwgL3wgLyAvIF9fIGAvIC8gLyBfX18vXHJcbnwgfC8gfC8gLyAvXy8gLyAvIChfXyAgKVxyXG58X18vfF9fL1xcX18sXy9fL18vX19fXy9cclxuVGhlIGVsZWN0cm9uIGFsdGVybmF0aXZlIGZvciBHb1xyXG4oYykgTGVhIEFudGhvbnkgMjAxOS1wcmVzZW50XHJcbiovXHJcblxyXG4vKiBqc2hpbnQgZXN2ZXJzaW9uOiA2ICovXHJcblxyXG4vKipcclxuICogU2VuZHMgYSBsb2cgbWVzc2FnZSB0byB0aGUgYmFja2VuZCB3aXRoIHRoZSBnaXZlbiBsZXZlbCArIG1lc3NhZ2VcclxuICpcclxuICogQHBhcmFtIHtzdHJpbmd9IGxldmVsXHJcbiAqIEBwYXJhbSB7c3RyaW5nfSBtZXNzYWdlXHJcbiAqL1xyXG5mdW5jdGlvbiBzZW5kTG9nTWVzc2FnZShsZXZlbCwgbWVzc2F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XG4gICAgICogQHBhcmFtIHtudW1iZXJ9IG1heENhbGxiYWNrc1xyXG4gICAgICogQG1lbWJlcm9mIExpc3RlbmVyXHJcbiAgICAgKi9cclxuICAgIGNvbnN0cnVjdG9yKGV2ZW50TmFtZSwgY2FsbGJhY2ssIG1heENhbGxiYWNrcykge1xyXG4gICAgICAgIHRoaXMuZXZlbnROYW1lID0gZXZlbnROYW1lO1xyXG4gICAgICAgIC8vIERlZmF1bHQgb2YgLTEgbWVhbnMgaW5maW5pdGVcclxuICAgICAgICB0aGlzLm1heENhbGxiYWNrcyA9IG1heENhbGxiYWNrcyB8fCAtMTtcclxuICAgICAgICAvLyBDYWxsYmFjayBpbnZva2VzIHRoZSBjYWxsYmFjayB3aXRoIHRoZSBnaXZlbiBkYXRhXHJcbiAgICAgICAgLy8gUmV0dXJucyB0cnVlIGlmIHRoaXMgbGlzdGVuZXIgc2hvdWxkIGJlIGRlc3Ryb3llZFxyXG4gICAgICAgIHRoaXMuQ2FsbGJhY2sgPSAoZGF0YSkgPT4ge1xyXG4gICAgICAgICAgICBjYWxsYmFjay5hcHBseShudWxsLCBkYXRhKTtcclxuICAgICAgICAgICAgLy8gSWYgbWF4Q2FsbGJhY2tzIGlzIGluZmluaXRlLCByZXR1cm4gZmFsc2UgKGRvIG5vdCBkZXN0cm95KVxyXG4gICAgICAgICAgICBpZiAodGhpcy5tYXhDYWxsYmFja3MgPT09IC0xKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgLy8gRGVjcmVtZW50IG1heENhbGxiYWNrcy4gUmV0dXJuIHRydWUgaWYgbm93IDAsIG90aGVyd2lzZSBmYWxzZVxyXG4gICAgICAgICAgICB0aGlzLm1heENhbGxiYWNrcyAtPSAxO1xyXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5tYXhDYWxsYmFja3MgPT09IDA7XHJcbiAgICAgICAgfTtcclxuICAgIH1cclxufVxyXG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ENvbnRleHRNZW51QWN0aW9uKSB7XHJcbiAgICAgICAgY2FzZSBcInNob3dcIjpcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIGNhc2UgXCJoaWRlXCI6XHJcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICBkZWZhdWx0OlxyXG4gICAgICAgICAgICAvLyBDaGVjayBpZiBjb250ZW50RWRpdGFibGUgaXMgdHJ1ZVxyXG4gICAgICAgICAgICBpZiAoZWxlbWVudC5pc0NvbnRlbnRFZGl0YWJsZSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvLyBDaGVjayBpZiB0ZXh0IGhhcyBiZWVuIHNlbGVjdGVkIGFuZCBhY3Rpb24gaXMgb24gdGhlIHNlbGVjdGVkIGVsZW1lbnRzXHJcbiAgICAgICAgICAgIGNvbnN0IHNlbGVjdGlvbiA9IHdpbmRvdy5nZXRTZWxlY3Rpb24oKTtcclxuICAgICAgICAgICAgY29uc3QgaGFzU2VsZWN0aW9uID0gKHNlbGVjdGlvbi50b1N0cmluZygpLmxlbmd0aCA+IDApXHJcbiAgICAgICAgICAgIGlmIChoYXNTZWxlY3Rpb24pIHtcclxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgc2VsZWN0aW9uLnJhbmdlQ291bnQ7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJhbmdlID0gc2VsZWN0aW9uLmdldFJhbmdlQXQoaSk7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVjdHMgPSByYW5nZS5nZXRDbGllbnRSZWN0cygpO1xyXG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGogPSAwOyBqIDwgcmVjdHMubGVuZ3RoOyBqKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVjdCA9IHJlY3RzW2pdO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZG9jdW1lbnQuZWxlbWVudEZyb21Qb2ludChyZWN0LmxlZnQsIHJlY3QudG9wKSA9PT0gZWxlbWVudCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIC8vIENoZWNrIGlmIHRhZ25hbWUgaXMgaW5wdXQgb3IgdGV4dGFyZWFcclxuICAgICAgICAgICAgaWYgKGVsZW1lbnQudGFnTmFtZSA9PT0gXCJJTlBVVFwiIHx8IGVsZW1lbnQudGFnTmFtZSA9PT0gXCJURVhUQVJFQVwiKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoaGFzU2VsZWN0aW9uIHx8ICghZWxlbWVudC5yZWFkT25seSAmJiAhZWxlbWVudC5kaXNhYmxlZCkpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIC8vIGhpZGUgZGVmYXVsdCBjb250ZXh0IG1lbnVcclxuICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcclxuICAgIH1cclxufVxyXG4iLCAiLypcclxuIF9cdCAgIF9fXHQgIF8gX19cclxufCB8XHQgLyAvX19fIF8oXykgL19fX19cclxufCB8IC98IC8gLyBfXyBgLyAvIC8gX19fL1xyXG58IHwvIHwvIC8gL18vIC8gLyAoX18gIClcclxufF9fL3xfXy9cXF9fLF8vXy9fL19fX18vXHJcblRoZSBlbGVjdHJvbiBhbHRlcm5hdGl2ZSBmb3IgR29cclxuKGMpIExlYSBBbnRob255IDIwMTktcHJlc2VudFxyXG4qL1xyXG4vKiBqc2h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yXG4gICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICByZXR1cm47XHJcbiAgICB9XHJcblxyXG4gICAgaWYgKGRyYWdUZXN0KGUpKSB7XHJcbiAgICAgICAgaWYgKHdpbmRvdy53YWlscy5mbGFncy5kaXNhYmxlU2Nyb2xsYmFyRHJhZykge1xyXG4gICAgICAgICAgICAvLyBUaGlzIGNoZWNrcyBmb3IgY2xpY2tzIG9uIHRoZSBzY3JvbGwgYmFyXHJcbiAgICAgICAgICAgIGlmIChlLm9mZnNldFggPiBlLnRhcmdldC5jbGllbnRXaWR0aCB8fCBlLm9mZnNldFkgPiBlLnRhcmdldC5jbGllbnRIZWlnaHQpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAod2luZG93LndhaWxzLmZsYWdzLmRlZmVyRHJhZ1RvTW91c2VNb3ZlKSB7XHJcbiAgICAgICAgICAgIHdpbmRvdy53YWlscy5mbGFncy5zaG91bGREcmFnID0gdHJ1ZTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KClcclxuICAgICAgICAgICAgd2luZG93LldhaWxzSW52b2tlKFwiZHJhZ1wiKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuO1xyXG4gICAgfSBlbHNlIHtcclxuICAgICAgICB3aW5kb3cud2FpbHMuZmxhZ3Muc2hvdWxkRHJhZyA9IGZhbHNlO1xyXG4gICAgfVxyXG59KTtcclxuXHJcbndpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdtb3VzZXVwJywgKCkgPT4ge1xyXG4gICAgd2luZG93LndhaWxzLmZsYWdzLnNob3VsZERyYWcgPSBmYWxzZTtcclxufSk7XHJcblxyXG5mdW5jdGlvbiBzZXRSZXNpemUoY3Vyc29yKSB7XHJcbiAgICBkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQuc3R5bG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