4 lines
328 KiB
JavaScript
4 lines
328 KiB
JavaScript
var s1=Object.defineProperty;var r1=(n,e,t)=>e in n?s1(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Ht=(n,e,t)=>r1(n,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"]'))l(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const r of a.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&l(r)}).observe(document,{childList:!0,subtree:!0});function t(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function l(i){if(i.ep)return;i.ep=!0;const a=t(i);fetch(i.href,a)}})();function ie(){}function Ha(n){return n()}function so(){return Object.create(null)}function ve(n){n.forEach(Ha)}function Wt(n){return typeof n=="function"}function nt(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Yn;function pn(n,e){return n===e?!0:(Yn||(Yn=document.createElement("a")),Yn.href=e,n===Yn.href)}function a1(n){return Object.keys(n).length===0}function ro(n){return n??""}const Jl=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function s(n,e){n.appendChild(e)}function C(n,e,t){n.insertBefore(e,t||null)}function w(n){n.parentNode&&n.parentNode.removeChild(n)}function Re(n,e){for(let t=0;t<n.length;t+=1)n[t]&&n[t].d(e)}function f(n){return document.createElement(n)}function $(n){return document.createElementNS("http://www.w3.org/2000/svg",n)}function z(n){return document.createTextNode(n)}function _(){return z(" ")}function ht(){return z("")}function A(n,e,t,l){return n.addEventListener(e,t,l),()=>n.removeEventListener(e,t,l)}function ql(n){return function(e){return e.preventDefault(),n.call(this,e)}}function Te(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function Et(n){return function(e){e.target===this&&n.call(this,e)}}function o(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function ll(n){return n===""?null:+n}function c1(n){return Array.from(n.childNodes)}function K(n,e){e=""+e,n.data!==e&&(n.data=e)}function ke(n,e){n.value=e??""}function Ct(n,e,t,l){t==null?n.style.removeProperty(e):n.style.setProperty(e,t,"")}function Bt(n,e,t){for(let l=0;l<n.options.length;l+=1){const i=n.options[l];if(i.__value===e){i.selected=!0;return}}(!t||e!==void 0)&&(n.selectedIndex=-1)}function xn(n){const e=n.querySelector(":checked");return e&&e.__value}function ae(n,e,t){n.classList.toggle(e,!!t)}function u1(n,e,{bubbles:t=!1,cancelable:l=!1}={}){return new CustomEvent(n,{detail:e,bubbles:t,cancelable:l})}class Vl{constructor(e=!1){Ht(this,"is_svg",!1);Ht(this,"e");Ht(this,"n");Ht(this,"t");Ht(this,"a");this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,l=null){this.e||(this.is_svg?this.e=$(t.nodeName):this.e=f(t.nodeType===11?"TEMPLATE":t.nodeName),this.t=t.tagName!=="TEMPLATE"?t:t.content,this.c(e)),this.i(l)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)C(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(w)}}let In;function En(n){In=n}function Yl(){if(!In)throw new Error("Function called outside component initialization");return In}function Ba(n){Yl().$$.on_mount.push(n)}function Ql(n){Yl().$$.on_destroy.push(n)}function il(){const n=Yl();return(e,t,{cancelable:l=!1}={})=>{const i=n.$$.callbacks[e];if(i){const a=u1(e,t,{cancelable:l});return i.slice().forEach(r=>{r.call(n,a)}),!a.defaultPrevented}return!0}}function Wa(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(l=>l.call(this,e))}const fn=[],ao=[];let dn=[];const co=[],f1=Promise.resolve();let Ul=!1;function d1(){Ul||(Ul=!0,f1.then(Va))}function xt(n){dn.push(n)}const Ol=new Set;let cn=0;function Va(){if(cn!==0)return;const n=In;do{try{for(;cn<fn.length;){const e=fn[cn];cn++,En(e),p1(e.$$)}}catch(e){throw fn.length=0,cn=0,e}for(En(null),fn.length=0,cn=0;ao.length;)ao.pop()();for(let e=0;e<dn.length;e+=1){const t=dn[e];Ol.has(t)||(Ol.add(t),t())}dn.length=0}while(fn.length);for(;co.length;)co.pop()();Ul=!1,Ol.clear(),En(n)}function p1(n){if(n.fragment!==null){n.update(),ve(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(xt)}}function v1(n){const e=[],t=[];dn.forEach(l=>n.indexOf(l)===-1?e.push(l):t.push(l)),t.forEach(l=>l()),dn=e}const $n=new Set;let Zt;function ut(){Zt={r:0,c:[],p:Zt}}function ft(){Zt.r||ve(Zt.c),Zt=Zt.p}function pe(n,e){n&&n.i&&($n.delete(n),n.i(e))}function ge(n,e,t,l){if(n&&n.o){if($n.has(n))return;$n.add(n),Zt.c.push(()=>{$n.delete(n),l&&(t&&n.d(1),l())}),n.o(e)}else l&&l()}function ue(n){return(n==null?void 0:n.length)!==void 0?n:Array.from(n)}function Ua(n,e){ge(n,1,1,()=>{e.delete(n.key)})}function Ka(n,e,t,l,i,a,r,c,u,p,h,m){let g=n.length,b=a.length,k=g;const y={};for(;k--;)y[n[k].key]=k;const S=[],T=new Map,E=new Map,I=[];for(k=b;k--;){const j=m(i,a,k),R=t(j);let O=r.get(R);O?I.push(()=>O.p(j,e)):(O=p(R,j),O.c()),T.set(R,S[k]=O),R in y&&E.set(R,Math.abs(k-y[R]))}const D=new Set,N=new Set;function M(j){pe(j,1),j.m(c,h),r.set(j.key,j),h=j.first,b--}for(;g&&b;){const j=S[b-1],R=n[g-1],O=j.key,H=R.key;j===R?(h=j.first,g--,b--):T.has(H)?!r.has(O)||D.has(O)?M(j):N.has(H)?g--:E.get(O)>E.get(H)?(N.add(O),M(j)):(D.add(H),g--):(u(R,r),g--)}for(;g--;){const j=n[g];T.has(j.key)||u(j,r)}for(;b;)M(S[b-1]);return ve(I),S}function Xe(n){n&&n.c()}function Je(n,e,t){const{fragment:l,after_update:i}=n.$$;l&&l.m(e,t),xt(()=>{const a=n.$$.on_mount.map(Ha).filter(Wt);n.$$.on_destroy?n.$$.on_destroy.push(...a):ve(a),n.$$.on_mount=[]}),i.forEach(xt)}function qe(n,e){const t=n.$$;t.fragment!==null&&(v1(t.after_update),ve(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function m1(n,e){n.$$.dirty[0]===-1&&(fn.push(n),d1(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<<e%31}function lt(n,e,t,l,i,a,r=null,c=[-1]){const u=In;En(n);const p=n.$$={fragment:null,ctx:[],props:a,update:ie,not_equal:i,bound:so(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:so(),dirty:c,skip_bound:!1,root:e.target||u.$$.root};r&&r(p.root);let h=!1;if(p.ctx=t?t(n,e.props||{},(m,g,...b)=>{const k=b.length?b[0]:g;return p.ctx&&i(p.ctx[m],p.ctx[m]=k)&&(!p.skip_bound&&p.bound[m]&&p.bound[m](k),h&&m1(n,m)),g}):[],p.update(),h=!0,ve(p.before_update),p.fragment=l?l(p.ctx):!1,e.target){if(e.hydrate){const m=c1(e.target);p.fragment&&p.fragment.l(m),m.forEach(w)}else p.fragment&&p.fragment.c();e.intro&&pe(n.$$.fragment),Je(n,e.target,e.anchor),Va()}En(u)}class it{constructor(){Ht(this,"$$");Ht(this,"$$set")}$destroy(){qe(this,1),this.$destroy=ie}$on(e,t){if(!Wt(t))return ie;const l=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return l.push(t),()=>{const i=l.indexOf(t);i!==-1&&l.splice(i,1)}}$set(e){this.$$set&&!a1(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const _1="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(_1);function h1(n){let e,t;return{c(){e=$("path"),t=$("polyline"),o(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),o(t,"points","14 2 14 8 20 8")},m(l,i){C(l,e,i),C(l,t,i)},d(l){l&&(w(e),w(t))}}}function g1(n){let e,t,l,i,a;return{c(){e=$("path"),t=$("polyline"),l=$("line"),i=$("line"),a=$("polyline"),o(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),o(t,"points","14 2 14 8 20 8"),o(l,"x1","16"),o(l,"y1","13"),o(l,"x2","8"),o(l,"y2","13"),o(i,"x1","16"),o(i,"y1","17"),o(i,"x2","8"),o(i,"y2","17"),o(a,"points","10 9 9 9 8 9")},m(r,c){C(r,e,c),C(r,t,c),C(r,l,c),C(r,i,c),C(r,a,c)},d(r){r&&(w(e),w(t),w(l),w(i),w(a))}}}function b1(n){let e,t;return{c(){e=$("polyline"),t=$("polyline"),o(e,"points","16 18 22 12 16 6"),o(t,"points","8 6 2 12 8 18")},m(l,i){C(l,e,i),C(l,t,i)},d(l){l&&(w(e),w(t))}}}function k1(n){let e,t,l,i;return{c(){e=$("path"),t=$("polyline"),l=$("line"),i=$("rect"),o(e,"d","M21 8v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8"),o(t,"points","7 3 12 8 17 3"),o(l,"x1","3"),o(l,"y1","8"),o(l,"x2","21"),o(l,"y2","8"),o(i,"x","10"),o(i,"y","12"),o(i,"width","4"),o(i,"height","4"),o(i,"rx","1")},m(a,r){C(a,e,r),C(a,t,r),C(a,l,r),C(a,i,r)},d(a){a&&(w(e),w(t),w(l),w(i))}}}function y1(n){let e,t,l,i,a;return{c(){e=$("path"),t=$("polyline"),l=$("line"),i=$("line"),a=$("line"),o(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),o(t,"points","14 2 14 8 20 8"),o(l,"x1","9"),o(l,"y1","12"),o(l,"x2","15"),o(l,"y2","12"),o(i,"x1","9"),o(i,"y1","15"),o(i,"x2","13"),o(i,"y2","15"),o(a,"x1","12"),o(a,"y1","15"),o(a,"x2","12"),o(a,"y2","18")},m(r,c){C(r,e,c),C(r,t,c),C(r,l,c),C(r,i,c),C(r,a,c)},d(r){r&&(w(e),w(t),w(l),w(i),w(a))}}}function w1(n){let e,t,l,i,a,r;return{c(){e=$("path"),t=$("polyline"),l=$("line"),i=$("line"),a=$("line"),r=$("line"),o(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),o(t,"points","14 2 14 8 20 8"),o(l,"x1","8"),o(l,"y1","12"),o(l,"x2","16"),o(l,"y2","12"),o(i,"x1","8"),o(i,"y1","16"),o(i,"x2","16"),o(i,"y2","16"),o(a,"x1","8"),o(a,"y1","14"),o(a,"x2","12"),o(a,"y2","14"),o(r,"x1","12"),o(r,"y1","12"),o(r,"x2","12"),o(r,"y2","18")},m(c,u){C(c,e,u),C(c,t,u),C(c,l,u),C(c,i,u),C(c,a,u),C(c,r,u)},d(c){c&&(w(e),w(t),w(l),w(i),w(a),w(r))}}}function C1(n){let e,t,l,i;return{c(){e=$("path"),t=$("polyline"),l=$("line"),i=$("line"),o(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),o(t,"points","14 2 14 8 20 8"),o(l,"x1","16"),o(l,"y1","13"),o(l,"x2","8"),o(l,"y2","13"),o(i,"x1","16"),o(i,"y1","17"),o(i,"x2","8"),o(i,"y2","17")},m(a,r){C(a,e,r),C(a,t,r),C(a,l,r),C(a,i,r)},d(a){a&&(w(e),w(t),w(l),w(i))}}}function S1(n){let e,t,l,i,a;return{c(){e=$("path"),t=$("polyline"),l=$("line"),i=$("line"),a=$("line"),o(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),o(t,"points","14 2 14 8 20 8"),o(l,"x1","8"),o(l,"y1","12"),o(l,"x2","16"),o(l,"y2","12"),o(i,"x1","8"),o(i,"y1","16"),o(i,"x2","16"),o(i,"y2","16"),o(a,"x1","8"),o(a,"y1","14"),o(a,"x2","12"),o(a,"y2","14")},m(r,c){C(r,e,c),C(r,t,c),C(r,l,c),C(r,i,c),C(r,a,c)},d(r){r&&(w(e),w(t),w(l),w(i),w(a))}}}function T1(n){let e,t,l;return{c(){e=$("path"),t=$("circle"),l=$("circle"),o(e,"d","M9 18V5l12-2v13"),o(t,"cx","6"),o(t,"cy","18"),o(t,"r","3"),o(l,"cx","18"),o(l,"cy","16"),o(l,"r","3")},m(i,a){C(i,e,a),C(i,t,a),C(i,l,a)},d(i){i&&(w(e),w(t),w(l))}}}function E1(n){let e,t;return{c(){e=$("rect"),t=$("polyline"),o(e,"x","2"),o(e,"y","4"),o(e,"width","20"),o(e,"height","16"),o(e,"rx","2"),o(t,"points","10 9 16 12 10 15 10 9")},m(l,i){C(l,e,i),C(l,t,i)},d(l){l&&(w(e),w(t))}}}function I1(n){let e,t,l;return{c(){e=$("rect"),t=$("circle"),l=$("polyline"),o(e,"x","3"),o(e,"y","3"),o(e,"width","18"),o(e,"height","18"),o(e,"rx","2"),o(e,"ry","2"),o(t,"cx","8.5"),o(t,"cy","8.5"),o(t,"r","1.5"),o(l,"points","21 15 16 10 5 21")},m(i,a){C(i,e,a),C(i,t,a),C(i,l,a)},d(i){i&&(w(e),w(t),w(l))}}}function N1(n){let e;return{c(){e=$("path"),o(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,l){C(t,e,l)},d(t){t&&w(e)}}}function D1(n){let e;function t(a,r){return a[0]==="folder"?N1:a[0]==="image"?I1:a[0]==="video"?E1:a[0]==="audio"?T1:a[0]==="pdf"?S1:a[0]==="document"?C1:a[0]==="spreadsheet"?w1:a[0]==="presentation"?y1:a[0]==="archive"?k1:a[0]==="code"?b1:a[0]==="text"?g1:h1}let l=t(n),i=l(n);return{c(){e=$("svg"),i.c(),o(e,"width",n[1]),o(e,"height",n[1]),o(e,"viewBox","0 0 24 24"),o(e,"fill","none"),o(e,"stroke","currentColor"),o(e,"stroke-width","1.5"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"xmlns","http://www.w3.org/2000/svg")},m(a,r){C(a,e,r),i.m(e,null)},p(a,[r]){l!==(l=t(a))&&(i.d(1),i=l(a),i&&(i.c(),i.m(e,null))),r&2&&o(e,"width",a[1]),r&2&&o(e,"height",a[1])},i:ie,o:ie,d(a){a&&w(e),i.d()}}}function M1(n,e,t){let{kind:l="generic"}=e,{size:i=20}=e;return n.$$set=a=>{"kind"in a&&t(0,l=a.kind),"size"in a&&t(1,i=a.size)},[l,i]}class Ga extends it{constructor(e){super(),lt(this,e,M1,D1,nt,{kind:0,size:1})}}const j1={"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.sortByDate":"по дате","inbox.sortByName":"по имени","inbox.sortByType":"по типу","inbox.sortAsc":"по возрастанию","inbox.sortDesc":"по убыванию","inbox.groupByContext":"Группировать по месту захвата","inbox.noContext":"Без места захвата","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":"Удаленные элементы","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":"событий","today.feed":"Лента","today.suggestionsTab":"Предложения","today.inProgress":"В работе","today.captured":"Захвачено","today.feedEmpty":"Сегодня событий нет","today.inProgressEmpty":"Сегодня ничего не изменяли","today.capturedEmpty":"Сегодня ничего не захвачено","today.feedHint":"События за сегодня: изменения файлов, заметок, действий и другие события.","today.sortByTime":"по времени","today.sortByName":"по имени","today.sortByType":"по типу","today.sortAsc":"по возрастанию","today.sortDesc":"по убыванию","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":"Срок действия токена истёк"},A1={"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.sortByDate":"by date","inbox.sortByName":"by name","inbox.sortByType":"by type","inbox.sortAsc":"ascending","inbox.sortDesc":"descending","inbox.groupByContext":"Group by capture location","inbox.noContext":"No capture location","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":"Attach at captured location","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","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","today.feed":"Feed","today.suggestionsTab":"Suggestions","today.inProgress":"In Progress","today.captured":"Captured","today.feedEmpty":"No events today","today.inProgressEmpty":"Nothing modified today","today.capturedEmpty":"Nothing captured today","today.feedHint":"Today's events: file changes, notes, actions and other events.","today.sortByTime":"by time","today.sortByName":"by name","today.sortByType":"by type","today.sortAsc":"ascending","today.sortDesc":"descending","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"},uo={ru:j1,en:A1};let fo="ru";function v(n,e){var i;const t=uo[fo];let l=t==null?void 0:t[n];if(l==null&&fo!=="ru"&&(l=(i=uo.ru)==null?void 0:i[n]),l==null&&(l=n),e!=null)for(const[a,r]of Object.entries(e))l=l.replace(`{${a}}`,String(r));return l}function tl(n){if(n==null||n<0)return"—";if(n===0)return"0 B";const e=["B","KB","MB","GB"],t=Math.min(Math.floor(Math.log(n)/Math.log(1024)),e.length-1),l=n/Math.pow(1024,t);return(t===0?l.toFixed(0):l.toFixed(1))+" "+e[t]}const Kl={"image/jpeg":v("mime.jpeg"),"image/png":v("mime.png"),"image/gif":v("mime.gif"),"image/webp":v("mime.webp"),"image/svg+xml":v("mime.svg"),"image/bmp":v("mime.bmp"),"image/tiff":v("mime.tiff"),"image/avif":v("mime.avif"),"application/pdf":v("mime.pdf"),"application/msword":v("mime.word"),"application/vnd.openxmlformats-officedocument.wordprocessingml.document":v("mime.word"),"application/vnd.ms-excel":v("mime.excel"),"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":v("mime.excel"),"application/vnd.ms-powerpoint":v("mime.ppt"),"application/vnd.openxmlformats-officedocument.presentationml.presentation":v("mime.ppt"),"application/zip":v("mime.zip"),"application/gzip":v("mime.gzip"),"application/x-tar":v("mime.tar"),"application/x-7z-compressed":v("mime.sevenz"),"application/x-rar-compressed":v("mime.rar"),"text/plain":v("mime.text"),"text/html":v("mime.html"),"text/css":v("mime.css"),"text/javascript":v("mime.js"),"application/json":v("mime.json"),"application/xml":v("mime.xml"),"application/x-yaml":v("mime.yaml"),"application/octet-stream":v("mime.binary"),"application/x-msdos-program":v("mime.executable"),"inode/directory":v("mime.folder")};function po(n){return n?Kl[n]||n:v("mime.unknown")}function L1(n){if(n.type==="folder")return v("mime.folder");const e=(n.mime||"").toLowerCase();if(Kl[e])return Kl[e];const l=(n.name||"").toLowerCase().split(".").pop();return l?l.toUpperCase():v("mime.file")}function Ja(n){if(n.type==="folder")return"folder";const e=(n.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 l=(n.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(l)?"code":"generic"}const qa=["image/jpeg","image/png","image/gif","image/webp","image/bmp","image/tiff","image/avif","image/svg+xml"],Ya=["text/plain","text/html","text/css","text/javascript","application/json","application/xml","application/x-yaml","text/x-shellscript"],Qa=["txt","log","conf","ini","yaml","yml","json","xml","csv","sh","py","js","ts","css","html","md","markdown","cfg"],Xa=["jpg","jpeg","png","gif","webp","bmp","tiff","tif","avif","svg"];function vo(n){if(n.type==="folder")return!1;const e=(n.mime||"").toLowerCase(),l=(n.name||"").toLowerCase().split(".").pop();return!!(qa.includes(e)||Xa.includes(l)||e.includes("pdf")||Ya.includes(e)||Qa.includes(l))}function Za(n){const e=(n.mime||"").toLowerCase(),l=(n.name||"").toLowerCase().split(".").pop();return qa.includes(e)||Xa.includes(l)}function xa(n){const e=(n.mime||"").toLowerCase(),l=(n.name||"").toLowerCase().split(".").pop();return Ya.includes(e)||Qa.includes(l)&&l!=="md"&&l!=="markdown"}function $a(n){return(n.mime||"").toLowerCase().includes("pdf")}function ec(n){const e=(n.name||"").toLowerCase();return e.endsWith(".md")||e.endsWith(".markdown")}function P1(n){return Za(n)||$a(n)}function F1(n){return xa(n)||ec(n)}const{window:R1}=Jl;function O1(n){let e,t,l,i=tl(n[0].size)+"",a;return{c(){e=f("span"),e.textContent="·",t=_(),l=f("span"),a=z(i),o(e,"class","meta-sep svelte-1skuef2")},m(r,c){C(r,e,c),C(r,t,c),C(r,l,c),s(l,a)},p(r,c){c[0]&1&&i!==(i=tl(r[0].size)+"")&&K(a,i)},d(r){r&&(w(e),w(t),w(l))}}}function z1(n){let e,t,l,i,a;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=_(),l=f("button"),l.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>',o(e,"class","action-btn svelte-1skuef2"),o(e,"title",v("file.openFolder")),o(e,"aria-label",v("file.openFolder")),o(l,"class","action-btn svelte-1skuef2"),o(l,"title",v("file.showInExplorer")),o(l,"aria-label",v("file.showInExplorer"))},m(r,c){C(r,e,c),C(r,t,c),C(r,l,c),i||(a=[A(e,"click",Te(n[30])),A(l,"click",Te(n[11]))],i=!0)},p:ie,d(r){r&&(w(e),w(t),w(l)),i=!1,ve(a)}}}function H1(n){let e,t,l,i,a,r,c;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=_(),l=f("button"),l.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=_(),a=f("button"),a.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>',o(e,"class","action-btn svelte-1skuef2"),o(e,"title",v("file.preview")),o(e,"aria-label",v("file.preview")),o(l,"class","action-btn svelte-1skuef2"),o(l,"title",v("file.openExternal")),o(l,"aria-label",v("file.openExternal")),o(a,"class","action-btn svelte-1skuef2"),o(a,"title",v("file.showInExplorer")),o(a,"aria-label",v("file.showInExplorer"))},m(u,p){C(u,e,p),C(u,t,p),C(u,l,p),C(u,i,p),C(u,a,p),r||(c=[A(e,"click",Te(n[29])),A(l,"click",Te(n[10])),A(a,"click",Te(n[11]))],r=!0)},p:ie,d(u){u&&(w(e),w(t),w(l),w(i),w(a)),r=!1,ve(c)}}}function mo(n){let e,t,l,i,a,r,c,u,p=v("common.open")+"",h,m,g,b,k,y,S,T,E=v("file.openExternal")+"",I,D,N,M,j,R,O=v("file.showInExplorer")+"",H,V,G,U,q,Y,B,F,W,P=v("common.rename")+"",J,Q,ee,te,le,se,ce,de=v("common.duplicate")+"",we,ze,me,X,x,be,Ce,_e,He,Ze=v("common.cut")+"",pt,Ye,Ie,Oe,Me,Z,ye,Pe=v("common.copy")+"",je,Be,Ae,Ee,We,Ue,$e,Fe,he,Ne=v("common.delete")+"",Le,ot,rt;return{c(){e=f("div"),t=_(),l=f("div"),i=f("button"),a=$("svg"),r=$("path"),c=$("circle"),u=_(),h=z(p),m=_(),g=f("button"),b=$("svg"),k=$("path"),y=$("polyline"),S=$("line"),T=_(),I=z(E),D=_(),N=f("button"),M=$("svg"),j=$("path"),R=_(),H=z(O),V=_(),G=f("div"),U=_(),q=f("button"),Y=$("svg"),B=$("path"),F=$("path"),W=_(),J=z(P),Q=_(),ee=f("button"),te=$("svg"),le=$("rect"),se=$("path"),ce=_(),we=z(de),ze=_(),me=f("button"),X=$("svg"),x=$("circle"),be=$("circle"),Ce=$("line"),_e=$("line"),He=_(),pt=z(Ze),Ye=_(),Ie=f("button"),Oe=$("svg"),Me=$("rect"),Z=$("path"),ye=_(),je=z(Pe),Be=_(),Ae=f("div"),Ee=_(),We=f("button"),Ue=$("svg"),$e=$("polyline"),Fe=$("path"),he=_(),Le=z(Ne),o(e,"class","menu-backdrop svelte-1skuef2"),o(e,"role","presentation"),o(r,"d","M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"),o(c,"cx","12"),o(c,"cy","12"),o(c,"r","3"),o(a,"width","14"),o(a,"height","14"),o(a,"viewBox","0 0 24 24"),o(a,"fill","none"),o(a,"stroke","currentColor"),o(a,"stroke-width","2"),o(a,"stroke-linecap","round"),o(a,"stroke-linejoin","round"),o(i,"class","menu-item svelte-1skuef2"),o(i,"role","menuitem"),o(k,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),o(y,"points","15 3 21 3 21 9"),o(S,"x1","10"),o(S,"y1","14"),o(S,"x2","21"),o(S,"y2","3"),o(b,"width","14"),o(b,"height","14"),o(b,"viewBox","0 0 24 24"),o(b,"fill","none"),o(b,"stroke","currentColor"),o(b,"stroke-width","2"),o(b,"stroke-linecap","round"),o(b,"stroke-linejoin","round"),o(g,"class","menu-item svelte-1skuef2"),o(g,"role","menuitem"),o(j,"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"),o(M,"width","14"),o(M,"height","14"),o(M,"viewBox","0 0 24 24"),o(M,"fill","none"),o(M,"stroke","currentColor"),o(M,"stroke-width","2"),o(M,"stroke-linecap","round"),o(M,"stroke-linejoin","round"),o(N,"class","menu-item svelte-1skuef2"),o(N,"role","menuitem"),o(G,"class","menu-sep svelte-1skuef2"),o(B,"d","M12 20h9"),o(F,"d","M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"),o(Y,"width","14"),o(Y,"height","14"),o(Y,"viewBox","0 0 24 24"),o(Y,"fill","none"),o(Y,"stroke","currentColor"),o(Y,"stroke-width","2"),o(Y,"stroke-linecap","round"),o(Y,"stroke-linejoin","round"),o(q,"class","menu-item svelte-1skuef2"),o(q,"role","menuitem"),o(le,"x","9"),o(le,"y","9"),o(le,"width","13"),o(le,"height","13"),o(le,"rx","2"),o(le,"ry","2"),o(se,"d","M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"),o(te,"width","14"),o(te,"height","14"),o(te,"viewBox","0 0 24 24"),o(te,"fill","none"),o(te,"stroke","currentColor"),o(te,"stroke-width","2"),o(te,"stroke-linecap","round"),o(te,"stroke-linejoin","round"),o(ee,"class","menu-item svelte-1skuef2"),o(ee,"role","menuitem"),o(x,"cx","6"),o(x,"cy","6"),o(x,"r","3"),o(be,"cx","6"),o(be,"cy","18"),o(be,"r","3"),o(Ce,"x1","20"),o(Ce,"y1","4"),o(Ce,"x2","8.12"),o(Ce,"y2","15.88"),o(_e,"x1","8.12"),o(_e,"y1","8.12"),o(_e,"x2","20"),o(_e,"y2","20"),o(X,"width","14"),o(X,"height","14"),o(X,"viewBox","0 0 24 24"),o(X,"fill","none"),o(X,"stroke","currentColor"),o(X,"stroke-width","2"),o(X,"stroke-linecap","round"),o(X,"stroke-linejoin","round"),o(me,"class","menu-item svelte-1skuef2"),o(me,"role","menuitem"),o(Me,"x","9"),o(Me,"y","9"),o(Me,"width","13"),o(Me,"height","13"),o(Me,"rx","2"),o(Me,"ry","2"),o(Z,"d","M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"),o(Oe,"width","14"),o(Oe,"height","14"),o(Oe,"viewBox","0 0 24 24"),o(Oe,"fill","none"),o(Oe,"stroke","currentColor"),o(Oe,"stroke-width","2"),o(Oe,"stroke-linecap","round"),o(Oe,"stroke-linejoin","round"),o(Ie,"class","menu-item svelte-1skuef2"),o(Ie,"role","menuitem"),o(Ae,"class","menu-sep svelte-1skuef2"),o($e,"points","3 6 5 6 21 6"),o(Fe,"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"),o(Ue,"width","14"),o(Ue,"height","14"),o(Ue,"viewBox","0 0 24 24"),o(Ue,"fill","none"),o(Ue,"stroke","currentColor"),o(Ue,"stroke-width","2"),o(Ue,"stroke-linecap","round"),o(Ue,"stroke-linejoin","round"),o(We,"class","menu-item menu-item-danger svelte-1skuef2"),o(We,"role","menuitem"),o(l,"class","menu svelte-1skuef2"),Ct(l,"left",n[3]+"px"),Ct(l,"top",n[4]+"px"),Ct(l,"position","fixed"),o(l,"role","menu"),o(l,"tabindex","-1")},m(xe,Ke){C(xe,e,Ke),C(xe,t,Ke),C(xe,l,Ke),s(l,i),s(i,a),s(a,r),s(a,c),s(i,u),s(i,h),s(l,m),s(l,g),s(g,b),s(b,k),s(b,y),s(b,S),s(g,T),s(g,I),s(l,D),s(l,N),s(N,M),s(M,j),s(N,R),s(N,H),s(l,V),s(l,G),s(l,U),s(l,q),s(q,Y),s(Y,B),s(Y,F),s(q,W),s(q,J),s(l,Q),s(l,ee),s(ee,te),s(te,le),s(te,se),s(ee,ce),s(ee,we),s(l,ze),s(l,me),s(me,X),s(X,x),s(X,be),s(X,Ce),s(X,_e),s(me,He),s(me,pt),s(l,Ye),s(l,Ie),s(Ie,Oe),s(Oe,Me),s(Oe,Z),s(Ie,ye),s(Ie,je),s(l,Be),s(l,Ae),s(l,Ee),s(l,We),s(We,Ue),s(Ue,$e),s(Ue,Fe),s(We,he),s(We,Le),ot||(rt=[A(e,"click",Te(n[19])),A(i,"click",n[17]),A(g,"click",n[10]),A(N,"click",n[11]),A(q,"click",n[13]),A(ee,"click",n[14]),A(me,"click",n[15]),A(Ie,"click",n[16]),A(We,"click",n[12]),A(l,"click",Te(n[28])),A(l,"keydown",n[31])],ot=!0)},p(xe,Ke){Ke[0]&8&&Ct(l,"left",xe[3]+"px"),Ke[0]&16&&Ct(l,"top",xe[4]+"px")},d(xe){xe&&(w(e),w(t),w(l)),ot=!1,ve(rt)}}}function B1(n){let e,t,l,i,a,r,c=n[0].name+"",u,p,h,m,g,b,k,y,S,T,E,I,D,N,M,j,R,O,H,V,G,U;l=new Ga({props:{kind:n[6],size:22}});let q=!n[7]&&O1(n);function Y(P,J){return P[7]?z1:H1}let F=Y(n)(n),W=n[2]&&mo(n);return{c(){e=f("div"),t=f("div"),Xe(l.$$.fragment),i=_(),a=f("div"),r=f("div"),u=z(c),h=_(),m=f("div"),g=f("span"),g.textContent=`${n[8]}`,b=_(),q&&q.c(),k=_(),y=f("div"),F.c(),S=_(),T=f("button"),E=$("svg"),I=$("circle"),D=$("circle"),N=$("circle"),M=_(),j=f("button"),j.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>',O=_(),W&&W.c(),H=ht(),o(t,"class","file-row-icon svelte-1skuef2"),o(r,"class","file-row-name svelte-1skuef2"),o(r,"title",p=n[0].name),o(m,"class","file-row-meta svelte-1skuef2"),o(a,"class","file-row-body svelte-1skuef2"),o(I,"cx","12"),o(I,"cy","5"),o(I,"r","2"),o(D,"cx","12"),o(D,"cy","12"),o(D,"r","2"),o(N,"cx","12"),o(N,"cy","19"),o(N,"r","2"),o(E,"width","16"),o(E,"height","16"),o(E,"viewBox","0 0 24 24"),o(E,"fill","currentColor"),o(T,"class","action-btn svelte-1skuef2"),o(T,"title",v("file.more")),o(T,"aria-label",v("file.more")),o(T,"aria-expanded",n[2]),o(j,"class","action-btn action-btn-danger svelte-1skuef2"),o(j,"title",v("common.delete")),o(j,"aria-label",v("common.delete")),o(y,"class","file-row-actions svelte-1skuef2"),o(e,"class","file-row svelte-1skuef2"),o(e,"role","button"),o(e,"tabindex","0"),o(e,"draggable","true"),o(e,"aria-label",R=n[7]?v("file.ariaFolder")+" "+n[0].name:v("file.ariaFile")+" "+n[0].name),ae(e,"file-row--selected",n[1])},m(P,J){C(P,e,J),s(e,t),Je(l,t,null),s(e,i),s(e,a),s(a,r),s(r,u),s(a,h),s(a,m),s(m,g),s(m,b),q&&q.m(m,null),s(e,k),s(e,y),F.m(y,null),s(y,S),s(y,T),s(T,E),s(E,I),s(E,D),s(E,N),s(y,M),s(y,j),C(P,O,J),W&&W.m(P,J),C(P,H,J),V=!0,G||(U=[A(R1,"click",n[19]),A(T,"click",Te(n[18])),A(j,"click",Te(n[12])),A(e,"click",n[9]),A(e,"keydown",n[24]),A(e,"contextmenu",n[23]),A(e,"dragstart",n[20]),A(e,"dragover",n[21]),A(e,"drop",n[22])],G=!0)},p(P,J){(!V||J[0]&1)&&c!==(c=P[0].name+"")&&K(u,c),(!V||J[0]&1&&p!==(p=P[0].name))&&o(r,"title",p),P[7]||q.p(P,J),F.p(P,J),(!V||J[0]&4)&&o(T,"aria-expanded",P[2]),(!V||J[0]&1&&R!==(R=P[7]?v("file.ariaFolder")+" "+P[0].name:v("file.ariaFile")+" "+P[0].name))&&o(e,"aria-label",R),(!V||J[0]&2)&&ae(e,"file-row--selected",P[1]),P[2]?W?W.p(P,J):(W=mo(P),W.c(),W.m(H.parentNode,H)):W&&(W.d(1),W=null)},i(P){V||(pe(l.$$.fragment,P),V=!0)},o(P){ge(l.$$.fragment,P),V=!1},d(P){P&&(w(e),w(O),w(H)),qe(l),q&&q.d(),F.d(),W&&W.d(P),G=!1,ve(U)}}}function W1(n,e,t){let{item:l}=e,{selected:i=!1}=e,{onDragStart:a}=e,{onDragOver:r}=e,{onDrop:c}=e;const u=il(),p=Ja(l),h=l.type==="folder",m=L1(l);let g=!1,b=0,k=0,y=null;function S(J){J.ctrlKey||J.metaKey?u("toggleSelect",l.id):J.shiftKey?u("rangeSelect",l.id):y?(clearTimeout(y),y=null,h?u("navigate",l.id):u("preview",l)):y=setTimeout(()=>{y=null,u("selectOne",l.id)},250)}function T(){u("openExternal",l.fileId)}function E(){t(2,g=!1),u("showInFolder",l.nodeId||l.id)}function I(){t(2,g=!1),u("delete",{id:l.id,type:l.type})}function D(){t(2,g=!1),u("rename",{id:l.id,name:l.name})}function N(){t(2,g=!1),u("duplicate",l.id)}function M(){t(2,g=!1),u("cut",l.id)}function j(){t(2,g=!1),u("copy",l.id)}function R(){t(2,g=!1),h?u("navigate",l.id):u("preview",l)}function O(){t(2,g=!g)}function H(){t(2,g=!1)}function V(J){a&&a(J,l.id)}function G(J){r&&h&&r(J,l.id)}function U(J){c&&h&&c(J,l.id)}function q(J){J.preventDefault(),t(3,b=Math.min(J.clientX,window.innerWidth-240)),t(4,k=Math.min(J.clientY,window.innerHeight-320)),t(2,g=!0)}function Y(J){(J.key==="Enter"||J.key===" ")&&(J.preventDefault(),S(J))}function B(J){Wa.call(this,n,J)}const F=()=>u("preview",l),W=()=>u("navigate",l.id),P=J=>{J.key==="Escape"&&(J.stopPropagation(),H())};return n.$$set=J=>{"item"in J&&t(0,l=J.item),"selected"in J&&t(1,i=J.selected),"onDragStart"in J&&t(25,a=J.onDragStart),"onDragOver"in J&&t(26,r=J.onDragOver),"onDrop"in J&&t(27,c=J.onDrop)},[l,i,g,b,k,u,p,h,m,S,T,E,I,D,N,M,j,R,O,H,V,G,U,q,Y,a,r,c,B,F,W,P]}class V1 extends it{constructor(e){super(),lt(this,e,W1,B1,nt,{item:0,selected:1,onDragStart:25,onDragOver:26,onDrop:27},null,[-1,-1])}}function _o(n,e,t){const l=n.slice();return l[4]=e[t],l[6]=t,l}function U1(n){let e;return{c(){e=f("span"),e.textContent="/",o(e,"class","sep svelte-csi2lb")},m(t,l){C(t,e,l)},d(t){t&&w(e)}}}function K1(n){let e,t=n[4].name+"",l,i,a;function r(){return n[2](n[6])}return{c(){e=f("button"),l=z(t),o(e,"class","crumb crumb--link svelte-csi2lb")},m(c,u){C(c,e,u),s(e,l),i||(a=A(e,"click",r),i=!0)},p(c,u){n=c,u&1&&t!==(t=n[4].name+"")&&K(l,t)},d(c){c&&w(e),i=!1,a()}}}function G1(n){let e,t=n[4].name+"",l;return{c(){e=f("span"),l=z(t),o(e,"class","crumb crumb--current svelte-csi2lb")},m(i,a){C(i,e,a),s(e,l)},p(i,a){a&1&&t!==(t=i[4].name+"")&&K(l,t)},d(i){i&&w(e)}}}function ho(n){let e,t,l=n[6]>0&&U1();function i(c,u){return c[6]===c[0].length-1?G1:K1}let a=i(n),r=a(n);return{c(){l&&l.c(),e=_(),r.c(),t=ht()},m(c,u){l&&l.m(c,u),C(c,e,u),r.m(c,u),C(c,t,u)},p(c,u){a===(a=i(c))&&r?r.p(c,u):(r.d(1),r=a(c),r&&(r.c(),r.m(t.parentNode,t)))},d(c){c&&(w(e),w(t)),l&&l.d(c),r.d(c)}}}function J1(n){let e,t=ue(n[0]),l=[];for(let i=0;i<t.length;i+=1)l[i]=ho(_o(n,t,i));return{c(){e=f("nav");for(let i=0;i<l.length;i+=1)l[i].c();o(e,"class","breadcrumbs svelte-csi2lb")},m(i,a){C(i,e,a);for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(e,null)},p(i,[a]){if(a&3){t=ue(i[0]);let r;for(r=0;r<t.length;r+=1){const c=_o(i,t,r);l[r]?l[r].p(c,a):(l[r]=ho(c),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=t.length}},i:ie,o:ie,d(i){i&&w(e),Re(l,i)}}}function q1(n,e,t){let{crumbs:l=[]}=e;const i=il();function a(c){i("navigate",c)}const r=c=>a(c);return n.$$set=c=>{"crumbs"in c&&t(0,l=c.crumbs)},[l,a,r]}class tc extends it{constructor(e){super(),lt(this,e,q1,J1,nt,{crumbs:0})}}function Y1(n){let e,t,l,i,a,r;return{c(){e=f("div"),t=f("p"),t.textContent=`${v("file.previewUnavailable")}`,l=_(),i=f("button"),i.textContent=`${v("file.openExternal")}`,o(i,"class","btn btn-sm svelte-1cw3u0m"),o(e,"class","preview-status svelte-1cw3u0m")},m(c,u){C(c,e,u),s(e,t),s(e,l),s(e,i),a||(r=A(i,"click",n[9]),a=!0)},p:ie,d(c){c&&w(e),a=!1,r()}}}function Q1(n){let e,t;function l(r,c){return c&2&&(e=null),e==null&&(e=!!(r[1]&&r[1].startsWith("data:"))),e?tp:ep}let i=l(n,-1),a=i(n);return{c(){a.c(),t=ht()},m(r,c){a.m(r,c),C(r,t,c)},p(r,c){i===(i=l(r,c))&&a?a.p(r,c):(a.d(1),a=i(r),a&&(a.c(),a.m(t.parentNode,t)))},d(r){r&&w(t),a.d(r)}}}function X1(n){let e,t,l;return{c(){e=f("pre"),t=f("code"),l=z(n[1]),o(e,"class","preview-text svelte-1cw3u0m")},m(i,a){C(i,e,a),s(e,t),s(t,l)},p(i,a){a&2&&K(l,i[1])},d(i){i&&w(e)}}}function Z1(n){let e,t,l,i;return{c(){e=f("div"),t=f("img"),pn(t.src,l=n[1])||o(t,"src",l),o(t,"alt",i=n[0].name),o(t,"class","preview-image svelte-1cw3u0m"),o(e,"class","preview-image-container svelte-1cw3u0m")},m(a,r){C(a,e,r),s(e,t)},p(a,r){r&2&&!pn(t.src,l=a[1])&&o(t,"src",l),r&1&&i!==(i=a[0].name)&&o(t,"alt",i)},d(a){a&&w(e)}}}function x1(n){let e,t,l,i,a,r,c;return{c(){e=f("div"),t=f("p"),l=z(n[3]),i=_(),a=f("button"),a.textContent=`${v("file.openExternal")}`,o(a,"class","btn btn-sm svelte-1cw3u0m"),o(e,"class","preview-status svelte-1cw3u0m")},m(u,p){C(u,e,p),s(e,t),s(t,l),s(e,i),s(e,a),r||(c=A(a,"click",n[9]),r=!0)},p(u,p){p&8&&K(l,u[3])},d(u){u&&w(e),r=!1,c()}}}function $1(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${v("common.loading")}`,o(e,"class","preview-status svelte-1cw3u0m")},m(l,i){C(l,e,i),s(e,t)},p:ie,d(l){l&&w(e)}}}function ep(n){let e,t,l,i,a,r;return{c(){e=f("div"),t=f("p"),t.textContent=`${v("file.pdfUnavailable")}`,l=_(),i=f("button"),i.textContent=`${v("file.openExternal")}`,o(i,"class","btn btn-sm svelte-1cw3u0m"),o(e,"class","preview-status svelte-1cw3u0m")},m(c,u){C(c,e,u),s(e,t),s(e,l),s(e,i),a||(r=A(i,"click",n[9]),a=!0)},p:ie,d(c){c&&w(e),a=!1,r()}}}function tp(n){let e,t,l;return{c(){e=f("div"),t=f("embed"),pn(t.src,l=n[1])||o(t,"src",l),o(t,"type","application/pdf"),o(t,"class","preview-pdf svelte-1cw3u0m"),o(e,"class","preview-pdf-container svelte-1cw3u0m")},m(i,a){C(i,e,a),s(e,t)},p(i,a){a&2&&!pn(t.src,l=i[1])&&o(t,"src",l)},d(i){i&&w(e)}}}function np(n){let e,t,l,i,a,r,c,u=n[0].name+"",p,h,m,g,b=tl(n[0].size)+"",k,y,S=po(n[0].mime)+"",T,E,I,D,N,M,j,R,O,H,V;a=new Ga({props:{kind:n[8],size:18}});function G(Y,B){return Y[2]?$1:Y[3]?x1:Y[6]&&Y[1]?Z1:Y[5]&&Y[1]?X1:Y[4]?Q1:Y1}let U=G(n),q=U(n);return{c(){e=f("div"),t=f("div"),l=f("header"),i=f("div"),Xe(a.$$.fragment),r=_(),c=f("span"),p=z(u),m=_(),g=f("div"),k=z(b),y=z(" · "),T=z(S),E=_(),I=f("div"),D=f("button"),D.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>',N=_(),M=f("button"),M.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>',j=_(),R=f("div"),q.c(),o(c,"class","preview-name svelte-1cw3u0m"),o(c,"title",h=n[0].name),o(i,"class","preview-title svelte-1cw3u0m"),o(g,"class","preview-meta svelte-1cw3u0m"),o(D,"class","action-btn svelte-1cw3u0m"),o(D,"title",v("file.openExternal")),o(D,"aria-label",v("file.openExternal")),o(M,"class","action-btn action-btn-close svelte-1cw3u0m"),o(M,"title","Close"),o(M,"aria-label","Close preview"),o(I,"class","preview-actions svelte-1cw3u0m"),o(l,"class","preview-header svelte-1cw3u0m"),o(R,"class","preview-body svelte-1cw3u0m"),o(t,"class","modal svelte-1cw3u0m"),o(e,"class","overlay svelte-1cw3u0m"),o(e,"role","presentation")},m(Y,B){C(Y,e,B),s(e,t),s(t,l),s(l,i),Je(a,i,null),s(i,r),s(i,c),s(c,p),s(l,m),s(l,g),s(g,k),s(g,y),s(g,T),s(l,E),s(l,I),s(I,D),s(I,N),s(I,M),s(t,j),s(t,R),q.m(R,null),O=!0,H||(V=[A(D,"click",n[9]),A(M,"click",n[10]),A(e,"click",Et(n[11])),A(e,"keydown",n[12])],H=!0)},p(Y,[B]){(!O||B&1)&&u!==(u=Y[0].name+"")&&K(p,u),(!O||B&1&&h!==(h=Y[0].name))&&o(c,"title",h),(!O||B&1)&&b!==(b=tl(Y[0].size)+"")&&K(k,b),(!O||B&1)&&S!==(S=po(Y[0].mime)+"")&&K(T,S),U===(U=G(Y))&&q?q.p(Y,B):(q.d(1),q=U(Y),q&&(q.c(),q.m(R,null)))},i(Y){O||(pe(a.$$.fragment,Y),O=!0)},o(Y){ge(a.$$.fragment,Y),O=!1},d(Y){Y&&w(e),qe(a),q.d(),H=!1,ve(V)}}}function lp(n,e,t){let l,i,a,{item:r}=e,{content:c=""}=e,{loading:u=!1}=e,{error:p=""}=e;const h=il(),m=Ja(r);function g(T){T.key==="Escape"&&h("close")}function b(){h("openExternal",r.fileId)}Ba(()=>{window.addEventListener("keydown",g)}),Ql(()=>{window.removeEventListener("keydown",g)});const k=()=>h("close"),y=()=>h("close"),S=T=>{T.key==="Escape"&&(T.preventDefault(),h("close"))};return n.$$set=T=>{"item"in T&&t(0,r=T.item),"content"in T&&t(1,c=T.content),"loading"in T&&t(2,u=T.loading),"error"in T&&t(3,p=T.error)},n.$$.update=()=>{n.$$.dirty&3&&t(6,l=Za(r)&&c&&c.startsWith("data:")),n.$$.dirty&1&&t(5,i=xa(r)||ec(r)),n.$$.dirty&1&&t(4,a=$a(r))},[r,c,u,p,a,i,l,h,m,b,k,y,S]}class ip extends it{constructor(e){super(),lt(this,e,lp,np,nt,{item:0,content:1,loading:2,error:3})}}function op(n){let e,t,l,i,a,r,c,u,p,h,m,g,b,k,y,S,T;return{c(){e=f("div"),t=f("div"),l=f("h3"),i=z(n[0]),a=_(),r=f("p"),c=z(n[1]),u=_(),p=f("div"),h=f("button"),m=z(n[2]),b=_(),k=f("button"),y=z(n[3]),o(l,"class","svelte-1fv6yyk"),o(r,"class","message svelte-1fv6yyk"),o(h,"class",g="btn "+(n[4]?"btn-danger":"btn-primary")+" svelte-1fv6yyk"),o(k,"class","btn svelte-1fv6yyk"),o(p,"class","actions svelte-1fv6yyk"),o(t,"class","modal svelte-1fv6yyk"),o(e,"class","overlay svelte-1fv6yyk"),o(e,"role","presentation")},m(E,I){C(E,e,I),s(e,t),s(t,l),s(l,i),s(t,a),s(t,r),s(r,c),s(t,u),s(t,p),s(p,h),s(h,m),s(p,b),s(p,k),s(k,y),S||(T=[A(h,"click",n[6]),A(k,"click",n[7]),A(e,"click",Et(n[8])),A(e,"keydown",n[9])],S=!0)},p(E,[I]){I&1&&K(i,E[0]),I&2&&K(c,E[1]),I&4&&K(m,E[2]),I&16&&g!==(g="btn "+(E[4]?"btn-danger":"btn-primary")+" svelte-1fv6yyk")&&o(h,"class",g),I&8&&K(y,E[3])},i:ie,o:ie,d(E){E&&w(e),S=!1,ve(T)}}}function sp(n,e,t){let{title:l=v("common.confirm")}=e,{message:i=""}=e,{confirmText:a=v("common.delete")}=e,{cancelText:r=v("common.cancel")}=e,{danger:c=!1}=e;const u=il(),p=()=>u("confirm"),h=()=>u("cancel"),m=()=>u("cancel"),g=b=>{b.key==="Escape"&&(b.preventDefault(),u("cancel"))};return n.$$set=b=>{"title"in b&&t(0,l=b.title),"message"in b&&t(1,i=b.message),"confirmText"in b&&t(2,a=b.confirmText),"cancelText"in b&&t(3,r=b.cancelText),"danger"in b&&t(4,c=b.danger)},[l,i,a,r,c,u,p,h,m,g]}class rp extends it{constructor(e){super(),lt(this,e,sp,op,nt,{title:0,message:1,confirmText:2,cancelText:3,danger:4})}}function ap(n){let e,t,l;return{c(){e=$("circle"),t=$("line"),l=$("line"),o(e,"cx","12"),o(e,"cy","12"),o(e,"r","10"),o(t,"x1","12"),o(t,"y1","16"),o(t,"x2","12"),o(t,"y2","12"),o(l,"x1","12"),o(l,"y1","8"),o(l,"x2","12.01"),o(l,"y2","8")},m(i,a){C(i,e,a),C(i,t,a),C(i,l,a)},d(i){i&&(w(e),w(t),w(l))}}}function cp(n){let e,t,l,i;return{c(){e=$("rect"),t=$("polyline"),l=$("line"),i=$("line"),o(e,"x","3"),o(e,"y","5"),o(e,"width","18"),o(e,"height","14"),o(e,"rx","2"),o(t,"points","3 10 21 10"),o(l,"x1","8"),o(l,"y1","5"),o(l,"x2","8"),o(l,"y2","19"),o(i,"x1","16"),o(i,"y1","5"),o(i,"x2","16"),o(i,"y2","19")},m(a,r){C(a,e,r),C(a,t,r),C(a,l,r),C(a,i,r)},d(a){a&&(w(e),w(t),w(l),w(i))}}}function up(n){let e,t;return{c(){e=$("path"),t=$("polyline"),o(e,"d","M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"),o(t,"points","13 2 13 9 20 9")},m(l,i){C(l,e,i),C(l,t,i)},d(l){l&&(w(e),w(t))}}}function fp(n){let e,t;return{c(){e=$("path"),t=$("path"),o(e,"d","M12 20h9"),o(t,"d","M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z")},m(l,i){C(l,e,i),C(l,t,i)},d(l){l&&(w(e),w(t))}}}function dp(n){let e,t,l,i,a;return{c(){e=$("path"),t=$("path"),l=$("line"),i=$("line"),a=$("line"),o(e,"d","M4 19.5A2.5 2.5 0 0 1 6.5 17H20"),o(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"),o(l,"x1","8"),o(l,"y1","7"),o(l,"x2","16"),o(l,"y2","7"),o(i,"x1","8"),o(i,"y1","11"),o(i,"x2","14"),o(i,"y2","11"),o(a,"x1","8"),o(a,"y1","15"),o(a,"x2","12"),o(a,"y2","15")},m(r,c){C(r,e,c),C(r,t,c),C(r,l,c),C(r,i,c),C(r,a,c)},d(r){r&&(w(e),w(t),w(l),w(i),w(a))}}}function pp(n){let e,t,l,i;return{c(){e=$("path"),t=$("polyline"),l=$("line"),i=$("line"),o(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),o(t,"points","14 2 14 8 20 8"),o(l,"x1","16"),o(l,"y1","13"),o(l,"x2","8"),o(l,"y2","13"),o(i,"x1","16"),o(i,"y1","17"),o(i,"x2","8"),o(i,"y2","17")},m(a,r){C(a,e,r),C(a,t,r),C(a,l,r),C(a,i,r)},d(a){a&&(w(e),w(t),w(l),w(i))}}}function vp(n){let e,t;return{c(){e=$("path"),t=$("circle"),o(e,"d","M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"),o(t,"cx","12"),o(t,"cy","7"),o(t,"r","4")},m(l,i){C(l,e,i),C(l,t,i)},d(l){l&&(w(e),w(t))}}}function mp(n){let e,t,l,i;return{c(){e=$("rect"),t=$("rect"),l=$("rect"),i=$("rect"),o(e,"x","3"),o(e,"y","3"),o(e,"width","7"),o(e,"height","7"),o(e,"rx","1"),o(t,"x","14"),o(t,"y","3"),o(t,"width","7"),o(t,"height","4"),o(t,"rx","1"),o(l,"x","14"),o(l,"y","10"),o(l,"width","7"),o(l,"height","11"),o(l,"rx","1"),o(i,"x","3"),o(i,"y","14"),o(i,"width","7"),o(i,"height","7"),o(i,"rx","1")},m(a,r){C(a,e,r),C(a,t,r),C(a,l,r),C(a,i,r)},d(a){a&&(w(e),w(t),w(l),w(i))}}}function _p(n){let e;return{c(){e=$("path"),o(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,l){C(t,e,l)},d(t){t&&w(e)}}}function hp(n){let e;function t(a,r){return a[0]==="folder"?_p:a[0]==="project"?mp:a[0]==="client"?vp:a[0]==="document"?pp:a[0]==="recipe"?dp:a[0]==="note"?fp:a[0]==="file"?up:a[0]==="case"?cp:ap}let l=t(n),i=l(n);return{c(){e=$("svg"),i.c(),o(e,"width",n[1]),o(e,"height",n[1]),o(e,"viewBox","0 0 24 24"),o(e,"fill","none"),o(e,"stroke","currentColor"),o(e,"stroke-width","1.5"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"xmlns","http://www.w3.org/2000/svg")},m(a,r){C(a,e,r),i.m(e,null)},p(a,[r]){l!==(l=t(a))&&(i.d(1),i=l(a),i&&(i.c(),i.m(e,null))),r&2&&o(e,"width",a[1]),r&2&&o(e,"height",a[1])},i:ie,o:ie,d(a){a&&w(e),i.d()}}}function gp(n,e,t){let{kind:l="generic"}=e,{size:i=18}=e;return n.$$set=a=>{"kind"in a&&t(0,l=a.kind),"size"in a&&t(1,i=a.size)},[l,i]}class ol extends it{constructor(e){super(),lt(this,e,gp,hp,nt,{kind:0,size:1})}}function go(n,e,t){const l=n.slice();return l[44]=e[t],l}function bp(n){let e;return{c(){e=f("span"),o(e,"class","tree-toggle-placeholder svelte-zj71cl")},m(t,l){C(t,e,l)},p:ie,d(t){t&&w(e)}}}function kp(n){let e,t,l=n[1][n[44].id]?"▾":"▸",i,a,r;function c(){return n[25](n[44])}return{c(){e=f("button"),t=f("span"),i=z(l),o(t,"class","tree-arrow"),o(e,"class","tree-toggle svelte-zj71cl")},m(u,p){C(u,e,p),s(e,t),s(t,i),a||(r=A(e,"click",Te(c)),a=!0)},p(u,p){n=u,p[0]&3&&l!==(l=n[1][n[44].id]?"▾":"▸")&&K(i,l)},d(u){u&&w(e),a=!1,r()}}}function bo(n){let e,t;return e=new nc({props:{nodes:n[44].children||[],expanded:n[1],selectedNodeId:n[2],level:n[3]+1,onSelect:n[4],onToggle:n[5],onContextMenu:n[6],onDrop:n[7]}}),{c(){Xe(e.$$.fragment)},m(l,i){Je(e,l,i),t=!0},p(l,i){const a={};i[0]&1&&(a.nodes=l[44].children||[]),i[0]&2&&(a.expanded=l[1]),i[0]&4&&(a.selectedNodeId=l[2]),i[0]&8&&(a.level=l[3]+1),i[0]&16&&(a.onSelect=l[4]),i[0]&32&&(a.onToggle=l[5]),i[0]&64&&(a.onContextMenu=l[6]),i[0]&128&&(a.onDrop=l[7]),e.$set(a)},i(l){t||(pe(e.$$.fragment,l),t=!0)},o(l){ge(e.$$.fragment,l),t=!1},d(l){qe(e,l)}}}function ko(n,e){let t,l,i,a,r,c,u,p=e[44].title+"",h,m,g=e[1][e[44].id]&&Gl(e[44]),b,k,y,S;function T(F,W){return W[0]&1&&(l=null),l==null&&(l=!!Sn(F[44])),l?kp:bp}let E=T(e,[-1,-1]),I=E(e);r=new ol({props:{kind:yo(e[44]),size:16}});function D(...F){return e[26](e[44],...F)}function N(...F){return e[27](e[44],...F)}function M(){return e[28](e[44])}function j(...F){return e[29](e[44],...F)}function R(...F){return e[30](e[44],...F)}function O(...F){return e[31](e[44],...F)}function H(...F){return e[32](e[44],...F)}function V(...F){return e[33](e[44],...F)}function G(...F){return e[34](e[44],...F)}function U(...F){return e[35](e[44],...F)}function q(...F){return e[36](e[44],...F)}function Y(...F){return e[37](e[44],...F)}let B=g&&bo(e);return{key:n,first:null,c(){t=f("div"),I.c(),i=_(),a=f("span"),Xe(r.$$.fragment),c=_(),u=f("span"),h=z(p),m=_(),B&&B.c(),b=ht(),o(a,"class","tree-icon svelte-zj71cl"),o(a,"role","button"),o(a,"tabindex","-1"),o(u,"class","tree-label svelte-zj71cl"),o(u,"role","button"),o(u,"tabindex","-1"),o(t,"class","tree-item svelte-zj71cl"),Ct(t,"padding-left",e[3]*16+4+"px"),o(t,"draggable","true"),o(t,"role","button"),o(t,"tabindex","0"),ae(t,"selected",e[2]===e[44].id),ae(t,"drop-valid",e[8]===e[44].id&&e[9][e[44].id]),ae(t,"drop-invalid",e[8]===e[44].id&&!e[9][e[44].id]),this.first=t},m(F,W){C(F,t,W),I.m(t,null),s(t,i),s(t,a),Je(r,a,null),s(t,c),s(t,u),s(u,h),C(F,m,W),B&&B.m(F,W),C(F,b,W),k=!0,y||(S=[A(a,"click",D),A(a,"keydown",N),A(a,"dblclick",Te(e[24])),A(u,"click",Te(M)),A(u,"keydown",j),A(t,"dragstart",R),A(t,"dragover",O),A(t,"dragleave",H),A(t,"drop",V),A(t,"click",G),A(t,"keydown",U),A(t,"dblclick",q),A(t,"contextmenu",ql(Y))],y=!0)},p(F,W){e=F,E===(E=T(e,W))&&I?I.p(e,W):(I.d(1),I=E(e),I&&(I.c(),I.m(t,i)));const P={};W[0]&1&&(P.kind=yo(e[44])),r.$set(P),(!k||W[0]&1)&&p!==(p=e[44].title+"")&&K(h,p),(!k||W[0]&8)&&Ct(t,"padding-left",e[3]*16+4+"px"),(!k||W[0]&5)&&ae(t,"selected",e[2]===e[44].id),(!k||W[0]&769)&&ae(t,"drop-valid",e[8]===e[44].id&&e[9][e[44].id]),(!k||W[0]&769)&&ae(t,"drop-invalid",e[8]===e[44].id&&!e[9][e[44].id]),W[0]&3&&(g=e[1][e[44].id]&&Gl(e[44])),g?B?(B.p(e,W),W[0]&3&&pe(B,1)):(B=bo(e),B.c(),pe(B,1),B.m(b.parentNode,b)):B&&(ut(),ge(B,1,1,()=>{B=null}),ft())},i(F){k||(pe(r.$$.fragment,F),pe(B),k=!0)},o(F){ge(r.$$.fragment,F),ge(B),k=!1},d(F){F&&(w(t),w(m),w(b)),I.d(),qe(r),B&&B.d(F),y=!1,ve(S)}}}function yp(n){let e=[],t=new Map,l,i,a,r,c=ue(n[0]);const u=p=>p[44].id;for(let p=0;p<c.length;p+=1){let h=go(n,c,p),m=u(h);t.set(m,e[p]=ko(m,h))}return{c(){for(let p=0;p<e.length;p+=1)e[p].c();l=ht()},m(p,h){for(let m=0;m<e.length;m+=1)e[m]&&e[m].m(p,h);C(p,l,h),i=!0,a||(r=A(window,"dragend",n[14]),a=!0)},p(p,h){h[0]&2080767&&(c=ue(p[0]),ut(),e=Ka(e,h,u,1,p,c,t,l.parentNode,Ua,ko,l,go),ft())},i(p){if(!i){for(let h=0;h<c.length;h+=1)pe(e[h]);i=!0}},o(p){for(let h=0;h<e.length;h+=1)ge(e[h]);i=!1},d(p){p&&w(l);for(let h=0;h<e.length;h+=1)e[h].d(p);a=!1,r()}}}function yo(n){return n.type==="client"||n.template_id==="client.default"?"client":n.type==="project"||n.template_id==="project.default"?"project":n.type==="document"||n.template_id==="document.default"?"document":n.type==="recipe"||n.template_id==="recipe.default"?"recipe":n.type==="folder"||n.template_id==="folder.default"?"folder":n.type==="case"?"case":n.type==="note"?"note":n.type==="file"?"file":"generic"}function Gl(n){return n.children!==void 0}function Sn(n){return Gl(n)?n.children.length>0:n.has_children===!0}function wo(n){const e={};function t(l,i){for(const a of l)e[a.id]=i,a.children&&t(a.children,a.id)}return t(n,""),e}function Co(n){const e=[];function t(l){for(const i of l)e.push(i),i.children&&t(i.children)}return t(n),e}function wp(n){try{return n.dataTransfer.getData("text/plain")}catch{return""}}function Cp(n,e,t){let l,i,a,{nodes:r=[]}=e,{expanded:c={}}=e,{selectedNodeId:u=""}=e,{level:p=0}=e,{onSelect:h=void 0}=e,{onToggle:m=void 0}=e,{onContextMenu:g=void 0}=e,{onDrop:b=void 0}=e,k={},y=null,S="",T="";const E=["folder","project","client","document","recipe","case"];Ql(()=>{for(const X of Object.keys(k))clearTimeout(k[X]);y&&clearInterval(y)});function I(X){return E.includes(X.type)}function D(X,x,be){if(!X||!x||x===X.id||!I(X))return!1;let Ce=X.id;for(;Ce;){if(Ce===x)return!1;Ce=be[Ce]||""}return!0}function N(X,x){X.stopPropagation(),X.dataTransfer.effectAllowed="move",X.dataTransfer.setData("text/plain",x.id),t(21,S=x.id)}function M(X,x){X.preventDefault(),X.stopPropagation(),X.dataTransfer.dropEffect="move",T!==x.id&&t(8,T=x.id),Sn(x)&&!c[x.id]&&!k[x.id]&&(k[x.id]=setTimeout(()=>{m&&m(x.id),delete k[x.id]},600));const be=X.currentTarget.closest(".workspace-tree-area");if(be){const Ce=be.getBoundingClientRect(),_e=30;X.clientY-Ce.top<_e?y||(y=setInterval(()=>{be.scrollTop-=10},50)):Ce.bottom-X.clientY<_e?y||(y=setInterval(()=>{be.scrollTop+=10},50)):y&&(clearInterval(y),y=null)}}function j(X,x){const be=X.relatedTarget;be&&X.currentTarget.contains(be)||(T===x.id&&t(8,T=""),k[x.id]&&(clearTimeout(k[x.id]),delete k[x.id]),y&&(clearInterval(y),y=null))}function R(X,x){X.preventDefault(),X.stopPropagation(),k[x.id]&&(clearTimeout(k[x.id]),delete k[x.id]),y&&(clearInterval(y),y=null);const be=Co(r),Ce=wo(be),_e=wp(X);if(!D(x,_e,Ce)){t(8,T=""),t(21,S="");return}b&&b(_e,x.id),t(8,T=""),t(21,S="")}function O(){t(8,T=""),t(21,S="");for(const X of Object.keys(k))clearTimeout(k[X]),delete k[X];y&&(clearInterval(y),y=null)}function H(X,x){X.target.closest(".tree-toggle")||X.target.closest(".tree-icon")||h&&h(x)}function V(X,x){Sn(x)&&m&&m(x.id)}function G(X,x){(X.key==="Enter"||X.key===" ")&&(X.preventDefault(),h&&h(x))}function U(X,x){X.stopPropagation(),Sn(x)&&m&&m(x.id)}function q(X,x){(X.key==="Enter"||X.key===" ")&&(X.preventDefault(),X.stopPropagation(),Sn(x)&&m&&m(x.id))}function Y(X,x){(X.key==="Enter"||X.key===" ")&&(X.preventDefault(),h&&h(x))}function B(X,x,be){const Ce={};function _e(He){for(const Ze of He)Ce[Ze.id]=D(Ze,x,be),Ze.children&&_e(Ze.children)}return _e(X),Ce}function F(X){Wa.call(this,n,X)}const W=X=>m&&m(X.id),P=(X,x)=>U(x,X),J=(X,x)=>q(x,X),Q=X=>h&&h(X),ee=(X,x)=>Y(x,X),te=(X,x)=>N(x,X),le=(X,x)=>M(x,X),se=(X,x)=>j(x,X),ce=(X,x)=>R(x,X),de=(X,x)=>H(x,X),we=(X,x)=>G(x,X),ze=(X,x)=>V(x,X),me=(X,x)=>g&&g(x,X);return n.$$set=X=>{"nodes"in X&&t(0,r=X.nodes),"expanded"in X&&t(1,c=X.expanded),"selectedNodeId"in X&&t(2,u=X.selectedNodeId),"level"in X&&t(3,p=X.level),"onSelect"in X&&t(4,h=X.onSelect),"onToggle"in X&&t(5,m=X.onToggle),"onContextMenu"in X&&t(6,g=X.onContextMenu),"onDrop"in X&&t(7,b=X.onDrop)},n.$$.update=()=>{n.$$.dirty[0]&1&&t(23,l=Co(r)),n.$$.dirty[0]&8388608&&t(22,i=wo(l)),n.$$.dirty[0]&14680064&&t(9,a=B(l,S,i))},[r,c,u,p,h,m,g,b,T,a,N,M,j,R,O,H,V,G,U,q,Y,S,i,l,F,W,P,J,Q,ee,te,le,se,ce,de,we,ze,me]}class nc extends it{constructor(e){super(),lt(this,e,Cp,yp,nt,{nodes:0,expanded:1,selectedNodeId:2,level:3,onSelect:4,onToggle:5,onContextMenu:6,onDrop:7},null,[-1,-1])}}function So(n){let e,t;return{c(){e=f("div"),t=z(n[4]),o(e,"class","path-info svelte-a9f1pd")},m(l,i){C(l,e,i),s(e,t)},p(l,i){i&16&&K(t,l[4])},d(l){l&&w(e)}}}function To(n){let e,t;return{c(){e=f("div"),t=z(n[3]),o(e,"class","error-msg svelte-a9f1pd")},m(l,i){C(l,e,i),s(e,t)},p(l,i){i&8&&K(t,l[3])},d(l){l&&w(e)}}}function Sp(n){let e,t,l,i,a,r,c,u,p,h,m,g,b,k,y,S,T,E=v("firstrun.browse")+"",I,D,N,M,j,R,O=(n[2]?v("firstrun.creating"):v("firstrun.create"))+"",H,V,G,U,q,Y,B=n[4]&&So(n),F=n[3]&&To(n);return{c(){e=f("div"),t=f("div"),l=f("img"),a=_(),r=f("h1"),r.textContent=`${v("firstrun.title")}`,c=_(),u=f("p"),u.textContent=`${v("firstrun.desc")}`,p=_(),h=f("div"),m=f("label"),m.textContent=`${v("firstrun.pathLabel")}`,g=_(),b=f("div"),k=f("input"),S=_(),T=f("button"),I=z(E),D=_(),B&&B.c(),N=_(),F&&F.c(),M=_(),j=f("div"),R=f("button"),H=z(O),G=_(),U=f("button"),U.textContent=`${v("firstrun.quit")}`,o(l,"class","first-run-logo svelte-a9f1pd"),pn(l.src,i="/assets/app-icons/icon_64x64.png")||o(l,"src",i),o(l,"width","64"),o(l,"height","64"),o(l,"alt",""),o(r,"class","svelte-a9f1pd"),o(u,"class","first-run-desc svelte-a9f1pd"),o(m,"class","form-label svelte-a9f1pd"),o(m,"for","vault-path"),o(k,"id","vault-path"),o(k,"type","text"),o(k,"placeholder",y=n[1]||v("firstrun.defaultPath")),k.disabled=n[2],o(k,"class","svelte-a9f1pd"),o(T,"class","btn"),T.disabled=n[2],o(b,"class","input-row svelte-a9f1pd"),o(h,"class","form-group svelte-a9f1pd"),o(R,"class","btn btn-primary btn-lg svelte-a9f1pd"),R.disabled=V=!n[0].trim()||n[2],o(U,"class","btn btn-lg svelte-a9f1pd"),o(j,"class","first-run-actions svelte-a9f1pd"),o(t,"class","first-run-card svelte-a9f1pd"),o(e,"class","first-run-screen svelte-a9f1pd")},m(W,P){C(W,e,P),s(e,t),s(t,l),s(t,a),s(t,r),s(t,c),s(t,u),s(t,p),s(t,h),s(h,m),s(h,g),s(h,b),s(b,k),ke(k,n[0]),s(b,S),s(b,T),s(T,I),s(t,D),B&&B.m(t,null),s(t,N),F&&F.m(t,null),s(t,M),s(t,j),s(j,R),s(R,H),s(j,G),s(j,U),q||(Y=[A(k,"input",n[12]),A(k,"input",n[6]),A(k,"keydown",n[9]),A(T,"click",n[5]),A(R,"click",n[7]),A(U,"click",n[8])],q=!0)},p(W,[P]){P&2&&y!==(y=W[1]||v("firstrun.defaultPath"))&&o(k,"placeholder",y),P&4&&(k.disabled=W[2]),P&1&&k.value!==W[0]&&ke(k,W[0]),P&4&&(T.disabled=W[2]),W[4]?B?B.p(W,P):(B=So(W),B.c(),B.m(t,N)):B&&(B.d(1),B=null),W[3]?F?F.p(W,P):(F=To(W),F.c(),F.m(t,M)):F&&(F.d(1),F=null),P&4&&O!==(O=(W[2]?v("firstrun.creating"):v("firstrun.create"))+"")&&K(H,O),P&5&&V!==(V=!W[0].trim()||W[2])&&(R.disabled=V)},i:ie,o:ie,d(W){W&&w(e),B&&B.d(),F&&F.d(),q=!1,ve(Y)}}}function Qn(n,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[n];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails error:",n,t)}return Promise.reject(new Error("Wails not connected: "+n))}function Tp(n,e,t){let{onComplete:l=null}=e,{onQuit:i=null}=e,a="",r="",c=!1,u="",p="",h=null;async function m(){try{const E=await Qn("GetDefaultVaultPath");t(1,r=E||""),t(0,a=r||""),a&&await b()}catch{t(1,r="")}}m();async function g(){try{const E=await Qn("PickDirectory");E&&(t(0,a=E),await b())}catch(E){t(3,u=String(E))}}async function b(){if(!a||!a.trim()){t(4,p=""),h=null;return}try{h=await Qn("CheckVaultPath",a.trim()),h&&t(4,p=h.description)}catch{t(4,p=""),h=null}}async function k(){if(!(!a||!a.trim())){if(t(2,c=!0),t(3,u=""),h&&!h.writable){t(3,u=v("firstrun.errorNoWrite")),t(2,c=!1);return}try{const E=await Qn("CreateVault",a.trim());E&&E.status==="ready"&&l&&l(E)}catch(E){t(3,u=String(E))}t(2,c=!1)}}function y(){i&&i()}function S(E){E.key==="Enter"&&!c&&a.trim()&&k()}function T(){a=this.value,t(0,a)}return n.$$set=E=>{"onComplete"in E&&t(10,l=E.onComplete),"onQuit"in E&&t(11,i=E.onQuit)},[a,r,c,u,p,g,b,k,y,S,l,i,T]}class Ep extends it{constructor(e){super(),lt(this,e,Tp,Sp,nt,{onComplete:10,onQuit:11})}}function Eo(n){let e,t;return{c(){e=f("div"),t=z(n[2]),o(e,"class","error-msg svelte-s3o8c3")},m(l,i){C(l,e,i),s(e,t)},p(l,i){i&4&&K(t,l[2])},d(l){l&&w(e)}}}function Io(n){let e,t,l,i,a,r,c,u,p=v("common.yes")+"",h,m,g,b,k;return{c(){e=f("div"),t=f("div"),l=f("h3"),l.textContent=`${v("recovery.createConfirmTitle")}`,i=_(),a=f("p"),a.textContent=`${v("recovery.createConfirm")}`,r=_(),c=f("div"),u=f("button"),h=z(p),m=_(),g=f("button"),g.textContent=`${v("common.cancel")}`,o(l,"class","svelte-s3o8c3"),o(a,"class","modal-desc svelte-s3o8c3"),o(u,"class","btn btn-primary"),u.disabled=n[1],o(g,"class","btn"),o(c,"class","modal-actions svelte-s3o8c3"),o(t,"class","modal svelte-s3o8c3"),o(e,"class","modal-overlay svelte-s3o8c3"),o(e,"role","button"),o(e,"tabindex","0")},m(y,S){C(y,e,S),s(e,t),s(t,l),s(t,i),s(t,a),s(t,r),s(t,c),s(c,u),s(u,h),s(c,m),s(c,g),b||(k=[A(u,"click",n[6]),A(g,"click",n[7]),A(e,"click",Et(n[7])),A(e,"keydown",n[11])],b=!0)},p(y,S){S&2&&(u.disabled=y[1])},d(y){y&&w(e),b=!1,ve(k)}}}function Ip(n){let e,t,l,i,a,r,c,u,p,h=(n[0]||"—")+"",m,g,b,k,y,S=v("recovery.choose")+"",T,E,I,D=v("recovery.create")+"",N,M,j,R,O,H,V,G=n[2]&&Eo(n),U=n[3]&&Io(n);return{c(){e=f("div"),t=f("div"),l=f("div"),l.textContent="⚠",i=_(),a=f("h1"),a.textContent=`${v("recovery.title")}`,r=_(),c=f("p"),c.textContent=`${v("recovery.expected")}:`,u=_(),p=f("code"),m=z(h),g=_(),G&&G.c(),b=_(),k=f("div"),y=f("button"),T=z(S),E=_(),I=f("button"),N=z(D),M=_(),j=f("button"),j.textContent=`${v("recovery.quit")}`,R=_(),U&&U.c(),O=ht(),o(l,"class","recovery-icon svelte-s3o8c3"),o(a,"class","svelte-s3o8c3"),o(c,"class","recovery-desc svelte-s3o8c3"),o(p,"class","recovery-path svelte-s3o8c3"),o(y,"class","btn btn-primary btn-lg svelte-s3o8c3"),y.disabled=n[1],o(I,"class","btn btn-lg svelte-s3o8c3"),I.disabled=n[1],o(j,"class","btn btn-lg svelte-s3o8c3"),o(k,"class","recovery-actions svelte-s3o8c3"),o(t,"class","recovery-card svelte-s3o8c3"),o(e,"class","recovery-screen svelte-s3o8c3")},m(q,Y){C(q,e,Y),s(e,t),s(t,l),s(t,i),s(t,a),s(t,r),s(t,c),s(t,u),s(t,p),s(p,m),s(t,g),G&&G.m(t,null),s(t,b),s(t,k),s(k,y),s(y,T),s(k,E),s(k,I),s(I,N),s(k,M),s(k,j),C(q,R,Y),U&&U.m(q,Y),C(q,O,Y),H||(V=[A(y,"click",n[4]),A(I,"click",n[5]),A(j,"click",n[8])],H=!0)},p(q,[Y]){Y&1&&h!==(h=(q[0]||"—")+"")&&K(m,h),q[2]?G?G.p(q,Y):(G=Eo(q),G.c(),G.m(t,b)):G&&(G.d(1),G=null),Y&2&&(y.disabled=q[1]),Y&2&&(I.disabled=q[1]),q[3]?U?U.p(q,Y):(U=Io(q),U.c(),U.m(O.parentNode,O)):U&&(U.d(1),U=null)},i:ie,o:ie,d(q){q&&(w(e),w(R),w(O)),G&&G.d(),U&&U.d(q),H=!1,ve(V)}}}function zl(n,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[n];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails error:",n,t)}return Promise.reject(new Error("Wails not connected: "+n))}function Np(n,e,t){let{vaultPath:l=""}=e,{onComplete:i=null}=e,{onQuit:a=null}=e,r=!1,c="",u=!1;async function p(){try{const y=await zl("PickDirectory");if(!y)return;t(1,r=!0),t(2,c="");const S=await zl("OpenVault",y);S&&S.status==="ready"&&i&&i(S)}catch(y){t(2,c=String(y))}t(1,r=!1)}function h(){t(3,u=!0)}async function m(){t(3,u=!1),t(1,r=!0),t(2,c="");try{const y=await zl("CreateVault",l);y&&y.status==="ready"&&i&&i(y)}catch(y){t(2,c=String(y))}t(1,r=!1)}function g(){t(3,u=!1)}function b(){a&&a()}const k=y=>y.key==="Enter"&&g();return n.$$set=y=>{"vaultPath"in y&&t(0,l=y.vaultPath),"onComplete"in y&&t(9,i=y.onComplete),"onQuit"in y&&t(10,a=y.onQuit)},[l,r,c,u,p,h,m,g,b,i,a,k]}class Dp extends it{constructor(e){super(),lt(this,e,Np,Ip,nt,{vaultPath:0,onComplete:9,onQuit:10})}}function No(n,e,t){const l=n.slice();return l[5]=e[t],l}function Mp(n){let e,t,l;return{c(){e=$("path"),t=$("path"),l=$("path"),o(e,"d","M5 4h12l2 2v14H5z"),o(t,"d","M8 4v6h8V4"),o(l,"d","M8 20v-6h8v6")},m(i,a){C(i,e,a),C(i,t,a),C(i,l,a)},d(i){i&&(w(e),w(t),w(l))}}}function jp(n){let e,t,l,i;return{c(){e=$("path"),t=$("path"),l=$("path"),i=$("path"),o(e,"d","M20 11a8 8 0 0 0-14-4l-2 2"),o(t,"d","M4 5v4h4"),o(l,"d","M4 13a8 8 0 0 0 14 4l2-2"),o(i,"d","M20 19v-4h-4")},m(a,r){C(a,e,r),C(a,t,r),C(a,l,r),C(a,i,r)},d(a){a&&(w(e),w(t),w(l),w(i))}}}function Ap(n){let e;return{c(){e=$("path"),o(e,"d","M4 19V9M10 19V5M16 19v-7M22 19H2")},m(t,l){C(t,e,l)},d(t){t&&w(e)}}}function Lp(n){let e;return{c(){e=$("path"),o(e,"d","M3 6h6l2 2h10v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6z")},m(t,l){C(t,e,l)},d(t){t&&w(e)}}}function Pp(n){let e,t;return{c(){e=$("path"),t=$("path"),o(e,"d","M9 3v5M15 3v5M7 8h10v3a5 5 0 0 1-10 0V8z"),o(t,"d","M12 16v5")},m(l,i){C(l,e,i),C(l,t,i)},d(l){l&&(w(e),w(t))}}}function Fp(n){let e,t;return{c(){e=$("rect"),t=$("path"),o(e,"x","4"),o(e,"y","3"),o(e,"width","16"),o(e,"height","18"),o(e,"rx","2"),o(t,"d","M8 7h8M8 11h8M8 15h5")},m(l,i){C(l,e,i),C(l,t,i)},d(l){l&&(w(e),w(t))}}}function Rp(n){let e,t,l;return{c(){e=$("path"),t=$("path"),l=$("path"),o(e,"d","M3 10.5 12 3l9 7.5"),o(t,"d","M5 9.5V21h14V9.5"),o(l,"d","M10 21v-6h4v6")},m(i,a){C(i,e,a),C(i,t,a),C(i,l,a)},d(i){i&&(w(e),w(t),w(l))}}}function Op(n){let e,t;return{c(){e=$("circle"),t=$("path"),o(e,"cx","12"),o(e,"cy","12"),o(e,"r","3"),o(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(l,i){C(l,e,i),C(l,t,i)},d(l){l&&(w(e),w(t))}}}function Do(n){let e,t,l,i,a,r,c,u;function p(b,k){if(b[5].id==="general")return Op;if(b[5].id==="workspace")return Rp;if(b[5].id==="templates")return Fp;if(b[5].id==="plugins")return Pp;if(b[5].id==="files")return Lp;if(b[5].id==="activity")return Ap;if(b[5].id==="sync")return jp;if(b[5].id==="backup")return Mp}let h=p(n),m=h&&h(n);function g(){return n[4](n[5])}return{c(){e=f("button"),t=f("span"),l=$("svg"),m&&m.c(),i=_(),a=f("span"),a.textContent=`${n[5].label}`,r=_(),o(l,"width","16"),o(l,"height","16"),o(l,"viewBox","0 0 24 24"),o(l,"fill","none"),o(l,"stroke","currentColor"),o(l,"stroke-width","1.8"),o(l,"stroke-linecap","round"),o(l,"stroke-linejoin","round"),o(l,"aria-hidden","true"),o(t,"class","settings-nav-icon svelte-1uolm3f"),o(a,"class","settings-nav-label svelte-1uolm3f"),o(e,"class","settings-nav-item svelte-1uolm3f"),ae(e,"active",n[0]===n[5].id),ae(e,"disabled",n[5].id==="plugins"||n[5].id==="files"||n[5].id==="activity"||n[5].id==="backup")},m(b,k){C(b,e,k),s(e,t),s(t,l),m&&m.m(l,null),s(e,i),s(e,a),s(e,r),c||(u=A(e,"click",g),c=!0)},p(b,k){n=b,k&3&&ae(e,"active",n[0]===n[5].id)},d(b){b&&w(e),m&&m.d(),c=!1,u()}}}function zp(n){let e,t=ue(n[1]),l=[];for(let i=0;i<t.length;i+=1)l[i]=Do(No(n,t,i));return{c(){e=f("nav");for(let i=0;i<l.length;i+=1)l[i].c();o(e,"class","settings-sidebar svelte-1uolm3f")},m(i,a){C(i,e,a);for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(e,null)},p(i,[a]){if(a&7){t=ue(i[1]);let r;for(r=0;r<t.length;r+=1){const c=No(i,t,r);l[r]?l[r].p(c,a):(l[r]=Do(c),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=t.length}},i:ie,o:ie,d(i){i&&w(e),Re(l,i)}}}function Hp(n,e,t){let{activeSection:l="general"}=e,{onSelect:i=null}=e;const a=[{id:"general",label:v("settings.general")},{id:"workspace",label:v("settings.workspace")},{id:"templates",label:v("settings.templates")},{id:"plugins",label:v("settings.plugins")},{id:"files",label:v("settings.files")},{id:"activity",label:v("settings.activity")},{id:"sync",label:v("settings.sync")},{id:"backup",label:v("settings.backup")}];function r(u){i&&i(u)}const c=u=>r(u.id);return n.$$set=u=>{"activeSection"in u&&t(0,l=u.activeSection),"onSelect"in u&&t(3,i=u.onSelect)},[l,a,r,i,c]}class Bp extends it{constructor(e){super(),lt(this,e,Hp,zp,nt,{activeSection:0,onSelect:3})}}function Mo(n){let e;return{c(){e=f("div"),e.textContent=`${v("settings.saved")}`,o(e,"class","save-notice svelte-1e2uhdh")},m(t,l){C(t,e,l)},d(t){t&&w(e)}}}function Wp(n){let e,t,l,i,a,r,c,u,p,h,m,g,b,k,y,S,T,E,I,D,N,M,j,R,O,H,V,G,U,q,Y,B,F,W=n[1]&&Mo();return{c(){e=f("div"),t=f("h2"),t.textContent=`${v("settings.general")}`,l=_(),i=f("p"),i.textContent=`${v("settings.generalDesc")}`,a=_(),r=f("div"),c=f("h3"),c.textContent=`${v("settings.appearance")}`,u=_(),p=f("div"),h=f("label"),m=f("span"),m.textContent=`${v("settings.theme")}`,g=_(),b=f("select"),k=f("option"),k.textContent=`${v("settings.themeSystem")}`,y=f("option"),y.textContent=`${v("settings.themeLight")} (${v("settings.langSoon")})`,S=f("option"),S.textContent=`${v("settings.themeDark")} (${v("settings.langSoon")})`,T=_(),E=f("div"),I=f("h3"),I.textContent=`${v("settings.localization")}`,D=_(),N=f("div"),M=f("label"),j=f("span"),j.textContent=`${v("settings.language")}`,R=_(),O=f("select"),H=f("option"),H.textContent=`${v("settings.langRu")}`,V=f("option"),V.textContent=`${v("settings.langEn")} (${v("settings.langSoon")})`,G=_(),U=f("div"),W&&W.c(),q=_(),Y=f("button"),Y.textContent=`${v("settings.save")}`,o(t,"class","svelte-1e2uhdh"),o(i,"class","section-desc svelte-1e2uhdh"),o(c,"class","card-title svelte-1e2uhdh"),o(m,"class","label-text svelte-1e2uhdh"),k.__value="system",ke(k,k.__value),y.__value="light",ke(y,y.__value),y.disabled=!0,S.__value="dark",ke(S,S.__value),S.disabled=!0,n[0]===void 0&&xt(()=>n[5].call(b)),o(p,"class","form-group svelte-1e2uhdh"),o(r,"class","settings-card svelte-1e2uhdh"),o(I,"class","card-title svelte-1e2uhdh"),o(j,"class","label-text svelte-1e2uhdh"),H.__value="ru",ke(H,H.__value),V.__value="en",ke(V,V.__value),O.disabled=!0,o(N,"class","form-group svelte-1e2uhdh"),o(E,"class","settings-card svelte-1e2uhdh"),o(Y,"class","btn btn-primary"),o(U,"class","settings-actions svelte-1e2uhdh"),o(e,"class","settings-section svelte-1e2uhdh")},m(P,J){C(P,e,J),s(e,t),s(e,l),s(e,i),s(e,a),s(e,r),s(r,c),s(r,u),s(r,p),s(p,h),s(h,m),s(h,g),s(h,b),s(b,k),s(b,y),s(b,S),Bt(b,n[0],!0),s(e,T),s(e,E),s(E,I),s(E,D),s(E,N),s(N,M),s(M,j),s(M,R),s(M,O),s(O,H),s(O,V),s(e,G),s(e,U),W&&W.m(U,null),s(U,q),s(U,Y),B||(F=[A(b,"change",n[5]),A(Y,"click",n[2])],B=!0)},p(P,[J]){J&1&&Bt(b,P[0]),P[1]?W||(W=Mo(),W.c(),W.m(U,q)):W&&(W.d(1),W=null)},i:ie,o:ie,d(P){P&&w(e),W&&W.d(),B=!1,ve(F)}}}function Vp(n,e,t){let{appConfig:l=null}=e,{onSave:i=null}=e,a="system",r=!1;function c(){l&&t(0,a=l.theme||"system")}async function u(){l&&(t(3,l.theme=a,l),i&&await i(l),t(1,r=!0),setTimeout(()=>t(1,r=!1),2e3))}function p(){a=xn(this),t(0,a)}return n.$$set=h=>{"appConfig"in h&&t(3,l=h.appConfig),"onSave"in h&&t(4,i=h.onSave)},n.$$.update=()=>{n.$$.dirty&8&&l&&c()},[a,r,u,l,i,p]}class Up extends it{constructor(e){super(),lt(this,e,Vp,Wp,nt,{appConfig:3,onSave:4})}}function jo(n){let e,t;return{c(){e=f("div"),t=z(n[1]),o(e,"class","notice svelte-1zbky3")},m(l,i){C(l,e,i),s(e,t)},p(l,i){i&2&&K(t,l[1])},d(l){l&&w(e)}}}function Kp(n){let e;return{c(){e=f("p"),e.textContent=`${v("settings.noVaultInfo")}`,o(e,"class","no-data svelte-1zbky3")},m(t,l){C(t,e,l)},p:ie,d(t){t&&w(e)}}}function Gp(n){let e,t,l,i,a,r=n[0].path+"",c,u,p,h,m,g,b=n[0].dbPath+"",k,y,S,T=n[0].nodeCount!==void 0&&Ao(n),E=n[0].fileCount!==void 0&&Lo(n);return{c(){e=f("div"),t=f("div"),l=f("span"),l.textContent=`${v("settings.vaultPath")}`,i=_(),a=f("span"),c=z(r),u=_(),p=f("div"),h=f("span"),h.textContent="DB",m=_(),g=f("span"),k=z(b),y=_(),T&&T.c(),S=_(),E&&E.c(),o(l,"class","info-label svelte-1zbky3"),o(a,"class","info-value mono svelte-1zbky3"),o(t,"class","info-row svelte-1zbky3"),o(h,"class","info-label svelte-1zbky3"),o(g,"class","info-value mono small svelte-1zbky3"),o(p,"class","info-row svelte-1zbky3"),o(e,"class","vault-info svelte-1zbky3")},m(I,D){C(I,e,D),s(e,t),s(t,l),s(t,i),s(t,a),s(a,c),s(e,u),s(e,p),s(p,h),s(p,m),s(p,g),s(g,k),s(e,y),T&&T.m(e,null),s(e,S),E&&E.m(e,null)},p(I,D){D&1&&r!==(r=I[0].path+"")&&K(c,r),D&1&&b!==(b=I[0].dbPath+"")&&K(k,b),I[0].nodeCount!==void 0?T?T.p(I,D):(T=Ao(I),T.c(),T.m(e,S)):T&&(T.d(1),T=null),I[0].fileCount!==void 0?E?E.p(I,D):(E=Lo(I),E.c(),E.m(e,null)):E&&(E.d(1),E=null)},d(I){I&&w(e),T&&T.d(),E&&E.d()}}}function Ao(n){let e,t,l,i,a=n[0].nodeCount+"",r;return{c(){e=f("div"),t=f("span"),t.textContent="Nodes",l=_(),i=f("span"),r=z(a),o(t,"class","info-label svelte-1zbky3"),o(i,"class","info-value svelte-1zbky3"),o(e,"class","info-row svelte-1zbky3")},m(c,u){C(c,e,u),s(e,t),s(e,l),s(e,i),s(i,r)},p(c,u){u&1&&a!==(a=c[0].nodeCount+"")&&K(r,a)},d(c){c&&w(e)}}}function Lo(n){let e,t,l,i,a=n[0].fileCount+"",r;return{c(){e=f("div"),t=f("span"),t.textContent="Files",l=_(),i=f("span"),r=z(a),o(t,"class","info-label svelte-1zbky3"),o(i,"class","info-value svelte-1zbky3"),o(e,"class","info-row svelte-1zbky3")},m(c,u){C(c,e,u),s(e,t),s(e,l),s(e,i),s(i,r)},p(c,u){u&1&&a!==(a=c[0].fileCount+"")&&K(r,a)},d(c){c&&w(e)}}}function Jp(n){let e,t,l,i,a,r,c,u,p,h,m,g,b,k,y,S,T=n[1]&&jo(n);function E(N,M){return N[0]?Gp:Kp}let I=E(n),D=I(n);return{c(){e=f("div"),t=f("h2"),t.textContent=`${v("settings.workspace")}`,l=_(),i=f("p"),i.textContent=`${v("settings.workspaceDesc")}`,a=_(),T&&T.c(),r=_(),c=f("div"),D.c(),u=_(),p=f("div"),h=f("button"),h.textContent=`${v("settings.openVault")}`,m=_(),g=f("button"),g.textContent=`${v("settings.changeVault")}`,b=_(),k=f("button"),k.textContent=`${v("settings.checkIntegrity")}`,o(t,"class","svelte-1zbky3"),o(i,"class","section-desc svelte-1zbky3"),o(c,"class","settings-card svelte-1zbky3"),o(h,"class","btn svelte-1zbky3"),o(g,"class","btn svelte-1zbky3"),o(k,"class","btn svelte-1zbky3"),o(p,"class","workspace-actions svelte-1zbky3"),o(e,"class","settings-section svelte-1zbky3")},m(N,M){C(N,e,M),s(e,t),s(e,l),s(e,i),s(e,a),T&&T.m(e,null),s(e,r),s(e,c),D.m(c,null),s(e,u),s(e,p),s(p,h),s(p,m),s(p,g),s(p,b),s(p,k),y||(S=[A(h,"click",n[2]),A(g,"click",n[4]),A(k,"click",n[3])],y=!0)},p(N,[M]){N[1]?T?T.p(N,M):(T=jo(N),T.c(),T.m(e,r)):T&&(T.d(1),T=null),I===(I=E(N))&&D?D.p(N,M):(D.d(1),D=I(N),D&&(D.c(),D.m(c,null)))},i:ie,o:ie,d(N){N&&w(e),T&&T.d(),D.d(),y=!1,ve(S)}}}function un(n,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[n];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails error:",n,t)}return Promise.reject(new Error("Wails not connected: "+n))}function qp(n,e,t){let{onRefresh:l=null}=e,i=null,a="";async function r(){try{t(0,i=await un("GetVaultInfo"))}catch{t(0,i=null)}}r();async function c(){try{await un("OpenVaultFolder")}catch(h){t(1,a=String(h))}}async function u(){try{const h=await un("VaultCheck");h.healthy?t(1,a="Vault healthy"):t(1,a="Issues found: "+(h.errors||[]).join("; "))}catch(h){t(1,a=String(h))}}async function p(){try{const h=await un("PickDirectory");if(!h)return;const m=await un("OpenVault",h);m&&m.status==="ready"&&(t(0,i=await un("GetVaultInfo")),l&&l())}catch(h){t(1,a=String(h))}}return n.$$set=h=>{"onRefresh"in h&&t(5,l=h.onRefresh)},[i,a,c,u,p,l]}class Yp extends it{constructor(e){super(),lt(this,e,qp,Jp,nt,{onRefresh:5})}}function Po(n,e,t){const l=n.slice();return l[6]=e[t],l}function Qp(n){let e,t=ue(n[0]),l=[];for(let i=0;i<t.length;i+=1)l[i]=Fo(Po(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();o(e,"class","template-list svelte-ksamnw")},m(i,a){C(i,e,a);for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(e,null)},p(i,a){if(a&5){t=ue(i[0]);let r;for(r=0;r<t.length;r+=1){const c=Po(i,t,r);l[r]?l[r].p(c,a):(l[r]=Fo(c),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=t.length}},d(i){i&&w(e),Re(l,i)}}}function Xp(n){let e;return{c(){e=f("p"),e.textContent=`${v("common.empty")}`,o(e,"class","no-data svelte-ksamnw")},m(t,l){C(t,e,l)},p:ie,d(t){t&&w(e)}}}function Zp(n){let e;return{c(){e=f("p"),e.textContent=`${v("common.loading")}`,o(e,"class","loading svelte-ksamnw")},m(t,l){C(t,e,l)},p:ie,d(t){t&&w(e)}}}function Fo(n){let e,t,l,i=(v("template."+n[6].id)||n[6].title)+"",a,r,c,u,p=n[6].type+"",h,m,g,b,k,y,S,T,E=(n[6].enabled?v("settings.templateEnabled"):v("settings.templateDisabled"))+"",I,D,N,M;function j(){return n[4](n[6])}return{c(){e=f("div"),t=f("div"),l=f("span"),a=z(i),r=_(),c=f("span"),u=z("("),h=z(p),m=z(")"),g=_(),b=f("label"),k=f("input"),S=_(),T=f("span"),I=z(E),D=_(),o(l,"class","template-name svelte-ksamnw"),o(c,"class","template-type svelte-ksamnw"),o(t,"class","template-info svelte-ksamnw"),o(k,"type","checkbox"),k.checked=y=n[6].enabled,o(k,"class","svelte-ksamnw"),o(T,"class","toggle-text svelte-ksamnw"),o(b,"class","toggle-label svelte-ksamnw"),o(e,"class","template-item svelte-ksamnw")},m(R,O){C(R,e,O),s(e,t),s(t,l),s(l,a),s(t,r),s(t,c),s(c,u),s(c,h),s(c,m),s(e,g),s(e,b),s(b,k),s(b,S),s(b,T),s(T,I),s(e,D),N||(M=A(k,"change",j),N=!0)},p(R,O){n=R,O&1&&i!==(i=(v("template."+n[6].id)||n[6].title)+"")&&K(a,i),O&1&&p!==(p=n[6].type+"")&&K(h,p),O&1&&y!==(y=n[6].enabled)&&(k.checked=y),O&1&&E!==(E=(n[6].enabled?v("settings.templateEnabled"):v("settings.templateDisabled"))+"")&&K(I,E)},d(R){R&&w(e),N=!1,M()}}}function xp(n){let e,t,l,i,a;function r(p,h){return p[1]?Zp:p[0].length===0?Xp:Qp}let c=r(n),u=c(n);return{c(){e=f("div"),t=f("h2"),t.textContent=`${v("settings.templates")}`,l=_(),i=f("p"),i.textContent=`${v("settings.templatesDesc")}`,a=_(),u.c(),o(t,"class","svelte-ksamnw"),o(i,"class","section-desc svelte-ksamnw"),o(e,"class","settings-section svelte-ksamnw")},m(p,h){C(p,e,h),s(e,t),s(e,l),s(e,i),s(e,a),u.m(e,null)},p(p,[h]){c===(c=r(p))&&u?u.p(p,h):(u.d(1),u=c(p),u&&(u.c(),u.m(e,null)))},i:ie,o:ie,d(p){p&&w(e),u.d()}}}function Ro(n,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[n];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails error:",n,t)}return Promise.reject(new Error("Wails not connected: "+n))}function $p(n,e,t){let{onRefresh:l=null}=e,i=[],a=!0;async function r(){t(1,a=!0);try{t(0,i=await Ro("AllTemplates")||[])}catch{t(0,i=[])}t(1,a=!1)}r();async function c(p){const h=!p.enabled;try{await Ro("SetTemplateEnabled",p.id,h),p.enabled=h,t(0,i),l&&l()}catch(m){console.error(m)}}const u=p=>c(p);return n.$$set=p=>{"onRefresh"in p&&t(3,l=p.onRefresh)},[i,a,c,l,u]}class ev extends it{constructor(e){super(),lt(this,e,$p,xp,nt,{onRefresh:3})}}function tv(n){let e,t,l,i,a,r,c,u;return{c(){e=f("div"),t=f("h2"),t.textContent=`${v("settings.plugins")}`,l=_(),i=f("p"),i.textContent=`${v("settings.noPlugins")}`,a=_(),r=f("button"),r.textContent=`${v("settings.openPluginsDir")}`,o(t,"class","svelte-8jch95"),o(i,"class","section-desc svelte-8jch95"),o(r,"class","btn"),o(e,"class","settings-section svelte-8jch95")},m(p,h){C(p,e,h),s(e,t),s(e,l),s(e,i),s(e,a),s(e,r),c||(u=A(r,"click",lv),c=!0)},p:ie,i:ie,o:ie,d(p){p&&w(e),c=!1,u()}}}function nv(n,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[n];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails error:",n,t)}return Promise.reject(new Error("Wails not connected: "+n))}async function lv(){try{await nv("OpenPluginsFolder")}catch{}}class iv extends it{constructor(e){super(),lt(this,e,null,tv,nt,{})}}function ov(n){let e,t,l,i;return{c(){e=f("div"),t=f("h2"),t.textContent=`${v("settings.files")}`,l=_(),i=f("p"),i.textContent=`${v("settings.filesStub")}`,o(t,"class","svelte-19bo7bn"),o(i,"class","section-desc svelte-19bo7bn"),o(e,"class","settings-section svelte-19bo7bn")},m(a,r){C(a,e,r),s(e,t),s(e,l),s(e,i)},p:ie,i:ie,o:ie,d(a){a&&w(e)}}}class sv extends it{constructor(e){super(),lt(this,e,null,ov,nt,{})}}function rv(n){let e,t,l,i;return{c(){e=f("div"),t=f("h2"),t.textContent=`${v("settings.activity")}`,l=_(),i=f("p"),i.textContent=`${v("settings.activityStub")}`,o(t,"class","svelte-19bo7bn"),o(i,"class","section-desc svelte-19bo7bn"),o(e,"class","settings-section svelte-19bo7bn")},m(a,r){C(a,e,r),s(e,t),s(e,l),s(e,i)},p:ie,i:ie,o:ie,d(a){a&&w(e)}}}class av extends it{constructor(e){super(),lt(this,e,null,rv,nt,{})}}function Oo(n){let e,t;return{c(){e=f("div"),t=z(n[2]),o(e,"class","error-msg svelte-1fx1e1e")},m(l,i){C(l,e,i),s(e,t)},p(l,i){i[0]&4&&K(t,l[2])},d(l){l&&w(e)}}}function zo(n){let e,t;return{c(){e=f("div"),t=z(n[3]),o(e,"class","result-msg svelte-1fx1e1e"),ae(e,"warning",n[4]==="warning")},m(l,i){C(l,e,i),s(e,t)},p(l,i){i[0]&8&&K(t,l[3]),i[0]&16&&ae(e,"warning",l[4]==="warning")},d(l){l&&w(e)}}}function cv(n){let e,t,l,i,a,r,c,u,p,h,m,g,b,k,y,S,T,E,I,D,N,M,j=v("settings.checkConnection")+"",R,O,H,V,G=v("common.connect")+"",U,q,Y,B,F,W=n[11]!==null&&Ho(n);return{c(){e=f("div"),t=f("div"),l=f("div"),i=f("label"),a=f("span"),a.textContent=`${v("settings.serverUrl")}`,r=_(),c=f("input"),u=_(),p=f("div"),h=f("label"),m=f("span"),m.textContent=`${v("sync.username")}`,g=_(),b=f("input"),k=_(),y=f("div"),S=f("label"),T=f("span"),T.textContent=`${v("sync.password")}`,E=_(),I=f("input"),D=_(),N=f("div"),M=f("button"),R=z(j),H=_(),V=f("button"),U=z(G),Y=_(),W&&W.c(),o(a,"class","label-text"),o(c,"type","text"),o(c,"placeholder","https://example.com"),o(l,"class","form-group svelte-1fx1e1e"),o(m,"class","label-text"),o(b,"type","text"),o(p,"class","form-group svelte-1fx1e1e"),o(T,"class","label-text"),o(I,"type","password"),o(y,"class","form-group svelte-1fx1e1e"),o(M,"class","btn"),M.disabled=O=n[1]||!n[5],o(V,"class","btn btn-primary"),V.disabled=q=n[1]||!n[5]||!n[6]||!n[7],o(N,"class","sync-setup-actions svelte-1fx1e1e"),o(t,"class","sync-setup svelte-1fx1e1e"),o(e,"class","settings-card svelte-1fx1e1e")},m(P,J){C(P,e,J),s(e,t),s(t,l),s(l,i),s(i,a),s(i,r),s(i,c),ke(c,n[5]),s(t,u),s(t,p),s(p,h),s(h,m),s(h,g),s(h,b),ke(b,n[6]),s(t,k),s(t,y),s(y,S),s(S,T),s(S,E),s(S,I),ke(I,n[7]),s(t,D),s(t,N),s(N,M),s(M,R),s(N,H),s(N,V),s(V,U),s(t,Y),W&&W.m(t,null),B||(F=[A(c,"input",n[23]),A(b,"input",n[24]),A(I,"input",n[25]),A(M,"click",n[12]),A(V,"click",n[13])],B=!0)},p(P,J){J[0]&32&&c.value!==P[5]&&ke(c,P[5]),J[0]&64&&b.value!==P[6]&&ke(b,P[6]),J[0]&128&&I.value!==P[7]&&ke(I,P[7]),J[0]&34&&O!==(O=P[1]||!P[5])&&(M.disabled=O),J[0]&226&&q!==(q=P[1]||!P[5]||!P[6]||!P[7])&&(V.disabled=q),P[11]!==null?W?W.p(P,J):(W=Ho(P),W.c(),W.m(t,null)):W&&(W.d(1),W=null)},d(P){P&&w(e),W&&W.d(),B=!1,ve(F)}}}function uv(n){let e,t,l,i,a,r,c=n[20](n[0].lastStatus)+"",u,p,h,m,g,b,k,y,S,T=v("settings.syncNow")+"",E,I,D,N=v("settings.disconnect")+"",M,j,R,O=v("settings.resetKey")+"",H,V,G,U,q,Y,B,F,W,P,J,Q,ee=n[0].serverUrl&&Bo(n),te=n[0].deviceName&&Wo(n),le=n[0].deviceId&&Vo(n),se=n[0].lastSyncAt&&Uo(n),ce=n[0].lastError&&Ko(n);return{c(){e=f("div"),t=f("div"),l=f("div"),i=f("span"),i.textContent=`${v("settings.status")}`,a=_(),r=f("span"),u=z(c),p=_(),ee&&ee.c(),h=_(),te&&te.c(),m=_(),le&&le.c(),g=_(),se&&se.c(),b=_(),ce&&ce.c(),k=_(),y=f("div"),S=f("button"),E=z(T),I=_(),D=f("button"),M=z(N),j=_(),R=f("button"),H=z(O),V=_(),G=f("div"),U=f("label"),q=f("span"),q.textContent=`${v("sync.interval")}`,Y=_(),B=f("div"),F=f("input"),W=_(),P=f("button"),P.textContent=`${v("common.save")}`,o(i,"class","info-label svelte-1fx1e1e"),o(r,"class","info-value svelte-1fx1e1e"),ae(r,"status-ok",n[0].lastStatus==="connected"),ae(r,"status-err",n[0].lastStatus==="error"||n[0].lastStatus==="revoked"),o(l,"class","info-row svelte-1fx1e1e"),o(t,"class","sync-info svelte-1fx1e1e"),o(e,"class","settings-card svelte-1fx1e1e"),o(S,"class","btn btn-primary"),S.disabled=n[1],o(D,"class","btn"),D.disabled=n[1],o(R,"class","btn"),R.disabled=n[1],o(y,"class","sync-actions svelte-1fx1e1e"),o(q,"class","label-text"),o(F,"type","number"),o(F,"min","0"),o(F,"placeholder","0"),o(F,"class","svelte-1fx1e1e"),o(P,"class","btn btn-sm"),o(B,"class","interval-row svelte-1fx1e1e"),o(G,"class","sync-interval svelte-1fx1e1e")},m(de,we){C(de,e,we),s(e,t),s(t,l),s(l,i),s(l,a),s(l,r),s(r,u),s(t,p),ee&&ee.m(t,null),s(t,h),te&&te.m(t,null),s(t,m),le&&le.m(t,null),s(t,g),se&&se.m(t,null),s(t,b),ce&&ce.m(t,null),C(de,k,we),C(de,y,we),s(y,S),s(S,E),s(y,I),s(y,D),s(D,M),s(y,j),s(y,R),s(R,H),C(de,V,we),C(de,G,we),s(G,U),s(U,q),s(U,Y),s(U,B),s(B,F),ke(F,n[8]),s(B,W),s(B,P),J||(Q=[A(S,"click",n[14]),A(D,"click",n[16]),A(R,"click",n[18]),A(F,"input",n[22]),A(P,"click",n[15])],J=!0)},p(de,we){we[0]&1&&c!==(c=de[20](de[0].lastStatus)+"")&&K(u,c),we[0]&1&&ae(r,"status-ok",de[0].lastStatus==="connected"),we[0]&1&&ae(r,"status-err",de[0].lastStatus==="error"||de[0].lastStatus==="revoked"),de[0].serverUrl?ee?ee.p(de,we):(ee=Bo(de),ee.c(),ee.m(t,h)):ee&&(ee.d(1),ee=null),de[0].deviceName?te?te.p(de,we):(te=Wo(de),te.c(),te.m(t,m)):te&&(te.d(1),te=null),de[0].deviceId?le?le.p(de,we):(le=Vo(de),le.c(),le.m(t,g)):le&&(le.d(1),le=null),de[0].lastSyncAt?se?se.p(de,we):(se=Uo(de),se.c(),se.m(t,b)):se&&(se.d(1),se=null),de[0].lastError?ce?ce.p(de,we):(ce=Ko(de),ce.c(),ce.m(t,null)):ce&&(ce.d(1),ce=null),we[0]&2&&(S.disabled=de[1]),we[0]&2&&(D.disabled=de[1]),we[0]&2&&(R.disabled=de[1]),we[0]&256&&ll(F.value)!==de[8]&&ke(F,de[8])},d(de){de&&(w(e),w(k),w(y),w(V),w(G)),ee&&ee.d(),te&&te.d(),le&&le.d(),se&&se.d(),ce&&ce.d(),J=!1,ve(Q)}}}function Ho(n){let e,t=(n[11]?v("common.test")+" OK":v("error.generic"))+"",l;return{c(){e=f("div"),l=z(t),o(e,"class","connection-result svelte-1fx1e1e"),ae(e,"ok",n[11]),ae(e,"fail",!n[11])},m(i,a){C(i,e,a),s(e,l)},p(i,a){a[0]&2048&&t!==(t=(i[11]?v("common.test")+" OK":v("error.generic"))+"")&&K(l,t),a[0]&2048&&ae(e,"ok",i[11]),a[0]&2048&&ae(e,"fail",!i[11])},d(i){i&&w(e)}}}function Bo(n){let e,t,l,i,a=n[0].serverUrl+"",r;return{c(){e=f("div"),t=f("span"),t.textContent=`${v("settings.serverUrl")}`,l=_(),i=f("span"),r=z(a),o(t,"class","info-label svelte-1fx1e1e"),o(i,"class","info-value mono svelte-1fx1e1e"),o(e,"class","info-row svelte-1fx1e1e")},m(c,u){C(c,e,u),s(e,t),s(e,l),s(e,i),s(i,r)},p(c,u){u[0]&1&&a!==(a=c[0].serverUrl+"")&&K(r,a)},d(c){c&&w(e)}}}function Wo(n){let e,t,l,i,a=n[0].deviceName+"",r;return{c(){e=f("div"),t=f("span"),t.textContent=`${v("settings.deviceName")}`,l=_(),i=f("span"),r=z(a),o(t,"class","info-label svelte-1fx1e1e"),o(i,"class","info-value svelte-1fx1e1e"),o(e,"class","info-row svelte-1fx1e1e")},m(c,u){C(c,e,u),s(e,t),s(e,l),s(e,i),s(i,r)},p(c,u){u[0]&1&&a!==(a=c[0].deviceName+"")&&K(r,a)},d(c){c&&w(e)}}}function Vo(n){let e,t,l,i,a=n[0].deviceId+"",r;return{c(){e=f("div"),t=f("span"),t.textContent=`${v("settings.deviceId")}`,l=_(),i=f("span"),r=z(a),o(t,"class","info-label svelte-1fx1e1e"),o(i,"class","info-value mono svelte-1fx1e1e"),o(e,"class","info-row svelte-1fx1e1e")},m(c,u){C(c,e,u),s(e,t),s(e,l),s(e,i),s(i,r)},p(c,u){u[0]&1&&a!==(a=c[0].deviceId+"")&&K(r,a)},d(c){c&&w(e)}}}function Uo(n){let e,t,l,i,a=n[0].lastSyncAt+"",r;return{c(){e=f("div"),t=f("span"),t.textContent=`${v("settings.lastSync")}`,l=_(),i=f("span"),r=z(a),o(t,"class","info-label svelte-1fx1e1e"),o(i,"class","info-value svelte-1fx1e1e"),o(e,"class","info-row svelte-1fx1e1e")},m(c,u){C(c,e,u),s(e,t),s(e,l),s(e,i),s(i,r)},p(c,u){u[0]&1&&a!==(a=c[0].lastSyncAt+"")&&K(r,a)},d(c){c&&w(e)}}}function Ko(n){let e,t,l,i,a=n[0].lastError+"",r;return{c(){e=f("div"),t=f("span"),t.textContent=`${v("settings.lastError")}`,l=_(),i=f("span"),r=z(a),o(t,"class","info-label svelte-1fx1e1e"),o(i,"class","info-value error svelte-1fx1e1e"),o(e,"class","info-row svelte-1fx1e1e")},m(c,u){C(c,e,u),s(e,t),s(e,l),s(e,i),s(i,r)},p(c,u){u[0]&1&&a!==(a=c[0].lastError+"")&&K(r,a)},d(c){c&&w(e)}}}function Go(n){let e,t,l,i,a,r,c,u,p,h,m,g;return{c(){e=f("button"),t=f("div"),l=f("h3"),l.textContent=`${v("settings.confirmDisconnect")}`,i=_(),a=f("p"),a.textContent=`${v("settings.confirmDisconnectDesc")}`,r=_(),c=f("div"),u=f("button"),u.textContent=`${v("common.disconnect")}`,p=_(),h=f("button"),h.textContent=`${v("common.cancel")}`,o(l,"class","svelte-1fx1e1e"),o(a,"class","modal-desc svelte-1fx1e1e"),o(u,"class","btn btn-danger"),o(h,"class","btn"),o(c,"class","modal-actions svelte-1fx1e1e"),o(t,"class","modal svelte-1fx1e1e"),o(e,"class","modal-overlay svelte-1fx1e1e")},m(b,k){C(b,e,k),s(e,t),s(t,l),s(t,i),s(t,a),s(t,r),s(t,c),s(c,u),s(c,p),s(c,h),m||(g=[A(u,"click",n[17]),A(h,"click",n[26]),A(e,"click",n[27])],m=!0)},p:ie,d(b){b&&w(e),m=!1,ve(g)}}}function Jo(n){let e,t,l,i,a,r,c,u,p,h,m,g;return{c(){e=f("button"),t=f("div"),l=f("h3"),l.textContent=`${v("settings.confirmResetKey")}`,i=_(),a=f("p"),a.textContent=`${v("settings.confirmResetKeyDesc")}`,r=_(),c=f("div"),u=f("button"),u.textContent=`${v("settings.resetKey")}`,p=_(),h=f("button"),h.textContent=`${v("common.cancel")}`,o(l,"class","svelte-1fx1e1e"),o(a,"class","modal-desc svelte-1fx1e1e"),o(u,"class","btn btn-danger"),o(h,"class","btn"),o(c,"class","modal-actions svelte-1fx1e1e"),o(t,"class","modal svelte-1fx1e1e"),o(e,"class","modal-overlay svelte-1fx1e1e")},m(b,k){C(b,e,k),s(e,t),s(t,l),s(t,i),s(t,a),s(t,r),s(t,c),s(c,u),s(c,p),s(c,h),m||(g=[A(u,"click",n[19]),A(h,"click",n[28]),A(e,"click",n[29])],m=!0)},p:ie,d(b){b&&w(e),m=!1,ve(g)}}}function fv(n){let e,t,l,i,a,r,c,u,p,h,m=n[2]&&Oo(n),g=n[3]&&!n[2]&&zo(n);function b(E,I){return E[0]&&E[0].enabled?uv:cv}let k=b(n),y=k(n),S=n[9]&&Go(n),T=n[10]&&Jo(n);return{c(){e=f("div"),t=f("h2"),t.textContent=`${v("settings.sync")}`,l=_(),i=f("p"),i.textContent=`${v("settings.syncDesc")}`,a=_(),m&&m.c(),r=_(),g&&g.c(),c=_(),y.c(),u=_(),S&&S.c(),p=_(),T&&T.c(),h=ht(),o(t,"class","svelte-1fx1e1e"),o(i,"class","section-desc svelte-1fx1e1e"),o(e,"class","settings-section svelte-1fx1e1e")},m(E,I){C(E,e,I),s(e,t),s(e,l),s(e,i),s(e,a),m&&m.m(e,null),s(e,r),g&&g.m(e,null),s(e,c),y.m(e,null),C(E,u,I),S&&S.m(E,I),C(E,p,I),T&&T.m(E,I),C(E,h,I)},p(E,I){E[2]?m?m.p(E,I):(m=Oo(E),m.c(),m.m(e,r)):m&&(m.d(1),m=null),E[3]&&!E[2]?g?g.p(E,I):(g=zo(E),g.c(),g.m(e,c)):g&&(g.d(1),g=null),k===(k=b(E))&&y?y.p(E,I):(y.d(1),y=k(E),y&&(y.c(),y.m(e,null))),E[9]?S?S.p(E,I):(S=Go(E),S.c(),S.m(p.parentNode,p)):S&&(S.d(1),S=null),E[10]?T?T.p(E,I):(T=Jo(E),T.c(),T.m(h.parentNode,h)):T&&(T.d(1),T=null)},i:ie,o:ie,d(E){E&&(w(e),w(u),w(p),w(h)),m&&m.d(),g&&g.d(),y.d(),S&&S.d(E),T&&T.d(E)}}}function Xt(n,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[n];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails error:",n,t)}return Promise.reject(new Error("Wails not connected: "+n))}function dv(n,e,t){let{onRefresh:l=null}=e,i=null,a=!1,r="",c="",u="",p="",h="",m="",g=0,b=!1,k=!1,y=null;async function S(){try{t(0,i=await Xt("GetSyncSettings")),i&&(t(5,p=i.serverUrl||""),t(8,g=i.syncInterval||0))}catch{t(0,i=null)}}S();async function T(){t(1,a=!0),t(2,r=""),t(4,u=""),t(11,y=null);try{await Xt("SyncTestConnection",p,h,m),t(11,y=!0),t(3,c="connection ok")}catch(P){t(11,y=!1),t(3,c="connection failed: "+String(P))}t(1,a=!1)}async function E(){t(1,a=!0),t(2,r=""),t(4,u="");try{await Xt("SyncConfigure",p,h,m),t(3,c="configured"),t(6,h=""),t(7,m=""),await S(),l&&l()}catch(P){t(2,r=String(P))}t(1,a=!1)}function I(P){const J=Array.isArray(P==null?void 0:P.conflicts)?P.conflicts:[],Q=Array.isArray(P==null?void 0:P.applyErrors)?P.applyErrors:[],ee=[];return J.length>0&&ee.push(v("sync.conflictsCount",{count:J.length})),Q.length>0&&ee.push(v("sync.applyErrorsCount",{count:Q.length})),ee.join(" · ")}async function D(){t(1,a=!0),t(2,r=""),t(4,u="");try{const P=await Xt("SyncNow"),J=v("sync.pushedPulled",{pushed:(P==null?void 0:P.pushed)||0,pulled:(P==null?void 0:P.pulled)||0}),Q=I(P);t(3,c=Q?J+" · "+Q:J),t(4,u=Q?"warning":""),await S(),l&&l()}catch(P){t(2,r=String(P))}t(1,a=!1)}async function N(){try{await Xt("SyncSetInterval",g),t(3,c=v("sync.settingsSaved")),t(4,u="")}catch(P){t(2,r=String(P))}}function M(){t(9,b=!0)}async function j(){t(9,b=!1),t(1,a=!0),t(4,u="");try{await Xt("SyncDisconnect"),t(3,c="disconnected"),await S(),l&&l()}catch(P){t(2,r=String(P))}t(1,a=!1)}function R(){t(10,k=!0)}async function O(){t(10,k=!1),t(1,a=!0),t(4,u="");try{await Xt("ResetSyncKey"),t(3,c="key reset"),await S(),l&&l()}catch(P){t(2,r=String(P))}t(1,a=!1)}function H(P){return P?{connected:v("settings.connected"),disconnected:v("settings.disconnected"),disabled:v("settings.notConfigured"),error:v("settings.error"),revoked:v("settings.revoked")}[P]||P:v("settings.notConfigured")}function V(){g=ll(this.value),t(8,g)}function G(){p=this.value,t(5,p)}function U(){h=this.value,t(6,h)}function q(){m=this.value,t(7,m)}const Y=()=>t(9,b=!1),B=()=>t(9,b=!1),F=()=>t(10,k=!1),W=()=>t(10,k=!1);return n.$$set=P=>{"onRefresh"in P&&t(21,l=P.onRefresh)},[i,a,r,c,u,p,h,m,g,b,k,y,T,E,D,N,M,j,R,O,H,l,V,G,U,q,Y,B,F,W]}class pv extends it{constructor(e){super(),lt(this,e,dv,fv,nt,{onRefresh:21},null,[-1,-1])}}function vv(n){let e,t,l,i;return{c(){e=f("div"),t=f("h2"),t.textContent=`${v("settings.backup")}`,l=_(),i=f("p"),i.textContent=`${v("settings.backupStub")}`,o(t,"class","svelte-19bo7bn"),o(i,"class","section-desc svelte-19bo7bn"),o(e,"class","settings-section svelte-19bo7bn")},m(a,r){C(a,e,r),s(e,t),s(e,l),s(e,i)},p:ie,i:ie,o:ie,d(a){a&&w(e)}}}class mv extends it{constructor(e){super(),lt(this,e,null,vv,nt,{})}}const{window:_v}=Jl;function hv(n){let e,t;return e=new mv({}),{c(){Xe(e.$$.fragment)},m(l,i){Je(e,l,i),t=!0},p:ie,i(l){t||(pe(e.$$.fragment,l),t=!0)},o(l){ge(e.$$.fragment,l),t=!1},d(l){qe(e,l)}}}function gv(n){let e,t;return e=new pv({props:{onRefresh:n[6]}}),{c(){Xe(e.$$.fragment)},m(l,i){Je(e,l,i),t=!0},p:ie,i(l){t||(pe(e.$$.fragment,l),t=!0)},o(l){ge(e.$$.fragment,l),t=!1},d(l){qe(e,l)}}}function bv(n){let e,t;return e=new av({}),{c(){Xe(e.$$.fragment)},m(l,i){Je(e,l,i),t=!0},p:ie,i(l){t||(pe(e.$$.fragment,l),t=!0)},o(l){ge(e.$$.fragment,l),t=!1},d(l){qe(e,l)}}}function kv(n){let e,t;return e=new sv({}),{c(){Xe(e.$$.fragment)},m(l,i){Je(e,l,i),t=!0},p:ie,i(l){t||(pe(e.$$.fragment,l),t=!0)},o(l){ge(e.$$.fragment,l),t=!1},d(l){qe(e,l)}}}function yv(n){let e,t;return e=new iv({}),{c(){Xe(e.$$.fragment)},m(l,i){Je(e,l,i),t=!0},p:ie,i(l){t||(pe(e.$$.fragment,l),t=!0)},o(l){ge(e.$$.fragment,l),t=!1},d(l){qe(e,l)}}}function wv(n){let e,t;return e=new ev({props:{onRefresh:n[2]}}),{c(){Xe(e.$$.fragment)},m(l,i){Je(e,l,i),t=!0},p:ie,i(l){t||(pe(e.$$.fragment,l),t=!0)},o(l){ge(e.$$.fragment,l),t=!1},d(l){qe(e,l)}}}function Cv(n){let e,t;return e=new Yp({props:{onRefresh:n[2]}}),{c(){Xe(e.$$.fragment)},m(l,i){Je(e,l,i),t=!0},p:ie,i(l){t||(pe(e.$$.fragment,l),t=!0)},o(l){ge(e.$$.fragment,l),t=!1},d(l){qe(e,l)}}}function Sv(n){let e,t;return e=new Up({props:{appConfig:n[1],onSave:n[5]}}),{c(){Xe(e.$$.fragment)},m(l,i){Je(e,l,i),t=!0},p(l,i){const a={};i&2&&(a.appConfig=l[1]),e.$set(a)},i(l){t||(pe(e.$$.fragment,l),t=!0)},o(l){ge(e.$$.fragment,l),t=!1},d(l){qe(e,l)}}}function Tv(n){let e,t,l,i,a,r,c,u,p,h,m,g,b,k,y,S;p=new Bp({props:{activeSection:n[0],onSelect:n[3]}});const T=[Sv,Cv,wv,yv,kv,bv,gv,hv],E=[];function I(D,N){return D[0]==="general"?0:D[0]==="workspace"?1:D[0]==="templates"?2:D[0]==="plugins"?3:D[0]==="files"?4:D[0]==="activity"?5:D[0]==="sync"?6:D[0]==="backup"?7:-1}return~(g=I(n))&&(b=E[g]=T[g](n)),{c(){e=f("button"),t=f("div"),l=f("div"),i=f("h2"),i.textContent=`${v("settings.title")}`,a=_(),r=f("button"),r.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>',c=_(),u=f("div"),Xe(p.$$.fragment),h=_(),m=f("div"),b&&b.c(),o(i,"class","svelte-zf2zsc"),o(r,"class","close-btn svelte-zf2zsc"),o(r,"title",v("settings.close")),o(l,"class","settings-header svelte-zf2zsc"),o(m,"class","settings-content svelte-zf2zsc"),o(u,"class","settings-body svelte-zf2zsc"),o(t,"class","settings-window svelte-zf2zsc"),o(e,"class","settings-overlay svelte-zf2zsc")},m(D,N){C(D,e,N),s(e,t),s(t,l),s(l,i),s(l,a),s(l,r),s(t,c),s(t,u),Je(p,u,null),s(u,h),s(u,m),~g&&E[g].m(m,null),k=!0,y||(S=[A(_v,"keydown",n[7]),A(r,"click",n[4]),A(e,"click",Et(n[4]))],y=!0)},p(D,[N]){const M={};N&1&&(M.activeSection=D[0]),p.$set(M);let j=g;g=I(D),g===j?~g&&E[g].p(D,N):(b&&(ut(),ge(E[j],1,1,()=>{E[j]=null}),ft()),~g?(b=E[g],b?b.p(D,N):(b=E[g]=T[g](D),b.c()),pe(b,1),b.m(m,null)):b=null)},i(D){k||(pe(p.$$.fragment,D),pe(b),k=!0)},o(D){ge(p.$$.fragment,D),ge(b),k=!1},d(D){D&&w(e),qe(p),~g&&E[g].d(),y=!1,ve(S)}}}function qo(n,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[n];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails error:",n,t)}return Promise.reject(new Error("Wails not connected: "+n))}function Ev(n,e,t){let{onClose:l=null}=e,{onSyncRefresh:i=null}=e,{initialSection:a="general"}=e,r=a,c=null;async function u(){try{t(1,c=await qo("GetAppConfig"))}catch{t(1,c=null)}}u();function p(k){t(0,r=k)}function h(){l&&l()}async function m(k){try{await qo("SaveAppConfig",k),t(1,c=k)}catch(y){console.error(y)}}function g(){i&&i()}function b(k){k.key==="Escape"&&h()}return n.$$set=k=>{"onClose"in k&&t(8,l=k.onClose),"onSyncRefresh"in k&&t(9,i=k.onSyncRefresh),"initialSection"in k&&t(10,a=k.initialSection)},[r,c,u,p,h,m,g,b,l,i,a]}class Iv extends it{constructor(e){super(),lt(this,e,Ev,Tv,nt,{onClose:8,onSyncRefresh:9,initialSection:10})}}function Nv(n){let e,t,l,i,a,r,c,u;return{c(){e=f("div"),t=f("span"),l=_(),i=f("span"),i.textContent=`${v("sync.status.disabled")}`,a=_(),r=f("button"),r.textContent=`${v("sync.configure")}`,o(t,"class","sync-dot dot-disabled svelte-1rxbx0"),o(i,"class","sync-label svelte-1rxbx0"),o(r,"class","btn btn-xs svelte-1rxbx0"),o(e,"class","sync-status-row svelte-1rxbx0")},m(p,h){C(p,e,h),s(e,t),s(e,l),s(e,i),s(e,a),s(e,r),c||(u=A(r,"click",function(){Wt(n[5])&&n[5].apply(this,arguments)}),c=!0)},p(p,h){n=p},d(p){p&&w(e),c=!1,u()}}}function Dv(n){let e,t,l,i,a,r=n[7](n[0])+"",c,u,p,h,m,g=(n[1]?v("sync.running"):v("sync.run"))+"",b,k,y,S,T,E,I,D=n[0].unpushedOps>0&&Yo(n),N=n[2]&&Qo(n);return{c(){e=f("div"),t=f("span"),i=_(),a=f("span"),c=z(r),u=_(),D&&D.c(),p=_(),h=f("div"),m=f("button"),b=z(g),k=_(),y=f("button"),y.textContent=`${v("sync.details")}`,S=_(),N&&N.c(),T=ht(),o(t,"class",l="sync-dot "+n[6](n[0])+" svelte-1rxbx0"),o(a,"class","sync-label svelte-1rxbx0"),o(m,"class","btn btn-xs svelte-1rxbx0"),m.disabled=n[1],o(y,"class","btn btn-xs btn-link svelte-1rxbx0"),o(h,"class","sync-actions-row svelte-1rxbx0"),o(e,"class","sync-status-row svelte-1rxbx0")},m(M,j){C(M,e,j),s(e,t),s(e,i),s(e,a),s(a,c),s(e,u),D&&D.m(e,null),s(e,p),s(e,h),s(h,m),s(m,b),s(h,k),s(h,y),C(M,S,j),N&&N.m(M,j),C(M,T,j),E||(I=[A(m,"click",function(){Wt(n[4])&&n[4].apply(this,arguments)}),A(y,"click",function(){Wt(n[5])&&n[5].apply(this,arguments)})],E=!0)},p(M,j){n=M,j&1&&l!==(l="sync-dot "+n[6](n[0])+" svelte-1rxbx0")&&o(t,"class",l),j&1&&r!==(r=n[7](n[0])+"")&&K(c,r),n[0].unpushedOps>0?D?D.p(n,j):(D=Yo(n),D.c(),D.m(e,p)):D&&(D.d(1),D=null),j&2&&g!==(g=(n[1]?v("sync.running"):v("sync.run"))+"")&&K(b,g),j&2&&(m.disabled=n[1]),n[2]?N?N.p(n,j):(N=Qo(n),N.c(),N.m(T.parentNode,T)):N&&(N.d(1),N=null)},d(M){M&&(w(e),w(S),w(T)),D&&D.d(),N&&N.d(M),E=!1,ve(I)}}}function Yo(n){let e,t=n[0].unpushedOps+"",l,i,a=v("sync.changes")+"",r;return{c(){e=f("span"),l=z(t),i=_(),r=z(a),o(e,"class","sync-count svelte-1rxbx0")},m(c,u){C(c,e,u),s(e,l),s(e,i),s(e,r)},p(c,u){u&1&&t!==(t=c[0].unpushedOps+"")&&K(l,t)},d(c){c&&w(e)}}}function Qo(n){let e,t,l;return{c(){e=f("div"),t=z(n[2]),o(e,"class",l=ro(n[3]==="warning"?"sync-message sync-message-warning":"sync-message")+" svelte-1rxbx0")},m(i,a){C(i,e,a),s(e,t)},p(i,a){a&4&&K(t,i[2]),a&8&&l!==(l=ro(i[3]==="warning"?"sync-message sync-message-warning":"sync-message")+" svelte-1rxbx0")&&o(e,"class",l)},d(i){i&&w(e)}}}function Mv(n){let e;function t(a,r){var c;return(c=a[0])!=null&&c.configured?Dv:Nv}let l=t(n),i=l(n);return{c(){e=f("div"),i.c(),o(e,"class","sync-status-widget svelte-1rxbx0")},m(a,r){C(a,e,r),i.m(e,null)},p(a,[r]){l===(l=t(a))&&i?i.p(a,r):(i.d(1),i=l(a),i&&(i.c(),i.m(e,null)))},i:ie,o:ie,d(a){a&&w(e),i.d()}}}function jv(n,e,t){let{syncStatus:l=null}=e,{syncLoading:i=!1}=e,{syncMessage:a=""}=e,{syncMessageKind:r=""}=e,{onSync:c=null}=e,{onOpenSettings:u=null}=e;function p(m){return!m||!m.configured?"dot-disabled":i?"dot-syncing":m.revoked?"dot-disabled":m.connected?"dot-connected":m.configured?"dot-warning":"dot-disabled"}function h(m){return!m||!m.configured?v("sync.status.disabled"):i?v("sync.status.syncing"):m.revoked?v("sync.status.error"):m.connected?v("sync.status.connected"):v("sync.status.disconnected")}return n.$$set=m=>{"syncStatus"in m&&t(0,l=m.syncStatus),"syncLoading"in m&&t(1,i=m.syncLoading),"syncMessage"in m&&t(2,a=m.syncMessage),"syncMessageKind"in m&&t(3,r=m.syncMessageKind),"onSync"in m&&t(4,c=m.onSync),"onOpenSettings"in m&&t(5,u=m.onOpenSettings)},[l,i,a,r,c,u,p,h]}class Av extends it{constructor(e){super(),lt(this,e,jv,Mv,nt,{syncStatus:0,syncLoading:1,syncMessage:2,syncMessageKind:3,onSync:4,onOpenSettings:5})}}function Xo(n,e,t){const l=n.slice();return l[64]=e[t],l}function Zo(n,e,t){const l=n.slice();return l[64]=e[t],l}function xo(n,e,t){const l=n.slice();return l[59]=e[t],l[60]=e,l[61]=t,l}function $o(n,e,t){const l=n.slice();return l[56]=e[t],l}function es(n,e,t){const l=n.slice();return l[56]=e[t],l}function ts(n){let e,t;return{c(){e=f("span"),t=z(n[4]),o(e,"class","tab-badge svelte-9xe4sr")},m(l,i){C(l,e,i),s(e,t)},p(l,i){i[0]&16&&K(t,l[4])},d(l){l&&w(e)}}}function ns(n){let e,t=n[3].length+"",l;return{c(){e=f("span"),l=z(t),o(e,"class","tab-badge svelte-9xe4sr")},m(i,a){C(i,e,a),s(e,l)},p(i,a){a[0]&8&&t!==(t=i[3].length+"")&&K(l,t)},d(i){i&&w(e)}}}function Lv(n){let e,t,l,i,a,r,c,u,p,h,m=n[19]==="asc"?"↑":"↓",g,b,k,y;function S(I,D){return I[3].length===0?zv:Ov}let T=S(n),E=T(n);return{c(){e=f("div"),t=f("div"),l=f("div"),i=f("button"),i.textContent=`${v("today.sortByTime")}`,a=_(),r=f("button"),r.textContent=`${v("today.sortByName")}`,c=_(),u=f("button"),u.textContent=`${v("today.sortByType")}`,p=_(),h=f("span"),g=z(m),b=_(),E.c(),o(i,"class","sort-btn svelte-9xe4sr"),ae(i,"active",n[18]==="time"),o(r,"class","sort-btn svelte-9xe4sr"),ae(r,"active",n[18]==="name"),o(u,"class","sort-btn svelte-9xe4sr"),ae(u,"active",n[18]==="type"),o(h,"class","sort-dir svelte-9xe4sr"),o(l,"class","sort-controls svelte-9xe4sr"),o(t,"class","tab-controls svelte-9xe4sr"),o(e,"class","today-tab-content svelte-9xe4sr")},m(I,D){C(I,e,D),s(e,t),s(t,l),s(l,i),s(l,a),s(l,r),s(l,c),s(l,u),s(l,p),s(l,h),s(h,g),s(e,b),E.m(e,null),k||(y=[A(i,"click",n[51]),A(r,"click",n[52]),A(u,"click",n[53])],k=!0)},p(I,D){D[0]&262144&&ae(i,"active",I[18]==="time"),D[0]&262144&&ae(r,"active",I[18]==="name"),D[0]&262144&&ae(u,"active",I[18]==="type"),D[0]&524288&&m!==(m=I[19]==="asc"?"↑":"↓")&&K(g,m),T===(T=S(I))&&E?E.p(I,D):(E.d(1),E=T(I),E&&(E.c(),E.m(e,null)))},d(I){I&&w(e),E.d(),k=!1,ve(y)}}}function Pv(n){let e,t,l,i,a,r,c,u,p,h,m=n[17]==="asc"?"↑":"↓",g,b,k,y;function S(I,D){return I[2].length===0?Bv:Hv}let T=S(n),E=T(n);return{c(){e=f("div"),t=f("div"),l=f("div"),i=f("button"),i.textContent=`${v("today.sortByTime")}`,a=_(),r=f("button"),r.textContent=`${v("today.sortByName")}`,c=_(),u=f("button"),u.textContent=`${v("today.sortByType")}`,p=_(),h=f("span"),g=z(m),b=_(),E.c(),o(i,"class","sort-btn svelte-9xe4sr"),ae(i,"active",n[16]==="time"),o(r,"class","sort-btn svelte-9xe4sr"),ae(r,"active",n[16]==="name"),o(u,"class","sort-btn svelte-9xe4sr"),ae(u,"active",n[16]==="type"),o(h,"class","sort-dir svelte-9xe4sr"),o(l,"class","sort-controls svelte-9xe4sr"),o(t,"class","tab-controls svelte-9xe4sr"),o(e,"class","today-tab-content svelte-9xe4sr")},m(I,D){C(I,e,D),s(e,t),s(t,l),s(l,i),s(l,a),s(l,r),s(l,c),s(l,u),s(l,p),s(l,h),s(h,g),s(e,b),E.m(e,null),k||(y=[A(i,"click",n[46]),A(r,"click",n[47]),A(u,"click",n[48])],k=!0)},p(I,D){D[0]&65536&&ae(i,"active",I[16]==="time"),D[0]&65536&&ae(r,"active",I[16]==="name"),D[0]&65536&&ae(u,"active",I[16]==="type"),D[0]&131072&&m!==(m=I[17]==="asc"?"↑":"↓")&&K(g,m),T===(T=S(I))&&E?E.p(I,D):(E.d(1),E=T(I),E&&(E.c(),E.m(e,null)))},d(I){I&&w(e),E.d(),k=!1,ve(y)}}}function Fv(n){let e;function t(a,r){return a[0].length===0?Vv:Wv}let l=t(n),i=l(n);return{c(){e=f("div"),i.c(),o(e,"class","today-tab-content svelte-9xe4sr")},m(a,r){C(a,e,r),i.m(e,null)},p(a,r){l===(l=t(a))&&i?i.p(a,r):(i.d(1),i=l(a),i&&(i.c(),i.m(e,null)))},d(a){a&&w(e),i.d()}}}function Rv(n){let e;function t(a,r){return!a[1]||!a[1].events||a[1].events.length===0?Kv:Uv}let l=t(n),i=l(n);return{c(){e=f("div"),i.c(),o(e,"class","today-tab-content svelte-9xe4sr")},m(a,r){C(a,e,r),i.m(e,null)},p(a,r){l===(l=t(a))&&i?i.p(a,r):(i.d(1),i=l(a),i&&(i.c(),i.m(e,null)))},d(a){a&&w(e),i.d()}}}function Ov(n){let e,t=ue(ms(n[3],n[18],n[19])),l=[];for(let i=0;i<t.length;i+=1)l[i]=ls(Xo(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();o(e,"class","capture-list svelte-9xe4sr")},m(i,a){C(i,e,a);for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(e,null)},p(i,a){if(a[0]&803112){t=ue(ms(i[3],i[18],i[19]));let r;for(r=0;r<t.length;r+=1){const c=Xo(i,t,r);l[r]?l[r].p(c,a):(l[r]=ls(c),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=t.length}},d(i){i&&w(e),Re(l,i)}}}function zv(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${v("today.capturedEmpty")}`,o(t,"class","svelte-9xe4sr"),o(e,"class","today-empty svelte-9xe4sr")},m(l,i){C(l,e,i),s(e,t)},p:ie,d(l){l&&w(e)}}}function ls(n){let e,t,l=_s(n[64].captureKind||n[64].sourceKind)+"",i,a,r,c,u=n[64].title+"",p,h,m,g=n[8](n[64])+"",b,k,y,S=n[5](n[64].capturedAt||n[64].createdAt)+"",T,E,I,D;function N(){return n[54](n[64])}function M(...j){return n[55](n[64],...j)}return{c(){e=f("div"),t=f("span"),i=z(l),a=_(),r=f("div"),c=f("span"),p=z(u),h=_(),m=f("span"),b=z(g),k=_(),y=f("span"),T=z(S),E=_(),o(t,"class","capture-icon svelte-9xe4sr"),o(c,"class","capture-title svelte-9xe4sr"),o(m,"class","capture-meta svelte-9xe4sr"),o(r,"class","capture-body svelte-9xe4sr"),o(y,"class","capture-time svelte-9xe4sr"),o(e,"class","capture-item svelte-9xe4sr"),o(e,"role","button"),o(e,"tabindex","0")},m(j,R){C(j,e,R),s(e,t),s(t,i),s(e,a),s(e,r),s(r,c),s(c,p),s(r,h),s(r,m),s(m,b),s(e,k),s(e,y),s(y,T),s(e,E),I||(D=[A(e,"click",N),A(e,"keydown",M)],I=!0)},p(j,R){n=j,R[0]&786440&&l!==(l=_s(n[64].captureKind||n[64].sourceKind)+"")&&K(i,l),R[0]&786440&&u!==(u=n[64].title+"")&&K(p,u),R[0]&786696&&g!==(g=n[8](n[64])+"")&&K(b,g),R[0]&786472&&S!==(S=n[5](n[64].capturedAt||n[64].createdAt)+"")&&K(T,S)},d(j){j&&w(e),I=!1,ve(D)}}}function Hv(n){let e,t=ue(n[24](n[2],n[16],n[17])),l=[];for(let i=0;i<t.length;i+=1)l[i]=os(Zo(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();o(e,"class","ip-list svelte-9xe4sr")},m(i,a){C(i,e,a);for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(e,null)},p(i,a){if(a[0]&16975076){t=ue(i[24](i[2],i[16],i[17]));let r;for(r=0;r<t.length;r+=1){const c=Zo(i,t,r);l[r]?l[r].p(c,a):(l[r]=os(c),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=t.length}},d(i){i&&w(e),Re(l,i)}}}function Bv(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${v("today.inProgressEmpty")}`,o(t,"class","svelte-9xe4sr"),o(e,"class","today-empty svelte-9xe4sr")},m(l,i){C(l,e,i),s(e,t)},p:ie,d(l){l&&w(e)}}}function is(n){let e,t=n[64].nodePath+"",l;return{c(){e=f("span"),l=z(t),o(e,"class","ip-path svelte-9xe4sr")},m(i,a){C(i,e,a),s(e,l)},p(i,a){a[0]&196612&&t!==(t=i[64].nodePath+"")&&K(l,t)},d(i){i&&w(e)}}}function os(n){let e,t,l=n[7](n[64].eventType)+"",i,a,r,c,u=n[64].title+"",p,h,m,g,b=n[6](n[64].eventType)+"",k,y,S,T=n[5](n[64].createdAt)+"",E,I,D,N,M=n[64].nodePath&&is(n);function j(){return n[49](n[64])}function R(...O){return n[50](n[64],...O)}return{c(){e=f("div"),t=f("span"),i=z(l),a=_(),r=f("div"),c=f("span"),p=z(u),h=_(),M&&M.c(),m=_(),g=f("span"),k=z(b),y=_(),S=f("span"),E=z(T),I=_(),o(t,"class","ip-icon svelte-9xe4sr"),o(c,"class","ip-title svelte-9xe4sr"),o(r,"class","ip-body svelte-9xe4sr"),o(g,"class","ip-type svelte-9xe4sr"),o(S,"class","ip-time svelte-9xe4sr"),o(e,"class","ip-item svelte-9xe4sr"),o(e,"role","button"),o(e,"tabindex","0")},m(O,H){C(O,e,H),s(e,t),s(t,i),s(e,a),s(e,r),s(r,c),s(c,p),s(r,h),M&&M.m(r,null),s(e,m),s(e,g),s(g,k),s(e,y),s(e,S),s(S,E),s(e,I),D||(N=[A(e,"click",j),A(e,"keydown",R)],D=!0)},p(O,H){n=O,H[0]&196740&&l!==(l=n[7](n[64].eventType)+"")&&K(i,l),H[0]&196612&&u!==(u=n[64].title+"")&&K(p,u),n[64].nodePath?M?M.p(n,H):(M=is(n),M.c(),M.m(r,null)):M&&(M.d(1),M=null),H[0]&196676&&b!==(b=n[6](n[64].eventType)+"")&&K(k,b),H[0]&196644&&T!==(T=n[5](n[64].createdAt)+"")&&K(E,T)},d(O){O&&w(e),M&&M.d(),D=!1,ve(N)}}}function Wv(n){let e,t=ue(n[0]),l=[];for(let i=0;i<t.length;i+=1)l[i]=fs(xo(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();o(e,"class","suggestions-list svelte-9xe4sr")},m(i,a){C(i,e,a);for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(e,null)},p(i,a){if(a[0]&3160673){t=ue(i[0]);let r;for(r=0;r<t.length;r+=1){const c=xo(i,t,r);l[r]?l[r].p(c,a):(l[r]=fs(c),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=t.length}},d(i){i&&w(e),Re(l,i)}}}function Vv(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${v("suggest.noSuggestions")}`,o(t,"class","svelte-9xe4sr"),o(e,"class","today-empty svelte-9xe4sr")},m(l,i){C(l,e,i),s(e,t)},p:ie,d(l){l&&w(e)}}}function ss(n){let e,t=n[59].events.length+"",l,i,a=v("suggest.detectedEvents")+"",r;return{c(){e=z("· "),l=z(t),i=_(),r=z(a)},m(c,u){C(c,e,u),C(c,l,u),C(c,i,u),C(c,r,u)},p(c,u){u[0]&1&&t!==(t=c[59].events.length+"")&&K(l,t)},d(c){c&&(w(e),w(l),w(i),w(r))}}}function rs(n){let e,t,l,i=ue(n[59].events),a=[];for(let r=0;r<i.length;r+=1)a[r]=us($o(n,i,r));return{c(){e=f("div"),t=f("div"),t.textContent=`${v("suggest.detectedEvents")}`,l=_();for(let r=0;r<a.length;r+=1)a[r].c();o(t,"class","suggestion-detail-title svelte-9xe4sr"),o(e,"class","suggestion-detail svelte-9xe4sr")},m(r,c){C(r,e,c),s(e,t),s(e,l);for(let u=0;u<a.length;u+=1)a[u]&&a[u].m(e,null)},p(r,c){if(c[0]&10337){i=ue(r[59].events);let u;for(u=0;u<i.length;u+=1){const p=$o(r,i,u);a[u]?a[u].p(p,c):(a[u]=us(p),a[u].c(),a[u].m(e,null))}for(;u<a.length;u+=1)a[u].d(1);a.length=i.length}},d(r){r&&w(e),Re(a,r)}}}function as(n){let e,t=n[56].nodePath+"",l;return{c(){e=f("span"),l=z(t),o(e,"class","suggestion-event-path svelte-9xe4sr")},m(i,a){C(i,e,a),s(e,l)},p(i,a){a[0]&1&&t!==(t=i[56].nodePath+"")&&K(l,t)},d(i){i&&w(e)}}}function cs(n){let e,t,l;function i(){return n[45](n[56])}return{c(){e=f("button"),e.textContent=`${v("file.showInExplorer")}`,o(e,"class","link-btn svelte-9xe4sr")},m(a,r){C(a,e,r),t||(l=A(e,"click",i),t=!0)},p(a,r){n=a},d(a){a&&w(e),t=!1,l()}}}function us(n){let e,t,l=n[5](n[56].createdAt)+"",i,a,r,c,u=n[6](n[56].eventType)+"",p,h,m,g=n[56].title+"",b,k,y,S,T=n[56].targetType==="file"||n[56].eventType.startsWith("file_"),E,I,D,N=n[56].nodePath&&as(n);function M(){return n[44](n[56])}let j=T&&cs(n);return{c(){e=f("div"),t=f("span"),i=z(l),a=_(),N&&N.c(),r=_(),c=f("span"),p=z(u),h=_(),m=f("span"),b=z(g),k=_(),y=f("button"),y.textContent=`${v("common.open")}`,S=_(),j&&j.c(),E=_(),o(t,"class","suggestion-event-time svelte-9xe4sr"),o(c,"class","suggestion-event-type svelte-9xe4sr"),o(m,"class","suggestion-event-title svelte-9xe4sr"),o(y,"class","link-btn svelte-9xe4sr"),o(e,"class","suggestion-detail-event svelte-9xe4sr")},m(R,O){C(R,e,O),s(e,t),s(t,i),s(e,a),N&&N.m(e,null),s(e,r),s(e,c),s(c,p),s(e,h),s(e,m),s(m,b),s(e,k),s(e,y),s(e,S),j&&j.m(e,null),s(e,E),I||(D=A(y,"click",M),I=!0)},p(R,O){n=R,O[0]&33&&l!==(l=n[5](n[56].createdAt)+"")&&K(i,l),n[56].nodePath?N?N.p(n,O):(N=as(n),N.c(),N.m(e,r)):N&&(N.d(1),N=null),O[0]&65&&u!==(u=n[6](n[56].eventType)+"")&&K(p,u),O[0]&1&&g!==(g=n[56].title+"")&&K(b,g),O[0]&1&&(T=n[56].targetType==="file"||n[56].eventType.startsWith("file_")),T?j?j.p(n,O):(j=cs(n),j.c(),j.m(e,E)):j&&(j.d(1),j=null)},d(R){R&&w(e),N&&N.d(),j&&j.d(),I=!1,D()}}}function fs(n){let e,t,l,i,a=n[59].nodeTitle+"",r,c,u,p=n[59].summary+"",h,m,g,b=n[59].suggestedMin+"",k,y,S=v("worklog.min")+"",T,E,I,D,N,M,j,R,O,H,V,G,U,q,Y,B,F,W,P,J,Q;function ee(){return n[37](n[59])}let te=n[59].events&&n[59].events.length>0&&ss(n);function le(...X){return n[38](n[59],n[60],n[61],...X)}function se(){return n[39](n[59])}function ce(){return n[40](n[59])}function de(){return n[41](n[59])}function we(){return n[42](n[59],n[60],n[61])}function ze(...X){return n[43](n[59],n[60],n[61],...X)}let me=n[59]._expanded&&n[59].events&&n[59].events.length>0&&rs(n);return{c(){e=f("div"),t=f("div"),l=f("div"),i=f("button"),r=z(a),c=_(),u=f("span"),h=z(p),m=_(),g=f("span"),k=z(b),y=_(),T=z(S),te&&te.c(),E=_(),I=f("div"),D=f("span"),j=_(),R=f("input"),H=_(),V=f("span"),V.textContent=`${v("suggest.minutes")}`,G=_(),U=f("button"),U.textContent=`${v("suggest.edit")}`,q=_(),Y=f("button"),Y.textContent=`${v("suggest.apply")}`,B=_(),F=f("button"),F.textContent=`${v("common.delete")}`,W=_(),me&&me.c(),P=_(),o(i,"class","suggestion-node link-btn svelte-9xe4sr"),o(u,"class","suggestion-summary svelte-9xe4sr"),o(g,"class","suggestion-meta svelte-9xe4sr"),o(l,"class","suggestion-info svelte-9xe4sr"),o(D,"class","suggestion-confidence-dot svelte-9xe4sr"),o(D,"title",N=v("suggest.confidence."+n[59].confidence)),o(D,"aria-label",M=v("suggest.confidence."+n[59].confidence)),ae(D,"low",n[59].confidence==="low"),ae(D,"medium",n[59].confidence==="medium"),ae(D,"high",n[59].confidence==="high"),o(R,"type","number"),o(R,"class","suggestion-min-input svelte-9xe4sr"),R.value=O=n[59].suggestedMin,o(R,"min","1"),o(R,"max","480"),o(V,"class","suggestion-min-label svelte-9xe4sr"),o(U,"class","btn btn-sm svelte-9xe4sr"),o(Y,"class","btn btn-sm btn-primary svelte-9xe4sr"),o(F,"class","btn btn-sm btn-danger svelte-9xe4sr"),o(I,"class","suggestion-actions svelte-9xe4sr"),o(t,"class","suggestion-main svelte-9xe4sr"),o(t,"role","button"),o(t,"tabindex","0"),o(e,"class","suggestion-card svelte-9xe4sr"),ae(e,"expanded",n[59]._expanded)},m(X,x){C(X,e,x),s(e,t),s(t,l),s(l,i),s(i,r),s(l,c),s(l,u),s(u,h),s(l,m),s(l,g),s(g,k),s(g,y),s(g,T),te&&te.m(g,null),s(t,E),s(t,I),s(I,D),s(I,j),s(I,R),s(I,H),s(I,V),s(I,G),s(I,U),s(I,q),s(I,Y),s(I,B),s(I,F),s(e,W),me&&me.m(e,null),s(e,P),J||(Q=[A(i,"click",Te(ee)),A(R,"change",Te(le)),A(U,"click",Te(se)),A(Y,"click",Te(ce)),A(F,"click",Te(de)),A(t,"click",we),A(t,"keydown",ze)],J=!0)},p(X,x){n=X,x[0]&1&&a!==(a=n[59].nodeTitle+"")&&K(r,a),x[0]&1&&p!==(p=n[59].summary+"")&&K(h,p),x[0]&1&&b!==(b=n[59].suggestedMin+"")&&K(k,b),n[59].events&&n[59].events.length>0?te?te.p(n,x):(te=ss(n),te.c(),te.m(g,null)):te&&(te.d(1),te=null),x[0]&1&&N!==(N=v("suggest.confidence."+n[59].confidence))&&o(D,"title",N),x[0]&1&&M!==(M=v("suggest.confidence."+n[59].confidence))&&o(D,"aria-label",M),x[0]&1&&ae(D,"low",n[59].confidence==="low"),x[0]&1&&ae(D,"medium",n[59].confidence==="medium"),x[0]&1&&ae(D,"high",n[59].confidence==="high"),x[0]&1&&O!==(O=n[59].suggestedMin)&&R.value!==O&&(R.value=O),n[59]._expanded&&n[59].events&&n[59].events.length>0?me?me.p(n,x):(me=rs(n),me.c(),me.m(e,P)):me&&(me.d(1),me=null),x[0]&1&&ae(e,"expanded",n[59]._expanded)},d(X){X&&w(e),te&&te.d(),me&&me.d(),J=!1,ve(Q)}}}function Uv(n){let e,t=ue(n[1].events),l=[];for(let i=0;i<t.length;i+=1)l[i]=ps(es(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();o(e,"class","feed-list svelte-9xe4sr")},m(i,a){C(i,e,a);for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(e,null)},p(i,a){if(a[0]&12583010){t=ue(i[1].events);let r;for(r=0;r<t.length;r+=1){const c=es(i,t,r);l[r]?l[r].p(c,a):(l[r]=ps(c),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=t.length}},d(i){i&&w(e),Re(l,i)}}}function Kv(n){let e,t,l,i;return{c(){e=f("div"),t=f("p"),t.textContent=`${v("today.feedEmpty")}`,l=_(),i=f("p"),i.textContent=`${v("today.feedHint")}`,o(t,"class","svelte-9xe4sr"),o(i,"class","hint svelte-9xe4sr"),o(e,"class","today-empty svelte-9xe4sr")},m(a,r){C(a,e,r),s(e,t),s(e,l),s(e,i)},p:ie,d(a){a&&w(e)}}}function ds(n){let e,t=nl(n[56])+"",l;return{c(){e=f("span"),l=z(t),o(e,"class","feed-path svelte-9xe4sr")},m(i,a){C(i,e,a),s(e,l)},p(i,a){a[0]&2&&t!==(t=nl(i[56])+"")&&K(l,t)},d(i){i&&w(e)}}}function ps(n){let e,t,l=vs(n[56].eventType)+"",i,a,r,c,u,p=n[22](n[56].eventType)+"",h,m,g,b,k,y=n[56].title+"",S,T,E,I=nl(n[56]),D,N,M=n[6](n[56].eventType)+"",j,R,O,H=n[5](n[56].createdAt)+"",V,G,U,q,Y,B,F=I&&ds(n);function W(){return n[34](n[56])}function P(){return n[35](n[56])}function J(...Q){return n[36](n[56],...Q)}return{c(){e=f("div"),t=f("span"),i=z(l),a=_(),r=f("div"),c=f("div"),u=f("span"),h=z(p),m=_(),g=f("span"),g.textContent=":",b=_(),k=f("span"),S=z(y),T=_(),E=f("div"),F&&F.c(),D=_(),N=f("span"),j=z(M),R=_(),O=f("span"),V=z(H),G=_(),U=f("button"),U.innerHTML='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>',q=_(),o(t,"class","feed-icon svelte-9xe4sr"),o(u,"class","feed-type svelte-9xe4sr"),o(g,"class","feed-colon svelte-9xe4sr"),o(k,"class","feed-title link-btn svelte-9xe4sr"),o(c,"class","feed-title-line svelte-9xe4sr"),o(N,"class","feed-event-type svelte-9xe4sr"),o(O,"class","feed-time svelte-9xe4sr"),o(E,"class","feed-meta-line svelte-9xe4sr"),o(r,"class","feed-body svelte-9xe4sr"),o(U,"class","feed-nav-btn svelte-9xe4sr"),o(U,"title","Открыть"),o(e,"class","feed-item svelte-9xe4sr"),o(e,"role","button"),o(e,"tabindex","0")},m(Q,ee){C(Q,e,ee),s(e,t),s(t,i),s(e,a),s(e,r),s(r,c),s(c,u),s(u,h),s(c,m),s(c,g),s(c,b),s(c,k),s(k,S),s(r,T),s(r,E),F&&F.m(E,null),s(E,D),s(E,N),s(N,j),s(E,R),s(E,O),s(O,V),s(e,G),s(e,U),s(e,q),Y||(B=[A(U,"click",Te(W)),A(e,"click",P),A(e,"keydown",J)],Y=!0)},p(Q,ee){n=Q,ee[0]&2&&l!==(l=vs(n[56].eventType)+"")&&K(i,l),ee[0]&2&&p!==(p=n[22](n[56].eventType)+"")&&K(h,p),ee[0]&2&&y!==(y=n[56].title+"")&&K(S,y),ee[0]&2&&(I=nl(n[56])),I?F?F.p(n,ee):(F=ds(n),F.c(),F.m(E,D)):F&&(F.d(1),F=null),ee[0]&66&&M!==(M=n[6](n[56].eventType)+"")&&K(j,M),ee[0]&34&&H!==(H=n[5](n[56].createdAt)+"")&&K(V,H)},d(Q){Q&&w(e),F&&F.d(),Y=!1,ve(B)}}}function Gv(n){var Y;let e,t,l,i,a,r=(((Y=n[1])==null?void 0:Y.date)||"")+"",c,u,p,h,m,g,b=v("today.suggestionsTab")+"",k,y,S,T,E,I,D=v("today.captured")+"",N,M,j,R,O,H=n[4]>0&&ts(n),V=n[3].length>0&&ns(n);function G(B,F){if(B[15]==="feed")return Rv;if(B[15]==="suggestions")return Fv;if(B[15]==="inprogress")return Pv;if(B[15]==="captured")return Lv}let U=G(n),q=U&&U(n);return{c(){e=f("div"),t=f("div"),l=f("h2"),l.textContent=`${v("today.title")}`,i=_(),a=f("span"),c=z(r),u=_(),p=f("div"),h=f("button"),h.textContent=`${v("today.feed")}`,m=_(),g=f("button"),k=z(b),y=_(),H&&H.c(),S=_(),T=f("button"),T.textContent=`${v("today.inProgress")}`,E=_(),I=f("button"),N=z(D),M=_(),V&&V.c(),j=_(),q&&q.c(),o(l,"class","svelte-9xe4sr"),o(a,"class","today-date svelte-9xe4sr"),o(t,"class","today-header svelte-9xe4sr"),o(h,"class","today-tab svelte-9xe4sr"),ae(h,"active",n[15]==="feed"),o(g,"class","today-tab svelte-9xe4sr"),ae(g,"active",n[15]==="suggestions"),o(T,"class","today-tab svelte-9xe4sr"),ae(T,"active",n[15]==="inprogress"),o(I,"class","today-tab svelte-9xe4sr"),ae(I,"active",n[15]==="captured"),o(p,"class","today-tabs svelte-9xe4sr"),o(e,"class","today-screen svelte-9xe4sr")},m(B,F){C(B,e,F),s(e,t),s(t,l),s(t,i),s(t,a),s(a,c),s(e,u),s(e,p),s(p,h),s(p,m),s(p,g),s(g,k),s(g,y),H&&H.m(g,null),s(p,S),s(p,T),s(p,E),s(p,I),s(I,N),s(I,M),V&&V.m(I,null),s(e,j),q&&q.m(e,null),R||(O=[A(h,"click",n[30]),A(g,"click",n[31]),A(T,"click",n[32]),A(I,"click",n[33])],R=!0)},p(B,F){var W;F[0]&2&&r!==(r=(((W=B[1])==null?void 0:W.date)||"")+"")&&K(c,r),F[0]&32768&&ae(h,"active",B[15]==="feed"),B[4]>0?H?H.p(B,F):(H=ts(B),H.c(),H.m(g,null)):H&&(H.d(1),H=null),F[0]&32768&&ae(g,"active",B[15]==="suggestions"),F[0]&32768&&ae(T,"active",B[15]==="inprogress"),B[3].length>0?V?V.p(B,F):(V=ns(B),V.c(),V.m(I,null)):V&&(V.d(1),V=null),F[0]&32768&&ae(I,"active",B[15]==="captured"),U===(U=G(B))&&q?q.p(B,F):(q&&q.d(1),q=U&&U(B),q&&(q.c(),q.m(e,null)))},i:ie,o:ie,d(B){B&&w(e),H&&H.d(),V&&V.d(),q&&q.d(),R=!1,ve(O)}}}function vs(n){return n==="note_created"||n==="file_added"||n==="folder_added"||n==="node_created"?"+":n==="file_deleted"||n==="folder_deleted"?"×":n==="file_renamed"||n==="folder_renamed"||n==="node_updated"?"~":n==="file_copied"?"⧉":n==="file_moved"||n==="folder_moved"?"→":n==="note_updated"?"✎":n==="action_created"?"▶":n==="action_done"?"✓":n==="worklog_added"?"⏱":"•"}function nl(n){const e=[];return n.nodePath&&e.push(n.nodePath),e.length>0?e.join(" → "):""}function ms(n,e,t){const l=[...n];return l.sort((i,a)=>{let r=0;if(e==="name")r=(i.title||"").localeCompare(a.title||"");else if(e==="type"){const c=i.captureKind||i.sourceKind||"",u=a.captureKind||a.sourceKind||"";r=c.localeCompare(u)}else r=(i.capturedAt||i.createdAt||"").localeCompare(a.capturedAt||a.createdAt||"");return t==="asc"?r:-r}),l}function _s(n){return{text:"📝",url:"🔗",file:"📄",image:"🖼",folder:"📁"}[n]||"📦"}function Jv(n,e,t){let{todayDashboard:l=null}=e,{suggestions:i=[]}=e,{inProgressItems:a=[]}=e,{todayCaptures:r=[]}=e,{suggestionCount:c=0}=e,{formatTime:u=Z=>""}=e,{formatDate:p=Z=>""}=e,{eventLabel:h=Z=>Z}=e,{eventIcon:m=Z=>""}=e,{nodeKindLabel:g=Z=>Z}=e,{captureKindLabel:b=Z=>Z}=e,{inboxMetaText:k=Z=>""}=e,{onOpenNodeById:y=Z=>{}}=e,{onOpenActivityEvent:S=Z=>{}}=e,{onOpenActivityTarget:T=Z=>{}}=e,{onOpenSuggestionWorklog:E=Z=>{}}=e,{onAcceptSuggestion:I=Z=>{}}=e,{onDeleteSuggestion:D=Z=>{}}=e,{onOpenNodeFolder:N=Z=>{}}=e,{onOpenInboxArtifact:M=Z=>{}}=e,j="feed";function R(Z){I(Z)}function O(Z){D(Z)}function H(Z){return{note_created:v("event.noteCreated"),note_updated:v("event.noteUpdated"),note_deleted:"Заметка удалена",file_added:v("event.fileAdded"),file_deleted:v("event.fileDeleted"),file_renamed:v("event.fileRenamed"),file_copied:v("event.fileCopied"),file_moved:v("event.fileMoved"),folder_added:v("event.folderAdded"),folder_deleted:v("event.folderDeleted"),folder_renamed:v("event.folderRenamed"),folder_moved:"Папка перемещена",node_created:v("event.caseCreated"),node_updated:v("event.caseUpdated"),node_deleted:"Узел удалён",action_created:"Действие создано",action_done:"Действие выполнено",worklog_added:"Запись времени добавлена"}[Z.eventType]||Z.eventType}function V(Z){if(Z.eventType==="folder_deleted"){y(Z.nodeId);return}if(["file_added","file_deleted","file_renamed","file_copied","file_moved","folder_added","folder_renamed","folder_moved"].includes(Z.eventType)){Z.targetId?T(Z):y(Z.nodeId);return}if(["note_created","note_updated","note_deleted"].includes(Z.eventType)){Z.targetType==="note"&&Z.targetId?T(Z):y(Z.nodeId);return}if(Z.eventType==="worklog_added"){y(Z.nodeId);return}if(["action_created","action_done"].includes(Z.eventType)){y(Z.nodeId);return}S(Z)}function G(Z,ye,Pe){const je=[...Z];return je.sort((Be,Ae)=>{let Ee=0;return ye==="name"?Ee=(Be.title||"").localeCompare(Ae.title||""):ye==="type"?Ee=(h(Be.eventType)||"").localeCompare(h(Ae.eventType)||""):Ee=(Be.createdAt||"").localeCompare(Ae.createdAt||""),Pe==="asc"?Ee:-Ee}),je}let U="time",q="desc",Y="time",B="desc";const F=()=>t(15,j="feed"),W=()=>t(15,j="suggestions"),P=()=>t(15,j="inprogress"),J=()=>t(15,j="captured"),Q=Z=>V(Z),ee=Z=>V(Z),te=(Z,ye)=>ye.key==="Enter"&&V(Z),le=Z=>y(Z.nodeId),se=(Z,ye,Pe,je)=>t(0,ye[Pe].suggestedMin=parseInt(je.target.value),i),ce=Z=>E(Z),de=Z=>R(Z),we=Z=>O(Z),ze=(Z,ye,Pe)=>t(0,ye[Pe]._expanded=!Z._expanded,i),me=(Z,ye,Pe,je)=>je.key==="Enter"&&t(0,ye[Pe]._expanded=!Z._expanded,i),X=Z=>T(Z),x=Z=>N(Z.nodeId),be=()=>{t(16,U="time"),t(17,q=U==="time"&&q==="desc"?"asc":"desc")},Ce=()=>{t(16,U="name"),t(17,q=U==="name"&&q==="desc"?"asc":"desc")},_e=()=>{t(16,U="type"),t(17,q=U==="type"&&q==="desc"?"asc":"desc")},He=Z=>S(Z),Ze=(Z,ye)=>ye.key==="Enter"&&S(Z),pt=()=>{t(18,Y="time"),t(19,B=Y==="time"&&B==="desc"?"asc":"desc")},Ye=()=>{t(18,Y="name"),t(19,B=Y==="name"&&B==="desc"?"asc":"desc")},Ie=()=>{t(18,Y="type"),t(19,B=Y==="type"&&B==="desc"?"asc":"desc")},Oe=Z=>M(Z),Me=(Z,ye)=>ye.key==="Enter"&&M(Z);return n.$$set=Z=>{"todayDashboard"in Z&&t(1,l=Z.todayDashboard),"suggestions"in Z&&t(0,i=Z.suggestions),"inProgressItems"in Z&&t(2,a=Z.inProgressItems),"todayCaptures"in Z&&t(3,r=Z.todayCaptures),"suggestionCount"in Z&&t(4,c=Z.suggestionCount),"formatTime"in Z&&t(5,u=Z.formatTime),"formatDate"in Z&&t(25,p=Z.formatDate),"eventLabel"in Z&&t(6,h=Z.eventLabel),"eventIcon"in Z&&t(7,m=Z.eventIcon),"nodeKindLabel"in Z&&t(26,g=Z.nodeKindLabel),"captureKindLabel"in Z&&t(27,b=Z.captureKindLabel),"inboxMetaText"in Z&&t(8,k=Z.inboxMetaText),"onOpenNodeById"in Z&&t(9,y=Z.onOpenNodeById),"onOpenActivityEvent"in Z&&t(10,S=Z.onOpenActivityEvent),"onOpenActivityTarget"in Z&&t(11,T=Z.onOpenActivityTarget),"onOpenSuggestionWorklog"in Z&&t(12,E=Z.onOpenSuggestionWorklog),"onAcceptSuggestion"in Z&&t(28,I=Z.onAcceptSuggestion),"onDeleteSuggestion"in Z&&t(29,D=Z.onDeleteSuggestion),"onOpenNodeFolder"in Z&&t(13,N=Z.onOpenNodeFolder),"onOpenInboxArtifact"in Z&&t(14,M=Z.onOpenInboxArtifact)},[i,l,a,r,c,u,h,m,k,y,S,T,E,N,M,j,U,q,Y,B,R,O,H,V,G,p,g,b,I,D,F,W,P,J,Q,ee,te,le,se,ce,de,we,ze,me,X,x,be,Ce,_e,He,Ze,pt,Ye,Ie,Oe,Me]}class qv extends it{constructor(e){super(),lt(this,e,Jv,Gv,nt,{todayDashboard:1,suggestions:0,inProgressItems:2,todayCaptures:3,suggestionCount:4,formatTime:5,formatDate:25,eventLabel:6,eventIcon:7,nodeKindLabel:26,captureKindLabel:27,inboxMetaText:8,onOpenNodeById:9,onOpenActivityEvent:10,onOpenActivityTarget:11,onOpenSuggestionWorklog:12,onAcceptSuggestion:28,onDeleteSuggestion:29,onOpenNodeFolder:13,onOpenInboxArtifact:14},null,[-1,-1,-1])}}const Yv={open:'<path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>',showInExplorer:'<path d="M3 6.5A2.5 2.5 0 0 1 5.5 4H9l2 2h8.5A2.5 2.5 0 0 1 22 8.5v8A2.5 2.5 0 0 1 19.5 19h-15A2.5 2.5 0 0 1 2 16.5v-10"/><path d="M12 11h6"/><path d="m15 8 3 3-3 3"/>',delete:'<polyline points="3 6 5 6 21 6"/><path d="M19 6l-1 14H6L5 6"/><path d="M10 11v6"/><path d="M14 11v6"/><path d="M9 6V4h6v2"/>',restore:'<path d="M3 7v6h6"/><path d="M21 17a9 9 0 0 0-15-6.7L3 13"/><path d="M12 12v5"/><path d="m9 14 3-3 3 3"/>',purge:'<path d="M3 6h18"/><path d="M8 6V4h8v2"/><path d="m9 11 6 6"/><path d="m15 11-6 6"/><path d="M6 6l1 14h10l1-14"/>',move:'<path d="M5 9V5h4"/><path d="m5 5 6 6"/><path d="M19 15v4h-4"/><path d="m19 19-6-6"/><path d="M19 5h-4"/><path d="M19 5v4"/><path d="m14 10 5-5"/><path d="M5 19h4"/><path d="M5 19v-4"/><path d="m10 14-5 5"/>',attach:'<path d="M21.44 11.05 12 20.49a6 6 0 0 1-8.49-8.49l9.44-9.44a4 4 0 1 1 5.66 5.66L9.17 17.66a2 2 0 1 1-2.83-2.83l8.49-8.48"/>',back:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',emptyTrash:'<path d="M3 6h18"/><path d="M8 6V4h8v2"/><path d="M6 6l1 14h10l1-14"/><path d="M10 11v5"/><path d="M14 11v5"/>',folder:'<path d="M3 6.5A2.5 2.5 0 0 1 5.5 4H9l2 2h8.5A2.5 2.5 0 0 1 22 8.5v8A2.5 2.5 0 0 1 19.5 19h-15A2.5 2.5 0 0 1 2 16.5v-10"/>'};function et(n,e=16){return`<svg width="${e}" height="${e}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${Yv[n]||""}</svg>`}const{Boolean:lc}=Jl;function hs(n,e,t){const l=n.slice();return l[454]=e[t],l}function gs(n,e,t){const l=n.slice();return l[457]=e[t],l}function bs(n,e,t){const l=n.slice();return l[460]=e[t],l}function ks(n,e,t){const l=n.slice();return l[460]=e[t],l}function ys(n,e,t){const l=n.slice();return l[486]=e[t],l}function ws(n,e,t){const l=n.slice();return l[509]=e[t],l}function Cs(n,e,t){const l=n.slice();return l[486]=e[t],l}function Ss(n,e,t){const l=n.slice();return l[514]=e[t],l}function Ts(n,e,t){const l=n.slice();return l[514]=e[t],l}function Es(n,e,t){const l=n.slice();return l[489]=e[t],l[519]=e,l[520]=t,l}function Is(n,e,t){const l=n.slice();return l[486]=e[t],l}function Ns(n,e,t){const l=n.slice();return l[509]=e[t],l}function Ds(n,e,t){const l=n.slice();return l[506]=e[t],l}function Ms(n,e,t){const l=n.slice();return l[473]=e[t],l}function js(n,e,t){const l=n.slice();return l[499]=e[t],l}function As(n,e,t){const l=n.slice();return l[473]=e[t],l}function Ls(n,e,t){const l=n.slice();return l[486]=e[t],l}function Ps(n,e,t){const l=n.slice();return l[465]=e[t],l}function Fs(n,e,t){const l=n.slice();return l[486]=e[t],l}function Rs(n,e,t){const l=n.slice();return l[489]=e[t],l[490]=e,l[491]=t,l}function Os(n,e,t){const l=n.slice();return l[486]=e[t],l}function zs(n,e,t){const l=n.slice();return l[481]=e[t],l}function Hs(n,e,t){const l=n.slice();return l[478]=e[t],l}function Bs(n,e,t){const l=n.slice();return l[473]=e[t],l}function Ws(n,e,t){const l=n.slice();return l[473]=e[t],l}function Vs(n,e,t){const l=n.slice();return l[468]=e[t],l}function Us(n,e,t){const l=n.slice();return l[465]=e[t],l}function Ks(n,e,t){const l=n.slice();return l[468]=e[t],l}function Gs(n,e,t){const l=n.slice();return l[496]=e[t],l}function Js(n,e,t){const l=n.slice();return l[527]=e[t],l}function qs(n,e,t){const l=n.slice();return l[530]=e[t],l}function Qv(n){let e,t,l,i,a,r,c,u,p,h,m,g,b,k,y,S,T,E,I,D,N,M,j,R,O,H,V,G,U,q,Y,B,F,W,P,J,Q,ee,te,le,se,ce,de,we,ze,me,X,x,be,Ce,_e,He,Ze,pt,Ye,Ie=n[94]&&Ys(n),Oe=ue(n[11]),Me=[];for(let re=0;re<Oe.length;re+=1)Me[re]=Zs(qs(n,Oe,re));const Z=[$v,xv],ye=[];function Pe(re,Se){return re[12].length>0?0:1}N=Pe(n),M=ye[N]=Z[N](n),O=new Av({props:{syncStatus:n[109],syncLoading:n[110],syncMessage:n[111],syncMessageKind:n[112],onSync:n[227],onOpenSettings:n[233]}});function je(re,Se){return re[33]?nm:re[32]?tm:em}let Be=je(n),Ae=Be(n),Ee=n[31]&&$s(n);const We=[um,cm,am,rm,sm,om,im,lm],Ue=[];function $e(re,Se){return re[36]?0:re[33]?1:re[32]==="inbox"?2:re[32]==="trash"?3:re[32]==="journal"?4:re[32]==="today"?5:re[32]==="activity"?6:7}le=$e(n),se=Ue[le]=We[le](n);let Fe=n[66]&&ma(n),he=n[70].visible&&ga(n),Ne=n[39]&&wa(n),Le=n[73]&&Ca(n),ot=n[80]&&n[79]&&Ta(n),rt=n[101]&&Ia(n),xe=n[104]&&Da(n),Ke=n[56]&&La(n),tt=n[96]&&Fa(n),Qe=n[86]&&Ra(n),Ge=n[10]&&Oa(n);return{c(){e=f("div"),Ie&&Ie.c(),t=_(),l=f("aside"),i=f("div"),a=f("img"),c=_(),u=f("span"),u.textContent=`${v("nav.brand")}`,p=_(),h=f("nav"),m=f("div"),g=f("div"),g.textContent=`${v("nav.system")}`,b=_();for(let re=0;re<Me.length;re+=1)Me[re].c();k=_(),y=f("div"),S=f("div"),T=f("span"),T.textContent=`${v("nav.workspace")}`,E=_(),I=f("button"),I.textContent="+",D=_(),M.c(),j=_(),R=f("div"),Xe(O.$$.fragment),H=_(),V=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-1iuenvo"><circle cx="12" cy="12" r="3" class="svelte-1iuenvo"></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-1iuenvo"></path></svg>',U=_(),q=f("span"),Y=z(n[30]),B=_(),F=f("main"),W=f("header"),P=f("div"),Ae.c(),J=_(),Q=f("div"),Q.innerHTML="",ee=_(),Ee&&Ee.c(),te=_(),se.c(),ce=_(),Fe&&Fe.c(),de=_(),he&&he.c(),we=_(),Ne&&Ne.c(),ze=_(),Le&&Le.c(),me=_(),ot&&ot.c(),X=_(),rt&&rt.c(),x=_(),xe&&xe.c(),be=_(),Ke&&Ke.c(),Ce=_(),tt&&tt.c(),_e=_(),Qe&&Qe.c(),He=_(),Ge&&Ge.c(),o(a,"class","logo svelte-1iuenvo"),pn(a.src,r="/assets/app-icons/icon_32x32.png")||o(a,"src",r),o(a,"width","20"),o(a,"height","20"),o(a,"alt",""),o(u,"class","brand-name svelte-1iuenvo"),o(i,"class","sidebar-brand svelte-1iuenvo"),o(g,"class","nav-label svelte-1iuenvo"),o(m,"class","nav-group svelte-1iuenvo"),o(T,"class","svelte-1iuenvo"),o(I,"class","nav-add-btn svelte-1iuenvo"),o(I,"title",v("common.create")),o(S,"class","nav-label-row svelte-1iuenvo"),o(y,"class","nav-group svelte-1iuenvo"),o(h,"class","sidebar-nav svelte-1iuenvo"),o(G,"class","sidebar-settings-btn svelte-1iuenvo"),o(G,"title",v("common.settings")),o(q,"class","version svelte-1iuenvo"),o(V,"class","sidebar-footer-row svelte-1iuenvo"),o(R,"class","sidebar-footer svelte-1iuenvo"),o(l,"class","sidebar svelte-1iuenvo"),o(P,"class","header-left svelte-1iuenvo"),o(Q,"class","header-right svelte-1iuenvo"),o(W,"class","header svelte-1iuenvo"),o(F,"class","main svelte-1iuenvo"),o(e,"class","app svelte-1iuenvo")},m(re,Se){C(re,e,Se),Ie&&Ie.m(e,null),s(e,t),s(e,l),s(l,i),s(i,a),s(i,c),s(i,u),s(l,p),s(l,h),s(h,m),s(m,g),s(m,b);for(let vt=0;vt<Me.length;vt+=1)Me[vt]&&Me[vt].m(m,null);s(h,k),s(h,y),s(y,S),s(S,T),s(S,E),s(S,I),s(y,D),ye[N].m(y,null),s(l,j),s(l,R),Je(O,R,null),s(R,H),s(R,V),s(V,G),s(V,U),s(V,q),s(q,Y),s(e,B),s(e,F),s(F,W),s(W,P),Ae.m(P,null),s(W,J),s(W,Q),s(F,ee),Ee&&Ee.m(F,null),s(F,te),Ue[le].m(F,null),s(F,ce),Fe&&Fe.m(F,null),s(F,de),he&&he.m(F,null),s(F,we),Ne&&Ne.m(F,null),s(F,ze),Le&&Le.m(F,null),s(F,me),ot&&ot.m(F,null),s(F,X),rt&&rt.m(F,null),s(F,x),xe&&xe.m(F,null),s(F,be),Ke&&Ke.m(F,null),s(F,Ce),tt&&tt.m(F,null),s(F,_e),Qe&&Qe.m(F,null),s(F,He),Ge&&Ge.m(F,null),Ze=!0,pt||(Ye=[A(I,"click",n[145]),A(G,"click",n[234])],pt=!0)},p(re,Se){if(re[94]?Ie?Ie.p(re,Se):(Ie=Ys(re),Ie.c(),Ie.m(e,t)):Ie&&(Ie.d(1),Ie=null),Se[0]&2048|Se[1]&1074003970|Se[3]&67108864){Oe=ue(re[11]);let mt;for(mt=0;mt<Oe.length;mt+=1){const St=qs(re,Oe,mt);Me[mt]?Me[mt].p(St,Se):(Me[mt]=Zs(St),Me[mt].c(),Me[mt].m(m,null))}for(;mt<Me.length;mt+=1)Me[mt].d(1);Me.length=Oe.length}let vt=N;N=Pe(re),N===vt?ye[N].p(re,Se):(ut(),ge(ye[vt],1,1,()=>{ye[vt]=null}),ft(),M=ye[N],M?M.p(re,Se):(M=ye[N]=Z[N](re),M.c()),pe(M,1),M.m(y,null));const yt={};Se[3]&65536&&(yt.syncStatus=re[109]),Se[3]&131072&&(yt.syncLoading=re[110]),Se[3]&262144&&(yt.syncMessage=re[111]),Se[3]&524288&&(yt.syncMessageKind=re[112]),O.$set(yt),(!Ze||Se[0]&1073741824)&&K(Y,re[30]),Be===(Be=je(re))&&Ae?Ae.p(re,Se):(Ae.d(1),Ae=Be(re),Ae&&(Ae.c(),Ae.m(P,null))),re[31]?Ee?Ee.p(re,Se):(Ee=$s(re),Ee.c(),Ee.m(F,te)):Ee&&(Ee.d(1),Ee=null);let gt=le;le=$e(re),le===gt?Ue[le].p(re,Se):(ut(),ge(Ue[gt],1,1,()=>{Ue[gt]=null}),ft(),se=Ue[le],se?se.p(re,Se):(se=Ue[le]=We[le](re),se.c()),pe(se,1),se.m(F,ce)),re[66]?Fe?(Fe.p(re,Se),Se[2]&16&&pe(Fe,1)):(Fe=ma(re),Fe.c(),pe(Fe,1),Fe.m(F,de)):Fe&&(ut(),ge(Fe,1,1,()=>{Fe=null}),ft()),re[70].visible?he?(he.p(re,Se),Se[2]&256&&pe(he,1)):(he=ga(re),he.c(),pe(he,1),he.m(F,we)):he&&(ut(),ge(he,1,1,()=>{he=null}),ft()),re[39]?Ne?Ne.p(re,Se):(Ne=wa(re),Ne.c(),Ne.m(F,ze)):Ne&&(Ne.d(1),Ne=null),re[73]?Le?Le.p(re,Se):(Le=Ca(re),Le.c(),Le.m(F,me)):Le&&(Le.d(1),Le=null),re[80]&&re[79]?ot?ot.p(re,Se):(ot=Ta(re),ot.c(),ot.m(F,X)):ot&&(ot.d(1),ot=null),re[101]?rt?rt.p(re,Se):(rt=Ia(re),rt.c(),rt.m(F,x)):rt&&(rt.d(1),rt=null),re[104]?xe?xe.p(re,Se):(xe=Da(re),xe.c(),xe.m(F,be)):xe&&(xe.d(1),xe=null),re[56]?Ke?Ke.p(re,Se):(Ke=La(re),Ke.c(),Ke.m(F,Ce)):Ke&&(Ke.d(1),Ke=null),re[96]?tt?(tt.p(re,Se),Se[3]&8&&pe(tt,1)):(tt=Fa(re),tt.c(),pe(tt,1),tt.m(F,_e)):tt&&(ut(),ge(tt,1,1,()=>{tt=null}),ft()),re[86]?Qe?(Qe.p(re,Se),Se[2]&16777216&&pe(Qe,1)):(Qe=Ra(re),Qe.c(),pe(Qe,1),Qe.m(F,He)):Qe&&(ut(),ge(Qe,1,1,()=>{Qe=null}),ft()),re[10]?Ge?(Ge.p(re,Se),Se[0]&1024&&pe(Ge,1)):(Ge=Oa(re),Ge.c(),pe(Ge,1),Ge.m(F,null)):Ge&&(ut(),ge(Ge,1,1,()=>{Ge=null}),ft())},i(re){Ze||(pe(M),pe(O.$$.fragment,re),pe(se),pe(Fe),pe(he),pe(tt),pe(Qe),pe(Ge),Ze=!0)},o(re){ge(M),ge(O.$$.fragment,re),ge(se),ge(Fe),ge(he),ge(tt),ge(Qe),ge(Ge),Ze=!1},d(re){re&&w(e),Ie&&Ie.d(),Re(Me,re),ye[N].d(),qe(O),Ae.d(),Ee&&Ee.d(),Ue[le].d(),Fe&&Fe.d(),he&&he.d(),Ne&&Ne.d(),Le&&Le.d(),ot&&ot.d(),rt&&rt.d(),xe&&xe.d(),Ke&&Ke.d(),tt&&tt.d(),Qe&&Qe.d(),Ge&&Ge.d(),pt=!1,ve(Ye)}}}function Xv(n){var l;let e,t;return e=new Dp({props:{vaultPath:((l=n[7])==null?void 0:l.vaultPath)||"",onComplete:n[229]}}),{c(){Xe(e.$$.fragment)},m(i,a){Je(e,i,a),t=!0},p(i,a){var c;const r={};a[0]&128&&(r.vaultPath=((c=i[7])==null?void 0:c.vaultPath)||""),e.$set(r)},i(i){t||(pe(e.$$.fragment,i),t=!0)},o(i){ge(e.$$.fragment,i),t=!1},d(i){qe(e,i)}}}function Zv(n){let e,t;return e=new Ep({props:{onComplete:n[228]}}),{c(){Xe(e.$$.fragment)},m(l,i){Je(e,l,i),t=!0},p:ie,i(l){t||(pe(e.$$.fragment,l),t=!0)},o(l){ge(e.$$.fragment,l),t=!1},d(l){qe(e,l)}}}function Ys(n){let e,t,l;return{c(){e=f("div"),t=f("div"),l=z(n[95]),o(t,"class","capture-drop-box svelte-1iuenvo"),o(e,"class","capture-drop-overlay svelte-1iuenvo")},m(i,a){C(i,e,a),s(e,t),s(t,l)},p(i,a){a[3]&4&&K(l,i[95])},d(i){i&&w(e)}}}function Qs(n){let e,t;return{c(){e=f("span"),t=z(n[49]),o(e,"class","nav-badge svelte-1iuenvo")},m(l,i){C(l,e,i),s(e,t)},p(l,i){i[1]&262144&&K(t,l[49])},d(l){l&&w(e)}}}function Xs(n){let e,t;return{c(){e=f("span"),t=z(n[61]),o(e,"class","nav-badge svelte-1iuenvo")},m(l,i){C(l,e,i),s(e,t)},p(l,i){i[1]&1073741824&&K(t,l[61])},d(l){l&&w(e)}}}function Zs(n){let e,t=n[530].label+"",l,i,a,r,c,u,p,h=n[530].id==="journal"&&n[49]>0&&Qs(n),m=n[530].id==="trash"&&n[61]>0&&Xs(n);function g(){return n[232](n[530])}return{c(){e=f("button"),l=z(t),i=_(),h&&h.c(),a=_(),m&&m.c(),r=_(),o(e,"class",c="nav-item "+(n[32]===n[530].id?"selected":"")+" svelte-1iuenvo")},m(b,k){C(b,e,k),s(e,l),s(e,i),h&&h.m(e,null),s(e,a),m&&m.m(e,null),s(e,r),u||(p=A(e,"click",g),u=!0)},p(b,k){n=b,k[0]&2048&&t!==(t=n[530].label+"")&&K(l,t),n[530].id==="journal"&&n[49]>0?h?h.p(n,k):(h=Qs(n),h.c(),h.m(e,a)):h&&(h.d(1),h=null),n[530].id==="trash"&&n[61]>0?m?m.p(n,k):(m=Xs(n),m.c(),m.m(e,r)):m&&(m.d(1),m=null),k[0]&2048|k[1]&2&&c!==(c="nav-item "+(n[32]===n[530].id?"selected":"")+" svelte-1iuenvo")&&o(e,"class",c)},d(b){b&&w(e),h&&h.d(),m&&m.d(),u=!1,p()}}}function xv(n){let e;return{c(){e=f("div"),e.textContent=`${v("nav.noNodes")}`,o(e,"class","nav-empty svelte-1iuenvo")},m(t,l){C(t,e,l)},p:ie,i:ie,o:ie,d(t){t&&w(e)}}}function $v(n){var r;let e,t,l,i,a;return t=new nc({props:{nodes:n[12],expanded:n[81],selectedNodeId:((r=n[33])==null?void 0:r.id)||"",onSelect:n[120],onToggle:n[150],onContextMenu:n[148],onDrop:n[151]}}),{c(){e=f("div"),Xe(t.$$.fragment),o(e,"class","workspace-tree-area svelte-1iuenvo"),o(e,"role","region"),o(e,"aria-label",v("nav.workspace")),ae(e,"drop-valid",n[92])},m(c,u){C(c,e,u),Je(t,e,null),l=!0,i||(a=[A(e,"dragover",ql(n[153])),A(e,"dragleave",n[154]),A(e,"drop",n[152])],i=!0)},p(c,u){var h;const p={};u[0]&4096&&(p.nodes=c[12]),u[2]&524288&&(p.expanded=c[81]),u[1]&4&&(p.selectedNodeId=((h=c[33])==null?void 0:h.id)||""),t.$set(p),(!l||u[2]&1073741824)&&ae(e,"drop-valid",c[92])},i(c){l||(pe(t.$$.fragment,c),l=!0)},o(c){ge(t.$$.fragment,c),l=!1},d(c){c&&w(e),qe(t),i=!1,ve(a)}}}function em(n){let e;return{c(){e=f("span"),e.textContent=`${v("nav.selectPrompt")}`,o(e,"class","crumb placeholder svelte-1iuenvo")},m(t,l){C(t,e,l)},p:ie,d(t){t&&w(e)}}}function tm(n){let e,t=ue(n[11]),l=[];for(let i=0;i<t.length;i+=1)l[i]=xs(Js(n,t,i));return{c(){e=f("span");for(let i=0;i<l.length;i+=1)l[i].c();o(e,"class","crumb svelte-1iuenvo")},m(i,a){C(i,e,a);for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(e,null)},p(i,a){if(a[0]&2048|a[1]&2){t=ue(i[11]);let r;for(r=0;r<t.length;r+=1){const c=Js(i,t,r);l[r]?l[r].p(c,a):(l[r]=xs(c),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=t.length}},d(i){i&&w(e),Re(l,i)}}}function nm(n){let e,t=n[33].title+"",l,i,a,r=n[196](n[33].type)+"",c;return{c(){e=f("span"),l=z(t),i=_(),a=f("span"),c=z(r),o(e,"class","crumb svelte-1iuenvo"),o(a,"class","crumb-type svelte-1iuenvo")},m(u,p){C(u,e,p),s(e,l),C(u,i,p),C(u,a,p),s(a,c)},p(u,p){p[1]&4&&t!==(t=u[33].title+"")&&K(l,t),p[1]&4&&r!==(r=u[196](u[33].type)+"")&&K(c,r)},d(u){u&&(w(e),w(i),w(a))}}}function xs(n){let e=(n[527].id===n[32]?n[527].label:"")+"",t;return{c(){t=z(e)},m(l,i){C(l,t,i)},p(l,i){i[0]&2048|i[1]&2&&e!==(e=(l[527].id===l[32]?l[527].label:"")+"")&&K(t,e)},d(l){l&&w(t)}}}function $s(n){let e,t=n[115](n[31])+"",l,i,a,r,c;return{c(){e=f("div"),l=z(t),i=_(),a=f("button"),a.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-1iuenvo"><line x1="18" y1="6" x2="6" y2="18" class="svelte-1iuenvo"></line><line x1="6" y1="6" x2="18" y2="18" class="svelte-1iuenvo"></line></svg>',o(a,"class","dismiss-btn svelte-1iuenvo"),o(a,"aria-label","Dismiss"),o(e,"class","error-banner svelte-1iuenvo"),o(e,"role","button"),o(e,"tabindex","0")},m(u,p){C(u,e,p),s(e,l),s(e,i),s(e,a),r||(c=[A(a,"click",Te(n[235])),A(e,"click",n[236]),A(e,"keydown",function(){Wt(kt(n[237]))&&kt(n[237]).apply(this,arguments)})],r=!0)},p(u,p){n=u,p[1]&1&&t!==(t=n[115](n[31])+"")&&K(l,t)},d(u){u&&w(e),r=!1,ve(c)}}}function lm(n){let e,t,l;function i(c,u){if(c[77])return pm;if(c[11].length>0)return dm;if(c[31])return fm}let a=i(n),r=a&&a(n);return{c(){e=f("div"),t=f("h2"),t.textContent=`${v("welcome.title")}`,l=_(),r&&r.c(),o(t,"class","svelte-1iuenvo"),o(e,"class","welcome svelte-1iuenvo")},m(c,u){C(c,e,u),s(e,t),s(e,l),r&&r.m(e,null)},p(c,u){a===(a=i(c))&&r?r.p(c,u):(r&&r.d(1),r=a&&a(c),r&&(r.c(),r.m(e,null)))},i:ie,o:ie,d(c){c&&w(e),r&&r.d()}}}function im(n){let e,t,l,i;function a(u,p){return u[15].length===0?mm:vm}let r=a(n),c=r(n);return{c(){e=f("div"),t=f("div"),l=f("h2"),l.textContent=`${v("activity.title")}`,i=_(),c.c(),o(l,"class","svelte-1iuenvo"),o(t,"class","activity-feed-header svelte-1iuenvo"),o(e,"class","activity-feed svelte-1iuenvo")},m(u,p){C(u,e,p),s(e,t),s(t,l),s(e,i),c.m(e,null)},p(u,p){r===(r=a(u))&&c?c.p(u,p):(c.d(1),c=r(u),c&&(c.c(),c.m(e,null)))},i:ie,o:ie,d(u){u&&w(e),c.d()}}}function om(n){let e,t,l,i;const a=[hm,_m],r=[];function c(u,p){return u[14]?0:1}return e=c(n),t=r[e]=a[e](n),{c(){t.c(),l=ht()},m(u,p){r[e].m(u,p),C(u,l,p),i=!0},p(u,p){let h=e;e=c(u),e===h?r[e].p(u,p):(ut(),ge(r[h],1,1,()=>{r[h]=null}),ft(),t=r[e],t?t.p(u,p):(t=r[e]=a[e](u),t.c()),pe(t,1),t.m(l.parentNode,l))},i(u){i||(pe(t),i=!0)},o(u){ge(t),i=!1},d(u){u&&w(l),r[e].d(u)}}}function sm(n){let e,t,l,i,a,r,c,u,p,h,m,g,b,k,y,S,T,E,I,D,N,M,j,R,O,H,V,G,U,q,Y,B,F,W,P,J,Q,ee,te,le,se,ce,de,we,ze,me,X,x,be,Ce,_e,He,Ze,pt,Ye,Ie,Oe,Me,Z;function ye(he,Ne){return he[24]?bm:gm}let Pe=ye(n),je=Pe(n),Be=n[21]&&ir(n),Ae=n[25]&&or(n),Ee=n[48].length>0&&sr(n),We=n[17]&&pr(n);function Ue(he,Ne){return he[16].length===0?ym:km}let $e=Ue(n),Fe=$e(n);return{c(){e=f("div"),t=f("div"),l=f("h2"),l.textContent=`${v("journal.title")}`,i=_(),a=f("div"),r=f("div"),r.textContent=`${v("journal.filterHeading")}`,c=_(),u=f("div"),p=f("label"),h=f("span"),h.textContent=`${v("journal.dateFrom")}`,m=_(),g=f("input"),b=_(),k=f("label"),y=f("span"),y.textContent=`${v("journal.dateTo")}`,S=_(),T=f("input"),E=_(),I=f("label"),D=f("span"),D.textContent=`${v("journal.node")}`,N=_(),M=f("div"),je.c(),j=_(),Be&&Be.c(),R=_(),O=f("label"),H=f("span"),H.textContent=`${v("journal.billable")}`,V=_(),G=f("select"),U=f("option"),U.textContent=`${v("common.all")}`,q=f("option"),q.textContent=`${v("journal.billableYes")}`,Y=f("option"),Y.textContent=`${v("journal.billableNo")}`,B=_(),F=f("label"),W=f("span"),W.textContent=`${v("journal.approx")}`,P=_(),J=f("select"),Q=f("option"),Q.textContent=`${v("common.all")}`,ee=f("option"),ee.textContent=`${v("journal.approxExact")}`,te=f("option"),te.textContent=`${v("journal.approxEstimated")}`,le=_(),se=f("button"),se.textContent=`${v("journal.filter")}`,ce=_(),de=f("button"),de.textContent=`${v("journal.reset")}`,we=_(),ze=f("div"),me=f("div"),me.textContent=`${v("journal.exportHeading")}`,X=_(),x=f("div"),be=f("button"),be.textContent=`${v("journal.exportCSV")}`,Ce=_(),_e=f("button"),_e.textContent=`${v("journal.exportMarkdown")}`,He=_(),Ze=f("button"),Ze.textContent="PDF",pt=_(),Ae&&Ae.c(),Ye=_(),Ee&&Ee.c(),Ie=_(),We&&We.c(),Oe=_(),Fe.c(),o(l,"class","svelte-1iuenvo"),o(r,"class","journal-filter-heading svelte-1iuenvo"),o(h,"class","label-text svelte-1iuenvo"),o(g,"type","date"),o(g,"class","svelte-1iuenvo"),o(p,"class","svelte-1iuenvo"),o(y,"class","label-text svelte-1iuenvo"),o(T,"type","date"),o(T,"class","svelte-1iuenvo"),o(k,"class","svelte-1iuenvo"),o(D,"class","label-text svelte-1iuenvo"),o(M,"class","journal-node-picker svelte-1iuenvo"),Ct(M,"position","relative"),o(I,"class","svelte-1iuenvo"),o(H,"class","label-text svelte-1iuenvo"),U.__value="all",ke(U,U.__value),o(U,"class","svelte-1iuenvo"),q.__value="yes",ke(q,q.__value),o(q,"class","svelte-1iuenvo"),Y.__value="no",ke(Y,Y.__value),o(Y,"class","svelte-1iuenvo"),o(G,"class","svelte-1iuenvo"),n[22]===void 0&&xt(()=>n[324].call(G)),o(O,"title",v("journal.billableHint")),o(O,"class","svelte-1iuenvo"),o(W,"class","label-text svelte-1iuenvo"),Q.__value="all",ke(Q,Q.__value),o(Q,"class","svelte-1iuenvo"),ee.__value="no",ke(ee,ee.__value),o(ee,"class","svelte-1iuenvo"),te.__value="yes",ke(te,te.__value),o(te,"class","svelte-1iuenvo"),o(J,"class","svelte-1iuenvo"),n[23]===void 0&&xt(()=>n[325].call(J)),o(F,"title",v("journal.approxHint")),o(F,"class","svelte-1iuenvo"),o(se,"class","btn btn-sm svelte-1iuenvo"),o(de,"class","btn btn-sm svelte-1iuenvo"),o(u,"class","journal-filters-row svelte-1iuenvo"),o(a,"class","journal-filter-section svelte-1iuenvo"),o(me,"class","journal-export-heading svelte-1iuenvo"),o(be,"class","btn btn-sm svelte-1iuenvo"),o(_e,"class","btn btn-sm svelte-1iuenvo"),o(Ze,"class","btn btn-sm svelte-1iuenvo"),o(x,"class","journal-export-row svelte-1iuenvo"),o(ze,"class","journal-export-section svelte-1iuenvo"),o(t,"class","journal-header svelte-1iuenvo"),o(e,"class","journal-screen svelte-1iuenvo")},m(he,Ne){C(he,e,Ne),s(e,t),s(t,l),s(t,i),s(t,a),s(a,r),s(a,c),s(a,u),s(u,p),s(p,h),s(p,m),s(p,g),ke(g,n[18]),s(u,b),s(u,k),s(k,y),s(k,S),s(k,T),ke(T,n[19]),s(u,E),s(u,I),s(I,D),s(I,N),s(I,M),je.m(M,null),s(u,j),Be&&Be.m(u,null),s(u,R),s(u,O),s(O,H),s(O,V),s(O,G),s(G,U),s(G,q),s(G,Y),Bt(G,n[22],!0),s(u,B),s(u,F),s(F,W),s(F,P),s(F,J),s(J,Q),s(J,ee),s(J,te),Bt(J,n[23],!0),s(u,le),s(u,se),s(u,ce),s(u,de),s(t,we),s(t,ze),s(ze,me),s(ze,X),s(ze,x),s(x,be),s(x,Ce),s(x,_e),s(x,He),s(x,Ze),s(x,pt),Ae&&Ae.m(x,null),s(e,Ye),Ee&&Ee.m(e,null),s(e,Ie),We&&We.m(e,null),s(e,Oe),Fe.m(e,null),Me||(Z=[A(g,"input",n[317]),A(T,"input",n[318]),A(G,"change",n[324]),A(J,"change",n[325]),A(se,"click",n[182]),A(de,"click",n[189]),A(be,"click",n[326]),A(_e,"click",n[327]),A(Ze,"click",n[328])],Me=!0)},p(he,Ne){Ne[0]&262144&&ke(g,he[18]),Ne[0]&524288&&ke(T,he[19]),Pe===(Pe=ye(he))&&je?je.p(he,Ne):(je.d(1),je=Pe(he),je&&(je.c(),je.m(M,null))),he[21]?Be?Be.p(he,Ne):(Be=ir(he),Be.c(),Be.m(u,R)):Be&&(Be.d(1),Be=null),Ne[0]&4194304&&Bt(G,he[22]),Ne[0]&8388608&&Bt(J,he[23]),he[25]?Ae?Ae.p(he,Ne):(Ae=or(he),Ae.c(),Ae.m(x,null)):Ae&&(Ae.d(1),Ae=null),he[48].length>0?Ee?Ee.p(he,Ne):(Ee=sr(he),Ee.c(),Ee.m(e,Ie)):Ee&&(Ee.d(1),Ee=null),he[17]?We?We.p(he,Ne):(We=pr(he),We.c(),We.m(e,Oe)):We&&(We.d(1),We=null),$e===($e=Ue(he))&&Fe?Fe.p(he,Ne):(Fe.d(1),Fe=$e(he),Fe&&(Fe.c(),Fe.m(e,null)))},i:ie,o:ie,d(he){he&&w(e),je.d(),Be&&Be.d(),Ae&&Ae.d(),Ee&&Ee.d(),We&&We.d(),Fe.d(),Me=!1,ve(Z)}}}function rm(n){let e,t,l,i,a,r,c,u,p,h,m,g,b=et("emptyTrash",14)+"",k,y=v("trash.emptyTrash")+"",S,T,E,I,D,N,M=n[62].length>0&&Tr(n);function j(H,V){return!H[4]||(H[4].nodes||[]).length===0?Dm:Nm}let R=j(n),O=R(n);return{c(){e=f("div"),t=f("div"),l=f("div"),i=f("h2"),i.textContent=`${v("nav.trash")}`,a=_(),r=f("p"),c=z(n[64]),u=_(),p=f("div"),M&&M.c(),h=_(),m=f("button"),g=new Vl(!1),k=_(),S=z(y),T=_(),E=f("button"),E.textContent=`${v("trash.openFolder")}`,I=_(),O.c(),o(i,"class","svelte-1iuenvo"),o(r,"class","svelte-1iuenvo"),o(l,"class","svelte-1iuenvo"),g.a=k,o(m,"class","btn btn-sm btn-danger svelte-1iuenvo"),o(E,"class","btn btn-sm svelte-1iuenvo"),o(p,"class","trash-actions svelte-1iuenvo"),o(t,"class","trash-header svelte-1iuenvo"),o(e,"class","trash-screen svelte-1iuenvo")},m(H,V){C(H,e,V),s(e,t),s(t,l),s(l,i),s(l,a),s(l,r),s(r,c),s(t,u),s(t,p),M&&M.m(p,null),s(p,h),s(p,m),g.m(b,m),s(m,k),s(m,S),s(p,T),s(p,E),s(e,I),O.m(e,null),D||(N=[A(m,"click",n[177]),A(E,"click",n[312])],D=!0)},p(H,V){V[2]&4&&K(c,H[64]),H[62].length>0?M?M.p(H,V):(M=Tr(H),M.c(),M.m(p,h)):M&&(M.d(1),M=null),R===(R=j(H))&&O?O.p(H,V):(O.d(1),O=R(H),O&&(O.c(),O.m(e,null)))},i:ie,o:ie,d(H){H&&w(e),M&&M.d(),O.d(),D=!1,ve(N)}}}function am(n){let e,t,l,i,a,r,c,u,p,h=(n[53]?v("common.loading"):v("inbox.pasteClipboard"))+"",m,g,b,k,y,S,T=n[54]&&Dr(n),E=n[0].length>0&&Mr(n);function I(M,j){return M[0].length===0?Rm:M[114]?Fm:Pm}let D=I(n),N=D(n);return{c(){e=f("div"),t=f("div"),l=f("div"),i=f("h2"),i.textContent=`${v("nav.inbox")}`,a=_(),r=f("p"),r.textContent=`${v("inbox.subtitle")}`,c=_(),u=f("div"),p=f("button"),m=z(h),g=_(),T&&T.c(),b=_(),E&&E.c(),k=_(),N.c(),o(i,"class","svelte-1iuenvo"),o(r,"class","svelte-1iuenvo"),o(l,"class","svelte-1iuenvo"),o(p,"class","btn btn-primary svelte-1iuenvo"),p.disabled=n[53],o(u,"class","inbox-header-actions svelte-1iuenvo"),o(t,"class","inbox-header svelte-1iuenvo"),o(e,"class","inbox-screen svelte-1iuenvo"),o(e,"role","region"),o(e,"aria-label",v("nav.inbox")),ae(e,"drop-valid",n[93])},m(M,j){C(M,e,j),s(e,t),s(t,l),s(l,i),s(l,a),s(l,r),s(t,c),s(t,u),s(u,p),s(p,m),s(u,g),T&&T.m(u,null),s(e,b),E&&E.m(e,null),s(e,k),N.m(e,null),y||(S=[A(p,"click",n[199]),A(e,"dragover",n[200]),A(e,"dragleave",n[201]),A(e,"drop",n[202])],y=!0)},p(M,j){j[1]&4194304&&h!==(h=(M[53]?v("common.loading"):v("inbox.pasteClipboard"))+"")&&K(m,h),j[1]&4194304&&(p.disabled=M[53]),M[54]?T?T.p(M,j):(T=Dr(M),T.c(),T.m(u,null)):T&&(T.d(1),T=null),M[0].length>0?E?E.p(M,j):(E=Mr(M),E.c(),E.m(e,k)):E&&(E.d(1),E=null),D===(D=I(M))&&N?N.p(M,j):(N.d(1),N=D(M),N&&(N.c(),N.m(e,null))),j[3]&1&&ae(e,"drop-valid",M[93])},i:ie,o:ie,d(M){M&&w(e),T&&T.d(),E&&E.d(),N.d(),y=!1,ve(S)}}}function cm(n){let e,t,l,i,a,r,c=ue(n[117]),u=[];for(let g=0;g<c.length;g+=1)u[g]=Pr(Gs(n,c,g));const p=[$m,xm,Zm,Xm,Qm,Ym,qm,Jm],h=[];function m(g,b){return g[34]==="overview"?0:g[34]==="notes"?1:g[34]==="files"?2:g[34]==="inbox"?3:g[34]==="links"?4:g[34]==="actions"?5:g[34]==="worklog"?6:g[34]==="activity"?7:-1}return~(i=m(n))&&(a=h[i]=p[i](n)),{c(){e=f("div");for(let g=0;g<u.length;g+=1)u[g].c();t=_(),l=f("div"),a&&a.c(),o(e,"class","tabs svelte-1iuenvo"),o(l,"class","tab-content svelte-1iuenvo")},m(g,b){C(g,e,b);for(let k=0;k<u.length;k+=1)u[k]&&u[k].m(e,null);C(g,t,b),C(g,l,b),~i&&h[i].m(l,null),r=!0},p(g,b){if(b[1]&8|b[3]&50331648){c=ue(g[117]);let y;for(y=0;y<c.length;y+=1){const S=Gs(g,c,y);u[y]?u[y].p(S,b):(u[y]=Pr(S),u[y].c(),u[y].m(e,null))}for(;y<u.length;y+=1)u[y].d(1);u.length=c.length}let k=i;i=m(g),i===k?~i&&h[i].p(g,b):(a&&(ut(),ge(h[k],1,1,()=>{h[k]=null}),ft()),~i?(a=h[i],a?a.p(g,b):(a=h[i]=p[i](g),a.c()),pe(a,1),a.m(l,null)):a=null)},i(g){r||(pe(a),r=!0)},o(g){ge(a),r=!1},d(g){g&&(w(e),w(t),w(l)),Re(u,g),~i&&h[i].d()}}}function um(n){let e,t,l,i=n[36].title+"",a,r,c,u,p,h,m,g,b,k,y,S=n[36].dirty&&va();return{c(){e=f("div"),t=f("div"),l=f("span"),a=z(i),r=_(),S&&S.c(),c=_(),u=f("div"),p=f("button"),p.textContent=`${v("common.save")}`,h=_(),m=f("button"),m.textContent=`${v("common.close")}`,g=_(),b=f("textarea"),o(l,"class","note-title svelte-1iuenvo"),o(p,"class","btn btn-primary svelte-1iuenvo"),o(m,"class","btn svelte-1iuenvo"),o(u,"class","note-editor-actions svelte-1iuenvo"),o(t,"class","note-editor-header svelte-1iuenvo"),o(b,"class","note-textarea svelte-1iuenvo"),o(b,"placeholder",v("note.placeholder")),o(e,"class","note-editor svelte-1iuenvo")},m(T,E){C(T,e,E),s(e,t),s(t,l),s(l,a),s(t,r),S&&S.m(t,null),s(t,c),s(t,u),s(u,p),s(u,h),s(u,m),s(e,g),s(e,b),ke(b,n[36].content),k||(y=[A(p,"click",n[166]),A(m,"click",n[164]),A(b,"input",n[238]),A(b,"input",n[165])],k=!0)},p(T,E){E[1]&32&&i!==(i=T[36].title+"")&&K(a,i),T[36].dirty?S||(S=va(),S.c(),S.m(t,c)):S&&(S.d(1),S=null),E[1]&32&&ke(b,T[36].content)},i:ie,o:ie,d(T){T&&w(e),S&&S.d(),k=!1,ve(y)}}}function fm(n){let e,t=v("common.error")+"",l,i,a;return{c(){e=f("p"),l=z(t),i=_(),a=z(n[31]),o(e,"class","error-text svelte-1iuenvo")},m(r,c){C(r,e,c),s(e,l),s(e,i),s(e,a)},p(r,c){c[1]&1&&K(a,r[31])},d(r){r&&w(e)}}}function dm(n){let e,t,l;return{c(){e=f("p"),e.textContent=`${v("welcome.selectSection")}`,t=_(),l=f("p"),l.textContent=`${v("welcome.createCase")}`,o(e,"class","svelte-1iuenvo"),o(l,"class","hint svelte-1iuenvo")},m(i,a){C(i,e,a),C(i,t,a),C(i,l,a)},p:ie,d(i){i&&(w(e),w(t),w(l))}}}function pm(n){let e;return{c(){e=f("p"),e.textContent=`${v("common.loading")}`,o(e,"class","svelte-1iuenvo")},m(t,l){C(t,e,l)},p:ie,d(t){t&&w(e)}}}function vm(n){let e,t=ue(n[15]),l=[];for(let i=0;i<t.length;i+=1)l[i]=tr(ys(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();o(e,"class","activity-feed-events svelte-1iuenvo")},m(i,a){C(i,e,a);for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(e,null)},p(i,a){if(a[0]&32768|a[6]&512|a[7]&64){t=ue(i[15]);let r;for(r=0;r<t.length;r+=1){const c=ys(i,t,r);l[r]?l[r].p(c,a):(l[r]=tr(c),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=t.length}},d(i){i&&w(e),Re(l,i)}}}function mm(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${v("activity.empty")}`,o(t,"class","svelte-1iuenvo"),o(e,"class","empty-state svelte-1iuenvo")},m(l,i){C(l,e,i),s(e,t)},p:ie,d(l){l&&w(e)}}}function er(n){let e,t=n[486].targetType+"",l;return{c(){e=f("span"),l=z(t),o(e,"class","activity-feed-target svelte-1iuenvo")},m(i,a){C(i,e,a),s(e,l)},p(i,a){a[0]&32768&&t!==(t=i[486].targetType+"")&&K(l,t)},d(i){i&&w(e)}}}function tr(n){let e,t,l=Nn(n[486].eventType)+"",i,a,r,c,u=n[486].title+"",p,h,m,g,b=n[195](n[486].eventType)+"",k,y,S,T,E=bt(n[486].createdAt)+"",I,D,N=wt(n[486].createdAt)+"",M,j,R,O,H=n[486].targetType&&er(n);function V(){return n[352](n[486])}function G(...U){return n[353](n[486],...U)}return{c(){e=f("div"),t=f("span"),i=z(l),a=_(),r=f("div"),c=f("span"),p=z(u),h=_(),m=f("div"),g=f("span"),k=z(b),y=_(),H&&H.c(),S=_(),T=f("span"),I=z(E),D=_(),M=z(N),j=_(),o(t,"class","activity-feed-icon svelte-1iuenvo"),o(c,"class","activity-feed-title svelte-1iuenvo"),o(g,"class","activity-feed-type svelte-1iuenvo"),o(T,"class","activity-feed-time svelte-1iuenvo"),o(m,"class","activity-feed-meta svelte-1iuenvo"),o(r,"class","activity-feed-body svelte-1iuenvo"),o(e,"class","activity-feed-event svelte-1iuenvo"),o(e,"role","button"),o(e,"tabindex","0")},m(U,q){C(U,e,q),s(e,t),s(t,i),s(e,a),s(e,r),s(r,c),s(c,p),s(r,h),s(r,m),s(m,g),s(g,k),s(m,y),H&&H.m(m,null),s(m,S),s(m,T),s(T,I),s(T,D),s(T,M),s(e,j),R||(O=[A(e,"click",V),A(e,"keydown",G)],R=!0)},p(U,q){n=U,q[0]&32768&&l!==(l=Nn(n[486].eventType)+"")&&K(i,l),q[0]&32768&&u!==(u=n[486].title+"")&&K(p,u),q[0]&32768&&b!==(b=n[195](n[486].eventType)+"")&&K(k,b),n[486].targetType?H?H.p(n,q):(H=er(n),H.c(),H.m(m,S)):H&&(H.d(1),H=null),q[0]&32768&&E!==(E=bt(n[486].createdAt)+"")&&K(I,E),q[0]&32768&&N!==(N=wt(n[486].createdAt)+"")&&K(M,N)},d(U){U&&w(e),H&&H.d(),R=!1,ve(O)}}}function _m(n){let e,t,l,i;return{c(){e=f("div"),t=f("p"),t.textContent=`${v("today.empty")}`,l=_(),i=f("p"),i.textContent=`${v("today.emptyHint")}`,o(t,"class","svelte-1iuenvo"),o(i,"class","hint svelte-1iuenvo"),o(e,"class","today-empty svelte-1iuenvo")},m(a,r){C(a,e,r),s(e,t),s(e,l),s(e,i)},p:ie,i:ie,o:ie,d(a){a&&w(e)}}}function hm(n){let e,t;return e=new qv({props:{todayDashboard:n[14],suggestions:n[48],inProgressItems:n[50],todayCaptures:n[51],suggestionCount:n[48].length,formatTime:wt,formatDate:bt,eventLabel:n[195],eventIcon:Nn,nodeKindLabel:n[196],captureKindLabel:n[197],inboxMetaText:n[198],onOpenNodeById:n[344],onOpenActivityEvent:n[345],onOpenActivityTarget:n[346],onOpenSuggestionWorklog:n[347],onAcceptSuggestion:n[348],onDeleteSuggestion:n[349],onOpenNodeFolder:n[350],onOpenInboxArtifact:n[351]}}),{c(){Xe(e.$$.fragment)},m(l,i){Je(e,l,i),t=!0},p(l,i){const a={};i[0]&16384&&(a.todayDashboard=l[14]),i[1]&131072&&(a.suggestions=l[48]),i[1]&524288&&(a.inProgressItems=l[50]),i[1]&1048576&&(a.todayCaptures=l[51]),i[1]&131072&&(a.suggestionCount=l[48].length),e.$set(a)},i(l){t||(pe(e.$$.fragment,l),t=!0)},o(l){ge(e.$$.fragment,l),t=!1},d(l){qe(e,l)}}}function gm(n){let e,t,l,i,a,r=n[28]&&nr(n);return{c(){e=f("input"),t=_(),r&&r.c(),l=ht(),o(e,"type","text"),o(e,"placeholder",v("journal.nodeSearch")),o(e,"class","svelte-1iuenvo")},m(c,u){C(c,e,u),ke(e,n[26]),C(c,t,u),r&&r.m(c,u),C(c,l,u),i||(a=[A(e,"input",n[320]),A(e,"input",n[186]),A(e,"blur",n[321])],i=!0)},p(c,u){u[0]&67108864&&e.value!==c[26]&&ke(e,c[26]),c[28]?r?r.p(c,u):(r=nr(c),r.c(),r.m(l.parentNode,l)):r&&(r.d(1),r=null)},d(c){c&&(w(e),w(t),w(l)),r&&r.d(c),i=!1,ve(a)}}}function bm(n){let e,t,l,i,a,r;return{c(){e=f("button"),t=z(n[24]),l=_(),i=f("span"),i.textContent="✕",o(i,"class","journal-node-clear svelte-1iuenvo"),o(e,"class","journal-selected-node svelte-1iuenvo")},m(c,u){C(c,e,u),s(e,t),s(e,l),s(e,i),a||(r=A(e,"click",n[319]),a=!0)},p(c,u){u[0]&16777216&&K(t,c[24])},d(c){c&&w(e),a=!1,r()}}}function nr(n){let e,t=ue(n[27]),l=[];for(let i=0;i<t.length;i+=1)l[i]=lr(Ns(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();o(e,"class","journal-search-dropdown svelte-1iuenvo")},m(i,a){C(i,e,a);for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(e,null)},p(i,a){if(a[0]&134217728|a[6]&2){t=ue(i[27]);let r;for(r=0;r<t.length;r+=1){const c=Ns(i,t,r);l[r]?l[r].p(c,a):(l[r]=lr(c),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=t.length}},d(i){i&&w(e),Re(l,i)}}}function lr(n){let e,t,l=n[509].title+"",i,a,r,c=n[509].path+"",u,p,h,m;function g(){return n[322](n[509])}return{c(){e=f("button"),t=f("span"),i=z(l),a=_(),r=f("span"),u=z(c),p=_(),o(t,"class","journal-search-title svelte-1iuenvo"),o(r,"class","journal-search-path svelte-1iuenvo"),o(e,"class","journal-search-item svelte-1iuenvo")},m(b,k){C(b,e,k),s(e,t),s(t,i),s(e,a),s(e,r),s(r,u),s(e,p),h||(m=A(e,"click",g),h=!0)},p(b,k){n=b,k[0]&134217728&&l!==(l=n[509].title+"")&&K(i,l),k[0]&134217728&&c!==(c=n[509].path+"")&&K(u,c)},d(b){b&&w(e),h=!1,m()}}}function ir(n){let e,t,l,i,a,r;return{c(){e=f("label"),t=f("input"),l=_(),i=f("span"),i.textContent=`${v("journal.includeChildren")}`,o(t,"type","checkbox"),o(t,"class","journal-include-chk svelte-1iuenvo"),o(i,"class","svelte-1iuenvo"),o(e,"class","checkbox-label svelte-1iuenvo")},m(c,u){C(c,e,u),s(e,t),t.checked=n[20],s(e,l),s(e,i),a||(r=A(t,"change",n[323]),a=!0)},p(c,u){u[0]&1048576&&(t.checked=c[20])},d(c){c&&w(e),a=!1,r()}}}function or(n){let e,t;return{c(){e=f("span"),t=z(n[25]),o(e,"class","journal-status-msg svelte-1iuenvo")},m(l,i){C(l,e,i),s(e,t)},p(l,i){i[0]&33554432&&K(t,l[25])},d(l){l&&w(e)}}}function sr(n){let e,t,l,i=ue(n[48]),a=[];for(let r=0;r<i.length;r+=1)a[r]=dr(Es(n,i,r));return{c(){e=f("div"),t=f("div"),t.textContent=`${v("suggest.title")}`,l=_();for(let r=0;r<a.length;r+=1)a[r].c();o(t,"class","suggestions-title svelte-1iuenvo"),o(e,"class","journal-suggestions svelte-1iuenvo")},m(r,c){C(r,e,c),s(e,t),s(e,l);for(let u=0;u<a.length;u+=1)a[u]&&a[u].m(e,null)},p(r,c){if(c[1]&131072|c[5]&92274692|c[6]&512|c[7]&48){i=ue(r[48]);let u;for(u=0;u<i.length;u+=1){const p=Es(r,i,u);a[u]?a[u].p(p,c):(a[u]=dr(p),a[u].c(),a[u].m(e,null))}for(;u<a.length;u+=1)a[u].d(1);a.length=i.length}},d(r){r&&w(e),Re(a,r)}}}function rr(n){let e,t=n[489].events.length+"",l,i,a=v("suggest.detectedEvents")+"",r;return{c(){e=z("· "),l=z(t),i=_(),r=z(a)},m(c,u){C(c,e,u),C(c,l,u),C(c,i,u),C(c,r,u)},p(c,u){u[1]&131072&&t!==(t=c[489].events.length+"")&&K(l,t)},d(c){c&&(w(e),w(l),w(i),w(r))}}}function ar(n){let e,t,l,i=ue(n[489].events),a=[];for(let r=0;r<i.length;r+=1)a[r]=fr(Is(n,i,r));return{c(){e=f("div"),t=f("div"),t.textContent=`${v("suggest.detectedEvents")}`,l=_();for(let r=0;r<a.length;r+=1)a[r].c();o(t,"class","suggestion-detail-title svelte-1iuenvo"),o(e,"class","suggestion-detail svelte-1iuenvo")},m(r,c){C(r,e,c),s(e,t),s(e,l);for(let u=0;u<a.length;u+=1)a[u]&&a[u].m(e,null)},p(r,c){if(c[1]&131072|c[5]&4|c[6]&512|c[7]&32){i=ue(r[489].events);let u;for(u=0;u<i.length;u+=1){const p=Is(r,i,u);a[u]?a[u].p(p,c):(a[u]=fr(p),a[u].c(),a[u].m(e,null))}for(;u<a.length;u+=1)a[u].d(1);a.length=i.length}},d(r){r&&w(e),Re(a,r)}}}function cr(n){let e,t=n[486].nodePath+"",l;return{c(){e=f("span"),l=z(t),o(e,"class","suggestion-event-path svelte-1iuenvo")},m(i,a){C(i,e,a),s(e,l)},p(i,a){a[1]&131072&&t!==(t=i[486].nodePath+"")&&K(l,t)},d(i){i&&w(e)}}}function ur(n){let e,t,l;function i(){return n[337](n[486])}return{c(){e=f("button"),e.textContent=`${v("file.showInExplorer")}`,o(e,"class","link-btn svelte-1iuenvo")},m(a,r){C(a,e,r),t||(l=A(e,"click",i),t=!0)},p(a,r){n=a},d(a){a&&w(e),t=!1,l()}}}function fr(n){let e,t,l=wt(n[486].createdAt)+"",i,a,r,c,u=n[195](n[486].eventType)+"",p,h,m,g=n[486].title+"",b,k,y,S,T=n[486].targetType==="file"||n[486].eventType.startsWith("file_"),E,I,D,N=n[486].nodePath&&cr(n);function M(){return n[336](n[486])}let j=T&&ur(n);return{c(){e=f("div"),t=f("span"),i=z(l),a=_(),N&&N.c(),r=_(),c=f("span"),p=z(u),h=_(),m=f("span"),b=z(g),k=_(),y=f("button"),y.textContent=`${v("common.open")}`,S=_(),j&&j.c(),E=_(),o(t,"class","suggestion-event-time svelte-1iuenvo"),o(c,"class","suggestion-event-type svelte-1iuenvo"),o(m,"class","suggestion-event-title svelte-1iuenvo"),o(y,"class","link-btn svelte-1iuenvo"),o(e,"class","suggestion-detail-event svelte-1iuenvo")},m(R,O){C(R,e,O),s(e,t),s(t,i),s(e,a),N&&N.m(e,null),s(e,r),s(e,c),s(c,p),s(e,h),s(e,m),s(m,b),s(e,k),s(e,y),s(e,S),j&&j.m(e,null),s(e,E),I||(D=A(y,"click",M),I=!0)},p(R,O){n=R,O[1]&131072&&l!==(l=wt(n[486].createdAt)+"")&&K(i,l),n[486].nodePath?N?N.p(n,O):(N=cr(n),N.c(),N.m(e,r)):N&&(N.d(1),N=null),O[1]&131072&&u!==(u=n[195](n[486].eventType)+"")&&K(p,u),O[1]&131072&&g!==(g=n[486].title+"")&&K(b,g),O[1]&131072&&(T=n[486].targetType==="file"||n[486].eventType.startsWith("file_")),T?j?j.p(n,O):(j=ur(n),j.c(),j.m(e,E)):j&&(j.d(1),j=null)},d(R){R&&w(e),N&&N.d(),j&&j.d(),I=!1,D()}}}function dr(n){let e,t,l,i,a=n[489].nodeTitle+"",r,c,u,p=n[489].summary+"",h,m,g,b=n[489].suggestedMin+"",k,y,S=v("worklog.min")+"",T,E,I,D,N,M,j,R,O,H,V,G,U,q,Y,B,F,W,P,J,Q;function ee(){return n[329](n[489])}let te=n[489].events&&n[489].events.length>0&&rr(n);function le(...X){return n[330](n[489],n[519],n[520],...X)}function se(){return n[331](n[489])}function ce(){return n[332](n[489])}function de(){return n[333](n[489])}function we(){return n[334](n[489],n[519],n[520])}function ze(...X){return n[335](n[489],n[519],n[520],...X)}let me=n[489]._expanded&&n[489].events&&n[489].events.length>0&&ar(n);return{c(){e=f("div"),t=f("div"),l=f("div"),i=f("button"),r=z(a),c=_(),u=f("span"),h=z(p),m=_(),g=f("span"),k=z(b),y=_(),T=z(S),te&&te.c(),E=_(),I=f("div"),D=f("span"),j=_(),R=f("input"),H=_(),V=f("span"),V.textContent=`${v("suggest.minutes")}`,G=_(),U=f("button"),U.textContent=`${v("suggest.edit")}`,q=_(),Y=f("button"),Y.textContent=`${v("suggest.apply")}`,B=_(),F=f("button"),F.textContent=`${v("common.delete")}`,W=_(),me&&me.c(),P=_(),o(i,"class","suggestion-node link-btn svelte-1iuenvo"),o(u,"class","suggestion-summary svelte-1iuenvo"),o(g,"class","suggestion-meta svelte-1iuenvo"),o(l,"class","suggestion-info svelte-1iuenvo"),o(D,"class","suggestion-confidence-dot svelte-1iuenvo"),o(D,"title",N=v("suggest.confidence."+n[489].confidence)),o(D,"aria-label",M=v("suggest.confidence."+n[489].confidence)),ae(D,"low",n[489].confidence==="low"),ae(D,"medium",n[489].confidence==="medium"),ae(D,"high",n[489].confidence==="high"),o(R,"type","number"),o(R,"class","suggestion-min-input svelte-1iuenvo"),R.value=O=n[489].suggestedMin,o(R,"min","1"),o(R,"max","480"),o(V,"class","suggestion-min-label svelte-1iuenvo"),o(U,"class","btn btn-sm svelte-1iuenvo"),o(Y,"class","btn btn-sm btn-primary svelte-1iuenvo"),o(F,"class","btn btn-sm btn-danger svelte-1iuenvo"),o(I,"class","suggestion-actions svelte-1iuenvo"),o(t,"class","suggestion-main svelte-1iuenvo"),o(t,"role","button"),o(t,"tabindex","0"),o(e,"class","suggestion-card svelte-1iuenvo"),ae(e,"expanded",n[489]._expanded)},m(X,x){C(X,e,x),s(e,t),s(t,l),s(l,i),s(i,r),s(l,c),s(l,u),s(u,h),s(l,m),s(l,g),s(g,k),s(g,y),s(g,T),te&&te.m(g,null),s(t,E),s(t,I),s(I,D),s(I,j),s(I,R),s(I,H),s(I,V),s(I,G),s(I,U),s(I,q),s(I,Y),s(I,B),s(I,F),s(e,W),me&&me.m(e,null),s(e,P),J||(Q=[A(i,"click",Te(ee)),A(R,"change",Te(le)),A(U,"click",Te(se)),A(Y,"click",Te(ce)),A(F,"click",Te(de)),A(t,"click",we),A(t,"keydown",ze)],J=!0)},p(X,x){n=X,x[1]&131072&&a!==(a=n[489].nodeTitle+"")&&K(r,a),x[1]&131072&&p!==(p=n[489].summary+"")&&K(h,p),x[1]&131072&&b!==(b=n[489].suggestedMin+"")&&K(k,b),n[489].events&&n[489].events.length>0?te?te.p(n,x):(te=rr(n),te.c(),te.m(g,null)):te&&(te.d(1),te=null),x[1]&131072&&N!==(N=v("suggest.confidence."+n[489].confidence))&&o(D,"title",N),x[1]&131072&&M!==(M=v("suggest.confidence."+n[489].confidence))&&o(D,"aria-label",M),x[1]&131072&&ae(D,"low",n[489].confidence==="low"),x[1]&131072&&ae(D,"medium",n[489].confidence==="medium"),x[1]&131072&&ae(D,"high",n[489].confidence==="high"),x[1]&131072&&O!==(O=n[489].suggestedMin)&&R.value!==O&&(R.value=O),n[489]._expanded&&n[489].events&&n[489].events.length>0?me?me.p(n,x):(me=ar(n),me.c(),me.m(e,P)):me&&(me.d(1),me=null),x[1]&131072&&ae(e,"expanded",n[489]._expanded)},d(X){X&&w(e),te&&te.d(),me&&me.d(),J=!1,ve(Q)}}}function pr(n){let e,t,l=v("journal.total")+"",i,a,r=Math.floor(n[17].totalMinutes/60)+"",c,u,p=n[17].totalMinutes%60+"",h,m,g=n[17].totalEntries+"",b,k,y=v("worklog.min")+"",S,T,E,I,D=n[17].byDay&&n[17].byDay.length>0&&vr(n),N=n[17].byNode&&n[17].byNode.length>0&&_r(n);return{c(){e=f("div"),t=f("div"),i=z(l),a=z(": "),c=z(r),u=z("ч "),h=z(p),m=z("м ("),b=z(g),k=_(),S=z(y),T=z(")"),E=_(),D&&D.c(),I=_(),N&&N.c(),o(t,"class","summary-total svelte-1iuenvo"),o(e,"class","journal-summary svelte-1iuenvo")},m(M,j){C(M,e,j),s(e,t),s(t,i),s(t,a),s(t,c),s(t,u),s(t,h),s(t,m),s(t,b),s(t,k),s(t,S),s(t,T),s(e,E),D&&D.m(e,null),s(e,I),N&&N.m(e,null)},p(M,j){j[0]&131072&&r!==(r=Math.floor(M[17].totalMinutes/60)+"")&&K(c,r),j[0]&131072&&p!==(p=M[17].totalMinutes%60+"")&&K(h,p),j[0]&131072&&g!==(g=M[17].totalEntries+"")&&K(b,g),M[17].byDay&&M[17].byDay.length>0?D?D.p(M,j):(D=vr(M),D.c(),D.m(e,I)):D&&(D.d(1),D=null),M[17].byNode&&M[17].byNode.length>0?N?N.p(M,j):(N=_r(M),N.c(),N.m(e,null)):N&&(N.d(1),N=null)},d(M){M&&w(e),D&&D.d(),N&&N.d()}}}function vr(n){let e,t,l,i=ue(n[17].byDay),a=[];for(let r=0;r<i.length;r+=1)a[r]=mr(Ts(n,i,r));return{c(){e=f("div"),t=f("div"),t.textContent=`${v("journal.byDay")}`,l=_();for(let r=0;r<a.length;r+=1)a[r].c();o(t,"class","summary-label svelte-1iuenvo"),o(e,"class","summary-section svelte-1iuenvo")},m(r,c){C(r,e,c),s(e,t),s(e,l);for(let u=0;u<a.length;u+=1)a[u]&&a[u].m(e,null)},p(r,c){if(c[0]&131072){i=ue(r[17].byDay);let u;for(u=0;u<i.length;u+=1){const p=Ts(r,i,u);a[u]?a[u].p(p,c):(a[u]=mr(p),a[u].c(),a[u].m(e,null))}for(;u<a.length;u+=1)a[u].d(1);a.length=i.length}},d(r){r&&w(e),Re(a,r)}}}function mr(n){let e,t,l=n[514].label+"",i,a,r=Math.floor(n[514].minutes/60)+"",c,u,p=n[514].minutes%60+"",h,m,g,b=n[514].count+"",k;return{c(){e=f("div"),t=f("span"),i=z(l),a=f("span"),c=z(r),u=z("ч "),h=z(p),m=z("м"),g=f("span"),k=z(b),o(t,"class","svelte-1iuenvo"),o(a,"class","svelte-1iuenvo"),o(g,"class","summary-count svelte-1iuenvo"),o(e,"class","summary-row svelte-1iuenvo")},m(y,S){C(y,e,S),s(e,t),s(t,i),s(e,a),s(a,c),s(a,u),s(a,h),s(a,m),s(e,g),s(g,k)},p(y,S){S[0]&131072&&l!==(l=y[514].label+"")&&K(i,l),S[0]&131072&&r!==(r=Math.floor(y[514].minutes/60)+"")&&K(c,r),S[0]&131072&&p!==(p=y[514].minutes%60+"")&&K(h,p),S[0]&131072&&b!==(b=y[514].count+"")&&K(k,b)},d(y){y&&w(e)}}}function _r(n){let e,t,l,i=ue(n[17].byNode),a=[];for(let r=0;r<i.length;r+=1)a[r]=hr(Ss(n,i,r));return{c(){e=f("div"),t=f("div"),t.textContent=`${v("journal.byNode")}`,l=_();for(let r=0;r<a.length;r+=1)a[r].c();o(t,"class","summary-label svelte-1iuenvo"),o(e,"class","summary-section svelte-1iuenvo")},m(r,c){C(r,e,c),s(e,t),s(e,l);for(let u=0;u<a.length;u+=1)a[u]&&a[u].m(e,null)},p(r,c){if(c[0]&131072){i=ue(r[17].byNode);let u;for(u=0;u<i.length;u+=1){const p=Ss(r,i,u);a[u]?a[u].p(p,c):(a[u]=hr(p),a[u].c(),a[u].m(e,null))}for(;u<a.length;u+=1)a[u].d(1);a.length=i.length}},d(r){r&&w(e),Re(a,r)}}}function hr(n){let e,t,l=n[514].label+"",i,a,r=Math.floor(n[514].minutes/60)+"",c,u,p=n[514].minutes%60+"",h,m,g,b=n[514].count+"",k;return{c(){e=f("div"),t=f("span"),i=z(l),a=f("span"),c=z(r),u=z("ч "),h=z(p),m=z("м"),g=f("span"),k=z(b),o(t,"class","svelte-1iuenvo"),o(a,"class","svelte-1iuenvo"),o(g,"class","summary-count svelte-1iuenvo"),o(e,"class","summary-row svelte-1iuenvo")},m(y,S){C(y,e,S),s(e,t),s(t,i),s(e,a),s(a,c),s(a,u),s(a,h),s(a,m),s(e,g),s(g,k)},p(y,S){S[0]&131072&&l!==(l=y[514].label+"")&&K(i,l),S[0]&131072&&r!==(r=Math.floor(y[514].minutes/60)+"")&&K(c,r),S[0]&131072&&p!==(p=y[514].minutes%60+"")&&K(h,p),S[0]&131072&&b!==(b=y[514].count+"")&&K(k,b)},d(y){y&&w(e)}}}function km(n){let e,t,l,i,a,r,c,u,p,h,m,g,b,k,y,S,T,E,I,D,N,M=ue(n[16]),j=[];for(let R=0;R<M.length;R+=1)j[R]=Sr(ws(n,M,R));return{c(){e=f("div"),t=f("table"),l=f("thead"),i=f("tr"),a=f("th"),r=_(),c=f("th"),c.textContent=`${v("journal.title")}`,u=_(),p=f("th"),p.textContent=`${v("journal.node")}`,h=_(),m=f("th"),m.textContent=`${v("journal.path")}`,g=_(),b=f("th"),b.textContent=`${v("worklog.minutes")}`,k=_(),y=f("th"),y.textContent=`${v("journal.billable")}`,S=_(),T=f("th"),T.textContent=`${v("journal.approx")}`,E=_(),I=f("th"),I.textContent=`${v("common.date")}`,D=_(),N=f("tbody");for(let R=0;R<j.length;R+=1)j[R].c();o(a,"class","journal-toggle-col svelte-1iuenvo"),o(c,"class","svelte-1iuenvo"),o(p,"class","svelte-1iuenvo"),o(m,"class","svelte-1iuenvo"),o(b,"class","svelte-1iuenvo"),o(y,"class","svelte-1iuenvo"),o(T,"class","svelte-1iuenvo"),o(I,"class","svelte-1iuenvo"),o(i,"class","svelte-1iuenvo"),o(l,"class","svelte-1iuenvo"),o(N,"class","svelte-1iuenvo"),o(t,"class","journal-table svelte-1iuenvo"),o(e,"class","journal-table-wrap svelte-1iuenvo")},m(R,O){C(R,e,O),s(e,t),s(t,l),s(l,i),s(i,a),s(i,r),s(i,c),s(i,u),s(i,p),s(i,h),s(i,m),s(i,g),s(i,b),s(i,k),s(i,y),s(i,S),s(i,T),s(i,E),s(i,I),s(t,D),s(t,N);for(let H=0;H<j.length;H+=1)j[H]&&j[H].m(N,null)},p(R,O){if(O[0]&65536|O[5]&536907776|O[6]&512|O[7]&48){M=ue(R[16]);let H;for(H=0;H<M.length;H+=1){const V=ws(R,M,H);j[H]?j[H].p(V,O):(j[H]=Sr(V),j[H].c(),j[H].m(N,null))}for(;H<j.length;H+=1)j[H].d(1);j.length=M.length}},d(R){R&&w(e),Re(j,R)}}}function ym(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${v("journal.empty")}`,o(t,"class","svelte-1iuenvo"),o(e,"class","empty-state svelte-1iuenvo")},m(l,i){C(l,e,i),s(e,t)},p:ie,d(l){l&&w(e)}}}function gr(n){let e;return{c(){e=z("✓")},m(t,l){C(t,e,l)},d(t){t&&w(e)}}}function br(n){let e;return{c(){e=z("~")},m(t,l){C(t,e,l)},d(t){t&&w(e)}}}function kr(n){let e,t,l,i,a,r,c,u,p,h,m,g,b,k,y,S;function T(){return n[341](n[509])}function E(){return n[342](n[509])}let I=n[509].details&&yr(n);function D(R,O){return R[509].source==="manual"?Im:R[509].source==="suggestion"&&R[509]._events&&R[509]._events.length>0?Em:R[509].source==="suggestion"?Tm:R[509].source==="unknown"||R[509].source==="imported"?Sm:R[509]._hasEvents?Cm:wm}let N=D(n),M=N(n),j=n[509]._events&&wr(n);return{c(){e=f("tr"),t=f("td"),l=f("div"),i=f("div"),a=f("button"),a.textContent=`${v("worklog.editEntry")}`,r=_(),c=f("button"),c.textContent=`${v("worklog.deleteEntry")}`,u=_(),I&&I.c(),p=_(),h=f("div"),m=f("span"),m.textContent=`${v("worklog.source")}`,g=_(),M.c(),b=_(),j&&j.c(),k=_(),o(a,"class","btn btn-sm svelte-1iuenvo"),o(c,"class","btn btn-sm btn-danger svelte-1iuenvo"),o(i,"class","journal-detail-actions svelte-1iuenvo"),o(m,"class","journal-detail-label svelte-1iuenvo"),o(h,"class","journal-detail-section svelte-1iuenvo"),o(l,"class","journal-detail-body svelte-1iuenvo"),o(t,"colspan","8"),o(t,"class","svelte-1iuenvo"),o(e,"class","journal-row-detail svelte-1iuenvo")},m(R,O){C(R,e,O),s(e,t),s(t,l),s(l,i),s(i,a),s(i,r),s(i,c),s(l,u),I&&I.m(l,null),s(l,p),s(l,h),s(h,m),s(h,g),M.m(h,null),s(l,b),j&&j.m(l,null),s(e,k),y||(S=[A(a,"click",Te(T)),A(c,"click",Te(E))],y=!0)},p(R,O){n=R,n[509].details?I?I.p(n,O):(I=yr(n),I.c(),I.m(l,p)):I&&(I.d(1),I=null),N!==(N=D(n))&&(M.d(1),M=N(n),M&&(M.c(),M.m(h,null))),n[509]._events?j?j.p(n,O):(j=wr(n),j.c(),j.m(l,null)):j&&(j.d(1),j=null)},d(R){R&&w(e),I&&I.d(),M.d(),j&&j.d(),y=!1,ve(S)}}}function yr(n){let e,t,l,i,a=n[509].details+"",r;return{c(){e=f("div"),t=f("span"),t.textContent=`${v("worklog.details")}`,l=_(),i=f("p"),r=z(a),o(t,"class","journal-detail-label svelte-1iuenvo"),o(i,"class","svelte-1iuenvo"),o(e,"class","journal-detail-section svelte-1iuenvo")},m(c,u){C(c,e,u),s(e,t),s(e,l),s(e,i),s(i,r)},p(c,u){u[0]&65536&&a!==(a=c[509].details+"")&&K(r,a)},d(c){c&&w(e)}}}function wm(n){let e;return{c(){e=f("p"),e.textContent=`${v("worklog.sourceUnknown")}`,o(e,"class","svelte-1iuenvo")},m(t,l){C(t,e,l)},d(t){t&&w(e)}}}function Cm(n){let e;return{c(){e=f("p"),e.textContent=`${v("worklog.sourceSuggestion")}`,o(e,"class","svelte-1iuenvo")},m(t,l){C(t,e,l)},d(t){t&&w(e)}}}function Sm(n){let e;return{c(){e=f("p"),e.textContent=`${v("worklog.sourceUnknown")}`,o(e,"class","svelte-1iuenvo")},m(t,l){C(t,e,l)},d(t){t&&w(e)}}}function Tm(n){let e;return{c(){e=f("p"),e.textContent=`${v("worklog.sourceSuggestionNoEvents")}`,o(e,"class","svelte-1iuenvo")},m(t,l){C(t,e,l)},d(t){t&&w(e)}}}function Em(n){let e;return{c(){e=f("p"),e.textContent=`${v("worklog.sourceSuggestion")}`,o(e,"class","svelte-1iuenvo")},m(t,l){C(t,e,l)},d(t){t&&w(e)}}}function Im(n){let e;return{c(){e=f("p"),e.textContent=`${v("worklog.sourceManual")}`,o(e,"class","svelte-1iuenvo")},m(t,l){C(t,e,l)},d(t){t&&w(e)}}}function wr(n){let e,t,l,i=ue(n[509]._events),a=[];for(let r=0;r<i.length;r+=1)a[r]=Cr(Cs(n,i,r));return{c(){e=f("div"),t=f("span"),t.textContent=`${v("journal.relatedEvents")}`,l=_();for(let r=0;r<a.length;r+=1)a[r].c();o(t,"class","journal-detail-label svelte-1iuenvo"),o(e,"class","journal-detail-section svelte-1iuenvo")},m(r,c){C(r,e,c),s(e,t),s(e,l);for(let u=0;u<a.length;u+=1)a[u]&&a[u].m(e,null)},p(r,c){if(c[0]&65536|c[6]&512|c[7]&32){i=ue(r[509]._events);let u;for(u=0;u<i.length;u+=1){const p=Cs(r,i,u);a[u]?a[u].p(p,c):(a[u]=Cr(p),a[u].c(),a[u].m(e,null))}for(;u<a.length;u+=1)a[u].d(1);a.length=i.length}},d(r){r&&w(e),Re(a,r)}}}function Cr(n){let e,t,l=wt(n[486].createdAt)+"",i,a,r,c=n[195](n[486].eventType)+"",u,p,h,m=n[486].title+"",g,b,k,y,S,T;function E(){return n[343](n[486])}return{c(){e=f("div"),t=f("span"),i=z(l),a=_(),r=f("span"),u=z(c),p=_(),h=f("span"),g=z(m),b=_(),k=f("button"),k.textContent=`${v("common.open")}`,y=_(),o(t,"class","journal-event-time svelte-1iuenvo"),o(r,"class","journal-event-type svelte-1iuenvo"),o(h,"class","journal-event-title svelte-1iuenvo"),o(k,"class","link-btn svelte-1iuenvo"),o(e,"class","journal-event-row svelte-1iuenvo")},m(I,D){C(I,e,D),s(e,t),s(t,i),s(e,a),s(e,r),s(r,u),s(e,p),s(e,h),s(h,g),s(e,b),s(e,k),s(e,y),S||(T=A(k,"click",E),S=!0)},p(I,D){n=I,D[0]&65536&&l!==(l=wt(n[486].createdAt)+"")&&K(i,l),D[0]&65536&&c!==(c=n[195](n[486].eventType)+"")&&K(u,c),D[0]&65536&&m!==(m=n[486].title+"")&&K(g,m)},d(I){I&&w(e),S=!1,T()}}}function Sr(n){let e,t,l,i=n[509]._expanded?"▾":"▸",a,r,c,u=n[509].summary+"",p,h,m,g,b=n[509].nodeTitle+"",k,y,S,T=n[509].nodePath+"",E,I,D,N=n[509].minutes+"",M,j,R,O,H,V,G,U=n[509].date+"",q,Y,B,F,W;function P(){return n[338](n[509])}let J=n[509].billable&&gr(),Q=n[509].approximate&&br();function ee(){return n[339](n[509])}function te(...se){return n[340](n[509],...se)}let le=n[509]._expanded&&kr(n);return{c(){e=f("tr"),t=f("td"),l=f("span"),a=z(i),r=_(),c=f("td"),p=z(u),h=_(),m=f("td"),g=f("button"),k=z(b),y=_(),S=f("td"),E=z(T),I=_(),D=f("td"),M=z(N),j=_(),R=f("td"),J&&J.c(),O=_(),H=f("td"),Q&&Q.c(),V=_(),G=f("td"),q=z(U),Y=_(),le&&le.c(),B=ht(),o(l,"class","journal-toggle-icon svelte-1iuenvo"),o(t,"class","journal-toggle-col svelte-1iuenvo"),o(c,"class","journal-summary-cell svelte-1iuenvo"),o(g,"class","link-btn svelte-1iuenvo"),o(m,"class","svelte-1iuenvo"),o(S,"class","journal-path-cell svelte-1iuenvo"),o(D,"class","journal-min-cell svelte-1iuenvo"),o(R,"class","journal-bool-cell svelte-1iuenvo"),o(H,"class","journal-bool-cell svelte-1iuenvo"),o(G,"class","journal-date-cell svelte-1iuenvo"),o(e,"class","journal-row svelte-1iuenvo"),o(e,"role","button"),o(e,"tabindex","0"),ae(e,"expanded",n[509]._expanded)},m(se,ce){C(se,e,ce),s(e,t),s(t,l),s(l,a),s(e,r),s(e,c),s(c,p),s(e,h),s(e,m),s(m,g),s(g,k),s(e,y),s(e,S),s(S,E),s(e,I),s(e,D),s(D,M),s(e,j),s(e,R),J&&J.m(R,null),s(e,O),s(e,H),Q&&Q.m(H,null),s(e,V),s(e,G),s(G,q),C(se,Y,ce),le&&le.m(se,ce),C(se,B,ce),F||(W=[A(g,"click",Te(P)),A(e,"click",ee),A(e,"keydown",te)],F=!0)},p(se,ce){n=se,ce[0]&65536&&i!==(i=n[509]._expanded?"▾":"▸")&&K(a,i),ce[0]&65536&&u!==(u=n[509].summary+"")&&K(p,u),ce[0]&65536&&b!==(b=n[509].nodeTitle+"")&&K(k,b),ce[0]&65536&&T!==(T=n[509].nodePath+"")&&K(E,T),ce[0]&65536&&N!==(N=n[509].minutes+"")&&K(M,N),n[509].billable?J||(J=gr(),J.c(),J.m(R,null)):J&&(J.d(1),J=null),n[509].approximate?Q||(Q=br(),Q.c(),Q.m(H,null)):Q&&(Q.d(1),Q=null),ce[0]&65536&&U!==(U=n[509].date+"")&&K(q,U),ce[0]&65536&&ae(e,"expanded",n[509]._expanded),n[509]._expanded?le?le.p(n,ce):(le=kr(n),le.c(),le.m(B.parentNode,B)):le&&(le.d(1),le=null)},d(se){se&&(w(e),w(Y),w(B)),J&&J.d(),Q&&Q.d(),le&&le.d(se),F=!1,ve(W)}}}function Tr(n){let e,t,l=et("restore",14)+"",i,a=v("trash.restore")+"",r,c,u=n[62].length+"",p,h,m,g,b,k=et("purge",14)+"",y,S=v("common.delete")+"",T,E,I=n[62].length+"",D,N,M,j;return{c(){e=f("button"),t=new Vl(!1),i=_(),r=z(a),c=z(" ("),p=z(u),h=z(")"),m=_(),g=f("button"),b=new Vl(!1),y=_(),T=z(S),E=z(" ("),D=z(I),N=z(")"),t.a=i,o(e,"class","btn btn-sm btn-primary svelte-1iuenvo"),b.a=y,o(g,"class","btn btn-sm btn-danger svelte-1iuenvo")},m(R,O){C(R,e,O),t.m(l,e),s(e,i),s(e,r),s(e,c),s(e,p),s(e,h),C(R,m,O),C(R,g,O),b.m(k,g),s(g,y),s(g,T),s(g,E),s(g,D),s(g,N),M||(j=[A(e,"click",n[310]),A(g,"click",n[311])],M=!0)},p(R,O){O[2]&1&&u!==(u=R[62].length+"")&&K(p,u),O[2]&1&&I!==(I=R[62].length+"")&&K(D,I)},d(R){R&&(w(e),w(m),w(g)),M=!1,ve(j)}}}function Nm(n){let e,t,l,i,a,r,c,u,p,h,m,g=n[5]&&Er(n);function b(S,T){return S[63].length===0?jm:Mm}let k=b(n),y=k(n);return{c(){e=f("div"),t=f("section"),l=f("div"),g&&g.c(),i=_(),a=f("div"),r=f("h3"),c=z(n[65]),u=_(),p=f("p"),h=z(n[64]),m=_(),y.c(),o(r,"class","svelte-1iuenvo"),o(p,"class","svelte-1iuenvo"),o(a,"class","svelte-1iuenvo"),o(l,"class","trash-section-head svelte-1iuenvo"),o(t,"class","trash-section svelte-1iuenvo"),o(e,"class","trash-browser svelte-1iuenvo")},m(S,T){C(S,e,T),s(e,t),s(t,l),g&&g.m(l,null),s(l,i),s(l,a),s(a,r),s(r,c),s(a,u),s(a,p),s(p,h),s(t,m),y.m(t,null)},p(S,T){S[5]?g?g.p(S,T):(g=Er(S),g.c(),g.m(l,i)):g&&(g.d(1),g=null),T[2]&8&&K(c,S[65]),T[2]&4&&K(h,S[64]),k===(k=b(S))&&y?y.p(S,T):(y.d(1),y=k(S),y&&(y.c(),y.m(t,null)))},d(S){S&&w(e),g&&g.d(),y.d()}}}function Dm(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${v("trash.empty")}`,o(t,"class","svelte-1iuenvo"),o(e,"class","empty-state svelte-1iuenvo")},m(l,i){C(l,e,i),s(e,t)},p:ie,d(l){l&&w(e)}}}function Er(n){let e,t=et("back")+"",l,i;return{c(){e=f("button"),o(e,"class","inbox-icon-btn svelte-1iuenvo"),o(e,"title",v("common.backLabel")),o(e,"aria-label",v("common.backLabel"))},m(a,r){C(a,e,r),e.innerHTML=t,l||(i=A(e,"click",n[172]),l=!0)},p:ie,d(a){a&&w(e),l=!1,i()}}}function Mm(n){let e,t=ue(n[63]),l=[];for(let i=0;i<t.length;i+=1)l[i]=Nr(Ds(n,t,i));return{c(){for(let i=0;i<l.length;i+=1)l[i].c();e=ht()},m(i,a){for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(i,a);C(i,e,a)},p(i,a){if(a[2]&3|a[5]&3997696|a[6]&1024){t=ue(i[63]);let r;for(r=0;r<t.length;r+=1){const c=Ds(i,t,r);l[r]?l[r].p(c,a):(l[r]=Nr(c),l[r].c(),l[r].m(e.parentNode,e))}for(;r<l.length;r+=1)l[r].d(1);l.length=t.length}},d(i){i&&w(e),Re(l,i)}}}function jm(n){let e;return{c(){e=f("p"),e.textContent=`${v("common.empty")}`,o(e,"class","trash-empty-line svelte-1iuenvo")},m(t,l){C(t,e,l)},p:ie,d(t){t&&w(e)}}}function Ir(n){let e,t=n[506].fsPath+"",l;return{c(){e=f("span"),l=z(t),o(e,"class","trash-row-path svelte-1iuenvo")},m(i,a){C(i,e,a),s(e,l)},p(i,a){a[2]&2&&t!==(t=i[506].fsPath+"")&&K(l,t)},d(i){i&&w(e)}}}function Am(n){let e;return{c(){e=f("span"),o(e,"class","inbox-icon-slot svelte-1iuenvo"),o(e,"aria-hidden","true")},m(t,l){C(t,e,l)},p:ie,d(t){t&&w(e)}}}function Lm(n){let e,t=et("open")+"",l,i;function a(){return n[314](n[506])}return{c(){e=f("button"),o(e,"class","inbox-icon-btn svelte-1iuenvo"),o(e,"title",v("common.open")),o(e,"aria-label",v("common.open"))},m(r,c){C(r,e,c),e.innerHTML=t,l||(i=A(e,"click",a),l=!0)},p(r,c){n=r},d(r){r&&w(e),l=!1,i()}}}function Nr(n){let e,t,l,i,a,r=et(n[506].type!=="file"&&n[506].type!=="note"?"folder":"open")+"",c,u,p,h=n[506].title+"",m,g,b,k=(n[506].nodePath||n[196](n[506].type))+"",y,S,T,E=bt(n[506].deletedAt)+"",I,D,N,M,j,R,O=et("restore")+"",H,V,G=et("purge")+"",U,q,Y;function B(){return n[313](n[506])}let F=n[506].fsPath&&Ir(n);function W(te,le){return te[506].type!=="file"&&te[506].type!=="note"?Lm:Am}let P=W(n),J=P(n);function Q(){return n[315](n[506])}function ee(){return n[316](n[506])}return{c(){e=f("div"),t=f("input"),i=_(),a=f("span"),c=_(),u=f("div"),p=f("span"),m=z(h),g=_(),b=f("span"),y=z(k),S=_(),T=f("span"),I=z(E),D=_(),F&&F.c(),N=_(),M=f("div"),J.c(),j=_(),R=f("button"),H=_(),V=f("button"),U=_(),o(t,"type","checkbox"),t.checked=l=n[62].includes(n[506].id),o(t,"class","svelte-1iuenvo"),o(a,"class","trash-row-icon svelte-1iuenvo"),o(a,"aria-hidden","true"),o(p,"class","trash-row-title svelte-1iuenvo"),o(b,"class","trash-row-meta svelte-1iuenvo"),o(T,"class","trash-row-meta svelte-1iuenvo"),o(u,"class","trash-row-main svelte-1iuenvo"),o(R,"class","inbox-icon-btn inbox-icon-btn-primary svelte-1iuenvo"),o(R,"title",v("trash.restore")),o(R,"aria-label",v("trash.restore")),o(V,"class","inbox-icon-btn inbox-icon-btn-danger svelte-1iuenvo"),o(V,"title",v("common.delete")),o(V,"aria-label",v("common.delete")),o(M,"class","trash-row-actions svelte-1iuenvo"),o(e,"class","trash-row svelte-1iuenvo"),ae(e,"selected",n[62].includes(n[506].id)),ae(e,"folder",n[506].type!=="file"&&n[506].type!=="note")},m(te,le){C(te,e,le),s(e,t),s(e,i),s(e,a),a.innerHTML=r,s(e,c),s(e,u),s(u,p),s(p,m),s(u,g),s(u,b),s(b,y),s(u,S),s(u,T),s(T,I),s(e,D),F&&F.m(e,null),s(e,N),s(e,M),J.m(M,null),s(M,j),s(M,R),R.innerHTML=O,s(M,H),s(M,V),V.innerHTML=G,s(e,U),q||(Y=[A(t,"change",B),A(R,"click",Q),A(V,"click",ee)],q=!0)},p(te,le){n=te,le[2]&3&&l!==(l=n[62].includes(n[506].id))&&(t.checked=l),le[2]&2&&r!==(r=et(n[506].type!=="file"&&n[506].type!=="note"?"folder":"open")+"")&&(a.innerHTML=r),le[2]&2&&h!==(h=n[506].title+"")&&K(m,h),le[2]&2&&k!==(k=(n[506].nodePath||n[196](n[506].type))+"")&&K(y,k),le[2]&2&&E!==(E=bt(n[506].deletedAt)+"")&&K(I,E),n[506].fsPath?F?F.p(n,le):(F=Ir(n),F.c(),F.m(e,N)):F&&(F.d(1),F=null),P===(P=W(n))&&J?J.p(n,le):(J.d(1),J=P(n),J&&(J.c(),J.m(M,j))),le[2]&3&&ae(e,"selected",n[62].includes(n[506].id)),le[2]&2&&ae(e,"folder",n[506].type!=="file"&&n[506].type!=="note")},d(te){te&&w(e),F&&F.d(),J.d(),q=!1,ve(Y)}}}function Dr(n){let e,t;return{c(){e=f("span"),t=z(n[54]),o(e,"class","inbox-capture-status svelte-1iuenvo")},m(l,i){C(l,e,i),s(e,t)},p(l,i){i[1]&8388608&&K(t,l[54])},d(l){l&&w(e)}}}function Mr(n){let e,t,l,i,a,r,c,u,p,h=n[2]==="asc"?"↑":"↓",m,g,b,k,y,S,T,E,I,D;return{c(){e=f("div"),t=f("div"),l=f("button"),l.textContent=`${v("inbox.sortByDate")}`,i=_(),a=f("button"),a.textContent=`${v("inbox.sortByName")}`,r=_(),c=f("button"),c.textContent=`${v("inbox.sortByType")}`,u=_(),p=f("span"),m=z(h),g=_(),b=f("span"),k=_(),y=f("label"),S=f("input"),T=_(),E=f("span"),E.textContent=`${v("inbox.groupByContext")}`,o(l,"class","sort-btn svelte-1iuenvo"),ae(l,"active",n[1]==="date"),o(a,"class","sort-btn svelte-1iuenvo"),ae(a,"active",n[1]==="name"),o(c,"class","sort-btn svelte-1iuenvo"),ae(c,"active",n[1]==="type"),o(p,"class","sort-dir svelte-1iuenvo"),o(b,"class","inbox-controls-divider svelte-1iuenvo"),o(S,"type","checkbox"),o(S,"class","svelte-1iuenvo"),o(E,"class","svelte-1iuenvo"),o(y,"class","checkbox-label-inline svelte-1iuenvo"),o(t,"class","inbox-sort-row svelte-1iuenvo"),o(e,"class","inbox-controls svelte-1iuenvo")},m(N,M){C(N,e,M),s(e,t),s(t,l),s(t,i),s(t,a),s(t,r),s(t,c),s(t,u),s(t,p),s(p,m),s(t,g),s(t,b),s(t,k),s(t,y),s(y,S),S.checked=n[3],s(y,T),s(y,E),I||(D=[A(l,"click",n[292]),A(a,"click",n[293]),A(c,"click",n[294]),A(S,"change",n[295])],I=!0)},p(N,M){M[0]&2&&ae(l,"active",N[1]==="date"),M[0]&2&&ae(a,"active",N[1]==="name"),M[0]&2&&ae(c,"active",N[1]==="type"),M[0]&4&&h!==(h=N[2]==="asc"?"↑":"↓")&&K(m,h),M[0]&8&&(S.checked=N[3])},d(N){N&&w(e),I=!1,ve(D)}}}function Pm(n){let e,t=ue(n[6]),l=[];for(let i=0;i<t.length;i+=1)l[i]=jr(Ms(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();o(e,"class","inbox-list svelte-1iuenvo")},m(i,a){C(i,e,a);for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(e,null)},p(i,a){if(a[0]&64|a[5]&12|a[6]&12718080){t=ue(i[6]);let r;for(r=0;r<t.length;r+=1){const c=Ms(i,t,r);l[r]?l[r].p(c,a):(l[r]=jr(c),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=t.length}},d(i){i&&w(e),Re(l,i)}}}function Fm(n){let e,t=ue(n[114]),l=[];for(let i=0;i<t.length;i+=1)l[i]=Lr(js(n,t,i));return{c(){for(let i=0;i<l.length;i+=1)l[i].c();e=ht()},m(i,a){for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(i,a);C(i,e,a)},p(i,a){if(a[3]&2097152|a[5]&12|a[6]&12718080){t=ue(i[114]);let r;for(r=0;r<t.length;r+=1){const c=js(i,t,r);l[r]?l[r].p(c,a):(l[r]=Lr(c),l[r].c(),l[r].m(e.parentNode,e))}for(;r<l.length;r+=1)l[r].d(1);l.length=t.length}},d(i){i&&w(e),Re(l,i)}}}function Rm(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${v("inbox.empty")}`,o(t,"class","svelte-1iuenvo"),o(e,"class","empty-state svelte-1iuenvo")},m(l,i){C(l,e,i),s(e,t)},p:ie,d(l){l&&w(e)}}}function Om(n){let e;return{c(){e=f("span"),o(e,"class","inbox-icon-slot svelte-1iuenvo"),o(e,"aria-hidden","true")},m(t,l){C(t,e,l)},p:ie,d(t){t&&w(e)}}}function zm(n){let e,t=et("attach")+"",l,i;function a(){return n[303](n[473])}return{c(){e=f("button"),o(e,"class","inbox-icon-btn inbox-icon-btn-primary svelte-1iuenvo"),o(e,"title",v("inbox.keepHere")),o(e,"aria-label",v("inbox.keepHere"))},m(r,c){C(r,e,c),e.innerHTML=t,l||(i=A(e,"click",Te(a)),l=!0)},p(r,c){n=r},d(r){r&&w(e),l=!1,i()}}}function Hm(n){let e;return{c(){e=f("span"),o(e,"class","inbox-icon-slot svelte-1iuenvo"),o(e,"aria-hidden","true")},m(t,l){C(t,e,l)},p:ie,d(t){t&&w(e)}}}function Bm(n){let e,t=et("showInExplorer")+"",l,i;function a(){return n[306](n[473])}return{c(){e=f("button"),o(e,"class","inbox-icon-btn svelte-1iuenvo"),o(e,"title",v("file.showInExplorer")),o(e,"aria-label",v("file.showInExplorer"))},m(r,c){C(r,e,c),e.innerHTML=t,l||(i=A(e,"click",Te(a)),l=!0)},p(r,c){n=r},d(r){r&&w(e),l=!1,i()}}}function jr(n){let e,t,l,i=n[473].title+"",a,r,c,u=n[198](n[473])+"",p,h,m,g,b,k=et("move")+"",y,S,T=et("open")+"",E,I,D,N,M=et("delete")+"",j,R,O;function H(Q,ee){return Q[473].suggestedTargetNodeId?zm:Om}let V=H(n),G=V(n);function U(){return n[304](n[473])}function q(){return n[305](n[473])}function Y(Q,ee){return ee[0]&64&&(I=null),I==null&&(I=!!Xl(Q[473])),I?Bm:Hm}let B=Y(n,[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]),F=B(n);function W(){return n[307](n[473])}function P(){return n[308](n[473])}function J(...Q){return n[309](n[473],...Q)}return{c(){e=f("div"),t=f("div"),l=f("span"),a=z(i),r=_(),c=f("span"),p=z(u),h=_(),m=f("div"),G.c(),g=_(),b=f("button"),y=_(),S=f("button"),E=_(),F.c(),D=_(),N=f("button"),j=_(),o(l,"class","inbox-item-title svelte-1iuenvo"),o(c,"class","inbox-item-meta svelte-1iuenvo"),o(t,"class","inbox-item-main svelte-1iuenvo"),o(b,"class","inbox-icon-btn svelte-1iuenvo"),o(b,"title",v("inbox.assign")),o(b,"aria-label",v("inbox.assign")),o(S,"class","inbox-icon-btn svelte-1iuenvo"),o(S,"title",v("common.open")),o(S,"aria-label",v("common.open")),o(N,"class","inbox-icon-btn inbox-icon-btn-danger svelte-1iuenvo"),o(N,"title",v("common.delete")),o(N,"aria-label",v("common.delete")),o(m,"class","inbox-item-actions svelte-1iuenvo"),o(e,"class","inbox-item svelte-1iuenvo"),o(e,"role","button"),o(e,"tabindex","0")},m(Q,ee){C(Q,e,ee),s(e,t),s(t,l),s(l,a),s(t,r),s(t,c),s(c,p),s(e,h),s(e,m),G.m(m,null),s(m,g),s(m,b),b.innerHTML=k,s(m,y),s(m,S),S.innerHTML=T,s(m,E),F.m(m,null),s(m,D),s(m,N),N.innerHTML=M,s(e,j),R||(O=[A(b,"click",Te(U)),A(S,"click",Te(q)),A(N,"click",Te(W)),A(e,"click",P),A(e,"keydown",J)],R=!0)},p(Q,ee){n=Q,ee[0]&64&&i!==(i=n[473].title+"")&&K(a,i),ee[0]&64&&u!==(u=n[198](n[473])+"")&&K(p,u),V===(V=H(n))&&G?G.p(n,ee):(G.d(1),G=V(n),G&&(G.c(),G.m(m,g))),B===(B=Y(n,ee))&&F?F.p(n,ee):(F.d(1),F=B(n),F&&(F.c(),F.m(m,D)))},d(Q){Q&&w(e),G.d(),F.d(),R=!1,ve(O)}}}function Wm(n){let e;return{c(){e=f("span"),o(e,"class","inbox-icon-slot svelte-1iuenvo"),o(e,"aria-hidden","true")},m(t,l){C(t,e,l)},p:ie,d(t){t&&w(e)}}}function Vm(n){let e,t=et("attach")+"",l,i;function a(){return n[296](n[473])}return{c(){e=f("button"),o(e,"class","inbox-icon-btn inbox-icon-btn-primary svelte-1iuenvo"),o(e,"title",v("inbox.keepHere")),o(e,"aria-label",v("inbox.keepHere"))},m(r,c){C(r,e,c),e.innerHTML=t,l||(i=A(e,"click",Te(a)),l=!0)},p(r,c){n=r},d(r){r&&w(e),l=!1,i()}}}function Um(n){let e;return{c(){e=f("span"),o(e,"class","inbox-icon-slot svelte-1iuenvo"),o(e,"aria-hidden","true")},m(t,l){C(t,e,l)},p:ie,d(t){t&&w(e)}}}function Km(n){let e,t=et("showInExplorer")+"",l,i;function a(){return n[299](n[473])}return{c(){e=f("button"),o(e,"class","inbox-icon-btn svelte-1iuenvo"),o(e,"title",v("file.showInExplorer")),o(e,"aria-label",v("file.showInExplorer"))},m(r,c){C(r,e,c),e.innerHTML=t,l||(i=A(e,"click",Te(a)),l=!0)},p(r,c){n=r},d(r){r&&w(e),l=!1,i()}}}function Ar(n){let e,t,l,i=n[473].title+"",a,r,c,u=n[198](n[473])+"",p,h,m,g,b,k=et("move")+"",y,S,T=et("open")+"",E,I,D,N,M=et("delete")+"",j,R,O;function H(Q,ee){return Q[473].suggestedTargetNodeId?Vm:Wm}let V=H(n),G=V(n);function U(){return n[297](n[473])}function q(){return n[298](n[473])}function Y(Q,ee){return ee[3]&2097152&&(I=null),I==null&&(I=!!Xl(Q[473])),I?Km:Um}let B=Y(n,[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]),F=B(n);function W(){return n[300](n[473])}function P(){return n[301](n[473])}function J(...Q){return n[302](n[473],...Q)}return{c(){e=f("div"),t=f("div"),l=f("span"),a=z(i),r=_(),c=f("span"),p=z(u),h=_(),m=f("div"),G.c(),g=_(),b=f("button"),y=_(),S=f("button"),E=_(),F.c(),D=_(),N=f("button"),j=_(),o(l,"class","inbox-item-title svelte-1iuenvo"),o(c,"class","inbox-item-meta svelte-1iuenvo"),o(t,"class","inbox-item-main svelte-1iuenvo"),o(b,"class","inbox-icon-btn svelte-1iuenvo"),o(b,"title",v("inbox.assign")),o(b,"aria-label",v("inbox.assign")),o(S,"class","inbox-icon-btn svelte-1iuenvo"),o(S,"title",v("common.open")),o(S,"aria-label",v("common.open")),o(N,"class","inbox-icon-btn inbox-icon-btn-danger svelte-1iuenvo"),o(N,"title",v("common.delete")),o(N,"aria-label",v("common.delete")),o(m,"class","inbox-item-actions svelte-1iuenvo"),o(e,"class","inbox-item svelte-1iuenvo"),o(e,"role","button"),o(e,"tabindex","0")},m(Q,ee){C(Q,e,ee),s(e,t),s(t,l),s(l,a),s(t,r),s(t,c),s(c,p),s(e,h),s(e,m),G.m(m,null),s(m,g),s(m,b),b.innerHTML=k,s(m,y),s(m,S),S.innerHTML=T,s(m,E),F.m(m,null),s(m,D),s(m,N),N.innerHTML=M,s(e,j),R||(O=[A(b,"click",Te(U)),A(S,"click",Te(q)),A(N,"click",Te(W)),A(e,"click",P),A(e,"keydown",J)],R=!0)},p(Q,ee){n=Q,ee[3]&2097152&&i!==(i=n[473].title+"")&&K(a,i),ee[3]&2097152&&u!==(u=n[198](n[473])+"")&&K(p,u),V===(V=H(n))&&G?G.p(n,ee):(G.d(1),G=V(n),G&&(G.c(),G.m(m,g))),B===(B=Y(n,ee))&&F?F.p(n,ee):(F.d(1),F=B(n),F&&(F.c(),F.m(m,D)))},d(Q){Q&&w(e),G.d(),F.d(),R=!1,ve(O)}}}function Lr(n){let e,t,l=n[499].label+"",i,a,r,c=n[499].items.length+"",u,p,h,m,g=ue(n[499].items),b=[];for(let k=0;k<g.length;k+=1)b[k]=Ar(As(n,g,k));return{c(){e=f("div"),t=f("div"),i=z(l),a=_(),r=f("span"),u=z(c),p=_(),h=f("div");for(let k=0;k<b.length;k+=1)b[k].c();m=_(),o(r,"class","inbox-group-count svelte-1iuenvo"),o(t,"class","inbox-group-header svelte-1iuenvo"),o(h,"class","inbox-list svelte-1iuenvo"),o(e,"class","inbox-group svelte-1iuenvo")},m(k,y){C(k,e,y),s(e,t),s(t,i),s(t,a),s(t,r),s(r,u),s(e,p),s(e,h);for(let S=0;S<b.length;S+=1)b[S]&&b[S].m(h,null);s(e,m)},p(k,y){if(y[3]&2097152&&l!==(l=k[499].label+"")&&K(i,l),y[3]&2097152&&c!==(c=k[499].items.length+"")&&K(u,c),y[3]&2097152|y[5]&12|y[6]&12718080){g=ue(k[499].items);let S;for(S=0;S<g.length;S+=1){const T=As(k,g,S);b[S]?b[S].p(T,y):(b[S]=Ar(T),b[S].c(),b[S].m(h,null))}for(;S<b.length;S+=1)b[S].d(1);b.length=g.length}},d(k){k&&w(e),Re(b,k)}}}function Gm(n){let e;return{c(){e=f("span"),o(e,"class","tab-separator svelte-1iuenvo"),o(e,"aria-hidden","true")},m(t,l){C(t,e,l)},d(t){t&&w(e)}}}function Pr(n){let e,t,l,i,a=n[496].id==="activity"&&Gm();function r(){return n[239](n[496])}return{c(){a&&a.c(),e=_(),t=f("button"),t.textContent=`${n[496].label}`,o(t,"class","tab svelte-1iuenvo"),ae(t,"active",n[34]===n[496].id)},m(c,u){a&&a.m(c,u),C(c,e,u),C(c,t,u),l||(i=A(t,"click",r),l=!0)},p(c,u){n=c,u[1]&8|u[3]&16777216&&ae(t,"active",n[34]===n[496].id)},d(c){c&&(w(e),w(t)),a&&a.d(c),l=!1,i()}}}function Jm(n){let e;function t(a,r){return a[29].length===0?t_:e_}let l=t(n),i=l(n);return{c(){e=f("div"),i.c(),o(e,"class","activity-tab svelte-1iuenvo")},m(a,r){C(a,e,r),i.m(e,null)},p(a,r){l===(l=t(a))&&i?i.p(a,r):(i.d(1),i=l(a),i&&(i.c(),i.m(e,null)))},i:ie,o:ie,d(a){a&&w(e),i.d()}}}function qm(n){let e,t,l,i,a=n[33]&&n[48].filter(n[231]).length>0,r,c,u,p=a&&zr(n);function h(b,k){return b[38].length===0?l_:n_}let m=h(n),g=m(n);return{c(){e=f("div"),t=f("div"),l=f("button"),l.textContent=`+ ${v("worklog.addEntry")}`,i=_(),p&&p.c(),r=_(),g.c(),o(l,"class","btn btn-primary btn-sm svelte-1iuenvo"),o(t,"class","worklog-toolbar svelte-1iuenvo"),o(e,"class","worklog-tab svelte-1iuenvo")},m(b,k){C(b,e,k),s(e,t),s(t,l),s(e,i),p&&p.m(e,null),s(e,r),g.m(e,null),c||(u=A(l,"click",n[275]),c=!0)},p(b,k){k[1]&131076&&(a=b[33]&&b[48].filter(b[231]).length>0),a?p?p.p(b,k):(p=zr(b),p.c(),p.m(e,r)):p&&(p.d(1),p=null),m===(m=h(b))&&g?g.p(b,k):(g.d(1),g=m(b),g&&(g.c(),g.m(e,null)))},i:ie,o:ie,d(b){b&&w(e),p&&p.d(),g.d(),c=!1,u()}}}function Ym(n){let e,t,l,i,a,r;function c(h,m){return h[37].length===0?u_:c_}let u=c(n),p=u(n);return{c(){e=f("div"),t=f("div"),l=f("button"),l.textContent=`${v("action.addAction")}`,i=_(),p.c(),o(l,"class","btn btn-primary svelte-1iuenvo"),o(t,"class","tab-toolbar svelte-1iuenvo"),o(e,"class","actions-tab svelte-1iuenvo")},m(h,m){C(h,e,m),s(e,t),s(t,l),s(e,i),p.m(e,null),a||(r=A(l,"click",n[216]),a=!0)},p(h,m){u===(u=c(h))&&p?p.p(h,m):(p.d(1),p=u(h),p&&(p.c(),p.m(e,null)))},i:ie,o:ie,d(h){h&&w(e),p.d(),a=!1,r()}}}function Qm(n){let e,t;function l(c,u){return c[55].length===0?d_:f_}let i=l(n),a=i(n),r=n[60]&&la(n);return{c(){e=f("div"),a.c(),t=_(),r&&r.c(),o(e,"class","links-tab svelte-1iuenvo")},m(c,u){C(c,e,u),a.m(e,null),s(e,t),r&&r.m(e,null)},p(c,u){i===(i=l(c))&&a?a.p(c,u):(a.d(1),a=i(c),a&&(a.c(),a.m(e,t))),c[60]?r?r.p(c,u):(r=la(c),r.c(),r.m(e,null)):r&&(r.d(1),r=null)},i:ie,o:ie,d(c){c&&w(e),a.d(),r&&r.d()}}}function Xm(n){let e;function t(a,r){return a[52].length===0?v_:p_}let l=t(n),i=l(n);return{c(){e=f("div"),i.c(),o(e,"class","inbox-tab svelte-1iuenvo")},m(a,r){C(a,e,r),i.m(e,null)},p(a,r){l===(l=t(a))&&i?i.p(a,r):(i.d(1),i=l(a),i&&(i.c(),i.m(e,null)))},i:ie,o:ie,d(a){a&&w(e),i.d()}}}function Zm(n){let e,t,l,i=v("file.addFile")+"",a,r,c,u=v("file.addFolder")+"",p,h,m,g,b,k,y,S,T,E,I,D=n[90].items.length>0&&oa(n);const N=[g_,h_],M=[];function j(O,H){return O[82]?0:1}k=j(n),y=M[k]=N[k](n);let R=n[78]&&!n[80]&&ra();return{c(){e=f("div"),t=f("div"),l=f("button"),a=z(i),r=_(),c=f("button"),p=z(u),h=_(),m=f("button"),m.textContent=`${v("file.newFile")}`,g=_(),D&&D.c(),b=_(),y.c(),S=_(),R&&R.c(),o(l,"class","btn btn-primary svelte-1iuenvo"),l.disabled=n[78],o(c,"class","btn svelte-1iuenvo"),c.disabled=n[78],o(m,"class","btn svelte-1iuenvo"),o(t,"class","tab-toolbar svelte-1iuenvo"),o(e,"class","files-tab svelte-1iuenvo")},m(O,H){C(O,e,H),s(e,t),s(t,l),s(l,a),s(t,r),s(t,c),s(c,p),s(t,h),s(t,m),s(t,g),D&&D.m(t,null),s(e,b),M[k].m(e,null),s(e,S),R&&R.m(e,null),T=!0,E||(I=[A(l,"click",n[190]),A(c,"click",n[191]),A(m,"click",n[127])],E=!0)},p(O,H){(!T||H[2]&65536)&&(l.disabled=O[78]),(!T||H[2]&65536)&&(c.disabled=O[78]),O[90].items.length>0?D?D.p(O,H):(D=oa(O),D.c(),D.m(t,null)):D&&(D.d(1),D=null);let V=k;k=j(O),k===V?M[k].p(O,H):(ut(),ge(M[V],1,1,()=>{M[V]=null}),ft(),y=M[k],y?y.p(O,H):(y=M[k]=N[k](O),y.c()),pe(y,1),y.m(e,S)),O[78]&&!O[80]?R||(R=ra(),R.c(),R.m(e,null)):R&&(R.d(1),R=null)},i(O){T||(pe(y),T=!0)},o(O){ge(y),T=!1},d(O){O&&w(e),D&&D.d(),M[k].d(),R&&R.d(),E=!1,ve(I)}}}function xm(n){let e,t,l,i,a,r,c,u=n[71]&&aa(n);function p(g,b){return g[35].length===0&&!g[71]?S_:C_}let h=p(n),m=h(n);return{c(){e=f("div"),t=f("div"),l=f("button"),l.textContent=`${v("note.add")}`,i=_(),u&&u.c(),a=_(),m.c(),o(l,"class","btn btn-primary svelte-1iuenvo"),o(t,"class","tab-toolbar svelte-1iuenvo"),o(e,"class","notes-tab svelte-1iuenvo")},m(g,b){C(g,e,b),s(e,t),s(t,l),s(e,i),u&&u.m(e,null),s(e,a),m.m(e,null),r||(c=A(l,"click",n[160]),r=!0)},p(g,b){g[71]?u?u.p(g,b):(u=aa(g),u.c(),u.m(e,a)):u&&(u.d(1),u=null),h===(h=p(g))&&m?m.p(g,b):(m.d(1),m=h(g),m&&(m.c(),m.m(e,null)))},i:ie,o:ie,d(g){g&&w(e),u&&u.d(),m.d(),r=!1,c()}}}function $m(n){let e,t,l=n[33].title+"",i,a,r,c,u,p,h=n[196](n[33].type)+"",m,g,b,k,y,S=(n[33].section||"—")+"",T,E,I,D,N,M=bt(n[33].createdAt)+"",j,R,O,H,V,G,U,q,Y=v("overview.newNote")+"",B,F,W,P,J,Q,ee=v("overview.addFile")+"",te,le,se,ce,de,we,ze=v("overview.addAction")+"",me,X,x,be,Ce,_e,He,Ze=v("overview.logTime")+"",pt,Ye,Ie,Oe,Me,Z=n[35].length>0&&ua(n),ye=n[38].length>0&&da(n);return{c(){e=f("div"),t=f("h2"),i=z(l),a=_(),r=f("div"),c=f("div"),u=f("span"),u.textContent=`${v("overview.type")}`,p=f("span"),m=z(h),g=_(),b=f("div"),k=f("span"),k.textContent=`${v("overview.section")}`,y=f("span"),T=z(S),E=_(),I=f("div"),D=f("span"),D.textContent=`${v("overview.created")}`,N=f("span"),j=z(M),R=_(),O=f("div"),H=f("button"),V=$("svg"),G=$("path"),U=$("path"),q=_(),B=z(Y),F=_(),W=f("button"),P=$("svg"),J=$("path"),Q=_(),te=z(ee),le=_(),se=f("button"),ce=$("svg"),de=$("polygon"),we=_(),me=z(ze),X=_(),x=f("button"),be=$("svg"),Ce=$("circle"),_e=$("polyline"),He=_(),pt=z(Ze),Ye=_(),Z&&Z.c(),Ie=_(),ye&&ye.c(),o(t,"class","svelte-1iuenvo"),o(u,"class","meta-label svelte-1iuenvo"),o(p,"class","svelte-1iuenvo"),o(c,"class","meta-item svelte-1iuenvo"),o(k,"class","meta-label svelte-1iuenvo"),o(y,"class","svelte-1iuenvo"),o(b,"class","meta-item svelte-1iuenvo"),o(D,"class","meta-label svelte-1iuenvo"),o(N,"class","svelte-1iuenvo"),o(I,"class","meta-item svelte-1iuenvo"),o(r,"class","meta-grid svelte-1iuenvo"),o(G,"d","M12 20h9"),o(G,"class","svelte-1iuenvo"),o(U,"d","M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"),o(U,"class","svelte-1iuenvo"),o(V,"width","16"),o(V,"height","16"),o(V,"viewBox","0 0 24 24"),o(V,"fill","none"),o(V,"stroke","currentColor"),o(V,"stroke-width","2"),o(V,"stroke-linecap","round"),o(V,"stroke-linejoin","round"),o(V,"class","svelte-1iuenvo"),o(H,"class","qa-btn svelte-1iuenvo"),o(J,"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"),o(J,"class","svelte-1iuenvo"),o(P,"width","16"),o(P,"height","16"),o(P,"viewBox","0 0 24 24"),o(P,"fill","none"),o(P,"stroke","currentColor"),o(P,"stroke-width","2"),o(P,"stroke-linecap","round"),o(P,"stroke-linejoin","round"),o(P,"class","svelte-1iuenvo"),o(W,"class","qa-btn svelte-1iuenvo"),o(de,"points","13 2 3 14 12 14 11 22 21 10 12 10 13 2"),o(de,"class","svelte-1iuenvo"),o(ce,"width","16"),o(ce,"height","16"),o(ce,"viewBox","0 0 24 24"),o(ce,"fill","none"),o(ce,"stroke","currentColor"),o(ce,"stroke-width","2"),o(ce,"stroke-linecap","round"),o(ce,"stroke-linejoin","round"),o(ce,"class","svelte-1iuenvo"),o(se,"class","qa-btn svelte-1iuenvo"),o(Ce,"cx","12"),o(Ce,"cy","12"),o(Ce,"r","10"),o(Ce,"class","svelte-1iuenvo"),o(_e,"points","12 6 12 12 16 14"),o(_e,"class","svelte-1iuenvo"),o(be,"width","16"),o(be,"height","16"),o(be,"viewBox","0 0 24 24"),o(be,"fill","none"),o(be,"stroke","currentColor"),o(be,"stroke-width","2"),o(be,"stroke-linecap","round"),o(be,"stroke-linejoin","round"),o(be,"class","svelte-1iuenvo"),o(x,"class","qa-btn svelte-1iuenvo"),o(O,"class","quick-actions svelte-1iuenvo"),o(e,"class","overview svelte-1iuenvo")},m(Pe,je){C(Pe,e,je),s(e,t),s(t,i),s(e,a),s(e,r),s(r,c),s(c,u),s(c,p),s(p,m),s(r,g),s(r,b),s(b,k),s(b,y),s(y,T),s(r,E),s(r,I),s(I,D),s(I,N),s(N,j),s(e,R),s(e,O),s(O,H),s(H,V),s(V,G),s(V,U),s(H,q),s(H,B),s(O,F),s(O,W),s(W,P),s(P,J),s(W,Q),s(W,te),s(O,le),s(O,se),s(se,ce),s(ce,de),s(se,we),s(se,me),s(O,X),s(O,x),s(x,be),s(be,Ce),s(be,_e),s(x,He),s(x,pt),s(e,Ye),Z&&Z.m(e,null),s(e,Ie),ye&&ye.m(e,null),Oe||(Me=[A(H,"click",n[240]),A(W,"click",n[241]),A(se,"click",n[216]),A(x,"click",n[242])],Oe=!0)},p(Pe,je){je[1]&4&&l!==(l=Pe[33].title+"")&&K(i,l),je[1]&4&&h!==(h=Pe[196](Pe[33].type)+"")&&K(m,h),je[1]&4&&S!==(S=(Pe[33].section||"—")+"")&&K(T,S),je[1]&4&&M!==(M=bt(Pe[33].createdAt)+"")&&K(j,M),Pe[35].length>0?Z?Z.p(Pe,je):(Z=ua(Pe),Z.c(),Z.m(e,Ie)):Z&&(Z.d(1),Z=null),Pe[38].length>0?ye?ye.p(Pe,je):(ye=da(Pe),ye.c(),ye.m(e,null)):ye&&(ye.d(1),ye=null)},i:ie,o:ie,d(Pe){Pe&&w(e),Z&&Z.d(),ye&&ye.d(),Oe=!1,ve(Me)}}}function e_(n){let e,t=ue(n[29]),l=[];for(let i=0;i<t.length;i+=1)l[i]=Or(Ls(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();o(e,"class","activity-events svelte-1iuenvo")},m(i,a){C(i,e,a);for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(e,null)},p(i,a){if(a[0]&536870912|a[6]&512|a[7]&64){t=ue(i[29]);let r;for(r=0;r<t.length;r+=1){const c=Ls(i,t,r);l[r]?l[r].p(c,a):(l[r]=Or(c),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=t.length}},d(i){i&&w(e),Re(l,i)}}}function t_(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${v("activity.perCaseEmpty")}`,o(t,"class","svelte-1iuenvo"),o(e,"class","empty-state svelte-1iuenvo")},m(l,i){C(l,e,i),s(e,t)},p:ie,d(l){l&&w(e)}}}function Fr(n){let e,t=n[486].nodePath+"",l;return{c(){e=f("span"),l=z(t),o(e,"class","activity-event-path svelte-1iuenvo")},m(i,a){C(i,e,a),s(e,l)},p(i,a){a[0]&536870912&&t!==(t=i[486].nodePath+"")&&K(l,t)},d(i){i&&w(e)}}}function Rr(n){let e,t=n[486].targetType+"",l;return{c(){e=f("span"),l=z(t),o(e,"class","activity-event-target svelte-1iuenvo")},m(i,a){C(i,e,a),s(e,l)},p(i,a){a[0]&536870912&&t!==(t=i[486].targetType+"")&&K(l,t)},d(i){i&&w(e)}}}function Or(n){let e,t,l=Nn(n[486].eventType)+"",i,a,r,c=n[486].title+"",u,p,h,m,g=n[195](n[486].eventType)+"",b,k,y,S,T=wt(n[486].createdAt)+"",E,I,D,N,M=n[486].nodePath&&Fr(n),j=n[486].targetType&&Rr(n);function R(){return n[290](n[486])}function O(...H){return n[291](n[486],...H)}return{c(){e=f("div"),t=f("span"),i=z(l),a=_(),r=f("span"),u=z(c),p=_(),M&&M.c(),h=_(),m=f("span"),b=z(g),k=_(),j&&j.c(),y=_(),S=f("span"),E=z(T),I=_(),o(t,"class","activity-event-icon svelte-1iuenvo"),o(r,"class","activity-event-title svelte-1iuenvo"),o(m,"class","activity-event-type svelte-1iuenvo"),o(S,"class","activity-event-time svelte-1iuenvo"),o(e,"class","activity-event svelte-1iuenvo"),o(e,"role","button"),o(e,"tabindex","0")},m(H,V){C(H,e,V),s(e,t),s(t,i),s(e,a),s(e,r),s(r,u),s(e,p),M&&M.m(e,null),s(e,h),s(e,m),s(m,b),s(e,k),j&&j.m(e,null),s(e,y),s(e,S),s(S,E),s(e,I),D||(N=[A(e,"click",R),A(e,"keydown",O)],D=!0)},p(H,V){n=H,V[0]&536870912&&l!==(l=Nn(n[486].eventType)+"")&&K(i,l),V[0]&536870912&&c!==(c=n[486].title+"")&&K(u,c),n[486].nodePath?M?M.p(n,V):(M=Fr(n),M.c(),M.m(e,h)):M&&(M.d(1),M=null),V[0]&536870912&&g!==(g=n[195](n[486].eventType)+"")&&K(b,g),n[486].targetType?j?j.p(n,V):(j=Rr(n),j.c(),j.m(e,y)):j&&(j.d(1),j=null),V[0]&536870912&&T!==(T=wt(n[486].createdAt)+"")&&K(E,T)},d(H){H&&w(e),M&&M.d(),j&&j.d(),D=!1,ve(N)}}}function zr(n){let e,t,l,i=ue(n[48].filter(n[276])),a=[];for(let r=0;r<i.length;r+=1)a[r]=Kr(Rs(n,i,r));return{c(){e=f("div"),t=f("div"),t.textContent=`${v("worklog.suggestions")}`,l=_();for(let r=0;r<a.length;r+=1)a[r].c();o(t,"class","suggestions-title svelte-1iuenvo"),o(e,"class","worklog-tab-suggestions svelte-1iuenvo")},m(r,c){C(r,e,c),s(e,t),s(e,l);for(let u=0;u<a.length;u+=1)a[u]&&a[u].m(e,null)},p(r,c){if(c[1]&131076|c[5]&58720260|c[6]&512|c[7]&32){i=ue(r[48].filter(r[276]));let u;for(u=0;u<i.length;u+=1){const p=Rs(r,i,u);a[u]?a[u].p(p,c):(a[u]=Kr(p),a[u].c(),a[u].m(e,null))}for(;u<a.length;u+=1)a[u].d(1);a.length=i.length}},d(r){r&&w(e),Re(a,r)}}}function Hr(n){let e,t=n[489].events.length+"",l,i,a=v("suggest.detectedEvents")+"",r;return{c(){e=z("· "),l=z(t),i=_(),r=z(a)},m(c,u){C(c,e,u),C(c,l,u),C(c,i,u),C(c,r,u)},p(c,u){u[1]&131076&&t!==(t=c[489].events.length+"")&&K(l,t)},d(c){c&&(w(e),w(l),w(i),w(r))}}}function Br(n){let e,t,l,i=ue(n[489].events),a=[];for(let r=0;r<i.length;r+=1)a[r]=Ur(Os(n,i,r));return{c(){e=f("div"),t=f("div"),t.textContent=`${v("suggest.detectedEvents")}`,l=_();for(let r=0;r<a.length;r+=1)a[r].c();o(t,"class","suggestion-detail-title svelte-1iuenvo"),o(e,"class","suggestion-detail svelte-1iuenvo")},m(r,c){C(r,e,c),s(e,t),s(e,l);for(let u=0;u<a.length;u+=1)a[u]&&a[u].m(e,null)},p(r,c){if(c[1]&131076|c[5]&4|c[6]&512|c[7]&32){i=ue(r[489].events);let u;for(u=0;u<i.length;u+=1){const p=Os(r,i,u);a[u]?a[u].p(p,c):(a[u]=Ur(p),a[u].c(),a[u].m(e,null))}for(;u<a.length;u+=1)a[u].d(1);a.length=i.length}},d(r){r&&w(e),Re(a,r)}}}function Wr(n){let e,t=n[486].nodePath+"",l;return{c(){e=f("span"),l=z(t),o(e,"class","suggestion-event-path svelte-1iuenvo")},m(i,a){C(i,e,a),s(e,l)},p(i,a){a[1]&131076&&t!==(t=i[486].nodePath+"")&&K(l,t)},d(i){i&&w(e)}}}function Vr(n){let e,t,l;function i(){return n[283](n[486])}return{c(){e=f("button"),e.textContent=`${v("file.showInExplorer")}`,o(e,"class","link-btn svelte-1iuenvo")},m(a,r){C(a,e,r),t||(l=A(e,"click",i),t=!0)},p(a,r){n=a},d(a){a&&w(e),t=!1,l()}}}function Ur(n){let e,t,l=wt(n[486].createdAt)+"",i,a,r,c,u=n[195](n[486].eventType)+"",p,h,m,g=n[486].title+"",b,k,y,S,T=n[486].targetType==="file"||n[486].eventType.startsWith("file_"),E,I,D,N=n[486].nodePath&&Wr(n);function M(){return n[282](n[486])}let j=T&&Vr(n);return{c(){e=f("div"),t=f("span"),i=z(l),a=_(),N&&N.c(),r=_(),c=f("span"),p=z(u),h=_(),m=f("span"),b=z(g),k=_(),y=f("button"),y.textContent=`${v("common.open")}`,S=_(),j&&j.c(),E=_(),o(t,"class","suggestion-event-time svelte-1iuenvo"),o(c,"class","suggestion-event-type svelte-1iuenvo"),o(m,"class","suggestion-event-title svelte-1iuenvo"),o(y,"class","link-btn svelte-1iuenvo"),o(e,"class","suggestion-detail-event svelte-1iuenvo")},m(R,O){C(R,e,O),s(e,t),s(t,i),s(e,a),N&&N.m(e,null),s(e,r),s(e,c),s(c,p),s(e,h),s(e,m),s(m,b),s(e,k),s(e,y),s(e,S),j&&j.m(e,null),s(e,E),I||(D=A(y,"click",M),I=!0)},p(R,O){n=R,O[1]&131076&&l!==(l=wt(n[486].createdAt)+"")&&K(i,l),n[486].nodePath?N?N.p(n,O):(N=Wr(n),N.c(),N.m(e,r)):N&&(N.d(1),N=null),O[1]&131076&&u!==(u=n[195](n[486].eventType)+"")&&K(p,u),O[1]&131076&&g!==(g=n[486].title+"")&&K(b,g),O[1]&131076&&(T=n[486].targetType==="file"||n[486].eventType.startsWith("file_")),T?j?j.p(n,O):(j=Vr(n),j.c(),j.m(e,E)):j&&(j.d(1),j=null)},d(R){R&&w(e),N&&N.d(),j&&j.d(),I=!1,D()}}}function Kr(n){let e,t,l,i,a=n[489].summary+"",r,c,u,p=n[489].suggestedMin+"",h,m,g=v("worklog.min")+"",b,k,y,S,T,E,I,D,N,M,j,R,O,H,V,G,U=n[489].events&&n[489].events.length>0&&Hr(n);function q(){return n[277](n[489])}function Y(){return n[278](n[489])}function B(){return n[279](n[489])}function F(){return n[280](n[489],n[490],n[491])}function W(...J){return n[281](n[489],n[490],n[491],...J)}let P=n[489]._expanded&&n[489].events&&n[489].events.length>0&&Br(n);return{c(){e=f("div"),t=f("div"),l=f("div"),i=f("span"),r=z(a),c=_(),u=f("span"),h=z(p),m=_(),b=z(g),U&&U.c(),k=_(),y=f("div"),S=f("span"),I=_(),D=f("button"),D.textContent=`${v("suggest.edit")}`,N=_(),M=f("button"),M.textContent=`${v("worklog.apply")}`,j=_(),R=f("button"),R.textContent=`${v("common.delete")}`,O=_(),P&&P.c(),H=_(),o(i,"class","suggestion-summary svelte-1iuenvo"),o(u,"class","suggestion-meta svelte-1iuenvo"),o(l,"class","suggestion-info svelte-1iuenvo"),o(S,"class","suggestion-confidence-dot svelte-1iuenvo"),o(S,"title",T=v("suggest.confidence."+n[489].confidence)),o(S,"aria-label",E=v("suggest.confidence."+n[489].confidence)),ae(S,"low",n[489].confidence==="low"),ae(S,"medium",n[489].confidence==="medium"),ae(S,"high",n[489].confidence==="high"),o(D,"class","btn btn-sm svelte-1iuenvo"),o(M,"class","btn btn-sm btn-primary svelte-1iuenvo"),o(R,"class","btn btn-sm btn-danger svelte-1iuenvo"),o(y,"class","suggestion-actions svelte-1iuenvo"),o(t,"class","suggestion-main svelte-1iuenvo"),o(t,"role","button"),o(t,"tabindex","0"),o(e,"class","suggestion-card svelte-1iuenvo"),ae(e,"expanded",n[489]._expanded)},m(J,Q){C(J,e,Q),s(e,t),s(t,l),s(l,i),s(i,r),s(l,c),s(l,u),s(u,h),s(u,m),s(u,b),U&&U.m(u,null),s(t,k),s(t,y),s(y,S),s(y,I),s(y,D),s(y,N),s(y,M),s(y,j),s(y,R),s(e,O),P&&P.m(e,null),s(e,H),V||(G=[A(D,"click",Te(q)),A(M,"click",Te(Y)),A(R,"click",Te(B)),A(t,"click",F),A(t,"keydown",W)],V=!0)},p(J,Q){n=J,Q[1]&131076&&a!==(a=n[489].summary+"")&&K(r,a),Q[1]&131076&&p!==(p=n[489].suggestedMin+"")&&K(h,p),n[489].events&&n[489].events.length>0?U?U.p(n,Q):(U=Hr(n),U.c(),U.m(u,null)):U&&(U.d(1),U=null),Q[1]&131076&&T!==(T=v("suggest.confidence."+n[489].confidence))&&o(S,"title",T),Q[1]&131076&&E!==(E=v("suggest.confidence."+n[489].confidence))&&o(S,"aria-label",E),Q[1]&131076&&ae(S,"low",n[489].confidence==="low"),Q[1]&131076&&ae(S,"medium",n[489].confidence==="medium"),Q[1]&131076&&ae(S,"high",n[489].confidence==="high"),n[489]._expanded&&n[489].events&&n[489].events.length>0?P?P.p(n,Q):(P=Br(n),P.c(),P.m(e,H)):P&&(P.d(1),P=null),Q[1]&131076&&ae(e,"expanded",n[489]._expanded)},d(J){J&&w(e),U&&U.d(),P&&P.d(),V=!1,ve(G)}}}function n_(n){let e,t=ue(n[38]),l=[];for(let i=0;i<t.length;i+=1)l[i]=$r(Ps(n,t,i));return{c(){for(let i=0;i<l.length;i+=1)l[i].c();e=ht()},m(i,a){for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(i,a);C(i,e,a)},p(i,a){if(a[1]&128|a[5]&1073778692|a[6]&512|a[7]&32){t=ue(i[38]);let r;for(r=0;r<t.length;r+=1){const c=Ps(i,t,r);l[r]?l[r].p(c,a):(l[r]=$r(c),l[r].c(),l[r].m(e.parentNode,e))}for(;r<l.length;r+=1)l[r].d(1);l.length=t.length}},d(i){i&&w(e),Re(l,i)}}}function l_(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${v("worklog.empty")}`,o(t,"class","svelte-1iuenvo"),o(e,"class","empty-state svelte-1iuenvo")},m(l,i){C(l,e,i),s(e,t)},p:ie,d(l){l&&w(e)}}}function Gr(n){let e,t=n[465].nodePath+"",l;return{c(){e=f("span"),l=z(t),o(e,"class","worklog-entry-path svelte-1iuenvo")},m(i,a){C(i,e,a),s(e,l)},p(i,a){a[1]&128&&t!==(t=i[465].nodePath+"")&&K(l,t)},d(i){i&&w(e)}}}function Jr(n){let e;return{c(){e=f("span"),e.textContent=`${v("journal.billableYes")}`,o(e,"class","wl-tag-billable svelte-1iuenvo")},m(t,l){C(t,e,l)},d(t){t&&w(e)}}}function qr(n){let e;return{c(){e=f("span"),e.textContent=`${v("journal.approxEstimated")}`,o(e,"class","wl-tag-approx svelte-1iuenvo")},m(t,l){C(t,e,l)},d(t){t&&w(e)}}}function Yr(n){let e,t,l,i,a,r,c,u,p,h,m,g,b;function k(){return n[284](n[465])}function y(){return n[285](n[465])}let S=n[465].details&&Qr(n);function T(N,M){return N[465].source==="manual"?a_:N[465].source==="suggestion"&&N[465]._events&&N[465]._events.length>0?r_:N[465].source==="suggestion"?s_:N[465].source==="unknown"||N[465].source==="imported"?o_:i_}let E=T(n),I=E(n),D=n[465].source==="suggestion"&&n[465]._events&&n[465]._events.length>0&&Xr(n);return{c(){e=f("div"),t=f("div"),l=f("button"),l.textContent=`${v("worklog.editEntry")}`,i=_(),a=f("button"),a.textContent=`${v("worklog.deleteEntry")}`,r=_(),S&&S.c(),c=_(),u=f("div"),p=f("span"),p.textContent=`${v("worklog.source")}`,h=_(),I.c(),m=_(),D&&D.c(),o(l,"class","btn btn-sm svelte-1iuenvo"),o(a,"class","btn btn-sm btn-danger svelte-1iuenvo"),o(t,"class","worklog-entry-actions svelte-1iuenvo"),o(p,"class","wl-detail-label svelte-1iuenvo"),o(u,"class","wl-detail-section svelte-1iuenvo"),o(e,"class","worklog-entry-detail svelte-1iuenvo")},m(N,M){C(N,e,M),s(e,t),s(t,l),s(t,i),s(t,a),s(e,r),S&&S.m(e,null),s(e,c),s(e,u),s(u,p),s(u,h),I.m(u,null),s(e,m),D&&D.m(e,null),g||(b=[A(l,"click",Te(k)),A(a,"click",Te(y))],g=!0)},p(N,M){n=N,n[465].details?S?S.p(n,M):(S=Qr(n),S.c(),S.m(e,c)):S&&(S.d(1),S=null),E!==(E=T(n))&&(I.d(1),I=E(n),I&&(I.c(),I.m(u,null))),n[465].source==="suggestion"&&n[465]._events&&n[465]._events.length>0?D?D.p(n,M):(D=Xr(n),D.c(),D.m(e,null)):D&&(D.d(1),D=null)},d(N){N&&w(e),S&&S.d(),I.d(),D&&D.d(),g=!1,ve(b)}}}function Qr(n){let e,t,l,i,a=n[465].details+"",r;return{c(){e=f("div"),t=f("span"),t.textContent=`${v("worklog.details")}`,l=_(),i=f("p"),r=z(a),o(t,"class","wl-detail-label svelte-1iuenvo"),o(i,"class","svelte-1iuenvo"),o(e,"class","wl-detail-section svelte-1iuenvo")},m(c,u){C(c,e,u),s(e,t),s(e,l),s(e,i),s(i,r)},p(c,u){u[1]&128&&a!==(a=c[465].details+"")&&K(r,a)},d(c){c&&w(e)}}}function i_(n){let e;return{c(){e=f("p"),e.textContent=`${v("worklog.sourceUnknown")}`,o(e,"class","svelte-1iuenvo")},m(t,l){C(t,e,l)},d(t){t&&w(e)}}}function o_(n){let e;return{c(){e=f("p"),e.textContent=`${v("worklog.sourceUnknown")}`,o(e,"class","svelte-1iuenvo")},m(t,l){C(t,e,l)},d(t){t&&w(e)}}}function s_(n){let e;return{c(){e=f("p"),e.textContent=`${v("worklog.sourceSuggestionNoEvents")}`,o(e,"class","svelte-1iuenvo")},m(t,l){C(t,e,l)},d(t){t&&w(e)}}}function r_(n){let e;return{c(){e=f("p"),e.textContent=`${v("worklog.sourceSuggestion")}`,o(e,"class","svelte-1iuenvo")},m(t,l){C(t,e,l)},d(t){t&&w(e)}}}function a_(n){let e;return{c(){e=f("p"),e.textContent=`${v("worklog.sourceManual")}`,o(e,"class","svelte-1iuenvo")},m(t,l){C(t,e,l)},d(t){t&&w(e)}}}function Xr(n){let e,t,l,i=ue(n[465]._events),a=[];for(let r=0;r<i.length;r+=1)a[r]=xr(Fs(n,i,r));return{c(){e=f("div"),t=f("span"),t.textContent=`${v("journal.relatedEvents")}`,l=_();for(let r=0;r<a.length;r+=1)a[r].c();o(t,"class","wl-detail-label svelte-1iuenvo"),o(e,"class","wl-detail-section svelte-1iuenvo")},m(r,c){C(r,e,c),s(e,t),s(e,l);for(let u=0;u<a.length;u+=1)a[u]&&a[u].m(e,null)},p(r,c){if(c[1]&128|c[5]&4|c[6]&512|c[7]&32){i=ue(r[465]._events);let u;for(u=0;u<i.length;u+=1){const p=Fs(r,i,u);a[u]?a[u].p(p,c):(a[u]=xr(p),a[u].c(),a[u].m(e,null))}for(;u<a.length;u+=1)a[u].d(1);a.length=i.length}},d(r){r&&w(e),Re(a,r)}}}function Zr(n){let e,t,l;function i(){return n[287](n[486])}return{c(){e=f("button"),e.textContent=`${v("file.showInExplorer")}`,o(e,"class","link-btn svelte-1iuenvo")},m(a,r){C(a,e,r),t||(l=A(e,"click",i),t=!0)},p(a,r){n=a},d(a){a&&w(e),t=!1,l()}}}function xr(n){let e,t,l=wt(n[486].createdAt)+"",i,a,r,c=n[195](n[486].eventType)+"",u,p,h,m=n[486].title+"",g,b,k,y,S=n[486].targetType==="file"||n[486].eventType.startsWith("file_"),T,E,I;function D(){return n[286](n[486])}let N=S&&Zr(n);return{c(){e=f("div"),t=f("span"),i=z(l),a=_(),r=f("span"),u=z(c),p=_(),h=f("span"),g=z(m),b=_(),k=f("button"),k.textContent=`${v("common.open")}`,y=_(),N&&N.c(),T=_(),o(t,"class","journal-event-time svelte-1iuenvo"),o(r,"class","journal-event-type svelte-1iuenvo"),o(h,"class","journal-event-title svelte-1iuenvo"),o(k,"class","link-btn svelte-1iuenvo"),o(e,"class","journal-event-row svelte-1iuenvo")},m(M,j){C(M,e,j),s(e,t),s(t,i),s(e,a),s(e,r),s(r,u),s(e,p),s(e,h),s(h,g),s(e,b),s(e,k),s(e,y),N&&N.m(e,null),s(e,T),E||(I=A(k,"click",D),E=!0)},p(M,j){n=M,j[1]&128&&l!==(l=wt(n[486].createdAt)+"")&&K(i,l),j[1]&128&&c!==(c=n[195](n[486].eventType)+"")&&K(u,c),j[1]&128&&m!==(m=n[486].title+"")&&K(g,m),j[1]&128&&(S=n[486].targetType==="file"||n[486].eventType.startsWith("file_")),S?N?N.p(n,j):(N=Zr(n),N.c(),N.m(e,T)):N&&(N.d(1),N=null)},d(M){M&&w(e),N&&N.d(),E=!1,I()}}}function $r(n){let e,t,l,i=n[465]._expanded?"▾":"▸",a,r,c,u=n[465].summary+"",p,h,m,g,b=n[465].minutes+"",k,y,S=v("worklog.min")+"",T,E,I,D,N,M=n[465].date+"",j,R,O,H,V,G=n[465].nodePath&&Gr(n),U=n[465].billable&&Jr(),q=n[465].approximate&&qr(),Y=n[465]._expanded&&Yr(n);function B(){return n[288](n[465])}function F(...W){return n[289](n[465],...W)}return{c(){e=f("div"),t=f("div"),l=f("span"),a=z(i),r=_(),c=f("span"),p=z(u),h=_(),G&&G.c(),m=_(),g=f("span"),k=z(b),y=_(),T=z(S),E=_(),U&&U.c(),I=_(),q&&q.c(),D=_(),N=f("span"),j=z(M),R=_(),Y&&Y.c(),O=_(),o(l,"class","worklog-toggle svelte-1iuenvo"),o(c,"class","worklog-entry-summary svelte-1iuenvo"),o(g,"class","worklog-entry-mins svelte-1iuenvo"),o(N,"class","worklog-entry-date svelte-1iuenvo"),o(t,"class","worklog-entry-head svelte-1iuenvo"),o(e,"class","worklog-entry svelte-1iuenvo"),o(e,"role","button"),o(e,"tabindex","0"),ae(e,"expanded",n[465]._expanded)},m(W,P){C(W,e,P),s(e,t),s(t,l),s(l,a),s(t,r),s(t,c),s(c,p),s(t,h),G&&G.m(t,null),s(t,m),s(t,g),s(g,k),s(g,y),s(g,T),s(t,E),U&&U.m(t,null),s(t,I),q&&q.m(t,null),s(t,D),s(t,N),s(N,j),s(e,R),Y&&Y.m(e,null),s(e,O),H||(V=[A(e,"click",B),A(e,"keydown",F)],H=!0)},p(W,P){n=W,P[1]&128&&i!==(i=n[465]._expanded?"▾":"▸")&&K(a,i),P[1]&128&&u!==(u=n[465].summary+"")&&K(p,u),n[465].nodePath?G?G.p(n,P):(G=Gr(n),G.c(),G.m(t,m)):G&&(G.d(1),G=null),P[1]&128&&b!==(b=n[465].minutes+"")&&K(k,b),n[465].billable?U||(U=Jr(),U.c(),U.m(t,I)):U&&(U.d(1),U=null),n[465].approximate?q||(q=qr(),q.c(),q.m(t,D)):q&&(q.d(1),q=null),P[1]&128&&M!==(M=n[465].date+"")&&K(j,M),n[465]._expanded?Y?Y.p(n,P):(Y=Yr(n),Y.c(),Y.m(e,O)):Y&&(Y.d(1),Y=null),P[1]&128&&ae(e,"expanded",n[465]._expanded)},d(W){W&&w(e),G&&G.d(),U&&U.d(),q&&q.d(),Y&&Y.d(),H=!1,ve(V)}}}function c_(n){let e,t=ue(n[37]),l=[];for(let i=0;i<t.length;i+=1)l[i]=ea(zs(n,t,i));return{c(){for(let i=0;i<l.length;i+=1)l[i].c();e=ht()},m(i,a){for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(i,a);C(i,e,a)},p(i,a){if(a[1]&64|a[7]&12){t=ue(i[37]);let r;for(r=0;r<t.length;r+=1){const c=zs(i,t,r);l[r]?l[r].p(c,a):(l[r]=ea(c),l[r].c(),l[r].m(e.parentNode,e))}for(;r<l.length;r+=1)l[r].d(1);l.length=t.length}},d(i){i&&w(e),Re(l,i)}}}function u_(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${v("action.noActions")}`,o(t,"class","svelte-1iuenvo"),o(e,"class","empty-state svelte-1iuenvo")},m(l,i){C(l,e,i),s(e,t)},p:ie,d(l){l&&w(e)}}}function ea(n){let e,t,l,i=n[481].title+"",a,r,c,u=n[220](n[481].type)+"",p,h,m,g=n[481].data+"",b,k,y,S,T,E,I,D,N;function M(){return n[273](n[481])}function j(){return n[274](n[481])}return{c(){e=f("div"),t=f("div"),l=f("span"),a=z(i),r=_(),c=f("span"),p=z(u),h=_(),m=f("span"),b=z(g),k=_(),y=f("div"),S=f("button"),S.textContent=`${v("action.run")}`,T=_(),E=f("button"),E.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-1iuenvo"><polyline points="3 6 5 6 21 6" class="svelte-1iuenvo"></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-1iuenvo"></path></svg>',I=_(),o(l,"class","action-title svelte-1iuenvo"),o(c,"class","action-type svelte-1iuenvo"),o(m,"class","action-data svelte-1iuenvo"),o(t,"class","action-info svelte-1iuenvo"),o(S,"class","btn btn-sm svelte-1iuenvo"),o(E,"class","btn btn-sm btn-danger svelte-1iuenvo"),o(y,"class","action-btns svelte-1iuenvo"),o(e,"class","action-card svelte-1iuenvo")},m(R,O){C(R,e,O),s(e,t),s(t,l),s(l,a),s(t,r),s(t,c),s(c,p),s(t,h),s(t,m),s(m,b),s(e,k),s(e,y),s(y,S),s(y,T),s(y,E),s(e,I),D||(N=[A(S,"click",M),A(E,"click",j)],D=!0)},p(R,O){n=R,O[1]&64&&i!==(i=n[481].title+"")&&K(a,i),O[1]&64&&u!==(u=n[220](n[481].type)+"")&&K(p,u),O[1]&64&&g!==(g=n[481].data+"")&&K(b,g)},d(R){R&&w(e),D=!1,ve(N)}}}function f_(n){let e,t=ue(n[55]),l=[];for(let i=0;i<t.length;i+=1)l[i]=na(Hs(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();o(e,"class","links-list svelte-1iuenvo")},m(i,a){C(i,e,a);for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(e,null)},p(i,a){if(a[1]&16777216|a[6]&956301312){t=ue(i[55]);let r;for(r=0;r<t.length;r+=1){const c=Hs(i,t,r);l[r]?l[r].p(c,a):(l[r]=na(c),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=t.length}},d(i){i&&w(e),Re(l,i)}}}function d_(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${v("links.empty")}`,o(t,"class","svelte-1iuenvo"),o(e,"class","empty-state svelte-1iuenvo")},m(l,i){C(l,e,i),s(e,t)},p:ie,d(l){l&&w(e)}}}function ta(n){let e,t=n[478].note+"",l;return{c(){e=f("span"),l=z(t),o(e,"class","link-note svelte-1iuenvo")},m(i,a){C(i,e,a),s(e,l)},p(i,a){a[1]&16777216&&t!==(t=i[478].note+"")&&K(l,t)},d(i){i&&w(e)}}}function na(n){let e,t,l,i=n[478].title+"",a,r,c,u=(n[478].hostname||n[478].url)+"",p,h,m,g,b=bt(n[478].createdAt)+"",k,y,S,T,E,I,D,N,M,j,R,O,H,V,G=n[478].note&&ta(n);function U(){return n[269](n[478])}function q(){return n[270](n[478])}function Y(){return n[271](n[478])}function B(){return n[272](n[478])}return{c(){e=f("div"),t=f("div"),l=f("span"),a=z(i),r=_(),c=f("span"),p=z(u),m=_(),g=f("span"),k=z(b),y=_(),G&&G.c(),S=_(),T=f("div"),E=f("button"),E.textContent=`${v("common.open")}`,I=_(),D=f("button"),D.textContent=`${v("links.copyUrl")}`,N=_(),M=f("button"),M.textContent=`${v("common.rename")}`,j=_(),R=f("button"),R.textContent=`${v("common.delete")}`,O=_(),o(l,"class","link-title svelte-1iuenvo"),o(c,"class","link-url svelte-1iuenvo"),o(c,"title",h=n[478].url),o(g,"class","link-date svelte-1iuenvo"),o(t,"class","link-main svelte-1iuenvo"),o(E,"class","btn btn-sm btn-primary svelte-1iuenvo"),o(D,"class","btn btn-sm svelte-1iuenvo"),o(M,"class","btn btn-sm svelte-1iuenvo"),o(R,"class","btn btn-sm btn-danger svelte-1iuenvo"),o(T,"class","link-actions svelte-1iuenvo"),o(e,"class","link-card svelte-1iuenvo")},m(F,W){C(F,e,W),s(e,t),s(t,l),s(l,a),s(t,r),s(t,c),s(c,p),s(t,m),s(t,g),s(g,k),s(t,y),G&&G.m(t,null),s(e,S),s(e,T),s(T,E),s(T,I),s(T,D),s(T,N),s(T,M),s(T,j),s(T,R),s(e,O),H||(V=[A(E,"click",U),A(D,"click",q),A(M,"click",Y),A(R,"click",B)],H=!0)},p(F,W){n=F,W[1]&16777216&&i!==(i=n[478].title+"")&&K(a,i),W[1]&16777216&&u!==(u=(n[478].hostname||n[478].url)+"")&&K(p,u),W[1]&16777216&&h!==(h=n[478].url)&&o(c,"title",h),W[1]&16777216&&b!==(b=bt(n[478].createdAt)+"")&&K(k,b),n[478].note?G?G.p(n,W):(G=ta(n),G.c(),G.m(t,null)):G&&(G.d(1),G=null)},d(F){F&&w(e),G&&G.d(),H=!1,ve(V)}}}function la(n){let e,t;return{c(){e=f("div"),t=z(n[60]),o(e,"class","link-status svelte-1iuenvo")},m(l,i){C(l,e,i),s(e,t)},p(l,i){i[1]&536870912&&K(t,l[60])},d(l){l&&w(e)}}}function p_(n){let e,t=ue(n[52]),l=[];for(let i=0;i<t.length;i+=1)l[i]=ia(Bs(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();o(e,"class","inbox-list svelte-1iuenvo")},m(i,a){C(i,e,a);for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(e,null)},p(i,a){if(a[1]&2097152|a[5]&12|a[6]&12718080){t=ue(i[52]);let r;for(r=0;r<t.length;r+=1){const c=Bs(i,t,r);l[r]?l[r].p(c,a):(l[r]=ia(c),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=t.length}},d(i){i&&w(e),Re(l,i)}}}function v_(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${v("inbox.localEmpty")}`,o(t,"class","svelte-1iuenvo"),o(e,"class","empty-state svelte-1iuenvo")},m(l,i){C(l,e,i),s(e,t)},p:ie,d(l){l&&w(e)}}}function m_(n){let e;return{c(){e=f("span"),o(e,"class","inbox-icon-slot svelte-1iuenvo"),o(e,"aria-hidden","true")},m(t,l){C(t,e,l)},p:ie,d(t){t&&w(e)}}}function __(n){let e,t=et("showInExplorer")+"",l,i;function a(){return n[265](n[473])}return{c(){e=f("button"),o(e,"class","inbox-icon-btn svelte-1iuenvo"),o(e,"title",v("file.showInExplorer")),o(e,"aria-label",v("file.showInExplorer"))},m(r,c){C(r,e,c),e.innerHTML=t,l||(i=A(e,"click",Te(a)),l=!0)},p(r,c){n=r},d(r){r&&w(e),l=!1,i()}}}function ia(n){let e,t,l,i=n[473].title+"",a,r,c,u=n[198](n[473])+"",p,h,m,g,b=et("attach")+"",k,y,S=et("move")+"",T,E,I=et("open")+"",D,N,M,j,R=et("delete")+"",O,H,V;function G(){return n[262](n[473])}function U(){return n[263](n[473])}function q(){return n[264](n[473])}function Y(Q,ee){return ee[1]&2097152&&(N=null),N==null&&(N=!!Xl(Q[473])),N?__:m_}let B=Y(n,[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]),F=B(n);function W(){return n[266](n[473])}function P(){return n[267](n[473])}function J(...Q){return n[268](n[473],...Q)}return{c(){e=f("div"),t=f("div"),l=f("span"),a=z(i),r=_(),c=f("span"),p=z(u),h=_(),m=f("div"),g=f("button"),k=_(),y=f("button"),T=_(),E=f("button"),D=_(),F.c(),M=_(),j=f("button"),O=_(),o(l,"class","inbox-item-title svelte-1iuenvo"),o(c,"class","inbox-item-meta svelte-1iuenvo"),o(t,"class","inbox-item-main svelte-1iuenvo"),o(g,"class","inbox-icon-btn inbox-icon-btn-primary svelte-1iuenvo"),o(g,"title",v("inbox.keepHere")),o(g,"aria-label",v("inbox.keepHere")),o(y,"class","inbox-icon-btn svelte-1iuenvo"),o(y,"title",v("inbox.assign")),o(y,"aria-label",v("inbox.assign")),o(E,"class","inbox-icon-btn svelte-1iuenvo"),o(E,"title",v("common.open")),o(E,"aria-label",v("common.open")),o(j,"class","inbox-icon-btn inbox-icon-btn-danger svelte-1iuenvo"),o(j,"title",v("common.delete")),o(j,"aria-label",v("common.delete")),o(m,"class","inbox-item-actions svelte-1iuenvo"),o(e,"class","inbox-item svelte-1iuenvo"),o(e,"role","button"),o(e,"tabindex","0")},m(Q,ee){C(Q,e,ee),s(e,t),s(t,l),s(l,a),s(t,r),s(t,c),s(c,p),s(e,h),s(e,m),s(m,g),g.innerHTML=b,s(m,k),s(m,y),y.innerHTML=S,s(m,T),s(m,E),E.innerHTML=I,s(m,D),F.m(m,null),s(m,M),s(m,j),j.innerHTML=R,s(e,O),H||(V=[A(g,"click",Te(G)),A(y,"click",Te(U)),A(E,"click",Te(q)),A(j,"click",Te(W)),A(e,"click",P),A(e,"keydown",J)],H=!0)},p(Q,ee){n=Q,ee[1]&2097152&&i!==(i=n[473].title+"")&&K(a,i),ee[1]&2097152&&u!==(u=n[198](n[473])+"")&&K(p,u),B===(B=Y(n,ee))&&F?F.p(n,ee):(F.d(1),F=B(n),F&&(F.c(),F.m(m,M)))},d(Q){Q&&w(e),F.d(),H=!1,ve(V)}}}function oa(n){let e,t=v("common.paste")+"",l,i,a=n[90].items.length+"",r,c,u;return{c(){e=f("button"),l=z(t),i=_(),r=z(a),o(e,"class","btn svelte-1iuenvo")},m(p,h){C(p,e,h),s(e,l),s(e,i),s(e,r),c||(u=A(e,"click",n[132]),c=!0)},p(p,h){h[2]&268435456&&a!==(a=p[90].items.length+"")&&K(r,a)},d(p){p&&w(e),c=!1,u()}}}function h_(n){let e,t,l,i,a,r,c;const u=[k_,b_],p=[];function h(k,y){return k[84].length>0?0:1}e=h(n),t=p[e]=u[e](n);const m=[w_,y_],g=[];function b(k,y){return k[85].length===0?0:1}return i=b(n),a=g[i]=m[i](n),{c(){t.c(),l=_(),a.c(),r=ht()},m(k,y){p[e].m(k,y),C(k,l,y),g[i].m(k,y),C(k,r,y),c=!0},p(k,y){let S=e;e=h(k),e===S?p[e].p(k,y):(ut(),ge(p[S],1,1,()=>{p[S]=null}),ft(),t=p[e],t?t.p(k,y):(t=p[e]=u[e](k),t.c()),pe(t,1),t.m(l.parentNode,l));let T=i;i=b(k),i===T?g[i].p(k,y):(ut(),ge(g[T],1,1,()=>{g[T]=null}),ft(),a=g[i],a?a.p(k,y):(a=g[i]=m[i](k),a.c()),pe(a,1),a.m(r.parentNode,r))},i(k){c||(pe(t),pe(a),c=!0)},o(k){ge(t),ge(a),c=!1},d(k){k&&(w(l),w(r)),p[e].d(k),g[i].d(k)}}}function g_(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${v("common.loading")}`,o(t,"class","svelte-1iuenvo"),o(e,"class","empty-state svelte-1iuenvo")},m(l,i){C(l,e,i),s(e,t)},p:ie,i:ie,o:ie,d(l){l&&w(e)}}}function b_(n){let e,t;return e=new tc({props:{crumbs:[{name:v("file.root")}]}}),{c(){Xe(e.$$.fragment)},m(l,i){Je(e,l,i),t=!0},p:ie,i(l){t||(pe(e.$$.fragment,l),t=!0)},o(l){ge(e.$$.fragment,l),t=!1},d(l){qe(e,l)}}}function k_(n){let e,t,l,i,a,r,c,u=v("common.backLabel")+"",p,h,m,g;return e=new tc({props:{crumbs:[{name:v("file.root")},...n[84]]}}),e.$on("navigate",n[249]),{c(){Xe(e.$$.fragment),t=_(),l=f("button"),i=$("svg"),a=$("line"),r=$("polyline"),c=_(),p=z(u),o(a,"x1","19"),o(a,"y1","12"),o(a,"x2","5"),o(a,"y2","12"),o(a,"class","svelte-1iuenvo"),o(r,"points","12 19 5 12 12 5"),o(r,"class","svelte-1iuenvo"),o(i,"width","14"),o(i,"height","14"),o(i,"viewBox","0 0 24 24"),o(i,"fill","none"),o(i,"stroke","currentColor"),o(i,"stroke-width","2"),o(i,"stroke-linecap","round"),o(i,"stroke-linejoin","round"),o(i,"class","svelte-1iuenvo"),o(l,"class","btn btn-sm back-btn svelte-1iuenvo")},m(b,k){Je(e,b,k),C(b,t,k),C(b,l,k),s(l,i),s(i,a),s(i,r),s(l,c),s(l,p),h=!0,m||(g=A(l,"click",n[123]),m=!0)},p(b,k){const y={};k[2]&4194304&&(y.crumbs=[{name:v("file.root")},...b[84]]),e.$set(y)},i(b){h||(pe(e.$$.fragment,b),h=!0)},o(b){ge(e.$$.fragment,b),h=!1},d(b){b&&(w(t),w(l)),qe(e,b),m=!1,g()}}}function y_(n){let e,t=[],l=new Map,i,a=ue(n[85]);const r=c=>c[473].id;for(let c=0;c<a.length;c+=1){let u=Ws(n,a,c),p=r(u);l.set(p,t[c]=sa(p,u))}return{c(){e=f("div");for(let c=0;c<t.length;c+=1)t[c].c();o(e,"class","file-list svelte-1iuenvo")},m(c,u){C(c,e,u);for(let p=0;p<t.length;p+=1)t[p]&&t[p].m(e,null);i=!0},p(c,u){u[2]&545259520|u[3]&536870912|u[4]&32498|u[6]&256&&(a=ue(c[85]),ut(),t=Ka(t,u,r,1,c,a,l,e,Ua,sa,null,Ws),ft())},i(c){if(!i){for(let u=0;u<a.length;u+=1)pe(t[u]);i=!0}},o(c){for(let u=0;u<t.length;u+=1)ge(t[u]);i=!1},d(c){c&&w(e);for(let u=0;u<t.length;u+=1)t[u].d()}}}function w_(n){let e,t,l,i,a=(n[84].length>0?v("file.noFiles"):v("file.noFilesCase"))+"",r,c,u,p,h,m,g,b,k,y;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-1iuenvo"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" class="svelte-1iuenvo"></path><polyline points="14 2 14 8 20 8" class="svelte-1iuenvo"></polyline></svg>',l=_(),i=f("p"),r=z(a),c=_(),u=f("p"),u.textContent=`${v("file.hint")}`,p=_(),h=f("div"),m=f("button"),m.textContent=`${v("file.addFileSimple")}`,g=_(),b=f("button"),b.textContent=`${v("file.addFolderSimple")}`,o(t,"class","empty-icon svelte-1iuenvo"),o(i,"class","svelte-1iuenvo"),o(u,"class","hint svelte-1iuenvo"),o(m,"class","btn btn-primary svelte-1iuenvo"),o(b,"class","btn svelte-1iuenvo"),o(h,"class","empty-actions svelte-1iuenvo"),o(e,"class","empty-state svelte-1iuenvo")},m(S,T){C(S,e,T),s(e,t),s(e,l),s(e,i),s(i,r),s(e,c),s(e,u),s(e,p),s(e,h),s(h,m),s(h,g),s(h,b),k||(y=[A(m,"click",n[190]),A(b,"click",n[191])],k=!0)},p(S,T){T[2]&4194304&&a!==(a=(S[84].length>0?v("file.noFiles"):v("file.noFilesCase"))+"")&&K(r,a)},i:ie,o:ie,d(S){S&&w(e),k=!1,ve(y)}}}function sa(n,e){let t,l,i;return l=new V1({props:{item:e[473],selected:e[91].includes(e[473].id),onDragStart:e[136],onDragOver:e[137],onDrop:e[138]}}),l.$on("navigate",e[250]),l.$on("preview",e[251]),l.$on("openExternal",e[252]),l.$on("showInFolder",e[253]),l.$on("delete",e[254]),l.$on("rename",e[255]),l.$on("duplicate",e[256]),l.$on("cut",e[257]),l.$on("copy",e[258]),l.$on("selectOne",e[259]),l.$on("toggleSelect",e[260]),l.$on("rangeSelect",e[261]),{key:n,first:null,c(){t=ht(),Xe(l.$$.fragment),this.first=t},m(a,r){C(a,t,r),Je(l,a,r),i=!0},p(a,r){e=a;const c={};r[2]&8388608&&(c.item=e[473]),r[2]&545259520&&(c.selected=e[91].includes(e[473].id)),l.$set(c)},i(a){i||(pe(l.$$.fragment,a),i=!0)},o(a){ge(l.$$.fragment,a),i=!1},d(a){a&&w(t),qe(l,a)}}}function ra(n){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${v("file.scanning")}`,o(t,"class","svelte-1iuenvo"),o(e,"class","empty-state svelte-1iuenvo")},m(l,i){C(l,e,i),s(e,t)},d(l){l&&w(e)}}}function aa(n){let e,t,l,i,a,r,c,u,p;return{c(){e=f("div"),t=f("input"),l=_(),i=f("div"),a=f("button"),a.textContent=`${v("common.create")}`,r=_(),c=f("button"),c.textContent=`${v("common.cancel")}`,o(t,"type","text"),o(t,"placeholder",v("note.title")),o(t,"class","svelte-1iuenvo"),o(a,"class","btn btn-primary svelte-1iuenvo"),o(c,"class","btn svelte-1iuenvo"),o(i,"class","form-actions svelte-1iuenvo"),o(e,"class","create-form svelte-1iuenvo")},m(h,m){C(h,e,m),s(e,t),ke(t,n[72]),s(e,l),s(e,i),s(i,a),s(i,r),s(i,c),u||(p=[A(t,"input",n[245]),A(t,"keydown",n[246]),A(a,"click",n[162]),A(c,"click",n[161])],u=!0)},p(h,m){m[2]&1024&&t.value!==h[72]&&ke(t,h[72])},d(h){h&&w(e),u=!1,ve(p)}}}function C_(n){let e,t=ue(n[35]),l=[];for(let i=0;i<t.length;i+=1)l[i]=ca(Vs(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();o(e,"class","notes-list svelte-1iuenvo")},m(i,a){C(i,e,a);for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(e,null)},p(i,a){if(a[1]&16|a[5]&256){t=ue(i[35]);let r;for(r=0;r<t.length;r+=1){const c=Vs(i,t,r);l[r]?l[r].p(c,a):(l[r]=ca(c),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=t.length}},d(i){i&&w(e),Re(l,i)}}}function S_(n){let e,t,l;return{c(){e=f("div"),t=f("p"),t.textContent=`${v("note.noNotes")}`,l=f("p"),l.textContent=`${v("note.createFirst")}`,o(t,"class","svelte-1iuenvo"),o(l,"class","hint svelte-1iuenvo"),o(e,"class","empty-state svelte-1iuenvo")},m(i,a){C(i,e,a),s(e,t),s(e,l)},p:ie,d(i){i&&w(e)}}}function ca(n){let e,t,l=n[468].title+"",i,a,r,c=bt(n[468].createdAt)+"",u,p,h,m;function g(){return n[247](n[468])}function b(){return n[248](n[468])}return{c(){e=f("div"),t=f("div"),i=z(l),a=_(),r=f("div"),u=z(c),p=_(),o(t,"class","note-card-title svelte-1iuenvo"),o(r,"class","note-card-date svelte-1iuenvo"),o(e,"class","note-card svelte-1iuenvo"),o(e,"role","button"),o(e,"tabindex","0")},m(k,y){C(k,e,y),s(e,t),s(t,i),s(e,a),s(e,r),s(r,u),s(e,p),h||(m=[A(e,"click",g),A(e,"keydown",function(){Wt(kt(b))&&kt(b).apply(this,arguments)})],h=!0)},p(k,y){n=k,y[1]&16&&l!==(l=n[468].title+"")&&K(i,l),y[1]&16&&c!==(c=bt(n[468].createdAt)+"")&&K(u,c)},d(k){k&&w(e),h=!1,ve(m)}}}function ua(n){let e,t,l,i=ue(n[35].slice(0,5)),a=[];for(let r=0;r<i.length;r+=1)a[r]=fa(Ks(n,i,r));return{c(){e=f("div"),t=f("h3"),t.textContent=`${v("overview.recentNotes")}`,l=_();for(let r=0;r<a.length;r+=1)a[r].c();o(t,"class","svelte-1iuenvo"),o(e,"class","recent-section svelte-1iuenvo")},m(r,c){C(r,e,c),s(e,t),s(e,l);for(let u=0;u<a.length;u+=1)a[u]&&a[u].m(e,null)},p(r,c){if(c[1]&16|c[5]&256){i=ue(r[35].slice(0,5));let u;for(u=0;u<i.length;u+=1){const p=Ks(r,i,u);a[u]?a[u].p(p,c):(a[u]=fa(p),a[u].c(),a[u].m(e,null))}for(;u<a.length;u+=1)a[u].d(1);a.length=i.length}},d(r){r&&w(e),Re(a,r)}}}function fa(n){let e,t,l=n[468].title+"",i,a,r=bt(n[468].createdAt)+"",c,u,p,h;function m(){return n[243](n[468])}function g(){return n[244](n[468])}return{c(){e=f("div"),t=f("span"),i=z(l),a=f("span"),c=z(r),u=_(),o(t,"class","svelte-1iuenvo"),o(a,"class","recent-date svelte-1iuenvo"),o(e,"class","recent-note svelte-1iuenvo"),o(e,"role","button"),o(e,"tabindex","0")},m(b,k){C(b,e,k),s(e,t),s(t,i),s(e,a),s(a,c),s(e,u),p||(h=[A(e,"click",m),A(e,"keydown",function(){Wt(kt(g))&&kt(g).apply(this,arguments)})],p=!0)},p(b,k){n=b,k[1]&16&&l!==(l=n[468].title+"")&&K(i,l),k[1]&16&&r!==(r=bt(n[468].createdAt)+"")&&K(c,r)},d(b){b&&w(e),p=!1,ve(h)}}}function da(n){let e,t,l,i=ue(n[38].slice(0,3)),a=[];for(let r=0;r<i.length;r+=1)a[r]=pa(Us(n,i,r));return{c(){e=f("div"),t=f("h3"),t.textContent=`${v("overview.recentEntries")}`,l=_();for(let r=0;r<a.length;r+=1)a[r].c();o(t,"class","svelte-1iuenvo"),o(e,"class","recent-section svelte-1iuenvo")},m(r,c){C(r,e,c),s(e,t),s(e,l);for(let u=0;u<a.length;u+=1)a[u]&&a[u].m(e,null)},p(r,c){if(c[1]&128){i=ue(r[38].slice(0,3));let u;for(u=0;u<i.length;u+=1){const p=Us(r,i,u);a[u]?a[u].p(p,c):(a[u]=pa(p),a[u].c(),a[u].m(e,null))}for(;u<a.length;u+=1)a[u].d(1);a.length=i.length}},d(r){r&&w(e),Re(a,r)}}}function pa(n){let e,t=n[465].summary+"",l,i,a=n[465].minutes+"",r,c,u=v("worklog.min")+"",p,h;return{c(){e=f("div"),l=z(t),i=z(" ("),r=z(a),c=_(),p=z(u),h=z(")"),o(e,"class","recent-entry svelte-1iuenvo")},m(m,g){C(m,e,g),s(e,l),s(e,i),s(e,r),s(e,c),s(e,p),s(e,h)},p(m,g){g[1]&128&&t!==(t=m[465].summary+"")&&K(l,t),g[1]&128&&a!==(a=m[465].minutes+"")&&K(r,a)},d(m){m&&w(e)}}}function va(n){let e;return{c(){e=f("span"),e.textContent="●",o(e,"class","dirty-mark svelte-1iuenvo")},m(t,l){C(t,e,l)},d(t){t&&w(e)}}}function ma(n){let e,t,l,i,a,r,c,u,p,h,m,g,b,k,y,S,T,E,I,D,N,M,j,R,O,H,V=v("common.create")+"",G,U,q,Y,B,F,W,P=n[68]&&_a(n);m=new ol({props:{kind:"folder",size:24}});let J=ue(n[13]),Q=[];for(let te=0;te<J.length;te+=1)Q[te]=ha(ks(n,J,te));const ee=te=>ge(Q[te],1,1,()=>{Q[te]=null});return{c(){e=f("div"),t=f("div"),l=f("h3"),l.textContent=`${v("nav.createNode")}`,i=_(),P&&P.c(),a=_(),r=f("div"),c=f("span"),c.textContent=`${v("template.select")}`,u=_(),p=f("div"),h=f("button"),Xe(m.$$.fragment),g=_(),b=f("div"),k=f("span"),k.textContent=`${v("template.optionNone")}`,y=_(),S=f("span"),S.textContent=`${v("template.none.desc")}`,T=_();for(let te=0;te<Q.length;te+=1)Q[te].c();E=_(),I=f("div"),D=f("label"),N=f("span"),N.textContent=`${v("common.name")}`,M=_(),j=f("input"),R=_(),O=f("div"),H=f("button"),G=z(V),q=_(),Y=f("button"),Y.textContent=`${v("common.cancel")}`,o(l,"class","svelte-1iuenvo"),o(c,"class","form-label svelte-1iuenvo"),o(k,"class","template-card-title svelte-1iuenvo"),o(S,"class","template-card-desc svelte-1iuenvo"),o(b,"class","template-card-text svelte-1iuenvo"),o(h,"class","template-card svelte-1iuenvo"),ae(h,"selected",n[69]===null),o(p,"class","template-cards svelte-1iuenvo"),o(p,"role","group"),o(p,"aria-label",v("template.select")),o(r,"class","form-group svelte-1iuenvo"),o(N,"class","label-text svelte-1iuenvo"),o(j,"type","text"),o(j,"placeholder",v("case.namePlaceholder")),o(j,"class","svelte-1iuenvo"),o(D,"class","svelte-1iuenvo"),o(I,"class","form-group svelte-1iuenvo"),o(H,"class","btn btn-primary svelte-1iuenvo"),H.disabled=U=!n[67].trim()||n[69]===void 0,o(Y,"class","btn svelte-1iuenvo"),o(O,"class","modal-actions svelte-1iuenvo"),o(t,"class","modal modal-create svelte-1iuenvo"),o(e,"class","modal-overlay svelte-1iuenvo"),o(e,"role","button"),o(e,"tabindex","0")},m(te,le){C(te,e,le),s(e,t),s(t,l),s(t,i),P&&P.m(t,null),s(t,a),s(t,r),s(r,c),s(r,u),s(r,p),s(p,h),Je(m,h,null),s(h,g),s(h,b),s(b,k),s(b,y),s(b,S),s(p,T);for(let se=0;se<Q.length;se+=1)Q[se]&&Q[se].m(p,null);s(t,E),s(t,I),s(I,D),s(D,N),s(D,M),s(D,j),ke(j,n[67]),s(t,R),s(t,O),s(O,H),s(H,G),s(O,q),s(O,Y),B=!0,F||(W=[A(h,"click",n[354]),A(j,"input",n[356]),A(j,"keydown",n[357]),A(H,"click",n[147]),A(Y,"click",n[146]),A(e,"click",Et(n[146])),A(e,"keydown",kt(n[146]))],F=!0)},p(te,le){if(te[68]?P?P.p(te,le):(P=_a(te),P.c(),P.m(t,a)):P&&(P.d(1),P=null),(!B||le[2]&128)&&ae(h,"selected",te[69]===null),le[0]&8192|le[2]&128){J=ue(te[13]);let se;for(se=0;se<J.length;se+=1){const ce=ks(te,J,se);Q[se]?(Q[se].p(ce,le),pe(Q[se],1)):(Q[se]=ha(ce),Q[se].c(),pe(Q[se],1),Q[se].m(p,null))}for(ut(),se=J.length;se<Q.length;se+=1)ee(se);ft()}le[2]&32&&j.value!==te[67]&&ke(j,te[67]),(!B||le[2]&160&&U!==(U=!te[67].trim()||te[69]===void 0))&&(H.disabled=U)},i(te){if(!B){pe(m.$$.fragment,te);for(let le=0;le<J.length;le+=1)pe(Q[le]);B=!0}},o(te){ge(m.$$.fragment,te),Q=Q.filter(lc);for(let le=0;le<Q.length;le+=1)ge(Q[le]);B=!1},d(te){te&&w(e),P&&P.d(),qe(m),Re(Q,te),F=!1,ve(W)}}}function _a(n){let e,t=v("nav.createInside")+"",l,i,a=n[68].title+"",r,c;return{c(){e=f("div"),l=z(t),i=z(" «"),r=z(a),c=z("»"),o(e,"class","create-context svelte-1iuenvo")},m(u,p){C(u,e,p),s(e,l),s(e,i),s(e,r),s(e,c)},p(u,p){p[2]&64&&a!==(a=u[68].title+"")&&K(r,a)},d(u){u&&w(e)}}}function ha(n){let e,t,l,i,a,r=v(n[460].title)+"",c,u,p,h=v(n[460].title+".desc")+"",m,g,b,k,y;t=new ol({props:{kind:n[460].icon||"generic",size:24}});function S(){return n[355](n[460])}return{c(){var T;e=f("button"),Xe(t.$$.fragment),l=_(),i=f("div"),a=f("span"),c=z(r),u=_(),p=f("span"),m=z(h),g=_(),o(a,"class","template-card-title svelte-1iuenvo"),o(p,"class","template-card-desc svelte-1iuenvo"),o(i,"class","template-card-text svelte-1iuenvo"),o(e,"class","template-card svelte-1iuenvo"),ae(e,"selected",((T=n[69])==null?void 0:T.id)===n[460].id)},m(T,E){C(T,e,E),Je(t,e,null),s(e,l),s(e,i),s(i,a),s(a,c),s(i,u),s(i,p),s(p,m),s(e,g),b=!0,k||(y=A(e,"click",S),k=!0)},p(T,E){var D;n=T;const I={};E[0]&8192&&(I.kind=n[460].icon||"generic"),t.$set(I),(!b||E[0]&8192)&&r!==(r=v(n[460].title)+"")&&K(c,r),(!b||E[0]&8192)&&h!==(h=v(n[460].title+".desc")+"")&&K(m,h),(!b||E[0]&8192|E[2]&128)&&ae(e,"selected",((D=n[69])==null?void 0:D.id)===n[460].id)},i(T){b||(pe(t.$$.fragment,T),b=!0)},o(T){ge(t.$$.fragment,T),b=!1},d(T){T&&w(e),qe(t),k=!1,y()}}}function ga(n){let e,t,l=n[70].node&&["folder","project","client","document","recipe"].includes(n[70].node.type),i,a,r,c,u,p,h,m,g,b,k=l&&ba(n),y=n[70].node&&n[70].node.parent_id&&ya(n);return{c(){e=f("div"),t=f("div"),k&&k.c(),i=_(),y&&y.c(),a=_(),r=f("button"),r.textContent=`${v("common.rename")}`,c=_(),u=f("button"),u.textContent=`${v("common.delete")}`,p=_(),h=f("button"),h.textContent=`${v("file.showInExplorer")}`,o(r,"class","context-menu-item svelte-1iuenvo"),o(u,"class","context-menu-item danger svelte-1iuenvo"),o(h,"class","context-menu-item svelte-1iuenvo"),o(t,"class","context-menu svelte-1iuenvo"),Ct(t,"left",n[70].x+"px"),Ct(t,"top",n[70].y+"px"),o(e,"class","context-menu-backdrop svelte-1iuenvo"),o(e,"role","button"),o(e,"tabindex","0")},m(S,T){C(S,e,T),s(e,t),k&&k.m(t,null),s(t,i),y&&y.m(t,null),s(t,a),s(t,r),s(t,c),s(t,u),s(t,p),s(t,h),m=!0,g||(b=[A(r,"click",n[360]),A(u,"click",n[361]),A(h,"click",n[362]),A(e,"click",n[149]),A(e,"contextmenu",ql(n[149])),A(e,"keydown",kt(n[149]))],g=!0)},p(S,T){T[2]&256&&(l=S[70].node&&["folder","project","client","document","recipe"].includes(S[70].node.type)),l?k?(k.p(S,T),T[2]&256&&pe(k,1)):(k=ba(S),k.c(),pe(k,1),k.m(t,i)):k&&(ut(),ge(k,1,1,()=>{k=null}),ft()),S[70].node&&S[70].node.parent_id?y?y.p(S,T):(y=ya(S),y.c(),y.m(t,a)):y&&(y.d(1),y=null),(!m||T[2]&256)&&Ct(t,"left",S[70].x+"px"),(!m||T[2]&256)&&Ct(t,"top",S[70].y+"px")},i(S){m||(pe(k),m=!0)},o(S){ge(k),m=!1},d(S){S&&w(e),k&&k.d(),y&&y.d(),g=!1,ve(b)}}}function ba(n){let e,t,l,i,a,r=ue(n[13].length>0?n[13]:[{id:"",title:"template.optionNone",icon:"folder"}]),c=[];for(let p=0;p<r.length;p+=1)c[p]=ka(bs(n,r,p));const u=p=>ge(c[p],1,1,()=>{c[p]=null});return{c(){e=f("div"),e.textContent=`${v("common.create")}`,t=_();for(let p=0;p<c.length;p+=1)c[p].c();l=_(),i=f("div"),o(e,"class","context-menu-section svelte-1iuenvo"),o(i,"class","context-menu-divider svelte-1iuenvo")},m(p,h){C(p,e,h),C(p,t,h);for(let m=0;m<c.length;m+=1)c[m]&&c[m].m(p,h);C(p,l,h),C(p,i,h),a=!0},p(p,h){if(h[0]&8192|h[4]&1048576){r=ue(p[13].length>0?p[13]:[{id:"",title:"template.optionNone",icon:"folder"}]);let m;for(m=0;m<r.length;m+=1){const g=bs(p,r,m);c[m]?(c[m].p(g,h),pe(c[m],1)):(c[m]=ka(g),c[m].c(),pe(c[m],1),c[m].m(l.parentNode,l))}for(ut(),m=r.length;m<c.length;m+=1)u(m);ft()}},i(p){if(!a){for(let h=0;h<r.length;h+=1)pe(c[h]);a=!0}},o(p){c=c.filter(lc);for(let h=0;h<c.length;h+=1)ge(c[h]);a=!1},d(p){p&&(w(e),w(t),w(l),w(i)),Re(c,p)}}}function ka(n){let e,t,l,i,a=v(n[460].title)+"",r,c,u,p;t=new ol({props:{kind:n[460].icon||"folder",size:16}});function h(){return n[358](n[460])}return{c(){e=f("button"),Xe(t.$$.fragment),l=_(),i=f("span"),r=z(a),o(i,"class","svelte-1iuenvo"),o(e,"class","context-menu-item svelte-1iuenvo")},m(m,g){C(m,e,g),Je(t,e,null),s(e,l),s(e,i),s(i,r),c=!0,u||(p=A(e,"click",h),u=!0)},p(m,g){n=m;const b={};g[0]&8192&&(b.kind=n[460].icon||"folder"),t.$set(b),(!c||g[0]&8192)&&a!==(a=v(n[460].title)+"")&&K(r,a)},i(m){c||(pe(t.$$.fragment,m),c=!0)},o(m){ge(t.$$.fragment,m),c=!1},d(m){m&&w(e),qe(t),u=!1,p()}}}function ya(n){let e,t,l,i,a;return{c(){e=f("button"),e.textContent=`${v("nav.moveToRoot")}`,t=_(),l=f("div"),o(e,"class","context-menu-item svelte-1iuenvo"),o(l,"class","context-menu-divider svelte-1iuenvo")},m(r,c){C(r,e,c),C(r,t,c),C(r,l,c),i||(a=A(e,"click",n[359]),i=!0)},p:ie,d(r){r&&(w(e),w(t),w(l)),i=!1,a()}}}function wa(n){let e,t,l,i=(n[47]?v("worklog.acceptSuggestion"):n[46]?v("worklog.editEntry"):v("worklog.addEntry"))+"",a,r,c,u,p,h,m,g,b,k,y,S,T,E,I,D,N,M,j,R,O,H,V,G,U,q,Y,B,F,W,P,J,Q,ee,te,le,se,ce,de,we=v("common.save")+"",ze,me,X,x,be,Ce;return{c(){e=f("div"),t=f("div"),l=f("h3"),a=z(i),r=_(),c=f("div"),u=f("label"),p=f("span"),p.textContent=`${v("worklog.date")}`,h=_(),m=f("input"),g=_(),b=f("div"),k=f("label"),y=f("span"),y.textContent=`${v("worklog.whatDone")}`,S=_(),T=f("input"),E=_(),I=f("div"),D=f("label"),N=f("span"),N.textContent=`${v("worklog.minutes")}`,M=_(),j=f("input"),R=_(),O=f("div"),H=f("label"),V=f("span"),V.textContent=`${v("worklog.details")}`,G=_(),U=f("textarea"),q=_(),Y=f("div"),B=f("label"),F=f("input"),W=_(),P=f("span"),P.textContent=`${v("journal.billableYes")}`,J=_(),Q=f("label"),ee=f("input"),te=_(),le=f("span"),le.textContent=`${v("journal.approxEstimated")}`,se=_(),ce=f("div"),de=f("button"),ze=z(we),X=_(),x=f("button"),x.textContent=`${v("common.cancel")}`,o(l,"class","svelte-1iuenvo"),o(p,"class","label-text svelte-1iuenvo"),o(m,"type","date"),o(m,"class","svelte-1iuenvo"),o(u,"class","svelte-1iuenvo"),o(c,"class","form-group svelte-1iuenvo"),o(y,"class","label-text svelte-1iuenvo"),o(T,"type","text"),o(T,"placeholder",v("worklog.whatDone")),o(T,"class","svelte-1iuenvo"),o(k,"class","svelte-1iuenvo"),o(b,"class","form-group svelte-1iuenvo"),o(N,"class","label-text svelte-1iuenvo"),o(j,"type","number"),o(j,"min","1"),o(j,"class","svelte-1iuenvo"),o(D,"class","svelte-1iuenvo"),o(I,"class","form-group svelte-1iuenvo"),o(V,"class","label-text svelte-1iuenvo"),o(U,"class","svelte-1iuenvo"),o(H,"class","svelte-1iuenvo"),o(O,"class","form-group svelte-1iuenvo"),o(F,"type","checkbox"),o(F,"class","svelte-1iuenvo"),o(P,"class","svelte-1iuenvo"),o(B,"class","checkbox-label-inline svelte-1iuenvo"),o(ee,"type","checkbox"),o(ee,"class","svelte-1iuenvo"),o(le,"class","svelte-1iuenvo"),o(Q,"class","checkbox-label-inline svelte-1iuenvo"),o(Y,"class","form-row svelte-1iuenvo"),o(de,"class","btn btn-primary svelte-1iuenvo"),de.disabled=me=!n[40].trim()||!n[41],o(x,"class","btn svelte-1iuenvo"),o(ce,"class","modal-actions svelte-1iuenvo"),o(t,"class","modal modal-worklog svelte-1iuenvo"),o(e,"class","modal-overlay svelte-1iuenvo"),o(e,"role","button"),o(e,"tabindex","0")},m(_e,He){C(_e,e,He),s(e,t),s(t,l),s(l,a),s(t,r),s(t,c),s(c,u),s(u,p),s(u,h),s(u,m),ke(m,n[42]),s(t,g),s(t,b),s(b,k),s(k,y),s(k,S),s(k,T),ke(T,n[40]),s(t,E),s(t,I),s(I,D),s(D,N),s(D,M),s(D,j),ke(j,n[41]),s(t,R),s(t,O),s(O,H),s(H,V),s(H,G),s(H,U),ke(U,n[43]),s(t,q),s(t,Y),s(Y,B),s(B,F),F.checked=n[44],s(B,W),s(B,P),s(Y,J),s(Y,Q),s(Q,ee),ee.checked=n[45],s(Q,te),s(Q,le),s(t,se),s(t,ce),s(ce,de),s(de,ze),s(ce,X),s(ce,x),be||(Ce=[A(m,"input",n[363]),A(T,"input",n[364]),A(j,"input",n[365]),A(U,"input",n[366]),A(F,"change",n[367]),A(ee,"change",n[368]),A(de,"click",n[169]),A(x,"click",n[168]),A(e,"click",Et(n[168])),A(e,"keydown",kt(n[168]))],be=!0)},p(_e,He){He[1]&98304&&i!==(i=(_e[47]?v("worklog.acceptSuggestion"):_e[46]?v("worklog.editEntry"):v("worklog.addEntry"))+"")&&K(a,i),He[1]&2048&&ke(m,_e[42]),He[1]&512&&T.value!==_e[40]&&ke(T,_e[40]),He[1]&1024&&ll(j.value)!==_e[41]&&ke(j,_e[41]),He[1]&4096&&ke(U,_e[43]),He[1]&8192&&(F.checked=_e[44]),He[1]&16384&&(ee.checked=_e[45]),He[1]&1536&&me!==(me=!_e[40].trim()||!_e[41])&&(de.disabled=me)},d(_e){_e&&w(e),be=!1,ve(Ce)}}}function Ca(n){let e,t,l,i,a,r,c,u,p,h,m,g,b,k,y,S,T,E,I,D=(n[75]==="open_url"?v("action.dataUrl"):n[75]==="open_folder"||n[75]==="open_file"?v("action.dataPath"):v("action.dataCommand"))+"",N,M,j,R,O,H,V,G,U,q,Y,B=ue(n[116]),F=[];for(let W=0;W<B.length;W+=1)F[W]=Sa(gs(n,B,W));return{c(){e=f("div"),t=f("div"),l=f("h3"),l.textContent=`${v("action.newAction")}`,i=_(),a=f("div"),r=f("label"),c=f("span"),c.textContent=`${v("common.name")}`,u=_(),p=f("input"),h=_(),m=f("div"),g=f("label"),b=f("span"),b.textContent=`${v("common.type")}`,k=_(),y=f("select");for(let W=0;W<F.length;W+=1)F[W].c();S=_(),T=f("div"),E=f("label"),I=f("span"),N=z(D),M=_(),j=f("input"),O=_(),H=f("div"),V=f("button"),V.textContent=`${v("common.create")}`,G=_(),U=f("button"),U.textContent=`${v("common.cancel")}`,o(l,"class","svelte-1iuenvo"),o(c,"class","label-text svelte-1iuenvo"),o(p,"type","text"),o(p,"placeholder",v("action.namePlaceholder")),o(p,"class","svelte-1iuenvo"),o(r,"class","svelte-1iuenvo"),o(a,"class","form-group svelte-1iuenvo"),o(b,"class","label-text svelte-1iuenvo"),o(y,"class","svelte-1iuenvo"),n[75]===void 0&&xt(()=>n[371].call(y)),o(g,"class","svelte-1iuenvo"),o(m,"class","form-group svelte-1iuenvo"),o(I,"class","label-text svelte-1iuenvo"),o(j,"type","text"),o(j,"placeholder",R=n[75]==="open_url"?v("action.urlPlaceholder"):n[75]==="open_folder"||n[75]==="open_file"?v("action.pathPlaceholder"):v("action.commandPlaceholder")),o(j,"class","svelte-1iuenvo"),o(E,"class","svelte-1iuenvo"),o(T,"class","form-group svelte-1iuenvo"),o(V,"class","btn btn-primary svelte-1iuenvo"),o(U,"class","btn svelte-1iuenvo"),o(H,"class","modal-actions svelte-1iuenvo"),o(t,"class","modal svelte-1iuenvo"),o(e,"class","modal-overlay svelte-1iuenvo"),o(e,"role","button"),o(e,"tabindex","0")},m(W,P){C(W,e,P),s(e,t),s(t,l),s(t,i),s(t,a),s(a,r),s(r,c),s(r,u),s(r,p),ke(p,n[74]),s(t,h),s(t,m),s(m,g),s(g,b),s(g,k),s(g,y);for(let J=0;J<F.length;J+=1)F[J]&&F[J].m(y,null);Bt(y,n[75],!0),s(t,S),s(t,T),s(T,E),s(E,I),s(I,N),s(E,M),s(E,j),ke(j,n[76]),s(t,O),s(t,H),s(H,V),s(H,G),s(H,U),q||(Y=[A(p,"input",n[369]),A(p,"keydown",n[370]),A(y,"change",n[371]),A(j,"input",n[372]),A(j,"keydown",n[373]),A(V,"click",n[218]),A(U,"click",n[217]),A(e,"click",Et(n[217])),A(e,"keydown",kt(n[217]))],q=!0)},p(W,P){if(P[2]&4096&&p.value!==W[74]&&ke(p,W[74]),P[3]&8388608){B=ue(W[116]);let J;for(J=0;J<B.length;J+=1){const Q=gs(W,B,J);F[J]?F[J].p(Q,P):(F[J]=Sa(Q),F[J].c(),F[J].m(y,null))}for(;J<F.length;J+=1)F[J].d(1);F.length=B.length}P[2]&8192|P[3]&8388608&&Bt(y,W[75]),P[2]&8192&&D!==(D=(W[75]==="open_url"?v("action.dataUrl"):W[75]==="open_folder"||W[75]==="open_file"?v("action.dataPath"):v("action.dataCommand"))+"")&&K(N,D),P[2]&8192|P[3]&8388608&&R!==(R=W[75]==="open_url"?v("action.urlPlaceholder"):W[75]==="open_folder"||W[75]==="open_file"?v("action.pathPlaceholder"):v("action.commandPlaceholder"))&&o(j,"placeholder",R),P[2]&16384&&j.value!==W[76]&&ke(j,W[76])},d(W){W&&w(e),Re(F,W),q=!1,ve(Y)}}}function Sa(n){let e,t=n[457].label+"",l;return{c(){e=f("option"),l=z(t),e.__value=n[457].id,ke(e,e.__value),o(e,"class","svelte-1iuenvo")},m(i,a){C(i,e,a),s(e,l)},p:ie,d(i){i&&w(e)}}}function Ta(n){let e,t,l,i=v("file.importTitle")+"",a,r,c=(n[33]?n[33].title:"")+"",u,p,h,m,g,b,k,y=n[79].files+"",S,T,E,I,D,N=n[79].folders+"",M,j,R,O,H,V=(n[79].totalBytes/1024).toFixed(1)+"",G,U,q,Y,B,F,W,P,J,Q,ee,te,le=n[79].isDangerous&&Ea(n);return{c(){e=f("div"),t=f("div"),l=f("h3"),a=z(i),r=z(" «"),u=z(c),p=z("»"),h=_(),m=f("div"),g=f("div"),b=f("span"),b.textContent=`${v("file.importFiles")}`,k=f("span"),S=z(y),T=_(),E=f("div"),I=f("span"),I.textContent=`${v("file.importFolders")}`,D=f("span"),M=z(N),j=_(),R=f("div"),O=f("span"),O.textContent=`${v("file.importSize")}`,H=f("span"),G=z(V),U=z(" KB"),q=_(),le&&le.c(),Y=_(),B=f("div"),F=f("button"),F.textContent=`${v("file.importCopy")}`,W=_(),P=f("button"),P.textContent=`${v("file.importLink")}`,J=_(),Q=f("button"),Q.textContent=`${v("common.cancel")}`,o(l,"class","svelte-1iuenvo"),o(b,"class","svelte-1iuenvo"),o(k,"class","svelte-1iuenvo"),o(g,"class","summary-row svelte-1iuenvo"),o(I,"class","svelte-1iuenvo"),o(D,"class","svelte-1iuenvo"),o(E,"class","summary-row svelte-1iuenvo"),o(O,"class","svelte-1iuenvo"),o(H,"class","svelte-1iuenvo"),o(R,"class","summary-row svelte-1iuenvo"),o(m,"class","import-summary svelte-1iuenvo"),o(F,"class","btn btn-primary svelte-1iuenvo"),o(P,"class","btn svelte-1iuenvo"),o(Q,"class","btn svelte-1iuenvo"),o(B,"class","modal-actions svelte-1iuenvo"),o(t,"class","modal svelte-1iuenvo"),o(e,"class","modal-overlay svelte-1iuenvo"),o(e,"role","button"),o(e,"tabindex","0")},m(se,ce){C(se,e,ce),s(e,t),s(t,l),s(l,a),s(l,r),s(l,u),s(l,p),s(t,h),s(t,m),s(m,g),s(g,b),s(g,k),s(k,S),s(m,T),s(m,E),s(E,I),s(E,D),s(D,M),s(m,j),s(m,R),s(R,O),s(R,H),s(H,G),s(H,U),s(m,q),le&&le.m(m,null),s(t,Y),s(t,B),s(B,F),s(B,W),s(B,P),s(B,J),s(B,Q),ee||(te=[A(F,"click",n[374]),A(P,"click",n[375]),A(Q,"click",n[193]),A(e,"click",Et(n[193])),A(e,"keydown",kt(n[193]))],ee=!0)},p(se,ce){ce[1]&4&&c!==(c=(se[33]?se[33].title:"")+"")&&K(u,c),ce[2]&131072&&y!==(y=se[79].files+"")&&K(S,y),ce[2]&131072&&N!==(N=se[79].folders+"")&&K(M,N),ce[2]&131072&&V!==(V=(se[79].totalBytes/1024).toFixed(1)+"")&&K(G,V),se[79].isDangerous?le?le.p(se,ce):(le=Ea(se),le.c(),le.m(m,null)):le&&(le.d(1),le=null)},d(se){se&&w(e),le&&le.d(),ee=!1,ve(te)}}}function Ea(n){let e,t,l,i,a,r,c=n[79].dangerReason+"",u;return{c(){e=f("div"),t=$("svg"),l=$("path"),i=$("line"),a=$("line"),r=_(),u=z(c),o(l,"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"),o(l,"class","svelte-1iuenvo"),o(i,"x1","12"),o(i,"y1","9"),o(i,"x2","12"),o(i,"y2","13"),o(i,"class","svelte-1iuenvo"),o(a,"x1","12"),o(a,"y1","17"),o(a,"x2","12.01"),o(a,"y2","17"),o(a,"class","svelte-1iuenvo"),o(t,"width","14"),o(t,"height","14"),o(t,"viewBox","0 0 24 24"),o(t,"fill","none"),o(t,"stroke","currentColor"),o(t,"stroke-width","2"),o(t,"stroke-linecap","round"),o(t,"stroke-linejoin","round"),o(t,"class","svelte-1iuenvo"),o(e,"class","summary-warn svelte-1iuenvo")},m(p,h){C(p,e,h),s(e,t),s(t,l),s(t,i),s(t,a),s(e,r),s(e,u)},p(p,h){h[2]&131072&&c!==(c=p[79].dangerReason+"")&&K(u,c)},d(p){p&&w(e)}}}function Ia(n){let e,t,l,i,a,r,c,u,p,h,m,g,b,k,y,S,T,E=n[103]&&Na(n);return{c(){e=f("div"),t=f("div"),l=f("h3"),l.textContent=`${v("rename.title")}`,i=_(),a=f("div"),r=f("label"),c=f("span"),c.textContent=`${v("common.newName")}`,u=_(),p=f("input"),h=_(),E&&E.c(),m=_(),g=f("div"),b=f("button"),b.textContent=`${v("common.rename")}`,k=_(),y=f("button"),y.textContent=`${v("common.cancel")}`,o(l,"class","svelte-1iuenvo"),o(c,"class","label-text svelte-1iuenvo"),o(p,"type","text"),o(p,"class","svelte-1iuenvo"),o(r,"class","svelte-1iuenvo"),o(a,"class","form-group svelte-1iuenvo"),o(b,"class","btn btn-primary svelte-1iuenvo"),o(y,"class","btn svelte-1iuenvo"),o(g,"class","modal-actions svelte-1iuenvo"),o(t,"class","modal svelte-1iuenvo"),o(e,"class","modal-overlay svelte-1iuenvo"),o(e,"role","button"),o(e,"tabindex","0")},m(I,D){C(I,e,D),s(e,t),s(t,l),s(t,i),s(t,a),s(a,r),s(r,c),s(r,u),s(r,p),ke(p,n[102]),s(t,h),E&&E.m(t,null),s(t,m),s(t,g),s(g,b),s(g,k),s(g,y),S||(T=[A(p,"input",n[376]),A(p,"keydown",n[141]),A(b,"click",n[139]),A(y,"click",n[140]),A(e,"click",Et(n[140])),A(e,"keydown",kt(n[140]))],S=!0)},p(I,D){D[3]&512&&p.value!==I[102]&&ke(p,I[102]),I[103]?E?E.p(I,D):(E=Na(I),E.c(),E.m(t,m)):E&&(E.d(1),E=null)},d(I){I&&w(e),E&&E.d(),S=!1,ve(T)}}}function Na(n){let e,t;return{c(){e=f("div"),t=z(n[103]),o(e,"class","rename-error svelte-1iuenvo")},m(l,i){C(l,e,i),s(e,t)},p(l,i){i[3]&1024&&K(t,l[103])},d(l){l&&w(e)}}}function Da(n){let e,t,l,i,a,r=n[104].title+"",c,u,p,h,m,g,b,k,y,S,T,E,I=v("inbox.assign")+"",D,N,M,j,R,O,H=n[106].length>0&&Ma(n),V=n[108]&&Aa();return{c(){e=f("div"),t=f("div"),l=f("h3"),l.textContent=`${v("inbox.assignTitle")}`,i=_(),a=f("div"),c=z(r),u=_(),p=f("div"),h=f("label"),m=f("span"),m.textContent=`${v("inbox.assignTarget")}`,g=_(),b=f("input"),k=_(),H&&H.c(),y=_(),V&&V.c(),S=_(),T=f("div"),E=f("button"),D=z(I),M=_(),j=f("button"),j.textContent=`${v("common.cancel")}`,o(l,"class","svelte-1iuenvo"),o(a,"class","create-context svelte-1iuenvo"),o(m,"class","label-text svelte-1iuenvo"),o(b,"type","text"),o(b,"placeholder",v("inbox.assignSearchPlaceholder")),o(b,"class","svelte-1iuenvo"),o(h,"class","svelte-1iuenvo"),o(p,"class","form-group assign-search svelte-1iuenvo"),o(E,"class","btn btn-primary svelte-1iuenvo"),E.disabled=N=!n[107],o(j,"class","btn svelte-1iuenvo"),o(T,"class","modal-actions svelte-1iuenvo"),o(t,"class","modal svelte-1iuenvo"),o(e,"class","modal-overlay svelte-1iuenvo"),o(e,"role","button"),o(e,"tabindex","0")},m(G,U){C(G,e,U),s(e,t),s(t,l),s(t,i),s(t,a),s(a,c),s(t,u),s(t,p),s(p,h),s(h,m),s(h,g),s(h,b),ke(b,n[105]),s(p,k),H&&H.m(p,null),s(t,y),V&&V.m(t,null),s(t,S),s(t,T),s(T,E),s(E,D),s(T,M),s(T,j),R||(O=[A(b,"input",n[377]),A(b,"input",n[205]),A(b,"keydown",n[378]),A(E,"click",n[207]),A(j,"click",n[204]),A(e,"click",Et(n[204])),A(e,"keydown",kt(n[204]))],R=!0)},p(G,U){U[3]&2048&&r!==(r=G[104].title+"")&&K(c,r),U[3]&4096&&b.value!==G[105]&&ke(b,G[105]),G[106].length>0?H?H.p(G,U):(H=Ma(G),H.c(),H.m(p,null)):H&&(H.d(1),H=null),G[108]?V||(V=Aa(),V.c(),V.m(t,S)):V&&(V.d(1),V=null),U[3]&16384&&N!==(N=!G[107])&&(E.disabled=N)},d(G){G&&w(e),H&&H.d(),V&&V.d(),R=!1,ve(O)}}}function Ma(n){let e,t=ue(n[106]),l=[];for(let i=0;i<t.length;i+=1)l[i]=ja(hs(n,t,i));return{c(){e=f("div");for(let i=0;i<l.length;i+=1)l[i].c();o(e,"class","assign-search-results svelte-1iuenvo")},m(i,a){C(i,e,a);for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(e,null)},p(i,a){if(a[3]&8192|a[6]&1049600){t=ue(i[106]);let r;for(r=0;r<t.length;r+=1){const c=hs(i,t,r);l[r]?l[r].p(c,a):(l[r]=ja(c),l[r].c(),l[r].m(e,null))}for(;r<l.length;r+=1)l[r].d(1);l.length=t.length}},d(i){i&&w(e),Re(l,i)}}}function ja(n){let e,t,l=(n[454].path||n[454].title)+"",i,a,r,c=n[196](n[454].type)+"",u,p,h,m;function g(){return n[379](n[454])}return{c(){e=f("button"),t=f("span"),i=z(l),a=_(),r=f("span"),u=z(c),p=_(),o(t,"class","svelte-1iuenvo"),o(r,"class","svelte-1iuenvo"),o(e,"class","assign-search-result svelte-1iuenvo")},m(b,k){C(b,e,k),s(e,t),s(t,i),s(e,a),s(e,r),s(r,u),s(e,p),h||(m=A(e,"click",g),h=!0)},p(b,k){n=b,k[3]&8192&&l!==(l=(n[454].path||n[454].title)+"")&&K(i,l),k[3]&8192&&c!==(c=n[196](n[454].type)+"")&&K(u,c)},d(b){b&&w(e),h=!1,m()}}}function Aa(n){let e;return{c(){e=f("div"),e.textContent=`${v("common.loading")}`,o(e,"class","assign-status svelte-1iuenvo")},m(t,l){C(t,e,l)},d(t){t&&w(e)}}}function La(n){let e,t,l,i,a,r,c,u,p,h,m,g,b,k,y,S,T,E,I,D,N,M,j,R,O,H=v("common.save")+"",V,G,U,q,Y,B,F=n[60]&&Pa(n);return{c(){e=f("div"),t=f("div"),l=f("h3"),l.textContent=`${v("links.editTitle")}`,i=_(),a=f("div"),r=f("label"),c=f("span"),c.textContent=`${v("common.name")}`,u=_(),p=f("input"),h=_(),m=f("div"),g=f("label"),b=f("span"),b.textContent="URL",k=_(),y=f("input"),S=_(),T=f("div"),E=f("label"),I=f("span"),I.textContent=`${v("links.note")}`,D=_(),N=f("textarea"),M=_(),F&&F.c(),j=_(),R=f("div"),O=f("button"),V=z(H),U=_(),q=f("button"),q.textContent=`${v("common.cancel")}`,o(l,"class","svelte-1iuenvo"),o(c,"class","label-text svelte-1iuenvo"),o(p,"type","text"),o(p,"class","svelte-1iuenvo"),o(r,"class","svelte-1iuenvo"),o(a,"class","form-group svelte-1iuenvo"),o(b,"class","label-text svelte-1iuenvo"),o(y,"type","url"),o(y,"class","svelte-1iuenvo"),o(g,"class","svelte-1iuenvo"),o(m,"class","form-group svelte-1iuenvo"),o(I,"class","label-text svelte-1iuenvo"),o(N,"class","svelte-1iuenvo"),o(E,"class","svelte-1iuenvo"),o(T,"class","form-group svelte-1iuenvo"),o(O,"class","btn btn-primary svelte-1iuenvo"),O.disabled=G=!n[58].trim(),o(q,"class","btn svelte-1iuenvo"),o(R,"class","modal-actions svelte-1iuenvo"),o(t,"class","modal svelte-1iuenvo"),o(e,"class","modal-overlay svelte-1iuenvo"),o(e,"role","button"),o(e,"tabindex","0")},m(W,P){C(W,e,P),s(e,t),s(t,l),s(t,i),s(t,a),s(a,r),s(r,c),s(r,u),s(r,p),ke(p,n[57]),s(t,h),s(t,m),s(m,g),s(g,b),s(g,k),s(g,y),ke(y,n[58]),s(t,S),s(t,T),s(T,E),s(E,I),s(E,D),s(E,N),ke(N,n[59]),s(t,M),F&&F.m(t,null),s(t,j),s(t,R),s(R,O),s(O,V),s(R,U),s(R,q),Y||(B=[A(p,"input",n[380]),A(y,"input",n[381]),A(N,"input",n[382]),A(O,"click",n[212]),A(q,"click",n[211]),A(e,"click",Et(n[211])),A(e,"keydown",kt(n[211]))],Y=!0)},p(W,P){P[1]&67108864&&p.value!==W[57]&&ke(p,W[57]),P[1]&134217728&&y.value!==W[58]&&ke(y,W[58]),P[1]&268435456&&ke(N,W[59]),W[60]?F?F.p(W,P):(F=Pa(W),F.c(),F.m(t,j)):F&&(F.d(1),F=null),P[1]&134217728&&G!==(G=!W[58].trim())&&(O.disabled=G)},d(W){W&&w(e),F&&F.d(),Y=!1,ve(B)}}}function Pa(n){let e,t;return{c(){e=f("div"),t=z(n[60]),o(e,"class","rename-error svelte-1iuenvo")},m(l,i){C(l,e,i),s(e,t)},p(l,i){i[1]&536870912&&K(t,l[60])},d(l){l&&w(e)}}}function Fa(n){let e,t;return e=new rp({props:{title:n[97],message:n[98],confirmText:n[100],danger:n[99]}}),e.$on("confirm",n[142]),e.$on("cancel",n[143]),{c(){Xe(e.$$.fragment)},m(l,i){Je(e,l,i),t=!0},p(l,i){const a={};i[3]&16&&(a.title=l[97]),i[3]&32&&(a.message=l[98]),i[3]&128&&(a.confirmText=l[100]),i[3]&64&&(a.danger=l[99]),e.$set(a)},i(l){t||(pe(e.$$.fragment,l),t=!0)},o(l){ge(e.$$.fragment,l),t=!1},d(l){qe(e,l)}}}function Ra(n){let e,t;return e=new ip({props:{item:n[86],content:n[87],loading:n[88],error:n[89]}}),e.$on("close",n[126]),e.$on("openExternal",n[383]),{c(){Xe(e.$$.fragment)},m(l,i){Je(e,l,i),t=!0},p(l,i){const a={};i[2]&16777216&&(a.item=l[86]),i[2]&33554432&&(a.content=l[87]),i[2]&67108864&&(a.loading=l[88]),i[2]&134217728&&(a.error=l[89]),e.$set(a)},i(l){t||(pe(e.$$.fragment,l),t=!0)},o(l){ge(e.$$.fragment,l),t=!1},d(l){qe(e,l)}}}function Oa(n){let e,t;return e=new Iv({props:{onClose:n[226],onSyncRefresh:n[224],initialSection:n[113]}}),{c(){Xe(e.$$.fragment)},m(l,i){Je(e,l,i),t=!0},p(l,i){const a={};i[3]&1048576&&(a.initialSection=l[113]),e.$set(a)},i(l){t||(pe(e.$$.fragment,l),t=!0)},o(l){ge(e.$$.fragment,l),t=!1},d(l){qe(e,l)}}}function T_(n){let e,t,l,i;const a=[Zv,Xv,Qv],r=[];function c(u,p){return u[8]?0:u[9]?1:2}return e=c(n),t=r[e]=a[e](n),{c(){t.c(),l=ht()},m(u,p){r[e].m(u,p),C(u,l,p),i=!0},p(u,p){let h=e;e=c(u),e===h?r[e].p(u,p):(ut(),ge(r[h],1,1,()=>{r[h]=null}),ft(),t=r[e],t?t.p(u,p):(t=r[e]=a[e](u),t.c()),pe(t,1),t.m(l.parentNode,l))},i(u){i||(pe(t),i=!0)},o(u){ge(t),i=!1},d(u){u&&w(l),r[e].d(u)}}}function oe(n,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[n];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails call error:",n,t)}return Promise.reject(new Error("Wails not connected: "+n))}function E_(n,e,t){const l=[...n];return l.sort((i,a)=>{let r=0;if(e==="name")r=(i.title||"").localeCompare(a.title||"");else if(e==="type"){const c=i.captureKind||i.sourceKind||i.type||"",u=a.captureKind||a.sourceKind||a.type||"";r=c.localeCompare(u)}else r=(i.capturedAt||i.createdAt||"").localeCompare(a.capturedAt||a.createdAt||"");return t==="asc"?r:-r}),l}function I_(n,e){return n.section===e.section&&n.nodeId===e.nodeId&&n.tab===e.tab&&n.trashFolderId===e.trashFolderId}function el(n){return!n||!(n instanceof Element)?!1:!!n.closest('input, textarea, select, [contenteditable="true"], [contenteditable=""]')}function Tn(n,e,t){for(const l of n){if(l.id===e)return l.children=t,l.has_children=t.length>0,!0;if(l.children&&Tn(l.children,e,t))return!0}return!1}function ic(n){return(n==null?void 0:n.sourceKind)||(n==null?void 0:n.captureKind)||(n==null?void 0:n.type)||""}function Xl(n){return ic(n)!=="url"&&(n==null?void 0:n.type)!=="link"}function N_(n,e){return{id:n.id,nodeId:n.id,fileId:e.id||e.fileId,name:e.name||n.title,type:"file",size:e.size||0,mime:e.mime||""}}function oc(n,e,t){for(const l of n){if(l.id===e)return l.children=t,l.has_children=t.length>0,!0;if(l.children&&oc(l.children,e,t))return!0}return!1}function D_(n,e){return e?n.filter(t=>Hl(t)===e):n.filter(t=>!Hl(t)||!n.some(l=>l.id===Hl(t)))}function Hl(n){return(n==null?void 0:n.parentId)||(n==null?void 0:n.parentID)||(n==null?void 0:n.parent_id)||""}function Xn(n){return n.eventIds&&n.eventIds.length?n.eventIds:n.events&&n.events.length?n.events.map(e=>e.id).filter(Boolean):[]}function Zn(n){try{oe("WriteDebugLog",n)}catch{}}function Bl(n){return n?n.map(e=>(e._expanded===void 0&&(e._expanded=!1),e)):[]}function wt(n){return n?new Date(n).toLocaleTimeString("ru-RU",{hour:"2-digit",minute:"2-digit"}):""}function Nn(n){return n==="note_created"||n==="file_added"||n==="folder_added"||n==="node_created"?"+":n==="file_deleted"||n==="folder_deleted"?"×":n==="file_renamed"||n==="folder_renamed"||n==="note_updated"||n==="node_updated"?"~":n==="file_copied"?"⧉":n==="file_moved"?"→":"•"}function bt(n){if(!n)return"";try{return new Date(n).toLocaleDateString("ru-RU",{day:"numeric",month:"short"})}catch{return n}}function Wl(n){const e=String(n||"").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 l=`https://${e}`,i=new URL(l);return i.hostname&&i.hostname.includes(".")?l:""}catch{return""}}}function M_(n){return{"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp"}[n]||"bin"}function j_(n){return new Promise((e,t)=>{const l=new FileReader;l.onload=()=>{const i=String(l.result||""),a=i.indexOf(",");e(a>=0?i.slice(a+1):i)},l.onerror=()=>t(l.error),l.readAsDataURL(n)})}function A_(n){const e=String(n||"").split(/\r?\n/).map(t=>t.trim()).filter(Boolean);return e.length?{url:e[0],title:e[1]||""}:null}function L_(n){return String(n||"").split(/\r?\n/).map(t=>t.trim()).filter(t=>t&&!t.startsWith("#"))[0]||""}function za(n){const e=Array.from((n==null?void 0:n.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 P_(n){return["case","client","project","folder","document","recipe"].includes(n.type)}function F_(n){return n.targetType==="note"&&n.targetId?{nodeId:n.nodeId,tab:"notes",targetId:n.targetId}:n.targetType==="file"?{nodeId:n.nodeId,tab:"files",targetId:n.targetId,targetPath:n.targetPath}:n.targetType==="folder"?{nodeId:n.nodeId,tab:"files",targetPath:n.targetPath||n.targetId}:{nodeId:n.nodeId}}function kt(n){return e=>{el(e.target)||(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),n())}}function R_(n,e,t){var io;let l,i,a=null,r=!1,c=!1,u=!1,p=!1,h=[],m=[],g=[],b=null,k=[],y=0,S=!0,T=[],E=null,I="",D="",N=!1,M="",j="all",R="all",O="",H="",V="",G=[],U=!1,q=[],Y="",B="";function F(d){return{"vault not open":v("error.vaultNotOpen")}[d]||d}let W="",P=null,J="overview",Q=[],ee=null,te=[],le=[],se=[],ce=!1,de="",we="",ze="",me="",X=!1,x=!1,be=null,Ce=null,_e=[],He=0,Ze=[],pt=[],Ye=[],Ie=[],Oe=!1,Me="",Z="date",ye="desc",Pe=!1,je=[],Be=null,Ae="",Ee="",We="",Ue="",$e=null,Fe=0,he=[],Ne="",Le=[],ot=[],rt="",xe="",Ke=[],tt=!1,Qe=!1,Ge="",re=null,Se=null,vt={visible:!1,x:0,y:0,node:null},yt=!1,gt="",mt=!1,St="",vn="open_url",Lt="",sl=[{id:"open_url",label:v("action.openUrl")},{id:"open_file",label:v("action.openFile")},{id:"open_folder",label:v("action.openFolder")},{id:"run_command",label:v("action.runCommand")},{id:"run_script",label:v("action.runScript")},{id:"open_terminal",label:v("action.openTerminal")},{id:"launch_app",label:v("action.launchApp")}],$t=!0,rl=!1,Dn=null,mn=!1,al="",Zl="",It={},cl=!1,at=null,_t=[],ct=[],Pt=null,en="",ul=!1,Mn="",Nt={items:[],mode:"copy"},Ve=[],_n=[],fl=!1,hn=!1,jn=!1,xl="",An=!1,$l="",ei="",ti=!1,ni=v("common.delete"),Ln=null,Pn=null,tn=!1,Fn="",nn="",ln="",jt=null,Ft="",Vt=[],Rt=null,Rn=!1,li,dl=null,pl=!1,gn="",On="";const sc=[{id:"overview",label:v("tab.overview")},{id:"notes",label:v("tab.notes")},{id:"files",label:v("tab.files")},{id:"links",label:v("tab.links")},{id:"actions",label:v("tab.actions")},{id:"activity",label:v("tab.activity"),group:"service"},{id:"worklog",label:v("tab.worklog"),group:"service"},{id:"inbox",label:v("tab.inbox"),group:"service"}];let vl=null;function rc(d){const L={};for(const fe of d){const De=fe.captureContextLabel||v("inbox.noContext");L[De]||(L[De]=[]),L[De].push(fe)}const ne=[];for(const[fe,De]of Object.entries(L))ne.push({label:fe,items:De});return ne.sort((fe,De)=>fe.label.localeCompare(De.label)),ne}function ac(){return{section:W||"",nodeId:(P==null?void 0:P.id)||"",tab:P?J:"",trashFolderId:W==="trash"?Ne:"",trashFolderStack:W==="trash"?Le.map(d=>({id:d.id,title:d.title})):[]}}function Ot(){if(tt)return;const d=ac(),L=Ke[Ke.length-1];(!L||!I_(L,d))&&(Ke=[...Ke,d].slice(-80))}function ml(){t(5,Ne=""),t(230,Le=[]),t(62,he=[])}function cc(){return An?(kl(),!0):p?(lo(),!0):Pt?(Hn(),!0):jt?(Al(),!0):Be?(Ll(),!0):tn?(t(101,tn=!1),!0):ce?(Di(),!0):mn?(Hi(),!0):mt?(eo(),!0):yt?(Ti(),!0):Qe?(bi(),!0):vt.visible?(Kt(),!0):ee?(Ni(),!0):!1}async function uc(d){tt=!0;try{if(d.nodeId){const L=await oe("GetNodeDetail",d.nodeId);L&&(await zt(L),t(34,J=d.tab||"overview"),J==="files"&&ct.length===0&&await st(L.id))}else d.section&&(await _l(d.section),d.section==="trash"&&(t(5,Ne=d.trashFolderId||""),t(230,Le=d.trashFolderStack||[]),t(62,he=[]),await kn()))}finally{tt=!1}}async function ii(){if(cc())return;const d=Ke[Ke.length-1];d&&(Ke=Ke.slice(0,-1),await uc(d))}function oi(d){d.button===3&&(el(d.target)||(d.preventDefault(),ii()))}function Ut(d){J!==d&&(Ot(),t(34,J=d),d==="files"&&P&&ct.length===0&&!at&&st(P.id))}Ba(async()=>{try{if(t(7,a=await oe("GetStartupStatus")),r=!0,a.status==="first_run"){t(8,c=!0),t(77,$t=!1);return}if(a.status==="recovery"){t(9,u=!0),t(77,$t=!1);return}}catch(d){t(31,B=String(d))}try{t(30,Y=await oe("VerstakVersion")||"verstak-gui/v2"),t(11,h=await oe("ListSystemViews")||[]),t(12,m=await oe("ListWorkspaceTree")||[]),t(13,g=await oe("ListEnabledTemplates")||[])}catch(d){t(31,B=String(d)),t(11,h=[{id:"today",label:v("nav.today")},{id:"inbox",label:v("nav.inbox")},{id:"activity",label:v("nav.activity")}]),t(12,m=[]),t(13,g=[])}window.runtime&&window.runtime.EventsOn&&(window.runtime.EventsOn("files-dropped",Kc),vl=()=>window.runtime.EventsOff("files-dropped")),window.addEventListener("keydown",mi),window.addEventListener("paste",Ui),window.addEventListener("dragover",Ki),window.addEventListener("dragleave",Gi),window.addEventListener("drop",Ji),window.addEventListener("auxclick",oi),t(77,$t=!1),Fl(),Mi()}),Ql(()=>{vl&&vl(),window.removeEventListener("keydown",mi),window.removeEventListener("paste",Ui),window.removeEventListener("dragover",Ki),window.removeEventListener("dragleave",Gi),window.removeEventListener("drop",Ji),window.removeEventListener("auxclick",oi)});async function _l(d){Ot(),t(32,W=d),t(33,P=null),t(34,J="overview"),t(35,Q=[]),te=[],t(37,le=[]),t(38,se=[]),t(52,Ie=[]),t(55,je=[]),t(48,_e=[]),t(0,Ye=[]),t(4,$e=null),ml(),t(66,Qe=!1),t(31,B=""),t(14,b=null),t(50,Ze=[]),t(51,pt=[]),t(15,k=[]),y=0,S=!0,t(16,T=[]),t(17,E=null);try{d==="today"?(t(14,b=await oe("ListTodayView")||{cases:[]}),t(48,_e=await oe("GetSuggestions")||[]),t(49,He=_e.length),t(50,Ze=await oe("ListTodayInProgress")||[]),t(51,pt=await oe("ListTodayCaptures")||[])):d==="inbox"?t(0,Ye=await oe("ListInboxNodes")||[]):d==="trash"?await kn():d==="journal"?await Jt():d==="activity"&&(t(15,k=await oe("ListActivityFeed",50,0)||[]),y=k.length,S=k.length===50)}catch(L){t(31,B=String(L)),t(14,b={cases:[]}),t(0,Ye=[]),t(4,$e=null),t(15,k=[])}}async function zt(d){Ot(),t(33,P=d),t(32,W=""),t(34,J="overview"),t(35,Q=[]),te=[],t(37,le=[]),t(38,se=[]),t(48,_e=[]),t(85,ct=[]),t(84,_t=[]),t(83,at=null),t(86,Pt=null),t(87,en=""),t(91,Ve=[]),_n=[],ml(),t(36,ee=null),t(66,Qe=!1),t(71,yt=!1),t(31,B=""),t(29,q=[]),await zn(d.id)}async function zn(d){try{t(35,Q=await oe("ListNotes",d)||[])}catch{}try{te=await oe("ListFiles",d)||[]}catch{}try{t(37,le=await oe("ListActions",d)||[])}catch{}try{t(38,se=Bl(await oe("ListWorklog",d)))}catch{}try{t(52,Ie=await oe("ListInboxNodesForTarget",d)||[])}catch{t(52,Ie=[])}try{t(55,je=await oe("ListLinks",d)||[])}catch{t(55,je=[])}try{t(48,_e=await oe("GetSuggestions")||[]),t(49,He=_e.length)}catch{t(48,_e=[]),t(49,He=0)}try{t(29,q=await oe("ListActivityByNode",d,50,0)||[])}catch{}}async function st(d){t(82,cl=!0);try{let L=await oe("ListItems",d)||[];L.sort((ne,fe)=>ne.type!==fe.type?ne.type==="folder"?-1:1:(ne.name||"").localeCompare(fe.name||"")),t(85,ct=L)}catch{t(85,ct=[])}t(82,cl=!1)}async function hl(d){if(!P)return;Ot();try{const ne=await oe("GetNodeDetail",d);ne&&t(84,_t=[..._t,{id:d,name:ne.title}])}catch{t(84,_t=[..._t,{id:d,name:"..."}])}t(83,at=d),t(81,It={...It,[d]:!0});const L=await oe("ListWorkspaceChildren",d)||[];Tn(m,d,L),t(12,m=[...m]),await st(d)}function fc(){if(Ot(),_t.length<2)t(84,_t=[]),t(83,at=null),st(P.id);else{const d=_t[_t.length-2];t(84,_t=_t.slice(0,-1)),t(83,at=d.id),st(d.id)}}function si(d){const L=_t[d];t(84,_t=_t.slice(0,d+1)),t(83,at=L.id),st(L.id)}async function bn(d){t(86,Pt=d),t(87,en=""),t(89,Mn=""),t(88,ul=!0);try{P1(d)?t(87,en=await oe("GetFileBase64",d.fileId)||""):F1(d)&&t(87,en=await oe("ReadFileText",d.fileId)||"")}catch(L){t(89,Mn=String(L))}t(88,ul=!1)}function Hn(){t(86,Pt=null),t(87,en=""),t(89,Mn="")}async function dc(){const d=prompt(v("file.namePrompt"));if(!(!d||!d.trim()))try{const L=at||P.id;await oe("CreateEmptyFile",L,d.trim()),await st(L),await yl(L)}catch(L){t(31,B=String(L))}}async function ri(d){try{await oe("DuplicateNode",d);const L=at||P.id;await st(L),await yl(L)}catch(L){t(31,B=String(L))}}function ai(d){const L=ct.find(ne=>ne.id===d);L&&bl(L.id,L.name)}function ci(d){t(90,Nt={items:[d],mode:"cut"})}function ui(d){t(90,Nt={items:[d],mode:"copy"})}async function fi(){if(Nt.items.length===0)return;const d=at||P.id;try{if(Nt.mode==="copy")for(const L of Nt.items)await oe("DuplicateNode",L);else for(const L of Nt.items)await oe("MoveNode",L,d);t(90,Nt={items:[],mode:"copy"}),await st(d)}catch(L){t(31,B=String(L))}}function di(d){Ve.includes(d)?t(91,Ve=Ve.filter(L=>L!==d)):t(91,Ve=[...Ve,d])}function pi(d){t(91,Ve=[d])}function pc(){t(91,Ve=ct.map(d=>d.id))}function vi(d){if(ct.length===0)return;const L=Ve.length>0?Ve[Ve.length-1]:ct[0].id,ne=ct.findIndex(Mt=>Mt.id===L),fe=ct.findIndex(Mt=>Mt.id===d);if(ne===-1||fe===-1)return;const De=Math.min(ne,fe),dt=Math.max(ne,fe),an=ct.slice(De,dt+1).map(Mt=>Mt.id),wn=new Set(Ve);an.forEach(Mt=>wn.add(Mt)),t(91,Ve=[...wn])}function vc(){t(91,Ve=[])}function gl(d){return d.length>0?d:ct.map(L=>L.id)}async function mc(){const d=gl(Ve),L=ct.find(fe=>fe.id===d[0]);let ne;d.length===1&&(L==null?void 0:L.type)==="folder"?ne=v("delete.folder"):d.length===1?ne=v("delete.file"):ne=v("delete.files",{count:d.length}),Dt({title:v("delete.confirmTitle"),message:v("delete.confirmMessage")+" "+ne+"?",confirmText:v("common.delete"),danger:!0,onConfirm:async()=>{for(const De of d)try{await oe("DeleteFileOrFolder",De)}catch(dt){t(31,B=String(dt))}t(91,Ve=[]);const fe=at||P.id;await st(fe)}})}function _c(){const d=gl(Ve);t(90,Nt={items:d,mode:"cut"}),t(91,Ve=[])}function hc(){const d=gl(Ve);t(90,Nt={items:d,mode:"copy"}),t(91,Ve=[])}function gc(d,L){d.stopPropagation();const ne=Ve.includes(L)?Ve:[L];_n=ne,d.dataTransfer.effectAllowed="move",d.dataTransfer.setData("text/plain",ne.join(","))}function bc(d,L){const ne=ct.find(fe=>fe.id===L);ne&&ne.type==="folder"&&(d.preventDefault(),d.stopPropagation(),d.dataTransfer.dropEffect="move")}async function kc(d,L){if(d.preventDefault(),d.stopPropagation(),_n.length!==0){for(const ne of _n)try{await oe("MoveNode",ne,L)}catch(fe){t(31,B=String(fe))}_n=[],t(91,Ve=[]),await st(at||P.id)}}function mi(d){if(!el(d.target)){if(d.key==="Backspace"||d.altKey&&d.key==="ArrowLeft"){d.preventDefault(),ii();return}if(J==="files")if(d.ctrlKey||d.metaKey)d.key==="c"||d.key==="C"?(d.preventDefault(),hc()):d.key==="x"||d.key==="X"?(d.preventDefault(),_c()):d.key==="v"||d.key==="V"?(d.preventDefault(),fi()):d.key==="a"||d.key==="A"?(d.preventDefault(),pc()):d.key==="o"||d.key==="O"?(d.preventDefault(),yc()):d.key==="Enter"&&(d.preventDefault(),_i());else if(d.key==="Enter")d.preventDefault(),_i();else if(d.key==="Delete"){if(Pt){d.preventDefault(),Hn();return}if(Ve.length>0){d.preventDefault(),mc();return}}else if(d.key==="Escape"){if(Pt){Hn();return}if(Ve.length>0){vc();return}}else d.key==="F2"&&(d.preventDefault(),wc())}}function _i(){if(Ve.length===1){const d=ct.find(L=>L.id===Ve[0]);d&&(d.type==="folder"?hl(d.id):bn(d))}}function yc(){if(Ve.length===1){const d=ct.find(L=>L.id===Ve[0]);d&&d.fileId&&oe("OpenFile",d.fileId)}}function bl(d,L){Fn=d,t(102,nn=L),t(103,ln=""),t(101,tn=!0)}function wc(){if(Ve.length===1){const d=ct.find(L=>L.id===Ve[0]);d&&bl(d.id,d.name)}}async function hi(){const d=nn.trim();if(!d){t(103,ln=v("rename.emptyError"));return}try{await oe("ValidateName",d)}catch{t(103,ln=v("rename.invalidError"));return}t(101,tn=!1);const L=Fn;Fn="";try{await oe("RenameNode",L,d),P&&P.id===L&&t(33,P={...P,title:d}),await Gt(),at&&await st(at)}catch(ne){t(31,B=String(ne))}}function Cc(){t(101,tn=!1),Fn="",t(102,nn=""),t(103,ln="")}function Sc(d){d.key==="Enter"?hi():t(103,ln="")}function Dt(d){t(97,$l=d.title||v("common.confirm")),t(98,ei=d.message||""),t(99,ti=d.danger!==void 0?d.danger:!0),t(100,ni=d.confirmText||v("common.delete")),Ln=d.onConfirm||null,Pn=d.onCancel||null,t(96,An=!0)}function kl(){t(96,An=!1),Ln=null,Pn=null}function Tc(){Ln&&Ln(),kl()}function Ec(){Pn&&Pn(),kl()}function gi(d){t(68,re=vt.node),t(69,Se=d),t(67,Ge=""),t(66,Qe=!0),Kt()}function Ic(){t(68,re=null),t(69,Se=void 0),t(67,Ge=""),t(66,Qe=!0)}function bi(){t(66,Qe=!1),t(67,Ge=""),t(68,re=null),t(69,Se=void 0)}async function ki(){if(!(!Ge.trim()||Se===void 0))try{const d=re?re.id:"",L=Se?Se.id:"",ne=await oe("CreateNodeFromTemplate",d,Ge.trim(),L);t(66,Qe=!1),t(67,Ge="");const fe=ne?ne.id:null;if(t(68,re=null),t(69,Se=void 0),d){t(81,It={...It,[d]:!0});const De=await oe("ListWorkspaceChildren",d)||[];Tn(m,d,De),t(12,m=[...m])}else t(12,m=await oe("ListWorkspaceTree")||m);if(fe){const De=await oe("GetNodeDetail",fe);De&&(t(32,W=""),zt(De))}}catch(d){t(31,B=String(d))}}function Nc(d,L){t(70,vt={visible:!0,x:d.clientX,y:d.clientY,node:L})}function Kt(){t(70,vt={visible:!1,x:0,y:0,node:null})}async function Dc(d){const L=!It[d];if(t(81,It={...It,[d]:L}),!L)return;const ne=await oe("ListWorkspaceChildren",d)||[];Tn(m,d,ne),t(12,m=[...m])}async function Mc(d,L){if(!(!d||!L||d===L))try{const ne=await oe("MoveNode",d,L);await Gt();const fe=await oe("GetNodeDetail",d);fe&&(t(32,W=""),zt(fe))}catch(ne){t(31,B=String(ne))}}async function jc(d){d.preventDefault(),d.stopPropagation();try{const L=d.dataTransfer.getData("text/plain");if(!L)return;const ne=await oe("GetNodeDetail",L);if(!ne||!ne.parent_id)return;await oe("MoveNode",L,""),await Gt();const fe=await oe("GetNodeDetail",L);fe&&(t(32,W=""),zt(fe))}catch(L){t(31,B=String(L))}}function Ac(d){d.preventDefault(),d.dataTransfer.dropEffect="move",t(92,fl=!0)}function Lc(d){t(92,fl=!1)}function yi(d){bl(d.id,d.title),Kt()}function wi(d){Kt(),Dt({title:v("delete.confirmTitle"),message:v("delete.confirmMessage")+" "+d.title+"?",confirmText:v("common.delete"),danger:!0,onConfirm:async()=>{try{await oe("DeleteNode",d.id),await Gt(),await Mi(),P&&P.id===d.id&&t(33,P=null)}catch(L){t(31,B=String(L))}}})}async function At(d){Kt();const L=typeof d=="string"?d:d.id;try{await oe("OpenFolder",L)}catch(ne){t(31,B=String(ne))}}async function Tt(d){const L=ic(d);try{if(L==="url"||d.type==="link"){if(!d.url)throw new Error("url required");await oe("OpenURL",d.url);return}if(L==="text"||d.type==="note"){const ne=await oe("ReadNote",d.id);t(36,ee={id:d.id,title:d.title,content:ne||"",dirty:!1});return}if(L==="folder"||d.type==="folder"){Ot(),t(32,W=""),t(33,P=d),t(34,J="files"),t(84,_t=[]),t(83,at=null),t(91,Ve=[]),t(86,Pt=null),await zn(d.id),await st(d.id);return}if(L==="file"||L==="image"||d.type==="file"){const fe=(await oe("ListFiles",d.id)||[])[0];if(!fe)throw new Error("file record not found");const De=N_(d,fe);vo(De)?await bn(De):await oe("OpenFile",De.fileId);return}await yn(d.id)}catch(ne){t(31,B=String(ne))}}async function Ci(d){Kt();try{await oe("MoveNode",d.id,""),await Gt();const L=await oe("GetNodeDetail",d.id);L&&(t(32,W=""),zt(L))}catch(L){t(31,B=String(L))}}async function Gt(){const d=Object.keys(It).filter(ne=>It[ne]),L=await oe("ListWorkspaceTree")||[];for(const ne of d){const De=(await oe("ListWorkspaceChildren",ne)||[]).map(dt=>({...dt}));oc(L,ne,De)}t(12,m=L)}async function yl(d){const L=await oe("ListWorkspaceChildren",d)||[];Tn(m,d,L),t(12,m=[...m])}function Si(){t(71,yt=!0),t(72,gt="")}function Ti(){t(71,yt=!1),t(72,gt="")}async function Ei(){if(!(!gt.trim()||!P))try{const d=await oe("CreateNote",P.id,gt.trim());t(35,Q=[...Q,d&&d.id?d:{id:Date.now().toString(),title:gt.trim(),createdAt:new Date().toISOString()}]),t(71,yt=!1),t(72,gt="")}catch{const L={id:Date.now().toString(),title:gt.trim(),createdAt:new Date().toISOString()};t(35,Q=[...Q,L]),t(71,yt=!1),t(72,gt="")}}async function on(d){if(ee&&ee.dirty){Dt({title:v("note.unsavedTitle"),message:v("note.unsavedMessage"),confirmText:v("note.unsavedClose"),danger:!1,onConfirm:async()=>{await Ii(d)}});return}await Ii(d)}async function Ii(d){try{const L=await oe("ReadNote",d.id);t(36,ee={id:d.id,title:d.title,content:L||"",dirty:!1})}catch{t(36,ee={id:d.id,title:d.title,content:"# "+d.title+`
|
||
|
||
`,dirty:!1})}}function Ni(){if(ee&&ee.dirty){Dt({title:v("note.unsavedTitle"),message:v("note.unsavedMessage"),confirmText:v("note.unsavedClose"),danger:!1,onConfirm:()=>{t(36,ee=null)}});return}t(36,ee=null)}function Pc(d){ee&&(t(36,ee.content=d.target.value,ee),t(36,ee.dirty=!0,ee))}async function Fc(){if(ee)try{await oe("SaveNote",ee.id,ee.content),t(36,ee.dirty=!1,ee)}catch{t(36,ee.dirty=!1,ee)}}function Bn(d=null){t(46,be=d),t(47,Ce=null),t(40,de=d?d.summary:""),t(41,we=d?String(d.minutes||""):""),t(42,ze=d&&d.date||""),t(43,me=d&&d.details||""),t(44,X=d?!!d.billable:!1),t(45,x=d?!!d.approximate:!1),t(39,ce=!0)}function Di(){t(39,ce=!1),t(46,be=null),t(47,Ce=null)}async function wl(d=""){const L=d||(P?P.id:"");P&&P.id===L&&t(38,se=Bl(await oe("ListWorklog",P.id))||se),W==="journal"&&await Jt()}async function Rc(){const d=parseInt(we,10);if(!(!de.trim()||isNaN(d)||d<=0)&&!(!Ce&&!be&&!P)){try{if(Ce){const L=JSON.stringify(Xn(Ce));await oe("AcceptSuggestionFull",Ce.nodeId,de.trim(),me,ze,d,x,X,L),await Wn()}else be?(await oe("UpdateWorklogEntry",be.id,de.trim(),me,ze,d,x,X),await wl(be.nodeId)):(await oe("CreateWorklogFull",P.id,de.trim(),me,ze,d,x,X),await wl(P.id))}catch(L){t(31,B=String(L));return}t(39,ce=!1),t(46,be=null),t(47,Ce=null)}}function Cl(d){Dt({title:v("worklog.deleteEntry"),message:v("worklog.deleteConfirm"),confirmText:v("common.delete"),danger:!0,onConfirm:async()=>{try{await oe("DeleteWorklogEntry",d.id),await wl(d.nodeId)}catch(L){t(31,B=String(L))}}})}async function Wn(){t(48,_e=await oe("GetSuggestions")||[]),t(49,He=_e.length),P&&t(38,se=Bl(await oe("ListWorklog",P.id))),W==="journal"&&await Jt()}async function kn(){t(4,$e=await oe("ListTrash")||{nodes:[],entries:[],trashPath:"",count:0}),t(61,Fe=$e.count||0);const d=$e.nodes||[];t(62,he=he.filter(L=>d.some(ne=>ne.id===L))),Ne&&!d.some(L=>L.id===Ne)?ml():Le.length>0&&(t(230,Le=Le.filter(L=>d.some(ne=>ne.id===L.id))),t(5,Ne=Le.length>0?Le[Le.length-1].id:""))}async function Mi(){try{t(61,Fe=await oe("TrashCount")||0)}catch{t(61,Fe=0)}}function Oc(){return Ne&&((($e==null?void 0:$e.nodes)||[]).find(d=>d.id===Ne)||Le[Le.length-1])||null}function ji(d){Ot(),t(5,Ne=d.id);const L=Le.findIndex(ne=>ne.id===d.id);L>=0?t(230,Le=Le.slice(0,L+1)):t(230,Le=[...Le,{id:d.id,title:d.title}]),t(62,he=[])}function zc(){if(Le.length===0)return;Ot();const d=Le.slice(0,-1);t(230,Le=d),t(5,Ne=d.length>0?d[d.length-1].id:""),t(62,he=[])}function Ai(d){t(62,he=he.includes(d)?he.filter(L=>L!==d):[...he,d])}function Sl(d){return he.length>0?he:[d]}async function Tl(d){try{await oe("RestoreTrashNodesJSON",JSON.stringify(d)),await Gt(),await kn()}catch(L){t(31,B=String(L))}}async function El(d){Dt({title:v("delete.confirmTitle"),message:v("delete.confirmMessage")+" "+d.length+"?",confirmText:v("common.delete"),danger:!0,onConfirm:async()=>{try{await oe("PurgeTrashNodesJSON",JSON.stringify(d)),await kn()}catch(L){t(31,B=String(L))}}})}async function Hc(){Dt({title:v("delete.confirmTitle"),message:v("trash.empty")+"?",confirmText:v("common.delete"),danger:!0,onConfirm:async()=>{try{await oe("EmptyTrash"),await kn()}catch(d){t(31,B=String(d))}}})}function Vn(d){t(47,Ce=d),t(46,be=null),t(40,de=d.summary||""),t(41,we=String(d.suggestedMin||"")),t(42,ze=""),t(43,me=""),t(44,X=!1),t(45,x=!0),t(39,ce=!0)}async function Un(d){try{await oe("DismissSuggestion",d.nodeId,JSON.stringify(Xn(d))),await Wn()}catch(L){t(31,B=String(L))}}async function Il(d){try{const L=Xn(d),ne=JSON.stringify(L);Zn("acceptTodaySuggestion: nodeId="+d.nodeId+" eventIds="+ne+" events="+JSON.stringify((d.events||[]).map(fe=>({id:fe.id,type:fe.eventType,title:fe.title})))),await oe("AcceptSuggestionWith",d.nodeId,d.summary,d.suggestedMin,"",ne),await Wn()}catch(L){Zn("acceptTodaySuggestion error: "+L)}}async function Li(d){try{const L=Xn(d),ne=JSON.stringify(L);Zn("acceptJournalSuggestion: nodeId="+d.nodeId+" eventIds="+ne+" events="+JSON.stringify((d.events||[]).map(fe=>({id:fe.id,type:fe.eventType,title:fe.title})))),await oe("AcceptSuggestionWith",d.nodeId,d.summary,d.suggestedMin,"",ne),await Wn()}catch(L){Zn("acceptJournalSuggestion error: "+L)}}async function Jt(){try{const[d,L,ne]=await Promise.all([oe("ListWorklogReport",I,D,M,N,j,R),oe("WorklogReportSummary",I,D,M,N,j,R),oe("GetSuggestions")]);if(t(16,T=(d||[]).map(fe=>(fe._expanded===void 0&&(fe._expanded=!1),fe))),t(17,E=L||null),t(48,_e=ne||[]),t(49,He=_e.length),M&&!O)if(d&&d.length>0&&d[0].nodePath)t(24,O=d[0].nodePath);else try{t(24,O=await oe("GetNodeTitle",M))}catch{t(24,O="")}}catch{t(16,T=[]),t(17,E=null),t(48,_e=[]),t(49,He=0)}}async function Kn(d){try{const L=await oe("SaveWorklogReport",d,I,D,M,N,j,R);t(25,H=L),setTimeout(()=>t(25,H=""),4e3)}catch(L){if(String(L).includes("отменено"))return;t(25,H="Ошибка: "+String(L)),setTimeout(()=>t(25,H=""),6e3)}}let Pi;async function Nl(d){if(d._expanded=!d._expanded,t(16,T),d._expanded&&!d._events&&d._hasEvents===void 0)try{d._events=await oe("GetWorklogEntryEvents",d.id)||[],d._hasEvents=d._events.length>0,t(16,T)}catch{d._events=[],d._hasEvents=!1,t(16,T)}}async function Dl(d){if(d._expanded=!d._expanded,d._expanded&&d.source==="suggestion"&&!d._events&&d._hasEvents===void 0)try{d._events=await oe("GetWorklogEntryEvents",d.id)||[],d._hasEvents=d._events.length>0}catch(L){L._events=[],L._hasEvents=!1}t(38,se)}async function Bc(){const d=V.trim();if(!d||d.length<2){t(27,G=[]),t(28,U=!1);return}try{t(27,G=await oe("SearchNodes",d)||[]),t(28,U=G.length>0)}catch{t(27,G=[]),t(28,U=!1)}}function Wc(){clearTimeout(Pi),Pi=setTimeout(Bc,200)}function Fi(d){t(21,M=d.id),t(24,O=d.path||d.title),t(20,N=!0),t(26,V=""),t(27,G=[]),t(28,U=!1),Jt()}function Ri(){t(21,M=""),t(20,N=!1),t(24,O=""),t(26,V=""),t(27,G=[]),t(28,U=!1),Jt()}function Vc(){t(18,I=""),t(19,D=""),t(21,M=""),t(20,N=!1),t(22,j="all"),t(23,R="all"),t(24,O=""),t(26,V=""),t(27,G=[]),t(28,U=!1),Jt()}async function Oi(){const d=await oe("PickFile");if(!d)return;const L=at||P.id;await zi(L,d)}async function Uc(){const d=await oe("PickDirectory");if(!d)return;const L=at||P.id;await zi(L,d)}async function zi(d,L){t(78,rl=!0);try{const ne=await oe("PreviewImport",L);t(79,Dn=ne),al=L,Zl=d,t(80,mn=!0)}catch(ne){t(31,B=String(ne))}t(78,rl=!1)}async function Ml(d){try{const L=Zl||P.id,ne=d==="copy"?await oe("AddPathCopy",L,al):await oe("AddPathLink",L,al);t(80,mn=!1),t(79,Dn=null),t(84,_t=[]),t(83,at=null),await Promise.all([zn(L),st(L),yl(L)])}catch(L){t(31,B=String(L))}}function Hi(){t(80,mn=!1),t(79,Dn=null)}async function Bi({id:d,type:L}){const ne=v(L==="folder"?"delete.folder":"delete.file");Dt({title:v("delete.confirmTitle"),message:v("delete.confirmMessage")+" "+ne+"?",confirmText:v("common.delete"),danger:!0,onConfirm:async()=>{try{await oe("DeleteFileOrFolder",d),te=te.filter(De=>De.nodeId!==d);const fe=at||P.id;await st(fe)}catch(fe){t(31,B=String(fe))}}})}async function Kc(d){!d||d.length===0||await tu(d,"drop")}function Gc(d){return{note_created:v("event.noteCreated"),note_updated:v("event.noteUpdated"),note_deleted:"Заметка удалена",file_added:v("event.fileAdded"),file_deleted:v("event.fileDeleted"),file_renamed:v("event.fileRenamed"),file_copied:v("event.fileCopied"),file_moved:v("event.fileMoved"),folder_added:v("event.folderAdded"),folder_deleted:v("event.folderDeleted"),folder_renamed:v("event.folderRenamed"),folder_moved:"Папка перемещена",node_created:v("event.caseCreated"),node_updated:v("event.caseUpdated"),node_deleted:"Узел удалён",action_created:"Действие создано",action_done:"Действие выполнено",worklog_added:"Запись времени добавлена"}[d]||d}function Jc(d){return{project:v("kind.project"),client:v("kind.client"),document:v("kind.document"),recipe:v("kind.recipe"),folder:v("kind.folder"),note:v("kind.note"),file:v("kind.file"),archive:v("kind.archive"),case:v("kind.case"),link:v("kind.link")}[d]||d||v("kind.case")}function Wi(d){return d?v("capture.kind."+d):""}function qc(d){return d?v("capture.source."+d):""}function Yc(d){const L=[];return d.captureKind&&L.push(Wi(d.captureKind)),d.captureSource&&L.push(qc(d.captureSource)),d.captureContextLabel&&L.push(`${v("inbox.capturedIn")}: ${d.captureContextLabel}`),d.suggestedTargetLabel&&L.push(`${v("inbox.suggestedTarget")}: ${d.suggestedTargetLabel}`),L.push(bt(d.capturedAt||d.createdAt)),L.filter(Boolean).join(" · ")}function Qc(d){!d||!d.id||(t(0,Ye=[d,...Ye.filter(L=>L.id!==d.id)]),P&&(d.captureContextNodeId===P.id||d.suggestedTargetNodeId===P.id)&&t(52,Ie=[d,...Ie.filter(L=>L.id!==d.id)]))}function Xc(){return P&&P.id?{contextType:"node",nodeId:P.id,suggestedTargetNodeId:P.id}:W?{contextType:"section",section:W}:{contextType:"global",section:"root"}}function qt(){return JSON.stringify(Xc())}function Zc(){return P&&P.id?v("capture.dropOverlayNode",{title:P.title}):v("capture.dropOverlayGlobal")}async function sn(d=null){d&&Qc(d),W==="inbox"&&t(0,Ye=await oe("ListInboxNodes")||Ye)}async function xc(d,L){const ne=String(d||"").trim();if(!ne)return null;const fe=Wl(ne),De=fe?await oe("CaptureURLWithContext",fe,"",L,qt()):await oe("CaptureTextWithContext",ne,L,qt());return await sn(De),De}async function Vi(d,L,ne){const fe=String(d||"").trim();if(!fe)return null;const De=await oe("CaptureURLWithContext",fe,L||"",ne,qt());return await sn(De),De}async function $c(d,L){if(!d)return null;const ne=d.path||d.webkitRelativePath||"";if(ne){const dt=await oe("CapturePathWithContext",ne,L,qt());return await sn(dt),dt}const fe=await j_(d),De=await oe("CaptureFileDataWithContext",d.name||`clipboard.${M_(d.type)}`,fe,L,qt());return await sn(De),De}async function jl(d,L){var wn,Mt,oo;if(!d)return!1;let ne=!1;const fe=Array.from(d.files||[]);for(const Qt of fe)await $c(Qt,L),ne=!0;const De=(wn=d.getData)==null?void 0:wn.call(d,"text/x-moz-url");if(De){const Qt=A_(De),Cn=Qt?Wl(Qt.url):"";if(Cn)return await Vi(Cn,Qt.title,L),!0}const dt=(Mt=d.getData)==null?void 0:Mt.call(d,"text/uri-list");if(dt){const Qt=L_(dt),Cn=Wl(Qt);if(Cn)return await Vi(Cn,"",L),!0}const an=(oo=d.getData)==null?void 0:oo.call(d,"text/plain");return String(an||"").trim()&&(await xc(an,L),ne=!0),ne}async function eu(){if(!Oe){t(54,Me=""),t(53,Oe=!0);try{const d=await oe("CaptureClipboardTextWithContext",qt());await sn(d),t(54,Me=v("inbox.captured"))}catch(d){t(31,B=String(d).includes("clipboard is empty")?v("inbox.clipboardEmpty"):v("inbox.clipboardUnavailable"))}finally{t(53,Oe=!1)}}}async function tu(d,L="drop"){if(!Oe){t(53,Oe=!0),t(54,Me="");try{for(const ne of d){const fe=await oe("CapturePathWithContext",ne,L,qt());await sn(fe)}t(54,Me=v("inbox.captured"))}catch(ne){t(31,B=String(ne))}finally{t(53,Oe=!1),t(93,hn=!1)}}}async function Ui(d){if(!(c||u)&&!el(d.target)&&d.clipboardData)try{await jl(d.clipboardData,"paste")&&(d.preventDefault(),t(54,Me=v("inbox.captured")))}catch(L){t(31,B=String(L))}}function Ki(d){za(d.dataTransfer)&&(d.preventDefault(),d.dataTransfer.dropEffect="copy",t(95,xl=Zc()),t(94,jn=!0))}function Gi(d){(d.clientX<=0||d.clientY<=0||d.clientX>=window.innerWidth||d.clientY>=window.innerHeight)&&t(94,jn=!1)}async function Ji(d){if(za(d.dataTransfer)){d.preventDefault(),t(94,jn=!1);try{await jl(d.dataTransfer,"drop")&&t(54,Me=v("inbox.captured"))}catch(L){t(31,B=String(L))}}}function nu(d){d.preventDefault(),d.dataTransfer.dropEffect="copy",t(93,hn=!0)}function lu(){t(93,hn=!1)}async function iu(d){d.preventDefault(),d.stopPropagation(),t(93,hn=!1),await jl(d.dataTransfer,"drop")&&t(54,Me=v("inbox.captured"))}function Gn(d){t(104,jt=d),t(105,Ft=""),t(106,Vt=[]),t(107,Rt=null)}function Al(){t(104,jt=null),t(105,Ft=""),t(106,Vt=[]),t(107,Rt=null),t(108,Rn=!1)}async function ou(){const d=Ft.trim();if(!d||d.length<2){t(106,Vt=[]);return}t(108,Rn=!0);try{const L=await oe("SearchNodes",d)||[];t(106,Vt=L.filter(ne=>P_(ne)&&ne.id!==(jt==null?void 0:jt.id)))}catch{t(106,Vt=[])}finally{t(108,Rn=!1)}}function su(d){t(105,Ft=d.target.value),t(107,Rt=null),clearTimeout(li),li=setTimeout(ou,200)}function qi(d){t(107,Rt=d),t(105,Ft=d.path||d.title),t(106,Vt=[])}async function Yi(){if(!(!jt||!Rt))try{await Qi(jt,Rt.id),Al()}catch(d){t(31,B=String(d))}}async function Qi(d,L){!d||!L||(await oe("ResolveInboxNode",d.id,L),t(0,Ye=Ye.filter(ne=>ne.id!==d.id)),t(52,Ie=Ie.filter(ne=>ne.id!==d.id)),await Gt(),P&&await zn(P.id))}async function Jn(d){const L=(d==null?void 0:d.suggestedTargetNodeId)||(P==null?void 0:P.id)||"";if(L)try{await Qi(d,L)}catch(ne){t(31,B=String(ne))}}function qn(d){Dt({title:v("inbox.deleteTitle"),message:v("inbox.deleteConfirm",{title:d.title}),confirmText:v("common.delete"),danger:!0,onConfirm:async()=>{try{await oe("DeleteInboxNode",d.id),t(0,Ye=Ye.filter(L=>L.id!==d.id)),t(52,Ie=Ie.filter(L=>L.id!==d.id))}catch(L){t(31,B=String(L))}}})}function Xi(d){t(56,Be=d),t(57,Ae=d.title||""),t(58,Ee=d.url||""),t(59,We=d.note||""),t(60,Ue="")}function Ll(){t(56,Be=null),t(57,Ae=""),t(58,Ee=""),t(59,We=""),t(60,Ue="")}async function ru(){if(!(!Be||!Ee.trim()))try{const d=await oe("UpdateLink",Be.id,Ae.trim(),Ee.trim(),We);t(55,je=je.map(L=>L.id===d.id?d:L)),Ll()}catch(d){t(60,Ue=String(d))}}async function Zi(d){Dt({title:v("links.deleteTitle"),message:v("links.deleteConfirm",{title:d.title}),confirmText:v("common.delete"),danger:!0,onConfirm:async()=>{try{await oe("DeleteLink",d.id),t(55,je=je.filter(L=>L.id!==d.id))}catch(L){t(31,B=String(L))}}})}async function xi(d){try{await oe("OpenLink",d.id)}catch(L){t(31,B=String(L))}}async function $i(d){var L,ne;try{await((ne=(L=navigator.clipboard)==null?void 0:L.writeText)==null?void 0:ne.call(L,d.url)),t(60,Ue=v("links.copied"))}catch{t(60,Ue=v("links.copyUnavailable"))}}function au(){t(73,mt=!0),t(74,St=""),t(75,vn="open_url"),t(76,Lt="")}function eo(){t(73,mt=!1),t(74,St=""),t(76,Lt="")}async function Pl(){if(!(!St.trim()||!Lt.trim()||!P))try{const d=await oe("CreateAction",P.id,vn,St.trim(),Lt.trim());d&&d.id&&t(37,le=[...le,d]),t(73,mt=!1),t(74,St=""),t(76,Lt="")}catch(d){t(31,B=String(d))}}async function to(d){try{await oe("DeleteAction",d),t(37,le=le.filter(L=>L.id!==d))}catch(L){t(31,B=String(L))}}function cu(d){const L=sl.find(ne=>ne.id===d);return L?L.label:d}async function yn(d){try{const L=await oe("GetNodeDetail",d);L&&zt(L)}catch(L){t(31,B=String(L))}}async function Yt(d){const L=F_(d),ne=L.nodeId;if(ne)try{const fe=await oe("GetNodeDetail",ne);if(!fe)return;if(zt(fe),L.tab==="notes"){if(Ut("notes"),L.targetId){try{t(35,Q=await oe("ListNotes",ne)||[])}catch{}const De=Q.find(dt=>dt.id===L.targetId);De&&setTimeout(()=>on(De),100)}}else if(L.tab==="files")if(Ut("files"),L.targetId)try{const De=await oe("GetNodeDetail",L.targetId);if(De&&De.parent_id){await st(De.parent_id);const dt=ct.find(an=>an.id===L.targetId);dt&&dt.type==="file"&&vo(dt)&&setTimeout(()=>bn(dt),150)}else await st(ne)}catch{await st(ne)}else await st(ne)}catch(fe){t(31,B=String(fe))}}async function rn(d){return Yt(d)}async function Fl(){try{t(109,dl=await oe("SyncStatus"))}catch{t(109,dl={configured:!1,serverUrl:"",deviceId:"",unpushedOps:0,lastSyncAt:"",syncInterval:0})}}let no="general";function Rl(d){t(113,no=d||"general"),t(10,p=!0)}function lo(){t(10,p=!1)}function uu(d){const L=Array.isArray(d==null?void 0:d.conflicts)?d.conflicts:[],ne=Array.isArray(d==null?void 0:d.applyErrors)?d.applyErrors:[],fe=[];return L.length>0&&fe.push(v("sync.conflictsCount",{count:L.length})),ne.length>0&&fe.push(v("sync.applyErrorsCount",{count:ne.length})),fe.join(" · ")}async function fu(){t(110,pl=!0),t(111,gn=""),t(112,On="");try{const d=await oe("SyncNow");await Fl(),t(111,gn=uu(d)),t(112,On=gn?"warning":"")}catch(d){console.error("sync error:",d),t(111,gn=`${v("sync.status.error")}: ${(d==null?void 0:d.message)||d}`),t(112,On="warning")}finally{t(110,pl=!1)}}function du(d){t(8,c=!1),t(7,a=d),t(77,$t=!1),window.location.reload()}function pu(d){t(9,u=!1),t(7,a=d),t(77,$t=!1),window.location.reload()}const vu=d=>d.nodeId===P.id,mu=d=>_l(d.id),_u=()=>Rl("sync"),hu=()=>Rl(),gu=()=>t(31,B=""),bu=()=>t(31,B=""),ku=()=>t(31,B="");function yu(){ee.content=this.value,t(36,ee)}const wu=d=>Ut(d.id),Cu=()=>{Ut("notes"),Si()},Su=()=>{Ut("files"),Oi()},Tu=()=>Ut("worklog"),Eu=d=>on(d),Iu=d=>on(d);function Nu(){gt=this.value,t(72,gt)}const Du=d=>d.key==="Enter"&&Ei(),Mu=d=>on(d),ju=d=>on(d),Au=d=>{const L=d.detail;L===0?(t(84,_t=[]),t(83,at=null),st(P.id)):si(L-1)},Lu=d=>hl(d.detail),Pu=d=>bn(d.detail),Fu=d=>oe("OpenFile",d.detail),Ru=d=>oe("OpenFolder",d.detail),Ou=d=>Bi(d.detail),zu=d=>ai(d.detail.id),Hu=d=>ri(d.detail),Bu=d=>ci(d.detail),Wu=d=>ui(d.detail),Vu=d=>pi(d.detail),Uu=d=>di(d.detail),Ku=d=>vi(d.detail),Gu=d=>Jn(d),Ju=d=>Gn(d),qu=d=>Tt(d),Yu=d=>At(d),Qu=d=>qn(d),Xu=d=>Tt(d),Zu=(d,L)=>L.key==="Enter"&&Tt(d),xu=d=>xi(d),$u=d=>$i(d),ef=d=>Xi(d),tf=d=>Zi(d),nf=d=>oe("RunAction",d.id),lf=d=>to(d.id),of=()=>Bn(),sf=d=>d.nodeId===P.id,rf=d=>Vn(d),af=d=>Il(d),cf=d=>Un(d),uf=(d,L,ne)=>t(48,L[ne]._expanded=!d._expanded,_e,t(33,P)),ff=(d,L,ne,fe)=>fe.key==="Enter"&&t(48,L[ne]._expanded=!d._expanded,_e,t(33,P)),df=d=>Yt(d),pf=d=>At(d.nodeId),vf=d=>Bn(d),mf=d=>Cl(d),_f=d=>Yt(d),hf=d=>At(d.nodeId),gf=d=>Dl(d),bf=(d,L)=>L.key==="Enter"&&Dl(d),kf=d=>rn(d),yf=(d,L)=>L.key==="Enter"&&rn(d),wf=()=>{t(1,Z="date"),t(2,ye=Z==="date"&&ye==="desc"?"asc":"desc")},Cf=()=>{t(1,Z="name"),t(2,ye=Z==="name"&&ye==="desc"?"asc":"desc")},Sf=()=>{t(1,Z="type"),t(2,ye=Z==="type"&&ye==="desc"?"asc":"desc")};function Tf(){Pe=this.checked,t(3,Pe)}const Ef=d=>Jn(d),If=d=>Gn(d),Nf=d=>Tt(d),Df=d=>At(d),Mf=d=>qn(d),jf=d=>Tt(d),Af=(d,L)=>L.key==="Enter"&&Tt(d),Lf=d=>Jn(d),Pf=d=>Gn(d),Ff=d=>Tt(d),Rf=d=>At(d),Of=d=>qn(d),zf=d=>Tt(d),Hf=(d,L)=>L.key==="Enter"&&Tt(d),Bf=()=>Tl(he),Wf=()=>El(he),Vf=()=>oe("OpenTrashFolder"),Uf=d=>Ai(d.id),Kf=d=>ji(d),Gf=d=>Tl(Sl(d.id)),Jf=d=>El(Sl(d.id));function qf(){I=this.value,t(18,I)}function Yf(){D=this.value,t(19,D)}const Qf=()=>{t(26,V=""),t(24,O=""),Ri()};function Xf(){V=this.value,t(26,V)}const Zf=()=>setTimeout(()=>t(28,U=!1),200),xf=d=>Fi(d);function $f(){N=this.checked,t(20,N)}function ed(){j=xn(this),t(22,j)}function td(){R=xn(this),t(23,R)}const nd=()=>Kn("csv"),ld=()=>Kn("markdown"),id=()=>Kn("pdf"),od=d=>yn(d.nodeId),sd=(d,L,ne,fe)=>t(48,L[ne].suggestedMin=parseInt(fe.target.value),_e),rd=d=>Vn(d),ad=d=>Li(d),cd=d=>Un(d),ud=(d,L,ne)=>t(48,L[ne]._expanded=!d._expanded,_e),fd=(d,L,ne,fe)=>fe.key==="Enter"&&t(48,L[ne]._expanded=!d._expanded,_e),dd=d=>Yt(d),pd=d=>At(d.nodeId),vd=d=>yn(d.nodeId),md=d=>Nl(d),_d=(d,L)=>L.key==="Enter"&&Nl(d),hd=d=>Bn(d),gd=d=>Cl(d),bd=d=>Yt(d),kd=d=>yn(d),yd=d=>rn(d),wd=d=>Yt(d),Cd=d=>Vn(d),Sd=d=>Il(d),Td=d=>Un(d),Ed=d=>At(d),Id=d=>Tt(d),Nd=d=>rn(d),Dd=(d,L)=>L.key==="Enter"&&rn(d),Md=()=>t(69,Se=null),jd=d=>t(69,Se=d);function Ad(){Ge=this.value,t(67,Ge)}const Ld=d=>d.key==="Enter"&&ki(),Pd=d=>gi(d),Fd=()=>Ci(vt.node),Rd=()=>yi(vt.node),Od=()=>wi(vt.node),zd=()=>At(vt.node);function Hd(){ze=this.value,t(42,ze)}function Bd(){de=this.value,t(40,de)}function Wd(){we=ll(this.value),t(41,we)}function Vd(){me=this.value,t(43,me)}function Ud(){X=this.checked,t(44,X)}function Kd(){x=this.checked,t(45,x)}function Gd(){St=this.value,t(74,St)}const Jd=d=>d.key==="Enter"&&Pl();function qd(){vn=xn(this),t(75,vn),t(116,sl)}function Yd(){Lt=this.value,t(76,Lt)}const Qd=d=>d.key==="Enter"&&Pl(),Xd=()=>Ml("copy"),Zd=()=>Ml("link");function xd(){nn=this.value,t(102,nn)}function $d(){Ft=this.value,t(105,Ft)}const e1=d=>d.key==="Enter"&&Rt&&Yi(),t1=d=>qi(d);function n1(){Ae=this.value,t(57,Ae)}function l1(){Ee=this.value,t(58,Ee)}function i1(){We=this.value,t(59,We)}const o1=d=>oe("OpenFile",d.detail);return n.$$.update=()=>{n.$$.dirty[0]&48&&t(63,ot=D_(($e==null?void 0:$e.nodes)||[],Ne)),n.$$.dirty[0]&7&&t(6,l=E_(Ye,Z,ye)),n.$$.dirty[0]&72&&t(114,i=Pe?rc(l):null),n.$$.dirty[7]&8192&&t(64,rt=Le.length===0?v("nav.trash"):[v("nav.trash"),...Le.map(d=>d.title)].join(" / "))},t(65,xe=((io=Oc())==null?void 0:io.title)||v("trash.deletedNodes")),[Ye,Z,ye,Pe,$e,Ne,l,a,c,u,p,h,m,g,b,k,T,E,I,D,N,M,j,R,O,H,V,G,U,q,Y,B,W,P,J,Q,ee,le,se,ce,de,we,ze,me,X,x,be,Ce,_e,He,Ze,pt,Ie,Oe,Me,je,Be,Ae,Ee,We,Ue,Fe,he,ot,rt,xe,Qe,Ge,re,Se,vt,yt,gt,mt,St,vn,Lt,$t,rl,Dn,mn,It,cl,at,_t,ct,Pt,en,ul,Mn,Nt,Ve,fl,hn,jn,xl,An,$l,ei,ti,ni,tn,nn,ln,jt,Ft,Vt,Rt,Rn,dl,pl,gn,On,no,i,F,sl,sc,Ut,_l,zt,st,hl,fc,si,bn,Hn,dc,ri,ai,ci,ui,fi,di,pi,vi,gc,bc,kc,hi,Cc,Sc,Tc,Ec,gi,Ic,bi,ki,Nc,Kt,Dc,Mc,jc,Ac,Lc,yi,wi,At,Tt,Ci,Si,Ti,Ei,on,Ni,Pc,Fc,Bn,Di,Rc,Cl,ji,zc,Ai,Sl,Tl,El,Hc,Vn,Un,Il,Li,Jt,Kn,Nl,Dl,Wc,Fi,Ri,Vc,Oi,Uc,Ml,Hi,Bi,Gc,Jc,Wi,Yc,eu,nu,lu,iu,Gn,Al,su,qi,Yi,Jn,qn,Xi,Ll,ru,Zi,xi,$i,au,eo,Pl,to,cu,yn,Yt,rn,Fl,Rl,lo,fu,du,pu,Le,vu,mu,_u,hu,gu,bu,ku,yu,wu,Cu,Su,Tu,Eu,Iu,Nu,Du,Mu,ju,Au,Lu,Pu,Fu,Ru,Ou,zu,Hu,Bu,Wu,Vu,Uu,Ku,Gu,Ju,qu,Yu,Qu,Xu,Zu,xu,$u,ef,tf,nf,lf,of,sf,rf,af,cf,uf,ff,df,pf,vf,mf,_f,hf,gf,bf,kf,yf,wf,Cf,Sf,Tf,Ef,If,Nf,Df,Mf,jf,Af,Lf,Pf,Ff,Rf,Of,zf,Hf,Bf,Wf,Vf,Uf,Kf,Gf,Jf,qf,Yf,Qf,Xf,Zf,xf,$f,ed,td,nd,ld,id,od,sd,rd,ad,cd,ud,fd,dd,pd,vd,md,_d,hd,gd,bd,kd,yd,wd,Cd,Sd,Td,Ed,Id,Nd,Dd,Md,jd,Ad,Ld,Pd,Fd,Rd,Od,zd,Hd,Bd,Wd,Vd,Ud,Kd,Gd,Jd,qd,Yd,Qd,Xd,Zd,xd,$d,e1,t1,n1,l1,i1,o1]}class O_ extends it{constructor(e){super(),lt(this,e,R_,T_,nt,{},null,[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1])}}new O_({target:document.getElementById("app")});
|