From 3ec5caf330b7cdd3460c4c1a92d92b344112f90d Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 30 Jan 2023 12:11:19 +0100 Subject: [PATCH] fixed custom frames in new windows closes #43 closes #46 --- src/frame.ts | 18 ++++++++++----- src/main.ts | 2 +- src/view.ts | 2 +- .../plugins/obsidian-custom-frames/data.json | 11 ++++++++++ .../plugins/obsidian-custom-frames/main | 22 +++++++++++++------ .../plugins/obsidian-custom-frames/main.js | 22 +++++++++++++------ 6 files changed, 56 insertions(+), 21 deletions(-) diff --git a/src/frame.ts b/src/frame.ts index c7c99a1..1167e86 100644 --- a/src/frame.ts +++ b/src/frame.ts @@ -12,19 +12,29 @@ export class CustomFrame { this.data = data; } - create(additionalStyle: string = undefined, urlSuffix: string = undefined): any { + create(parent: HTMLElement, additionalStyle: string = undefined, urlSuffix: string = undefined): void { let style = `padding: ${this.settings.padding}px;`; if (additionalStyle) style += additionalStyle; if (Platform.isDesktopApp && !this.data.forceIframe) { - this.frame = document.createElement("webview"); + let frameDoc = parent.doc; + this.frame = frameDoc.createElement("webview"); + parent.appendChild(this.frame); this.frame.setAttribute("allowpopups", ""); this.frame.addEventListener("dom-ready", () => { this.frame.setZoomFactor(this.data.zoomLevel); this.frame.insertCSS(this.data.customCss); }); + this.frame.addEventListener("destroyed", () => { + // recreate the webview if it was moved to a new window + if (frameDoc != parent.doc) { + this.frame.detach(); + this.create(parent, additionalStyle, urlSuffix); + } + }); } else { - this.frame = document.createElement("iframe"); + this.frame = parent.doc.createElement("iframe"); + parent.appendChild(this.frame); 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;`; @@ -40,8 +50,6 @@ export class CustomFrame { src += urlSuffix; } this.frame.setAttribute("src", src); - - return this.frame; } refresh(): void { diff --git a/src/main.ts b/src/main.ts index f021850..49656b8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -68,7 +68,7 @@ export default class CustomFramesPlugin extends Plugin { urlSuffix ||= ""; let frame = new CustomFrame(this.settings, data); - e.appendChild(frame.create(style, urlSuffix)); + frame.create(e, style, urlSuffix); }); } diff --git a/src/view.ts b/src/view.ts index f1aba41..5b111eb 100644 --- a/src/view.ts +++ b/src/view.ts @@ -53,7 +53,7 @@ export class CustomFrameView extends ItemView { onload(): void { this.contentEl.empty(); this.contentEl.addClass("custom-frames-view"); - this.contentEl.appendChild(this.frame.create()); + this.frame.create(this.contentEl); } onPaneMenu(menu: Menu, source: string): void { diff --git a/test-vault/.obsidian/plugins/obsidian-custom-frames/data.json b/test-vault/.obsidian/plugins/obsidian-custom-frames/data.json index 0143e9a..6151f36 100644 --- a/test-vault/.obsidian/plugins/obsidian-custom-frames/data.json +++ b/test-vault/.obsidian/plugins/obsidian-custom-frames/data.json @@ -32,6 +32,17 @@ "zoomLevel": 1, "forceIframe": false, "customCss": "/* hide the menu bar, \"Keep\" text, and logo */\nhtml > body > div:nth-child(2) > div:nth-child(2) > div:first-child[class*=\" \"],\nhtml > body > div:first-child > header:first-child > div > div:first-child > div > div:first-child,\nhtml > body > div:nth-child(2) > div:nth-child(2) > div:first-child > div:first-child {\ndisplay: none !important;\n}" + }, + { + "url": "https://scholar.google.com", + "displayName": "Scholar", + "icon": "book", + "hideOnMobile": false, + "addRibbonIcon": true, + "openInCenter": false, + "zoomLevel": 1, + "forceIframe": false, + "customCss": "" } ], "padding": 5 diff --git a/test-vault/.obsidian/plugins/obsidian-custom-frames/main b/test-vault/.obsidian/plugins/obsidian-custom-frames/main index f5f8b48..cf86647 100644 --- a/test-vault/.obsidian/plugins/obsidian-custom-frames/main +++ b/test-vault/.obsidian/plugins/obsidian-custom-frames/main @@ -181,19 +181,28 @@ var CustomFrame = class { this.settings = settings; this.data = data; } - create(additionalStyle = void 0, urlSuffix = void 0) { + create(parent, 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"); + let frameDoc = parent.doc; + this.frame = frameDoc.createElement("webview"); + parent.appendChild(this.frame); this.frame.setAttribute("allowpopups", ""); this.frame.addEventListener("dom-ready", () => { this.frame.setZoomFactor(this.data.zoomLevel); this.frame.insertCSS(this.data.customCss); }); + this.frame.addEventListener("destroyed", () => { + if (frameDoc != parent.doc) { + this.frame.detach(); + this.create(parent, additionalStyle, urlSuffix); + } + }); } else { - this.frame = document.createElement("iframe"); + this.frame = parent.doc.createElement("iframe"); + parent.appendChild(this.frame); 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;`; @@ -208,7 +217,6 @@ var CustomFrame = class { src += urlSuffix; } this.frame.setAttribute("src", src); - return this.frame; } refresh() { if (this.frame instanceof HTMLIFrameElement) { @@ -422,7 +430,7 @@ var _CustomFrameView = class extends import_obsidian3.ItemView { onload() { this.contentEl.empty(); this.contentEl.addClass("custom-frames-view"); - this.contentEl.appendChild(this.frame.create()); + this.frame.create(this.contentEl); } onPaneMenu(menu, source) { super.onPaneMenu(menu, source); @@ -539,7 +547,7 @@ var CustomFramesPlugin = class extends import_obsidian4.Plugin { let urlSuffix = urlSuffixMatch && urlSuffixMatch[1].trim(); urlSuffix || (urlSuffix = ""); let frame = new CustomFrame(this.settings, data); - e.appendChild(frame.create(style, urlSuffix)); + frame.create(e, style, urlSuffix); }); }); } @@ -570,4 +578,4 @@ var CustomFramesPlugin = class extends import_obsidian4.Plugin { }); } }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNl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hbWUuc2V0QXR0cmlidXRlKFwic3R5bGVcIiwgc3R5bGUpO1xyXG5cclxuICAgICAgICBsZXQgc3JjID0gdGhpcy5kYXRhLnVybDtcclxuICAgICAgICBpZiAodXJsU3VmZml4KSB7XHJcbiAgICAgICAgICAgIGlmICghdXJsU3VmZml4LnN0YXJ0c1dpdGgoXCIvXCIpKVxyXG4gICAgICAgICAgICAgICAgc3JjICs9IFwiL1wiO1xyXG4gICAgICAgICAgICBzcmMgKz0gdXJsU3VmZml4O1xyXG4gICAgICAgIH1cclxuICAgICAgICB0aGlzLmZyYW1lLnNldEF0dHJpYnV0ZShcInNyY1wiLCBzcmMpO1xyXG5cclxuICAgICAgICByZXR1cm4gdGhpcy5mcmFtZTtcclxuICAgIH1cclxuXHJcbiAgICByZWZyZXNoKCk6IHZvaWQge1xyXG4gICAgICAgIGlmICh0aGlzLmZyYW1lIGluc3RhbmNlb2YgSFRNTElGcmFtZUVsZW1lbnQpIHtcclxuICAgICAgICAgICAgdGhpcy5mcmFtZS5jb250ZW50V2luZG93LmxvY2F0aW9uLnJlbG9hZCgpO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHRoaXMuZnJhbWUucmVsb2FkKCk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHJldHVybigpOiB2b2lkIHtcclxuICAgICAgICBpZiAodGhpcy5mcmFtZSBpbnN0YW5jZW9mIEhUTUxJRnJhbWVFbGVtZW50KSB7XHJcbiAgICAgICAgICAgIHRoaXMuZnJhbWUuY29udGVudFdpbmRvdy5vcGVuKHRoaXMuZGF0YS51cmwpO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHRoaXMuZnJhbWUubG9hZFVSTCh0aGlzLmRhdGEudXJsKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZ29CYWNrKCk6IHZvaWQge1xyXG4gICAgICAgIGlmICh0aGlzLmZyYW1lIGluc3RhbmNl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biAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MucGFkZGluZyA9IHYubGVuZ3RoID8gTnVtYmVyKHYpIDogZGVmYXVsdFNldHRpbmdzLnBhZGRpbmc7XHJcbiAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIGZvciAobGV0IGZyYW1lIG9mIHRoaXMucGx1Z2luLnNldHRpbmdzLmZyYW1lcykge1xyXG4gICAgICAgICAgICBsZXQgaGVhZGluZyA9IHRoaXMuY29udGFpbmVyRWwuY3JlYXRlRWwoXCJoM1wiLCB7IHRleHQ6IGZyYW1lLmRpc3BsYXlOYW1lIHx8IFwiVW5uYW1lZCBGcmFtZVwiIH0pO1xyXG4gICAgICAgICAgICBsZXQgdG9nZ2xlID0gbmV3IEJ1dHRvbkNvbXBvbmVudCh0aGlzLmNvbnRhaW5lckVsKVxyXG4gICAgICAgICAgICAgICAgLnNldEJ1dHRvblRleHQoXCJTaG93IFNldHRpbmdzXCIpXHJcbiAgICAgICAgICAgICAgICAuc2V0Q2xhc3MoXCJjdXN0b20tZnJhbWVzLXNob3dcIilcclxuICAgICAgICAgICAgICAgIC5vbkNsaWNrKGFzeW5jICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICBjb250ZW50LmhpZGRlbiA9ICFjb250ZW50LmhpZGRlbjtcclxuICAgICAgICAgICAgICAgICAgICB0b2dnbGUuc2V0QnV0dG9uVGV4dChjb250ZW50LmhpZGRlbiA/IFwiU2hvdyBTZXR0aW5nc1wiIDogXCJIaWRlIFNldHRpbmdzXCIpO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIGxldCBjb250ZW50ID0gdGhpcy5jb250YWluZXJFbC5jcmVhdGVEaXYoKTtcclxuICAgICAgICAgICAgY29udGVudC5oaWRkZW4gPSB0cnVlO1xyXG5cclxuICAgICAgICAgICAgbmV3IFNldHRpbmcoY29udGVudClcclxuICAgICAgICAgICAgICAgIC5zZXROYW1lKFwiRGlzcGxheSBOYW1lXCIpXHJcbiAgICAgICAgICAgICAgICAuc2V0RGVzYyhcIlRoZSBkaXNwbGF5IG5hbWUgdGhhdCB0aGlzIGZyYW1lIHNob3VsZCBoYXZlLlwiKVxyXG4gICAgICAgICAgICAgICAgLmFkZFRleHQodCA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5zZXRWYWx1ZShmcmFtZS5kaXNwbGF5TmFtZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5vbkNoYW5nZShhc3luYyB2ID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZnJhbWUuZGlzcGxheU5hbWUgPSB2O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkaW5nLnNldFRleHQoZnJhbWUuZGlzcGxheU5hbWUgfHwgXCJVbm5hbWVkIEZyYW1lXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBuZXcgU2V0dGluZyhjb250ZW50KVxyXG4gICAgICAgICAgICAgICAgLnNldE5hbWUoXCJJY29uXCIpXHJcbiAgICAgICAgICAgICAgICAuc2V0RGVzYyhjcmVhdGVGcmFnbWVudChmID0+IHtcclxuICAgICAgICAgICAgICAgICAgICBmLmNyZWF0ZVNwYW4oeyB0ZXh0OiBcIlRoZSBpY29uIHRoYXQgdGhpcyBmcmFtZSdzIHBhbmUgc2hvdWxkIGhhdmUuIFRoZSBuYW1lcyBvZiBhbnkgXCIgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgZi5jcmVhdGVFbChcImFcIiwgeyB0ZXh0OiBcIkx1Y2lkZSBpY29uc1wiLCBocmVmOiBcImh0dHBzOi8vbHVjaWRlLmRldi9cIiB9KTtcclxuICAgICAgICAgICAgICAgICAgICBmLmNyZWF0ZVNwYW4oeyB0ZXh0OiBcIiBjYW4gYmUgdXNlZC5cIiB9KTtcclxuICAgICAgICAgICAgICAgIH0pKVxyXG4gICAgICAgICAgICAgICAgLmFkZFRleHQodCA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5zZXRWYWx1ZShmcmFtZS5pY29uKTtcclxuICAgICAgICAgICAgICAgICAgICB0Lm9uQ2hhbmdlKGFzeW5jIHYgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmcmFtZS5pY29uID0gdjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgbmV3IFNldHRpbmcoY29udGVudClcclxuICAgICAgICAgICAgICAgIC5zZXROYW1lKFwiVVJMXCIpXHJcbiAgICAgICAgICAgICAgICAuc2V0RGVzYyhcIlRoZSBVUkwgdGhhdCBzaG91bGQgYmUgb3BlbmVkIGluIHRoaXMgZnJhbWUuXCIpXHJcbiAgICAgICAgICAgICAgICAuYWRkVGV4dCh0ID0+IHtcclxuICAgICAgICAgICAgICAgICAgICB0LnNldFZhbHVlKGZyYW1lLnVybCk7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5vbkNoYW5nZShhc3luYyB2ID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZnJhbWUudXJsID0gdjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgbmV3IFNldHRpbmcoY29udGVudClcclxuICAgICA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tcclxuICAgICAgICAgICAgICAgICAgICB0Lm9uQ2hhbmdlKGFzeW5jIHYgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmcmFtZS5hZGRSaWJib25JY29uID0gdjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgbmV3IFNldHRpbmcoY29udGVudClcclxuICAgICAgICAgICAgICAgIC5zZXROYW1lKFwiT3BlbiBpbiBDZW50ZXJcIilcclxuICAgICAgICAgICAgICAgIC5zZXREZXNjKFwiV2hldGhlciB0aGlzIGZyYW1lIHNob3VsZCBiZSBvcGVuZWQgaW4gdGhlIHVucGlubmVkIGNlbnRlciBlZGl0b3IgcmF0aGVyIHRoYW4gb25lIG9mIHRoZSBwYW5lcyBvbiB0aGUgc2lkZS4gVGhpcyBpcyB1c2VmdWwgZm9yIHNpdGVzIHRoYXQgZG9uJ3Qgd29yayB3ZWxsIGluIGEgbmFycm93IHZpZXcsIG9yIHNpdGVzIHRoYXQgZG9uJ3QgcmVxdWlyZSBhIG5vdGUgdG8gYmUgb3BlbiB3aGVuIHZpZXdlZC5cIilcclxuICAgICAgICAgICAgICAgIC5hZGRUb2dnbGUodCA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5zZXRWYWx1ZShmcmFtZS5vcGVuSW5DZW50ZXIpO1xyXG4gICAgICAgICAgICAgICAgICAgIHQub25DaGFuZ2UoYXN5bmMgdiA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZyYW1lLm9wZW5JbkNlbnRlciA9IHY7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfS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ICAgbmV3IFNldHRpbmcoY29udGVudClcclxuICAgICAgICAgICAgICAgIC5zZXROYW1lKFwiUGFnZSBab29tXCIpXHJcbiAgICAgICAgICAgICAgICAuc2V0RGVzYyhcIlRoZSB6b29tIHRoYXQgdGhpcyBmcmFtZSdzIHBhZ2Ugc2hvdWxkIGJlIGRpc3BsYXllZCB3aXRoLCBhcyBhIHBlcmNlbnRhZ2UuXCIpXHJcbiAgICAgICAgICAgICAgICAuYWRkVGV4dCh0ID0+IHtcclxuICAgICAgICAgICAgICAgICAgICB0LmlucHV0RWwudHlwZSA9IFwibnVtYmVyXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5zZXRWYWx1ZShTdHJpbmcoZnJhbWUuem9vbUxldmVsICogMTAwKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5vbkNoYW5nZShhc3luYyB2ID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZnJhbWUuem9vbUxldmVsID0gdi5sZW5ndGggPyBOdW1iZXIodikgLyAxMDAgOiAxO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBuZXcgU2V0dGluZyhjb250ZW50KVxyXG4gICAgICAgICAgICAgICAgLnNldE5hbWUoXCJBZGRpdGlvbmFsIENTU1wiKVxyXG4gICAgICAgICAgICAgICAgLnNldERlc2MoY3JlYXRlRnJhZ21lbnQoZiA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgZi5jcmVhdGVTcGFuKHsgdGV4dDogXCJBIHNuaXBwZXQgb2YgYWRkaXRpb25hbCBDU1MgdGhhdCBzaG91bGQgYmUgYXBwbGllZCB0byB0aGlzIGZyYW1lLlwiIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIGYuY3JlYXRlRWwoXCJiclwiKTtcclxuICAgICAgICAgICAgICAgICAgICBmLmNyZWF0ZUVsKFwiZW1cIiwgeyB0ZXh0OiBcIk5vdGUgdGhhdCB0aGlzIGlzIG9ubHkgYXBwbGllZCBvbiBEZXNrdG9wLlwiIH0pO1xyXG4gICAgICAgICAgICAgICAgfSkpXHJcbiAgICAgICAgICAgICAgICAuYWRkVGV4dEFyZWEodCA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5pbnB1dEVsLnJvd3MgPSA1O1xyXG4gICAgICAgICAgICAgICAgICAgIHQuaW5wdXRFbC5jb2xzID0gNTA7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5zZXRWYWx1ZShmcmFtZS5jdXN0b21Dc3MpO1xyXG4gICAgICAgICAgICAgICAgICAgIHQub25DaGFuZ2UoYXN5bmMgdiA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZyYW1lLmN1c3RvbUNzcyA9IHY7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIG5ldyBCdXR0b25Db21wb25lbnQoY29udGVudClcclxuICAgICAgICAgICAgICAgIC5zZXRCdXR0b25UZXh0KFwiUmVtb3ZlIEZyYW1lXCIpXHJcbiAgICAgICAgICAgICAgICAub25DbGljayhhc3luYyAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MuZnJhbWVzLnJlbW92ZShmcmFtZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5kaXNwbGF5KCk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHRoaXMuY29udGFpbmV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ICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy5mcmFtZXMucHVzaCh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXCJcIixcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheU5hbWU6IFwiTmV3IEZyYW1lXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGljb246IFwiXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGhpZGVPbk1vYmlsZTogdHJ1ZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYWRkUmliYm9uSWNvbjogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wZW5JbkNlbnRlcjogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHpvb21MZXZlbDogMSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yY2VJZnJhbWU6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjdXN0b21Dc3M6IFwiXCJcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MuZnJhbWVzLnB1c2gocHJlc2V0c1tvcHRpb25dKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xyXG4gICAgICAgICAgICAgICAgdGhpcy5kaXNwbGF5KCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICB2YXIgZGlzY2xhaW1lciA9IHRoaXMuY29udGFpbmVyRWwuY3JlYXRlRWwoXCJwXCIsIHsgY2xzOiBcIm1vZC13YXJuaW5nXCIgfSk7XHJcbiAgICAgICAgZGlzY2xhaW1lci5jcmVhdGVTcGFuKHsgdGV4dDogXCJQbGVhc2UgYmUgYWR2aXNlZCB0aGF0LCB3aGVuIGFkZGluZ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gICBuYW1lOiBcIk9wZW4gaW4gYnJvd3NlclwiLFxyXG4gICAgICAgICAgICBpY29uOiBcImdsb2JlXCIsXHJcbiAgICAgICAgICAgIGFjdGlvbjogdiA9PiBvcGVuKHYuZnJhbWUuZ2V0Q3VycmVudFVybCgpKVxyXG4gICAgICAgIH0sIHtcclxuICAgICAgICAgICAgbmFtZTogXCJSZWZyZXNoXCIsXHJcbiAgICAgICAgICAgIGljb246IFwicmVmcmVzaC1jd1wiLFxyXG4gICAgICAgICAgICBhY3Rpb246IHYgPT4gdi5mcmFtZS5yZWZyZXNoKClcclxuICAgICAgICB9LCB7XHJcbiAgICAgICAgICAgIG5hbWU6IFwiR28gYmFja1wiLFxyXG4gICAgICAgICAgICBpY29uOiBcImFycm93LWxlZnRcIixcclxuICAgICAgICAgICAgYWN0aW9uOiB2ID0+IHYuZnJhbWUuZ29CYWNrKClcclxuICAgICAgICB9LCB7XHJcbiAgICAgICAgICAgIG5hbWU6IFwiR28gZm9yd2FyZFwiLFxyXG4gICAgICAgICAgICBpY29uOiBcImFycm93LXJpZ2h0XCIsXHJcbiAgICAgICAgICAgIGFjdGlvbjogdiA9PiB2LmZyYW1lLmdvRm9yd2FyZCgpXHJcbiAgICAgICAgfVxyXG4gICAgXTtcclxuXHJcbiAgICBwcml2YXRlIHJlYWRvbmx5IGRhdGE6IEN1c3RvbUZyYW1lU2V0dGluZ3M7XHJcbiAgICBwcml2YXRlIHJlYWRvbmx5IG5hbWU6IHN0cmluZztcclxuICAgIHByaXZhdGUgZnJhbWU6IEN1c3RvbUZyYW1lO1xyXG5cclxuICAgIGNvbnN0cnVjdG9yKGxlYWY6IFdvcmtzcGFjZUxlYWYsIHNldHRpbmdzOiBDdXN0b21GcmFtZXNTZXR0aW5ncywgZGF0YTogQ3VzdG9tRnJhbWVTZXR0aW5ncywgbmFtZTogc3RyaW5nKSB7XHJcbiAgICAgICAgc3VwZXIobGVhZik7XHJcbiAgICAgICAgdGhpcy5kYXRhID0gZGF0YTt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b3cub3Blbih0aGlzLmRhdGEudXJsKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICB0aGlzLmZyYW1lLmxvYWRVUkwodGhpcy5kYXRhLnVybCk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGdvQmFjaygpOiB2b2lkIHtcclxuICAgICAgICBpZiAodGhpcy5mcmFtZSBpbnN0YW5jZW9mIEhUTUxJRnJhbWVFbGVtZW50KSB7XHJcbiAgICAgICAgICAgIHRoaXMuZnJhbWUuY29udGVudFdpbmRvdy5oaXN0b3J5LmJhY2soKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICB0aGlzLmZyYW1lLmdvQmFjaygpO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBnb0ZvcndhcmQoKTogdm9pZCB7XHJcbiAgICAgICAgaWYgKHRoaXMuZnJhbWUgaW5zdGFuY2VvZiBIVE1MSUZyYW1lRWxlbWVudCkge1xyXG4gICAgICAgICAgICB0aGlzLmZyYW1lLmNvbnRlbnRXaW5kb3cuaGlzdG9yeS5mb3J3YXJkKCk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgdGhpcy5mcmFtZS5nb0ZvcndhcmQoKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgdG9nZ2xlRGV2VG9vbHMoKTogdm9pZCB7XHJcbiAgICAgICAgaWYgKCEodGhpcy5mcmFtZSBpbnN0YW5jZW9mIEhUTUxJRnJhbWVFbGVtZW50KSkge1xyXG4gICAgICAgICAgICBpZiAoIXRoaXMuZnJhbWUuaXNEZXZUb29sc09wZW5lZCgpKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmZyYW1lLm9wZW5EZXZUb29scygpO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5mcmFtZS5jbG9zZURldlRvb2xzKCk7XHJcbiAgICAgICAgICA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QodCA9PiB7XHJcbiAgICAgICAgICAgICAgICB0LmlucHV0RWwudHlwZSA9IFwibnVtYmVyXCI7XHJcbiAgICAgICAgICAgICAgICB0LnNldFZhbHVlKFN0cmluZyh0aGlzLnBsdWdpbi5zZXR0aW5ncy5wYWRkaW5nKSk7XHJcbiAgICAgICAgICAgICAgICB0Lm9uQ2hhbmdlKGFzeW5jIHYgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLnBhZGRpbmcgPSB2Lmxlbmd0aCA/IE51bWJlcih2KSA6IGRlZmF1bHRTZXR0aW5ncy5wYWRkaW5nO1xyXG4gICAgICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICBmb3IgKGxldCBmcmFtZSBvZiB0aGlzLnBsdWdpbi5zZXR0aW5ncy5mcmFtZXMpIHtcclxuICAgICAgICAgICAgbGV0IGhlYWRpbmcgPSB0aGlzLmNvbnRhaW5lckVsLmNyZWF0ZUVsKFwiaDNcIiwgeyB0ZXh0OiBmcmFtZS5kaXNwbGF5TmFtZSB8fCBcIlVubmFtZWQgRnJhbWVcIiB9KTtcclxuICAgICAgICAgICAgbGV0IHRvZ2dsZSA9IG5ldyBCdXR0b25Db21wb25lbnQodGhpcy5jb250YWluZXJFbClcclxuICAgICAgICAgICAgICAgIC5zZXRCdXR0b25UZXh0KFwiU2hvdyBTZXR0aW5nc1wiKVxyXG4gICAgICAgICAgICAgICAgLnNldENsYXNzKFwiY3VzdG9tLWZyYW1lcy1zaG93XCIpXHJcbiAgICAgICAgICAgICAgICAub25DbGljayhhc3luYyAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgY29udGVudC5oaWRkZW4gPSAhY29udGVudC5oaWRkZW47XHJcbiAgICAgICAgICAgICAgICAgICAgdG9nZ2xlLnNldEJ1dHRvblRleHQoY29udGVudC5oaWRkZW4gPyBcIlNob3cgU2V0dGluZ3NcIiA6IFwiSGlkZSBTZXR0aW5nc1wiKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBsZXQgY29udGVudCA9IHRoaXMuY29udGFpbmVyRWwuY3JlYXRlRGl2KCk7XHJcbiAgICAgICAgICAgIGNvbnRlbnQuaGlkZGVuID0gdHJ1ZTtcclxuXHJcbiAgICAgICAgICAgIG5ldyBTZXR0aW5nKGNvbnRlbnQpXHJcbiAgICAgICAgICAgICAgICAuc2V0TmFtZShcIkRpc3BsYXkgTmFtZVwiKVxyXG4gICAgICAgICAgICAgICAgLnNldERlc2MoXCJUaGUgZGlzcGxheSBuYW1lIHRoYXQgdGhpcyBmcmFtZSBzaG91bGQgaGF2ZS5cIilcclxuICAgICAgICAgICAgICAgIC5hZGRUZXh0KHQgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHQuc2V0VmFsdWUoZnJhbWUuZGlzcGxheU5hbWUpO1xyXG4gICAgICAgICAgICAgICAgICAgIHQub25DaGFuZ2UoYXN5bmMgdiA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZyYW1lLmRpc3BsYXlOYW1lID0gdjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGluZy5zZXRUZXh0KGZyYW1lLmRpc3BsYXlOYW1lIHx8IFwiVW5uYW1lZCBGcmFtZVwiKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgbmV3IFNldHRpbmcoY29udGVudClcclxuICAgICAgICAgICAgICAgIC5zZXROYW1lKFwiSWNvblwiKVxyXG4gICAgICAgICAgICAgICAgLnNldERlc2MoY3JlYXRlRnJhZ21lbnQoZiA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgZi5jcmVhdGVTcGFuKHsgdGV4dDogXCJUaGUgaWNvbiB0aGF0IHRoaXMgZnJhbWUncyBwYW5lIHNob3VsZCBoYXZlLiBUaGUgbmFtZXMgb2YgYW55IFwiIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIGYuY3JlYXRlRWwoXCJhXCIsIHsgdGV4dDogXCJMdWNpZGUgaWNvbnNcIiwgaHJlZjogXCJodHRwczovL2x1Y2lkZS5kZXYvXCIgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgZi5jcmVhdGVTcGFuKHsgdGV4dDogXCIgY2FuIGJlIHVzZWQuXCIgfSk7XHJcbiAgICAgICAgICAgICAgICB9KSlcclxuICAgICAgICAgICAgICAgIC5hZGRUZXh0KHQgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHQuc2V0VmFsdWUoZnJhbWUuaWNvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5vbkNoYW5nZShhc3luYyB2ID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZnJhbWUuaWNvbiA9IHY7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIG5ldyBTZXR0aW5nKGNvbnRlbnQpXHJcbiAgICAgICAgICAgICAgICAuc2V0TmFtZShcIlVSTFwiKVxyXG4gICAgICAgICAgICAgICAgLnNldERlc2MoXCJUaGUgVVJMIHRoYXQgc2hvdWxkIGJlIG9wZW5lZCBpbiB0aGlzIGZyYW1lLlwiKVxyXG4gICAgICAgICAgICAgICAgLmFkZFRleHQodCA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5zZXRWYWx1ZShmcmFtZS51cmwpO1xyXG4gICAgICAgICAgICAgICAgICAgIHQub25DaGFuZ2UoYXN5bmMgdiA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZyYW1lLnVybCA9IHY7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIG5ldyBTZXR0aW5nKGNvbnRlbnQpXHJcbiAgICAgICAgICAgICAgICAuc2V0TmFtZShcIkRpc2FibGUgb24gTW9iaWxlXCIpXHJcbiAgICAgICAgICAgICAgICAuc2V0RGVzYyhcIkN1c3RvbSBGcmFtZXMgaXMgYSBsb3QgbW9yZSByZXN0cmljdGVkIG9uIG1vYmlsZSBkZXZpY2VzIGFuZCBkb2Vzbid0IGFsbG93IGZvciB0aGUgc2FtZSB0eXBlcyBvZiBjb250ZW50IHRvIGJlIGRpc3BsYXllZC4gSWYgYSBmcmFtZSBkb2Vzbid0IHdvcmsgYXMgZXhwZWN0ZWQgb24gbW9iaWxlLCBpdCBjYW4gYmUgZGlzYWJsZWQuXCIpXHJcbiAgICAgICAgICAgICAgICAuYWRkVG9nZ2xlKHQgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHQuc2V0VmFsdWUoZnJhbWUuaGlkZU9uTW9iaWxlKTtcclxuICAgICAgICAgICAgICAgICAgICB0Lm9uQ2hhbmdlKGFzeW5jIHYgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmcmFtZS5oaWRlT25Nb2JpbGUgPSB2O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBuZXcgU2V0dGluZyhjb250ZW50KVxyXG4gICAgICAgICAgICAgICAgLnNldE5hbWUoXCJBZGQgUmliYm9uIEljb25c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VyKTtcclxuICAgICAgICAgICAgICAgICAgICB0Lm9uQ2hhbmdlKGFzeW5jIHYgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmcmFtZS5vcGVuSW5DZW50ZXIgPSB2O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBuZXcgU2V0dGluZyhjb250ZW50KVxyXG4gICAgICAgICAgICAgICAgLnNldE5hbWUoXCJGb3JjZSBpZnJhbWVcIilcclxuICAgICAgICAgICAgICAgIC5zZXREZXNjKGNyZWF0ZUZyYWdtZW50KGYgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGYuY3JlYXRlU3Bhbih7IHRleHQ6IFwiV2hldGhlciB0aGlzIGZyYW1lIHNob3VsZCB1c2UgaWZyYW1lcyBvbiBkZXNrdG9wIGFzIG9wcG9zZWQgdG8gRWxlY3Ryb24gd2Vidmlld3MuXCIgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgZi5jcmVhdGVFbChcImJyXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGYuY3JlYXRlRWwoXCJlbVwiLCB7IHRleHQ6IFwiT25seSBlbmFibGUgdGhpcyBzZXR0aW5nIGlmIHRoZSBmcmFtZSBpcyBjYXVzaW5nIGlzc3VlcyBvciBmcmVxdWVudCBjcmFzaGVzLiBUaGlzIHNldHRpbmcgY2F1c2VzIGFsbCBEZXNrdG9wLW9ubHkgc2V0dGluZ3MgdG8gYmUgaWdub3JlZC5cIiB9KTtcclxuICAgICAgICAgICAgICAgIH0pKVxyXG4gICAgICAgICAgICAgICAgLmFkZFRvZ2dsZSh0ID0+IHtcclxuICAgICAgICAgICAgICAgICAgICB0LnNldFZhbHVlKGZyYW1lLmZvcmNlSWZyYW1lKTtcclxuICAgICAgICAgICAgICAgICAgICB0Lm9uQ2hhbmdlKGFzeW5jIHYgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmcmFtZS5mb3JjZUlmcmFtZSA9IHY7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIG5ldyBTZXR0aW5nKGNvbnRlbnQpXHJcbiAgICAgICAgICAgICAgICAuc2V0TmFtZShcIlBhZ2UgWm9vbVwiKVxyXG4gICAgICAgICAgICAgICAgLnNldERlc2MoXCJUaGUgem9vbSB0aGF0IHRoaXMgZnJhbWUncyBwYWdlIHNob3VsZCBiZSBkaXNwbGF5ZWQgd2l0aCwgYXMgYSBwZXJjZW50YWdlLlwiKVxyXG4gICAgICAgICAgICAgICAgLmFkZFRleHQodCA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5pbnB1dEVsLnR5cGUgPSBcIm51bWJlclwiO1xyXG4gICAgICAgICAgICAgICAgICAgIHQuc2V0VmFsdWUoU3RyaW5nKGZyYW1lLnpvb21MZXZlbCAqIDEwMCkpO1xyXG4gICAgICAgICAgICAgICAgICAgIHQub25DaGFuZ2UoYXN5bmMgdiA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZyYW1lLnpvb21MZXZlbCA9IHYubGVuZ3RoID8gTnVtYmVyKHYpIC8gMTAwIDogMTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgbmV3IFNldHRpbmcoY29udGVudClcclxuICAgICAgICAgICAgICAgIC5zZXROYW1lKFwiQWRkaXRpb25hbCBDU1NcIilcclxuICAgICAgICAgICAgICAgIC5zZXREZXNjKGNyZWF0ZUZyYWdtZW50KGYgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGYuY3JlYXRlU3Bhbih7IHRleHQ6IFwiQSBzbmlwcGV0IG9mIGFkZGl0aW9uYWwgQ1NTIHRoYXQgc2hvdWxkIGJlIGFwcGxpZWQgdG8gdGhpcyBmcmFtZS5cIiB9KTtcclxuICAgICAgICAgICAgICAgICAgICBmLmNyZWF0ZUVsKFwiYnJcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgZi5jcmVhdGVFbChcImVtXCIsIHsgdGV4dDogXCJOb3RlIHRoYXQgdGhpcyBpcyBvbmx5IGFwcGxpZWQgb24gRGVza3RvcC5cIiB9KTtcclxuICAgICAgICAgICAgICAgIH0pKVxyXG4gICAgICAgICAgICAgICAgLmFkZFRleHRBcmVhKHQgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHQuaW5wdXRFbC5yb3dzID0gNTtcclxuICAgICAgICAgICAgICAgICAgICB0LmlucHV0RWwuY29scyA9IDUwO1xyXG4gICAgICAgICAgICAgICAgICAgIHQuc2V0VmFsdWUoZnJhbWUuY3VzdG9tQ3NzKTtcclxuICAgICAgICAgICAgICAgICAgICB0Lm9uQ2hhbmdlKGFzeW5jIHYgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmcmFtZS5jdXN0b21Dc3MgPSB2O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBuZXcgQnV0dG9uQ29tcG9uZW50KGNvbnRlbnQpXHJcbiAgICAgICAgICAgICAgICAuc2V0QnV0dG9uVGV4dChcIlJlbW92ZSBGcmFtZVwiKVxyXG4gICAgICAgICAgICAgICAgLm9uQ2xpY2soYXN5bmMgKCkgPT4ge1xyXG4gICAgICAgICAgICAgIC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Xh0KFwiQWRkIEZyYW1lXCIpXHJcbiAgICAgICAgICAgIC5zZXRDbGFzcyhcImN1c3RvbS1mcmFtZXMtYWRkXCIpXHJcbiAgICAgICAgICAgIC5vbkNsaWNrKGFzeW5jICgpID0+IHtcclxuICAgICAgICAgICAgICAgIGxldCBvcHRpb24gPSBkcm9wZG93bi5nZXRWYWx1ZSgpO1xyXG4gICAgICAgICAgICAgICAgaWYgKG9wdGlvbiA9PSBcIm5ld1wiKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MuZnJhbWVzLnB1c2goe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFwiXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXlOYW1lOiBcIk5ldyBGcmFtZVwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpY29uOiBcIlwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBoaWRlT25Nb2JpbGU6IHRydWUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGFkZFJpYmJvbkljb246IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBvcGVuSW5DZW50ZXI6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB6b29tTGV2ZWw6IDEsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvcmNlSWZyYW1lOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgY3VzdG9tQ3NzOiBcIlwiXHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLmZyYW1lcy5wdXNoKHByZXNldHNbb3B0aW9uXSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTt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T4gdi5mcmFtZS50b2dnbGVEZXZUb29scygpXHJcbiAgICAgICAgfSwge1xyXG4gICAgICAgICAgICBuYW1lOiBcIkNvcHkgbGlua1wiLFxyXG4gICAgICAgICAgICBpY29uOiBcImxpbmtcIixcclxuICAgICAgICAgICAgYWN0aW9uOiB2ID0+IG5hdmlnYXRvci5jbGlwYm9hcmQud3JpdGVUZXh0KHYuZnJhbWUuZ2V0Q3VycmVudFVybCgpKVxyXG4gICAgICAgIH0sIHtcclxuICAgICAgICAgICAgbmFtZTogXCJPcGVuIGluIGJyb3dzZXJcIixcclxuICAgICAgICAgICAgaWNvbjogXCJnbG9iZVwiLFxyXG4gICAgICAgICAgICBhY3Rpb246IHYgPT4gb3Blbih2LmZyYW1lLmdldEN1cnJlbnRVcmwoKSlcclxuICAgICAgICB9LCB7XHJcbiAgICAgICAgICAgIG5hbWU6IFwiUmVmcmVzaFwiLFxyXG4gICAgICAgICAgICBpY29uOiBcInJlZnJlc2gtY3dcIixcclxuICAgICAgICAgICAgYWN0aW9uOiB2ID0+IHYuZnJhbWUucmVmcmVzaCgpXHJcbiAgICAgICAgfSwge1xyXG4gICAgICAgICAgICBuYW1lOiBcIkdvIGJhY2tcIixcclxuICAgICAgICAgICAgaWNvbjogXCJhcnJvdy1sZWZ0XCIsXHJcbiAgICAgICAgICAgIGFjdGlvbjogdiA9PiB2LmZyYW1lLmdvQmFjaygpXHJcbiAgICAgICAgfSwge1xyXG4gICAgICAgICAgICBuYW1lOiBcIkdvIGZvcndhcmRcIixcclxuICAgICAgICAgICAgaWNvbjogXCJhcnJvdy1yaWdodFwiLFxyXG4gICAgICAgICAgICBhY3Rpb246IHYgPT4gdi5mcmFtZS5nb0ZvcndhcmQoKVxyXG4gICAgICAgIH1cclxuICAgIF07XHJcblxyXG4gICAgcHJpdmF0ZSByZWFkb25seSBkYXRhOiBDdXN0b21GcmFtZVNldHRpbmdzO1xyXG4gICAgcHJpdmF0ZSByZWFkb25seSBuYW1lOiBzdHJpbmc7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FBZ0I7QUFDeEIsYUFBSyxLQUFLO0FBQUE7QUFBQTtBQUFBOyIsCiAgIm5hbWVzIjogW10KfQo= diff --git a/test-vault/.obsidian/plugins/obsidian-custom-frames/main.js b/test-vault/.obsidian/plugins/obsidian-custom-frames/main.js index f5f8b48..cf86647 100644 --- a/test-vault/.obsidian/plugins/obsidian-custom-frames/main.js +++ b/test-vault/.obsidian/plugins/obsidian-custom-frames/main.js @@ -181,19 +181,28 @@ var CustomFrame = class { this.settings = settings; this.data = data; } - create(additionalStyle = void 0, urlSuffix = void 0) { + create(parent, 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"); + let frameDoc = parent.doc; + this.frame = frameDoc.createElement("webview"); + parent.appendChild(this.frame); this.frame.setAttribute("allowpopups", ""); this.frame.addEventListener("dom-ready", () => { this.frame.setZoomFactor(this.data.zoomLevel); this.frame.insertCSS(this.data.customCss); }); + this.frame.addEventListener("destroyed", () => { + if (frameDoc != parent.doc) { + this.frame.detach(); + this.create(parent, additionalStyle, urlSuffix); + } + }); } else { - this.frame = document.createElement("iframe"); + this.frame = parent.doc.createElement("iframe"); + parent.appendChild(this.frame); 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;`; @@ -208,7 +217,6 @@ var CustomFrame = class { src += urlSuffix; } this.frame.setAttribute("src", src); - return this.frame; } refresh() { if (this.frame instanceof HTMLIFrameElement) { @@ -422,7 +430,7 @@ var _CustomFrameView = class extends import_obsidian3.ItemView { onload() { this.contentEl.empty(); this.contentEl.addClass("custom-frames-view"); - this.contentEl.appendChild(this.frame.create()); + this.frame.create(this.contentEl); } onPaneMenu(menu, source) { super.onPaneMenu(menu, source); @@ -539,7 +547,7 @@ var CustomFramesPlugin = class extends import_obsidian4.Plugin { let urlSuffix = urlSuffixMatch && urlSuffixMatch[1].trim(); urlSuffix || (urlSuffix = ""); let frame = new CustomFrame(this.settings, data); - e.appendChild(frame.create(style, urlSuffix)); + frame.create(e, style, urlSuffix); }); }); } @@ -570,4 +578,4 @@ var CustomFramesPlugin = class extends import_obsidian4.Plugin { }); } }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsic3JjL21haW4udHMiLCAic3JjL2ZyYW1lLnRzIiwgInNyYy9zZXR0aW5ncy50cyIsICJzcmMvc2V0dGluZ3MtdGFiLnRzIiwgInNyYy92aWV3LnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJpbXBvcnQgeyBQbHVnaW4sIFBsYXRmb3JtLCBXb3Jrc3BhY2VMZWFmIH0gZnJvbSBcIm9ic2lkaWFuXCI7XHJcbmltcG9ydCB7IEN1c3RvbUZyYW1lIH0gZnJvbSBcIi4vZnJhbWVcIjtcclxuaW1wb3J0IHsgQ3VzdG9tRnJhbWVzU2V0dGluZ3MsIGRlZmF1bHRTZXR0aW5ncywgZ2V0SWNvbiwgZ2V0SWQgfSBmcm9tIFwiLi9zZXR0aW5nc1wiO1xyXG5pbXBvcnQgeyBDdXN0b21GcmFtZXNTZXR0aW5nVGFiIH0gZnJvbSBcIi4vc2V0dGluZ3MtdGFiXCI7XHJcbmltcG9ydCB7IEN1c3RvbUZyYW1lVmlldyB9IGZyb20gXCIuL3ZpZXdcIjtcclxuXHJcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIEN1c3RvbUZyYW1lc1BsdWdpbiBleHRlbmRzIFBsdWdpbiB7XHJcblxyXG5cdHNldHRpbmdzOiBDdXN0b21GcmFtZXNTZXR0aW5ncztcclxuXHJcblx0YXN5bmMgb25sb2FkKCk6IFByb21pc2U8dm9pZD4ge1xyXG5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GUgaW5zaWRlIG9mIGN1c3RvbSBmcmFtZSBwYW5lcywgaW4gcGl4ZWxzLlwiKVxyXG4gICAgICAgICAgICAuYWRkVGV4dCh0ID0+IHtcclxuICAgICAgICAgICAgICAgIHQuaW5wdXRFbC50eXBlID0gXCJudW1iZXJcIjtcclxuICAgICAgICAgICAgICAgIHQuc2V0VmFsdWUoU3RyaW5nKHRoaXMucGx1Z2luLnNldHRpbmdzLnBhZGRpbmcpKTtcclxuICAgICAgICAgICAgICAgIHQub25DaGFuZ2UoYXN5bmMgdiA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MucGFkZGluZyA9IHYubGVuZ3RoID8gTnVtYmVyKHYpIDogZGVmYXVsdFNldHRpbmdzLnBhZGRpbmc7XHJcbiAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIGZvciAobGV0IGZyYW1lIG9mIHRoaXMucGx1Z2luLnNldHRpbmdzLmZyYW1lcykge1xyXG4gICAgICAgICAgICBsZXQgaGVhZGluZyA9IHRoaXMuY29udGFpbmVyRWwuY3JlYXRlRWwoXCJoM1wiLCB7IHRleHQ6IGZyYW1lLmRpc3BsYXlOYW1lIHx8IFwiVW5uYW1lZCBGcmFtZVwiIH0pO1xyXG4gICAgICAgICAgICBsZXQgdG9nZ2xlID0gbmV3IEJ1dHRvbkNvbXBvbmVudCh0aGlzLmNvbnRhaW5lckVsKVxyXG4gICAgICAgICAgICAgICAgLnNldEJ1dHRvblRleHQoXCJTaG93IFNldHRpbmdzXCIpXHJcbiAgICAgICAgICAgICAgICAuc2V0Q2xhc3MoXCJjdXN0b20tZnJhbWVzLXNob3dcIilcclxuICAgICAgICAgICAgICAgIC5vbkNsaWNrKGFzeW5jICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICBjb250ZW50LmhpZGRlbiA9ICFjb250ZW50LmhpZGRlbjtcclxuICAgICAgICAgICAgICAgICAgICB0b2dnbGUuc2V0QnV0dG9uVGV4dChjb250ZW50LmhpZGRlbiA/IFwiU2hvdyBTZXR0aW5nc1wiIDogXCJIaWRlIFNldHRpbmdzXCIpO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIGxldCBjb250ZW50ID0gdGhpcy5jb250YWluZXJFbC5jcmVhdGVEaXYoKTtcclxuICAgICAgICAgICAgY29udGVudC5oaWRkZW4gPSB0cnVlO1xyXG5cclxuICAgICAgICAgICAgbmV3IFNldHRpbmcoY29udGVudClcclxuICAgICAgICAgICAgICAgIC5zZXROYW1lKFwiRGlzcGxheSBOYW1lXCIpXHJcbiAgICAgICAgICAgICAgICAuc2V0RGVzYyhcIlRoZSBkaXNwbGF5IG5hbWUgdGhhdCB0aGlzIGZyYW1lIHNob3VsZCBoYXZlLlwiKVxyXG4gICAgICAgICAgICAgICAgLmFkZFRleHQodCA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5zZXRWYWx1ZShmcmFtZS5kaXNwbGF5TmFtZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5vbkNoYW5nZShhc3luYyB2ID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZnJhbWUuZGlzcGxheU5hbWUgPSB2O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkaW5nLnNldFRleHQoZnJhbWUuZGlzcGxheU5hbWUgfHwgXCJVbm5hbWVkIEZyYW1lXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBuZXcgU2V0dGluZyhjb250ZW50KVxyXG4gICAgICAgICAgICAgICAgLnNldE5hbWUoXCJJY29uXCIpXHJcbiAgICAgICAgICAgICAgICAuc2V0RGVzYyhjcmVhdGVGcmFnbWVudChmID0+IHtcclxuICAgICAgICAgICAgICAgICAgICBmLmNyZWF0ZVNwYW4oeyB0ZXh0OiBcIlRoZSBpY29uIHRoYXQgdGhpcyBmcmFtZSdzIHBhbmUgc2hvdWxkIGhhdmUuIFRoZSBuYW1lcyBvZiBhbnkgXCIgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgZi5jcmVhdGVFbChcImFcIiwgeyB0ZXh0OiBcIkx1Y2lkZSBpY29uc1wiLCBocmVmOiBcImh0dHBzOi8vbHVjaWRlLmRldi9cIiB9KTtcclxuICAgICAgICAgICAgICAgICAgICBmLmNyZWF0ZVNwYW4oeyB0ZXh0OiBcIiBjYW4gYmUgdXNlZC5cIiB9KTtcclxuICAgICAgICAgICAgICAgIH0pKVxyXG4gICAgICAgICAgICAgICAgLmFkZFRleHQodCA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5zZXRWYWx1ZShmcmFtZS5pY29uKTtcclxuICAgICAgICAgICAgICAgICAgICB0Lm9uQ2hhbmdlKGFzeW5jIHYgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmcmFtZS5pY29uID0gdjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgbmV3IFNldHRpbmcoY29udGVudClcclxuICAgICAgICAgICAgICAgIC5zZXROYW1lKFwiVVJMXCIpXHJcbiAgICAgICAgICAgICAgICAuc2V0RGVzYyhcIlRoZSBVUkwgdGhhdCBzaG91bGQgYmUgb3BlbmVkIGluIHRoaXMgZnJhbWUuXCIpXHJcbiAgICAgICAgICAgICAgICAuYWRkVGV4dCh0ID0+IHtcclxuICAgICAgICAgICAgICAgICAgICB0LnNldFZhbHVlKGZyYW1lLnVybCk7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5vbkNoYW5nZShhc3luYyB2ID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZnJhbWUudXJsID0gdjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgbmV3IFNldHRpbmcoY29udGVudClcclxuICAgICAgICAgICAgICAgIC5zZXROYW1lKFwiRGlzYWJsZSBvbiBNb2JpbGVcIilcclxuICAgICAgICAgICAgICAgIC5zZXREZXNjKFwiQ3VzdG9tIEZyYW1lcyBpcyBhIGxvdCBtb3JlIHJlc3RyaWN0ZWQgb24gbW9iaWxlIGRldmljZXMgYW5kIGRvZXNuJ3QgYWxsb3cgZm9yIHRoZSBzYW1lIHR5cGVzIG9mIGNvbnRlbnQgdG8gYmUgZGlzcGxheWVkLiBJZiBhIGZyYW1lIGRvZXNuJ3Qgd29yayBhcyBleHBlY3RlZCBvbiBtb2JpbGUsIGl0IGNhbiBiZSBkaXNhYmxlZC5cIilcclxuICAgICAgICAgICAgICAgIC5hZGRUb2dnbGUodCA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5zZXRWYWx1ZShmcmFtZS5oaWRlT25Nb2JpbGUpO1xyXG4gICAgICAgICAgICAgICAgICAgIHQub25DaGFuZ2UoYXN5bmMgdiA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZyYW1lLmhpZGVPbk1vYmlsZSA9IHY7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIG5ldyBTZXR0aW5nKGNvbnRlbnQpXHJcbiAgICAgICAgICAgICAgICAuc2V0TmFtZShcIkFkZCBSaWJib24gSWNvblwiKVxyXG4gICAgICAgICAgICAgICAgLnNldERlc2MoXCJXaGV0aGVyIGEgYnV0dG9uIHRvIG9wZW4gdGhpcyBmcmFtZSBzaG91bGQgYmUgYWRkZWQgdG8gdGhlIHJpYmJvbi5cIilcclxuICAgICAgICAgICAgICAgIC5hZGRUb2dnbGUodCA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5zZXRWYWx1ZShmcmFtZS5hZGRSaWJib25JY29uKTtcclxuICAgICAgICAgICAgICAgICAgICB0Lm9uQ2hhbmdlKGFzeW5jIHYgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmcmFtZS5hZGRSaWJib25JY29uID0gdjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgbmV3IFNldHRpbmcoY29udGVudClcclxuICAgICAgICAgICAgICAgIC5zZXROYW1lKFwiT3BlbiBpbiBDZW50ZXJcIilcclxuICAgICAgICAgICAgICAgIC5zZXREZXNjKFwiV2hldGhlciB0aGlzIGZyYW1lIHNob3VsZCBiZSBvcGVuZWQgaW4gdGhlIHVucGlubmVkIGNlbnRlciBlZGl0b3IgcmF0aGVyIHRoYW4gb25lIG9mIHRoZSBwYW5lcyBvbiB0aGUgc2lkZS4gVGhpcyBpcyB1c2VmdWwgZm9yIHNpdGVzIHRoYXQgZG9uJ3Qgd29yayB3ZWxsIGluIGEgbmFycm93IHZpZXcsIG9yIHNpdGVzIHRoYXQgZG9uJ3QgcmVxdWlyZSBhIG5vdGUgdG8gYmUgb3BlbiB3aGVuIHZpZXdlZC5cIilcclxuICAgICAgICAgICAgICAgIC5hZGRUb2dnbGUodCA9PiB7XHJcbiAgICAgICAgICAgIC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V0VmFsdWUoZnJhbWUuZm9yY2VJZnJhbWUpO1xyXG4gICAgICAgICAgICAgICAgICAgIHQub25DaGFuZ2UoYXN5bmMgdiA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZyYW1lLmZvcmNlSWZyYW1lID0gdjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgbmV3IFNldHRpbmcoY29udGVudClcclxuICAgICAgICAgICAgICAgIC5zZXROYW1lKFwiUGFnZSBab29tXCIpXHJcbiAgICAgICAgICAgICAgICAuc2V0RGVzYyhcIlRoZSB6b29tIHRoYXQgdGhpcyBmcmFtZSdzIHBhZ2Ugc2hvdWxkIGJlIGRpc3BsYXllZCB3aXRoLCBhcyBhIHBlcmNlbnRhZ2UuXCIpXHJcbiAgICAgICAgICAgICAgICAuYWRkVGV4dCh0ID0+IHtcclxuICAgICAgICAgICAgICAgICAgICB0LmlucHV0RWwudHlwZSA9IFwibnVtYmVyXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5zZXRWYWx1ZShTdHJpbmcoZnJhbWUuem9vbUxldmVsICogMTAwKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5vbkNoYW5nZShhc3luYyB2ID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZnJhbWUuem9vbUxldmVsID0gdi5sZW5ndGggPyBOdW1iZXIodikgLyAxMDAgOiAxO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBuZXcgU2V0dGluZyhjb250ZW50KVxyXG4gICAgICAgICAgICAgICAgLnNldE5hbWUoXCJBZGRpdGlvbmFsIENTU1wiKVxyXG4gICAgICAgICAgICAgICAgLnNldERlc2MoY3JlYXRlRnJhZ21lbnQoZiA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgZi5jcmVhdGVTcGFuKHsgdGV4dDogXCJBIHNuaXBwZXQgb2YgYWRkaXRpb25hbCBDU1MgdGhhdCBzaG91bGQgYmUgYXBwbGllZCB0byB0aGlzIGZyYW1lLlwiIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIGYuY3JlYXRlRWwoXCJiclwiKTtcclxuICAgICAgICAgICAgICAgICAgICBmLmNyZWF0ZUVsKFwiZW1cIiwgeyB0ZXh0OiBcIk5vdGUgdGhhdCB0aGlzIGlzIG9ubHkgYXBwbGllZCBvbiBEZXNrdG9wLlwiIH0pO1xyXG4gICAgICAgICAgICAgICAgfSkpXHJcbiAgICAgICAgICAgICAgICAuYWRkVGV4dEFyZWEodCA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5pbnB1dEVsLnJvd3MgPSA1O1xyXG4gICAgICAgICAgICAgICAgICAgIHQuaW5wdXRFbC5jb2xzID0gNTA7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5zZXRWYWx1ZShmcmFtZS5jdXN0b21Dc3MpO1xyXG4gICAgICAgICAgICAgICAgICAgIHQub25DaGFuZ2UoYXN5bmMgdiA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZyYW1lLmN1c3RvbUNzcyA9IHY7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIG5ldyBCdXR0b25Db21wb25lbnQoY29udGVudClcclxuICAgICAgICAgICAgICAgIC5zZXRCdXR0b25UZXh0KFwiUmVtb3ZlIEZyYW1lXCIpXHJcbiAgICAgICAgICAgICAgICAub25D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ERpdilcclxuICAgICAgICAgICAgLnNldEJ1dHRvblRleHQoXCJBZGQgRnJhbWVcIilcclxuICAgICAgICAgICAgLnNldENsYXNzKFwiY3VzdG9tLWZyYW1lcy1hZGRcIilcclxuICAgICAgICAgICAgLm9uQ2xpY2soYXN5bmMgKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgbGV0IG9wdGlvbiA9IGRyb3Bkb3duLmdldFZhbHVlKCk7XHJcbiAgICAgICAgICAgICAgICBpZiAob3B0aW9uID09IFwibmV3XCIpIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy5mcmFtZXMucHVzaCh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXCJcIixcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheU5hbWU6IFwiTmV3IEZyYW1lXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGljb246IFwiXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGhpZGVPbk1vYmlsZTogdHJ1ZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYWRkUmliYm9uSWNvbjogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wZW5JbkNlbnRlcjogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHpvb21MZXZlbDogMSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yY2VJZnJhbWU6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjdXN0b21Dc3M6IFwiXCJcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MuZnJhbWVzLnB1c2gocHJlc2V0c1tvcHRpb25dKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLnNhdmVT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JcbiAgICAgICAgICAgIGFjdGlvbjogdiA9PiB2LmZyYW1lLnRvZ2dsZURldlRvb2xzKClcclxuICAgICAgICB9LCB7XHJcbiAgICAgICAgICAgIG5hbWU6IFwiQ29weSBsaW5rXCIsXHJcbiAgICAgICAgICAgIGljb246IFwibGlua1wiLFxyXG4gICAgICAgICAgICBhY3Rpb246IHYgPT4gbmF2aWdhdG9yLmNsaXBib2FyZC53cml0ZVRleHQodi5mcmFtZS5nZXRDdXJyZW50VXJsKCkpXHJcbiAgICAgICAgfSwge1xyXG4gICAgICAgICAgICBuYW1lOiBcIk9wZW4gaW4gYnJvd3NlclwiLFxyXG4gICAgICAgICAgICBpY29uOiBcImdsb2JlXCIsXHJcbiAgICAgICAgICAgIGFjdGlvbjogdiA9PiBvcGVuKHYuZnJhbWUuZ2V0Q3VycmVudFVybCgpKVxyXG4gICAgICAgIH0sIHtcclxuICAgICAgICAgICAgbmFtZTogXCJSZWZyZXNoXCIsXHJcbiAgICAgICAgICAgIGljb246IFwicmVmcmVzaC1jd1wiLFxyXG4gICAgICAgICAgICBhY3Rpb246IHYgPT4gdi5mcmFtZS5yZWZyZXNoKClcclxuICAgICAgICB9LCB7XHJcbiAgICAgICAgICAgIG5hbWU6IFwiR28gYmFja1wiLFxyXG4gICAgICAgICAgICBpY29uOiBcImFycm93LWxlZnRcIixcclxuICAgICAgICAgICAgYWN0aW9uOiB2ID0+IHYuZnJhbWUuZ29CYWNrKClcclxuICAgICAgICB9LCB7XHJcbiAgICAgICAgICAgIG5hbWU6IFwiR28gZm9yd2FyZFwiLFxyXG4gICAgICAgICAgICBpY29uOiBcImFycm93LXJpZ2h0XCIsXHJcbiAgICAgICAgICAgIGFjdGlvbjogdiA9PiB2LmZyYW1lLmdvRm9yd2FyZCgpXHJcbiAgICAgICAgfVxyXG4gICAgXTtcclxuXHJcbiAgICBwcml2YXRlIHJlYWRvbmx5IGRhdGE6IEN1c3RvbUZyYW1lU2V0dGluZ3M7XHJcbiAgICBwcml2Y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Ghpcy5jb250YWluZXJFbClcclxuICAgICAgICAgICAgICAgIC5zZXRCdXR0b25UZXh0KFwiU2hvdyBTZXR0aW5nc1wiKVxyXG4gICAgICAgICAgICAgICAgLnNldENsYXNzKFwiY3VzdG9tLWZyYW1lcy1zaG93XCIpXHJcbiAgICAgICAgICAgICAgICAub25DbGljayhhc3luYyAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgY29udGVudC5oaWRkZW4gPSAhY29udGVudC5oaWRkZW47XHJcbiAgICAgICAgICAgICAgICAgICAgdG9nZ2xlLnNldEJ1dHRvblRleHQoY29udGVudC5oaWRkZW4gPyBcIlNob3cgU2V0dGluZ3NcIiA6IFwiSGlkZSBTZXR0aW5nc1wiKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBsZXQgY29udGVudCA9IHRoaXMuY29udGFpbmVyRWwuY3JlYXRlRGl2KCk7XHJcbiAgICAgICAgICAgIGNvbnRlbnQuaGlkZGVuID0gdHJ1ZTtcclxuXHJcbiAgICAgICAgICAgIG5ldyBTZXR0aW5nKGNvbnRlbnQpXHJcbiAgICAgICAgICAgICAgICAuc2V0TmFtZShcIkRpc3BsYXkgTmFtZVwiKVxyXG4gICAgICAgICAgICAgICAgLnNldERlc2MoXCJUaGUgZGlzcGxheSBuYW1lIHRoYXQgdGhpcyBmcmFtZSBzaG91bGQgaGF2ZS5cIilcclxuICAgICAgICAgICAgICAgIC5hZGRUZXh0KHQgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHQuc2V0VmFsdWUoZnJhbWUuZGlzcGxheU5hbWUpO1xyXG4gICAgICAgICAgICAgICAgICAgIHQub25DaGFuZ2UoYXN5bmMgdiA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZyYW1lLmRpc3BsYXlOYW1lID0gdjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGluZy5zZXRUZXh0KGZyYW1lLmRpc3BsYXlOYW1lIHx8IFwiVW5uYW1lZCBGcmFtZVwiKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgbmV3IFNldHRpbmcoY29udGVudClcclxuICAgICAgICAgICAgICAgIC5zZXROYW1lKFwiSWNvblwiKVxyXG4gICAgICAgICAgICAgICAgLnNldERlc2MoY3JlYXRlRnJhZ21lbnQoZiA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgZi5jcmVhdGVTcGFuKHsgdGV4dDogXCJUaGUgaWNvbiB0aGF0IHRoaXMgZnJhbWUncyBwYW5lIHNob3VsZCBoYXZlLiBUaGUgbmFtZXMgb2YgYW55IFwiIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIGYuY3JlYXRlRWwoXCJhXCIsIHsgdGV4dDogXCJMdWNpZGUgaWNvbnNcIiwgaHJlZjogXCJodHRwczovL2x1Y2lkZS5kZXYvXCIgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgZi5jcmVhdGVTcGFuKHsgdGV4dDogXCIgY2FuIGJlIHVzZWQuXCIgfSk7XHJcbiAgICAgICAgICAgICAgICB9KSlcclxuICAgICAgICAgICAgICAgIC5hZGRUZXh0KHQgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHQuc2V0VmFsdWUoZnJhbWUuaWNvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5vbkNoYW5nZShhc3luYyB2ID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZnJhbWUuaWNvbiA9IHY7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIG5ldyBTZXR0aW5nKG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jIHYgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmcmFtZS5oaWRlT25Nb2JpbGUgPSB2O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBuZXcgU2V0dGluZyhjb250ZW50KVxyXG4gICAgICAgICAgICAgICAgLnNldE5hbWUoXCJBZGQgUmliYm9uIEljb25cIilcclxuICAgICAgICAgICAgICAgIC5zZXREZXNjKFwiV2hldGhlciBhIGJ1dHRvbiB0byBvcGVuIHRoaXMgZnJhbWUgc2hvdWxkIGJlIGFkZGVkIHRvIHRoZSByaWJib24uXCIpXHJcbiAgICAgICAgICAgICAgICAuYWRkVG9nZ2xlKHQgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHQuc2V0VmFsdWUoZnJhbWUuYWRkUmliYm9uSWNvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5vbkNoYW5nZShhc3luYyB2ID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZnJhbWUuYWRkUmliYm9uSWNvbiA9IHY7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIG5ldyBTZXR0aW5nKGNvbnRlbnQpXHJcbiAgICAgICAgICAgICAgICAuc2V0TmFtZShcIk9wZW4gaW4gQ2VudGVyXCIpXHJcbiAgICAgICAgICAgICAgICAuc2V0RGVzYyhcIldoZXRoZXIgdGhpcyBmcmFtZSBzaG91bGQgYmUgb3BlbmVkIGluIHRoZSB1bnBpbm5lZCBjZW50ZXIgZWRpdG9yIHJhdGhlciB0aGFuIG9uZSBvZiB0aGUgcG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pcyBjYXVzaW5nIGlzc3VlcyBvciBmcmVxdWVudCBjcmFzaGVzLiBUaGlzIHNldHRpbmcgY2F1c2VzIGFsbCBEZXNrdG9wLW9ubHkgc2V0dGluZ3MgdG8gYmUgaWdub3JlZC5cIiB9KTtcclxuICAgICAgICAgICAgICAgIH0pKVxyXG4gICAgICAgICAgICAgICAgLmFkZFRvZ2dsZSh0ID0+IHtcclxuICAgICAgICAgICAgICAgICAgICB0LnNldFZhbHVlKGZyYW1lLmZvcmNlSWZyYW1lKTtcclxuICAgICAgICAgICAgICAgICAgICB0Lm9uQ2hhbmdlKGFzeW5jIHYgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmcmFtZS5mb3JjZUlmcmFtZSA9IHY7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIG5ldyBTZXR0aW5nKGNvbnRlbnQpXHJcbiAgICAgICAgICAgICAgICAuc2V0TmFtZShcIlBhZ2UgWm9vbVwiKVxyXG4gICAgICAgICAgICAgICAgLnNldERlc2MoXCJUaGUgem9vbSB0aGF0IHRoaXMgZnJhbWUncyBwYWdlIHNob3VsZCBiZSBkaXNwbGF5ZWQgd2l0aCwgYXMgYSBwZXJjZW50YWdlLlwiKVxyXG4gICAgICAgICAgICAgICAgLmFkZFRleHQodCA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdC5pbnB1dEVsLnR5cGUgPSBcIm51bWJlclwiO1xyXG4gICAgICAgICAgICAgICAgICAgIHQuc2V0VmFsdWUoU3RyaW5nKGZyYW1lLnpvb21MZXZlbCAqIDEwMCkpO1xyXG4gICAgICAgICAgICAgICAgICAgIHQub25DaGFuZ2UoYXN5bmMgdiA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZyYW1lLnpvb21MZXZlbCA9IHYubGVuZ3RoID8gTnVtYmVyKHYpIC8gMTAwIDogMTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgbmV3IFNldHRpbmcoY29udGVudClcclxuICAgICAgICAgICAgICAgIC5zZXROYW1lKFwiQWRkaXRpb25hbCBDU1NcIilcclxuICAgICAgICAgICAgICAgIC5zZXREZXNjKGNyZWF0ZUZyYWdtZW50KGYgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGYuY3JlYXRlU3Bhbih7IHRleHQ6IFwiQSBzbmlwcGV0IG9mIGFkZGl0aW9uYWwgQ1NTIHRoYXQgc2hvdWxkIGJlIGFwcGxpZWQgdG8gdGhpcyBmcmFtZS5cIiB9KTtcclxuICAgICAgICAgICAgICAgICAgICBmLmNyZWF0ZUVsKFwiYnJcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgZi5jcmVhdGVFbChcImVtXCIsIHsgdGV4dDogXCJOb3RlIHRoYXQgdGhpcyBpcyBvbmx5IGFwcGxpZWQgb24gRGVza3RvcC5cIiB9KTtcclxuICAgICAgICAgICAgICAgIH0pKVxyXG4gICAgICAgICAgICAgICAgLmFkZFRleHRBcmVhKHQgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHQuaW5wdXRFbC5yb3dzID0gNTtcclxuICAgICAgICAgICAgICAgICAgICB0LmlucHV0RWwuY29scyA9IDUwO1xyXG4gICAgICAgICAgICAgICAgICAgIHQuc2V0VmFsdWUoZnJhbWUuY3VzdG9tQ3NzKTtcclxuICAgICAgICAgICAgICAgICAgICB0Lm9uQ2hhbmdlKGFzeW5jIHYgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmcmFtZS5jdXN0b21Dc3MgPSB2O1xyXG4gICAgICAgICAgICAgICAgIC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REaXYpO1xyXG4gICAgICAgIGRyb3Bkb3duLmFkZE9wdGlvbihcIm5ld1wiLCBcIkN1c3RvbVwiKTtcclxuICAgICAgICBmb3IgKGxldCBrZXkgb2YgT2JqZWN0LmtleXMocHJlc2V0cykpXHJcbiAgICAgICAgICAgIGRyb3Bkb3duLmFkZE9wdGlvbihrZXksIHByZXNldHNba2V5XS5kaXNwbGF5TmFtZSk7XHJcbiAgICAgICAgbmV3IEJ1dHRvbkNvbXBvbmVudChhZGREaXYpXHJcbiAgICAgICAgICAgIC5zZXRCdXR0b25UZXh0KFwiQWRkIEZyYW1lXCIpXHJcbiAgICAgICAgICAgIC5zZXRDbGFzcyhcImN1c3RvbS1mcmFtZXMtYWRkXCIpXHJcbiAgICAgICAgICAgIC5vbkNsaWNrKGFzeW5jICgpID0+IHtcclxuICAgICAgICAgICAgICAgIGxldCBvcHRpb24gPSBkcm9wZG93bi5nZXRWYWx1ZSgpO1xyXG4gICAgICAgICAgICAgICAgaWYgKG9wdGlvbiA9PSBcIm5ld1wiKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MuZnJhbWVzLnB1c2goe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFwiXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXlOYW1lOiBcIk5ldyBGcmFtZVwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpY29uOiBcIlwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBoaWRlT25Nb2JpbGU6IHRydWUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGFkZFJpYmJvbkljb246IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBvcGVuSW5DZW50ZXI6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB6b29tTGV2ZWw6IDEsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvcmNlSWZyYW1lOiBmYWxzZ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ICAgICAge1xyXG4gICAgICAgICAgICBuYW1lOiBcIlJldHVybiB0byBvcmlnaW5hbCBwYWdlXCIsXHJcbiAgICAgICAgICAgIGljb246IFwiaG9tZVwiLFxyXG4gICAgICAgICAgICBhY3Rpb246IHYgPT4gdi5mcmFtZS5yZXR1cm4oKVxyXG4gICAgICAgIH0sIHtcclxuICAgICAgICAgICAgbmFtZTogXCJPcGVuIGRldiB0b29sc1wiLFxyXG4gICAgICAgICAgICBpY29uOiBcImJpbmFyeVwiLFxyXG4gICAgICAgICAgICBhY3Rpb246IHYgPT4gdi5mcmFtZS50b2dnbGVEZXZUb29scygpXHJcbiAgICAgICAgfSwge1xyXG4gICAgICAgICAgICBuYW1lOiBcIkNvcHkgbGlua1wiLFxyXG4gICAgICAgICAgICBpY29uOiBcImxpbmtcIixcclxuICAgICAgICAgICAgYWN0aW9uOiB2ID0+IG5hdmlnYXRvci5jbGlwYm9hcmQud3JpdGVUZXh0KHYuZnJhbWUuZ2V0Q3VycmVudFVybCgpKVxyXG4gICAgICAgIH0sIHtcclxuICAgICAgICAgICAgbmFtZTogXCJPcGVuIGluIGJyb3dzZXJcIixcclxuICAgICAgICAgICAgaWNvbjogXCJnbG9iZVwiLFxyXG4gICAgICAgICAgICBhY3Rpb246IHYgPT4gb3Blbih2LmZyYW1lLmdldEN1cnJlbnRVcmwoKSlcclxuICAgICAgICB9LCB7XHJcbiAgICAgICAgICAgIG5hbWU6IFwiUmVmcmVzaFwiLFxyXG4gICAgICAgICAgICBpY29uOiBcInJlZnJlc2gtY3dcIixcclxuICAgICAgICAgICAgYWN0aW9uOiB2ID0+IHYuZnJhbWUucmVmcmVzaCgpXHJcbiAgICAgICAgfSwge1xyXG4gICAgICAgICAgICBuYW1lOiBcIkdvIGJhY2tcIixcclxuICAgICAgICAgICAgaWNvbjogXCJhcnJvdy1sZWZ0XCIsXHJcbiAgICAgICAgICAgIGFjdGlvbjogdiA9PiB2LmZyYW1lLmdvQmFjaygpXHJcbiAgICAgICAg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bWUuY3JlYXRlKHRoaXMuY29udGVudEVsKTtcclxuICAgIH1cclxuXHJcbiAgICBvblBhbmVNZW51KG1lbnU6IE1lbnUsIHNvdXJjZTogc3RyaW5nKTogdm9pZCB7XHJcbiAgICAgICAgc3VwZXIub25QYW5lTWVudShtZW51LCBzb3VyY2UpO1xyXG4gICAgICAgIGZvciAobGV0IGFjdGlvbiBvZiBDdXN0b21GcmFtZVZpZXcuYWN0aW9ucykge1xyXG4gICAgICAgICAgICBtZW51LmFkZEl0ZW0oaSA9PiB7XHJcbiAgICAgICAgICAgICAgICBpLnNldFRpdGxlKGFjdGlvbi5uYW1lKTtcclxuICAgICAgICAgICAgICAgIGkuc2V0SWNvbihhY3Rpb24uaWNvbik7XHJcbiAgICAgICAgICAgICAgICBpLm9uQ2xpY2soKCkgPT4gYWN0aW9uLmFjdGlvbih0aGlzKSk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBnZXRWaWV3VHlwZSgpOiBzdHJpbmcge1xyXG4gICAgICAgIHJldHVybiB0aGlzLm5hbWU7XHJcbiAgICB9XHJcblxyXG4gICAgZ2V0RGlzcGxheVRleHQoKTogc3RyaW5nIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5kYXRhLmRpc3BsYXlOYW1lO1xyXG4gICAgfVxyXG5cclxuICAgIGdldEljb24oKTogc3RyaW5nIHtcclxuICAgICAgICByZXR1cm4gZ2V0SWNvbih0aGlzLmRhdGEpO1xyXG4gICAgfVxyXG5cclxuICAgIGZvY3VzKCk6IHZvaWQge1xyXG4gICAgICAgIHRoaXMuZnJhbWUuZm9jdXMoKTtcclxuICAgIH1cclxufVxyXG5cclxuaW50ZXJmYWNlIEFjdGlvbiB7XHJcbiAgICBuYW1lOiBzdHJpbmc7XHJcbiAgICBpY29uOiBzdHJpbmc7XHJcbiAgICBhY3Rpb246ICh2aWV3OiBDdXN0b21GcmFtZVZpZXcpID0+IGFueTtcclxufVxyXG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