const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./jquery.module-BsVoHKMW.js","./jquery.module-8Hwfab0x.js","./rolldown-runtime-DAXXjFlN.js","./bootstrap.rtl-BYgCuaBI.css","./bootstrap-DpRzsTW8.css","./setup-11WVArEX.js","./preact.module-CNakwbc9.js","./hooks.module-BrXTvcfS.js","./content_renderer-DOj8g78V.js","./theme-4HA_bZul.js","./preload-helper-HclGiUj8.js","./src-UeATgcQ9.js","./task_states-40T2foIO.js","./dayjs.min-yZk4pRyU.js","./isoWeek-DSe7EiHz.js","./bootstrap.esm-DbsKxb7T.js","./purify.es-sLXpNpJ5.js","./i18n-BaLR3UdQ.js","./server-BXh06Wz_.js","./options-CDXBc9UM.js","./toast-C6WyPqyA.js","./jsxRuntime.module-Cao1NCKs.js","./react_utils-Bz0ffU2Y.js","./color-name-DfaNrEqF.js","./content_renderer-Oq750FP_.css","./compat.module-C8KToj4y.js","./context-BtN0VmU6.js","./shim-Da5fd8KH.js","./FormList-CnuOJg6b.js","./hooks-ClTXKdUl.js","./mark-kZXE8V--.js","./FormToggle-wwys3uI5.js","./FormToggle-DgUUoev9.css","./Icon-BEnt7704.js","./FormList-ByfmsXqb.css","./Button-Du0dYm4Z.js","./ActionButton-DqIfNt93.js","./shortcut_kbd-CxTqyPZL.js","./Card-DHxlpCRf.js","./Card-a0v4CUz_.css","./FormTextBox-BLQGoABI.js","./Admonition-C4vnc1XO.js","./Admonition-DylwUTEV.css","./SetupPage-BAdY9JLT.js","./SetupPage-DuOM3btL.css","./icon-color-DBWzU2L8.js","./FormGroup-DqPd4bBP.js","./set_password-DZOpJV7p.js","./OptionsRow-CcGZJWUG.js","./OptionsRow-KoPoqbym.css","./set_password-D8ETttLz.css","./login-DqJsqubZ.js","./login-Esazbxzr.css","./mobile-DV95snoG.js","./glob-BaDRJYNv.js","./jquery.bundler-require-wrapper-blpeQLDk.js","./__vite-browser-external-BTYuaygK.js","./note_autocomplete-BT55HtG6.js","./print-DU69up3k.js","./NoteList-CZrzG4tO.js","./NoteList-xSzBouqX.css","./desktop-IzeG8Rbw.js","./native_window-BUR659UK.js"])))=>i.map(i=>d[i]);
import{n as e}from"./font-S7vTru_X.js";import{a as t,n,o as r,r as i}from"./theme-4HA_bZul.js";import{t as a}from"./preload-helper-HclGiUj8.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function o(){_(),await c(),await Promise.all([s(),d()]),f(),r(),m(),h(),await g(),v()}async function s(){let e=(await a(async()=>{let{default:e}=await import(`./jquery.module-BsVoHKMW.js`);return{default:e}},__vite__mapDeps([0,1,2]),import.meta.url)).default;window.$=e,window.jQuery=e,e.isArray=Array.isArray,e.isFunction=function(e){return typeof e==`function`},e.isPlainObject=function(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=Object.prototype.hasOwnProperty.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n===Object}}async function c(){let e=await(await fetch(`./bootstrap${window.location.search}`)).json();window.global=globalThis,window.glob={...e,activeDialog:null,device:e.device||l()},window.glob.getThemeStyle=t}function l(){let e=new URLSearchParams(window.location.search);if(e.has(`print`))return`print`;if(e.has(`desktop`))return`desktop`;if(e.has(`mobile`))return`mobile`;let t=document.cookie.split(`; `).find(e=>e.startsWith(`trilium-device=`))?.split(`=`)[1];return t===`desktop`||t===`mobile`?t:u()?`mobile`:`desktop`}function u(){let e=matchMedia?.(`(pointer:coarse)`);return e?.media===`(pointer:coarse)`?!!e.matches:`orientation`in window||/\b(Android|iPhone|iPad|iPod|Windows Phone|BlackBerry|webOS|IEMobile)\b/i.test(navigator.userAgent)}async function d(){glob.isRtl?await a(()=>Promise.resolve({}),__vite__mapDeps([3]),import.meta.url):await a(()=>Promise.resolve({}),__vite__mapDeps([4]),import.meta.url)}function f(){let{device:t,assetPath:r,theme:i,themeBase:a,customThemeCssUrl:o}=window.glob;if(t===`print`)return;let s=`${r}/stylesheets`;p({href:`${s}/ckeditor-theme.css`}),glob.loggedIn!==!1&&glob.passwordSet!==!1&&document.head.appendChild(e()),p({href:`${s}/theme-light.css`},{base:!0});for(let e of n(i,o,a))p(e,{theme:!0});p({href:`${s}/style.css`})}function p(e,t){document.head.appendChild(i(e,t))}function m(){let e=document.createElement(`style`);e.textContent=window.glob.iconPackCss,document.head.appendChild(e)}function h(){if(!glob.dbInitialized)return;let{device:e,headingStyle:t,layoutOrientation:n,platform:r,isElectron:i,hasNativeTitleBar:a,hasBackgroundEffects:o,currentLocale:s}=window.glob,c=[e,`heading-style-${t}`,`layout-${n}`,`platform-${r}`,i&&`electron`,a&&`native-titlebar`,o&&`background-effects`].filter(Boolean);for(let e of c)document.body.classList.add(e);document.body.lang=s.id,document.body.dir=s.rtl?`rtl`:`ltr`}async function g(){if(!glob.dbInitialized){await a(()=>import(`./setup-11WVArEX.js`),__vite__mapDeps([5,6,2,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46]),import.meta.url);return}if(glob.passwordSet===!1){await a(()=>import(`./set_password-DZOpJV7p.js`),__vite__mapDeps([47,6,2,7,17,11,10,12,13,14,21,33,8,9,15,16,18,19,20,22,23,24,29,25,30,35,36,37,38,39,40,48,31,32,49,43,41,42,44,50]),import.meta.url);return}if(glob.loggedIn===!1){await a(()=>import(`./login-DqJsqubZ.js`),__vite__mapDeps([51,6,2,7,17,11,10,12,13,14,21,35,36,8,9,15,16,18,19,20,22,23,24,29,25,30,33,37,38,39,40,48,31,32,49,43,41,42,44,45,52]),import.meta.url);return}switch(glob.device){case`mobile`:await a(()=>import(`./mobile-DV95snoG.js`),__vite__mapDeps([53,10,8,9,6,2,7,11,12,13,14,15,16,17,18,19,20,21,22,23,24,54,55,1,56,57]),import.meta.url);break;case`print`:await a(()=>import(`./print-DU69up3k.js`),__vite__mapDeps([58,10,6,2,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,59,25,29,30,60]),import.meta.url);break;default:await a(()=>import(`./desktop-IzeG8Rbw.js`),__vite__mapDeps([61,9,10,8,6,2,7,11,12,13,14,15,16,17,18,19,20,21,22,23,24,54,55,1,56,62,57]),import.meta.url);break}}function _(){document.body.style.display=`none`}function v(){document.body.style.display=`block`}o();