3 lines
58 KiB
JavaScript
3 lines
58 KiB
JavaScript
"use strict";var Qe=Object.create;var z=Object.defineProperty;var $e=Object.getOwnPropertyDescriptor;var Xe=Object.getOwnPropertyNames;var Ze=Object.getPrototypeOf,et=Object.prototype.hasOwnProperty;var tt=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),at=(n,e)=>{for(var t in e)z(n,t,{get:e[t],enumerable:!0})},ve=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Xe(e))!et.call(n,i)&&i!==t&&z(n,i,{get:()=>e[i],enumerable:!(a=$e(e,i))||a.enumerable});return n};var nt=(n,e,t)=>(t=n!=null?Qe(Ze(n)):{},ve(e||!n||!n.__esModule?z(t,"default",{value:n,enumerable:!0}):t,n)),it=n=>ve(z({},"__esModule",{value:!0}),n);var Ie=tt(l=>{"use strict";Object.defineProperty(l,"__esModule",{value:!0});var m=require("obsidian"),ie="YYYY-MM-DD",oe="gggg-[W]ww",Te="YYYY-MM",Se="YYYY-[Q]Q",Me="YYYY";function H(n){let e=window.app.plugins.getPlugin("periodic-notes");return e&&e.settings?.[n]?.enabled}function W(){try{let{internalPlugins:n,plugins:e}=window.app;if(H("daily")){let{format:o,folder:s,template:c}=e.getPlugin("periodic-notes")?.settings?.daily||{};return{format:o||ie,folder:s?.trim()||"",template:c?.trim()||""}}let{folder:t,format:a,template:i}=n.getPluginById("daily-notes")?.instance?.options||{};return{format:a||ie,folder:t?.trim()||"",template:i?.trim()||""}}catch(n){console.info("No custom daily note settings found!",n)}}function I(){try{let n=window.app.plugins,e=n.getPlugin("calendar")?.options,t=n.getPlugin("periodic-notes")?.settings?.weekly;if(H("weekly"))return{format:t.format||oe,folder:t.folder?.trim()||"",template:t.template?.trim()||""};let a=e||{};return{format:a.weeklyNoteFormat||oe,folder:a.weeklyNoteFolder?.trim()||"",template:a.weeklyNoteTemplate?.trim()||""}}catch(n){console.info("No custom weekly note settings found!",n)}}function V(){let n=window.app.plugins;try{let e=H("monthly")&&n.getPlugin("periodic-notes")?.settings?.monthly||{};return{format:e.format||Te,folder:e.folder?.trim()||"",template:e.template?.trim()||""}}catch(e){console.info("No custom monthly note settings found!",e)}}function _(){let n=window.app.plugins;try{let e=H("quarterly")&&n.getPlugin("periodic-notes")?.settings?.quarterly||{};return{format:e.format||Se,folder:e.folder?.trim()||"",template:e.template?.trim()||""}}catch(e){console.info("No custom quarterly note settings found!",e)}}function U(){let n=window.app.plugins;try{let e=H("yearly")&&n.getPlugin("periodic-notes")?.settings?.yearly||{};return{format:e.format||Me,folder:e.folder?.trim()||"",template:e.template?.trim()||""}}catch(e){console.info("No custom yearly note settings found!",e)}}function Fe(...n){let e=[];for(let a=0,i=n.length;a<i;a++)e=e.concat(n[a].split("/"));let t=[];for(let a=0,i=e.length;a<i;a++){let o=e[a];!o||o==="."||t.push(o)}return e[0]===""&&t.unshift(""),t.join("/")}function st(n){let e=n.substring(n.lastIndexOf("/")+1);return e.lastIndexOf(".")!=-1&&(e=e.substring(0,e.lastIndexOf("."))),e}async function rt(n){let e=n.replace(/\\/g,"/").split("/");if(e.pop(),e.length){let t=Fe(...e);window.app.vault.getAbstractFileByPath(t)||await window.app.vault.createFolder(t)}}async function Y(n,e){e.endsWith(".md")||(e+=".md");let t=m.normalizePath(Fe(n,e));return await rt(t),t}async function A(n){let{metadataCache:e,vault:t}=window.app,a=m.normalizePath(n);if(a==="/")return Promise.resolve(["",null]);try{let i=e.getFirstLinkpathDest(a,""),o=await t.cachedRead(i),s=window.app.foldManager.load(i);return[o,s]}catch(i){return console.error(`Failed to read the daily note template '${a}'`,i),new m.Notice("Failed to read the daily note template"),["",null]}}function P(n,e="day"){let t=n.clone().startOf(e).format();return`${e}-${t}`}function Ee(n){return n.replace(/\[[^\]]*\]/g,"")}function lt(n,e){if(e==="week"){let t=Ee(n);return/w{1,2}/i.test(t)&&(/M{1,4}/.test(t)||/D{1,4}/.test(t))}return!1}function L(n,e){return Oe(n.basename,e)}function ct(n,e){return Oe(st(n),e)}function Oe(n,e){let a={day:W,week:I,month:V,quarter:_,year:U}[e]().format.split("/").pop(),i=window.moment(n,a,!0);if(!i.isValid())return null;if(lt(a,e)&&e==="week"){let o=Ee(a);if(/w{1,2}/i.test(o))return window.moment(n,a.replace(/M{1,4}/g,"").replace(/D{1,4}/g,""),!1)}return i}var se=class extends Error{};async function Ae(n){let e=window.app,{vault:t}=e,a=window.moment,{template:i,format:o,folder:s}=W(),[c,d]=await A(i),p=n.format(o),h=await Y(s,p);try{let f=await t.create(h,c.replace(/{{\s*date\s*}}/gi,p).replace(/{{\s*time\s*}}/gi,a().format("HH:mm")).replace(/{{\s*title\s*}}/gi,p).replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(g,T,M,D,v,y)=>{let ee=a(),te=n.clone().set({hour:ee.get("hour"),minute:ee.get("minute"),second:ee.get("second")});return M&&te.add(parseInt(D,10),v),y?te.format(y.substring(1).trim()):te.format(o)}).replace(/{{\s*yesterday\s*}}/gi,n.clone().subtract(1,"day").format(o)).replace(/{{\s*tomorrow\s*}}/gi,n.clone().add(1,"d").format(o)));return e.foldManager.save(f,d),f}catch(f){console.error(`Failed to create file: '${h}'`,f),new m.Notice("Unable to create new file.")}}function pt(n,e){return e[P(n,"day")]??null}function dt(){let{vault:n}=window.app,{folder:e}=W(),t=n.getAbstractFileByPath(m.normalizePath(e));if(!t)throw new se("Failed to find daily notes folder");let a={};return m.Vault.recurseChildren(t,i=>{if(i instanceof m.TFile){let o=L(i,"day");if(o){let s=P(o,"day");a[s]=i}}}),a}var re=class extends Error{};function ut(){let{moment:n}=window,e=n.localeData()._week.dow,t=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];for(;e;)t.push(t.shift()),e--;return t}function gt(n){return ut().indexOf(n.toLowerCase())}async function Le(n){let{vault:e}=window.app,{template:t,format:a,folder:i}=I(),[o,s]=await A(t),c=n.format(a),d=await Y(i,c);try{let p=await e.create(d,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(h,f,g,T,M,D)=>{let v=window.moment(),y=n.clone().set({hour:v.get("hour"),minute:v.get("minute"),second:v.get("second")});return g&&y.add(parseInt(T,10),M),D?y.format(D.substring(1).trim()):y.format(a)}).replace(/{{\s*title\s*}}/gi,c).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\s*:(.*?)}}/gi,(h,f,g)=>{let T=gt(f);return n.weekday(T).format(g.trim())}));return window.app.foldManager.save(p,s),p}catch(p){console.error(`Failed to create file: '${d}'`,p),new m.Notice("Unable to create new file.")}}function mt(n,e){return e[P(n,"week")]??null}function ht(){let n={};if(!Re())return n;let{vault:e}=window.app,{folder:t}=I(),a=e.getAbstractFileByPath(m.normalizePath(t));if(!a)throw new re("Failed to find weekly notes folder");return m.Vault.recurseChildren(a,i=>{if(i instanceof m.TFile){let o=L(i,"week");if(o){let s=P(o,"week");n[s]=i}}}),n}var le=class extends Error{};async function Ce(n){let{vault:e}=window.app,{template:t,format:a,folder:i}=V(),[o,s]=await A(t),c=n.format(a),d=await Y(i,c);try{let p=await e.create(d,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(h,f,g,T,M,D)=>{let v=window.moment(),y=n.clone().set({hour:v.get("hour"),minute:v.get("minute"),second:v.get("second")});return g&&y.add(parseInt(T,10),M),D?y.format(D.substring(1).trim()):y.format(a)}).replace(/{{\s*date\s*}}/gi,c).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,c));return window.app.foldManager.save(p,s),p}catch(p){console.error(`Failed to create file: '${d}'`,p),new m.Notice("Unable to create new file.")}}function ft(n,e){return e[P(n,"month")]??null}function wt(){let n={};if(!xe())return n;let{vault:e}=window.app,{folder:t}=V(),a=e.getAbstractFileByPath(m.normalizePath(t));if(!a)throw new le("Failed to find monthly notes folder");return m.Vault.recurseChildren(a,i=>{if(i instanceof m.TFile){let o=L(i,"month");if(o){let s=P(o,"month");n[s]=i}}}),n}var ce=class extends Error{};async function yt(n){let{vault:e}=window.app,{template:t,format:a,folder:i}=_(),[o,s]=await A(t),c=n.format(a),d=await Y(i,c);try{let p=await e.create(d,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(h,f,g,T,M,D)=>{let v=window.moment(),y=n.clone().set({hour:v.get("hour"),minute:v.get("minute"),second:v.get("second")});return g&&y.add(parseInt(T,10),M),D?y.format(D.substring(1).trim()):y.format(a)}).replace(/{{\s*date\s*}}/gi,c).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,c));return window.app.foldManager.save(p,s),p}catch(p){console.error(`Failed to create file: '${d}'`,p),new m.Notice("Unable to create new file.")}}function vt(n,e){return e[P(n,"quarter")]??null}function bt(){let n={};if(!He())return n;let{vault:e}=window.app,{folder:t}=_(),a=e.getAbstractFileByPath(m.normalizePath(t));if(!a)throw new ce("Failed to find quarterly notes folder");return m.Vault.recurseChildren(a,i=>{if(i instanceof m.TFile){let o=L(i,"quarter");if(o){let s=P(o,"quarter");n[s]=i}}}),n}var pe=class extends Error{};async function Nt(n){let{vault:e}=window.app,{template:t,format:a,folder:i}=U(),[o,s]=await A(t),c=n.format(a),d=await Y(i,c);try{let p=await e.create(d,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(h,f,g,T,M,D)=>{let v=window.moment(),y=n.clone().set({hour:v.get("hour"),minute:v.get("minute"),second:v.get("second")});return g&&y.add(parseInt(T,10),M),D?y.format(D.substring(1).trim()):y.format(a)}).replace(/{{\s*date\s*}}/gi,c).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,c));return window.app.foldManager.save(p,s),p}catch(p){console.error(`Failed to create file: '${d}'`,p),new m.Notice("Unable to create new file.")}}function Dt(n,e){return e[P(n,"year")]??null}function kt(){let n={};if(!We())return n;let{vault:e}=window.app,{folder:t}=U(),a=e.getAbstractFileByPath(m.normalizePath(t));if(!a)throw new pe("Failed to find yearly notes folder");return m.Vault.recurseChildren(a,i=>{if(i instanceof m.TFile){let o=L(i,"year");if(o){let s=P(o,"year");n[s]=i}}}),n}function Pt(){let{app:n}=window,e=n.internalPlugins.plugins["daily-notes"];if(e&&e.enabled)return!0;let t=n.plugins.getPlugin("periodic-notes");return t&&t.settings?.daily?.enabled}function Re(){let{app:n}=window;if(n.plugins.getPlugin("calendar"))return!0;let e=n.plugins.getPlugin("periodic-notes");return e&&e.settings?.weekly?.enabled}function xe(){let{app:n}=window,e=n.plugins.getPlugin("periodic-notes");return e&&e.settings?.monthly?.enabled}function He(){let{app:n}=window,e=n.plugins.getPlugin("periodic-notes");return e&&e.settings?.quarterly?.enabled}function We(){let{app:n}=window,e=n.plugins.getPlugin("periodic-notes");return e&&e.settings?.yearly?.enabled}function Tt(n){let e={day:W,week:I,month:V,quarter:_,year:U}[n];return e()}function St(n,e){return{day:Ae,month:Ce,week:Le}[n](e)}l.DEFAULT_DAILY_NOTE_FORMAT=ie;l.DEFAULT_MONTHLY_NOTE_FORMAT=Te;l.DEFAULT_QUARTERLY_NOTE_FORMAT=Se;l.DEFAULT_WEEKLY_NOTE_FORMAT=oe;l.DEFAULT_YEARLY_NOTE_FORMAT=Me;l.appHasDailyNotesPluginLoaded=Pt;l.appHasMonthlyNotesPluginLoaded=xe;l.appHasQuarterlyNotesPluginLoaded=He;l.appHasWeeklyNotesPluginLoaded=Re;l.appHasYearlyNotesPluginLoaded=We;l.createDailyNote=Ae;l.createMonthlyNote=Ce;l.createPeriodicNote=St;l.createQuarterlyNote=yt;l.createWeeklyNote=Le;l.createYearlyNote=Nt;l.getAllDailyNotes=dt;l.getAllMonthlyNotes=wt;l.getAllQuarterlyNotes=bt;l.getAllWeeklyNotes=ht;l.getAllYearlyNotes=kt;l.getDailyNote=pt;l.getDailyNoteSettings=W;l.getDateFromFile=L;l.getDateFromPath=ct;l.getDateUID=P;l.getMonthlyNote=ft;l.getMonthlyNoteSettings=V;l.getPeriodicNoteSettings=Tt;l.getQuarterlyNote=vt;l.getQuarterlyNoteSettings=_;l.getTemplateInfo=A;l.getWeeklyNote=mt;l.getWeeklyNoteSettings=I;l.getYearlyNote=Dt;l.getYearlyNoteSettings=U});var At={};at(At,{default:()=>Z});module.exports=it(At);var S=require("obsidian");var N=require("obsidian");var F=require("obsidian");function k(n){return n?n.extension=="md"?n.path.slice(0,-3):n.path:""}function be(n){return n.split("/").slice(-1)[0].contains(".")?n:`${n}.md`}function ae(n,e=void 0){let t=n.vault.getFiles();if(e){let a=n.vault.getFolderByPath(e);if(!a)return;t=Ne(a)}if(t.filter(a=>["md","canvas","base"].contains(a.extension)),t.length){let a=Math.floor(Math.random()*t.length);return k(t[a])}}function Ne(n){let e=[];for(let t of n.children)t instanceof F.TFile?e.push(t):t instanceof F.TFolder&&e.push(...Ne(t));return e}function De(n){return n.workspace.getActiveViewOfType(F.View)?.getViewType()=="empty"}function ne(n,e){return n.localeCompare(e,void 0,{sensitivity:"accent"})===0}function q(n){return new Promise(e=>window.setTimeout(e,n))}async function ke(n){let e=n.workspace.getLayout();e.main={id:"5324373015726ba8",type:"split",children:[{id:"4509724f8bf84da7",type:"tabs",children:[{id:"e7a7b303c61786dc",type:"leaf",state:{type:"empty",state:{},icon:"lucide-file",title:"New tab"}}]}],direction:"vertical"},e.active="e7a7b303c61786dc",await n.workspace.changeLayout(e),F.Platform.isMobile&&(n.workspace.rightSplit?.updateInfo(),ot(n))}function ot(n){let e=n.internalPlugins.plugins.sync?.instance;e&&n.workspace.onLayoutReady(()=>{e.statusIconEl=n.workspace.rightSplit.addHeaderButton("sync-small",e.openStatusIconMenu.bind(e)),e.statusIconEl.addEventListener("contextmenu",e.openStatusIconMenu.bind(e)),e.statusIconEl.addClass("sync-status-icon")})}function Pe(n){let e=n.internalPlugins.plugins.sync,t=[new Promise(a=>{let i=async()=>{a(),n.workspace.off("layout-change",i)};n.workspace.on("layout-change",i)})];return e.enabled&&e.instance.syncing&&t.push(new Promise(a=>{let i=async()=>{a(),e.instance.off("status-change",i)};e.instance.on("status-change",i)})),Promise.race([Promise.all(t),new Promise(a=>window.setTimeout(a,1500))])}var u=nt(Ie()),Mt="custom-journal-locale",de={"Daily Note":{noun:"day",adjective:"daily",create:u.createDailyNote,get:u.getDailyNote,getAll:u.getAllDailyNotes},"Weekly Note":{noun:"week",adjective:"weekly",create:u.createWeeklyNote,get:u.getWeeklyNote,getAll:u.getAllWeeklyNotes},"Monthly Note":{noun:"month",adjective:"monthly",create:u.createMonthlyNote,get:u.getMonthlyNote,getAll:u.getAllMonthlyNotes},"Yearly Note":{noun:"year",adjective:"yearly",create:u.createYearlyNote,get:u.getYearlyNote,getAll:u.getAllYearlyNotes}},J=["Daily Note","Weekly Note","Monthly Note","Yearly Note"],Ve="Date-dependent file";async function _e(n,e){let t=e.communityPlugins["periodic-notes"],a=de[n],i=window.moment().startOf(a.noun),o;if(Ye(t)){let s=a.getAll();Object.keys(s).length?o=a.get(i,s)||await a.create(i):o=await a.create(i),o||(o=a.get(i,s))}else t.cache.initialize(),o=t.getPeriodicNote(a.noun,i)||await t.createPeriodicNote(a.noun,i);return k(o)}function Ue(n,e){if(n=="Daily Note"&&e.internalPlugins["daily-notes"]?.enabled)return!0;let t=e.communityPlugins["periodic-notes"];if(!t)return!1;if(Ye(t)){let a=de[n].adjective;return t.settings[a]?.enabled}else{let a=de[n].noun;return t?.calendarSetManager?.getActiveSet()[a]?.enabled}}function Ye(n){return(n?.manifest.version||"0").startsWith("0")}function Be(n){return!!n.plugin.communityPlugins.journals.getJournal(n.data.value)}async function Ke(n,e){let t=e.communityPlugins.journals,a=t.getJournal(n),i=a.config.value.autoCreate;t.reprocessNotes(),a.config.value.autoCreate=!0,await a.autoCreate(),a.config.value.autoCreate=i;let o=window.moment().locale(Mt).startOf("day");return a.getNotePath(a?.get(o)).replace(/\.md$/,"")}var ue={"Replace all open notes":"Replace all open notes","Replace last note":"Replace last note","Keep open notes":"Keep open notes","Default view":"Default view","Reading view":"Reading view","Editing view (Source)":"Editing view (Source)","Editing view (Live Preview)":"Editing view (Live Preview)",File:"File",Workspace:"Workspace","Random file":"Random file","Random in folder":"Random in folder","New note":"New note","Graph view":"Graph view",Nothing:"Nothing",Journal:"Journal","Daily Note":"Daily Note","Weekly Note":"Weekly Note","Monthly Note":"Monthly Note","Yearly Note":"Yearly Note",Both:"Both","Startup only":"Startup only","Manual only":"Manual only",openHomepage:"Open homepage",setToActiveFile:"Set to active file",copyDebugInfo:"Copy debug info",cliOpenHomepageDesc:"Open the homepage",cliOpenHomepageResult:"Opened the homepage",cliReadHomepageDesc:"Read homepage contents",cliReadHomepageIllegible:"The current homepage cannot be viewed, as it does not match an file",pluginUnavailable:"The active homepage cannot be opened due to plugin unavailablity.",journalUnavailable:'Cannot find the journal "?0" to use as the homepage.',workspaceUnavailable:'Cannot find the workspace "?0" to use as the homepage.',noteUnavailable:'Cannot find the file "?0" to use as the homepage.',homepageChanged:'The homepage has been changed to "?0".',momentUpgradeNotice:"Date-dependent notes in Homepage have been removed. Set your homepage as a Periodic or Daily Note instead.",openOnStartup:"Open on startup",openOnStartupDesc:"When launching Obsidian, open the homepage.",openOnStartupWarn:'This will override the built-in "Default file to open" setting.',openWhenEmpty:"Open when empty",openWhenEmptyDesc:"When there are no tabs open, open the homepage.",alwaysApply:"Use when opening normally",alwaysApplyDesc:"Use homepage settings when opening it normally, such as from a link or the file browser.",separateMobile:"Separate mobile homepage",separateMobileDesc:"For mobile devices, store the homepage and its settings separately.",separateMobileWarnPrefix:"Mobile settings are stored separately.",separateMobileWarnMobile:"Therefore, changes to other settings will not affect desktop devices. To edit desktop settings, use a desktop device.",separateMobileWarnDesktop:"Therefore, changes to other settings will not affect mobile devices. To edit mobile settings, use a mobile device.",commandsGroup:"Commands",commandsDesc:"Select commands that will be executed when opening the homepage.",commandsAddButton:"Add...",commandUnavailable:"This command can't be found, so it won't be executed. It may belong to a disabled plugin.",commandsReally:"Really?",vaultGroup:"Vault environment",openMode:"Opening method",openModeDesc:"Determine how extant tabs and views are affected on startup.",manualOpenMode:"Manual opening method",manualOpenModeDesc:"Determine how extant tabs and views are affected when opening with commands or the ribbon button.",pin:"Pin",pinDesc:"Pin the homepage when opening.",hideReleaseNotes:"Hide release notes",hideReleaseNotesDesc:"Never display release notes when Obsidian updates.",autoCreate:"Auto-create",autoCreateDesc:"When the homepage doesn't exist, create a note with its name.",autoCreateWarn:"If this vault is synced using unofficial services, this may lead to content being overwritten.",openingGroup:"Opened view",view:"Homepage view",viewDesc:"Choose what view to open the homepage in.",revertView:"Revert view on close",revertViewDesc:"When navigating away from the homepage, restore the default view.",autoScroll:"Auto-scroll",autoScrollDesc:"When opening the homepage, scroll to the bottom and focus on the last line",refreshDataview:"Refresh Dataview",refreshDataviewDesc:"Always attempt to reload Dataview views when opening the homepage",refreshDataviewWarn:"Requires Dataview auto-refresh to be enabled.",FileDesc:"Enter a note, base, or canvas to use.",WorkspaceDesc:"Enter an Obsidian workspace to use.","New noteDesc":"Enter a prefix to use. A note using that prefix will be created for each Obsidian session.","Graph viewDesc":"Your graph view will be used.",NothingDesc:"Nothing will occur by default. Any commands added will still take effect.","Random fileDesc":"A random note, base, or canvas from your Obsidian folder will be selected.","Random in folderDesc":"Enter a folder. A random note, base, or canvas from it will be selected.",JournalDesc:"Enter a Journal to use.","Daily noteDesc":"Your Daily Note or Periodic Daily Note will be used.","Weekly noteDesc":"Your Periodic Weekly Note will be used.","Monthly noteDesc":"Your Periodic Monthly Note will be used.","Yearly noteDesc":"Your Periodic Yearly Note will be used.",homepageSettingTitle:"Homepage",pluginUnavailableSettings:"The plugin required for this homepage type isn't available.",copyDebugInfoNotice:"Copied homepage debug information to clipboard"};var je={"Replace all open notes":"\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C \u0432\u0441\u0435 \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0435 \u0437\u0430\u043C\u0435\u0442\u043A\u0438","Replace last note":"\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u044E\u044E \u0437\u0430\u043C\u0435\u0442\u043A\u0443","Keep open notes":"\u041E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0435 \u0437\u0430\u043C\u0435\u0442\u043A\u0438","Default view":"\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E","Reading view":"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440","Editing view (Source)":"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0438\u0441\u0445\u043E\u0434\u043D\u043E\u0433\u043E \u043A\u043E\u0434\u0430","Editing view (Live Preview)":"\u0414\u0438\u043D\u0430\u043C\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440",File:"\u0424\u0430\u0439\u043B",Workspace:"\u0420\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E","Random file":"\u0421\u043B\u0443\u0447\u0430\u0439\u043D\u044B\u0439 \u0444\u0430\u0439\u043B","Random in folder":"\u0421\u043B\u0443\u0447\u0430\u0439\u043D\u044B\u0439 \u0444\u0430\u0439\u043B \u0438\u0437 \u043F\u0430\u043F\u043A\u0438","New note":"\u041D\u043E\u0432\u0430\u044F \u0437\u0430\u043C\u0435\u0442\u043A\u0430","Graph view":"\u0413\u0440\u0430\u0444",Nothing:"\u041D\u0438\u0447\u0435\u0433\u043E",Journal:"\u0416\u0443\u0440\u043D\u0430\u043B","Daily Note":"\u0415\u0436\u0435\u0434\u043D\u0435\u0432\u043D\u0430\u044F \u0437\u0430\u043C\u0435\u0442\u043A\u0430","Weekly Note":"\u0415\u0436\u0435\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0430\u044F \u0437\u0430\u043C\u0435\u0442\u043A\u0430","Monthly Note":"\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u0430\u044F \u0437\u0430\u043C\u0435\u0442\u043A\u0430","Yearly Note":"\u0415\u0436\u0435\u0433\u043E\u0434\u043D\u0430\u044F \u0437\u0430\u043C\u0435\u0442\u043A\u0430",Both:"\u041E\u0431\u0430 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u0430","Startup only":"\u0422\u043E\u043B\u044C\u043A\u043E \u043F\u0440\u0438 \u0437\u0430\u043F\u0443\u0441\u043A\u0435","Manual only":"\u0422\u043E\u043B\u044C\u043A\u043E \u0432\u0440\u0443\u0447\u043D\u0443\u044E",openHomepage:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0434\u043E\u043C\u0430\u0448\u043D\u044E\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443",setToActiveFile:"\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0439 \u0444\u0430\u0439\u043B",copyDebugInfo:"\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043E\u0442\u043B\u0430\u0434\u043E\u0447\u043D\u0443\u044E \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044E",pluginUnavailable:"\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u0434\u043E\u043C\u0430\u0448\u043D\u044E\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443: \u043F\u043B\u0430\u0433\u0438\u043D \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D.",journalUnavailable:'\u0416\u0443\u0440\u043D\u0430\u043B "?0" \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.',workspaceUnavailable:'\u0420\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E "?0" \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E.',noteUnavailable:'\u0424\u0430\u0439\u043B "?0" \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.',homepageChanged:'\u0414\u043E\u043C\u0430\u0448\u043D\u044F\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0430 \u043D\u0430 "?0".',momentUpgradeNotice:"\u0417\u0430\u043C\u0435\u0442\u043A\u0438, \u0437\u0430\u0432\u0438\u0441\u044F\u0449\u0438\u0435 \u043E\u0442 \u0434\u0430\u0442\u044B, \u0443\u0434\u0430\u043B\u0435\u043D\u044B \u0438\u0437 Homepage. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u043F\u0435\u0440\u0438\u043E\u0434\u0438\u0447\u0435\u0441\u043A\u0443\u044E \u0438\u043B\u0438 \u0435\u0436\u0435\u0434\u043D\u0435\u0432\u043D\u0443\u044E \u0437\u0430\u043C\u0435\u0442\u043A\u0443.",openOnStartup:"\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u043F\u0440\u0438 \u0437\u0430\u043F\u0443\u0441\u043A\u0435",openOnStartupDesc:"\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u0434\u043E\u043C\u0430\u0448\u043D\u044E\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u043F\u0440\u0438 \u0437\u0430\u043F\u0443\u0441\u043A\u0435 Obsidian.",openOnStartupWarn:"\u042D\u0442\u043E \u043F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0443 \u0444\u0430\u0439\u043B\u0430 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E.",openWhenEmpty:"\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u043F\u0440\u0438 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0432\u043A\u043B\u0430\u0434\u043E\u043A",openWhenEmptyDesc:"\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u0434\u043E\u043C\u0430\u0448\u043D\u044E\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443, \u0435\u0441\u043B\u0438 \u043D\u0435\u0442 \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0445 \u0432\u043A\u043B\u0430\u0434\u043E\u043A.",alwaysApply:"\u041F\u0440\u0438\u043C\u0435\u043D\u044F\u0442\u044C \u043F\u0440\u0438 \u043E\u0431\u044B\u0447\u043D\u043E\u043C \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438",alwaysApplyDesc:"\u041F\u0440\u0438\u043C\u0435\u043D\u044F\u0442\u044C \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0434\u043E\u043C\u0430\u0448\u043D\u0435\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u043F\u0440\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438 \u0438\u0437 \u0441\u0441\u044B\u043B\u043E\u043A \u0438\u043B\u0438 \u0444\u0430\u0439\u043B\u043E\u0432\u043E\u0433\u043E \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430.",separateMobile:"\u041E\u0442\u0434\u0435\u043B\u044C\u043D\u0430\u044F \u0434\u043E\u043C\u0430\u0448\u043D\u044F\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0434\u043B\u044F \u043C\u043E\u0431\u0438\u043B\u044C\u043D\u044B\u0445 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432",separateMobileDesc:"\u0425\u0440\u0430\u043D\u0438\u0442\u044C \u0434\u043E\u043C\u0430\u0448\u043D\u044E\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0434\u043B\u044F \u043C\u043E\u0431\u0438\u043B\u044C\u043D\u044B\u0445 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432 \u0438 \u0435\u0451 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u043E.",separateMobileWarnPrefix:"\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u044B\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0445\u0440\u0430\u043D\u044F\u0442\u0441\u044F \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u043E.",separateMobileWarnMobile:"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043D\u0435 \u043F\u043E\u0432\u043B\u0438\u044F\u044E\u0442 \u043D\u0430 \u043D\u0430\u0441\u0442\u043E\u043B\u044C\u043D\u044B\u0435 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0430. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u043D\u0430\u0441\u0442\u043E\u043B\u044C\u043D\u043E\u0435 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u043E \u0434\u043B\u044F \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F.",separateMobileWarnDesktop:"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043D\u0435 \u043F\u043E\u0432\u043B\u0438\u044F\u044E\u0442 \u043D\u0430 \u043C\u043E\u0431\u0438\u043B\u044C\u043D\u044B\u0435 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0430. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u043C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u043E \u0434\u043B\u044F \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F.",commandsGroup:"\u041A\u043E\u043C\u0430\u043D\u0434\u044B",commandsDesc:"\u041A\u043E\u043C\u0430\u043D\u0434\u044B, \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u043C\u044B\u0435 \u043F\u0440\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438 \u0434\u043E\u043C\u0430\u0448\u043D\u0435\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B.",commandsAddButton:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C...",commandUnavailable:"\u041A\u043E\u043C\u0430\u043D\u0434\u0430 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430 \u0438 \u043D\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0430. \u0412\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0439 \u043F\u043B\u0430\u0433\u0438\u043D \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D.",commandsReally:"\u0412\u044B \u0443\u0432\u0435\u0440\u0435\u043D\u044B?",vaultGroup:"\u0421\u0440\u0435\u0434\u0430 \u0445\u0440\u0430\u043D\u0438\u043B\u0438\u0449\u0430",openMode:"\u0421\u043F\u043E\u0441\u043E\u0431 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F",openModeDesc:"\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043A\u0430\u043A \u043E\u0431\u0440\u0430\u0431\u0430\u0442\u044B\u0432\u0430\u044E\u0442\u0441\u044F \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0435 \u0432\u043A\u043B\u0430\u0434\u043A\u0438 \u043F\u0440\u0438 \u0437\u0430\u043F\u0443\u0441\u043A\u0435.",manualOpenMode:"\u0421\u043F\u043E\u0441\u043E\u0431 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E",manualOpenModeDesc:"\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043A\u0430\u043A \u043E\u0431\u0440\u0430\u0431\u0430\u0442\u044B\u0432\u0430\u044E\u0442\u0441\u044F \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0435 \u0432\u043A\u043B\u0430\u0434\u043A\u0438 \u043F\u0440\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 \u043A\u043E\u043C\u0430\u043D\u0434\u044B \u0438\u043B\u0438 \u043A\u043D\u043E\u043F\u043A\u0443.",pin:"\u0417\u0430\u043A\u0440\u0435\u043F\u0438\u0442\u044C",pinDesc:"\u0417\u0430\u043A\u0440\u0435\u043F\u0438\u0442\u044C \u0434\u043E\u043C\u0430\u0448\u043D\u044E\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u043F\u0440\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438.",hideReleaseNotes:"\u0421\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u043F\u0440\u0438\u043C\u0435\u0447\u0430\u043D\u0438\u044F \u043A \u0432\u044B\u043F\u0443\u0441\u043A\u0443",hideReleaseNotesDesc:"\u041D\u0435 \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u043F\u0440\u0438\u043C\u0435\u0447\u0430\u043D\u0438\u044F \u043A \u0432\u044B\u043F\u0443\u0441\u043A\u0443 \u043F\u0440\u0438 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0438 Obsidian.",autoCreate:"\u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u0435",autoCreateDesc:"\u0415\u0441\u043B\u0438 \u0434\u043E\u043C\u0430\u0448\u043D\u0435\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u043D\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u0441\u043E\u0437\u0434\u0430\u0435\u0442 \u0435\u0451.",autoCreateWarn:"\u041F\u0440\u0438 \u0441\u0438\u043D\u0445\u0440\u043E\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 \u043D\u0435\u043E\u0444\u0438\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044B \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u0430 \u043F\u0435\u0440\u0435\u0437\u0430\u043F\u0438\u0441\u044C \u0434\u0430\u043D\u043D\u044B\u0445.",openingGroup:"\u0420\u0435\u0436\u0438\u043C \u043F\u0440\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438",view:"\u0420\u0435\u0436\u0438\u043C \u0434\u043E\u043C\u0430\u0448\u043D\u0435\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B",viewDesc:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0436\u0438\u043C \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F \u0434\u043E\u043C\u0430\u0448\u043D\u0435\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B.",revertView:"\u0412\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044C \u0440\u0435\u0436\u0438\u043C \u043F\u0440\u0438 \u0437\u0430\u043A\u0440\u044B\u0442\u0438\u0438",revertViewDesc:"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C \u0440\u0435\u0436\u0438\u043C \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E \u043F\u0440\u0438 \u0443\u0445\u043E\u0434\u0435 \u0441 \u0434\u043E\u043C\u0430\u0448\u043D\u0435\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B.",autoScroll:"\u0410\u0432\u0442\u043E-scroll",autoScrollDesc:"\u041F\u0440\u043E\u043A\u0440\u0443\u0447\u0438\u0432\u0430\u0442\u044C \u0432\u043D\u0438\u0437 \u0438 \u0444\u043E\u043A\u0443\u0441\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0439 \u0441\u0442\u0440\u043E\u043A\u0435 \u043F\u0440\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438.",refreshDataview:"\u041E\u0431\u043D\u043E\u0432\u043B\u044F\u0442\u044C Dataview",refreshDataviewDesc:"\u041F\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044C \u043F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u044F Dataview \u043F\u0440\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438 \u0434\u043E\u043C\u0430\u0448\u043D\u0435\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B.",refreshDataviewWarn:"\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u043D\u043E\u0435 \u0430\u0432\u0442\u043E\u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 Dataview.",FileDesc:"\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0437\u0430\u043C\u0435\u0442\u043A\u0443, \u0431\u0430\u0437\u0443 \u0438\u043B\u0438 canvas.",WorkspaceDesc:"\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0440\u0430\u0431\u043E\u0447\u0435\u0435 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E Obsidian.","New noteDesc":"\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u043F\u0440\u0435\u0444\u0438\u043A\u0441. \u041F\u0440\u0438 \u043A\u0430\u0436\u0434\u043E\u043C \u0437\u0430\u043F\u0443\u0441\u043A\u0435 Obsidian \u0431\u0443\u0434\u0435\u0442 \u0441\u043E\u0437\u0434\u0430\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u043E\u0432\u0430\u044F \u0437\u0430\u043C\u0435\u0442\u043A\u0430 \u0441 \u044D\u0442\u0438\u043C \u043F\u0440\u0435\u0444\u0438\u043A\u0441\u043E\u043C.","Graph viewDesc":"\u0411\u0443\u0434\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D \u0433\u0440\u0430\u0444.",NothingDesc:"\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E \u043D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043F\u0440\u043E\u0438\u0437\u043E\u0439\u0434\u0435\u0442. \u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u043A\u043E\u043C\u0430\u043D\u0434\u044B \u0431\u0443\u0434\u0443\u0442 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u044B.","Random fileDesc":"\u0411\u0443\u0434\u0435\u0442 \u0432\u044B\u0431\u0440\u0430\u043D \u0441\u043B\u0443\u0447\u0430\u0439\u043D\u044B\u0439 \u0444\u0430\u0439\u043B \u0438\u0437 \u0445\u0440\u0430\u043D\u0438\u043B\u0438\u0449\u0430 Obsidian.","Random in folderDesc":"\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u043F\u0430\u043F\u043A\u0443. \u0411\u0443\u0434\u0435\u0442 \u0432\u044B\u0431\u0440\u0430\u043D \u0441\u043B\u0443\u0447\u0430\u0439\u043D\u044B\u0439 \u0444\u0430\u0439\u043B \u0438\u0437 \u043D\u0435\u0451.",JournalDesc:"\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0436\u0443\u0440\u043D\u0430\u043B.","Daily noteDesc":"\u0411\u0443\u0434\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0430 \u0435\u0436\u0435\u0434\u043D\u0435\u0432\u043D\u0430\u044F \u0437\u0430\u043C\u0435\u0442\u043A\u0430.","Weekly noteDesc":"\u0411\u0443\u0434\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0430 \u0435\u0436\u0435\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0430\u044F \u0437\u0430\u043C\u0435\u0442\u043A\u0430.","Monthly noteDesc":"\u0411\u0443\u0434\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0430 \u0435\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u0430\u044F \u0437\u0430\u043C\u0435\u0442\u043A\u0430.","Yearly noteDesc":"\u0411\u0443\u0434\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0430 \u0435\u0436\u0435\u0433\u043E\u0434\u043D\u0430\u044F \u0437\u0430\u043C\u0435\u0442\u043A\u0430.",homepageSettingTitle:"Homepage",pluginUnavailableSettings:"\u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u044B\u0439 \u043F\u043B\u0430\u0433\u0438\u043D \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D.",copyDebugInfoNotice:"\u041E\u0442\u043B\u0430\u0434\u043E\u0447\u043D\u0430\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u0434\u043E\u043C\u0430\u0448\u043D\u0435\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u0430 \u0432 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0435\u043D\u0430"};var qe=require("obsidian"),Ft={en:ue,ru:je},Ge,ze=!1;function r(n,...e){if(!ze){let a=(0,qe.getLanguage)()?.toLowerCase()?.split("-")[0]||"en";Ge=Ft[a],ze=!0}n=Ge?.[n]||ue[n];let t=0;for(let a of e)n=n.replace("?"+t,a),t++;return n}var b=require("obsidian");var w=require("obsidian");var Q=class extends w.AbstractInputSuggest{getSuggestions(e){let t=this.app.vault.getAllLoadedFiles(),a=[],i=e.toLowerCase();return t.forEach(o=>{o instanceof w.TFile&&["md","canvas","base"].contains(o.extension)&&o.path.toLowerCase().contains(i)&&a.push(o)}),a}renderSuggestion(e,t){if(e.extension=="md")t.setText(k(e));else{t.setText(e.path.split(".").slice(0,-1).join("."));let a=createDiv();a.className="nav-file-tag nv-homepage-file-tag",a.textContent=e.extension,t.append(a)}}selectSuggestion(e){this.textInputEl.value=k(e),this.textInputEl.trigger("input"),this.close()}},ge=class extends w.AbstractInputSuggest{getSuggestions(e){let t=e.toLowerCase();return this.app.vault.getAllFolders().filter(a=>a.path.toLowerCase().contains(t))}renderSuggestion(e,t){t.setText(e.path)}selectSuggestion(e){this.textInputEl.value=e.path,this.textInputEl.trigger("input"),this.close()}},me=class extends w.AbstractInputSuggest{getSuggestions(e){let t=Object.keys(this.app.internalPlugins.plugins.workspaces?.instance.workspaces),a=e.toLowerCase();return t.filter(i=>i.toLowerCase().contains(a))}renderSuggestion(e,t){t.setText(e)}selectSuggestion(e){this.textInputEl.value=e,this.textInputEl.trigger("input"),this.close()}},he=class extends w.AbstractInputSuggest{getSuggestions(e){let a=this.app.plugins.plugins.journals.journals.map(o=>o.name),i=e.toLowerCase();return a.filter(o=>o.toLowerCase().contains(i))}renderSuggestion(e,t){t.setText(e)}selectSuggestion(e){this.textInputEl.value=e,this.textInputEl.trigger("input"),this.close()}},Je={File:Q,Workspace:me,"Random in folder":ge,"New note":Q,Journal:he},$=class{constructor(e,t){this.app=e.plugin.app,this.homepage=e.plugin.homepage,this.tab=e,t.addSetting(a=>{a.settingEl.addClass("nv-command-setting"),a.descEl.addClass("nv-command-desc"),a.descEl.innerText=r("commandsDesc"),this.container=a.settingEl.createDiv({cls:"nv-command-box"})}),this.dropzone=createDiv(),this.dropzone.className="nv-command-pill nv-dropzone",this.dropzone.addEventListener("dragenter",a=>a.preventDefault()),this.dropzone.addEventListener("dragover",a=>a.preventDefault()),this.dropzone.addEventListener("drop",()=>this.terminateDrag()),this.update()}update(){this.container.innerHTML="",this.activeDrag=null,this.activeCommand=null;for(let e of this.homepage.data.commands){let t=this.app.commands.findCommand(e.id),a=this.container.createDiv({cls:"nv-command-pill",attr:{draggable:!0}});a.addEventListener("dragstart",o=>{o.dataTransfer.effectAllowed="move",this.activeCommand=this.homepage.data.commands.splice(this.indexOf(a),1)[0],this.activeDrag=a,this.dropzone.style.width=`${a.clientWidth}px`,this.dropzone.style.height=`${a.clientHeight}px`}),a.addEventListener("dragover",o=>this.moveDropzone(a,o)),a.addEventListener("drop",o=>o.preventDefault()),a.addEventListener("dragend",()=>this.terminateDrag()),a.createSpan({cls:"nv-command-text",text:t?.name??e.id});let i=new w.ButtonComponent(a).setIcon("route").setClass("clickable-icon").setClass("nv-command-period").onClick(o=>this.showMenu(e,o,i));e.period!="Both"&&(i.setClass("nv-command-selected"),i.setIcon(""),i.buttonEl.createSpan({text:r(e.period)})),new w.ButtonComponent(a).setIcon("trash-2").setClass("clickable-icon").setClass("nv-command-delete").onClick(()=>this.delete(e)),t||(a.classList.add("nv-command-invalid"),a.prepend((0,w.getIcon)("ban")),(0,w.setTooltip)(a,r("commandUnavailable"),{delay:.001}))}new w.ButtonComponent(this.container).setClass("nv-command-add-button").setButtonText(r("commandsAddButton")).onClick(()=>{new fe(this.tab).open()})}delete(e){this.homepage.data.commands.remove(e),this.homepage.save(),this.update()}showMenu(e,t,a){let i=new w.Menu;for(let s of Object.values(R))i.addItem(c=>{c.setTitle(r(s)),c.setChecked(e.period==s),c.onClick(()=>{e.period=s,this.homepage.save(),this.update()})});let o=a.buttonEl.getBoundingClientRect();i.showAtPosition({x:o.x-22,y:o.y+o.height+8})}indexOf(e){return Array.from(this.container.children).indexOf(e)}moveDropzone(e,t){if(!this.activeDrag)return;this.activeDrag.hidden=!0;let a=e.getBoundingClientRect();t.x<a.left+a.width/2?this.container.insertBefore(this.dropzone,e):this.container.insertAfter(this.dropzone,e),t.preventDefault()}terminateDrag(){this.activeCommand&&(this.homepage.data.commands.splice(this.indexOf(this.dropzone),0,this.activeCommand),this.homepage.save(),this.update())}},fe=class extends w.FuzzySuggestModal{constructor(e){super(e.plugin.app),this.homepage=e.plugin.homepage,this.tab=e}getItems(){return Object.values(this.app.commands.commands)}getItemText(e){return e.name}onChooseItem(e){if(e.id==="homepage:open-homepage"){new w.Notice(r("commandsReally"));return}else this.homepage.data.commands||(this.homepage.data.commands=[]);this.homepage.data.commands.push({id:e.id,period:"Both"}),this.homepage.save(),this.tab.commandBox.update()}};var we={version:4,homepages:{},separateMobile:!1},x={value:"Home",kind:"File",openOnStartup:!0,openMode:"Replace all open notes",manualOpenMode:"Keep open notes",view:"Default view",revertView:!0,openWhenEmpty:!1,refreshDataview:!1,autoCreate:!1,autoScroll:!1,pin:!1,commands:[],alwaysApply:!1,hideReleaseNotes:!1},X=class extends b.PluginSettingTab{constructor(t,a){super(t,a);this.icon="house";this.plugin=a,this.plugin.addCommand({id:"copy-debug-info",name:r("copyDebugInfo"),callback:async()=>await this.copyDebugInfo()})}sanitiseNote(t){return t===null||t.match(/^\s*$/)!==null?null:(0,b.normalizePath)(t)}display(){let t=this.plugin.homepage.data.kind,a=!1,i=Je[t];this.containerEl.empty(),new O(this).addSetting(d=>{d.setName(r("homepageSettingTitle")).addDropdown(async h=>{for(let f of Object.values(E)){if(!this.plugin.hasRequiredPlugin(f))if(f==this.plugin.homepage.data.kind)a=!0;else{h.selectEl.createEl("option",{text:r(f),attr:{disabled:!0}});continue}h.addOption(f,r(f))}h.setValue(this.plugin.homepage.data.kind),h.onChange(async f=>{this.plugin.homepage.data.kind=f,f=="Random file"&&(this.plugin.homepage.data.value=""),await this.plugin.homepage.save(),this.display()})}),d.settingEl.id="nv-main-setting";let p=d.settingEl.createEl("article",{text:r(t+"Desc"),attr:{id:"nv-desc"}});a&&p.createDiv({text:r("pluginUnavailableSettings"),cls:"mod-warning"}),ye.includes(t)?d.addText(h=>{h.setDisabled(!0)}):d.addText(h=>{new i(this.app,h.inputEl),h.setPlaceholder(x.value),h.setValue(x.value==this.plugin.homepage.data.value?"":this.plugin.homepage.data.value),h.onChange(async f=>{this.plugin.homepage.data.value=this.sanitiseNote(f)||x.value,await this.plugin.homepage.save()})})});let o=new O(this).addToggle("openOnStartup",d=>this.display()).addToggle("openWhenEmpty").addToggle("alwaysApply").addSetting(d=>{if(d.setName(r("separateMobile")).setDesc(r("separateMobileDesc")).addToggle(p=>p.setValue(this.plugin.settings.separateMobile).onChange(async h=>{this.plugin.settings.separateMobile=h,this.plugin.homepage=this.plugin.getHomepage(),await this.plugin.saveSettings(),this.display()})),this.plugin.settings.separateMobile){let p=createDiv();d.setClass("nv-mobile-setting"),p.className="mod-warning nv-mobile-info",p.createEl("b",{text:r("separateMobileWarnPrefix")}),p.append(" "+r(b.Platform.isMobile?"separateMobileWarnMobile":"separateMobileWarnDesktop")),d.settingEl.append(p)}});o.elements.openOnStartup.descEl.createDiv({text:r("openOnStartupWarn"),attr:{class:"mod-warning"}}),this.commandBox=new $(this,new O(this,"commandsGroup"));let s=new O(this,"vaultGroup").addDropdown("openMode",C).addDropdown("manualOpenMode",C).addToggle("pin").addToggle("hideReleaseNotes").addToggle("autoCreate");s.elements.autoCreate.descEl.createDiv({text:r("autoCreateWarn"),cls:"mod-warning"});let c=new O(this,"openingGroup").addDropdown("view",B).addToggle("revertView").addToggle("autoScroll");"dataview"in this.plugin.communityPlugins&&(c.addToggle("refreshDataview"),c.elements.refreshDataview.descEl.createDiv({text:r("refreshDataviewWarn"),attr:{class:"mod-warning"}})),b.Platform.isMobile||new b.ButtonComponent(this.containerEl).setButtonText(r("copyDebugInfo")).setClass("nv-debug-button").onClick(async()=>await this.copyDebugInfo()),["Workspace","Nothing"].includes(t)&&(o.disableSettings("openWhenEmpty","alwaysApply"),s.disableSettings("openMode","manualOpenMode","autoCreate","pin")),["Workspace","Nothing","Graph view"].includes(t)&&c.disableAll(),this.plugin.homepage.data.openOnStartup||s.disableSettings("openMode"),(J.includes(t)||t==="Journal")&&s.disableSettings("autoCreate")}async copyDebugInfo(){let t=this.app.vault.config,a={...this.plugin.settings,_defaultViewMode:t.defaultViewMode||"default",_livePreview:t.livePreview!==void 0?t.livePreview:"default",_focusNewTab:t.focusNewTab!==void 0?t.focusNewTab:"default",_plugins:Object.keys(this.plugin.communityPlugins),_internalPlugins:Object.values(this.plugin.internalPlugins).flatMap(i=>i.enabled?[i.instance.id]:[]),_obsidianVersion:b.apiVersion};await navigator.clipboard.writeText(JSON.stringify(a)),new b.Notice(r("copyDebugInfoNotice"))}},O=class extends b.SettingGroup{constructor(t,a){super(t.containerEl);this.elements={};a&&this.setHeading(r(a)),this.plugin=t.plugin}addDropdown(t,a,i){return this.addSetting(o=>{o.setName(r(t)).setDesc(r(t+"Desc")).addDropdown(async s=>{for(let c of Object.values(a))s.addOption(c,r(c));s.setValue(this.plugin.homepage.data[t]),s.onChange(async c=>{this.plugin.homepage.data[t]=c,await this.plugin.homepage.save(),i&&i(c)})}),this.elements[t]=o}),this}addToggle(t,a){return this.addSetting(i=>{i.setName(r(t)).setDesc(r(t+"Desc")).addToggle(o=>o.setValue(this.plugin.homepage.data[t]).onChange(async s=>{this.plugin.homepage.data[t]=s,await this.plugin.homepage.save(),a&&a(s)})),this.elements[t]=i}),this}disableAll(){this.disableSettings(...Object.keys(this.elements))}disableSettings(...t){t.forEach(a=>{this.elements[a]?.settingEl.setAttribute("nv-greyed","")})}};var Et=["markdown","canvas","kanban","bases"],j="Main Homepage",G="Mobile Homepage",C=(a=>(a.ReplaceAll="Replace all open notes",a.ReplaceLast="Replace last note",a.Retain="Keep open notes",a))(C||{}),B=(i=>(i.Default="Default view",i.Reading="Reading view",i.Source="Editing view (Source)",i.LivePreview="Editing view (Live Preview)",i))(B||{}),E=(g=>(g.File="File",g.Workspace="Workspace",g.Random="Random file",g.RandomFolder="Random in folder",g.NewNote="New note",g.Graph="Graph view",g.None="Nothing",g.Journal="Journal",g.DailyNote="Daily Note",g.WeeklyNote="Weekly Note",g.MonthlyNote="Monthly Note",g.YearlyNote="Yearly Note",g))(E||{}),R=(a=>(a.Both="Both",a.Startup="Startup only",a.Manual="Manual only",a))(R||{}),ye=["Random file","Graph view","Nothing",...J],Ot=["Nothing","Graph view","Workspace"],K=class{constructor(e,t){this.lastView=void 0;this.openedViews=new WeakMap;this.name=e,this.plugin=t,this.app=t.app;let a=this.plugin.settings.homepages[e];a?this.data=Object.assign({},x,a):(this.plugin.settings.homepages[e]={...x},this.data=this.plugin.settings.homepages[e])}async open(e=!1){if(this.plugin.hasRequiredPlugin(this.data.kind)){if(this.data.kind==="Journal"&&!Be(this)){new N.Notice(r("journalUnavailable",this.data.value));return}}else{new N.Notice(r("pluginUnavailable"));return}if(this.data.kind==="Workspace")await this.launchWorkspace();else if(this.data.kind!=="Nothing"){let a=this.plugin.loaded?this.data.manualOpenMode:this.data.openMode;e&&(a="Keep open notes"),await this.launchLeaf(a)}if(this.data.commands.length<1)return;let t=this.plugin.loaded?"Startup only":"Manual only";await Pe(this.app);for(let{id:a,period:i}of this.data.commands)i!==t&&this.app.commands.executeCommandById(a)}async launchWorkspace(){let e=this.plugin.internalPlugins.workspaces?.instance;if(!(this.data.value in e.workspaces)){new N.Notice(r("workspaceUnavailable",this.data.value));return}e.loadWorkspace(this.data.value),await q(100)}async launchLeaf(e){let t;if(this.computedValue=await this.computeValue(),this.plugin.executing=!0,e!=="Replace all open notes"){let a=this.getOpened();if(a.length>0){this.app.workspace.setActiveLeaf(a[0]),await this.configure(a[0]);return}else e=="Keep open notes"&&De(this.app)&&(e="Replace last note")}e!=="Keep open notes"&&this.app.workspace.getActiveViewOfType(N.View)?.leaf.setPinned(!1),e==="Replace all open notes"&&(this.app.workspace?.floatingSplit?.children&&(await q(0),this.app.workspace.floatingSplit.children.forEach(a=>a.win.close())),await ke(this.app),await q(0));try{this.data.kind==="Graph view"?t=await this.launchGraph(e):t=await this.launchNote(e),await this.configure(t)}catch{return}}async launchGraph(e){if(e==="Keep open notes"){let t=this.app.workspace.getLeaf("tab");this.app.workspace.setActiveLeaf(t)}return this.app.commands.executeCommandById("graph:open"),this.app.workspace.getActiveViewOfType(N.View).leaf}async launchNote(e){let t=this.app.metadataCache.getFirstLinkpathDest(this.computedValue,"/");if(!t){if(!this.data.autoCreate)throw new N.Notice(r("noteUnavailable",this.computedValue)),new Error(r("noteUnavailable",this.computedValue));t=await this.app.vault.create(be(this.computedValue),"")}let a=await this.app.vault.cachedRead(t),i=this.app.workspace.getLeaf(e=="Keep open notes");return await i.openFile(t),this.app.workspace.setActiveLeaf(i),a!==await this.app.vault.read(t)&&await this.app.vault.modify(t,a),i}async configure(e){this.plugin.executing=!1;let t=e.view,a=t.leaf.history;if(!(t instanceof N.MarkdownView)){this.data.pin&&t.leaf.setPinned(!0),this.configurePlugins();return}let i=t.getState();if(this.data.revertView&&(this.lastView=new WeakRef(t)),this.data.autoScroll){let o=t.editor.lineCount();i.mode=="preview"?t.previewMode.applyScroll(o-4):(t.editor.setCursor(o),t.editor.focus())}if(this.data.pin&&t.leaf.setPinned(!0),this.data.view!=="Default view"){switch(this.data.view){case"Editing view (Live Preview)":case"Editing view (Source)":i.mode="source",i.source=this.data.view!="Editing view (Live Preview)";break;case"Reading view":i.mode="preview";break}await t.leaf.setViewState({type:"markdown",state:i}),t.leaf.history=a}this.configurePlugins()}configurePlugins(){this.plugin.loaded&&this.data.refreshDataview&&this.plugin.communityPlugins.dataview?.index.touch(),this.plugin.communityPlugins["obsidian-file-color"]?.generateColorStyles()}getOpened(){return this.data.kind=="Graph view"?this.app.workspace.getLeavesOfType("graph"):Et.flatMap(t=>this.app.workspace.getLeavesOfType(t)).filter(t=>{let a=t.view.getState().file;return ne(a.endsWith("md")?a.slice(0,-3):a,this.computedValue)})}async computeValue(){let e=this.data.value,t;switch(this.data.kind){case"Random file":t=ae(this.app),t&&(e=t);break;case"Random in folder":t=ae(this.app,e),t&&(e=t);break;case"New note":this.cachedNewFile||(this.cachedNewFile=k(await this.app.fileManager.createNewFile("",e))),e=this.cachedNewFile;break;case"Journal":e=await Ke(e,this.plugin);break;case"Daily Note":case"Weekly Note":case"Monthly Note":case"Yearly Note":e=await _e(this.data.kind,this.plugin);break}return e}async save(){this.plugin.settings.homepages[this.name]=this.data,await this.plugin.saveSettings()}async setToActiveFile(){let e=this.app.workspace.getActiveFile();e&&(this.data.value=k(e),await this.save(),new N.Notice(r("homepageChanged",this.data.value)))}canSetToFile(){return this.app.workspace.getActiveFile()!==null&&!ye.includes(this.data.kind)}async revertView(){if(this.lastView==null||this.data.view=="Default view")return;let e=this.lastView.deref();if(!e?.file||ne(k(e.file),this.computedValue))return;let t=e.getState(),a=this.app.vault.config,i=a.defaultViewMode||"source",o=a.livePreview!==void 0?!a.livePreview:!1;e.leaf.getViewState().type=="markdown"&&(i!=t.mode||o!=t.source)&&(t.mode=i,t.source=o,await e.leaf.setViewState({type:"markdown",state:t,active:!0})),this.lastView=void 0}async openWhenEmpty(){if(!this.plugin.loaded||this.plugin.executing)return;let e=this.app.workspace.getActiveViewOfType(N.View)?.leaf;e?.getViewState().type!=="empty"||e?.parentSplit?.children?.length!=1||await this.open(!0)}async apply(){let e=this.app.workspace.getActiveViewOfType(N.FileView);if(!e?.file)return;let t=k(e.file);this.openedViews.get(e)!==t&&(this.openedViews.set(e,t),t===await this.computeValue()&&this.plugin.loaded&&!this.plugin.executing&&await this.configure(e.leaf))}async read(){if(Ot.includes(this.data.kind))return;let e=this.app.metadataCache.getFirstLinkpathDest(await this.computeValue(),"/");if(e)return this.app.vault.cachedRead(e)}};var Z=class extends S.Plugin{constructor(){super(...arguments);this.newRelease=!1;this.loaded=!1;this.executing=!1;this.onLayoutChange=async()=>{this.homepage.data.revertView&&await this.homepage.revertView(),this.homepage.data.openWhenEmpty&&await this.homepage.openWhenEmpty(),this.homepage.data.alwaysApply&&await this.homepage.apply()}}async onload(){this.patchReleaseNotes(),this.patchOpeningBehaviour(),this.settings=await this.loadSettings(),this.internalPlugins=this.app.internalPlugins.plugins,this.communityPlugins=this.app.plugins.plugins,this.homepage=this.getHomepage(),this.addRibbonIcon("house","Open homepage",t=>this.homepage.open(t.button==1||t.button==2||S.Keymap.isModifier(t,"Mod"))).setAttribute("id","nv-homepage-icon"),this.registerEvent(this.app.workspace.on("layout-change",this.onLayoutChange)),this.addSettingTab(new X(this.app,this)),this.addCommand({id:"open-homepage",name:r("openHomepage"),callback:()=>this.homepage.open()}),this.addCommand({id:"set-to-active-file",name:r("setToActiveFile"),checkCallback:t=>{if(t)return this.homepage.canSetToFile();this.homepage.setToActiveFile()}}),this.registerCliHandler("homepage",r("cliOpenHomepageDesc"),null,async()=>(await this.homepage.open(),r("cliOpenHomepageResult"))),this.registerCliHandler("homepage:read",r("cliReadHomepageDesc"),null,async()=>{let t=await this.homepage.read();return t!==void 0?t:r("cliReadHomepageIllegible")})}onunload(){this.app.workspace.off("layout-change",this.onLayoutChange),this.unpatchNewTabPage(),this.unpatchOpeningBehaviour()}getHomepage(){return this.settings.separateMobile&&S.Platform.isMobile?(G in this.settings.homepages||(this.settings.homepages[G]={...this.settings.homepages?.[j]},this.settings.homepages[G].commands=[...this.settings.homepages?.[j]?.commands||[]]),new K(G,this)):new K(j,this)}async loadSettings(){let t=await this.loadData();return t?.version!==4?t?this.upgradeSettings(t):Object.assign({},we):t}async saveSettings(){await this.saveData(this.settings)}async hasUrlParams(){let t,a;if(S.Platform.isMobile){let i=await window.Capacitor.Plugins.App.getLaunchUrl();if(!i)return!1;let o=new URL(i.url);a=Array.from(o.searchParams.keys()),t=o.hostname}else if(window.OBS_ACT)a=Object.keys(window.OBS_ACT),t=window.OBS_ACT.action;else return!1;return["open","advanced-uri"].includes(t)&&["file","filepath","workspace"].some(i=>a.includes(i))}hasRequiredPlugin(t){switch(t){case"Workspace":return this.internalPlugins.workspaces?.enabled;case"Graph view":return this.internalPlugins.graph?.enabled;case"Journal":return"journals"in this.communityPlugins;case"Daily Note":case"Weekly Note":case"Monthly Note":case"Yearly Note":return Ue(t,this);default:return!0}}patchNewTabPage(){let t=this.communityPlugins["new-tab-default-page"];t&&(t.nvOrig_checkForNewTab=t.checkForNewTab,t.checkForNewTab=async a=>{if(!(this&&this.executing))return await t.nvOrig_checkForNewTab(a)})}unpatchNewTabPage(){let t=this.communityPlugins["new-tab-default-page"];t&&(t.checkForNewTab=t.nvOrig_checkForNewTab)}patchReleaseNotes(){this.app.nvOrig_showReleaseNotes=this.app.showReleaseNotes,this.app.showReleaseNotes=()=>this.newRelease=!0}unpatchReleaseNotes(){this.newRelease&&!this.homepage.data.hideReleaseNotes&&this.app.nvOrig_showReleaseNotes(),this.app.showReleaseNotes=this.app.nvOrig_showReleaseNotes}patchOpeningBehaviour(){this.app.nvOrig_runOpeningBehavior=this.app.runOpeningBehavior,this.app.runOpeningBehavior=async t=>{let a=this.homepage.data.openOnStartup&&!await this.hasUrlParams();this.patchNewTabPage(),a?await this.homepage.open():this.app.nvOrig_runOpeningBehavior(t),this.loaded=!0,this.unpatchReleaseNotes()}}unpatchOpeningBehaviour(){this.app.runOpeningBehavior=this.app.nvOrig_runOpeningBehavior}upgradeSettings(t){if(t.version==3){let i=t,o=!1;for(let s of Object.values(i.homepages))s.commands=s.commands.map(c=>({id:c,period:"Both"})),s.kind==Ve&&(o=!0,s.kind="Daily Note");return o&&new S.Notice(r("momentUpgradeNotice")),i.version=4,this.saveData(i),i}let a=Object.assign({},we);return t.workspaceEnabled?(t.value=t.workspace||"",t.kind="Workspace"):t.momentFormat?(t.kind="Daily Note",new S.Notice(r("momentUpgradeNotice"))):(t.value=t.defaultNote||"Home",t.kind="File"),t.commands=[],delete t.workspace,delete t.momentFormat,delete t.defaultNote,delete t.useMoment,delete t.workspaceEnabled,a.homepages[j]=t,this.saveData(a),a}};
|
|
|
|
/* nosourcemap */ |