4 lines
304 KiB
JavaScript
4 lines
304 KiB
JavaScript
var wd=Object.defineProperty;var Cd=(l,e,t)=>e in l?wd(l,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[e]=t;var gn=(l,e,t)=>Cd(l,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function t(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=t(i);fetch(i.href,o)}})();function $(){}function sa(l){return l()}function Di(){return Object.create(null)}function pe(l){l.forEach(sa)}function Mt(l){return typeof l=="function"}function st(l,e){return l!=l?e==e:l!==e||l&&typeof l=="object"||typeof l=="function"}let Il;function il(l,e){return l===e?!0:(Il||(Il=document.createElement("a")),Il.href=e,l===Il.href)}function Sd(l){return Object.keys(l).length===0}function Mi(l){return l??""}const Sn=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function r(l,e){l.appendChild(e)}function S(l,e,t){l.insertBefore(e,t||null)}function C(l){l.parentNode&&l.parentNode.removeChild(l)}function De(l,e){for(let t=0;t<l.length;t+=1)l[t]&&l[t].d(e)}function f(l){return document.createElement(l)}function Q(l){return document.createElementNS("http://www.w3.org/2000/svg",l)}function F(l){return document.createTextNode(l)}function _(){return F(" ")}function gt(){return F("")}function A(l,e,t,n){return l.addEventListener(e,t,n),()=>l.removeEventListener(e,t,n)}function Tn(l){return function(e){return e.preventDefault(),l.call(this,e)}}function je(l){return function(e){return e.stopPropagation(),l.call(this,e)}}function kt(l){return function(e){e.target===this&&l.call(this,e)}}function s(l,e,t){t==null?l.removeAttribute(e):l.getAttribute(e)!==t&&l.setAttribute(e,t)}function Ol(l){return l===""?null:+l}function Td(l){return Array.from(l.childNodes)}function U(l,e){e=""+e,l.data!==e&&(l.data=e)}function _e(l,e){l.value=e??""}function ht(l,e,t,n){t==null?l.style.removeProperty(e):l.style.setProperty(e,t,"")}function Dt(l,e,t){for(let n=0;n<l.options.length;n+=1){const i=l.options[n];if(i.__value===e){i.selected=!0;return}}(!t||e!==void 0)&&(l.selectedIndex=-1)}function Fl(l){const e=l.querySelector(":checked");return e&&e.__value}function ve(l,e,t){l.classList.toggle(e,!!t)}function jd(l,e,{bubbles:t=!1,cancelable:n=!1}={}){return new CustomEvent(l,{detail:e,bubbles:t,cancelable:n})}let gl;function ml(l){gl=l}function jn(){if(!gl)throw new Error("Function called outside component initialization");return gl}function oa(l){jn().$$.on_mount.push(l)}function En(l){jn().$$.on_destroy.push(l)}function Vl(){const l=jn();return(e,t,{cancelable:n=!1}={})=>{const i=l.$$.callbacks[e];if(i){const o=jd(e,t,{cancelable:n});return i.slice().forEach(a=>{a.call(l,o)}),!o.defaultPrevented}return!0}}function ra(l,e){const t=l.$$.callbacks[e.type];t&&t.slice().forEach(n=>n.call(this,e))}const ll=[],Ii=[];let nl=[];const Ai=[],Ed=Promise.resolve();let yn=!1;function Nd(){yn||(yn=!0,Ed.then(aa))}function Gt(l){nl.push(l)}const bn=new Set;let el=0;function aa(){if(el!==0)return;const l=gl;do{try{for(;el<ll.length;){const e=ll[el];el++,ml(e),Dd(e.$$)}}catch(e){throw ll.length=0,el=0,e}for(ml(null),ll.length=0,el=0;Ii.length;)Ii.pop()();for(let e=0;e<nl.length;e+=1){const t=nl[e];bn.has(t)||(bn.add(t),t())}nl.length=0}while(ll.length);for(;Ai.length;)Ai.pop()();yn=!1,bn.clear(),ml(l)}function Dd(l){if(l.fragment!==null){l.update(),pe(l.before_update);const e=l.dirty;l.dirty=[-1],l.fragment&&l.fragment.p(l.ctx,e),l.after_update.forEach(Gt)}}function Md(l){const e=[],t=[];nl.forEach(n=>l.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),nl=e}const Rl=new Set;let Kt;function pt(){Kt={r:0,c:[],p:Kt}}function mt(){Kt.r||pe(Kt.c),Kt=Kt.p}function ue(l,e){l&&l.i&&(Rl.delete(l),l.i(e))}function me(l,e,t,n){if(l&&l.o){if(Rl.has(l))return;Rl.add(l),Kt.c.push(()=>{Rl.delete(l),n&&(t&&l.d(1),n())}),l.o(e)}else n&&n()}function ae(l){return(l==null?void 0:l.length)!==void 0?l:Array.from(l)}function ca(l,e){me(l,1,1,()=>{e.delete(l.key)})}function ua(l,e,t,n,i,o,a,u,c,p,b,g){let v=l.length,h=o.length,y=v;const k={};for(;y--;)k[l[y].key]=y;const w=[],j=new Map,T=new Map,M=[];for(y=h;y--;){const E=g(i,o,y),z=t(E);let R=a.get(z);R?M.push(()=>R.p(E,e)):(R=p(z,E),R.c()),j.set(z,w[y]=R),z in k&&T.set(z,Math.abs(y-k[z]))}const N=new Set,D=new Set;function L(E){ue(E,1),E.m(u,b),a.set(E.key,E),b=E.first,h--}for(;v&&h;){const E=w[h-1],z=l[v-1],R=E.key,V=z.key;E===z?(b=E.first,v--,h--):j.has(V)?!a.has(R)||N.has(R)?L(E):D.has(V)?v--:T.get(R)>T.get(V)?(D.add(R),L(E)):(N.add(V),v--):(c(z,a),v--)}for(;v--;){const E=l[v];j.has(E.key)||c(E,a)}for(;h;)L(w[h-1]);return pe(M),w}function Qe(l){l&&l.c()}function qe(l,e,t){const{fragment:n,after_update:i}=l.$$;n&&n.m(e,t),Gt(()=>{const o=l.$$.on_mount.map(sa).filter(Mt);l.$$.on_destroy?l.$$.on_destroy.push(...o):pe(o),l.$$.on_mount=[]}),i.forEach(Gt)}function Ye(l,e){const t=l.$$;t.fragment!==null&&(Md(t.after_update),pe(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Id(l,e){l.$$.dirty[0]===-1&&(ll.push(l),Nd(),l.$$.dirty.fill(0)),l.$$.dirty[e/31|0]|=1<<e%31}function ot(l,e,t,n,i,o,a=null,u=[-1]){const c=gl;ml(l);const p=l.$$={fragment:null,ctx:[],props:o,update:$,not_equal:i,bound:Di(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(c?c.$$.context:[])),callbacks:Di(),dirty:u,skip_bound:!1,root:e.target||c.$$.root};a&&a(p.root);let b=!1;if(p.ctx=t?t(l,e.props||{},(g,v,...h)=>{const y=h.length?h[0]:v;return p.ctx&&i(p.ctx[g],p.ctx[g]=y)&&(!p.skip_bound&&p.bound[g]&&p.bound[g](y),b&&Id(l,g)),v}):[],p.update(),b=!0,pe(p.before_update),p.fragment=n?n(p.ctx):!1,e.target){if(e.hydrate){const g=Td(e.target);p.fragment&&p.fragment.l(g),g.forEach(C)}else p.fragment&&p.fragment.c();e.intro&&ue(l.$$.fragment),qe(l,e.target,e.anchor),aa()}ml(c)}class rt{constructor(){gn(this,"$$");gn(this,"$$set")}$destroy(){Ye(this,1),this.$destroy=$}$on(e,t){if(!Mt(t))return $;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const i=n.indexOf(t);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!Sd(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Ad="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ad);function Pd(l){let e,t;return{c(){e=Q("path"),t=Q("polyline"),s(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),s(t,"points","14 2 14 8 20 8")},m(n,i){S(n,e,i),S(n,t,i)},d(n){n&&(C(e),C(t))}}}function Ld(l){let e,t,n,i,o;return{c(){e=Q("path"),t=Q("polyline"),n=Q("line"),i=Q("line"),o=Q("polyline"),s(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),s(t,"points","14 2 14 8 20 8"),s(n,"x1","16"),s(n,"y1","13"),s(n,"x2","8"),s(n,"y2","13"),s(i,"x1","16"),s(i,"y1","17"),s(i,"x2","8"),s(i,"y2","17"),s(o,"points","10 9 9 9 8 9")},m(a,u){S(a,e,u),S(a,t,u),S(a,n,u),S(a,i,u),S(a,o,u)},d(a){a&&(C(e),C(t),C(n),C(i),C(o))}}}function Fd(l){let e,t;return{c(){e=Q("polyline"),t=Q("polyline"),s(e,"points","16 18 22 12 16 6"),s(t,"points","8 6 2 12 8 18")},m(n,i){S(n,e,i),S(n,t,i)},d(n){n&&(C(e),C(t))}}}function Rd(l){let e,t,n,i;return{c(){e=Q("path"),t=Q("polyline"),n=Q("line"),i=Q("rect"),s(e,"d","M21 8v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8"),s(t,"points","7 3 12 8 17 3"),s(n,"x1","3"),s(n,"y1","8"),s(n,"x2","21"),s(n,"y2","8"),s(i,"x","10"),s(i,"y","12"),s(i,"width","4"),s(i,"height","4"),s(i,"rx","1")},m(o,a){S(o,e,a),S(o,t,a),S(o,n,a),S(o,i,a)},d(o){o&&(C(e),C(t),C(n),C(i))}}}function zd(l){let e,t,n,i,o;return{c(){e=Q("path"),t=Q("polyline"),n=Q("line"),i=Q("line"),o=Q("line"),s(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),s(t,"points","14 2 14 8 20 8"),s(n,"x1","9"),s(n,"y1","12"),s(n,"x2","15"),s(n,"y2","12"),s(i,"x1","9"),s(i,"y1","15"),s(i,"x2","13"),s(i,"y2","15"),s(o,"x1","12"),s(o,"y1","15"),s(o,"x2","12"),s(o,"y2","18")},m(a,u){S(a,e,u),S(a,t,u),S(a,n,u),S(a,i,u),S(a,o,u)},d(a){a&&(C(e),C(t),C(n),C(i),C(o))}}}function Od(l){let e,t,n,i,o,a;return{c(){e=Q("path"),t=Q("polyline"),n=Q("line"),i=Q("line"),o=Q("line"),a=Q("line"),s(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),s(t,"points","14 2 14 8 20 8"),s(n,"x1","8"),s(n,"y1","12"),s(n,"x2","16"),s(n,"y2","12"),s(i,"x1","8"),s(i,"y1","16"),s(i,"x2","16"),s(i,"y2","16"),s(o,"x1","8"),s(o,"y1","14"),s(o,"x2","12"),s(o,"y2","14"),s(a,"x1","12"),s(a,"y1","12"),s(a,"x2","12"),s(a,"y2","18")},m(u,c){S(u,e,c),S(u,t,c),S(u,n,c),S(u,i,c),S(u,o,c),S(u,a,c)},d(u){u&&(C(e),C(t),C(n),C(i),C(o),C(a))}}}function Vd(l){let e,t,n,i;return{c(){e=Q("path"),t=Q("polyline"),n=Q("line"),i=Q("line"),s(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),s(t,"points","14 2 14 8 20 8"),s(n,"x1","16"),s(n,"y1","13"),s(n,"x2","8"),s(n,"y2","13"),s(i,"x1","16"),s(i,"y1","17"),s(i,"x2","8"),s(i,"y2","17")},m(o,a){S(o,e,a),S(o,t,a),S(o,n,a),S(o,i,a)},d(o){o&&(C(e),C(t),C(n),C(i))}}}function Wd(l){let e,t,n,i,o;return{c(){e=Q("path"),t=Q("polyline"),n=Q("line"),i=Q("line"),o=Q("line"),s(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),s(t,"points","14 2 14 8 20 8"),s(n,"x1","8"),s(n,"y1","12"),s(n,"x2","16"),s(n,"y2","12"),s(i,"x1","8"),s(i,"y1","16"),s(i,"x2","16"),s(i,"y2","16"),s(o,"x1","8"),s(o,"y1","14"),s(o,"x2","12"),s(o,"y2","14")},m(a,u){S(a,e,u),S(a,t,u),S(a,n,u),S(a,i,u),S(a,o,u)},d(a){a&&(C(e),C(t),C(n),C(i),C(o))}}}function Hd(l){let e,t,n;return{c(){e=Q("path"),t=Q("circle"),n=Q("circle"),s(e,"d","M9 18V5l12-2v13"),s(t,"cx","6"),s(t,"cy","18"),s(t,"r","3"),s(n,"cx","18"),s(n,"cy","16"),s(n,"r","3")},m(i,o){S(i,e,o),S(i,t,o),S(i,n,o)},d(i){i&&(C(e),C(t),C(n))}}}function Ud(l){let e,t;return{c(){e=Q("rect"),t=Q("polyline"),s(e,"x","2"),s(e,"y","4"),s(e,"width","20"),s(e,"height","16"),s(e,"rx","2"),s(t,"points","10 9 16 12 10 15 10 9")},m(n,i){S(n,e,i),S(n,t,i)},d(n){n&&(C(e),C(t))}}}function Bd(l){let e,t,n;return{c(){e=Q("rect"),t=Q("circle"),n=Q("polyline"),s(e,"x","3"),s(e,"y","3"),s(e,"width","18"),s(e,"height","18"),s(e,"rx","2"),s(e,"ry","2"),s(t,"cx","8.5"),s(t,"cy","8.5"),s(t,"r","1.5"),s(n,"points","21 15 16 10 5 21")},m(i,o){S(i,e,o),S(i,t,o),S(i,n,o)},d(i){i&&(C(e),C(t),C(n))}}}function Kd(l){let e;return{c(){e=Q("path"),s(e,"d","M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function Gd(l){let e;function t(o,a){return o[0]==="folder"?Kd:o[0]==="image"?Bd:o[0]==="video"?Ud:o[0]==="audio"?Hd:o[0]==="pdf"?Wd:o[0]==="document"?Vd:o[0]==="spreadsheet"?Od:o[0]==="presentation"?zd:o[0]==="archive"?Rd:o[0]==="code"?Fd:o[0]==="text"?Ld:Pd}let n=t(l),i=n(l);return{c(){e=Q("svg"),i.c(),s(e,"width",l[1]),s(e,"height",l[1]),s(e,"viewBox","0 0 24 24"),s(e,"fill","none"),s(e,"stroke","currentColor"),s(e,"stroke-width","1.5"),s(e,"stroke-linecap","round"),s(e,"stroke-linejoin","round"),s(e,"xmlns","http://www.w3.org/2000/svg")},m(o,a){S(o,e,a),i.m(e,null)},p(o,[a]){n!==(n=t(o))&&(i.d(1),i=n(o),i&&(i.c(),i.m(e,null))),a&2&&s(e,"width",o[1]),a&2&&s(e,"height",o[1])},i:$,o:$,d(o){o&&C(e),i.d()}}}function Jd(l,e,t){let{kind:n="generic"}=e,{size:i=20}=e;return l.$$set=o=>{"kind"in o&&t(0,n=o.kind),"size"in o&&t(1,i=o.size)},[n,i]}class fa extends rt{constructor(e){super(),ot(this,e,Jd,Gd,st,{kind:0,size:1})}}const qd={"nav.today":"Сегодня","nav.inbox":"Неразобранное","nav.trash":"Корзина","nav.activity":"Активность","nav.journal":"Журнал","nav.clients":"Клиенты","nav.projects":"Проекты","nav.recipes":"Рецепты","nav.documents":"Документы","nav.archive":"Архив","nav.sections":"Разделы","nav.cases":"Дела","nav.noCases":"Нет дел","nav.sync":"Синхронизация","nav.syncSettings":"Настройки синхронизации","nav.syncNow":"Синхронизировать","nav.selectPrompt":"Выберите раздел или дело","nav.brand":"Верстак","nav.system":"Системное","nav.workspace":"Рабочее пространство","nav.noNodes":"Нет узлов","nav.openFolder":"Открыть папку","nav.createInside":"Создать внутри","nav.createNode":"Создать элемент","nav.moveToRoot":"Переместить в корень","inbox.subtitle":"Захваченные материалы, которые нужно разложить по делам","inbox.empty":"Неразобранных элементов нет","inbox.pasteClipboard":"Вставить из буфера","inbox.captured":"Добавлено","inbox.clipboardEmpty":"Буфер обмена пуст","inbox.clipboardUnavailable":"Буфер обмена недоступен","inbox.assign":"Разложить","inbox.keepHere":"Оставить здесь","inbox.localEmpty":"Для этого дела неразобранных материалов нет","inbox.capturedIn":"Захвачено в","inbox.suggestedTarget":"Цель","inbox.assignTitle":"Разложить материал","inbox.assignTarget":"Дело","inbox.assignSearchPlaceholder":"Найти дело","inbox.deleteTitle":"Удалить материал","inbox.deleteConfirm":"Удалить «{title}» из неразобранного?","capture.kind.text":"Текст","capture.kind.url":"Ссылка","capture.kind.file":"Файл","capture.kind.folder":"Папка","capture.kind.image":"Изображение","capture.source.clipboard":"Буфер обмена","capture.source.clipboard_button":"Кнопка буфера","capture.source.drop":"Перетаскивание","capture.source.paste":"Вставка","capture.source.browser":"Браузер","capture.source.manual":"Вручную","capture.dropOverlayNode":"Будет добавлено в Неразобранное для: {title}","capture.dropOverlayGlobal":"Будет добавлено в глобальное Неразобранное","trash.openFolder":"Открыть папку корзины","trash.empty":"Корзина пуста","trash.emptyTrash":"Очистить корзину","trash.restore":"Восстановить","trash.deletedNodes":"Удаленные элементы","trash.physicalEntries":"Файлы в .verstak/trash","tab.overview":"Обзор","tab.notes":"Заметки","tab.files":"Файлы","tab.inbox":"Неразобранное","tab.links":"Ссылки","tab.actions":"Действия","tab.worklog":"Журнал","tab.activity":"Активность","common.save":"Сохранить","common.cancel":"Отмена","common.delete":"Удалить","common.rename":"Переименовать","common.close":"Закрыть","common.create":"Создать","common.confirm":"Подтверждение","common.back":"← Назад","common.backLabel":"Назад","common.loading":"Загрузка...","common.error":"Ошибка:","common.yes":"Да","common.ok":"OK","common.copy":"Копировать","common.cut":"Вырезать","common.paste":"Вставить","common.duplicate":"Дублировать","common.run":"Запустить","common.test":"Test","common.all":"Все","common.open":"Открыть","common.no":"Нет","common.date":"Дата","common.search":"Найти","common.testAgain":"Проверить","common.connect":"Подключиться","common.disconnect":"Отключиться","common.settings":"Настройки","common.name":"Название","common.type":"Тип","common.section":"Раздел","common.created":"Создано","common.empty":"Нет","common.newName":"Новое имя","welcome.title":"Верстак","welcome.selectSection":"Выберите раздел в боковой панели.","welcome.createCase":"Или создайте новое дело кнопкой «+».","welcome.addCase":"Добавить дело","event.noteCreated":"Заметка создана","event.noteUpdated":"Заметка изменена","event.fileAdded":"Файл добавлен","event.fileDeleted":"Файл удалён","event.fileRenamed":"Файл переименован","event.fileCopied":"Файл скопирован","event.fileMoved":"Файл перемещён","event.folderAdded":"Папка добавлена","event.folderDeleted":"Папка удалена","event.folderRenamed":"Папка переименована","event.caseCreated":"Дело создано","event.caseUpdated":"Дело изменено","kind.project":"Проект","kind.client":"Клиент","kind.document":"Документ","kind.recipe":"Рецепт","kind.folder":"Папка","kind.note":"Заметка","kind.file":"Файл","kind.archive":"Архив","kind.case":"Дело","kind.link":"Ссылка","links.empty":"Ссылок пока нет","links.editTitle":"Редактировать ссылку","links.note":"Заметка","links.copyUrl":"Копировать URL","links.copied":"URL скопирован","links.copyUnavailable":"Не удалось скопировать URL","links.deleteTitle":"Удалить ссылку","links.deleteConfirm":"Удалить ссылку «{title}»?","action.openUrl":"Открыть URL","action.openFile":"Открыть файл","action.openFolder":"Открыть папку","action.runCommand":"Запустить команду","action.runScript":"Запустить скрипт","action.openTerminal":"Открыть терминал","action.launchApp":"Запустить приложение","action.addAction":"+ Добавить действие","action.newAction":"Новое действие","action.noActions":"Действий пока нет","action.run":"Запустить","action.dataUrl":"URL","action.dataPath":"Путь","action.dataCommand":"Команда","action.urlPlaceholder":"https://example.com","action.pathPlaceholder":"/path/to/file","action.commandPlaceholder":"команда","action.namePlaceholder":"Например: Открыть сайт","note.add":"+ Добавить заметку","note.new":"Новая заметка","note.title":"Название заметки","note.noNotes":"Нет заметок","note.createFirst":"Создайте первую заметку для этого дела.","note.placeholder":"Начните писать...","note.unsavedTitle":"Несохранённые изменения","note.unsavedMessage":"Закрыть редактор? Все несохранённые изменения будут потеряны.","note.unsavedClose":"Закрыть","file.addFile":"+ Добавить файл","file.addFolder":"+ Добавить папку","file.newFile":"+ Новый файл","file.addFileSimple":"Добавить файл","file.addFolderSimple":"Добавить папку","file.noFiles":"В этой папке пока нет файлов","file.noFilesCase":"В этом проекте пока нет файлов","file.hint":"Добавьте файл или папку, чтобы сохранить материалы проекта.","file.root":"Файлы","file.preview":"Предпросмотр","file.openExternal":"Открыть во внешней программе","file.openFolder":"Открыть папку","file.showInExplorer":"Показать в проводнике","file.more":"Ещё","file.delete":"Удалить","file.ariaFolder":"Папка","file.ariaFile":"Файл","file.scanning":"Сканирование...","file.pickSingle":"Выберите файл","file.pickMultiple":"Выберите файлы","file.pickDirectory":"Выберите папку","file.importTitle":"Добавить в","file.importFiles":"Файлов:","file.importFolders":"Папок:","file.importSize":"Размер:","file.importCopy":"Скопировать","file.importLink":"Привязать","file.selectCaseFirst":"Сначала выберите дело для добавления файлов","worklog.title":"Журнал","worklog.whatDone":"Что сделано","worklog.minutes":"Мин","worklog.min":"мин","worklog.log":"Записать","worklog.addEntry":"Добавить запись","worklog.acceptSuggestion":"Принять предложение","worklog.editEntry":"Редактировать запись","worklog.deleteEntry":"Удалить запись","worklog.deleteConfirm":"Удалить эту запись работы? Связанные события останутся в активности, но связь с записью будет удалена.","worklog.date":"Дата","worklog.empty":"Записей работы пока нет","worklog.details":"Детали","worklog.source":"Источник","worklog.sourceSuggestion":"Из предложения","worklog.sourceSuggestionNoEvents":"Из предложения, но связанные события отсутствуют","worklog.sourceManual":"Ручная запись","worklog.sourceUnknown":"Источник неизвестен","worklog.suggestions":"Предложения на сегодня","worklog.apply":"Применить","sync.title":"Синхронизация","sync.settings":"Настройки синхронизации","sync.status":"Статус","sync.server":"Сервер","sync.device":"Устройство","sync.deviceId":"ID устройства","sync.unpushed":"Неотправлено","sync.lastSync":"Последняя синх.","sync.revoked":"Отозвано","sync.connected":"Подключено","sync.notConnected":"Не подключено","sync.disabled":"Отключена","sync.serverUrl":"URL сервера","sync.serverUrlPlaceholder":"https://example.com:47732","sync.username":"Логин","sync.usernamePlaceholder":"username","sync.password":"Пароль","sync.passwordPlaceholder":"password","sync.interval":"Автосинхронизация (мин)","sync.saveInterval":"Сохранить интервал","sync.syncNow":"Синхронизировать","sync.disconnect":"Отключиться","sync.connect":"Подключиться","sync.test":"Проверить","sync.settingsSaved":"интервал сохранён","today.title":"Сегодня","today.changedCases":"Изменён сегодня","today.timeline":"Лента за сегодня","today.empty":"Сегодня пока тихо","today.emptyHint":"Здесь появятся дела, заметки, файлы и действия, с которыми вы работали сегодня.","today.plural.case_one":"дело","today.plural.case_few":"дела","today.plural.case_many":"дел","today.plural.note_one":"заметка","today.plural.note_few":"заметки","today.plural.note_many":"заметок","today.plural.file_one":"файл","today.plural.file_few":"файла","today.plural.file_many":"файлов","today.plural.event_one":"событие","today.plural.event_few":"события","today.plural.event_many":"событий","journal.title":"Журнал работы","journal.empty":"Нет записей за выбранный период","journal.dateFrom":"От","journal.dateTo":"До","journal.filter":"Фильтр","journal.total":"Всего","journal.exportCSV":"CSV","journal.exportMarkdown":"Markdown","journal.billable":"К оплате","journal.billableYes":"К оплате","journal.billableNo":"Не к оплате","journal.billableHint":"К оплате — можно включать в счёт клиенту","journal.approx":"Тип времени","journal.approxExact":"Точное","journal.approxEstimated":"Оценочное","journal.approxHint":"Оценочное — время предложено системой или введено как примерное","journal.includeChildrenDisabledHint":"Работает только при выбранном деле/клиенте/проекте","journal.node":"Дело","journal.path":"Путь","journal.byDay":"По дням","journal.byNode":"По делам","journal.includeChildren":"Учитывать вложенные дела","journal.nodeSearch":"Поиск дела...","journal.relatedEvents":"Связанные события","journal.filterHeading":"Фильтры","journal.exportHeading":"Экспорт отчёта","journal.reset":"Сбросить","suggest.title":"Предложения на сегодня","suggest.apply":"Записать","suggest.dismiss":"Скрыть","suggest.open":"Открыть","suggest.confidence.low":"Низкая уверенность","suggest.confidence.medium":"Средняя уверенность","suggest.confidence.high":"Высокая уверенность","suggest.minutes":"мин","suggest.edit":"Изменить","suggest.noSuggestions":"Нет предложений для журнала","suggest.detectedEvents":"Что обнаружено","activity.title":"Активность","activity.empty":"Активность пока не зафиксирована","activity.perCaseEmpty":"Активность пока не зафиксирована","overview.type":"Тип","overview.section":"Раздел","overview.created":"Создано","overview.newNote":"Новая заметка","overview.addFile":"Добавить файл","overview.addAction":"Добавить действие","overview.logTime":"Записать время","overview.recentNotes":"Последние заметки","overview.recentEntries":"Последние записи","rename.title":"Переименовать","rename.emptyError":"Имя не может быть пустым","rename.invalidError":"Недопустимое имя","delete.confirmTitle":"Удаление","delete.confirmMessage":"Удалить","delete.folder":"папку","delete.file":"файл","template.optionNone":"Пустое дело","template.optional":"Шаблон (опционально)","template.none.desc":"Без шаблона, простой узел-контейнер","template.folder":"Папка","template.folder.desc":"Папка для группировки элементов внутри рабочего пространства","template.project":"Проект","template.project.desc":"Отдельный проект или задача с файлами, заметками и журналом","template.client":"Клиент","template.client.desc":"Организация или человек, для которых ведутся работы","template.document":"Документ","template.document.desc":"Документ с описанием, заметками и файлами","template.recipe":"Рецепт","template.recipe.desc":"Повторяемая процедура или инструкция","template.note":"Заметка","template.file":"Файл","template.select":"Выберите тип","mime.jpeg":"Изображение JPEG","mime.png":"Изображение PNG","mime.gif":"Изображение GIF","mime.webp":"Изображение WebP","mime.svg":"Изображение SVG","mime.bmp":"Изображение BMP","mime.tiff":"Изображение TIFF","mime.avif":"Изображение AVIF","mime.pdf":"PDF документ","mime.word":"Документ Word","mime.excel":"Таблица Excel","mime.ppt":"Презентация PowerPoint","mime.zip":"ZIP архив","mime.gzip":"GZIP архив","mime.tar":"TAR архив","mime.sevenz":"7z архив","mime.rar":"RAR архив","mime.text":"Текстовый файл","mime.html":"HTML файл","mime.css":"CSS файл","mime.js":"JavaScript файл","mime.json":"JSON файл","mime.xml":"XML файл","mime.yaml":"YAML файл","mime.binary":"Бинарный файл","mime.executable":"Исполняемый файл","mime.folder":"Папка","mime.unknown":"Неизвестно","mime.file":"Файл","error.nameEmpty":"Имя не может быть пустым","error.nameInvalid":"Недопустимое имя","error.selectCaseFirst":"Сначала выберите дело","error.vaultNotOpen":"Хранилище не открыто","delete.files":"файлов ({count})","file.namePrompt":"Введите имя файла:","file.pdfUnavailable":"Предпросмотр PDF недоступен.","file.previewUnavailable":"Предпросмотр недоступен для этого типа файлов.","case.new":"Новое дело","case.namePlaceholder":"Название дела","settings.title":"Настройки","settings.general":"Общие","settings.generalDesc":"Основные настройки интерфейса.","settings.workspace":"Рабочее пространство","settings.workspaceDesc":"Управление хранилищем данных.","settings.appearance":"Внешний вид","settings.localization":"Локализация","settings.templates":"Шаблоны","settings.plugins":"Плагины","settings.files":"Файлы","settings.activity":"Активность","settings.sync":"Синхронизация","settings.backup":"Резервные копии","settings.close":"Закрыть настройки","settings.noPlugins":"Плагины пока не установлены.","settings.openPluginsDir":"Открыть папку plugins","settings.activityStub":"Здесь будут настройки отслеживания активности.","settings.backupStub":"Здесь будут настройки резервного копирования.","settings.theme":"Тема интерфейса","settings.themeSystem":"Системная","settings.themeLight":"Светлая","settings.themeDark":"Тёмная","settings.language":"Язык интерфейса","settings.langRu":"Русский","settings.langEn":"Английский","settings.langSoon":"будет доступно позже","settings.save":"Сохранить настройки","settings.saved":"Настройки сохранены","settings.vaultPath":"Путь к рабочему пространству","settings.noVaultInfo":"Нет информации о хранилище.","settings.vaultInfo":"Информация о рабочем пространстве","settings.openVault":"Открыть папку vault","settings.changeVault":"Изменить путь","settings.checkIntegrity":"Проверить целостность","settings.templatesDesc":"Включите или выключите шаблоны создания элементов.","settings.templateEnabled":"Включён","settings.templateDisabled":"Выключен","settings.filesStub":"Здесь будут настройки файлового хранилища.","settings.syncEnabled":"Синхронизация включена","settings.syncDisabled":"Синхронизация отключена","settings.syncDesc":"Настройте подключение к серверу синхронизации.","settings.serverUrl":"URL сервера","settings.deviceName":"Имя устройства","settings.deviceId":"ID устройства","settings.lastSync":"Последняя синхронизация","settings.lastError":"Последняя ошибка","settings.pendingChanges":"Ожидающие изменения","settings.checkConnection":"Проверить подключение","settings.syncNow":"Синхронизировать сейчас","settings.reconnect":"Переподключить","settings.disconnect":"Отключить устройство","settings.resetKey":"Сбросить ключ","settings.confirmDisconnect":"Вы уверены, что хотите отключить устройство?","settings.confirmDisconnectDesc":"Синхронизация будет остановлена. Для повторного подключения потребуется логин и пароль.","settings.confirmResetKey":"Сбросить ключ синхронизации?","settings.confirmResetKeyDesc":"Текущий ключ устройства будет удалён. Потребуется переподключение.","settings.connected":"Подключено","settings.disconnected":"Не подключено","settings.notConfigured":"Не настроено","settings.error":"Ошибка","settings.revoked":"Отозвано","settings.status":"Статус","firstrun.title":"Добро пожаловать в Верстак","firstrun.desc":"Верстак хранит данные в локальном рабочем пространстве — vault.","firstrun.pathLabel":"Путь к vault","firstrun.defaultPath":"Путь по умолчанию","firstrun.browse":"Выбрать папку","firstrun.create":"Создать рабочее пространство","firstrun.quit":"Выйти","firstrun.pathExists":"Папка существует. Будет создан новый vault.","firstrun.pathHasVault":"Найден существующий vault. Будет подключён.","firstrun.pathNew":"Путь не существует. Будет создан новый vault.","firstrun.errorNoWrite":"Нет прав на запись в выбранную папку.","firstrun.creating":"Создание рабочего пространства...","firstrun.created":"Рабочее пространство создано!","recovery.title":"Рабочее пространство не найдено","recovery.expected":"Ожидался путь","recovery.choose":"Выбрать другой vault","recovery.create":"Создать новый vault","recovery.settings":"Открыть настройки","recovery.quit":"Выйти","recovery.createConfirm":"Будет создано новое пустое рабочее пространство. Старый путь в настройках будет заменён.","recovery.createConfirmTitle":"Создать новое рабочее пространство?","sync.status.connected":"Синхронизация доступна","sync.status.disconnected":"Сервер недоступен","sync.status.disabled":"Синхронизация не настроена","sync.status.syncing":"Синхронизация...","sync.status.error":"Ошибка синхронизации","sync.changes":"изменений","sync.details":"Подробнее","sync.configure":"Настроить","sync.retry":"Повторить","sync.run":"Синхронизировать","sync.running":"Синхронизация...","sync.conflictsCount":"Конфликты: {count}","sync.applyErrorsCount":"Ошибки применения: {count}","sync.pushedPulled":"Отправлено: {pushed}, получено: {pulled}","error.generic":"Произошла ошибка","error.invalidCredentials":"Неверный логин или пароль","error.accountBlocked":"Аккаунт заблокирован","error.emailNotConfirmed":"Email не подтверждён","error.tokenInvalid":"Неверный или просроченный токен","error.tokenExpired":"Срок действия токена истёк"},Yd={"nav.today":"Today","nav.inbox":"Inbox","nav.trash":"Trash","nav.activity":"Activity","nav.journal":"Journal","nav.clients":"Clients","nav.projects":"Projects","nav.recipes":"Recipes","nav.documents":"Documents","nav.archive":"Archive","nav.sections":"Sections","nav.cases":"Cases","nav.noCases":"No cases","nav.sync":"Sync","nav.syncSettings":"Sync settings","nav.syncNow":"Sync now","nav.selectPrompt":"Select a section or case","nav.brand":"Verstak","nav.system":"System","nav.workspace":"Workspace","nav.noNodes":"No nodes","nav.openFolder":"Open folder","nav.createInside":"Create inside","nav.createNode":"Create element","nav.moveToRoot":"Move to root","inbox.subtitle":"Captured materials that still need to be assigned to cases","inbox.empty":"No unprocessed items","inbox.pasteClipboard":"Paste from clipboard","inbox.captured":"Added","inbox.clipboardEmpty":"Clipboard is empty","inbox.clipboardUnavailable":"Clipboard is unavailable","inbox.assign":"Assign","inbox.keepHere":"Keep here","inbox.localEmpty":"No unprocessed materials for this case","inbox.capturedIn":"Captured in","inbox.suggestedTarget":"Target","inbox.assignTitle":"Assign material","inbox.assignTarget":"Case","inbox.assignSearchPlaceholder":"Find case","inbox.deleteTitle":"Delete material","inbox.deleteConfirm":'Delete "{title}" from inbox?',"capture.kind.text":"Text","capture.kind.url":"Link","capture.kind.file":"File","capture.kind.folder":"Folder","capture.kind.image":"Image","capture.source.clipboard":"Clipboard","capture.source.clipboard_button":"Clipboard button","capture.source.drop":"Drop","capture.source.paste":"Paste","capture.source.browser":"Browser","capture.source.manual":"Manual","capture.dropOverlayNode":"Will be added to Inbox for: {title}","capture.dropOverlayGlobal":"Will be added to global Inbox","trash.openFolder":"Open trash folder","trash.empty":"Trash is empty","trash.emptyTrash":"Empty trash","trash.restore":"Restore","trash.deletedNodes":"Deleted items","trash.physicalEntries":"Files in .verstak/trash","tab.overview":"Overview","tab.notes":"Notes","tab.files":"Files","tab.inbox":"Inbox","tab.links":"Links","tab.actions":"Actions","tab.worklog":"Work Log","tab.activity":"Activity","common.save":"Save","common.cancel":"Cancel","common.delete":"Delete","common.rename":"Rename","common.close":"Close","common.create":"Create","common.confirm":"Confirm","common.back":"← Back","common.backLabel":"Back","common.loading":"Loading...","common.error":"Error:","common.yes":"Yes","common.ok":"OK","common.copy":"Copy","common.cut":"Cut","common.paste":"Paste","common.duplicate":"Duplicate","common.run":"Run","common.test":"Test","common.all":"All","common.open":"Open","common.no":"No","common.date":"Date","common.search":"Search","common.testAgain":"Check","common.connect":"Connect","common.disconnect":"Disconnect","common.settings":"Settings","common.name":"Name","common.type":"Type","common.section":"Section","common.created":"Created","common.empty":"None","common.newName":"New name","welcome.title":"Verstak","welcome.selectSection":"Select a section in the sidebar.","welcome.createCase":"Or create a new case with the + button.","welcome.addCase":"Add case","event.noteCreated":"Note created","event.noteUpdated":"Note updated","event.fileAdded":"File added","event.fileDeleted":"File deleted","event.fileRenamed":"File renamed","event.fileCopied":"File copied","event.fileMoved":"File moved","event.folderAdded":"Folder added","event.folderDeleted":"Folder deleted","event.folderRenamed":"Folder renamed","event.caseCreated":"Case created","event.caseUpdated":"Case updated","kind.project":"Project","kind.client":"Client","kind.document":"Document","kind.recipe":"Recipe","kind.folder":"Folder","kind.note":"Note","kind.file":"File","kind.archive":"Archive","kind.case":"Case","kind.link":"Link","links.empty":"No links yet","links.editTitle":"Edit link","links.note":"Note","links.copyUrl":"Copy URL","links.copied":"URL copied","links.copyUnavailable":"Could not copy URL","links.deleteTitle":"Delete link","links.deleteConfirm":'Delete link "{title}"?',"action.openUrl":"Open URL","action.openFile":"Open file","action.openFolder":"Open folder","action.runCommand":"Run command","action.runScript":"Run script","action.openTerminal":"Open terminal","action.launchApp":"Launch app","action.addAction":"+ Add action","action.newAction":"New action","action.noActions":"No actions yet","action.run":"Run","action.dataUrl":"URL","action.dataPath":"Path","action.dataCommand":"Command","action.urlPlaceholder":"https://example.com","action.pathPlaceholder":"/path/to/file","action.commandPlaceholder":"command","action.namePlaceholder":"Example: Open website","note.add":"+ Add note","note.new":"New note","note.title":"Note title","note.noNotes":"No notes","note.createFirst":"Create the first note for this case.","note.placeholder":"Start writing...","note.unsavedTitle":"Unsaved changes","note.unsavedMessage":"Close the editor? All unsaved changes will be lost.","note.unsavedClose":"Close","file.addFile":"+ Add file","file.addFolder":"+ Add folder","file.newFile":"+ New file","file.addFileSimple":"Add file","file.addFolderSimple":"Add folder","file.noFiles":"No files in this folder yet","file.noFilesCase":"No files in this project yet","file.hint":"Add a file or folder to store project materials.","file.root":"Files","file.preview":"Preview","file.openExternal":"Open in external program","file.openFolder":"Open folder","file.showInExplorer":"Show in explorer","file.more":"More","file.delete":"Delete","file.ariaFolder":"Folder","file.ariaFile":"File","file.scanning":"Scanning...","file.pickSingle":"Select file","file.pickMultiple":"Select files","file.pickDirectory":"Select folder","file.importTitle":"Add to","file.importFiles":"Files:","file.importFolders":"Folders:","file.importSize":"Size:","file.importCopy":"Copy","file.importLink":"Link","file.selectCaseFirst":"Select a case before adding files","worklog.title":"Work Log","worklog.whatDone":"What was done","worklog.minutes":"Min","worklog.min":"min","worklog.log":"Log","worklog.addEntry":"Add entry","worklog.acceptSuggestion":"Accept suggestion","worklog.editEntry":"Edit entry","worklog.deleteEntry":"Delete entry","worklog.deleteConfirm":"Delete this work entry? Related events stay in activity, but their link to this entry will be removed.","worklog.date":"Date","worklog.empty":"No work logged yet","worklog.details":"Details","worklog.source":"Source","worklog.sourceSuggestion":"From suggestion","worklog.sourceSuggestionNoEvents":"From suggestion, but related events missing","worklog.sourceManual":"Manual entry","worklog.sourceUnknown":"Unknown source","worklog.suggestions":"Suggestions for today","worklog.apply":"Apply","sync.title":"Sync","sync.settings":"Sync settings","sync.status":"Status","sync.server":"Server","sync.device":"Device","sync.deviceId":"Device ID","sync.unpushed":"Unpushed","sync.lastSync":"Last sync","sync.revoked":"Revoked","sync.connected":"Connected","sync.notConnected":"Not connected","sync.disabled":"Disabled","sync.serverUrl":"Server URL","sync.serverUrlPlaceholder":"https://example.com:47732","sync.username":"Username","sync.usernamePlaceholder":"username","sync.password":"Password","sync.passwordPlaceholder":"password","sync.interval":"Auto sync (min)","sync.saveInterval":"Save interval","sync.syncNow":"Sync now","sync.disconnect":"Disconnect","sync.connect":"Connect","sync.test":"Check","sync.settingsSaved":"interval saved","today.title":"Today","today.changedCases":"Changed today","today.timeline":"Timeline for today","today.empty":"Nothing happened today yet","today.emptyHint":"Cases, notes, files, and actions you worked with today will appear here.","today.plural.case_one":"case","today.plural.case_few":"cases","today.plural.case_many":"cases","today.plural.note_one":"note","today.plural.note_few":"notes","today.plural.note_many":"notes","today.plural.file_one":"file","today.plural.file_few":"files","today.plural.file_many":"files","today.plural.event_one":"event","today.plural.event_few":"events","today.plural.event_many":"events","journal.title":"Work Log","journal.empty":"No entries for the selected period","journal.dateFrom":"From","journal.dateTo":"To","journal.filter":"Filter","journal.total":"Total","journal.exportCSV":"CSV","journal.exportMarkdown":"Markdown","journal.billable":"Billable","journal.billableYes":"Billable","journal.billableNo":"Not billable","journal.billableHint":"Billable — can be included in client invoice","journal.approx":"Time type","journal.approxExact":"Exact","journal.approxEstimated":"Estimated","journal.approxHint":"Estimated — time suggested by the system or entered as approximate","journal.includeChildrenDisabledHint":"Only works when a case/client/project is selected","journal.node":"Case","journal.path":"Path","journal.byDay":"By day","journal.byNode":"By case","journal.includeChildren":"Include subtasks","journal.nodeSearch":"Search case...","journal.relatedEvents":"Related events","journal.filterHeading":"Filters","journal.exportHeading":"Export Report","journal.reset":"Reset","suggest.title":"Suggestions","suggest.apply":"Log","suggest.dismiss":"Dismiss","suggest.open":"Open","suggest.confidence.low":"Low confidence","suggest.confidence.medium":"Medium confidence","suggest.confidence.high":"High confidence","suggest.minutes":"min","suggest.edit":"Edit","suggest.noSuggestions":"No suggestions","suggest.detectedEvents":"What was detected","activity.title":"Activity","activity.empty":"No activity recorded yet","activity.perCaseEmpty":"No activity recorded yet","overview.type":"Type","overview.section":"Section","overview.created":"Created","overview.newNote":"New note","overview.addFile":"Add file","overview.addAction":"Add action","overview.logTime":"Log time","overview.recentNotes":"Recent notes","overview.recentEntries":"Recent entries","rename.title":"Rename","rename.emptyError":"Name cannot be empty","rename.invalidError":"Invalid name","delete.confirmTitle":"Delete","delete.confirmMessage":"Delete","delete.folder":"folder","delete.file":"file","template.optionNone":"Empty case","template.optional":"Template (optional)","template.none.desc":"No template, simple container node","template.folder":"Folder","template.folder.desc":"A folder to group items inside a workspace","template.project":"Project","template.project.desc":"A distinct project or task with files, notes and work log","template.client":"Client","template.client.desc":"An organization or person for whom work is performed","template.document":"Document","template.document.desc":"A document with description, notes and files","template.recipe":"Recipe","template.recipe.desc":"A repeatable procedure or instruction","template.note":"Note","template.file":"File","template.select":"Select type","mime.jpeg":"JPEG image","mime.png":"PNG image","mime.gif":"GIF image","mime.webp":"WebP image","mime.svg":"SVG image","mime.bmp":"BMP image","mime.tiff":"TIFF image","mime.avif":"AVIF image","mime.pdf":"PDF document","mime.word":"Word document","mime.excel":"Excel spreadsheet","mime.ppt":"PowerPoint presentation","mime.zip":"ZIP archive","mime.gzip":"GZIP archive","mime.tar":"TAR archive","mime.sevenz":"7z archive","mime.rar":"RAR archive","mime.text":"Text file","mime.html":"HTML file","mime.css":"CSS file","mime.js":"JavaScript file","mime.json":"JSON file","mime.xml":"XML file","mime.yaml":"YAML file","mime.binary":"Binary file","mime.executable":"Executable file","mime.folder":"Folder","mime.unknown":"Unknown","mime.file":"File","error.nameEmpty":"Name cannot be empty","error.nameInvalid":"Invalid name","error.selectCaseFirst":"Select a case first","error.vaultNotOpen":"Vault not open","delete.files":"files ({count})","file.namePrompt":"Enter file name:","file.pdfUnavailable":"PDF preview is unavailable.","file.previewUnavailable":"Preview is unavailable for this file type.","case.new":"New case","case.namePlaceholder":"Case name","settings.title":"Settings","settings.general":"General","settings.generalDesc":"Basic interface settings.","settings.workspace":"Workspace","settings.workspaceDesc":"Manage data storage.","settings.appearance":"Appearance","settings.localization":"Localization","settings.templates":"Templates","settings.plugins":"Plugins","settings.files":"Files","settings.activity":"Activity","settings.sync":"Sync","settings.backup":"Backups","settings.close":"Close settings","settings.noPlugins":"No plugins installed yet.","settings.openPluginsDir":"Open plugins folder","settings.activityStub":"Activity tracking settings will be here.","settings.backupStub":"Backup settings will be here.","settings.theme":"Interface theme","settings.themeSystem":"System","settings.themeLight":"Light","settings.themeDark":"Dark","settings.language":"Interface language","settings.langRu":"Russian","settings.langEn":"English","settings.langSoon":"coming soon","settings.save":"Save settings","settings.saved":"Settings saved","settings.vaultPath":"Workspace path","settings.noVaultInfo":"No workspace information.","settings.vaultInfo":"Workspace information","settings.openVault":"Open vault folder","settings.changeVault":"Change path","settings.checkIntegrity":"Check integrity","settings.templatesDesc":"Enable or disable templates for creating items.","settings.templateEnabled":"Enabled","settings.templateDisabled":"Disabled","settings.filesStub":"File storage settings will be here.","settings.syncEnabled":"Sync enabled","settings.syncDisabled":"Sync disabled","settings.syncDesc":"Configure connection to the sync server.","settings.serverUrl":"Server URL","settings.deviceName":"Device name","settings.deviceId":"Device ID","settings.lastSync":"Last sync","settings.lastError":"Last error","settings.pendingChanges":"Pending changes","settings.checkConnection":"Check connection","settings.syncNow":"Sync now","settings.reconnect":"Reconnect","settings.disconnect":"Disconnect device","settings.resetKey":"Reset key","settings.confirmDisconnect":"Are you sure you want to disconnect this device?","settings.confirmDisconnectDesc":"Sync will stop. Reconnecting will require username and password.","settings.confirmResetKey":"Reset sync key?","settings.confirmResetKeyDesc":"The current device key will be removed. Reconnection will be required.","settings.connected":"Connected","settings.disconnected":"Disconnected","settings.notConfigured":"Not configured","settings.error":"Error","settings.revoked":"Revoked","settings.status":"Status","firstrun.title":"Welcome to Verstak","firstrun.desc":"Verstak stores data in a local workspace called a vault.","firstrun.pathLabel":"Vault path","firstrun.defaultPath":"Default path","firstrun.browse":"Choose folder","firstrun.create":"Create workspace","firstrun.quit":"Quit","firstrun.pathExists":"The folder exists. A new vault will be created.","firstrun.pathHasVault":"Existing vault found. It will be connected.","firstrun.pathNew":"The path does not exist. A new vault will be created.","firstrun.errorNoWrite":"No write permission for the selected folder.","firstrun.creating":"Creating workspace...","firstrun.created":"Workspace created!","recovery.title":"Workspace not found","recovery.expected":"Expected path","recovery.choose":"Choose another vault","recovery.create":"Create new vault","recovery.settings":"Open settings","recovery.quit":"Quit","recovery.createConfirm":"A new empty workspace will be created. The old path in settings will be replaced.","recovery.createConfirmTitle":"Create a new workspace?","sync.status.connected":"Sync available","sync.status.disconnected":"Server unavailable","sync.status.disabled":"Sync is not configured","sync.status.syncing":"Syncing...","sync.status.error":"Sync error","sync.changes":"changes","sync.details":"Details","sync.configure":"Configure","sync.retry":"Retry","sync.run":"Sync","sync.running":"Syncing...","sync.conflictsCount":"Conflicts: {count}","sync.applyErrorsCount":"Apply errors: {count}","sync.pushedPulled":"Pushed: {pushed}, pulled: {pulled}","error.generic":"An error occurred","error.invalidCredentials":"Invalid username or password","error.accountBlocked":"Account blocked","error.emailNotConfirmed":"Email not confirmed","error.tokenInvalid":"Invalid or expired token","error.tokenExpired":"Token expired"},Pi={ru:qd,en:Yd};let Li="ru";function m(l,e){var i;const t=Pi[Li];let n=t==null?void 0:t[l];if(n==null&&Li!=="ru"&&(n=(i=Pi.ru)==null?void 0:i[l]),n==null&&(n=l),e!=null)for(const[o,a]of Object.entries(e))n=n.replace(`{${o}}`,String(a));return n}function zl(l){if(l==null||l<0)return"—";if(l===0)return"0 B";const e=["B","KB","MB","GB"],t=Math.min(Math.floor(Math.log(l)/Math.log(1024)),e.length-1),n=l/Math.pow(1024,t);return(t===0?n.toFixed(0):n.toFixed(1))+" "+e[t]}const kn={"image/jpeg":m("mime.jpeg"),"image/png":m("mime.png"),"image/gif":m("mime.gif"),"image/webp":m("mime.webp"),"image/svg+xml":m("mime.svg"),"image/bmp":m("mime.bmp"),"image/tiff":m("mime.tiff"),"image/avif":m("mime.avif"),"application/pdf":m("mime.pdf"),"application/msword":m("mime.word"),"application/vnd.openxmlformats-officedocument.wordprocessingml.document":m("mime.word"),"application/vnd.ms-excel":m("mime.excel"),"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":m("mime.excel"),"application/vnd.ms-powerpoint":m("mime.ppt"),"application/vnd.openxmlformats-officedocument.presentationml.presentation":m("mime.ppt"),"application/zip":m("mime.zip"),"application/gzip":m("mime.gzip"),"application/x-tar":m("mime.tar"),"application/x-7z-compressed":m("mime.sevenz"),"application/x-rar-compressed":m("mime.rar"),"text/plain":m("mime.text"),"text/html":m("mime.html"),"text/css":m("mime.css"),"text/javascript":m("mime.js"),"application/json":m("mime.json"),"application/xml":m("mime.xml"),"application/x-yaml":m("mime.yaml"),"application/octet-stream":m("mime.binary"),"application/x-msdos-program":m("mime.executable"),"inode/directory":m("mime.folder")};function Fi(l){return l?kn[l]||l:m("mime.unknown")}function Qd(l){if(l.type==="folder")return m("mime.folder");const e=(l.mime||"").toLowerCase();if(kn[e])return kn[e];const n=(l.name||"").toLowerCase().split(".").pop();return n?n.toUpperCase():m("mime.file")}function da(l){if(l.type==="folder")return"folder";const e=(l.mime||"").toLowerCase();if(e.startsWith("image/"))return"image";if(e.startsWith("video/"))return"video";if(e.startsWith("audio/"))return"audio";if(e.startsWith("text/"))return"text";if(e.includes("pdf"))return"pdf";if(e.includes("word")||e.includes("document"))return"document";if(e.includes("spreadsheet")||e.includes("excel"))return"spreadsheet";if(e.includes("presentation")||e.includes("powerpoint"))return"presentation";if(e.includes("zip")||e.includes("tar")||e.includes("gzip")||e.includes("rar")||e.includes("7z")||e.includes("compress"))return"archive";if(e.includes("json")||e.includes("xml")||e.includes("yaml")||e.includes("javascript")||e.includes("css")||e.includes("html"))return"code";const n=(l.name||"").toLowerCase().split(".").pop();return["js","ts","jsx","tsx","vue","svelte","py","rs","go","c","cpp","h","hpp","java","kt","swift","rb","php","pl","sh","bash","zsh","fish","yml","yaml","json","xml","toml","ini","cfg","conf","md","markdown","css","scss","less","sass","sql","graphql","proto","gradle","cmake","makefile","dockerfile","env","gitignore"].includes(n)?"code":"generic"}const pa=["image/jpeg","image/png","image/gif","image/webp","image/bmp","image/tiff","image/avif","image/svg+xml"],ma=["text/plain","text/html","text/css","text/javascript","application/json","application/xml","application/x-yaml","text/x-shellscript"],ga=["txt","log","conf","ini","yaml","yml","json","xml","csv","sh","py","js","ts","css","html","md","markdown","cfg"],ba=["jpg","jpeg","png","gif","webp","bmp","tiff","tif","avif","svg"];function Ri(l){if(l.type==="folder")return!1;const e=(l.mime||"").toLowerCase(),n=(l.name||"").toLowerCase().split(".").pop();return!!(pa.includes(e)||ba.includes(n)||e.includes("pdf")||ma.includes(e)||ga.includes(n))}function _a(l){const e=(l.mime||"").toLowerCase(),n=(l.name||"").toLowerCase().split(".").pop();return pa.includes(e)||ba.includes(n)}function va(l){const e=(l.mime||"").toLowerCase(),n=(l.name||"").toLowerCase().split(".").pop();return ma.includes(e)||ga.includes(n)&&n!=="md"&&n!=="markdown"}function ha(l){return(l.mime||"").toLowerCase().includes("pdf")}function ya(l){const e=(l.name||"").toLowerCase();return e.endsWith(".md")||e.endsWith(".markdown")}function Xd(l){return _a(l)||ha(l)}function Zd(l){return va(l)||ya(l)}const{window:xd}=Sn;function $d(l){let e,t,n,i=zl(l[0].size)+"",o;return{c(){e=f("span"),e.textContent="·",t=_(),n=f("span"),o=F(i),s(e,"class","meta-sep svelte-1skuef2")},m(a,u){S(a,e,u),S(a,t,u),S(a,n,u),r(n,o)},p(a,u){u[0]&1&&i!==(i=zl(a[0].size)+"")&&U(o,i)},d(a){a&&(C(e),C(t),C(n))}}}function e1(l){let e,t,n,i,o;return{c(){e=f("button"),e.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="9" y1="14" x2="15" y2="14"></line></svg>',t=_(),n=f("button"),n.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg>',s(e,"class","action-btn svelte-1skuef2"),s(e,"title",m("file.openFolder")),s(e,"aria-label",m("file.openFolder")),s(n,"class","action-btn svelte-1skuef2"),s(n,"title",m("file.showInExplorer")),s(n,"aria-label",m("file.showInExplorer"))},m(a,u){S(a,e,u),S(a,t,u),S(a,n,u),i||(o=[A(e,"click",je(l[30])),A(n,"click",je(l[11]))],i=!0)},p:$,d(a){a&&(C(e),C(t),C(n)),i=!1,pe(o)}}}function t1(l){let e,t,n,i,o,a,u;return{c(){e=f("button"),e.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>',t=_(),n=f("button"),n.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>',i=_(),o=f("button"),o.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg>',s(e,"class","action-btn svelte-1skuef2"),s(e,"title",m("file.preview")),s(e,"aria-label",m("file.preview")),s(n,"class","action-btn svelte-1skuef2"),s(n,"title",m("file.openExternal")),s(n,"aria-label",m("file.openExternal")),s(o,"class","action-btn svelte-1skuef2"),s(o,"title",m("file.showInExplorer")),s(o,"aria-label",m("file.showInExplorer"))},m(c,p){S(c,e,p),S(c,t,p),S(c,n,p),S(c,i,p),S(c,o,p),a||(u=[A(e,"click",je(l[29])),A(n,"click",je(l[10])),A(o,"click",je(l[11]))],a=!0)},p:$,d(c){c&&(C(e),C(t),C(n),C(i),C(o)),a=!1,pe(u)}}}function zi(l){let e,t,n,i,o,a,u,c,p=m("common.open")+"",b,g,v,h,y,k,w,j,T=m("file.openExternal")+"",M,N,D,L,E,z,R=m("file.showInExplorer")+"",V,K,G,J,H,q,Y,P,W,O=m("common.rename")+"",B,oe,ie,ee,Z,ne,re,fe=m("common.duplicate")+"",he,Ke,Me,X,le,de,ye,ge,Ie,Ge=m("common.cut")+"",it,at,Ne,ze,Te,Ue,Ae,Pe=m("common.copy")+"",Be,Le,Ee,Se,Fe,We,et,we,be,ke=m("common.delete")+"",tt,Je,xe;return{c(){e=f("div"),t=_(),n=f("div"),i=f("button"),o=Q("svg"),a=Q("path"),u=Q("circle"),c=_(),b=F(p),g=_(),v=f("button"),h=Q("svg"),y=Q("path"),k=Q("polyline"),w=Q("line"),j=_(),M=F(T),N=_(),D=f("button"),L=Q("svg"),E=Q("path"),z=_(),V=F(R),K=_(),G=f("div"),J=_(),H=f("button"),q=Q("svg"),Y=Q("path"),P=Q("path"),W=_(),B=F(O),oe=_(),ie=f("button"),ee=Q("svg"),Z=Q("rect"),ne=Q("path"),re=_(),he=F(fe),Ke=_(),Me=f("button"),X=Q("svg"),le=Q("circle"),de=Q("circle"),ye=Q("line"),ge=Q("line"),Ie=_(),it=F(Ge),at=_(),Ne=f("button"),ze=Q("svg"),Te=Q("rect"),Ue=Q("path"),Ae=_(),Be=F(Pe),Le=_(),Ee=f("div"),Se=_(),Fe=f("button"),We=Q("svg"),et=Q("polyline"),we=Q("path"),be=_(),tt=F(ke),s(e,"class","menu-backdrop svelte-1skuef2"),s(e,"role","presentation"),s(a,"d","M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"),s(u,"cx","12"),s(u,"cy","12"),s(u,"r","3"),s(o,"width","14"),s(o,"height","14"),s(o,"viewBox","0 0 24 24"),s(o,"fill","none"),s(o,"stroke","currentColor"),s(o,"stroke-width","2"),s(o,"stroke-linecap","round"),s(o,"stroke-linejoin","round"),s(i,"class","menu-item svelte-1skuef2"),s(i,"role","menuitem"),s(y,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),s(k,"points","15 3 21 3 21 9"),s(w,"x1","10"),s(w,"y1","14"),s(w,"x2","21"),s(w,"y2","3"),s(h,"width","14"),s(h,"height","14"),s(h,"viewBox","0 0 24 24"),s(h,"fill","none"),s(h,"stroke","currentColor"),s(h,"stroke-width","2"),s(h,"stroke-linecap","round"),s(h,"stroke-linejoin","round"),s(v,"class","menu-item svelte-1skuef2"),s(v,"role","menuitem"),s(E,"d","M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"),s(L,"width","14"),s(L,"height","14"),s(L,"viewBox","0 0 24 24"),s(L,"fill","none"),s(L,"stroke","currentColor"),s(L,"stroke-width","2"),s(L,"stroke-linecap","round"),s(L,"stroke-linejoin","round"),s(D,"class","menu-item svelte-1skuef2"),s(D,"role","menuitem"),s(G,"class","menu-sep svelte-1skuef2"),s(Y,"d","M12 20h9"),s(P,"d","M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"),s(q,"width","14"),s(q,"height","14"),s(q,"viewBox","0 0 24 24"),s(q,"fill","none"),s(q,"stroke","currentColor"),s(q,"stroke-width","2"),s(q,"stroke-linecap","round"),s(q,"stroke-linejoin","round"),s(H,"class","menu-item svelte-1skuef2"),s(H,"role","menuitem"),s(Z,"x","9"),s(Z,"y","9"),s(Z,"width","13"),s(Z,"height","13"),s(Z,"rx","2"),s(Z,"ry","2"),s(ne,"d","M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"),s(ee,"width","14"),s(ee,"height","14"),s(ee,"viewBox","0 0 24 24"),s(ee,"fill","none"),s(ee,"stroke","currentColor"),s(ee,"stroke-width","2"),s(ee,"stroke-linecap","round"),s(ee,"stroke-linejoin","round"),s(ie,"class","menu-item svelte-1skuef2"),s(ie,"role","menuitem"),s(le,"cx","6"),s(le,"cy","6"),s(le,"r","3"),s(de,"cx","6"),s(de,"cy","18"),s(de,"r","3"),s(ye,"x1","20"),s(ye,"y1","4"),s(ye,"x2","8.12"),s(ye,"y2","15.88"),s(ge,"x1","8.12"),s(ge,"y1","8.12"),s(ge,"x2","20"),s(ge,"y2","20"),s(X,"width","14"),s(X,"height","14"),s(X,"viewBox","0 0 24 24"),s(X,"fill","none"),s(X,"stroke","currentColor"),s(X,"stroke-width","2"),s(X,"stroke-linecap","round"),s(X,"stroke-linejoin","round"),s(Me,"class","menu-item svelte-1skuef2"),s(Me,"role","menuitem"),s(Te,"x","9"),s(Te,"y","9"),s(Te,"width","13"),s(Te,"height","13"),s(Te,"rx","2"),s(Te,"ry","2"),s(Ue,"d","M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"),s(ze,"width","14"),s(ze,"height","14"),s(ze,"viewBox","0 0 24 24"),s(ze,"fill","none"),s(ze,"stroke","currentColor"),s(ze,"stroke-width","2"),s(ze,"stroke-linecap","round"),s(ze,"stroke-linejoin","round"),s(Ne,"class","menu-item svelte-1skuef2"),s(Ne,"role","menuitem"),s(Ee,"class","menu-sep svelte-1skuef2"),s(et,"points","3 6 5 6 21 6"),s(we,"d","M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"),s(We,"width","14"),s(We,"height","14"),s(We,"viewBox","0 0 24 24"),s(We,"fill","none"),s(We,"stroke","currentColor"),s(We,"stroke-width","2"),s(We,"stroke-linecap","round"),s(We,"stroke-linejoin","round"),s(Fe,"class","menu-item menu-item-danger svelte-1skuef2"),s(Fe,"role","menuitem"),s(n,"class","menu svelte-1skuef2"),ht(n,"left",l[3]+"px"),ht(n,"top",l[4]+"px"),ht(n,"position","fixed"),s(n,"role","menu"),s(n,"tabindex","-1")},m(He,Xe){S(He,e,Xe),S(He,t,Xe),S(He,n,Xe),r(n,i),r(i,o),r(o,a),r(o,u),r(i,c),r(i,b),r(n,g),r(n,v),r(v,h),r(h,y),r(h,k),r(h,w),r(v,j),r(v,M),r(n,N),r(n,D),r(D,L),r(L,E),r(D,z),r(D,V),r(n,K),r(n,G),r(n,J),r(n,H),r(H,q),r(q,Y),r(q,P),r(H,W),r(H,B),r(n,oe),r(n,ie),r(ie,ee),r(ee,Z),r(ee,ne),r(ie,re),r(ie,he),r(n,Ke),r(n,Me),r(Me,X),r(X,le),r(X,de),r(X,ye),r(X,ge),r(Me,Ie),r(Me,it),r(n,at),r(n,Ne),r(Ne,ze),r(ze,Te),r(ze,Ue),r(Ne,Ae),r(Ne,Be),r(n,Le),r(n,Ee),r(n,Se),r(n,Fe),r(Fe,We),r(We,et),r(We,we),r(Fe,be),r(Fe,tt),Je||(xe=[A(e,"click",je(l[19])),A(i,"click",l[17]),A(v,"click",l[10]),A(D,"click",l[11]),A(H,"click",l[13]),A(ie,"click",l[14]),A(Me,"click",l[15]),A(Ne,"click",l[16]),A(Fe,"click",l[12]),A(n,"click",je(l[28])),A(n,"keydown",l[31])],Je=!0)},p(He,Xe){Xe[0]&8&&ht(n,"left",He[3]+"px"),Xe[0]&16&&ht(n,"top",He[4]+"px")},d(He){He&&(C(e),C(t),C(n)),Je=!1,pe(xe)}}}function l1(l){let e,t,n,i,o,a,u=l[0].name+"",c,p,b,g,v,h,y,k,w,j,T,M,N,D,L,E,z,R,V,K,G,J;n=new fa({props:{kind:l[6],size:22}});let H=!l[7]&&$d(l);function q(O,B){return O[7]?e1:t1}let P=q(l)(l),W=l[2]&&zi(l);return{c(){e=f("div"),t=f("div"),Qe(n.$$.fragment),i=_(),o=f("div"),a=f("div"),c=F(u),b=_(),g=f("div"),v=f("span"),v.textContent=`${l[8]}`,h=_(),H&&H.c(),y=_(),k=f("div"),P.c(),w=_(),j=f("button"),T=Q("svg"),M=Q("circle"),N=Q("circle"),D=Q("circle"),L=_(),E=f("button"),E.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>',R=_(),W&&W.c(),V=gt(),s(t,"class","file-row-icon svelte-1skuef2"),s(a,"class","file-row-name svelte-1skuef2"),s(a,"title",p=l[0].name),s(g,"class","file-row-meta svelte-1skuef2"),s(o,"class","file-row-body svelte-1skuef2"),s(M,"cx","12"),s(M,"cy","5"),s(M,"r","2"),s(N,"cx","12"),s(N,"cy","12"),s(N,"r","2"),s(D,"cx","12"),s(D,"cy","19"),s(D,"r","2"),s(T,"width","16"),s(T,"height","16"),s(T,"viewBox","0 0 24 24"),s(T,"fill","currentColor"),s(j,"class","action-btn svelte-1skuef2"),s(j,"title",m("file.more")),s(j,"aria-label",m("file.more")),s(j,"aria-expanded",l[2]),s(E,"class","action-btn action-btn-danger svelte-1skuef2"),s(E,"title",m("common.delete")),s(E,"aria-label",m("common.delete")),s(k,"class","file-row-actions svelte-1skuef2"),s(e,"class","file-row svelte-1skuef2"),s(e,"role","button"),s(e,"tabindex","0"),s(e,"draggable","true"),s(e,"aria-label",z=l[7]?m("file.ariaFolder")+" "+l[0].name:m("file.ariaFile")+" "+l[0].name),ve(e,"file-row--selected",l[1])},m(O,B){S(O,e,B),r(e,t),qe(n,t,null),r(e,i),r(e,o),r(o,a),r(a,c),r(o,b),r(o,g),r(g,v),r(g,h),H&&H.m(g,null),r(e,y),r(e,k),P.m(k,null),r(k,w),r(k,j),r(j,T),r(T,M),r(T,N),r(T,D),r(k,L),r(k,E),S(O,R,B),W&&W.m(O,B),S(O,V,B),K=!0,G||(J=[A(xd,"click",l[19]),A(j,"click",je(l[18])),A(E,"click",je(l[12])),A(e,"click",l[9]),A(e,"keydown",l[24]),A(e,"contextmenu",l[23]),A(e,"dragstart",l[20]),A(e,"dragover",l[21]),A(e,"drop",l[22])],G=!0)},p(O,B){(!K||B[0]&1)&&u!==(u=O[0].name+"")&&U(c,u),(!K||B[0]&1&&p!==(p=O[0].name))&&s(a,"title",p),O[7]||H.p(O,B),P.p(O,B),(!K||B[0]&4)&&s(j,"aria-expanded",O[2]),(!K||B[0]&1&&z!==(z=O[7]?m("file.ariaFolder")+" "+O[0].name:m("file.ariaFile")+" "+O[0].name))&&s(e,"aria-label",z),(!K||B[0]&2)&&ve(e,"file-row--selected",O[1]),O[2]?W?W.p(O,B):(W=zi(O),W.c(),W.m(V.parentNode,V)):W&&(W.d(1),W=null)},i(O){K||(ue(n.$$.fragment,O),K=!0)},o(O){me(n.$$.fragment,O),K=!1},d(O){O&&(C(e),C(R),C(V)),Ye(n),H&&H.d(),P.d(),W&&W.d(O),G=!1,pe(J)}}}function n1(l,e,t){let{item:n}=e,{selected:i=!1}=e,{onDragStart:o}=e,{onDragOver:a}=e,{onDrop:u}=e;const c=Vl(),p=da(n),b=n.type==="folder",g=Qd(n);let v=!1,h=0,y=0,k=null;function w(B){B.ctrlKey||B.metaKey?c("toggleSelect",n.id):B.shiftKey?c("rangeSelect",n.id):k?(clearTimeout(k),k=null,b?c("navigate",n.id):c("preview",n)):k=setTimeout(()=>{k=null,c("selectOne",n.id)},250)}function j(){c("openExternal",n.fileId)}function T(){t(2,v=!1),c("showInFolder",n.nodeId||n.id)}function M(){t(2,v=!1),c("delete",{id:n.id,type:n.type})}function N(){t(2,v=!1),c("rename",{id:n.id,name:n.name})}function D(){t(2,v=!1),c("duplicate",n.id)}function L(){t(2,v=!1),c("cut",n.id)}function E(){t(2,v=!1),c("copy",n.id)}function z(){t(2,v=!1),b?c("navigate",n.id):c("preview",n)}function R(){t(2,v=!v)}function V(){t(2,v=!1)}function K(B){o&&o(B,n.id)}function G(B){a&&b&&a(B,n.id)}function J(B){u&&b&&u(B,n.id)}function H(B){B.preventDefault(),t(3,h=Math.min(B.clientX,window.innerWidth-240)),t(4,y=Math.min(B.clientY,window.innerHeight-320)),t(2,v=!0)}function q(B){(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),w(B))}function Y(B){ra.call(this,l,B)}const P=()=>c("preview",n),W=()=>c("navigate",n.id),O=B=>{B.key==="Escape"&&(B.stopPropagation(),V())};return l.$$set=B=>{"item"in B&&t(0,n=B.item),"selected"in B&&t(1,i=B.selected),"onDragStart"in B&&t(25,o=B.onDragStart),"onDragOver"in B&&t(26,a=B.onDragOver),"onDrop"in B&&t(27,u=B.onDrop)},[n,i,v,h,y,c,p,b,g,w,j,T,M,N,D,L,E,z,R,V,K,G,J,H,q,o,a,u,Y,P,W,O]}class i1 extends rt{constructor(e){super(),ot(this,e,n1,l1,st,{item:0,selected:1,onDragStart:25,onDragOver:26,onDrop:27},null,[-1,-1])}}function Oi(l,e,t){const n=l.slice();return n[4]=e[t],n[6]=t,n}function s1(l){let e;return{c(){e=f("span"),e.textContent="/",s(e,"class","sep svelte-csi2lb")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function o1(l){let e,t=l[4].name+"",n,i,o;function a(){return l[2](l[6])}return{c(){e=f("button"),n=F(t),s(e,"class","crumb crumb--link svelte-csi2lb")},m(u,c){S(u,e,c),r(e,n),i||(o=A(e,"click",a),i=!0)},p(u,c){l=u,c&1&&t!==(t=l[4].name+"")&&U(n,t)},d(u){u&&C(e),i=!1,o()}}}function r1(l){let e,t=l[4].name+"",n;return{c(){e=f("span"),n=F(t),s(e,"class","crumb crumb--current svelte-csi2lb")},m(i,o){S(i,e,o),r(e,n)},p(i,o){o&1&&t!==(t=i[4].name+"")&&U(n,t)},d(i){i&&C(e)}}}function Vi(l){let e,t,n=l[6]>0&&s1();function i(u,c){return u[6]===u[0].length-1?r1:o1}let o=i(l),a=o(l);return{c(){n&&n.c(),e=_(),a.c(),t=gt()},m(u,c){n&&n.m(u,c),S(u,e,c),a.m(u,c),S(u,t,c)},p(u,c){o===(o=i(u))&&a?a.p(u,c):(a.d(1),a=o(u),a&&(a.c(),a.m(t.parentNode,t)))},d(u){u&&(C(e),C(t)),n&&n.d(u),a.d(u)}}}function a1(l){let e,t=ae(l[0]),n=[];for(let i=0;i<t.length;i+=1)n[i]=Vi(Oi(l,t,i));return{c(){e=f("nav");for(let i=0;i<n.length;i+=1)n[i].c();s(e,"class","breadcrumbs svelte-csi2lb")},m(i,o){S(i,e,o);for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(e,null)},p(i,[o]){if(o&3){t=ae(i[0]);let a;for(a=0;a<t.length;a+=1){const u=Oi(i,t,a);n[a]?n[a].p(u,o):(n[a]=Vi(u),n[a].c(),n[a].m(e,null))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},i:$,o:$,d(i){i&&C(e),De(n,i)}}}function c1(l,e,t){let{crumbs:n=[]}=e;const i=Vl();function o(u){i("navigate",u)}const a=u=>o(u);return l.$$set=u=>{"crumbs"in u&&t(0,n=u.crumbs)},[n,o,a]}class ka extends rt{constructor(e){super(),ot(this,e,c1,a1,st,{crumbs:0})}}function u1(l){let e,t,n,i,o,a;return{c(){e=f("div"),t=f("p"),t.textContent=`${m("file.previewUnavailable")}`,n=_(),i=f("button"),i.textContent=`${m("file.openExternal")}`,s(i,"class","btn btn-sm svelte-1cw3u0m"),s(e,"class","preview-status svelte-1cw3u0m")},m(u,c){S(u,e,c),r(e,t),r(e,n),r(e,i),o||(a=A(i,"click",l[9]),o=!0)},p:$,d(u){u&&C(e),o=!1,a()}}}function f1(l){let e,t;function n(a,u){return u&2&&(e=null),e==null&&(e=!!(a[1]&&a[1].startsWith("data:"))),e?_1:b1}let i=n(l,-1),o=i(l);return{c(){o.c(),t=gt()},m(a,u){o.m(a,u),S(a,t,u)},p(a,u){i===(i=n(a,u))&&o?o.p(a,u):(o.d(1),o=i(a),o&&(o.c(),o.m(t.parentNode,t)))},d(a){a&&C(t),o.d(a)}}}function d1(l){let e,t,n;return{c(){e=f("pre"),t=f("code"),n=F(l[1]),s(e,"class","preview-text svelte-1cw3u0m")},m(i,o){S(i,e,o),r(e,t),r(t,n)},p(i,o){o&2&&U(n,i[1])},d(i){i&&C(e)}}}function p1(l){let e,t,n,i;return{c(){e=f("div"),t=f("img"),il(t.src,n=l[1])||s(t,"src",n),s(t,"alt",i=l[0].name),s(t,"class","preview-image svelte-1cw3u0m"),s(e,"class","preview-image-container svelte-1cw3u0m")},m(o,a){S(o,e,a),r(e,t)},p(o,a){a&2&&!il(t.src,n=o[1])&&s(t,"src",n),a&1&&i!==(i=o[0].name)&&s(t,"alt",i)},d(o){o&&C(e)}}}function m1(l){let e,t,n,i,o,a,u;return{c(){e=f("div"),t=f("p"),n=F(l[3]),i=_(),o=f("button"),o.textContent=`${m("file.openExternal")}`,s(o,"class","btn btn-sm svelte-1cw3u0m"),s(e,"class","preview-status svelte-1cw3u0m")},m(c,p){S(c,e,p),r(e,t),r(t,n),r(e,i),r(e,o),a||(u=A(o,"click",l[9]),a=!0)},p(c,p){p&8&&U(n,c[3])},d(c){c&&C(e),a=!1,u()}}}function g1(l){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${m("common.loading")}`,s(e,"class","preview-status svelte-1cw3u0m")},m(n,i){S(n,e,i),r(e,t)},p:$,d(n){n&&C(e)}}}function b1(l){let e,t,n,i,o,a;return{c(){e=f("div"),t=f("p"),t.textContent=`${m("file.pdfUnavailable")}`,n=_(),i=f("button"),i.textContent=`${m("file.openExternal")}`,s(i,"class","btn btn-sm svelte-1cw3u0m"),s(e,"class","preview-status svelte-1cw3u0m")},m(u,c){S(u,e,c),r(e,t),r(e,n),r(e,i),o||(a=A(i,"click",l[9]),o=!0)},p:$,d(u){u&&C(e),o=!1,a()}}}function _1(l){let e,t,n;return{c(){e=f("div"),t=f("embed"),il(t.src,n=l[1])||s(t,"src",n),s(t,"type","application/pdf"),s(t,"class","preview-pdf svelte-1cw3u0m"),s(e,"class","preview-pdf-container svelte-1cw3u0m")},m(i,o){S(i,e,o),r(e,t)},p(i,o){o&2&&!il(t.src,n=i[1])&&s(t,"src",n)},d(i){i&&C(e)}}}function v1(l){let e,t,n,i,o,a,u,c=l[0].name+"",p,b,g,v,h=zl(l[0].size)+"",y,k,w=Fi(l[0].mime)+"",j,T,M,N,D,L,E,z,R,V,K;o=new fa({props:{kind:l[8],size:18}});function G(q,Y){return q[2]?g1:q[3]?m1:q[6]&&q[1]?p1:q[5]&&q[1]?d1:q[4]?f1:u1}let J=G(l),H=J(l);return{c(){e=f("div"),t=f("div"),n=f("header"),i=f("div"),Qe(o.$$.fragment),a=_(),u=f("span"),p=F(c),g=_(),v=f("div"),y=F(h),k=F(" · "),j=F(w),T=_(),M=f("div"),N=f("button"),N.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>',D=_(),L=f("button"),L.innerHTML='<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',E=_(),z=f("div"),H.c(),s(u,"class","preview-name svelte-1cw3u0m"),s(u,"title",b=l[0].name),s(i,"class","preview-title svelte-1cw3u0m"),s(v,"class","preview-meta svelte-1cw3u0m"),s(N,"class","action-btn svelte-1cw3u0m"),s(N,"title",m("file.openExternal")),s(N,"aria-label",m("file.openExternal")),s(L,"class","action-btn action-btn-close svelte-1cw3u0m"),s(L,"title","Close"),s(L,"aria-label","Close preview"),s(M,"class","preview-actions svelte-1cw3u0m"),s(n,"class","preview-header svelte-1cw3u0m"),s(z,"class","preview-body svelte-1cw3u0m"),s(t,"class","modal svelte-1cw3u0m"),s(e,"class","overlay svelte-1cw3u0m"),s(e,"role","presentation")},m(q,Y){S(q,e,Y),r(e,t),r(t,n),r(n,i),qe(o,i,null),r(i,a),r(i,u),r(u,p),r(n,g),r(n,v),r(v,y),r(v,k),r(v,j),r(n,T),r(n,M),r(M,N),r(M,D),r(M,L),r(t,E),r(t,z),H.m(z,null),R=!0,V||(K=[A(N,"click",l[9]),A(L,"click",l[10]),A(e,"click",kt(l[11])),A(e,"keydown",l[12])],V=!0)},p(q,[Y]){(!R||Y&1)&&c!==(c=q[0].name+"")&&U(p,c),(!R||Y&1&&b!==(b=q[0].name))&&s(u,"title",b),(!R||Y&1)&&h!==(h=zl(q[0].size)+"")&&U(y,h),(!R||Y&1)&&w!==(w=Fi(q[0].mime)+"")&&U(j,w),J===(J=G(q))&&H?H.p(q,Y):(H.d(1),H=J(q),H&&(H.c(),H.m(z,null)))},i(q){R||(ue(o.$$.fragment,q),R=!0)},o(q){me(o.$$.fragment,q),R=!1},d(q){q&&C(e),Ye(o),H.d(),V=!1,pe(K)}}}function h1(l,e,t){let n,i,o,{item:a}=e,{content:u=""}=e,{loading:c=!1}=e,{error:p=""}=e;const b=Vl(),g=da(a);function v(j){j.key==="Escape"&&b("close")}function h(){b("openExternal",a.fileId)}oa(()=>{window.addEventListener("keydown",v)}),En(()=>{window.removeEventListener("keydown",v)});const y=()=>b("close"),k=()=>b("close"),w=j=>{j.key==="Escape"&&(j.preventDefault(),b("close"))};return l.$$set=j=>{"item"in j&&t(0,a=j.item),"content"in j&&t(1,u=j.content),"loading"in j&&t(2,c=j.loading),"error"in j&&t(3,p=j.error)},l.$$.update=()=>{l.$$.dirty&3&&t(6,n=_a(a)&&u&&u.startsWith("data:")),l.$$.dirty&1&&t(5,i=va(a)||ya(a)),l.$$.dirty&1&&t(4,o=ha(a))},[a,u,c,p,o,i,n,b,g,h,y,k,w]}class y1 extends rt{constructor(e){super(),ot(this,e,h1,v1,st,{item:0,content:1,loading:2,error:3})}}function k1(l){let e,t,n,i,o,a,u,c,p,b,g,v,h,y,k,w,j;return{c(){e=f("div"),t=f("div"),n=f("h3"),i=F(l[0]),o=_(),a=f("p"),u=F(l[1]),c=_(),p=f("div"),b=f("button"),g=F(l[2]),h=_(),y=f("button"),k=F(l[3]),s(n,"class","svelte-1fv6yyk"),s(a,"class","message svelte-1fv6yyk"),s(b,"class",v="btn "+(l[4]?"btn-danger":"btn-primary")+" svelte-1fv6yyk"),s(y,"class","btn svelte-1fv6yyk"),s(p,"class","actions svelte-1fv6yyk"),s(t,"class","modal svelte-1fv6yyk"),s(e,"class","overlay svelte-1fv6yyk"),s(e,"role","presentation")},m(T,M){S(T,e,M),r(e,t),r(t,n),r(n,i),r(t,o),r(t,a),r(a,u),r(t,c),r(t,p),r(p,b),r(b,g),r(p,h),r(p,y),r(y,k),w||(j=[A(b,"click",l[6]),A(y,"click",l[7]),A(e,"click",kt(l[8])),A(e,"keydown",l[9])],w=!0)},p(T,[M]){M&1&&U(i,T[0]),M&2&&U(u,T[1]),M&4&&U(g,T[2]),M&16&&v!==(v="btn "+(T[4]?"btn-danger":"btn-primary")+" svelte-1fv6yyk")&&s(b,"class",v),M&8&&U(k,T[3])},i:$,o:$,d(T){T&&C(e),w=!1,pe(j)}}}function w1(l,e,t){let{title:n=m("common.confirm")}=e,{message:i=""}=e,{confirmText:o=m("common.delete")}=e,{cancelText:a=m("common.cancel")}=e,{danger:u=!1}=e;const c=Vl(),p=()=>c("confirm"),b=()=>c("cancel"),g=()=>c("cancel"),v=h=>{h.key==="Escape"&&(h.preventDefault(),c("cancel"))};return l.$$set=h=>{"title"in h&&t(0,n=h.title),"message"in h&&t(1,i=h.message),"confirmText"in h&&t(2,o=h.confirmText),"cancelText"in h&&t(3,a=h.cancelText),"danger"in h&&t(4,u=h.danger)},[n,i,o,a,u,c,p,b,g,v]}class C1 extends rt{constructor(e){super(),ot(this,e,w1,k1,st,{title:0,message:1,confirmText:2,cancelText:3,danger:4})}}function S1(l){let e,t,n;return{c(){e=Q("circle"),t=Q("line"),n=Q("line"),s(e,"cx","12"),s(e,"cy","12"),s(e,"r","10"),s(t,"x1","12"),s(t,"y1","16"),s(t,"x2","12"),s(t,"y2","12"),s(n,"x1","12"),s(n,"y1","8"),s(n,"x2","12.01"),s(n,"y2","8")},m(i,o){S(i,e,o),S(i,t,o),S(i,n,o)},d(i){i&&(C(e),C(t),C(n))}}}function T1(l){let e,t,n,i;return{c(){e=Q("rect"),t=Q("polyline"),n=Q("line"),i=Q("line"),s(e,"x","3"),s(e,"y","5"),s(e,"width","18"),s(e,"height","14"),s(e,"rx","2"),s(t,"points","3 10 21 10"),s(n,"x1","8"),s(n,"y1","5"),s(n,"x2","8"),s(n,"y2","19"),s(i,"x1","16"),s(i,"y1","5"),s(i,"x2","16"),s(i,"y2","19")},m(o,a){S(o,e,a),S(o,t,a),S(o,n,a),S(o,i,a)},d(o){o&&(C(e),C(t),C(n),C(i))}}}function j1(l){let e,t;return{c(){e=Q("path"),t=Q("polyline"),s(e,"d","M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"),s(t,"points","13 2 13 9 20 9")},m(n,i){S(n,e,i),S(n,t,i)},d(n){n&&(C(e),C(t))}}}function E1(l){let e,t;return{c(){e=Q("path"),t=Q("path"),s(e,"d","M12 20h9"),s(t,"d","M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z")},m(n,i){S(n,e,i),S(n,t,i)},d(n){n&&(C(e),C(t))}}}function N1(l){let e,t,n,i,o;return{c(){e=Q("path"),t=Q("path"),n=Q("line"),i=Q("line"),o=Q("line"),s(e,"d","M4 19.5A2.5 2.5 0 0 1 6.5 17H20"),s(t,"d","M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"),s(n,"x1","8"),s(n,"y1","7"),s(n,"x2","16"),s(n,"y2","7"),s(i,"x1","8"),s(i,"y1","11"),s(i,"x2","14"),s(i,"y2","11"),s(o,"x1","8"),s(o,"y1","15"),s(o,"x2","12"),s(o,"y2","15")},m(a,u){S(a,e,u),S(a,t,u),S(a,n,u),S(a,i,u),S(a,o,u)},d(a){a&&(C(e),C(t),C(n),C(i),C(o))}}}function D1(l){let e,t,n,i;return{c(){e=Q("path"),t=Q("polyline"),n=Q("line"),i=Q("line"),s(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),s(t,"points","14 2 14 8 20 8"),s(n,"x1","16"),s(n,"y1","13"),s(n,"x2","8"),s(n,"y2","13"),s(i,"x1","16"),s(i,"y1","17"),s(i,"x2","8"),s(i,"y2","17")},m(o,a){S(o,e,a),S(o,t,a),S(o,n,a),S(o,i,a)},d(o){o&&(C(e),C(t),C(n),C(i))}}}function M1(l){let e,t;return{c(){e=Q("path"),t=Q("circle"),s(e,"d","M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"),s(t,"cx","12"),s(t,"cy","7"),s(t,"r","4")},m(n,i){S(n,e,i),S(n,t,i)},d(n){n&&(C(e),C(t))}}}function I1(l){let e,t,n,i;return{c(){e=Q("rect"),t=Q("rect"),n=Q("rect"),i=Q("rect"),s(e,"x","3"),s(e,"y","3"),s(e,"width","7"),s(e,"height","7"),s(e,"rx","1"),s(t,"x","14"),s(t,"y","3"),s(t,"width","7"),s(t,"height","4"),s(t,"rx","1"),s(n,"x","14"),s(n,"y","10"),s(n,"width","7"),s(n,"height","11"),s(n,"rx","1"),s(i,"x","3"),s(i,"y","14"),s(i,"width","7"),s(i,"height","7"),s(i,"rx","1")},m(o,a){S(o,e,a),S(o,t,a),S(o,n,a),S(o,i,a)},d(o){o&&(C(e),C(t),C(n),C(i))}}}function A1(l){let e;return{c(){e=Q("path"),s(e,"d","M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function P1(l){let e;function t(o,a){return o[0]==="folder"?A1:o[0]==="project"?I1:o[0]==="client"?M1:o[0]==="document"?D1:o[0]==="recipe"?N1:o[0]==="note"?E1:o[0]==="file"?j1:o[0]==="case"?T1:S1}let n=t(l),i=n(l);return{c(){e=Q("svg"),i.c(),s(e,"width",l[1]),s(e,"height",l[1]),s(e,"viewBox","0 0 24 24"),s(e,"fill","none"),s(e,"stroke","currentColor"),s(e,"stroke-width","1.5"),s(e,"stroke-linecap","round"),s(e,"stroke-linejoin","round"),s(e,"xmlns","http://www.w3.org/2000/svg")},m(o,a){S(o,e,a),i.m(e,null)},p(o,[a]){n!==(n=t(o))&&(i.d(1),i=n(o),i&&(i.c(),i.m(e,null))),a&2&&s(e,"width",o[1]),a&2&&s(e,"height",o[1])},i:$,o:$,d(o){o&&C(e),i.d()}}}function L1(l,e,t){let{kind:n="generic"}=e,{size:i=18}=e;return l.$$set=o=>{"kind"in o&&t(0,n=o.kind),"size"in o&&t(1,i=o.size)},[n,i]}class Wl extends rt{constructor(e){super(),ot(this,e,L1,P1,st,{kind:0,size:1})}}function Wi(l,e,t){const n=l.slice();return n[44]=e[t],n}function F1(l){let e;return{c(){e=f("span"),s(e,"class","tree-toggle-placeholder svelte-zj71cl")},m(t,n){S(t,e,n)},p:$,d(t){t&&C(e)}}}function R1(l){let e,t,n=l[1][l[44].id]?"▾":"▸",i,o,a;function u(){return l[25](l[44])}return{c(){e=f("button"),t=f("span"),i=F(n),s(t,"class","tree-arrow"),s(e,"class","tree-toggle svelte-zj71cl")},m(c,p){S(c,e,p),r(e,t),r(t,i),o||(a=A(e,"click",je(u)),o=!0)},p(c,p){l=c,p[0]&3&&n!==(n=l[1][l[44].id]?"▾":"▸")&&U(i,n)},d(c){c&&C(e),o=!1,a()}}}function Hi(l){let e,t;return e=new wa({props:{nodes:l[44].children||[],expanded:l[1],selectedNodeId:l[2],level:l[3]+1,onSelect:l[4],onToggle:l[5],onContextMenu:l[6],onDrop:l[7]}}),{c(){Qe(e.$$.fragment)},m(n,i){qe(e,n,i),t=!0},p(n,i){const o={};i[0]&1&&(o.nodes=n[44].children||[]),i[0]&2&&(o.expanded=n[1]),i[0]&4&&(o.selectedNodeId=n[2]),i[0]&8&&(o.level=n[3]+1),i[0]&16&&(o.onSelect=n[4]),i[0]&32&&(o.onToggle=n[5]),i[0]&64&&(o.onContextMenu=n[6]),i[0]&128&&(o.onDrop=n[7]),e.$set(o)},i(n){t||(ue(e.$$.fragment,n),t=!0)},o(n){me(e.$$.fragment,n),t=!1},d(n){Ye(e,n)}}}function Ui(l,e){let t,n,i,o,a,u,c,p=e[44].title+"",b,g,v=e[1][e[44].id]&&wn(e[44]),h,y,k,w;function j(P,W){return W[0]&1&&(n=null),n==null&&(n=!!dl(P[44])),n?R1:F1}let T=j(e,[-1,-1]),M=T(e);a=new Wl({props:{kind:Bi(e[44]),size:16}});function N(...P){return e[26](e[44],...P)}function D(...P){return e[27](e[44],...P)}function L(){return e[28](e[44])}function E(...P){return e[29](e[44],...P)}function z(...P){return e[30](e[44],...P)}function R(...P){return e[31](e[44],...P)}function V(...P){return e[32](e[44],...P)}function K(...P){return e[33](e[44],...P)}function G(...P){return e[34](e[44],...P)}function J(...P){return e[35](e[44],...P)}function H(...P){return e[36](e[44],...P)}function q(...P){return e[37](e[44],...P)}let Y=v&&Hi(e);return{key:l,first:null,c(){t=f("div"),M.c(),i=_(),o=f("span"),Qe(a.$$.fragment),u=_(),c=f("span"),b=F(p),g=_(),Y&&Y.c(),h=gt(),s(o,"class","tree-icon svelte-zj71cl"),s(o,"role","button"),s(o,"tabindex","-1"),s(c,"class","tree-label svelte-zj71cl"),s(c,"role","button"),s(c,"tabindex","-1"),s(t,"class","tree-item svelte-zj71cl"),ht(t,"padding-left",e[3]*16+4+"px"),s(t,"draggable","true"),s(t,"role","button"),s(t,"tabindex","0"),ve(t,"selected",e[2]===e[44].id),ve(t,"drop-valid",e[8]===e[44].id&&e[9][e[44].id]),ve(t,"drop-invalid",e[8]===e[44].id&&!e[9][e[44].id]),this.first=t},m(P,W){S(P,t,W),M.m(t,null),r(t,i),r(t,o),qe(a,o,null),r(t,u),r(t,c),r(c,b),S(P,g,W),Y&&Y.m(P,W),S(P,h,W),y=!0,k||(w=[A(o,"click",N),A(o,"keydown",D),A(o,"dblclick",je(e[24])),A(c,"click",je(L)),A(c,"keydown",E),A(t,"dragstart",z),A(t,"dragover",R),A(t,"dragleave",V),A(t,"drop",K),A(t,"click",G),A(t,"keydown",J),A(t,"dblclick",H),A(t,"contextmenu",Tn(q))],k=!0)},p(P,W){e=P,T===(T=j(e,W))&&M?M.p(e,W):(M.d(1),M=T(e),M&&(M.c(),M.m(t,i)));const O={};W[0]&1&&(O.kind=Bi(e[44])),a.$set(O),(!y||W[0]&1)&&p!==(p=e[44].title+"")&&U(b,p),(!y||W[0]&8)&&ht(t,"padding-left",e[3]*16+4+"px"),(!y||W[0]&5)&&ve(t,"selected",e[2]===e[44].id),(!y||W[0]&769)&&ve(t,"drop-valid",e[8]===e[44].id&&e[9][e[44].id]),(!y||W[0]&769)&&ve(t,"drop-invalid",e[8]===e[44].id&&!e[9][e[44].id]),W[0]&3&&(v=e[1][e[44].id]&&wn(e[44])),v?Y?(Y.p(e,W),W[0]&3&&ue(Y,1)):(Y=Hi(e),Y.c(),ue(Y,1),Y.m(h.parentNode,h)):Y&&(pt(),me(Y,1,1,()=>{Y=null}),mt())},i(P){y||(ue(a.$$.fragment,P),ue(Y),y=!0)},o(P){me(a.$$.fragment,P),me(Y),y=!1},d(P){P&&(C(t),C(g),C(h)),M.d(),Ye(a),Y&&Y.d(P),k=!1,pe(w)}}}function z1(l){let e=[],t=new Map,n,i,o,a,u=ae(l[0]);const c=p=>p[44].id;for(let p=0;p<u.length;p+=1){let b=Wi(l,u,p),g=c(b);t.set(g,e[p]=Ui(g,b))}return{c(){for(let p=0;p<e.length;p+=1)e[p].c();n=gt()},m(p,b){for(let g=0;g<e.length;g+=1)e[g]&&e[g].m(p,b);S(p,n,b),i=!0,o||(a=A(window,"dragend",l[14]),o=!0)},p(p,b){b[0]&2080767&&(u=ae(p[0]),pt(),e=ua(e,b,c,1,p,u,t,n.parentNode,ca,Ui,n,Wi),mt())},i(p){if(!i){for(let b=0;b<u.length;b+=1)ue(e[b]);i=!0}},o(p){for(let b=0;b<e.length;b+=1)me(e[b]);i=!1},d(p){p&&C(n);for(let b=0;b<e.length;b+=1)e[b].d(p);o=!1,a()}}}function Bi(l){return l.type==="client"||l.template_id==="client.default"?"client":l.type==="project"||l.template_id==="project.default"?"project":l.type==="document"||l.template_id==="document.default"?"document":l.type==="recipe"||l.template_id==="recipe.default"?"recipe":l.type==="folder"||l.template_id==="folder.default"?"folder":l.type==="case"?"case":l.type==="note"?"note":l.type==="file"?"file":"generic"}function wn(l){return l.children!==void 0}function dl(l){return wn(l)?l.children.length>0:l.has_children===!0}function Ki(l){const e={};function t(n,i){for(const o of n)e[o.id]=i,o.children&&t(o.children,o.id)}return t(l,""),e}function Gi(l){const e=[];function t(n){for(const i of n)e.push(i),i.children&&t(i.children)}return t(l),e}function O1(l){try{return l.dataTransfer.getData("text/plain")}catch{return""}}function V1(l,e,t){let n,i,o,{nodes:a=[]}=e,{expanded:u={}}=e,{selectedNodeId:c=""}=e,{level:p=0}=e,{onSelect:b=void 0}=e,{onToggle:g=void 0}=e,{onContextMenu:v=void 0}=e,{onDrop:h=void 0}=e,y={},k=null,w="",j="";const T=["folder","project","client","document","recipe","case"];En(()=>{for(const X of Object.keys(y))clearTimeout(y[X]);k&&clearInterval(k)});function M(X){return T.includes(X.type)}function N(X,le,de){if(!X||!le||le===X.id||!M(X))return!1;let ye=X.id;for(;ye;){if(ye===le)return!1;ye=de[ye]||""}return!0}function D(X,le){X.stopPropagation(),X.dataTransfer.effectAllowed="move",X.dataTransfer.setData("text/plain",le.id),t(21,w=le.id)}function L(X,le){X.preventDefault(),X.stopPropagation(),X.dataTransfer.dropEffect="move",j!==le.id&&t(8,j=le.id),dl(le)&&!u[le.id]&&!y[le.id]&&(y[le.id]=setTimeout(()=>{g&&g(le.id),delete y[le.id]},600));const de=X.currentTarget.closest(".workspace-tree-area");if(de){const ye=de.getBoundingClientRect(),ge=30;X.clientY-ye.top<ge?k||(k=setInterval(()=>{de.scrollTop-=10},50)):ye.bottom-X.clientY<ge?k||(k=setInterval(()=>{de.scrollTop+=10},50)):k&&(clearInterval(k),k=null)}}function E(X,le){const de=X.relatedTarget;de&&X.currentTarget.contains(de)||(j===le.id&&t(8,j=""),y[le.id]&&(clearTimeout(y[le.id]),delete y[le.id]),k&&(clearInterval(k),k=null))}function z(X,le){X.preventDefault(),X.stopPropagation(),y[le.id]&&(clearTimeout(y[le.id]),delete y[le.id]),k&&(clearInterval(k),k=null);const de=Gi(a),ye=Ki(de),ge=O1(X);if(!N(le,ge,ye)){t(8,j=""),t(21,w="");return}h&&h(ge,le.id),t(8,j=""),t(21,w="")}function R(){t(8,j=""),t(21,w="");for(const X of Object.keys(y))clearTimeout(y[X]),delete y[X];k&&(clearInterval(k),k=null)}function V(X,le){X.target.closest(".tree-toggle")||X.target.closest(".tree-icon")||b&&b(le)}function K(X,le){dl(le)&&g&&g(le.id)}function G(X,le){(X.key==="Enter"||X.key===" ")&&(X.preventDefault(),b&&b(le))}function J(X,le){X.stopPropagation(),dl(le)&&g&&g(le.id)}function H(X,le){(X.key==="Enter"||X.key===" ")&&(X.preventDefault(),X.stopPropagation(),dl(le)&&g&&g(le.id))}function q(X,le){(X.key==="Enter"||X.key===" ")&&(X.preventDefault(),b&&b(le))}function Y(X,le,de){const ye={};function ge(Ie){for(const Ge of Ie)ye[Ge.id]=N(Ge,le,de),Ge.children&&ge(Ge.children)}return ge(X),ye}function P(X){ra.call(this,l,X)}const W=X=>g&&g(X.id),O=(X,le)=>J(le,X),B=(X,le)=>H(le,X),oe=X=>b&&b(X),ie=(X,le)=>q(le,X),ee=(X,le)=>D(le,X),Z=(X,le)=>L(le,X),ne=(X,le)=>E(le,X),re=(X,le)=>z(le,X),fe=(X,le)=>V(le,X),he=(X,le)=>G(le,X),Ke=(X,le)=>K(le,X),Me=(X,le)=>v&&v(le,X);return l.$$set=X=>{"nodes"in X&&t(0,a=X.nodes),"expanded"in X&&t(1,u=X.expanded),"selectedNodeId"in X&&t(2,c=X.selectedNodeId),"level"in X&&t(3,p=X.level),"onSelect"in X&&t(4,b=X.onSelect),"onToggle"in X&&t(5,g=X.onToggle),"onContextMenu"in X&&t(6,v=X.onContextMenu),"onDrop"in X&&t(7,h=X.onDrop)},l.$$.update=()=>{l.$$.dirty[0]&1&&t(23,n=Gi(a)),l.$$.dirty[0]&8388608&&t(22,i=Ki(n)),l.$$.dirty[0]&14680064&&t(9,o=Y(n,w,i))},[a,u,c,p,b,g,v,h,j,o,D,L,E,z,R,V,K,G,J,H,q,w,i,n,P,W,O,B,oe,ie,ee,Z,ne,re,fe,he,Ke,Me]}class wa extends rt{constructor(e){super(),ot(this,e,V1,z1,st,{nodes:0,expanded:1,selectedNodeId:2,level:3,onSelect:4,onToggle:5,onContextMenu:6,onDrop:7},null,[-1,-1])}}function Ji(l){let e,t;return{c(){e=f("div"),t=F(l[4]),s(e,"class","path-info svelte-a9f1pd")},m(n,i){S(n,e,i),r(e,t)},p(n,i){i&16&&U(t,n[4])},d(n){n&&C(e)}}}function qi(l){let e,t;return{c(){e=f("div"),t=F(l[3]),s(e,"class","error-msg svelte-a9f1pd")},m(n,i){S(n,e,i),r(e,t)},p(n,i){i&8&&U(t,n[3])},d(n){n&&C(e)}}}function W1(l){let e,t,n,i,o,a,u,c,p,b,g,v,h,y,k,w,j,T=m("firstrun.browse")+"",M,N,D,L,E,z,R=(l[2]?m("firstrun.creating"):m("firstrun.create"))+"",V,K,G,J,H,q,Y=l[4]&&Ji(l),P=l[3]&&qi(l);return{c(){e=f("div"),t=f("div"),n=f("img"),o=_(),a=f("h1"),a.textContent=`${m("firstrun.title")}`,u=_(),c=f("p"),c.textContent=`${m("firstrun.desc")}`,p=_(),b=f("div"),g=f("label"),g.textContent=`${m("firstrun.pathLabel")}`,v=_(),h=f("div"),y=f("input"),w=_(),j=f("button"),M=F(T),N=_(),Y&&Y.c(),D=_(),P&&P.c(),L=_(),E=f("div"),z=f("button"),V=F(R),G=_(),J=f("button"),J.textContent=`${m("firstrun.quit")}`,s(n,"class","first-run-logo svelte-a9f1pd"),il(n.src,i="/assets/app-icons/icon_64x64.png")||s(n,"src",i),s(n,"width","64"),s(n,"height","64"),s(n,"alt",""),s(a,"class","svelte-a9f1pd"),s(c,"class","first-run-desc svelte-a9f1pd"),s(g,"class","form-label svelte-a9f1pd"),s(g,"for","vault-path"),s(y,"id","vault-path"),s(y,"type","text"),s(y,"placeholder",k=l[1]||m("firstrun.defaultPath")),y.disabled=l[2],s(y,"class","svelte-a9f1pd"),s(j,"class","btn"),j.disabled=l[2],s(h,"class","input-row svelte-a9f1pd"),s(b,"class","form-group svelte-a9f1pd"),s(z,"class","btn btn-primary btn-lg svelte-a9f1pd"),z.disabled=K=!l[0].trim()||l[2],s(J,"class","btn btn-lg svelte-a9f1pd"),s(E,"class","first-run-actions svelte-a9f1pd"),s(t,"class","first-run-card svelte-a9f1pd"),s(e,"class","first-run-screen svelte-a9f1pd")},m(W,O){S(W,e,O),r(e,t),r(t,n),r(t,o),r(t,a),r(t,u),r(t,c),r(t,p),r(t,b),r(b,g),r(b,v),r(b,h),r(h,y),_e(y,l[0]),r(h,w),r(h,j),r(j,M),r(t,N),Y&&Y.m(t,null),r(t,D),P&&P.m(t,null),r(t,L),r(t,E),r(E,z),r(z,V),r(E,G),r(E,J),H||(q=[A(y,"input",l[12]),A(y,"input",l[6]),A(y,"keydown",l[9]),A(j,"click",l[5]),A(z,"click",l[7]),A(J,"click",l[8])],H=!0)},p(W,[O]){O&2&&k!==(k=W[1]||m("firstrun.defaultPath"))&&s(y,"placeholder",k),O&4&&(y.disabled=W[2]),O&1&&y.value!==W[0]&&_e(y,W[0]),O&4&&(j.disabled=W[2]),W[4]?Y?Y.p(W,O):(Y=Ji(W),Y.c(),Y.m(t,D)):Y&&(Y.d(1),Y=null),W[3]?P?P.p(W,O):(P=qi(W),P.c(),P.m(t,L)):P&&(P.d(1),P=null),O&4&&R!==(R=(W[2]?m("firstrun.creating"):m("firstrun.create"))+"")&&U(V,R),O&5&&K!==(K=!W[0].trim()||W[2])&&(z.disabled=K)},i:$,o:$,d(W){W&&C(e),Y&&Y.d(),P&&P.d(),H=!1,pe(q)}}}function Al(l,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[l];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails error:",l,t)}return Promise.reject(new Error("Wails not connected: "+l))}function H1(l,e,t){let{onComplete:n=null}=e,{onQuit:i=null}=e,o="",a="",u=!1,c="",p="",b=null;async function g(){try{const T=await Al("GetDefaultVaultPath");t(1,a=T||""),t(0,o=a||""),o&&await h()}catch{t(1,a="")}}g();async function v(){try{const T=await Al("PickDirectory");T&&(t(0,o=T),await h())}catch(T){t(3,c=String(T))}}async function h(){if(!o||!o.trim()){t(4,p=""),b=null;return}try{b=await Al("CheckVaultPath",o.trim()),b&&t(4,p=b.description)}catch{t(4,p=""),b=null}}async function y(){if(!(!o||!o.trim())){if(t(2,u=!0),t(3,c=""),b&&!b.writable){t(3,c=m("firstrun.errorNoWrite")),t(2,u=!1);return}try{const T=await Al("CreateVault",o.trim());T&&T.status==="ready"&&n&&n(T)}catch(T){t(3,c=String(T))}t(2,u=!1)}}function k(){i&&i()}function w(T){T.key==="Enter"&&!u&&o.trim()&&y()}function j(){o=this.value,t(0,o)}return l.$$set=T=>{"onComplete"in T&&t(10,n=T.onComplete),"onQuit"in T&&t(11,i=T.onQuit)},[o,a,u,c,p,v,h,y,k,w,n,i,j]}class U1 extends rt{constructor(e){super(),ot(this,e,H1,W1,st,{onComplete:10,onQuit:11})}}function Yi(l){let e,t;return{c(){e=f("div"),t=F(l[2]),s(e,"class","error-msg svelte-s3o8c3")},m(n,i){S(n,e,i),r(e,t)},p(n,i){i&4&&U(t,n[2])},d(n){n&&C(e)}}}function Qi(l){let e,t,n,i,o,a,u,c,p=m("common.yes")+"",b,g,v,h,y;return{c(){e=f("div"),t=f("div"),n=f("h3"),n.textContent=`${m("recovery.createConfirmTitle")}`,i=_(),o=f("p"),o.textContent=`${m("recovery.createConfirm")}`,a=_(),u=f("div"),c=f("button"),b=F(p),g=_(),v=f("button"),v.textContent=`${m("common.cancel")}`,s(n,"class","svelte-s3o8c3"),s(o,"class","modal-desc svelte-s3o8c3"),s(c,"class","btn btn-primary"),c.disabled=l[1],s(v,"class","btn"),s(u,"class","modal-actions svelte-s3o8c3"),s(t,"class","modal svelte-s3o8c3"),s(e,"class","modal-overlay svelte-s3o8c3"),s(e,"role","button"),s(e,"tabindex","0")},m(k,w){S(k,e,w),r(e,t),r(t,n),r(t,i),r(t,o),r(t,a),r(t,u),r(u,c),r(c,b),r(u,g),r(u,v),h||(y=[A(c,"click",l[6]),A(v,"click",l[7]),A(e,"click",kt(l[7])),A(e,"keydown",l[11])],h=!0)},p(k,w){w&2&&(c.disabled=k[1])},d(k){k&&C(e),h=!1,pe(y)}}}function B1(l){let e,t,n,i,o,a,u,c,p,b=(l[0]||"—")+"",g,v,h,y,k,w=m("recovery.choose")+"",j,T,M,N=m("recovery.create")+"",D,L,E,z,R,V,K,G=l[2]&&Yi(l),J=l[3]&&Qi(l);return{c(){e=f("div"),t=f("div"),n=f("div"),n.textContent="⚠",i=_(),o=f("h1"),o.textContent=`${m("recovery.title")}`,a=_(),u=f("p"),u.textContent=`${m("recovery.expected")}:`,c=_(),p=f("code"),g=F(b),v=_(),G&&G.c(),h=_(),y=f("div"),k=f("button"),j=F(w),T=_(),M=f("button"),D=F(N),L=_(),E=f("button"),E.textContent=`${m("recovery.quit")}`,z=_(),J&&J.c(),R=gt(),s(n,"class","recovery-icon svelte-s3o8c3"),s(o,"class","svelte-s3o8c3"),s(u,"class","recovery-desc svelte-s3o8c3"),s(p,"class","recovery-path svelte-s3o8c3"),s(k,"class","btn btn-primary btn-lg svelte-s3o8c3"),k.disabled=l[1],s(M,"class","btn btn-lg svelte-s3o8c3"),M.disabled=l[1],s(E,"class","btn btn-lg svelte-s3o8c3"),s(y,"class","recovery-actions svelte-s3o8c3"),s(t,"class","recovery-card svelte-s3o8c3"),s(e,"class","recovery-screen svelte-s3o8c3")},m(H,q){S(H,e,q),r(e,t),r(t,n),r(t,i),r(t,o),r(t,a),r(t,u),r(t,c),r(t,p),r(p,g),r(t,v),G&&G.m(t,null),r(t,h),r(t,y),r(y,k),r(k,j),r(y,T),r(y,M),r(M,D),r(y,L),r(y,E),S(H,z,q),J&&J.m(H,q),S(H,R,q),V||(K=[A(k,"click",l[4]),A(M,"click",l[5]),A(E,"click",l[8])],V=!0)},p(H,[q]){q&1&&b!==(b=(H[0]||"—")+"")&&U(g,b),H[2]?G?G.p(H,q):(G=Yi(H),G.c(),G.m(t,h)):G&&(G.d(1),G=null),q&2&&(k.disabled=H[1]),q&2&&(M.disabled=H[1]),H[3]?J?J.p(H,q):(J=Qi(H),J.c(),J.m(R.parentNode,R)):J&&(J.d(1),J=null)},i:$,o:$,d(H){H&&(C(e),C(z),C(R)),G&&G.d(),J&&J.d(H),V=!1,pe(K)}}}function _n(l,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[l];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails error:",l,t)}return Promise.reject(new Error("Wails not connected: "+l))}function K1(l,e,t){let{vaultPath:n=""}=e,{onComplete:i=null}=e,{onQuit:o=null}=e,a=!1,u="",c=!1;async function p(){try{const k=await _n("PickDirectory");if(!k)return;t(1,a=!0),t(2,u="");const w=await _n("OpenVault",k);w&&w.status==="ready"&&i&&i(w)}catch(k){t(2,u=String(k))}t(1,a=!1)}function b(){t(3,c=!0)}async function g(){t(3,c=!1),t(1,a=!0),t(2,u="");try{const k=await _n("CreateVault",n);k&&k.status==="ready"&&i&&i(k)}catch(k){t(2,u=String(k))}t(1,a=!1)}function v(){t(3,c=!1)}function h(){o&&o()}const y=k=>k.key==="Enter"&&v();return l.$$set=k=>{"vaultPath"in k&&t(0,n=k.vaultPath),"onComplete"in k&&t(9,i=k.onComplete),"onQuit"in k&&t(10,o=k.onQuit)},[n,a,u,c,p,b,g,v,h,i,o,y]}class G1 extends rt{constructor(e){super(),ot(this,e,K1,B1,st,{vaultPath:0,onComplete:9,onQuit:10})}}function Xi(l,e,t){const n=l.slice();return n[5]=e[t],n}function J1(l){let e,t,n;return{c(){e=Q("path"),t=Q("path"),n=Q("path"),s(e,"d","M5 4h12l2 2v14H5z"),s(t,"d","M8 4v6h8V4"),s(n,"d","M8 20v-6h8v6")},m(i,o){S(i,e,o),S(i,t,o),S(i,n,o)},d(i){i&&(C(e),C(t),C(n))}}}function q1(l){let e,t,n,i;return{c(){e=Q("path"),t=Q("path"),n=Q("path"),i=Q("path"),s(e,"d","M20 11a8 8 0 0 0-14-4l-2 2"),s(t,"d","M4 5v4h4"),s(n,"d","M4 13a8 8 0 0 0 14 4l2-2"),s(i,"d","M20 19v-4h-4")},m(o,a){S(o,e,a),S(o,t,a),S(o,n,a),S(o,i,a)},d(o){o&&(C(e),C(t),C(n),C(i))}}}function Y1(l){let e;return{c(){e=Q("path"),s(e,"d","M4 19V9M10 19V5M16 19v-7M22 19H2")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function Q1(l){let e;return{c(){e=Q("path"),s(e,"d","M3 6h6l2 2h10v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6z")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function X1(l){let e,t;return{c(){e=Q("path"),t=Q("path"),s(e,"d","M9 3v5M15 3v5M7 8h10v3a5 5 0 0 1-10 0V8z"),s(t,"d","M12 16v5")},m(n,i){S(n,e,i),S(n,t,i)},d(n){n&&(C(e),C(t))}}}function Z1(l){let e,t;return{c(){e=Q("rect"),t=Q("path"),s(e,"x","4"),s(e,"y","3"),s(e,"width","16"),s(e,"height","18"),s(e,"rx","2"),s(t,"d","M8 7h8M8 11h8M8 15h5")},m(n,i){S(n,e,i),S(n,t,i)},d(n){n&&(C(e),C(t))}}}function x1(l){let e,t,n;return{c(){e=Q("path"),t=Q("path"),n=Q("path"),s(e,"d","M3 10.5 12 3l9 7.5"),s(t,"d","M5 9.5V21h14V9.5"),s(n,"d","M10 21v-6h4v6")},m(i,o){S(i,e,o),S(i,t,o),S(i,n,o)},d(i){i&&(C(e),C(t),C(n))}}}function $1(l){let e,t;return{c(){e=Q("circle"),t=Q("path"),s(e,"cx","12"),s(e,"cy","12"),s(e,"r","3"),s(t,"d","M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 0 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V22h-4v-.2a1.7 1.7 0 0 0-1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 0 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H2v-4h.2a1.7 1.7 0 0 0 1.5-1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 0 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3 1.7 1.7 0 0 0 1-1.5V2h4v.2a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 0 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8 1.7 1.7 0 0 0 1.5 1h.2v4h-.2a1.7 1.7 0 0 0-1.4 1z")},m(n,i){S(n,e,i),S(n,t,i)},d(n){n&&(C(e),C(t))}}}function Zi(l){let e,t,n,i,o,a,u,c;function p(h,y){if(h[5].id==="general")return $1;if(h[5].id==="workspace")return x1;if(h[5].id==="templates")return Z1;if(h[5].id==="plugins")return X1;if(h[5].id==="files")return Q1;if(h[5].id==="activity")return Y1;if(h[5].id==="sync")return q1;if(h[5].id==="backup")return J1}let b=p(l),g=b&&b(l);function v(){return l[4](l[5])}return{c(){e=f("button"),t=f("span"),n=Q("svg"),g&&g.c(),i=_(),o=f("span"),o.textContent=`${l[5].label}`,a=_(),s(n,"width","16"),s(n,"height","16"),s(n,"viewBox","0 0 24 24"),s(n,"fill","none"),s(n,"stroke","currentColor"),s(n,"stroke-width","1.8"),s(n,"stroke-linecap","round"),s(n,"stroke-linejoin","round"),s(n,"aria-hidden","true"),s(t,"class","settings-nav-icon svelte-1uolm3f"),s(o,"class","settings-nav-label svelte-1uolm3f"),s(e,"class","settings-nav-item svelte-1uolm3f"),ve(e,"active",l[0]===l[5].id),ve(e,"disabled",l[5].id==="plugins"||l[5].id==="files"||l[5].id==="activity"||l[5].id==="backup")},m(h,y){S(h,e,y),r(e,t),r(t,n),g&&g.m(n,null),r(e,i),r(e,o),r(e,a),u||(c=A(e,"click",v),u=!0)},p(h,y){l=h,y&3&&ve(e,"active",l[0]===l[5].id)},d(h){h&&C(e),g&&g.d(),u=!1,c()}}}function ep(l){let e,t=ae(l[1]),n=[];for(let i=0;i<t.length;i+=1)n[i]=Zi(Xi(l,t,i));return{c(){e=f("nav");for(let i=0;i<n.length;i+=1)n[i].c();s(e,"class","settings-sidebar svelte-1uolm3f")},m(i,o){S(i,e,o);for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(e,null)},p(i,[o]){if(o&7){t=ae(i[1]);let a;for(a=0;a<t.length;a+=1){const u=Xi(i,t,a);n[a]?n[a].p(u,o):(n[a]=Zi(u),n[a].c(),n[a].m(e,null))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},i:$,o:$,d(i){i&&C(e),De(n,i)}}}function tp(l,e,t){let{activeSection:n="general"}=e,{onSelect:i=null}=e;const o=[{id:"general",label:m("settings.general")},{id:"workspace",label:m("settings.workspace")},{id:"templates",label:m("settings.templates")},{id:"plugins",label:m("settings.plugins")},{id:"files",label:m("settings.files")},{id:"activity",label:m("settings.activity")},{id:"sync",label:m("settings.sync")},{id:"backup",label:m("settings.backup")}];function a(c){i&&i(c)}const u=c=>a(c.id);return l.$$set=c=>{"activeSection"in c&&t(0,n=c.activeSection),"onSelect"in c&&t(3,i=c.onSelect)},[n,o,a,i,u]}class lp extends rt{constructor(e){super(),ot(this,e,tp,ep,st,{activeSection:0,onSelect:3})}}function xi(l){let e;return{c(){e=f("div"),e.textContent=`${m("settings.saved")}`,s(e,"class","save-notice svelte-1e2uhdh")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function np(l){let e,t,n,i,o,a,u,c,p,b,g,v,h,y,k,w,j,T,M,N,D,L,E,z,R,V,K,G,J,H,q,Y,P,W=l[1]&&xi();return{c(){e=f("div"),t=f("h2"),t.textContent=`${m("settings.general")}`,n=_(),i=f("p"),i.textContent=`${m("settings.generalDesc")}`,o=_(),a=f("div"),u=f("h3"),u.textContent=`${m("settings.appearance")}`,c=_(),p=f("div"),b=f("label"),g=f("span"),g.textContent=`${m("settings.theme")}`,v=_(),h=f("select"),y=f("option"),y.textContent=`${m("settings.themeSystem")}`,k=f("option"),k.textContent=`${m("settings.themeLight")} (${m("settings.langSoon")})`,w=f("option"),w.textContent=`${m("settings.themeDark")} (${m("settings.langSoon")})`,j=_(),T=f("div"),M=f("h3"),M.textContent=`${m("settings.localization")}`,N=_(),D=f("div"),L=f("label"),E=f("span"),E.textContent=`${m("settings.language")}`,z=_(),R=f("select"),V=f("option"),V.textContent=`${m("settings.langRu")}`,K=f("option"),K.textContent=`${m("settings.langEn")} (${m("settings.langSoon")})`,G=_(),J=f("div"),W&&W.c(),H=_(),q=f("button"),q.textContent=`${m("settings.save")}`,s(t,"class","svelte-1e2uhdh"),s(i,"class","section-desc svelte-1e2uhdh"),s(u,"class","card-title svelte-1e2uhdh"),s(g,"class","label-text svelte-1e2uhdh"),y.__value="system",_e(y,y.__value),k.__value="light",_e(k,k.__value),k.disabled=!0,w.__value="dark",_e(w,w.__value),w.disabled=!0,l[0]===void 0&&Gt(()=>l[5].call(h)),s(p,"class","form-group svelte-1e2uhdh"),s(a,"class","settings-card svelte-1e2uhdh"),s(M,"class","card-title svelte-1e2uhdh"),s(E,"class","label-text svelte-1e2uhdh"),V.__value="ru",_e(V,V.__value),K.__value="en",_e(K,K.__value),R.disabled=!0,s(D,"class","form-group svelte-1e2uhdh"),s(T,"class","settings-card svelte-1e2uhdh"),s(q,"class","btn btn-primary"),s(J,"class","settings-actions svelte-1e2uhdh"),s(e,"class","settings-section svelte-1e2uhdh")},m(O,B){S(O,e,B),r(e,t),r(e,n),r(e,i),r(e,o),r(e,a),r(a,u),r(a,c),r(a,p),r(p,b),r(b,g),r(b,v),r(b,h),r(h,y),r(h,k),r(h,w),Dt(h,l[0],!0),r(e,j),r(e,T),r(T,M),r(T,N),r(T,D),r(D,L),r(L,E),r(L,z),r(L,R),r(R,V),r(R,K),r(e,G),r(e,J),W&&W.m(J,null),r(J,H),r(J,q),Y||(P=[A(h,"change",l[5]),A(q,"click",l[2])],Y=!0)},p(O,[B]){B&1&&Dt(h,O[0]),O[1]?W||(W=xi(),W.c(),W.m(J,H)):W&&(W.d(1),W=null)},i:$,o:$,d(O){O&&C(e),W&&W.d(),Y=!1,pe(P)}}}function ip(l,e,t){let{appConfig:n=null}=e,{onSave:i=null}=e,o="system",a=!1;function u(){n&&t(0,o=n.theme||"system")}async function c(){n&&(t(3,n.theme=o,n),i&&await i(n),t(1,a=!0),setTimeout(()=>t(1,a=!1),2e3))}function p(){o=Fl(this),t(0,o)}return l.$$set=b=>{"appConfig"in b&&t(3,n=b.appConfig),"onSave"in b&&t(4,i=b.onSave)},l.$$.update=()=>{l.$$.dirty&8&&n&&u()},[o,a,c,n,i,p]}class sp extends rt{constructor(e){super(),ot(this,e,ip,np,st,{appConfig:3,onSave:4})}}function $i(l){let e,t;return{c(){e=f("div"),t=F(l[1]),s(e,"class","notice svelte-1zbky3")},m(n,i){S(n,e,i),r(e,t)},p(n,i){i&2&&U(t,n[1])},d(n){n&&C(e)}}}function op(l){let e;return{c(){e=f("p"),e.textContent=`${m("settings.noVaultInfo")}`,s(e,"class","no-data svelte-1zbky3")},m(t,n){S(t,e,n)},p:$,d(t){t&&C(e)}}}function rp(l){let e,t,n,i,o,a=l[0].path+"",u,c,p,b,g,v,h=l[0].dbPath+"",y,k,w,j=l[0].nodeCount!==void 0&&es(l),T=l[0].fileCount!==void 0&&ts(l);return{c(){e=f("div"),t=f("div"),n=f("span"),n.textContent=`${m("settings.vaultPath")}`,i=_(),o=f("span"),u=F(a),c=_(),p=f("div"),b=f("span"),b.textContent="DB",g=_(),v=f("span"),y=F(h),k=_(),j&&j.c(),w=_(),T&&T.c(),s(n,"class","info-label svelte-1zbky3"),s(o,"class","info-value mono svelte-1zbky3"),s(t,"class","info-row svelte-1zbky3"),s(b,"class","info-label svelte-1zbky3"),s(v,"class","info-value mono small svelte-1zbky3"),s(p,"class","info-row svelte-1zbky3"),s(e,"class","vault-info svelte-1zbky3")},m(M,N){S(M,e,N),r(e,t),r(t,n),r(t,i),r(t,o),r(o,u),r(e,c),r(e,p),r(p,b),r(p,g),r(p,v),r(v,y),r(e,k),j&&j.m(e,null),r(e,w),T&&T.m(e,null)},p(M,N){N&1&&a!==(a=M[0].path+"")&&U(u,a),N&1&&h!==(h=M[0].dbPath+"")&&U(y,h),M[0].nodeCount!==void 0?j?j.p(M,N):(j=es(M),j.c(),j.m(e,w)):j&&(j.d(1),j=null),M[0].fileCount!==void 0?T?T.p(M,N):(T=ts(M),T.c(),T.m(e,null)):T&&(T.d(1),T=null)},d(M){M&&C(e),j&&j.d(),T&&T.d()}}}function es(l){let e,t,n,i,o=l[0].nodeCount+"",a;return{c(){e=f("div"),t=f("span"),t.textContent="Nodes",n=_(),i=f("span"),a=F(o),s(t,"class","info-label svelte-1zbky3"),s(i,"class","info-value svelte-1zbky3"),s(e,"class","info-row svelte-1zbky3")},m(u,c){S(u,e,c),r(e,t),r(e,n),r(e,i),r(i,a)},p(u,c){c&1&&o!==(o=u[0].nodeCount+"")&&U(a,o)},d(u){u&&C(e)}}}function ts(l){let e,t,n,i,o=l[0].fileCount+"",a;return{c(){e=f("div"),t=f("span"),t.textContent="Files",n=_(),i=f("span"),a=F(o),s(t,"class","info-label svelte-1zbky3"),s(i,"class","info-value svelte-1zbky3"),s(e,"class","info-row svelte-1zbky3")},m(u,c){S(u,e,c),r(e,t),r(e,n),r(e,i),r(i,a)},p(u,c){c&1&&o!==(o=u[0].fileCount+"")&&U(a,o)},d(u){u&&C(e)}}}function ap(l){let e,t,n,i,o,a,u,c,p,b,g,v,h,y,k,w,j=l[1]&&$i(l);function T(D,L){return D[0]?rp:op}let M=T(l),N=M(l);return{c(){e=f("div"),t=f("h2"),t.textContent=`${m("settings.workspace")}`,n=_(),i=f("p"),i.textContent=`${m("settings.workspaceDesc")}`,o=_(),j&&j.c(),a=_(),u=f("div"),N.c(),c=_(),p=f("div"),b=f("button"),b.textContent=`${m("settings.openVault")}`,g=_(),v=f("button"),v.textContent=`${m("settings.changeVault")}`,h=_(),y=f("button"),y.textContent=`${m("settings.checkIntegrity")}`,s(t,"class","svelte-1zbky3"),s(i,"class","section-desc svelte-1zbky3"),s(u,"class","settings-card svelte-1zbky3"),s(b,"class","btn svelte-1zbky3"),s(v,"class","btn svelte-1zbky3"),s(y,"class","btn svelte-1zbky3"),s(p,"class","workspace-actions svelte-1zbky3"),s(e,"class","settings-section svelte-1zbky3")},m(D,L){S(D,e,L),r(e,t),r(e,n),r(e,i),r(e,o),j&&j.m(e,null),r(e,a),r(e,u),N.m(u,null),r(e,c),r(e,p),r(p,b),r(p,g),r(p,v),r(p,h),r(p,y),k||(w=[A(b,"click",l[2]),A(v,"click",l[4]),A(y,"click",l[3])],k=!0)},p(D,[L]){D[1]?j?j.p(D,L):(j=$i(D),j.c(),j.m(e,a)):j&&(j.d(1),j=null),M===(M=T(D))&&N?N.p(D,L):(N.d(1),N=M(D),N&&(N.c(),N.m(u,null)))},i:$,o:$,d(D){D&&C(e),j&&j.d(),N.d(),k=!1,pe(w)}}}function tl(l,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[l];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails error:",l,t)}return Promise.reject(new Error("Wails not connected: "+l))}function cp(l,e,t){let{onRefresh:n=null}=e,i=null,o="";async function a(){try{t(0,i=await tl("GetVaultInfo"))}catch{t(0,i=null)}}a();async function u(){try{await tl("OpenVaultFolder")}catch(b){t(1,o=String(b))}}async function c(){try{const b=await tl("VaultCheck");b.healthy?t(1,o="Vault healthy"):t(1,o="Issues found: "+(b.errors||[]).join("; "))}catch(b){t(1,o=String(b))}}async function p(){try{const b=await tl("PickDirectory");if(!b)return;const g=await tl("OpenVault",b);g&&g.status==="ready"&&(t(0,i=await tl("GetVaultInfo")),n&&n())}catch(b){t(1,o=String(b))}}return l.$$set=b=>{"onRefresh"in b&&t(5,n=b.onRefresh)},[i,o,u,c,p,n]}class up extends rt{constructor(e){super(),ot(this,e,cp,ap,st,{onRefresh:5})}}function ls(l,e,t){const n=l.slice();return n[6]=e[t],n}function fp(l){let e,t=ae(l[0]),n=[];for(let i=0;i<t.length;i+=1)n[i]=ns(ls(l,t,i));return{c(){e=f("div");for(let i=0;i<n.length;i+=1)n[i].c();s(e,"class","template-list svelte-ksamnw")},m(i,o){S(i,e,o);for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(e,null)},p(i,o){if(o&5){t=ae(i[0]);let a;for(a=0;a<t.length;a+=1){const u=ls(i,t,a);n[a]?n[a].p(u,o):(n[a]=ns(u),n[a].c(),n[a].m(e,null))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},d(i){i&&C(e),De(n,i)}}}function dp(l){let e;return{c(){e=f("p"),e.textContent=`${m("common.empty")}`,s(e,"class","no-data svelte-ksamnw")},m(t,n){S(t,e,n)},p:$,d(t){t&&C(e)}}}function pp(l){let e;return{c(){e=f("p"),e.textContent=`${m("common.loading")}`,s(e,"class","loading svelte-ksamnw")},m(t,n){S(t,e,n)},p:$,d(t){t&&C(e)}}}function ns(l){let e,t,n,i=(m("template."+l[6].id)||l[6].title)+"",o,a,u,c,p=l[6].type+"",b,g,v,h,y,k,w,j,T=(l[6].enabled?m("settings.templateEnabled"):m("settings.templateDisabled"))+"",M,N,D,L;function E(){return l[4](l[6])}return{c(){e=f("div"),t=f("div"),n=f("span"),o=F(i),a=_(),u=f("span"),c=F("("),b=F(p),g=F(")"),v=_(),h=f("label"),y=f("input"),w=_(),j=f("span"),M=F(T),N=_(),s(n,"class","template-name svelte-ksamnw"),s(u,"class","template-type svelte-ksamnw"),s(t,"class","template-info svelte-ksamnw"),s(y,"type","checkbox"),y.checked=k=l[6].enabled,s(y,"class","svelte-ksamnw"),s(j,"class","toggle-text svelte-ksamnw"),s(h,"class","toggle-label svelte-ksamnw"),s(e,"class","template-item svelte-ksamnw")},m(z,R){S(z,e,R),r(e,t),r(t,n),r(n,o),r(t,a),r(t,u),r(u,c),r(u,b),r(u,g),r(e,v),r(e,h),r(h,y),r(h,w),r(h,j),r(j,M),r(e,N),D||(L=A(y,"change",E),D=!0)},p(z,R){l=z,R&1&&i!==(i=(m("template."+l[6].id)||l[6].title)+"")&&U(o,i),R&1&&p!==(p=l[6].type+"")&&U(b,p),R&1&&k!==(k=l[6].enabled)&&(y.checked=k),R&1&&T!==(T=(l[6].enabled?m("settings.templateEnabled"):m("settings.templateDisabled"))+"")&&U(M,T)},d(z){z&&C(e),D=!1,L()}}}function mp(l){let e,t,n,i,o;function a(p,b){return p[1]?pp:p[0].length===0?dp:fp}let u=a(l),c=u(l);return{c(){e=f("div"),t=f("h2"),t.textContent=`${m("settings.templates")}`,n=_(),i=f("p"),i.textContent=`${m("settings.templatesDesc")}`,o=_(),c.c(),s(t,"class","svelte-ksamnw"),s(i,"class","section-desc svelte-ksamnw"),s(e,"class","settings-section svelte-ksamnw")},m(p,b){S(p,e,b),r(e,t),r(e,n),r(e,i),r(e,o),c.m(e,null)},p(p,[b]){u===(u=a(p))&&c?c.p(p,b):(c.d(1),c=u(p),c&&(c.c(),c.m(e,null)))},i:$,o:$,d(p){p&&C(e),c.d()}}}function is(l,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[l];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails error:",l,t)}return Promise.reject(new Error("Wails not connected: "+l))}function gp(l,e,t){let{onRefresh:n=null}=e,i=[],o=!0;async function a(){t(1,o=!0);try{t(0,i=await is("AllTemplates")||[])}catch{t(0,i=[])}t(1,o=!1)}a();async function u(p){const b=!p.enabled;try{await is("SetTemplateEnabled",p.id,b),p.enabled=b,t(0,i),n&&n()}catch(g){console.error(g)}}const c=p=>u(p);return l.$$set=p=>{"onRefresh"in p&&t(3,n=p.onRefresh)},[i,o,u,n,c]}class bp extends rt{constructor(e){super(),ot(this,e,gp,mp,st,{onRefresh:3})}}function _p(l){let e,t,n,i,o,a,u,c;return{c(){e=f("div"),t=f("h2"),t.textContent=`${m("settings.plugins")}`,n=_(),i=f("p"),i.textContent=`${m("settings.noPlugins")}`,o=_(),a=f("button"),a.textContent=`${m("settings.openPluginsDir")}`,s(t,"class","svelte-8jch95"),s(i,"class","section-desc svelte-8jch95"),s(a,"class","btn"),s(e,"class","settings-section svelte-8jch95")},m(p,b){S(p,e,b),r(e,t),r(e,n),r(e,i),r(e,o),r(e,a),u||(c=A(a,"click",hp),u=!0)},p:$,i:$,o:$,d(p){p&&C(e),u=!1,c()}}}function vp(l,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[l];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails error:",l,t)}return Promise.reject(new Error("Wails not connected: "+l))}async function hp(){try{await vp("OpenPluginsFolder")}catch{}}class yp extends rt{constructor(e){super(),ot(this,e,null,_p,st,{})}}function kp(l){let e,t,n,i;return{c(){e=f("div"),t=f("h2"),t.textContent=`${m("settings.files")}`,n=_(),i=f("p"),i.textContent=`${m("settings.filesStub")}`,s(t,"class","svelte-19bo7bn"),s(i,"class","section-desc svelte-19bo7bn"),s(e,"class","settings-section svelte-19bo7bn")},m(o,a){S(o,e,a),r(e,t),r(e,n),r(e,i)},p:$,i:$,o:$,d(o){o&&C(e)}}}class wp extends rt{constructor(e){super(),ot(this,e,null,kp,st,{})}}function Cp(l){let e,t,n,i;return{c(){e=f("div"),t=f("h2"),t.textContent=`${m("settings.activity")}`,n=_(),i=f("p"),i.textContent=`${m("settings.activityStub")}`,s(t,"class","svelte-19bo7bn"),s(i,"class","section-desc svelte-19bo7bn"),s(e,"class","settings-section svelte-19bo7bn")},m(o,a){S(o,e,a),r(e,t),r(e,n),r(e,i)},p:$,i:$,o:$,d(o){o&&C(e)}}}class Sp extends rt{constructor(e){super(),ot(this,e,null,Cp,st,{})}}function ss(l){let e,t;return{c(){e=f("div"),t=F(l[2]),s(e,"class","error-msg svelte-1fx1e1e")},m(n,i){S(n,e,i),r(e,t)},p(n,i){i[0]&4&&U(t,n[2])},d(n){n&&C(e)}}}function os(l){let e,t;return{c(){e=f("div"),t=F(l[3]),s(e,"class","result-msg svelte-1fx1e1e"),ve(e,"warning",l[4]==="warning")},m(n,i){S(n,e,i),r(e,t)},p(n,i){i[0]&8&&U(t,n[3]),i[0]&16&&ve(e,"warning",n[4]==="warning")},d(n){n&&C(e)}}}function Tp(l){let e,t,n,i,o,a,u,c,p,b,g,v,h,y,k,w,j,T,M,N,D,L,E=m("settings.checkConnection")+"",z,R,V,K,G=m("common.connect")+"",J,H,q,Y,P,W=l[11]!==null&&rs(l);return{c(){e=f("div"),t=f("div"),n=f("div"),i=f("label"),o=f("span"),o.textContent=`${m("settings.serverUrl")}`,a=_(),u=f("input"),c=_(),p=f("div"),b=f("label"),g=f("span"),g.textContent=`${m("sync.username")}`,v=_(),h=f("input"),y=_(),k=f("div"),w=f("label"),j=f("span"),j.textContent=`${m("sync.password")}`,T=_(),M=f("input"),N=_(),D=f("div"),L=f("button"),z=F(E),V=_(),K=f("button"),J=F(G),q=_(),W&&W.c(),s(o,"class","label-text"),s(u,"type","text"),s(u,"placeholder","https://example.com"),s(n,"class","form-group svelte-1fx1e1e"),s(g,"class","label-text"),s(h,"type","text"),s(p,"class","form-group svelte-1fx1e1e"),s(j,"class","label-text"),s(M,"type","password"),s(k,"class","form-group svelte-1fx1e1e"),s(L,"class","btn"),L.disabled=R=l[1]||!l[5],s(K,"class","btn btn-primary"),K.disabled=H=l[1]||!l[5]||!l[6]||!l[7],s(D,"class","sync-setup-actions svelte-1fx1e1e"),s(t,"class","sync-setup svelte-1fx1e1e"),s(e,"class","settings-card svelte-1fx1e1e")},m(O,B){S(O,e,B),r(e,t),r(t,n),r(n,i),r(i,o),r(i,a),r(i,u),_e(u,l[5]),r(t,c),r(t,p),r(p,b),r(b,g),r(b,v),r(b,h),_e(h,l[6]),r(t,y),r(t,k),r(k,w),r(w,j),r(w,T),r(w,M),_e(M,l[7]),r(t,N),r(t,D),r(D,L),r(L,z),r(D,V),r(D,K),r(K,J),r(t,q),W&&W.m(t,null),Y||(P=[A(u,"input",l[23]),A(h,"input",l[24]),A(M,"input",l[25]),A(L,"click",l[12]),A(K,"click",l[13])],Y=!0)},p(O,B){B[0]&32&&u.value!==O[5]&&_e(u,O[5]),B[0]&64&&h.value!==O[6]&&_e(h,O[6]),B[0]&128&&M.value!==O[7]&&_e(M,O[7]),B[0]&34&&R!==(R=O[1]||!O[5])&&(L.disabled=R),B[0]&226&&H!==(H=O[1]||!O[5]||!O[6]||!O[7])&&(K.disabled=H),O[11]!==null?W?W.p(O,B):(W=rs(O),W.c(),W.m(t,null)):W&&(W.d(1),W=null)},d(O){O&&C(e),W&&W.d(),Y=!1,pe(P)}}}function jp(l){let e,t,n,i,o,a,u=l[20](l[0].lastStatus)+"",c,p,b,g,v,h,y,k,w,j=m("settings.syncNow")+"",T,M,N,D=m("settings.disconnect")+"",L,E,z,R=m("settings.resetKey")+"",V,K,G,J,H,q,Y,P,W,O,B,oe,ie=l[0].serverUrl&&as(l),ee=l[0].deviceName&&cs(l),Z=l[0].deviceId&&us(l),ne=l[0].lastSyncAt&&fs(l),re=l[0].lastError&&ds(l);return{c(){e=f("div"),t=f("div"),n=f("div"),i=f("span"),i.textContent=`${m("settings.status")}`,o=_(),a=f("span"),c=F(u),p=_(),ie&&ie.c(),b=_(),ee&&ee.c(),g=_(),Z&&Z.c(),v=_(),ne&&ne.c(),h=_(),re&&re.c(),y=_(),k=f("div"),w=f("button"),T=F(j),M=_(),N=f("button"),L=F(D),E=_(),z=f("button"),V=F(R),K=_(),G=f("div"),J=f("label"),H=f("span"),H.textContent=`${m("sync.interval")}`,q=_(),Y=f("div"),P=f("input"),W=_(),O=f("button"),O.textContent=`${m("common.save")}`,s(i,"class","info-label svelte-1fx1e1e"),s(a,"class","info-value svelte-1fx1e1e"),ve(a,"status-ok",l[0].lastStatus==="connected"),ve(a,"status-err",l[0].lastStatus==="error"||l[0].lastStatus==="revoked"),s(n,"class","info-row svelte-1fx1e1e"),s(t,"class","sync-info svelte-1fx1e1e"),s(e,"class","settings-card svelte-1fx1e1e"),s(w,"class","btn btn-primary"),w.disabled=l[1],s(N,"class","btn"),N.disabled=l[1],s(z,"class","btn"),z.disabled=l[1],s(k,"class","sync-actions svelte-1fx1e1e"),s(H,"class","label-text"),s(P,"type","number"),s(P,"min","0"),s(P,"placeholder","0"),s(P,"class","svelte-1fx1e1e"),s(O,"class","btn btn-sm"),s(Y,"class","interval-row svelte-1fx1e1e"),s(G,"class","sync-interval svelte-1fx1e1e")},m(fe,he){S(fe,e,he),r(e,t),r(t,n),r(n,i),r(n,o),r(n,a),r(a,c),r(t,p),ie&&ie.m(t,null),r(t,b),ee&&ee.m(t,null),r(t,g),Z&&Z.m(t,null),r(t,v),ne&&ne.m(t,null),r(t,h),re&&re.m(t,null),S(fe,y,he),S(fe,k,he),r(k,w),r(w,T),r(k,M),r(k,N),r(N,L),r(k,E),r(k,z),r(z,V),S(fe,K,he),S(fe,G,he),r(G,J),r(J,H),r(J,q),r(J,Y),r(Y,P),_e(P,l[8]),r(Y,W),r(Y,O),B||(oe=[A(w,"click",l[14]),A(N,"click",l[16]),A(z,"click",l[18]),A(P,"input",l[22]),A(O,"click",l[15])],B=!0)},p(fe,he){he[0]&1&&u!==(u=fe[20](fe[0].lastStatus)+"")&&U(c,u),he[0]&1&&ve(a,"status-ok",fe[0].lastStatus==="connected"),he[0]&1&&ve(a,"status-err",fe[0].lastStatus==="error"||fe[0].lastStatus==="revoked"),fe[0].serverUrl?ie?ie.p(fe,he):(ie=as(fe),ie.c(),ie.m(t,b)):ie&&(ie.d(1),ie=null),fe[0].deviceName?ee?ee.p(fe,he):(ee=cs(fe),ee.c(),ee.m(t,g)):ee&&(ee.d(1),ee=null),fe[0].deviceId?Z?Z.p(fe,he):(Z=us(fe),Z.c(),Z.m(t,v)):Z&&(Z.d(1),Z=null),fe[0].lastSyncAt?ne?ne.p(fe,he):(ne=fs(fe),ne.c(),ne.m(t,h)):ne&&(ne.d(1),ne=null),fe[0].lastError?re?re.p(fe,he):(re=ds(fe),re.c(),re.m(t,null)):re&&(re.d(1),re=null),he[0]&2&&(w.disabled=fe[1]),he[0]&2&&(N.disabled=fe[1]),he[0]&2&&(z.disabled=fe[1]),he[0]&256&&Ol(P.value)!==fe[8]&&_e(P,fe[8])},d(fe){fe&&(C(e),C(y),C(k),C(K),C(G)),ie&&ie.d(),ee&&ee.d(),Z&&Z.d(),ne&&ne.d(),re&&re.d(),B=!1,pe(oe)}}}function rs(l){let e,t=(l[11]?m("common.test")+" OK":m("error.generic"))+"",n;return{c(){e=f("div"),n=F(t),s(e,"class","connection-result svelte-1fx1e1e"),ve(e,"ok",l[11]),ve(e,"fail",!l[11])},m(i,o){S(i,e,o),r(e,n)},p(i,o){o[0]&2048&&t!==(t=(i[11]?m("common.test")+" OK":m("error.generic"))+"")&&U(n,t),o[0]&2048&&ve(e,"ok",i[11]),o[0]&2048&&ve(e,"fail",!i[11])},d(i){i&&C(e)}}}function as(l){let e,t,n,i,o=l[0].serverUrl+"",a;return{c(){e=f("div"),t=f("span"),t.textContent=`${m("settings.serverUrl")}`,n=_(),i=f("span"),a=F(o),s(t,"class","info-label svelte-1fx1e1e"),s(i,"class","info-value mono svelte-1fx1e1e"),s(e,"class","info-row svelte-1fx1e1e")},m(u,c){S(u,e,c),r(e,t),r(e,n),r(e,i),r(i,a)},p(u,c){c[0]&1&&o!==(o=u[0].serverUrl+"")&&U(a,o)},d(u){u&&C(e)}}}function cs(l){let e,t,n,i,o=l[0].deviceName+"",a;return{c(){e=f("div"),t=f("span"),t.textContent=`${m("settings.deviceName")}`,n=_(),i=f("span"),a=F(o),s(t,"class","info-label svelte-1fx1e1e"),s(i,"class","info-value svelte-1fx1e1e"),s(e,"class","info-row svelte-1fx1e1e")},m(u,c){S(u,e,c),r(e,t),r(e,n),r(e,i),r(i,a)},p(u,c){c[0]&1&&o!==(o=u[0].deviceName+"")&&U(a,o)},d(u){u&&C(e)}}}function us(l){let e,t,n,i,o=l[0].deviceId+"",a;return{c(){e=f("div"),t=f("span"),t.textContent=`${m("settings.deviceId")}`,n=_(),i=f("span"),a=F(o),s(t,"class","info-label svelte-1fx1e1e"),s(i,"class","info-value mono svelte-1fx1e1e"),s(e,"class","info-row svelte-1fx1e1e")},m(u,c){S(u,e,c),r(e,t),r(e,n),r(e,i),r(i,a)},p(u,c){c[0]&1&&o!==(o=u[0].deviceId+"")&&U(a,o)},d(u){u&&C(e)}}}function fs(l){let e,t,n,i,o=l[0].lastSyncAt+"",a;return{c(){e=f("div"),t=f("span"),t.textContent=`${m("settings.lastSync")}`,n=_(),i=f("span"),a=F(o),s(t,"class","info-label svelte-1fx1e1e"),s(i,"class","info-value svelte-1fx1e1e"),s(e,"class","info-row svelte-1fx1e1e")},m(u,c){S(u,e,c),r(e,t),r(e,n),r(e,i),r(i,a)},p(u,c){c[0]&1&&o!==(o=u[0].lastSyncAt+"")&&U(a,o)},d(u){u&&C(e)}}}function ds(l){let e,t,n,i,o=l[0].lastError+"",a;return{c(){e=f("div"),t=f("span"),t.textContent=`${m("settings.lastError")}`,n=_(),i=f("span"),a=F(o),s(t,"class","info-label svelte-1fx1e1e"),s(i,"class","info-value error svelte-1fx1e1e"),s(e,"class","info-row svelte-1fx1e1e")},m(u,c){S(u,e,c),r(e,t),r(e,n),r(e,i),r(i,a)},p(u,c){c[0]&1&&o!==(o=u[0].lastError+"")&&U(a,o)},d(u){u&&C(e)}}}function ps(l){let e,t,n,i,o,a,u,c,p,b,g,v;return{c(){e=f("button"),t=f("div"),n=f("h3"),n.textContent=`${m("settings.confirmDisconnect")}`,i=_(),o=f("p"),o.textContent=`${m("settings.confirmDisconnectDesc")}`,a=_(),u=f("div"),c=f("button"),c.textContent=`${m("common.disconnect")}`,p=_(),b=f("button"),b.textContent=`${m("common.cancel")}`,s(n,"class","svelte-1fx1e1e"),s(o,"class","modal-desc svelte-1fx1e1e"),s(c,"class","btn btn-danger"),s(b,"class","btn"),s(u,"class","modal-actions svelte-1fx1e1e"),s(t,"class","modal svelte-1fx1e1e"),s(e,"class","modal-overlay svelte-1fx1e1e")},m(h,y){S(h,e,y),r(e,t),r(t,n),r(t,i),r(t,o),r(t,a),r(t,u),r(u,c),r(u,p),r(u,b),g||(v=[A(c,"click",l[17]),A(b,"click",l[26]),A(e,"click",l[27])],g=!0)},p:$,d(h){h&&C(e),g=!1,pe(v)}}}function ms(l){let e,t,n,i,o,a,u,c,p,b,g,v;return{c(){e=f("button"),t=f("div"),n=f("h3"),n.textContent=`${m("settings.confirmResetKey")}`,i=_(),o=f("p"),o.textContent=`${m("settings.confirmResetKeyDesc")}`,a=_(),u=f("div"),c=f("button"),c.textContent=`${m("settings.resetKey")}`,p=_(),b=f("button"),b.textContent=`${m("common.cancel")}`,s(n,"class","svelte-1fx1e1e"),s(o,"class","modal-desc svelte-1fx1e1e"),s(c,"class","btn btn-danger"),s(b,"class","btn"),s(u,"class","modal-actions svelte-1fx1e1e"),s(t,"class","modal svelte-1fx1e1e"),s(e,"class","modal-overlay svelte-1fx1e1e")},m(h,y){S(h,e,y),r(e,t),r(t,n),r(t,i),r(t,o),r(t,a),r(t,u),r(u,c),r(u,p),r(u,b),g||(v=[A(c,"click",l[19]),A(b,"click",l[28]),A(e,"click",l[29])],g=!0)},p:$,d(h){h&&C(e),g=!1,pe(v)}}}function Ep(l){let e,t,n,i,o,a,u,c,p,b,g=l[2]&&ss(l),v=l[3]&&!l[2]&&os(l);function h(T,M){return T[0]&&T[0].enabled?jp:Tp}let y=h(l),k=y(l),w=l[9]&&ps(l),j=l[10]&&ms(l);return{c(){e=f("div"),t=f("h2"),t.textContent=`${m("settings.sync")}`,n=_(),i=f("p"),i.textContent=`${m("settings.syncDesc")}`,o=_(),g&&g.c(),a=_(),v&&v.c(),u=_(),k.c(),c=_(),w&&w.c(),p=_(),j&&j.c(),b=gt(),s(t,"class","svelte-1fx1e1e"),s(i,"class","section-desc svelte-1fx1e1e"),s(e,"class","settings-section svelte-1fx1e1e")},m(T,M){S(T,e,M),r(e,t),r(e,n),r(e,i),r(e,o),g&&g.m(e,null),r(e,a),v&&v.m(e,null),r(e,u),k.m(e,null),S(T,c,M),w&&w.m(T,M),S(T,p,M),j&&j.m(T,M),S(T,b,M)},p(T,M){T[2]?g?g.p(T,M):(g=ss(T),g.c(),g.m(e,a)):g&&(g.d(1),g=null),T[3]&&!T[2]?v?v.p(T,M):(v=os(T),v.c(),v.m(e,u)):v&&(v.d(1),v=null),y===(y=h(T))&&k?k.p(T,M):(k.d(1),k=y(T),k&&(k.c(),k.m(e,null))),T[9]?w?w.p(T,M):(w=ps(T),w.c(),w.m(p.parentNode,p)):w&&(w.d(1),w=null),T[10]?j?j.p(T,M):(j=ms(T),j.c(),j.m(b.parentNode,b)):j&&(j.d(1),j=null)},i:$,o:$,d(T){T&&(C(e),C(c),C(p),C(b)),g&&g.d(),v&&v.d(),k.d(),w&&w.d(T),j&&j.d(T)}}}function Bt(l,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[l];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails error:",l,t)}return Promise.reject(new Error("Wails not connected: "+l))}function Np(l,e,t){let{onRefresh:n=null}=e,i=null,o=!1,a="",u="",c="",p="",b="",g="",v=0,h=!1,y=!1,k=null;async function w(){try{t(0,i=await Bt("GetSyncSettings")),i&&(t(5,p=i.serverUrl||""),t(8,v=i.syncInterval||0))}catch{t(0,i=null)}}w();async function j(){t(1,o=!0),t(2,a=""),t(4,c=""),t(11,k=null);try{await Bt("SyncTestConnection",p,b,g),t(11,k=!0),t(3,u="connection ok")}catch(O){t(11,k=!1),t(3,u="connection failed: "+String(O))}t(1,o=!1)}async function T(){t(1,o=!0),t(2,a=""),t(4,c="");try{await Bt("SyncConfigure",p,b,g),t(3,u="configured"),t(6,b=""),t(7,g=""),await w(),n&&n()}catch(O){t(2,a=String(O))}t(1,o=!1)}function M(O){const B=Array.isArray(O==null?void 0:O.conflicts)?O.conflicts:[],oe=Array.isArray(O==null?void 0:O.applyErrors)?O.applyErrors:[],ie=[];return B.length>0&&ie.push(m("sync.conflictsCount",{count:B.length})),oe.length>0&&ie.push(m("sync.applyErrorsCount",{count:oe.length})),ie.join(" · ")}async function N(){t(1,o=!0),t(2,a=""),t(4,c="");try{const O=await Bt("SyncNow"),B=m("sync.pushedPulled",{pushed:(O==null?void 0:O.pushed)||0,pulled:(O==null?void 0:O.pulled)||0}),oe=M(O);t(3,u=oe?B+" · "+oe:B),t(4,c=oe?"warning":""),await w(),n&&n()}catch(O){t(2,a=String(O))}t(1,o=!1)}async function D(){try{await Bt("SyncSetInterval",v),t(3,u=m("sync.settingsSaved")),t(4,c="")}catch(O){t(2,a=String(O))}}function L(){t(9,h=!0)}async function E(){t(9,h=!1),t(1,o=!0),t(4,c="");try{await Bt("SyncDisconnect"),t(3,u="disconnected"),await w(),n&&n()}catch(O){t(2,a=String(O))}t(1,o=!1)}function z(){t(10,y=!0)}async function R(){t(10,y=!1),t(1,o=!0),t(4,c="");try{await Bt("ResetSyncKey"),t(3,u="key reset"),await w(),n&&n()}catch(O){t(2,a=String(O))}t(1,o=!1)}function V(O){return O?{connected:m("settings.connected"),disconnected:m("settings.disconnected"),disabled:m("settings.notConfigured"),error:m("settings.error"),revoked:m("settings.revoked")}[O]||O:m("settings.notConfigured")}function K(){v=Ol(this.value),t(8,v)}function G(){p=this.value,t(5,p)}function J(){b=this.value,t(6,b)}function H(){g=this.value,t(7,g)}const q=()=>t(9,h=!1),Y=()=>t(9,h=!1),P=()=>t(10,y=!1),W=()=>t(10,y=!1);return l.$$set=O=>{"onRefresh"in O&&t(21,n=O.onRefresh)},[i,o,a,u,c,p,b,g,v,h,y,k,j,T,N,D,L,E,z,R,V,n,K,G,J,H,q,Y,P,W]}class Dp extends rt{constructor(e){super(),ot(this,e,Np,Ep,st,{onRefresh:21},null,[-1,-1])}}function Mp(l){let e,t,n,i;return{c(){e=f("div"),t=f("h2"),t.textContent=`${m("settings.backup")}`,n=_(),i=f("p"),i.textContent=`${m("settings.backupStub")}`,s(t,"class","svelte-19bo7bn"),s(i,"class","section-desc svelte-19bo7bn"),s(e,"class","settings-section svelte-19bo7bn")},m(o,a){S(o,e,a),r(e,t),r(e,n),r(e,i)},p:$,i:$,o:$,d(o){o&&C(e)}}}class Ip extends rt{constructor(e){super(),ot(this,e,null,Mp,st,{})}}const{window:Ap}=Sn;function Pp(l){let e,t;return e=new Ip({}),{c(){Qe(e.$$.fragment)},m(n,i){qe(e,n,i),t=!0},p:$,i(n){t||(ue(e.$$.fragment,n),t=!0)},o(n){me(e.$$.fragment,n),t=!1},d(n){Ye(e,n)}}}function Lp(l){let e,t;return e=new Dp({props:{onRefresh:l[6]}}),{c(){Qe(e.$$.fragment)},m(n,i){qe(e,n,i),t=!0},p:$,i(n){t||(ue(e.$$.fragment,n),t=!0)},o(n){me(e.$$.fragment,n),t=!1},d(n){Ye(e,n)}}}function Fp(l){let e,t;return e=new Sp({}),{c(){Qe(e.$$.fragment)},m(n,i){qe(e,n,i),t=!0},p:$,i(n){t||(ue(e.$$.fragment,n),t=!0)},o(n){me(e.$$.fragment,n),t=!1},d(n){Ye(e,n)}}}function Rp(l){let e,t;return e=new wp({}),{c(){Qe(e.$$.fragment)},m(n,i){qe(e,n,i),t=!0},p:$,i(n){t||(ue(e.$$.fragment,n),t=!0)},o(n){me(e.$$.fragment,n),t=!1},d(n){Ye(e,n)}}}function zp(l){let e,t;return e=new yp({}),{c(){Qe(e.$$.fragment)},m(n,i){qe(e,n,i),t=!0},p:$,i(n){t||(ue(e.$$.fragment,n),t=!0)},o(n){me(e.$$.fragment,n),t=!1},d(n){Ye(e,n)}}}function Op(l){let e,t;return e=new bp({props:{onRefresh:l[2]}}),{c(){Qe(e.$$.fragment)},m(n,i){qe(e,n,i),t=!0},p:$,i(n){t||(ue(e.$$.fragment,n),t=!0)},o(n){me(e.$$.fragment,n),t=!1},d(n){Ye(e,n)}}}function Vp(l){let e,t;return e=new up({props:{onRefresh:l[2]}}),{c(){Qe(e.$$.fragment)},m(n,i){qe(e,n,i),t=!0},p:$,i(n){t||(ue(e.$$.fragment,n),t=!0)},o(n){me(e.$$.fragment,n),t=!1},d(n){Ye(e,n)}}}function Wp(l){let e,t;return e=new sp({props:{appConfig:l[1],onSave:l[5]}}),{c(){Qe(e.$$.fragment)},m(n,i){qe(e,n,i),t=!0},p(n,i){const o={};i&2&&(o.appConfig=n[1]),e.$set(o)},i(n){t||(ue(e.$$.fragment,n),t=!0)},o(n){me(e.$$.fragment,n),t=!1},d(n){Ye(e,n)}}}function Hp(l){let e,t,n,i,o,a,u,c,p,b,g,v,h,y,k,w;p=new lp({props:{activeSection:l[0],onSelect:l[3]}});const j=[Wp,Vp,Op,zp,Rp,Fp,Lp,Pp],T=[];function M(N,D){return N[0]==="general"?0:N[0]==="workspace"?1:N[0]==="templates"?2:N[0]==="plugins"?3:N[0]==="files"?4:N[0]==="activity"?5:N[0]==="sync"?6:N[0]==="backup"?7:-1}return~(v=M(l))&&(h=T[v]=j[v](l)),{c(){e=f("button"),t=f("div"),n=f("div"),i=f("h2"),i.textContent=`${m("settings.title")}`,o=_(),a=f("button"),a.innerHTML='<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',u=_(),c=f("div"),Qe(p.$$.fragment),b=_(),g=f("div"),h&&h.c(),s(i,"class","svelte-zf2zsc"),s(a,"class","close-btn svelte-zf2zsc"),s(a,"title",m("settings.close")),s(n,"class","settings-header svelte-zf2zsc"),s(g,"class","settings-content svelte-zf2zsc"),s(c,"class","settings-body svelte-zf2zsc"),s(t,"class","settings-window svelte-zf2zsc"),s(e,"class","settings-overlay svelte-zf2zsc")},m(N,D){S(N,e,D),r(e,t),r(t,n),r(n,i),r(n,o),r(n,a),r(t,u),r(t,c),qe(p,c,null),r(c,b),r(c,g),~v&&T[v].m(g,null),y=!0,k||(w=[A(Ap,"keydown",l[7]),A(a,"click",l[4]),A(e,"click",kt(l[4]))],k=!0)},p(N,[D]){const L={};D&1&&(L.activeSection=N[0]),p.$set(L);let E=v;v=M(N),v===E?~v&&T[v].p(N,D):(h&&(pt(),me(T[E],1,1,()=>{T[E]=null}),mt()),~v?(h=T[v],h?h.p(N,D):(h=T[v]=j[v](N),h.c()),ue(h,1),h.m(g,null)):h=null)},i(N){y||(ue(p.$$.fragment,N),ue(h),y=!0)},o(N){me(p.$$.fragment,N),me(h),y=!1},d(N){N&&C(e),Ye(p),~v&&T[v].d(),k=!1,pe(w)}}}function gs(l,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[l];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails error:",l,t)}return Promise.reject(new Error("Wails not connected: "+l))}function Up(l,e,t){let{onClose:n=null}=e,{onSyncRefresh:i=null}=e,{initialSection:o="general"}=e,a=o,u=null;async function c(){try{t(1,u=await gs("GetAppConfig"))}catch{t(1,u=null)}}c();function p(y){t(0,a=y)}function b(){n&&n()}async function g(y){try{await gs("SaveAppConfig",y),t(1,u=y)}catch(k){console.error(k)}}function v(){i&&i()}function h(y){y.key==="Escape"&&b()}return l.$$set=y=>{"onClose"in y&&t(8,n=y.onClose),"onSyncRefresh"in y&&t(9,i=y.onSyncRefresh),"initialSection"in y&&t(10,o=y.initialSection)},[a,u,c,p,b,g,v,h,n,i,o]}class Bp extends rt{constructor(e){super(),ot(this,e,Up,Hp,st,{onClose:8,onSyncRefresh:9,initialSection:10})}}function Kp(l){let e,t,n,i,o,a,u,c;return{c(){e=f("div"),t=f("span"),n=_(),i=f("span"),i.textContent=`${m("sync.status.disabled")}`,o=_(),a=f("button"),a.textContent=`${m("sync.configure")}`,s(t,"class","sync-dot dot-disabled svelte-1rxbx0"),s(i,"class","sync-label svelte-1rxbx0"),s(a,"class","btn btn-xs svelte-1rxbx0"),s(e,"class","sync-status-row svelte-1rxbx0")},m(p,b){S(p,e,b),r(e,t),r(e,n),r(e,i),r(e,o),r(e,a),u||(c=A(a,"click",function(){Mt(l[5])&&l[5].apply(this,arguments)}),u=!0)},p(p,b){l=p},d(p){p&&C(e),u=!1,c()}}}function Gp(l){let e,t,n,i,o,a=l[7](l[0])+"",u,c,p,b,g,v=(l[1]?m("sync.running"):m("sync.run"))+"",h,y,k,w,j,T,M,N=l[0].unpushedOps>0&&bs(l),D=l[2]&&_s(l);return{c(){e=f("div"),t=f("span"),i=_(),o=f("span"),u=F(a),c=_(),N&&N.c(),p=_(),b=f("div"),g=f("button"),h=F(v),y=_(),k=f("button"),k.textContent=`${m("sync.details")}`,w=_(),D&&D.c(),j=gt(),s(t,"class",n="sync-dot "+l[6](l[0])+" svelte-1rxbx0"),s(o,"class","sync-label svelte-1rxbx0"),s(g,"class","btn btn-xs svelte-1rxbx0"),g.disabled=l[1],s(k,"class","btn btn-xs btn-link svelte-1rxbx0"),s(b,"class","sync-actions-row svelte-1rxbx0"),s(e,"class","sync-status-row svelte-1rxbx0")},m(L,E){S(L,e,E),r(e,t),r(e,i),r(e,o),r(o,u),r(e,c),N&&N.m(e,null),r(e,p),r(e,b),r(b,g),r(g,h),r(b,y),r(b,k),S(L,w,E),D&&D.m(L,E),S(L,j,E),T||(M=[A(g,"click",function(){Mt(l[4])&&l[4].apply(this,arguments)}),A(k,"click",function(){Mt(l[5])&&l[5].apply(this,arguments)})],T=!0)},p(L,E){l=L,E&1&&n!==(n="sync-dot "+l[6](l[0])+" svelte-1rxbx0")&&s(t,"class",n),E&1&&a!==(a=l[7](l[0])+"")&&U(u,a),l[0].unpushedOps>0?N?N.p(l,E):(N=bs(l),N.c(),N.m(e,p)):N&&(N.d(1),N=null),E&2&&v!==(v=(l[1]?m("sync.running"):m("sync.run"))+"")&&U(h,v),E&2&&(g.disabled=l[1]),l[2]?D?D.p(l,E):(D=_s(l),D.c(),D.m(j.parentNode,j)):D&&(D.d(1),D=null)},d(L){L&&(C(e),C(w),C(j)),N&&N.d(),D&&D.d(L),T=!1,pe(M)}}}function bs(l){let e,t=l[0].unpushedOps+"",n,i,o=m("sync.changes")+"",a;return{c(){e=f("span"),n=F(t),i=_(),a=F(o),s(e,"class","sync-count svelte-1rxbx0")},m(u,c){S(u,e,c),r(e,n),r(e,i),r(e,a)},p(u,c){c&1&&t!==(t=u[0].unpushedOps+"")&&U(n,t)},d(u){u&&C(e)}}}function _s(l){let e,t,n;return{c(){e=f("div"),t=F(l[2]),s(e,"class",n=Mi(l[3]==="warning"?"sync-message sync-message-warning":"sync-message")+" svelte-1rxbx0")},m(i,o){S(i,e,o),r(e,t)},p(i,o){o&4&&U(t,i[2]),o&8&&n!==(n=Mi(i[3]==="warning"?"sync-message sync-message-warning":"sync-message")+" svelte-1rxbx0")&&s(e,"class",n)},d(i){i&&C(e)}}}function Jp(l){let e;function t(o,a){var u;return(u=o[0])!=null&&u.configured?Gp:Kp}let n=t(l),i=n(l);return{c(){e=f("div"),i.c(),s(e,"class","sync-status-widget svelte-1rxbx0")},m(o,a){S(o,e,a),i.m(e,null)},p(o,[a]){n===(n=t(o))&&i?i.p(o,a):(i.d(1),i=n(o),i&&(i.c(),i.m(e,null)))},i:$,o:$,d(o){o&&C(e),i.d()}}}function qp(l,e,t){let{syncStatus:n=null}=e,{syncLoading:i=!1}=e,{syncMessage:o=""}=e,{syncMessageKind:a=""}=e,{onSync:u=null}=e,{onOpenSettings:c=null}=e;function p(g){return!g||!g.configured?"dot-disabled":i?"dot-syncing":g.revoked?"dot-disabled":g.connected?"dot-connected":g.configured?"dot-warning":"dot-disabled"}function b(g){return!g||!g.configured?m("sync.status.disabled"):i?m("sync.status.syncing"):g.revoked?m("sync.status.error"):g.connected?m("sync.status.connected"):m("sync.status.disconnected")}return l.$$set=g=>{"syncStatus"in g&&t(0,n=g.syncStatus),"syncLoading"in g&&t(1,i=g.syncLoading),"syncMessage"in g&&t(2,o=g.syncMessage),"syncMessageKind"in g&&t(3,a=g.syncMessageKind),"onSync"in g&&t(4,u=g.onSync),"onOpenSettings"in g&&t(5,c=g.onOpenSettings)},[n,i,o,a,u,c,p,b]}class Yp extends rt{constructor(e){super(),ot(this,e,qp,Jp,st,{syncStatus:0,syncLoading:1,syncMessage:2,syncMessageKind:3,onSync:4,onOpenSettings:5})}}const{Boolean:Ca}=Sn;function vs(l,e,t){const n=l.slice();return n[425]=e[t],n}function hs(l,e,t){const n=l.slice();return n[428]=e[t],n}function ys(l,e,t){const n=l.slice();return n[431]=e[t],n}function ks(l,e,t){const n=l.slice();return n[431]=e[t],n}function ws(l,e,t){const n=l.slice();return n[457]=e[t],n}function Cs(l,e,t){const n=l.slice();return n[457]=e[t],n}function Ss(l,e,t){const n=l.slice();return n[496]=e[t],n}function Ts(l,e,t){const n=l.slice();return n[457]=e[t],n}function js(l,e,t){const n=l.slice();return n[460]=e[t],n[501]=e,n[502]=t,n}function Es(l,e,t){const n=l.slice();return n[457]=e[t],n}function Ns(l,e,t){const n=l.slice();return n[478]=e[t],n}function Ds(l,e,t){const n=l.slice();return n[457]=e[t],n}function Ms(l,e,t){const n=l.slice();return n[483]=e[t],n}function Is(l,e,t){const n=l.slice();return n[483]=e[t],n}function As(l,e,t){const n=l.slice();return n[460]=e[t],n[488]=e,n[489]=t,n}function Ps(l,e,t){const n=l.slice();return n[457]=e[t],n}function Ls(l,e,t){const n=l.slice();return n[478]=e[t],n}function Fs(l,e,t){const n=l.slice();return n[472]=e[t],n}function Rs(l,e,t){const n=l.slice();return n[475]=e[t],n}function zs(l,e,t){const n=l.slice();return n[444]=e[t],n}function Os(l,e,t){const n=l.slice();return n[457]=e[t],n}function Vs(l,e,t){const n=l.slice();return n[436]=e[t],n}function Ws(l,e,t){const n=l.slice();return n[457]=e[t],n}function Hs(l,e,t){const n=l.slice();return n[460]=e[t],n[461]=e,n[462]=t,n}function Us(l,e,t){const n=l.slice();return n[457]=e[t],n}function Bs(l,e,t){const n=l.slice();return n[452]=e[t],n}function Ks(l,e,t){const n=l.slice();return n[449]=e[t],n}function Gs(l,e,t){const n=l.slice();return n[444]=e[t],n}function Js(l,e,t){const n=l.slice();return n[444]=e[t],n}function qs(l,e,t){const n=l.slice();return n[439]=e[t],n}function Ys(l,e,t){const n=l.slice();return n[436]=e[t],n}function Qs(l,e,t){const n=l.slice();return n[439]=e[t],n}function Xs(l,e,t){const n=l.slice();return n[467]=e[t],n}function Zs(l,e,t){const n=l.slice();return n[507]=e[t],n}function xs(l,e,t){const n=l.slice();return n[510]=e[t],n}function Qp(l){let e,t,n,i,o,a,u,c,p,b,g,v,h,y,k,w,j,T,M,N,D,L,E,z,R,V,K,G,J,H,q,Y,P,W,O,B,oe,ie,ee,Z,ne,re,fe,he,Ke,Me,X,le,de,ye,ge,Ie,Ge,it,at,Ne=l[85]&&$s(l),ze=ae(l[4]),Te=[];for(let se=0;se<ze.length;se+=1)Te[se]=lo(xs(l,ze,se));const Ue=[$p,xp],Ae=[];function Pe(se,Ce){return se[5].length>0?0:1}D=Pe(l),L=Ae[D]=Ue[D](l),R=new Yp({props:{syncStatus:l[100],syncLoading:l[101],syncMessage:l[102],syncMessageKind:l[103],onSync:l[214],onOpenSettings:l[219]}});function Be(se,Ce){return se[26]?lm:se[25]?tm:em}let Le=Be(l),Ee=Le(l),Se=l[24]&&io(l);const Fe=[um,cm,am,rm,om,sm,im,nm],We=[];function et(se,Ce){return se[29]?0:se[26]?1:se[25]==="inbox"?2:se[25]==="trash"?3:se[25]==="journal"?4:se[25]==="today"&&se[7]?5:se[25]==="activity"?6:7}Z=et(l),ne=We[Z]=Fe[Z](l);let we=l[57]&&Lr(l),be=l[61].visible&&zr(l),ke=l[32]&&Hr(l),tt=l[64]&&Ur(l),Je=l[71]&&l[70]&&Kr(l),xe=l[92]&&Jr(l),He=l[95]&&Yr(l),Xe=l[48]&&xr(l),Ze=l[87]&&ea(l),lt=l[77]&&ta(l),$e=l[3]&&la(l);return{c(){e=f("div"),Ne&&Ne.c(),t=_(),n=f("aside"),i=f("div"),o=f("img"),u=_(),c=f("span"),c.textContent=`${m("nav.brand")}`,p=_(),b=f("nav"),g=f("div"),v=f("div"),v.textContent=`${m("nav.system")}`,h=_();for(let se=0;se<Te.length;se+=1)Te[se].c();y=_(),k=f("div"),w=f("div"),j=f("span"),j.textContent=`${m("nav.workspace")}`,T=_(),M=f("button"),M.textContent="+",N=_(),L.c(),E=_(),z=f("div"),Qe(R.$$.fragment),V=_(),K=f("div"),G=f("button"),G.innerHTML='<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1uygnbi"><circle cx="12" cy="12" r="3" class="svelte-1uygnbi"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" class="svelte-1uygnbi"></path></svg>',J=_(),H=f("span"),q=F(l[23]),Y=_(),P=f("main"),W=f("header"),O=f("div"),Ee.c(),B=_(),oe=f("div"),oe.innerHTML="",ie=_(),Se&&Se.c(),ee=_(),ne.c(),re=_(),we&&we.c(),fe=_(),be&&be.c(),he=_(),ke&&ke.c(),Ke=_(),tt&&tt.c(),Me=_(),Je&&Je.c(),X=_(),xe&&xe.c(),le=_(),He&&He.c(),de=_(),Xe&&Xe.c(),ye=_(),Ze&&Ze.c(),ge=_(),lt&<.c(),Ie=_(),$e&&$e.c(),s(o,"class","logo svelte-1uygnbi"),il(o.src,a="/assets/app-icons/icon_32x32.png")||s(o,"src",a),s(o,"width","20"),s(o,"height","20"),s(o,"alt",""),s(c,"class","brand-name svelte-1uygnbi"),s(i,"class","sidebar-brand svelte-1uygnbi"),s(v,"class","nav-label svelte-1uygnbi"),s(g,"class","nav-group svelte-1uygnbi"),s(j,"class","svelte-1uygnbi"),s(M,"class","nav-add-btn svelte-1uygnbi"),s(M,"title",m("common.create")),s(w,"class","nav-label-row svelte-1uygnbi"),s(k,"class","nav-group svelte-1uygnbi"),s(b,"class","sidebar-nav svelte-1uygnbi"),s(G,"class","sidebar-settings-btn svelte-1uygnbi"),s(G,"title",m("common.settings")),s(H,"class","version svelte-1uygnbi"),s(K,"class","sidebar-footer-row svelte-1uygnbi"),s(z,"class","sidebar-footer svelte-1uygnbi"),s(n,"class","sidebar svelte-1uygnbi"),s(O,"class","header-left svelte-1uygnbi"),s(oe,"class","header-right svelte-1uygnbi"),s(W,"class","header svelte-1uygnbi"),s(P,"class","main svelte-1uygnbi"),s(e,"class","app svelte-1uygnbi")},m(se,Ce){S(se,e,Ce),Ne&&Ne.m(e,null),r(e,t),r(e,n),r(n,i),r(i,o),r(i,u),r(i,c),r(n,p),r(n,b),r(b,g),r(g,v),r(g,h);for(let yt=0;yt<Te.length;yt+=1)Te[yt]&&Te[yt].m(g,null);r(b,y),r(b,k),r(k,w),r(w,j),r(w,T),r(w,M),r(k,N),Ae[D].m(k,null),r(n,E),r(n,z),qe(R,z,null),r(z,V),r(z,K),r(K,G),r(K,J),r(K,H),r(H,q),r(e,Y),r(e,P),r(P,W),r(W,O),Ee.m(O,null),r(W,B),r(W,oe),r(P,ie),Se&&Se.m(P,null),r(P,ee),We[Z].m(P,null),r(P,re),we&&we.m(P,null),r(P,fe),be&&be.m(P,null),r(P,he),ke&&ke.m(P,null),r(P,Ke),tt&&tt.m(P,null),r(P,Me),Je&&Je.m(P,null),r(P,X),xe&&xe.m(P,null),r(P,le),He&&He.m(P,null),r(P,de),Xe&&Xe.m(P,null),r(P,ye),Ze&&Ze.m(P,null),r(P,ge),lt&<.m(P,null),r(P,Ie),$e&&$e.m(P,null),Ge=!0,it||(at=[A(M,"click",l[134]),A(G,"click",l[220])],it=!0)},p(se,Ce){if(se[85]?Ne?Ne.p(se,Ce):(Ne=$s(se),Ne.c(),Ne.m(e,t)):Ne&&(Ne.d(1),Ne=null),Ce[0]&33554448|Ce[1]&8390656|Ce[3]&32768){ze=ae(se[4]);let Oe;for(Oe=0;Oe<ze.length;Oe+=1){const nt=xs(se,ze,Oe);Te[Oe]?Te[Oe].p(nt,Ce):(Te[Oe]=lo(nt),Te[Oe].c(),Te[Oe].m(g,null))}for(;Oe<Te.length;Oe+=1)Te[Oe].d(1);Te.length=ze.length}let yt=D;D=Pe(se),D===yt?Ae[D].p(se,Ce):(pt(),me(Ae[yt],1,1,()=>{Ae[yt]=null}),mt(),L=Ae[D],L?L.p(se,Ce):(L=Ae[D]=Ue[D](se),L.c()),ue(L,1),L.m(k,null));const bt={};Ce[3]&128&&(bt.syncStatus=se[100]),Ce[3]&256&&(bt.syncLoading=se[101]),Ce[3]&512&&(bt.syncMessage=se[102]),Ce[3]&1024&&(bt.syncMessageKind=se[103]),R.$set(bt),(!Ge||Ce[0]&8388608)&&U(q,se[23]),Le===(Le=Be(se))&&Ee?Ee.p(se,Ce):(Ee.d(1),Ee=Le(se),Ee&&(Ee.c(),Ee.m(O,null))),se[24]?Se?Se.p(se,Ce):(Se=io(se),Se.c(),Se.m(P,ee)):Se&&(Se.d(1),Se=null);let At=Z;Z=et(se),Z===At?We[Z].p(se,Ce):(pt(),me(We[At],1,1,()=>{We[At]=null}),mt(),ne=We[Z],ne?ne.p(se,Ce):(ne=We[Z]=Fe[Z](se),ne.c()),ue(ne,1),ne.m(P,re)),se[57]?we?(we.p(se,Ce),Ce[1]&67108864&&ue(we,1)):(we=Lr(se),we.c(),ue(we,1),we.m(P,fe)):we&&(pt(),me(we,1,1,()=>{we=null}),mt()),se[61].visible?be?(be.p(se,Ce),Ce[1]&1073741824&&ue(be,1)):(be=zr(se),be.c(),ue(be,1),be.m(P,he)):be&&(pt(),me(be,1,1,()=>{be=null}),mt()),se[32]?ke?ke.p(se,Ce):(ke=Hr(se),ke.c(),ke.m(P,Ke)):ke&&(ke.d(1),ke=null),se[64]?tt?tt.p(se,Ce):(tt=Ur(se),tt.c(),tt.m(P,Me)):tt&&(tt.d(1),tt=null),se[71]&&se[70]?Je?Je.p(se,Ce):(Je=Kr(se),Je.c(),Je.m(P,X)):Je&&(Je.d(1),Je=null),se[92]?xe?xe.p(se,Ce):(xe=Jr(se),xe.c(),xe.m(P,le)):xe&&(xe.d(1),xe=null),se[95]?He?He.p(se,Ce):(He=Yr(se),He.c(),He.m(P,de)):He&&(He.d(1),He=null),se[48]?Xe?Xe.p(se,Ce):(Xe=xr(se),Xe.c(),Xe.m(P,ye)):Xe&&(Xe.d(1),Xe=null),se[87]?Ze?(Ze.p(se,Ce),Ce[2]&33554432&&ue(Ze,1)):(Ze=ea(se),Ze.c(),ue(Ze,1),Ze.m(P,ge)):Ze&&(pt(),me(Ze,1,1,()=>{Ze=null}),mt()),se[77]?lt?(lt.p(se,Ce),Ce[2]&32768&&ue(lt,1)):(lt=ta(se),lt.c(),ue(lt,1),lt.m(P,Ie)):lt&&(pt(),me(lt,1,1,()=>{lt=null}),mt()),se[3]?$e?($e.p(se,Ce),Ce[0]&8&&ue($e,1)):($e=la(se),$e.c(),ue($e,1),$e.m(P,null)):$e&&(pt(),me($e,1,1,()=>{$e=null}),mt())},i(se){Ge||(ue(L),ue(R.$$.fragment,se),ue(ne),ue(we),ue(be),ue(Ze),ue(lt),ue($e),Ge=!0)},o(se){me(L),me(R.$$.fragment,se),me(ne),me(we),me(be),me(Ze),me(lt),me($e),Ge=!1},d(se){se&&C(e),Ne&&Ne.d(),De(Te,se),Ae[D].d(),Ye(R),Ee.d(),Se&&Se.d(),We[Z].d(),we&&we.d(),be&&be.d(),ke&&ke.d(),tt&&tt.d(),Je&&Je.d(),xe&&xe.d(),He&&He.d(),Xe&&Xe.d(),Ze&&Ze.d(),lt&<.d(),$e&&$e.d(),it=!1,pe(at)}}}function Xp(l){var n;let e,t;return e=new G1({props:{vaultPath:((n=l[0])==null?void 0:n.vaultPath)||"",onComplete:l[216]}}),{c(){Qe(e.$$.fragment)},m(i,o){qe(e,i,o),t=!0},p(i,o){var u;const a={};o[0]&1&&(a.vaultPath=((u=i[0])==null?void 0:u.vaultPath)||""),e.$set(a)},i(i){t||(ue(e.$$.fragment,i),t=!0)},o(i){me(e.$$.fragment,i),t=!1},d(i){Ye(e,i)}}}function Zp(l){let e,t;return e=new U1({props:{onComplete:l[215]}}),{c(){Qe(e.$$.fragment)},m(n,i){qe(e,n,i),t=!0},p:$,i(n){t||(ue(e.$$.fragment,n),t=!0)},o(n){me(e.$$.fragment,n),t=!1},d(n){Ye(e,n)}}}function $s(l){let e,t,n;return{c(){e=f("div"),t=f("div"),n=F(l[86]),s(t,"class","capture-drop-box svelte-1uygnbi"),s(e,"class","capture-drop-overlay svelte-1uygnbi")},m(i,o){S(i,e,o),r(e,t),r(t,n)},p(i,o){o[2]&16777216&&U(n,i[86])},d(i){i&&C(e)}}}function eo(l){let e,t;return{c(){e=f("span"),t=F(l[42]),s(e,"class","nav-badge svelte-1uygnbi")},m(n,i){S(n,e,i),r(e,t)},p(n,i){i[1]&2048&&U(t,n[42])},d(n){n&&C(e)}}}function to(l){let e,t;return{c(){e=f("span"),t=F(l[54]),s(e,"class","nav-badge svelte-1uygnbi")},m(n,i){S(n,e,i),r(e,t)},p(n,i){i[1]&8388608&&U(t,n[54])},d(n){n&&C(e)}}}function lo(l){let e,t=l[510].label+"",n,i,o,a,u,c,p,b=l[510].id==="journal"&&l[42]>0&&eo(l),g=l[510].id==="trash"&&l[54]>0&&to(l);function v(){return l[218](l[510])}return{c(){e=f("button"),n=F(t),i=_(),b&&b.c(),o=_(),g&&g.c(),a=_(),s(e,"class",u="nav-item "+(l[25]===l[510].id?"selected":"")+" svelte-1uygnbi")},m(h,y){S(h,e,y),r(e,n),r(e,i),b&&b.m(e,null),r(e,o),g&&g.m(e,null),r(e,a),c||(p=A(e,"click",v),c=!0)},p(h,y){l=h,y[0]&16&&t!==(t=l[510].label+"")&&U(n,t),l[510].id==="journal"&&l[42]>0?b?b.p(l,y):(b=eo(l),b.c(),b.m(e,o)):b&&(b.d(1),b=null),l[510].id==="trash"&&l[54]>0?g?g.p(l,y):(g=to(l),g.c(),g.m(e,a)):g&&(g.d(1),g=null),y[0]&33554448&&u!==(u="nav-item "+(l[25]===l[510].id?"selected":"")+" svelte-1uygnbi")&&s(e,"class",u)},d(h){h&&C(e),b&&b.d(),g&&g.d(),c=!1,p()}}}function xp(l){let e;return{c(){e=f("div"),e.textContent=`${m("nav.noNodes")}`,s(e,"class","nav-empty svelte-1uygnbi")},m(t,n){S(t,e,n)},p:$,i:$,o:$,d(t){t&&C(e)}}}function $p(l){var a;let e,t,n,i,o;return t=new wa({props:{nodes:l[5],expanded:l[72],selectedNodeId:((a=l[26])==null?void 0:a.id)||"",onSelect:l[109],onToggle:l[139],onContextMenu:l[137],onDrop:l[140]}}),{c(){e=f("div"),Qe(t.$$.fragment),s(e,"class","workspace-tree-area svelte-1uygnbi"),s(e,"role","region"),s(e,"aria-label",m("nav.workspace")),ve(e,"drop-valid",l[83])},m(u,c){S(u,e,c),qe(t,e,null),n=!0,i||(o=[A(e,"dragover",Tn(l[142])),A(e,"dragleave",l[143]),A(e,"drop",l[141])],i=!0)},p(u,c){var b;const p={};c[0]&32&&(p.nodes=u[5]),c[2]&1024&&(p.expanded=u[72]),c[0]&67108864&&(p.selectedNodeId=((b=u[26])==null?void 0:b.id)||""),t.$set(p),(!n||c[2]&2097152)&&ve(e,"drop-valid",u[83])},i(u){n||(ue(t.$$.fragment,u),n=!0)},o(u){me(t.$$.fragment,u),n=!1},d(u){u&&C(e),Ye(t),i=!1,pe(o)}}}function em(l){let e;return{c(){e=f("span"),e.textContent=`${m("nav.selectPrompt")}`,s(e,"class","crumb placeholder svelte-1uygnbi")},m(t,n){S(t,e,n)},p:$,d(t){t&&C(e)}}}function tm(l){let e,t=ae(l[4]),n=[];for(let i=0;i<t.length;i+=1)n[i]=no(Zs(l,t,i));return{c(){e=f("span");for(let i=0;i<n.length;i+=1)n[i].c();s(e,"class","crumb svelte-1uygnbi")},m(i,o){S(i,e,o);for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(e,null)},p(i,o){if(o[0]&33554448){t=ae(i[4]);let a;for(a=0;a<t.length;a+=1){const u=Zs(i,t,a);n[a]?n[a].p(u,o):(n[a]=no(u),n[a].c(),n[a].m(e,null))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},d(i){i&&C(e),De(n,i)}}}function lm(l){let e,t=l[26].title+"",n,i,o,a=l[184](l[26].type)+"",u;return{c(){e=f("span"),n=F(t),i=_(),o=f("span"),u=F(a),s(e,"class","crumb svelte-1uygnbi"),s(o,"class","crumb-type svelte-1uygnbi")},m(c,p){S(c,e,p),r(e,n),S(c,i,p),S(c,o,p),r(o,u)},p(c,p){p[0]&67108864&&t!==(t=c[26].title+"")&&U(n,t),p[0]&67108864&&a!==(a=c[184](c[26].type)+"")&&U(u,a)},d(c){c&&(C(e),C(i),C(o))}}}function no(l){let e=(l[507].id===l[25]?l[507].label:"")+"",t;return{c(){t=F(e)},m(n,i){S(n,t,i)},p(n,i){i[0]&33554448&&e!==(e=(n[507].id===n[25]?n[507].label:"")+"")&&U(t,e)},d(n){n&&C(t)}}}function io(l){let e,t=l[105](l[24])+"",n,i,o,a,u;return{c(){e=f("div"),n=F(t),i=_(),o=f("button"),o.innerHTML='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1uygnbi"><line x1="18" y1="6" x2="6" y2="18" class="svelte-1uygnbi"></line><line x1="6" y1="6" x2="18" y2="18" class="svelte-1uygnbi"></line></svg>',s(o,"class","dismiss-btn svelte-1uygnbi"),s(o,"aria-label","Dismiss"),s(e,"class","error-banner svelte-1uygnbi"),s(e,"role","button"),s(e,"tabindex","0")},m(c,p){S(c,e,p),r(e,n),r(e,i),r(e,o),a||(u=[A(o,"click",je(l[221])),A(e,"click",l[222]),A(e,"keydown",function(){Mt(vt(l[223]))&&vt(l[223]).apply(this,arguments)})],a=!0)},p(c,p){l=c,p[0]&16777216&&t!==(t=l[105](l[24])+"")&&U(n,t)},d(c){c&&C(e),a=!1,pe(u)}}}function nm(l){let e,t,n;function i(u,c){if(u[68])return pm;if(u[4].length>0)return dm;if(u[24])return fm}let o=i(l),a=o&&o(l);return{c(){e=f("div"),t=f("h2"),t.textContent=`${m("welcome.title")}`,n=_(),a&&a.c(),s(t,"class","svelte-1uygnbi"),s(e,"class","welcome svelte-1uygnbi")},m(u,c){S(u,e,c),r(e,t),r(e,n),a&&a.m(e,null)},p(u,c){o===(o=i(u))&&a?a.p(u,c):(a&&a.d(1),a=o&&o(u),a&&(a.c(),a.m(e,null)))},i:$,o:$,d(u){u&&C(e),a&&a.d()}}}function im(l){let e,t,n,i;function o(c,p){return c[8].length===0?gm:mm}let a=o(l),u=a(l);return{c(){e=f("div"),t=f("div"),n=f("h2"),n.textContent=`${m("activity.title")}`,i=_(),u.c(),s(n,"class","svelte-1uygnbi"),s(t,"class","activity-feed-header svelte-1uygnbi"),s(e,"class","activity-feed svelte-1uygnbi")},m(c,p){S(c,e,p),r(e,t),r(t,n),r(e,i),u.m(e,null)},p(c,p){a===(a=o(c))&&u?u.p(c,p):(u.d(1),u=a(c),u&&(u.c(),u.m(e,null)))},i:$,o:$,d(c){c&&C(e),u.d()}}}function sm(l){let e,t,n,i,o,a=l[7].date+"",u,c,p,b,g=l[7].summary&&ro(l),v=l[41].length>0&&fo(l);function h(w,j){return w[7].groups&&w[7].groups.length>0?_m:bm}let y=h(l),k=y(l);return{c(){e=f("div"),t=f("div"),n=f("h2"),n.textContent=`${m("today.title")}`,i=_(),o=f("span"),u=F(a),c=_(),g&&g.c(),p=_(),v&&v.c(),b=_(),k.c(),s(n,"class","svelte-1uygnbi"),s(o,"class","today-date svelte-1uygnbi"),s(t,"class","today-header svelte-1uygnbi"),s(e,"class","today-dashboard svelte-1uygnbi")},m(w,j){S(w,e,j),r(e,t),r(t,n),r(t,i),r(t,o),r(o,u),r(e,c),g&&g.m(e,null),r(e,p),v&&v.m(e,null),r(e,b),k.m(e,null)},p(w,j){j[0]&128&&a!==(a=w[7].date+"")&&U(u,a),w[7].summary?g?g.p(w,j):(g=ro(w),g.c(),g.m(e,p)):g&&(g.d(1),g=null),w[41].length>0?v?v.p(w,j):(v=fo(w),v.c(),v.m(e,b)):v&&(v.d(1),v=null),y===(y=h(w))&&k?k.p(w,j):(k.d(1),k=y(w),k&&(k.c(),k.m(e,null)))},i:$,o:$,d(w){w&&C(e),g&&g.d(),v&&v.d(),k.d()}}}function om(l){let e,t,n,i,o,a,u,c,p,b,g,v,h,y,k,w,j,T,M,N,D,L,E,z,R,V,K,G,J,H,q,Y,P,W,O,B,oe,ie,ee,Z,ne,re,fe,he,Ke,Me,X,le,de,ye,ge,Ie,Ge,it,at,Ne,ze,Te,Ue;function Ae(be,ke){return be[17]?km:ym}let Pe=Ae(l),Be=Pe(l),Le=l[14]&&jo(l),Ee=l[18]&&Eo(l),Se=l[41].length>0&&No(l),Fe=l[10]&&Lo(l);function We(be,ke){return be[9].length===0?Cm:wm}let et=We(l),we=et(l);return{c(){e=f("div"),t=f("div"),n=f("h2"),n.textContent=`${m("journal.title")}`,i=_(),o=f("div"),a=f("div"),a.textContent=`${m("journal.filterHeading")}`,u=_(),c=f("div"),p=f("label"),b=f("span"),b.textContent=`${m("journal.dateFrom")}`,g=_(),v=f("input"),h=_(),y=f("label"),k=f("span"),k.textContent=`${m("journal.dateTo")}`,w=_(),j=f("input"),T=_(),M=f("label"),N=f("span"),N.textContent=`${m("journal.node")}`,D=_(),L=f("div"),Be.c(),E=_(),Le&&Le.c(),z=_(),R=f("label"),V=f("span"),V.textContent=`${m("journal.billable")}`,K=_(),G=f("select"),J=f("option"),J.textContent=`${m("common.all")}`,H=f("option"),H.textContent=`${m("journal.billableYes")}`,q=f("option"),q.textContent=`${m("journal.billableNo")}`,Y=_(),P=f("label"),W=f("span"),W.textContent=`${m("journal.approx")}`,O=_(),B=f("select"),oe=f("option"),oe.textContent=`${m("common.all")}`,ie=f("option"),ie.textContent=`${m("journal.approxExact")}`,ee=f("option"),ee.textContent=`${m("journal.approxEstimated")}`,Z=_(),ne=f("button"),ne.textContent=`${m("journal.filter")}`,re=_(),fe=f("button"),fe.textContent=`${m("journal.reset")}`,he=_(),Ke=f("div"),Me=f("div"),Me.textContent=`${m("journal.exportHeading")}`,X=_(),le=f("div"),de=f("button"),de.textContent=`${m("journal.exportCSV")}`,ye=_(),ge=f("button"),ge.textContent=`${m("journal.exportMarkdown")}`,Ie=_(),Ge=f("button"),Ge.textContent="PDF",it=_(),Ee&&Ee.c(),at=_(),Se&&Se.c(),Ne=_(),Fe&&Fe.c(),ze=_(),we.c(),s(n,"class","svelte-1uygnbi"),s(a,"class","journal-filter-heading svelte-1uygnbi"),s(b,"class","label-text svelte-1uygnbi"),s(v,"type","date"),s(v,"class","svelte-1uygnbi"),s(p,"class","svelte-1uygnbi"),s(k,"class","label-text svelte-1uygnbi"),s(j,"type","date"),s(j,"class","svelte-1uygnbi"),s(y,"class","svelte-1uygnbi"),s(N,"class","label-text svelte-1uygnbi"),s(L,"class","journal-node-picker svelte-1uygnbi"),ht(L,"position","relative"),s(M,"class","svelte-1uygnbi"),s(V,"class","label-text svelte-1uygnbi"),J.__value="all",_e(J,J.__value),s(J,"class","svelte-1uygnbi"),H.__value="yes",_e(H,H.__value),s(H,"class","svelte-1uygnbi"),q.__value="no",_e(q,q.__value),s(q,"class","svelte-1uygnbi"),s(G,"class","svelte-1uygnbi"),l[15]===void 0&&Gt(()=>l[298].call(G)),s(R,"title",m("journal.billableHint")),s(R,"class","svelte-1uygnbi"),s(W,"class","label-text svelte-1uygnbi"),oe.__value="all",_e(oe,oe.__value),s(oe,"class","svelte-1uygnbi"),ie.__value="no",_e(ie,ie.__value),s(ie,"class","svelte-1uygnbi"),ee.__value="yes",_e(ee,ee.__value),s(ee,"class","svelte-1uygnbi"),s(B,"class","svelte-1uygnbi"),l[16]===void 0&&Gt(()=>l[299].call(B)),s(P,"title",m("journal.approxHint")),s(P,"class","svelte-1uygnbi"),s(ne,"class","btn btn-sm svelte-1uygnbi"),s(fe,"class","btn btn-sm svelte-1uygnbi"),s(c,"class","journal-filters-row svelte-1uygnbi"),s(o,"class","journal-filter-section svelte-1uygnbi"),s(Me,"class","journal-export-heading svelte-1uygnbi"),s(de,"class","btn btn-sm svelte-1uygnbi"),s(ge,"class","btn btn-sm svelte-1uygnbi"),s(Ge,"class","btn btn-sm svelte-1uygnbi"),s(le,"class","journal-export-row svelte-1uygnbi"),s(Ke,"class","journal-export-section svelte-1uygnbi"),s(t,"class","journal-header svelte-1uygnbi"),s(e,"class","journal-screen svelte-1uygnbi")},m(be,ke){S(be,e,ke),r(e,t),r(t,n),r(t,i),r(t,o),r(o,a),r(o,u),r(o,c),r(c,p),r(p,b),r(p,g),r(p,v),_e(v,l[11]),r(c,h),r(c,y),r(y,k),r(y,w),r(y,j),_e(j,l[12]),r(c,T),r(c,M),r(M,N),r(M,D),r(M,L),Be.m(L,null),r(c,E),Le&&Le.m(c,null),r(c,z),r(c,R),r(R,V),r(R,K),r(R,G),r(G,J),r(G,H),r(G,q),Dt(G,l[15],!0),r(c,Y),r(c,P),r(P,W),r(P,O),r(P,B),r(B,oe),r(B,ie),r(B,ee),Dt(B,l[16],!0),r(c,Z),r(c,ne),r(c,re),r(c,fe),r(t,he),r(t,Ke),r(Ke,Me),r(Ke,X),r(Ke,le),r(le,de),r(le,ye),r(le,ge),r(le,Ie),r(le,Ge),r(le,it),Ee&&Ee.m(le,null),r(e,at),Se&&Se.m(e,null),r(e,Ne),Fe&&Fe.m(e,null),r(e,ze),we.m(e,null),Te||(Ue=[A(v,"input",l[291]),A(j,"input",l[292]),A(G,"change",l[298]),A(B,"change",l[299]),A(ne,"click",l[170]),A(fe,"click",l[177]),A(de,"click",l[300]),A(ge,"click",l[301]),A(Ge,"click",l[302])],Te=!0)},p(be,ke){ke[0]&2048&&_e(v,be[11]),ke[0]&4096&&_e(j,be[12]),Pe===(Pe=Ae(be))&&Be?Be.p(be,ke):(Be.d(1),Be=Pe(be),Be&&(Be.c(),Be.m(L,null))),be[14]?Le?Le.p(be,ke):(Le=jo(be),Le.c(),Le.m(c,z)):Le&&(Le.d(1),Le=null),ke[0]&32768&&Dt(G,be[15]),ke[0]&65536&&Dt(B,be[16]),be[18]?Ee?Ee.p(be,ke):(Ee=Eo(be),Ee.c(),Ee.m(le,null)):Ee&&(Ee.d(1),Ee=null),be[41].length>0?Se?Se.p(be,ke):(Se=No(be),Se.c(),Se.m(e,Ne)):Se&&(Se.d(1),Se=null),be[10]?Fe?Fe.p(be,ke):(Fe=Lo(be),Fe.c(),Fe.m(e,ze)):Fe&&(Fe.d(1),Fe=null),et===(et=We(be))&&we?we.p(be,ke):(we.d(1),we=et(be),we&&(we.c(),we.m(e,null)))},i:$,o:$,d(be){be&&C(e),Be.d(),Le&&Le.d(),Ee&&Ee.d(),Se&&Se.d(),Fe&&Fe.d(),we.d(),Te=!1,pe(Ue)}}}function rm(l){var L;let e,t,n,i,o,a,u=(((L=l[53])==null?void 0:L.trashPath)||"")+"",c,p,b,g,v,h,y,k,w,j,T=l[55].length>0&&Jo(l);function M(E,z){return!E[53]||(E[53].nodes||[]).length===0&&(E[53].entries||[]).length===0?Im:Mm}let N=M(l),D=N(l);return{c(){e=f("div"),t=f("div"),n=f("div"),i=f("h2"),i.textContent=`${m("nav.trash")}`,o=_(),a=f("p"),c=F(u),p=_(),b=f("div"),T&&T.c(),g=_(),v=f("button"),v.textContent=`${m("trash.emptyTrash")}`,h=_(),y=f("button"),y.textContent=`${m("trash.openFolder")}`,k=_(),D.c(),s(i,"class","svelte-1uygnbi"),s(a,"class","svelte-1uygnbi"),s(n,"class","svelte-1uygnbi"),s(v,"class","btn btn-sm btn-danger svelte-1uygnbi"),s(y,"class","btn btn-sm svelte-1uygnbi"),s(b,"class","trash-actions svelte-1uygnbi"),s(t,"class","trash-header svelte-1uygnbi"),s(e,"class","trash-screen svelte-1uygnbi")},m(E,z){S(E,e,z),r(e,t),r(t,n),r(n,i),r(n,o),r(n,a),r(a,c),r(t,p),r(t,b),T&&T.m(b,null),r(b,g),r(b,v),r(b,h),r(b,y),r(e,k),D.m(e,null),w||(j=[A(v,"click",l[165]),A(y,"click",l[285])],w=!0)},p(E,z){var R;z[1]&4194304&&u!==(u=(((R=E[53])==null?void 0:R.trashPath)||"")+"")&&U(c,u),E[55].length>0?T?T.p(E,z):(T=Jo(E),T.c(),T.m(b,g)):T&&(T.d(1),T=null),N===(N=M(E))&&D?D.p(E,z):(D.d(1),D=N(E),D&&(D.c(),D.m(e,null)))},i:$,o:$,d(E){E&&C(e),T&&T.d(),D.d(),w=!1,pe(j)}}}function am(l){let e,t,n,i,o,a,u,c,p,b=(l[45]?m("common.loading"):m("inbox.pasteClipboard"))+"",g,v,h,y,k,w=l[46]&&Xo(l);function j(N,D){return N[43].length===0?Vm:Om}let T=j(l),M=T(l);return{c(){e=f("div"),t=f("div"),n=f("div"),i=f("h2"),i.textContent=`${m("nav.inbox")}`,o=_(),a=f("p"),a.textContent=`${m("inbox.subtitle")}`,u=_(),c=f("div"),p=f("button"),g=F(b),v=_(),w&&w.c(),h=_(),M.c(),s(i,"class","svelte-1uygnbi"),s(a,"class","svelte-1uygnbi"),s(n,"class","svelte-1uygnbi"),s(p,"class","btn btn-primary svelte-1uygnbi"),p.disabled=l[45],s(c,"class","inbox-header-actions svelte-1uygnbi"),s(t,"class","inbox-header svelte-1uygnbi"),s(e,"class","inbox-screen svelte-1uygnbi"),s(e,"role","region"),s(e,"aria-label",m("nav.inbox")),ve(e,"drop-valid",l[84])},m(N,D){S(N,e,D),r(e,t),r(t,n),r(n,i),r(n,o),r(n,a),r(t,u),r(t,c),r(c,p),r(p,g),r(c,v),w&&w.m(c,null),r(e,h),M.m(e,null),y||(k=[A(p,"click",l[186]),A(e,"dragover",l[187]),A(e,"dragleave",l[188]),A(e,"drop",l[189])],y=!0)},p(N,D){D[1]&16384&&b!==(b=(N[45]?m("common.loading"):m("inbox.pasteClipboard"))+"")&&U(g,b),D[1]&16384&&(p.disabled=N[45]),N[46]?w?w.p(N,D):(w=Xo(N),w.c(),w.m(c,null)):w&&(w.d(1),w=null),T===(T=j(N))&&M?M.p(N,D):(M.d(1),M=T(N),M&&(M.c(),M.m(e,null))),D[2]&4194304&&ve(e,"drop-valid",N[84])},i:$,o:$,d(N){N&&C(e),w&&w.d(),M.d(),y=!1,pe(k)}}}function cm(l){let e,t,n,i,o,a,u=ae(l[107]),c=[];for(let v=0;v<u.length;v+=1)c[v]=er(Xs(l,u,v));const p=[Ym,qm,Jm,Gm,Km,Bm,Um,Hm],b=[];function g(v,h){return v[27]==="overview"?0:v[27]==="notes"?1:v[27]==="files"?2:v[27]==="inbox"?3:v[27]==="links"?4:v[27]==="actions"?5:v[27]==="worklog"?6:v[27]==="activity"?7:-1}return~(i=g(l))&&(o=b[i]=p[i](l)),{c(){e=f("div");for(let v=0;v<c.length;v+=1)c[v].c();t=_(),n=f("div"),o&&o.c(),s(e,"class","tabs svelte-1uygnbi"),s(n,"class","tab-content svelte-1uygnbi")},m(v,h){S(v,e,h);for(let y=0;y<c.length;y+=1)c[y]&&c[y].m(e,null);S(v,t,h),S(v,n,h),~i&&b[i].m(n,null),a=!0},p(v,h){if(h[0]&201326592|h[2]&20480|h[3]&147456){u=ae(v[107]);let k;for(k=0;k<u.length;k+=1){const w=Xs(v,u,k);c[k]?c[k].p(w,h):(c[k]=er(w),c[k].c(),c[k].m(e,null))}for(;k<c.length;k+=1)c[k].d(1);c.length=u.length}let y=i;i=g(v),i===y?~i&&b[i].p(v,h):(o&&(pt(),me(b[y],1,1,()=>{b[y]=null}),mt()),~i?(o=b[i],o?o.p(v,h):(o=b[i]=p[i](v),o.c()),ue(o,1),o.m(n,null)):o=null)},i(v){a||(ue(o),a=!0)},o(v){me(o),a=!1},d(v){v&&(C(e),C(t),C(n)),De(c,v),~i&&b[i].d()}}}function um(l){let e,t,n,i=l[29].title+"",o,a,u,c,p,b,g,v,h,y,k,w=l[29].dirty&&Pr();return{c(){e=f("div"),t=f("div"),n=f("span"),o=F(i),a=_(),w&&w.c(),u=_(),c=f("div"),p=f("button"),p.textContent=`${m("common.save")}`,b=_(),g=f("button"),g.textContent=`${m("common.close")}`,v=_(),h=f("textarea"),s(n,"class","note-title svelte-1uygnbi"),s(p,"class","btn btn-primary svelte-1uygnbi"),s(g,"class","btn svelte-1uygnbi"),s(c,"class","note-editor-actions svelte-1uygnbi"),s(t,"class","note-editor-header svelte-1uygnbi"),s(h,"class","note-textarea svelte-1uygnbi"),s(h,"placeholder",m("note.placeholder")),s(e,"class","note-editor svelte-1uygnbi")},m(j,T){S(j,e,T),r(e,t),r(t,n),r(n,o),r(t,a),w&&w.m(t,null),r(t,u),r(t,c),r(c,p),r(c,b),r(c,g),r(e,v),r(e,h),_e(h,l[29].content),y||(k=[A(p,"click",l[155]),A(g,"click",l[153]),A(h,"input",l[224]),A(h,"input",l[154])],y=!0)},p(j,T){T[0]&536870912&&i!==(i=j[29].title+"")&&U(o,i),j[29].dirty?w||(w=Pr(),w.c(),w.m(t,u)):w&&(w.d(1),w=null),T[0]&536870912&&_e(h,j[29].content)},i:$,o:$,d(j){j&&C(e),w&&w.d(),y=!1,pe(k)}}}function fm(l){let e,t=m("common.error")+"",n,i,o;return{c(){e=f("p"),n=F(t),i=_(),o=F(l[24]),s(e,"class","error-text svelte-1uygnbi")},m(a,u){S(a,e,u),r(e,n),r(e,i),r(e,o)},p(a,u){u[0]&16777216&&U(o,a[24])},d(a){a&&C(e)}}}function dm(l){let e,t,n;return{c(){e=f("p"),e.textContent=`${m("welcome.selectSection")}`,t=_(),n=f("p"),n.textContent=`${m("welcome.createCase")}`,s(e,"class","svelte-1uygnbi"),s(n,"class","hint svelte-1uygnbi")},m(i,o){S(i,e,o),S(i,t,o),S(i,n,o)},p:$,d(i){i&&(C(e),C(t),C(n))}}}function pm(l){let e;return{c(){e=f("p"),e.textContent=`${m("common.loading")}`,s(e,"class","svelte-1uygnbi")},m(t,n){S(t,e,n)},p:$,d(t){t&&C(e)}}}function mm(l){let e,t=ae(l[8]),n=[];for(let i=0;i<t.length;i+=1)n[i]=oo(ws(l,t,i));return{c(){e=f("div");for(let i=0;i<n.length;i+=1)n[i].c();s(e,"class","activity-feed-events svelte-1uygnbi")},m(i,o){S(i,e,o);for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(e,null)},p(i,o){if(o[0]&256|o[5]&268435456|o[6]&16777216){t=ae(i[8]);let a;for(a=0;a<t.length;a+=1){const u=ws(i,t,a);n[a]?n[a].p(u,o):(n[a]=oo(u),n[a].c(),n[a].m(e,null))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},d(i){i&&C(e),De(n,i)}}}function gm(l){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${m("activity.empty")}`,s(t,"class","svelte-1uygnbi"),s(e,"class","empty-state svelte-1uygnbi")},m(n,i){S(n,e,i),r(e,t)},p:$,d(n){n&&C(e)}}}function so(l){let e,t=l[457].targetType+"",n;return{c(){e=f("span"),n=F(t),s(e,"class","activity-feed-target svelte-1uygnbi")},m(i,o){S(i,e,o),r(e,n)},p(i,o){o[0]&256&&t!==(t=i[457].targetType+"")&&U(n,t)},d(i){i&&C(e)}}}function oo(l){let e,t,n=sl(l[457].eventType)+"",i,o,a,u,c=l[457].title+"",p,b,g,v,h=l[183](l[457].eventType)+"",y,k,w,j,T=_t(l[457].createdAt)+"",M,N,D=ut(l[457].createdAt)+"",L,E,z,R,V=l[457].targetType&&so(l);function K(){return l[333](l[457])}function G(...J){return l[334](l[457],...J)}return{c(){e=f("div"),t=f("span"),i=F(n),o=_(),a=f("div"),u=f("span"),p=F(c),b=_(),g=f("div"),v=f("span"),y=F(h),k=_(),V&&V.c(),w=_(),j=f("span"),M=F(T),N=_(),L=F(D),E=_(),s(t,"class","activity-feed-icon svelte-1uygnbi"),s(u,"class","activity-feed-title svelte-1uygnbi"),s(v,"class","activity-feed-type svelte-1uygnbi"),s(j,"class","activity-feed-time svelte-1uygnbi"),s(g,"class","activity-feed-meta svelte-1uygnbi"),s(a,"class","activity-feed-body svelte-1uygnbi"),s(e,"class","activity-feed-event svelte-1uygnbi"),s(e,"role","button"),s(e,"tabindex","0")},m(J,H){S(J,e,H),r(e,t),r(t,i),r(e,o),r(e,a),r(a,u),r(u,p),r(a,b),r(a,g),r(g,v),r(v,y),r(g,k),V&&V.m(g,null),r(g,w),r(g,j),r(j,M),r(j,N),r(j,L),r(e,E),z||(R=[A(e,"click",K),A(e,"keydown",G)],z=!0)},p(J,H){l=J,H[0]&256&&n!==(n=sl(l[457].eventType)+"")&&U(i,n),H[0]&256&&c!==(c=l[457].title+"")&&U(p,c),H[0]&256&&h!==(h=l[183](l[457].eventType)+"")&&U(y,h),l[457].targetType?V?V.p(l,H):(V=so(l),V.c(),V.m(g,w)):V&&(V.d(1),V=null),H[0]&256&&T!==(T=_t(l[457].createdAt)+"")&&U(M,T),H[0]&256&&D!==(D=ut(l[457].createdAt)+"")&&U(L,D)},d(J){J&&C(e),V&&V.d(),z=!1,pe(R)}}}function ro(l){let e,t,n,i=l[7].summary.changedCases>0&&ao(l),o=l[7].summary.notes>0&&co(l),a=l[7].summary.files>0&&uo(l);return{c(){e=f("div"),i&&i.c(),t=_(),o&&o.c(),n=_(),a&&a.c(),s(e,"class","today-summary svelte-1uygnbi")},m(u,c){S(u,e,c),i&&i.m(e,null),r(e,t),o&&o.m(e,null),r(e,n),a&&a.m(e,null)},p(u,c){u[7].summary.changedCases>0?i?i.p(u,c):(i=ao(u),i.c(),i.m(e,t)):i&&(i.d(1),i=null),u[7].summary.notes>0?o?o.p(u,c):(o=co(u),o.c(),o.m(e,n)):o&&(o.d(1),o=null),u[7].summary.files>0?a?a.p(u,c):(a=uo(u),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(u){u&&C(e),i&&i.d(),o&&o.d(),a&&a.d()}}}function ao(l){let e,t=l[7].summary.changedCases+"",n,i,o=It(l[7].summary.changedCases,m("today.plural.case_one"),m("today.plural.case_few"),m("today.plural.case_many"))+"",a;return{c(){e=f("span"),n=F(t),i=_(),a=F(o),s(e,"class","summary-chip svelte-1uygnbi")},m(u,c){S(u,e,c),r(e,n),r(e,i),r(e,a)},p(u,c){c[0]&128&&t!==(t=u[7].summary.changedCases+"")&&U(n,t),c[0]&128&&o!==(o=It(u[7].summary.changedCases,m("today.plural.case_one"),m("today.plural.case_few"),m("today.plural.case_many"))+"")&&U(a,o)},d(u){u&&C(e)}}}function co(l){let e,t=l[7].summary.notes+"",n,i,o=It(l[7].summary.notes,m("today.plural.note_one"),m("today.plural.note_few"),m("today.plural.note_many"))+"",a;return{c(){e=f("span"),n=F(t),i=_(),a=F(o),s(e,"class","summary-chip svelte-1uygnbi")},m(u,c){S(u,e,c),r(e,n),r(e,i),r(e,a)},p(u,c){c[0]&128&&t!==(t=u[7].summary.notes+"")&&U(n,t),c[0]&128&&o!==(o=It(u[7].summary.notes,m("today.plural.note_one"),m("today.plural.note_few"),m("today.plural.note_many"))+"")&&U(a,o)},d(u){u&&C(e)}}}function uo(l){let e,t=l[7].summary.files+"",n,i,o=It(l[7].summary.files,m("today.plural.file_one"),m("today.plural.file_few"),m("today.plural.file_many"))+"",a;return{c(){e=f("span"),n=F(t),i=_(),a=F(o),s(e,"class","summary-chip svelte-1uygnbi")},m(u,c){S(u,e,c),r(e,n),r(e,i),r(e,a)},p(u,c){c[0]&128&&t!==(t=u[7].summary.files+"")&&U(n,t),c[0]&128&&o!==(o=It(u[7].summary.files,m("today.plural.file_one"),m("today.plural.file_few"),m("today.plural.file_many"))+"")&&U(a,o)},d(u){u&&C(e)}}}function fo(l){let e,t,n,i=ae(l[41]),o=[];for(let a=0;a<i.length;a+=1)o[a]=_o(js(l,i,a));return{c(){e=f("div"),t=f("div"),t.textContent=`${m("suggest.title")}`,n=_();for(let a=0;a<o.length;a+=1)o[a].c();s(t,"class","suggestions-title svelte-1uygnbi"),s(e,"class","today-suggestions svelte-1uygnbi")},m(a,u){S(a,e,u),r(e,t),r(e,n);for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(e,null)},p(a,u){if(u[1]&1024|u[4]&4194304|u[5]&268449792|u[6]&12582912){i=ae(a[41]);let c;for(c=0;c<i.length;c+=1){const p=js(a,i,c);o[c]?o[c].p(p,u):(o[c]=_o(p),o[c].c(),o[c].m(e,null))}for(;c<o.length;c+=1)o[c].d(1);o.length=i.length}},d(a){a&&C(e),De(o,a)}}}function po(l){let e,t,n,i=ae(l[460].events),o=[];for(let a=0;a<i.length;a+=1)o[a]=bo(Es(l,i,a));return{c(){e=f("div"),t=f("div"),t.textContent=`${m("suggest.detectedEvents")}`,n=_();for(let a=0;a<o.length;a+=1)o[a].c();s(t,"class","suggestion-detail-title svelte-1uygnbi"),s(e,"class","suggestion-detail svelte-1uygnbi")},m(a,u){S(a,e,u),r(e,t),r(e,n);for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(e,null)},p(a,u){if(u[1]&1024|u[4]&4194304|u[5]&268435456|u[6]&8388608){i=ae(a[460].events);let c;for(c=0;c<i.length;c+=1){const p=Es(a,i,c);o[c]?o[c].p(p,u):(o[c]=bo(p),o[c].c(),o[c].m(e,null))}for(;c<o.length;c+=1)o[c].d(1);o.length=i.length}},d(a){a&&C(e),De(o,a)}}}function mo(l){let e,t=l[457].nodePath+"",n;return{c(){e=f("span"),n=F(t),s(e,"class","suggestion-event-path svelte-1uygnbi")},m(i,o){S(i,e,o),r(e,n)},p(i,o){o[1]&1024&&t!==(t=i[457].nodePath+"")&&U(n,t)},d(i){i&&C(e)}}}function go(l){let e,t,n;function i(){return l[326](l[457])}return{c(){e=f("button"),e.textContent=`${m("file.showInExplorer")}`,s(e,"class","link-btn svelte-1uygnbi")},m(o,a){S(o,e,a),t||(n=A(e,"click",i),t=!0)},p(o,a){l=o},d(o){o&&C(e),t=!1,n()}}}function bo(l){let e,t,n=ut(l[457].createdAt)+"",i,o,a,u,c=l[183](l[457].eventType)+"",p,b,g,v=l[457].title+"",h,y,k,w,j=l[457].targetType==="file"||l[457].eventType.startsWith("file_"),T,M,N,D=l[457].nodePath&&mo(l);function L(){return l[325](l[457])}let E=j&&go(l);return{c(){e=f("div"),t=f("span"),i=F(n),o=_(),D&&D.c(),a=_(),u=f("span"),p=F(c),b=_(),g=f("span"),h=F(v),y=_(),k=f("button"),k.textContent=`${m("common.open")}`,w=_(),E&&E.c(),T=_(),s(t,"class","suggestion-event-time svelte-1uygnbi"),s(u,"class","suggestion-event-type svelte-1uygnbi"),s(g,"class","suggestion-event-title svelte-1uygnbi"),s(k,"class","link-btn svelte-1uygnbi"),s(e,"class","suggestion-detail-event svelte-1uygnbi")},m(z,R){S(z,e,R),r(e,t),r(t,i),r(e,o),D&&D.m(e,null),r(e,a),r(e,u),r(u,p),r(e,b),r(e,g),r(g,h),r(e,y),r(e,k),r(e,w),E&&E.m(e,null),r(e,T),M||(N=A(k,"click",L),M=!0)},p(z,R){l=z,R[1]&1024&&n!==(n=ut(l[457].createdAt)+"")&&U(i,n),l[457].nodePath?D?D.p(l,R):(D=mo(l),D.c(),D.m(e,a)):D&&(D.d(1),D=null),R[1]&1024&&c!==(c=l[183](l[457].eventType)+"")&&U(p,c),R[1]&1024&&v!==(v=l[457].title+"")&&U(h,v),R[1]&1024&&(j=l[457].targetType==="file"||l[457].eventType.startsWith("file_")),j?E?E.p(l,R):(E=go(l),E.c(),E.m(e,T)):E&&(E.d(1),E=null)},d(z){z&&C(e),D&&D.d(),E&&E.d(),M=!1,N()}}}function _o(l){let e,t,n,i,o=l[460].nodeTitle+"",a,u,c,p=l[460].summary+"",b,g,v,h=m("suggest.confidence."+l[460].confidence)+"",y,k,w,j,T,M,N,D,L,E,z,R,V,K,G,J,H;function q(){return l[318](l[460])}function Y(...ee){return l[319](l[460],l[501],l[502],...ee)}function P(){return l[320](l[460])}function W(){return l[321](l[460])}function O(){return l[322](l[460])}function B(){return l[323](l[460],l[501],l[502])}function oe(...ee){return l[324](l[460],l[501],l[502],...ee)}let ie=l[460].events&&l[460].events.length>0&&po(l);return{c(){e=f("div"),t=f("div"),n=f("div"),i=f("button"),a=F(o),u=_(),c=f("span"),b=F(p),g=_(),v=f("span"),y=F(h),k=_(),w=f("div"),j=f("input"),M=_(),N=f("span"),N.textContent=`${m("suggest.minutes")}`,D=_(),L=f("button"),L.textContent=`${m("suggest.edit")}`,E=_(),z=f("button"),z.textContent=`${m("suggest.apply")}`,R=_(),V=f("button"),V.textContent=`${m("common.delete")}`,K=_(),ie&&ie.c(),G=_(),s(i,"class","suggestion-node link-btn svelte-1uygnbi"),s(c,"class","suggestion-summary svelte-1uygnbi"),s(v,"class","suggestion-confidence svelte-1uygnbi"),ve(v,"low",l[460].confidence==="low"),ve(v,"medium",l[460].confidence==="medium"),ve(v,"high",l[460].confidence==="high"),s(n,"class","suggestion-info svelte-1uygnbi"),s(j,"type","number"),s(j,"class","suggestion-min-input svelte-1uygnbi"),j.value=T=l[460].suggestedMin,s(j,"min","1"),s(j,"max","480"),s(N,"class","suggestion-min-label svelte-1uygnbi"),s(L,"class","btn btn-sm svelte-1uygnbi"),s(z,"class","btn btn-sm btn-primary svelte-1uygnbi"),s(V,"class","btn btn-sm btn-danger svelte-1uygnbi"),s(w,"class","suggestion-actions svelte-1uygnbi"),s(t,"class","suggestion-main svelte-1uygnbi"),s(t,"role","button"),s(t,"tabindex","0"),s(e,"class","suggestion-card svelte-1uygnbi"),ve(e,"expanded",l[460]._expanded)},m(ee,Z){S(ee,e,Z),r(e,t),r(t,n),r(n,i),r(i,a),r(n,u),r(n,c),r(c,b),r(n,g),r(n,v),r(v,y),r(t,k),r(t,w),r(w,j),r(w,M),r(w,N),r(w,D),r(w,L),r(w,E),r(w,z),r(w,R),r(w,V),r(e,K),ie&&ie.m(e,null),r(e,G),J||(H=[A(i,"click",je(q)),A(j,"change",je(Y)),A(L,"click",je(P)),A(z,"click",je(W)),A(V,"click",je(O)),A(t,"click",B),A(t,"keydown",oe)],J=!0)},p(ee,Z){l=ee,Z[1]&1024&&o!==(o=l[460].nodeTitle+"")&&U(a,o),Z[1]&1024&&p!==(p=l[460].summary+"")&&U(b,p),Z[1]&1024&&h!==(h=m("suggest.confidence."+l[460].confidence)+"")&&U(y,h),Z[1]&1024&&ve(v,"low",l[460].confidence==="low"),Z[1]&1024&&ve(v,"medium",l[460].confidence==="medium"),Z[1]&1024&&ve(v,"high",l[460].confidence==="high"),Z[1]&1024&&T!==(T=l[460].suggestedMin)&&j.value!==T&&(j.value=T),l[460].events&&l[460].events.length>0?ie?ie.p(l,Z):(ie=po(l),ie.c(),ie.m(e,G)):ie&&(ie.d(1),ie=null),Z[1]&1024&&ve(e,"expanded",l[460]._expanded)},d(ee){ee&&C(e),ie&&ie.d(),J=!1,pe(H)}}}function bm(l){let e,t,n,i;return{c(){e=f("div"),t=f("p"),t.textContent=`${m("today.empty")}`,n=_(),i=f("p"),i.textContent=`${m("today.emptyHint")}`,s(t,"class","svelte-1uygnbi"),s(i,"class","hint svelte-1uygnbi"),s(e,"class","today-empty svelte-1uygnbi")},m(o,a){S(o,e,a),r(e,t),r(e,n),r(e,i)},p:$,d(o){o&&C(e)}}}function _m(l){let e,t,n=ae(l[7].groups),i=[];for(let a=0;a<n.length;a+=1)i[a]=ko(Ss(l,n,a));let o=l[7].events&&l[7].events.length>0&&wo(l);return{c(){for(let a=0;a<i.length;a+=1)i[a].c();e=_(),o&&o.c(),t=gt()},m(a,u){for(let c=0;c<i.length;c+=1)i[c]&&i[c].m(a,u);S(a,e,u),o&&o.m(a,u),S(a,t,u)},p(a,u){if(u[0]&128|u[5]&805306368|u[6]&4194304){n=ae(a[7].groups);let c;for(c=0;c<n.length;c+=1){const p=Ss(a,n,c);i[c]?i[c].p(p,u):(i[c]=ko(p),i[c].c(),i[c].m(e.parentNode,e))}for(;c<i.length;c+=1)i[c].d(1);i.length=n.length}a[7].events&&a[7].events.length>0?o?o.p(a,u):(o=wo(a),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null)},d(a){a&&(C(e),C(t)),De(i,a),o&&o.d(a)}}}function vo(l){let e,t=l[496].events.length+"",n,i,o=It(l[496].events.length,m("today.plural.event_one"),m("today.plural.event_few"),m("today.plural.event_many"))+"",a;return{c(){e=f("span"),n=F(t),i=_(),a=F(o),s(e,"class","today-case-count svelte-1uygnbi")},m(u,c){S(u,e,c),r(e,n),r(e,i),r(e,a)},p(u,c){c[0]&128&&t!==(t=u[496].events.length+"")&&U(n,t),c[0]&128&&o!==(o=It(u[496].events.length,m("today.plural.event_one"),m("today.plural.event_few"),m("today.plural.event_many"))+"")&&U(a,o)},d(u){u&&C(e)}}}function vm(l){let e;return{c(){e=f("div"),e.textContent=`${m("today.changedCases")}`,s(e,"class","today-events-empty svelte-1uygnbi")},m(t,n){S(t,e,n)},p:$,d(t){t&&C(e)}}}function hm(l){let e,t=ae(l[496].events),n=[];for(let i=0;i<t.length;i+=1)n[i]=yo(Ts(l,t,i));return{c(){e=f("div");for(let i=0;i<n.length;i+=1)n[i].c();s(e,"class","today-events svelte-1uygnbi")},m(i,o){S(i,e,o);for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(e,null)},p(i,o){if(o[0]&128|o[5]&268435456|o[6]&4194304){t=ae(i[496].events);let a;for(a=0;a<t.length;a+=1){const u=Ts(i,t,a);n[a]?n[a].p(u,o):(n[a]=yo(u),n[a].c(),n[a].m(e,null))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},d(i){i&&C(e),De(n,i)}}}function ho(l){let e,t=l[457].targetType+"",n;return{c(){e=f("span"),n=F(t),s(e,"class","activity-event-target svelte-1uygnbi")},m(i,o){S(i,e,o),r(e,n)},p(i,o){o[0]&128&&t!==(t=i[457].targetType+"")&&U(n,t)},d(i){i&&C(e)}}}function yo(l){let e,t,n=sl(l[457].eventType)+"",i,o,a,u=l[457].title+"",c,p,b,g=l[183](l[457].eventType)+"",v,h,y,k,w=ut(l[457].createdAt)+"",j,T,M,N=l[457].targetType&&ho(l);function D(){return l[329](l[496])}function L(...E){return l[330](l[496],...E)}return{c(){e=f("div"),t=f("span"),i=F(n),o=_(),a=f("span"),c=F(u),p=_(),b=f("span"),v=F(g),h=_(),N&&N.c(),y=_(),k=f("span"),j=F(w),s(t,"class","today-event-icon svelte-1uygnbi"),s(a,"class","today-event-title svelte-1uygnbi"),s(b,"class","today-event-type svelte-1uygnbi"),s(k,"class","today-event-time svelte-1uygnbi"),s(e,"class","today-event svelte-1uygnbi"),s(e,"role","button"),s(e,"tabindex","0")},m(E,z){S(E,e,z),r(e,t),r(t,i),r(e,o),r(e,a),r(a,c),r(e,p),r(e,b),r(b,v),r(e,h),N&&N.m(e,null),r(e,y),r(e,k),r(k,j),T||(M=[A(e,"click",D),A(e,"keydown",L)],T=!0)},p(E,z){l=E,z[0]&128&&n!==(n=sl(l[457].eventType)+"")&&U(i,n),z[0]&128&&u!==(u=l[457].title+"")&&U(c,u),z[0]&128&&g!==(g=l[183](l[457].eventType)+"")&&U(v,g),l[457].targetType?N?N.p(l,z):(N=ho(l),N.c(),N.m(e,y)):N&&(N.d(1),N=null),z[0]&128&&w!==(w=ut(l[457].createdAt)+"")&&U(j,w)},d(E){E&&C(e),N&&N.d(),T=!1,pe(M)}}}function ko(l){let e,t,n,i=l[496].nodeTitle+"",o,a,u,c=l[184](l[496].nodeKind)+"",p,b,g,v,h=ut(l[496].lastActivityAt)+"",y,k,w,j,T=l[496].events&&vo(l);function M(){return l[327](l[496])}function N(...z){return l[328](l[496],...z)}function D(z,R){return z[496].events&&z[496].events.length>0?hm:vm}let L=D(l),E=L(l);return{c(){e=f("div"),t=f("div"),n=f("span"),o=F(i),a=_(),u=f("span"),p=F(c),b=_(),T&&T.c(),g=_(),v=f("span"),y=F(h),k=_(),E.c(),s(n,"class","today-case-title svelte-1uygnbi"),s(u,"class","today-case-type svelte-1uygnbi"),s(v,"class","today-case-time svelte-1uygnbi"),s(t,"class","today-case-header svelte-1uygnbi"),s(t,"role","button"),s(t,"tabindex","0"),s(e,"class","today-case svelte-1uygnbi")},m(z,R){S(z,e,R),r(e,t),r(t,n),r(n,o),r(t,a),r(t,u),r(u,p),r(t,b),T&&T.m(t,null),r(t,g),r(t,v),r(v,y),r(e,k),E.m(e,null),w||(j=[A(t,"click",M),A(t,"keydown",N)],w=!0)},p(z,R){l=z,R[0]&128&&i!==(i=l[496].nodeTitle+"")&&U(o,i),R[0]&128&&c!==(c=l[184](l[496].nodeKind)+"")&&U(p,c),l[496].events?T?T.p(l,R):(T=vo(l),T.c(),T.m(t,g)):T&&(T.d(1),T=null),R[0]&128&&h!==(h=ut(l[496].lastActivityAt)+"")&&U(y,h),L===(L=D(l))&&E?E.p(l,R):(E.d(1),E=L(l),E&&(E.c(),E.m(e,null)))},d(z){z&&C(e),T&&T.d(),E.d(),w=!1,pe(j)}}}function wo(l){let e,t,n,i=ae(l[7].events),o=[];for(let a=0;a<i.length;a+=1)o[a]=Co(Cs(l,i,a));return{c(){e=f("div"),t=f("h3"),t.textContent=`${m("today.timeline")}`,n=_();for(let a=0;a<o.length;a+=1)o[a].c();s(t,"class","svelte-1uygnbi"),s(e,"class","today-timeline svelte-1uygnbi")},m(a,u){S(a,e,u),r(e,t),r(e,n);for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(e,null)},p(a,u){if(u[0]&128|u[5]&268435456|u[6]&16777216){i=ae(a[7].events);let c;for(c=0;c<i.length;c+=1){const p=Cs(a,i,c);o[c]?o[c].p(p,u):(o[c]=Co(p),o[c].c(),o[c].m(e,null))}for(;c<o.length;c+=1)o[c].d(1);o.length=i.length}},d(a){a&&C(e),De(o,a)}}}function Co(l){let e,t,n,i,o=l[457].title+"",a,u,c,p=l[183](l[457].eventType)+"",b,g,v,h=ut(l[457].createdAt)+"",y,k,w,j;function T(){return l[331](l[457])}function M(...N){return l[332](l[457],...N)}return{c(){e=f("div"),t=f("span"),n=_(),i=f("span"),a=F(o),u=_(),c=f("span"),b=F(p),g=_(),v=f("span"),y=F(h),k=_(),s(t,"class","timeline-dot svelte-1uygnbi"),s(i,"class","timeline-title svelte-1uygnbi"),s(c,"class","timeline-type svelte-1uygnbi"),s(v,"class","timeline-time svelte-1uygnbi"),s(e,"class","timeline-event svelte-1uygnbi"),s(e,"role","button"),s(e,"tabindex","0")},m(N,D){S(N,e,D),r(e,t),r(e,n),r(e,i),r(i,a),r(e,u),r(e,c),r(c,b),r(e,g),r(e,v),r(v,y),r(e,k),w||(j=[A(e,"click",T),A(e,"keydown",M)],w=!0)},p(N,D){l=N,D[0]&128&&o!==(o=l[457].title+"")&&U(a,o),D[0]&128&&p!==(p=l[183](l[457].eventType)+"")&&U(b,p),D[0]&128&&h!==(h=ut(l[457].createdAt)+"")&&U(y,h)},d(N){N&&C(e),w=!1,pe(j)}}}function ym(l){let e,t,n,i,o,a=l[21]&&So(l);return{c(){e=f("input"),t=_(),a&&a.c(),n=gt(),s(e,"type","text"),s(e,"placeholder",m("journal.nodeSearch")),s(e,"class","svelte-1uygnbi")},m(u,c){S(u,e,c),_e(e,l[19]),S(u,t,c),a&&a.m(u,c),S(u,n,c),i||(o=[A(e,"input",l[294]),A(e,"input",l[174]),A(e,"blur",l[295])],i=!0)},p(u,c){c[0]&524288&&e.value!==u[19]&&_e(e,u[19]),u[21]?a?a.p(u,c):(a=So(u),a.c(),a.m(n.parentNode,n)):a&&(a.d(1),a=null)},d(u){u&&(C(e),C(t),C(n)),a&&a.d(u),i=!1,pe(o)}}}function km(l){let e,t,n,i,o,a;return{c(){e=f("button"),t=F(l[17]),n=_(),i=f("span"),i.textContent="✕",s(i,"class","journal-node-clear svelte-1uygnbi"),s(e,"class","journal-selected-node svelte-1uygnbi")},m(u,c){S(u,e,c),r(e,t),r(e,n),r(e,i),o||(a=A(e,"click",l[293]),o=!0)},p(u,c){c[0]&131072&&U(t,u[17])},d(u){u&&C(e),o=!1,a()}}}function So(l){let e,t=ae(l[20]),n=[];for(let i=0;i<t.length;i+=1)n[i]=To(Ls(l,t,i));return{c(){e=f("div");for(let i=0;i<n.length;i+=1)n[i].c();s(e,"class","journal-search-dropdown svelte-1uygnbi")},m(i,o){S(i,e,o);for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(e,null)},p(i,o){if(o[0]&1048576|o[5]&1048576){t=ae(i[20]);let a;for(a=0;a<t.length;a+=1){const u=Ls(i,t,a);n[a]?n[a].p(u,o):(n[a]=To(u),n[a].c(),n[a].m(e,null))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},d(i){i&&C(e),De(n,i)}}}function To(l){let e,t,n=l[478].title+"",i,o,a,u=l[478].path+"",c,p,b,g;function v(){return l[296](l[478])}return{c(){e=f("button"),t=f("span"),i=F(n),o=_(),a=f("span"),c=F(u),p=_(),s(t,"class","journal-search-title svelte-1uygnbi"),s(a,"class","journal-search-path svelte-1uygnbi"),s(e,"class","journal-search-item svelte-1uygnbi")},m(h,y){S(h,e,y),r(e,t),r(t,i),r(e,o),r(e,a),r(a,c),r(e,p),b||(g=A(e,"click",v),b=!0)},p(h,y){l=h,y[0]&1048576&&n!==(n=l[478].title+"")&&U(i,n),y[0]&1048576&&u!==(u=l[478].path+"")&&U(c,u)},d(h){h&&C(e),b=!1,g()}}}function jo(l){let e,t,n,i,o,a;return{c(){e=f("label"),t=f("input"),n=_(),i=f("span"),i.textContent=`${m("journal.includeChildren")}`,s(t,"type","checkbox"),s(t,"class","journal-include-chk svelte-1uygnbi"),s(i,"class","svelte-1uygnbi"),s(e,"class","checkbox-label svelte-1uygnbi")},m(u,c){S(u,e,c),r(e,t),t.checked=l[13],r(e,n),r(e,i),o||(a=A(t,"change",l[297]),o=!0)},p(u,c){c[0]&8192&&(t.checked=u[13])},d(u){u&&C(e),o=!1,a()}}}function Eo(l){let e,t;return{c(){e=f("span"),t=F(l[18]),s(e,"class","journal-status-msg svelte-1uygnbi")},m(n,i){S(n,e,i),r(e,t)},p(n,i){i[0]&262144&&U(t,n[18])},d(n){n&&C(e)}}}function No(l){let e,t,n,i=ae(l[41]),o=[];for(let a=0;a<i.length;a+=1)o[a]=Po(As(l,i,a));return{c(){e=f("div"),t=f("div"),t.textContent=`${m("suggest.title")}`,n=_();for(let a=0;a<o.length;a+=1)o[a].c();s(t,"class","suggestions-title svelte-1uygnbi"),s(e,"class","journal-suggestions svelte-1uygnbi")},m(a,u){S(a,e,u),r(e,t),r(e,n);for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(e,null)},p(a,u){if(u[1]&1024|u[4]&4194304|u[5]&268457984|u[6]&12582912){i=ae(a[41]);let c;for(c=0;c<i.length;c+=1){const p=As(a,i,c);o[c]?o[c].p(p,u):(o[c]=Po(p),o[c].c(),o[c].m(e,null))}for(;c<o.length;c+=1)o[c].d(1);o.length=i.length}},d(a){a&&C(e),De(o,a)}}}function Do(l){let e,t,n,i=ae(l[460].events),o=[];for(let a=0;a<i.length;a+=1)o[a]=Ao(Ps(l,i,a));return{c(){e=f("div"),t=f("div"),t.textContent=`${m("suggest.detectedEvents")}`,n=_();for(let a=0;a<o.length;a+=1)o[a].c();s(t,"class","suggestion-detail-title svelte-1uygnbi"),s(e,"class","suggestion-detail svelte-1uygnbi")},m(a,u){S(a,e,u),r(e,t),r(e,n);for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(e,null)},p(a,u){if(u[1]&1024|u[4]&4194304|u[5]&268435456|u[6]&8388608){i=ae(a[460].events);let c;for(c=0;c<i.length;c+=1){const p=Ps(a,i,c);o[c]?o[c].p(p,u):(o[c]=Ao(p),o[c].c(),o[c].m(e,null))}for(;c<o.length;c+=1)o[c].d(1);o.length=i.length}},d(a){a&&C(e),De(o,a)}}}function Mo(l){let e,t=l[457].nodePath+"",n;return{c(){e=f("span"),n=F(t),s(e,"class","suggestion-event-path svelte-1uygnbi")},m(i,o){S(i,e,o),r(e,n)},p(i,o){o[1]&1024&&t!==(t=i[457].nodePath+"")&&U(n,t)},d(i){i&&C(e)}}}function Io(l){let e,t,n;function i(){return l[311](l[457])}return{c(){e=f("button"),e.textContent=`${m("file.showInExplorer")}`,s(e,"class","link-btn svelte-1uygnbi")},m(o,a){S(o,e,a),t||(n=A(e,"click",i),t=!0)},p(o,a){l=o},d(o){o&&C(e),t=!1,n()}}}function Ao(l){let e,t,n=ut(l[457].createdAt)+"",i,o,a,u,c=l[183](l[457].eventType)+"",p,b,g,v=l[457].title+"",h,y,k,w,j=l[457].targetType==="file"||l[457].eventType.startsWith("file_"),T,M,N,D=l[457].nodePath&&Mo(l);function L(){return l[310](l[457])}let E=j&&Io(l);return{c(){e=f("div"),t=f("span"),i=F(n),o=_(),D&&D.c(),a=_(),u=f("span"),p=F(c),b=_(),g=f("span"),h=F(v),y=_(),k=f("button"),k.textContent=`${m("common.open")}`,w=_(),E&&E.c(),T=_(),s(t,"class","suggestion-event-time svelte-1uygnbi"),s(u,"class","suggestion-event-type svelte-1uygnbi"),s(g,"class","suggestion-event-title svelte-1uygnbi"),s(k,"class","link-btn svelte-1uygnbi"),s(e,"class","suggestion-detail-event svelte-1uygnbi")},m(z,R){S(z,e,R),r(e,t),r(t,i),r(e,o),D&&D.m(e,null),r(e,a),r(e,u),r(u,p),r(e,b),r(e,g),r(g,h),r(e,y),r(e,k),r(e,w),E&&E.m(e,null),r(e,T),M||(N=A(k,"click",L),M=!0)},p(z,R){l=z,R[1]&1024&&n!==(n=ut(l[457].createdAt)+"")&&U(i,n),l[457].nodePath?D?D.p(l,R):(D=Mo(l),D.c(),D.m(e,a)):D&&(D.d(1),D=null),R[1]&1024&&c!==(c=l[183](l[457].eventType)+"")&&U(p,c),R[1]&1024&&v!==(v=l[457].title+"")&&U(h,v),R[1]&1024&&(j=l[457].targetType==="file"||l[457].eventType.startsWith("file_")),j?E?E.p(l,R):(E=Io(l),E.c(),E.m(e,T)):E&&(E.d(1),E=null)},d(z){z&&C(e),D&&D.d(),E&&E.d(),M=!1,N()}}}function Po(l){let e,t,n,i,o=l[460].nodeTitle+"",a,u,c,p=l[460].summary+"",b,g,v,h=m("suggest.confidence."+l[460].confidence)+"",y,k,w,j,T,M,N,D,L,E,z,R,V,K,G,J,H;function q(){return l[303](l[460])}function Y(...ee){return l[304](l[460],l[488],l[489],...ee)}function P(){return l[305](l[460])}function W(){return l[306](l[460])}function O(){return l[307](l[460])}function B(){return l[308](l[460],l[488],l[489])}function oe(...ee){return l[309](l[460],l[488],l[489],...ee)}let ie=l[460].events&&l[460].events.length>0&&Do(l);return{c(){e=f("div"),t=f("div"),n=f("div"),i=f("button"),a=F(o),u=_(),c=f("span"),b=F(p),g=_(),v=f("span"),y=F(h),k=_(),w=f("div"),j=f("input"),M=_(),N=f("span"),N.textContent=`${m("suggest.minutes")}`,D=_(),L=f("button"),L.textContent=`${m("suggest.edit")}`,E=_(),z=f("button"),z.textContent=`${m("suggest.apply")}`,R=_(),V=f("button"),V.textContent=`${m("common.delete")}`,K=_(),ie&&ie.c(),G=_(),s(i,"class","suggestion-node link-btn svelte-1uygnbi"),s(c,"class","suggestion-summary svelte-1uygnbi"),s(v,"class","suggestion-confidence svelte-1uygnbi"),ve(v,"low",l[460].confidence==="low"),ve(v,"medium",l[460].confidence==="medium"),ve(v,"high",l[460].confidence==="high"),s(n,"class","suggestion-info svelte-1uygnbi"),s(j,"type","number"),s(j,"class","suggestion-min-input svelte-1uygnbi"),j.value=T=l[460].suggestedMin,s(j,"min","1"),s(j,"max","480"),s(N,"class","suggestion-min-label svelte-1uygnbi"),s(L,"class","btn btn-sm svelte-1uygnbi"),s(z,"class","btn btn-sm btn-primary svelte-1uygnbi"),s(V,"class","btn btn-sm btn-danger svelte-1uygnbi"),s(w,"class","suggestion-actions svelte-1uygnbi"),s(t,"class","suggestion-main svelte-1uygnbi"),s(t,"role","button"),s(t,"tabindex","0"),s(e,"class","suggestion-card svelte-1uygnbi"),ve(e,"expanded",l[460]._expanded)},m(ee,Z){S(ee,e,Z),r(e,t),r(t,n),r(n,i),r(i,a),r(n,u),r(n,c),r(c,b),r(n,g),r(n,v),r(v,y),r(t,k),r(t,w),r(w,j),r(w,M),r(w,N),r(w,D),r(w,L),r(w,E),r(w,z),r(w,R),r(w,V),r(e,K),ie&&ie.m(e,null),r(e,G),J||(H=[A(i,"click",je(q)),A(j,"change",je(Y)),A(L,"click",je(P)),A(z,"click",je(W)),A(V,"click",je(O)),A(t,"click",B),A(t,"keydown",oe)],J=!0)},p(ee,Z){l=ee,Z[1]&1024&&o!==(o=l[460].nodeTitle+"")&&U(a,o),Z[1]&1024&&p!==(p=l[460].summary+"")&&U(b,p),Z[1]&1024&&h!==(h=m("suggest.confidence."+l[460].confidence)+"")&&U(y,h),Z[1]&1024&&ve(v,"low",l[460].confidence==="low"),Z[1]&1024&&ve(v,"medium",l[460].confidence==="medium"),Z[1]&1024&&ve(v,"high",l[460].confidence==="high"),Z[1]&1024&&T!==(T=l[460].suggestedMin)&&j.value!==T&&(j.value=T),l[460].events&&l[460].events.length>0?ie?ie.p(l,Z):(ie=Do(l),ie.c(),ie.m(e,G)):ie&&(ie.d(1),ie=null),Z[1]&1024&&ve(e,"expanded",l[460]._expanded)},d(ee){ee&&C(e),ie&&ie.d(),J=!1,pe(H)}}}function Lo(l){let e,t,n=m("journal.total")+"",i,o,a=Math.floor(l[10].totalMinutes/60)+"",u,c,p=l[10].totalMinutes%60+"",b,g,v=l[10].totalEntries+"",h,y,k=m("worklog.min")+"",w,j,T,M,N=l[10].byDay&&l[10].byDay.length>0&&Fo(l),D=l[10].byNode&&l[10].byNode.length>0&&zo(l);return{c(){e=f("div"),t=f("div"),i=F(n),o=F(": "),u=F(a),c=F("ч "),b=F(p),g=F("м ("),h=F(v),y=_(),w=F(k),j=F(")"),T=_(),N&&N.c(),M=_(),D&&D.c(),s(t,"class","summary-total svelte-1uygnbi"),s(e,"class","journal-summary svelte-1uygnbi")},m(L,E){S(L,e,E),r(e,t),r(t,i),r(t,o),r(t,u),r(t,c),r(t,b),r(t,g),r(t,h),r(t,y),r(t,w),r(t,j),r(e,T),N&&N.m(e,null),r(e,M),D&&D.m(e,null)},p(L,E){E[0]&1024&&a!==(a=Math.floor(L[10].totalMinutes/60)+"")&&U(u,a),E[0]&1024&&p!==(p=L[10].totalMinutes%60+"")&&U(b,p),E[0]&1024&&v!==(v=L[10].totalEntries+"")&&U(h,v),L[10].byDay&&L[10].byDay.length>0?N?N.p(L,E):(N=Fo(L),N.c(),N.m(e,M)):N&&(N.d(1),N=null),L[10].byNode&&L[10].byNode.length>0?D?D.p(L,E):(D=zo(L),D.c(),D.m(e,null)):D&&(D.d(1),D=null)},d(L){L&&C(e),N&&N.d(),D&&D.d()}}}function Fo(l){let e,t,n,i=ae(l[10].byDay),o=[];for(let a=0;a<i.length;a+=1)o[a]=Ro(Is(l,i,a));return{c(){e=f("div"),t=f("div"),t.textContent=`${m("journal.byDay")}`,n=_();for(let a=0;a<o.length;a+=1)o[a].c();s(t,"class","summary-label svelte-1uygnbi"),s(e,"class","summary-section svelte-1uygnbi")},m(a,u){S(a,e,u),r(e,t),r(e,n);for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(e,null)},p(a,u){if(u[0]&1024){i=ae(a[10].byDay);let c;for(c=0;c<i.length;c+=1){const p=Is(a,i,c);o[c]?o[c].p(p,u):(o[c]=Ro(p),o[c].c(),o[c].m(e,null))}for(;c<o.length;c+=1)o[c].d(1);o.length=i.length}},d(a){a&&C(e),De(o,a)}}}function Ro(l){let e,t,n=l[483].label+"",i,o,a=Math.floor(l[483].minutes/60)+"",u,c,p=l[483].minutes%60+"",b,g,v,h=l[483].count+"",y;return{c(){e=f("div"),t=f("span"),i=F(n),o=f("span"),u=F(a),c=F("ч "),b=F(p),g=F("м"),v=f("span"),y=F(h),s(t,"class","svelte-1uygnbi"),s(o,"class","svelte-1uygnbi"),s(v,"class","summary-count svelte-1uygnbi"),s(e,"class","summary-row svelte-1uygnbi")},m(k,w){S(k,e,w),r(e,t),r(t,i),r(e,o),r(o,u),r(o,c),r(o,b),r(o,g),r(e,v),r(v,y)},p(k,w){w[0]&1024&&n!==(n=k[483].label+"")&&U(i,n),w[0]&1024&&a!==(a=Math.floor(k[483].minutes/60)+"")&&U(u,a),w[0]&1024&&p!==(p=k[483].minutes%60+"")&&U(b,p),w[0]&1024&&h!==(h=k[483].count+"")&&U(y,h)},d(k){k&&C(e)}}}function zo(l){let e,t,n,i=ae(l[10].byNode),o=[];for(let a=0;a<i.length;a+=1)o[a]=Oo(Ms(l,i,a));return{c(){e=f("div"),t=f("div"),t.textContent=`${m("journal.byNode")}`,n=_();for(let a=0;a<o.length;a+=1)o[a].c();s(t,"class","summary-label svelte-1uygnbi"),s(e,"class","summary-section svelte-1uygnbi")},m(a,u){S(a,e,u),r(e,t),r(e,n);for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(e,null)},p(a,u){if(u[0]&1024){i=ae(a[10].byNode);let c;for(c=0;c<i.length;c+=1){const p=Ms(a,i,c);o[c]?o[c].p(p,u):(o[c]=Oo(p),o[c].c(),o[c].m(e,null))}for(;c<o.length;c+=1)o[c].d(1);o.length=i.length}},d(a){a&&C(e),De(o,a)}}}function Oo(l){let e,t,n=l[483].label+"",i,o,a=Math.floor(l[483].minutes/60)+"",u,c,p=l[483].minutes%60+"",b,g,v,h=l[483].count+"",y;return{c(){e=f("div"),t=f("span"),i=F(n),o=f("span"),u=F(a),c=F("ч "),b=F(p),g=F("м"),v=f("span"),y=F(h),s(t,"class","svelte-1uygnbi"),s(o,"class","svelte-1uygnbi"),s(v,"class","summary-count svelte-1uygnbi"),s(e,"class","summary-row svelte-1uygnbi")},m(k,w){S(k,e,w),r(e,t),r(t,i),r(e,o),r(o,u),r(o,c),r(o,b),r(o,g),r(e,v),r(v,y)},p(k,w){w[0]&1024&&n!==(n=k[483].label+"")&&U(i,n),w[0]&1024&&a!==(a=Math.floor(k[483].minutes/60)+"")&&U(u,a),w[0]&1024&&p!==(p=k[483].minutes%60+"")&&U(b,p),w[0]&1024&&h!==(h=k[483].count+"")&&U(y,h)},d(k){k&&C(e)}}}function wm(l){let e,t,n,i,o,a,u,c,p,b,g,v,h,y,k,w,j,T,M,N,D,L=ae(l[9]),E=[];for(let z=0;z<L.length;z+=1)E[z]=Go(Ns(l,L,z));return{c(){e=f("div"),t=f("table"),n=f("thead"),i=f("tr"),o=f("th"),a=_(),u=f("th"),u.textContent=`${m("journal.title")}`,c=_(),p=f("th"),p.textContent=`${m("journal.node")}`,b=_(),g=f("th"),g.textContent=`${m("journal.path")}`,v=_(),h=f("th"),h.textContent=`${m("worklog.minutes")}`,y=_(),k=f("th"),k.textContent=`${m("journal.billable")}`,w=_(),j=f("th"),j.textContent=`${m("journal.approx")}`,T=_(),M=f("th"),M.textContent=`${m("common.date")}`,N=_(),D=f("tbody");for(let z=0;z<E.length;z+=1)E[z].c();s(o,"class","journal-toggle-col svelte-1uygnbi"),s(u,"class","svelte-1uygnbi"),s(p,"class","svelte-1uygnbi"),s(g,"class","svelte-1uygnbi"),s(h,"class","svelte-1uygnbi"),s(k,"class","svelte-1uygnbi"),s(j,"class","svelte-1uygnbi"),s(M,"class","svelte-1uygnbi"),s(i,"class","svelte-1uygnbi"),s(n,"class","svelte-1uygnbi"),s(D,"class","svelte-1uygnbi"),s(t,"class","journal-table svelte-1uygnbi"),s(e,"class","journal-table-wrap svelte-1uygnbi")},m(z,R){S(z,e,R),r(e,t),r(t,n),r(n,i),r(i,o),r(i,a),r(i,u),r(i,c),r(i,p),r(i,b),r(i,g),r(i,v),r(i,h),r(i,y),r(i,k),r(i,w),r(i,j),r(i,T),r(i,M),r(t,N),r(t,D);for(let V=0;V<E.length;V+=1)E[V]&&E[V].m(D,null)},p(z,R){if(R[0]&512|R[5]&268566546|R[6]&12582912){L=ae(z[9]);let V;for(V=0;V<L.length;V+=1){const K=Ns(z,L,V);E[V]?E[V].p(K,R):(E[V]=Go(K),E[V].c(),E[V].m(D,null))}for(;V<E.length;V+=1)E[V].d(1);E.length=L.length}},d(z){z&&C(e),De(E,z)}}}function Cm(l){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${m("journal.empty")}`,s(t,"class","svelte-1uygnbi"),s(e,"class","empty-state svelte-1uygnbi")},m(n,i){S(n,e,i),r(e,t)},p:$,d(n){n&&C(e)}}}function Vo(l){let e;return{c(){e=F("✓")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function Wo(l){let e;return{c(){e=F("~")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function Ho(l){let e,t,n,i,o,a,u,c,p,b,g,v,h,y,k,w;function j(){return l[315](l[478])}function T(){return l[316](l[478])}let M=l[478].details&&Uo(l);function N(z,R){return z[478].source==="manual"?Dm:z[478].source==="suggestion"&&z[478]._events&&z[478]._events.length>0?Nm:z[478].source==="suggestion"?Em:z[478].source==="unknown"||z[478].source==="imported"?jm:z[478]._hasEvents?Tm:Sm}let D=N(l),L=D(l),E=l[478]._events&&Bo(l);return{c(){e=f("tr"),t=f("td"),n=f("div"),i=f("div"),o=f("button"),o.textContent=`${m("worklog.editEntry")}`,a=_(),u=f("button"),u.textContent=`${m("worklog.deleteEntry")}`,c=_(),M&&M.c(),p=_(),b=f("div"),g=f("span"),g.textContent=`${m("worklog.source")}`,v=_(),L.c(),h=_(),E&&E.c(),y=_(),s(o,"class","btn btn-sm svelte-1uygnbi"),s(u,"class","btn btn-sm btn-danger svelte-1uygnbi"),s(i,"class","journal-detail-actions svelte-1uygnbi"),s(g,"class","journal-detail-label svelte-1uygnbi"),s(b,"class","journal-detail-section svelte-1uygnbi"),s(n,"class","journal-detail-body svelte-1uygnbi"),s(t,"colspan","8"),s(t,"class","svelte-1uygnbi"),s(e,"class","journal-row-detail svelte-1uygnbi")},m(z,R){S(z,e,R),r(e,t),r(t,n),r(n,i),r(i,o),r(i,a),r(i,u),r(n,c),M&&M.m(n,null),r(n,p),r(n,b),r(b,g),r(b,v),L.m(b,null),r(n,h),E&&E.m(n,null),r(e,y),k||(w=[A(o,"click",je(j)),A(u,"click",je(T))],k=!0)},p(z,R){l=z,l[478].details?M?M.p(l,R):(M=Uo(l),M.c(),M.m(n,p)):M&&(M.d(1),M=null),D!==(D=N(l))&&(L.d(1),L=D(l),L&&(L.c(),L.m(b,null))),l[478]._events?E?E.p(l,R):(E=Bo(l),E.c(),E.m(n,null)):E&&(E.d(1),E=null)},d(z){z&&C(e),M&&M.d(),L.d(),E&&E.d(),k=!1,pe(w)}}}function Uo(l){let e,t,n,i,o=l[478].details+"",a;return{c(){e=f("div"),t=f("span"),t.textContent=`${m("worklog.details")}`,n=_(),i=f("p"),a=F(o),s(t,"class","journal-detail-label svelte-1uygnbi"),s(i,"class","svelte-1uygnbi"),s(e,"class","journal-detail-section svelte-1uygnbi")},m(u,c){S(u,e,c),r(e,t),r(e,n),r(e,i),r(i,a)},p(u,c){c[0]&512&&o!==(o=u[478].details+"")&&U(a,o)},d(u){u&&C(e)}}}function Sm(l){let e;return{c(){e=f("p"),e.textContent=`${m("worklog.sourceUnknown")}`,s(e,"class","svelte-1uygnbi")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function Tm(l){let e;return{c(){e=f("p"),e.textContent=`${m("worklog.sourceSuggestion")}`,s(e,"class","svelte-1uygnbi")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function jm(l){let e;return{c(){e=f("p"),e.textContent=`${m("worklog.sourceUnknown")}`,s(e,"class","svelte-1uygnbi")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function Em(l){let e;return{c(){e=f("p"),e.textContent=`${m("worklog.sourceSuggestionNoEvents")}`,s(e,"class","svelte-1uygnbi")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function Nm(l){let e;return{c(){e=f("p"),e.textContent=`${m("worklog.sourceSuggestion")}`,s(e,"class","svelte-1uygnbi")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function Dm(l){let e;return{c(){e=f("p"),e.textContent=`${m("worklog.sourceManual")}`,s(e,"class","svelte-1uygnbi")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function Bo(l){let e,t,n,i=ae(l[478]._events),o=[];for(let a=0;a<i.length;a+=1)o[a]=Ko(Ds(l,i,a));return{c(){e=f("div"),t=f("span"),t.textContent=`${m("journal.relatedEvents")}`,n=_();for(let a=0;a<o.length;a+=1)o[a].c();s(t,"class","journal-detail-label svelte-1uygnbi"),s(e,"class","journal-detail-section svelte-1uygnbi")},m(a,u){S(a,e,u),r(e,t),r(e,n);for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(e,null)},p(a,u){if(u[0]&512|u[5]&268435456|u[6]&8388608){i=ae(a[478]._events);let c;for(c=0;c<i.length;c+=1){const p=Ds(a,i,c);o[c]?o[c].p(p,u):(o[c]=Ko(p),o[c].c(),o[c].m(e,null))}for(;c<o.length;c+=1)o[c].d(1);o.length=i.length}},d(a){a&&C(e),De(o,a)}}}function Ko(l){let e,t,n=ut(l[457].createdAt)+"",i,o,a,u=l[183](l[457].eventType)+"",c,p,b,g=l[457].title+"",v,h,y,k,w,j;function T(){return l[317](l[457])}return{c(){e=f("div"),t=f("span"),i=F(n),o=_(),a=f("span"),c=F(u),p=_(),b=f("span"),v=F(g),h=_(),y=f("button"),y.textContent=`${m("common.open")}`,k=_(),s(t,"class","journal-event-time svelte-1uygnbi"),s(a,"class","journal-event-type svelte-1uygnbi"),s(b,"class","journal-event-title svelte-1uygnbi"),s(y,"class","link-btn svelte-1uygnbi"),s(e,"class","journal-event-row svelte-1uygnbi")},m(M,N){S(M,e,N),r(e,t),r(t,i),r(e,o),r(e,a),r(a,c),r(e,p),r(e,b),r(b,v),r(e,h),r(e,y),r(e,k),w||(j=A(y,"click",T),w=!0)},p(M,N){l=M,N[0]&512&&n!==(n=ut(l[457].createdAt)+"")&&U(i,n),N[0]&512&&u!==(u=l[183](l[457].eventType)+"")&&U(c,u),N[0]&512&&g!==(g=l[457].title+"")&&U(v,g)},d(M){M&&C(e),w=!1,j()}}}function Go(l){let e,t,n,i=l[478]._expanded?"▾":"▸",o,a,u,c=l[478].summary+"",p,b,g,v,h=l[478].nodeTitle+"",y,k,w,j=l[478].nodePath+"",T,M,N,D=l[478].minutes+"",L,E,z,R,V,K,G,J=l[478].date+"",H,q,Y,P,W;function O(){return l[312](l[478])}let B=l[478].billable&&Vo(),oe=l[478].approximate&&Wo();function ie(){return l[313](l[478])}function ee(...ne){return l[314](l[478],...ne)}let Z=l[478]._expanded&&Ho(l);return{c(){e=f("tr"),t=f("td"),n=f("span"),o=F(i),a=_(),u=f("td"),p=F(c),b=_(),g=f("td"),v=f("button"),y=F(h),k=_(),w=f("td"),T=F(j),M=_(),N=f("td"),L=F(D),E=_(),z=f("td"),B&&B.c(),R=_(),V=f("td"),oe&&oe.c(),K=_(),G=f("td"),H=F(J),q=_(),Z&&Z.c(),Y=gt(),s(n,"class","journal-toggle-icon svelte-1uygnbi"),s(t,"class","journal-toggle-col svelte-1uygnbi"),s(u,"class","journal-summary-cell svelte-1uygnbi"),s(v,"class","link-btn svelte-1uygnbi"),s(g,"class","svelte-1uygnbi"),s(w,"class","journal-path-cell svelte-1uygnbi"),s(N,"class","journal-min-cell svelte-1uygnbi"),s(z,"class","journal-bool-cell svelte-1uygnbi"),s(V,"class","journal-bool-cell svelte-1uygnbi"),s(G,"class","journal-date-cell svelte-1uygnbi"),s(e,"class","journal-row svelte-1uygnbi"),s(e,"role","button"),s(e,"tabindex","0"),ve(e,"expanded",l[478]._expanded)},m(ne,re){S(ne,e,re),r(e,t),r(t,n),r(n,o),r(e,a),r(e,u),r(u,p),r(e,b),r(e,g),r(g,v),r(v,y),r(e,k),r(e,w),r(w,T),r(e,M),r(e,N),r(N,L),r(e,E),r(e,z),B&&B.m(z,null),r(e,R),r(e,V),oe&&oe.m(V,null),r(e,K),r(e,G),r(G,H),S(ne,q,re),Z&&Z.m(ne,re),S(ne,Y,re),P||(W=[A(v,"click",je(O)),A(e,"click",ie),A(e,"keydown",ee)],P=!0)},p(ne,re){l=ne,re[0]&512&&i!==(i=l[478]._expanded?"▾":"▸")&&U(o,i),re[0]&512&&c!==(c=l[478].summary+"")&&U(p,c),re[0]&512&&h!==(h=l[478].nodeTitle+"")&&U(y,h),re[0]&512&&j!==(j=l[478].nodePath+"")&&U(T,j),re[0]&512&&D!==(D=l[478].minutes+"")&&U(L,D),l[478].billable?B||(B=Vo(),B.c(),B.m(z,null)):B&&(B.d(1),B=null),l[478].approximate?oe||(oe=Wo(),oe.c(),oe.m(V,null)):oe&&(oe.d(1),oe=null),re[0]&512&&J!==(J=l[478].date+"")&&U(H,J),re[0]&512&&ve(e,"expanded",l[478]._expanded),l[478]._expanded?Z?Z.p(l,re):(Z=Ho(l),Z.c(),Z.m(Y.parentNode,Y)):Z&&(Z.d(1),Z=null)},d(ne){ne&&(C(e),C(q),C(Y)),B&&B.d(),oe&&oe.d(),Z&&Z.d(ne),P=!1,pe(W)}}}function Jo(l){let e,t=m("trash.restore")+"",n,i,o=l[55].length+"",a,u,c,p,b=m("common.delete")+"",g,v,h=l[55].length+"",y,k,w,j;return{c(){e=f("button"),n=F(t),i=F(" ("),a=F(o),u=F(")"),c=_(),p=f("button"),g=F(b),v=F(" ("),y=F(h),k=F(")"),s(e,"class","btn btn-sm btn-primary svelte-1uygnbi"),s(p,"class","btn btn-sm btn-danger svelte-1uygnbi")},m(T,M){S(T,e,M),r(e,n),r(e,i),r(e,a),r(e,u),S(T,c,M),S(T,p,M),r(p,g),r(p,v),r(p,y),r(p,k),w||(j=[A(e,"click",l[283]),A(p,"click",l[284])],w=!0)},p(T,M){M[1]&16777216&&o!==(o=T[55].length+"")&&U(a,o),M[1]&16777216&&h!==(h=T[55].length+"")&&U(y,h)},d(T){T&&(C(e),C(c),C(p)),w=!1,pe(j)}}}function Mm(l){let e,t,n,i,o,a,u,c;function p(k,w){return(k[53].nodes||[]).length===0?Pm:Am}let b=p(l),g=b(l);function v(k,w){return(k[53].entries||[]).length===0?zm:Rm}let h=v(l),y=h(l);return{c(){e=f("div"),t=f("section"),n=f("h3"),n.textContent=`${m("trash.deletedNodes")}`,i=_(),g.c(),o=_(),a=f("section"),u=f("h3"),u.textContent=`${m("trash.physicalEntries")}`,c=_(),y.c(),s(n,"class","svelte-1uygnbi"),s(t,"class","trash-section svelte-1uygnbi"),s(u,"class","svelte-1uygnbi"),s(a,"class","trash-section svelte-1uygnbi"),s(e,"class","trash-grid svelte-1uygnbi")},m(k,w){S(k,e,w),r(e,t),r(t,n),r(t,i),g.m(t,null),r(e,o),r(e,a),r(a,u),r(a,c),y.m(a,null)},p(k,w){b===(b=p(k))&&g?g.p(k,w):(g.d(1),g=b(k),g&&(g.c(),g.m(t,null))),h===(h=v(k))&&y?y.p(k,w):(y.d(1),y=h(k),y&&(y.c(),y.m(a,null)))},d(k){k&&C(e),g.d(),y.d()}}}function Im(l){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${m("trash.empty")}`,s(t,"class","svelte-1uygnbi"),s(e,"class","empty-state svelte-1uygnbi")},m(n,i){S(n,e,i),r(e,t)},p:$,d(n){n&&C(e)}}}function Am(l){let e,t,n=l[56]&&qo(l),i=ae(l[160]()),o=[];for(let a=0;a<i.length;a+=1)o[a]=Yo(Rs(l,i,a));return{c(){n&&n.c(),e=_();for(let a=0;a<o.length;a+=1)o[a].c();t=gt()},m(a,u){n&&n.m(a,u),S(a,e,u);for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(a,u);S(a,t,u)},p(a,u){if(a[56]?n?n.p(a,u):(n=qo(a),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null),u[1]&50331648|u[5]&536871904){i=ae(a[160]());let c;for(c=0;c<i.length;c+=1){const p=Rs(a,i,c);o[c]?o[c].p(p,u):(o[c]=Yo(p),o[c].c(),o[c].m(t.parentNode,t))}for(;c<o.length;c+=1)o[c].d(1);o.length=i.length}},d(a){a&&(C(e),C(t)),n&&n.d(a),De(o,a)}}}function Pm(l){let e;return{c(){e=f("p"),e.textContent=`${m("common.empty")}`,s(e,"class","trash-empty-line svelte-1uygnbi")},m(t,n){S(t,e,n)},p:$,d(t){t&&C(e)}}}function qo(l){let e,t,n;return{c(){e=f("button"),e.textContent=`${m("common.backLabel")}`,s(e,"class","btn btn-sm back-btn svelte-1uygnbi")},m(i,o){S(i,e,o),t||(n=A(e,"click",l[286]),t=!0)},p:$,d(i){i&&C(e),t=!1,n()}}}function Lm(l){let e;return{c(){e=f("span"),e.textContent=`${l[475].fsPath}`,s(e,"class","trash-row-path svelte-1uygnbi")},m(t,n){S(t,e,n)},p:$,d(t){t&&C(e)}}}function Fm(l){let e,t,n;function i(){return l[288](l[475])}return{c(){e=f("button"),e.textContent=`${m("common.open")}`,s(e,"class","btn btn-sm svelte-1uygnbi")},m(o,a){S(o,e,a),t||(n=A(e,"click",i),t=!0)},p(o,a){l=o},d(o){o&&C(e),t=!1,n()}}}function Yo(l){let e,t,n,i,o,a,u,c,p,b,g,v,h,y,k,w,j,T;function M(){return l[287](l[475])}let N=l[475].fsPath&&Lm(l),D=l[475].type!=="file"&&l[475].type!=="note"&&Fm(l);function L(){return l[289](l[475])}function E(){return l[290](l[475])}return{c(){e=f("div"),t=f("input"),i=_(),o=f("div"),a=f("span"),a.textContent=`${l[475].title}`,u=_(),c=f("span"),c.textContent=`${l[475].nodePath||l[184](l[475].type)} · ${_t(l[475].deletedAt)}`,p=_(),N&&N.c(),b=_(),g=f("div"),D&&D.c(),v=_(),h=f("button"),h.textContent=`${m("trash.restore")}`,y=_(),k=f("button"),k.textContent=`${m("common.delete")}`,w=_(),s(t,"type","checkbox"),t.checked=n=l[55].includes(l[475].id),s(t,"class","svelte-1uygnbi"),s(a,"class","trash-row-title svelte-1uygnbi"),s(c,"class","trash-row-meta svelte-1uygnbi"),s(o,"class","trash-row-main svelte-1uygnbi"),s(h,"class","btn btn-sm btn-primary svelte-1uygnbi"),s(k,"class","btn btn-sm btn-danger svelte-1uygnbi"),s(g,"class","trash-row-actions svelte-1uygnbi"),s(e,"class","trash-row svelte-1uygnbi"),ve(e,"selected",l[55].includes(l[475].id))},m(z,R){S(z,e,R),r(e,t),r(e,i),r(e,o),r(o,a),r(o,u),r(o,c),r(e,p),N&&N.m(e,null),r(e,b),r(e,g),D&&D.m(g,null),r(g,v),r(g,h),r(g,y),r(g,k),r(e,w),j||(T=[A(t,"change",M),A(h,"click",L),A(k,"click",E)],j=!0)},p(z,R){l=z,R[1]&16777216&&n!==(n=l[55].includes(l[475].id))&&(t.checked=n),l[475].fsPath&&N.p(l,R),l[475].type!=="file"&&l[475].type!=="note"&&D.p(l,R),R[1]&16777216|R[5]&32&&ve(e,"selected",l[55].includes(l[475].id))},d(z){z&&C(e),N&&N.d(),D&&D.d(),j=!1,pe(T)}}}function Rm(l){let e,t=ae(l[53].entries),n=[];for(let i=0;i<t.length;i+=1)n[i]=Qo(Fs(l,t,i));return{c(){for(let i=0;i<n.length;i+=1)n[i].c();e=gt()},m(i,o){for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(i,o);S(i,e,o)},p(i,o){if(o[1]&4194304){t=ae(i[53].entries);let a;for(a=0;a<t.length;a+=1){const u=Fs(i,t,a);n[a]?n[a].p(u,o):(n[a]=Qo(u),n[a].c(),n[a].m(e.parentNode,e))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},d(i){i&&C(e),De(n,i)}}}function zm(l){let e;return{c(){e=f("p"),e.textContent=`${m("common.empty")}`,s(e,"class","trash-empty-line svelte-1uygnbi")},m(t,n){S(t,e,n)},p:$,d(t){t&&C(e)}}}function Qo(l){let e,t,n,i=l[472].name+"",o,a,u,c=(l[472].isDir?m("mime.folder"):m("mime.file"))+"",p,b,g=_t(l[472].modifiedAt)+"",v,h,y,k=l[472].path+"",w,j;return{c(){e=f("div"),t=f("div"),n=f("span"),o=F(i),a=_(),u=f("span"),p=F(c),b=F(" · "),v=F(g),h=_(),y=f("span"),w=F(k),j=_(),s(n,"class","trash-row-title svelte-1uygnbi"),s(u,"class","trash-row-meta svelte-1uygnbi"),s(t,"class","trash-row-main svelte-1uygnbi"),s(y,"class","trash-row-path svelte-1uygnbi"),s(e,"class","trash-row svelte-1uygnbi")},m(T,M){S(T,e,M),r(e,t),r(t,n),r(n,o),r(t,a),r(t,u),r(u,p),r(u,b),r(u,v),r(e,h),r(e,y),r(y,w),r(e,j)},p(T,M){M[1]&4194304&&i!==(i=T[472].name+"")&&U(o,i),M[1]&4194304&&c!==(c=(T[472].isDir?m("mime.folder"):m("mime.file"))+"")&&U(p,c),M[1]&4194304&&g!==(g=_t(T[472].modifiedAt)+"")&&U(v,g),M[1]&4194304&&k!==(k=T[472].path+"")&&U(w,k)},d(T){T&&C(e)}}}function Xo(l){let e,t;return{c(){e=f("span"),t=F(l[46]),s(e,"class","inbox-capture-status svelte-1uygnbi")},m(n,i){S(n,e,i),r(e,t)},p(n,i){i[1]&32768&&U(t,n[46])},d(n){n&&C(e)}}}function Om(l){let e,t=ae(l[43]),n=[];for(let i=0;i<t.length;i+=1)n[i]=$o(zs(l,t,i));return{c(){e=f("div");for(let i=0;i<n.length;i+=1)n[i].c();s(e,"class","inbox-list svelte-1uygnbi")},m(i,o){S(i,e,o);for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(e,null)},p(i,o){if(o[1]&4096|o[4]&12582912|o[5]&1073741824|o[6]&1552){t=ae(i[43]);let a;for(a=0;a<t.length;a+=1){const u=zs(i,t,a);n[a]?n[a].p(u,o):(n[a]=$o(u),n[a].c(),n[a].m(e,null))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},d(i){i&&C(e),De(n,i)}}}function Vm(l){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${m("inbox.empty")}`,s(t,"class","svelte-1uygnbi"),s(e,"class","empty-state svelte-1uygnbi")},m(n,i){S(n,e,i),r(e,t)},p:$,d(n){n&&C(e)}}}function Zo(l){let e,t,n;function i(){return l[276](l[444])}return{c(){e=f("button"),e.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1uygnbi"><path d="M20 6 9 17l-5-5" class="svelte-1uygnbi"></path></svg>',s(e,"class","inbox-icon-btn inbox-icon-btn-primary svelte-1uygnbi"),s(e,"title",m("inbox.keepHere")),s(e,"aria-label",m("inbox.keepHere"))},m(o,a){S(o,e,a),t||(n=A(e,"click",je(i)),t=!0)},p(o,a){l=o},d(o){o&&C(e),t=!1,n()}}}function xo(l){let e,t,n;function i(){return l[279](l[444])}return{c(){e=f("button"),e.textContent=`${m("file.showInExplorer")}`,s(e,"class","btn btn-sm svelte-1uygnbi")},m(o,a){S(o,e,a),t||(n=A(e,"click",je(i)),t=!0)},p(o,a){l=o},d(o){o&&C(e),t=!1,n()}}}function $o(l){let e,t,n,i=l[444].title+"",o,a,u,c=l[185](l[444])+"",p,b,g,v,h,y,k,w,j=na(l[444]),T,M,N,D,L,E=l[444].suggestedTargetNodeId&&Zo(l);function z(){return l[277](l[444])}function R(){return l[278](l[444])}let V=j&&xo(l);function K(){return l[280](l[444])}function G(){return l[281](l[444])}function J(...H){return l[282](l[444],...H)}return{c(){e=f("div"),t=f("div"),n=f("span"),o=F(i),a=_(),u=f("span"),p=F(c),b=_(),g=f("div"),E&&E.c(),v=_(),h=f("button"),h.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1uygnbi"><path d="M14 3h7v7" class="svelte-1uygnbi"></path><path d="M10 14 21 3" class="svelte-1uygnbi"></path><path d="M21 14v5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5" class="svelte-1uygnbi"></path></svg>',y=_(),k=f("button"),k.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1uygnbi"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" class="svelte-1uygnbi"></path><path d="M15 3h6v6" class="svelte-1uygnbi"></path><path d="M10 14 21 3" class="svelte-1uygnbi"></path></svg>',w=_(),V&&V.c(),T=_(),M=f("button"),M.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1uygnbi"><polyline points="3 6 5 6 21 6" class="svelte-1uygnbi"></polyline><path d="M19 6l-1 14H6L5 6" class="svelte-1uygnbi"></path><path d="M10 11v6" class="svelte-1uygnbi"></path><path d="M14 11v6" class="svelte-1uygnbi"></path><path d="M9 6V4h6v2" class="svelte-1uygnbi"></path></svg>',N=_(),s(n,"class","inbox-item-title svelte-1uygnbi"),s(u,"class","inbox-item-meta svelte-1uygnbi"),s(t,"class","inbox-item-main svelte-1uygnbi"),s(h,"class","inbox-icon-btn svelte-1uygnbi"),s(h,"title",m("inbox.assign")),s(h,"aria-label",m("inbox.assign")),s(k,"class","inbox-icon-btn svelte-1uygnbi"),s(k,"title",m("common.open")),s(k,"aria-label",m("common.open")),s(M,"class","inbox-icon-btn inbox-icon-btn-danger svelte-1uygnbi"),s(M,"title",m("common.delete")),s(M,"aria-label",m("common.delete")),s(g,"class","inbox-item-actions svelte-1uygnbi"),s(e,"class","inbox-item svelte-1uygnbi"),s(e,"role","button"),s(e,"tabindex","0")},m(H,q){S(H,e,q),r(e,t),r(t,n),r(n,o),r(t,a),r(t,u),r(u,p),r(e,b),r(e,g),E&&E.m(g,null),r(g,v),r(g,h),r(g,y),r(g,k),r(g,w),V&&V.m(g,null),r(g,T),r(g,M),r(e,N),D||(L=[A(h,"click",je(z)),A(k,"click",je(R)),A(M,"click",je(K)),A(e,"click",G),A(e,"keydown",J)],D=!0)},p(H,q){l=H,q[1]&4096&&i!==(i=l[444].title+"")&&U(o,i),q[1]&4096&&c!==(c=l[185](l[444])+"")&&U(p,c),l[444].suggestedTargetNodeId?E?E.p(l,q):(E=Zo(l),E.c(),E.m(g,v)):E&&(E.d(1),E=null),q[1]&4096&&(j=na(l[444])),j?V?V.p(l,q):(V=xo(l),V.c(),V.m(g,T)):V&&(V.d(1),V=null)},d(H){H&&C(e),E&&E.d(),V&&V.d(),D=!1,pe(L)}}}function Wm(l){let e;return{c(){e=f("span"),s(e,"class","tab-separator svelte-1uygnbi"),s(e,"aria-hidden","true")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function er(l){let e,t,n,i,o=l[467].id==="activity"&&Wm();function a(){return l[225](l[467])}return{c(){o&&o.c(),e=_(),t=f("button"),t.textContent=`${l[467].label}`,s(t,"class","tab svelte-1uygnbi"),ve(t,"active",l[27]===l[467].id)},m(u,c){o&&o.m(u,c),S(u,e,c),S(u,t,c),n||(i=A(t,"click",a),n=!0)},p(u,c){l=u,c[0]&134217728|c[3]&16384&&ve(t,"active",l[27]===l[467].id)},d(u){u&&(C(e),C(t)),o&&o.d(u),n=!1,i()}}}function Hm(l){let e;function t(o,a){return o[22].length===0?Xm:Qm}let n=t(l),i=n(l);return{c(){e=f("div"),i.c(),s(e,"class","activity-tab svelte-1uygnbi")},m(o,a){S(o,e,a),i.m(e,null)},p(o,a){n===(n=t(o))&&i?i.p(o,a):(i.d(1),i=n(o),i&&(i.c(),i.m(e,null)))},i:$,o:$,d(o){o&&C(e),i.d()}}}function Um(l){let e,t,n,i,o=l[26]&&l[41].filter(l[217]).length>0,a,u,c,p=o&&ir(l);function b(h,y){return h[31].length===0?xm:Zm}let g=b(l),v=g(l);return{c(){e=f("div"),t=f("div"),n=f("button"),n.textContent=`+ ${m("worklog.addEntry")}`,i=_(),p&&p.c(),a=_(),v.c(),s(n,"class","btn btn-primary btn-sm svelte-1uygnbi"),s(t,"class","worklog-toolbar svelte-1uygnbi"),s(e,"class","worklog-tab svelte-1uygnbi")},m(h,y){S(h,e,y),r(e,t),r(t,n),r(e,i),p&&p.m(e,null),r(e,a),v.m(e,null),u||(c=A(n,"click",l[259]),u=!0)},p(h,y){y[0]&67108864|y[1]&1024&&(o=h[26]&&h[41].filter(h[217]).length>0),o?p?p.p(h,y):(p=ir(h),p.c(),p.m(e,a)):p&&(p.d(1),p=null),g===(g=b(h))&&v?v.p(h,y):(v.d(1),v=g(h),v&&(v.c(),v.m(e,null)))},i:$,o:$,d(h){h&&C(e),p&&p.d(),v.d(),u=!1,c()}}}function Bm(l){let e,t,n,i,o,a;function u(b,g){return b[30].length===0?sg:ig}let c=u(l),p=c(l);return{c(){e=f("div"),t=f("div"),n=f("button"),n.textContent=`${m("action.addAction")}`,i=_(),p.c(),s(n,"class","btn btn-primary svelte-1uygnbi"),s(t,"class","tab-toolbar svelte-1uygnbi"),s(e,"class","actions-tab svelte-1uygnbi")},m(b,g){S(b,e,g),r(e,t),r(t,n),r(e,i),p.m(e,null),o||(a=A(n,"click",l[203]),o=!0)},p(b,g){c===(c=u(b))&&p?p.p(b,g):(p.d(1),p=c(b),p&&(p.c(),p.m(e,null)))},i:$,o:$,d(b){b&&C(e),p.d(),o=!1,a()}}}function Km(l){let e,t;function n(u,c){return u[47].length===0?rg:og}let i=n(l),o=i(l),a=l[52]&&wr(l);return{c(){e=f("div"),o.c(),t=_(),a&&a.c(),s(e,"class","links-tab svelte-1uygnbi")},m(u,c){S(u,e,c),o.m(e,null),r(e,t),a&&a.m(e,null)},p(u,c){i===(i=n(u))&&o?o.p(u,c):(o.d(1),o=i(u),o&&(o.c(),o.m(e,t))),u[52]?a?a.p(u,c):(a=wr(u),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},i:$,o:$,d(u){u&&C(e),o.d(),a&&a.d()}}}function Gm(l){let e;function t(o,a){return o[44].length===0?cg:ag}let n=t(l),i=n(l);return{c(){e=f("div"),i.c(),s(e,"class","inbox-tab svelte-1uygnbi")},m(o,a){S(o,e,a),i.m(e,null)},p(o,a){n===(n=t(o))&&i?i.p(o,a):(i.d(1),i=n(o),i&&(i.c(),i.m(e,null)))},i:$,o:$,d(o){o&&C(e),i.d()}}}function Jm(l){let e,t,n,i=m("file.addFile")+"",o,a,u,c=m("file.addFolder")+"",p,b,g,v,h,y,k,w,j,T,M,N=l[81].items.length>0&&Sr(l);const D=[fg,ug],L=[];function E(R,V){return R[73]?0:1}y=E(l),k=L[y]=D[y](l);let z=l[69]&&!l[71]&&jr();return{c(){e=f("div"),t=f("div"),n=f("button"),o=F(i),a=_(),u=f("button"),p=F(c),b=_(),g=f("button"),g.textContent=`${m("file.newFile")}`,v=_(),N&&N.c(),h=_(),k.c(),w=_(),z&&z.c(),s(n,"class","btn btn-primary svelte-1uygnbi"),n.disabled=l[69],s(u,"class","btn svelte-1uygnbi"),u.disabled=l[69],s(g,"class","btn svelte-1uygnbi"),s(t,"class","tab-toolbar svelte-1uygnbi"),s(e,"class","files-tab svelte-1uygnbi")},m(R,V){S(R,e,V),r(e,t),r(t,n),r(n,o),r(t,a),r(t,u),r(u,p),r(t,b),r(t,g),r(t,v),N&&N.m(t,null),r(e,h),L[y].m(e,null),r(e,w),z&&z.m(e,null),j=!0,T||(M=[A(n,"click",l[178]),A(u,"click",l[179]),A(g,"click",l[116])],T=!0)},p(R,V){(!j||V[2]&128)&&(n.disabled=R[69]),(!j||V[2]&128)&&(u.disabled=R[69]),R[81].items.length>0?N?N.p(R,V):(N=Sr(R),N.c(),N.m(t,null)):N&&(N.d(1),N=null);let K=y;y=E(R),y===K?L[y].p(R,V):(pt(),me(L[K],1,1,()=>{L[K]=null}),mt(),k=L[y],k?k.p(R,V):(k=L[y]=D[y](R),k.c()),ue(k,1),k.m(e,w)),R[69]&&!R[71]?z||(z=jr(),z.c(),z.m(e,null)):z&&(z.d(1),z=null)},i(R){j||(ue(k),j=!0)},o(R){me(k),j=!1},d(R){R&&C(e),N&&N.d(),L[y].d(),z&&z.d(),T=!1,pe(M)}}}function qm(l){let e,t,n,i,o,a,u,c=l[62]&&Er(l);function p(v,h){return v[28].length===0&&!v[62]?_g:bg}let b=p(l),g=b(l);return{c(){e=f("div"),t=f("div"),n=f("button"),n.textContent=`${m("note.add")}`,i=_(),c&&c.c(),o=_(),g.c(),s(n,"class","btn btn-primary svelte-1uygnbi"),s(t,"class","tab-toolbar svelte-1uygnbi"),s(e,"class","notes-tab svelte-1uygnbi")},m(v,h){S(v,e,h),r(e,t),r(t,n),r(e,i),c&&c.m(e,null),r(e,o),g.m(e,null),a||(u=A(n,"click",l[149]),a=!0)},p(v,h){v[62]?c?c.p(v,h):(c=Er(v),c.c(),c.m(e,o)):c&&(c.d(1),c=null),b===(b=p(v))&&g?g.p(v,h):(g.d(1),g=b(v),g&&(g.c(),g.m(e,null)))},i:$,o:$,d(v){v&&C(e),c&&c.d(),g.d(),a=!1,u()}}}function Ym(l){let e,t,n=l[26].title+"",i,o,a,u,c,p,b=l[184](l[26].type)+"",g,v,h,y,k,w=(l[26].section||"—")+"",j,T,M,N,D,L=_t(l[26].createdAt)+"",E,z,R,V,K,G,J,H,q=m("overview.newNote")+"",Y,P,W,O,B,oe,ie=m("overview.addFile")+"",ee,Z,ne,re,fe,he,Ke=m("overview.addAction")+"",Me,X,le,de,ye,ge,Ie,Ge=m("overview.logTime")+"",it,at,Ne,ze,Te,Ue=l[28].length>0&&Dr(l),Ae=l[31].length>0&&Ir(l);return{c(){e=f("div"),t=f("h2"),i=F(n),o=_(),a=f("div"),u=f("div"),c=f("span"),c.textContent=`${m("overview.type")}`,p=f("span"),g=F(b),v=_(),h=f("div"),y=f("span"),y.textContent=`${m("overview.section")}`,k=f("span"),j=F(w),T=_(),M=f("div"),N=f("span"),N.textContent=`${m("overview.created")}`,D=f("span"),E=F(L),z=_(),R=f("div"),V=f("button"),K=Q("svg"),G=Q("path"),J=Q("path"),H=_(),Y=F(q),P=_(),W=f("button"),O=Q("svg"),B=Q("path"),oe=_(),ee=F(ie),Z=_(),ne=f("button"),re=Q("svg"),fe=Q("polygon"),he=_(),Me=F(Ke),X=_(),le=f("button"),de=Q("svg"),ye=Q("circle"),ge=Q("polyline"),Ie=_(),it=F(Ge),at=_(),Ue&&Ue.c(),Ne=_(),Ae&&Ae.c(),s(t,"class","svelte-1uygnbi"),s(c,"class","meta-label svelte-1uygnbi"),s(p,"class","svelte-1uygnbi"),s(u,"class","meta-item svelte-1uygnbi"),s(y,"class","meta-label svelte-1uygnbi"),s(k,"class","svelte-1uygnbi"),s(h,"class","meta-item svelte-1uygnbi"),s(N,"class","meta-label svelte-1uygnbi"),s(D,"class","svelte-1uygnbi"),s(M,"class","meta-item svelte-1uygnbi"),s(a,"class","meta-grid svelte-1uygnbi"),s(G,"d","M12 20h9"),s(G,"class","svelte-1uygnbi"),s(J,"d","M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"),s(J,"class","svelte-1uygnbi"),s(K,"width","16"),s(K,"height","16"),s(K,"viewBox","0 0 24 24"),s(K,"fill","none"),s(K,"stroke","currentColor"),s(K,"stroke-width","2"),s(K,"stroke-linecap","round"),s(K,"stroke-linejoin","round"),s(K,"class","svelte-1uygnbi"),s(V,"class","qa-btn svelte-1uygnbi"),s(B,"d","M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"),s(B,"class","svelte-1uygnbi"),s(O,"width","16"),s(O,"height","16"),s(O,"viewBox","0 0 24 24"),s(O,"fill","none"),s(O,"stroke","currentColor"),s(O,"stroke-width","2"),s(O,"stroke-linecap","round"),s(O,"stroke-linejoin","round"),s(O,"class","svelte-1uygnbi"),s(W,"class","qa-btn svelte-1uygnbi"),s(fe,"points","13 2 3 14 12 14 11 22 21 10 12 10 13 2"),s(fe,"class","svelte-1uygnbi"),s(re,"width","16"),s(re,"height","16"),s(re,"viewBox","0 0 24 24"),s(re,"fill","none"),s(re,"stroke","currentColor"),s(re,"stroke-width","2"),s(re,"stroke-linecap","round"),s(re,"stroke-linejoin","round"),s(re,"class","svelte-1uygnbi"),s(ne,"class","qa-btn svelte-1uygnbi"),s(ye,"cx","12"),s(ye,"cy","12"),s(ye,"r","10"),s(ye,"class","svelte-1uygnbi"),s(ge,"points","12 6 12 12 16 14"),s(ge,"class","svelte-1uygnbi"),s(de,"width","16"),s(de,"height","16"),s(de,"viewBox","0 0 24 24"),s(de,"fill","none"),s(de,"stroke","currentColor"),s(de,"stroke-width","2"),s(de,"stroke-linecap","round"),s(de,"stroke-linejoin","round"),s(de,"class","svelte-1uygnbi"),s(le,"class","qa-btn svelte-1uygnbi"),s(R,"class","quick-actions svelte-1uygnbi"),s(e,"class","overview svelte-1uygnbi")},m(Pe,Be){S(Pe,e,Be),r(e,t),r(t,i),r(e,o),r(e,a),r(a,u),r(u,c),r(u,p),r(p,g),r(a,v),r(a,h),r(h,y),r(h,k),r(k,j),r(a,T),r(a,M),r(M,N),r(M,D),r(D,E),r(e,z),r(e,R),r(R,V),r(V,K),r(K,G),r(K,J),r(V,H),r(V,Y),r(R,P),r(R,W),r(W,O),r(O,B),r(W,oe),r(W,ee),r(R,Z),r(R,ne),r(ne,re),r(re,fe),r(ne,he),r(ne,Me),r(R,X),r(R,le),r(le,de),r(de,ye),r(de,ge),r(le,Ie),r(le,it),r(e,at),Ue&&Ue.m(e,null),r(e,Ne),Ae&&Ae.m(e,null),ze||(Te=[A(V,"click",l[226]),A(W,"click",l[227]),A(ne,"click",l[203]),A(le,"click",l[228])],ze=!0)},p(Pe,Be){Be[0]&67108864&&n!==(n=Pe[26].title+"")&&U(i,n),Be[0]&67108864&&b!==(b=Pe[184](Pe[26].type)+"")&&U(g,b),Be[0]&67108864&&w!==(w=(Pe[26].section||"—")+"")&&U(j,w),Be[0]&67108864&&L!==(L=_t(Pe[26].createdAt)+"")&&U(E,L),Pe[28].length>0?Ue?Ue.p(Pe,Be):(Ue=Dr(Pe),Ue.c(),Ue.m(e,Ne)):Ue&&(Ue.d(1),Ue=null),Pe[31].length>0?Ae?Ae.p(Pe,Be):(Ae=Ir(Pe),Ae.c(),Ae.m(e,null)):Ae&&(Ae.d(1),Ae=null)},i:$,o:$,d(Pe){Pe&&C(e),Ue&&Ue.d(),Ae&&Ae.d(),ze=!1,pe(Te)}}}function Qm(l){let e,t=ae(l[22]),n=[];for(let i=0;i<t.length;i+=1)n[i]=nr(Os(l,t,i));return{c(){e=f("div");for(let i=0;i<n.length;i+=1)n[i].c();s(e,"class","activity-events svelte-1uygnbi")},m(i,o){S(i,e,o);for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(e,null)},p(i,o){if(o[0]&4194304|o[5]&268435456|o[6]&16777216){t=ae(i[22]);let a;for(a=0;a<t.length;a+=1){const u=Os(i,t,a);n[a]?n[a].p(u,o):(n[a]=nr(u),n[a].c(),n[a].m(e,null))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},d(i){i&&C(e),De(n,i)}}}function Xm(l){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${m("activity.perCaseEmpty")}`,s(t,"class","svelte-1uygnbi"),s(e,"class","empty-state svelte-1uygnbi")},m(n,i){S(n,e,i),r(e,t)},p:$,d(n){n&&C(e)}}}function tr(l){let e,t=l[457].nodePath+"",n;return{c(){e=f("span"),n=F(t),s(e,"class","activity-event-path svelte-1uygnbi")},m(i,o){S(i,e,o),r(e,n)},p(i,o){o[0]&4194304&&t!==(t=i[457].nodePath+"")&&U(n,t)},d(i){i&&C(e)}}}function lr(l){let e,t=l[457].targetType+"",n;return{c(){e=f("span"),n=F(t),s(e,"class","activity-event-target svelte-1uygnbi")},m(i,o){S(i,e,o),r(e,n)},p(i,o){o[0]&4194304&&t!==(t=i[457].targetType+"")&&U(n,t)},d(i){i&&C(e)}}}function nr(l){let e,t,n=sl(l[457].eventType)+"",i,o,a,u=l[457].title+"",c,p,b,g,v=l[183](l[457].eventType)+"",h,y,k,w,j=ut(l[457].createdAt)+"",T,M,N,D,L=l[457].nodePath&&tr(l),E=l[457].targetType&&lr(l);function z(){return l[274](l[457])}function R(...V){return l[275](l[457],...V)}return{c(){e=f("div"),t=f("span"),i=F(n),o=_(),a=f("span"),c=F(u),p=_(),L&&L.c(),b=_(),g=f("span"),h=F(v),y=_(),E&&E.c(),k=_(),w=f("span"),T=F(j),M=_(),s(t,"class","activity-event-icon svelte-1uygnbi"),s(a,"class","activity-event-title svelte-1uygnbi"),s(g,"class","activity-event-type svelte-1uygnbi"),s(w,"class","activity-event-time svelte-1uygnbi"),s(e,"class","activity-event svelte-1uygnbi"),s(e,"role","button"),s(e,"tabindex","0")},m(V,K){S(V,e,K),r(e,t),r(t,i),r(e,o),r(e,a),r(a,c),r(e,p),L&&L.m(e,null),r(e,b),r(e,g),r(g,h),r(e,y),E&&E.m(e,null),r(e,k),r(e,w),r(w,T),r(e,M),N||(D=[A(e,"click",z),A(e,"keydown",R)],N=!0)},p(V,K){l=V,K[0]&4194304&&n!==(n=sl(l[457].eventType)+"")&&U(i,n),K[0]&4194304&&u!==(u=l[457].title+"")&&U(c,u),l[457].nodePath?L?L.p(l,K):(L=tr(l),L.c(),L.m(e,b)):L&&(L.d(1),L=null),K[0]&4194304&&v!==(v=l[183](l[457].eventType)+"")&&U(h,v),l[457].targetType?E?E.p(l,K):(E=lr(l),E.c(),E.m(e,k)):E&&(E.d(1),E=null),K[0]&4194304&&j!==(j=ut(l[457].createdAt)+"")&&U(T,j)},d(V){V&&C(e),L&&L.d(),E&&E.d(),N=!1,pe(D)}}}function ir(l){let e,t,n,i=ae(l[41].filter(l[260])),o=[];for(let a=0;a<i.length;a+=1)o[a]=cr(Hs(l,i,a));return{c(){e=f("div"),t=f("div"),t.textContent=`${m("worklog.suggestions")}`,n=_();for(let a=0;a<o.length;a+=1)o[a].c();s(t,"class","suggestions-title svelte-1uygnbi"),s(e,"class","worklog-tab-suggestions svelte-1uygnbi")},m(a,u){S(a,e,u),r(e,t),r(e,n);for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(e,null)},p(a,u){if(u[0]&67108864|u[1]&1024|u[4]&4194304|u[5]&268449792|u[6]&8388608){i=ae(a[41].filter(a[260]));let c;for(c=0;c<i.length;c+=1){const p=Hs(a,i,c);o[c]?o[c].p(p,u):(o[c]=cr(p),o[c].c(),o[c].m(e,null))}for(;c<o.length;c+=1)o[c].d(1);o.length=i.length}},d(a){a&&C(e),De(o,a)}}}function sr(l){let e,t,n,i=ae(l[460].events),o=[];for(let a=0;a<i.length;a+=1)o[a]=ar(Us(l,i,a));return{c(){e=f("div"),t=f("div"),t.textContent=`${m("suggest.detectedEvents")}`,n=_();for(let a=0;a<o.length;a+=1)o[a].c();s(t,"class","suggestion-detail-title svelte-1uygnbi"),s(e,"class","suggestion-detail svelte-1uygnbi")},m(a,u){S(a,e,u),r(e,t),r(e,n);for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(e,null)},p(a,u){if(u[0]&67108864|u[1]&1024|u[4]&4194304|u[5]&268435456|u[6]&8388608){i=ae(a[460].events);let c;for(c=0;c<i.length;c+=1){const p=Us(a,i,c);o[c]?o[c].p(p,u):(o[c]=ar(p),o[c].c(),o[c].m(e,null))}for(;c<o.length;c+=1)o[c].d(1);o.length=i.length}},d(a){a&&C(e),De(o,a)}}}function or(l){let e,t=l[457].nodePath+"",n;return{c(){e=f("span"),n=F(t),s(e,"class","suggestion-event-path svelte-1uygnbi")},m(i,o){S(i,e,o),r(e,n)},p(i,o){o[0]&67108864|o[1]&1024&&t!==(t=i[457].nodePath+"")&&U(n,t)},d(i){i&&C(e)}}}function rr(l){let e,t,n;function i(){return l[267](l[457])}return{c(){e=f("button"),e.textContent=`${m("file.showInExplorer")}`,s(e,"class","link-btn svelte-1uygnbi")},m(o,a){S(o,e,a),t||(n=A(e,"click",i),t=!0)},p(o,a){l=o},d(o){o&&C(e),t=!1,n()}}}function ar(l){let e,t,n=ut(l[457].createdAt)+"",i,o,a,u,c=l[183](l[457].eventType)+"",p,b,g,v=l[457].title+"",h,y,k,w,j=l[457].targetType==="file"||l[457].eventType.startsWith("file_"),T,M,N,D=l[457].nodePath&&or(l);function L(){return l[266](l[457])}let E=j&&rr(l);return{c(){e=f("div"),t=f("span"),i=F(n),o=_(),D&&D.c(),a=_(),u=f("span"),p=F(c),b=_(),g=f("span"),h=F(v),y=_(),k=f("button"),k.textContent=`${m("common.open")}`,w=_(),E&&E.c(),T=_(),s(t,"class","suggestion-event-time svelte-1uygnbi"),s(u,"class","suggestion-event-type svelte-1uygnbi"),s(g,"class","suggestion-event-title svelte-1uygnbi"),s(k,"class","link-btn svelte-1uygnbi"),s(e,"class","suggestion-detail-event svelte-1uygnbi")},m(z,R){S(z,e,R),r(e,t),r(t,i),r(e,o),D&&D.m(e,null),r(e,a),r(e,u),r(u,p),r(e,b),r(e,g),r(g,h),r(e,y),r(e,k),r(e,w),E&&E.m(e,null),r(e,T),M||(N=A(k,"click",L),M=!0)},p(z,R){l=z,R[0]&67108864|R[1]&1024&&n!==(n=ut(l[457].createdAt)+"")&&U(i,n),l[457].nodePath?D?D.p(l,R):(D=or(l),D.c(),D.m(e,a)):D&&(D.d(1),D=null),R[0]&67108864|R[1]&1024&&c!==(c=l[183](l[457].eventType)+"")&&U(p,c),R[0]&67108864|R[1]&1024&&v!==(v=l[457].title+"")&&U(h,v),R[0]&67108864|R[1]&1024&&(j=l[457].targetType==="file"||l[457].eventType.startsWith("file_")),j?E?E.p(l,R):(E=rr(l),E.c(),E.m(e,T)):E&&(E.d(1),E=null)},d(z){z&&C(e),D&&D.d(),E&&E.d(),M=!1,N()}}}function cr(l){let e,t,n,i,o=l[460].summary+"",a,u,c,p=l[460].suggestedMin+"",b,g,v=m("worklog.min")+"",h,y,k=m("suggest.confidence."+l[460].confidence)+"",w,j,T,M,N,D,L,E,z,R,V,K;function G(){return l[261](l[460])}function J(){return l[262](l[460])}function H(){return l[263](l[460])}function q(){return l[264](l[460],l[461],l[462])}function Y(...W){return l[265](l[460],l[461],l[462],...W)}let P=l[460].events&&l[460].events.length>0&&sr(l);return{c(){e=f("div"),t=f("div"),n=f("div"),i=f("span"),a=F(o),u=_(),c=f("span"),b=F(p),g=_(),h=F(v),y=F(" · "),w=F(k),j=_(),T=f("div"),M=f("button"),M.textContent=`${m("suggest.edit")}`,N=_(),D=f("button"),D.textContent=`${m("worklog.apply")}`,L=_(),E=f("button"),E.textContent=`${m("common.delete")}`,z=_(),P&&P.c(),R=_(),s(i,"class","suggestion-summary svelte-1uygnbi"),s(c,"class","suggestion-meta svelte-1uygnbi"),s(n,"class","suggestion-info svelte-1uygnbi"),s(M,"class","btn btn-sm svelte-1uygnbi"),s(D,"class","btn btn-sm btn-primary svelte-1uygnbi"),s(E,"class","btn btn-sm btn-danger svelte-1uygnbi"),s(T,"class","suggestion-actions svelte-1uygnbi"),s(t,"class","suggestion-main svelte-1uygnbi"),s(t,"role","button"),s(t,"tabindex","0"),s(e,"class","suggestion-card svelte-1uygnbi"),ve(e,"expanded",l[460]._expanded)},m(W,O){S(W,e,O),r(e,t),r(t,n),r(n,i),r(i,a),r(n,u),r(n,c),r(c,b),r(c,g),r(c,h),r(c,y),r(c,w),r(t,j),r(t,T),r(T,M),r(T,N),r(T,D),r(T,L),r(T,E),r(e,z),P&&P.m(e,null),r(e,R),V||(K=[A(M,"click",je(G)),A(D,"click",je(J)),A(E,"click",je(H)),A(t,"click",q),A(t,"keydown",Y)],V=!0)},p(W,O){l=W,O[0]&67108864|O[1]&1024&&o!==(o=l[460].summary+"")&&U(a,o),O[0]&67108864|O[1]&1024&&p!==(p=l[460].suggestedMin+"")&&U(b,p),O[0]&67108864|O[1]&1024&&k!==(k=m("suggest.confidence."+l[460].confidence)+"")&&U(w,k),l[460].events&&l[460].events.length>0?P?P.p(l,O):(P=sr(l),P.c(),P.m(e,R)):P&&(P.d(1),P=null),O[0]&67108864|O[1]&1024&&ve(e,"expanded",l[460]._expanded)},d(W){W&&C(e),P&&P.d(),V=!1,pe(K)}}}function Zm(l){let e,t=ae(l[31]),n=[];for(let i=0;i<t.length;i+=1)n[i]=vr(Vs(l,t,i));return{c(){for(let i=0;i<n.length;i+=1)n[i].c();e=gt()},m(i,o){for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(i,o);S(i,e,o)},p(i,o){if(o[1]&1|o[4]&4194304|o[5]&268697618|o[6]&8388608){t=ae(i[31]);let a;for(a=0;a<t.length;a+=1){const u=Vs(i,t,a);n[a]?n[a].p(u,o):(n[a]=vr(u),n[a].c(),n[a].m(e.parentNode,e))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},d(i){i&&C(e),De(n,i)}}}function xm(l){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${m("worklog.empty")}`,s(t,"class","svelte-1uygnbi"),s(e,"class","empty-state svelte-1uygnbi")},m(n,i){S(n,e,i),r(e,t)},p:$,d(n){n&&C(e)}}}function ur(l){let e,t=l[436].nodePath+"",n;return{c(){e=f("span"),n=F(t),s(e,"class","worklog-entry-path svelte-1uygnbi")},m(i,o){S(i,e,o),r(e,n)},p(i,o){o[1]&1&&t!==(t=i[436].nodePath+"")&&U(n,t)},d(i){i&&C(e)}}}function fr(l){let e;return{c(){e=f("span"),e.textContent=`${m("journal.billableYes")}`,s(e,"class","wl-tag-billable svelte-1uygnbi")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function dr(l){let e;return{c(){e=f("span"),e.textContent=`${m("journal.approxEstimated")}`,s(e,"class","wl-tag-approx svelte-1uygnbi")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function pr(l){let e,t,n,i,o,a,u,c,p,b,g,v,h;function y(){return l[268](l[436])}function k(){return l[269](l[436])}let w=l[436].details&&mr(l);function j(D,L){return D[436].source==="manual"?ng:D[436].source==="suggestion"&&D[436]._events&&D[436]._events.length>0?lg:D[436].source==="suggestion"?tg:D[436].source==="unknown"||D[436].source==="imported"?eg:$m}let T=j(l),M=T(l),N=l[436].source==="suggestion"&&l[436]._events&&l[436]._events.length>0&&gr(l);return{c(){e=f("div"),t=f("div"),n=f("button"),n.textContent=`${m("worklog.editEntry")}`,i=_(),o=f("button"),o.textContent=`${m("worklog.deleteEntry")}`,a=_(),w&&w.c(),u=_(),c=f("div"),p=f("span"),p.textContent=`${m("worklog.source")}`,b=_(),M.c(),g=_(),N&&N.c(),s(n,"class","btn btn-sm svelte-1uygnbi"),s(o,"class","btn btn-sm btn-danger svelte-1uygnbi"),s(t,"class","worklog-entry-actions svelte-1uygnbi"),s(p,"class","wl-detail-label svelte-1uygnbi"),s(c,"class","wl-detail-section svelte-1uygnbi"),s(e,"class","worklog-entry-detail svelte-1uygnbi")},m(D,L){S(D,e,L),r(e,t),r(t,n),r(t,i),r(t,o),r(e,a),w&&w.m(e,null),r(e,u),r(e,c),r(c,p),r(c,b),M.m(c,null),r(e,g),N&&N.m(e,null),v||(h=[A(n,"click",je(y)),A(o,"click",je(k))],v=!0)},p(D,L){l=D,l[436].details?w?w.p(l,L):(w=mr(l),w.c(),w.m(e,u)):w&&(w.d(1),w=null),T!==(T=j(l))&&(M.d(1),M=T(l),M&&(M.c(),M.m(c,null))),l[436].source==="suggestion"&&l[436]._events&&l[436]._events.length>0?N?N.p(l,L):(N=gr(l),N.c(),N.m(e,null)):N&&(N.d(1),N=null)},d(D){D&&C(e),w&&w.d(),M.d(),N&&N.d(),v=!1,pe(h)}}}function mr(l){let e,t,n,i,o=l[436].details+"",a;return{c(){e=f("div"),t=f("span"),t.textContent=`${m("worklog.details")}`,n=_(),i=f("p"),a=F(o),s(t,"class","wl-detail-label svelte-1uygnbi"),s(i,"class","svelte-1uygnbi"),s(e,"class","wl-detail-section svelte-1uygnbi")},m(u,c){S(u,e,c),r(e,t),r(e,n),r(e,i),r(i,a)},p(u,c){c[1]&1&&o!==(o=u[436].details+"")&&U(a,o)},d(u){u&&C(e)}}}function $m(l){let e;return{c(){e=f("p"),e.textContent=`${m("worklog.sourceUnknown")}`,s(e,"class","svelte-1uygnbi")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function eg(l){let e;return{c(){e=f("p"),e.textContent=`${m("worklog.sourceUnknown")}`,s(e,"class","svelte-1uygnbi")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function tg(l){let e;return{c(){e=f("p"),e.textContent=`${m("worklog.sourceSuggestionNoEvents")}`,s(e,"class","svelte-1uygnbi")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function lg(l){let e;return{c(){e=f("p"),e.textContent=`${m("worklog.sourceSuggestion")}`,s(e,"class","svelte-1uygnbi")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function ng(l){let e;return{c(){e=f("p"),e.textContent=`${m("worklog.sourceManual")}`,s(e,"class","svelte-1uygnbi")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function gr(l){let e,t,n,i=ae(l[436]._events),o=[];for(let a=0;a<i.length;a+=1)o[a]=_r(Ws(l,i,a));return{c(){e=f("div"),t=f("span"),t.textContent=`${m("journal.relatedEvents")}`,n=_();for(let a=0;a<o.length;a+=1)o[a].c();s(t,"class","wl-detail-label svelte-1uygnbi"),s(e,"class","wl-detail-section svelte-1uygnbi")},m(a,u){S(a,e,u),r(e,t),r(e,n);for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(e,null)},p(a,u){if(u[1]&1|u[4]&4194304|u[5]&268435456|u[6]&8388608){i=ae(a[436]._events);let c;for(c=0;c<i.length;c+=1){const p=Ws(a,i,c);o[c]?o[c].p(p,u):(o[c]=_r(p),o[c].c(),o[c].m(e,null))}for(;c<o.length;c+=1)o[c].d(1);o.length=i.length}},d(a){a&&C(e),De(o,a)}}}function br(l){let e,t,n;function i(){return l[271](l[457])}return{c(){e=f("button"),e.textContent=`${m("file.showInExplorer")}`,s(e,"class","link-btn svelte-1uygnbi")},m(o,a){S(o,e,a),t||(n=A(e,"click",i),t=!0)},p(o,a){l=o},d(o){o&&C(e),t=!1,n()}}}function _r(l){let e,t,n=ut(l[457].createdAt)+"",i,o,a,u=l[183](l[457].eventType)+"",c,p,b,g=l[457].title+"",v,h,y,k,w=l[457].targetType==="file"||l[457].eventType.startsWith("file_"),j,T,M;function N(){return l[270](l[457])}let D=w&&br(l);return{c(){e=f("div"),t=f("span"),i=F(n),o=_(),a=f("span"),c=F(u),p=_(),b=f("span"),v=F(g),h=_(),y=f("button"),y.textContent=`${m("common.open")}`,k=_(),D&&D.c(),j=_(),s(t,"class","journal-event-time svelte-1uygnbi"),s(a,"class","journal-event-type svelte-1uygnbi"),s(b,"class","journal-event-title svelte-1uygnbi"),s(y,"class","link-btn svelte-1uygnbi"),s(e,"class","journal-event-row svelte-1uygnbi")},m(L,E){S(L,e,E),r(e,t),r(t,i),r(e,o),r(e,a),r(a,c),r(e,p),r(e,b),r(b,v),r(e,h),r(e,y),r(e,k),D&&D.m(e,null),r(e,j),T||(M=A(y,"click",N),T=!0)},p(L,E){l=L,E[1]&1&&n!==(n=ut(l[457].createdAt)+"")&&U(i,n),E[1]&1&&u!==(u=l[183](l[457].eventType)+"")&&U(c,u),E[1]&1&&g!==(g=l[457].title+"")&&U(v,g),E[1]&1&&(w=l[457].targetType==="file"||l[457].eventType.startsWith("file_")),w?D?D.p(l,E):(D=br(l),D.c(),D.m(e,j)):D&&(D.d(1),D=null)},d(L){L&&C(e),D&&D.d(),T=!1,M()}}}function vr(l){let e,t,n,i=l[436]._expanded?"▾":"▸",o,a,u,c=l[436].summary+"",p,b,g,v,h=l[436].minutes+"",y,k,w=m("worklog.min")+"",j,T,M,N,D,L=l[436].date+"",E,z,R,V,K,G=l[436].nodePath&&ur(l),J=l[436].billable&&fr(),H=l[436].approximate&&dr(),q=l[436]._expanded&&pr(l);function Y(){return l[272](l[436])}function P(...W){return l[273](l[436],...W)}return{c(){e=f("div"),t=f("div"),n=f("span"),o=F(i),a=_(),u=f("span"),p=F(c),b=_(),G&&G.c(),g=_(),v=f("span"),y=F(h),k=_(),j=F(w),T=_(),J&&J.c(),M=_(),H&&H.c(),N=_(),D=f("span"),E=F(L),z=_(),q&&q.c(),R=_(),s(n,"class","worklog-toggle svelte-1uygnbi"),s(u,"class","worklog-entry-summary svelte-1uygnbi"),s(v,"class","worklog-entry-mins svelte-1uygnbi"),s(D,"class","worklog-entry-date svelte-1uygnbi"),s(t,"class","worklog-entry-head svelte-1uygnbi"),s(e,"class","worklog-entry svelte-1uygnbi"),s(e,"role","button"),s(e,"tabindex","0"),ve(e,"expanded",l[436]._expanded)},m(W,O){S(W,e,O),r(e,t),r(t,n),r(n,o),r(t,a),r(t,u),r(u,p),r(t,b),G&&G.m(t,null),r(t,g),r(t,v),r(v,y),r(v,k),r(v,j),r(t,T),J&&J.m(t,null),r(t,M),H&&H.m(t,null),r(t,N),r(t,D),r(D,E),r(e,z),q&&q.m(e,null),r(e,R),V||(K=[A(e,"click",Y),A(e,"keydown",P)],V=!0)},p(W,O){l=W,O[1]&1&&i!==(i=l[436]._expanded?"▾":"▸")&&U(o,i),O[1]&1&&c!==(c=l[436].summary+"")&&U(p,c),l[436].nodePath?G?G.p(l,O):(G=ur(l),G.c(),G.m(t,g)):G&&(G.d(1),G=null),O[1]&1&&h!==(h=l[436].minutes+"")&&U(y,h),l[436].billable?J||(J=fr(),J.c(),J.m(t,M)):J&&(J.d(1),J=null),l[436].approximate?H||(H=dr(),H.c(),H.m(t,N)):H&&(H.d(1),H=null),O[1]&1&&L!==(L=l[436].date+"")&&U(E,L),l[436]._expanded?q?q.p(l,O):(q=pr(l),q.c(),q.m(e,R)):q&&(q.d(1),q=null),O[1]&1&&ve(e,"expanded",l[436]._expanded)},d(W){W&&C(e),G&&G.d(),J&&J.d(),H&&H.d(),q&&q.d(),V=!1,pe(K)}}}function ig(l){let e,t=ae(l[30]),n=[];for(let i=0;i<t.length;i+=1)n[i]=hr(Bs(l,t,i));return{c(){for(let i=0;i<n.length;i+=1)n[i].c();e=gt()},m(i,o){for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(i,o);S(i,e,o)},p(i,o){if(o[0]&1073741824|o[6]&3145728){t=ae(i[30]);let a;for(a=0;a<t.length;a+=1){const u=Bs(i,t,a);n[a]?n[a].p(u,o):(n[a]=hr(u),n[a].c(),n[a].m(e.parentNode,e))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},d(i){i&&C(e),De(n,i)}}}function sg(l){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${m("action.noActions")}`,s(t,"class","svelte-1uygnbi"),s(e,"class","empty-state svelte-1uygnbi")},m(n,i){S(n,e,i),r(e,t)},p:$,d(n){n&&C(e)}}}function hr(l){let e,t,n,i=l[452].title+"",o,a,u,c=l[207](l[452].type)+"",p,b,g,v=l[452].data+"",h,y,k,w,j,T,M,N,D;function L(){return l[257](l[452])}function E(){return l[258](l[452])}return{c(){e=f("div"),t=f("div"),n=f("span"),o=F(i),a=_(),u=f("span"),p=F(c),b=_(),g=f("span"),h=F(v),y=_(),k=f("div"),w=f("button"),w.textContent=`${m("action.run")}`,j=_(),T=f("button"),T.innerHTML='<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-1uygnbi"><polyline points="3 6 5 6 21 6" class="svelte-1uygnbi"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" class="svelte-1uygnbi"></path></svg>',M=_(),s(n,"class","action-title svelte-1uygnbi"),s(u,"class","action-type svelte-1uygnbi"),s(g,"class","action-data svelte-1uygnbi"),s(t,"class","action-info svelte-1uygnbi"),s(w,"class","btn btn-sm svelte-1uygnbi"),s(T,"class","btn btn-sm btn-danger svelte-1uygnbi"),s(k,"class","action-btns svelte-1uygnbi"),s(e,"class","action-card svelte-1uygnbi")},m(z,R){S(z,e,R),r(e,t),r(t,n),r(n,o),r(t,a),r(t,u),r(u,p),r(t,b),r(t,g),r(g,h),r(e,y),r(e,k),r(k,w),r(k,j),r(k,T),r(e,M),N||(D=[A(w,"click",L),A(T,"click",E)],N=!0)},p(z,R){l=z,R[0]&1073741824&&i!==(i=l[452].title+"")&&U(o,i),R[0]&1073741824&&c!==(c=l[207](l[452].type)+"")&&U(p,c),R[0]&1073741824&&v!==(v=l[452].data+"")&&U(h,v)},d(z){z&&C(e),N=!1,pe(D)}}}function og(l){let e,t=ae(l[47]),n=[];for(let i=0;i<t.length;i+=1)n[i]=kr(Ks(l,t,i));return{c(){e=f("div");for(let i=0;i<n.length;i+=1)n[i].c();s(e,"class","links-list svelte-1uygnbi")},m(i,o){S(i,e,o);for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(e,null)},p(i,o){if(o[1]&65536|o[6]&116736){t=ae(i[47]);let a;for(a=0;a<t.length;a+=1){const u=Ks(i,t,a);n[a]?n[a].p(u,o):(n[a]=kr(u),n[a].c(),n[a].m(e,null))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},d(i){i&&C(e),De(n,i)}}}function rg(l){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${m("links.empty")}`,s(t,"class","svelte-1uygnbi"),s(e,"class","empty-state svelte-1uygnbi")},m(n,i){S(n,e,i),r(e,t)},p:$,d(n){n&&C(e)}}}function yr(l){let e,t=l[449].note+"",n;return{c(){e=f("span"),n=F(t),s(e,"class","link-note svelte-1uygnbi")},m(i,o){S(i,e,o),r(e,n)},p(i,o){o[1]&65536&&t!==(t=i[449].note+"")&&U(n,t)},d(i){i&&C(e)}}}function kr(l){let e,t,n,i=l[449].title+"",o,a,u,c=(l[449].hostname||l[449].url)+"",p,b,g,v,h=_t(l[449].createdAt)+"",y,k,w,j,T,M,N,D,L,E,z,R,V,K,G=l[449].note&&yr(l);function J(){return l[253](l[449])}function H(){return l[254](l[449])}function q(){return l[255](l[449])}function Y(){return l[256](l[449])}return{c(){e=f("div"),t=f("div"),n=f("span"),o=F(i),a=_(),u=f("span"),p=F(c),g=_(),v=f("span"),y=F(h),k=_(),G&&G.c(),w=_(),j=f("div"),T=f("button"),T.textContent=`${m("common.open")}`,M=_(),N=f("button"),N.textContent=`${m("links.copyUrl")}`,D=_(),L=f("button"),L.textContent=`${m("common.rename")}`,E=_(),z=f("button"),z.textContent=`${m("common.delete")}`,R=_(),s(n,"class","link-title svelte-1uygnbi"),s(u,"class","link-url svelte-1uygnbi"),s(u,"title",b=l[449].url),s(v,"class","link-date svelte-1uygnbi"),s(t,"class","link-main svelte-1uygnbi"),s(T,"class","btn btn-sm btn-primary svelte-1uygnbi"),s(N,"class","btn btn-sm svelte-1uygnbi"),s(L,"class","btn btn-sm svelte-1uygnbi"),s(z,"class","btn btn-sm btn-danger svelte-1uygnbi"),s(j,"class","link-actions svelte-1uygnbi"),s(e,"class","link-card svelte-1uygnbi")},m(P,W){S(P,e,W),r(e,t),r(t,n),r(n,o),r(t,a),r(t,u),r(u,p),r(t,g),r(t,v),r(v,y),r(t,k),G&&G.m(t,null),r(e,w),r(e,j),r(j,T),r(j,M),r(j,N),r(j,D),r(j,L),r(j,E),r(j,z),r(e,R),V||(K=[A(T,"click",J),A(N,"click",H),A(L,"click",q),A(z,"click",Y)],V=!0)},p(P,W){l=P,W[1]&65536&&i!==(i=l[449].title+"")&&U(o,i),W[1]&65536&&c!==(c=(l[449].hostname||l[449].url)+"")&&U(p,c),W[1]&65536&&b!==(b=l[449].url)&&s(u,"title",b),W[1]&65536&&h!==(h=_t(l[449].createdAt)+"")&&U(y,h),l[449].note?G?G.p(l,W):(G=yr(l),G.c(),G.m(t,null)):G&&(G.d(1),G=null)},d(P){P&&C(e),G&&G.d(),V=!1,pe(K)}}}function wr(l){let e,t;return{c(){e=f("div"),t=F(l[52]),s(e,"class","link-status svelte-1uygnbi")},m(n,i){S(n,e,i),r(e,t)},p(n,i){i[1]&2097152&&U(t,n[52])},d(n){n&&C(e)}}}function ag(l){let e,t=ae(l[44]),n=[];for(let i=0;i<t.length;i+=1)n[i]=Cr(Gs(l,t,i));return{c(){e=f("div");for(let i=0;i<n.length;i+=1)n[i].c();s(e,"class","inbox-list svelte-1uygnbi")},m(i,o){S(i,e,o);for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(e,null)},p(i,o){if(o[1]&8192|o[4]&8388608|o[5]&1073741824|o[6]&1552){t=ae(i[44]);let a;for(a=0;a<t.length;a+=1){const u=Gs(i,t,a);n[a]?n[a].p(u,o):(n[a]=Cr(u),n[a].c(),n[a].m(e,null))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},d(i){i&&C(e),De(n,i)}}}function cg(l){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${m("inbox.localEmpty")}`,s(t,"class","svelte-1uygnbi"),s(e,"class","empty-state svelte-1uygnbi")},m(n,i){S(n,e,i),r(e,t)},p:$,d(n){n&&C(e)}}}function Cr(l){let e,t,n,i=l[444].title+"",o,a,u,c=l[185](l[444])+"",p,b,g,v,h,y,k,w,j,T,M;function N(){return l[248](l[444])}function D(){return l[249](l[444])}function L(){return l[250](l[444])}function E(){return l[251](l[444])}function z(...R){return l[252](l[444],...R)}return{c(){e=f("div"),t=f("div"),n=f("span"),o=F(i),a=_(),u=f("span"),p=F(c),b=_(),g=f("div"),v=f("button"),v.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1uygnbi"><path d="M20 6 9 17l-5-5" class="svelte-1uygnbi"></path></svg>',h=_(),y=f("button"),y.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1uygnbi"><path d="M14 3h7v7" class="svelte-1uygnbi"></path><path d="M10 14 21 3" class="svelte-1uygnbi"></path><path d="M21 14v5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5" class="svelte-1uygnbi"></path></svg>',k=_(),w=f("button"),w.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1uygnbi"><polyline points="3 6 5 6 21 6" class="svelte-1uygnbi"></polyline><path d="M19 6l-1 14H6L5 6" class="svelte-1uygnbi"></path><path d="M10 11v6" class="svelte-1uygnbi"></path><path d="M14 11v6" class="svelte-1uygnbi"></path><path d="M9 6V4h6v2" class="svelte-1uygnbi"></path></svg>',j=_(),s(n,"class","inbox-item-title svelte-1uygnbi"),s(u,"class","inbox-item-meta svelte-1uygnbi"),s(t,"class","inbox-item-main svelte-1uygnbi"),s(v,"class","inbox-icon-btn inbox-icon-btn-primary svelte-1uygnbi"),s(v,"title",m("inbox.keepHere")),s(v,"aria-label",m("inbox.keepHere")),s(y,"class","inbox-icon-btn svelte-1uygnbi"),s(y,"title",m("inbox.assign")),s(y,"aria-label",m("inbox.assign")),s(w,"class","inbox-icon-btn inbox-icon-btn-danger svelte-1uygnbi"),s(w,"title",m("common.delete")),s(w,"aria-label",m("common.delete")),s(g,"class","inbox-item-actions svelte-1uygnbi"),s(e,"class","inbox-item svelte-1uygnbi"),s(e,"role","button"),s(e,"tabindex","0")},m(R,V){S(R,e,V),r(e,t),r(t,n),r(n,o),r(t,a),r(t,u),r(u,p),r(e,b),r(e,g),r(g,v),r(g,h),r(g,y),r(g,k),r(g,w),r(e,j),T||(M=[A(v,"click",je(N)),A(y,"click",je(D)),A(w,"click",je(L)),A(e,"click",E),A(e,"keydown",z)],T=!0)},p(R,V){l=R,V[1]&8192&&i!==(i=l[444].title+"")&&U(o,i),V[1]&8192&&c!==(c=l[185](l[444])+"")&&U(p,c)},d(R){R&&C(e),T=!1,pe(M)}}}function Sr(l){let e,t=m("common.paste")+"",n,i,o=l[81].items.length+"",a,u,c;return{c(){e=f("button"),n=F(t),i=_(),a=F(o),s(e,"class","btn svelte-1uygnbi")},m(p,b){S(p,e,b),r(e,n),r(e,i),r(e,a),u||(c=A(e,"click",l[121]),u=!0)},p(p,b){b[2]&524288&&o!==(o=p[81].items.length+"")&&U(a,o)},d(p){p&&C(e),u=!1,c()}}}function ug(l){let e,t,n,i,o,a,u;const c=[pg,dg],p=[];function b(y,k){return y[75].length>0?0:1}e=b(l),t=p[e]=c[e](l);const g=[gg,mg],v=[];function h(y,k){return y[76].length===0?0:1}return i=h(l),o=v[i]=g[i](l),{c(){t.c(),n=_(),o.c(),a=gt()},m(y,k){p[e].m(y,k),S(y,n,k),v[i].m(y,k),S(y,a,k),u=!0},p(y,k){let w=e;e=b(y),e===w?p[e].p(y,k):(pt(),me(p[w],1,1,()=>{p[w]=null}),mt(),t=p[e],t?t.p(y,k):(t=p[e]=c[e](y),t.c()),ue(t,1),t.m(n.parentNode,n));let j=i;i=h(y),i===j?v[i].p(y,k):(pt(),me(v[j],1,1,()=>{v[j]=null}),mt(),o=v[i],o?o.p(y,k):(o=v[i]=g[i](y),o.c()),ue(o,1),o.m(a.parentNode,a))},i(y){u||(ue(t),ue(o),u=!0)},o(y){me(t),me(o),u=!1},d(y){y&&(C(n),C(a)),p[e].d(y),v[i].d(y)}}}function fg(l){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${m("common.loading")}`,s(t,"class","svelte-1uygnbi"),s(e,"class","empty-state svelte-1uygnbi")},m(n,i){S(n,e,i),r(e,t)},p:$,i:$,o:$,d(n){n&&C(e)}}}function dg(l){let e,t;return e=new ka({props:{crumbs:[{name:m("file.root")}]}}),{c(){Qe(e.$$.fragment)},m(n,i){qe(e,n,i),t=!0},p:$,i(n){t||(ue(e.$$.fragment,n),t=!0)},o(n){me(e.$$.fragment,n),t=!1},d(n){Ye(e,n)}}}function pg(l){let e,t,n,i,o,a,u,c=m("common.backLabel")+"",p,b,g,v;return e=new ka({props:{crumbs:[{name:m("file.root")},...l[75]]}}),e.$on("navigate",l[235]),{c(){Qe(e.$$.fragment),t=_(),n=f("button"),i=Q("svg"),o=Q("line"),a=Q("polyline"),u=_(),p=F(c),s(o,"x1","19"),s(o,"y1","12"),s(o,"x2","5"),s(o,"y2","12"),s(o,"class","svelte-1uygnbi"),s(a,"points","12 19 5 12 12 5"),s(a,"class","svelte-1uygnbi"),s(i,"width","14"),s(i,"height","14"),s(i,"viewBox","0 0 24 24"),s(i,"fill","none"),s(i,"stroke","currentColor"),s(i,"stroke-width","2"),s(i,"stroke-linecap","round"),s(i,"stroke-linejoin","round"),s(i,"class","svelte-1uygnbi"),s(n,"class","btn btn-sm back-btn svelte-1uygnbi")},m(h,y){qe(e,h,y),S(h,t,y),S(h,n,y),r(n,i),r(i,o),r(i,a),r(n,u),r(n,p),b=!0,g||(v=A(n,"click",l[112]),g=!0)},p(h,y){const k={};y[2]&8192&&(k.crumbs=[{name:m("file.root")},...h[75]]),e.$set(k)},i(h){b||(ue(e.$$.fragment,h),b=!0)},o(h){me(e.$$.fragment,h),b=!1},d(h){h&&(C(t),C(n)),Ye(e,h),g=!1,v()}}}function mg(l){let e,t=[],n=new Map,i,o=ae(l[76]);const a=u=>u[444].id;for(let u=0;u<o.length;u+=1){let c=Js(l,o,u),p=a(c);n.set(p,t[u]=Tr(p,c))}return{c(){e=f("div");for(let u=0;u<t.length;u+=1)t[u].c();s(e,"class","file-list svelte-1uygnbi")},m(u,c){S(u,e,c);for(let p=0;p<t.length;p+=1)t[p]&&t[p].m(e,null);i=!0},p(u,c){c[2]&1064960|c[3]&1864630272|c[4]&15|c[5]&134217728&&(o=ae(u[76]),pt(),t=ua(t,c,a,1,u,o,n,e,ca,Tr,null,Js),mt())},i(u){if(!i){for(let c=0;c<o.length;c+=1)ue(t[c]);i=!0}},o(u){for(let c=0;c<t.length;c+=1)me(t[c]);i=!1},d(u){u&&C(e);for(let c=0;c<t.length;c+=1)t[c].d()}}}function gg(l){let e,t,n,i,o=(l[75].length>0?m("file.noFiles"):m("file.noFilesCase"))+"",a,u,c,p,b,g,v,h,y,k;return{c(){e=f("div"),t=f("div"),t.innerHTML='<svg width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="svelte-1uygnbi"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" class="svelte-1uygnbi"></path><polyline points="14 2 14 8 20 8" class="svelte-1uygnbi"></polyline></svg>',n=_(),i=f("p"),a=F(o),u=_(),c=f("p"),c.textContent=`${m("file.hint")}`,p=_(),b=f("div"),g=f("button"),g.textContent=`${m("file.addFileSimple")}`,v=_(),h=f("button"),h.textContent=`${m("file.addFolderSimple")}`,s(t,"class","empty-icon svelte-1uygnbi"),s(i,"class","svelte-1uygnbi"),s(c,"class","hint svelte-1uygnbi"),s(g,"class","btn btn-primary svelte-1uygnbi"),s(h,"class","btn svelte-1uygnbi"),s(b,"class","empty-actions svelte-1uygnbi"),s(e,"class","empty-state svelte-1uygnbi")},m(w,j){S(w,e,j),r(e,t),r(e,n),r(e,i),r(i,a),r(e,u),r(e,c),r(e,p),r(e,b),r(b,g),r(b,v),r(b,h),y||(k=[A(g,"click",l[178]),A(h,"click",l[179])],y=!0)},p(w,j){j[2]&8192&&o!==(o=(w[75].length>0?m("file.noFiles"):m("file.noFilesCase"))+"")&&U(a,o)},i:$,o:$,d(w){w&&C(e),y=!1,pe(k)}}}function Tr(l,e){let t,n,i;return n=new i1({props:{item:e[444],selected:e[82].includes(e[444].id),onDragStart:e[125],onDragOver:e[126],onDrop:e[127]}}),n.$on("navigate",e[236]),n.$on("preview",e[237]),n.$on("openExternal",e[238]),n.$on("showInFolder",e[239]),n.$on("delete",e[240]),n.$on("rename",e[241]),n.$on("duplicate",e[242]),n.$on("cut",e[243]),n.$on("copy",e[244]),n.$on("selectOne",e[245]),n.$on("toggleSelect",e[246]),n.$on("rangeSelect",e[247]),{key:l,first:null,c(){t=gt(),Qe(n.$$.fragment),this.first=t},m(o,a){S(o,t,a),qe(n,o,a),i=!0},p(o,a){e=o;const u={};a[2]&16384&&(u.item=e[444]),a[2]&1064960&&(u.selected=e[82].includes(e[444].id)),n.$set(u)},i(o){i||(ue(n.$$.fragment,o),i=!0)},o(o){me(n.$$.fragment,o),i=!1},d(o){o&&C(t),Ye(n,o)}}}function jr(l){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${m("file.scanning")}`,s(t,"class","svelte-1uygnbi"),s(e,"class","empty-state svelte-1uygnbi")},m(n,i){S(n,e,i),r(e,t)},d(n){n&&C(e)}}}function Er(l){let e,t,n,i,o,a,u,c,p;return{c(){e=f("div"),t=f("input"),n=_(),i=f("div"),o=f("button"),o.textContent=`${m("common.create")}`,a=_(),u=f("button"),u.textContent=`${m("common.cancel")}`,s(t,"type","text"),s(t,"placeholder",m("note.title")),s(t,"class","svelte-1uygnbi"),s(o,"class","btn btn-primary svelte-1uygnbi"),s(u,"class","btn svelte-1uygnbi"),s(i,"class","form-actions svelte-1uygnbi"),s(e,"class","create-form svelte-1uygnbi")},m(b,g){S(b,e,g),r(e,t),_e(t,l[63]),r(e,n),r(e,i),r(i,o),r(i,a),r(i,u),c||(p=[A(t,"input",l[231]),A(t,"keydown",l[232]),A(o,"click",l[151]),A(u,"click",l[150])],c=!0)},p(b,g){g[2]&2&&t.value!==b[63]&&_e(t,b[63])},d(b){b&&C(e),c=!1,pe(p)}}}function bg(l){let e,t=ae(l[28]),n=[];for(let i=0;i<t.length;i+=1)n[i]=Nr(qs(l,t,i));return{c(){e=f("div");for(let i=0;i<n.length;i+=1)n[i].c();s(e,"class","notes-list svelte-1uygnbi")},m(i,o){S(i,e,o);for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(e,null)},p(i,o){if(o[0]&268435456|o[4]&268435456){t=ae(i[28]);let a;for(a=0;a<t.length;a+=1){const u=qs(i,t,a);n[a]?n[a].p(u,o):(n[a]=Nr(u),n[a].c(),n[a].m(e,null))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},d(i){i&&C(e),De(n,i)}}}function _g(l){let e,t,n;return{c(){e=f("div"),t=f("p"),t.textContent=`${m("note.noNotes")}`,n=f("p"),n.textContent=`${m("note.createFirst")}`,s(t,"class","svelte-1uygnbi"),s(n,"class","hint svelte-1uygnbi"),s(e,"class","empty-state svelte-1uygnbi")},m(i,o){S(i,e,o),r(e,t),r(e,n)},p:$,d(i){i&&C(e)}}}function Nr(l){let e,t,n=l[439].title+"",i,o,a,u=_t(l[439].createdAt)+"",c,p,b,g;function v(){return l[233](l[439])}function h(){return l[234](l[439])}return{c(){e=f("div"),t=f("div"),i=F(n),o=_(),a=f("div"),c=F(u),p=_(),s(t,"class","note-card-title svelte-1uygnbi"),s(a,"class","note-card-date svelte-1uygnbi"),s(e,"class","note-card svelte-1uygnbi"),s(e,"role","button"),s(e,"tabindex","0")},m(y,k){S(y,e,k),r(e,t),r(t,i),r(e,o),r(e,a),r(a,c),r(e,p),b||(g=[A(e,"click",v),A(e,"keydown",function(){Mt(vt(h))&&vt(h).apply(this,arguments)})],b=!0)},p(y,k){l=y,k[0]&268435456&&n!==(n=l[439].title+"")&&U(i,n),k[0]&268435456&&u!==(u=_t(l[439].createdAt)+"")&&U(c,u)},d(y){y&&C(e),b=!1,pe(g)}}}function Dr(l){let e,t,n,i=ae(l[28].slice(0,5)),o=[];for(let a=0;a<i.length;a+=1)o[a]=Mr(Qs(l,i,a));return{c(){e=f("div"),t=f("h3"),t.textContent=`${m("overview.recentNotes")}`,n=_();for(let a=0;a<o.length;a+=1)o[a].c();s(t,"class","svelte-1uygnbi"),s(e,"class","recent-section svelte-1uygnbi")},m(a,u){S(a,e,u),r(e,t),r(e,n);for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(e,null)},p(a,u){if(u[0]&268435456|u[4]&268435456){i=ae(a[28].slice(0,5));let c;for(c=0;c<i.length;c+=1){const p=Qs(a,i,c);o[c]?o[c].p(p,u):(o[c]=Mr(p),o[c].c(),o[c].m(e,null))}for(;c<o.length;c+=1)o[c].d(1);o.length=i.length}},d(a){a&&C(e),De(o,a)}}}function Mr(l){let e,t,n=l[439].title+"",i,o,a=_t(l[439].createdAt)+"",u,c,p,b;function g(){return l[229](l[439])}function v(){return l[230](l[439])}return{c(){e=f("div"),t=f("span"),i=F(n),o=f("span"),u=F(a),c=_(),s(t,"class","svelte-1uygnbi"),s(o,"class","recent-date svelte-1uygnbi"),s(e,"class","recent-note svelte-1uygnbi"),s(e,"role","button"),s(e,"tabindex","0")},m(h,y){S(h,e,y),r(e,t),r(t,i),r(e,o),r(o,u),r(e,c),p||(b=[A(e,"click",g),A(e,"keydown",function(){Mt(vt(v))&&vt(v).apply(this,arguments)})],p=!0)},p(h,y){l=h,y[0]&268435456&&n!==(n=l[439].title+"")&&U(i,n),y[0]&268435456&&a!==(a=_t(l[439].createdAt)+"")&&U(u,a)},d(h){h&&C(e),p=!1,pe(b)}}}function Ir(l){let e,t,n,i=ae(l[31].slice(0,3)),o=[];for(let a=0;a<i.length;a+=1)o[a]=Ar(Ys(l,i,a));return{c(){e=f("div"),t=f("h3"),t.textContent=`${m("overview.recentEntries")}`,n=_();for(let a=0;a<o.length;a+=1)o[a].c();s(t,"class","svelte-1uygnbi"),s(e,"class","recent-section svelte-1uygnbi")},m(a,u){S(a,e,u),r(e,t),r(e,n);for(let c=0;c<o.length;c+=1)o[c]&&o[c].m(e,null)},p(a,u){if(u[1]&1){i=ae(a[31].slice(0,3));let c;for(c=0;c<i.length;c+=1){const p=Ys(a,i,c);o[c]?o[c].p(p,u):(o[c]=Ar(p),o[c].c(),o[c].m(e,null))}for(;c<o.length;c+=1)o[c].d(1);o.length=i.length}},d(a){a&&C(e),De(o,a)}}}function Ar(l){let e,t=l[436].summary+"",n,i,o=l[436].minutes+"",a,u,c=m("worklog.min")+"",p,b;return{c(){e=f("div"),n=F(t),i=F(" ("),a=F(o),u=_(),p=F(c),b=F(")"),s(e,"class","recent-entry svelte-1uygnbi")},m(g,v){S(g,e,v),r(e,n),r(e,i),r(e,a),r(e,u),r(e,p),r(e,b)},p(g,v){v[1]&1&&t!==(t=g[436].summary+"")&&U(n,t),v[1]&1&&o!==(o=g[436].minutes+"")&&U(a,o)},d(g){g&&C(e)}}}function Pr(l){let e;return{c(){e=f("span"),e.textContent="●",s(e,"class","dirty-mark svelte-1uygnbi")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function Lr(l){let e,t,n,i,o,a,u,c,p,b,g,v,h,y,k,w,j,T,M,N,D,L,E,z,R,V,K=m("common.create")+"",G,J,H,q,Y,P,W,O=l[59]&&Fr(l);g=new Wl({props:{kind:"folder",size:24}});let B=ae(l[6]),oe=[];for(let ee=0;ee<B.length;ee+=1)oe[ee]=Rr(ks(l,B,ee));const ie=ee=>me(oe[ee],1,1,()=>{oe[ee]=null});return{c(){e=f("div"),t=f("div"),n=f("h3"),n.textContent=`${m("nav.createNode")}`,i=_(),O&&O.c(),o=_(),a=f("div"),u=f("span"),u.textContent=`${m("template.select")}`,c=_(),p=f("div"),b=f("button"),Qe(g.$$.fragment),v=_(),h=f("div"),y=f("span"),y.textContent=`${m("template.optionNone")}`,k=_(),w=f("span"),w.textContent=`${m("template.none.desc")}`,j=_();for(let ee=0;ee<oe.length;ee+=1)oe[ee].c();T=_(),M=f("div"),N=f("label"),D=f("span"),D.textContent=`${m("common.name")}`,L=_(),E=f("input"),z=_(),R=f("div"),V=f("button"),G=F(K),H=_(),q=f("button"),q.textContent=`${m("common.cancel")}`,s(n,"class","svelte-1uygnbi"),s(u,"class","form-label svelte-1uygnbi"),s(y,"class","template-card-title svelte-1uygnbi"),s(w,"class","template-card-desc svelte-1uygnbi"),s(h,"class","template-card-text svelte-1uygnbi"),s(b,"class","template-card svelte-1uygnbi"),ve(b,"selected",l[60]===null),s(p,"class","template-cards svelte-1uygnbi"),s(p,"role","group"),s(p,"aria-label",m("template.select")),s(a,"class","form-group svelte-1uygnbi"),s(D,"class","label-text svelte-1uygnbi"),s(E,"type","text"),s(E,"placeholder",m("case.namePlaceholder")),s(E,"class","svelte-1uygnbi"),s(N,"class","svelte-1uygnbi"),s(M,"class","form-group svelte-1uygnbi"),s(V,"class","btn btn-primary svelte-1uygnbi"),V.disabled=J=!l[58].trim()||l[60]===void 0,s(q,"class","btn svelte-1uygnbi"),s(R,"class","modal-actions svelte-1uygnbi"),s(t,"class","modal modal-create svelte-1uygnbi"),s(e,"class","modal-overlay svelte-1uygnbi"),s(e,"role","button"),s(e,"tabindex","0")},m(ee,Z){S(ee,e,Z),r(e,t),r(t,n),r(t,i),O&&O.m(t,null),r(t,o),r(t,a),r(a,u),r(a,c),r(a,p),r(p,b),qe(g,b,null),r(b,v),r(b,h),r(h,y),r(h,k),r(h,w),r(p,j);for(let ne=0;ne<oe.length;ne+=1)oe[ne]&&oe[ne].m(p,null);r(t,T),r(t,M),r(M,N),r(N,D),r(N,L),r(N,E),_e(E,l[58]),r(t,z),r(t,R),r(R,V),r(V,G),r(R,H),r(R,q),Y=!0,P||(W=[A(b,"click",l[335]),A(E,"input",l[337]),A(E,"keydown",l[338]),A(V,"click",l[136]),A(q,"click",l[135]),A(e,"click",kt(l[135])),A(e,"keydown",vt(l[135]))],P=!0)},p(ee,Z){if(ee[59]?O?O.p(ee,Z):(O=Fr(ee),O.c(),O.m(t,o)):O&&(O.d(1),O=null),(!Y||Z[1]&536870912)&&ve(b,"selected",ee[60]===null),Z[0]&64|Z[1]&536870912){B=ae(ee[6]);let ne;for(ne=0;ne<B.length;ne+=1){const re=ks(ee,B,ne);oe[ne]?(oe[ne].p(re,Z),ue(oe[ne],1)):(oe[ne]=Rr(re),oe[ne].c(),ue(oe[ne],1),oe[ne].m(p,null))}for(pt(),ne=B.length;ne<oe.length;ne+=1)ie(ne);mt()}Z[1]&134217728&&E.value!==ee[58]&&_e(E,ee[58]),(!Y||Z[1]&671088640&&J!==(J=!ee[58].trim()||ee[60]===void 0))&&(V.disabled=J)},i(ee){if(!Y){ue(g.$$.fragment,ee);for(let Z=0;Z<B.length;Z+=1)ue(oe[Z]);Y=!0}},o(ee){me(g.$$.fragment,ee),oe=oe.filter(Ca);for(let Z=0;Z<oe.length;Z+=1)me(oe[Z]);Y=!1},d(ee){ee&&C(e),O&&O.d(),Ye(g),De(oe,ee),P=!1,pe(W)}}}function Fr(l){let e,t=m("nav.createInside")+"",n,i,o=l[59].title+"",a,u;return{c(){e=f("div"),n=F(t),i=F(" «"),a=F(o),u=F("»"),s(e,"class","create-context svelte-1uygnbi")},m(c,p){S(c,e,p),r(e,n),r(e,i),r(e,a),r(e,u)},p(c,p){p[1]&268435456&&o!==(o=c[59].title+"")&&U(a,o)},d(c){c&&C(e)}}}function Rr(l){let e,t,n,i,o,a=m(l[431].title)+"",u,c,p,b=m(l[431].title+".desc")+"",g,v,h,y,k;t=new Wl({props:{kind:l[431].icon||"generic",size:24}});function w(){return l[336](l[431])}return{c(){var j;e=f("button"),Qe(t.$$.fragment),n=_(),i=f("div"),o=f("span"),u=F(a),c=_(),p=f("span"),g=F(b),v=_(),s(o,"class","template-card-title svelte-1uygnbi"),s(p,"class","template-card-desc svelte-1uygnbi"),s(i,"class","template-card-text svelte-1uygnbi"),s(e,"class","template-card svelte-1uygnbi"),ve(e,"selected",((j=l[60])==null?void 0:j.id)===l[431].id)},m(j,T){S(j,e,T),qe(t,e,null),r(e,n),r(e,i),r(i,o),r(o,u),r(i,c),r(i,p),r(p,g),r(e,v),h=!0,y||(k=A(e,"click",w),y=!0)},p(j,T){var N;l=j;const M={};T[0]&64&&(M.kind=l[431].icon||"generic"),t.$set(M),(!h||T[0]&64)&&a!==(a=m(l[431].title)+"")&&U(u,a),(!h||T[0]&64)&&b!==(b=m(l[431].title+".desc")+"")&&U(g,b),(!h||T[0]&64|T[1]&536870912)&&ve(e,"selected",((N=l[60])==null?void 0:N.id)===l[431].id)},i(j){h||(ue(t.$$.fragment,j),h=!0)},o(j){me(t.$$.fragment,j),h=!1},d(j){j&&C(e),Ye(t),y=!1,k()}}}function zr(l){let e,t,n=l[61].node&&["folder","project","client","document","recipe"].includes(l[61].node.type),i,o,a,u,c,p,b,g,v,h,y=n&&Or(l),k=l[61].node&&l[61].node.parent_id&&Wr(l);return{c(){e=f("div"),t=f("div"),y&&y.c(),i=_(),k&&k.c(),o=_(),a=f("button"),a.textContent=`${m("common.rename")}`,u=_(),c=f("button"),c.textContent=`${m("common.delete")}`,p=_(),b=f("button"),b.textContent=`${m("file.showInExplorer")}`,s(a,"class","context-menu-item svelte-1uygnbi"),s(c,"class","context-menu-item danger svelte-1uygnbi"),s(b,"class","context-menu-item svelte-1uygnbi"),s(t,"class","context-menu svelte-1uygnbi"),ht(t,"left",l[61].x+"px"),ht(t,"top",l[61].y+"px"),s(e,"class","context-menu-backdrop svelte-1uygnbi"),s(e,"role","button"),s(e,"tabindex","0")},m(w,j){S(w,e,j),r(e,t),y&&y.m(t,null),r(t,i),k&&k.m(t,null),r(t,o),r(t,a),r(t,u),r(t,c),r(t,p),r(t,b),g=!0,v||(h=[A(a,"click",l[341]),A(c,"click",l[342]),A(b,"click",l[343]),A(e,"click",l[138]),A(e,"contextmenu",Tn(l[138])),A(e,"keydown",vt(l[138]))],v=!0)},p(w,j){j[1]&1073741824&&(n=w[61].node&&["folder","project","client","document","recipe"].includes(w[61].node.type)),n?y?(y.p(w,j),j[1]&1073741824&&ue(y,1)):(y=Or(w),y.c(),ue(y,1),y.m(t,i)):y&&(pt(),me(y,1,1,()=>{y=null}),mt()),w[61].node&&w[61].node.parent_id?k?k.p(w,j):(k=Wr(w),k.c(),k.m(t,o)):k&&(k.d(1),k=null),(!g||j[1]&1073741824)&&ht(t,"left",w[61].x+"px"),(!g||j[1]&1073741824)&&ht(t,"top",w[61].y+"px")},i(w){g||(ue(y),g=!0)},o(w){me(y),g=!1},d(w){w&&C(e),y&&y.d(),k&&k.d(),v=!1,pe(h)}}}function Or(l){let e,t,n,i,o,a=ae(l[6].length>0?l[6]:[{id:"",title:"template.optionNone",icon:"folder"}]),u=[];for(let p=0;p<a.length;p+=1)u[p]=Vr(ys(l,a,p));const c=p=>me(u[p],1,1,()=>{u[p]=null});return{c(){e=f("div"),e.textContent=`${m("common.create")}`,t=_();for(let p=0;p<u.length;p+=1)u[p].c();n=_(),i=f("div"),s(e,"class","context-menu-section svelte-1uygnbi"),s(i,"class","context-menu-divider svelte-1uygnbi")},m(p,b){S(p,e,b),S(p,t,b);for(let g=0;g<u.length;g+=1)u[g]&&u[g].m(p,b);S(p,n,b),S(p,i,b),o=!0},p(p,b){if(b[0]&64|b[4]&512){a=ae(p[6].length>0?p[6]:[{id:"",title:"template.optionNone",icon:"folder"}]);let g;for(g=0;g<a.length;g+=1){const v=ys(p,a,g);u[g]?(u[g].p(v,b),ue(u[g],1)):(u[g]=Vr(v),u[g].c(),ue(u[g],1),u[g].m(n.parentNode,n))}for(pt(),g=a.length;g<u.length;g+=1)c(g);mt()}},i(p){if(!o){for(let b=0;b<a.length;b+=1)ue(u[b]);o=!0}},o(p){u=u.filter(Ca);for(let b=0;b<u.length;b+=1)me(u[b]);o=!1},d(p){p&&(C(e),C(t),C(n),C(i)),De(u,p)}}}function Vr(l){let e,t,n,i,o=m(l[431].title)+"",a,u,c,p;t=new Wl({props:{kind:l[431].icon||"folder",size:16}});function b(){return l[339](l[431])}return{c(){e=f("button"),Qe(t.$$.fragment),n=_(),i=f("span"),a=F(o),s(i,"class","svelte-1uygnbi"),s(e,"class","context-menu-item svelte-1uygnbi")},m(g,v){S(g,e,v),qe(t,e,null),r(e,n),r(e,i),r(i,a),u=!0,c||(p=A(e,"click",b),c=!0)},p(g,v){l=g;const h={};v[0]&64&&(h.kind=l[431].icon||"folder"),t.$set(h),(!u||v[0]&64)&&o!==(o=m(l[431].title)+"")&&U(a,o)},i(g){u||(ue(t.$$.fragment,g),u=!0)},o(g){me(t.$$.fragment,g),u=!1},d(g){g&&C(e),Ye(t),c=!1,p()}}}function Wr(l){let e,t,n,i,o;return{c(){e=f("button"),e.textContent=`${m("nav.moveToRoot")}`,t=_(),n=f("div"),s(e,"class","context-menu-item svelte-1uygnbi"),s(n,"class","context-menu-divider svelte-1uygnbi")},m(a,u){S(a,e,u),S(a,t,u),S(a,n,u),i||(o=A(e,"click",l[340]),i=!0)},p:$,d(a){a&&(C(e),C(t),C(n)),i=!1,o()}}}function Hr(l){let e,t,n,i=(l[40]?m("worklog.acceptSuggestion"):l[39]?m("worklog.editEntry"):m("worklog.addEntry"))+"",o,a,u,c,p,b,g,v,h,y,k,w,j,T,M,N,D,L,E,z,R,V,K,G,J,H,q,Y,P,W,O,B,oe,ie,ee,Z,ne,re,fe,he=m("common.save")+"",Ke,Me,X,le,de,ye;return{c(){e=f("div"),t=f("div"),n=f("h3"),o=F(i),a=_(),u=f("div"),c=f("label"),p=f("span"),p.textContent=`${m("worklog.date")}`,b=_(),g=f("input"),v=_(),h=f("div"),y=f("label"),k=f("span"),k.textContent=`${m("worklog.whatDone")}`,w=_(),j=f("input"),T=_(),M=f("div"),N=f("label"),D=f("span"),D.textContent=`${m("worklog.minutes")}`,L=_(),E=f("input"),z=_(),R=f("div"),V=f("label"),K=f("span"),K.textContent=`${m("worklog.details")}`,G=_(),J=f("textarea"),H=_(),q=f("div"),Y=f("label"),P=f("input"),W=_(),O=f("span"),O.textContent=`${m("journal.billableYes")}`,B=_(),oe=f("label"),ie=f("input"),ee=_(),Z=f("span"),Z.textContent=`${m("journal.approxEstimated")}`,ne=_(),re=f("div"),fe=f("button"),Ke=F(he),X=_(),le=f("button"),le.textContent=`${m("common.cancel")}`,s(n,"class","svelte-1uygnbi"),s(p,"class","label-text svelte-1uygnbi"),s(g,"type","date"),s(g,"class","svelte-1uygnbi"),s(c,"class","svelte-1uygnbi"),s(u,"class","form-group svelte-1uygnbi"),s(k,"class","label-text svelte-1uygnbi"),s(j,"type","text"),s(j,"placeholder",m("worklog.whatDone")),s(j,"class","svelte-1uygnbi"),s(y,"class","svelte-1uygnbi"),s(h,"class","form-group svelte-1uygnbi"),s(D,"class","label-text svelte-1uygnbi"),s(E,"type","number"),s(E,"min","1"),s(E,"class","svelte-1uygnbi"),s(N,"class","svelte-1uygnbi"),s(M,"class","form-group svelte-1uygnbi"),s(K,"class","label-text svelte-1uygnbi"),s(J,"class","svelte-1uygnbi"),s(V,"class","svelte-1uygnbi"),s(R,"class","form-group svelte-1uygnbi"),s(P,"type","checkbox"),s(P,"class","svelte-1uygnbi"),s(O,"class","svelte-1uygnbi"),s(Y,"class","checkbox-label-inline svelte-1uygnbi"),s(ie,"type","checkbox"),s(ie,"class","svelte-1uygnbi"),s(Z,"class","svelte-1uygnbi"),s(oe,"class","checkbox-label-inline svelte-1uygnbi"),s(q,"class","form-row svelte-1uygnbi"),s(fe,"class","btn btn-primary svelte-1uygnbi"),fe.disabled=Me=!l[33].trim()||!l[34],s(le,"class","btn svelte-1uygnbi"),s(re,"class","modal-actions svelte-1uygnbi"),s(t,"class","modal modal-worklog svelte-1uygnbi"),s(e,"class","modal-overlay svelte-1uygnbi"),s(e,"role","button"),s(e,"tabindex","0")},m(ge,Ie){S(ge,e,Ie),r(e,t),r(t,n),r(n,o),r(t,a),r(t,u),r(u,c),r(c,p),r(c,b),r(c,g),_e(g,l[35]),r(t,v),r(t,h),r(h,y),r(y,k),r(y,w),r(y,j),_e(j,l[33]),r(t,T),r(t,M),r(M,N),r(N,D),r(N,L),r(N,E),_e(E,l[34]),r(t,z),r(t,R),r(R,V),r(V,K),r(V,G),r(V,J),_e(J,l[36]),r(t,H),r(t,q),r(q,Y),r(Y,P),P.checked=l[37],r(Y,W),r(Y,O),r(q,B),r(q,oe),r(oe,ie),ie.checked=l[38],r(oe,ee),r(oe,Z),r(t,ne),r(t,re),r(re,fe),r(fe,Ke),r(re,X),r(re,le),de||(ye=[A(g,"input",l[344]),A(j,"input",l[345]),A(E,"input",l[346]),A(J,"input",l[347]),A(P,"change",l[348]),A(ie,"change",l[349]),A(fe,"click",l[158]),A(le,"click",l[157]),A(e,"click",kt(l[157])),A(e,"keydown",vt(l[157]))],de=!0)},p(ge,Ie){Ie[1]&768&&i!==(i=(ge[40]?m("worklog.acceptSuggestion"):ge[39]?m("worklog.editEntry"):m("worklog.addEntry"))+"")&&U(o,i),Ie[1]&16&&_e(g,ge[35]),Ie[1]&4&&j.value!==ge[33]&&_e(j,ge[33]),Ie[1]&8&&Ol(E.value)!==ge[34]&&_e(E,ge[34]),Ie[1]&32&&_e(J,ge[36]),Ie[1]&64&&(P.checked=ge[37]),Ie[1]&128&&(ie.checked=ge[38]),Ie[1]&12&&Me!==(Me=!ge[33].trim()||!ge[34])&&(fe.disabled=Me)},d(ge){ge&&C(e),de=!1,pe(ye)}}}function Ur(l){let e,t,n,i,o,a,u,c,p,b,g,v,h,y,k,w,j,T,M,N=(l[66]==="open_url"?m("action.dataUrl"):l[66]==="open_folder"||l[66]==="open_file"?m("action.dataPath"):m("action.dataCommand"))+"",D,L,E,z,R,V,K,G,J,H,q,Y=ae(l[106]),P=[];for(let W=0;W<Y.length;W+=1)P[W]=Br(hs(l,Y,W));return{c(){e=f("div"),t=f("div"),n=f("h3"),n.textContent=`${m("action.newAction")}`,i=_(),o=f("div"),a=f("label"),u=f("span"),u.textContent=`${m("common.name")}`,c=_(),p=f("input"),b=_(),g=f("div"),v=f("label"),h=f("span"),h.textContent=`${m("common.type")}`,y=_(),k=f("select");for(let W=0;W<P.length;W+=1)P[W].c();w=_(),j=f("div"),T=f("label"),M=f("span"),D=F(N),L=_(),E=f("input"),R=_(),V=f("div"),K=f("button"),K.textContent=`${m("common.create")}`,G=_(),J=f("button"),J.textContent=`${m("common.cancel")}`,s(n,"class","svelte-1uygnbi"),s(u,"class","label-text svelte-1uygnbi"),s(p,"type","text"),s(p,"placeholder",m("action.namePlaceholder")),s(p,"class","svelte-1uygnbi"),s(a,"class","svelte-1uygnbi"),s(o,"class","form-group svelte-1uygnbi"),s(h,"class","label-text svelte-1uygnbi"),s(k,"class","svelte-1uygnbi"),l[66]===void 0&&Gt(()=>l[352].call(k)),s(v,"class","svelte-1uygnbi"),s(g,"class","form-group svelte-1uygnbi"),s(M,"class","label-text svelte-1uygnbi"),s(E,"type","text"),s(E,"placeholder",z=l[66]==="open_url"?m("action.urlPlaceholder"):l[66]==="open_folder"||l[66]==="open_file"?m("action.pathPlaceholder"):m("action.commandPlaceholder")),s(E,"class","svelte-1uygnbi"),s(T,"class","svelte-1uygnbi"),s(j,"class","form-group svelte-1uygnbi"),s(K,"class","btn btn-primary svelte-1uygnbi"),s(J,"class","btn svelte-1uygnbi"),s(V,"class","modal-actions svelte-1uygnbi"),s(t,"class","modal svelte-1uygnbi"),s(e,"class","modal-overlay svelte-1uygnbi"),s(e,"role","button"),s(e,"tabindex","0")},m(W,O){S(W,e,O),r(e,t),r(t,n),r(t,i),r(t,o),r(o,a),r(a,u),r(a,c),r(a,p),_e(p,l[65]),r(t,b),r(t,g),r(g,v),r(v,h),r(v,y),r(v,k);for(let B=0;B<P.length;B+=1)P[B]&&P[B].m(k,null);Dt(k,l[66],!0),r(t,w),r(t,j),r(j,T),r(T,M),r(M,D),r(T,L),r(T,E),_e(E,l[67]),r(t,R),r(t,V),r(V,K),r(V,G),r(V,J),H||(q=[A(p,"input",l[350]),A(p,"keydown",l[351]),A(k,"change",l[352]),A(E,"input",l[353]),A(E,"keydown",l[354]),A(K,"click",l[205]),A(J,"click",l[204]),A(e,"click",kt(l[204])),A(e,"keydown",vt(l[204]))],H=!0)},p(W,O){if(O[2]&8&&p.value!==W[65]&&_e(p,W[65]),O[3]&8192){Y=ae(W[106]);let B;for(B=0;B<Y.length;B+=1){const oe=hs(W,Y,B);P[B]?P[B].p(oe,O):(P[B]=Br(oe),P[B].c(),P[B].m(k,null))}for(;B<P.length;B+=1)P[B].d(1);P.length=Y.length}O[2]&16|O[3]&8192&&Dt(k,W[66]),O[2]&16&&N!==(N=(W[66]==="open_url"?m("action.dataUrl"):W[66]==="open_folder"||W[66]==="open_file"?m("action.dataPath"):m("action.dataCommand"))+"")&&U(D,N),O[2]&16|O[3]&8192&&z!==(z=W[66]==="open_url"?m("action.urlPlaceholder"):W[66]==="open_folder"||W[66]==="open_file"?m("action.pathPlaceholder"):m("action.commandPlaceholder"))&&s(E,"placeholder",z),O[2]&32&&E.value!==W[67]&&_e(E,W[67])},d(W){W&&C(e),De(P,W),H=!1,pe(q)}}}function Br(l){let e,t=l[428].label+"",n;return{c(){e=f("option"),n=F(t),e.__value=l[428].id,_e(e,e.__value),s(e,"class","svelte-1uygnbi")},m(i,o){S(i,e,o),r(e,n)},p:$,d(i){i&&C(e)}}}function Kr(l){let e,t,n,i=m("file.importTitle")+"",o,a,u=(l[26]?l[26].title:"")+"",c,p,b,g,v,h,y,k=l[70].files+"",w,j,T,M,N,D=l[70].folders+"",L,E,z,R,V,K=(l[70].totalBytes/1024).toFixed(1)+"",G,J,H,q,Y,P,W,O,B,oe,ie,ee,Z=l[70].isDangerous&&Gr(l);return{c(){e=f("div"),t=f("div"),n=f("h3"),o=F(i),a=F(" «"),c=F(u),p=F("»"),b=_(),g=f("div"),v=f("div"),h=f("span"),h.textContent=`${m("file.importFiles")}`,y=f("span"),w=F(k),j=_(),T=f("div"),M=f("span"),M.textContent=`${m("file.importFolders")}`,N=f("span"),L=F(D),E=_(),z=f("div"),R=f("span"),R.textContent=`${m("file.importSize")}`,V=f("span"),G=F(K),J=F(" KB"),H=_(),Z&&Z.c(),q=_(),Y=f("div"),P=f("button"),P.textContent=`${m("file.importCopy")}`,W=_(),O=f("button"),O.textContent=`${m("file.importLink")}`,B=_(),oe=f("button"),oe.textContent=`${m("common.cancel")}`,s(n,"class","svelte-1uygnbi"),s(h,"class","svelte-1uygnbi"),s(y,"class","svelte-1uygnbi"),s(v,"class","summary-row svelte-1uygnbi"),s(M,"class","svelte-1uygnbi"),s(N,"class","svelte-1uygnbi"),s(T,"class","summary-row svelte-1uygnbi"),s(R,"class","svelte-1uygnbi"),s(V,"class","svelte-1uygnbi"),s(z,"class","summary-row svelte-1uygnbi"),s(g,"class","import-summary svelte-1uygnbi"),s(P,"class","btn btn-primary svelte-1uygnbi"),s(O,"class","btn svelte-1uygnbi"),s(oe,"class","btn svelte-1uygnbi"),s(Y,"class","modal-actions svelte-1uygnbi"),s(t,"class","modal svelte-1uygnbi"),s(e,"class","modal-overlay svelte-1uygnbi"),s(e,"role","button"),s(e,"tabindex","0")},m(ne,re){S(ne,e,re),r(e,t),r(t,n),r(n,o),r(n,a),r(n,c),r(n,p),r(t,b),r(t,g),r(g,v),r(v,h),r(v,y),r(y,w),r(g,j),r(g,T),r(T,M),r(T,N),r(N,L),r(g,E),r(g,z),r(z,R),r(z,V),r(V,G),r(V,J),r(g,H),Z&&Z.m(g,null),r(t,q),r(t,Y),r(Y,P),r(Y,W),r(Y,O),r(Y,B),r(Y,oe),ie||(ee=[A(P,"click",l[355]),A(O,"click",l[356]),A(oe,"click",l[181]),A(e,"click",kt(l[181])),A(e,"keydown",vt(l[181]))],ie=!0)},p(ne,re){re[0]&67108864&&u!==(u=(ne[26]?ne[26].title:"")+"")&&U(c,u),re[2]&256&&k!==(k=ne[70].files+"")&&U(w,k),re[2]&256&&D!==(D=ne[70].folders+"")&&U(L,D),re[2]&256&&K!==(K=(ne[70].totalBytes/1024).toFixed(1)+"")&&U(G,K),ne[70].isDangerous?Z?Z.p(ne,re):(Z=Gr(ne),Z.c(),Z.m(g,null)):Z&&(Z.d(1),Z=null)},d(ne){ne&&C(e),Z&&Z.d(),ie=!1,pe(ee)}}}function Gr(l){let e,t,n,i,o,a,u=l[70].dangerReason+"",c;return{c(){e=f("div"),t=Q("svg"),n=Q("path"),i=Q("line"),o=Q("line"),a=_(),c=F(u),s(n,"d","M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"),s(n,"class","svelte-1uygnbi"),s(i,"x1","12"),s(i,"y1","9"),s(i,"x2","12"),s(i,"y2","13"),s(i,"class","svelte-1uygnbi"),s(o,"x1","12"),s(o,"y1","17"),s(o,"x2","12.01"),s(o,"y2","17"),s(o,"class","svelte-1uygnbi"),s(t,"width","14"),s(t,"height","14"),s(t,"viewBox","0 0 24 24"),s(t,"fill","none"),s(t,"stroke","currentColor"),s(t,"stroke-width","2"),s(t,"stroke-linecap","round"),s(t,"stroke-linejoin","round"),s(t,"class","svelte-1uygnbi"),s(e,"class","summary-warn svelte-1uygnbi")},m(p,b){S(p,e,b),r(e,t),r(t,n),r(t,i),r(t,o),r(e,a),r(e,c)},p(p,b){b[2]&256&&u!==(u=p[70].dangerReason+"")&&U(c,u)},d(p){p&&C(e)}}}function Jr(l){let e,t,n,i,o,a,u,c,p,b,g,v,h,y,k,w,j,T=l[94]&&qr(l);return{c(){e=f("div"),t=f("div"),n=f("h3"),n.textContent=`${m("rename.title")}`,i=_(),o=f("div"),a=f("label"),u=f("span"),u.textContent=`${m("common.newName")}`,c=_(),p=f("input"),b=_(),T&&T.c(),g=_(),v=f("div"),h=f("button"),h.textContent=`${m("common.rename")}`,y=_(),k=f("button"),k.textContent=`${m("common.cancel")}`,s(n,"class","svelte-1uygnbi"),s(u,"class","label-text svelte-1uygnbi"),s(p,"type","text"),s(p,"class","svelte-1uygnbi"),s(a,"class","svelte-1uygnbi"),s(o,"class","form-group svelte-1uygnbi"),s(h,"class","btn btn-primary svelte-1uygnbi"),s(k,"class","btn svelte-1uygnbi"),s(v,"class","modal-actions svelte-1uygnbi"),s(t,"class","modal svelte-1uygnbi"),s(e,"class","modal-overlay svelte-1uygnbi"),s(e,"role","button"),s(e,"tabindex","0")},m(M,N){S(M,e,N),r(e,t),r(t,n),r(t,i),r(t,o),r(o,a),r(a,u),r(a,c),r(a,p),_e(p,l[93]),r(t,b),T&&T.m(t,null),r(t,g),r(t,v),r(v,h),r(v,y),r(v,k),w||(j=[A(p,"input",l[357]),A(p,"keydown",l[130]),A(h,"click",l[128]),A(k,"click",l[129]),A(e,"click",kt(l[129])),A(e,"keydown",vt(l[129]))],w=!0)},p(M,N){N[3]&1&&p.value!==M[93]&&_e(p,M[93]),M[94]?T?T.p(M,N):(T=qr(M),T.c(),T.m(t,g)):T&&(T.d(1),T=null)},d(M){M&&C(e),T&&T.d(),w=!1,pe(j)}}}function qr(l){let e,t;return{c(){e=f("div"),t=F(l[94]),s(e,"class","rename-error svelte-1uygnbi")},m(n,i){S(n,e,i),r(e,t)},p(n,i){i[3]&2&&U(t,n[94])},d(n){n&&C(e)}}}function Yr(l){let e,t,n,i,o,a=l[95].title+"",u,c,p,b,g,v,h,y,k,w,j,T,M=m("inbox.assign")+"",N,D,L,E,z,R,V=l[97].length>0&&Qr(l),K=l[99]&&Zr();return{c(){e=f("div"),t=f("div"),n=f("h3"),n.textContent=`${m("inbox.assignTitle")}`,i=_(),o=f("div"),u=F(a),c=_(),p=f("div"),b=f("label"),g=f("span"),g.textContent=`${m("inbox.assignTarget")}`,v=_(),h=f("input"),y=_(),V&&V.c(),k=_(),K&&K.c(),w=_(),j=f("div"),T=f("button"),N=F(M),L=_(),E=f("button"),E.textContent=`${m("common.cancel")}`,s(n,"class","svelte-1uygnbi"),s(o,"class","create-context svelte-1uygnbi"),s(g,"class","label-text svelte-1uygnbi"),s(h,"type","text"),s(h,"placeholder",m("inbox.assignSearchPlaceholder")),s(h,"class","svelte-1uygnbi"),s(b,"class","svelte-1uygnbi"),s(p,"class","form-group assign-search svelte-1uygnbi"),s(T,"class","btn btn-primary svelte-1uygnbi"),T.disabled=D=!l[98],s(E,"class","btn svelte-1uygnbi"),s(j,"class","modal-actions svelte-1uygnbi"),s(t,"class","modal svelte-1uygnbi"),s(e,"class","modal-overlay svelte-1uygnbi"),s(e,"role","button"),s(e,"tabindex","0")},m(G,J){S(G,e,J),r(e,t),r(t,n),r(t,i),r(t,o),r(o,u),r(t,c),r(t,p),r(p,b),r(b,g),r(b,v),r(b,h),_e(h,l[96]),r(p,y),V&&V.m(p,null),r(t,k),K&&K.m(t,null),r(t,w),r(t,j),r(j,T),r(T,N),r(j,L),r(j,E),z||(R=[A(h,"input",l[358]),A(h,"input",l[192]),A(h,"keydown",l[359]),A(T,"click",l[194]),A(E,"click",l[191]),A(e,"click",kt(l[191])),A(e,"keydown",vt(l[191]))],z=!0)},p(G,J){J[3]&4&&a!==(a=G[95].title+"")&&U(u,a),J[3]&8&&h.value!==G[96]&&_e(h,G[96]),G[97].length>0?V?V.p(G,J):(V=Qr(G),V.c(),V.m(p,null)):V&&(V.d(1),V=null),G[99]?K||(K=Zr(),K.c(),K.m(t,w)):K&&(K.d(1),K=null),J[3]&32&&D!==(D=!G[98])&&(T.disabled=D)},d(G){G&&C(e),V&&V.d(),K&&K.d(),z=!1,pe(R)}}}function Qr(l){let e,t=ae(l[97]),n=[];for(let i=0;i<t.length;i+=1)n[i]=Xr(vs(l,t,i));return{c(){e=f("div");for(let i=0;i<n.length;i+=1)n[i].c();s(e,"class","assign-search-results svelte-1uygnbi")},m(i,o){S(i,e,o);for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(e,null)},p(i,o){if(o[3]&16|o[5]&536870912|o[6]&128){t=ae(i[97]);let a;for(a=0;a<t.length;a+=1){const u=vs(i,t,a);n[a]?n[a].p(u,o):(n[a]=Xr(u),n[a].c(),n[a].m(e,null))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},d(i){i&&C(e),De(n,i)}}}function Xr(l){let e,t,n=(l[425].path||l[425].title)+"",i,o,a,u=l[184](l[425].type)+"",c,p,b,g;function v(){return l[360](l[425])}return{c(){e=f("button"),t=f("span"),i=F(n),o=_(),a=f("span"),c=F(u),p=_(),s(t,"class","svelte-1uygnbi"),s(a,"class","svelte-1uygnbi"),s(e,"class","assign-search-result svelte-1uygnbi")},m(h,y){S(h,e,y),r(e,t),r(t,i),r(e,o),r(e,a),r(a,c),r(e,p),b||(g=A(e,"click",v),b=!0)},p(h,y){l=h,y[3]&16&&n!==(n=(l[425].path||l[425].title)+"")&&U(i,n),y[3]&16&&u!==(u=l[184](l[425].type)+"")&&U(c,u)},d(h){h&&C(e),b=!1,g()}}}function Zr(l){let e;return{c(){e=f("div"),e.textContent=`${m("common.loading")}`,s(e,"class","assign-status svelte-1uygnbi")},m(t,n){S(t,e,n)},d(t){t&&C(e)}}}function xr(l){let e,t,n,i,o,a,u,c,p,b,g,v,h,y,k,w,j,T,M,N,D,L,E,z,R,V=m("common.save")+"",K,G,J,H,q,Y,P=l[52]&&$r(l);return{c(){e=f("div"),t=f("div"),n=f("h3"),n.textContent=`${m("links.editTitle")}`,i=_(),o=f("div"),a=f("label"),u=f("span"),u.textContent=`${m("common.name")}`,c=_(),p=f("input"),b=_(),g=f("div"),v=f("label"),h=f("span"),h.textContent="URL",y=_(),k=f("input"),w=_(),j=f("div"),T=f("label"),M=f("span"),M.textContent=`${m("links.note")}`,N=_(),D=f("textarea"),L=_(),P&&P.c(),E=_(),z=f("div"),R=f("button"),K=F(V),J=_(),H=f("button"),H.textContent=`${m("common.cancel")}`,s(n,"class","svelte-1uygnbi"),s(u,"class","label-text svelte-1uygnbi"),s(p,"type","text"),s(p,"class","svelte-1uygnbi"),s(a,"class","svelte-1uygnbi"),s(o,"class","form-group svelte-1uygnbi"),s(h,"class","label-text svelte-1uygnbi"),s(k,"type","url"),s(k,"class","svelte-1uygnbi"),s(v,"class","svelte-1uygnbi"),s(g,"class","form-group svelte-1uygnbi"),s(M,"class","label-text svelte-1uygnbi"),s(D,"class","svelte-1uygnbi"),s(T,"class","svelte-1uygnbi"),s(j,"class","form-group svelte-1uygnbi"),s(R,"class","btn btn-primary svelte-1uygnbi"),R.disabled=G=!l[50].trim(),s(H,"class","btn svelte-1uygnbi"),s(z,"class","modal-actions svelte-1uygnbi"),s(t,"class","modal svelte-1uygnbi"),s(e,"class","modal-overlay svelte-1uygnbi"),s(e,"role","button"),s(e,"tabindex","0")},m(W,O){S(W,e,O),r(e,t),r(t,n),r(t,i),r(t,o),r(o,a),r(a,u),r(a,c),r(a,p),_e(p,l[49]),r(t,b),r(t,g),r(g,v),r(v,h),r(v,y),r(v,k),_e(k,l[50]),r(t,w),r(t,j),r(j,T),r(T,M),r(T,N),r(T,D),_e(D,l[51]),r(t,L),P&&P.m(t,null),r(t,E),r(t,z),r(z,R),r(R,K),r(z,J),r(z,H),q||(Y=[A(p,"input",l[361]),A(k,"input",l[362]),A(D,"input",l[363]),A(R,"click",l[199]),A(H,"click",l[198]),A(e,"click",kt(l[198])),A(e,"keydown",vt(l[198]))],q=!0)},p(W,O){O[1]&262144&&p.value!==W[49]&&_e(p,W[49]),O[1]&524288&&k.value!==W[50]&&_e(k,W[50]),O[1]&1048576&&_e(D,W[51]),W[52]?P?P.p(W,O):(P=$r(W),P.c(),P.m(t,E)):P&&(P.d(1),P=null),O[1]&524288&&G!==(G=!W[50].trim())&&(R.disabled=G)},d(W){W&&C(e),P&&P.d(),q=!1,pe(Y)}}}function $r(l){let e,t;return{c(){e=f("div"),t=F(l[52]),s(e,"class","rename-error svelte-1uygnbi")},m(n,i){S(n,e,i),r(e,t)},p(n,i){i[1]&2097152&&U(t,n[52])},d(n){n&&C(e)}}}function ea(l){let e,t;return e=new C1({props:{title:l[88],message:l[89],confirmText:l[91],danger:l[90]}}),e.$on("confirm",l[131]),e.$on("cancel",l[132]),{c(){Qe(e.$$.fragment)},m(n,i){qe(e,n,i),t=!0},p(n,i){const o={};i[2]&67108864&&(o.title=n[88]),i[2]&134217728&&(o.message=n[89]),i[2]&536870912&&(o.confirmText=n[91]),i[2]&268435456&&(o.danger=n[90]),e.$set(o)},i(n){t||(ue(e.$$.fragment,n),t=!0)},o(n){me(e.$$.fragment,n),t=!1},d(n){Ye(e,n)}}}function ta(l){let e,t;return e=new y1({props:{item:l[77],content:l[78],loading:l[79],error:l[80]}}),e.$on("close",l[115]),e.$on("openExternal",l[364]),{c(){Qe(e.$$.fragment)},m(n,i){qe(e,n,i),t=!0},p(n,i){const o={};i[2]&32768&&(o.item=n[77]),i[2]&65536&&(o.content=n[78]),i[2]&131072&&(o.loading=n[79]),i[2]&262144&&(o.error=n[80]),e.$set(o)},i(n){t||(ue(e.$$.fragment,n),t=!0)},o(n){me(e.$$.fragment,n),t=!1},d(n){Ye(e,n)}}}function la(l){let e,t;return e=new Bp({props:{onClose:l[213],onSyncRefresh:l[211],initialSection:l[104]}}),{c(){Qe(e.$$.fragment)},m(n,i){qe(e,n,i),t=!0},p(n,i){const o={};i[3]&2048&&(o.initialSection=n[104]),e.$set(o)},i(n){t||(ue(e.$$.fragment,n),t=!0)},o(n){me(e.$$.fragment,n),t=!1},d(n){Ye(e,n)}}}function vg(l){let e,t,n,i;const o=[Zp,Xp,Qp],a=[];function u(c,p){return c[1]?0:c[2]?1:2}return e=u(l),t=a[e]=o[e](l),{c(){t.c(),n=gt()},m(c,p){a[e].m(c,p),S(c,n,p),i=!0},p(c,p){let b=e;e=u(c),e===b?a[e].p(c,p):(pt(),me(a[b],1,1,()=>{a[b]=null}),mt(),t=a[e],t?t.p(c,p):(t=a[e]=o[e](c),t.c()),ue(t,1),t.m(n.parentNode,n))},i(c){i||(ue(t),i=!0)},o(c){me(t),i=!1},d(c){c&&C(n),a[e].d(c)}}}function te(l,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[l];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails call error:",l,t)}return Promise.reject(new Error("Wails not connected: "+l))}function Cn(l){return!l||!(l instanceof Element)?!1:!!l.closest('input, textarea, select, [contenteditable="true"], [contenteditable=""]')}function pl(l,e,t){for(const n of l){if(n.id===e)return n.children=t,n.has_children=t.length>0,!0;if(n.children&&pl(n.children,e,t))return!0}return!1}function Sa(l){return(l==null?void 0:l.sourceKind)||(l==null?void 0:l.captureKind)||(l==null?void 0:l.type)||""}function na(l){return Sa(l)!=="url"&&(l==null?void 0:l.type)!=="link"}function hg(l,e){return{id:l.id,nodeId:l.id,fileId:e.id||e.fileId,name:e.name||l.title,type:"file",size:e.size||0,mime:e.mime||""}}function Ta(l,e,t){for(const n of l){if(n.id===e)return n.children=t,n.has_children=t.length>0,!0;if(n.children&&Ta(n.children,e,t))return!0}return!1}function Pl(l){return l.eventIds&&l.eventIds.length?l.eventIds:l.events&&l.events.length?l.events.map(e=>e.id).filter(Boolean):[]}function Ll(l){try{te("WriteDebugLog",l)}catch{}}function vn(l){return l?l.map(e=>(e._expanded===void 0&&(e._expanded=!1),e)):[]}function ut(l){return l?new Date(l).toLocaleTimeString("ru-RU",{hour:"2-digit",minute:"2-digit"}):""}function sl(l){return l==="note_created"||l==="file_added"||l==="folder_added"||l==="node_created"?"+":l==="file_deleted"||l==="folder_deleted"?"×":l==="file_renamed"||l==="folder_renamed"||l==="note_updated"||l==="node_updated"?"~":l==="file_copied"?"⧉":l==="file_moved"?"→":"•"}function _t(l){if(!l)return"";try{return new Date(l).toLocaleDateString("ru-RU",{day:"numeric",month:"short"})}catch{return l}}function hn(l){const e=String(l||"").trim();if(!e||/[\s]/.test(e)||e.includes("@"))return"";try{const t=new URL(e);return(t.protocol==="http:"||t.protocol==="https:")&&t.hostname?e:""}catch{try{const n=`https://${e}`,i=new URL(n);return i.hostname&&i.hostname.includes(".")?n:""}catch{return""}}}function yg(l){return{"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp"}[l]||"bin"}function kg(l){return new Promise((e,t)=>{const n=new FileReader;n.onload=()=>{const i=String(n.result||""),o=i.indexOf(",");e(o>=0?i.slice(o+1):i)},n.onerror=()=>t(n.error),n.readAsDataURL(l)})}function wg(l){const e=String(l||"").split(/\r?\n/).map(t=>t.trim()).filter(Boolean);return e.length?{url:e[0],title:e[1]||""}:null}function Cg(l){return String(l||"").split(/\r?\n/).map(t=>t.trim()).filter(t=>t&&!t.startsWith("#"))[0]||""}function ia(l){const e=Array.from((l==null?void 0:l.types)||[]);return e.includes("Files")||e.includes("text/uri-list")||e.includes("text/x-moz-url")||e.includes("text/plain")&&!e.includes("application/x-verstak-node")}function Sg(l){return["case","client","project","folder","document","recipe"].includes(l.type)}function It(l,e,t,n){return l=Math.abs(l)%100,l>=5&&l<=20?n:(l%=10,l===1?e:l>=2&&l<=4?t:n)}function Tg(l){return l.targetType==="note"&&l.targetId?{nodeId:l.nodeId,tab:"notes",targetId:l.targetId}:l.targetType==="file"?{nodeId:l.nodeId,tab:"files",targetId:l.targetId,targetPath:l.targetPath}:l.targetType==="folder"?{nodeId:l.nodeId,tab:"files",targetPath:l.targetPath||l.targetId}:{nodeId:l.nodeId}}function vt(l){return e=>{Cn(e.target)||(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),l())}}function jg(l,e,t){let n=null,i=!1,o=!1,a=!1,u=!1,c=[],p=[],b=[],g=null,v=[],h=0,y=!0,k=[],w=null,j="",T="",M=!1,N="",D="all",L="all",E="",z="",R="",V=[],K=!1,G=[],J="",H="";function q(d){return{"vault not open":m("error.vaultNotOpen")}[d]||d}let Y="",P=null,W="overview",O=[],B=null,oe=[],ie=[],ee=[],Z=!1,ne="",re="",fe="",he="",Ke=!1,Me=!1,X=null,le=null,de=[],ye=0,ge=[],Ie=[],Ge=!1,it="",at=[],Ne=null,ze="",Te="",Ue="",Ae="",Pe=null,Be=0,Le=[],Ee="",Se=!1,Fe="",We=null,et=null,we={visible:!1,x:0,y:0,node:null},be=!1,ke="",tt=!1,Je="",xe="open_url",He="",Xe=[{id:"open_url",label:m("action.openUrl")},{id:"open_file",label:m("action.openFile")},{id:"open_folder",label:m("action.openFolder")},{id:"run_command",label:m("action.runCommand")},{id:"run_script",label:m("action.runScript")},{id:"open_terminal",label:m("action.openTerminal")},{id:"launch_app",label:m("action.launchApp")}],Ze=!0,lt=!1,$e=null,se=!1,Ce="",yt="",bt={},At=!1,Oe=null,nt=[],ft=[],Pt=null,Jt="",Hl=!1,bl="",wt={items:[],mode:"copy"},Ve=[],ol=[],Ul=!1,rl=!1,_l=!1,Nn="",Bl=!1,Dn="",Mn="",In=!1,An=m("common.delete"),vl=null,hl=null,yl=!1,kl="",qt="",Yt="",jt=null,Et="",Lt=[],Nt=null,wl=!1,Pn,Kl=null,Gl=!1,al="",Cl="";const ja=[{id:"overview",label:m("tab.overview")},{id:"notes",label:m("tab.notes")},{id:"files",label:m("tab.files")},{id:"links",label:m("tab.links")},{id:"actions",label:m("tab.actions")},{id:"activity",label:m("tab.activity"),group:"service"},{id:"worklog",label:m("tab.worklog"),group:"service"},{id:"inbox",label:m("tab.inbox"),group:"service"}];let Jl=null;oa(async()=>{try{if(t(0,n=await te("GetStartupStatus")),i=!0,n.status==="first_run"){t(1,o=!0),t(68,Ze=!1);return}if(n.status==="recovery"){t(2,a=!0),t(68,Ze=!1);return}}catch(d){t(24,H=String(d))}try{t(23,J=await te("VerstakVersion")||"verstak-gui/v2"),t(4,c=await te("ListSystemViews")||[]),t(5,p=await te("ListWorkspaceTree")||[]),t(6,b=await te("ListEnabledTemplates")||[])}catch(d){t(24,H=String(d)),t(4,c=[{id:"today",label:m("nav.today")},{id:"inbox",label:m("nav.inbox")},{id:"activity",label:m("nav.activity")}]),t(5,p=[]),t(6,b=[])}window.runtime&&window.runtime.EventsOn&&(window.runtime.EventsOn("files-dropped",cc),Jl=()=>window.runtime.EventsOff("files-dropped")),window.addEventListener("keydown",Gn),window.addEventListener("paste",pi),window.addEventListener("dragover",mi),window.addEventListener("dragleave",gi),window.addEventListener("drop",bi),t(68,Ze=!1),pn(),ni()}),En(()=>{Jl&&Jl(),window.removeEventListener("keydown",Gn),window.removeEventListener("paste",pi),window.removeEventListener("dragover",mi),window.removeEventListener("dragleave",gi),window.removeEventListener("drop",bi)});async function Ln(d){t(25,Y=d),t(26,P=null),t(27,W="overview"),t(28,O=[]),oe=[],t(30,ie=[]),t(31,ee=[]),t(44,Ie=[]),t(47,at=[]),t(41,de=[]),t(43,ge=[]),t(53,Pe=null),t(57,Se=!1),t(24,H=""),t(7,g=null),t(8,v=[]),h=0,y=!0,t(9,k=[]),t(10,w=null);try{d==="today"?(t(7,g=await te("ListTodayView")||{cases:[]}),t(41,de=await te("GetSuggestions")||[]),t(42,ye=de.length)):d==="inbox"?t(43,ge=await te("ListInboxNodes")||[]):d==="trash"?await El():d==="journal"?await Ot():d==="activity"&&(t(8,v=await te("ListActivityFeed",50,0)||[]),h=v.length,y=v.length===50)}catch(I){t(24,H=String(I)),t(7,g={cases:[]}),t(43,ge=[]),t(53,Pe=null),t(8,v=[])}}async function Ft(d){t(26,P=d),t(27,W="overview"),t(28,O=[]),oe=[],t(30,ie=[]),t(31,ee=[]),t(41,de=[]),t(76,ft=[]),t(75,nt=[]),t(74,Oe=null),t(77,Pt=null),t(78,Jt=""),t(82,Ve=[]),ol=[],t(29,B=null),t(57,Se=!1),t(62,be=!1),t(24,H=""),t(22,G=[]),await Sl(d.id)}async function Sl(d){try{t(28,O=await te("ListNotes",d)||[])}catch{}try{oe=await te("ListFiles",d)||[]}catch{}try{t(30,ie=await te("ListActions",d)||[])}catch{}try{t(31,ee=vn(await te("ListWorklog",d)))}catch{}try{t(44,Ie=await te("ListInboxNodesForTarget",d)||[])}catch{t(44,Ie=[])}try{t(47,at=await te("ListLinks",d)||[])}catch{t(47,at=[])}try{t(41,de=await te("GetSuggestions")||[]),t(42,ye=de.length)}catch{t(41,de=[]),t(42,ye=0)}try{t(22,G=await te("ListActivityByNode",d,50,0)||[])}catch{}}async function ct(d){t(73,At=!0);try{let I=await te("ListItems",d)||[];I.sort((x,ce)=>x.type!==ce.type?x.type==="folder"?-1:1:(x.name||"").localeCompare(ce.name||"")),t(76,ft=I)}catch{t(76,ft=[])}t(73,At=!1)}async function ql(d){if(!P)return;try{const x=await te("GetNodeDetail",d);x&&t(75,nt=[...nt,{id:d,name:x.title}])}catch{t(75,nt=[...nt,{id:d,name:"..."}])}t(74,Oe=d),t(72,bt={...bt,[d]:!0});const I=await te("ListWorkspaceChildren",d)||[];pl(p,d,I),t(5,p=[...p]),await ct(d)}function Fn(){if(nt.length<2)t(75,nt=[]),t(74,Oe=null),ct(P.id);else{const d=nt[nt.length-2];t(75,nt=nt.slice(0,-1)),t(74,Oe=d.id),ct(d.id)}}function Rn(d){const I=nt[d];t(75,nt=nt.slice(0,d+1)),t(74,Oe=I.id),ct(I.id)}async function cl(d){t(77,Pt=d),t(78,Jt=""),t(80,bl=""),t(79,Hl=!0);try{Xd(d)?t(78,Jt=await te("GetFileBase64",d.fileId)||""):Zd(d)&&t(78,Jt=await te("ReadFileText",d.fileId)||"")}catch(I){t(80,bl=String(I))}t(79,Hl=!1)}function Yl(){t(77,Pt=null),t(78,Jt=""),t(80,bl="")}async function Ea(){const d=prompt(m("file.namePrompt"));if(!(!d||!d.trim()))try{const I=Oe||P.id;await te("CreateEmptyFile",I,d.trim()),await ct(I),await Zl(I)}catch(I){t(24,H=String(I))}}async function zn(d){try{await te("DuplicateNode",d);const I=Oe||P.id;await ct(I),await Zl(I)}catch(I){t(24,H=String(I))}}function On(d){const I=ft.find(x=>x.id===d);I&&Xl(I.id,I.name)}function Vn(d){t(81,wt={items:[d],mode:"cut"})}function Wn(d){t(81,wt={items:[d],mode:"copy"})}async function Hn(){if(wt.items.length===0)return;const d=Oe||P.id;try{if(wt.mode==="copy")for(const I of wt.items)await te("DuplicateNode",I);else for(const I of wt.items)await te("MoveNode",I,d);t(81,wt={items:[],mode:"copy"}),await ct(d)}catch(I){t(24,H=String(I))}}function Un(d){Ve.includes(d)?t(82,Ve=Ve.filter(I=>I!==d)):t(82,Ve=[...Ve,d])}function Bn(d){t(82,Ve=[d])}function Na(){t(82,Ve=ft.map(d=>d.id))}function Kn(d){if(ft.length===0)return;const I=Ve.length>0?Ve[Ve.length-1]:ft[0].id,x=ft.findIndex(St=>St.id===I),ce=ft.findIndex(St=>St.id===d);if(x===-1||ce===-1)return;const Re=Math.min(x,ce),dt=Math.max(x,ce),$t=ft.slice(Re,dt+1).map(St=>St.id),ul=new Set(Ve);$t.forEach(St=>ul.add(St)),t(82,Ve=[...ul])}function Da(){t(82,Ve=[])}function Ql(d){return d.length>0?d:ft.map(I=>I.id)}async function Ma(){const d=Ql(Ve),I=ft.find(ce=>ce.id===d[0]);let x;d.length===1&&(I==null?void 0:I.type)==="folder"?x=m("delete.folder"):d.length===1?x=m("delete.file"):x=m("delete.files",{count:d.length}),Ct({title:m("delete.confirmTitle"),message:m("delete.confirmMessage")+" "+x+"?",confirmText:m("common.delete"),danger:!0,onConfirm:async()=>{for(const Re of d)try{await te("DeleteFileOrFolder",Re)}catch(dt){t(24,H=String(dt))}t(82,Ve=[]);const ce=Oe||P.id;await ct(ce)}})}function Ia(){const d=Ql(Ve);t(81,wt={items:d,mode:"cut"}),t(82,Ve=[])}function Aa(){const d=Ql(Ve);t(81,wt={items:d,mode:"copy"}),t(82,Ve=[])}function Pa(d,I){d.stopPropagation();const x=Ve.includes(I)?Ve:[I];ol=x,d.dataTransfer.effectAllowed="move",d.dataTransfer.setData("text/plain",x.join(","))}function La(d,I){const x=ft.find(ce=>ce.id===I);x&&x.type==="folder"&&(d.preventDefault(),d.stopPropagation(),d.dataTransfer.dropEffect="move")}async function Fa(d,I){if(d.preventDefault(),d.stopPropagation(),ol.length!==0){for(const x of ol)try{await te("MoveNode",x,I)}catch(ce){t(24,H=String(ce))}ol=[],t(82,Ve=[]),await ct(Oe||P.id)}}function Gn(d){if(!Cn(d.target)&&W==="files")if(d.ctrlKey||d.metaKey)d.key==="c"||d.key==="C"?(d.preventDefault(),Aa()):d.key==="x"||d.key==="X"?(d.preventDefault(),Ia()):d.key==="v"||d.key==="V"?(d.preventDefault(),Hn()):d.key==="a"||d.key==="A"?(d.preventDefault(),Na()):d.key==="o"||d.key==="O"?(d.preventDefault(),Ra()):d.key==="Enter"&&(d.preventDefault(),Jn());else if(d.key==="Enter")d.preventDefault(),Jn();else if(d.key==="Delete"||d.key==="Backspace"){if(Pt){d.preventDefault(),Yl();return}if(Ve.length>0){d.preventDefault(),Ma();return}if(d.key==="Backspace"&&nt.length>0){d.preventDefault(),Fn();return}}else if(d.key==="Escape"){if(Pt){Yl();return}if(Ve.length>0){Da();return}}else d.key==="F2"&&(d.preventDefault(),za())}function Jn(){if(Ve.length===1){const d=ft.find(I=>I.id===Ve[0]);d&&(d.type==="folder"?ql(d.id):cl(d))}}function Ra(){if(Ve.length===1){const d=ft.find(I=>I.id===Ve[0]);d&&d.fileId&&te("OpenFile",d.fileId)}}function Xl(d,I){kl=d,t(93,qt=I),t(94,Yt=""),t(92,yl=!0)}function za(){if(Ve.length===1){const d=ft.find(I=>I.id===Ve[0]);d&&Xl(d.id,d.name)}}async function qn(){const d=qt.trim();if(!d){t(94,Yt=m("rename.emptyError"));return}try{await te("ValidateName",d)}catch{t(94,Yt=m("rename.invalidError"));return}t(92,yl=!1);const I=kl;kl="";try{await te("RenameNode",I,d),P&&P.id===I&&t(26,P={...P,title:d}),await zt(),Oe&&await ct(Oe)}catch(x){t(24,H=String(x))}}function Oa(){t(92,yl=!1),kl="",t(93,qt=""),t(94,Yt="")}function Va(d){d.key==="Enter"?qn():t(94,Yt="")}function Ct(d){t(88,Dn=d.title||m("common.confirm")),t(89,Mn=d.message||""),t(90,In=d.danger!==void 0?d.danger:!0),t(91,An=d.confirmText||m("common.delete")),vl=d.onConfirm||null,hl=d.onCancel||null,t(87,Bl=!0)}function Yn(){t(87,Bl=!1),vl=null,hl=null}function Wa(){vl&&vl(),Yn()}function Ha(){hl&&hl(),Yn()}function Qn(d){t(59,We=we.node),t(60,et=d),t(58,Fe=""),t(57,Se=!0),Qt()}function Ua(){t(59,We=null),t(60,et=void 0),t(58,Fe=""),t(57,Se=!0)}function Ba(){t(57,Se=!1),t(58,Fe=""),t(59,We=null),t(60,et=void 0)}async function Xn(){if(!(!Fe.trim()||et===void 0))try{const d=We?We.id:"",I=et?et.id:"",x=await te("CreateNodeFromTemplate",d,Fe.trim(),I);t(57,Se=!1),t(58,Fe="");const ce=x?x.id:null;if(t(59,We=null),t(60,et=void 0),d){t(72,bt={...bt,[d]:!0});const Re=await te("ListWorkspaceChildren",d)||[];pl(p,d,Re),t(5,p=[...p])}else t(5,p=await te("ListWorkspaceTree")||p);if(ce){const Re=await te("GetNodeDetail",ce);Re&&(t(25,Y=""),Ft(Re))}}catch(d){t(24,H=String(d))}}function Ka(d,I){t(61,we={visible:!0,x:d.clientX,y:d.clientY,node:I})}function Qt(){t(61,we={visible:!1,x:0,y:0,node:null})}async function Ga(d){const I=!bt[d];if(t(72,bt={...bt,[d]:I}),!I)return;const x=await te("ListWorkspaceChildren",d)||[];pl(p,d,x),t(5,p=[...p])}async function Ja(d,I){if(!(!d||!I||d===I))try{const x=await te("MoveNode",d,I);await zt();const ce=await te("GetNodeDetail",d);ce&&(t(25,Y=""),Ft(ce))}catch(x){t(24,H=String(x))}}async function qa(d){d.preventDefault(),d.stopPropagation();try{const I=d.dataTransfer.getData("text/plain");if(!I)return;const x=await te("GetNodeDetail",I);if(!x||!x.parent_id)return;await te("MoveNode",I,""),await zt();const ce=await te("GetNodeDetail",I);ce&&(t(25,Y=""),Ft(ce))}catch(I){t(24,H=String(I))}}function Ya(d){d.preventDefault(),d.dataTransfer.dropEffect="move",t(83,Ul=!0)}function Qa(d){t(83,Ul=!1)}function Zn(d){Xl(d.id,d.title),Qt()}function xn(d){Qt(),Ct({title:m("delete.confirmTitle"),message:m("delete.confirmMessage")+" "+d.title+"?",confirmText:m("common.delete"),danger:!0,onConfirm:async()=>{try{await te("DeleteNode",d.id),await zt(),await ni(),P&&P.id===d.id&&t(26,P=null)}catch(I){t(24,H=String(I))}}})}async function Rt(d){Qt();const I=typeof d=="string"?d:d.id;try{await te("OpenFolder",I)}catch(x){t(24,H=String(x))}}async function Xt(d){const I=Sa(d);try{if(I==="url"||d.type==="link"){if(!d.url)throw new Error("url required");await te("OpenURL",d.url);return}if(I==="text"||d.type==="note"){const x=await te("ReadNote",d.id);t(29,B={id:d.id,title:d.title,content:x||"",dirty:!1});return}if(I==="folder"||d.type==="folder"){t(25,Y=""),t(26,P=d),t(27,W="files"),t(75,nt=[]),t(74,Oe=null),t(82,Ve=[]),t(77,Pt=null),await Sl(d.id),await ct(d.id);return}if(I==="file"||I==="image"||d.type==="file"){const ce=(await te("ListFiles",d.id)||[])[0];if(!ce)throw new Error("file record not found");const Re=hg(d,ce);Ri(Re)?await cl(Re):await te("OpenFile",Re.fileId);return}await Tt(d.id)}catch(x){t(24,H=String(x))}}async function $n(d){Qt();try{await te("MoveNode",d.id,""),await zt();const I=await te("GetNodeDetail",d.id);I&&(t(25,Y=""),Ft(I))}catch(I){t(24,H=String(I))}}async function zt(){const d=Object.keys(bt).filter(x=>bt[x]),I=await te("ListWorkspaceTree")||[];for(const x of d){const Re=(await te("ListWorkspaceChildren",x)||[]).map(dt=>({...dt}));Ta(I,x,Re)}t(5,p=I)}async function Zl(d){const I=await te("ListWorkspaceChildren",d)||[];pl(p,d,I),t(5,p=[...p])}function ei(){t(62,be=!0),t(63,ke="")}function Xa(){t(62,be=!1),t(63,ke="")}async function ti(){if(!(!ke.trim()||!P))try{const d=await te("CreateNote",P.id,ke.trim());t(28,O=[...O,d&&d.id?d:{id:Date.now().toString(),title:ke.trim(),createdAt:new Date().toISOString()}]),t(62,be=!1),t(63,ke="")}catch{const I={id:Date.now().toString(),title:ke.trim(),createdAt:new Date().toISOString()};t(28,O=[...O,I]),t(62,be=!1),t(63,ke="")}}async function Zt(d){if(B&&B.dirty){Ct({title:m("note.unsavedTitle"),message:m("note.unsavedMessage"),confirmText:m("note.unsavedClose"),danger:!1,onConfirm:async()=>{await li(d)}});return}await li(d)}async function li(d){try{const I=await te("ReadNote",d.id);t(29,B={id:d.id,title:d.title,content:I||"",dirty:!1})}catch{t(29,B={id:d.id,title:d.title,content:"# "+d.title+`
|
||
|
||
`,dirty:!1})}}function Za(){if(B&&B.dirty){Ct({title:m("note.unsavedTitle"),message:m("note.unsavedMessage"),confirmText:m("note.unsavedClose"),danger:!1,onConfirm:()=>{t(29,B=null)}});return}t(29,B=null)}function xa(d){B&&(t(29,B.content=d.target.value,B),t(29,B.dirty=!0,B))}async function $a(){if(B)try{await te("SaveNote",B.id,B.content),t(29,B.dirty=!1,B)}catch{t(29,B.dirty=!1,B)}}function Tl(d=null){t(39,X=d),t(40,le=null),t(33,ne=d?d.summary:""),t(34,re=d?String(d.minutes||""):""),t(35,fe=d&&d.date||""),t(36,he=d&&d.details||""),t(37,Ke=d?!!d.billable:!1),t(38,Me=d?!!d.approximate:!1),t(32,Z=!0)}function ec(){t(32,Z=!1),t(39,X=null),t(40,le=null)}async function xl(d=""){const I=d||(P?P.id:"");P&&P.id===I&&t(31,ee=vn(await te("ListWorklog",P.id))||ee),Y==="journal"&&await Ot()}async function tc(){const d=parseInt(re,10);if(!(!ne.trim()||isNaN(d)||d<=0)&&!(!le&&!X&&!P)){try{if(le){const I=JSON.stringify(Pl(le));await te("AcceptSuggestionFull",le.nodeId,ne.trim(),he,fe,d,Me,Ke,I),await jl()}else X?(await te("UpdateWorklogEntry",X.id,ne.trim(),he,fe,d,Me,Ke),await xl(X.nodeId)):(await te("CreateWorklogFull",P.id,ne.trim(),he,fe,d,Me,Ke),await xl(P.id))}catch(I){t(24,H=String(I));return}t(32,Z=!1),t(39,X=null),t(40,le=null)}}function $l(d){Ct({title:m("worklog.deleteEntry"),message:m("worklog.deleteConfirm"),confirmText:m("common.delete"),danger:!0,onConfirm:async()=>{try{await te("DeleteWorklogEntry",d.id),await xl(d.nodeId)}catch(I){t(24,H=String(I))}}})}async function jl(){t(41,de=await te("GetSuggestions")||[]),t(42,ye=de.length),P&&t(31,ee=vn(await te("ListWorklog",P.id))),Y==="journal"&&await Ot()}async function El(){t(53,Pe=await te("ListTrash")||{nodes:[],entries:[],trashPath:"",count:0}),t(54,Be=Pe.count||0),t(55,Le=Le.filter(d=>(Pe.nodes||[]).some(I=>I.id===d))),Ee&&!(Pe.nodes||[]).some(d=>d.id===Ee)&&t(56,Ee="")}async function ni(){try{t(54,Be=await te("TrashCount")||0)}catch{t(54,Be=0)}}function lc(){const d=(Pe==null?void 0:Pe.nodes)||[];return Ee?d.filter(I=>I.parentId===Ee):d.filter(I=>!I.parentId||!d.some(x=>x.id===I.parentId))}function ii(d){t(55,Le=Le.includes(d)?Le.filter(I=>I!==d):[...Le,d])}function en(d){return Le.length>0?Le:[d]}async function tn(d){try{await te("RestoreTrashNodesJSON",JSON.stringify(d)),await zt(),await El()}catch(I){t(24,H=String(I))}}async function ln(d){Ct({title:m("delete.confirmTitle"),message:m("delete.confirmMessage")+" "+d.length+"?",confirmText:m("common.delete"),danger:!0,onConfirm:async()=>{try{await te("PurgeTrashNodesJSON",JSON.stringify(d)),await El()}catch(I){t(24,H=String(I))}}})}async function nc(){Ct({title:m("delete.confirmTitle"),message:m("trash.empty")+"?",confirmText:m("common.delete"),danger:!0,onConfirm:async()=>{try{await te("EmptyTrash"),await El()}catch(d){t(24,H=String(d))}}})}function Nl(d){t(40,le=d),t(39,X=null),t(33,ne=d.summary||""),t(34,re=String(d.suggestedMin||"")),t(35,fe=""),t(36,he=""),t(37,Ke=!1),t(38,Me=!0),t(32,Z=!0)}async function Dl(d){try{await te("DismissSuggestion",d.nodeId,JSON.stringify(Pl(d))),await jl()}catch(I){t(24,H=String(I))}}async function nn(d){try{const I=Pl(d),x=JSON.stringify(I);Ll("acceptTodaySuggestion: nodeId="+d.nodeId+" eventIds="+x+" events="+JSON.stringify((d.events||[]).map(ce=>({id:ce.id,type:ce.eventType,title:ce.title})))),await te("AcceptSuggestionWith",d.nodeId,d.summary,d.suggestedMin,"",x),await jl()}catch(I){Ll("acceptTodaySuggestion error: "+I)}}async function si(d){try{const I=Pl(d),x=JSON.stringify(I);Ll("acceptJournalSuggestion: nodeId="+d.nodeId+" eventIds="+x+" events="+JSON.stringify((d.events||[]).map(ce=>({id:ce.id,type:ce.eventType,title:ce.title})))),await te("AcceptSuggestionWith",d.nodeId,d.summary,d.suggestedMin,"",x),await jl()}catch(I){Ll("acceptJournalSuggestion error: "+I)}}async function Ot(){try{const[d,I,x]=await Promise.all([te("ListWorklogReport",j,T,N,M,D,L),te("WorklogReportSummary",j,T,N,M,D,L),te("GetSuggestions")]);if(t(9,k=(d||[]).map(ce=>(ce._expanded===void 0&&(ce._expanded=!1),ce))),t(10,w=I||null),t(41,de=x||[]),t(42,ye=de.length),N&&!E)if(d&&d.length>0&&d[0].nodePath)t(17,E=d[0].nodePath);else try{t(17,E=await te("GetNodeTitle",N))}catch{t(17,E="")}}catch{t(9,k=[]),t(10,w=null),t(41,de=[]),t(42,ye=0)}}async function Ml(d){try{const I=await te("SaveWorklogReport",d,j,T,N,M,D,L);t(18,z=I),setTimeout(()=>t(18,z=""),4e3)}catch(I){if(String(I).includes("отменено"))return;t(18,z="Ошибка: "+String(I)),setTimeout(()=>t(18,z=""),6e3)}}let oi;async function sn(d){if(d._expanded=!d._expanded,t(9,k),d._expanded&&!d._events&&d._hasEvents===void 0)try{d._events=await te("GetWorklogEntryEvents",d.id)||[],d._hasEvents=d._events.length>0,t(9,k)}catch{d._events=[],d._hasEvents=!1,t(9,k)}}async function on(d){if(d._expanded=!d._expanded,d._expanded&&d.source==="suggestion"&&!d._events&&d._hasEvents===void 0)try{d._events=await te("GetWorklogEntryEvents",d.id)||[],d._hasEvents=d._events.length>0}catch(I){I._events=[],I._hasEvents=!1}t(31,ee)}async function ic(){const d=R.trim();if(!d||d.length<2){t(20,V=[]),t(21,K=!1);return}try{t(20,V=await te("SearchNodes",d)||[]),t(21,K=V.length>0)}catch{t(20,V=[]),t(21,K=!1)}}function sc(){clearTimeout(oi),oi=setTimeout(ic,200)}function ri(d){t(14,N=d.id),t(17,E=d.path||d.title),t(13,M=!0),t(19,R=""),t(20,V=[]),t(21,K=!1),Ot()}function ai(){t(14,N=""),t(13,M=!1),t(17,E=""),t(19,R=""),t(20,V=[]),t(21,K=!1),Ot()}function oc(){t(11,j=""),t(12,T=""),t(14,N=""),t(13,M=!1),t(15,D="all"),t(16,L="all"),t(17,E=""),t(19,R=""),t(20,V=[]),t(21,K=!1),Ot()}async function ci(){const d=await te("PickFile");if(!d)return;const I=Oe||P.id;await ui(I,d)}async function rc(){const d=await te("PickDirectory");if(!d)return;const I=Oe||P.id;await ui(I,d)}async function ui(d,I){t(69,lt=!0);try{const x=await te("PreviewImport",I);t(70,$e=x),Ce=I,yt=d,t(71,se=!0)}catch(x){t(24,H=String(x))}t(69,lt=!1)}async function rn(d){try{const I=yt||P.id,x=d==="copy"?await te("AddPathCopy",I,Ce):await te("AddPathLink",I,Ce);t(71,se=!1),t(70,$e=null),t(75,nt=[]),t(74,Oe=null),await Promise.all([Sl(I),ct(I),Zl(I)])}catch(I){t(24,H=String(I))}}function ac(){t(71,se=!1),t(70,$e=null)}async function fi({id:d,type:I}){const x=m(I==="folder"?"delete.folder":"delete.file");Ct({title:m("delete.confirmTitle"),message:m("delete.confirmMessage")+" "+x+"?",confirmText:m("common.delete"),danger:!0,onConfirm:async()=>{try{await te("DeleteFileOrFolder",d),oe=oe.filter(Re=>Re.nodeId!==d);const ce=Oe||P.id;await ct(ce)}catch(ce){t(24,H=String(ce))}}})}async function cc(d){!d||d.length===0||await kc(d,"drop")}function uc(d){return{note_created:m("event.noteCreated"),note_updated:m("event.noteUpdated"),note_deleted:"Заметка удалена",file_added:m("event.fileAdded"),file_deleted:m("event.fileDeleted"),file_renamed:m("event.fileRenamed"),file_copied:m("event.fileCopied"),file_moved:m("event.fileMoved"),folder_added:m("event.folderAdded"),folder_deleted:m("event.folderDeleted"),folder_renamed:m("event.folderRenamed"),folder_moved:"Папка перемещена",node_created:m("event.caseCreated"),node_updated:m("event.caseUpdated"),node_deleted:"Узел удалён",action_created:"Действие создано",action_done:"Действие выполнено",worklog_added:"Запись времени добавлена"}[d]||d}function fc(d){return{project:m("kind.project"),client:m("kind.client"),document:m("kind.document"),recipe:m("kind.recipe"),folder:m("kind.folder"),note:m("kind.note"),file:m("kind.file"),archive:m("kind.archive"),case:m("kind.case"),link:m("kind.link")}[d]||d||m("kind.case")}function dc(d){return d?m("capture.kind."+d):""}function pc(d){return d?m("capture.source."+d):""}function mc(d){const I=[];return d.captureKind&&I.push(dc(d.captureKind)),d.captureSource&&I.push(pc(d.captureSource)),d.captureContextLabel&&I.push(`${m("inbox.capturedIn")}: ${d.captureContextLabel}`),d.suggestedTargetLabel&&I.push(`${m("inbox.suggestedTarget")}: ${d.suggestedTargetLabel}`),I.push(_t(d.capturedAt||d.createdAt)),I.filter(Boolean).join(" · ")}function gc(d){!d||!d.id||(t(43,ge=[d,...ge.filter(I=>I.id!==d.id)]),P&&(d.captureContextNodeId===P.id||d.suggestedTargetNodeId===P.id)&&t(44,Ie=[d,...Ie.filter(I=>I.id!==d.id)]))}function bc(){return P&&P.id?{contextType:"node",nodeId:P.id,suggestedTargetNodeId:P.id}:Y?{contextType:"section",section:Y}:{contextType:"global",section:"root"}}function Vt(){return JSON.stringify(bc())}function _c(){return P&&P.id?m("capture.dropOverlayNode",{title:P.title}):m("capture.dropOverlayGlobal")}async function xt(d=null){d&&gc(d),Y==="inbox"&&t(43,ge=await te("ListInboxNodes")||ge)}async function vc(d,I){const x=String(d||"").trim();if(!x)return null;const ce=hn(x),Re=ce?await te("CaptureURLWithContext",ce,"",I,Vt()):await te("CaptureTextWithContext",x,I,Vt());return await xt(Re),Re}async function di(d,I,x){const ce=String(d||"").trim();if(!ce)return null;const Re=await te("CaptureURLWithContext",ce,I||"",x,Vt());return await xt(Re),Re}async function hc(d,I){if(!d)return null;const x=d.path||d.webkitRelativePath||"";if(x){const dt=await te("CapturePathWithContext",x,I,Vt());return await xt(dt),dt}const ce=await kg(d),Re=await te("CaptureFileDataWithContext",d.name||`clipboard.${yg(d.type)}`,ce,I,Vt());return await xt(Re),Re}async function an(d,I){var ul,St,Ni;if(!d)return!1;let x=!1;const ce=Array.from(d.files||[]);for(const Ut of ce)await hc(Ut,I),x=!0;const Re=(ul=d.getData)==null?void 0:ul.call(d,"text/x-moz-url");if(Re){const Ut=wg(Re),fl=Ut?hn(Ut.url):"";if(fl)return await di(fl,Ut.title,I),!0}const dt=(St=d.getData)==null?void 0:St.call(d,"text/uri-list");if(dt){const Ut=Cg(dt),fl=hn(Ut);if(fl)return await di(fl,"",I),!0}const $t=(Ni=d.getData)==null?void 0:Ni.call(d,"text/plain");return String($t||"").trim()&&(await vc($t,I),x=!0),x}async function yc(){if(!Ge){t(46,it=""),t(45,Ge=!0);try{const d=await te("CaptureClipboardTextWithContext",Vt());await xt(d),t(46,it=m("inbox.captured"))}catch(d){t(24,H=String(d).includes("clipboard is empty")?m("inbox.clipboardEmpty"):m("inbox.clipboardUnavailable"))}finally{t(45,Ge=!1)}}}async function kc(d,I="drop"){if(!Ge){t(45,Ge=!0),t(46,it="");try{for(const x of d){const ce=await te("CapturePathWithContext",x,I,Vt());await xt(ce)}t(46,it=m("inbox.captured"))}catch(x){t(24,H=String(x))}finally{t(45,Ge=!1),t(84,rl=!1)}}}async function pi(d){if(!(o||a)&&!Cn(d.target)&&d.clipboardData)try{await an(d.clipboardData,"paste")&&(d.preventDefault(),t(46,it=m("inbox.captured")))}catch(I){t(24,H=String(I))}}function mi(d){ia(d.dataTransfer)&&(d.preventDefault(),d.dataTransfer.dropEffect="copy",t(86,Nn=_c()),t(85,_l=!0))}function gi(d){(d.clientX<=0||d.clientY<=0||d.clientX>=window.innerWidth||d.clientY>=window.innerHeight)&&t(85,_l=!1)}async function bi(d){if(ia(d.dataTransfer)){d.preventDefault(),t(85,_l=!1);try{await an(d.dataTransfer,"drop")&&t(46,it=m("inbox.captured"))}catch(I){t(24,H=String(I))}}}function wc(d){d.preventDefault(),d.dataTransfer.dropEffect="copy",t(84,rl=!0)}function Cc(){t(84,rl=!1)}async function Sc(d){d.preventDefault(),d.stopPropagation(),t(84,rl=!1),await an(d.dataTransfer,"drop")&&t(46,it=m("inbox.captured"))}function cn(d){t(95,jt=d),t(96,Et=""),t(97,Lt=[]),t(98,Nt=null)}function _i(){t(95,jt=null),t(96,Et=""),t(97,Lt=[]),t(98,Nt=null),t(99,wl=!1)}async function Tc(){const d=Et.trim();if(!d||d.length<2){t(97,Lt=[]);return}t(99,wl=!0);try{const I=await te("SearchNodes",d)||[];t(97,Lt=I.filter(x=>Sg(x)&&x.id!==(jt==null?void 0:jt.id)))}catch{t(97,Lt=[])}finally{t(99,wl=!1)}}function jc(d){t(96,Et=d.target.value),t(98,Nt=null),clearTimeout(Pn),Pn=setTimeout(Tc,200)}function vi(d){t(98,Nt=d),t(96,Et=d.path||d.title),t(97,Lt=[])}async function hi(){if(!(!jt||!Nt))try{await yi(jt,Nt.id),_i()}catch(d){t(24,H=String(d))}}async function yi(d,I){!d||!I||(await te("ResolveInboxNode",d.id,I),t(43,ge=ge.filter(x=>x.id!==d.id)),t(44,Ie=Ie.filter(x=>x.id!==d.id)),await zt(),P&&await Sl(P.id))}async function un(d){const I=(d==null?void 0:d.suggestedTargetNodeId)||(P==null?void 0:P.id)||"";if(I)try{await yi(d,I)}catch(x){t(24,H=String(x))}}function fn(d){Ct({title:m("inbox.deleteTitle"),message:m("inbox.deleteConfirm",{title:d.title}),confirmText:m("common.delete"),danger:!0,onConfirm:async()=>{try{await te("DeleteInboxNode",d.id),t(43,ge=ge.filter(I=>I.id!==d.id)),t(44,Ie=Ie.filter(I=>I.id!==d.id))}catch(I){t(24,H=String(I))}}})}function ki(d){t(48,Ne=d),t(49,ze=d.title||""),t(50,Te=d.url||""),t(51,Ue=d.note||""),t(52,Ae="")}function wi(){t(48,Ne=null),t(49,ze=""),t(50,Te=""),t(51,Ue=""),t(52,Ae="")}async function Ec(){if(!(!Ne||!Te.trim()))try{const d=await te("UpdateLink",Ne.id,ze.trim(),Te.trim(),Ue);t(47,at=at.map(I=>I.id===d.id?d:I)),wi()}catch(d){t(52,Ae=String(d))}}async function Ci(d){Ct({title:m("links.deleteTitle"),message:m("links.deleteConfirm",{title:d.title}),confirmText:m("common.delete"),danger:!0,onConfirm:async()=>{try{await te("DeleteLink",d.id),t(47,at=at.filter(I=>I.id!==d.id))}catch(I){t(24,H=String(I))}}})}async function Si(d){try{await te("OpenLink",d.id)}catch(I){t(24,H=String(I))}}async function Ti(d){var I,x;try{await((x=(I=navigator.clipboard)==null?void 0:I.writeText)==null?void 0:x.call(I,d.url)),t(52,Ae=m("links.copied"))}catch{t(52,Ae=m("links.copyUnavailable"))}}function Nc(){t(64,tt=!0),t(65,Je=""),t(66,xe="open_url"),t(67,He="")}function Dc(){t(64,tt=!1),t(65,Je=""),t(67,He="")}async function dn(){if(!(!Je.trim()||!He.trim()||!P))try{const d=await te("CreateAction",P.id,xe,Je.trim(),He.trim());d&&d.id&&t(30,ie=[...ie,d]),t(64,tt=!1),t(65,Je=""),t(67,He="")}catch(d){t(24,H=String(d))}}async function ji(d){try{await te("DeleteAction",d),t(30,ie=ie.filter(I=>I.id!==d))}catch(I){t(24,H=String(I))}}function Mc(d){const I=Xe.find(x=>x.id===d);return I?I.label:d}async function Tt(d){try{const I=await te("GetNodeDetail",d);I&&Ft(I)}catch(I){t(24,H=String(I))}}async function Wt(d){const I=Tg(d),x=I.nodeId;if(x)try{const ce=await te("GetNodeDetail",x);if(!ce)return;if(Ft(ce),I.tab==="notes"){if(t(27,W="notes"),I.targetId){try{t(28,O=await te("ListNotes",x)||[])}catch{}const Re=O.find(dt=>dt.id===I.targetId);Re&&setTimeout(()=>Zt(Re),100)}}else if(I.tab==="files")if(t(27,W="files"),I.targetId)try{const Re=await te("GetNodeDetail",I.targetId);if(Re&&Re.parent_id){await ct(Re.parent_id);const dt=ft.find($t=>$t.id===I.targetId);dt&&dt.type==="file"&&Ri(dt)&&setTimeout(()=>cl(dt),150)}else await ct(x)}catch{await ct(x)}else await ct(x)}catch(ce){t(24,H=String(ce))}}async function Ht(d){return Wt(d)}async function pn(){try{t(100,Kl=await te("SyncStatus"))}catch{t(100,Kl={configured:!1,serverUrl:"",deviceId:"",unpushedOps:0,lastSyncAt:"",syncInterval:0})}}let Ei="general";function mn(d){t(104,Ei=d||"general"),t(3,u=!0)}function Ic(){t(3,u=!1)}function Ac(d){const I=Array.isArray(d==null?void 0:d.conflicts)?d.conflicts:[],x=Array.isArray(d==null?void 0:d.applyErrors)?d.applyErrors:[],ce=[];return I.length>0&&ce.push(m("sync.conflictsCount",{count:I.length})),x.length>0&&ce.push(m("sync.applyErrorsCount",{count:x.length})),ce.join(" · ")}async function Pc(){t(101,Gl=!0),t(102,al=""),t(103,Cl="");try{const d=await te("SyncNow");await pn(),t(102,al=Ac(d)),t(103,Cl=al?"warning":"")}catch(d){console.error("sync error:",d),t(102,al=`${m("sync.status.error")}: ${(d==null?void 0:d.message)||d}`),t(103,Cl="warning")}finally{t(101,Gl=!1)}}function Lc(d){t(1,o=!1),t(0,n=d),t(68,Ze=!1),window.location.reload()}function Fc(d){t(2,a=!1),t(0,n=d),t(68,Ze=!1),window.location.reload()}const Rc=d=>d.nodeId===P.id,zc=d=>Ln(d.id),Oc=()=>mn("sync"),Vc=()=>mn(),Wc=()=>t(24,H=""),Hc=()=>t(24,H=""),Uc=()=>t(24,H="");function Bc(){B.content=this.value,t(29,B)}const Kc=d=>{t(27,W=d.id),d.id==="files"&&P&&ft.length===0&&!Oe&&ct(P.id)},Gc=()=>{t(27,W="notes"),ei()},Jc=()=>{t(27,W="files"),ci()},qc=()=>t(27,W="worklog"),Yc=d=>Zt(d),Qc=d=>Zt(d);function Xc(){ke=this.value,t(63,ke)}const Zc=d=>d.key==="Enter"&&ti(),xc=d=>Zt(d),$c=d=>Zt(d),eu=d=>{const I=d.detail;I===0?(t(75,nt=[]),t(74,Oe=null),ct(P.id)):Rn(I-1)},tu=d=>ql(d.detail),lu=d=>cl(d.detail),nu=d=>te("OpenFile",d.detail),iu=d=>te("OpenFolder",d.detail),su=d=>fi(d.detail),ou=d=>On(d.detail.id),ru=d=>zn(d.detail),au=d=>Vn(d.detail),cu=d=>Wn(d.detail),uu=d=>Bn(d.detail),fu=d=>Un(d.detail),du=d=>Kn(d.detail),pu=d=>un(d),mu=d=>cn(d),gu=d=>fn(d),bu=d=>Xt(d),_u=(d,I)=>I.key==="Enter"&&Xt(d),vu=d=>Si(d),hu=d=>Ti(d),yu=d=>ki(d),ku=d=>Ci(d),wu=d=>te("RunAction",d.id),Cu=d=>ji(d.id),Su=()=>Tl(),Tu=d=>d.nodeId===P.id,ju=d=>Nl(d),Eu=d=>nn(d),Nu=d=>Dl(d),Du=(d,I,x)=>t(41,I[x]._expanded=!d._expanded,de,t(26,P)),Mu=(d,I,x,ce)=>ce.key==="Enter"&&t(41,I[x]._expanded=!d._expanded,de,t(26,P)),Iu=d=>Wt(d),Au=d=>Rt(d.nodeId),Pu=d=>Tl(d),Lu=d=>$l(d),Fu=d=>Wt(d),Ru=d=>Rt(d.nodeId),zu=d=>on(d),Ou=(d,I)=>I.key==="Enter"&&on(d),Vu=d=>Ht(d),Wu=(d,I)=>I.key==="Enter"&&Ht(d),Hu=d=>un(d),Uu=d=>cn(d),Bu=d=>Xt(d),Ku=d=>Rt(d),Gu=d=>fn(d),Ju=d=>Xt(d),qu=(d,I)=>I.key==="Enter"&&Xt(d),Yu=()=>tn(Le),Qu=()=>ln(Le),Xu=()=>te("OpenTrashFolder"),Zu=()=>{t(56,Ee=""),t(55,Le=[])},xu=d=>ii(d.id),$u=d=>{t(56,Ee=d.id),t(55,Le=[])},ef=d=>tn(en(d.id)),tf=d=>ln(en(d.id));function lf(){j=this.value,t(11,j)}function nf(){T=this.value,t(12,T)}const sf=()=>{t(19,R=""),t(17,E=""),ai()};function of(){R=this.value,t(19,R)}const rf=()=>setTimeout(()=>t(21,K=!1),200),af=d=>ri(d);function cf(){M=this.checked,t(13,M)}function uf(){D=Fl(this),t(15,D)}function ff(){L=Fl(this),t(16,L)}const df=()=>Ml("csv"),pf=()=>Ml("markdown"),mf=()=>Ml("pdf"),gf=d=>Tt(d.nodeId),bf=(d,I,x,ce)=>t(41,I[x].suggestedMin=parseInt(ce.target.value),de),_f=d=>Nl(d),vf=d=>si(d),hf=d=>Dl(d),yf=(d,I,x)=>t(41,I[x]._expanded=!d._expanded,de),kf=(d,I,x,ce)=>ce.key==="Enter"&&t(41,I[x]._expanded=!d._expanded,de),wf=d=>Wt(d),Cf=d=>Rt(d.nodeId),Sf=d=>Tt(d.nodeId),Tf=d=>sn(d),jf=(d,I)=>I.key==="Enter"&&sn(d),Ef=d=>Tl(d),Nf=d=>$l(d),Df=d=>Wt(d),Mf=d=>Tt(d.nodeId),If=(d,I,x,ce)=>t(41,I[x].suggestedMin=parseInt(ce.target.value),de),Af=d=>Nl(d),Pf=d=>nn(d),Lf=d=>Dl(d),Ff=(d,I,x)=>t(41,I[x]._expanded=!d._expanded,de),Rf=(d,I,x,ce)=>ce.key==="Enter"&&t(41,I[x]._expanded=!d._expanded,de),zf=d=>Wt(d),Of=d=>Rt(d.nodeId),Vf=d=>Tt(d.nodeId),Wf=(d,I)=>I.key==="Enter"&&Tt(d.nodeId),Hf=d=>Tt(d.nodeId),Uf=(d,I)=>I.key==="Enter"&&Tt(d.nodeId),Bf=d=>Ht(d),Kf=(d,I)=>I.key==="Enter"&&Ht(d),Gf=d=>Ht(d),Jf=(d,I)=>I.key==="Enter"&&Ht(d),qf=()=>t(60,et=null),Yf=d=>t(60,et=d);function Qf(){Fe=this.value,t(58,Fe)}const Xf=d=>d.key==="Enter"&&Xn(),Zf=d=>Qn(d),xf=()=>$n(we.node),$f=()=>Zn(we.node),ed=()=>xn(we.node),td=()=>Rt(we.node);function ld(){fe=this.value,t(35,fe)}function nd(){ne=this.value,t(33,ne)}function id(){re=Ol(this.value),t(34,re)}function sd(){he=this.value,t(36,he)}function od(){Ke=this.checked,t(37,Ke)}function rd(){Me=this.checked,t(38,Me)}function ad(){Je=this.value,t(65,Je)}const cd=d=>d.key==="Enter"&&dn();function ud(){xe=Fl(this),t(66,xe),t(106,Xe)}function fd(){He=this.value,t(67,He)}const dd=d=>d.key==="Enter"&&dn(),pd=()=>rn("copy"),md=()=>rn("link");function gd(){qt=this.value,t(93,qt)}function bd(){Et=this.value,t(96,Et)}const _d=d=>d.key==="Enter"&&Nt&&hi(),vd=d=>vi(d);function hd(){ze=this.value,t(49,ze)}function yd(){Te=this.value,t(50,Te)}function kd(){Ue=this.value,t(51,Ue)}return[n,o,a,u,c,p,b,g,v,k,w,j,T,M,N,D,L,E,z,R,V,K,G,J,H,Y,P,W,O,B,ie,ee,Z,ne,re,fe,he,Ke,Me,X,le,de,ye,ge,Ie,Ge,it,at,Ne,ze,Te,Ue,Ae,Pe,Be,Le,Ee,Se,Fe,We,et,we,be,ke,tt,Je,xe,He,Ze,lt,$e,se,bt,At,Oe,nt,ft,Pt,Jt,Hl,bl,wt,Ve,Ul,rl,_l,Nn,Bl,Dn,Mn,In,An,yl,qt,Yt,jt,Et,Lt,Nt,wl,Kl,Gl,al,Cl,Ei,q,Xe,ja,Ln,Ft,ct,ql,Fn,Rn,cl,Yl,Ea,zn,On,Vn,Wn,Hn,Un,Bn,Kn,Pa,La,Fa,qn,Oa,Va,Wa,Ha,Qn,Ua,Ba,Xn,Ka,Qt,Ga,Ja,qa,Ya,Qa,Zn,xn,Rt,Xt,$n,ei,Xa,ti,Zt,Za,xa,$a,Tl,ec,tc,$l,lc,ii,en,tn,ln,nc,Nl,Dl,nn,si,Ot,Ml,sn,on,sc,ri,ai,oc,ci,rc,rn,ac,fi,uc,fc,mc,yc,wc,Cc,Sc,cn,_i,jc,vi,hi,un,fn,ki,wi,Ec,Ci,Si,Ti,Nc,Dc,dn,ji,Mc,Tt,Wt,Ht,pn,mn,Ic,Pc,Lc,Fc,Rc,zc,Oc,Vc,Wc,Hc,Uc,Bc,Kc,Gc,Jc,qc,Yc,Qc,Xc,Zc,xc,$c,eu,tu,lu,nu,iu,su,ou,ru,au,cu,uu,fu,du,pu,mu,gu,bu,_u,vu,hu,yu,ku,wu,Cu,Su,Tu,ju,Eu,Nu,Du,Mu,Iu,Au,Pu,Lu,Fu,Ru,zu,Ou,Vu,Wu,Hu,Uu,Bu,Ku,Gu,Ju,qu,Yu,Qu,Xu,Zu,xu,$u,ef,tf,lf,nf,sf,of,rf,af,cf,uf,ff,df,pf,mf,gf,bf,_f,vf,hf,yf,kf,wf,Cf,Sf,Tf,jf,Ef,Nf,Df,Mf,If,Af,Pf,Lf,Ff,Rf,zf,Of,Vf,Wf,Hf,Uf,Bf,Kf,Gf,Jf,qf,Yf,Qf,Xf,Zf,xf,$f,ed,td,ld,nd,id,sd,od,rd,ad,cd,ud,fd,dd,pd,md,gd,bd,_d,vd,hd,yd,kd,d=>te("OpenFile",d.detail)]}class Eg extends rt{constructor(e){super(),ot(this,e,jg,vg,st,{},null,[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1])}}new Eg({target:document.getElementById("app")});
|