tide-commander 1.185.0 → 1.187.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/assets/{AudioPlayer-TfKZdQdw.js → AudioPlayer--6zn2PLj.js} +1 -1
- package/dist/assets/{BossLogsModal-CgKG5C3w.js → BossLogsModal-DuEDtBsn.js} +1 -1
- package/dist/assets/{BossSpawnModal-BnaEFEkJ.js → BossSpawnModal-C42bg47S.js} +1 -1
- package/dist/assets/{ControlsModal-AvbuOJ9Y.js → ControlsModal-C7a85gRZ.js} +1 -1
- package/dist/assets/{DockerLogsModal-DrTRT2MT.js → DockerLogsModal-Dq8vktNF.js} +1 -1
- package/dist/assets/{EmbeddedEditor-DMupDd8L.js → EmbeddedEditor-UkAMfMgB.js} +1 -1
- package/dist/assets/{FcStdViewer-CEcufXLO.js → FcStdViewer-CBecmpnm.js} +1 -1
- package/dist/assets/{GcodeViewer-BXQEHh0Y.js → GcodeViewer-dNB7GjDi.js} +1 -1
- package/dist/assets/{GlbViewer-6fiqpbSa.js → GlbViewer-P8pY1nXI.js} +1 -1
- package/dist/assets/{GmailOAuthSetup-BuwjdMiu.js → GmailOAuthSetup-CO4cE4HC.js} +1 -1
- package/dist/assets/{GoogleOAuthSetup-ClbRVt1w.js → GoogleOAuthSetup-DqZRvAWZ.js} +1 -1
- package/dist/assets/{IframeModal-DqeSTsXq.js → IframeModal-BAE1diTR.js} +1 -1
- package/dist/assets/{IntegrationsPanel-C-jmJexi.js → IntegrationsPanel-JYiardWX.js} +2 -2
- package/dist/assets/{LogViewerModal-B1OUt_oS.js → LogViewerModal-Cxw1OdRy.js} +1 -1
- package/dist/assets/{MonitoringModal-CafOFiTh.js → MonitoringModal-B06nNJ53.js} +1 -1
- package/dist/assets/{PM2LogsModal-D2oQ8yqk.js → PM2LogsModal-ml8qCTPs.js} +1 -1
- package/dist/assets/{RestoreArchivedAreaModal-D_BzfRNl.js → RestoreArchivedAreaModal-DC5Qr0Ns.js} +1 -1
- package/dist/assets/{Scene2DCanvas-Dzfxr9V5.js → Scene2DCanvas-CDFUmNXC.js} +1 -1
- package/dist/assets/{SceneManager-BwMwAay2.js → SceneManager-B4zndMJu.js} +1 -1
- package/dist/assets/{SkillsPanel-DyZK8UQP.js → SkillsPanel-b3wlh7k7.js} +1 -1
- package/dist/assets/{SlackMultiInstanceSetup-CWUCBxMA.js → SlackMultiInstanceSetup-BAWBLhR0.js} +1 -1
- package/dist/assets/{SpawnModal-Ccif5JAe.js → SpawnModal-BGuxmvDO.js} +1 -1
- package/dist/assets/{StatisticsModal-vpgsOAT6.js → StatisticsModal-uAw_HuEa.js} +1 -1
- package/dist/assets/{StlViewer-BxxTbq-w.js → StlViewer-D2hkwZih.js} +1 -1
- package/dist/assets/{SubordinateAssignmentModal-DtE_BZez.js → SubordinateAssignmentModal-Bp1cpD8r.js} +1 -1
- package/dist/assets/{ThreeAreaSelector-Bvv5Ircz.js → ThreeAreaSelector-DaUzJNZq.js} +1 -1
- package/dist/assets/{ThreeViewShortcuts-CDlyAOOo.js → ThreeViewShortcuts-rDWZqQ6n.js} +1 -1
- package/dist/assets/{TriggerManagerPanel-C3Ay2hMn.js → TriggerManagerPanel-nz5uiucE.js} +1 -1
- package/dist/assets/{VideoPlayer-_XnlmxSU.js → VideoPlayer-C08-3nBz.js} +1 -1
- package/dist/assets/{WorkflowEditorPanel-AkJ0BxQS.js → WorkflowEditorPanel-D5ZZU8lA.js} +1 -1
- package/dist/assets/{abnfDiagram-VRR7QNED-CxCVIsdN.js → abnfDiagram-VRR7QNED-C5u8J6Zc.js} +1 -1
- package/dist/assets/{arc-BFTKfTKo.js → arc-IRiFhDDl.js} +1 -1
- package/dist/assets/{architectureDiagram-ZJ3FMSHR-D2RTnPfl.js → architectureDiagram-ZJ3FMSHR-C19i35Jx.js} +1 -1
- package/dist/assets/{area-logos-DcI1D4Jw.js → area-logos-B-JGhGzv.js} +1 -1
- package/dist/assets/{blockDiagram-677ZJIJ3-63NzytPf.js → blockDiagram-677ZJIJ3-BZvGOjKN.js} +1 -1
- package/dist/assets/{c4Diagram-LMCZKHZV-Ct6Fnp-A.js → c4Diagram-LMCZKHZV-DTK8wF_R.js} +1 -1
- package/dist/assets/channel-DOkve-II.js +1 -0
- package/dist/assets/{chunk-2Q5K7J3B-DWfz0K87.js → chunk-2Q5K7J3B-CUPJvuW7.js} +1 -1
- package/dist/assets/{chunk-32BRIVSS-Q4lVzeAL.js → chunk-32BRIVSS-PtJeehgP.js} +1 -1
- package/dist/assets/{chunk-5VM5RSS4-Cdh4qUQO.js → chunk-5VM5RSS4-CMU-KQIj.js} +1 -1
- package/dist/assets/{chunk-EX3LRPZG-CwEOE5WL.js → chunk-EX3LRPZG-sWJPMNbO.js} +1 -1
- package/dist/assets/{chunk-JWPE2WC7-C4pOoqX4.js → chunk-JWPE2WC7-B-95shpn.js} +1 -1
- package/dist/assets/{chunk-MOJQB5TN-YuJPjTGW.js → chunk-MOJQB5TN-kzkcylOR.js} +1 -1
- package/dist/assets/{chunk-RYQCIY6F-D8R2rVlu.js → chunk-RYQCIY6F-jwfwr9R7.js} +1 -1
- package/dist/assets/{chunk-V7JOEXUC-DktEESWJ.js → chunk-V7JOEXUC-CDXTCYFC.js} +1 -1
- package/dist/assets/{chunk-VR4S4FIN--eHC87JB.js → chunk-VR4S4FIN-CKxl5CVL.js} +1 -1
- package/dist/assets/{chunk-XXDRQBXY-DLCg-eIA.js → chunk-XXDRQBXY-BWd1ZfAI.js} +1 -1
- package/dist/assets/classDiagram-OUVF2IWQ-DvQFTaDY.js +1 -0
- package/dist/assets/classDiagram-v2-EOCWNBFH-DvQFTaDY.js +1 -0
- package/dist/assets/{cose-bilkent-JH36ORCC-CF5-b77a.js → cose-bilkent-JH36ORCC-BS46WCmG.js} +1 -1
- package/dist/assets/{cynefin-VYW2F7L2-CzjbwIY5.js → cynefin-VYW2F7L2-C9n8GhMW.js} +1 -1
- package/dist/assets/{cynefinDiagram-TSTJHNR4-DFpmwdSb.js → cynefinDiagram-TSTJHNR4-C59mcNU0.js} +1 -1
- package/dist/assets/{dagre-VKFMJZFB-Cop8OyQf.js → dagre-VKFMJZFB-0wcG93Us.js} +1 -1
- package/dist/assets/{diagram-FQU43EPY-BY2J7jd4.js → diagram-FQU43EPY-Deiol_Qr.js} +1 -1
- package/dist/assets/{diagram-G47NLZAW-CuQ8wthE.js → diagram-G47NLZAW-D5rTzKp9.js} +1 -1
- package/dist/assets/{diagram-NH7WQ7WH-DbQQioTi.js → diagram-NH7WQ7WH-C7iek-dz.js} +1 -1
- package/dist/assets/{diagram-OA4YK3LP-CQJWT3JI.js → diagram-OA4YK3LP-DbxVAZAu.js} +1 -1
- package/dist/assets/{diagram-WEI45ONY-FAUM8xdM.js → diagram-WEI45ONY-B6YAQFIe.js} +1 -1
- package/dist/assets/{ebnfDiagram-CCIWWBDH-DokJuDfN.js → ebnfDiagram-CCIWWBDH-D-aT2mwH.js} +1 -1
- package/dist/assets/{erDiagram-Q63AITRT-DJT-w4mK.js → erDiagram-Q63AITRT-CPUU7Zy4.js} +1 -1
- package/dist/assets/{flowDiagram-23GEKE2U-BBePs1z6.js → flowDiagram-23GEKE2U-Bd73LfJ6.js} +1 -1
- package/dist/assets/{ganttDiagram-NO4QXBWP-DFB2LkPp.js → ganttDiagram-NO4QXBWP-DIuaW79V.js} +1 -1
- package/dist/assets/{gitGraphDiagram-IHSO6WYX-f23w1FRE.js → gitGraphDiagram-IHSO6WYX-xD1VFVGS.js} +1 -1
- package/dist/assets/{index-O6O1FoDY.js → index-2JaObqOn.js} +1 -1
- package/dist/assets/{index-Bft_2nWI.js → index-2qWclayP.js} +1 -1
- package/dist/assets/{index-yAoKz7VY.js → index-B6RQcB61.js} +1 -1
- package/dist/assets/index-BaYL3Eco.js +1 -0
- package/dist/assets/{index-DMx7tGNO.js → index-Bw92mJkH.js} +1 -1
- package/dist/assets/{index-DLmbhhuf.js → index-C8MrcgUo.js} +1 -1
- package/dist/assets/{index-BDDaoYcZ.js → index-CYdetr8X.js} +1 -1
- package/dist/assets/{index-BR-6QayQ.js → index-uAoMKZOA.js} +2 -2
- package/dist/assets/{index-mrMKBf3b.js → index-uRGTcmeS.js} +3 -3
- package/dist/assets/{infoDiagram-FWYZ7A6U-DNmEWboW.js → infoDiagram-FWYZ7A6U-Caq21N5I.js} +1 -1
- package/dist/assets/{ishikawaDiagram-FXEZZL3T-BW5HmWUv.js → ishikawaDiagram-FXEZZL3T-B75pgois.js} +1 -1
- package/dist/assets/{journeyDiagram-5HDEW3XC-CUu6A6f6.js → journeyDiagram-5HDEW3XC-CHnLU6xO.js} +1 -1
- package/dist/assets/{kanban-definition-HUTT4EX6-4W43zOke.js → kanban-definition-HUTT4EX6-BBYqmFbR.js} +1 -1
- package/dist/assets/{linear-DkURuoBE.js → linear-GW12WLBI.js} +1 -1
- package/dist/assets/{main-DGmjsdfM.js → main-BHmBlXv1.js} +117 -117
- package/dist/assets/{main-Cz0qHoVq.css → main-Dl43NBRA.css} +1 -1
- package/dist/assets/{mermaid.core-B_tMX15A.js → mermaid.core-Dm49cxsh.js} +4 -4
- package/dist/assets/{mindmap-definition-LN4V7U3C-DDmy4J_Z.js → mindmap-definition-LN4V7U3C-CT9QTbdH.js} +1 -1
- package/dist/assets/{pegDiagram-2B236MQR-Hr8MrSIW.js → pegDiagram-2B236MQR-CHGpO6Z1.js} +1 -1
- package/dist/assets/{pieDiagram-ENE6RG2P-FpqyAiik.js → pieDiagram-ENE6RG2P-B51_Vz66.js} +1 -1
- package/dist/assets/{quadrantDiagram-ABIIQ3AL-4XNAw-pD.js → quadrantDiagram-ABIIQ3AL-DSOOd6hq.js} +1 -1
- package/dist/assets/{railroadDiagram-RFXS5EU6-Skfx7IMr.js → railroadDiagram-RFXS5EU6-DhjCz-0M.js} +1 -1
- package/dist/assets/{requirementDiagram-TGXJPOKE-Bv2Poa9i.js → requirementDiagram-TGXJPOKE-BHUr1JjM.js} +1 -1
- package/dist/assets/{sankeyDiagram-HTMAVEWB-Azi8ZQHU.js → sankeyDiagram-HTMAVEWB-B4uZP0-p.js} +1 -1
- package/dist/assets/{sequenceDiagram-DBY2YBRQ-UJ725aLp.js → sequenceDiagram-DBY2YBRQ-B4qvrxpO.js} +1 -1
- package/dist/assets/{sizeCapture-X5ZJPWSS-D6Yk1U74.js → sizeCapture-X5ZJPWSS-oLTzgE2o.js} +1 -1
- package/dist/assets/{stateDiagram-2N3HPSRC-LGWy8-A7.js → stateDiagram-2N3HPSRC-C7J2si0w.js} +1 -1
- package/dist/assets/stateDiagram-v2-6OUMAXLB-yACyJfnp.js +1 -0
- package/dist/assets/{swimlanes-5IMT3BWC-k2Wu0JQN.js → swimlanes-5IMT3BWC-C1ba3tLP.js} +2 -2
- package/dist/assets/swimlanesDiagram-G3AALYLV-Ckwxykq4.js +8 -0
- package/dist/assets/{timeline-definition-FHXFAJF6-LduMJ6KS.js → timeline-definition-FHXFAJF6-Bs4l6YB2.js} +1 -1
- package/dist/assets/{vennDiagram-L72KCM5P-CjtozwKU.js → vennDiagram-L72KCM5P-C9YWK-tB.js} +1 -1
- package/dist/assets/{wardleyDiagram-EHGQE667-CiIkpaMm.js → wardleyDiagram-EHGQE667-B3jalDfp.js} +1 -1
- package/dist/assets/{web-BP-BguIQ.js → web-BaMZNtgs.js} +1 -1
- package/dist/assets/{web-DSnzrj-T.js → web-DbouEJev.js} +1 -1
- package/dist/assets/{web-C2LqVInh.js → web-Q8O8lwSx.js} +1 -1
- package/dist/assets/{xychartDiagram-FW5EYKEG-DRk48Gz1.js → xychartDiagram-FW5EYKEG-B6sxgjnh.js} +1 -1
- package/dist/build-info.json +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/dist/assets/channel-U6rGMshr.js +0 -1
- package/dist/assets/classDiagram-OUVF2IWQ-DCeRaOmK.js +0 -1
- package/dist/assets/classDiagram-v2-EOCWNBFH-DCeRaOmK.js +0 -1
- package/dist/assets/index-D1vhQn4i.js +0 -1
- package/dist/assets/stateDiagram-v2-6OUMAXLB-BgZKmDDt.js +0 -1
- package/dist/assets/swimlanesDiagram-G3AALYLV-O-DAJl2i.js +0 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as $t,d as Lt,z as kt,a0 as jt,f as Nt,bp as Pt,bN as Kt,bO as zt,aa as Qt,r as d,y as Gt,S as ge,bP as ct,bQ as Ut,bR as Ot,ar as Wt,bS as me,s as j,bT as Ht,j as p,I as ee,V as at,bU as ut,n as lt,bV as Yt,bW as ht,bX as _e,U as Le,m as Vt,aq as Et,u as De,bY as dt}from"./main-BHmBlXv1.js";import{bZ as rr,b_ as nr,b$ as ir,c0 as or,c1 as cr}from"./main-BHmBlXv1.js";import"./vendor-react--Eh9ivFN.js";import"./vendor-three-CBPuP1jE.js";function ie(s){return Array.isArray?Array.isArray(s):Ct(s)==="[object Array]"}function qt(s){if(typeof s=="string")return s;let e=s+"";return e=="0"&&1/s==-1/0?"-0":e}function Xt(s){return s==null?"":qt(s)}function se(s){return typeof s=="string"}function xt(s){return typeof s=="number"}function Jt(s){return s===!0||s===!1||Zt(s)&&Ct(s)=="[object Boolean]"}function Mt(s){return typeof s=="object"}function Zt(s){return Mt(s)&&s!==null}function H(s){return s!=null}function ke(s){return!s.trim().length}function Ct(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(s)}const es="Incorrect 'index' type",ts=s=>`Invalid value for key ${s}`,ss=s=>`Pattern length exceeds max of ${s}.`,rs=s=>`Missing ${s} property in key`,ns=s=>`Property 'weight' in key '${s}' must be a positive integer`,ft=Object.prototype.hasOwnProperty;class is{constructor(e){this._keys=[],this._keyMap={};let r=0;e.forEach(n=>{let i=St(n);this._keys.push(i),this._keyMap[i.id]=i,r+=i.weight}),this._keys.forEach(n=>{n.weight/=r})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function St(s){let e=null,r=null,n=null,i=1,o=null;if(se(s)||ie(s))n=s,e=mt(s),r=je(s);else{if(!ft.call(s,"name"))throw new Error(rs("name"));const c=s.name;if(n=c,ft.call(s,"weight")&&(i=s.weight,i<=0))throw new Error(ns(c));e=mt(c),r=je(c),o=s.getFn}return{path:e,id:r,weight:i,src:n,getFn:o}}function mt(s){return ie(s)?s:s.split(".")}function je(s){return ie(s)?s.join("."):s}function os(s,e){let r=[],n=!1;const i=(o,c,a)=>{if(H(o))if(!c[a])r.push(o);else{let u=c[a];const h=o[u];if(!H(h))return;if(a===c.length-1&&(se(h)||xt(h)||Jt(h)))r.push(Xt(h));else if(ie(h)){n=!0;for(let m=0,y=h.length;m<y;m+=1)i(h[m],c,a+1)}else c.length&&i(h,c,a+1)}};return i(s,se(e)?e.split("."):e,0),n?r:r[0]}const cs={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},as={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(s,e)=>s.score===e.score?s.idx<e.idx?-1:1:s.score<e.score?-1:1},us={location:0,threshold:.6,distance:100},ls={useExtendedSearch:!1,getFn:os,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var C={...as,...cs,...us,...ls};const hs=/[^ ]+/g;function ds(s=1,e=3){const r=new Map,n=Math.pow(10,e);return{get(i){const o=i.match(hs).length;if(r.has(o))return r.get(o);const c=1/Math.pow(o,.5*s),a=parseFloat(Math.round(c*n)/n);return r.set(o,a),a},clear(){r.clear()}}}class Ge{constructor({getFn:e=C.getFn,fieldNormWeight:r=C.fieldNormWeight}={}){this.norm=ds(r,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((r,n)=>{this._keysMap[r.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,se(this.docs[0])?this.docs.forEach((e,r)=>{this._addString(e,r)}):this.docs.forEach((e,r)=>{this._addObject(e,r)}),this.norm.clear())}add(e){const r=this.size();se(e)?this._addString(e,r):this._addObject(e,r)}removeAt(e){this.records.splice(e,1);for(let r=e,n=this.size();r<n;r+=1)this.records[r].i-=1}getValueForItemAtKeyId(e,r){return e[this._keysMap[r]]}size(){return this.records.length}_addString(e,r){if(!H(e)||ke(e))return;let n={v:e,i:r,n:this.norm.get(e)};this.records.push(n)}_addObject(e,r){let n={i:r,$:{}};this.keys.forEach((i,o)=>{let c=i.getFn?i.getFn(e):this.getFn(e,i.path);if(H(c)){if(ie(c)){let a=[];const u=[{nestedArrIndex:-1,value:c}];for(;u.length;){const{nestedArrIndex:h,value:m}=u.pop();if(H(m))if(se(m)&&!ke(m)){let y={v:m,i:h,n:this.norm.get(m)};a.push(y)}else ie(m)&&m.forEach((y,S)=>{u.push({nestedArrIndex:S,value:y})})}n.$[o]=a}else if(se(c)&&!ke(c)){let a={v:c,n:this.norm.get(c)};n.$[o]=a}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function It(s,e,{getFn:r=C.getFn,fieldNormWeight:n=C.fieldNormWeight}={}){const i=new Ge({getFn:r,fieldNormWeight:n});return i.setKeys(s.map(St)),i.setSources(e),i.create(),i}function fs(s,{getFn:e=C.getFn,fieldNormWeight:r=C.fieldNormWeight}={}){const{keys:n,records:i}=s,o=new Ge({getFn:e,fieldNormWeight:r});return o.setKeys(n),o.setIndexRecords(i),o}function we(s,{errors:e=0,currentLocation:r=0,expectedLocation:n=0,distance:i=C.distance,ignoreLocation:o=C.ignoreLocation}={}){const c=e/s.length;if(o)return c;const a=Math.abs(n-r);return i?c+a/i:a?1:c}function ms(s=[],e=C.minMatchCharLength){let r=[],n=-1,i=-1,o=0;for(let c=s.length;o<c;o+=1){let a=s[o];a&&n===-1?n=o:!a&&n!==-1&&(i=o-1,i-n+1>=e&&r.push([n,i]),n=-1)}return s[o-1]&&o-n>=e&&r.push([n,o-1]),r}const le=32;function ps(s,e,r,{location:n=C.location,distance:i=C.distance,threshold:o=C.threshold,findAllMatches:c=C.findAllMatches,minMatchCharLength:a=C.minMatchCharLength,includeMatches:u=C.includeMatches,ignoreLocation:h=C.ignoreLocation}={}){if(e.length>le)throw new Error(ss(le));const m=e.length,y=s.length,S=Math.max(0,Math.min(n,y));let x=o,E=S;const F=a>1||u,D=F?Array(y):[];let z;for(;(z=s.indexOf(e,E))>-1;){let P=we(e,{currentLocation:z,expectedLocation:S,distance:i,ignoreLocation:h});if(x=Math.min(P,x),E=z+m,F){let O=0;for(;O<m;)D[z+O]=1,O+=1}}E=-1;let v=[],Y=1,U=m+y;const he=1<<m-1;for(let P=0;P<m;P+=1){let O=0,W=U;for(;O<W;)we(e,{errors:P,currentLocation:S+W,expectedLocation:S,distance:i,ignoreLocation:h})<=x?O=W:U=W,W=Math.floor((U-O)/2+O);U=W;let J=Math.max(1,S-W+1),Z=c?y:Math.min(S+W,y)+m,B=Array(Z+2);B[Z+1]=(1<<P)-1;for(let M=Z;M>=J;M-=1){let T=M-1,V=r[s.charAt(T)];if(F&&(D[T]=+!!V),B[M]=(B[M+1]<<1|1)&V,P&&(B[M]|=(v[M+1]|v[M])<<1|1|v[M+1]),B[M]&he&&(Y=we(e,{errors:P,currentLocation:T,expectedLocation:S,distance:i,ignoreLocation:h}),Y<=x)){if(x=Y,E=T,E<=S)break;J=Math.max(1,2*S-E)}}if(we(e,{errors:P+1,currentLocation:S,expectedLocation:S,distance:i,ignoreLocation:h})>x)break;v=B}const re={isMatch:E>=0,score:Math.max(.001,Y)};if(F){const P=ms(D,a);P.length?u&&(re.indices=P):re.isMatch=!1}return re}function gs(s){let e={};for(let r=0,n=s.length;r<n;r+=1){const i=s.charAt(r);e[i]=(e[i]||0)|1<<n-r-1}return e}const be=String.prototype.normalize?(s=>s.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(s=>s);class Ft{constructor(e,{location:r=C.location,threshold:n=C.threshold,distance:i=C.distance,includeMatches:o=C.includeMatches,findAllMatches:c=C.findAllMatches,minMatchCharLength:a=C.minMatchCharLength,isCaseSensitive:u=C.isCaseSensitive,ignoreDiacritics:h=C.ignoreDiacritics,ignoreLocation:m=C.ignoreLocation}={}){if(this.options={location:r,threshold:n,distance:i,includeMatches:o,findAllMatches:c,minMatchCharLength:a,isCaseSensitive:u,ignoreDiacritics:h,ignoreLocation:m},e=u?e:e.toLowerCase(),e=h?be(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const y=(x,E)=>{this.chunks.push({pattern:x,alphabet:gs(x),startIndex:E})},S=this.pattern.length;if(S>le){let x=0;const E=S%le,F=S-E;for(;x<F;)y(this.pattern.substr(x,le),x),x+=le;if(E){const D=S-le;y(this.pattern.substr(D),D)}}else y(this.pattern,0)}searchIn(e){const{isCaseSensitive:r,ignoreDiacritics:n,includeMatches:i}=this.options;if(e=r?e:e.toLowerCase(),e=n?be(e):e,this.pattern===e){let F={isMatch:!0,score:0};return i&&(F.indices=[[0,e.length-1]]),F}const{location:o,distance:c,threshold:a,findAllMatches:u,minMatchCharLength:h,ignoreLocation:m}=this.options;let y=[],S=0,x=!1;this.chunks.forEach(({pattern:F,alphabet:D,startIndex:z})=>{const{isMatch:v,score:Y,indices:U}=ps(e,F,D,{location:o+z,distance:c,threshold:a,findAllMatches:u,minMatchCharLength:h,includeMatches:i,ignoreLocation:m});v&&(x=!0),S+=Y,v&&U&&(y=[...y,...U])});let E={isMatch:x,score:x?S/this.chunks.length:1};return x&&i&&(E.indices=y),E}}class ae{constructor(e){this.pattern=e}static isMultiMatch(e){return pt(e,this.multiRegex)}static isSingleMatch(e){return pt(e,this.singleRegex)}search(){}}function pt(s,e){const r=s.match(e);return r?r[1]:null}class As extends ae{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const r=e===this.pattern;return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class ys extends ae{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const n=e.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class Es extends ae{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const r=e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class xs extends ae{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const r=!e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class Ms extends ae{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const r=e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class Cs extends ae{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const r=!e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class _t extends ae{constructor(e,{location:r=C.location,threshold:n=C.threshold,distance:i=C.distance,includeMatches:o=C.includeMatches,findAllMatches:c=C.findAllMatches,minMatchCharLength:a=C.minMatchCharLength,isCaseSensitive:u=C.isCaseSensitive,ignoreDiacritics:h=C.ignoreDiacritics,ignoreLocation:m=C.ignoreLocation}={}){super(e),this._bitapSearch=new Ft(e,{location:r,threshold:n,distance:i,includeMatches:o,findAllMatches:c,minMatchCharLength:a,isCaseSensitive:u,ignoreDiacritics:h,ignoreLocation:m})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class wt extends ae{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let r=0,n;const i=[],o=this.pattern.length;for(;(n=e.indexOf(this.pattern,r))>-1;)r=n+o,i.push([n,r-1]);const c=!!i.length;return{isMatch:c,score:c?0:1,indices:i}}}const Ne=[As,wt,Es,xs,Cs,Ms,ys,_t],gt=Ne.length,Ss=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Is="|";function Fs(s,e={}){return s.split(Is).map(r=>{let n=r.trim().split(Ss).filter(o=>o&&!!o.trim()),i=[];for(let o=0,c=n.length;o<c;o+=1){const a=n[o];let u=!1,h=-1;for(;!u&&++h<gt;){const m=Ne[h];let y=m.isMultiMatch(a);y&&(i.push(new m(y,e)),u=!0)}if(!u)for(h=-1;++h<gt;){const m=Ne[h];let y=m.isSingleMatch(a);if(y){i.push(new m(y,e));break}}}return i})}const _s=new Set([_t.type,wt.type]);class ws{constructor(e,{isCaseSensitive:r=C.isCaseSensitive,ignoreDiacritics:n=C.ignoreDiacritics,includeMatches:i=C.includeMatches,minMatchCharLength:o=C.minMatchCharLength,ignoreLocation:c=C.ignoreLocation,findAllMatches:a=C.findAllMatches,location:u=C.location,threshold:h=C.threshold,distance:m=C.distance}={}){this.query=null,this.options={isCaseSensitive:r,ignoreDiacritics:n,includeMatches:i,minMatchCharLength:o,findAllMatches:a,ignoreLocation:c,location:u,threshold:h,distance:m},e=r?e:e.toLowerCase(),e=n?be(e):e,this.pattern=e,this.query=Fs(this.pattern,this.options)}static condition(e,r){return r.useExtendedSearch}searchIn(e){const r=this.query;if(!r)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:i,ignoreDiacritics:o}=this.options;e=i?e:e.toLowerCase(),e=o?be(e):e;let c=0,a=[],u=0;for(let h=0,m=r.length;h<m;h+=1){const y=r[h];a.length=0,c=0;for(let S=0,x=y.length;S<x;S+=1){const E=y[S],{isMatch:F,indices:D,score:z}=E.search(e);if(F){if(c+=1,u+=z,n){const v=E.constructor.type;_s.has(v)?a=[...a,...D]:a.push(D)}}else{u=0,c=0,a.length=0;break}}if(c){let S={isMatch:!0,score:u/c};return n&&(S.indices=a),S}}return{isMatch:!1,score:1}}}const Pe=[];function bs(...s){Pe.push(...s)}function Ke(s,e){for(let r=0,n=Pe.length;r<n;r+=1){let i=Pe[r];if(i.condition(s,e))return new i(s,e)}return new Ft(s,e)}const ve={AND:"$and",OR:"$or"},ze={PATH:"$path",PATTERN:"$val"},Qe=s=>!!(s[ve.AND]||s[ve.OR]),vs=s=>!!s[ze.PATH],Ds=s=>!ie(s)&&Mt(s)&&!Qe(s),At=s=>({[ve.AND]:Object.keys(s).map(e=>({[e]:s[e]}))});function bt(s,e,{auto:r=!0}={}){const n=i=>{let o=Object.keys(i);const c=vs(i);if(!c&&o.length>1&&!Qe(i))return n(At(i));if(Ds(i)){const u=c?i[ze.PATH]:o[0],h=c?i[ze.PATTERN]:i[u];if(!se(h))throw new Error(ts(u));const m={keyId:je(u),pattern:h};return r&&(m.searcher=Ke(h,e)),m}let a={children:[],operator:o[0]};return o.forEach(u=>{const h=i[u];ie(h)&&h.forEach(m=>{a.children.push(n(m))})}),a};return Qe(s)||(s=At(s)),n(s)}function Bs(s,{ignoreFieldNorm:e=C.ignoreFieldNorm}){s.forEach(r=>{let n=1;r.matches.forEach(({key:i,norm:o,score:c})=>{const a=i?i.weight:null;n*=Math.pow(c===0&&a?Number.EPSILON:c,(a||1)*(e?1:o))}),r.score=n})}function Rs(s,e){const r=s.matches;e.matches=[],H(r)&&r.forEach(n=>{if(!H(n.indices)||!n.indices.length)return;const{indices:i,value:o}=n;let c={indices:i,value:o};n.key&&(c.key=n.key.src),n.idx>-1&&(c.refIndex=n.idx),e.matches.push(c)})}function Ts(s,e){e.score=s.score}function $s(s,e,{includeMatches:r=C.includeMatches,includeScore:n=C.includeScore}={}){const i=[];return r&&i.push(Rs),n&&i.push(Ts),s.map(o=>{const{idx:c}=o,a={item:e[c],refIndex:c};return i.length&&i.forEach(u=>{u(o,a)}),a})}class te{constructor(e,r={},n){this.options={...C,...r},this.options.useExtendedSearch,this._keyStore=new is(this.options.keys),this.setCollection(e,n)}setCollection(e,r){if(this._docs=e,r&&!(r instanceof Ge))throw new Error(es);this._myIndex=r||It(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){H(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const r=[];for(let n=0,i=this._docs.length;n<i;n+=1){const o=this._docs[n];e(o,n)&&(this.removeAt(n),n-=1,i-=1,r.push(o))}return r}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:r=-1}={}){const{includeMatches:n,includeScore:i,shouldSort:o,sortFn:c,ignoreFieldNorm:a}=this.options;let u=se(e)?se(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Bs(u,{ignoreFieldNorm:a}),o&&u.sort(c),xt(r)&&r>-1&&(u=u.slice(0,r)),$s(u,this._docs,{includeMatches:n,includeScore:i})}_searchStringList(e){const r=Ke(e,this.options),{records:n}=this._myIndex,i=[];return n.forEach(({v:o,i:c,n:a})=>{if(!H(o))return;const{isMatch:u,score:h,indices:m}=r.searchIn(o);u&&i.push({item:o,idx:c,matches:[{score:h,value:o,norm:a,indices:m}]})}),i}_searchLogical(e){const r=bt(e,this.options),n=(a,u,h)=>{if(!a.children){const{keyId:y,searcher:S}=a,x=this._findMatches({key:this._keyStore.get(y),value:this._myIndex.getValueForItemAtKeyId(u,y),searcher:S});return x&&x.length?[{idx:h,item:u,matches:x}]:[]}const m=[];for(let y=0,S=a.children.length;y<S;y+=1){const x=a.children[y],E=n(x,u,h);if(E.length)m.push(...E);else if(a.operator===ve.AND)return[]}return m},i=this._myIndex.records,o={},c=[];return i.forEach(({$:a,i:u})=>{if(H(a)){let h=n(r,a,u);h.length&&(o[u]||(o[u]={idx:u,item:a,matches:[]},c.push(o[u])),h.forEach(({matches:m})=>{o[u].matches.push(...m)}))}}),c}_searchObjectList(e){const r=Ke(e,this.options),{keys:n,records:i}=this._myIndex,o=[];return i.forEach(({$:c,i:a})=>{if(!H(c))return;let u=[];n.forEach((h,m)=>{u.push(...this._findMatches({key:h,value:c[m],searcher:r}))}),u.length&&o.push({idx:a,item:c,matches:u})}),o}_findMatches({key:e,value:r,searcher:n}){if(!H(r))return[];let i=[];if(ie(r))r.forEach(({v:o,i:c,n:a})=>{if(!H(o))return;const{isMatch:u,score:h,indices:m}=n.searchIn(o);u&&i.push({score:h,key:e,value:o,idx:c,norm:a,indices:m})});else{const{v:o,n:c}=r,{isMatch:a,score:u,indices:h}=n.searchIn(o);a&&i.push({score:u,key:e,value:o,norm:c,indices:h})}return i}}te.version="7.1.0";te.createIndex=It;te.parseIndex=fs;te.config=C;te.parseQuery=bt;bs(ws);async function Ls(s){const e=new URLSearchParams({q:s}),r=await $t(Lt(`/api/folders/search?${e.toString()}`));if(!r.ok){const i=await r.json().catch(()=>({}));throw new Error(i.error||`Failed to search folders: ${r.statusText}`)}const n=await r.json();return Array.isArray(n.folders)?n.folders:[]}const ks=["command","agent","building","area","folder","file","modified-file","session"],js=2,Ns=2,Ps=50,Ks=10,zs=3,Qs=6;function Gs(){const s=Et(ge.SPOTLIGHT_TAB,"all");return me.includes(s)?s:"all"}function yt(){return Vt(ge.SPOTLIGHT_QUERY,"")}function Us(){const s=Et(ge.AOP_CONFIG,{});return s.sortMode==="name"||s.sortMode==="status"||s.sortMode==="recent"?s.sortMode:"recent"}function Os({isOpen:s,onClose:e,onOpenSpawnModal:r,onOpenCommanderView:n,onOpenToolbox:i,onOpenFileExplorer:o,onOpenPM2LogsModal:c,onOpenBossLogsModal:a,onOpenDatabasePanel:u,onOpenMonitoringModal:h,onOpenSessionFinder:m}){const y=kt(),S=jt(),x=Nt(),E=Pt(),F=Kt(),D=zt(),z=Qt(),v=d.useRef(e);v.current=e;const Y=d.useRef(r);Y.current=r;const U=d.useRef(n);U.current=n;const he=d.useRef(i);he.current=i;const re=d.useRef(o);re.current=o;const P=d.useRef(c);P.current=c;const O=d.useRef(a);O.current=a;const W=d.useRef(u);W.current=u;const J=d.useRef(h);J.current=h;const Z=d.useRef(m);Z.current=m;const[B,L]=d.useState(yt),[M,T]=d.useState(0),[V,ue]=d.useState(Gs),[Ue,Ae]=d.useState([]),[Oe,ye]=d.useState([]),[Ee,xe]=d.useState({query:"",rows:[]}),vt=d.useCallback(t=>{L(t),Gt(ge.SPOTLIGHT_QUERY,t)},[]);d.useEffect(()=>{s&&(L(yt()),T(0))},[s]),d.useEffect(()=>{if(!s){Ae([]);return}const t=B.trim();if(t.length<js){Ae([]);return}let l=!1;const f=setTimeout(()=>{Ls(t).then(g=>{l||Ae(g)}).catch(()=>{l||Ae([])})},250);return()=>{l=!0,clearTimeout(f)}},[s,B]);const Dt=(E.fileSearchExcludeDirs??ct).join(",");d.useEffect(()=>{if(!s){ye([]);return}const t=B.trim();if(t.length<Ns){ye([]);return}let l=!1;const f=setTimeout(()=>{Ut(t,{exclude:E.fileSearchExcludeDirs??[...ct],limit:Ps}).then(g=>{l||ye(g)}).catch(()=>{l||ye([])})},250);return()=>{l=!0,clearTimeout(f)}},[s,B,Dt,E.fileSearchExcludeDirs]),d.useEffect(()=>{if(!s){xe({query:"",rows:[]});return}const t=B.trim();if(t.length<zs){xe({query:"",rows:[]});return}let l=!1;const f=setTimeout(()=>{Ot(t,{limit:Qs}).then(g=>{l||xe({query:t,rows:g})}).catch(()=>{l||xe({query:"",rows:[]})})},250);return()=>{l=!0,clearTimeout(f)}},[s,B]);const Be=d.useCallback(t=>{ue(t),Wt(ge.SPOTLIGHT_TAB,t)},[]),We=d.useRef(V);We.current=V;const Bt=d.useCallback(t=>{const l=me.indexOf(We.current),f=me[(l+t+me.length)%me.length];Be(f)},[Be]);d.useEffect(()=>{T(0)},[V]);const Re=j.getShortcuts(),pe=d.useMemo(()=>s?Ht():{},[s]),Me=d.useMemo(()=>{if(!s)return[];const t=window.matchMedia("(pointer: coarse)").matches,l=Re.find(g=>g.id==="spawn-agent"),f=Re.find(g=>g.id==="toggle-commander");return[{id:"cmd-spawn",type:"command",title:"Spawn New Agent",subtitle:t?"":l?at(l):"Alt+N",icon:p.jsx(ee,{name:"plus",size:16}),action:()=>{v.current(),Y.current()}},{id:"cmd-commander",type:"command",title:"Commander View",subtitle:t?"":f!=null&&f.key?at(f):"Tab",icon:p.jsx(ee,{name:"dashboard",size:16}),action:()=>{v.current(),U.current()}},{id:"cmd-settings",type:"command",title:"Settings & Tools",subtitle:"Configure Tide Commander",icon:p.jsx(ee,{name:"gear",size:16}),action:()=>{v.current(),he.current()}},{id:"cmd-monitoring",type:"command",title:"Monitoring & Logs",subtitle:"Triggers, workflows, events",icon:p.jsx(ee,{name:"chart-line",size:16}),action:()=>{var g;v.current(),(g=J.current)==null||g.call(J)}}]},[s,Re]),Ce=d.useMemo(()=>{const t=new Map;if(!s)return t;const l=Array.from(S.values());for(const f of y.values())for(const g of l)if(j.isPositionInArea({x:f.position.x,z:f.position.z},g)){t.set(f.id,g);break}return t},[s,y,S]),de=d.useMemo(()=>s?Array.from(y.values()).map(t=>{const l=(F||[]).filter(Q=>Q.agentId===t.id).map(Q=>Q.filePath),f=[...new Set(l)],g=f.map(Q=>Q.split("/").pop()||Q),I=[];t.lastAssignedTask&&I.push(t.lastAssignedTask);const $=`${t.class} • ${t.cwd}`,_=Ce.get(t.id),k=(_==null?void 0:_.name)||"";let G=`${t.name} ${t.class} ${t.status} ${t.cwd}`;t.taskLabel&&(G+=` ${t.taskLabel}`),k&&(G+=` ${k}`),g.length>0&&(G+=` ${g.join(" ")} ${f.join(" ")}`),I.length>0&&(G+=` ${I.join(" ")}`);const oe=Date.now()-t.lastActivity;let ce;return t.lastAssignedTask&&(t.lastAssignedTask.length>150?ce=t.lastAssignedTask.slice(0,150)+"...":ce=t.lastAssignedTask),{id:`agent-${t.id}`,type:"agent",title:t.name,subtitle:$,lastUserInput:ce,timeAway:oe,icon:p.jsx(lt,{agent:t,size:20}),_searchText:G,_modifiedFiles:f,_userQueries:I,_agentId:t.id,_lastActivity:t.lastActivity,_taskLabel:t.taskLabel,_status:t.status,_areaName:k||void 0,_areaColor:_==null?void 0:_.color,action:()=>{v.current(),ut(t.id),j.selectAgent(t.id),j.getState().viewMode!=="flat"&&j.requestTerminalExpand()}}}):[],[s,y,F,Ce]),Se=d.useMemo(()=>s?Array.from(S.values()).map(t=>{var l;return{id:`area-${t.id}`,type:"area",title:t.name,subtitle:`${t.assignedAgentIds.length} agents • ${((l=t.directories)==null?void 0:l.length)||0} folders`,icon:p.jsx(ee,{name:"map",size:16}),action:()=>{v.current(),j.selectArea(t.id)}}}):[],[s,S]),He=d.useMemo(()=>{const t=new Map;for(const l of de)l._agentId&&t.set(l._agentId,l);return t},[de]),Ye=d.useMemo(()=>{const t=new Map;if(!s)return t;for(const l of y.values()){const f=Ce.get(l.id);if(!f||f.archived)continue;const g=t.get(f.id);g?g.push(l):t.set(f.id,[l])}return t},[s,y,Ce]),Ve=d.useMemo(()=>{const t=new Map;for(const l of D)t.has(l.agentId)||t.set(l.agentId,l.timestamp);return t},[D]),Te=d.useMemo(()=>{if(!s)return[];const t=B.trim().toLowerCase(),l=Yt({sortMode:Us(),agentsWithUnseenOutput:z,getLatestToolTimestamp:I=>Ve.get(I)}),f=Array.from(S.values()).filter(I=>!I.archived).filter(I=>t?I.name.toLowerCase().includes(t):!0).sort((I,$)=>I.name.localeCompare($.name,void 0,{sensitivity:"base"})),g=[];for(const I of f){const _=(Ye.get(I.id)||[]).slice().sort(l).map(k=>He.get(k.id)).filter(k=>!!k);!t&&_.length===0||g.push({areaId:I.id,areaName:I.name,areaColor:I.color,agents:_})}return g},[s,B,S,Ye,He,z,Ve]),Ie=d.useMemo(()=>s?Array.from(x.values()).filter(t=>t.type==="server"||t.type==="boss"||t.type==="database"||t.type==="tests").map(t=>{var k,G,oe,ce,Q;const l=t.status==="running"?"#4ade80":t.status==="stopped"?"#f87171":"#facc15",f=t.type==="boss"?"crown":t.type==="database"?"database":t.type==="tests"?"flask":"desktop",g=t.type==="boss"?"Boss":t.type==="database"?"Database":t.type==="tests"?"Tests":"Server";let I=`${g} • ${t.status}`;if(t.type==="database"&&((G=(k=t.database)==null?void 0:k.connections)!=null&&G.length)){const N=t.database.connections[0];I+=` • ${N.engine} @ ${N.host}`}else t.type==="tests"&&t.folderPath?I=`${g} • ${t.folderPath}`:t.cwd&&(I+=` • ${t.cwd}`);const $=((oe=t.pm2Status)==null?void 0:oe.ports)||[];let _=`${t.name} ${t.type} ${t.status} ${t.cwd||""} ${((ce=t.pm2)==null?void 0:ce.name)||""}`;if(t.type==="tests"&&(_+=` ${t.folderPath||""} tests junit maven`),$.length>0&&(_+=` ${$.join(" ")}`),t.type==="database"&&((Q=t.database)!=null&&Q.connections))for(const N of t.database.connections)_+=` ${N.name} ${N.engine} ${N.host} ${N.database||""} mysql postgresql sql`;return{id:`building-${t.id}`,type:"building",title:t.name,subtitle:I,_ports:$,icon:p.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4},children:[p.jsx(ee,{name:"status-pending",size:10,weight:"fill",color:l}),p.jsx(ee,{name:f,size:16})]}),_searchText:_,action:()=>{var N;v.current(),t.type==="boss"?O.current(t.id):t.type==="database"?W.current(t.id):t.type==="tests"?j.openTestsBuilding(t.id):t.type==="http"?j.openHttpBuilding(t.id):(N=t.pm2)!=null&&N.enabled&&P.current(t.id)}}}):[],[s,x]),qe=d.useMemo(()=>{if(!s)return[];const t=F||[],l=new Set,f=[];for(const g of t){if(l.has(g.filePath))continue;l.add(g.filePath);const I=g.filePath.split("/").pop()||g.filePath,$=g.action==="created"?"Created":g.action==="modified"?"Modified":g.action==="deleted"?"Deleted":"Read";if(f.push({id:`modified-${g.filePath}-${g.timestamp}`,type:"modified-file",title:I,subtitle:`${$} by ${g.agentName} • ${g.filePath}`,matchedText:g.filePath,icon:g.action==="deleted"?p.jsx(ee,{name:"trash",size:16}):ht(g.filePath),action:()=>{v.current();const _=Array.from(j.getState().areas.values());for(const k of _)for(const G of k.directories||[])if(g.filePath.startsWith(G)){j.setFileViewerPath(g.filePath),re.current(k.id);return}j.selectAgent(g.agentId)}}),f.length>=50)break}return f},[s,F]),Xe=d.useMemo(()=>s?Ue.map(t=>{const l=t.isGitRepo&&t.gitBranch?`${t.path} • ${t.gitBranch}`:t.path;return{id:`folder-${t.path}`,type:"folder",title:t.name,subtitle:l,matchedText:t.path,icon:p.jsx(ee,{name:t.isGitRepo?"git-branch":"folder",size:16}),_searchText:`${t.name} ${t.path}`,_isGitRepo:t.isGitRepo,_gitBranch:t.gitBranch,action:()=>{v.current(),j.openFileExplorer(t.path)}}}):[],[s,Ue]),Fe=d.useMemo(()=>s?Oe.map(t=>{const l=t.areaName&&t.areaName!==t.projectName?`${t.projectName} · ${t.areaName}`:t.projectName;return{id:`file-${t.path}`,type:"file",title:t.name,subtitle:t.relativePath,matchedText:`${t.path} ${l}`,icon:ht(t.path),_searchText:`${t.name} ${t.relativePath} ${t.path} ${t.projectName} ${t.areaName}`,_projectName:t.projectName,_areaName:t.areaName,action:()=>{v.current();const f=j.getState().areas.get(t.areaId),g=((f==null?void 0:f.directories)||[]).find(I=>I.replace(/\\/g,"/").replace(/\/+$/,"")===t.projectRoot.replace(/\/+$/,""))||t.projectRoot;j.revealFileInExplorer(t.path,g)}}}):[],[s,Oe]),Je=d.useMemo(()=>{if(!s)return[];const t=l=>{const f=Date.now()-new Date(l).getTime();return!Number.isFinite(f)||f<0?"":f<36e5?`${Math.max(1,Math.floor(f/6e4))}m`:f<864e5?`${Math.floor(f/36e5)}h`:`${Math.floor(f/864e5)}d`};return Ee.rows.map(l=>{const f=Array.from(y.values()).find(_=>_.sessionId===l.sessionId),g=(l.firstPrompt||l.snippet||l.sessionId).slice(0,90),I=[l.projectPath||l.projectDir];f&&I.push(`→ ${f.name}`);const $=t(l.lastModified);return $&&I.push($),I.push(`${l.totalMatches}×`),{id:`session-${l.sessionId}`,type:"session",title:g,subtitle:I.join(" • "),matchedQuery:l.snippet||void 0,icon:f?p.jsx(lt,{agent:f,size:20}):p.jsx(ee,{name:"history",size:16}),action:()=>{var k;v.current();const _=Array.from(j.getState().agents.values()).find(G=>G.sessionId===l.sessionId);_?(ut(_.id),j.selectAgent(_.id),j.getState().viewMode!=="flat"&&j.requestTerminalExpand(),j.requestTerminalSearch(_.id,Ee.query)):(k=Z.current)==null||k.call(Z,{initialQuery:Ee.query,initialSessionKey:`${l.projectPath}::${l.sessionId}`})}}})},[s,Ee,y]),Ze=d.useMemo(()=>new te(de,{keys:["title","subtitle","_searchText","lastUserInput"],threshold:.4,ignoreLocation:!0,includeScore:!0,includeMatches:!0}),[de]),et=d.useMemo(()=>new te(Me,{keys:["title","subtitle"],threshold:.4,includeScore:!0,includeMatches:!0}),[Me]),tt=d.useMemo(()=>new te(Se,{keys:["title","subtitle"],threshold:.4,includeScore:!0,includeMatches:!0}),[Se]),st=d.useMemo(()=>new te(qe,{keys:["title","subtitle","matchedText"],threshold:.4,ignoreLocation:!0,includeScore:!0,includeMatches:!0}),[qe]),rt=d.useMemo(()=>new te(Ie,{keys:["title","subtitle","_searchText"],threshold:.4,ignoreLocation:!0,includeScore:!0,includeMatches:!0}),[Ie]),fe=d.useMemo(()=>{if(!B.trim()){const A=[];A.push(...Ie);const w=[...de].sort((R,K)=>{const q=_e(R._agentId,R._lastActivity,pe);return _e(K._agentId,K._lastActivity,pe)-q});A.push(...w),A.push(...Me.slice(0,2)),A.push(...Se.slice(0,2));const b={};return ks.forEach((R,K)=>{b[R]=K}),A.sort((R,K)=>(b[R.type]??999)-(b[K.type]??999)),A}const t=B.trim().toLowerCase(),l=Ze.search(B).slice(0,8),f=et.search(B).slice(0,3),g=tt.search(B).slice(0,2),I=st.search(B).slice(0,3),$=Xe.slice(0,8),_=Fe.slice(0,Ks),k=rt.search(B).filter(A=>{const w=A.score??1;return`${A.item.title} ${A.item.subtitle||""} ${A.item._searchText||""}`.toLowerCase().includes(t)||w<=.2}).slice(0,4),G={agent:6,building:5,folder:4,file:4,command:3,area:2,"modified-file":1,session:0},oe=A=>{if(!t)return 1;const w=A.title.toLowerCase();return w===t?6:w.startsWith(t)?5:w.split(/[^a-z0-9]+/i).includes(t)?4:w.includes(t)?3:`${A.subtitle||""} ${A._searchText||""} ${A.matchedText||""}`.toLowerCase().includes(t)?2:1},ce=(A,w)=>{const b=(1-Math.min(1,w??1))*4;return oe(A)*100+(G[A.type]??0)*5+b},Q=new Map,N=(A,w)=>{const b=Q.get(A.type),R={item:A,score:ce(A,w)};b?b.push(R):Q.set(A.type,[R])};for(const A of l){const w={...A.item};if(w._modifiedFiles&&w._modifiedFiles.length>0){const b=w._modifiedFiles.filter(R=>{var ne;const K=((ne=R.split("/").pop())==null?void 0:ne.toLowerCase())||"",q=R.toLowerCase();return K.includes(t)||q.includes(t)});b.length>0&&(w.matchedFiles=b)}if(w._userQueries&&w._userQueries.length>0){const b=w._userQueries.find(R=>R.toLowerCase().includes(t));if(b)if(b.length>200){const K=b.toLowerCase().indexOf(t),q=Math.max(0,K-60),ne=Math.min(b.length,K+t.length+100);w.matchedQuery=(q>0?"...":"")+b.slice(q,ne)+(ne<b.length?"...":"")}else w.matchedQuery=b}N(w,A.score)}for(const A of k)N(A.item,A.score);for(const A of f)N(A.item,A.score);for(const A of g)N(A.item,A.score);for(const A of I)N(A.item,A.score);for(const A of $)N(A,void 0);for(const A of _)N(A,void 0);for(const[A,w]of Q)A==="agent"?w.sort((b,R)=>{const K=oe(b.item),q=oe(R.item);if(q!==K)return q-K;const ne=_e(b.item._agentId,b.item._lastActivity,pe),ot=_e(R.item._agentId,R.item._lastActivity,pe);return ot!==ne?ot-ne:R.score-b.score}):w.sort((b,R)=>R.score-b.score);const nt={agent:0,building:1,folder:1,command:1,area:1,"modified-file":2,file:3,session:4},it=A=>A.reduce((w,b)=>Math.max(w,b.score),-1),$e=[];Array.from(Q.entries()).sort(([A,w],[b,R])=>{const K=nt[A]??1,q=nt[b]??1;return K!==q?K-q:it(R)-it(w)}).forEach(([,A])=>{for(const w of A)$e.push(w.item)});for(const A of Je)$e.push(A);return $e},[B,Ze,et,tt,st,rt,Me,de,Se,Ie,Xe,Fe,Je,pe]),X=d.useMemo(()=>{switch(V){case"agents":return fe.filter(t=>t.type==="agent");case"buildings":return fe.filter(t=>t.type==="building");case"commands":return fe.filter(t=>t.type==="command");case"folders":return fe.filter(t=>t.type==="folder");case"files":return Fe;case"areas":return Te.flatMap(t=>t.agents);case"all":default:return fe}},[V,fe,Te,Fe]);d.useEffect(()=>{M>=X.length&&T(Math.max(0,X.length-1))},[X.length,M]);const Rt=d.useCallback(t=>{if(t.altKey&&!t.ctrlKey&&!t.metaKey&&(t.key==="p"||t.key==="n"||t.key==="P"||t.key==="N")){t.preventDefault(),t.stopPropagation(),t.nativeEvent.stopImmediatePropagation();const l=t.key.toLowerCase();T(l==="p"?f=>f>0?f-1:X.length-1:f=>f<X.length-1?f+1:0);return}switch(t.key){case"Escape":t.preventDefault(),v.current();break;case"ArrowUp":t.preventDefault(),T(l=>l>0?l-1:X.length-1);break;case"ArrowDown":t.preventDefault(),T(l=>l<X.length-1?l+1:0);break;case"Enter":t.preventDefault(),X[M]&&X[M].action();break}},[X,M]),Tt=d.useCallback((t,l)=>{if(!l||!t)return t;const f=t.toLowerCase(),g=l.toLowerCase(),I=[];let $=0,_=f.indexOf(g),k=0;for(;_!==-1;)_>$&&I.push(t.slice($,_)),I.push(Le.createElement("mark",{key:k++,className:"spotlight-highlight"},t.slice(_,_+l.length))),$=_+l.length,_=f.indexOf(g,$);return $<t.length&&I.push(t.slice($)),I.length>0?Le.createElement(Le.Fragment,null,...I):t},[]);return{query:B,setQuery:vt,selectedIndex:M,setSelectedIndex:T,results:X,activeTab:V,setActiveTab:Be,cycleTab:Bt,areaSections:Te,handleKeyDown:Rt,highlightMatch:Tt}}const Ws=d.forwardRef(function({query:e,onQueryChange:r,onKeyDown:n,onResetSelection:i},o){const{t:c}=De(["common"]);return p.jsxs("div",{className:"spotlight-input-wrapper",children:[p.jsx("span",{className:"spotlight-search-icon",children:"⌘"}),p.jsx("input",{ref:o,type:"text",className:"spotlight-input",placeholder:c("common:search.spotlightPlaceholder"),value:e,onChange:a=>{r(a.target.value),i()},onKeyDown:n,autoFocus:!0,spellCheck:!1}),p.jsxs("div",{className:"spotlight-input-hints",children:[p.jsx("span",{className:"spotlight-shortcut-hint",children:"↑↓"}),p.jsx("span",{className:"spotlight-shortcut-hint",children:"Enter"}),p.jsx("span",{className:"spotlight-shortcut-hint",children:"Esc"})]})]})}),Hs=d.memo(function({activeTab:e,onSelect:r}){const{t:n}=De(["terminal"]);return p.jsxs("div",{className:"spotlight-tabs",role:"tablist","aria-label":n("terminal:spotlight.tabsLabel"),children:[me.map(i=>p.jsx("button",{type:"button",role:"tab","aria-selected":i===e,tabIndex:-1,className:`spotlight-tab${i===e?" active":""}`,onClick:()=>r(i),children:n(`terminal:spotlight.tabs.${i}`)},i)),p.jsx("span",{className:"spotlight-tabs-hint",children:p.jsx("kbd",{children:"Tab"})})]})}),Ys=d.forwardRef(function({results:e,selectedIndex:r,query:n,activeTab:i,areaSections:o,highlightMatch:c,onSelectIndex:a},u){const{t:h}=De(["terminal"]),m=d.useRef(!1);d.useEffect(()=>{m.current=!1},[e]),d.useEffect(()=>{const x=typeof u=="function"?null:u==null?void 0:u.current;if(!x)return;const E=()=>{m.current=!0};return x.addEventListener("mousemove",E),()=>{x.removeEventListener("mousemove",E)}},[u,e]);const y={command:h("terminal:spotlight.categories.commands"),agent:h("terminal:spotlight.categories.agents"),building:h("terminal:spotlight.categories.infrastructure"),area:h("terminal:spotlight.categories.areas"),folder:h("terminal:spotlight.categories.folders"),file:h("terminal:spotlight.categories.files"),"modified-file":h("terminal:spotlight.categories.modifiedFiles"),session:h("terminal:spotlight.categories.sessions")},S=d.useMemo(()=>{const x=[];let E=null,F=[];return e.forEach((D,z)=>{D.type!==E&&(E!==null&&F.length>0&&x.push([E,F]),E=D.type,F=[]),F.push({result:D,index:z})}),E!==null&&F.length>0&&x.push([E,F]),x},[e]);if(d.useEffect(()=>{if(!u||typeof u=="function")return;const x=u.current;if(!x)return;const E=x.querySelector(".spotlight-item.selected");E&&E.scrollIntoView({block:"nearest",behavior:"smooth"})},[r,u]),i==="areas"){if(o.length===0)return p.jsx("div",{className:"spotlight-results",ref:u,children:p.jsx("div",{className:"spotlight-empty",children:h("terminal:spotlight.noResults")})});let x=0;return p.jsx("div",{className:"spotlight-results",ref:u,children:o.map(E=>p.jsxs("div",{children:[p.jsxs("div",{className:"spotlight-category-header spotlight-area-section-header",children:[p.jsx("span",{className:"spotlight-area-dot",style:{background:E.areaColor},"aria-hidden":"true"}),p.jsx("span",{className:"spotlight-area-name",children:E.areaName}),p.jsx("span",{className:"spotlight-area-count",children:E.agents.length})]}),E.agents.length===0?p.jsx("div",{className:"spotlight-area-empty",children:h("terminal:spotlight.noAgentsInArea")}):E.agents.map(F=>{const D=x++;return p.jsx(dt,{result:F,isSelected:D===r,query:n,highlightMatch:c,onClick:()=>F.action(),onMouseEnter:()=>{m.current&&a(D)}},F.id)})]},E.areaId))})}return e.length===0?p.jsx("div",{className:"spotlight-results",ref:u,children:p.jsx("div",{className:"spotlight-empty",children:h("terminal:spotlight.noResults")})}):p.jsx("div",{className:"spotlight-results",ref:u,children:S.map(([x,E])=>p.jsxs("div",{children:[S.length>1&&p.jsx("div",{className:"spotlight-category-header",children:y[x]||x}),E.map(({result:F,index:D})=>p.jsx(dt,{result:F,isSelected:D===r,query:n,highlightMatch:c,onClick:()=>F.action(),onMouseEnter:()=>{m.current&&a(D)}},F.id))]},x))})}),Vs=d.memo(function(){const{t:e}=De(["terminal"]);return p.jsxs("div",{className:"spotlight-footer",children:[p.jsxs("div",{className:"spotlight-footer-left",children:[p.jsxs("span",{className:"spotlight-footer-hint",children:[p.jsx("kbd",{children:"↑"}),p.jsx("kbd",{children:"↓"})," ",p.jsx("kbd",{children:"Alt+N"}),p.jsx("kbd",{children:"Alt+P"})," ",e("terminal:spotlight.navigate")]}),p.jsxs("span",{className:"spotlight-footer-hint",children:[p.jsx("kbd",{children:"Enter"})," ",e("terminal:spotlight.select")]}),p.jsxs("span",{className:"spotlight-footer-hint",children:[p.jsx("kbd",{children:"Tab"})," ",e("terminal:spotlight.switchTabs")]})]}),p.jsx("div",{className:"spotlight-footer-right",children:p.jsxs("span",{className:"spotlight-footer-hint",children:[p.jsx("kbd",{children:"Esc"})," ",e("common:buttons.close")]})})]})}),qs=768;function er({isOpen:s,onClose:e,onOpenSpawnModal:r,onOpenCommanderView:n,onOpenToolbox:i,onOpenFileExplorer:o,onOpenPM2LogsModal:c,onOpenBossLogsModal:a,onOpenDatabasePanel:u,onOpenMonitoringModal:h,onOpenSessionFinder:m}){const y=d.useRef(null),S=d.useRef(null),x=d.useRef(null),E=d.useRef(0),{query:F,setQuery:D,selectedIndex:z,setSelectedIndex:v,results:Y,activeTab:U,setActiveTab:he,cycleTab:re,areaSections:P,handleKeyDown:O,highlightMatch:W}=Os({isOpen:s,onClose:e,onOpenSpawnModal:r,onOpenCommanderView:n,onOpenToolbox:i,onOpenFileExplorer:o,onOpenPM2LogsModal:c,onOpenBossLogsModal:a,onOpenDatabasePanel:u,onOpenMonitoringModal:h,onOpenSessionFinder:m});E.current=Y.length;const J=d.useRef(re);J.current=re,d.useEffect(()=>{s&&setTimeout(()=>{var L,M;(L=y.current)==null||L.focus(),(M=y.current)==null||M.select()},50)},[s]),d.useEffect(()=>{if(!s)return;const L=window.visualViewport;if(!L||window.innerWidth>qs)return;const M=()=>{const T=S.current;T&&(T.style.height=`${L.height}px`,T.style.top=`${L.offsetTop}px`)};return M(),L.addEventListener("resize",M),L.addEventListener("scroll",M),()=>{L.removeEventListener("resize",M),L.removeEventListener("scroll",M);const T=S.current;T&&(T.style.height="",T.style.top="")}},[s]),d.useEffect(()=>{if(!s)return;const L=M=>{if(M.key==="Escape"){M.preventDefault(),M.stopPropagation(),M.stopImmediatePropagation(),e();return}if(M.key==="Tab"){M.preventDefault(),M.stopPropagation(),M.stopImmediatePropagation(),J.current(M.shiftKey?-1:1);return}if(M.altKey&&!M.ctrlKey&&!M.metaKey&&(M.key==="n"||M.key==="p"||M.key==="N"||M.key==="P")){M.preventDefault(),M.stopPropagation(),M.stopImmediatePropagation();const T=M.key.toLowerCase(),V=E.current;v(T==="p"?ue=>ue>0?ue-1:V-1:ue=>ue<V-1?ue+1:0);return}};return window.addEventListener("keydown",L,{capture:!0}),()=>{window.removeEventListener("keydown",L,{capture:!0})}},[s,e]);const Z=d.useCallback(L=>{L.target===L.currentTarget&&e()},[e]),B=d.useCallback(()=>{v(0)},[v]);return s?p.jsx("div",{ref:S,className:"spotlight-overlay",onClick:Z,children:p.jsxs("div",{className:"spotlight-modal",children:[p.jsx(Ws,{ref:y,query:F,onQueryChange:D,onKeyDown:O,onResetSelection:B}),p.jsx(Hs,{activeTab:U,onSelect:he}),p.jsx(Ys,{ref:x,results:Y,selectedIndex:z,query:F,activeTab:U,areaSections:P,highlightMatch:W,onSelectIndex:v}),p.jsx(Vs,{})]})}):null}export{rr as FILE_ICON_NAMES,er as Spotlight,Vs as SpotlightFooter,Ws as SpotlightInput,dt as SpotlightItem,Ys as SpotlightResults,nr as formatDuration,ir as formatRelativeTime,or as getAgentIcon,ht as getFileIconFromPath,cr as getTypeLabel,Os as useSpotlightSearch};
|