var zt=Object.create;var _=Object.defineProperty;var qt=Object.getOwnPropertyDescriptor;var Vt=Object.getOwnPropertyNames;var Jt=Object.getPrototypeOf,Wt=Object.prototype.hasOwnProperty;var Qt=(i,n)=>()=>(n||i((n={exports:{}}).exports,n),n.exports),Gt=(i,n)=>{for(var e in n)_(i,e,{get:n[e],enumerable:!0})},ut=(i,n,e,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of Vt(n))!Wt.call(i,s)&&s!==e&&_(i,s,{get:()=>n[s],enumerable:!(t=qt(n,s))||t.enumerable});return i};var Kt=(i,n,e)=>(e=i!=null?zt(Jt(i)):{},ut(n||!i||!i.__esModule?_(e,"default",{value:i,enumerable:!0}):e,i)),Zt=i=>ut(_({},"__esModule",{value:!0}),i);var a=(i,n,e)=>new Promise((t,s)=>{var o=c=>{try{u(e.next(c))}catch(g){s(g)}},r=c=>{try{u(e.throw(c))}catch(g){s(g)}},u=c=>c.done?t(c.value):Promise.resolve(c.value).then(o,r);u((e=e.apply(i,n)).next())});var _t=Qt(l=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0});var f=require("obsidian"),it="YYYY-MM-DD",st="gggg-[W]ww",Et="YYYY-MM",It="YYYY-[Q]Q",Ft="YYYY";function L(i){var e,t;let n=window.app.plugins.getPlugin("periodic-notes");return n&&((t=(e=n.settings)==null?void 0:e[i])==null?void 0:t.enabled)}function B(){var i,n,e,t;try{let{internalPlugins:s,plugins:o}=window.app;if(L("daily")){let{format:g,folder:d,template:p}=((n=(i=o.getPlugin("periodic-notes"))==null?void 0:i.settings)==null?void 0:n.daily)||{};return{format:g||it,folder:(d==null?void 0:d.trim())||"",template:(p==null?void 0:p.trim())||""}}let{folder:r,format:u,template:c}=((t=(e=s.getPluginById("daily-notes"))==null?void 0:e.instance)==null?void 0:t.options)||{};return{format:u||it,folder:(r==null?void 0:r.trim())||"",template:(c==null?void 0:c.trim())||""}}catch(s){console.info("No custom daily note settings found!",s)}}function R(){var i,n,e,t,s,o,r;try{let u=window.app.plugins,c=(i=u.getPlugin("calendar"))==null?void 0:i.options,g=(e=(n=u.getPlugin("periodic-notes"))==null?void 0:n.settings)==null?void 0:e.weekly;if(L("weekly"))return{format:g.format||st,folder:((t=g.folder)==null?void 0:t.trim())||"",template:((s=g.template)==null?void 0:s.trim())||""};let d=c||{};return{format:d.weeklyNoteFormat||st,folder:((o=d.weeklyNoteFolder)==null?void 0:o.trim())||"",template:((r=d.weeklyNoteTemplate)==null?void 0:r.trim())||""}}catch(u){console.info("No custom weekly note settings found!",u)}}function k(){var n,e,t,s;let i=window.app.plugins;try{let o=L("monthly")&&((e=(n=i.getPlugin("periodic-notes"))==null?void 0:n.settings)==null?void 0:e.monthly)||{};return{format:o.format||Et,folder:((t=o.folder)==null?void 0:t.trim())||"",template:((s=o.template)==null?void 0:s.trim())||""}}catch(o){console.info("No custom monthly note settings found!",o)}}function M(){var n,e,t,s;let i=window.app.plugins;try{let o=L("quarterly")&&((e=(n=i.getPlugin("periodic-notes"))==null?void 0:n.settings)==null?void 0:e.quarterly)||{};return{format:o.format||It,folder:((t=o.folder)==null?void 0:t.trim())||"",template:((s=o.template)==null?void 0:s.trim())||""}}catch(o){console.info("No custom quarterly note settings found!",o)}}function O(){var n,e,t,s;let i=window.app.plugins;try{let o=L("yearly")&&((e=(n=i.getPlugin("periodic-notes"))==null?void 0:n.settings)==null?void 0:e.yearly)||{};return{format:o.format||Ft,folder:((t=o.folder)==null?void 0:t.trim())||"",template:((s=o.template)==null?void 0:s.trim())||""}}catch(o){console.info("No custom yearly note settings found!",o)}}function Dt(...i){let n=[];for(let t=0,s=i.length;t{let X=t(),tt=i.clone().set({hour:X.get("hour"),minute:X.get("minute"),second:X.get("second")});return y&&tt.add(parseInt(N,10),b),h?tt.format(h.substring(1).trim()):tt.format(o)}).replace(/{{\s*yesterday\s*}}/gi,i.clone().subtract(1,"day").format(o)).replace(/{{\s*tomorrow\s*}}/gi,i.clone().add(1,"d").format(o)));return n.foldManager.save(p,c),p}catch(p){console.error(`Failed to create file: '${d}'`,p),new f.Notice("Unable to create new file.")}})}function oe(i,n){var e;return(e=n[C(i,"day")])!=null?e:null}function re(){let{vault:i}=window.app,{folder:n}=B(),e=i.getAbstractFileByPath(f.normalizePath(n));if(!e)throw new at("Failed to find daily notes folder");let t={};return f.Vault.recurseChildren(e,s=>{if(s instanceof f.TFile){let o=I(s,"day");if(o){let r=C(o,"day");t[r]=s}}}),t}var ot=class extends Error{};function le(){let{moment:i}=window,n=i.localeData()._week.dow,e=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];for(;n;)e.push(e.shift()),n--;return e}function ge(i){return le().indexOf(i.toLowerCase())}function kt(i){return a(this,null,function*(){let{vault:n}=window.app,{template:e,format:t,folder:s}=R(),[o,r]=yield E(e),u=i.format(t),c=yield x(s,u);try{let g=yield n.create(c,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,p,P,w,y,N)=>{let b=window.moment(),h=i.clone().set({hour:b.get("hour"),minute:b.get("minute"),second:b.get("second")});return P&&h.add(parseInt(w,10),y),N?h.format(N.substring(1).trim()):h.format(t)}).replace(/{{\s*title\s*}}/gi,u).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\s*:(.*?)}}/gi,(d,p,P)=>{let w=ge(p);return i.weekday(w).format(P.trim())}));return window.app.foldManager.save(g,r),g}catch(g){console.error(`Failed to create file: '${c}'`,g),new f.Notice("Unable to create new file.")}})}function ue(i,n){var e;return(e=n[C(i,"week")])!=null?e:null}function ce(){let i={};if(!Ot())return i;let{vault:n}=window.app,{folder:e}=R(),t=n.getAbstractFileByPath(f.normalizePath(e));if(!t)throw new ot("Failed to find weekly notes folder");return f.Vault.recurseChildren(t,s=>{if(s instanceof f.TFile){let o=I(s,"week");if(o){let r=C(o,"week");i[r]=s}}}),i}var rt=class extends Error{};function Mt(i){return a(this,null,function*(){let{vault:n}=window.app,{template:e,format:t,folder:s}=k(),[o,r]=yield E(e),u=i.format(t),c=yield x(s,u);try{let g=yield n.create(c,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,p,P,w,y,N)=>{let b=window.moment(),h=i.clone().set({hour:b.get("hour"),minute:b.get("minute"),second:b.get("second")});return P&&h.add(parseInt(w,10),y),N?h.format(N.substring(1).trim()):h.format(t)}).replace(/{{\s*date\s*}}/gi,u).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,u));return window.app.foldManager.save(g,r),g}catch(g){console.error(`Failed to create file: '${c}'`,g),new f.Notice("Unable to create new file.")}})}function de(i,n){var e;return(e=n[C(i,"month")])!=null?e:null}function me(){let i={};if(!xt())return i;let{vault:n}=window.app,{folder:e}=k(),t=n.getAbstractFileByPath(f.normalizePath(e));if(!t)throw new rt("Failed to find monthly notes folder");return f.Vault.recurseChildren(t,s=>{if(s instanceof f.TFile){let o=I(s,"month");if(o){let r=C(o,"month");i[r]=s}}}),i}var lt=class extends Error{};function pe(i){return a(this,null,function*(){let{vault:n}=window.app,{template:e,format:t,folder:s}=M(),[o,r]=yield E(e),u=i.format(t),c=yield x(s,u);try{let g=yield n.create(c,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,p,P,w,y,N)=>{let b=window.moment(),h=i.clone().set({hour:b.get("hour"),minute:b.get("minute"),second:b.get("second")});return P&&h.add(parseInt(w,10),y),N?h.format(N.substring(1).trim()):h.format(t)}).replace(/{{\s*date\s*}}/gi,u).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,u));return window.app.foldManager.save(g,r),g}catch(g){console.error(`Failed to create file: '${c}'`,g),new f.Notice("Unable to create new file.")}})}function fe(i,n){var e;return(e=n[C(i,"quarter")])!=null?e:null}function he(){let i={};if(!$t())return i;let{vault:n}=window.app,{folder:e}=M(),t=n.getAbstractFileByPath(f.normalizePath(e));if(!t)throw new lt("Failed to find quarterly notes folder");return f.Vault.recurseChildren(t,s=>{if(s instanceof f.TFile){let o=I(s,"quarter");if(o){let r=C(o,"quarter");i[r]=s}}}),i}var gt=class extends Error{};function be(i){return a(this,null,function*(){let{vault:n}=window.app,{template:e,format:t,folder:s}=O(),[o,r]=yield E(e),u=i.format(t),c=yield x(s,u);try{let g=yield n.create(c,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,p,P,w,y,N)=>{let b=window.moment(),h=i.clone().set({hour:b.get("hour"),minute:b.get("minute"),second:b.get("second")});return P&&h.add(parseInt(w,10),y),N?h.format(N.substring(1).trim()):h.format(t)}).replace(/{{\s*date\s*}}/gi,u).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,u));return window.app.foldManager.save(g,r),g}catch(g){console.error(`Failed to create file: '${c}'`,g),new f.Notice("Unable to create new file.")}})}function we(i,n){var e;return(e=n[C(i,"year")])!=null?e:null}function ye(){let i={};if(!Ut())return i;let{vault:n}=window.app,{folder:e}=O(),t=n.getAbstractFileByPath(f.normalizePath(e));if(!t)throw new gt("Failed to find yearly notes folder");return f.Vault.recurseChildren(t,s=>{if(s instanceof f.TFile){let o=I(s,"year");if(o){let r=C(o,"year");i[r]=s}}}),i}function Te(){var t,s;let{app:i}=window,n=i.internalPlugins.plugins["daily-notes"];if(n&&n.enabled)return!0;let e=i.plugins.getPlugin("periodic-notes");return e&&((s=(t=e.settings)==null?void 0:t.daily)==null?void 0:s.enabled)}function Ot(){var e,t;let{app:i}=window;if(i.plugins.getPlugin("calendar"))return!0;let n=i.plugins.getPlugin("periodic-notes");return n&&((t=(e=n.settings)==null?void 0:e.weekly)==null?void 0:t.enabled)}function xt(){var e,t;let{app:i}=window,n=i.plugins.getPlugin("periodic-notes");return n&&((t=(e=n.settings)==null?void 0:e.monthly)==null?void 0:t.enabled)}function $t(){var e,t;let{app:i}=window,n=i.plugins.getPlugin("periodic-notes");return n&&((t=(e=n.settings)==null?void 0:e.quarterly)==null?void 0:t.enabled)}function Ut(){var e,t;let{app:i}=window,n=i.plugins.getPlugin("periodic-notes");return n&&((t=(e=n.settings)==null?void 0:e.yearly)==null?void 0:t.enabled)}function Pe(i){return{day:B,week:R,month:k,quarter:M,year:O}[i]()}function ve(i,n){return{day:Rt,month:Mt,week:kt}[i](n)}l.DEFAULT_DAILY_NOTE_FORMAT=it;l.DEFAULT_MONTHLY_NOTE_FORMAT=Et;l.DEFAULT_QUARTERLY_NOTE_FORMAT=It;l.DEFAULT_WEEKLY_NOTE_FORMAT=st;l.DEFAULT_YEARLY_NOTE_FORMAT=Ft;l.appHasDailyNotesPluginLoaded=Te;l.appHasMonthlyNotesPluginLoaded=xt;l.appHasQuarterlyNotesPluginLoaded=$t;l.appHasWeeklyNotesPluginLoaded=Ot;l.appHasYearlyNotesPluginLoaded=Ut;l.createDailyNote=Rt;l.createMonthlyNote=Mt;l.createPeriodicNote=ve;l.createQuarterlyNote=pe;l.createWeeklyNote=kt;l.createYearlyNote=be;l.getAllDailyNotes=re;l.getAllMonthlyNotes=me;l.getAllQuarterlyNotes=he;l.getAllWeeklyNotes=ce;l.getAllYearlyNotes=ye;l.getDailyNote=oe;l.getDailyNoteSettings=B;l.getDateFromFile=I;l.getDateFromPath=ae;l.getDateUID=C;l.getMonthlyNote=de;l.getMonthlyNoteSettings=k;l.getPeriodicNoteSettings=Pe;l.getQuarterlyNote=fe;l.getQuarterlyNoteSettings=M;l.getTemplateInfo=E;l.getWeeklyNote=ue;l.getWeeklyNoteSettings=R;l.getYearlyNote=we;l.getYearlyNoteSettings=O});var Ne={};Gt(Ne,{default:()=>Z});module.exports=Zt(Ne);var jt=require("obsidian");var T=require("obsidian");var q=require("obsidian");var ct=require("obsidian"),v=class extends ct.FuzzySuggestModal{constructor(e){super(e.app);this.scope.register(["Shift"],"Enter",t=>this.enterTrigger(t)),this.scope.register(["Ctrl"],"Enter",t=>this.enterTrigger(t))}setSuggesterData(e){this.data=e}display(e){return a(this,null,function*(){this.callbackFunction=e,this.open()})}getItems(){return this.data}getItemText(e){return e.display}onChooseItem(){}renderSuggestion(e,t){t.createEl("div",{text:e.item.display})}enterTrigger(e){let t=document.querySelector(".suggestion-item.is-selected div").textContent,s=this.data.find(o=>o.display===t);s&&(this.invokeCallback(s,e),this.close())}onChooseSuggestion(e,t){this.invokeCallback(e.item,t)}invokeCallback(e,t){this.callbackFunction(e,t)}};var A=require("obsidian"),Xt="https://raw.githubusercontent.com/",H=(i,n,e)=>a(void 0,null,function*(){let t=`https://github.com/${i}/releases/download/${n}/${e}`;try{let s=yield(0,A.request)({url:t});return s==="Not Found"||s==='{"error":"Not Found"}'?null:s}catch(s){console.log("error in grabReleaseFileFromRepository",t,s)}}),dt=(i,n=!0)=>a(void 0,null,function*(){let e=Xt+i+(n===!0?"/HEAD/manifest.json":"/HEAD/manifest-beta.json");try{let t=yield(0,A.request)({url:e});return t==="404: Not Found"?null:yield JSON.parse(t)}catch(t){console.log(`error in grabManifestJsonFromRepository for ${e}`,t)}}),mt=()=>a(void 0,null,function*(){let i="https://raw.githubusercontent.com/obsidianmd/obsidian-releases/HEAD/community-plugins.json";try{let n=yield(0,A.request)({url:i});return n==="404: Not Found"?null:yield JSON.parse(n)}catch(n){console.log("error in grabCommmunityPluginList",n)}}),Y=()=>a(void 0,null,function*(){let i="https://raw.githubusercontent.com/obsidianmd/obsidian-releases/HEAD/community-css-themes.json";try{let n=yield(0,A.request)({url:i});return n==="404: Not Found"?null:yield JSON.parse(n)}catch(n){console.log("error in grabCommmunityThemesList",n)}}),et=i=>a(void 0,null,function*(){let n=`https://raw.githubusercontent.com/${i}/HEAD/obsidian.css`;try{let e=yield(0,A.request)({url:n});return e==="404: Not Found"?null:e}catch(e){console.log("error in grabCommmunityThemesList",e)}}),te=(i,n)=>a(void 0,null,function*(){let e=`https://api.github.com/repos/${i}/commits?path=${n}&page=1&per_page=1`;try{let t=yield(0,A.request)({url:e});return t==="404: Not Found"?null:JSON.parse(t)}catch(t){console.log("error in grabCommmunityThemesList",t)}}),j=(i,n)=>a(void 0,null,function*(){let e=yield te(i,n);return e[0].commit.committer.date?e[0].commit.committer.date:""});var pt={pluginList:[],themesList:[],updateAtStartup:!1,updateThemesAtStartup:!1,ribbonIconEnabled:!0,loggingEnabled:!1,loggingPath:"BRAT-log",loggingVerboseEnabled:!1,debuggingMode:!0,notificationsEnabled:!0};function ft(i,n){return a(this,null,function*(){i.settings.pluginList.contains(n)||(i.settings.pluginList.unshift(n),i.saveSettings())})}function ht(i,n){return a(this,null,function*(){return i.settings.pluginList.contains(n)})}function bt(i,n){return a(this,null,function*(){let e={repo:n,lastUpdate:yield j(n,"obsidian.css")};i.settings.themesList.unshift(e),i.saveSettings()})}function wt(i,n){return a(this,null,function*(){return!!i.settings.themesList.find(t=>t.repo===n)})}function yt(i,n,e){i.settings.themesList.forEach(t=>{t.repo===n&&(t.lastUpdate=e,i.saveSettings())})}var Tt=require("obsidian");function m(i,n,e=10,t=null){if(i.settings.notificationsEnabled===!1)return;let s=t?"(click=dismiss, right-click=Info)":"",o=new Tt.Notice(`BRAT ${n} ${s}`,e*1e3);t&&(o.noticeEl.oncontextmenu=()=>a(this,null,function*(){t()}))}function z(){return a(this,null,function*(){try{let i=yield fetch("https://obsidian.md/?"+Math.random());return i.status>=200&&i.status<300}catch(i){return!1}})}var Pt=i=>(0,q.normalizePath)(i.app.vault.configDir+"/themes")+"/",nt=(i,n,e="")=>a(void 0,null,function*(){let t=yield et(n);if(!t)return m(i,"There is no obsidian.css file in the root path of this repository, so there is no theme to install."),!1;yield vt(i,e,t);let s=`${e} theme installed from ${n}. `;return i.log(s+`[Theme Info](https://github.com/${n})`,!1),m(i,`${s}`,10,()=>a(void 0,null,function*(){window.open(`https://github.com/${n}`)})),setTimeout(()=>{i.app.customCss.setTheme(e)},500),!0}),vt=(i,n,e)=>a(void 0,null,function*(){let t=Pt(i),s=i.app.vault.adapter;(yield s.exists(t))===!1&&(yield s.mkdir(t)),yield s.write(t+n+".css",e)}),Nt=i=>a(void 0,null,function*(){let n=yield Y(),e=Object.values(n).map(s=>({display:`Theme: ${s.name} (${s.repo})`,info:s})),t=new v(i);t.setSuggesterData(e),yield t.display(s=>a(void 0,null,function*(){yield nt(i,s.info.repo,s.info.name)}))}),V=i=>("BRAT-"+i.replace("/","----")).substr(0,100),Ct=(i,n)=>a(void 0,null,function*(){i.settings.themesList=i.settings.themesList.filter(t=>t.repo!=n),i.saveSettings(),yield i.app.vault.adapter.remove(Pt(i)+V(n)+".css");let e=`Removed ${n} from BRAT themes list and deleted from vault`;i.log(e,!0),m(i,`${e}`)}),J=(i,n)=>a(void 0,null,function*(){if((yield z())===!1){console.log("BRAT: No internet detected.");return}let e,t="Checking for beta theme updates STARTED";i.log(t,!0),n&&i.settings.notificationsEnabled&&(e=new q.Notice(`BRAT ${t}`,3e4));for(let o of i.settings.themesList){let r=yield j(o.repo,"obsidian.css");r!==o.lastUpdate&&(yield ee(i,o.repo,o.lastUpdate,r))}let s="Checking for beta theme updates COMPLETED";i.log(s,!0),n&&(i.settings.notificationsEnabled&&e.hide(),m(i,s))}),ee=(i,n,e="",t="")=>a(void 0,null,function*(){let s=yield et(n);if(!s)return m(i,"There is no obsidian.css file in the root path of the ${cssGithubRepository} repository, so this theme cannot be updated."),!1;let o=V(n);yield vt(i,o,s),yt(i,n,t);let r=`${o} theme updated from ${n}. From date: ${e} to ${t} `;return i.log(r+`[Theme Info](https://github.com/${n})`,!1),m(i,`${r}`,20,()=>a(void 0,null,function*(){window.open(`https://github.com/${n}`)})),!0});var W=require("obsidian");var S=class extends W.Modal{constructor(e,t=!1){super(e.app);this.plugin=e,this.address="",this.openSettingsTabAfterwards=t}submitForm(){return a(this,null,function*(){if(this.address==="")return;let e=this.address.replace("https://github.com/","");if(yield wt(this.plugin,e)){m(this.plugin,"This plugin is already in the list for beta testing",10);return}(yield nt(this.plugin,e,V(e)))&&(yield bt(this.plugin,e),this.close())})}onOpen(){this.contentEl.createEl("h4",{text:"Github repository for beta theme:"}),this.contentEl.createEl("form",{},e=>{new W.Setting(e).addText(t=>{t.setPlaceholder("Repository (example: GitubUserName/repository-name"),t.onChange(s=>{this.address=s.trim()}),t.inputEl.addEventListener("keydown",s=>a(this,null,function*(){s.key==="Enter"&&this.address!==" "&&(s.preventDefault(),yield this.submitForm())})),t.inputEl.style.width="100%",window.setTimeout(()=>{let s=document.querySelector(".setting-item-info");s&&s.remove(),t.inputEl.focus()},10)}),e.createDiv("modal-button-container",t=>{t.createEl("button",{attr:{type:"button"},text:"Never mind"}).addEventListener("click",()=>this.close()),t.createEl("button",{attr:{type:"submit"},cls:"mod-cta",text:"Add Theme"})}),e.addEventListener("submit",t=>a(this,null,function*(){t.preventDefault(),this.address!==""&&(yield this.submitForm())}))})}onClose(){return a(this,null,function*(){this.openSettingsTabAfterwards&&(yield this.plugin.app.setting.open(),yield this.plugin.app.setting.openTabById("obsidian42-brat"))})}};var Q=class extends T.PluginSettingTab{constructor(e,t){super(e,t);this.plugin=t}display(){let{containerEl:e}=this;e.empty(),e.createEl("h2",{text:this.plugin.appName}),new T.Setting(e).setName("Auto-update plugins at startup").setDesc("If enabled all beta plugins will be checked for updates each time Obsidian starts.").addToggle(t=>{t.setValue(this.plugin.settings.updateAtStartup),t.onChange(s=>a(this,null,function*(){this.plugin.settings.updateAtStartup=s,yield this.plugin.saveSettings()}))}),new T.Setting(e).setName("Auto-update themes at startup").setDesc("If enabled all beta themes will be checked for updates each time Obsidian starts.").addToggle(t=>{t.setValue(this.plugin.settings.updateThemesAtStartup),t.onChange(s=>a(this,null,function*(){this.plugin.settings.updateThemesAtStartup=s,yield this.plugin.saveSettings()}))}),new T.Setting(e).setName("Ribbon Button").setDesc("Toggle ribbon button off and on.").addToggle(t=>{t.setValue(this.plugin.settings.ribbonIconEnabled),t.onChange(s=>a(this,null,function*(){this.plugin.settings.ribbonIconEnabled=s,this.plugin.settings.ribbonIconEnabled===!1?this.plugin.ribbonIcon.remove():this.plugin.showRibbonButton(),yield this.plugin.saveSettings()}))}),e.createEl("hr"),e.createEl("h2",{text:"Beta Plugin List"}),e.createEl("div",{text:'The following is a list of beta plugins added via the command palette "Add a beta plugin for testing". '}),e.createEl("p"),e.createEl("div",{text:"Click the x button next to a plugin to remove it from the list."}),e.createEl("p"),e.createEl("span").createEl("b",{text:"Note: "}),e.createSpan({text:"This does not delete the plugin, this should be done from the Community Plugins tab in Settings."}),new T.Setting(e).addButton(t=>{t.setButtonText("Add Beta plugin"),t.onClick(()=>a(this,null,function*(){this.plugin.app.setting.close(),yield this.plugin.betaPlugins.displayAddNewPluginModal(!0)}))});for(let t of this.plugin.settings.pluginList)new T.Setting(e).setName(t).addButton(s=>{s.setIcon("cross"),s.setTooltip("Delete this beta plugin"),s.onClick(()=>a(this,null,function*(){s.buttonEl.textContent===""?s.setButtonText("Click once more to confirm removal"):(s.buttonEl.parentElement.parentElement.remove(),yield this.plugin.betaPlugins.deletePlugin(t))}))});e.createEl("hr"),e.createEl("h2",{text:"Beta Themes List"}),new T.Setting(e).addButton(t=>{t.setButtonText("Add Beta Theme"),t.onClick(()=>a(this,null,function*(){this.plugin.app.setting.close(),new S(this.plugin).open()}))});for(let t of this.plugin.settings.themesList)new T.Setting(e).setName(t.repo).addButton(s=>{s.setIcon("cross"),s.setTooltip("Delete this beta theme"),s.onClick(()=>a(this,null,function*(){s.buttonEl.textContent===""?s.setButtonText("Click once more to confirm removal"):(s.buttonEl.parentElement.parentElement.remove(),yield Ct(this.plugin,t.repo))}))});e.createEl("hr"),e.createEl("h2",{text:"Monitoring"}),new T.Setting(e).setName("Enable Notifications").setDesc("BRAT will provide popup notifications for its various activities. Turn this off means no notifications from BRAT.").addToggle(t=>{t.setValue(this.plugin.settings.notificationsEnabled),t.onChange(s=>a(this,null,function*(){this.plugin.settings.notificationsEnabled=s,yield this.plugin.saveSettings()}))}),new T.Setting(e).setName("Enable Logging").setDesc("Plugin updates will be logged to a file in the log file.").addToggle(t=>{t.setValue(this.plugin.settings.loggingEnabled),t.onChange(s=>a(this,null,function*(){this.plugin.settings.loggingEnabled=s,yield this.plugin.saveSettings()}))}),new T.Setting(this.containerEl).setName("BRAT Log File Location").setDesc("Logs will be saved to this file. Don't add .md to the file name.").addSearch(t=>{t.setPlaceholder("Example: BRAT-log").setValue(this.plugin.settings.loggingPath).onChange(s=>a(this,null,function*(){this.plugin.settings.loggingPath=s,yield this.plugin.saveSettings()}))}),new T.Setting(e).setName("Enable Verbose Logging").setDesc("Get a lot more information in the log.").addToggle(t=>{t.setValue(this.plugin.settings.loggingVerboseEnabled),t.onChange(s=>a(this,null,function*(){this.plugin.settings.loggingVerboseEnabled=s,yield this.plugin.saveSettings()}))}),new T.Setting(e).setName("Debugging Mode").setDesc("Atomic Bomb level console logging. Can be used for troubleshoting and development.").addToggle(t=>{t.setValue(this.plugin.settings.debuggingMode),t.onChange(s=>a(this,null,function*(){this.plugin.settings.debuggingMode=s,yield this.plugin.saveSettings()}))})}};var G=require("obsidian");var F=class extends G.Modal{constructor(e,t,s=!1){super(e.app);this.plugin=e,this.betaPlugins=t,this.address="",this.openSettingsTabAfterwards=s}submitForm(){return a(this,null,function*(){if(this.address==="")return;let e=this.address.replace("https://github.com/","");if(yield ht(this.plugin,e)){m(this.plugin,"This plugin is already in the list for beta testing",10);return}(yield this.betaPlugins.addPlugin(e))&&this.close()})}onOpen(){this.contentEl.createEl("h4",{text:"Github repository for beta plugin:"}),this.contentEl.createEl("form",{},e=>{new G.Setting(e).addText(t=>{t.setPlaceholder("Repository (example: TfTHacker/obsidian-brat"),t.onChange(s=>{this.address=s.trim()}),t.inputEl.addEventListener("keydown",s=>a(this,null,function*(){s.key==="Enter"&&this.address!==" "&&(s.preventDefault(),yield this.submitForm())})),t.inputEl.style.width="100%",window.setTimeout(()=>{let s=document.querySelector(".setting-item-info");s&&s.remove(),t.inputEl.focus()},10)}),e.createDiv("modal-button-container",t=>{t.createEl("button",{attr:{type:"button"},text:"Never mind"}).addEventListener("click",()=>this.close()),t.createEl("button",{attr:{type:"submit"},cls:"mod-cta",text:"Add Plugin"})}),e.addEventListener("submit",t=>a(this,null,function*(){t.preventDefault(),this.address!==""&&(yield this.submitForm())}))})}onClose(){return a(this,null,function*(){this.openSettingsTabAfterwards&&(yield this.plugin.app.setting.open(),yield this.plugin.app.setting.openTabById("obsidian42-brat"))})}};var K=require("obsidian");var D=class{constructor(n){this.plugin=n}displayAddNewPluginModal(n=!1){return a(this,null,function*(){new F(this.plugin,this,n).open()})}validateRepository(n,e=!1,t=!1){return a(this,null,function*(){let o=yield dt(n,!e);return o?"id"in o?"version"in o?o:(t&&m(this.plugin,`${n} The version attribute for the release is missing from the manifest file`,15),null):(t&&m(this.plugin,`${n} The plugin id attribute for the release is missing from the manifest file`,15),null):(t&&m(this.plugin,`${n} This does not seem to be an obsidian plugin, as there is no manifest.json file.`,15),null)})}getAllReleaseFiles(n,e,t){return a(this,null,function*(){return{mainJs:yield H(n,e.version,"main.js"),manifest:t?yield H(n,e.version,"manifest.json"):null,styles:yield H(n,e.version,"styles.css")}})}writeReleaseFilesToPluginFolder(n,e){return a(this,null,function*(){let t=(0,K.normalizePath)(this.plugin.app.vault.configDir+"/plugins/"+n)+"/",s=this.plugin.app.vault.adapter;((yield s.exists(t))===!1||!(yield s.exists(t+"manifest.json")))&&(yield s.mkdir(t)),yield s.write(t+"main.js",e.mainJs),yield s.write(t+"manifest.json",e.manifest),e.styles&&(yield s.write(t+"styles.css",e.styles))})}addPlugin(n,e=!1,t=!1,s=!1){return a(this,null,function*(){var g;let r=yield this.validateRepository(n,!0,!1),u=!!r;if(u===!1&&(r=yield this.validateRepository(n,!1,!0)),r===null){let d=`${n} A manifest.json or manifest-beta.json file does not exist in the root directory of the repository. This plugin cannot be installed.`;return this.plugin.log(d,!0),m(this.plugin,`${d}`,10),!1}if(!r.hasOwnProperty("version")){let d=`${n} The manifest${u?"-beta":""}.json file in the root directory of the repository does not have a version number in the file. This plugin cannot be installed.`;return this.plugin.log(d,!0),m(this.plugin,`${d}`,10),!1}let c=()=>a(this,null,function*(){let d=yield this.getAllReleaseFiles(n,r,u);if((u||d.manifest===null)&&(d.manifest=JSON.stringify(r)),d.mainJs===null){let p=`${n} The release is not complete and cannot be download. main.js is missing from the Release`;return this.plugin.log(p,!0),m(this.plugin,`${p}`,10),null}return d});if(e===!1){let d=yield c();if(d===null)return;yield this.writeReleaseFilesToPluginFolder(r.id,d),yield ft(this.plugin,n),yield this.plugin.app.plugins.loadManifests();let p=`${n} The plugin has been registered with BRAT. You may still need to enable it the Community Plugin List.`;this.plugin.log(p,!0),m(this.plugin,p,10)}else{let d=this.plugin.app.vault.configDir+"/plugins/"+r.id+"/",p=null;try{p=yield this.plugin.app.vault.adapter.read(d+"manifest.json")}catch(w){if(w.errno===-4058)return yield this.addPlugin(n,!1,u),!0;console.log("BRAT - Local Manifest Load",r.id,JSON.stringify(w,null,2))}let P=yield JSON.parse(p);if(P.version!==r.version){let w=yield c();if(w===null)return;if(t){let y=`There is an update available for ${r.id} from version ${P.version} to ${r.version}. `;this.plugin.log(y+`[Release Info](https://github.com/${n}/releases/tag/${r.version})`,!1),m(this.plugin,y,30,()=>a(this,null,function*(){window.open(`https://github.com/${n}/releases/tag/${r.version}`)}))}else{yield this.writeReleaseFilesToPluginFolder(r.id,w),yield this.plugin.app.plugins.loadManifests(),(g=this.plugin.app.plugins.plugins[r.id])!=null&&g.manifest&&(yield this.reloadPlugin(r.id));let y=`${r.id} Plugin has been updated from version ${P.version} to ${r.version}. `;this.plugin.log(y+`[Release Info](https://github.com/${n}/releases/tag/${r.version})`,!1),m(this.plugin,y,30,()=>a(this,null,function*(){window.open(`https://github.com/${n}/releases/tag/${r.version}`)}))}}else s&&m(this.plugin,`No update available for ${n}`,3)}return!0})}reloadPlugin(n){return a(this,null,function*(){let e=this.plugin.app.plugins;try{yield e.disablePlugin(n),yield e.enablePlugin(n)}catch(t){console.log("reload plugin",t)}})}updatePlugin(n,e=!1,t=!1){return a(this,null,function*(){let s=yield this.addPlugin(n,!0,e,t);return s===!1&&e===!1&&m(this.plugin,`${n} Update of plugin failed.`),s})}checkForUpdatesAndInstallUpdates(n=!1,e=!1){return a(this,null,function*(){if((yield z())===!1){console.log("BRAT: No internet detected.");return}let t,s="Checking for plugin updates STARTED";this.plugin.log(s,!0),n&&this.plugin.settings.notificationsEnabled&&(t=new K.Notice(`BRAT ${s}`,3e4));for(let r of this.plugin.settings.pluginList)yield this.updatePlugin(r,e);let o="Checking for plugin updates COMPLETED";this.plugin.log(o,!0),n&&(t.hide(),m(this.plugin,o,10))})}deletePlugin(n){return a(this,null,function*(){let e=`Removed ${n} from BRAT plugin list`;this.plugin.log(e,!0),this.plugin.settings.pluginList=this.plugin.settings.pluginList.filter(t=>t!=n),this.plugin.saveSettings()})}getEnabledDisabledPlugins(n){let e=this.plugin.app.plugins,t=Object.values(e.manifests),s=Object.values(e.plugins).map(o=>o.manifest);return n?t.filter(o=>s.find(r=>o.id===r.id)):t.filter(o=>!s.find(r=>o.id===r.id))}};var At=require("obsidian");function St(){(0,At.addIcon)("BratIcon",'')}var $=require("obsidian"),Ht=Kt(_t());function Yt(i,n,e=!1){if(i.settings.debuggingMode&&console.log("BRAT: "+n),i.settings.loggingEnabled){if(i.settings.loggingVerboseEnabled===!1&&e===!0)return;{let t=i.settings.loggingPath+".md",s="[["+(0,$.moment)().format((0,Ht.getDailyNoteSettings)().format).toString()+"]] "+(0,$.moment)().format("HH:mm"),o=$.Platform.isDesktop?window.require("os").hostname():"MOBILE",r=s+" "+o+" "+n.replace(` `," ")+` `;setTimeout(()=>a(this,null,function*(){if((yield i.app.vault.adapter.exists(t))===!0){let u=yield i.app.vault.adapter.read(t);r=r+u;let c=i.app.vault.getAbstractFileByPath(t);yield i.app.vault.modify(c,r)}else yield i.app.vault.create(t,r)}),10)}}}var U=class{constructor(n){this.bratCommands=[{id:"BRAT-AddBetaPlugin",icon:"BratIcon",name:"Plugins: Add a beta plugin for testing",showInRibbon:!0,callback:()=>a(this,null,function*(){yield this.plugin.betaPlugins.displayAddNewPluginModal()})},{id:"BRAT-checkForUpdatesAndUpdate",icon:"BratIcon",name:"Plugins: Check for updates to all beta plugins and UPDATE",showInRibbon:!0,callback:()=>a(this,null,function*(){yield this.plugin.betaPlugins.checkForUpdatesAndInstallUpdates(!0,!1)})},{id:"BRAT-checkForUpdatesAndDontUpdate",icon:"BratIcon",name:"Plugins: Only check for updates to beta plugins, but don't Update",showInRibbon:!0,callback:()=>a(this,null,function*(){yield this.plugin.betaPlugins.checkForUpdatesAndInstallUpdates(!0,!0)})},{id:"BRAT-updateOnePlugin",icon:"BratIcon",name:"Plugins: Choose a single plugin to update",showInRibbon:!0,callback:()=>a(this,null,function*(){let n=Object.values(this.plugin.settings.pluginList).map(t=>({display:t,info:t})),e=new v(this.plugin);e.setSuggesterData(n),yield e.display(t=>a(this,null,function*(){let s=`Checking for updates for ${t.info}`;this.plugin.log(s,!0),m(this.plugin,` ${s}`,3),yield this.plugin.betaPlugins.updatePlugin(t.info,!1,!0)}))})},{id:"BRAT-restartPlugin",icon:"BratIcon",name:"Plugins: Restart a plugin that is already installed",showInRibbon:!0,callback:()=>a(this,null,function*(){let n=Object.values(this.plugin.app.plugins.manifests).map(t=>({display:t.id,info:t.id})),e=new v(this.plugin);e.setSuggesterData(n),yield e.display(t=>a(this,null,function*(){m(this.plugin,`${t.info} Plugin reloading .....`,5),yield this.plugin.betaPlugins.reloadPlugin(t.info)}))})},{id:"BRAT-disablePlugin",icon:"BratIcon",name:"Plugins: Disable a plugin - toggle it off",showInRibbon:!0,callback:()=>a(this,null,function*(){let n=this.plugin.betaPlugins.getEnabledDisabledPlugins(!0).map(t=>({display:`${t.name} (${t.id})`,info:t.id})),e=new v(this.plugin);e.setSuggesterData(n),yield e.display(t=>a(this,null,function*(){this.plugin.log(`${t.display} plugin disabled`,!1),yield this.plugin.app.plugins.disablePlugin(t.info)}))})},{id:"BRAT-enablePlugin",icon:"BratIcon",name:"Plugins: Enable a plugin - toggle it on",showInRibbon:!0,callback:()=>a(this,null,function*(){let n=this.plugin.betaPlugins.getEnabledDisabledPlugins(!1).map(t=>({display:`${t.name} (${t.id})`,info:t.id})),e=new v(this.plugin);e.setSuggesterData(n),yield e.display(t=>a(this,null,function*(){this.plugin.log(`${t.display} plugin enabled`,!1),yield this.plugin.app.plugins.enablePlugin(t.info)}))})},{id:"BRAT-openGitHubZRepository",icon:"BratIcon",name:"Plugins: Open the GitHub repository for a plugin",showInRibbon:!0,callback:()=>a(this,null,function*(){let n=yield mt(),e=Object.values(n).map(o=>({display:`Plugin: ${o.name} (${o.repo})`,info:o.repo})),t=Object.values(this.plugin.settings.pluginList).map(o=>({display:"BRAT: "+o,info:o}));e.forEach(o=>t.push(o));let s=new v(this.plugin);s.setSuggesterData(t),yield s.display(o=>a(this,null,function*(){o.info&&window.open(`https://github.com/${o.info}`)}))})},{id:"BRAT-openGitHubRepoTheme",icon:"BratIcon",name:"Themes: Open the GitHub repository for a theme (appearance)",showInRibbon:!0,callback:()=>a(this,null,function*(){let n=yield Y(),e=Object.values(n).map(s=>({display:`Theme: ${s.name} (${s.repo})`,info:s.repo})),t=new v(this.plugin);t.setSuggesterData(e),yield t.display(s=>a(this,null,function*(){s.info&&window.open(`https://github.com/${s.info}`)}))})},{id:"BRAT-opentPluginSettings",icon:"BratIcon",name:"Plugins: Open Plugin Settings Tab",showInRibbon:!0,callback:()=>a(this,null,function*(){let n=this.plugin.app.setting,e=Object.values(n.pluginTabs).map(o=>({display:"Plugin: "+o.name,info:o.id})),t=new v(this.plugin),s=Object.values(n.settingTabs).map(o=>({display:"Core: "+o.name,info:o.id}));e.forEach(o=>s.push(o)),t.setSuggesterData(s),yield t.display(o=>a(this,null,function*(){n.open(),n.openTabById(o.info)}))})},{id:"BRAT-GrabCommunityTheme",icon:"BratIcon",name:"Themes: Grab a community theme",showInRibbon:!0,callback:()=>a(this,null,function*(){return yield Nt(this.plugin)})},{id:"BRAT-GrabBetaTheme",icon:"BratIcon",name:"Themes: Grab a beta theme for testing from a Github repository",showInRibbon:!0,callback:()=>a(this,null,function*(){new S(this.plugin).open()})},{id:"BRAT-updateBetaThemes",icon:"BratIcon",name:"Themes: Update beta themes",showInRibbon:!0,callback:()=>a(this,null,function*(){return yield J(this.plugin,!0)})},{id:"BRAT-switchTheme",icon:"BratIcon",name:"Themes: Switch Active Theme ",showInRibbon:!0,callback:()=>a(this,null,function*(){let n=Object.values(this.plugin.app.customCss.themes).map(t=>({display:t,info:t}));n.unshift({display:"Obsidian Default Theme",info:""});let e=new v(this.plugin);e.setSuggesterData(n),yield e.display(t=>a(this,null,function*(){this.plugin.log(`Switched to theme ${t.display}`,!1),this.plugin.app.customCss.setTheme(t.info)}))})},{id:"BRAT-allCommands",icon:"BratIcon",name:"All Commands list",showInRibbon:!1,callback:()=>a(this,null,function*(){return this.ribbonDisplayCommands()})}];this.plugin=n,this.bratCommands.forEach(e=>a(this,null,function*(){this.plugin.addCommand({id:e.id,name:e.name,icon:e.icon,callback:()=>a(this,null,function*(){yield e.callback()})})}))}ribbonDisplayCommands(){return a(this,null,function*(){let n=[];this.bratCommands.forEach(r=>{r.showInRibbon&&n.push({display:r.name,info:r.callback})});let e=new v(this.plugin),t=this.plugin.app.setting,s=Object.values(t.settingTabs).map(r=>({display:"Core: "+r.name,info:()=>a(this,null,function*(){t.open(),t.openTabById(r.id)})})),o=Object.values(t.pluginTabs).map(r=>({display:"Plugin: "+r.name,info:()=>a(this,null,function*(){t.open(),t.openTabById(r.id)})}));n.push({display:"---- Core Plugin Settings ----",info:()=>a(this,null,function*(){yield this.ribbonDisplayCommands()})}),s.forEach(r=>n.push(r)),n.push({display:"---- Plugin Settings ----",info:()=>a(this,null,function*(){yield this.ribbonDisplayCommands()})}),o.forEach(r=>n.push(r)),e.setSuggesterData(n),yield e.display(r=>a(this,null,function*(){return yield r.info()}))})}};var Z=class extends jt.Plugin{constructor(){super(...arguments);this.appName="Obsidian42 - Beta Reviewer's Auto-update Tool (BRAT)";this.appID="obsidian42-brat"}onload(){return a(this,null,function*(){console.log("loading Obsidian42 - BRAT"),yield this.loadSettings(),this.addSettingTab(new Q(this.app,this)),this.betaPlugins=new D(this),this.commands=new U(this),St(),this.settings.ribbonIconEnabled&&this.showRibbonButton(),this.app.workspace.onLayoutReady(()=>{this.settings.updateAtStartup&&setTimeout(()=>a(this,null,function*(){yield this.betaPlugins.checkForUpdatesAndInstallUpdates(!1)}),6e4),this.settings.updateThemesAtStartup&&setTimeout(()=>a(this,null,function*(){yield J(this,!1)}),12e4)})})}showRibbonButton(){this.ribbonIcon=this.addRibbonIcon("BratIcon","BRAT",()=>a(this,null,function*(){return this.commands.ribbonDisplayCommands()}))}log(e,t=!1){Yt(this,e,t)}onunload(){console.log("unloading "+this.appName)}loadSettings(){return a(this,null,function*(){this.settings=Object.assign({},pt,yield this.loadData())})}saveSettings(){return a(this,null,function*(){yield this.saveData(this.settings)})}}; //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vbm9kZV9tb2R1bGVzL29ic2lkaWFuLWRhaWx5LW5vdGVzLWludGVyZmFjZS9kaXN0L21haW4uanMiLCAiLi4vc3JjL21haW4udHMiLCAiLi4vc3JjL3VpL1NldHRpbmdzVGFiLnRzIiwgIi4uL3NyYy9mZWF0dXJlcy90aGVtZXMudHMiLCAiLi4vc3JjL3VpL0dlbmVyaWNGdXp6eVN1Z2dlc3Rlci50cyIsICIuLi9zcmMvZmVhdHVyZXMvZ2l0aHViVXRpbHMudHMiLCAiLi4vc3JjL3VpL3NldHRpbmdzLnRzIiwgIi4uL3NyYy91dGlscy9ub3RpZmljYXRpb25zLnRzIiwgIi4uL3NyYy91dGlscy9pbnRlcm5ldGNvbm5lY3Rpb24udHMiLCAiLi4vc3JjL3VpL0FkZE5ld1RoZW1lLnRzIiwgIi4uL3NyYy91aS9BZGROZXd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biAgICBjb25zdCBmaWxlbmFtZSA9IGRhdGUuZm9ybWF0KGZvcm1hdCk7XG4gICAgY29uc3Qgbm9ybWFsaXplZFBhdGggPSBhd2FpdCBnZXROb3RlUGF0aChmb2xkZXIsIGZpbGVuYW1lKTtcbiAgICB0cnkge1xuICAgICAgICBjb25zdCBjcmVhdGVkRmlsZSA9IGF3YWl0IHZhdWx0LmNyZWF0ZShub3JtYWxpemVkUGF0aCwgdGVtcGxhdGVDb250ZW50c1xuICAgICAgICAgICAgLnJlcGxhY2UoL3t7XFxzKmRhdGVcXHMqfX0vZ2ksIGZpbGVuYW1lKVxuICAgICAgICAgICAgLnJlcGxhY2UoL3t7XFxzKnRpbWVcXHMqfX0vZ2ksIG1vbWVudCgpLmZvcm1hdChcIkhIOm1tXCIpKVxuICAgICAgICAgICAgLnJlcGxhY2UoL3t7XFxzKnRpdGxlXFxzKn19L2dpLCBmaWxlbmFtZSlcbiAgICAgICAgICAgIC5yZXBsYWNlKC97e1xccyooZGF0ZXx0aW1lKVxccyooKFsrLV1cXGQrKShbeXFtd2Roc10pKT9cXHMqKDouKz8pP319L2dpLCAoXywgX3RpbWVPckRhdGUsIGNhbGMsIHRpbWVEZWx0YSwgdW5pdCwgbW9tZW50Rm9ybWF0KSA9PiB7XG4gICAgICAgICAgICBjb25zdCBub3cgPSBtb21lbnQoKTtcbiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnREYXRlID0gZGF0ZS5jbG9uZSgpLnNldCh7XG4gICAgICAgICAgICAgICAgaG91cjogbm93LmdldChcImhvdXJcIiksXG4gICAgICAgICAgICAgICAgbWludXRlOiBub3cuZ2V0KFwibWludXRlXCIpLFxuICAgICAgICAgICAgICAgIHNlY29uZDogbm93LmdldChcInNlY29uZFwiKSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgaWYgKGNhbGMpIHtcbiAgICAgICAgICAgICAgICBjdXJyZW50RGF0ZS5hZGQocGFyc2VJbnQodGltZURlbHRhLCAxMCksIHV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F1bHQuY3JlYXRlKG5vcm1hbGl6ZWRQYXRoLCB0ZW1wbGF0ZUNvbnRlbnRzXG4gICAgICAgICAgICAucmVwbGFjZSgve3tcXHMqKGRhdGV8dGltZSlcXHMqKChbKy1dXFxkKykoW3lxbXdkaHNdKSk/XFxzKig6Lis/KT99fS9naSwgKF8sIF90aW1lT3JEYXRlLCBjYWxjLCB0aW1lRGVsdGEsIHVuaXQsIG1vbWVudEZvcm1hdCkgPT4ge1xuICAgICAgICAgICAgY29uc3Qgbm93ID0gd2luZG93Lm1vbWVudCgpO1xuICAgICAgICAgICAgY29uc3QgY3VycmVudERhdGUgPSBkYXRlLmNsb25lKCkuc2V0KHtcbiAgICAgICAgICAgICAgICBob3VyOiBub3cuZ2V0KFwiaG91clwiKSxcbiAgICAgICAgICAgICAgICBtaW51dGU6IG5vdy5nZXQoXCJtaW51dGVcIiksXG4gICAgICAgICAgICAgICAgc2Vjb25kOiBub3cuZ2V0KFwic2Vjb25kXCIpLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBpZiAoY2FsYykge1xuICAgICAgICAgICAgICAgIGN1cnJlbnREYXRlLmFkZChwYXJzZUludCh0aW1lRGVsdGEsIDEwKSwgdW5pdCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobW9tZW50Rm9ybWF0KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGN1cnJlbnREYXRlLmZvcm1hdChtb21lbnRGb3JtYXQuc3Vic3RyaW5nKDEpLnRyaW0oKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gY3VycmVudERhdGUuZm9ybWF0KGZvcm1hdCk7XG4gICAgICAgIH0pXG4gICAgICAgICAgICAucmVwbGFjZSgve3tcXHMqZGF0ZVxccyp9fS9naSwgZmlsZW5hbWUpXG4gICAgICAgICAgICAucmVwbGFjZSgve3tcXHMqdGltZVxccyp9fS9naSwgd2luZG93Lm1vbWVudCgpLmZvcm1hdChcIkhIOm1tXCIp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1xuICAgICAgICAgICAgLnJlcGxhY2UoL3t7XFxzKihkYXRlfHRpbWUpXFxzKigoWystXVxcZCspKFt5cW13ZGhzXSkpP1xccyooOi4rPyk/fX0vZ2ksIChfLCBfdGltZU9yRGF0ZSwgY2FsYywgdGltZURlbHRhLCB1bml0LCBtb21lbnRGb3JtYXQpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IG5vdyA9IHdpbmRvdy5tb21lbnQoKTtcbiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnREYXRlID0gZGF0ZS5jbG9uZSgpLnNldCh7XG4gICAgICAgICAgICAgICAgaG91cjogbm93LmdldChcImhvdXJcIiksXG4gICAgICAgICAgICAgICAgbWludXRlOiBub3cuZ2V0KFwibWludXRlXCIpLFxuICAgICAgICAgICAgICAgIHNlY29uZDogbm93LmdldChcInNlY29uZFwiKSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgaWYgKGNhbGMpIHtcbiAgICAgICAgICAgICAgICBjdXJyZW50RGF0ZS5hZGQocGFyc2VJbnQodGltZURlbHRhLCAxMCksIHVuaXQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKG1vbWVudEZvcm1hdCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjdXJyZW50RGF0ZS5mb3JtYXQobW9tZW50Rm9ybWF0LnN1YnN0cmluZygxKS50cmltKCkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGN1cnJlbnREYXRlLmZvcm1hdChmb3JtYXQpO1xuICAgICAgICB9KVxuICAgICAgICAgICAgLnJlcGxhY2UoL3t7XFxzKmRhdGVcXHMqfX0vZ2ksIGZpbGVuYW1lKVxuICAgICAgICAgICAgLnJlcGxhY2UoL3t7XFxzKnRpbWVcXHMqfX0vZ2ksIHdpbmRvdy5tb21lbnQoKS5mb3JtYXQoXCJISDptbVwiKSlcbiAgICAgICAgICAgIC5yZXBsYWNlKC97e1xccyp0aXRsZVxccyp9fS9naSwgZmlsZ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wuaW5wdXRFbC5hZGRFdmVudExpc3RlbmVyKCdrZXlkb3duJywgYXN5bmMgKGU6IEtleWJvYXJkRXZlbnQpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGUua2V5ID09PSAnRW50ZXInICYmIHRoaXMuYWRkcmVzcyAhPT0gJyAnKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnN1Ym1pdEZvcm0oKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIHRleHRFbC5pbnB1dEVsLnN0eWxlLndpZHRoID0gXCIxMDAlXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgd2luZG93LnNldFRpbWVvdXQoKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB0aXRsZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoXCIuc2V0dGluZy1pdGVtLWluZm9cIik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aXRsZSkgdGl0bGUucmVtb3ZlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHRFbC5pbnB1dEVsLmZvY3VzKClcclxuICAgICAgICAgICAgICAgICAgICB9LCAxMCk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIGZvcm1FbC5jcmVhdGVEaXYoJ21vZGFsLWJ1dHRvbi1jb250YWluZXInLCAoYnV0dG9uQ29udGFpbmVyRWwpID0+IHtcclxuICAgICAgICAgICAgICAgIGJ1dHRvbkNvbnRhaW5lckVsXHJcbiAgICAgICAgICAgICAgICAgICAgLmNyZWF0ZUVsKCdidXR0b24nLCB7IGF0dHI6IHsgdHlwZTogJ2J1dHRvbicgfSwgdGV4dDogJ05ldmVyIG1pbmQnIH0pXHJcbiAgICAgICAgICAgICAgICAgICAgLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJywgKCkgPT4gdGhpcy5jbG9zZSgpKTtcclxuICAgICAgICAgICAgICAgIGJ1dHRvbkNvbnRhaW5lckVsLmNyZWF0ZUVsKCdidXR0b24nLCB7XHJcbiAgICAgICAgICAgICAgICAgICAgYXR0cjogeyB0eXBlOiAnc3VibWl0JyB9LFxyXG4gICAgICAgICAgICAgICAgICAgIGNsczogJ21vZC1jdGEnLFxyXG4gICAgICAgICAgICAgICAgICAgIHRleHQ6ICdBZGQgVGhlbWUnLFxyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgLy8gaW52b2tlZCB3aGVuIGJ1dHRvbiBpcyBjbGlja2VkLiBcclxuICAgICAgICAgICAgZm9ybUVsLmFkZEV2ZW50TGlzdGVuZXIoJ3N1Ym1pdCcsIGFzeW5jIChlOiBFdmVudCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuYWRkcmVzcyAhPT0gJycpIGF3YWl0IHRoaXMuc3VibWl0Rm9ybSgpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBhc3luYyBvbkNsb3NlKCk6IFByb21pc2U8dm9pZD4ge1xyXG4gICAgICAgIGlmICh0aGlzLm9wZW5TZXR0aW5nc1RhYkFmdGVyd2FyZHMpIHtcclxuICAgICAgICAgICAgYXdhaXQgKHRoaXMucGx1Z2luIGFzIGFueSkuYXBwLnNldHRpbmcub3BlbigpO1xyXG4gICAgICAgICAgICBhd2FpdCAodGhpcy5wbHVnaW4gYXMgYW55KS5hcHAuc2V0dGluZy5vcGVuVGFiQnlJZChcIm9ic2lkaWFuNDItYnJhdFwiKTtcclxuICAgICAgICB9XHJc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ICAgICAgICAgLmFkZFRleHQoKHRleHRFbCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHRleHRFbC5zZXRQbGFjZWhvbGRlcignUmVwb3NpdG9yeSAoZXhhbXBsZTogVGZUSGFja2VyL29ic2lkaWFuLWJyYXQnKTtcclxuICAgICAgICAgICAgICAgICAgICB0ZXh0RWwub25DaGFuZ2UoKHZhbHVlKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuYWRkcmVzcyA9IHZhbHVlLnRyaW0oKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICB0ZXh0RWwuaW5wdXRFbC5hZGRFdmVudExpc3RlbmVyKCdrZXlkb3duJywgYXN5bmMgKGU6IEtleWJvYXJkRXZlbnQpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGUua2V5ID09PSAnRW50ZXInICYmIHRoaXMuYWRkcmVzcyAhPT0gJyAnKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnN1Ym1pdEZvcm0oKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIHRleHRFbC5pbnB1dEVsLnN0eWxlLndpZHRoID0gXCIxMDAlXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgd2luZG93LnNldFRpbWVvdXQoKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB0aXRsZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoXCIuc2V0dGluZy1pdGVtLWluZm9cIik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aXRsZSkgdGl0bGUucmVtb3ZlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHRFbC5pbnB1dEVsLmZvY3VzKClcclxuICAgICAgICAgICAgICAgICAgICB9LCAxMCk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIGZvcm1FbC5jcmVhdGVEaXYoJ21vZGFsLWJ1dHRvbi1jb250YWluZXInLCAoYnV0dG9uQ29udGFpbmVyRWwpID0+IHtcclxuICAgICAgICAgICAgICAgIGJ1dHRvbkNvbnRhaW5lckVsXHJcbiAgICAgICAgICAgICAgICAgICAgLmNyZWF0ZUVsKCdidXR0b24nLCB7IGF0dHI6IHsgdHlwZTogJ2J1dHRvbicgfSwgdGV4dDogJ05ldmVyIG1pbmQnIH0pXHJcbiAgICAgICAgICAgICAgICAgICAgLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJywgKCkgPT4gdGhpcy5jbG9zZSgpKTtcclxuICAgICAgICAgICAgICAgIGJ1dHRvbkNvbnRhaW5lckVsLmNyZWF0ZUVsKCdidXR0b24nLCB7XHJcbiAgICAgICAgICAgICAgICAgICAgYXR0cjogeyB0eXBlOiAnc3VibWl0JyB9LFxyXG4gICAgICAgICAgICAgICAgICAgIGNsczogJ21vZC1jdGEnLFxyXG4gICAgICAgICAgICAgICAgICAgIHRleHQ6ICdBZGQgUGx1Z2luJyxcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIC8vIGludm9rZWQgd2hlbiBidXR0b24gaXMgY2xpY2tlZC4gXHJcbiAgICAgICAgICAgIGZvcm1FbC5hZGRFdmVudExpc3RlbmVyKCdzdWJtaXQnLCBhc3luYyAoZTogRXZlbnQpID0+IHtcclxuICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICAgICAgICAgIGlmICh0aGlzLmFkZHJlc3MgIT09ICcnKSBhd2FpdCB0aGlzLnN1Ym1pdEZvcm0oKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAg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GAke3Jlc3VsdHMuZGlzcGxheX0gcGx1Z2luIGRpc2FibGVkYCwgZmFsc2UpO1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIEB0cy1pZ25vcmVcclxuICAgICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnBsdWdpbi5hcHAucGx1Z2lucy5kaXNhYmxlUGx1Z2luKHJlc3VsdHMuaW5mbyk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAge1xyXG4gICAgICAgICAgICBpZDogXCJCUkFULWVuYWJsZVBsdWdpblwiLFxyXG4gICAgICAgICAgICBpY29uOiBcIkJyYXRJY29uXCIsXHJcbiAgICAgICAgICAgIG5hbWU6IFwiUGx1Z2luczogRW5hYmxlIGEgcGx1Z2luIC0gdG9nZ2xlIGl0IG9uXCIsXHJcbiAgICAgICAgICAgIHNob3dJblJpYmJvbjogdHJ1ZSxcclxuICAgICAgICAgICAgY2FsbGJhY2s6IGFzeW5jICgpID0+IHtcclxuICAgICAgICAgICAgICAgIGNvbnN0IHBsdWdpbkxpc3QgPSB0aGlzLnBsdWdpbi5iZXRhUGx1Z2lucy5nZXRFbmFibGVkRGlzYWJsZWRQbHVnaW5zKGZhbHNlKS5tYXAobWFuaWZlc3QgPT4geyByZXR1cm4geyBkaXNwbGF5OiBgJHttYW5pZmVzdC5uYW1lfSAoJHttYW5pZmVzdC5pZH0pYCwgaW5mbzogbWFuaWZlc3QuaWQgfSB9KTtcclxuICAgICAgICAgICAgICAgIGNvbnN0IGdmcyA9IG5ldyBHZW5lcmljRnV6enlTdWdnZXN0ZXIodGhpcy5wbHVnaW4pO1xyXG4gICAgICAgICAgICAgICAgZ2ZzLnNldFN1Z2dlc3RlckRhdGEocGx1Z2luTGlzdCk7XHJcbiAgICAgICAgICAgICAgICBhd2FpdCBnZnMuZGlzcGxheShhc3luYyAocmVzdWx0cykgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLmxvZyhgJHtyZXN1bHRzLmRpc3BsYXl9IHBsdWdpbiBlbmFibGVkYCwgZmFsc2UpO1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIEB0cy1pZ25vcmVcclxuICAgICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnBsdWdpbi5hcHAucGx1Z2lucy5lbmFibGVQbHVnaW4ocmVzdWx0cy5pbmZvKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICB7XHJcbiAgICAgICAgICAgIGlkOiBcIkJSQVQtb3BlbkdpdEh1YlpSZXBvc2l0b3J5XCIsXHJcbiAgICAgICAgICAgIGljb246IFwiQnJhdEljb25cIixcclxuICAgICAgICAgICAgbmFtZTogXCJQbHVnaW5zOiBPcGVuIHRoZSBHaXRIdWIgcmVwb3NpdG9yeSBmb3IgYSBwbHVnaW5cIixcclxuICAgICAgICAgICAgc2hvd0luUmliYm9uOiB0cnVlLFxyXG4gICAgICAgICAgICBjYWxsYmFjazogYXN5bmMgKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgY29uc3QgY29tbXVuaXR5UGx1Z2lucyA9IGF3YWl0IGdyYWJDb21tbXVuaXR5UGx1Z2luTGlzdCgpO1xyXG4gICAgICAgICAgICAgICAgY29uc3QgY29tbXVuaXR5UGx1Z2luTGlzdDogU3VnZ2VzdGVySXRlbVtdID0gT2JqZWN0LnZhbHVlcyhjb21tdW5pdHlQbHVnaW5zKS5tYXAoKHApID0+IHsgcmV0dXJuIHsgZGlzcGxheTogYFBsdWdpbjogJHtwLm5hbWV9ICAoJHtwLnJlcG99KWAsIGluZm86IHAucmVwbyB9IH0pO1xyXG4gICAgICAgICAgICAgICAgY29uc3QgYnJhdExpc3Q6IFN1Z2dlc3Rlckl0ZW1bXSA9IE9iamVjdC52YWx1ZXModGhpcy5wbHVnaW4uc2V0dGluZ3MucGx1Z2luTGlzdCkubWFwKChwKSA9PiB7IHJldHVybiB7IGRpc3BsYXk6IFwiQlJBVDogXCIgKyBwLCBpbmZvOiBwIH0gfSk7XHJcbiAgICAgICAgICAgICAgICBjb21tdW5pdHlQbHVnaW5MaXN0LmZvckVhY2goc2kgPT4gYnJhdExpc3QucHVzaChzaSkpO1xyXG4gICAgICAgICAgICAgICAgY29uc3QgZ2ZzID0gbmV3IEdlbmVyaWNGdXp6eVN1Z2dlc3Rlcih0aGlzLnBsdWdpbik7XHJcbiAgICAgICAgICAgICAgICBnZnMuc2V0U3VnZ2VzdGVyRGF0YShicmF0TGlzdCk7XHJcbiAgICAgICAgICAgICAgICBhd2FpdCBnZnMuZGlzcGxheShhc3luYyAocmVzdWx0cykgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHRzLmluZm8pIHdpbmRvdy5vcGVuKGBodHRwczovL2dpdGh1Yi5jb20vJHtyZXN1bHRzLmluZm99YClcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICB7XHJcbiAgICAgICAgICAgIGlkOiBcIkJSQVQtb3BlbkdpdEh1YlJlcG9UaGVtZVwiLFxyXG4gICAgICAgICAgICBpY29uOiBcIkJyYXRJY29uXCIsXHJcbiAgICAgICAgICAgIG5hbWU6IFwiVGhlbWVzOiBPcGVuIHRoZSBHaXRIdWIgcmVwb3NpdG9yeSBmb3IgYSB0aGVtZSAoYXBwZWFyYW5jZSlcIixcclxuICAgICAgICAgICAgc2hvd0luUmliYm9uOiB0cnVlLFxyXG4gICAgICAgICAgICBjYWxsYmFjazogYXN5bmMgKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgY29uc3QgY29tbXVuaXR5VGhlbWUgPSBhd2FpdCBncmFiQ29tbW11bml0eVRoZW1lc0xpc3QoKTtcclxuICAgICAgICAgICAgICAgIGNvbnN0IGNvbW11bml0eVRoZW1lTGlzdDogU3VnZ2VzdGVySXRlbVtdID0gT2JqZWN0LnZhbHVlcyhjb21tdW5pdHlUaGVtZSkubWFwKChwKSA9PiB7IHJldHVybiB7IGRpc3BsYXk6IGBUaGVtZTogJHtwLm5hbWV9ICAoJHtwLnJlcG99KWAsIGluZm86IHAucmVwbyB9IH0pO1xyXG4gICAgICAgICAgICAgICAgY29uc3QgZ2ZzID0gbmV3IEdlbmVyaWNGdXp6eVN1Z2dlc3Rlcih0aGlzLnBsdWdpbik7XHJcbiAgICAgICAgICAgICAgICBnZnMuc2V0U3VnZ2VzdGVyRGF0YShjb21tdW5pdHlUaGVtZUxpc3QpO1xyXG4gICAgICAgICAgICAgICAgYXdhaXQgZ2ZzLmRpc3BsYXkoYXN5bmMgKHJlc3VsdHMpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0cy5pbmZvKSB3aW5kb3cub3BlbihgaHR0cHM6Ly9naXRodWIuY29tLyR7cmVzdWx0cy5pbmZvfWApXHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAge1xyXG4gICAgICAgICAgICBpZDogXCJCUkFULW9wZW50UGx1Z2luU2V0dGluZ3NcIixcclxuICAgICAgICAgICAgaWNvbjogXCJCcmF0SWNvblwiLFxyXG4gICAgICAgICAgICBuYW1lOiBcIlBsdWdpbnM6IE9wZW4gUGx1Z2luIFNldHRpbmdzIFRhYlwiLFxyXG4gICAgICAgICAgICBzaG93SW5SaWJib246IHRydWUsXHJcbiAgICAgICAgICAgIGNhbGxiYWNrOiBhc3luYyAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAvLyBAdHMtaWdub3JlXHJcbiAgICAgICAgICAgICAgICBjb25zdCBzZXR0aW5ncyA9IHRoaXMucGx1Z2luLmFwcC5zZXR0aW5nO1xyXG4gICAgICAgICAgICAgICAgLy8gQHRzLWlnbm9yZVxyXG4gICAgICAgICAgICAgICAgY29uc3QgbGlzdE9mUGx1Z2luU2V0dGluZ3NUYWJzOiBTdWdnZXN0ZXJJdGVtW10gPSBPYmplY3QudmFsdWVzKHNldHRpbmdzLnBsdWdpblRhYnMpLm1hcCgodCkgPT4geyByZXR1cm4geyBkaXNwbGF5OiBcIlBsdWdpbjogXCIgKyB0Lm5hbWUsIGluZm86IHQuaWQgfSB9KTtcclxuICAgICAgICAgICAgICAgIGNvbnN0IGdmcyA9IG5ldyBHZW5lcmljRnV6enlTdWdnZXN0ZXIodGhpcy5wbHVnaW4pO1xyXG4gICAgICAgICAgICAgICAgLy8gQHRzLWlnbm9yZVxyXG4gICAgICAgICAgICAgICAgY29uc3QgbGlzdE9mQ29yZVNldHRpbmdzVGFiczogU3VnZ2VzdGVySXRlbVtdID0gT2JqZWN0LnZhbHVlcyhzZXR0aW5ncy5zZXR0aW5nVGFicykubWFwKCh0KSA9PiB7IHJldHVybiB7IGRpc3BsYXk6IFwiQ29yZTogXCIgKyB0Lm5hbWUsIGluZm86IHQuaWQgfSB9KTtcclxuICAgICAgICAgICAgICAgIGxpc3RPZlBsdWdpblNldHRpbmdzVGFicy5mb3JFYWNoKHNpID0+IGxpc3RPZkNvcmVTZXR0aW5nc1RhYnMucHVzaChzaSkpO1xyXG4gICAgICAgICAgICAgICAgZ2ZzLnNldFN1Z2dlc3RlckRhdGEobGlzdE9mQ29yZVNldHRpbmdzVGFicyk7XHJcbiAgICAgICAgICAgICAgICBhd2FpdCBnZnMuZGlzcGxheShhc3luYyAocmVzdWx0cykgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHNldHRpbmdzLm9wZW4oKTtcclxuICAgICAgICAgICAgICAgICAgICBzZXR0aW5ncy5vcGVuVGFiQnlJZChyZXN1bHRzLmluZm8pO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIHtcclxuICAgICAgICAgICAgaWQ6IFwiQlJBVC1HcmFiQ29tbXVuaXR5VGhlbWVcIixcclxuICAgICAgICAgICAgaWNvbjogXCJCcmF0SWNvblwiLFxyXG4gICAgICAgICAgICBuYW1lOiBcIlRoZW1lczogR3JhYiBhIGNvbW11bml0eSB0aGVtZVwiLFxyXG4gICAgICAgICAgICBzaG93SW5SaWJib246IHRydWUsXHJcbiAgICAgICAgICAgIGNhbGxiYWNrOiBhc3luYyAoKSA9PiBhd2FpdCB0aGVtZXNJbnN0YWxsRnJvbUNvbW11bml0eUxpc3QodGhpcy5wbHVnaW4pXHJcbiAgICAgICAgfSxcclxuICAgICAgICB7XHJcbiAgICAgICAgICAgIGlkOiBcIkJSQVQtR3JhYkJldGFUaGVtZVwiLFxyXG4gICAgICAgICAgICBpY29uOiBcIkJyYXRJY29uXCIsXHJcbiAgICAgICAgICAgIG5hbWU6IFwiVGhlbWVzOiBHcmFiIGEgYmV0YSB0aGVtZSBmb3IgdGVzdGluZyBmcm9tIGEgR2l0aHViIHJlcG9zaXRvcnlcIixcclxuICAgICAgICAgICAgc2hvd0luUmliYm9uOiB0cnVlLFxyXG4gICAgICAgICAgICBjYWxsYmFjazogYXN5bmMgKCkgPT4geyAobmV3IEFkZE5ld1RoZW1lKHRoaXMucGx1Z2luKSkub3BlbigpIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIHtcclxuICAgICAgICAgICAgaWQ6IFwiQlJBVC11cGRhdGVCZXRhVGhlbWVzXCIsXHJcbiAgICAgICAgICAgIGljb246IFwiQnJhdEljb25cIixcclxuICAgICAgICAgICAgbmFtZTogXCJUaGVtZXM6IFVwZGF0ZSBiZXRhIHRoZW1lc1wiLFxyXG4gICAgICAgICAgICBzaG93SW5SaWJib246IHRydWUsXHJcbiAgICAgICAgICAgIGNhbGxiYWNrOiBhc3luYyAoKSA9PiBhd2FpdCB0aGVtZXNlQ2hlY2tBbmRVcGRhdGVzKHRoaXMucGx1Z2luLCB0cnVlKSBcclxuICAgICAgICB9LCAgICAgICAgXHJcbiAgICAgICAge1xyXG4gICAgICAgICAgICBpZDogXCJCUkFULXN3aXRjaFRoZW1lXCIsXHJcbiAgICAgICAgICAgIGljb246IFwiQnJhdEljb25cIixcclxuICAgICAgICAgICAgbmFtZTogXCJUaGVtZXM6IFN3aXRjaCBBY3RpdmUgVGhlbWUgXCIsXHJcbiAgICAgICAgICAgIHNob3dJblJpYmJvbjogdHJ1ZSxcclxuICAgICAgICAgICAgY2FsbGJhY2s6IGFzeW5jICgpID0+IHtcclxuICAgICAgICAgICAgICAgIC8vIEB0cy1pZ25vcmVcclxuICAgICAgICAgICAgICAgIGNvbnN0IGNvbW11bml0eVRoZW1lTGlzdDogU3VnZ2VzdGVySXRlbVtdID0gT2JqZWN0LnZhbHVlcyh0aGlzLnBsdWdpbi5hcHAuY3VzdG9tQ3NzLnRoZW1lcykubWFwKCh0KSA9PiB7IHJldHVybiB7IGRpc3BsYXk6IHQsIGluZm86IHQgfSB9KTtcclxuICAgICAgICAgICAgICAgIGNvbW11bml0eVRoZW1lTGlzdC51bnNoaWZ0KHsgZGlzcGxheTogXCJPYnNpZGlhbiBEZWZhdWx0IFRoZW1lXCIsIGluZm86IFwiXCIgfSk7XHJcbiAgICAgICAgICAgICAgICBjb25zdCBnZnMgPSBuZXcgR2VuZXJpY0Z1enp5U3VnZ2VzdGVyKHRoaXMucGx1Z2luKTtcclxuICAgICAgICAgICAgICAgIGdmcy5zZXRTdWdnZXN0ZXJEYXRhKGNvbW11bml0eVRoZW1lTGlzdCk7XHJcbiAgICAgICAgICAgICAgICBhd2FpdCBnZnMuZGlzcGxheShhc3luYyAocmVzdWx0cykgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLmxvZyhgU3dpdGNoZWQgdG8gdGhlbWUgJHtyZXN1bHRzLmRpc3BsYXl9YCwgZmFsc2UpO1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIEB0cy1pZ25vcmVcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5hcHAuY3VzdG9tQ3NzLnNldFRoZW1lKHJlc3VsdHMuaW5mbyk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAge1xyXG4gICAgICAgICAgICBpZDogXCJCUkFULWFsbENvbW1hbmRzXCIsXHJcbiAgICAgICAgICAgIGljb246IFwiQnJhdEljb25cIixcclxuICAgICAgICAgICAgbmFtZTogXCJBbGwgQ29tbWFuZHMgbGlzdFwiLFxyXG4gICAgICAgICAgICBzaG93SW5SaWJib246IGZhbHNlLFxyXG4gICAgICAgICAgICBjYWxsYmFjazogYXN5bmMgKCkgPT4gdGhpcy5yaWJib25EaXNwbGF5Q29tbWFuZHMoKVxyXG4gICAgICAgIH0sXHJcbiAgICBdXHJcblxyXG4gICAgYXN5bmMgcmliYm9uRGlzcGxheUNvbW1hbmRzKCk6IFByb21pc2U8dm9pZD4ge1xyXG4gICAgICAgIGNvbnN0IGJyYXRDb21tYW5kTGlzdDogU3VnZ2VzdGVySXRlbVtdID0gW107XHJcbiAgICAgICAgdGhpcy5icmF0Q29tbWFuZHMuZm9yRWFjaChjbWQgPT4geyBpZiAoY21kLnNob3dJblJpYmJvbikgYnJhdENvbW1hbmRMaXN0LnB1c2goeyBkaXNwbGF5OiBjbWQubmFtZSwgaW5mbzogY21kLmNhbGxiYWNrIH0pIH0pO1xyXG4gICAgICAgIGNvbnN0IGdmcyA9IG5ldyBHZW5lcmljRnV6enlTdWdnZXN0ZXIodGhpcy5wbHVnaW4pO1xyXG4gICAgICAgIC8vIEB0cy1pZ25vcmVcclxuICAgICAgICBjb25zdCBzZXR0aW5ncyA9IHRoaXMucGx1Z2luLmFwcC5zZXR0aW5nO1xyXG4gICAgICAgIC8vIEB0cy1pZ25vcmVcclxuICAgICAgICBjb25zdCBsaXN0T2ZDb3JlU2V0dGluZ3NUYWJzOiBTdWdnZXN0ZXJJdGVtW10gPSBPYmplY3QudmFsdWVzKHNldHRpbmdzLnNldHRpbmdUYWJzKS5tYXAoKHQ6IGFueSkgPT4ge1xyXG4gICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgZGlzcGxheTogXCJDb3JlOiBcIiArIHQubmFtZSxcclxuICAgICAgICAgICAgICAgIGluZm86IGFzeW5jICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICBzZXR0aW5ncy5vcGVuKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgc2V0dGluZ3Mub3BlblRhYkJ5SWQodC5pZCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgICAgICAvLyBAdHMtaWdub3JlXHJcbiAgICAgICAgY29uc3QgbGlzdE9mUGx1Z2luU2V0dGluZ3NUYWJzOiBTdWdnZXN0ZXJJdGVtW10gPSBPYmplY3QudmFsdWVzKHNldHRpbmdzLnBsdWdpblRhYnMpLm1hcCgodDogYW55KSA9PiB7XHJcbiAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICBkaXNwbGF5OiBcIlBsdWdpbjogXCIgKyB0Lm5hbWUsXHJcbiAgICAgICAgICAgICAgICBpbmZvOiBhc3luYyAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2V0dGluZ3Mub3BlbigpO1xyXG4gICAgICAgICAgICAgICAgICAgIHNldHRpbmdzLm9wZW5UYWJCeUlkKHQuaWQpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIGJyYXRDb21tYW5kTGlzdC5wdXNoKHsgZGlzcGxheTogXCItLS0tIENvcmUgUGx1Z2luIFNldHRpbmdzIC0tLS1cIiwgaW5mbzogYXN5bmMgKCkgPT4geyBhd2FpdCB0aGlzLnJpYmJvbkRpc3BsYXlDb21tYW5kcygpIH0gfSlcclxuICAgICAgICBsaXN0T2ZDb3JlU2V0dGluZ3NUYWJzLmZvckVhY2goc2kgPT4gYnJhdENvbW1hbmRMaXN0LnB1c2goc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