verstak/cmd/verstak-gui/frontend-dist/assets/index-C37GEF9W.js

2 lines
9.7 KiB
JavaScript

var _e=Object.defineProperty;var me=(e,t,n)=>t in e?_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var H=(e,t,n)=>me(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))l(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&l(c)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function l(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function W(){}function ae(e){return e()}function ee(){return Object.create(null)}function z(e){e.forEach(ae)}function de(e){return typeof e=="function"}function ge(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function ve(e){return Object.keys(e).length===0}function o(e,t){e.appendChild(t)}function S(e,t,n){e.insertBefore(t,n||null)}function A(e){e.parentNode&&e.parentNode.removeChild(e)}function te(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function g(e){return document.createElement(e)}function v(e){return document.createTextNode(e)}function E(){return v(" ")}function pe(e,t,n,l){return e.addEventListener(t,n,l),()=>e.removeEventListener(t,n,l)}function _(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function be(e){return Array.from(e.childNodes)}function I(e,t){t=""+t,e.data!==t&&(e.data=t)}function we(e,t,n,l){e.style.setProperty(t,n,"")}let T;function G(e){T=e}function ye(){if(!T)throw new Error("Function called outside component initialization");return T}function ke(e){ye().$$.on_mount.push(e)}const R=[],ne=[];let V=[];const le=[],$e=Promise.resolve();let Q=!1;function Ee(){Q||(Q=!0,$e.then(he))}function X(e){V.push(e)}const J=new Set;let M=0;function he(){if(M!==0)return;const e=T;do{try{for(;M<R.length;){const t=R[M];M++,G(t),Ce(t.$$)}}catch(t){throw R.length=0,M=0,t}for(G(null),R.length=0,M=0;ne.length;)ne.pop()();for(let t=0;t<V.length;t+=1){const n=V[t];J.has(n)||(J.add(n),n())}V.length=0}while(R.length);for(;le.length;)le.pop()();Q=!1,J.clear(),G(e)}function Ce(e){if(e.fragment!==null){e.update(),z(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(X)}}function Ae(e){const t=[],n=[];V.forEach(l=>e.indexOf(l)===-1?t.push(l):n.push(l)),n.forEach(l=>l()),V=t}const Ne=new Set;function Oe(e,t){e&&e.i&&(Ne.delete(e),e.i(t))}function q(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Se(e,t,n){const{fragment:l,after_update:i}=e.$$;l&&l.m(t,n),X(()=>{const s=e.$$.on_mount.map(ae).filter(de);e.$$.on_destroy?e.$$.on_destroy.push(...s):z(s),e.$$.on_mount=[]}),i.forEach(X)}function Le(e,t){const n=e.$$;n.fragment!==null&&(Ae(n.after_update),z(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Pe(e,t){e.$$.dirty[0]===-1&&(R.push(e),Ee(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Ie(e,t,n,l,i,s,c=null,h=[-1]){const p=T;G(e);const r=e.$$={fragment:null,ctx:[],props:s,update:W,not_equal:i,bound:ee(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(p?p.$$.context:[])),callbacks:ee(),dirty:h,skip_bound:!1,root:t.target||p.$$.root};c&&c(r.root);let b=!1;if(r.ctx=n?n(e,t.props||{},(m,u,...d)=>{const w=d.length?d[0]:u;return r.ctx&&i(r.ctx[m],r.ctx[m]=w)&&(!r.skip_bound&&r.bound[m]&&r.bound[m](w),b&&Pe(e,m)),u}):[],r.update(),b=!0,z(r.before_update),r.fragment=l?l(r.ctx):!1,t.target){if(t.hydrate){const m=be(t.target);r.fragment&&r.fragment.l(m),m.forEach(A)}else r.fragment&&r.fragment.c();t.intro&&Oe(e.$$.fragment),Se(e,t.target,t.anchor),he()}G(p)}class je{constructor(){H(this,"$$");H(this,"$$set")}$destroy(){Le(this,1),this.$destroy=W}$on(t,n){if(!de(n))return W;const l=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return l.push(n),()=>{const i=l.indexOf(n);i!==-1&&l.splice(i,1)}}$set(t){this.$$set&&!ve(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Be="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Be);function ie(e,t,n){const l=e.slice();return l[10]=t[n],l}function se(e,t,n){const l=e.slice();return l[13]=t[n],l}function oe(e){let t,n,l;return{c(){t=g("div"),n=v("Error: "),l=v(e[3]),_(t,"class","error-banner svelte-10a60fp")},m(i,s){S(i,t,s),o(t,n),o(t,l)},p(i,s){s&8&&I(l,i[3])},d(i){i&&A(t)}}}function re(e){let t,n=e[13].label+"",l,i,s,c;function h(){return e[8](e[13])}return{c(){t=g("div"),l=v(n),_(t,"class",i="sidebar-item "+(e[4]===e[13].id?"selected":"")+" svelte-10a60fp")},m(p,r){S(p,t,r),o(t,l),s||(c=pe(t,"click",h),s=!0)},p(p,r){e=p,r&1&&n!==(n=e[13].label+"")&&I(l,n),r&17&&i!==(i="sidebar-item "+(e[4]===e[13].id?"selected":"")+" svelte-10a60fp")&&_(t,"class",i)},d(p){p&&A(t),s=!1,c()}}}function fe(e){let t,n=e[10].title+"",l,i,s,c;function h(){return e[9](e[10])}return{c(){t=g("div"),l=v(n),_(t,"class",i="sidebar-item "+(e[5]&&e[5].id===e[10].id?"selected":"")+" svelte-10a60fp")},m(p,r){S(p,t,r),o(t,l),s||(c=pe(t,"click",h),s=!0)},p(p,r){e=p,r&2&&n!==(n=e[10].title+"")&&I(l,n),r&34&&i!==(i="sidebar-item "+(e[5]&&e[5].id===e[10].id?"selected":"")+" svelte-10a60fp")&&_(t,"class",i)},d(p){p&&A(t),s=!1,c()}}}function ce(e){let t;return{c(){t=g("div"),t.textContent="Нет дел. Создайте первое дело.",_(t,"class","sidebar-empty svelte-10a60fp")},m(n,l){S(n,t,l)},d(n){n&&A(t)}}}function Me(e){let t;return{c(){t=g("div"),t.textContent="Загрузка...",_(t,"class","loading svelte-10a60fp")},m(n,l){S(n,t,l)},p:W,d(n){n&&A(t)}}}function Re(e){let t,n,l,i,s,c=e[0].length+"",h,p,r=e[1].length+"",b,m,u=e[3]&&ue(e);return{c(){t=g("div"),n=g("p"),n.textContent="Wails v2 Desktop GUI работает.",l=E(),i=g("p"),s=v("Sections: "),h=v(c),p=v(", Root nodes: "),b=v(r),m=E(),u&&u.c(),_(n,"class","svelte-10a60fp"),_(i,"class","svelte-10a60fp"),_(t,"class","welcome svelte-10a60fp")},m(d,w){S(d,t,w),o(t,n),o(t,l),o(t,i),o(i,s),o(i,h),o(i,p),o(i,b),o(t,m),u&&u.m(t,null)},p(d,w){w&1&&c!==(c=d[0].length+"")&&I(h,c),w&2&&r!==(r=d[1].length+"")&&I(b,r),d[3]?u?u.p(d,w):(u=ue(d),u.c(),u.m(t,null)):u&&(u.d(1),u=null)},d(d){d&&A(t),u&&u.d()}}}function Ve(e){let t,n,l=e[5].title+"",i,s,c,h,p=e[5].id+"",r,b,m,u,d=e[5].type+"",w;return{c(){t=g("div"),n=g("h2"),i=v(l),s=E(),c=g("p"),h=v("ID: "),r=v(p),b=E(),m=g("p"),u=v("Type: "),w=v(d),_(n,"class","svelte-10a60fp"),_(c,"class","svelte-10a60fp"),_(m,"class","svelte-10a60fp"),_(t,"class","node-view svelte-10a60fp")},m(N,O){S(N,t,O),o(t,n),o(n,i),o(t,s),o(t,c),o(c,h),o(c,r),o(t,b),o(t,m),o(m,u),o(m,w)},p(N,O){O&32&&l!==(l=N[5].title+"")&&I(i,l),O&32&&p!==(p=N[5].id+"")&&I(r,p),O&32&&d!==(d=N[5].type+"")&&I(w,d)},d(N){N&&A(t)}}}function ue(e){let t,n,l,i,s;return{c(){t=g("p"),n=v("Wails bindings error: "),l=v(e[3]),i=E(),s=g("p"),s.textContent="Window opens but Go bindings not connected yet.",_(t,"class","error-text svelte-10a60fp"),_(s,"class","hint svelte-10a60fp")},m(c,h){S(c,t,h),o(t,n),o(t,l),S(c,i,h),S(c,s,h)},p(c,h){h&8&&I(l,c[3])},d(c){c&&(A(t),A(i),A(s))}}}function We(e){let t,n,l,i,s,c,h,p,r,b,m,u,d,w,N,O,Y,K,Z,D,$=e[3]&&oe(e),j=q(e[0]),y=[];for(let f=0;f<j.length;f+=1)y[f]=re(se(e,j,f));let B=q(e[1]),k=[];for(let f=0;f<B.length;f+=1)k[f]=fe(ie(e,B,f));let C=e[1].length===0&&e[0].length>0&&ce();function x(f,P){return f[5]?Ve:f[0].length>0?Re:Me}let U=x(e),L=U(e);return{c(){t=g("div"),n=g("div"),l=g("span"),l.textContent="⚒",i=E(),s=g("h1"),s.textContent="Верстак",c=E(),h=g("span"),p=v(e[2]),r=E(),$&&$.c(),b=E(),m=g("div"),u=g("div"),d=g("div"),d.textContent="Разделы",w=E();for(let f=0;f<y.length;f+=1)y[f].c();N=E(),O=g("div"),O.textContent="Корневые дела",Y=E();for(let f=0;f<k.length;f+=1)k[f].c();K=E(),C&&C.c(),Z=E(),D=g("div"),L.c(),_(l,"class","logo svelte-10a60fp"),_(s,"class","svelte-10a60fp"),_(h,"class","version svelte-10a60fp"),_(n,"class","topbar svelte-10a60fp"),_(d,"class","sidebar-header svelte-10a60fp"),_(O,"class","sidebar-header svelte-10a60fp"),we(O,"margin-top","16px"),_(u,"class","sidebar svelte-10a60fp"),_(D,"class","content svelte-10a60fp"),_(m,"class","main svelte-10a60fp"),_(t,"class","app svelte-10a60fp")},m(f,P){S(f,t,P),o(t,n),o(n,l),o(n,i),o(n,s),o(n,c),o(n,h),o(h,p),o(t,r),$&&$.m(t,null),o(t,b),o(t,m),o(m,u),o(u,d),o(u,w);for(let a=0;a<y.length;a+=1)y[a]&&y[a].m(u,null);o(u,N),o(u,O),o(u,Y);for(let a=0;a<k.length;a+=1)k[a]&&k[a].m(u,null);o(u,K),C&&C.m(u,null),o(m,Z),o(m,D),L.m(D,null)},p(f,[P]){if(P&4&&I(p,f[2]),f[3]?$?$.p(f,P):($=oe(f),$.c(),$.m(t,b)):$&&($.d(1),$=null),P&81){j=q(f[0]);let a;for(a=0;a<j.length;a+=1){const F=se(f,j,a);y[a]?y[a].p(F,P):(y[a]=re(F),y[a].c(),y[a].m(u,N))}for(;a<y.length;a+=1)y[a].d(1);y.length=j.length}if(P&162){B=q(f[1]);let a;for(a=0;a<B.length;a+=1){const F=ie(f,B,a);k[a]?k[a].p(F,P):(k[a]=fe(F),k[a].c(),k[a].m(u,K))}for(;a<k.length;a+=1)k[a].d(1);k.length=B.length}f[1].length===0&&f[0].length>0?C||(C=ce(),C.c(),C.m(u,null)):C&&(C.d(1),C=null),U===(U=x(f))&&L?L.p(f,P):(L.d(1),L=U(f),L&&(L.c(),L.m(D,null)))},i:W,o:W,d(f){f&&A(t),$&&$.d(),te(y,f),te(k,f),C&&C.d(),L.d()}}}function De(e,t,n){let l=[],i=[],s="",c="",h="",p=null;ke(async()=>{try{n(2,s="verstak-gui"),window.go&&window.go.main&&window.go.main.App&&(n(2,s=await window.go.main.App.VerstakVersion()),n(0,l=await window.go.main.App.ListSections()),n(1,i=await window.go.main.App.ListRootNodes()))}catch(d){n(3,c=String(d))}});function r(d){n(4,h=d)}function b(d){n(5,p=d)}return[l,i,s,c,h,p,r,b,d=>r(d.id),d=>b(d)]}class Fe extends je{constructor(t){super(),Ie(this,t,De,We,ge,{})}}new Fe({target:document.getElementById("app")});