1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="83a15c77-ef9d-4c50-a60c-94f1e4f26f92",e._sentryDebugIdIdentifier="sentry-dbid-83a15c77-ef9d-4c50-a60c-94f1e4f26f92")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2477],{34209:function(e,t,n){n.d(t,{k:function(){return Z}});var r=n(95170),i=n.n(r),a=n(73330),o=n(86534),s=n(21526),l=n(20967),c=n(29678),d=n(17291),u=n(28251),f=n(68358),m=n(25991);let p={key:"preferences-store",version:25},h={key:"user-store",version:25},g={key:"graph-store",version:34},x={key:"credential-store",version:25},y={key:"change-store",version:27,debounceInterval:500,saveOnUnload:!0,migrations:[{from:26,to:27,migrate:e=>{var t;return{...e,pendingCommits:(null!==(t=e.pendingCommits)&&void 0!==t?t:[]).map(e=>{try{let{noteRef:t,...n}=e,{graphId:r,noteId:i}=(0,f.l7)(t.id);return{...n,graphId:r,noteId:i}}catch(e){return null}}).filter(m.Dw)}}}]},v={key:"ui-state-store",version:1,debounceInterval:500},b={key:"task-filter-store",version:1},w={key:"notes-map-filter-store",version:1};async function k(e){let{key:t,version:n}=e,r=N({key:t,version:n}),i=await l.j.getItem(r);if(i&&"string"==typeof i)try{let e=JSON.parse(i);if(e&&"object"==typeof e)return e}catch(e){console.error("Error parsing stored item:",e)}return null}async function j(e){let{snapshot:t,key:n,version:r}=e,i=N({key:n,version:r}),a=JSON.stringify(t);await l.j.setItem(i,a)}function N(e){let{key:t,version:n}=e;return"".concat(t,"-").concat(n)}var S=n(97642);async function C(e,t){let{key:n,version:r,debounceInterval:i=2e3,saveOnUnload:a,migrations:s=[]}=t,l=async t=>{if((0,S.u)()){console.log("Skipping persistence because it is disabled");return}"onPersist"in e&&"function"==typeof e.onPersist&&e.onPersist(),await j({snapshot:t,key:n,version:r})},c=(0,d.Z)(l,i);(0,o.cfB)(e,c),a&&window.addEventListener("beforeunload",()=>{if((0,S.u)()){console.log("Skipping persistence because it is disabled");return}c.cancel(),l((0,o.vMv)(e))});let u=await E({key:n,version:r,migrations:s});u&&(0,o.Xx3)(e,u)}async function E(e){let{key:t,version:n,migrations:r}=e;return await k({key:t,version:n})||await L({migrations:r,key:t,version:n})}async function L(e){let{migrations:t,key:n,version:r}=e,i=t.find(e=>e.to===r);if(!i)return null;let a=await k({key:n,version:i.from});if(a)try{return i.migrate(a)}catch(e){(0,u.Tb)(e)}return null}var M=n(15608);async function I(){c.k.info("Setting up root store...");let e=new M.M({});return console.time("Loading stores"),await C(e.preferenceStore,p),await C(e.userStore,h),await C(e.graphStore,g),await C(e.credentialStore,x),await C(e.changeStore,y),await C(e.uiStateStore,v),await C(e.taskFilterStore,b),await C(e.notesMapFilterStore,w),console.timeEnd("Loading stores"),(0,o.m83)(e)||(0,o.v5r)(e),e}(0,o.QbW)({modelIdGenerator:s.O}),l.j.setup(i());let Z=(0,a.Z)(I)},62477:function(e,t,n){n.r(t),n.d(t,{GraphMemoryTest:function(){return x},MemoryTest:function(){return g}});var r=n(11527),i=n(50959),a=n(62107),o=n(34209),s=n(13402),l=n(55329),c=n(17554),d=n(30847),u=n(59715),f=n(73419);let m="font-weight: bold; color: red; font-size: 14px; padding: 4px; border: 1px dashed red;";async function p(e,t){let{title:n,iterations:r=10,before:i}=e;console.log("%cMeasuring: ".concat(n),m);let a=[],o=[];for(let e=0;e<r;e++){await (null==i?void 0:i()),function(){var e;(null===(e=window)||void 0===e?void 0:e.gc)?window.gc():console.warn("Failed to run GC")}(),await (0,f.Z)(2e3);let n=h().usedJSHeapSize,r=performance.now();await t();let s=performance.now(),l=h().usedJSHeapSize-n,c=s-r;a.push(l),o.push(c),console.log("%cFinished iteration ".concat(e,", time: ").concat(c,", delta: ").concat((0,u.t)(l)),m)}console.log("%cUsed delta avg: ".concat((0,u.t)((0,d.Z)(a)),", time: ").concat(((0,d.Z)(o)/1e3).toFixed(2),"s"),m)}function h(){return window.performance.memory}function g(e){let{graphId:t}=e,[n,s]=(0,i.useState)();(0,i.useEffect)(()=>{(0,o.k)().then(s)},[]);let l=(0,i.useMemo)(()=>{let e=t&&(null==n?void 0:n.graphStore.findById(t));if(e)return e},[t,n]);return n?n.userNeedsAuth?(0,r.jsx)("a",{href:"/auth?redirect=back",children:"Log in first"}):(0,r.jsx)("main",{className:"overflow-hidden",children:(0,r.jsx)(a.LD,{value:n,children:(0,r.jsx)(c.Q2,{children:l&&(0,r.jsx)(x,{graph:l})})})}):null}let x=e=>{let{graph:t}=e,n=async()=>{let e=t.noteStore.table;await e.deleteAll(),await p({title:"test title",before:async()=>{await e.deleteAll()}},async()=>{})};return(0,r.jsxs)(l.oU,{children:[(0,r.jsx)("h3",{className:"text-xl font-medium leading-7 text-gray-900 dark:text-near-white",children:"Memory test"}),(0,r.jsx)("p",{className:"mt-4 max-w-2xl leading-7 text-gray-500 dark:text-near-white",children:"Start the test to measure memory usage in Chrome. Open the C
1onsole for results."}),(0,r.jsx)("div",{className:"mt-6 space-y-2 sm:mt-5",children:(0,r.jsx)(s.mI,{small:!0,onClick:n,children:"Run the test"})})]})}},43917:function(e,t,n){n.d(t,{m:function(){return a}});var r=n(11527),i=n(4814);n(50959);let a=e=>{let{onClick:t,disabled:n,className:a="",small:o=!1,type:s="button",children:l}=e;return(0,r.jsx)("span",{className:"inline-flex",children:(0,r.jsx)("button",{onClick:t,type:s,disabled:n,className:(0,i.Z)(a,o?"px-4 py-2":"px-4 py-2 md:px-4 md:py-2","focus:shadow-outline-indigo inline-flex items-center space-x-2 rounded-md border border-transparent bg-indigo-100 text-2xs font-medium leading-5 text-indigo-600 outline-none hover:bg-indigo-50 focus:border-indigo-300 focus:outline-none active:bg-indigo-200 disabled:pointer-events-none disabled:cursor-default disabled:opacity-75 dark:border dark:border-gray-800 dark:bg-gray-900 dark:text-near-white dark:hover:bg-gray-800 dark:hover:text-white"),children:l})})}},13402:function(e,t,n){n.d(t,{zx:function(){return a},mI:function(){return o.m},KM:function(){return a}});var r=n(11527),i=n(4814);n(50959);let a=e=>{let{onClick:t,type:n="button",className:a="",children:o,disabled:s}=e;return(0,r.jsx)("button",{onClick:t,type:n,disabled:s,className:(0,i.Z)("inline-flex cursor-pointer items-center space-x-1 rounded-md border border-transparent bg-indigo-600 px-3 py-2 text-sm font-medium leading-4 text-white shadow-sm transition duration-300 ease-in-out hover:bg-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:bg-gray-500",a),children:o})};var o=n(43917);n(74014)},74014:function(e,t,n){n.d(t,{M:function(){return a}});var r=n(11527),i=n(4814);n(50959);let a=e=>{let{label:t="Submit",loadingLabel:n="Loading...",loading:a=!1,onClick:o,disabled:s,className:l}=e;return(0,r.jsx)("span",{className:"flex w-full rounded-md shadow-sm",children:(0,r.jsxs)("button",{type:"submit",onClick:o,disabled:a||s,className:(0,i.Z)("relative inline-flex w-full min-w-28 justify-center shadow-sm","rounded-md border border-transparent bg-purple-600 px-4 py-2","text-base font-medium leading-6 text-white sm:text-sm sm:leading-5","focus:shadow-outline-purple hover:bg-purple-500 focus:border-purple-700 focus:outline-none","active:bg-purple-700","transition duration-300 ease-in-out",(a||s)&&"cursor-auto opacity-50",l),children:[a&&(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("svg",{className:"absolute left-0 ml-2 h-5 w-5 animate-spin text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}),(0,r.jsx)("span",{children:a?n:t})]})})}},55329:function(e,t,n){n.d(t,{oU:function(){return f},rG:function(){return m.r},u_:function(){return s}});var r=n(11527);n(50959);var i=n(95117),a=n(70678),o=n(91899);let s=e=>{let{open:t=!0,onClose:n,children:s}=e;return(0,r.jsx)(o.y,{in:t,children:(0,r.jsx)(a.S,{className:"z-50",children:(0,r.jsxs)(i.X,{children:[(0,r.jsx)("div",{className:"fixed inset-0 transition-opacity",children:(0,r.jsx)("div",{className:"absolute inset-0 bg-gray-100 dark:bg-gray-900",onClick:n})}),(0,r.jsx)("div",{className:"flex min-h-screen items-center justify-center px-4 pt-4 pb-20 text-center",children:(0,r.jsx)("div",{className:"transform rounded-xl bg-white px-4 pt-5 pb-4 text-left align-bottom shadow-2xl ring-1 ring-coolgray-900/5 transition-all dark:bg-gray-900 dark:text-white dark:ring-coolgray-800 sm:my-8 sm:w-full sm:max-w-sm sm:p-6 sm:align-middle",role:"dialog",children:s})})]})})})};var l=n(35487),c=n(60386),d=n(47402);let u=e=>{let{onClick:t}=e;return(0,r.jsx)("nav",{className:"fixed right-0 top-0 z-[100] px-4 py-4",children:(0,r.jsxs)("button",{"aria-label":"Close",onClick:t,className:"flex cursor-pointer items-center space-x-2 text-sm text-bluegray-500 outline-none transition-all duration-300 hover:text-gray-900 focus:ring-purple-600 dar
1k:text-near-white",tabIndex:-1,children:[(0,r.jsx)("span",{children:"Close"}),(0,r.jsx)("span",{className:"rounded-md bg-bluegray-200 px-1.5 py-0.5 text-xs dark:bg-dark-black-800",children:"Esc"}),(0,r.jsx)(d.Z,{height:15,width:15})]})})},f=e=>{let{open:t=!0,onClose:n,children:i}=e;return(0,c.y)("Escape",e=>{e.defaultPrevented||(e.preventDefault(),null==n||n())},{enabled:t&&"function"==typeof n,capture:!0}),(0,r.jsx)(l.W,{children:(0,r.jsx)(o.y,{in:t,children:(0,r.jsx)("div",{tabIndex:-1,className:"fixed inset-0 z-50 overflow-y-auto bg-white focus:outline-none dark:bg-black",role:"modal",children:(0,r.jsxs)("div",{className:"flex min-h-screen items-center justify-center px-4 pt-4 pb-20",children:[n&&(0,r.jsx)(u,{onClick:n}),(0,r.jsx)("div",{className:"p-4 dark:text-gray-900",role:"dialog",children:i})]})})})})};var m=n(17891)},35487:function(e,t,n){n.d(t,{W:function(){return r.W}});var r=n(36732)},36732:function(e,t,n){n.d(t,{W:function(){return o}});var r=n(11527);n(50959);var i=n(10422),a=n(17554);let o=e=>{let{children:t}=e;return i.createPortal((0,r.jsx)(a.Q2,{children:t}),document.body)}},17554:function(e,t,n){n.d(t,{Q2:function(){return u},Fg:function(){return d}});var r=n(11527),i=n(4814),a=n(72811);n(50959);var o=n(63320),s=n(44301),l=n(62107),c=n(85795);function d(){let e=(0,c.tv)(),t=function(){let e=(0,l.bG)();return(null==e?void 0:e.theme)||"system"}();return"system"===t?e:t}let u=(0,a.Pi)((e,t)=>{let{children:n}=e,a=d();return(0,r.jsx)("div",{ref:t,className:(0,i.Z)(["app-theme","dark"===a?"dark":"light",(0,s.d)()&&"electron",(0,o.W)()&&"capacitor",(0,s.qx)()&&"iphone",(0,s.HM)()&&"ipad","select-none antialiased"]),style:{colorScheme:a},children:(0,r.jsx)("div",{className:"bg-background-stark font-sans text-coolgray-900 dark:text-near-white",children:n})})},{forwardRef:!0});u.displayName="Theme"},85795:function(e,t,n){n.d(t,{XU:function(){return o},nd:function(){return s},tv:function(){return a}});var r=n(50959);let i="function"==typeof window.matchMedia;function a(){var e;let t=i?window.matchMedia("(prefers-color-scheme: dark)"):{matches:!1},[n,a]=(0,r.useState)(t.matches?"dark":"light");return e=()=>{a(t.matches?"dark":"light")},(0,r.useEffect)(()=>{if(i){let t=window.matchMedia("(prefers-color-scheme: dark)");return o(t,e),()=>{s(t,e)}}},[i]),n}function o(e,t){e.addEventListener?e.addEventListener("change",e=>{t(e)}):e.addListener(e=>{t(e)})}function s(e,t){e.removeEventListener?e.removeEventListener("change",t):e.removeListener(t)}},60386:function(e,t,n){n.d(t,{y:function(){return o}});var r=n(31428),i=n(50959),a=n(62107);function o(e,t){let{type:n="keydown",enabled:o=!0,capture:s}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=(0,a.Jf)().getKeyboardLayoutMap(),c=(0,i.useRef)(null),d=(0,i.useRef)(null);return(0,i.useLayoutEffect)(()=>{d.current=(0,r.on)(e,t,{layout:null!=l?l:void 0})},[t,e,l]),(0,i.useEffect)(()=>{if(!o||!d.current)return;let e=c.current||window,t=e=>{var t;return null===(t=d.current)||void 0===t?void 0:t.call(d,e)};return e.addEventListener(n,t,{capture:s}),()=>e.removeEventListener(n,t,{capture:s})},[s,n,o]),c}},97642:function(e,t,n){n.d(t,{d:function(){return i},u:function(){return a}});let r=!1;function i(){r=!0}function a(){return r}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.