PageSourceSearch

https://armm-shield.netlify.app/assets/tasks-live-C_nITOBo.js

js armm-shield.netlify.app collected 2026-10-03 10:30:04 UTC 3,065 bytes, 1 lines download raw bytes

1import{b as F,y as b,N as D,c as W}from"./main-B1e8Vwqe.js";import{c as g,E as P}from"./task-spreadsheet-D5k0iGrQ.js";import{u as L}from"./useLiveQuery-DU5n_TyY.js";import{aD as S}from"./runtime-UCdpVvNx.js";import{u as O}from"./project-data-scope-DQxQrn0B.js";import{c as q,r as x,m as R,w as h,a as C}from"./project-data-live-9x5kEs1d.js";function Q(t,u,n){return t&&u&&n?{projectId:n}:void 0}function M(t,u,n,d,T,m){if(!t)return;const f=u??{tasks:[],foundWork:[]},i=[...R(f.tasks,n).filter(c=>c.id!==t.id),t],p=R(f.foundWork,d);return h(i,p,{scopeComplete:T,serverSnapshot:m}).find(c=>c.id===t.id)}function U(t){const u=O();if(u)return{tasks:u.tasks,serverTasks:u.serverTasks,isLoading:u.isLoading,error:u.error};const n=F(),{runtime:d,isOnline:T,pendingCount:m}=b(),{isLoaded:f,isSignedIn:l}=D(),i=n.useQuery(W.tasks.listTasksByProject,()=>{const o=t();return Q(f(),l(),o)}),p=L(o=>{const a=d(),s=t();if(!(!a||!s))return o.from({tasks:a.tasks}).where(({tasks:w})=>S(w.projectId,s))}),c=n.useQuery(W.foundwork.listFoundWorkByProject,()=>Q(f(),l(),t())),j=L(o=>{const a=d(),s=t();if(!(!a||!s))return o.from({foundWork:a.foundWork}).where(({foundWork:w})=>S(w.projectId,s))});P(()=>{const o=d(),a=t(),s=i.data();!o||!a||!Array.isArray(s)||o.reconcileTasks(a,s)}),P(()=>{const o=d(),a=t(),s=c.data();o&&a&&s&&o.reconcileFoundWork(a,s)});const y=g(()=>q(i.data(),c.data(),[!i.isLoading(),!c.isLoading(),!i.error(),!c.error()])),I=g(()=>x(T(),m(),[y()!==void 0,!d()||!p.isLoading,!d()||!j.isLoading]));let r,e;const v=g(()=>{const o=d()?h(p(),R(c.data()??[],j()),{scopeComplete:I(),serverSnapshot:y()}):(()=>{const s=i.data();return Array.isArray(s)?h(s,c.data()??[],{scopeComplete:I(),serverSnapshot:y()}):void 0})();if(!o)return;const a=C(r,o);return r=a,a}),E=g(()=>{const o=i.data();if(!Array.isArray(o))return;const a=h(o,R(c.data()??[],j()),{scopeComplete:I(),serverSnapshot:y()}),s=C(e,a);return e=s,s});return{tasks:v,serverTasks:E,isLoading:()=>d()?p.isLoading:i.isLoading(),error:i.error}}function X(t){const u=F(),{runtime:n,isOnline:d,pendingCount:T}=b(),{isLoaded:m,isSignedIn:f}=D(),l=u.useQuery(W.tasks.getTask,()=>{const r=t();return m()&&f()&&r?{id:r}:void 0}),i=L(r=>{const e=n(),k=t();if(!(!e||!k))return r.from({tasks:e.tasks}).where(({tasks:v})=>S(v.id,k))}),p=g(()=>i()[0]??l.data()),c=u.useQuery(W.projectData.getProjectData,()=>{const r=p()?.projectId;return Q(m(),f(),r)}),j=L(r=>{const e=n(),k=p()?.projectId;if(!(!e||!k))return r.from({tasks:e.tasks}).where(({tasks:v})=>S(v.projectId,k))}),A=L(r=>{const e=n(),k=p()?.projectId;if(!(!e||!k))return r.from({foundWork:e.foundWork}).where(({foundWork:v})=>S(v.projectId,k))});return P(()=>{const r=n(),e=l.data();!r||!e||r.reconcileTask(e)}),P(()=>{const r=n(),e=p()?.projectId,k=c.data();r&&e&&k&&r.reconcileFoundWork(e,k.foundWork)}),{task:g(()=>{const r=c.data(),e=q(r?.tasks,r?.foundWork,[!c.isLoading(),!c.error()]);return M(p(),r,j(),A(),x(d(),T(),[e!==void 0,!n()||!j.isLoading,!n()||!A.isLoading]),e)}),isLoading:()=>n()?i.isLoading:l.isLoading(),error:l.error}}export{X as a,U as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.