varf=Object.defineProperty;varS=Object.getOwnPropertyDescriptor;varV=Object.getOwnPropertyNames;varx=Object.prototype.hasOwnProperty;varP=(a,l)=>{for(vareinl)f(a,e,{get:l[e],enumerable:!0})},T=(a,l,e,i)=>{if(l&&typeofl=="object"||typeofl=="function")for(letsofV(l))!x.call(a,s)&&s!==e&&f(a,s,{get:()=>l[s],enumerable:!(i=S(l,s))||i.enumerable});returna};vark=a=>T(f({},"__esModule",{value:!0}),a);varE={};P(E,{default:()=>v});module.exports=k(E);varc=require("obsidian");varr=require("obsidian"),p={ribbonIcon:!0,ribbonCommandUsesCode:!0,executeTemplate:'code "{{vaultpath}}" "{{vaultpath}}/{{filepath}}"',openFile:!0,workspacePath:"{{vaultpath}}",useUrlInsiders:!1},m=classextendsr.PluginSettingTab{constructor(e,i){super(e,i);this.plugin=i}display(){let{containerEl:e}=this;e.empty(),e.createEl("h3",{text:"General settings"}),newr.Setting(e).setName("Display Ribbon Icon").setDesc("Toggle this OFF if you want to hide the Ribbon Icon.").addToggle(n=>n.setValue(this.plugin.settings.ribbonIcon).onChange(t=>{this.plugin.settings.ribbonIcon=t,this.plugin.saveSettings(),this.plugin.refreshIconRibbon()})),newr.Setting(e).setName("Ribbon opens via `code` command").setDesc("Toggle this OFF if you'd prefer that the Ribbon Icon opens VSCode via URL.").addToggle(n=>n.setValue(this.plugin.settings.ribbonCommandUsesCode).onChange(t=>{this.plugin.settings.ribbonCommandUsesCode=t,this.plugin.saveSettings()})),e.createEl("h3",{text:"Open via `code` CLI settings"}),newr.Setting(e).setName("Template for executing the `code` command").setDesc('You can use the following variables: `{{vaultpath}}` (absolute), `{{filepath}}` (relative), `{{folderpath}}` (relative). Note that on MacOS, a full path to the VSCode executable is required (generally "/usr/local/bin/code"). Example: `/usr/local/bin/code "{{vaultpath}}" "{{vaultpath}}/{{filepath}}"`').addText(n=>n.setPlaceholder(p.executeTemplate).setValue(this.plugin.settings.executeTemplate||p.executeTemplate).onChange(t=>{t=t.trim(),t===""&&(t=p.executeTemplate),this.plugin.settings.executeTemplate=t,this.plugin.saveData(this.plugin.settings)})),e.createEl("h3",{text:"Open via `vscode://` URL settings"});lets=e.createEl("p").createEl("em",{text:`
`});s.appendChild(createEl("a",{text:"Open in VSCode Readme",href:"https://github.com/NomarCub/obsidian-open-vscode/blob/master/README.md#caveats-regarding-the-url-command-for-windows-users"})),s.appendText("."),new r.Setting(e).setName("Open current file").setDesc("Open the current file rather than the root of the vault.").addToggle(n=>n.setValue(this.plugin.settings.openFile||p.openFile).onChange(t=>{this.plugin.settings.openFile=t,this.plugin.saveData(this.plugin.settings)})),new r.Setting(e).setName("Path to VSCode Workspace").setDesc('Defaults to the {{vaultpath}} template variable. You can set this to an absolute path to a ".code-workspace" file if you prefer to use a Multi Root workspace file: ').setClass("setting-item--vscode-workspacePath").addText(n=>n.setPlaceholder(p.workspacePath).setValue(this.plugin.settings.workspacePath||p.workspacePath).onChange(t=>{t=t.trim(),t===""&&(t=p.workspacePath),this.plugin.settings.workspacePath=t,this.plugin.saveData(this.plugin.settings)}));let d=e.querySelector(".setting-item--vscode-workspacePath .setting-item-description");d.appendChild(createEl("a",{href:"https://code.visualstudio.com/docs/editor/workspaces#_multiroot-workspaces",text:"https://code.visualstudio.com/docs/editor/workspaces#_multiroot-workspaces"})),d.appendText("."),new r.Setting(e).setName("Open VSCode using a `vscode-insiders://` URL").addToggle(n=>{n.setValue(this.plugin.settings.useUrlInsiders).onChange(t=>{this.plugin.settings.useUrlInsiders=t,this.plugin.saveSettings()})})}};var I=`