diff --git a/.gitignore b/.gitignore index 843e421..419fe04 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,7 @@ node_modules # Don't include the compiled main.js file in the repo. # They should be uploaded to GitHub releases instead. -./main.js +/main.js # Exclude sourcemaps *.map diff --git a/main.js b/main.js deleted file mode 100644 index 7475a3a..0000000 --- a/main.js +++ /dev/null @@ -1,560 +0,0 @@ -/* -THIS IS A GENERATED/BUNDLED FILE BY ESBUILD -if you want to view the source, please visit the github repository of this plugin -*/ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); -var __export = (target, all) => { - __markAsModule(target); - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __reExport = (target, module2, desc) => { - if (module2 && typeof module2 === "object" || typeof module2 === "function") { - for (let key of __getOwnPropNames(module2)) - if (!__hasOwnProp.call(target, key) && key !== "default") - __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); - } - return target; -}; -var __toModule = (module2) => { - return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); -}; -var __async = (__this, __arguments, generator) => { - return new Promise((resolve, reject) => { - var fulfilled = (value) => { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - }; - var rejected = (value) => { - try { - step(generator.throw(value)); - } catch (e) { - reject(e); - } - }; - var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); - step((generator = generator.apply(__this, __arguments)).next()); - }); -}; - -// src/main.ts -__export(exports, { - default: () => CustomFramesPlugin -}); -var import_obsidian4 = __toModule(require("obsidian")); - -// src/frame.ts -var import_obsidian = __toModule(require("obsidian")); - -// src/settings.ts -var defaultSettings = { - frames: [], - padding: 5 -}; -var presets = { - "obsidian": { - url: "https://forum.obsidian.md/", - displayName: "Obsidian Forum", - icon: "edit", - hideOnMobile: true, - addRibbonIcon: true, - openInCenter: true, - zoomLevel: 1, - forceIframe: false, - customCss: "" - }, - "detexify": { - url: "https://detexify.kirelabs.org/classify.html", - displayName: "Detexify", - icon: "type", - hideOnMobile: true, - addRibbonIcon: true, - openInCenter: false, - zoomLevel: 0.95, - forceIframe: false, - customCss: `/* hide info clutter and ad banner */ -#classify--info-area, -.adsbygoogle { - display: none !important -}` - }, - "calendar": { - url: "https://calendar.google.com/calendar/u/0/r/day", - displayName: "Google Calendar", - icon: "calendar", - hideOnMobile: true, - addRibbonIcon: true, - openInCenter: true, - zoomLevel: 1, - forceIframe: false, - customCss: `/* hide right-side menu, and some buttons */ -div.d6McF, -div.pw6cBb, -div.gb_Td.gb_Va.gb_Id, -div.Kk7lMc-QWPxkf-LgbsSe-haAclf, -div.h8Aqhb, -div.gboEAb, -div.dwlvNd { - display: none !important; -}` - }, - "keep": { - url: "https://keep.google.com", - displayName: "Google Keep", - icon: "files", - hideOnMobile: true, - addRibbonIcon: false, - openInCenter: false, - zoomLevel: 1, - forceIframe: false, - customCss: `/* hide the menu bar and the "Keep" text */ -html > body > div:nth-child(2) > div:nth-child(2) > div:first-child, -html > body > div:first-child > header:first-child > div > div:first-child > div > div:first-child > a:first-child > span { - display: none !important; -}` - }, - "todoist": { - url: "https://todoist.com", - displayName: "Todoist", - icon: "list-checks", - hideOnMobile: true, - addRibbonIcon: false, - openInCenter: false, - zoomLevel: 1, - forceIframe: false, - customCss: `/* hide the help, home, search, and productivity overview buttons, create extra space, and prevent toast pop-up from acting weird */ -[aria-label="Go to Home view"], #quick_find, [aria-label="Productivity"], [aria-label="Help & Feedback"] { - display: none !important; -} - -.view_content { - padding-left: 15px; -} - -.view_header { - padding-left: 15px; - padding-top: 10px; -} - -.undo_toast { - width: 95%; -}` - }, - "notion": { - url: "https://www.notion.so/", - displayName: "Notion", - icon: "box", - hideOnMobile: true, - addRibbonIcon: true, - openInCenter: true, - zoomLevel: 1, - forceIframe: false, - customCss: "" - }, - "twitter": { - url: "https://twitter.com", - displayName: "Twitter", - icon: "twitter", - hideOnMobile: true, - addRibbonIcon: false, - openInCenter: false, - zoomLevel: 1, - forceIframe: false, - customCss: "" - } -}; -function getIcon(settings) { - return settings.icon ? `lucide-${settings.icon}` : "documents"; -} -function getId(settings) { - return settings.displayName.toLowerCase().replace(/\s/g, "-"); -} - -// src/frame.ts -var CustomFrame = class { - constructor(settings, data) { - this.settings = settings; - this.data = data; - } - create(additionalStyle = void 0, urlSuffix = void 0) { - let style = `padding: ${this.settings.padding}px;`; - if (additionalStyle) - style += additionalStyle; - if (import_obsidian.Platform.isDesktopApp && !this.data.forceIframe) { - this.frame = document.createElement("webview"); - this.frame.setAttribute("allowpopups", ""); - this.frame.addEventListener("dom-ready", () => { - this.frame.setZoomFactor(this.data.zoomLevel); - this.frame.insertCSS(this.data.customCss); - }); - } else { - this.frame = document.createElement("iframe"); - this.frame.setAttribute("sandbox", "allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts allow-top-navigation-by-user-activation"); - this.frame.setAttribute("allow", "encrypted-media; fullscreen; oversized-images; picture-in-picture; sync-xhr; geolocation;"); - style += `transform: scale(${this.data.zoomLevel}); transform-origin: 0 0;`; - } - this.frame.addClass("custom-frames-frame"); - this.frame.addClass(`custom-frames-${getId(this.data)}`); - this.frame.setAttribute("style", style); - let src = this.data.url; - if (urlSuffix) { - if (!urlSuffix.startsWith("/")) - src += "/"; - src += urlSuffix; - } - this.frame.setAttribute("src", src); - return this.frame; - } - refresh() { - if (this.frame instanceof HTMLIFrameElement) { - this.frame.contentWindow.location.reload(); - } else { - this.frame.reload(); - } - } - return() { - if (this.frame instanceof HTMLIFrameElement) { - this.frame.contentWindow.open(this.data.url); - } else { - this.frame.loadURL(this.data.url); - } - } - goBack() { - if (this.frame instanceof HTMLIFrameElement) { - this.frame.contentWindow.history.back(); - } else { - this.frame.goBack(); - } - } - goForward() { - if (this.frame instanceof HTMLIFrameElement) { - this.frame.contentWindow.history.forward(); - } else { - this.frame.goForward(); - } - } - toggleDevTools() { - if (!(this.frame instanceof HTMLIFrameElement)) { - if (!this.frame.isDevToolsOpened()) { - this.frame.openDevTools(); - } else { - this.frame.closeDevTools(); - } - } - } - getCurrentUrl() { - return this.frame instanceof HTMLIFrameElement ? this.frame.contentWindow.location.href : this.frame.getURL(); - } -}; - -// src/settings-tab.ts -var import_obsidian2 = __toModule(require("obsidian")); -var CustomFramesSettingTab = class extends import_obsidian2.PluginSettingTab { - constructor(app, plugin) { - super(app, plugin); - this.plugin = plugin; - } - display() { - this.containerEl.empty(); - this.containerEl.createEl("h2", { text: "Custom Frames Settings" }); - this.containerEl.createEl("p", { text: "Please note that Obsidian has to be restarted or reloaded for most of these settings to take effect.", cls: "mod-warning" }); - new import_obsidian2.Setting(this.containerEl).setName("Frame Padding").setDesc("The padding that should be left around the inside of custom frame panes, in pixels.").addText((t) => { - t.inputEl.type = "number"; - t.setValue(String(this.plugin.settings.padding)); - t.onChange((v) => __async(this, null, function* () { - this.plugin.settings.padding = v.length ? Number(v) : defaultSettings.padding; - yield this.plugin.saveSettings(); - })); - }); - for (let frame of this.plugin.settings.frames) { - let heading = this.containerEl.createEl("h3", { text: frame.displayName || "Unnamed Frame" }); - let toggle = new import_obsidian2.ButtonComponent(this.containerEl).setButtonText("Show Settings").setClass("custom-frames-show").onClick(() => __async(this, null, function* () { - content.hidden = !content.hidden; - toggle.setButtonText(content.hidden ? "Show Settings" : "Hide Settings"); - })); - let content = this.containerEl.createDiv(); - content.hidden = true; - new import_obsidian2.Setting(content).setName("Display Name").setDesc("The display name that this frame should have.").addText((t) => { - t.setValue(frame.displayName); - t.onChange((v) => __async(this, null, function* () { - frame.displayName = v; - heading.setText(frame.displayName || "Unnamed Frame"); - yield this.plugin.saveSettings(); - })); - }); - new import_obsidian2.Setting(content).setName("Icon").setDesc(createFragment((f) => { - f.createSpan({ text: "The icon that this frame's pane should have. The names of any " }); - f.createEl("a", { text: "Lucide icons", href: "https://lucide.dev/" }); - f.createSpan({ text: " can be used." }); - })).addText((t) => { - t.setValue(frame.icon); - t.onChange((v) => __async(this, null, function* () { - frame.icon = v; - yield this.plugin.saveSettings(); - })); - }); - new import_obsidian2.Setting(content).setName("URL").setDesc("The URL that should be opened in this frame.").addText((t) => { - t.setValue(frame.url); - t.onChange((v) => __async(this, null, function* () { - frame.url = v; - yield this.plugin.saveSettings(); - })); - }); - new import_obsidian2.Setting(content).setName("Disable on Mobile").setDesc("Custom Frames is a lot more restricted on mobile devices and doesn't allow for the same types of content to be displayed. If a frame doesn't work as expected on mobile, it can be disabled.").addToggle((t) => { - t.setValue(frame.hideOnMobile); - t.onChange((v) => __async(this, null, function* () { - frame.hideOnMobile = v; - yield this.plugin.saveSettings(); - })); - }); - new import_obsidian2.Setting(content).setName("Add Ribbon Icon").setDesc("Whether a button to open this frame should be added to the ribbon.").addToggle((t) => { - t.setValue(frame.addRibbonIcon); - t.onChange((v) => __async(this, null, function* () { - frame.addRibbonIcon = v; - yield this.plugin.saveSettings(); - })); - }); - new import_obsidian2.Setting(content).setName("Open in Center").setDesc("Whether this frame should be opened in the unpinned center editor rather than one of the panes on the side. This is useful for sites that don't work well in a narrow view, or sites that don't require a note to be open when viewed.").addToggle((t) => { - t.setValue(frame.openInCenter); - t.onChange((v) => __async(this, null, function* () { - frame.openInCenter = v; - yield this.plugin.saveSettings(); - })); - }); - new import_obsidian2.Setting(content).setName("Force iframe").setDesc(createFragment((f) => { - f.createSpan({ text: "Whether this frame should use iframes on desktop as opposed to Electron webviews." }); - f.createEl("br"); - f.createEl("em", { text: "Only enable this setting if the frame is causing issues or frequent crashes. This setting causes all Desktop-only settings to be ignored." }); - })).addToggle((t) => { - t.setValue(frame.forceIframe); - t.onChange((v) => __async(this, null, function* () { - frame.forceIframe = v; - yield this.plugin.saveSettings(); - })); - }); - new import_obsidian2.Setting(content).setName("Page Zoom").setDesc("The zoom that this frame's page should be displayed with, as a percentage.").addText((t) => { - t.inputEl.type = "number"; - t.setValue(String(frame.zoomLevel * 100)); - t.onChange((v) => __async(this, null, function* () { - frame.zoomLevel = v.length ? Number(v) / 100 : 1; - yield this.plugin.saveSettings(); - })); - }); - new import_obsidian2.Setting(content).setName("Additional CSS").setDesc(createFragment((f) => { - f.createSpan({ text: "A snippet of additional CSS that should be applied to this frame." }); - f.createEl("br"); - f.createEl("em", { text: "Note that this is only applied on Desktop." }); - })).addTextArea((t) => { - t.inputEl.rows = 5; - t.inputEl.cols = 50; - t.setValue(frame.customCss); - t.onChange((v) => __async(this, null, function* () { - frame.customCss = v; - yield this.plugin.saveSettings(); - })); - }); - new import_obsidian2.ButtonComponent(content).setButtonText("Remove Frame").onClick(() => __async(this, null, function* () { - this.plugin.settings.frames.remove(frame); - yield this.plugin.saveSettings(); - this.display(); - })); - } - this.containerEl.createEl("hr"); - this.containerEl.createEl("p", { text: `Create a new frame, either from a preset shipped with the plugin, or a custom one that you can edit yourself. Each frame's pane can be opened using the "Custom Frames: Open" command.` }); - let addDiv = this.containerEl.createDiv(); - let dropdown = new import_obsidian2.DropdownComponent(addDiv); - dropdown.addOption("new", "Custom"); - for (let key of Object.keys(presets)) - dropdown.addOption(key, presets[key].displayName); - new import_obsidian2.ButtonComponent(addDiv).setButtonText("Add Frame").setClass("custom-frames-add").onClick(() => __async(this, null, function* () { - let option = dropdown.getValue(); - if (option == "new") { - this.plugin.settings.frames.push({ - url: "", - displayName: "New Frame", - icon: "", - hideOnMobile: true, - addRibbonIcon: false, - openInCenter: false, - zoomLevel: 1, - forceIframe: false, - customCss: "" - }); - } else { - this.plugin.settings.frames.push(presets[option]); - } - yield this.plugin.saveSettings(); - this.display(); - })); - this.containerEl.createEl("hr"); - this.containerEl.createEl("p", { text: "If you like this plugin and want to support its development, you can do so through my website by clicking this fancy image!" }); - this.containerEl.createEl("a", { href: "https://ellpeck.de/support" }).createEl("img", { attr: { src: "https://ellpeck.de/res/generalsupport.png" }, cls: "custom-frames-support" }); - } -}; - -// src/view.ts -var import_obsidian3 = __toModule(require("obsidian")); -var _CustomFrameView = class extends import_obsidian3.ItemView { - constructor(leaf, settings, data, name) { - super(leaf); - this.data = data; - this.name = name; - this.frame = new CustomFrame(settings, data); - for (let action of _CustomFrameView.actions) - this.addAction(action.icon, action.name, () => action.action(this)); - } - onload() { - this.contentEl.empty(); - this.contentEl.addClass("custom-frames-view"); - this.contentEl.appendChild(this.frame.create()); - } - onHeaderMenu(menu) { - super.onHeaderMenu(menu); - for (let action of _CustomFrameView.actions) { - menu.addItem((i) => { - i.setTitle(action.name); - i.setIcon(action.icon); - i.onClick(() => action.action(this)); - }); - } - } - getViewType() { - return this.name; - } - getDisplayText() { - return this.data.displayName; - } - getIcon() { - return getIcon(this.data); - } -}; -var CustomFrameView = _CustomFrameView; -CustomFrameView.actions = [ - { - name: "Return to original page", - icon: "home", - action: (v) => v.frame.return() - }, - { - name: "Open dev tools", - icon: "binary", - action: (v) => v.frame.toggleDevTools() - }, - { - name: "Copy link", - icon: "link", - action: (v) => navigator.clipboard.writeText(v.frame.getCurrentUrl()) - }, - { - name: "Open in browser", - icon: "globe", - action: (v) => open(v.frame.getCurrentUrl()) - }, - { - name: "Refresh", - icon: "refresh-cw", - action: (v) => v.frame.refresh() - }, - { - name: "Go back", - icon: "arrow-left", - action: (v) => v.frame.goBack() - }, - { - name: "Go forward", - icon: "arrow-right", - action: (v) => v.frame.goForward() - } -]; - -// src/main.ts -var CustomFramesPlugin = class extends import_obsidian4.Plugin { - onload() { - return __async(this, null, function* () { - yield this.loadSettings(); - for (let frame of this.settings.frames) { - if (!frame.url || !frame.displayName) - continue; - let name = `custom-frames-${getId(frame)}`; - if (import_obsidian4.Platform.isMobileApp && frame.hideOnMobile) { - console.log(`Skipping frame ${name} which is hidden on mobile`); - continue; - } - try { - console.log(`Registering frame ${name} for URL ${frame.url}`); - this.registerView(name, (l) => new CustomFrameView(l, this.settings, frame, name)); - this.addCommand({ - id: `open-${name}`, - name: `Open ${frame.displayName}`, - callback: () => this.openLeaf(name, frame.openInCenter, false) - }); - if (frame.addRibbonIcon) - this.addRibbonIcon(getIcon(frame), `Open ${frame.displayName}`, (e) => this.openLeaf(name, frame.openInCenter, import_obsidian4.Platform.isMacOS ? e.metaKey : e.ctrlKey)); - } catch (e) { - console.error(`Couldn't register frame ${name}, is there already one with the same name?`); - } - } - this.addSettingTab(new CustomFramesSettingTab(this.app, this)); - this.registerMarkdownCodeBlockProcessor("custom-frames", (s, e) => { - e.empty(); - e.addClass("custom-frames-view-file"); - let frameMatch = /frame:([^\n]+)/gi.exec(s); - let frameName = frameMatch && frameMatch[1].trim(); - if (!frameName) { - e.createSpan({ text: "Couldn't parse frame name" }); - return; - } - let data = this.settings.frames.find((f) => f.displayName == frameName); - if (!data) { - e.createSpan({ text: `Couldn't find a frame with name ${frameName}` }); - return; - } - if (import_obsidian4.Platform.isMobileApp && data.hideOnMobile) { - e.createSpan({ text: `${frameName} is hidden on mobile` }); - return; - } - let styleMatch = /style:([^\n]+)/gi.exec(s); - let style = styleMatch && styleMatch[1].trim(); - style || (style = "height: 600px;"); - let urlSuffixMatch = /urlsuffix:([^\n]+)/gi.exec(s); - let urlSuffix = urlSuffixMatch && urlSuffixMatch[1].trim(); - urlSuffix || (urlSuffix = ""); - let frame = new CustomFrame(this.settings, data); - e.appendChild(frame.create(style, urlSuffix)); - }); - }); - } - loadSettings() { - return __async(this, null, function* () { - this.settings = Object.assign({}, defaultSettings, yield this.loadData()); - }); - } - saveSettings() { - return __async(this, null, function* () { - yield this.saveData(this.settings); - }); - } - openLeaf(name, center, split) { - return __async(this, null, function* () { - if (center) { - this.app.workspace.detachLeavesOfType(name); - let leaf = this.app.workspace.getLeaf(split); - yield leaf.setViewState({ type: name, active: true }); - } else { - if (!this.app.workspace.getLeavesOfType(name).length) - yield this.app.workspace.getRightLeaf(false).setViewState({ type: name, active: true }); - this.app.workspace.revealLeaf(this.app.workspace.getLeavesOfType(name)[0]); - } - }); - } -}; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsic3JjL21haW4udHMiLCAic3JjL2ZyYW1lLnRzIiwgInNyYy9zZXR0aW5ncy50cyIsICJzcmMvc2V0dGluZ3MtdGFiLnRzIiwgInNyYy92aWV3LnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJpbXBvcnQgeyBQbHVnaW4sIFBsYXRmb3JtIH0gZnJvbSBcIm9ic2lkaWFuXCI7XHJcbmltcG9ydCB7IEN1c3RvbUZyYW1lIH0gZnJvbSBcIi4vZnJhbWVcIjtcclxuaW1wb3J0IHsgQ3VzdG9tRnJhbWVzU2V0dGluZ3MsIGRlZmF1bHRTZXR0aW5ncywgZ2V0SWNvbiwgZ2V0SWQgfSBmcm9tIFwiLi9zZXR0aW5nc1wiO1xyXG5pbXBvcnQgeyBDdXN0b21GcmFtZXNTZXR0aW5nVGFiIH0gZnJvbSBcIi4vc2V0dGluZ3MtdGFiXCI7XHJcbmltcG9ydCB7IEN1c3RvbUZyYW1lVmlldyB9IGZyb20gXCIuL3ZpZXdcIjtcclxuXHJcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIEN1c3RvbUZyYW1lc1BsdWdpbiBleHRlbmRzIFBsdWdpbiB7XHJcblxyXG5cdHNldHRpbmdzOiBDdXN0b21GcmFtZXNTZXR0aW5ncztcclxuXHJcblx0YXN5bmMgb25sb2FkKCk6IFByb21pc2U8dm9pZD4ge1xyXG5cdFx0YXdhaXQgdGhpcy5sb2FkU2V0dGluZ3MoKTtcclxuXHJcblx0XHRmb3IgKGxldCBmcmFtZSBvZiB0aGlzLnNldHRpbmdzLmZyYW1lcykge1xyXG5cdFx0XHRpZiAoIWZyYW1lLnVybCB8fCAhZnJhbWUuZGlzcGxheU5hbWUpXHJcblx0XHRcdFx0Y29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yXG4gICAgICAgIHRoaXMuZnJhbWUuc2V0QXR0cmlidXRlKFwic3R5bGVcIiwgc3R5bGUpO1xyXG5cclxuICAgICAgICBsZXQgc3JjID0gdGhpcy5kYXRhLnVybDtcclxuICAgICAgICBpZiAodXJsU3VmZml4KSB7XHJcbiAgICAgICAgICAgIGlmICghdXJsU3VmZml4LnN0YXJ0c1dpdGgoXCIvXCIpKVxyXG4gICAgICAgICAgICAgICAgc3JjICs9IFwiL1wiO1xyXG4gICAgICAgICAgICBzcmMgKz0gdXJsU3VmZml4O1xyXG4gICAgICAgIH1cclxuICAgICAgICB0aGlzLmZyYW1lLnNldEF0dHJpYnV0ZShcInNyY1wiLCBzcmMpO1xyXG5cclxuICAgICAgICByZXR1cm4gdGhpcy5mcmFtZTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgcmVmcmVzaCgpOiB2b2lkIHtcclxuICAgICAgICBpZiAodGhpcy5mcmFtZSBpbnN0YW5jZW9mIEhUTUxJRnJhbWVFbGVtZW50KSB7XHJcbiAgICAgICAgICAgIHRoaXMuZnJhbWUuY29udGVudFdpbmRvdy5sb2NhdGlvbi5yZWxvYWQoKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICB0aGlzLmZyYW1lLnJlbG9hZCgpO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgcmV0dXJuKCk6IHZvaWQge1xyXG4gICAgICAgIGlmICh0aGlzLmZyYW1lIGluc3RhbmNlb2YgSFRNTElGcmFtZUVsZW1lbnQpIHtcclxuICAgICAgICAgICAgdGhpcy5mcmFtZS5jb250ZW50V2luZG93Lm9wZW4odGhpcy5kYXRhLnVybCk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgdGhpcy5mcmFtZS5sb2FkVVJMKHRoaXMuZGF0YS51cmwpO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ29CYWNrKCk6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lckVsLmNyZWF0ZUVsKFwiaDNcIiwgeyB0ZXh0OiBmcmFtZS5kaXNwbGF5TmFtZSB8fCBcIlVubmFtZWQgRnJhbWVcIiB9KTtcclxuICAgICAgICAgICAgbGV0IHRvZ2dsZSA9IG5ldyBCdXR0b25Db21wb25lbnQodGhpcy5jb250YWluZXJFbClcclxuICAgICAgICAgICAgICAgIC5zZXRCdXR0b25UZXh0KFwiU2hvdyBTZXR0aW5nc1wiKVxyXG4gICAgICAgICAgICAgICAgLnNldENsYXNzKFwiY3VzdG9tLWZyYW1lcy1zaG93XCIpXHJcbiAgICAgICAgICAgICAgICAub25DbGljayhhc3luYyAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgY29udGVudC5oaWRkZW4gPSAhY29udGVudC5oaWRkZW47XHJcbiAgICAgICAgICAgICAgICAgICAgdG9nZ2xlLnNldEJ1dHRvblRleHQoY29udGVudC5oaWRkZW4gPyBcIlNob3cgU2V0dGluZ3NcIiA6IFwiSGlkZSBTZXR0aW5nc1wiKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBsZXQgY29udGVudCA9IHRoaXMuY29udGFpbmVyRWwuY3JlYXRlRGl2KCk7XHJcbiAgICAgICAgICAgIGNvbnRlbnQuaGlkZGVuID0gdHJ1ZTtcclxuXHJcbiAgICAgICAgICAgIG5ldyBTZXR0aW5nKGNvbnRlbnQpXHJcbiAgICAgICAgICAgICAgICAuc2V0TmFtZShcIkRpc3BsYXkgTmFtZVwiKVxyXG4gICAgICAgICAgICAgICAgLnNldERlc2MoXCJUaGUgZGlzcGxheSBuYW1lIHRoYXQgdGhpcyBmcmFtZSBzaG91bGQgaGF2ZS5cIilcclxuICAgICAgICAgICAgICAgIC5hZGRUZXh0KHQgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHQuc2V0VmFsdWUoZnJhbWUuZGlzcGxheU5hbWUpO1xyXG4gICAgICAgICAgICAgICAgICAgIHQub25DaGFuZ2UoYXN5bmMgdiA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZyYW1lLmRpc3BsYXlOYW1lID0gdjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGluZy5zZXRUZXh0KGZyYW1lLmRpc3BsYXlOYW1lIHx8IFwiVW5uYW1lZCBGcmFtZVwiKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgbmV3IFNldHRpbmcoY29udGVudClcclxuICAgICAgICAgICAgICAgIC5zZXROYW1lKFwiSWNvblwiKVxyXG4gICAgICAgICAgICAgICAgLnNldERlc2MoY3JlYXRlRnJhZ21lbnQoZiA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgZi5jcmVhdGVTcGFuKHsgdGV4dDogXCJUaGUgaWNvbiB0aGF0IHRoaXMgZnJhbWUncyBwYW5lIHNob3VsZCBoYXZlLiBUaGUgbmFtZXMgb2YgYW55IFwiIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIGYuY3JlYXRlRWwoXCJhXCIsIHsgdGV4dDogXCJMdWNpZGUgaWNvbnNcIiwgaHJlZjogXCJodHRwczovL2x1Y2lkZS5kZXYvXCIgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgZi5jcmVhdGVTcGFuKHsgdGV4dDogXCIgY2FuIGJlIHVzZWQuXCIgfSk7XHJcbiAgICAgICAgICAgICAgICB9KSlcclxuICAgICAgICAgICAgICAgIC5hZGRUZXh0KHQgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHQuc2V0VmFsdWUoZnJhbWUuaWNvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5vbkNoYW5nZShhc3luYyB2ID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZnJhbWUuaWNvbiA9IHY7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIG5ldyBTZXR0aW5nKGNvbnRlbnQpXHJcbiAgICAgICAgICAgICAgICAuc2V0TmFtZShcIlVSTFwiKVxyXG4gICAgICAgICAgICAgICAgLnNldERlc2MoXCJUaGUgVVJMIHRoYXQgc2hvdWxkIGJlIG9wZW5lZCBpbiB0aGlzIGZyYW1lLlwiKVxyXG4gICAgICAgICAgICAgICAgLmFkZFRleHQodCA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5zZXRWYWx1ZShmcmFtZS51cmwpO1xyXG4gICAgICAgICAgICAgICAgICAgIHQub25DaGFuZ2UoYXN5bmMgdiA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZyYW1lLnVybCA9IHY7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIG5ldyBTZXR0aW5nKGNvbnRlbnQpXHJcbiAgICAgICAgICAgICAgICAuc2V0TmFtZShcIkRpc2FibGUgb24gTW9iaWxlXCIpXHJcbiAgICAgICAgICAgICAgICAuc2V0RGVzYyhcIkN1c3RvbSBGcmFtZXMgaXMgYSBsb3QgbW9yZSByZXN0cmljdGVkIG9uIG1vYmlsZSBkZXZpY2VzIGFuZCBkb2Vzbid0IGFsbG93IGZvciB0aGUgc2FtZSB0eXBlcyBvZiBjb250ZW50IHRvIGJlIGRpc3BsYXllZC4gSWYgYSBmcmFtZSBkb2Vzbid0IHdvcmsgYXMgZXhwZWN0ZWQgb24gbW9iaWxlLCBpdCBjYW4gYmUgZGlzYWJsZWQuXCIpXHJcbiAgICAgICAgICAgICAgICAuYWRkVG9nZ2xlKHQgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHQuc2V0VmFsdWUoZnJhbWUuaGlkZU9uTW9iaWxlKTtcclxuICAgICAgICAgICAgICAgICAgICB0Lm9uQ2hhbmdlKGFzeW5jIHYgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmcmFtZS5oaWRlT25Nb2JpbGUgPSB2O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBuZXcgU2V0dGluZyhjb250ZW50KVxyXG4gICAgICAgICAgICAgICAgLnNldE5hbWUoXCJBZGQgUmliYm9uIEljb25cIilcclxuICAgICAgICAgICAgICAgIC5zZXREZXNjKFwiV2hldGhlciBhIGJ1dHRvbiB0byBvcGVuIHRoaXMgZnJhbWUgc2hvdWxkIGJlIGFkZGVkIHRvIHRoZSByaWJib24uXCIpXHJcbiAgICAgICAgICAgICAgICAuYWRkVG9nZ2xlKHQgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHQuc2V0VmFsdWUoZnJhbWUuYWRkUmliYm9uSWNvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5vbkNoYW5nZShhc3luYyB2ID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZnJhbWUuYWRkUmliYm9uSWNvbiA9IHY7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIG5ldyBTZXR0aW5nKGNvbnRlbnQpXHJcbiAgICAgICAgICAgICAgICAuc2V0TmFtZShcIk9wZW4gaW4gQ2VudGVyXCI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ICAgICAgICAgICAgICAgICAgZi5jcmVhdGVFbChcImJyXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGYuY3JlYXRlRWwoXCJlbVwiLCB7IHRleHQ6IFwiT25seSBlbmFibGUgdGhpcyBzZXR0aW5nIGlmIHRoZSBmcmFtZSBpcyBjYXVzaW5nIGlzc3VlcyBvciBmcmVxdWVudCBjcmFzaGVzLiBUaGlzIHNldHRpbmcgY2F1c2VzIGFsbCBEZXNrdG9wLW9ubHkgc2V0dGluZ3MgdG8gYmUgaWdub3JlZC5cIiB9KTtcclxuICAgICAgICAgICAgICAgIH0pKVxyXG4gICAgICAgICAgICAgICAgLmFkZFRvZ2dsZSh0ID0+IHtcclxuICAgICAgICAgICAgICAgICAgICB0LnNldFZhbHVlKGZyYW1lLmZvcmNlSWZyYW1lKTtcclxuICAgICAgICAgICAgICAgICAgICB0Lm9uQ2hhbmdlKGFzeW5jIHYgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmcmFtZS5mb3JjZUlmcmFtZSA9IHY7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIG5ldyBTZXR0aW5nKGNvbnRlbnQpXHJcbiAgICAgICAgICAgICAgICAuc2V0TmFtZShcIlBhZ2UgWm9vbVwiKVxyXG4gICAgICAgICAgICAgICAgLnNldERlc2MoXCJUaGUgem9vbSB0aGF0IHRoaXMgZnJhbWUncyBwYWdlIHNob3VsZCBiZSBkaXNwbGF5ZWQgd2l0aCwgYXMgYSBwZXJjZW50YWdlLlwiKVxyXG4gICAgICAgICAgICAgICAgLmFkZFRleHQodCA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5pbnB1dEVsLnR5cGUgPSBcIm51bWJlclwiO1xyXG4gICAgICAgICAgICAgICAgICAgIHQuc2V0VmFsdWUoU3RyaW5nKGZyYW1lLnpvb21MZXZlbCAqIDEwMCkpO1xyXG4gICAgICAgICAgICAgICAgICAgIHQub25DaGFuZ2UoYXN5bmMgdiA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZyYW1lLnpvb21MZXZlbCA9IHYubGVuZ3RoID8gTnVtYmVyKHYpIC8gMTAwIDogMTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgbmV3IFNldHRpbmcoY29udGVudClcclxuICAgICAgICAgICAgICAgIC5zZXROYW1lKFwiQWRkaXRpb25hbCBDU1NcIilcclxuICAgICAgICAgICAgICAgIC5zZXREZXNjKGNyZWF0ZUZyYWdtZW50KGYgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGYuY3JlYXRlU3Bhbih7IHRleHQ6IFwiQSBzbmlwcGV0IG9mIGFkZGl0aW9uYWwgQ1NTIHRoYXQgc2hvdWxkIGJlIGFwcGxpZWQgdG8gdGhpcyBmcmFtZS5cIiB9KTtcclxuICAgICAgICAgICAgICAgICAgICBmLmNyZWF0ZUVsKFwiYnJcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgZi5jcmVhdGVFbChcImVtXCIsIHsgdGV4dDogXCJOb3RlIHRoYXQgdGhpcyBpcyBvbmx5IGFwcGxpZWQgb24gRGVza3RvcC5cIiB9KTtcclxuICAgICAgICAgICAgICAgIH0pKVxyXG4gICAgICAgICAgICAgICAgLmFkZFRleHRBcmVhKHQgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHQuaW5wdXRFbC5yb3dzID0gNTtcclxuICAgICAgICAgICAgICAgICAgICB0LmlucHV0RWwuY29scyA9IDUwO1xyXG4gICAgICAgICAgICAgICAgICAgIHQuc2V0VmFsdWUoZnJhb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FwiIGNvbW1hbmQuXCIgfSk7XHJcblxyXG4gICAgICAgIGxldCBhZGREaXYgPSB0aGlzLmNvbnRhaW5lckVsLmNyZWF0ZURpdigpO1xyXG4gICAgICAgIGxldCBkcm9wZG93biA9IG5ldyBEcm9wZG93bkNvbXBvbmVudChhZGREaXYpO1xyXG4gICAgICAgIGRyb3Bkb3duLmFkZE9wdGlvbihcIm5ld1wiLCBcIkN1c3RvbVwiKTtcclxuICAgICAgICBmb3IgKGxldCBrZXkgb2YgT2JqZWN0LmtleXMocHJlc2V0cykpXHJcbiAgICAgICAgICAgIGRyb3Bkb3duLmFkZE9wdGlvbihrZXksIHByZXNldHNba2V5XS5kaXNwbGF5TmFtZSk7XHJcbiAgICAgICAgbmV3IEJ1dHRvbkNvbXBvbmVudChhZGREaXYpXHJcbiAgICAgICAgICAgIC5zZXRCdXR0b25UZXh0KFwiQWRkIEZyYW1lXCIpXHJcbiAgICAgICAgICAgIC5zZXRDbGFzcyhcImN1c3RvbS1mcmFtZXMtYWRkXCIpXHJcbiAgICAgICAgICAgIC5vbkNsaWNrKGFzeW5jICgpID0+IHtcclxuICAgICAgICAgICAgICAgIGxldCBvcHRpb24gPSBkcm9wZG93bi5nZXRWYWx1ZSgpO1xyXG4gICAgICAgICAgICAgICAgaWYgKG9wdGlvbiA9PSBcIm5ld1wiKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MuZnJhbWVzLnB1c2goe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFwiXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXlOYW1lOiBcIk5ldyBGcmFtZVwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpY29uOiBcIlwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBoaWRlT25Nb2JpbGU6IHRydWUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGFkZFJpYmJvbkljb246IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBvcGVuSW5DZW50ZXI6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB6b29tTGV2ZWw6IDEsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvcmNlSWZyYW1lOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgY3VzdG9tQ3NzOiBcIlwiXHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLmZyYW1lcy5wdXNoKHByZXNldHNbb3B0aW9uXSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcclxuICAgICAgICAgICAgICAgIHRoaXMuZGlzcGxheSgpO1xyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgdGhpcy5jb250YWluZXJFbC5jcmVhdGVFbChcImhyXCIpO1xyXG4gICAgICAgIHRoaXMuY29udGFpbmVyRWwuY3JlYXRlRWwoXCJwXCIsIHsgdGV4dDogXCJJZiB5b3UgbGlrZSB0aGlzIHBsdWdpbiBhbmQgd2FudCB0byBzdXBwb3J0IGl0cyBkZXZlbG9wbWVudCwgeW91IGNhbiBkbyBzbyB0aHJvdWdoIG15IHdlYnNpdGUgYnkgY2xpY2tpbmcgdGhpcyBmYW5jeSBpbWFnZSFcIiB9KTtcclxuICAgICAgICB0aGlzLmNvbnRhaW5lckVsLmNyZWF0ZUVsKFwiYVwiLCB7IGhyZWY6IFwiaHR0cHM6Ly9lbGxwZWNrLmRlL3N1cHBvcnRcIiB9KVxyXG4gICAgICAgICAgICAuY3JlYXRlRWwoXCJpbWdcIiwgeyBhdHRyOiB7IHNyYzogXCJodHRwczovL2VsbHBlY2suZGUvcmVzL2dlbmVyYWxzdXBwb3J0LnB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iAgICAgICAgICAgIG5hbWU6IFwiT3BlbiBpbiBicm93c2VyXCIsXHJcbiAgICAgICAgICAgIGljb246IFwiZ2xvYmVcIixcclxuICAgICAgICAgICAgYWN0aW9uOiB2ID0+IG9wZW4odi5mcmFtZS5nZXRDdXJyZW50VXJsKCkpXHJcbiAgICAgICAgfSwge1xyXG4gICAgICAgICAgICBuYW1lOiBcIlJlZnJlc2hcIixcclxuICAgICAgICAgICAgaWNvbjogXCJyZWZyZXNoLWN3XCIsXHJcbiAgICAgICAgICAgIGFjdGlvbjogdiA9PiB2LmZyYW1lLnJlZnJlc2goKVxyXG4gICAgICAgIH0sIHtcclxuICAgICAgICAgICAgbmFtZTogXCJHbyBiYWNrXCIsXHJcbiAgICAgICAgICAgIGljb246IFwiYXJyb3ctbGVmdFwiLFxyXG4gICAgICAgICAgICBhY3Rpb246IHYgPT4gdi5mcmFtZS5nb0JhY2soKVxyXG4gICAgICAgIH0sIHtcclxuICAgICAgICAgICAgbmFtZTogXCJHbyBmb3J3YXJkXCIsXHJcbiAgICAgICAgICAgIGljb246IFwiYXJyb3ctcmlnaHRcIixcclxuICAgICAgICAgICAgYWN0aW9uOiB2ID0+IHYuZnJhbWUuZ29Gb3J3YXJkKClcclxuICAgICAgICB9XHJcbiAgICBdO1xyXG5cclxuICAgIHByaXZhdGUgcmVhZG9ubHkgZGF0YTogQ3VzdG9tRnJhbWVTZXR0aW5ncztcclxuICAgIHByaXZhdGUgcmVhZG9ubHkgbmFtZTogc3RyaW5nO1xyXG4gICAgcHJpdmF0ZSBmcmFtZTogQ3VzdG9tRnJhbWU7XHJcblxyXG4gICAgY29uc3RydWN0b3IobGVhZjogV29ya3NwYWNlTGVhZiwgc2V0dGluZ3M6IEN1c3RvbUZyYW1lc1NldHRpbmdzLCBkYXRhOiBDdXN0b21GcmFtZVNldHRpbmdzLCBuYW1lOiBzdHJpbmcpIHtcclxuICAgICAgICBzdXBlcihsZWFmKTtcclxuICAgICAgICB0aGlzLmRhdGEgPSBkYXRhO1xyXG4gICAgICAgIHRoaXMubmFtZSA9IG5hbWU7XHJcbiAgICAgICAgdGhpcy5mcmFtZSA9IG5ldyBDdXN0b21GcmFtZShzZXR0aW5ncywgZGF0YSk7XHJcblxyXG4gICAgICAgIGZvciAobGV0IGFjdGlvbiBvZiBDdXN0b21GcmFtZVZpZXcuYWN0aW9ucylcclxuICAgICAgICAgICAgdGhpcy5hZGRBY3Rpb24oYWN0aW9uLmljb24sIGFjdGlvbi5uYW1lLCAoKSA9PiBhY3Rpb24uYWN0aW9uKHRoaXMpKTtcclxuICAgIH1cclxuXHJcbiAgICBvbmxvYWQoKTogdm9pZCB7XHJcbiAgICAgICAgdGhpcy5jb250ZW50RWwuZW1wdHkoKTtcclxuICAgICAgICB0aGlzLmNvbnRlbnRFbC5hZGRDbGFzcyhcImN1c3RvbS1mcmFtZXMtdmlld1wiKTtcclxuICAgICAgICB0aGlzLmNvbnRlbnRFbC5hcHBlbmRDaGlsZCh0aGlzLmZyYW1lLmNyZWF0ZSgpKTtcclxuICAgIH1cclxuXHJcbiAgICBvbkhlYWRlck1lbnUobWVudTogTWVudSk6IHZvaWQge1xyXG4gICAgICAgIHN1cGVyLm9uSGVhZGVyTWVudShtZW51KTtcclxuICAgICAgICBmb3IgKGxldCBhY3Rpb24gb2YgQ3VzdG9tRnJhbWVWaWV3LmFjdGlvbnMpIHtcclxuICAgICAgICAgICAgbWVudS5hZGRJdGVtKGkgPT4ge1xyXG4gICAgICAgICAgICAgICAgaS5zZXRUaXRsZShhY3Rpb24ubmFtZSk7XHJcbiAgICAgICAgICAgICAgICBpLnNldEljb24oYWN0aW9uLmljb24pO1xyXG4gICAgICAgICAgICAgICAgaS5vbkNsaWNrKCgpID0+IGFjdGlvbi5hY3Rpb24odGhpcykpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZ2V0Vmlld1R5cGUoKTogc3RyaW5nIHtcclxuICAgICAgICByZXR1cm4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