@dotobokuri/fleet-console 1.10.0 → 1.10.1

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.
Files changed (59) hide show
  1. package/dist/cli-bin.mjs +15 -15
  2. package/dist/cli.mjs +15 -15
  3. package/dist/client/assets/{_baseUniq-CpZAwUyg.js → _baseUniq-e_j340KJ.js} +1 -1
  4. package/dist/client/assets/{arc-D7iMsyk2.js → arc-CioNx0k6.js} +1 -1
  5. package/dist/client/assets/{architectureDiagram-Q4EWVU46-DGUN9yJC.js → architectureDiagram-Q4EWVU46-B_8HDSCb.js} +1 -1
  6. package/dist/client/assets/{blockDiagram-DXYQGD6D-mHGERYOO.js → blockDiagram-DXYQGD6D-CpHdrypQ.js} +1 -1
  7. package/dist/client/assets/{c4Diagram-AHTNJAMY-CUFKgiE1.js → c4Diagram-AHTNJAMY-CkitEGpF.js} +1 -1
  8. package/dist/client/assets/channel-CEwT4AXW.js +1 -0
  9. package/dist/client/assets/{chunk-4BX2VUAB-DJVv4Xuk.js → chunk-4BX2VUAB-DxyXXSCc.js} +1 -1
  10. package/dist/client/assets/{chunk-4TB4RGXK-CiMGZvmq.js → chunk-4TB4RGXK-C2-nU4zS.js} +1 -1
  11. package/dist/client/assets/{chunk-55IACEB6-NErjEbD9.js → chunk-55IACEB6-Ch5DNHFU.js} +1 -1
  12. package/dist/client/assets/{chunk-EDXVE4YY-DTTJdEr-.js → chunk-EDXVE4YY-CHE6KKZa.js} +1 -1
  13. package/dist/client/assets/{chunk-FMBD7UC4-CUQsmXDG.js → chunk-FMBD7UC4-PFqCeOs6.js} +1 -1
  14. package/dist/client/assets/{chunk-OYMX7WX6-DEXFXMqS.js → chunk-OYMX7WX6-DHE5_rgO.js} +1 -1
  15. package/dist/client/assets/{chunk-QZHKN3VN-0XA0aotU.js → chunk-QZHKN3VN-BNsfe2Ai.js} +1 -1
  16. package/dist/client/assets/{chunk-YZCP3GAM-B1CBq-Bd.js → chunk-YZCP3GAM-Du6aAWOS.js} +1 -1
  17. package/dist/client/assets/classDiagram-6PBFFD2Q-BcAsKAPs.js +1 -0
  18. package/dist/client/assets/classDiagram-v2-HSJHXN6E-BcAsKAPs.js +1 -0
  19. package/dist/client/assets/clone-BbRCSYXZ.js +1 -0
  20. package/dist/client/assets/{cose-bilkent-S5V4N54A-aZiE_5HW.js → cose-bilkent-S5V4N54A-BMbRb2Ij.js} +1 -1
  21. package/dist/client/assets/{dagre-KV5264BT-CyE3dfqF.js → dagre-KV5264BT-BIYIuU4t.js} +1 -1
  22. package/dist/client/assets/{diagram-5BDNPKRD-Dn1c6pP2.js → diagram-5BDNPKRD-DE58KlL0.js} +1 -1
  23. package/dist/client/assets/{diagram-G4DWMVQ6-BJlWBn9n.js → diagram-G4DWMVQ6-BBHYXkDj.js} +1 -1
  24. package/dist/client/assets/{diagram-MMDJMWI5-EO6LIBA2.js → diagram-MMDJMWI5-BGA4ZKw3.js} +1 -1
  25. package/dist/client/assets/{diagram-TYMM5635-DP-obRT1.js → diagram-TYMM5635-DusN1Hix.js} +1 -1
  26. package/dist/client/assets/{erDiagram-SMLLAGMA-DwQvA8OY.js → erDiagram-SMLLAGMA-84E-AJKo.js} +1 -1
  27. package/dist/client/assets/{flowDiagram-DWJPFMVM-DJgNhD-9.js → flowDiagram-DWJPFMVM-Dpap9NqV.js} +1 -1
  28. package/dist/client/assets/{ganttDiagram-T4ZO3ILL-pNmuyhTT.js → ganttDiagram-T4ZO3ILL-CukRJAaM.js} +1 -1
  29. package/dist/client/assets/{gitGraphDiagram-UUTBAWPF-DywGqs_d.js → gitGraphDiagram-UUTBAWPF-DuAwiTii.js} +1 -1
  30. package/dist/client/assets/{graph-wLI-a6f_.js → graph-B7irxl7Q.js} +1 -1
  31. package/dist/client/assets/{index-BvlhP0lF.js → index-Uidvbtqb.js} +2 -2
  32. package/dist/client/assets/{infoDiagram-42DDH7IO-Dd-W13KY.js → infoDiagram-42DDH7IO-Gdh2w_Ry.js} +1 -1
  33. package/dist/client/assets/{ishikawaDiagram-UXIWVN3A-Cxusf_HC.js → ishikawaDiagram-UXIWVN3A-DvbqJman.js} +1 -1
  34. package/dist/client/assets/{journeyDiagram-VCZTEJTY-CNBWilxn.js → journeyDiagram-VCZTEJTY-DIQYAsjN.js} +1 -1
  35. package/dist/client/assets/{kanban-definition-6JOO6SKY-COvid-XL.js → kanban-definition-6JOO6SKY-8BBtOuAV.js} +1 -1
  36. package/dist/client/assets/{layout-kFbZe4kW.js → layout-DDUpLunD.js} +1 -1
  37. package/dist/client/assets/{linear-Ms3Rqxm3.js → linear-BzLoJVdP.js} +1 -1
  38. package/dist/client/assets/{mermaid.core-pNTEyfuV.js → mermaid.core-Ddi7z3V3.js} +4 -4
  39. package/dist/client/assets/{min-DHX2aDkR.js → min-CEKwugI-.js} +1 -1
  40. package/dist/client/assets/{mindmap-definition-QFDTVHPH-BvC6-hNE.js → mindmap-definition-QFDTVHPH-y-V-6GIi.js} +1 -1
  41. package/dist/client/assets/{pieDiagram-DEJITSTG-B_Usa7SZ.js → pieDiagram-DEJITSTG-DjqTUefi.js} +1 -1
  42. package/dist/client/assets/{quadrantDiagram-34T5L4WZ-BelZwQw0.js → quadrantDiagram-34T5L4WZ-BZbwyDuC.js} +1 -1
  43. package/dist/client/assets/{requirementDiagram-MS252O5E-D3PopSCU.js → requirementDiagram-MS252O5E-M2epVejI.js} +1 -1
  44. package/dist/client/assets/{sankeyDiagram-XADWPNL6-CT_hbWMk.js → sankeyDiagram-XADWPNL6-DQHzVL6h.js} +1 -1
  45. package/dist/client/assets/{sequenceDiagram-FGHM5R23-BiNn8SKW.js → sequenceDiagram-FGHM5R23-Dldq08WJ.js} +1 -1
  46. package/dist/client/assets/{stateDiagram-FHFEXIEX-JGDKAj7k.js → stateDiagram-FHFEXIEX-B32muPdI.js} +1 -1
  47. package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-Ct3tm_Bq.js +1 -0
  48. package/dist/client/assets/{timeline-definition-GMOUNBTQ-C_m1mLvt.js → timeline-definition-GMOUNBTQ-nSYYEX6t.js} +1 -1
  49. package/dist/client/assets/{vennDiagram-DHZGUBPP-CbTzleI3.js → vennDiagram-DHZGUBPP-DPIMKKCQ.js} +1 -1
  50. package/dist/client/assets/{wardley-RL74JXVD-n43ETO10.js → wardley-RL74JXVD-DArerB6Y.js} +1 -1
  51. package/dist/client/assets/{wardleyDiagram-NUSXRM2D-CPYrHJfx.js → wardleyDiagram-NUSXRM2D-DRvimWEN.js} +1 -1
  52. package/dist/client/assets/{xychartDiagram-5P7HB3ND-D5_xXt5s.js → xychartDiagram-5P7HB3ND-D0VCX3ps.js} +1 -1
  53. package/dist/client/index.html +1 -1
  54. package/package.json +1 -1
  55. package/dist/client/assets/channel-Bsc9v8gO.js +0 -1
  56. package/dist/client/assets/classDiagram-6PBFFD2Q-CemsJaFk.js +0 -1
  57. package/dist/client/assets/classDiagram-v2-HSJHXN6E-CemsJaFk.js +0 -1
  58. package/dist/client/assets/clone-D1HtW7uh.js +0 -1
  59. package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-CiJ42_NW.js +0 -1
@@ -9,7 +9,7 @@ Error generating stack: `+o.message+`
9
9
  `).replace(w2,"")}function s0(t,i){return i=r0(i),r0(t)===i}function bt(t,i,s,o,_,w){switch(s){case"children":typeof o=="string"?i==="body"||i==="textarea"&&o===""||Pe(t,o):(typeof o=="number"||typeof o=="bigint")&&i!=="body"&&Pe(t,""+o);break;case"className":ii(t,"class",o);break;case"tabIndex":ii(t,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":ii(t,s,o);break;case"style":pt(t,o,w);break;case"data":if(i!=="object"){ii(t,"data",o);break}case"src":case"href":if(o===""&&(i!=="a"||s!=="href")){t.removeAttribute(s);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(s);break}o=Ur(""+o),t.setAttribute(s,o);break;case"action":case"formAction":if(typeof o=="function"){t.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof w=="function"&&(s==="formAction"?(i!=="input"&&bt(t,i,"name",_.name,_,null),bt(t,i,"formEncType",_.formEncType,_,null),bt(t,i,"formMethod",_.formMethod,_,null),bt(t,i,"formTarget",_.formTarget,_,null)):(bt(t,i,"encType",_.encType,_,null),bt(t,i,"method",_.method,_,null),bt(t,i,"target",_.target,_,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(s);break}o=Ur(""+o),t.setAttribute(s,o);break;case"onClick":o!=null&&(t.onclick=we);break;case"onScroll":o!=null&&Qe("scroll",t);break;case"onScrollEnd":o!=null&&Qe("scrollend",t);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(s=o.__html,s!=null){if(_.children!=null)throw Error(a(60));t.innerHTML=s}}break;case"multiple":t.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":t.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){t.removeAttribute("xlink:href");break}s=Ur(""+o),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(s,""+o):t.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(s,""):t.removeAttribute(s);break;case"capture":case"download":o===!0?t.setAttribute(s,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(s,o):t.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?t.setAttribute(s,o):t.removeAttribute(s);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?t.removeAttribute(s):t.setAttribute(s,o);break;case"popover":Qe("beforetoggle",t),Qe("toggle",t),Mn(t,"popover",o);break;case"xlinkActuate":Fn(t,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Fn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Fn(t,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Fn(t,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Fn(t,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Fn(t,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Fn(t,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Fn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Fn(t,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Mn(t,"is",o);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=dr.get(s)||s,Mn(t,s,o))}}function Zd(t,i,s,o,_,w){switch(s){case"style":pt(t,o,w);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(s=o.__html,s!=null){if(_.children!=null)throw Error(a(60));t.innerHTML=s}}break;case"children":typeof o=="string"?Pe(t,o):(typeof o=="number"||typeof o=="bigint")&&Pe(t,""+o);break;case"onScroll":o!=null&&Qe("scroll",t);break;case"onScrollEnd":o!=null&&Qe("scrollend",t);break;case"onClick":o!=null&&(t.onclick=we);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ht.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(_=s.endsWith("Capture"),i=s.slice(2,_?s.length-7:void 0),w=t[Et]||null,w=w!=null?w[s]:null,typeof w=="function"&&t.removeEventListener(i,w,_),typeof o=="function")){typeof w!="function"&&w!==null&&(s in t?t[s]=null:t.hasAttribute(s)&&t.removeAttribute(s)),t.addEventListener(i,o,_);break e}s in t?t[s]=o:o===!0?t.setAttribute(s,""):Mn(t,s,o)}}}function Tn(t,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",t),Qe("load",t);var o=!1,_=!1,w;for(w in s)if(s.hasOwnProperty(w)){var D=s[w];if(D!=null)switch(w){case"src":o=!0;break;case"srcSet":_=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:bt(t,i,w,D,s,null)}}_&&bt(t,i,"srcSet",s.srcSet,s,null),o&&bt(t,i,"src",s.src,s,null);return;case"input":Qe("invalid",t);var j=w=D=_=null,X=null,re=null;for(o in s)if(s.hasOwnProperty(o)){var ue=s[o];if(ue!=null)switch(o){case"name":_=ue;break;case"type":D=ue;break;case"checked":X=ue;break;case"defaultChecked":re=ue;break;case"value":w=ue;break;case"defaultValue":j=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(a(137,i));break;default:bt(t,i,o,ue,s,null)}}Es(t,w,j,X,re,D,_,!1);return;case"select":Qe("invalid",t),o=D=w=null;for(_ in s)if(s.hasOwnProperty(_)&&(j=s[_],j!=null))switch(_){case"value":w=j;break;case"defaultValue":D=j;break;case"multiple":o=j;default:bt(t,i,_,j,s,null)}i=w,s=D,t.multiple=!!o,i!=null?wn(t,!!o,i,!1):s!=null&&wn(t,!!o,s,!0);return;case"textarea":Qe("invalid",t),w=_=o=null;for(D in s)if(s.hasOwnProperty(D)&&(j=s[D],j!=null))switch(D){case"value":o=j;break;case"defaultValue":_=j;break;case"children":w=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(a(91));break;default:bt(t,i,D,j,s,null)}ua(t,o,_,w);return;case"option":for(X in s)s.hasOwnProperty(X)&&(o=s[X],o!=null)&&(X==="selected"?t.selected=o&&typeof o!="function"&&typeof o!="symbol":bt(t,i,X,o,s,null));return;case"dialog":Qe("beforetoggle",t),Qe("toggle",t),Qe("cancel",t),Qe("close",t);break;case"iframe":case"object":Qe("load",t);break;case"video":case"audio":for(o=0;o<Zo.length;o++)Qe(Zo[o],t);break;case"image":Qe("error",t),Qe("load",t);break;case"details":Qe("toggle",t);break;case"embed":case"source":case"link":Qe("error",t),Qe("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(re in s)if(s.hasOwnProperty(re)&&(o=s[re],o!=null))switch(re){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:bt(t,i,re,o,s,null)}return;default:if(Hr(i)){for(ue in s)s.hasOwnProperty(ue)&&(o=s[ue],o!==void 0&&Zd(t,i,ue,o,s,void 0));return}}for(j in s)s.hasOwnProperty(j)&&(o=s[j],o!=null&&bt(t,i,j,o,s,null))}function C2(t,i,s,o){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var _=null,w=null,D=null,j=null,X=null,re=null,ue=null;for(le in s){var fe=s[le];if(s.hasOwnProperty(le)&&fe!=null)switch(le){case"checked":break;case"value":break;case"defaultValue":X=fe;default:o.hasOwnProperty(le)||bt(t,i,le,null,o,fe)}}for(var se in o){var le=o[se];if(fe=s[se],o.hasOwnProperty(se)&&(le!=null||fe!=null))switch(se){case"type":w=le;break;case"name":_=le;break;case"checked":re=le;break;case"defaultChecked":ue=le;break;case"value":D=le;break;case"defaultValue":j=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(a(137,i));break;default:le!==fe&&bt(t,i,se,le,o,fe)}}mo(t,D,j,X,re,ue,w,_);return;case"select":le=D=j=se=null;for(w in s)if(X=s[w],s.hasOwnProperty(w)&&X!=null)switch(w){case"value":break;case"multiple":le=X;default:o.hasOwnProperty(w)||bt(t,i,w,null,o,X)}for(_ in o)if(w=o[_],X=s[_],o.hasOwnProperty(_)&&(w!=null||X!=null))switch(_){case"value":se=w;break;case"defaultValue":j=w;break;case"multiple":D=w;default:w!==X&&bt(t,i,_,w,o,X)}i=j,s=D,o=le,se!=null?wn(t,!!s,se,!1):!!o!=!!s&&(i!=null?wn(t,!!s,i,!0):wn(t,!!s,s?[]:"",!1));return;case"textarea":le=se=null;for(j in s)if(_=s[j],s.hasOwnProperty(j)&&_!=null&&!o.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:bt(t,i,j,null,o,_)}for(D in o)if(_=o[D],w=s[D],o.hasOwnProperty(D)&&(_!=null||w!=null))switch(D){case"value":se=_;break;case"defaultValue":le=_;break;case"children":break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(a(91));break;default:_!==w&&bt(t,i,D,_,o,w)}Kl(t,se,le);return;case"option":for(var Ae in s)se=s[Ae],s.hasOwnProperty(Ae)&&se!=null&&!o.hasOwnProperty(Ae)&&(Ae==="selected"?t.selected=!1:bt(t,i,Ae,null,o,se));for(X in o)se=o[X],le=s[X],o.hasOwnProperty(X)&&se!==le&&(se!=null||le!=null)&&(X==="selected"?t.selected=se&&typeof se!="function"&&typeof se!="symbol":bt(t,i,X,se,o,le));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ze in s)se=s[ze],s.hasOwnProperty(ze)&&se!=null&&!o.hasOwnProperty(ze)&&bt(t,i,ze,null,o,se);for(re in o)if(se=o[re],le=s[re],o.hasOwnProperty(re)&&se!==le&&(se!=null||le!=null))switch(re){case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(a(137,i));break;default:bt(t,i,re,se,o,le)}return;default:if(Hr(i)){for(var yt in s)se=s[yt],s.hasOwnProperty(yt)&&se!==void 0&&!o.hasOwnProperty(yt)&&Zd(t,i,yt,void 0,o,se);for(ue in o)se=o[ue],le=s[ue],!o.hasOwnProperty(ue)||se===le||se===void 0&&le===void 0||Zd(t,i,ue,se,o,le);return}}for(var ne in s)se=s[ne],s.hasOwnProperty(ne)&&se!=null&&!o.hasOwnProperty(ne)&&bt(t,i,ne,null,o,se);for(fe in o)se=o[fe],le=s[fe],!o.hasOwnProperty(fe)||se===le||se==null&&le==null||bt(t,i,fe,se,o,le)}function a0(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function x2(){if(typeof performance.getEntriesByType=="function"){for(var t=0,i=0,s=performance.getEntriesByType("resource"),o=0;o<s.length;o++){var _=s[o],w=_.transferSize,D=_.initiatorType,j=_.duration;if(w&&j&&a0(D)){for(D=0,j=_.responseEnd,o+=1;o<s.length;o++){var X=s[o],re=X.startTime;if(re>j)break;var ue=X.transferSize,fe=X.initiatorType;ue&&a0(fe)&&(X=X.responseEnd,D+=ue*(X<j?1:(j-re)/(X-re)))}if(--o,i+=8*(w+D)/(_.duration/1e3),t++,10<t)break}}if(0<t)return i/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Jd=null,Qd=null;function qc(t){return t.nodeType===9?t:t.ownerDocument}function o0(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function l0(t,i){if(t===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&i==="foreignObject"?0:t}function ef(t,i){return t==="textarea"||t==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var tf=null;function E2(){var t=window.event;return t&&t.type==="popstate"?t===tf?!1:(tf=t,!0):(tf=null,!1)}var c0=typeof setTimeout=="function"?setTimeout:void 0,T2=typeof clearTimeout=="function"?clearTimeout:void 0,u0=typeof Promise=="function"?Promise:void 0,A2=typeof queueMicrotask=="function"?queueMicrotask:typeof u0<"u"?function(t){return u0.resolve(null).then(t).catch(k2)}:c0;function k2(t){setTimeout(function(){throw t})}function as(t){return t==="head"}function h0(t,i){var s=i,o=0;do{var _=s.nextSibling;if(t.removeChild(s),_&&_.nodeType===8)if(s=_.data,s==="/$"||s==="/&"){if(o===0){t.removeChild(_),$a(i);return}o--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")o++;else if(s==="html")Qo(t.ownerDocument.documentElement);else if(s==="head"){s=t.ownerDocument.head,Qo(s);for(var w=s.firstChild;w;){var D=w.nextSibling,j=w.nodeName;w[Ki]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&w.rel.toLowerCase()==="stylesheet"||s.removeChild(w),w=D}}else s==="body"&&Qo(t.ownerDocument.body);s=_}while(s);$a(i)}function d0(t,i){var s=t;t=0;do{var o=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),o&&o.nodeType===8)if(s=o.data,s==="/$"){if(t===0)break;t--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||t++;s=o}while(s)}function nf(t){var i=t.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":nf(s),De(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}t.removeChild(s)}}function R2(t,i,s,o){for(;t.nodeType===1;){var _=s;if(t.nodeName.toLowerCase()!==i.toLowerCase()){if(!o&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(o){if(!t[Ki])switch(i){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(w=t.getAttribute("rel"),w==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(w!==_.rel||t.getAttribute("href")!==(_.href==null||_.href===""?null:_.href)||t.getAttribute("crossorigin")!==(_.crossOrigin==null?null:_.crossOrigin)||t.getAttribute("title")!==(_.title==null?null:_.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(w=t.getAttribute("src"),(w!==(_.src==null?null:_.src)||t.getAttribute("type")!==(_.type==null?null:_.type)||t.getAttribute("crossorigin")!==(_.crossOrigin==null?null:_.crossOrigin))&&w&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(i==="input"&&t.type==="hidden"){var w=_.name==null?null:""+_.name;if(_.type==="hidden"&&t.getAttribute("name")===w)return t}else return t;if(t=wi(t.nextSibling),t===null)break}return null}function L2(t,i,s){if(i==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!s||(t=wi(t.nextSibling),t===null))return null;return t}function f0(t,i){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=wi(t.nextSibling),t===null))return null;return t}function rf(t){return t.data==="$?"||t.data==="$~"}function sf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function M2(t,i){var s=t.ownerDocument;if(t.data==="$~")t._reactRetry=i;else if(t.data!=="$?"||s.readyState!=="loading")i();else{var o=function(){i(),s.removeEventListener("DOMContentLoaded",o)};s.addEventListener("DOMContentLoaded",o),t._reactRetry=o}}function wi(t){for(;t!=null;t=t.nextSibling){var i=t.nodeType;if(i===1||i===3)break;if(i===8){if(i=t.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return t}var af=null;function p0(t){t=t.nextSibling;for(var i=0;t;){if(t.nodeType===8){var s=t.data;if(s==="/$"||s==="/&"){if(i===0)return wi(t.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}t=t.nextSibling}return null}function g0(t){t=t.previousSibling;for(var i=0;t;){if(t.nodeType===8){var s=t.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return t;i--}else s!=="/$"&&s!=="/&"||i++}t=t.previousSibling}return null}function m0(t,i,s){switch(i=qc(s),t){case"html":if(t=i.documentElement,!t)throw Error(a(452));return t;case"head":if(t=i.head,!t)throw Error(a(453));return t;case"body":if(t=i.body,!t)throw Error(a(454));return t;default:throw Error(a(451))}}function Qo(t){for(var i=t.attributes;i.length;)t.removeAttributeNode(i[0]);De(t)}var Ci=new Map,_0=new Set;function Wc(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var kr=W.d;W.d={f:D2,r:O2,D:N2,C:B2,L:I2,m:j2,X:$2,S:z2,M:P2};function D2(){var t=kr.f(),i=Ic();return t||i}function O2(t){var i=pe(t);i!==null&&i.tag===5&&i.type==="form"?N_(i):kr.r(t)}var Ia=typeof document>"u"?null:document;function v0(t,i,s){var o=Ia;if(o&&typeof i=="string"&&i){var _=qn(i);_='link[rel="'+t+'"][href="'+_+'"]',typeof s=="string"&&(_+='[crossorigin="'+s+'"]'),_0.has(_)||(_0.add(_),t={rel:t,crossOrigin:s,href:i},o.querySelector(_)===null&&(i=o.createElement("link"),Tn(i,"link",t),Ze(i),o.head.appendChild(i)))}}function N2(t){kr.D(t),v0("dns-prefetch",t,null)}function B2(t,i){kr.C(t,i),v0("preconnect",t,i)}function I2(t,i,s){kr.L(t,i,s);var o=Ia;if(o&&t&&i){var _='link[rel="preload"][as="'+qn(i)+'"]';i==="image"&&s&&s.imageSrcSet?(_+='[imagesrcset="'+qn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(_+='[imagesizes="'+qn(s.imageSizes)+'"]')):_+='[href="'+qn(t)+'"]';var w=_;switch(i){case"style":w=ja(t);break;case"script":w=za(t)}Ci.has(w)||(t=g({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:t,as:i},s),Ci.set(w,t),o.querySelector(_)!==null||i==="style"&&o.querySelector(el(w))||i==="script"&&o.querySelector(tl(w))||(i=o.createElement("link"),Tn(i,"link",t),Ze(i),o.head.appendChild(i)))}}function j2(t,i){kr.m(t,i);var s=Ia;if(s&&t){var o=i&&typeof i.as=="string"?i.as:"script",_='link[rel="modulepreload"][as="'+qn(o)+'"][href="'+qn(t)+'"]',w=_;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=za(t)}if(!Ci.has(w)&&(t=g({rel:"modulepreload",href:t},i),Ci.set(w,t),s.querySelector(_)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(tl(w)))return}o=s.createElement("link"),Tn(o,"link",t),Ze(o),s.head.appendChild(o)}}}function z2(t,i,s){kr.S(t,i,s);var o=Ia;if(o&&t){var _=rt(o).hoistableStyles,w=ja(t);i=i||"default";var D=_.get(w);if(!D){var j={loading:0,preload:null};if(D=o.querySelector(el(w)))j.loading=5;else{t=g({rel:"stylesheet",href:t,"data-precedence":i},s),(s=Ci.get(w))&&of(t,s);var X=D=o.createElement("link");Ze(X),Tn(X,"link",t),X._p=new Promise(function(re,ue){X.onload=re,X.onerror=ue}),X.addEventListener("load",function(){j.loading|=1}),X.addEventListener("error",function(){j.loading|=2}),j.loading|=4,Gc(D,i,o)}D={type:"stylesheet",instance:D,count:1,state:j},_.set(w,D)}}}function $2(t,i){kr.X(t,i);var s=Ia;if(s&&t){var o=rt(s).hoistableScripts,_=za(t),w=o.get(_);w||(w=s.querySelector(tl(_)),w||(t=g({src:t,async:!0},i),(i=Ci.get(_))&&lf(t,i),w=s.createElement("script"),Ze(w),Tn(w,"link",t),s.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},o.set(_,w))}}function P2(t,i){kr.M(t,i);var s=Ia;if(s&&t){var o=rt(s).hoistableScripts,_=za(t),w=o.get(_);w||(w=s.querySelector(tl(_)),w||(t=g({src:t,async:!0,type:"module"},i),(i=Ci.get(_))&&lf(t,i),w=s.createElement("script"),Ze(w),Tn(w,"link",t),s.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},o.set(_,w))}}function b0(t,i,s,o){var _=(_=_e.current)?Wc(_):null;if(!_)throw Error(a(446));switch(t){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=ja(s.href),s=rt(_).hoistableStyles,o=s.get(i),o||(o={type:"style",instance:null,count:0,state:null},s.set(i,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){t=ja(s.href);var w=rt(_).hoistableStyles,D=w.get(t);if(D||(_=_.ownerDocument||_,D={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(t,D),(w=_.querySelector(el(t)))&&!w._p&&(D.instance=w,D.state.loading=5),Ci.has(t)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Ci.set(t,s),w||H2(_,t,s,D.state))),i&&o===null)throw Error(a(528,""));return D}if(i&&o!==null)throw Error(a(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=za(s),s=rt(_).hoistableScripts,o=s.get(i),o||(o={type:"script",instance:null,count:0,state:null},s.set(i,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,t))}}function ja(t){return'href="'+qn(t)+'"'}function el(t){return'link[rel="stylesheet"]['+t+"]"}function y0(t){return g({},t,{"data-precedence":t.precedence,precedence:null})}function H2(t,i,s,o){t.querySelector('link[rel="preload"][as="style"]['+i+"]")?o.loading=1:(i=t.createElement("link"),o.preload=i,i.addEventListener("load",function(){return o.loading|=1}),i.addEventListener("error",function(){return o.loading|=2}),Tn(i,"link",s),Ze(i),t.head.appendChild(i))}function za(t){return'[src="'+qn(t)+'"]'}function tl(t){return"script[async]"+t}function S0(t,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var o=t.querySelector('style[data-href~="'+qn(s.href)+'"]');if(o)return i.instance=o,Ze(o),o;var _=g({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return o=(t.ownerDocument||t).createElement("style"),Ze(o),Tn(o,"style",_),Gc(o,s.precedence,t),i.instance=o;case"stylesheet":_=ja(s.href);var w=t.querySelector(el(_));if(w)return i.state.loading|=4,i.instance=w,Ze(w),w;o=y0(s),(_=Ci.get(_))&&of(o,_),w=(t.ownerDocument||t).createElement("link"),Ze(w);var D=w;return D._p=new Promise(function(j,X){D.onload=j,D.onerror=X}),Tn(w,"link",o),i.state.loading|=4,Gc(w,s.precedence,t),i.instance=w;case"script":return w=za(s.src),(_=t.querySelector(tl(w)))?(i.instance=_,Ze(_),_):(o=s,(_=Ci.get(w))&&(o=g({},s),lf(o,_)),t=t.ownerDocument||t,_=t.createElement("script"),Ze(_),Tn(_,"link",o),t.head.appendChild(_),i.instance=_);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(o=i.instance,i.state.loading|=4,Gc(o,s.precedence,t));return i.instance}function Gc(t,i,s){for(var o=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),_=o.length?o[o.length-1]:null,w=_,D=0;D<o.length;D++){var j=o[D];if(j.dataset.precedence===i)w=j;else if(w!==_)break}w?w.parentNode.insertBefore(t,w.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(t,i.firstChild))}function of(t,i){t.crossOrigin==null&&(t.crossOrigin=i.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=i.referrerPolicy),t.title==null&&(t.title=i.title)}function lf(t,i){t.crossOrigin==null&&(t.crossOrigin=i.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=i.referrerPolicy),t.integrity==null&&(t.integrity=i.integrity)}var Kc=null;function w0(t,i,s){if(Kc===null){var o=new Map,_=Kc=new Map;_.set(s,o)}else _=Kc,o=_.get(s),o||(o=new Map,_.set(s,o));if(o.has(t))return o;for(o.set(t,null),s=s.getElementsByTagName(t),_=0;_<s.length;_++){var w=s[_];if(!(w[Ki]||w[At]||t==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var D=w.getAttribute(i)||"";D=t+D;var j=o.get(D);j?j.push(w):o.set(D,[w])}}return o}function C0(t,i,s){t=t.ownerDocument||t,t.head.insertBefore(s,i==="title"?t.querySelector("head > title"):null)}function U2(t,i,s){if(s===1||i.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(t=i.disabled,typeof i.precedence=="string"&&t==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function x0(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function F2(t,i,s,o){if(s.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var _=ja(o.href),w=i.querySelector(el(_));if(w){i=w._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(t.count++,t=Vc.bind(t),i.then(t,t)),s.state.loading|=4,s.instance=w,Ze(w);return}w=i.ownerDocument||i,o=y0(o),(_=Ci.get(_))&&of(o,_),w=w.createElement("link"),Ze(w);var D=w;D._p=new Promise(function(j,X){D.onload=j,D.onerror=X}),Tn(w,"link",o),s.instance=w}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(t.count++,s=Vc.bind(t),i.addEventListener("load",s),i.addEventListener("error",s))}}var cf=0;function q2(t,i){return t.stylesheets&&t.count===0&&Xc(t,t.stylesheets),0<t.count||0<t.imgCount?function(s){var o=setTimeout(function(){if(t.stylesheets&&Xc(t,t.stylesheets),t.unsuspend){var w=t.unsuspend;t.unsuspend=null,w()}},6e4+i);0<t.imgBytes&&cf===0&&(cf=62500*x2());var _=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Xc(t,t.stylesheets),t.unsuspend)){var w=t.unsuspend;t.unsuspend=null,w()}},(t.imgBytes>cf?50:800)+i);return t.unsuspend=s,function(){t.unsuspend=null,clearTimeout(o),clearTimeout(_)}}:null}function Vc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xc(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Yc=null;function Xc(t,i){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Yc=new Map,i.forEach(W2,t),Yc=null,Vc.call(t))}function W2(t,i){if(!(i.state.loading&4)){var s=Yc.get(t);if(s)var o=s.get(null);else{s=new Map,Yc.set(t,s);for(var _=t.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<_.length;w++){var D=_[w];(D.nodeName==="LINK"||D.getAttribute("media")!=="not all")&&(s.set(D.dataset.precedence,D),o=D)}o&&s.set(null,o)}_=i.instance,D=_.getAttribute("data-precedence"),w=s.get(D)||o,w===o&&s.set(null,_),s.set(D,_),this.count++,o=Vc.bind(this),_.addEventListener("load",o),_.addEventListener("error",o),w?w.parentNode.insertBefore(_,w.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(_,t.firstChild)),i.state.loading|=4}}var nl={$$typeof:b,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function G2(t,i,s,o,_,w,D,j,X){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=wt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wt(0),this.hiddenUpdates=wt(null),this.identifierPrefix=o,this.onUncaughtError=_,this.onCaughtError=w,this.onRecoverableError=D,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function E0(t,i,s,o,_,w,D,j,X,re,ue,fe){return t=new G2(t,i,s,D,X,re,ue,fe,j),i=1,w===!0&&(i|=24),w=ai(3,null,null,i),t.current=w,w.stateNode=t,i=Hh(),i.refCount++,t.pooledCache=i,i.refCount++,w.memoizedState={element:o,isDehydrated:s,cache:i},Wh(w),t}function T0(t){return t?(t=ga,t):ga}function A0(t,i,s,o,_,w){_=T0(_),o.context===null?o.context=_:o.pendingContext=_,o=Yr(i),o.payload={element:s},w=w===void 0?null:w,w!==null&&(o.callback=w),s=Xr(t,o,i),s!==null&&(Xn(s,t,i),No(s,t,i))}function k0(t,i){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var s=t.retryLane;t.retryLane=s!==0&&s<i?s:i}}function uf(t,i){k0(t,i),(t=t.alternate)&&k0(t,i)}function R0(t){if(t.tag===13||t.tag===31){var i=Rs(t,67108864);i!==null&&Xn(i,t,67108864),uf(t,67108864)}}function L0(t){if(t.tag===13||t.tag===31){var i=hi();i=et(i);var s=Rs(t,i);s!==null&&Xn(s,t,i),uf(t,i)}}var Zc=!0;function K2(t,i,s,o){var _=q.T;q.T=null;var w=W.p;try{W.p=2,hf(t,i,s,o)}finally{W.p=w,q.T=_}}function V2(t,i,s,o){var _=q.T;q.T=null;var w=W.p;try{W.p=8,hf(t,i,s,o)}finally{W.p=w,q.T=_}}function hf(t,i,s,o){if(Zc){var _=df(o);if(_===null)Xd(t,i,o,Jc,s),D0(t,o);else if(X2(_,t,i,s,o))o.stopPropagation();else if(D0(t,o),i&4&&-1<Y2.indexOf(t)){for(;_!==null;){var w=pe(_);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var D=rn(w.pendingLanes);if(D!==0){var j=w;for(j.pendingLanes|=2,j.entangledLanes|=2;D;){var X=1<<31-Pt(D);j.entanglements[1]|=X,D&=~X}Zi(w),(ht&6)===0&&(Nc=ut()+500,Xo(0))}}break;case 31:case 13:j=Rs(w,2),j!==null&&Xn(j,w,2),Ic(),uf(w,2)}if(w=df(o),w===null&&Xd(t,i,o,Jc,s),w===_)break;_=w}_!==null&&o.stopPropagation()}else Xd(t,i,o,null,s)}}function df(t){return t=qe(t),ff(t)}var Jc=null;function ff(t){if(Jc=null,t=V(t),t!==null){var i=f(t);if(i===null)t=null;else{var s=i.tag;if(s===13){if(t=m(i),t!==null)return t;t=null}else if(s===31){if(t=c(i),t!==null)return t;t=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;t=null}else i!==t&&(t=null)}}return Jc=t,null}function M0(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Vt()){case zt:return 2;case $t:return 8;case nn:case Di:return 32;case Ln:return 268435456;default:return 32}default:return 32}}var pf=!1,os=null,ls=null,cs=null,il=new Map,rl=new Map,us=[],Y2="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function D0(t,i){switch(t){case"focusin":case"focusout":os=null;break;case"dragenter":case"dragleave":ls=null;break;case"mouseover":case"mouseout":cs=null;break;case"pointerover":case"pointerout":il.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":rl.delete(i.pointerId)}}function sl(t,i,s,o,_,w){return t===null||t.nativeEvent!==w?(t={blockedOn:i,domEventName:s,eventSystemFlags:o,nativeEvent:w,targetContainers:[_]},i!==null&&(i=pe(i),i!==null&&R0(i)),t):(t.eventSystemFlags|=o,i=t.targetContainers,_!==null&&i.indexOf(_)===-1&&i.push(_),t)}function X2(t,i,s,o,_){switch(i){case"focusin":return os=sl(os,t,i,s,o,_),!0;case"dragenter":return ls=sl(ls,t,i,s,o,_),!0;case"mouseover":return cs=sl(cs,t,i,s,o,_),!0;case"pointerover":var w=_.pointerId;return il.set(w,sl(il.get(w)||null,t,i,s,o,_)),!0;case"gotpointercapture":return w=_.pointerId,rl.set(w,sl(rl.get(w)||null,t,i,s,o,_)),!0}return!1}function O0(t){var i=V(t.target);if(i!==null){var s=f(i);if(s!==null){if(i=s.tag,i===13){if(i=m(s),i!==null){t.blockedOn=i,ur(t.priority,function(){L0(s)});return}}else if(i===31){if(i=c(s),i!==null){t.blockedOn=i,ur(t.priority,function(){L0(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){t.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Qc(t){if(t.blockedOn!==null)return!1;for(var i=t.targetContainers;0<i.length;){var s=df(t.nativeEvent);if(s===null){s=t.nativeEvent;var o=new s.constructor(s.type,s);Re=o,s.target.dispatchEvent(o),Re=null}else return i=pe(s),i!==null&&R0(i),t.blockedOn=s,!1;i.shift()}return!0}function N0(t,i,s){Qc(t)&&s.delete(i)}function Z2(){pf=!1,os!==null&&Qc(os)&&(os=null),ls!==null&&Qc(ls)&&(ls=null),cs!==null&&Qc(cs)&&(cs=null),il.forEach(N0),rl.forEach(N0)}function eu(t,i){t.blockedOn===i&&(t.blockedOn=null,pf||(pf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Z2)))}var tu=null;function B0(t){tu!==t&&(tu=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){tu===t&&(tu=null);for(var i=0;i<t.length;i+=3){var s=t[i],o=t[i+1],_=t[i+2];if(typeof o!="function"){if(ff(o||s)===null)continue;break}var w=pe(s);w!==null&&(t.splice(i,3),i-=3,hd(w,{pending:!0,data:_,method:s.method,action:o},o,_))}}))}function $a(t){function i(X){return eu(X,t)}os!==null&&eu(os,t),ls!==null&&eu(ls,t),cs!==null&&eu(cs,t),il.forEach(i),rl.forEach(i);for(var s=0;s<us.length;s++){var o=us[s];o.blockedOn===t&&(o.blockedOn=null)}for(;0<us.length&&(s=us[0],s.blockedOn===null);)O0(s),s.blockedOn===null&&us.shift();if(s=(t.ownerDocument||t).$$reactFormReplay,s!=null)for(o=0;o<s.length;o+=3){var _=s[o],w=s[o+1],D=_[Et]||null;if(typeof w=="function")D||B0(s);else if(D){var j=null;if(w&&w.hasAttribute("formAction")){if(_=w,D=w[Et]||null)j=D.formAction;else if(ff(_)!==null)continue}else j=D.action;typeof j=="function"?s[o+1]=j:(s.splice(o,3),o-=3),B0(s)}}}function I0(){function t(w){w.canIntercept&&w.info==="react-transition"&&w.intercept({handler:function(){return new Promise(function(D){return _=D})},focusReset:"manual",scroll:"manual"})}function i(){_!==null&&(_(),_=null),o||setTimeout(s,20)}function s(){if(!o&&!navigation.transition){var w=navigation.currentEntry;w&&w.url!=null&&navigation.navigate(w.url,{state:w.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,_=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){o=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),_!==null&&(_(),_=null)}}}function gf(t){this._internalRoot=t}nu.prototype.render=gf.prototype.render=function(t){var i=this._internalRoot;if(i===null)throw Error(a(409));var s=i.current,o=hi();A0(s,o,t,i,null,null)},nu.prototype.unmount=gf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var i=t.containerInfo;A0(t.current,2,null,t,null,null),Ic(),i[Ni]=null}};function nu(t){this._internalRoot=t}nu.prototype.unstable_scheduleHydration=function(t){if(t){var i=cr();t={blockedOn:null,target:t,priority:i};for(var s=0;s<us.length&&i!==0&&i<us[s].priority;s++);us.splice(s,0,t),s===0&&O0(t)}};var j0=n.version;if(j0!=="19.2.7")throw Error(a(527,j0,"19.2.7"));W.findDOMNode=function(t){var i=t._reactInternals;if(i===void 0)throw typeof t.render=="function"?Error(a(188)):(t=Object.keys(t).join(","),Error(a(268,t)));return t=h(i),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var J2={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var iu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!iu.isDisabled&&iu.supportsFiber)try{Hn=iu.inject(J2),Yt=iu}catch{}}return ol.createRoot=function(t,i){if(!l(t))throw Error(a(299));var s=!1,o="",_=q_,w=W_,D=G_;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(o=i.identifierPrefix),i.onUncaughtError!==void 0&&(_=i.onUncaughtError),i.onCaughtError!==void 0&&(w=i.onCaughtError),i.onRecoverableError!==void 0&&(D=i.onRecoverableError)),i=E0(t,1,!1,null,null,s,o,null,_,w,D,I0),t[Ni]=i.current,Yd(t),new gf(i)},ol.hydrateRoot=function(t,i,s){if(!l(t))throw Error(a(299));var o=!1,_="",w=q_,D=W_,j=G_,X=null;return s!=null&&(s.unstable_strictMode===!0&&(o=!0),s.identifierPrefix!==void 0&&(_=s.identifierPrefix),s.onUncaughtError!==void 0&&(w=s.onUncaughtError),s.onCaughtError!==void 0&&(D=s.onCaughtError),s.onRecoverableError!==void 0&&(j=s.onRecoverableError),s.formState!==void 0&&(X=s.formState)),i=E0(t,1,!0,i,s??null,o,_,X,w,D,j,I0),i.context=T0(null),s=i.current,o=hi(),o=et(o),_=Yr(o),_.callback=null,Xr(s,_,o),s=o,i.current.lanes=s,ft(i,s),Zi(i),t[Ni]=i.current,Yd(t),new nu(i)},ol.version="19.2.7",ol}var K0;function lE(){if(K0)return vf.exports;K0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),vf.exports=oE(),vf.exports}var cE=lE();var V0="popstate";function Y0(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function uE(e={}){function n(a,l){let f=l.state?.masked,{pathname:m,search:c,hash:u}=f||a.location;return mp("",{pathname:m,search:c,hash:u},l.state&&l.state.usr||null,l.state&&l.state.key||"default",f?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function r(a,l){return typeof l=="string"?l:Ml(l)}return dE(n,r,null,e)}function Bt(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function qi(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function hE(){return Math.random().toString(36).substring(2,10)}function X0(e,n){return{usr:e.state,key:e.key,idx:n,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function mp(e,n,r=null,a,l){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?so(n):n,state:r,key:n&&n.key||a||hE(),mask:l}}function Ml({pathname:e="/",search:n="",hash:r=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function so(e){let n={};if(e){let r=e.indexOf("#");r>=0&&(n.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(n.search=e.substring(a),e=e.substring(0,a)),e&&(n.pathname=e)}return n}function dE(e,n,r,a={}){let{window:l=document.defaultView,v5Compat:f=!1}=a,m=l.history,c="POP",u=null,h=y();h==null&&(h=0,m.replaceState({...m.state,idx:h},""));function y(){return(m.state||{idx:null}).idx}function g(){c="POP";let p=y(),v=p==null?null:p-h;h=p,u&&u({action:c,location:T.location,delta:v})}function C(p,v){c="PUSH";let d=Y0(p)?p:mp(T.location,p,v);h=y()+1;let b=X0(d,h),x=T.createHref(d.mask||d);try{m.pushState(b,"",x)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;l.location.assign(x)}f&&u&&u({action:c,location:T.location,delta:1})}function E(p,v){c="REPLACE";let d=Y0(p)?p:mp(T.location,p,v);h=y();let b=X0(d,h),x=T.createHref(d.mask||d);m.replaceState(b,"",x),f&&u&&u({action:c,location:T.location,delta:0})}function A(p){return fE(l,p)}let T={get action(){return c},get location(){return e(l,m)},listen(p){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(V0,g),u=p,()=>{l.removeEventListener(V0,g),u=null}},createHref(p){return n(l,p)},createURL:A,encodeLocation(p){let v=A(p);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:C,replace:E,go(p){return m.go(p)}};return T}function fE(e,n,r=!1){let a="http://localhost";e&&(a=e.location.origin!=="null"?e.location.origin:e.location.href),Bt(a,"No window.location.(origin|href) available to create URL");let l=typeof n=="string"?n:Ml(n);return l=l.replace(/ $/,"%20"),!r&&l.startsWith("//")&&(l=a+l),new URL(l,a)}function Ry(e,n,r="/"){return pE(e,n,r,!1)}function pE(e,n,r,a,l){let f=typeof n=="string"?so(n):n,m=zr(f.pathname||"/",r);if(m==null)return null;let c=gE(e),u=null,h=AE(m);for(let y=0;u==null&&y<c.length;++y)u=EE(c[y],h,a);return u}function gE(e){let n=Ly(e);return mE(n),n}function Ly(e,n=[],r=[],a="",l=!1){let f=(m,c,u=l,h)=>{let y={relativePath:h===void 0?m.path||"":h,caseSensitive:m.caseSensitive===!0,childrenIndex:c,route:m};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(a)&&u)return;Bt(y.relativePath.startsWith(a),`Absolute route path "${y.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(a.length)}let g=Fi([a,y.relativePath]),C=r.concat(y);m.children&&m.children.length>0&&(Bt(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),Ly(m.children,n,C,g,u)),!(m.path==null&&!m.index)&&n.push({path:g,score:CE(g,m.index),routesMeta:C})};return e.forEach((m,c)=>{if(m.path===""||!m.path?.includes("?"))f(m,c);else for(let u of My(m.path))f(m,c,!0,u)}),n}function My(e){let n=e.split("/");if(n.length===0)return[];let[r,...a]=n,l=r.endsWith("?"),f=r.replace(/\?$/,"");if(a.length===0)return l?[f,""]:[f];let m=My(a.join("/")),c=[];return c.push(...m.map(u=>u===""?f:[f,u].join("/"))),l&&c.push(...m),c.map(u=>e.startsWith("/")&&u===""?"/":u)}function mE(e){e.sort((n,r)=>n.score!==r.score?r.score-n.score:xE(n.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var _E=/^:[\w-]+$/,vE=3,bE=2,yE=1,SE=10,wE=-2,Z0=e=>e==="*";function CE(e,n){let r=e.split("/"),a=r.length;return r.some(Z0)&&(a+=wE),n&&(a+=bE),r.filter(l=>!Z0(l)).reduce((l,f)=>l+(_E.test(f)?vE:f===""?yE:SE),a)}function xE(e,n){return e.length===n.length&&e.slice(0,-1).every((a,l)=>a===n[l])?e[e.length-1]-n[n.length-1]:0}function EE(e,n,r=!1){let{routesMeta:a}=e,l={},f="/",m=[];for(let c=0;c<a.length;++c){let u=a[c],h=c===a.length-1,y=f==="/"?n:n.slice(f.length)||"/",g=ju({path:u.relativePath,caseSensitive:u.caseSensitive,end:h},y),C=u.route;if(!g&&h&&r&&!a[a.length-1].route.index&&(g=ju({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},y)),!g)return null;Object.assign(l,g.params),m.push({params:l,pathname:Fi([f,g.pathname]),pathnameBase:ME(Fi([f,g.pathnameBase])),route:C}),g.pathnameBase!=="/"&&(f=Fi([f,g.pathnameBase]))}return m}function ju(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=TE(e.path,e.caseSensitive,e.end),l=n.match(r);if(!l)return null;let f=l[0],m=f.replace(/(.)\/+$/,"$1"),c=l.slice(1);return{params:a.reduce((h,{paramName:y,isOptional:g},C)=>{if(y==="*"){let A=c[C]||"";m=f.slice(0,f.length-A.length).replace(/(.)\/+$/,"$1")}const E=c[C];return g&&!E?h[y]=void 0:h[y]=(E||"").replace(/%2F/g,"/"),h},{}),pathname:f,pathnameBase:m,pattern:e}}function TE(e,n=!1,r=!0){qi(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,c,u,h,y)=>{if(a.push({paramName:c,isOptional:u!=null}),u){let g=y.charAt(h+m.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,n?void 0:"i"),a]}function AE(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return qi(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),e}}function zr(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}var kE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function RE(e,n="/"){let{pathname:r,search:a="",hash:l=""}=typeof e=="string"?so(e):e,f;return r?(r=Dy(r),r.startsWith("/")?f=J0(r.substring(1),"/"):f=J0(r,n)):f=n,{pathname:f,search:DE(a),hash:OE(l)}}function J0(e,n){let r=zu(n).split("/");return e.split("/").forEach(l=>{l===".."?r.length>1&&r.pop():l!=="."&&r.push(l)}),r.length>1?r.join("/"):"/"}function wf(e,n,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function LE(e){return e.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function bg(e){let n=LE(e);return n.map((r,a)=>a===n.length-1?r.pathname:r.pathnameBase)}function eh(e,n,r,a=!1){let l;typeof e=="string"?l=so(e):(l={...e},Bt(!l.pathname||!l.pathname.includes("?"),wf("?","pathname","search",l)),Bt(!l.pathname||!l.pathname.includes("#"),wf("#","pathname","hash",l)),Bt(!l.search||!l.search.includes("#"),wf("#","search","hash",l)));let f=e===""||l.pathname==="",m=f?"/":l.pathname,c;if(m==null)c=r;else{let g=n.length-1;if(!a&&m.startsWith("..")){let C=m.split("/");for(;C[0]==="..";)C.shift(),g-=1;l.pathname=C.join("/")}c=g>=0?n[g]:"/"}let u=RE(l,c),h=m&&m!=="/"&&m.endsWith("/"),y=(f||m===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(h||y)&&(u.pathname+="/"),u}var Dy=e=>e.replace(/\/\/+/g,"/"),Fi=e=>Dy(e.join("/")),zu=e=>e.replace(/\/+$/,""),ME=e=>zu(e).replace(/^\/*/,"/"),DE=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,OE=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,NE=class{constructor(e,n,r,a=!1){this.status=e,this.statusText=n||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function BE(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function IE(e){let n=e.map(r=>r.route.path).filter(Boolean);return Fi(n)||"/"}var Oy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ny(e,n){let r=e;if(typeof r!="string"||!kE.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,l=!1;if(Oy)try{let f=new URL(window.location.href),m=r.startsWith("//")?new URL(f.protocol+r):new URL(r),c=zr(m.pathname,n);m.origin===f.origin&&c!=null?r=c+m.search+m.hash:l=!0}catch{qi(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:l,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var By=["POST","PUT","PATCH","DELETE"];new Set(By);var jE=["GET",...By];new Set(jE);var ao=H.createContext(null);ao.displayName="DataRouter";var th=H.createContext(null);th.displayName="DataRouterState";var Iy=H.createContext(!1);function zE(){return H.useContext(Iy)}var jy=H.createContext({isTransitioning:!1});jy.displayName="ViewTransition";var $E=H.createContext(new Map);$E.displayName="Fetchers";var PE=H.createContext(null);PE.displayName="Await";var fi=H.createContext(null);fi.displayName="Navigation";var $l=H.createContext(null);$l.displayName="Location";var rr=H.createContext({outlet:null,matches:[],isDataRoute:!1});rr.displayName="Route";var yg=H.createContext(null);yg.displayName="RouteError";var zy="REACT_ROUTER_ERROR",HE="REDIRECT",UE="ROUTE_ERROR_RESPONSE";function FE(e){if(e.startsWith(`${zy}:${HE}:{`))try{let n=JSON.parse(e.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function qE(e){if(e.startsWith(`${zy}:${UE}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new NE(n.status,n.statusText,n.data)}catch{}}function WE(e,{relative:n}={}){Bt(oo(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=H.useContext(fi),{hash:l,pathname:f,search:m}=Hl(e,{relative:n}),c=f;return r!=="/"&&(c=f==="/"?r:Fi([r,f])),a.createHref({pathname:c,search:m,hash:l})}function oo(){return H.useContext($l)!=null}function Li(){return Bt(oo(),"useLocation() may be used only in the context of a <Router> component."),H.useContext($l).location}var $y="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Py(e){H.useContext(fi).static||H.useLayoutEffect(e)}function Pl(){let{isDataRoute:e}=H.useContext(rr);return e?r5():GE()}function GE(){Bt(oo(),"useNavigate() may be used only in the context of a <Router> component.");let e=H.useContext(ao),{basename:n,navigator:r}=H.useContext(fi),{matches:a}=H.useContext(rr),{pathname:l}=Li(),f=JSON.stringify(bg(a)),m=H.useRef(!1);return Py(()=>{m.current=!0}),H.useCallback((u,h={})=>{if(qi(m.current,$y),!m.current)return;if(typeof u=="number"){r.go(u);return}let y=eh(u,JSON.parse(f),l,h.relative==="path");e==null&&n!=="/"&&(y.pathname=y.pathname==="/"?n:Fi([n,y.pathname])),(h.replace?r.replace:r.push)(y,h.state,h)},[n,r,f,l,e])}H.createContext(null);function Hl(e,{relative:n}={}){let{matches:r}=H.useContext(rr),{pathname:a}=Li(),l=JSON.stringify(bg(r));return H.useMemo(()=>eh(e,JSON.parse(l),a,n==="path"),[e,l,a,n])}function KE(e,n){return Hy(e,n)}function Hy(e,n,r){Bt(oo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=H.useContext(fi),{matches:l}=H.useContext(rr),f=l[l.length-1],m=f?f.params:{},c=f?f.pathname:"/",u=f?f.pathnameBase:"/",h=f&&f.route;{let p=h&&h.path||"";Fy(c,!h||p.endsWith("*")||p.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${p}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
10
 
11
11
  Please change the parent <Route path="${p}"> to <Route path="${p==="/"?"*":`${p}/*`}">.`)}let y=Li(),g;if(n){let p=typeof n=="string"?so(n):n;Bt(u==="/"||p.pathname?.startsWith(u),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${p.pathname}" was given in the \`location\` prop.`),g=p}else g=y;let C=g.pathname||"/",E=C;if(u!=="/"){let p=u.replace(/^\//,"").split("/");E="/"+C.replace(/^\//,"").split("/").slice(p.length).join("/")}let A=r&&r.state.matches.length?r.state.matches.map(p=>Object.assign(p,{route:r.manifest[p.route.id]||p.route})):Ry(e,{pathname:E});qi(h||A!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),qi(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let T=JE(A&&A.map(p=>Object.assign({},p,{params:Object.assign({},m,p.params),pathname:Fi([u,a.encodeLocation?a.encodeLocation(p.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?u:Fi([u,a.encodeLocation?a.encodeLocation(p.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:p.pathnameBase])})),l,r);return n&&T?H.createElement($l.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...g},navigationType:"POP"}},T):T}function VE(){let e=i5(),n=BE(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:a},f={padding:"2px 4px",backgroundColor:a},m=null;return console.error("Error handled by React Router default ErrorBoundary:",e),m=H.createElement(H.Fragment,null,H.createElement("p",null,"💿 Hey developer 👋"),H.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",H.createElement("code",{style:f},"ErrorBoundary")," or"," ",H.createElement("code",{style:f},"errorElement")," prop on your route.")),H.createElement(H.Fragment,null,H.createElement("h2",null,"Unexpected Application Error!"),H.createElement("h3",{style:{fontStyle:"italic"}},n),r?H.createElement("pre",{style:l},r):null,m)}var YE=H.createElement(VE,null),Uy=class extends H.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=qE(e.digest);r&&(e=r)}let n=e!==void 0?H.createElement(rr.Provider,{value:this.props.routeContext},H.createElement(yg.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?H.createElement(XE,{error:e},n):n}};Uy.contextType=Iy;var Cf=new WeakMap;function XE({children:e,error:n}){let{basename:r}=H.useContext(fi);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let a=FE(n.digest);if(a){let l=Cf.get(n);if(l)throw l;let f=Ny(a.location,r);if(Oy&&!Cf.get(n))if(f.isExternal||a.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const m=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:a.replace}));throw Cf.set(n,m),m}return H.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return e}function ZE({routeContext:e,match:n,children:r}){let a=H.useContext(ao);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),H.createElement(rr.Provider,{value:e},r)}function JE(e,n=[],r){let a=r?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(n.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let l=e,f=a?.errors;if(f!=null){let y=l.findIndex(g=>g.route.id&&f?.[g.route.id]!==void 0);Bt(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),l=l.slice(0,Math.min(l.length,y+1))}let m=!1,c=-1;if(r&&a){m=a.renderFallback;for(let y=0;y<l.length;y++){let g=l[y];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(c=y),g.route.id){let{loaderData:C,errors:E}=a,A=g.route.loader&&!C.hasOwnProperty(g.route.id)&&(!E||E[g.route.id]===void 0);if(g.route.lazy||A){r.isStatic&&(m=!0),c>=0?l=l.slice(0,c+1):l=[l[0]];break}}}}let u=r?.onError,h=a&&u?(y,g)=>{u(y,{location:a.location,params:a.matches?.[0]?.params??{},pattern:IE(a.matches),errorInfo:g})}:void 0;return l.reduceRight((y,g,C)=>{let E,A=!1,T=null,p=null;a&&(E=f&&g.route.id?f[g.route.id]:void 0,T=g.route.errorElement||YE,m&&(c<0&&C===0?(Fy("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),A=!0,p=null):c===C&&(A=!0,p=g.route.hydrateFallbackElement||null)));let v=n.concat(l.slice(0,C+1)),d=()=>{let b;return E?b=T:A?b=p:g.route.Component?b=H.createElement(g.route.Component,null):g.route.element?b=g.route.element:b=y,H.createElement(ZE,{match:g,routeContext:{outlet:y,matches:v,isDataRoute:a!=null},children:b})};return a&&(g.route.ErrorBoundary||g.route.errorElement||C===0)?H.createElement(Uy,{location:a.location,revalidation:a.revalidation,component:T,error:E,children:d(),routeContext:{outlet:null,matches:v,isDataRoute:!0},onError:h}):d()},null)}function Sg(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function QE(e){let n=H.useContext(ao);return Bt(n,Sg(e)),n}function e5(e){let n=H.useContext(th);return Bt(n,Sg(e)),n}function t5(e){let n=H.useContext(rr);return Bt(n,Sg(e)),n}function wg(e){let n=t5(e),r=n.matches[n.matches.length-1];return Bt(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function n5(){return wg("useRouteId")}function i5(){let e=H.useContext(yg),n=e5("useRouteError"),r=wg("useRouteError");return e!==void 0?e:n.errors?.[r]}function r5(){let{router:e}=QE("useNavigate"),n=wg("useNavigate"),r=H.useRef(!1);return Py(()=>{r.current=!0}),H.useCallback(async(l,f={})=>{qi(r.current,$y),r.current&&(typeof l=="number"?await e.navigate(l):await e.navigate(l,{fromRouteId:n,...f}))},[e,n])}var Q0={};function Fy(e,n,r){!n&&!Q0[e]&&(Q0[e]=!0,qi(!1,r))}H.memo(s5);function s5({routes:e,manifest:n,future:r,state:a,isStatic:l,onError:f}){return Hy(e,void 0,{manifest:n,state:a,isStatic:l,onError:f})}function eb({to:e,replace:n,state:r,relative:a}){Bt(oo(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=H.useContext(fi);qi(!l,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=H.useContext(rr),{pathname:m}=Li(),c=Pl(),u=eh(e,bg(f),m,a==="path"),h=JSON.stringify(u);return H.useEffect(()=>{c(JSON.parse(h),{replace:n,state:r,relative:a})},[c,h,a,n,r]),null}function Ws(e){Bt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function a5({basename:e="/",children:n=null,location:r,navigationType:a="POP",navigator:l,static:f=!1,useTransitions:m}){Bt(!oo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),u=H.useMemo(()=>({basename:c,navigator:l,static:f,useTransitions:m,future:{}}),[c,l,f,m]);typeof r=="string"&&(r=so(r));let{pathname:h="/",search:y="",hash:g="",state:C=null,key:E="default",mask:A}=r,T=H.useMemo(()=>{let p=zr(h,c);return p==null?null:{location:{pathname:p,search:y,hash:g,state:C,key:E,mask:A},navigationType:a}},[c,h,y,g,C,E,a,A]);return qi(T!=null,`<Router basename="${c}"> is not able to match the URL "${h}${y}${g}" because it does not start with the basename, so the <Router> won't render anything.`),T==null?null:H.createElement(fi.Provider,{value:u},H.createElement($l.Provider,{children:n,value:T}))}function o5({children:e,location:n}){return KE(_p(e),n)}function _p(e,n=[]){let r=[];return H.Children.forEach(e,(a,l)=>{if(!H.isValidElement(a))return;let f=[...n,l];if(a.type===H.Fragment){r.push.apply(r,_p(a.props.children,f));return}Bt(a.type===Ws,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Bt(!a.props.index||!a.props.children,"An index route cannot have child routes.");let m={id:a.props.id||f.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(m.children=_p(a.props.children,f)),r.push(m)}),r}var wu="get",Cu="application/x-www-form-urlencoded";function nh(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function l5(e){return nh(e)&&e.tagName.toLowerCase()==="button"}function c5(e){return nh(e)&&e.tagName.toLowerCase()==="form"}function u5(e){return nh(e)&&e.tagName.toLowerCase()==="input"}function h5(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function d5(e,n){return e.button===0&&(!n||n==="_self")&&!h5(e)}var ru=null;function f5(){if(ru===null)try{new FormData(document.createElement("form"),0),ru=!1}catch{ru=!0}return ru}var p5=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function xf(e){return e!=null&&!p5.has(e)?(qi(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Cu}"`),null):e}function g5(e,n){let r,a,l,f,m;if(c5(e)){let c=e.getAttribute("action");a=c?zr(c,n):null,r=e.getAttribute("method")||wu,l=xf(e.getAttribute("enctype"))||Cu,f=new FormData(e)}else if(l5(e)||u5(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||c.getAttribute("action");if(a=u?zr(u,n):null,r=e.getAttribute("formmethod")||c.getAttribute("method")||wu,l=xf(e.getAttribute("formenctype"))||xf(c.getAttribute("enctype"))||Cu,f=new FormData(c,e),!f5()){let{name:h,type:y,value:g}=e;if(y==="image"){let C=h?`${h}.`:"";f.append(`${C}x`,"0"),f.append(`${C}y`,"0")}else h&&f.append(h,g)}}else{if(nh(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=wu,a=null,l=Cu,m=e}return f&&l==="text/plain"&&(m=f,f=void 0),{action:a,method:r.toLowerCase(),encType:l,formData:f,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Cg(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function qy(e,n,r,a){let l=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?l.pathname.endsWith("/")?l.pathname=`${l.pathname}_.${a}`:l.pathname=`${l.pathname}.${a}`:l.pathname==="/"?l.pathname=`_root.${a}`:n&&zr(l.pathname,n)==="/"?l.pathname=`${zu(n)}/_root.${a}`:l.pathname=`${zu(l.pathname)}.${a}`,l}async function m5(e,n){if(e.id in n)return n[e.id];try{let r=await import(e.module);return n[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function _5(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function v5(e,n,r){let a=await Promise.all(e.map(async l=>{let f=n.routes[l.route.id];if(f){let m=await m5(f,r);return m.links?m.links():[]}return[]}));return w5(a.flat(1).filter(_5).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function tb(e,n,r,a,l,f){let m=(u,h)=>r[h]?u.route.id!==r[h].route.id:!0,c=(u,h)=>r[h].pathname!==u.pathname||r[h].route.path?.endsWith("*")&&r[h].params["*"]!==u.params["*"];return f==="assets"?n.filter((u,h)=>m(u,h)||c(u,h)):f==="data"?n.filter((u,h)=>{let y=a.routes[u.route.id];if(!y||!y.hasLoader)return!1;if(m(u,h)||c(u,h))return!0;if(u.route.shouldRevalidate){let g=u.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function b5(e,n,{includeHydrateFallback:r}={}){return y5(e.map(a=>{let l=n.routes[a.route.id];if(!l)return[];let f=[l.module];return l.clientActionModule&&(f=f.concat(l.clientActionModule)),l.clientLoaderModule&&(f=f.concat(l.clientLoaderModule)),r&&l.hydrateFallbackModule&&(f=f.concat(l.hydrateFallbackModule)),l.imports&&(f=f.concat(l.imports)),f}).flat(1))}function y5(e){return[...new Set(e)]}function S5(e){let n={},r=Object.keys(e).sort();for(let a of r)n[a]=e[a];return n}function w5(e,n){let r=new Set;return new Set(n),e.reduce((a,l)=>{let f=JSON.stringify(S5(l));return r.has(f)||(r.add(f),a.push({key:f,link:l})),a},[])}function xg(){let e=H.useContext(ao);return Cg(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function C5(){let e=H.useContext(th);return Cg(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Eg=H.createContext(void 0);Eg.displayName="FrameworkContext";function Tg(){let e=H.useContext(Eg);return Cg(e,"You must render this element inside a <HydratedRouter> element"),e}function x5(e,n){let r=H.useContext(Eg),[a,l]=H.useState(!1),[f,m]=H.useState(!1),{onFocus:c,onBlur:u,onMouseEnter:h,onMouseLeave:y,onTouchStart:g}=n,C=H.useRef(null);H.useEffect(()=>{if(e==="render"&&m(!0),e==="viewport"){let T=v=>{v.forEach(d=>{m(d.isIntersecting)})},p=new IntersectionObserver(T,{threshold:.5});return C.current&&p.observe(C.current),()=>{p.disconnect()}}},[e]),H.useEffect(()=>{if(a){let T=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(T)}}},[a]);let E=()=>{l(!0)},A=()=>{l(!1),m(!1)};return r?e!=="intent"?[f,C,{}]:[f,C,{onFocus:ll(c,E),onBlur:ll(u,A),onMouseEnter:ll(h,E),onMouseLeave:ll(y,A),onTouchStart:ll(g,E)}]:[!1,C,{}]}function ll(e,n){return r=>{e&&e(r),r.defaultPrevented||n(r)}}function E5({page:e,...n}){let r=zE(),{router:a}=xg(),l=H.useMemo(()=>Ry(a.routes,e,a.basename),[a.routes,e,a.basename]);return l?r?H.createElement(A5,{page:e,matches:l,...n}):H.createElement(k5,{page:e,matches:l,...n}):null}function T5(e){let{manifest:n,routeModules:r}=Tg(),[a,l]=H.useState([]);return H.useEffect(()=>{let f=!1;return v5(e,n,r).then(m=>{f||l(m)}),()=>{f=!0}},[e,n,r]),a}function A5({page:e,matches:n,...r}){let a=Li(),{future:l}=Tg(),{basename:f}=xg(),m=H.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let c=qy(e,f,l.v8_trailingSlashAwareDataRequests,"rsc"),u=!1,h=[];for(let y of n)typeof y.route.shouldRevalidate=="function"?u=!0:h.push(y.route.id);return u&&h.length>0&&c.searchParams.set("_routes",h.join(",")),[c.pathname+c.search]},[f,l.v8_trailingSlashAwareDataRequests,e,a,n]);return H.createElement(H.Fragment,null,m.map(c=>H.createElement("link",{key:c,rel:"prefetch",as:"fetch",href:c,...r})))}function k5({page:e,matches:n,...r}){let a=Li(),{future:l,manifest:f,routeModules:m}=Tg(),{basename:c}=xg(),{loaderData:u,matches:h}=C5(),y=H.useMemo(()=>tb(e,n,h,f,a,"data"),[e,n,h,f,a]),g=H.useMemo(()=>tb(e,n,h,f,a,"assets"),[e,n,h,f,a]),C=H.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let T=new Set,p=!1;if(n.forEach(d=>{let b=f.routes[d.route.id];!b||!b.hasLoader||(!y.some(x=>x.route.id===d.route.id)&&d.route.id in u&&m[d.route.id]?.shouldRevalidate||b.hasClientLoader?p=!0:T.add(d.route.id))}),T.size===0)return[];let v=qy(e,c,l.v8_trailingSlashAwareDataRequests,"data");return p&&T.size>0&&v.searchParams.set("_routes",n.filter(d=>T.has(d.route.id)).map(d=>d.route.id).join(",")),[v.pathname+v.search]},[c,l.v8_trailingSlashAwareDataRequests,u,a,f,y,n,e,m]),E=H.useMemo(()=>b5(g,f),[g,f]),A=T5(g);return H.createElement(H.Fragment,null,C.map(T=>H.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...r})),E.map(T=>H.createElement("link",{key:T,rel:"modulepreload",href:T,...r})),A.map(({key:T,link:p})=>H.createElement("link",{key:T,nonce:r.nonce,...p,crossOrigin:p.crossOrigin??r.crossOrigin})))}function R5(...e){return n=>{e.forEach(r=>{typeof r=="function"?r(n):r!=null&&(r.current=n)})}}var L5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{L5&&(window.__reactRouterVersion="7.17.0")}catch{}function M5({basename:e,children:n,useTransitions:r,window:a}){let l=H.useRef();l.current==null&&(l.current=uE({window:a,v5Compat:!0}));let f=l.current,[m,c]=H.useState({action:f.action,location:f.location}),u=H.useCallback(h=>{r===!1?c(h):H.startTransition(()=>c(h))},[r]);return H.useLayoutEffect(()=>f.listen(u),[f,u]),H.createElement(a5,{basename:e,children:n,location:m.location,navigationType:m.action,navigator:f,useTransitions:r})}var Wy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dl=H.forwardRef(function({onClick:n,discover:r="render",prefetch:a="none",relative:l,reloadDocument:f,replace:m,mask:c,state:u,target:h,to:y,preventScrollReset:g,viewTransition:C,defaultShouldRevalidate:E,...A},T){let{basename:p,navigator:v,useTransitions:d}=H.useContext(fi),b=typeof y=="string"&&Wy.test(y),x=Ny(y,p);y=x.to;let L=WE(y,{relative:l}),R=Li(),M=null;if(c){let te=eh(c,[],R.mask?R.mask.pathname:"/",!0);p!=="/"&&(te.pathname=te.pathname==="/"?p:Fi([p,te.pathname])),M=v.createHref(te)}let[k,O,U]=x5(a,A),F=N5(y,{replace:m,mask:c,state:u,target:h,preventScrollReset:g,relative:l,viewTransition:C,defaultShouldRevalidate:E,useTransitions:d});function G(te){n&&n(te),te.defaultPrevented||F(te)}let I=!(x.isExternal||f),K=H.createElement("a",{...A,...U,href:(I?M:void 0)||x.absoluteURL||L,onClick:I?G:n,ref:R5(T,O),target:h,"data-discover":!b&&r==="render"?"true":void 0});return k&&!b?H.createElement(H.Fragment,null,K,H.createElement(E5,{page:L})):K});Dl.displayName="Link";var vp=H.forwardRef(function({"aria-current":n="page",caseSensitive:r=!1,className:a="",end:l=!1,style:f,to:m,viewTransition:c,children:u,...h},y){let g=Hl(m,{relative:h.relative}),C=Li(),E=H.useContext(th),{navigator:A,basename:T}=H.useContext(fi),p=E!=null&&$5(g)&&c===!0,v=A.encodeLocation?A.encodeLocation(g).pathname:g.pathname,d=C.pathname,b=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;r||(d=d.toLowerCase(),b=b?b.toLowerCase():null,v=v.toLowerCase()),b&&T&&(b=zr(b,T)||b);const x=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let L=d===v||!l&&d.startsWith(v)&&d.charAt(x)==="/",R=b!=null&&(b===v||!l&&b.startsWith(v)&&b.charAt(v.length)==="/"),M={isActive:L,isPending:R,isTransitioning:p},k=L?n:void 0,O;typeof a=="function"?O=a(M):O=[a,L?"active":null,R?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let U=typeof f=="function"?f(M):f;return H.createElement(Dl,{...h,"aria-current":k,className:O,ref:y,style:U,to:m,viewTransition:c},typeof u=="function"?u(M):u)});vp.displayName="NavLink";var D5=H.forwardRef(({discover:e="render",fetcherKey:n,navigate:r,reloadDocument:a,replace:l,state:f,method:m=wu,action:c,onSubmit:u,relative:h,preventScrollReset:y,viewTransition:g,defaultShouldRevalidate:C,...E},A)=>{let{useTransitions:T}=H.useContext(fi),p=j5(),v=z5(c,{relative:h}),d=m.toLowerCase()==="get"?"get":"post",b=typeof c=="string"&&Wy.test(c),x=L=>{if(u&&u(L),L.defaultPrevented)return;L.preventDefault();let R=L.nativeEvent.submitter,M=R?.getAttribute("formmethod")||m,k=()=>p(R||L.currentTarget,{fetcherKey:n,method:M,navigate:r,replace:l,state:f,relative:h,preventScrollReset:y,viewTransition:g,defaultShouldRevalidate:C});T&&r!==!1?H.startTransition(()=>k()):k()};return H.createElement("form",{ref:A,method:d,action:v,onSubmit:a?u:x,...E,"data-discover":!b&&e==="render"?"true":void 0})});D5.displayName="Form";function O5(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Gy(e){let n=H.useContext(ao);return Bt(n,O5(e)),n}function N5(e,{target:n,replace:r,mask:a,state:l,preventScrollReset:f,relative:m,viewTransition:c,defaultShouldRevalidate:u,useTransitions:h}={}){let y=Pl(),g=Li(),C=Hl(e,{relative:m});return H.useCallback(E=>{if(d5(E,n)){E.preventDefault();let A=r!==void 0?r:Ml(g)===Ml(C),T=()=>y(e,{replace:A,mask:a,state:l,preventScrollReset:f,relative:m,viewTransition:c,defaultShouldRevalidate:u});h?H.startTransition(()=>T()):T()}},[g,y,C,r,a,l,n,e,f,m,c,u,h])}var B5=0,I5=()=>`__${String(++B5)}__`;function j5(){let{router:e}=Gy("useSubmit"),{basename:n}=H.useContext(fi),r=n5(),a=e.fetch,l=e.navigate;return H.useCallback(async(f,m={})=>{let{action:c,method:u,encType:h,formData:y,body:g}=g5(f,n);if(m.navigate===!1){let C=m.fetcherKey||I5();await a(C,r,m.action||c,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:y,body:g,formMethod:m.method||u,formEncType:m.encType||h,flushSync:m.flushSync})}else await l(m.action||c,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:y,body:g,formMethod:m.method||u,formEncType:m.encType||h,replace:m.replace,state:m.state,fromRouteId:r,flushSync:m.flushSync,viewTransition:m.viewTransition})},[a,l,n,r])}function z5(e,{relative:n}={}){let{basename:r}=H.useContext(fi),a=H.useContext(rr);Bt(a,"useFormAction must be used inside a RouteContext");let[l]=a.matches.slice(-1),f={...Hl(e||".",{relative:n})},m=Li();if(e==null){f.search=m.search;let c=new URLSearchParams(f.search),u=c.getAll("index");if(u.some(y=>y==="")){c.delete("index"),u.filter(g=>g).forEach(g=>c.append("index",g));let y=c.toString();f.search=y?`?${y}`:""}}return(!e||e===".")&&l.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(f.pathname=f.pathname==="/"?r:Fi([r,f.pathname])),Ml(f)}function $5(e,{relative:n}={}){let r=H.useContext(jy);Bt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Gy("useViewTransitionState"),l=Hl(e,{relative:n});if(!r.isTransitioning)return!1;let f=zr(r.currentLocation.pathname,a)||r.currentLocation.pathname,m=zr(r.nextLocation.pathname,a)||r.nextLocation.pathname;return ju(l.pathname,m)!=null||ju(l.pathname,f)!=null}var P5=ky();const H5="fleet-console.canvas.",Ky="fleet-console.canvas.backgroundAnimation",Vy="fleet-console.canvas.maximized",Yy="fleet-console.canvas.dockExpanded",U5=400,bp=640,yp=400,nb=40,ib=96,F5=.25,q5=1,Ef=.2,rb=.5,W5=.001,Ka={x:0,y:0,zoom:1},Za={viewport:Ka,panels:{},minimized:[]},Sp=new Set,wp=new Set,Cp=new Set,xp=new Set;let Ol=null,ys=null,_t=Za,xu=bT(),El=ST(),Eu=CT(),bs=Ka,Ys=null,io=0;function Xy(e){return Sp.add(e),()=>{Sp.delete(e)}}function sb(){return _t}function G5(){return H.useSyncExternalStore(Xy,sb,sb)}function K5(){return H.useSyncExternalStore(lT,ab,ab)}function Zy(){return H.useSyncExternalStore(uT,ob,ob)}function V5(){return H.useSyncExternalStore(Xy,lb,lb)}function Y5(){return H.useSyncExternalStore(dT,cb,cb)}function tr(e){_t={viewport:e.viewport??_t.viewport,panels:e.panels??_t.panels,minimized:e.minimized??_t.minimized},gT(),Jy()}function Tu(e){Ag();const n=kg(e);bs=n,tr({viewport:n})}function X5(e){const n=kg(e);if(typeof window>"u"||typeof window.requestAnimationFrame!="function"||pT()){Tu(n);return}bs=n,Ys===null&&(Ys=window.requestAnimationFrame(Qy))}function Tl(e,n){const r=lo();tr({panels:{..._t.panels,[e]:{...Rg(n,r),zIndex:r}}})}function Z5(e){_t.minimized.includes(e)||tr({minimized:[..._t.minimized,e]})}function J5(e){if(!_t.minimized.includes(e))return;const n=_t.minimized.filter(l=>l!==e),r=_t.panels[e];if(!r){tr({minimized:n});return}const a=lo();tr({minimized:n,panels:{..._t.panels,[e]:{...r,zIndex:a}}})}function lo(){return io+=1,io}function Q5(e){io=Math.max(io,e)}function eT(e){const n=_t.panels[e];if(n)return n;const r=Object.keys(_t.panels).length,a={x:r*nb,y:r*nb,width:bp,height:yp,zIndex:lo()};return tr({panels:{..._t.panels,[e]:a}}),a}function tT(e){const n=new Set(e),r={};let a=!1;for(const[m,c]of Object.entries(_t.panels))n.has(m)?r[m]=c:a=!0;const l=_t.minimized.filter(m=>n.has(m)),f=l.length!==_t.minimized.length;(a||f)&&tr({panels:r,minimized:l})}function nT(e){mT(),Ag(),Ol=e,_t=e?vT(e):Za,bs=_t.viewport,io=Math.max(io,nS(_t.panels)),Jy()}function iT(e,n){const r=_t.panels[e];if(!r)return;const a=Math.max(F5,Math.min(q5,Math.min((n.width-ib)/r.width,(n.height-ib)/r.height))),l={x:n.width/2-(r.x+r.width/2)*a,y:n.height/2-(r.y+r.height/2)*a,zoom:a};Ag(),bs=l;const f=lo(),m=_t.minimized.includes(e);tr({viewport:l,panels:{..._t.panels,[e]:{...Rg(r,f),zIndex:f}},...m?{minimized:_t.minimized.filter(c=>c!==e)}:{}})}function rT(){xu=!xu,yT(xu),cT()}function sT(){aT(!El)}function aT(e){El!==e&&(El=e,wT(El),hT())}function oT(){Eu=!Eu,xT(Eu),fT()}function lT(e){return wp.add(e),()=>{wp.delete(e)}}function ab(){return xu}function Jy(){for(const e of Sp)e()}function cT(){for(const e of wp)e()}function uT(e){return Cp.add(e),()=>{Cp.delete(e)}}function ob(){return El}function lb(){return _t.minimized}function hT(){for(const e of Cp)e()}function dT(e){return xp.add(e),()=>{xp.delete(e)}}function cb(){return Eu}function fT(){for(const e of xp)e()}function Qy(){const e=_t.viewport,n=bs.x-e.x,r=bs.y-e.y,a=bs.zoom-e.zoom;if(Math.abs(n)<rb&&Math.abs(r)<rb&&Math.abs(a)<W5){Ys=null,tr({viewport:bs});return}tr({viewport:{x:e.x+n*Ef,y:e.y+r*Ef,zoom:e.zoom+a*Ef}}),Ys=typeof window<"u"?window.requestAnimationFrame(Qy):null}function Ag(){Ys===null||typeof window>"u"||(window.cancelAnimationFrame(Ys),Ys=null)}function pT(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function gT(){!Ol||typeof window>"u"||(_T(),ys=window.setTimeout(()=>{ys=null,eS(Ol,_t)},U5))}function mT(){!ys||!Ol||typeof window>"u"||(window.clearTimeout(ys),ys=null,eS(Ol,_t))}function _T(){!ys||typeof window>"u"||(window.clearTimeout(ys),ys=null)}function vT(e){if(typeof window>"u")return Za;try{const n=window.localStorage.getItem(tS(e));if(!n)return Za;const r=JSON.parse(n);return ET(r)}catch{return Za}}function eS(e,n){if(!(!e||typeof window>"u"))try{window.localStorage.setItem(tS(e),JSON.stringify(n))}catch{}}function bT(){if(typeof window>"u")return!0;try{const e=window.localStorage.getItem(Ky);return e===null?!0:e==="true"}catch{return!0}}function yT(e){if(!(typeof window>"u"))try{window.localStorage.setItem(Ky,String(e))}catch{}}function ST(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(Vy)==="true"}catch{return!1}}function wT(e){if(!(typeof window>"u"))try{window.localStorage.setItem(Vy,String(e))}catch{}}function CT(){if(typeof window>"u")return!0;try{const e=window.localStorage.getItem(Yy);return e===null?!0:e==="true"}catch{return!0}}function xT(e){if(!(typeof window>"u"))try{window.localStorage.setItem(Yy,String(e))}catch{}}function tS(e){return`${H5}${e}`}function ET(e){if(!Nl(e))return Za;const n=AT(e.panels);return{viewport:kg(e.viewport),panels:n,minimized:TT(e.minimized,n)}}function TT(e,n){if(!Array.isArray(e))return[];const r=new Set,a=[];for(const l of e)typeof l!="string"||r.has(l)||!(l in n)||(r.add(l),a.push(l));return a}function kg(e){if(!Nl(e))return Ka;const n=Al(e.x,Ka.x),r=Al(e.y,Ka.y),a=Ep(e.zoom,Ka.zoom);return{x:n,y:r,zoom:a}}function AT(e){if(!Nl(e))return{};const n={};for(const[r,a]of Object.entries(e))Nl(a)&&(n[r]=Rg(a,kT(n)));return n}function Rg(e,n){return Nl(e)?{x:Al(e.x,0),y:Al(e.y,0),width:Ep(e.width,bp),height:Ep(e.height,yp),zIndex:Al(e.zIndex,n)}:{x:0,y:0,width:bp,height:yp,zIndex:n}}function kT(e){return nS(e)+1}function nS(e){return Math.max(0,...Object.values(e).map(n=>n.zIndex))}function Al(e,n){return typeof e=="number"&&Number.isFinite(e)?e:n}function Ep(e,n){return typeof e=="number"&&Number.isFinite(e)&&e>0?e:n}function Nl(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const iS="fleet-console.codex.view-mode",rS="fleet-console.codex.side-width",Tf="route",yl=460,RT=120,Tp=new Set;let Ap=NT(),kp=BT(),sS=!1;function LT(){return H.useSyncExternalStore(Lg,ub,ub)}function MT(e){if(sS=!0,Ap===e){Rp();return}Ap=e,lS(iS,e),Rp()}function DT(){return H.useSyncExternalStore(Lg,db,db)}function aS(){return H.useSyncExternalStore(Lg,hb,hb)}function OT(e){const n=oS(e);kp!==n&&(kp=n,lS(rS,String(n)),Rp())}function Lg(e){return Tp.add(e),()=>{Tp.delete(e)}}function ub(){return Ap}function hb(){return kp}function db(){return sS}function Rp(){for(const e of Tp)e()}function oS(e){return Number.isFinite(e)?Math.max(RT,Math.round(e)):yl}function NT(){if(typeof window>"u")return Tf;try{const e=window.localStorage.getItem(iS);return e==="route"||e==="side"?e:Tf}catch{return Tf}}function BT(){if(typeof window>"u")return yl;try{const e=window.localStorage.getItem(rS);if(e===null)return yl;const n=Number.parseInt(e,10);return Number.isNaN(n)?yl:oS(n)}catch{return yl}}function lS(e,n){if(!(typeof window>"u"))try{window.localStorage.setItem(e,n)}catch{}}const IT=["canonicalCwd","cwd","providerSession","ticket","token","transcriptPath"];class Ge extends Error{status;constructor(n,r){super(r),this.name="ApiError",this.status=n}}async function cS(e){const n=await fetch("/observer/tenants",{signal:e});await Nn(n);const r=await n.json();if(!Array.isArray(r.tenants))throw new Ge(n.status,"Invalid tenants response");return r.tenants.map(a=>XT(a,n.status))}async function jT(e){const n=await fetch("/observer/jobs",{signal:e});return await Nn(n),(await n.json()).tenants}async function zT(e){const n=await fetch("/observer/events",{signal:e});if(await Nn(n),!n.body)throw new Ge(n.status,"Observer stream unavailable");return n.body.getReader()}async function uS(e){const n=await fetch("/observer/theaters",{signal:e});await Nn(n);const r=await n.json();if(!Array.isArray(r.theaters))throw new Ge(n.status,"Invalid Theater response");const a=Array.isArray(r.agentClis)?r.agentClis.map(l=>YT(l,n.status)):[];return{theaters:r.theaters.map(l=>mS(l,n.status)),agentClis:a}}async function $T(e,n){const r=e?`?theaterId=${encodeURIComponent(e)}`:"",a=await fetch(`/observer/status${r}`,{signal:n});return await Nn(a),ZT(await a.json(),a.status)}async function PT(e){const n=await fetch("/update/apply",{method:"POST",signal:e});return await Nn(n),JT(await n.json(),n.status)}async function hS(e,n){const r=await fetch("/observer/theaters",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folderGrantId:e}),signal:n});await Nn(r);const a=await r.json();return mS(a,r.status)}async function fb(e,n,r){const a=await fetch(`/observer/theaters/${encodeURIComponent(e)}/sessions`,{method:"POST",...n?{headers:{"Content-Type":"application/json"},body:JSON.stringify({cliId:n})}:{},signal:r});return await Nn(a),ih(await a.json(),a.status)}async function HT(e,n){const r=await fetch("/terminal/folders/list",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e}),signal:n});return await Nn(r),KT(await r.json(),r.status)}async function dS(e,n){const r=await fetch("/terminal/folders/grants",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e}),signal:n});await Nn(r);const a=await r.json();if(typeof a.folderGrantId!="string")throw new Ge(r.status,"Invalid folder grant response");return a.folderGrantId}async function fS(e,n){const r=await fetch(`/terminal/sessions/${encodeURIComponent(e)}`,{method:"DELETE",signal:n});await Nn(r)}async function pS(e,n){const r=await fetch(`/terminal/sessions/${encodeURIComponent(e)}/resume`,{method:"POST",signal:n});return await Nn(r),ih(await r.json(),r.status)}async function UT(e,n){const r=await fetch(`/observer/theaters/${encodeURIComponent(e)}`,{method:"DELETE",signal:n});await Nn(r)}async function FT(e,n){const r=await fetch(`/terminal/sessions/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({label:n})});return await Nn(r),ih(await r.json(),r.status)}async function qT(e){const n=await fetch("/terminal/sessions",{signal:e});await Nn(n);const r=await n.json();if(!Array.isArray(r.sessions))throw new Ge(n.status,"Invalid terminal sessions response");return r.sessions.map(a=>ih(a,n.status))}async function WT(e,n){const r=GT(n),a=await fetch("/terminal/ticket",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e,...r.kind?{kind:r.kind}:{},...r.theaterId?{theaterId:r.theaterId}:{}}),signal:r.signal});await Nn(a);const l=await a.json();if(typeof l.ticket!="string"||typeof l.ttlMs!="number")throw new Ge(a.status,"Invalid terminal ticket response");return{ticket:l.ticket,ttlMs:l.ttlMs}}function GT(e){return e?e instanceof AbortSignal?{signal:e}:e:{}}function ih(e,n){const r=e;if(!r||typeof r.sessionId!="string"||typeof r.cwdLabel!="string"||typeof r.sequence!="number"||typeof r.status!="string"||typeof r.createdAt!="number"||gS(r))throw new Ge(n,"Invalid terminal session response");return{sessionId:r.sessionId,terminalSessionId:typeof r.terminalSessionId=="string"?r.terminalSessionId:r.sessionId,cwdLabel:r.cwdLabel,sequence:r.sequence,label:typeof r.label=="string"?r.label:void 0,cliId:typeof r.cliId=="string"?r.cliId:void 0,cliLabel:typeof r.cliLabel=="string"?r.cliLabel:void 0,status:r.status,turnState:r.turnState==="running"||r.turnState==="ended"?r.turnState:"none",createdAt:r.createdAt,theaterId:typeof r.theaterId=="string"?r.theaterId:void 0,tenantId:typeof r.tenantId=="string"?r.tenantId:void 0,registrationId:typeof r.registrationId=="string"?r.registrationId:void 0,resumeAvailable:r.resumeAvailable===!0}}function KT(e,n){const r=e;if(!r||typeof r.path!="string"||r.parentPath!==null&&typeof r.parentPath!="string"||!Array.isArray(r.roots)||!r.roots.every(a=>typeof a=="string")||!Array.isArray(r.entries))throw new Ge(n,"Invalid folder list response");return{path:r.path,parentPath:r.parentPath,roots:r.roots,entries:r.entries.map(a=>VT(a,n)),...r.truncated===!0?{truncated:!0}:{}}}function VT(e,n){const r=e;if(!r||typeof r.name!="string"||typeof r.path!="string"||r.kind!=="dir"||typeof r.accessible!="boolean")throw new Ge(n,"Invalid folder list response");return{name:r.name,path:r.path,kind:"dir",accessible:r.accessible}}function YT(e,n){const r=e;if(!r||typeof r.id!="string"||typeof r.label!="string"||typeof r.available!="boolean"||typeof r.signedIn!="boolean")throw new Ge(n,"Invalid Agent CLI metadata response");return{id:r.id,label:r.label,available:r.available,signedIn:r.signedIn}}function XT(e,n){const r=e;if(!r||typeof r.tenantId!="string"||typeof r.tenantLabel!="string"||typeof r.createdAt!="number"||typeof r.sessions!="number"||gS(r))throw new Ge(n,"Invalid tenants response");return{tenantId:r.tenantId,tenantLabel:r.tenantLabel,createdAt:r.createdAt,sessions:r.sessions,status:r.status,cliRunId:typeof r.cliRunId=="string"?r.cliRunId:void 0,registrationId:typeof r.registrationId=="string"?r.registrationId:void 0,theaterId:typeof r.theaterId=="string"?r.theaterId:void 0,terminalSessionId:typeof r.terminalSessionId=="string"?r.terminalSessionId:void 0}}function gS(e){return IT.some(n=>n in e)}function ZT(e,n){const r=e;if(!r||typeof r.workspaces!="number"||typeof r.jobs!="number"||typeof r.version!="string"||r.channel!=="stable"&&r.channel!=="local"&&r.channel!=="unknown"||typeof r.updateAvailable!="boolean"||r.latestVersion!==void 0&&typeof r.latestVersion!="string"||typeof r.port!="number"||r.wikiServerStatus!=="available"&&r.wikiServerStatus!=="unavailable"&&r.wikiServerStatus!=="unknown"||"token"in r||"path"in r||"cwd"in r||"knowledgeRoot"in r)throw new Ge(n,"Invalid observer status response");return{workspaces:r.workspaces,jobs:r.jobs,version:r.version,channel:r.channel,updateAvailable:r.updateAvailable,...r.latestVersion!==void 0?{latestVersion:r.latestVersion}:{},port:r.port,wikiServerStatus:r.wikiServerStatus}}function JT(e,n){const r=e;if(!r||r.status!=="accepted"||"packageName"in r||"packageVersion"in r||"path"in r||"token"in r)throw new Ge(n,"Invalid update apply response");return{status:"accepted"}}function mS(e,n){const r=e;if(!r||typeof r.id!="string"||typeof r.label!="string"||"path"in r||typeof r.createdAt!="string"||typeof r.lastOpenedAt!="string"||typeof r.hasWiki!="boolean"||typeof r.activeAdmiralCount!="number")throw new Ge(n,"Invalid Theater response");return{id:r.id,label:r.label,createdAt:r.createdAt,lastOpenedAt:r.lastOpenedAt,hasWiki:r.hasWiki,activeAdmiralCount:r.activeAdmiralCount}}async function Nn(e){if(e.ok)return;let n=e.statusText;try{n=(await e.json()).error??n}catch{}throw new Ge(e.status,n||`HTTP ${e.status}`)}const pb=120,QT="active",Lp=new Set(["done","error","aborted"]);function eA(e,n){let r=vS(e,n.jobId,n.updatedAt);for(const a of n.events)r=_S(r,a);return Lp.has(n.status)&&!Lp.has(r.status)&&(r={...r,status:n.status}),r}function _S(e,n){if(n.id<=e.lastEventId)return e;const r=n.event,a={...e,updatedAt:n.at,lastEventId:n.id,recentEvents:aA(e.recentEvents,n)};switch(n.type){case"job:registered":return rA(a,r);case"job:finalized":return{...a,status:un(r.status)??"done",finishedAt:ps(r.finishedAt)??n.at,summary:un(r.summary),error:un(r.error)};case"track:begin":return Pa(a,r,l=>({...l,startedAt:ps(r.startedAt)??n.at,requestPreview:un(r.requestPreview)}));case"track:status":return Pa(a,r,l=>({...l,status:un(r.status)??l.status}));case"track:text":return Pa(a,r,l=>({...l,status:"stream",text:l.text+(un(r.text)??""),sentTextLength:l.sentTextLength+(ps(r.textLength)??un(r.text)?.length??0)}));case"track:thought":return Pa(a,r,l=>({...l,thought:l.thought+(un(r.text)??""),sentThoughtLength:l.sentThoughtLength+(ps(r.textLength)??un(r.text)?.length??0)}));case"track:tool":return Pa(a,r,l=>({...l,status:"stream",tools:sA(l.tools,r)}));case"track:finalized":return Pa(a,r,l=>{const f=mb(l.text,l.sentTextLength,un(r.fallbackText),ps(r.fallbackTextLength)),m=mb(l.thought,l.sentThoughtLength,un(r.fallbackThought),ps(r.fallbackThoughtLength));return{...l,status:un(r.status)??"done",finishedAt:ps(r.finishedAt)??n.at,error:un(r.error),text:f.text,sentTextLength:f.sentLength,thought:m.text,sentThoughtLength:m.sentLength}});default:return a}}function vS(e,n,r){return{jobId:n,tenantId:e,status:QT,updatedAt:r,trackOrder:[],tracks:{},lastEventId:0,recentEvents:[]}}function Mg(e){return Lp.has(e)}function tA(e){return e.operationsViewActive?new Set:new Set}function nA(e,n){const r=[],a=[];for(const l of e)n.has(l.sessionId)?a.push(l):r.push(l);return{hidden:r,visible:a}}function gb(e){const n=new Map;for(const r of[...e].sort((a,l)=>l.lastRaisedSeq-a.lastRaisedSeq)){const a=r.theaterId??"__unknown__",l=n.get(a)??{theaterId:r.theaterId,theaterLabel:r.theaterLabel,notifications:[],totalCount:0};l.notifications.push(r),l.totalCount+=r.count,n.set(a,l)}return[...n.values()].sort((r,a)=>{const l=r.notifications[0]?.lastRaisedSeq??0;return(a.notifications[0]?.lastRaisedSeq??0)-l})}function iA(e,n){return n.globalMute||n.dnd?[]:e.filter(r=>!r.theaterId||n.mutedTheaterIds[r.theaterId]!==!0)}function rA(e,n){const r=Array.isArray(n.tracks)?n.tracks:[];let a=e.trackOrder,l=e.tracks;for(const f of r){if(!f.trackId)continue;const m=l[f.trackId],c={...m??bS(f.trackId),displayName:f.displayName??m?.displayName??f.trackId,displayCli:f.displayCli??m?.displayCli,model:f.model??m?.model,effort:f.effort??m?.effort,subtitle:f.subtitle??m?.subtitle,kind:f.kind??m?.kind,startedAt:f.startedAt??m?.startedAt};m||(a=[...a,f.trackId]),l={...l,[f.trackId]:c}}return{...e,label:un(n.label)??e.label,ownerCarrierId:un(n.ownerCarrierId)??e.ownerCarrierId,kind:un(n.kind)??e.kind,startedAt:ps(n.startedAt)??e.startedAt,trackOrder:a,tracks:l}}function Pa(e,n,r){const a=un(n.trackId);if(!a)return e;const l=e.tracks[a],f=r(l??bS(a));return{...e,trackOrder:l?e.trackOrder:[...e.trackOrder,a],tracks:{...e.tracks,[a]:f}}}function bS(e){return{trackId:e,displayName:e,status:"queued",text:"",thought:"",sentTextLength:0,sentThoughtLength:0,tools:[]}}function mb(e,n,r,a){const l=a??r?.length??0;return r!==void 0&&l>e.length?{text:r,sentLength:Math.max(l,n)}:{text:e,sentLength:Math.max(n,l)}}function sA(e,n){const r=un(n.title)??"tool",a=un(n.status)??"",l=un(n.toolCallId),f=l??`${r}#${e.length}`;if(l){const m=e.findIndex(c=>c.key===l);if(m>=0){const c=[...e];return c[m]={key:l,title:r,status:a},c}}return[...e,{key:f,title:r,status:a}]}function aA(e,n){const r=[...e,n];return r.length>pb?r.slice(-pb):r}function un(e){return typeof e=="string"?e:void 0}function ps(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function yS(e){return new Date(e).toLocaleTimeString([],{hour12:!1})}function Ul(e){return e.label?.trim()||`#${e.sequence} Operation`}function oA(e,n){const r=Math.max(0,Math.round((n-e)/1e3)),a=Math.floor(r/60),l=r%60;return a===0?`${l}s`:a<60?`${a}m ${String(l).padStart(2,"0")}s`:`${Math.floor(a/60)}h ${String(a%60).padStart(2,"0")}m`}function Mp(e){return e.length<=14?e:`${e.slice(0,6)}…${e.slice(-6)}`}function lA(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function Dp(e){switch(e){case"active":return"running";case"done":return"done";case"error":return"error";case"aborted":return"aborted";default:return e}}function cA(e){switch(e){case"queued":return"queued";case"conn":return"connecting";case"stream":return"streaming";case"done":return"done";case"err":return"error";case"aborted":return"aborted";default:return e}}function SS(e,n){return e.status==="dormant"?"tenant-beacon is-dormant":n>0?"tenant-beacon is-live":e.turnState==="running"?"tenant-beacon is-turn-running":e.turnState==="ended"?"tenant-beacon is-turn-ended":"tenant-beacon"}function rh(e){switch(e){case"stream":case"active":case"conn":return"live";case"done":return"ok";case"err":case"error":return"bad";default:return"idle"}}function uA(e){if(e.status!=="active")return null;const n=e.trackOrder.map(l=>e.tracks[l]).filter(l=>!!l),r=n.filter(l=>l.status==="stream"||l.status==="conn"),a=r.length>0?r:n;for(let l=a.length-1;l>=0;l--){const f=a[l],m=f?hA(f):null;if(m)return m}return null}function hA(e){return _b(e.text)??_b(e.thought)??e.tools[e.tools.length-1]?.title??null}function _b(e){if(!e)return null;const n=e.split(`
12
- `);for(let r=n.length-1;r>=0;r--){const a=n[r]?.trim();if(a)return a}return null}const dA="__unassigned__";function fA(e){const n=new Map(e.theaters.map(a=>[a.id,a])),r=[];for(const a of e.sessionOrder){const l=e.sessions[a];l&&l.theaterId&&r.push(mA(l,n.get(l.theaterId)))}return r}function pA(e,n){const r=wS(n);return r.length===0?e:e.filter(a=>{const l=_A(a);return r.every(f=>l.includes(f))})}function gA(e){const n=[],r=new Map;for(const a of e){const l=a.theaterId??dA,f=r.get(l);if(f!==void 0){const m=n[f];m&&(n[f]={...m,entries:[...m.entries,a]});continue}r.set(l,n.length),n.push({theaterId:a.theaterId,theaterLabel:a.theaterLabel,entries:[a]})}return n}function wS(e){return e.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean)}function mA(e,n){return{sessionId:e.sessionId,theaterId:e.theaterId??null,theaterLabel:n?.label??e.theaterId??"",operationName:Ul(e),cliLabel:e.cliLabel,status:e.status}}function _A(e){return[e.operationName,e.theaterLabel,e.cliLabel??""].join(" ").toLocaleLowerCase()}const vA="fleet-console.canvas.shell.",bA=400,vb=560,bb=360,Op=new Set;let ei={},Js=null,Qs=null,Ss=null;function yA(){return H.useSyncExternalStore(CS,wb,wb)}function SA(){return H.useSyncExternalStore(CS,yb,yb)}function yb(){return Js}function $u(e){Js!==e&&(Js=e,co())}function wA(e,n){const r=LA();return ei={...ei,[r]:{theaterId:e,geometry:n}},Dg(),co(),r}function Af(e,n){const r=ei[e];r&&(ei={...ei,[e]:{...r,geometry:n}},Dg(),co())}function Sb(e){if(!(e in ei))return;const n={...ei};delete n[e],ei=n,Js===e&&(Js=null),Dg(),co()}function CA(e){EA(),Qs=e,ei=e?TA(e):{},Js=null,Q5(RA(ei)),co()}function xA(e){if(typeof window<"u")try{window.sessionStorage.removeItem(Og(e))}catch{}Qs===e&&(xS(),Qs=null,ei={},Js=null,co())}function CS(e){return Op.add(e),()=>{Op.delete(e)}}function wb(){return ei}function co(){for(const e of Op)e()}function Dg(){!Qs||typeof window>"u"||(xS(),Ss=window.setTimeout(()=>{Ss=null,ES(Qs,ei)},bA))}function EA(){!Ss||!Qs||typeof window>"u"||(window.clearTimeout(Ss),Ss=null,ES(Qs,ei))}function xS(){!Ss||typeof window>"u"||(window.clearTimeout(Ss),Ss=null)}function TA(e){if(typeof window>"u")return{};try{const n=window.sessionStorage.getItem(Og(e));return n?AA(JSON.parse(n),e):{}}catch{return{}}}function ES(e,n){if(!(!e||typeof window>"u"))try{window.sessionStorage.setItem(Og(e),JSON.stringify({panels:n}))}catch{}}function Og(e){return`${vA}${e}`}function AA(e,n){if(!Au(e)||!Au(e.panels))return{};const r={};for(const[a,l]of Object.entries(e.panels))!a.startsWith("shell:")||!Au(l)||l.theaterId===n&&(r[a]={theaterId:n,geometry:kA(l.geometry)});return r}function kA(e){return Au(e)?{x:kf(e.x,0),y:kf(e.y,0),width:Cb(e.width,vb),height:Cb(e.height,bb),zIndex:kf(e.zIndex,0)}:{x:0,y:0,width:vb,height:bb,zIndex:0}}function RA(e){return Math.max(0,...Object.values(e).map(n=>n.geometry.zIndex))}function kf(e,n){return typeof e=="number"&&Number.isFinite(e)?e:n}function Cb(e,n){return typeof e=="number"&&Number.isFinite(e)&&e>0?e:n}function Au(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function LA(){return`shell:${typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}`}const Pi={version:"1.10.0",date:"2026-06-21",sections:[{heading:"Added",items:["Settings now lists the console's backend HTTP API catalog in a collapsible card, populated dynamically from backend introspection so newly added routes appear automatically.","The collapsed Alerts dock now plays a one-shot outline pulse when a new alert arrives, giving peripheral feedback without expanding the dock; the pulse color follows the alert state (amber for awaiting, emerald for completed) and adapts to the active theme.","Canvas-mode operations now raise Alerts even when their panel is not minimized, so a visible canvas panel no longer suppresses its own alert.","carrier_dispatch now accepts an optional absolute `cwd` argument so a delegated carrier's CLI spawns at a specified working directory (such as a git worktree) instead of always the host session directory."]},{heading:"Changed",items:["The root path `/` and unknown paths now redirect to `/operations`.",'The console version is now shown beneath the top-bar "Research Preview" label.',"The commissioning guide now auto-appears only on the first visit.","The Alerts notification dock now collapses on outside clicks, Escape, and when navigating to a different Operation.","Settings is now a two-pane master-detail layout with Model Sign-in grouped under Agent CLI and the Backend API section expanded by default.","The backend API catalog descriptions shown in the Settings page are now in English."]},{heading:"Removed",items:["Remove the Welcome dashboard page; Operations is now the sole entry surface.","Remove the Operation and Codex navigation items from the global navigation bar; Codex is now reached only through the right-edge Side handle.","Remove the Research Preview indicator dot from the top bar.","Remove the Helm (classic) Operations mode and the Map/Helm view toggle; the Operations view is now the single Map canvas.","Remove the Operations left sidebars (the classic fixed session list and the Map floating session list).","Remove the global navigation Shell button, its overlay, and the local-shell keyboard shortcut. The in-canvas shell panel remains available."]}]},Np=200,Bp="fleet-console.activeTheaterId",TS="fleet-console.activeTheme",AS="fleet-console.terminalRenderer",kS="fleet-console.commissioningSeen",RS="fleet-console.whatsNewSeenVersion",LS="fleet-console.notificationPreferences",MS=1,Rf="maritime",Lf="webgl",su={globalMute:!1,dnd:!1,mutedTheaterIds:{}},Ip=new Set;let jp=null,be={connection:"connecting",connectionError:null,activeTheme:KS(),terminalRenderer:IA(),version:"",updateAvailable:!1,latestVersion:null,tenants:[],theaters:[],agentClis:[],activeTheaterId:null,addingTheater:!1,theaterError:null,sessions:{},sessionOrder:[],activeTerminalSessionId:null,operationsViewActive:!1,creatingTerminalSession:!1,terminalSessionError:null,tenantJobs:{},tenantOrder:[],timelineOpen:!1,operationSearchOpen:!1,shortcutsOpen:!1,whatsNewOpen:!1,onboardingOpen:!1,bootstrapped:!1,terminalSessionsHydrated:!1,pendingOperationFocus:null,selectedJobId:null,operationNotifications:{},notificationPreferences:ck()},xb=0;function Eb(){return be}function MA(e){return Ip.add(e),()=>{Ip.delete(e)}}function He(e){be={...be,...e},VS()}function DA(e){be.operationsViewActive!==e&&He({operationsViewActive:e})}function OA(){DS(KS())}function NA(e){dk(e),DS(e),He({activeTheme:e})}function BA(e){fk(e),He({terminalRenderer:e})}function IA(){if(typeof window>"u")return Lf;try{const e=window.localStorage.getItem(AS);return e==="webgl"||e==="dom"?e:Lf}catch{return Lf}}function jA(e){const n=Pi!==null&&Pi.version===e.version&&hk()!==e.version;He({version:e.version,updateAvailable:e.updateAvailable,latestVersion:e.latestVersion??null,whatsNewOpen:n?!0:be.whatsNewOpen})}function DS(e){if(!(typeof document>"u")){if(e==="maritime"){document.documentElement.removeAttribute("data-theme");return}document.documentElement.setAttribute("data-theme",e)}}function zA(e){const n={};for(const l of e)n[l.sessionId]=ah(l);const r=[...e].sort((l,f)=>f.createdAt-l.createdAt).map(l=>l.sessionId),a=WS(n,be.tenants);He({sessions:a,sessionOrder:r,activeTerminalSessionId:ws(be.activeTheaterId,a,r,be.activeTerminalSessionId),terminalSessionsHydrated:!0})}function OS(e){const n=GS(e.theaters,be.activeTheaterId);He({theaters:e.theaters,agentClis:e.agentClis,activeTheaterId:n,activeTerminalSessionId:ws(n,be.sessions,be.sessionOrder,be.activeTerminalSessionId),selectedJobId:null})}function $A(e){lh(e),He({activeTheaterId:e,activeTerminalSessionId:ws(e,be.sessions,be.sessionOrder,null),selectedJobId:null})}function NS(){He({addingTheater:!0,theaterError:null})}function BS(e){const n=[e,...be.theaters.filter(r=>r.id!==e.id)];lh(e.id),He({theaters:n,activeTheaterId:e.id,addingTheater:!1,theaterError:null,activeTerminalSessionId:ws(e.id,be.sessions,be.sessionOrder,null),selectedJobId:null})}function PA(){He({addingTheater:!1,theaterError:null})}function zp(e){He({addingTheater:!1,theaterError:e})}function Hi(e){He({activeTerminalSessionId:e,selectedJobId:null,operationNotifications:e?oh(be.operationNotifications,e):be.operationNotifications})}function Ng(e){const n=be.sessions[e];n&&(lh(n.theaterId??null),He({activeTheaterId:n.theaterId??null,activeTerminalSessionId:e,selectedJobId:null,pendingOperationFocus:e,operationNotifications:oh(be.operationNotifications,e)}))}function Tb(){be.pendingOperationFocus!==null&&He({pendingOperationFocus:null})}function HA(e,n,r){if(e.length===0)return null;const a=n?e.indexOf(n):-1,l=a===-1?r>0?0:e.length-1:(a+r+e.length)%e.length;return e[l]??null}function Mf(){He({operationSearchOpen:!1})}function UA(){He({operationSearchOpen:!be.operationSearchOpen})}function Ab(){He({creatingTerminalSession:!0,terminalSessionError:null})}function kb(e){const n=ah(e);He({sessions:{...be.sessions,[n.sessionId]:n},sessionOrder:[n.sessionId,...be.sessionOrder.filter(r=>r!==n.sessionId)],activeTerminalSessionId:!be.activeTheaterId||Hu(n,be.activeTheaterId)?n.sessionId:be.activeTerminalSessionId,creatingTerminalSession:!1,terminalSessionError:null,selectedJobId:null})}function sh(e){const n=be.sessions[e.sessionId],r=ah({...n??{},...e}),a=!!n,l={...be.sessions,[r.sessionId]:r},f=a?be.sessionOrder:[r.sessionId,...be.sessionOrder.filter(c=>c!==r.sessionId)],m=n?sk(be.operationNotifications,n,r):be.operationNotifications;He({sessions:l,sessionOrder:f,activeTerminalSessionId:ws(be.activeTheaterId,l,f,be.activeTerminalSessionId),operationNotifications:m})}function FA(e,n){const r=be.sessions[e.sessionId]??ah(e);n==="idle_prompt"&&qS(r)||He({operationNotifications:FS(be.operationNotifications,US("input-waiting",r))})}function qA(e){const n={...be.notificationPreferences,globalMute:e};Ig(n),He({notificationPreferences:n})}function WA(e){const n={...be.notificationPreferences,dnd:e};Ig(n),He({notificationPreferences:n})}function GA(e){const n={...be.notificationPreferences.mutedTheaterIds};n[e]?delete n[e]:n[e]=!0;const r={...be.notificationPreferences,mutedTheaterIds:n};Ig(r),He({notificationPreferences:r})}function Rb(e){He({creatingTerminalSession:!1,terminalSessionError:e})}function KA(){He({timelineOpen:!be.timelineOpen})}function VA(){be.shortcutsOpen||He({shortcutsOpen:!0})}function Df(){be.shortcutsOpen&&He({shortcutsOpen:!1})}function YA(){Pi===null||be.whatsNewOpen||He({whatsNewOpen:!0})}function au(){be.whatsNewOpen&&(be.version&&gk(be.version),He({whatsNewOpen:!1}))}function cl(){pk(!0),be.onboardingOpen&&He({onboardingOpen:!1})}function Lb(){if(be.bootstrapped)return;const e=be.theaters.length===0&&!uk();He({bootstrapped:!0,onboardingOpen:e?!0:be.onboardingOpen})}function IS(e){He({terminalSessionError:e})}function jS(e){He({terminalSessionError:e})}function XA(e){He({terminalSessionError:e})}function Mb(e){xA(e);const n=be.theaters.filter(m=>m.id!==e),r={},a=[];for(const m of be.sessionOrder){const c=be.sessions[m];!c||c.theaterId===e||(r[m]=c,a.push(m))}const l=GS(n,be.activeTheaterId===e?null:be.activeTheaterId),f=ak(be.operationNotifications,e);lh(l),He({theaters:n,sessions:r,sessionOrder:a,activeTheaterId:l,activeTerminalSessionId:ws(l,r,a,be.activeTerminalSessionId),selectedJobId:null,operationNotifications:f})}function zS(e){if(!be.sessions[e])return;const n={...be.sessions};delete n[e];const r=be.sessionOrder.filter(l=>l!==e),a=be.activeTerminalSessionId===e;He({sessions:n,sessionOrder:r,activeTerminalSessionId:a?ws(be.activeTheaterId,n,r,null):be.activeTerminalSessionId,selectedJobId:a?null:be.selectedJobId,operationNotifications:oh(be.operationNotifications,e)})}function $S(e){He({selectedJobId:be.selectedJobId===e?null:e})}function Of(){He({selectedJobId:null})}function PS(e){const n=new Set(e.map(l=>l.tenantId)),r=WS(be.sessions,e),a=[...e.map(l=>l.tenantId),...be.tenantOrder.filter(l=>!n.has(l)&&be.tenantJobs[l])];He({tenants:e,sessions:r,tenantOrder:a,activeTerminalSessionId:ws(be.activeTheaterId,r,be.sessionOrder,be.activeTerminalSessionId)})}function ZA(e){const n={},r=[];for(const l of e){const f={};for(const c of l.jobs)f[c.jobId]=eA(l.tenantId,c);const m=Object.values(f).sort((c,u)=>(c.startedAt??c.updatedAt)-(u.startedAt??u.updatedAt)).map(c=>c.jobId);n[l.tenantId]={tenantId:l.tenantId,tenantLabel:l.tenantLabel,jobOrder:m,jobs:f,truncation:l.truncation},r.push(l.tenantId)}const a=[...be.tenantOrder.filter(l=>n[l]),...r.filter(l=>!be.tenantOrder.includes(l))];He({tenantJobs:n,tenantOrder:a.length>0?a:r})}function JA(e,n){const r=be.tenantJobs[e.tenantId],a=!r&&!be.tenants.some(c=>c.tenantId===e.tenantId),l=r??{tenantId:e.tenantId,tenantLabel:n,jobOrder:[],jobs:{},truncation:{droppedCount:0}};let f=n&&l.tenantLabel!==n?{...l,tenantLabel:n}:l;if(e.jobId){const c=f.jobs[e.jobId],u=_S(c??vS(e.tenantId,e.jobId,e.at),e),h=c?f.jobOrder:[...f.jobOrder,e.jobId];f={...f,jobs:mk({...f.jobs,[e.jobId]:u},h),jobOrder:h.slice(-Np)}}const m={...be.tenantJobs,[e.tenantId]:f};return be={...be,connection:"live",connectionError:null,tenantJobs:m,tenantOrder:be.tenantOrder.includes(e.tenantId)?be.tenantOrder:[...be.tenantOrder,e.tenantId]},VS(),{unknownTenant:a}}function QA(e,n,r){const a=be.tenantJobs[e]??{tenantId:e,tenantLabel:n,jobOrder:[],jobs:{},truncation:{droppedCount:0}};He({tenantJobs:{...be.tenantJobs,[e]:{...a,truncation:r}},tenantOrder:be.tenantOrder.includes(e)?be.tenantOrder:[...be.tenantOrder,e]})}function ek(e){if(!e.selectedJobId||e.activeTheaterId&&e.activeTerminalSessionId&&!Pu(e).includes(e.activeTerminalSessionId))return null;const n=tk(e);return n?e.tenantJobs[n]?.jobs[e.selectedJobId]??null:null}function tk(e){return e.activeTerminalSessionId?Bg(e.sessions[e.activeTerminalSessionId]):null}function nk(e){return Pu(e).map(n=>e.sessions[n]).filter(n=>!!n)}function Pu(e){return e.activeTheaterId?e.sessionOrder.filter(n=>Hu(e.sessions[n],e.activeTheaterId)):[]}function ik(e){return fA(e)}function HS(e,n){const r=Bg(n);if(!r)return[];const a=e.tenantJobs[r];if(!a)return[];const l=[];for(const f of a.jobOrder){const m=a.jobs[f];m&&l.push({job:m,tenant:a})}return l}function Bg(e){return e?.tenantId??e?.sessionId??null}function ah(e){return{...e,terminalSessionId:e.terminalSessionId??e.sessionId,status:e.status==="starting"&&e.tenantId?"registered":e.status,turnState:e.turnState??"none",resumeAvailable:e.resumeAvailable===!0}}function rk(e){return e?be.theaters.find(n=>n.id===e)?.label??e:"—"}function US(e,n){return xb+=1,{kind:e,sessionId:n.sessionId,theaterId:n.theaterId??null,theaterLabel:rk(n.theaterId),operationLabel:Ul(n),count:1,lastRaisedSeq:xb}}function sk(e,n,r){return n.turnState!=="running"&&r.turnState==="running"?oh(e,r.sessionId):n.turnState!=="ended"&&r.turnState==="ended"&&!qS(r)?FS(e,US("ended",r)):e}function FS(e,n){const r=e[n.sessionId];return{...e,[n.sessionId]:{...n,count:r?.kind==="input-waiting"&&n.kind==="input-waiting"?r.count+1:1}}}function oh(e,n){if(!e[n])return e;const r={...e};return delete r[n],r}function ak(e,n){let r=!1;const a={};for(const[l,f]of Object.entries(e)){if(f.theaterId===n){r=!0;continue}a[l]=f}return r?a:e}function qS(e){const n=Bg(e);return n?ok(be.tenantJobs[n]):!1}function ok(e){return e?e.jobOrder.some(n=>{const r=e.jobs[n];return r?!r.finishedAt&&!Mg(r.status):!1}):!1}function WS(e,n){const r={...e};for(const a of n){if(!a.terminalSessionId)continue;const l=r[a.terminalSessionId];l&&(r[a.terminalSessionId]={...l,status:a.status==="closed"?"closed":a.status==="dormant"?"dormant":"registered",tenantId:a.tenantId,registrationId:a.registrationId,theaterId:a.theaterId??l.theaterId})}return r}function GS(e,n){const r=new Set(e.map(l=>l.id)),a=lk();return a&&r.has(a)?a:n&&r.has(n)?n:e[0]?.id??null}function ws(e,n,r,a){return e?a&&Hu(n[a],e)&&ou(n[a])?a:r.find(l=>Hu(n[l],e)&&ou(n[l]))??null:a&&n[a]&&ou(n[a])?a:r.find(l=>ou(n[l]))??null}function Hu(e,n){return!e||!n?!1:e.theaterId===n}function ou(e){return!!(e&&e.status!=="dormant")}function lk(){if(typeof window>"u")return null;try{return window.localStorage.getItem(Bp)}catch{return null}}function lh(e){if(!(typeof window>"u"))try{e?window.localStorage.setItem(Bp,e):window.localStorage.removeItem(Bp)}catch{}}function KS(){if(typeof window>"u")return Rf;try{const e=window.localStorage.getItem(TS);return e==="maritime"||e==="carbon"?e:Rf}catch{return Rf}}function ck(){if(typeof window>"u")return su;try{const e=window.localStorage.getItem(LS);if(!e)return su;const n=JSON.parse(e);return _k(n)?{globalMute:n.preferences.globalMute,dnd:n.preferences.dnd,mutedTheaterIds:n.preferences.mutedTheaterIds}:su}catch{return su}}function uk(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(kS)==="1"}catch{return!1}}function hk(){if(jp!==null)return jp;if(typeof window>"u")return null;try{return window.localStorage.getItem(RS)}catch{return null}}function dk(e){if(!(typeof window>"u"))try{window.localStorage.setItem(TS,e)}catch{}}function fk(e){if(!(typeof window>"u"))try{window.localStorage.setItem(AS,e)}catch{}}function Ig(e){if(!(typeof window>"u"))try{window.localStorage.setItem(LS,JSON.stringify({version:MS,preferences:e}))}catch{}}function pk(e){if(!(typeof window>"u"))try{window.localStorage.setItem(kS,e?"1":"0")}catch{}}function gk(e){if(jp=e,!(typeof window>"u"))try{window.localStorage.setItem(RS,e)}catch{}}function mk(e,n){if(n.length<=Np)return e;const r=new Set(n.slice(-Np)),a={};for(const l of Object.keys(e))r.has(l)&&(a[l]=e[l]);return a}function _k(e){if(!e||typeof e!="object")return!1;const n=e;if(n.version!==MS||!n.preferences||typeof n.preferences.globalMute!="boolean"||typeof n.preferences.dnd!="boolean")return!1;const r=n.preferences.mutedTheaterIds;return!!r&&typeof r=="object"&&!Array.isArray(r)}function VS(){for(const e of Ip)e()}const lu="directory-browser-sectors";function YS({open:e,onCancel:n,onConfirm:r}){const[a,l]=H.useState(null),[f,m]=H.useState(null),[c,u]=H.useState(null),[h,y]=H.useState(""),[g,C]=H.useState(0),E=H.useRef(null),A=H.useRef(null),T=async(O,U)=>{m(O),u(null),y(""),C(0);try{const F=await HT(O,U);l(F)}catch(F){if(F instanceof DOMException&&F.name==="AbortError")return;u(F instanceof Ge?F.message:String(F))}finally{m(null)}};H.useEffect(()=>{if(!e)return;const O=new AbortController;return T(null,O.signal),()=>O.abort()},[e]),H.useEffect(()=>{e&&E.current?.focus()},[e,a?.path]);const p=a?.entries??[],v=H.useMemo(()=>{const O=h.trim().toLowerCase();return O===""?p:p.filter(U=>U.name.toLowerCase().includes(O))},[p,h]),d=H.useMemo(()=>a?vk(a):[],[a]),b=v.length===0?-1:Math.min(g,v.length-1);if(H.useEffect(()=>{if(b<0)return;A.current?.querySelector(`[data-index="${b}"]`)?.scrollIntoView({block:"nearest"})},[b,a?.path]),!e)return null;const x=O=>{O.accessible&&f===null&&T(O.path)},L=()=>{a?.parentPath!=null&&f===null&&T(a.parentPath)},R=a?.path??null,M=b>=0?`${lu}-${b}`:void 0,k=O=>{switch(O.key){case"Escape":h!==""?y(""):n();return;case"ArrowDown":O.preventDefault(),C(U=>Math.min(U+1,Math.max(v.length-1,0)));return;case"ArrowUp":O.preventDefault(),C(U=>Math.max(U-1,0));return;case"Enter":{O.preventDefault();const U=v[b];U&&x(U);return}case"Backspace":h===""&&(O.preventDefault(),L());return;default:return}};return P5.createPortal(S.jsxs("div",{className:"directory-browser-overlay",role:"presentation",children:[S.jsx("button",{type:"button",className:"directory-browser-scrim","aria-label":"Close",onClick:n}),S.jsxs("section",{className:"directory-browser-card",role:"dialog","aria-modal":"true","aria-label":"Establish Theater of Operations",onKeyDown:k,children:[S.jsxs("header",{className:"directory-browser-header",children:[S.jsx("span",{className:"directory-browser-sigil","aria-hidden":"true",children:S.jsx(yk,{})}),S.jsxs("div",{className:"directory-browser-heading",children:[S.jsx("span",{className:"directory-browser-kicker",children:"Theater of Operations"}),S.jsx("h2",{children:"Establish Theater"})]}),S.jsx("button",{type:"button",className:"directory-browser-close",onClick:n,"aria-label":"Close",children:"×"})]}),S.jsx("nav",{className:"directory-browser-course","aria-label":"Path",children:d.map((O,U)=>{const F=U===d.length-1;return S.jsxs("span",{className:"directory-browser-course-seg",children:[U>0?S.jsx("span",{className:"directory-browser-course-sep","aria-hidden":"true",children:"›"}):null,S.jsx("button",{type:"button",className:`directory-browser-crumb ${F?"is-current":""}`,"aria-current":F?"location":void 0,disabled:F||f!==null,title:O.path,onClick:()=>{T(O.path)},children:O.label})]},O.path)})}),S.jsxs("div",{className:"directory-browser-toolbar",children:[S.jsxs("div",{className:"directory-browser-filter",children:[S.jsx("span",{className:"directory-browser-filter-glyph","aria-hidden":"true",children:S.jsx(wk,{})}),S.jsx("input",{ref:E,type:"text",className:"directory-browser-filter-input",placeholder:"Filter sectors…","aria-label":"Filter folders","aria-controls":lu,value:h,spellCheck:!1,autoComplete:"off",onChange:O=>{y(O.target.value),C(0)}})]}),S.jsxs("button",{type:"button",className:"directory-browser-up",disabled:a?.parentPath==null||f!==null,title:"Up one sector (Backspace)",onClick:L,children:[S.jsx(Ck,{}),S.jsx("span",{children:"Up"})]})]}),c?S.jsx("p",{className:"directory-browser-error",role:"alert",children:c}):null,S.jsx("div",{className:"directory-browser-list",id:lu,role:"listbox","aria-label":"Folders","aria-busy":f!==null,"aria-activedescendant":M,ref:A,children:f!==null?S.jsxs("p",{className:"directory-browser-state is-live",children:[S.jsx("span",{className:"directory-browser-scan-dot","aria-hidden":"true"}),"Scouting…"]}):v.length===0?S.jsx("p",{className:"directory-browser-state",children:h!==""?"No sectors match the filter.":"No sectors to advance into."}):v.map((O,U)=>S.jsxs("div",{id:`${lu}-${U}`,"data-index":U,role:"option","aria-selected":U===b,"aria-disabled":!O.accessible,className:`directory-browser-sector ${U===b?"is-active":""} ${O.accessible?"":"is-locked"}`,title:O.path,onClick:()=>{C(U),x(O)},children:[S.jsx("span",{className:"directory-browser-sector-glyph","aria-hidden":"true",children:S.jsx(Sk,{})}),S.jsx("span",{className:"directory-browser-sector-name",children:O.name}),O.accessible?S.jsx("span",{className:"directory-browser-sector-advance","aria-hidden":"true",children:"›"}):S.jsxs("span",{className:"directory-browser-sector-lock",children:[S.jsx(xk,{})," Locked"]})]},O.path))}),a?.truncated?S.jsx("p",{className:"directory-browser-note",children:"Charting first 500 sectors only."}):null,S.jsxs("footer",{className:"directory-browser-actions",children:[S.jsxs("div",{className:"directory-browser-target",children:[S.jsx("span",{className:"directory-browser-target-label",children:"Theater Root"}),S.jsx("span",{className:"directory-browser-target-path",title:R??"",children:R??"Scouting…"})]}),S.jsxs("div",{className:"directory-browser-buttons",children:[S.jsx("button",{type:"button",className:"directory-browser-button",onClick:n,children:"Cancel"}),S.jsx("button",{type:"button",className:"directory-browser-button is-primary",disabled:R===null||f!==null,onClick:()=>R&&r(R),children:"Establish Theater"})]})]})]})]}),document.body)}function vk(e){if(bk(e)==="/"){const m=[{label:"/",path:"/"}];let c="";for(const u of e.path.split("/").filter(Boolean))c+=`/${u}`,m.push({label:u,path:c});return m}const r=/^([A-Za-z]:)\\?/.exec(e.path),a=r?`${r[1]}\\`:e.roots[0]??"C:\\",l=[{label:a,path:a}];let f=a.replace(/\\$/,"");for(const m of e.path.slice(a.length).split("\\").filter(Boolean))f+=`\\${m}`,l.push({label:m,path:f});return l}function bk(e){return e.roots.some(n=>/^[A-Za-z]:\\$/.test(n))||/^[A-Za-z]:\\/.test(e.path)?"\\":"/"}function yk(){return S.jsxs("svg",{viewBox:"0 0 20 20","aria-hidden":"true",children:[S.jsx("circle",{cx:"10",cy:"10",r:"6.6",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),S.jsx("circle",{cx:"10",cy:"10",r:"2.1",fill:"currentColor"}),S.jsx("path",{d:"M10 1.6v3.2M10 15.2v3.2M1.6 10h3.2M15.2 10h3.2",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}function Sk(){return S.jsx("svg",{viewBox:"0 0 18 18","aria-hidden":"true",children:S.jsx("path",{d:"M2.4 5.2c0-.7.6-1.3 1.3-1.3h2.7l1.4 1.5h6.5c.7 0 1.3.6 1.3 1.3v6.4c0 .7-.6 1.3-1.3 1.3H3.7c-.7 0-1.3-.6-1.3-1.3z",fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinejoin:"round"})})}function wk(){return S.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[S.jsx("circle",{cx:"7",cy:"7",r:"4.2",fill:"none",stroke:"currentColor",strokeWidth:"1.3"}),S.jsx("path",{d:"M10.2 10.2 13.5 13.5",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]})}function Ck(){return S.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:S.jsx("path",{d:"M8 12.5V4M4.5 7.5 8 4l3.5 3.5",fill:"none",stroke:"currentColor",strokeWidth:"1.35",strokeLinecap:"round",strokeLinejoin:"round"})})}function xk(){return S.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[S.jsx("rect",{x:"3.6",y:"7",width:"8.8",height:"6.2",rx:"1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),S.jsx("path",{d:"M5.6 7V5.4a2.4 2.4 0 0 1 4.8 0V7",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}const Ek=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(",");function Tk({state:e}){const[n,r]=H.useState(!1),a=H.useRef(null),l=H.useRef(null),f=H.useRef(null),m=e.theaters.length>0;if(H.useEffect(()=>{if(e.onboardingOpen)return a.current=document.activeElement,l.current?.focus(),()=>{const y=a.current;a.current=null,y?.focus?.()}},[e.onboardingOpen]),H.useEffect(()=>{if(!e.onboardingOpen)return;const y=g=>{n||(g.key==="Escape"?(g.preventDefault(),cl()):g.key==="Tab"&&Ak(g,f.current),g.stopImmediatePropagation())};return window.addEventListener("keydown",y,!0),()=>window.removeEventListener("keydown",y,!0)},[n,e.onboardingOpen]),!e.onboardingOpen)return null;const c=()=>{r(!0)},u=()=>{r(!1)},h=async y=>{r(!1),NS();try{const g=await dS(y),C=await hS(g);BS(C)}catch(g){zp(g instanceof Error?g.message:String(g))}};return S.jsxs("div",{className:"commissioning-overlay",role:"dialog","aria-modal":"true","aria-labelledby":"commissioning-title",children:[S.jsx("button",{type:"button",className:"commissioning-scrim",onClick:cl,"aria-label":"Close Commissioning guide"}),S.jsxs("section",{className:"commissioning-card",ref:f,children:[S.jsxs("header",{className:"commissioning-header",children:[S.jsx("span",{className:"commissioning-eyebrow",children:"COMMISSIONING · FLEET CONSOLE"}),S.jsx("h2",{id:"commissioning-title",children:"Bring your fleet online"}),S.jsx("p",{children:"Three steps to go from an empty bridge to live carrier operations."})]}),S.jsxs("ol",{className:"commissioning-steps",children:[S.jsxs("li",{className:`commissioning-step commissioning-step--primary ${m?"is-complete":"is-current"}`,children:[S.jsx("span",{className:"commissioning-step-node","aria-hidden":"true",children:m?"✓":"01"}),S.jsxs("div",{className:"commissioning-step-body",children:[S.jsx("h3",{children:"Register a Theater"}),S.jsx("p",{children:"A Theater is a project directory the fleet operates in. Choose the folder you want to work from."}),m?S.jsx(Dl,{ref:y=>{l.current=y},className:"commissioning-primary-action",to:"/operations",onClick:cl,children:"Go to Operations →"}):S.jsx("button",{ref:y=>{l.current=y},type:"button",className:"commissioning-primary-action is-live",disabled:e.addingTheater,onClick:c,children:e.addingTheater?"Adding Theater…":"Choose a folder…"}),e.theaterError?S.jsx("p",{className:"commissioning-error",role:"alert",children:e.theaterError}):null]})]}),S.jsxs("li",{className:"commissioning-step",children:[S.jsx("span",{className:"commissioning-step-node","aria-hidden":"true",children:"02"}),S.jsxs("div",{className:"commissioning-step-body",children:[S.jsx("h3",{children:"Open an Operation"}),S.jsx("p",{children:"An Operation is a live terminal session running an Agent CLI. Start one from the Operations tab to begin a working session."}),S.jsx(Dl,{className:"commissioning-secondary-link",to:"/operations",onClick:cl,children:"Go to Operations"})]})]}),S.jsxs("li",{className:"commissioning-step",children:[S.jsx("span",{className:"commissioning-step-node","aria-hidden":"true",children:"03"}),S.jsxs("div",{className:"commissioning-step-body",children:[S.jsx("h3",{children:"Observe carriers"}),S.jsx("p",{children:"Carriers are specialist agents your Admiral dispatches. Their sorties stream here in real time as they run."})]})]})]}),S.jsxs("footer",{className:"commissioning-footer",children:[S.jsx("p",{children:"Theaters with a Fleet Wiki knowledge root also unlock Codex — your decision log and reference library."}),S.jsx("button",{type:"button",className:"commissioning-skip",onClick:cl,children:"Skip for now"})]})]}),S.jsx(YS,{open:n,onCancel:u,onConfirm:h})]})}function Ak(e,n){if(!n)return;const r=Array.from(n.querySelectorAll(Ek)),a=r[0],l=r[r.length-1];!a||!l||(e.shiftKey&&document.activeElement===a?(e.preventDefault(),l.focus()):!e.shiftKey&&document.activeElement===l&&(e.preventDefault(),a.focus()))}function Fl(){return H.useSyncExternalStore(MA,Eb,Eb)}const kk={ended:"Stood down","input-waiting":"Awaiting orders"},XS="fleet-console.notificationsDockOpen",Nf=!1;function Rk(){const e=Fl(),n=Pl(),[r,a]=H.useState(Lk),[l,f]=H.useState(!1),m=H.useRef(null),c=H.useRef(null),u=H.useMemo(()=>Object.values(e.operationNotifications),[e.operationNotifications]),h=tA(e),y=nA(u,h).hidden,g=iA(y,e.notificationPreferences),C=gb(g),E=gb(y),A=C.reduce((O,U)=>O+U.totalCount,0),T=Db(C,"input-waiting"),p=Db(C,"ended");Dk(e.notificationPreferences);const v=C.length===0,d=v?"muted":T>0?"awaiting":"ended",b=H.useMemo(()=>g.reduce((O,U)=>Math.max(O,U.lastRaisedSeq),0),[g]),x=H.useRef(b),[L,R]=H.useState(0),M=H.useCallback(O=>{a(O),Mk(O)},[]);H.useEffect(()=>{b>x.current&&!r&&R(O=>O+1),x.current=b},[b,r]),H.useEffect(()=>{if(!r)return;const O=U=>{const F=U.target;if(!(F instanceof Node)){M(!1);return}c.current?.contains(F)||m.current?.contains(F)||M(!1)};return document.addEventListener("pointerdown",O),()=>{document.removeEventListener("pointerdown",O)}},[r,M]);const k=O=>{Ng(O.sessionId),n("/operations"),M(!1)};return r?S.jsx("div",{className:"notification-dock-layer",children:S.jsxs("aside",{ref:c,className:`notification-dock ${d==="awaiting"?"has-awaiting":""}`,"aria-live":"polite","aria-label":"Operation notifications",children:[S.jsxs("header",{className:"notification-dock-head",children:[S.jsx("span",{className:"notification-dock-eyebrow",children:"Notifications"}),v?null:S.jsxs("span",{className:"notification-dock-tallies","aria-hidden":"true",children:[T>0?S.jsx("span",{className:"notification-tally is-input-waiting",children:T}):null,p>0?S.jsx("span",{className:"notification-tally is-ended",children:p}):null]}),S.jsx("button",{type:"button",className:"notification-dock-icon",onClick:()=>f(!l),"aria-expanded":l,"aria-label":"Notification settings",title:"Notification settings",children:S.jsx(Bk,{})}),S.jsx("button",{type:"button",className:"notification-dock-icon",onClick:()=>M(!1),"aria-label":"Close notifications",title:"Close",children:S.jsx(Ik,{})})]}),l?S.jsx(Ok,{groups:E}):null,v?S.jsx("p",{className:"notification-dock-empty",children:"No active alerts"}):S.jsx("div",{className:"notification-dock-deck",children:C.map(O=>S.jsxs("section",{className:"notification-cluster-group",children:[S.jsxs("header",{className:"notification-cluster-group-head",children:[S.jsx("span",{className:"notification-cluster-theater",children:O.theaterLabel}),S.jsx("span",{className:"notification-cluster-group-count",children:O.totalCount})]}),S.jsx("ul",{className:"notification-cluster-roster",children:O.notifications.map(U=>S.jsxs("li",{className:`notification-row is-${U.kind}`,children:[S.jsx("span",{className:"notification-row-beacon","aria-hidden":"true"}),S.jsxs("span",{className:"notification-row-body",children:[S.jsx("span",{className:"notification-row-op",children:U.operationLabel}),S.jsx("span",{className:"notification-row-state",children:kk[U.kind]})]}),U.count>1?S.jsx("span",{className:"notification-row-count",children:U.count}):null,S.jsx("button",{type:"button",className:"notification-row-move",onClick:()=>k(U),"aria-label":`Open ${O.theaterLabel} ${U.operationLabel}`,children:"Open"})]},U.sessionId))})]},O.theaterId??"__unknown__"))})]})}):S.jsxs("button",{ref:m,type:"button",className:`notification-handle is-${d} ${d==="awaiting"?"has-awaiting":""}`,onClick:()=>M(!0),"aria-label":`Open notifications (${A})`,children:[S.jsx("span",{className:"notification-handle-count",children:v?0:A}),S.jsx("span",{className:"notification-handle-label",children:"Alerts"}),S.jsx(jk,{className:"notification-handle-chevron"}),L>0?S.jsx("span",{className:"notification-handle-pulse","aria-hidden":"true"},L):null]})}function Lk(){if(typeof window>"u")return Nf;try{const e=window.localStorage.getItem(XS);return e===null?Nf:e==="true"}catch{return Nf}}function Mk(e){if(!(typeof window>"u"))try{window.localStorage.setItem(XS,String(e))}catch{}}function Dk(e){return e.globalMute||e.dnd||Object.keys(e.mutedTheaterIds).length>0}function Db(e,n){let r=0;for(const a of e)for(const l of a.notifications)l.kind===n&&(r+=l.count);return r}function Ok({groups:e}){const n=Fl(),r=Nk(e,n.notificationPreferences.mutedTheaterIds,n.theaters);return S.jsxs("div",{className:"notification-cluster-settings",role:"dialog","aria-label":"Notification settings",children:[S.jsx("p",{className:"notification-cluster-settings-eyebrow",children:"Display"}),S.jsxs("label",{className:"notification-cluster-setting",children:[S.jsx("input",{type:"checkbox",checked:n.notificationPreferences.globalMute,onChange:a=>qA(a.currentTarget.checked)}),S.jsx("span",{children:"Mute all"})]}),S.jsxs("label",{className:"notification-cluster-setting",children:[S.jsx("input",{type:"checkbox",checked:n.notificationPreferences.dnd,onChange:a=>WA(a.currentTarget.checked)}),S.jsx("span",{children:"Do not disturb"})]}),r.length>0?S.jsx("p",{className:"notification-cluster-settings-eyebrow",children:"By Theater"}):null,r.map(a=>S.jsxs("label",{className:"notification-cluster-setting",children:[S.jsx("input",{type:"checkbox",checked:a.theaterId?n.notificationPreferences.mutedTheaterIds[a.theaterId]===!0:!1,onChange:()=>{a.theaterId&&GA(a.theaterId)}}),S.jsx("span",{children:a.theaterLabel})]},a.theaterId))]})}function Nk(e,n,r){const a=new Map;for(const l of e)l.theaterId&&a.set(l.theaterId,l);for(const l of Object.keys(n))a.has(l)||a.set(l,{theaterId:l,theaterLabel:r.find(f=>f.id===l)?.label??l,notifications:[],totalCount:0});return[...a.values()]}function Bk(){return S.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[S.jsx("path",{d:"M8 5.4a2.6 2.6 0 1 1 0 5.2 2.6 2.6 0 0 1 0-5.2Z",fill:"none",stroke:"currentColor",strokeWidth:"1.25"}),S.jsx("path",{d:"M8 2.2v1.6M8 12.2v1.6M3.9 3.9 5 5M11 11l1.1 1.1M2.2 8h1.6M12.2 8h1.6M3.9 12.1 5 11M11 5l1.1-1.1",fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"})]})}function Ik(){return S.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:S.jsx("path",{d:"M4 4l8 8M12 4l-8 8",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})}function jk({className:e}){return S.jsx("svg",{className:e,viewBox:"0 0 16 16","aria-hidden":"true",children:S.jsx("path",{d:"M6 4l4 4-4 4",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}const ZS=[{title:"Console",entries:[{combos:[["Mod","K"]],description:"Search Operations across Theaters"},{combos:[["Esc"]],description:"Close the open overlay or menu"}]},{title:"Operations",entries:[{combos:[["Esc"]],description:"Close the carrier job stream"},{combos:[["Shift","Enter"]],description:"Insert a newline in the terminal instead of submitting"},{combos:[["Enter"],["Esc"]],description:"Confirm or cancel a session rename"},{combos:[["↑"],["↓"]],description:"Move between Theater, Theme, and launch menu items"}]},{title:"Map",entries:[{combos:[["Alt","←"],["Alt","→"]],description:"Focus the previous / next Operation"},{combos:[["Drag"]],description:"Pan the operations map"},{combos:[["Shift","Drag"]],description:"Draw a new Operation terminal"},{combos:[["Space","Drag"]],description:"Pan even while a terminal has focus"},{combos:[["Scroll"]],description:"Zoom the map in or out"},{combos:[["Right-click"]],description:"Open the canvas actions menu"},{combos:[["Double-click"]],description:"Focus a panel from its title bar; rename from its name"},{combos:[["Click"]],description:"Clear terminal focus on the empty canvas"}]},{title:"Codex",entries:[{combos:[["Mod","K"]],description:"Toggle the command palette"},{combos:[["↑"],["↓"]],description:"Move through command palette results"},{combos:[["Enter"]],description:"Open the selected result"},{combos:[["Tab"]],description:"Move focus within the command palette"},{combos:[["Esc"]],description:"Close the command palette or diagram lightbox"},{combos:[["+"],["−"],["0"]],description:"Zoom the diagram lightbox in / out / reset"},{combos:[["F"]],description:"Fit the diagram lightbox to the viewport"}]}],zk=/mac|iphone|ipad|ipod/i,$k=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(",");function Pk({state:e}){const n=H.useRef(null),r=H.useRef(null),a=H.useRef(null);if(e.shortcutsOpen&&n.current===null&&(n.current=document.activeElement),H.useEffect(()=>{if(!e.shortcutsOpen)return;const f=m=>{m.key==="Escape"?(Df(),m.preventDefault()):m.key==="Tab"&&Uk(m,a.current),m.stopImmediatePropagation()};return r.current?.focus(),window.addEventListener("keydown",f,!0),()=>{window.removeEventListener("keydown",f,!0);const m=n.current;n.current=null,m?.focus?.()}},[e.shortcutsOpen]),!e.shortcutsOpen)return null;const l=Hk();return S.jsxs("div",{className:"shortcuts-overlay",role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",children:[S.jsx("button",{type:"button",className:"shortcuts-overlay-scrim",onClick:Df,"aria-label":"Close keyboard shortcuts"}),S.jsxs("section",{className:"shortcuts-overlay-card",ref:a,children:[S.jsxs("header",{className:"shortcuts-overlay-header",children:[S.jsx("span",{className:"shortcuts-overlay-kicker",children:"Reference Map"}),S.jsx("h2",{children:"Keyboard Shortcuts"})]}),S.jsx("button",{ref:r,type:"button",className:"shortcuts-overlay-close",onClick:Df,"aria-label":"Close keyboard shortcuts",children:"×"}),S.jsx("div",{className:"shortcuts-overlay-groups",children:ZS.map(f=>S.jsxs("section",{className:"shortcuts-group","aria-labelledby":`shortcuts-${f.title.toLowerCase()}`,children:[S.jsx("h3",{id:`shortcuts-${f.title.toLowerCase()}`,children:f.title}),S.jsx("dl",{className:"shortcuts-list",children:f.entries.map(m=>S.jsxs("div",{className:"shortcuts-entry",children:[S.jsx("dt",{className:"shortcuts-combos",children:m.combos.map((c,u)=>S.jsxs("span",{className:"shortcuts-combo",children:[u>0?S.jsx("span",{className:"shortcuts-combo-separator",children:"or"}):null,S.jsx("span",{className:"shortcuts-keyset",children:c.map(h=>S.jsx("kbd",{children:h==="Mod"?l:h},h))})]},`${m.description}:${c.join("+")}`))}),S.jsx("dd",{children:m.description})]},`${f.title}:${m.description}`))})]},f.title))})]})]})}function Hk(){const n=navigator.userAgentData?.platform??navigator.platform;return zk.test(n)?"⌘":"Ctrl"}function Uk(e,n){if(!n)return;const r=Array.from(n.querySelectorAll($k)),a=r[0],l=r[r.length-1];!a||!l||(e.shiftKey&&document.activeElement===a?(e.preventDefault(),l.focus()):!e.shiftKey&&document.activeElement===l&&(e.preventDefault(),a.focus()))}const Fk="a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex='-1'])",Ob="operation-search-listbox",JS="__unassigned__";function qk({state:e}){const n=Pl(),[r,a]=H.useState(""),[l,f]=H.useState(0),m=H.useRef(null),c=H.useRef(null),u=H.useRef(null),h=H.useRef(new Map),y=H.useMemo(()=>ik(e),[e]),g=H.useMemo(()=>pA(y,r),[y,r]),C=H.useMemo(()=>gA(g),[g]),E=H.useMemo(()=>wS(r),[r]),A=Nb(l,g.length),T=g[A]?Bb(g[A].sessionId):void 0;if(H.useEffect(()=>{if(!e.operationSearchOpen)return;u.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const d=document.body.style.overflow;return document.body.style.overflow="hidden",window.setTimeout(()=>m.current?.focus(),0),()=>{document.body.style.overflow=d,u.current?.focus()}},[e.operationSearchOpen]),H.useEffect(()=>{if(!e.operationSearchOpen){a(""),f(0);return}f(0)},[e.operationSearchOpen,r]),H.useEffect(()=>{if(!e.operationSearchOpen)return;const d=g[A];d&&h.current.get(d.sessionId)?.scrollIntoView({block:"nearest"})},[A,g,e.operationSearchOpen]),!e.operationSearchOpen)return null;const p=d=>{Ng(d),n("/operations"),Mf()},v=d=>{if(d.key==="Escape"){d.preventDefault(),Mf();return}if(d.key==="ArrowDown"||d.key==="ArrowUp"){d.preventDefault(),f(b=>Nb(b+(d.key==="ArrowDown"?1:-1),g.length));return}if(d.key==="Enter"){const b=g[A];if(!b)return;d.preventDefault(),p(b.sessionId);return}d.key==="Tab"&&Vk(d,c.current)};return S.jsx("div",{className:"operation-search-overlay",onMouseDown:d=>{d.target===d.currentTarget&&Mf()},children:S.jsxs("section",{ref:c,className:"operation-search-card",role:"dialog","aria-modal":"true","aria-label":"Operation quick search",tabIndex:-1,onKeyDown:v,children:[S.jsxs("div",{className:"operation-search-field",children:[S.jsx(Yk,{}),S.jsx("input",{ref:m,id:"operation-search-input",type:"search",value:r,onChange:d=>a(d.target.value),placeholder:"Search Operations across Theaters",autoComplete:"off",role:"combobox","aria-expanded":!0,"aria-controls":Ob,"aria-activedescendant":T,"aria-autocomplete":"list",spellCheck:!1}),S.jsx("kbd",{children:"esc"})]}),S.jsx("div",{id:Ob,className:"operation-search-results",role:"listbox","aria-label":"Operation results",children:C.length>0?C.map(d=>{const b=Gk(d.theaterId);return S.jsxs("section",{className:"operation-search-section",role:"group","aria-labelledby":b,children:[S.jsx("h2",{id:b,className:"operation-search-section-heading",children:Bf(d.theaterLabel,E)}),d.entries.map(x=>{const L=g.indexOf(x),R=L===A;return S.jsxs("button",{id:Bb(x.sessionId),ref:M=>{M?h.current.set(x.sessionId,M):h.current.delete(x.sessionId)},type:"button",className:`operation-search-result ${R?"is-active":""}`,role:"option","aria-selected":R,onMouseEnter:()=>f(L),onClick:()=>p(x.sessionId),children:[S.jsxs("span",{className:"operation-search-result-text",children:[S.jsx("strong",{children:Bf(x.operationName,E)}),S.jsx("small",{children:Wk(x)})]}),S.jsx("span",{className:"operation-search-theater",children:Bf(x.theaterLabel,E)})]},x.sessionId)})]},d.theaterId??JS)}):S.jsx("p",{className:"operation-search-empty",children:"No matching Operations."})})]})})}function Nb(e,n){return n<=0?0:Math.max(0,Math.min(e,n-1))}function Wk(e){return[e.cliLabel,e.status].filter(Boolean).join(" · ")}function Gk(e){return`operation-search-heading-${QS(e??JS)}`}function Bb(e){return`operation-search-option-${QS(e)}`}function QS(e){return e.replace(/[^a-zA-Z0-9_-]/g,"-")}function Bf(e,n){if(n.length===0)return e;const r=[];let a=0;for(;a<e.length;){const l=Kk(e,n,a);if(!l){r.push(e.slice(a));break}l.start>a&&r.push(e.slice(a,l.start)),r.push(S.jsx("mark",{children:e.slice(l.start,l.end)},`${l.start}-${l.end}`)),a=l.end}return r}function Kk(e,n,r){const a=e.toLocaleLowerCase();let l=null;for(const f of n){const m=a.indexOf(f,r);m!==-1&&(!l||m<l.start)&&(l={start:m,end:m+f.length})}return l}function Vk(e,n){if(!n)return;const r=Array.from(n.querySelectorAll(Fk)).filter(f=>f.offsetParent!==null);if(r.length===0)return;const a=r[0],l=r[r.length-1];if(e.shiftKey&&document.activeElement===a){e.preventDefault(),l?.focus();return}!e.shiftKey&&document.activeElement===l&&(e.preventDefault(),a?.focus())}function Yk(){return S.jsx("svg",{viewBox:"0 0 20 20","aria-hidden":"true",children:S.jsx("path",{d:"m14.2 14.2 3 3M8.9 15.2a6.3 6.3 0 1 1 0-12.6 6.3 6.3 0 0 1 0 12.6Z",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})})}function Xk({open:e,title:n,message:r,tone:a="info",onDismiss:l}){return e?S.jsx("div",{className:"app-toast-host",children:S.jsxs("div",{className:`app-toast app-toast--${a}`,role:"status","aria-live":"polite",children:[S.jsx("span",{className:"app-toast-dot","aria-hidden":"true"}),S.jsxs("div",{className:"app-toast-body",children:[S.jsx("p",{className:"app-toast-title",children:n}),r?S.jsx("p",{className:"app-toast-message",children:r}):null]}),l?S.jsx("button",{type:"button",className:"app-toast-close",onClick:l,"aria-label":"Dismiss notification",children:"×"}):null]})}):null}function Zk({state:e}){if(Pi===null)return null;const n=Pi.version===e.version&&e.version?` v${Pi.version}`:"";return S.jsx("button",{type:"button",className:"topbar-whatsnew-button",onMouseDown:r=>r.preventDefault(),onClick:YA,"aria-label":`What's new${n}`,title:`What's new${n}`,children:S.jsx("span",{children:"What's new"})})}const Jk=1400,Qk="https://github.com/sbluemin/fleet-harness",e3="https://github.com/sbluemin/fleet-harness/stargazers",t3="https://api.github.com/repos/sbluemin/fleet-harness",jg="fleet-console.github-stars",n3=360*60*1e3;function i3({state:e}){const n=e.connectionError!==null,r=Li().pathname,a=r.startsWith("/codex")?S.jsx(S3,{}):r.startsWith("/carrier-settings")?S.jsx(jb,{}):r.startsWith("/settings")?S.jsx(Ib,{}):r.startsWith("/operations")?S.jsx(y3,{}):S.jsx(b3,{});return S.jsxs("header",{className:"topbar",children:[S.jsxs("div",{className:"topbar-lead",children:[S.jsxs(Dl,{className:"topbar-brand",to:"/operations","aria-label":"Operations로 이동",children:[S.jsx("span",{className:`topbar-sigil ${n?"is-alert":""}`,"aria-hidden":"true",title:e.connectionError??void 0,children:a}),S.jsxs("h1",{className:"topbar-title",children:["Fleet",S.jsx("span",{className:"topbar-title-thin",children:"Console"})]})]}),S.jsxs("span",{className:"topbar-preview-badge",children:[S.jsx("span",{className:"topbar-preview-label",children:"Research Preview"}),e.version?S.jsxs("span",{className:"topbar-preview-version",children:["v",e.version]}):null]}),S.jsx(c3,{}),S.jsx(Zk,{state:e})]}),S.jsx(l3,{state:e}),S.jsxs("div",{className:"topbar-meta",children:[e.updateAvailable?S.jsx(r3,{latestVersion:e.latestVersion}):null,S.jsx("button",{type:"button",className:"topbar-icon-button topbar-shortcuts-button",onMouseDown:l=>l.preventDefault(),onClick:VA,"aria-label":"Keyboard shortcuts",title:"Keyboard shortcuts",children:S.jsx(E3,{})}),S.jsxs(vp,{to:"/carrier-settings",className:({isActive:l})=>`topbar-nav-link ${l?"is-active":""}`,title:"Carrier settings",children:[S.jsx("span",{className:"topbar-nav-icon","aria-hidden":"true",children:S.jsx(jb,{})}),S.jsx("span",{children:"Carriers"})]}),S.jsxs(vp,{to:"/settings",className:({isActive:l})=>`topbar-nav-link ${l?"is-active":""}`,title:"Settings",children:[S.jsx("span",{className:"topbar-nav-icon","aria-hidden":"true",children:S.jsx(Ib,{})}),S.jsx("span",{children:"Settings"})]})]})]})}function r3({latestVersion:e}){const[n,r]=H.useState("idle"),[a,l]=H.useState(null),f=H.useRef(null),m=s3(n,a,e);H.useEffect(()=>()=>{f.current!==null&&window.clearTimeout(f.current)},[]);const c=async()=>{if(!m.disabled){f.current!==null&&(window.clearTimeout(f.current),f.current=null),r("applying"),l(null);try{if((await PT()).status!=="accepted"){r("error"),l("invalid_response");return}r("accepted"),f.current=window.setTimeout(()=>{f.current=null,r("completed")},Jk)}catch(u){const h=u instanceof Ge?u.message:"network_error";l(h),r(o3(h)?"blocked":"error")}}};return S.jsx("button",{type:"button",className:`topbar-update-badge topbar-update-badge--${m.tone}`,onClick:c,disabled:m.disabled,title:m.title,"aria-live":"polite",children:m.label})}function s3(e,n,r){const a=r?`최신 버전 ${r}`:"업데이트 가능";return e==="applying"?{label:"요청 중",title:"업데이트 적용 요청을 보내는 중입니다.",tone:"live",disabled:!0}:e==="accepted"?{label:"업데이트 중",title:"서버가 곧 재시작되고 새 창에서 콘솔을 엽니다.",tone:"live",disabled:!0}:e==="completed"?{label:"완료: 새 창에서 계속",title:"새 창에서 재시작된 콘솔을 계속 사용하세요.",tone:"live",disabled:!0}:e==="blocked"?a3(n):e==="error"?{label:"재시도",title:"업데이트 요청에 실패했습니다. 다시 시도할 수 있습니다.",tone:"error",disabled:!1}:{label:"Update available",title:a,tone:"warn",disabled:!1}}function a3(e){return e==="local_channel"?{label:"로컬 빌드",title:"로컬 개발 빌드는 콘솔에서 업데이트하지 않습니다.",tone:"blocked",disabled:!0}:e==="active_terminal_sessions"?{label:"세션 종료 필요",title:"실행 중인 Operation을 종료한 뒤 업데이트하세요.",tone:"blocked",disabled:!1}:e==="update_already_in_progress"?{label:"이미 진행 중",title:"다른 업데이트 적용이 이미 진행 중입니다.",tone:"blocked",disabled:!0}:e==="update_not_available"?{label:"업데이트 없음",title:"서버 재확인 결과 적용할 업데이트가 없습니다.",tone:"blocked",disabled:!0}:{label:"콘솔 준비 안 됨",title:"콘솔이 업데이트를 시작할 준비가 되지 않았습니다. 잠시 뒤 다시 시도하세요.",tone:"error",disabled:!1}}function o3(e){return e==="active_terminal_sessions"||e==="local_channel"||e==="update_already_in_progress"||e==="update_not_available"}function l3({state:e}){const[n,r]=H.useState(!1),[a,l]=H.useState(!1),f=H.useRef(null),m=H.useRef(null),c=H.useRef(null),u=e.theaters.find(p=>p.id===e.activeTheaterId)??null,h=u?.label??(e.theaters.length===0?"No Theaters":"Theater");H.useEffect(()=>{if(!n)return;const p=d=>{f.current?.contains(d.target)||r(!1)},v=d=>{d.key==="Escape"&&(r(!1),m.current?.focus())};return document.addEventListener("mousedown",p),document.addEventListener("keydown",v),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",v)}},[n]),H.useEffect(()=>{if(!n)return;const p=c.current;if(!p)return;(p.querySelector('[data-active="true"]')??p.querySelector("[role^='menuitem']"))?.focus()},[n]);const y=p=>{$A(p),r(!1),m.current?.focus()},g=async()=>{r(!1),l(!0)},C=()=>{l(!1),PA()},E=async p=>{l(!1),NS();try{const v=await dS(p),d=await hS(v);BS(d)}catch(v){zp(v instanceof Error?v.message:String(v))}},A=async()=>{if(u){r(!1);try{await UT(u.id),Mb(u.id)}catch(p){if(p instanceof Ge&&p.status===404){Mb(u.id);return}zp(p instanceof Error?p.message:String(p))}}},T=p=>{if(p.key!=="ArrowDown"&&p.key!=="ArrowUp")return;p.preventDefault();const v=Array.from(c.current?.querySelectorAll("[role^='menuitem']")??[]);if(v.length===0)return;const d=v.indexOf(document.activeElement),b=p.key==="ArrowDown"?1:-1,x=(d+b+v.length)%v.length;v[x]?.focus()};return S.jsxs("div",{className:"theater-control",ref:f,children:[S.jsx("span",{className:"theater-eyebrow","aria-hidden":"true",children:"Theater"}),S.jsxs("button",{type:"button",ref:m,className:`theater-trigger ${n?"is-open":""}`,"aria-haspopup":"menu","aria-expanded":n,"aria-label":"Theater",title:u?.label??e.theaterError??void 0,onClick:()=>r(p=>!p),children:[S.jsx("span",{className:"theater-trigger-sigil","aria-hidden":"true",children:S.jsx(g3,{})}),S.jsx("span",{className:"theater-trigger-label",children:h}),S.jsx("span",{className:"theater-trigger-caret","aria-hidden":"true",children:S.jsx(m3,{})})]}),n?S.jsxs("div",{className:"theater-menu",role:"menu","aria-label":"Theater",ref:c,onKeyDown:T,children:[e.theaters.length>0?S.jsx("ul",{className:"theater-menu-list",children:e.theaters.map(p=>{const v=p.id===e.activeTheaterId;return S.jsx("li",{children:S.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":v,"data-active":v?"true":void 0,className:`theater-menu-item ${v?"is-active":""}`,title:p.label,onClick:()=>y(p.id),children:[S.jsx("span",{className:"theater-menu-check","aria-hidden":"true",children:v?S.jsx(_3,{}):null}),S.jsx("span",{className:"theater-menu-label",children:p.label})]})},p.id)})}):S.jsx("p",{className:"theater-menu-empty",children:"No Theaters yet."}),S.jsx("div",{className:"theater-menu-divider",role:"separator"}),u?S.jsxs(S.Fragment,{children:[S.jsxs("button",{type:"button",role:"menuitem",className:"theater-menu-item theater-menu-forget",onClick:A,children:[S.jsx("span",{className:"theater-menu-check","aria-hidden":"true",children:S.jsx(v3,{})}),S.jsx("span",{className:"theater-menu-label",children:"Forget Theater"})]}),S.jsx("div",{className:"theater-menu-divider",role:"separator"})]}):null,S.jsxs("button",{type:"button",role:"menuitem",className:"theater-menu-item theater-menu-add",disabled:e.addingTheater,onClick:g,children:[S.jsx("span",{className:"theater-menu-check","aria-hidden":"true",children:S.jsx(w3,{})}),S.jsx("span",{className:"theater-menu-label",children:e.addingTheater?"Adding Theater…":"Add Theater…"})]}),e.theaterError?S.jsx("p",{className:"theater-menu-error",children:e.theaterError}):null]}):null,S.jsx(YS,{open:a,onCancel:C,onConfirm:E})]})}function c3(){const e=u3(),n=e.count!==null;return S.jsxs("div",{className:"topbar-github",role:"group","aria-label":"GitHub",children:[S.jsx("a",{className:"topbar-github-link",href:Qk,target:"_blank",rel:"noopener noreferrer","aria-label":"GitHub 저장소 열기",title:"GitHub 저장소",children:S.jsx(C3,{})}),S.jsxs("a",{className:"topbar-github-stars",href:e3,target:"_blank",rel:"noopener noreferrer","aria-label":n?`GitHub 스타 ${e.count.toLocaleString()}개 — 스타 누르기`:"GitHub에서 스타 누르기",title:"GitHub에서 스타 누르기",children:[S.jsx(x3,{}),n?S.jsx("span",{className:"topbar-github-stars-count",children:p3(e.count)}):null]})]})}function u3(){const[e,n]=H.useState(()=>{const r=h3();return r===null?{count:null,status:"idle"}:{count:r,status:"ready"}});return H.useEffect(()=>{if(d3())return;let r=!1;return n(a=>a.status==="ready"?a:{...a,status:"loading"}),fetch(t3,{headers:{Accept:"application/vnd.github+json"}}).then(a=>a.ok?a.json():Promise.reject(new Error(`status ${a.status}`))).then(a=>{if(r)return;const l=typeof a.stargazers_count=="number"?a.stargazers_count:null;if(l===null){n(f=>({count:f.count,status:f.count===null?"error":"ready"}));return}f3(l),n({count:l,status:"ready"})}).catch(()=>{r||n(a=>({count:a.count,status:a.count===null?"error":"ready"}))}),()=>{r=!0}},[]),e}function h3(){try{const e=window.localStorage.getItem(jg);if(!e)return null;const n=JSON.parse(e);return typeof n.count=="number"?n.count:null}catch{return null}}function d3(){try{const e=window.localStorage.getItem(jg);if(!e)return!1;const n=JSON.parse(e);return typeof n.at=="number"&&Date.now()-n.at<n3}catch{return!1}}function f3(e){try{window.localStorage.setItem(jg,JSON.stringify({count:e,at:Date.now()}))}catch{}}function p3(e){if(e<1e3)return String(e);const n=e/1e3;return n<10?`${n.toFixed(1)}k`:`${Math.round(n)}k`}function g3(){return S.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[S.jsx("circle",{cx:"8",cy:"3.2",r:"1.5",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),S.jsx("path",{d:"M8 4.7v8.1M4.3 8.2H11.7M3.4 9.1A4.7 4.7 0 0 0 12.6 9.1",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}function m3(){return S.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:S.jsx("path",{d:"M4.5 6.5 8 10l3.5-3.5",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})}function _3(){return S.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:S.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 5",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function v3(){return S.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:S.jsx("path",{d:"M4.7 4.7 11.3 11.3M11.3 4.7 4.7 11.3",fill:"none",stroke:"currentColor",strokeWidth:"1.35",strokeLinecap:"round"})})}function b3(){return S.jsxs("svg",{viewBox:"0 0 16 16",width:"16",height:"16",children:[S.jsx("path",{d:"M8 1.8 9.5 6.5 14.2 8 9.5 9.5 8 14.2 6.5 9.5 1.8 8 6.5 6.5Z",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),S.jsx("path",{d:"M8 4.7 8.7 7.3 11.3 8 8.7 8.7 8 11.3 7.3 8.7 4.7 8 7.3 7.3Z",fill:"currentColor"})]})}function y3(){return S.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[S.jsx("circle",{cx:"8",cy:"8",r:"5.4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),S.jsx("path",{d:"M8 3.7v2.1M8 10.2v2.1M3.7 8h2.1M10.2 8h2.1M8 8l3.1-2.1",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),S.jsx("circle",{cx:"8",cy:"8",r:"1.1",fill:"currentColor"})]})}function S3(){return S.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[S.jsx("circle",{cx:"12",cy:"12",r:"9"}),S.jsx("circle",{cx:"12",cy:"12",r:"3.2",fill:"currentColor",stroke:"none",opacity:"0.16"}),S.jsx("path",{d:"M12 3v3.6M12 17.4V21M3 12h3.6M17.4 12H21"}),S.jsx("path",{d:"M12 8.6 14.2 12 12 15.4 9.8 12Z",fill:"currentColor",stroke:"none"})]})}function Ib(){return S.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[S.jsx("path",{d:"M3 4.4h10M3 8h10M3 11.6h10",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),S.jsx("circle",{cx:"6.2",cy:"4.4",r:"1.3",fill:"var(--surface-glass-strong)",stroke:"currentColor",strokeWidth:"1.2"}),S.jsx("circle",{cx:"10",cy:"8",r:"1.3",fill:"var(--surface-glass-strong)",stroke:"currentColor",strokeWidth:"1.2"}),S.jsx("circle",{cx:"7.4",cy:"11.6",r:"1.3",fill:"var(--surface-glass-strong)",stroke:"currentColor",strokeWidth:"1.2"})]})}function jb(){return S.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[S.jsx("circle",{cx:"4",cy:"4.2",r:"1.15",fill:"currentColor"}),S.jsx("circle",{cx:"4",cy:"8",r:"1.15",fill:"currentColor"}),S.jsx("circle",{cx:"4",cy:"11.8",r:"1.15",fill:"currentColor"}),S.jsx("path",{d:"M7.2 4.2h6M7.2 8h6M7.2 11.8h6",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}function w3(){return S.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:S.jsx("path",{d:"M8 3.4v9.2M3.4 8h9.2",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})}function C3(){return S.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:S.jsx("path",{fill:"currentColor",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82a7.65 7.65 0 0 1 2-.27c.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z"})})}function x3(){return S.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:S.jsx("path",{d:"M8 2.2 9.41 6.26 13.71 6.35 10.28 8.94 11.53 13.05 8 10.6 4.47 13.05 5.72 8.94 2.29 6.35 6.59 6.26Z",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})})}function E3(){return S.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[S.jsx("rect",{x:"2.4",y:"4.1",width:"11.2",height:"7.8",rx:"1.8",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),S.jsx("path",{d:"M4.5 6.3h.1M6.8 6.3h.1M9.1 6.3h.1M11.4 6.3h.1M4.5 8.2h.1M6.8 8.2h.1M9.1 8.2h.1M11.4 8.2h.1M5.8 10.1h4.4",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}const T3=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(",");function A3({state:e}){const n=H.useRef(null),r=H.useRef(null),a=H.useRef(null),l=!e.bootstrapped||e.onboardingOpen||e.operationSearchOpen||e.shortcutsOpen||e.timelineOpen;return e.whatsNewOpen&&!l&&n.current===null&&(n.current=document.activeElement),H.useEffect(()=>{if(!e.whatsNewOpen||l)return;const f=m=>{m.key==="Escape"?(m.preventDefault(),au()):m.key==="Tab"&&R3(m,a.current),m.stopImmediatePropagation()};return r.current?.focus(),window.addEventListener("keydown",f,!0),()=>{window.removeEventListener("keydown",f,!0);const m=n.current;n.current=null,m?.focus?.()}},[e.whatsNewOpen,l]),!e.whatsNewOpen||l||Pi===null?null:S.jsxs("div",{className:"whatsnew-overlay",role:"dialog","aria-modal":"true","aria-labelledby":"whatsnew-title",children:[S.jsx("button",{type:"button",className:"whatsnew-scrim",onClick:au,"aria-label":"Close What's new"}),S.jsxs("section",{className:"whatsnew-card",ref:a,children:[S.jsxs("header",{className:"whatsnew-header",children:[S.jsxs("div",{className:"whatsnew-heading-row",children:[S.jsx("h2",{id:"whatsnew-title",children:"What's new"}),S.jsxs("span",{className:"whatsnew-version-badge",children:["v",Pi.version]})]}),S.jsxs("time",{className:"whatsnew-date",dateTime:Pi.date,children:["Released ",Pi.date]})]}),S.jsx("button",{ref:r,type:"button",className:"whatsnew-close",onClick:au,"aria-label":"Close What's new",children:"x"}),S.jsx("div",{className:"whatsnew-body",children:Pi.sections.map((f,m)=>S.jsx(k3,{section:f,index:m},f.heading))}),S.jsx("footer",{className:"whatsnew-footer",children:S.jsx("button",{type:"button",className:"whatsnew-done",onClick:au,children:"Close"})})]})]})}function k3({section:e,index:n}){const r=e.heading.toLowerCase().replaceAll(" ","-"),a={"--whatsnew-delay":`${n*55}ms`};return S.jsxs("section",{className:`whatsnew-section whatsnew-section--${r}`,style:a,children:[S.jsx("h3",{children:S.jsx("span",{className:"whatsnew-section-chip",children:e.heading})}),S.jsx("ul",{children:e.items.map(l=>S.jsx("li",{children:l},l))})]})}function R3(e,n){if(!n)return;const r=Array.from(n.querySelectorAll(T3)),a=r[0],l=r[r.length-1];!a||!l||(e.shiftKey&&document.activeElement===a?(e.preventDefault(),l.focus()):!e.shiftKey&&document.activeElement===l&&(e.preventDefault(),a.focus()))}const L3=new Set(["idle_prompt","permission_prompt","auth_success","elicitation_dialog","elicitation_complete","elicitation_response"]);function M3(){let e="";return n=>{e+=n;const r=[];let a=e.indexOf(`
12
+ `);for(let r=n.length-1;r>=0;r--){const a=n[r]?.trim();if(a)return a}return null}const dA="__unassigned__";function fA(e){const n=new Map(e.theaters.map(a=>[a.id,a])),r=[];for(const a of e.sessionOrder){const l=e.sessions[a];l&&l.theaterId&&r.push(mA(l,n.get(l.theaterId)))}return r}function pA(e,n){const r=wS(n);return r.length===0?e:e.filter(a=>{const l=_A(a);return r.every(f=>l.includes(f))})}function gA(e){const n=[],r=new Map;for(const a of e){const l=a.theaterId??dA,f=r.get(l);if(f!==void 0){const m=n[f];m&&(n[f]={...m,entries:[...m.entries,a]});continue}r.set(l,n.length),n.push({theaterId:a.theaterId,theaterLabel:a.theaterLabel,entries:[a]})}return n}function wS(e){return e.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean)}function mA(e,n){return{sessionId:e.sessionId,theaterId:e.theaterId??null,theaterLabel:n?.label??e.theaterId??"",operationName:Ul(e),cliLabel:e.cliLabel,status:e.status}}function _A(e){return[e.operationName,e.theaterLabel,e.cliLabel??""].join(" ").toLocaleLowerCase()}const vA="fleet-console.canvas.shell.",bA=400,vb=560,bb=360,Op=new Set;let ei={},Js=null,Qs=null,Ss=null;function yA(){return H.useSyncExternalStore(CS,wb,wb)}function SA(){return H.useSyncExternalStore(CS,yb,yb)}function yb(){return Js}function $u(e){Js!==e&&(Js=e,co())}function wA(e,n){const r=LA();return ei={...ei,[r]:{theaterId:e,geometry:n}},Dg(),co(),r}function Af(e,n){const r=ei[e];r&&(ei={...ei,[e]:{...r,geometry:n}},Dg(),co())}function Sb(e){if(!(e in ei))return;const n={...ei};delete n[e],ei=n,Js===e&&(Js=null),Dg(),co()}function CA(e){EA(),Qs=e,ei=e?TA(e):{},Js=null,Q5(RA(ei)),co()}function xA(e){if(typeof window<"u")try{window.sessionStorage.removeItem(Og(e))}catch{}Qs===e&&(xS(),Qs=null,ei={},Js=null,co())}function CS(e){return Op.add(e),()=>{Op.delete(e)}}function wb(){return ei}function co(){for(const e of Op)e()}function Dg(){!Qs||typeof window>"u"||(xS(),Ss=window.setTimeout(()=>{Ss=null,ES(Qs,ei)},bA))}function EA(){!Ss||!Qs||typeof window>"u"||(window.clearTimeout(Ss),Ss=null,ES(Qs,ei))}function xS(){!Ss||typeof window>"u"||(window.clearTimeout(Ss),Ss=null)}function TA(e){if(typeof window>"u")return{};try{const n=window.sessionStorage.getItem(Og(e));return n?AA(JSON.parse(n),e):{}}catch{return{}}}function ES(e,n){if(!(!e||typeof window>"u"))try{window.sessionStorage.setItem(Og(e),JSON.stringify({panels:n}))}catch{}}function Og(e){return`${vA}${e}`}function AA(e,n){if(!Au(e)||!Au(e.panels))return{};const r={};for(const[a,l]of Object.entries(e.panels))!a.startsWith("shell:")||!Au(l)||l.theaterId===n&&(r[a]={theaterId:n,geometry:kA(l.geometry)});return r}function kA(e){return Au(e)?{x:kf(e.x,0),y:kf(e.y,0),width:Cb(e.width,vb),height:Cb(e.height,bb),zIndex:kf(e.zIndex,0)}:{x:0,y:0,width:vb,height:bb,zIndex:0}}function RA(e){return Math.max(0,...Object.values(e).map(n=>n.geometry.zIndex))}function kf(e,n){return typeof e=="number"&&Number.isFinite(e)?e:n}function Cb(e,n){return typeof e=="number"&&Number.isFinite(e)&&e>0?e:n}function Au(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function LA(){return`shell:${typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}`}const Pi={version:"1.10.1",date:"2026-06-21",sections:[{heading:"Fixed",items:["All backend API catalog descriptions in the Settings page are now shown in English; the remaining Korean entries have been translated."]}]},Np=200,Bp="fleet-console.activeTheaterId",TS="fleet-console.activeTheme",AS="fleet-console.terminalRenderer",kS="fleet-console.commissioningSeen",RS="fleet-console.whatsNewSeenVersion",LS="fleet-console.notificationPreferences",MS=1,Rf="maritime",Lf="webgl",su={globalMute:!1,dnd:!1,mutedTheaterIds:{}},Ip=new Set;let jp=null,be={connection:"connecting",connectionError:null,activeTheme:KS(),terminalRenderer:IA(),version:"",updateAvailable:!1,latestVersion:null,tenants:[],theaters:[],agentClis:[],activeTheaterId:null,addingTheater:!1,theaterError:null,sessions:{},sessionOrder:[],activeTerminalSessionId:null,operationsViewActive:!1,creatingTerminalSession:!1,terminalSessionError:null,tenantJobs:{},tenantOrder:[],timelineOpen:!1,operationSearchOpen:!1,shortcutsOpen:!1,whatsNewOpen:!1,onboardingOpen:!1,bootstrapped:!1,terminalSessionsHydrated:!1,pendingOperationFocus:null,selectedJobId:null,operationNotifications:{},notificationPreferences:ck()},xb=0;function Eb(){return be}function MA(e){return Ip.add(e),()=>{Ip.delete(e)}}function He(e){be={...be,...e},VS()}function DA(e){be.operationsViewActive!==e&&He({operationsViewActive:e})}function OA(){DS(KS())}function NA(e){dk(e),DS(e),He({activeTheme:e})}function BA(e){fk(e),He({terminalRenderer:e})}function IA(){if(typeof window>"u")return Lf;try{const e=window.localStorage.getItem(AS);return e==="webgl"||e==="dom"?e:Lf}catch{return Lf}}function jA(e){const n=Pi!==null&&Pi.version===e.version&&hk()!==e.version;He({version:e.version,updateAvailable:e.updateAvailable,latestVersion:e.latestVersion??null,whatsNewOpen:n?!0:be.whatsNewOpen})}function DS(e){if(!(typeof document>"u")){if(e==="maritime"){document.documentElement.removeAttribute("data-theme");return}document.documentElement.setAttribute("data-theme",e)}}function zA(e){const n={};for(const l of e)n[l.sessionId]=ah(l);const r=[...e].sort((l,f)=>f.createdAt-l.createdAt).map(l=>l.sessionId),a=WS(n,be.tenants);He({sessions:a,sessionOrder:r,activeTerminalSessionId:ws(be.activeTheaterId,a,r,be.activeTerminalSessionId),terminalSessionsHydrated:!0})}function OS(e){const n=GS(e.theaters,be.activeTheaterId);He({theaters:e.theaters,agentClis:e.agentClis,activeTheaterId:n,activeTerminalSessionId:ws(n,be.sessions,be.sessionOrder,be.activeTerminalSessionId),selectedJobId:null})}function $A(e){lh(e),He({activeTheaterId:e,activeTerminalSessionId:ws(e,be.sessions,be.sessionOrder,null),selectedJobId:null})}function NS(){He({addingTheater:!0,theaterError:null})}function BS(e){const n=[e,...be.theaters.filter(r=>r.id!==e.id)];lh(e.id),He({theaters:n,activeTheaterId:e.id,addingTheater:!1,theaterError:null,activeTerminalSessionId:ws(e.id,be.sessions,be.sessionOrder,null),selectedJobId:null})}function PA(){He({addingTheater:!1,theaterError:null})}function zp(e){He({addingTheater:!1,theaterError:e})}function Hi(e){He({activeTerminalSessionId:e,selectedJobId:null,operationNotifications:e?oh(be.operationNotifications,e):be.operationNotifications})}function Ng(e){const n=be.sessions[e];n&&(lh(n.theaterId??null),He({activeTheaterId:n.theaterId??null,activeTerminalSessionId:e,selectedJobId:null,pendingOperationFocus:e,operationNotifications:oh(be.operationNotifications,e)}))}function Tb(){be.pendingOperationFocus!==null&&He({pendingOperationFocus:null})}function HA(e,n,r){if(e.length===0)return null;const a=n?e.indexOf(n):-1,l=a===-1?r>0?0:e.length-1:(a+r+e.length)%e.length;return e[l]??null}function Mf(){He({operationSearchOpen:!1})}function UA(){He({operationSearchOpen:!be.operationSearchOpen})}function Ab(){He({creatingTerminalSession:!0,terminalSessionError:null})}function kb(e){const n=ah(e);He({sessions:{...be.sessions,[n.sessionId]:n},sessionOrder:[n.sessionId,...be.sessionOrder.filter(r=>r!==n.sessionId)],activeTerminalSessionId:!be.activeTheaterId||Hu(n,be.activeTheaterId)?n.sessionId:be.activeTerminalSessionId,creatingTerminalSession:!1,terminalSessionError:null,selectedJobId:null})}function sh(e){const n=be.sessions[e.sessionId],r=ah({...n??{},...e}),a=!!n,l={...be.sessions,[r.sessionId]:r},f=a?be.sessionOrder:[r.sessionId,...be.sessionOrder.filter(c=>c!==r.sessionId)],m=n?sk(be.operationNotifications,n,r):be.operationNotifications;He({sessions:l,sessionOrder:f,activeTerminalSessionId:ws(be.activeTheaterId,l,f,be.activeTerminalSessionId),operationNotifications:m})}function FA(e,n){const r=be.sessions[e.sessionId]??ah(e);n==="idle_prompt"&&qS(r)||He({operationNotifications:FS(be.operationNotifications,US("input-waiting",r))})}function qA(e){const n={...be.notificationPreferences,globalMute:e};Ig(n),He({notificationPreferences:n})}function WA(e){const n={...be.notificationPreferences,dnd:e};Ig(n),He({notificationPreferences:n})}function GA(e){const n={...be.notificationPreferences.mutedTheaterIds};n[e]?delete n[e]:n[e]=!0;const r={...be.notificationPreferences,mutedTheaterIds:n};Ig(r),He({notificationPreferences:r})}function Rb(e){He({creatingTerminalSession:!1,terminalSessionError:e})}function KA(){He({timelineOpen:!be.timelineOpen})}function VA(){be.shortcutsOpen||He({shortcutsOpen:!0})}function Df(){be.shortcutsOpen&&He({shortcutsOpen:!1})}function YA(){Pi===null||be.whatsNewOpen||He({whatsNewOpen:!0})}function au(){be.whatsNewOpen&&(be.version&&gk(be.version),He({whatsNewOpen:!1}))}function cl(){pk(!0),be.onboardingOpen&&He({onboardingOpen:!1})}function Lb(){if(be.bootstrapped)return;const e=be.theaters.length===0&&!uk();He({bootstrapped:!0,onboardingOpen:e?!0:be.onboardingOpen})}function IS(e){He({terminalSessionError:e})}function jS(e){He({terminalSessionError:e})}function XA(e){He({terminalSessionError:e})}function Mb(e){xA(e);const n=be.theaters.filter(m=>m.id!==e),r={},a=[];for(const m of be.sessionOrder){const c=be.sessions[m];!c||c.theaterId===e||(r[m]=c,a.push(m))}const l=GS(n,be.activeTheaterId===e?null:be.activeTheaterId),f=ak(be.operationNotifications,e);lh(l),He({theaters:n,sessions:r,sessionOrder:a,activeTheaterId:l,activeTerminalSessionId:ws(l,r,a,be.activeTerminalSessionId),selectedJobId:null,operationNotifications:f})}function zS(e){if(!be.sessions[e])return;const n={...be.sessions};delete n[e];const r=be.sessionOrder.filter(l=>l!==e),a=be.activeTerminalSessionId===e;He({sessions:n,sessionOrder:r,activeTerminalSessionId:a?ws(be.activeTheaterId,n,r,null):be.activeTerminalSessionId,selectedJobId:a?null:be.selectedJobId,operationNotifications:oh(be.operationNotifications,e)})}function $S(e){He({selectedJobId:be.selectedJobId===e?null:e})}function Of(){He({selectedJobId:null})}function PS(e){const n=new Set(e.map(l=>l.tenantId)),r=WS(be.sessions,e),a=[...e.map(l=>l.tenantId),...be.tenantOrder.filter(l=>!n.has(l)&&be.tenantJobs[l])];He({tenants:e,sessions:r,tenantOrder:a,activeTerminalSessionId:ws(be.activeTheaterId,r,be.sessionOrder,be.activeTerminalSessionId)})}function ZA(e){const n={},r=[];for(const l of e){const f={};for(const c of l.jobs)f[c.jobId]=eA(l.tenantId,c);const m=Object.values(f).sort((c,u)=>(c.startedAt??c.updatedAt)-(u.startedAt??u.updatedAt)).map(c=>c.jobId);n[l.tenantId]={tenantId:l.tenantId,tenantLabel:l.tenantLabel,jobOrder:m,jobs:f,truncation:l.truncation},r.push(l.tenantId)}const a=[...be.tenantOrder.filter(l=>n[l]),...r.filter(l=>!be.tenantOrder.includes(l))];He({tenantJobs:n,tenantOrder:a.length>0?a:r})}function JA(e,n){const r=be.tenantJobs[e.tenantId],a=!r&&!be.tenants.some(c=>c.tenantId===e.tenantId),l=r??{tenantId:e.tenantId,tenantLabel:n,jobOrder:[],jobs:{},truncation:{droppedCount:0}};let f=n&&l.tenantLabel!==n?{...l,tenantLabel:n}:l;if(e.jobId){const c=f.jobs[e.jobId],u=_S(c??vS(e.tenantId,e.jobId,e.at),e),h=c?f.jobOrder:[...f.jobOrder,e.jobId];f={...f,jobs:mk({...f.jobs,[e.jobId]:u},h),jobOrder:h.slice(-Np)}}const m={...be.tenantJobs,[e.tenantId]:f};return be={...be,connection:"live",connectionError:null,tenantJobs:m,tenantOrder:be.tenantOrder.includes(e.tenantId)?be.tenantOrder:[...be.tenantOrder,e.tenantId]},VS(),{unknownTenant:a}}function QA(e,n,r){const a=be.tenantJobs[e]??{tenantId:e,tenantLabel:n,jobOrder:[],jobs:{},truncation:{droppedCount:0}};He({tenantJobs:{...be.tenantJobs,[e]:{...a,truncation:r}},tenantOrder:be.tenantOrder.includes(e)?be.tenantOrder:[...be.tenantOrder,e]})}function ek(e){if(!e.selectedJobId||e.activeTheaterId&&e.activeTerminalSessionId&&!Pu(e).includes(e.activeTerminalSessionId))return null;const n=tk(e);return n?e.tenantJobs[n]?.jobs[e.selectedJobId]??null:null}function tk(e){return e.activeTerminalSessionId?Bg(e.sessions[e.activeTerminalSessionId]):null}function nk(e){return Pu(e).map(n=>e.sessions[n]).filter(n=>!!n)}function Pu(e){return e.activeTheaterId?e.sessionOrder.filter(n=>Hu(e.sessions[n],e.activeTheaterId)):[]}function ik(e){return fA(e)}function HS(e,n){const r=Bg(n);if(!r)return[];const a=e.tenantJobs[r];if(!a)return[];const l=[];for(const f of a.jobOrder){const m=a.jobs[f];m&&l.push({job:m,tenant:a})}return l}function Bg(e){return e?.tenantId??e?.sessionId??null}function ah(e){return{...e,terminalSessionId:e.terminalSessionId??e.sessionId,status:e.status==="starting"&&e.tenantId?"registered":e.status,turnState:e.turnState??"none",resumeAvailable:e.resumeAvailable===!0}}function rk(e){return e?be.theaters.find(n=>n.id===e)?.label??e:"—"}function US(e,n){return xb+=1,{kind:e,sessionId:n.sessionId,theaterId:n.theaterId??null,theaterLabel:rk(n.theaterId),operationLabel:Ul(n),count:1,lastRaisedSeq:xb}}function sk(e,n,r){return n.turnState!=="running"&&r.turnState==="running"?oh(e,r.sessionId):n.turnState!=="ended"&&r.turnState==="ended"&&!qS(r)?FS(e,US("ended",r)):e}function FS(e,n){const r=e[n.sessionId];return{...e,[n.sessionId]:{...n,count:r?.kind==="input-waiting"&&n.kind==="input-waiting"?r.count+1:1}}}function oh(e,n){if(!e[n])return e;const r={...e};return delete r[n],r}function ak(e,n){let r=!1;const a={};for(const[l,f]of Object.entries(e)){if(f.theaterId===n){r=!0;continue}a[l]=f}return r?a:e}function qS(e){const n=Bg(e);return n?ok(be.tenantJobs[n]):!1}function ok(e){return e?e.jobOrder.some(n=>{const r=e.jobs[n];return r?!r.finishedAt&&!Mg(r.status):!1}):!1}function WS(e,n){const r={...e};for(const a of n){if(!a.terminalSessionId)continue;const l=r[a.terminalSessionId];l&&(r[a.terminalSessionId]={...l,status:a.status==="closed"?"closed":a.status==="dormant"?"dormant":"registered",tenantId:a.tenantId,registrationId:a.registrationId,theaterId:a.theaterId??l.theaterId})}return r}function GS(e,n){const r=new Set(e.map(l=>l.id)),a=lk();return a&&r.has(a)?a:n&&r.has(n)?n:e[0]?.id??null}function ws(e,n,r,a){return e?a&&Hu(n[a],e)&&ou(n[a])?a:r.find(l=>Hu(n[l],e)&&ou(n[l]))??null:a&&n[a]&&ou(n[a])?a:r.find(l=>ou(n[l]))??null}function Hu(e,n){return!e||!n?!1:e.theaterId===n}function ou(e){return!!(e&&e.status!=="dormant")}function lk(){if(typeof window>"u")return null;try{return window.localStorage.getItem(Bp)}catch{return null}}function lh(e){if(!(typeof window>"u"))try{e?window.localStorage.setItem(Bp,e):window.localStorage.removeItem(Bp)}catch{}}function KS(){if(typeof window>"u")return Rf;try{const e=window.localStorage.getItem(TS);return e==="maritime"||e==="carbon"?e:Rf}catch{return Rf}}function ck(){if(typeof window>"u")return su;try{const e=window.localStorage.getItem(LS);if(!e)return su;const n=JSON.parse(e);return _k(n)?{globalMute:n.preferences.globalMute,dnd:n.preferences.dnd,mutedTheaterIds:n.preferences.mutedTheaterIds}:su}catch{return su}}function uk(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(kS)==="1"}catch{return!1}}function hk(){if(jp!==null)return jp;if(typeof window>"u")return null;try{return window.localStorage.getItem(RS)}catch{return null}}function dk(e){if(!(typeof window>"u"))try{window.localStorage.setItem(TS,e)}catch{}}function fk(e){if(!(typeof window>"u"))try{window.localStorage.setItem(AS,e)}catch{}}function Ig(e){if(!(typeof window>"u"))try{window.localStorage.setItem(LS,JSON.stringify({version:MS,preferences:e}))}catch{}}function pk(e){if(!(typeof window>"u"))try{window.localStorage.setItem(kS,e?"1":"0")}catch{}}function gk(e){if(jp=e,!(typeof window>"u"))try{window.localStorage.setItem(RS,e)}catch{}}function mk(e,n){if(n.length<=Np)return e;const r=new Set(n.slice(-Np)),a={};for(const l of Object.keys(e))r.has(l)&&(a[l]=e[l]);return a}function _k(e){if(!e||typeof e!="object")return!1;const n=e;if(n.version!==MS||!n.preferences||typeof n.preferences.globalMute!="boolean"||typeof n.preferences.dnd!="boolean")return!1;const r=n.preferences.mutedTheaterIds;return!!r&&typeof r=="object"&&!Array.isArray(r)}function VS(){for(const e of Ip)e()}const lu="directory-browser-sectors";function YS({open:e,onCancel:n,onConfirm:r}){const[a,l]=H.useState(null),[f,m]=H.useState(null),[c,u]=H.useState(null),[h,y]=H.useState(""),[g,C]=H.useState(0),E=H.useRef(null),A=H.useRef(null),T=async(O,U)=>{m(O),u(null),y(""),C(0);try{const F=await HT(O,U);l(F)}catch(F){if(F instanceof DOMException&&F.name==="AbortError")return;u(F instanceof Ge?F.message:String(F))}finally{m(null)}};H.useEffect(()=>{if(!e)return;const O=new AbortController;return T(null,O.signal),()=>O.abort()},[e]),H.useEffect(()=>{e&&E.current?.focus()},[e,a?.path]);const p=a?.entries??[],v=H.useMemo(()=>{const O=h.trim().toLowerCase();return O===""?p:p.filter(U=>U.name.toLowerCase().includes(O))},[p,h]),d=H.useMemo(()=>a?vk(a):[],[a]),b=v.length===0?-1:Math.min(g,v.length-1);if(H.useEffect(()=>{if(b<0)return;A.current?.querySelector(`[data-index="${b}"]`)?.scrollIntoView({block:"nearest"})},[b,a?.path]),!e)return null;const x=O=>{O.accessible&&f===null&&T(O.path)},L=()=>{a?.parentPath!=null&&f===null&&T(a.parentPath)},R=a?.path??null,M=b>=0?`${lu}-${b}`:void 0,k=O=>{switch(O.key){case"Escape":h!==""?y(""):n();return;case"ArrowDown":O.preventDefault(),C(U=>Math.min(U+1,Math.max(v.length-1,0)));return;case"ArrowUp":O.preventDefault(),C(U=>Math.max(U-1,0));return;case"Enter":{O.preventDefault();const U=v[b];U&&x(U);return}case"Backspace":h===""&&(O.preventDefault(),L());return;default:return}};return P5.createPortal(S.jsxs("div",{className:"directory-browser-overlay",role:"presentation",children:[S.jsx("button",{type:"button",className:"directory-browser-scrim","aria-label":"Close",onClick:n}),S.jsxs("section",{className:"directory-browser-card",role:"dialog","aria-modal":"true","aria-label":"Establish Theater of Operations",onKeyDown:k,children:[S.jsxs("header",{className:"directory-browser-header",children:[S.jsx("span",{className:"directory-browser-sigil","aria-hidden":"true",children:S.jsx(yk,{})}),S.jsxs("div",{className:"directory-browser-heading",children:[S.jsx("span",{className:"directory-browser-kicker",children:"Theater of Operations"}),S.jsx("h2",{children:"Establish Theater"})]}),S.jsx("button",{type:"button",className:"directory-browser-close",onClick:n,"aria-label":"Close",children:"×"})]}),S.jsx("nav",{className:"directory-browser-course","aria-label":"Path",children:d.map((O,U)=>{const F=U===d.length-1;return S.jsxs("span",{className:"directory-browser-course-seg",children:[U>0?S.jsx("span",{className:"directory-browser-course-sep","aria-hidden":"true",children:"›"}):null,S.jsx("button",{type:"button",className:`directory-browser-crumb ${F?"is-current":""}`,"aria-current":F?"location":void 0,disabled:F||f!==null,title:O.path,onClick:()=>{T(O.path)},children:O.label})]},O.path)})}),S.jsxs("div",{className:"directory-browser-toolbar",children:[S.jsxs("div",{className:"directory-browser-filter",children:[S.jsx("span",{className:"directory-browser-filter-glyph","aria-hidden":"true",children:S.jsx(wk,{})}),S.jsx("input",{ref:E,type:"text",className:"directory-browser-filter-input",placeholder:"Filter sectors…","aria-label":"Filter folders","aria-controls":lu,value:h,spellCheck:!1,autoComplete:"off",onChange:O=>{y(O.target.value),C(0)}})]}),S.jsxs("button",{type:"button",className:"directory-browser-up",disabled:a?.parentPath==null||f!==null,title:"Up one sector (Backspace)",onClick:L,children:[S.jsx(Ck,{}),S.jsx("span",{children:"Up"})]})]}),c?S.jsx("p",{className:"directory-browser-error",role:"alert",children:c}):null,S.jsx("div",{className:"directory-browser-list",id:lu,role:"listbox","aria-label":"Folders","aria-busy":f!==null,"aria-activedescendant":M,ref:A,children:f!==null?S.jsxs("p",{className:"directory-browser-state is-live",children:[S.jsx("span",{className:"directory-browser-scan-dot","aria-hidden":"true"}),"Scouting…"]}):v.length===0?S.jsx("p",{className:"directory-browser-state",children:h!==""?"No sectors match the filter.":"No sectors to advance into."}):v.map((O,U)=>S.jsxs("div",{id:`${lu}-${U}`,"data-index":U,role:"option","aria-selected":U===b,"aria-disabled":!O.accessible,className:`directory-browser-sector ${U===b?"is-active":""} ${O.accessible?"":"is-locked"}`,title:O.path,onClick:()=>{C(U),x(O)},children:[S.jsx("span",{className:"directory-browser-sector-glyph","aria-hidden":"true",children:S.jsx(Sk,{})}),S.jsx("span",{className:"directory-browser-sector-name",children:O.name}),O.accessible?S.jsx("span",{className:"directory-browser-sector-advance","aria-hidden":"true",children:"›"}):S.jsxs("span",{className:"directory-browser-sector-lock",children:[S.jsx(xk,{})," Locked"]})]},O.path))}),a?.truncated?S.jsx("p",{className:"directory-browser-note",children:"Charting first 500 sectors only."}):null,S.jsxs("footer",{className:"directory-browser-actions",children:[S.jsxs("div",{className:"directory-browser-target",children:[S.jsx("span",{className:"directory-browser-target-label",children:"Theater Root"}),S.jsx("span",{className:"directory-browser-target-path",title:R??"",children:R??"Scouting…"})]}),S.jsxs("div",{className:"directory-browser-buttons",children:[S.jsx("button",{type:"button",className:"directory-browser-button",onClick:n,children:"Cancel"}),S.jsx("button",{type:"button",className:"directory-browser-button is-primary",disabled:R===null||f!==null,onClick:()=>R&&r(R),children:"Establish Theater"})]})]})]})]}),document.body)}function vk(e){if(bk(e)==="/"){const m=[{label:"/",path:"/"}];let c="";for(const u of e.path.split("/").filter(Boolean))c+=`/${u}`,m.push({label:u,path:c});return m}const r=/^([A-Za-z]:)\\?/.exec(e.path),a=r?`${r[1]}\\`:e.roots[0]??"C:\\",l=[{label:a,path:a}];let f=a.replace(/\\$/,"");for(const m of e.path.slice(a.length).split("\\").filter(Boolean))f+=`\\${m}`,l.push({label:m,path:f});return l}function bk(e){return e.roots.some(n=>/^[A-Za-z]:\\$/.test(n))||/^[A-Za-z]:\\/.test(e.path)?"\\":"/"}function yk(){return S.jsxs("svg",{viewBox:"0 0 20 20","aria-hidden":"true",children:[S.jsx("circle",{cx:"10",cy:"10",r:"6.6",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),S.jsx("circle",{cx:"10",cy:"10",r:"2.1",fill:"currentColor"}),S.jsx("path",{d:"M10 1.6v3.2M10 15.2v3.2M1.6 10h3.2M15.2 10h3.2",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}function Sk(){return S.jsx("svg",{viewBox:"0 0 18 18","aria-hidden":"true",children:S.jsx("path",{d:"M2.4 5.2c0-.7.6-1.3 1.3-1.3h2.7l1.4 1.5h6.5c.7 0 1.3.6 1.3 1.3v6.4c0 .7-.6 1.3-1.3 1.3H3.7c-.7 0-1.3-.6-1.3-1.3z",fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinejoin:"round"})})}function wk(){return S.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[S.jsx("circle",{cx:"7",cy:"7",r:"4.2",fill:"none",stroke:"currentColor",strokeWidth:"1.3"}),S.jsx("path",{d:"M10.2 10.2 13.5 13.5",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]})}function Ck(){return S.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:S.jsx("path",{d:"M8 12.5V4M4.5 7.5 8 4l3.5 3.5",fill:"none",stroke:"currentColor",strokeWidth:"1.35",strokeLinecap:"round",strokeLinejoin:"round"})})}function xk(){return S.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[S.jsx("rect",{x:"3.6",y:"7",width:"8.8",height:"6.2",rx:"1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),S.jsx("path",{d:"M5.6 7V5.4a2.4 2.4 0 0 1 4.8 0V7",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}const Ek=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(",");function Tk({state:e}){const[n,r]=H.useState(!1),a=H.useRef(null),l=H.useRef(null),f=H.useRef(null),m=e.theaters.length>0;if(H.useEffect(()=>{if(e.onboardingOpen)return a.current=document.activeElement,l.current?.focus(),()=>{const y=a.current;a.current=null,y?.focus?.()}},[e.onboardingOpen]),H.useEffect(()=>{if(!e.onboardingOpen)return;const y=g=>{n||(g.key==="Escape"?(g.preventDefault(),cl()):g.key==="Tab"&&Ak(g,f.current),g.stopImmediatePropagation())};return window.addEventListener("keydown",y,!0),()=>window.removeEventListener("keydown",y,!0)},[n,e.onboardingOpen]),!e.onboardingOpen)return null;const c=()=>{r(!0)},u=()=>{r(!1)},h=async y=>{r(!1),NS();try{const g=await dS(y),C=await hS(g);BS(C)}catch(g){zp(g instanceof Error?g.message:String(g))}};return S.jsxs("div",{className:"commissioning-overlay",role:"dialog","aria-modal":"true","aria-labelledby":"commissioning-title",children:[S.jsx("button",{type:"button",className:"commissioning-scrim",onClick:cl,"aria-label":"Close Commissioning guide"}),S.jsxs("section",{className:"commissioning-card",ref:f,children:[S.jsxs("header",{className:"commissioning-header",children:[S.jsx("span",{className:"commissioning-eyebrow",children:"COMMISSIONING · FLEET CONSOLE"}),S.jsx("h2",{id:"commissioning-title",children:"Bring your fleet online"}),S.jsx("p",{children:"Three steps to go from an empty bridge to live carrier operations."})]}),S.jsxs("ol",{className:"commissioning-steps",children:[S.jsxs("li",{className:`commissioning-step commissioning-step--primary ${m?"is-complete":"is-current"}`,children:[S.jsx("span",{className:"commissioning-step-node","aria-hidden":"true",children:m?"✓":"01"}),S.jsxs("div",{className:"commissioning-step-body",children:[S.jsx("h3",{children:"Register a Theater"}),S.jsx("p",{children:"A Theater is a project directory the fleet operates in. Choose the folder you want to work from."}),m?S.jsx(Dl,{ref:y=>{l.current=y},className:"commissioning-primary-action",to:"/operations",onClick:cl,children:"Go to Operations →"}):S.jsx("button",{ref:y=>{l.current=y},type:"button",className:"commissioning-primary-action is-live",disabled:e.addingTheater,onClick:c,children:e.addingTheater?"Adding Theater…":"Choose a folder…"}),e.theaterError?S.jsx("p",{className:"commissioning-error",role:"alert",children:e.theaterError}):null]})]}),S.jsxs("li",{className:"commissioning-step",children:[S.jsx("span",{className:"commissioning-step-node","aria-hidden":"true",children:"02"}),S.jsxs("div",{className:"commissioning-step-body",children:[S.jsx("h3",{children:"Open an Operation"}),S.jsx("p",{children:"An Operation is a live terminal session running an Agent CLI. Start one from the Operations tab to begin a working session."}),S.jsx(Dl,{className:"commissioning-secondary-link",to:"/operations",onClick:cl,children:"Go to Operations"})]})]}),S.jsxs("li",{className:"commissioning-step",children:[S.jsx("span",{className:"commissioning-step-node","aria-hidden":"true",children:"03"}),S.jsxs("div",{className:"commissioning-step-body",children:[S.jsx("h3",{children:"Observe carriers"}),S.jsx("p",{children:"Carriers are specialist agents your Admiral dispatches. Their sorties stream here in real time as they run."})]})]})]}),S.jsxs("footer",{className:"commissioning-footer",children:[S.jsx("p",{children:"Theaters with a Fleet Wiki knowledge root also unlock Codex — your decision log and reference library."}),S.jsx("button",{type:"button",className:"commissioning-skip",onClick:cl,children:"Skip for now"})]})]}),S.jsx(YS,{open:n,onCancel:u,onConfirm:h})]})}function Ak(e,n){if(!n)return;const r=Array.from(n.querySelectorAll(Ek)),a=r[0],l=r[r.length-1];!a||!l||(e.shiftKey&&document.activeElement===a?(e.preventDefault(),l.focus()):!e.shiftKey&&document.activeElement===l&&(e.preventDefault(),a.focus()))}function Fl(){return H.useSyncExternalStore(MA,Eb,Eb)}const kk={ended:"Stood down","input-waiting":"Awaiting orders"},XS="fleet-console.notificationsDockOpen",Nf=!1;function Rk(){const e=Fl(),n=Pl(),[r,a]=H.useState(Lk),[l,f]=H.useState(!1),m=H.useRef(null),c=H.useRef(null),u=H.useMemo(()=>Object.values(e.operationNotifications),[e.operationNotifications]),h=tA(e),y=nA(u,h).hidden,g=iA(y,e.notificationPreferences),C=gb(g),E=gb(y),A=C.reduce((O,U)=>O+U.totalCount,0),T=Db(C,"input-waiting"),p=Db(C,"ended");Dk(e.notificationPreferences);const v=C.length===0,d=v?"muted":T>0?"awaiting":"ended",b=H.useMemo(()=>g.reduce((O,U)=>Math.max(O,U.lastRaisedSeq),0),[g]),x=H.useRef(b),[L,R]=H.useState(0),M=H.useCallback(O=>{a(O),Mk(O)},[]);H.useEffect(()=>{b>x.current&&!r&&R(O=>O+1),x.current=b},[b,r]),H.useEffect(()=>{if(!r)return;const O=U=>{const F=U.target;if(!(F instanceof Node)){M(!1);return}c.current?.contains(F)||m.current?.contains(F)||M(!1)};return document.addEventListener("pointerdown",O),()=>{document.removeEventListener("pointerdown",O)}},[r,M]);const k=O=>{Ng(O.sessionId),n("/operations"),M(!1)};return r?S.jsx("div",{className:"notification-dock-layer",children:S.jsxs("aside",{ref:c,className:`notification-dock ${d==="awaiting"?"has-awaiting":""}`,"aria-live":"polite","aria-label":"Operation notifications",children:[S.jsxs("header",{className:"notification-dock-head",children:[S.jsx("span",{className:"notification-dock-eyebrow",children:"Notifications"}),v?null:S.jsxs("span",{className:"notification-dock-tallies","aria-hidden":"true",children:[T>0?S.jsx("span",{className:"notification-tally is-input-waiting",children:T}):null,p>0?S.jsx("span",{className:"notification-tally is-ended",children:p}):null]}),S.jsx("button",{type:"button",className:"notification-dock-icon",onClick:()=>f(!l),"aria-expanded":l,"aria-label":"Notification settings",title:"Notification settings",children:S.jsx(Bk,{})}),S.jsx("button",{type:"button",className:"notification-dock-icon",onClick:()=>M(!1),"aria-label":"Close notifications",title:"Close",children:S.jsx(Ik,{})})]}),l?S.jsx(Ok,{groups:E}):null,v?S.jsx("p",{className:"notification-dock-empty",children:"No active alerts"}):S.jsx("div",{className:"notification-dock-deck",children:C.map(O=>S.jsxs("section",{className:"notification-cluster-group",children:[S.jsxs("header",{className:"notification-cluster-group-head",children:[S.jsx("span",{className:"notification-cluster-theater",children:O.theaterLabel}),S.jsx("span",{className:"notification-cluster-group-count",children:O.totalCount})]}),S.jsx("ul",{className:"notification-cluster-roster",children:O.notifications.map(U=>S.jsxs("li",{className:`notification-row is-${U.kind}`,children:[S.jsx("span",{className:"notification-row-beacon","aria-hidden":"true"}),S.jsxs("span",{className:"notification-row-body",children:[S.jsx("span",{className:"notification-row-op",children:U.operationLabel}),S.jsx("span",{className:"notification-row-state",children:kk[U.kind]})]}),U.count>1?S.jsx("span",{className:"notification-row-count",children:U.count}):null,S.jsx("button",{type:"button",className:"notification-row-move",onClick:()=>k(U),"aria-label":`Open ${O.theaterLabel} ${U.operationLabel}`,children:"Open"})]},U.sessionId))})]},O.theaterId??"__unknown__"))})]})}):S.jsxs("button",{ref:m,type:"button",className:`notification-handle is-${d} ${d==="awaiting"?"has-awaiting":""}`,onClick:()=>M(!0),"aria-label":`Open notifications (${A})`,children:[S.jsx("span",{className:"notification-handle-count",children:v?0:A}),S.jsx("span",{className:"notification-handle-label",children:"Alerts"}),S.jsx(jk,{className:"notification-handle-chevron"}),L>0?S.jsx("span",{className:"notification-handle-pulse","aria-hidden":"true"},L):null]})}function Lk(){if(typeof window>"u")return Nf;try{const e=window.localStorage.getItem(XS);return e===null?Nf:e==="true"}catch{return Nf}}function Mk(e){if(!(typeof window>"u"))try{window.localStorage.setItem(XS,String(e))}catch{}}function Dk(e){return e.globalMute||e.dnd||Object.keys(e.mutedTheaterIds).length>0}function Db(e,n){let r=0;for(const a of e)for(const l of a.notifications)l.kind===n&&(r+=l.count);return r}function Ok({groups:e}){const n=Fl(),r=Nk(e,n.notificationPreferences.mutedTheaterIds,n.theaters);return S.jsxs("div",{className:"notification-cluster-settings",role:"dialog","aria-label":"Notification settings",children:[S.jsx("p",{className:"notification-cluster-settings-eyebrow",children:"Display"}),S.jsxs("label",{className:"notification-cluster-setting",children:[S.jsx("input",{type:"checkbox",checked:n.notificationPreferences.globalMute,onChange:a=>qA(a.currentTarget.checked)}),S.jsx("span",{children:"Mute all"})]}),S.jsxs("label",{className:"notification-cluster-setting",children:[S.jsx("input",{type:"checkbox",checked:n.notificationPreferences.dnd,onChange:a=>WA(a.currentTarget.checked)}),S.jsx("span",{children:"Do not disturb"})]}),r.length>0?S.jsx("p",{className:"notification-cluster-settings-eyebrow",children:"By Theater"}):null,r.map(a=>S.jsxs("label",{className:"notification-cluster-setting",children:[S.jsx("input",{type:"checkbox",checked:a.theaterId?n.notificationPreferences.mutedTheaterIds[a.theaterId]===!0:!1,onChange:()=>{a.theaterId&&GA(a.theaterId)}}),S.jsx("span",{children:a.theaterLabel})]},a.theaterId))]})}function Nk(e,n,r){const a=new Map;for(const l of e)l.theaterId&&a.set(l.theaterId,l);for(const l of Object.keys(n))a.has(l)||a.set(l,{theaterId:l,theaterLabel:r.find(f=>f.id===l)?.label??l,notifications:[],totalCount:0});return[...a.values()]}function Bk(){return S.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[S.jsx("path",{d:"M8 5.4a2.6 2.6 0 1 1 0 5.2 2.6 2.6 0 0 1 0-5.2Z",fill:"none",stroke:"currentColor",strokeWidth:"1.25"}),S.jsx("path",{d:"M8 2.2v1.6M8 12.2v1.6M3.9 3.9 5 5M11 11l1.1 1.1M2.2 8h1.6M12.2 8h1.6M3.9 12.1 5 11M11 5l1.1-1.1",fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"})]})}function Ik(){return S.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:S.jsx("path",{d:"M4 4l8 8M12 4l-8 8",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})}function jk({className:e}){return S.jsx("svg",{className:e,viewBox:"0 0 16 16","aria-hidden":"true",children:S.jsx("path",{d:"M6 4l4 4-4 4",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}const ZS=[{title:"Console",entries:[{combos:[["Mod","K"]],description:"Search Operations across Theaters"},{combos:[["Esc"]],description:"Close the open overlay or menu"}]},{title:"Operations",entries:[{combos:[["Esc"]],description:"Close the carrier job stream"},{combos:[["Shift","Enter"]],description:"Insert a newline in the terminal instead of submitting"},{combos:[["Enter"],["Esc"]],description:"Confirm or cancel a session rename"},{combos:[["↑"],["↓"]],description:"Move between Theater, Theme, and launch menu items"}]},{title:"Map",entries:[{combos:[["Alt","←"],["Alt","→"]],description:"Focus the previous / next Operation"},{combos:[["Drag"]],description:"Pan the operations map"},{combos:[["Shift","Drag"]],description:"Draw a new Operation terminal"},{combos:[["Space","Drag"]],description:"Pan even while a terminal has focus"},{combos:[["Scroll"]],description:"Zoom the map in or out"},{combos:[["Right-click"]],description:"Open the canvas actions menu"},{combos:[["Double-click"]],description:"Focus a panel from its title bar; rename from its name"},{combos:[["Click"]],description:"Clear terminal focus on the empty canvas"}]},{title:"Codex",entries:[{combos:[["Mod","K"]],description:"Toggle the command palette"},{combos:[["↑"],["↓"]],description:"Move through command palette results"},{combos:[["Enter"]],description:"Open the selected result"},{combos:[["Tab"]],description:"Move focus within the command palette"},{combos:[["Esc"]],description:"Close the command palette or diagram lightbox"},{combos:[["+"],["−"],["0"]],description:"Zoom the diagram lightbox in / out / reset"},{combos:[["F"]],description:"Fit the diagram lightbox to the viewport"}]}],zk=/mac|iphone|ipad|ipod/i,$k=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(",");function Pk({state:e}){const n=H.useRef(null),r=H.useRef(null),a=H.useRef(null);if(e.shortcutsOpen&&n.current===null&&(n.current=document.activeElement),H.useEffect(()=>{if(!e.shortcutsOpen)return;const f=m=>{m.key==="Escape"?(Df(),m.preventDefault()):m.key==="Tab"&&Uk(m,a.current),m.stopImmediatePropagation()};return r.current?.focus(),window.addEventListener("keydown",f,!0),()=>{window.removeEventListener("keydown",f,!0);const m=n.current;n.current=null,m?.focus?.()}},[e.shortcutsOpen]),!e.shortcutsOpen)return null;const l=Hk();return S.jsxs("div",{className:"shortcuts-overlay",role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",children:[S.jsx("button",{type:"button",className:"shortcuts-overlay-scrim",onClick:Df,"aria-label":"Close keyboard shortcuts"}),S.jsxs("section",{className:"shortcuts-overlay-card",ref:a,children:[S.jsxs("header",{className:"shortcuts-overlay-header",children:[S.jsx("span",{className:"shortcuts-overlay-kicker",children:"Reference Map"}),S.jsx("h2",{children:"Keyboard Shortcuts"})]}),S.jsx("button",{ref:r,type:"button",className:"shortcuts-overlay-close",onClick:Df,"aria-label":"Close keyboard shortcuts",children:"×"}),S.jsx("div",{className:"shortcuts-overlay-groups",children:ZS.map(f=>S.jsxs("section",{className:"shortcuts-group","aria-labelledby":`shortcuts-${f.title.toLowerCase()}`,children:[S.jsx("h3",{id:`shortcuts-${f.title.toLowerCase()}`,children:f.title}),S.jsx("dl",{className:"shortcuts-list",children:f.entries.map(m=>S.jsxs("div",{className:"shortcuts-entry",children:[S.jsx("dt",{className:"shortcuts-combos",children:m.combos.map((c,u)=>S.jsxs("span",{className:"shortcuts-combo",children:[u>0?S.jsx("span",{className:"shortcuts-combo-separator",children:"or"}):null,S.jsx("span",{className:"shortcuts-keyset",children:c.map(h=>S.jsx("kbd",{children:h==="Mod"?l:h},h))})]},`${m.description}:${c.join("+")}`))}),S.jsx("dd",{children:m.description})]},`${f.title}:${m.description}`))})]},f.title))})]})]})}function Hk(){const n=navigator.userAgentData?.platform??navigator.platform;return zk.test(n)?"⌘":"Ctrl"}function Uk(e,n){if(!n)return;const r=Array.from(n.querySelectorAll($k)),a=r[0],l=r[r.length-1];!a||!l||(e.shiftKey&&document.activeElement===a?(e.preventDefault(),l.focus()):!e.shiftKey&&document.activeElement===l&&(e.preventDefault(),a.focus()))}const Fk="a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex='-1'])",Ob="operation-search-listbox",JS="__unassigned__";function qk({state:e}){const n=Pl(),[r,a]=H.useState(""),[l,f]=H.useState(0),m=H.useRef(null),c=H.useRef(null),u=H.useRef(null),h=H.useRef(new Map),y=H.useMemo(()=>ik(e),[e]),g=H.useMemo(()=>pA(y,r),[y,r]),C=H.useMemo(()=>gA(g),[g]),E=H.useMemo(()=>wS(r),[r]),A=Nb(l,g.length),T=g[A]?Bb(g[A].sessionId):void 0;if(H.useEffect(()=>{if(!e.operationSearchOpen)return;u.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const d=document.body.style.overflow;return document.body.style.overflow="hidden",window.setTimeout(()=>m.current?.focus(),0),()=>{document.body.style.overflow=d,u.current?.focus()}},[e.operationSearchOpen]),H.useEffect(()=>{if(!e.operationSearchOpen){a(""),f(0);return}f(0)},[e.operationSearchOpen,r]),H.useEffect(()=>{if(!e.operationSearchOpen)return;const d=g[A];d&&h.current.get(d.sessionId)?.scrollIntoView({block:"nearest"})},[A,g,e.operationSearchOpen]),!e.operationSearchOpen)return null;const p=d=>{Ng(d),n("/operations"),Mf()},v=d=>{if(d.key==="Escape"){d.preventDefault(),Mf();return}if(d.key==="ArrowDown"||d.key==="ArrowUp"){d.preventDefault(),f(b=>Nb(b+(d.key==="ArrowDown"?1:-1),g.length));return}if(d.key==="Enter"){const b=g[A];if(!b)return;d.preventDefault(),p(b.sessionId);return}d.key==="Tab"&&Vk(d,c.current)};return S.jsx("div",{className:"operation-search-overlay",onMouseDown:d=>{d.target===d.currentTarget&&Mf()},children:S.jsxs("section",{ref:c,className:"operation-search-card",role:"dialog","aria-modal":"true","aria-label":"Operation quick search",tabIndex:-1,onKeyDown:v,children:[S.jsxs("div",{className:"operation-search-field",children:[S.jsx(Yk,{}),S.jsx("input",{ref:m,id:"operation-search-input",type:"search",value:r,onChange:d=>a(d.target.value),placeholder:"Search Operations across Theaters",autoComplete:"off",role:"combobox","aria-expanded":!0,"aria-controls":Ob,"aria-activedescendant":T,"aria-autocomplete":"list",spellCheck:!1}),S.jsx("kbd",{children:"esc"})]}),S.jsx("div",{id:Ob,className:"operation-search-results",role:"listbox","aria-label":"Operation results",children:C.length>0?C.map(d=>{const b=Gk(d.theaterId);return S.jsxs("section",{className:"operation-search-section",role:"group","aria-labelledby":b,children:[S.jsx("h2",{id:b,className:"operation-search-section-heading",children:Bf(d.theaterLabel,E)}),d.entries.map(x=>{const L=g.indexOf(x),R=L===A;return S.jsxs("button",{id:Bb(x.sessionId),ref:M=>{M?h.current.set(x.sessionId,M):h.current.delete(x.sessionId)},type:"button",className:`operation-search-result ${R?"is-active":""}`,role:"option","aria-selected":R,onMouseEnter:()=>f(L),onClick:()=>p(x.sessionId),children:[S.jsxs("span",{className:"operation-search-result-text",children:[S.jsx("strong",{children:Bf(x.operationName,E)}),S.jsx("small",{children:Wk(x)})]}),S.jsx("span",{className:"operation-search-theater",children:Bf(x.theaterLabel,E)})]},x.sessionId)})]},d.theaterId??JS)}):S.jsx("p",{className:"operation-search-empty",children:"No matching Operations."})})]})})}function Nb(e,n){return n<=0?0:Math.max(0,Math.min(e,n-1))}function Wk(e){return[e.cliLabel,e.status].filter(Boolean).join(" · ")}function Gk(e){return`operation-search-heading-${QS(e??JS)}`}function Bb(e){return`operation-search-option-${QS(e)}`}function QS(e){return e.replace(/[^a-zA-Z0-9_-]/g,"-")}function Bf(e,n){if(n.length===0)return e;const r=[];let a=0;for(;a<e.length;){const l=Kk(e,n,a);if(!l){r.push(e.slice(a));break}l.start>a&&r.push(e.slice(a,l.start)),r.push(S.jsx("mark",{children:e.slice(l.start,l.end)},`${l.start}-${l.end}`)),a=l.end}return r}function Kk(e,n,r){const a=e.toLocaleLowerCase();let l=null;for(const f of n){const m=a.indexOf(f,r);m!==-1&&(!l||m<l.start)&&(l={start:m,end:m+f.length})}return l}function Vk(e,n){if(!n)return;const r=Array.from(n.querySelectorAll(Fk)).filter(f=>f.offsetParent!==null);if(r.length===0)return;const a=r[0],l=r[r.length-1];if(e.shiftKey&&document.activeElement===a){e.preventDefault(),l?.focus();return}!e.shiftKey&&document.activeElement===l&&(e.preventDefault(),a?.focus())}function Yk(){return S.jsx("svg",{viewBox:"0 0 20 20","aria-hidden":"true",children:S.jsx("path",{d:"m14.2 14.2 3 3M8.9 15.2a6.3 6.3 0 1 1 0-12.6 6.3 6.3 0 0 1 0 12.6Z",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})})}function Xk({open:e,title:n,message:r,tone:a="info",onDismiss:l}){return e?S.jsx("div",{className:"app-toast-host",children:S.jsxs("div",{className:`app-toast app-toast--${a}`,role:"status","aria-live":"polite",children:[S.jsx("span",{className:"app-toast-dot","aria-hidden":"true"}),S.jsxs("div",{className:"app-toast-body",children:[S.jsx("p",{className:"app-toast-title",children:n}),r?S.jsx("p",{className:"app-toast-message",children:r}):null]}),l?S.jsx("button",{type:"button",className:"app-toast-close",onClick:l,"aria-label":"Dismiss notification",children:"×"}):null]})}):null}function Zk({state:e}){if(Pi===null)return null;const n=Pi.version===e.version&&e.version?` v${Pi.version}`:"";return S.jsx("button",{type:"button",className:"topbar-whatsnew-button",onMouseDown:r=>r.preventDefault(),onClick:YA,"aria-label":`What's new${n}`,title:`What's new${n}`,children:S.jsx("span",{children:"What's new"})})}const Jk=1400,Qk="https://github.com/sbluemin/fleet-harness",e3="https://github.com/sbluemin/fleet-harness/stargazers",t3="https://api.github.com/repos/sbluemin/fleet-harness",jg="fleet-console.github-stars",n3=360*60*1e3;function i3({state:e}){const n=e.connectionError!==null,r=Li().pathname,a=r.startsWith("/codex")?S.jsx(S3,{}):r.startsWith("/carrier-settings")?S.jsx(jb,{}):r.startsWith("/settings")?S.jsx(Ib,{}):r.startsWith("/operations")?S.jsx(y3,{}):S.jsx(b3,{});return S.jsxs("header",{className:"topbar",children:[S.jsxs("div",{className:"topbar-lead",children:[S.jsxs(Dl,{className:"topbar-brand",to:"/operations","aria-label":"Operations로 이동",children:[S.jsx("span",{className:`topbar-sigil ${n?"is-alert":""}`,"aria-hidden":"true",title:e.connectionError??void 0,children:a}),S.jsxs("h1",{className:"topbar-title",children:["Fleet",S.jsx("span",{className:"topbar-title-thin",children:"Console"})]})]}),S.jsxs("span",{className:"topbar-preview-badge",children:[S.jsx("span",{className:"topbar-preview-label",children:"Research Preview"}),e.version?S.jsxs("span",{className:"topbar-preview-version",children:["v",e.version]}):null]}),S.jsx(c3,{}),S.jsx(Zk,{state:e})]}),S.jsx(l3,{state:e}),S.jsxs("div",{className:"topbar-meta",children:[e.updateAvailable?S.jsx(r3,{latestVersion:e.latestVersion}):null,S.jsx("button",{type:"button",className:"topbar-icon-button topbar-shortcuts-button",onMouseDown:l=>l.preventDefault(),onClick:VA,"aria-label":"Keyboard shortcuts",title:"Keyboard shortcuts",children:S.jsx(E3,{})}),S.jsxs(vp,{to:"/carrier-settings",className:({isActive:l})=>`topbar-nav-link ${l?"is-active":""}`,title:"Carrier settings",children:[S.jsx("span",{className:"topbar-nav-icon","aria-hidden":"true",children:S.jsx(jb,{})}),S.jsx("span",{children:"Carriers"})]}),S.jsxs(vp,{to:"/settings",className:({isActive:l})=>`topbar-nav-link ${l?"is-active":""}`,title:"Settings",children:[S.jsx("span",{className:"topbar-nav-icon","aria-hidden":"true",children:S.jsx(Ib,{})}),S.jsx("span",{children:"Settings"})]})]})]})}function r3({latestVersion:e}){const[n,r]=H.useState("idle"),[a,l]=H.useState(null),f=H.useRef(null),m=s3(n,a,e);H.useEffect(()=>()=>{f.current!==null&&window.clearTimeout(f.current)},[]);const c=async()=>{if(!m.disabled){f.current!==null&&(window.clearTimeout(f.current),f.current=null),r("applying"),l(null);try{if((await PT()).status!=="accepted"){r("error"),l("invalid_response");return}r("accepted"),f.current=window.setTimeout(()=>{f.current=null,r("completed")},Jk)}catch(u){const h=u instanceof Ge?u.message:"network_error";l(h),r(o3(h)?"blocked":"error")}}};return S.jsx("button",{type:"button",className:`topbar-update-badge topbar-update-badge--${m.tone}`,onClick:c,disabled:m.disabled,title:m.title,"aria-live":"polite",children:m.label})}function s3(e,n,r){const a=r?`최신 버전 ${r}`:"업데이트 가능";return e==="applying"?{label:"요청 중",title:"업데이트 적용 요청을 보내는 중입니다.",tone:"live",disabled:!0}:e==="accepted"?{label:"업데이트 중",title:"서버가 곧 재시작되고 새 창에서 콘솔을 엽니다.",tone:"live",disabled:!0}:e==="completed"?{label:"완료: 새 창에서 계속",title:"새 창에서 재시작된 콘솔을 계속 사용하세요.",tone:"live",disabled:!0}:e==="blocked"?a3(n):e==="error"?{label:"재시도",title:"업데이트 요청에 실패했습니다. 다시 시도할 수 있습니다.",tone:"error",disabled:!1}:{label:"Update available",title:a,tone:"warn",disabled:!1}}function a3(e){return e==="local_channel"?{label:"로컬 빌드",title:"로컬 개발 빌드는 콘솔에서 업데이트하지 않습니다.",tone:"blocked",disabled:!0}:e==="active_terminal_sessions"?{label:"세션 종료 필요",title:"실행 중인 Operation을 종료한 뒤 업데이트하세요.",tone:"blocked",disabled:!1}:e==="update_already_in_progress"?{label:"이미 진행 중",title:"다른 업데이트 적용이 이미 진행 중입니다.",tone:"blocked",disabled:!0}:e==="update_not_available"?{label:"업데이트 없음",title:"서버 재확인 결과 적용할 업데이트가 없습니다.",tone:"blocked",disabled:!0}:{label:"콘솔 준비 안 됨",title:"콘솔이 업데이트를 시작할 준비가 되지 않았습니다. 잠시 뒤 다시 시도하세요.",tone:"error",disabled:!1}}function o3(e){return e==="active_terminal_sessions"||e==="local_channel"||e==="update_already_in_progress"||e==="update_not_available"}function l3({state:e}){const[n,r]=H.useState(!1),[a,l]=H.useState(!1),f=H.useRef(null),m=H.useRef(null),c=H.useRef(null),u=e.theaters.find(p=>p.id===e.activeTheaterId)??null,h=u?.label??(e.theaters.length===0?"No Theaters":"Theater");H.useEffect(()=>{if(!n)return;const p=d=>{f.current?.contains(d.target)||r(!1)},v=d=>{d.key==="Escape"&&(r(!1),m.current?.focus())};return document.addEventListener("mousedown",p),document.addEventListener("keydown",v),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",v)}},[n]),H.useEffect(()=>{if(!n)return;const p=c.current;if(!p)return;(p.querySelector('[data-active="true"]')??p.querySelector("[role^='menuitem']"))?.focus()},[n]);const y=p=>{$A(p),r(!1),m.current?.focus()},g=async()=>{r(!1),l(!0)},C=()=>{l(!1),PA()},E=async p=>{l(!1),NS();try{const v=await dS(p),d=await hS(v);BS(d)}catch(v){zp(v instanceof Error?v.message:String(v))}},A=async()=>{if(u){r(!1);try{await UT(u.id),Mb(u.id)}catch(p){if(p instanceof Ge&&p.status===404){Mb(u.id);return}zp(p instanceof Error?p.message:String(p))}}},T=p=>{if(p.key!=="ArrowDown"&&p.key!=="ArrowUp")return;p.preventDefault();const v=Array.from(c.current?.querySelectorAll("[role^='menuitem']")??[]);if(v.length===0)return;const d=v.indexOf(document.activeElement),b=p.key==="ArrowDown"?1:-1,x=(d+b+v.length)%v.length;v[x]?.focus()};return S.jsxs("div",{className:"theater-control",ref:f,children:[S.jsx("span",{className:"theater-eyebrow","aria-hidden":"true",children:"Theater"}),S.jsxs("button",{type:"button",ref:m,className:`theater-trigger ${n?"is-open":""}`,"aria-haspopup":"menu","aria-expanded":n,"aria-label":"Theater",title:u?.label??e.theaterError??void 0,onClick:()=>r(p=>!p),children:[S.jsx("span",{className:"theater-trigger-sigil","aria-hidden":"true",children:S.jsx(g3,{})}),S.jsx("span",{className:"theater-trigger-label",children:h}),S.jsx("span",{className:"theater-trigger-caret","aria-hidden":"true",children:S.jsx(m3,{})})]}),n?S.jsxs("div",{className:"theater-menu",role:"menu","aria-label":"Theater",ref:c,onKeyDown:T,children:[e.theaters.length>0?S.jsx("ul",{className:"theater-menu-list",children:e.theaters.map(p=>{const v=p.id===e.activeTheaterId;return S.jsx("li",{children:S.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":v,"data-active":v?"true":void 0,className:`theater-menu-item ${v?"is-active":""}`,title:p.label,onClick:()=>y(p.id),children:[S.jsx("span",{className:"theater-menu-check","aria-hidden":"true",children:v?S.jsx(_3,{}):null}),S.jsx("span",{className:"theater-menu-label",children:p.label})]})},p.id)})}):S.jsx("p",{className:"theater-menu-empty",children:"No Theaters yet."}),S.jsx("div",{className:"theater-menu-divider",role:"separator"}),u?S.jsxs(S.Fragment,{children:[S.jsxs("button",{type:"button",role:"menuitem",className:"theater-menu-item theater-menu-forget",onClick:A,children:[S.jsx("span",{className:"theater-menu-check","aria-hidden":"true",children:S.jsx(v3,{})}),S.jsx("span",{className:"theater-menu-label",children:"Forget Theater"})]}),S.jsx("div",{className:"theater-menu-divider",role:"separator"})]}):null,S.jsxs("button",{type:"button",role:"menuitem",className:"theater-menu-item theater-menu-add",disabled:e.addingTheater,onClick:g,children:[S.jsx("span",{className:"theater-menu-check","aria-hidden":"true",children:S.jsx(w3,{})}),S.jsx("span",{className:"theater-menu-label",children:e.addingTheater?"Adding Theater…":"Add Theater…"})]}),e.theaterError?S.jsx("p",{className:"theater-menu-error",children:e.theaterError}):null]}):null,S.jsx(YS,{open:a,onCancel:C,onConfirm:E})]})}function c3(){const e=u3(),n=e.count!==null;return S.jsxs("div",{className:"topbar-github",role:"group","aria-label":"GitHub",children:[S.jsx("a",{className:"topbar-github-link",href:Qk,target:"_blank",rel:"noopener noreferrer","aria-label":"GitHub 저장소 열기",title:"GitHub 저장소",children:S.jsx(C3,{})}),S.jsxs("a",{className:"topbar-github-stars",href:e3,target:"_blank",rel:"noopener noreferrer","aria-label":n?`GitHub 스타 ${e.count.toLocaleString()}개 — 스타 누르기`:"GitHub에서 스타 누르기",title:"GitHub에서 스타 누르기",children:[S.jsx(x3,{}),n?S.jsx("span",{className:"topbar-github-stars-count",children:p3(e.count)}):null]})]})}function u3(){const[e,n]=H.useState(()=>{const r=h3();return r===null?{count:null,status:"idle"}:{count:r,status:"ready"}});return H.useEffect(()=>{if(d3())return;let r=!1;return n(a=>a.status==="ready"?a:{...a,status:"loading"}),fetch(t3,{headers:{Accept:"application/vnd.github+json"}}).then(a=>a.ok?a.json():Promise.reject(new Error(`status ${a.status}`))).then(a=>{if(r)return;const l=typeof a.stargazers_count=="number"?a.stargazers_count:null;if(l===null){n(f=>({count:f.count,status:f.count===null?"error":"ready"}));return}f3(l),n({count:l,status:"ready"})}).catch(()=>{r||n(a=>({count:a.count,status:a.count===null?"error":"ready"}))}),()=>{r=!0}},[]),e}function h3(){try{const e=window.localStorage.getItem(jg);if(!e)return null;const n=JSON.parse(e);return typeof n.count=="number"?n.count:null}catch{return null}}function d3(){try{const e=window.localStorage.getItem(jg);if(!e)return!1;const n=JSON.parse(e);return typeof n.at=="number"&&Date.now()-n.at<n3}catch{return!1}}function f3(e){try{window.localStorage.setItem(jg,JSON.stringify({count:e,at:Date.now()}))}catch{}}function p3(e){if(e<1e3)return String(e);const n=e/1e3;return n<10?`${n.toFixed(1)}k`:`${Math.round(n)}k`}function g3(){return S.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[S.jsx("circle",{cx:"8",cy:"3.2",r:"1.5",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),S.jsx("path",{d:"M8 4.7v8.1M4.3 8.2H11.7M3.4 9.1A4.7 4.7 0 0 0 12.6 9.1",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}function m3(){return S.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:S.jsx("path",{d:"M4.5 6.5 8 10l3.5-3.5",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})}function _3(){return S.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:S.jsx("path",{d:"M3.5 8.5 6.5 11.5 12.5 5",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function v3(){return S.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:S.jsx("path",{d:"M4.7 4.7 11.3 11.3M11.3 4.7 4.7 11.3",fill:"none",stroke:"currentColor",strokeWidth:"1.35",strokeLinecap:"round"})})}function b3(){return S.jsxs("svg",{viewBox:"0 0 16 16",width:"16",height:"16",children:[S.jsx("path",{d:"M8 1.8 9.5 6.5 14.2 8 9.5 9.5 8 14.2 6.5 9.5 1.8 8 6.5 6.5Z",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),S.jsx("path",{d:"M8 4.7 8.7 7.3 11.3 8 8.7 8.7 8 11.3 7.3 8.7 4.7 8 7.3 7.3Z",fill:"currentColor"})]})}function y3(){return S.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[S.jsx("circle",{cx:"8",cy:"8",r:"5.4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),S.jsx("path",{d:"M8 3.7v2.1M8 10.2v2.1M3.7 8h2.1M10.2 8h2.1M8 8l3.1-2.1",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),S.jsx("circle",{cx:"8",cy:"8",r:"1.1",fill:"currentColor"})]})}function S3(){return S.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[S.jsx("circle",{cx:"12",cy:"12",r:"9"}),S.jsx("circle",{cx:"12",cy:"12",r:"3.2",fill:"currentColor",stroke:"none",opacity:"0.16"}),S.jsx("path",{d:"M12 3v3.6M12 17.4V21M3 12h3.6M17.4 12H21"}),S.jsx("path",{d:"M12 8.6 14.2 12 12 15.4 9.8 12Z",fill:"currentColor",stroke:"none"})]})}function Ib(){return S.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[S.jsx("path",{d:"M3 4.4h10M3 8h10M3 11.6h10",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),S.jsx("circle",{cx:"6.2",cy:"4.4",r:"1.3",fill:"var(--surface-glass-strong)",stroke:"currentColor",strokeWidth:"1.2"}),S.jsx("circle",{cx:"10",cy:"8",r:"1.3",fill:"var(--surface-glass-strong)",stroke:"currentColor",strokeWidth:"1.2"}),S.jsx("circle",{cx:"7.4",cy:"11.6",r:"1.3",fill:"var(--surface-glass-strong)",stroke:"currentColor",strokeWidth:"1.2"})]})}function jb(){return S.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[S.jsx("circle",{cx:"4",cy:"4.2",r:"1.15",fill:"currentColor"}),S.jsx("circle",{cx:"4",cy:"8",r:"1.15",fill:"currentColor"}),S.jsx("circle",{cx:"4",cy:"11.8",r:"1.15",fill:"currentColor"}),S.jsx("path",{d:"M7.2 4.2h6M7.2 8h6M7.2 11.8h6",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}function w3(){return S.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:S.jsx("path",{d:"M8 3.4v9.2M3.4 8h9.2",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})}function C3(){return S.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:S.jsx("path",{fill:"currentColor",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82a7.65 7.65 0 0 1 2-.27c.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z"})})}function x3(){return S.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:S.jsx("path",{d:"M8 2.2 9.41 6.26 13.71 6.35 10.28 8.94 11.53 13.05 8 10.6 4.47 13.05 5.72 8.94 2.29 6.35 6.59 6.26Z",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})})}function E3(){return S.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[S.jsx("rect",{x:"2.4",y:"4.1",width:"11.2",height:"7.8",rx:"1.8",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),S.jsx("path",{d:"M4.5 6.3h.1M6.8 6.3h.1M9.1 6.3h.1M11.4 6.3h.1M4.5 8.2h.1M6.8 8.2h.1M9.1 8.2h.1M11.4 8.2h.1M5.8 10.1h4.4",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}const T3=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(",");function A3({state:e}){const n=H.useRef(null),r=H.useRef(null),a=H.useRef(null),l=!e.bootstrapped||e.onboardingOpen||e.operationSearchOpen||e.shortcutsOpen||e.timelineOpen;return e.whatsNewOpen&&!l&&n.current===null&&(n.current=document.activeElement),H.useEffect(()=>{if(!e.whatsNewOpen||l)return;const f=m=>{m.key==="Escape"?(m.preventDefault(),au()):m.key==="Tab"&&R3(m,a.current),m.stopImmediatePropagation()};return r.current?.focus(),window.addEventListener("keydown",f,!0),()=>{window.removeEventListener("keydown",f,!0);const m=n.current;n.current=null,m?.focus?.()}},[e.whatsNewOpen,l]),!e.whatsNewOpen||l||Pi===null?null:S.jsxs("div",{className:"whatsnew-overlay",role:"dialog","aria-modal":"true","aria-labelledby":"whatsnew-title",children:[S.jsx("button",{type:"button",className:"whatsnew-scrim",onClick:au,"aria-label":"Close What's new"}),S.jsxs("section",{className:"whatsnew-card",ref:a,children:[S.jsxs("header",{className:"whatsnew-header",children:[S.jsxs("div",{className:"whatsnew-heading-row",children:[S.jsx("h2",{id:"whatsnew-title",children:"What's new"}),S.jsxs("span",{className:"whatsnew-version-badge",children:["v",Pi.version]})]}),S.jsxs("time",{className:"whatsnew-date",dateTime:Pi.date,children:["Released ",Pi.date]})]}),S.jsx("button",{ref:r,type:"button",className:"whatsnew-close",onClick:au,"aria-label":"Close What's new",children:"x"}),S.jsx("div",{className:"whatsnew-body",children:Pi.sections.map((f,m)=>S.jsx(k3,{section:f,index:m},f.heading))}),S.jsx("footer",{className:"whatsnew-footer",children:S.jsx("button",{type:"button",className:"whatsnew-done",onClick:au,children:"Close"})})]})]})}function k3({section:e,index:n}){const r=e.heading.toLowerCase().replaceAll(" ","-"),a={"--whatsnew-delay":`${n*55}ms`};return S.jsxs("section",{className:`whatsnew-section whatsnew-section--${r}`,style:a,children:[S.jsx("h3",{children:S.jsx("span",{className:"whatsnew-section-chip",children:e.heading})}),S.jsx("ul",{children:e.items.map(l=>S.jsx("li",{children:l},l))})]})}function R3(e,n){if(!n)return;const r=Array.from(n.querySelectorAll(T3)),a=r[0],l=r[r.length-1];!a||!l||(e.shiftKey&&document.activeElement===a?(e.preventDefault(),l.focus()):!e.shiftKey&&document.activeElement===l&&(e.preventDefault(),a.focus()))}const L3=new Set(["idle_prompt","permission_prompt","auth_success","elicitation_dialog","elicitation_complete","elicitation_response"]);function M3(){let e="";return n=>{e+=n;const r=[];let a=e.indexOf(`
13
13
 
14
14
  `);for(;a>=0;){const l=e.slice(0,a);e=e.slice(a+2);const f=O3(l);f&&r.push(f),a=e.indexOf(`
15
15
 
@@ -215,7 +215,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Ot=me,at=Me),Oe===void
215
215
  </dl>
216
216
  ${u?`<div class="manifest-actions">${u}</div>`:""}
217
217
  </details>
218
- `}const a6="modulepreload",o6=function(e){return"/console/"+e},y1={},l6=function(n,r,a){let l=Promise.resolve();if(r&&r.length>0){let u=function(h){return Promise.all(h.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const m=document.querySelector("meta[property=csp-nonce]"),c=m?.nonce||m?.getAttribute("nonce");l=u(r.map(h=>{if(h=o6(h),h in y1)return;y1[h]=!0;const y=h.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const C=document.createElement("link");if(C.rel=y?"stylesheet":a6,y||(C.as="script"),C.crossOrigin="",C.href=h,c&&C.setAttribute("nonce",c),document.head.appendChild(C),y)return new Promise((E,A)=>{C.addEventListener("load",E),C.addEventListener("error",()=>A(new Error(`Unable to preload CSS for ${h}`)))})}))}function f(m){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=m,window.dispatchEvent(c),!c.defaultPrevented)throw m}return l.then(m=>{for(const c of m||[])c.status==="rejected"&&f(c.reason);return n().catch(f)})},c6=".diagram-block[data-mermaid-source]:not([data-diagram-state='rendered']):not([data-diagram-state='error'])",u6=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(","),h6=/^on/i,d6={USE_PROFILES:{svg:!0,svgFilters:!1},FORBID_TAGS:["foreignObject","script"],FORBID_ATTR:["href","xlink:href"]},S1="diagramInteractionBound",f6=/^oklch\s*\(\s*([^)]+)\s*\)$/i,p6=/^(-?\d+(?:\.\d+)?)(deg)?$/i,Ai=[25,50,75,100,125,150,200],g6=["pie1","pie2","pie3","pie4","pie5","pie6","pie7","pie8","pie9","pie10","pie11","pie12"];let Wf=null,w1=!1,m6=0,_6=0,Bl=null;function _s(e){const n=e.trim();if(!n)return n;const r=P6(n);return r?H6(r):n}function v6(e){if(w1)return;w1=!0,C1(e);const n=e instanceof Node?e:document.body;new MutationObserver(a=>{let l=!1;for(const f of a)if(f.type==="childList"){Bl&&!Bl.trigger.isConnected&&Cl(!1);for(const m of f.addedNodes)if(m instanceof Element&&(m.matches?.(".diagram-block[data-mermaid-source]")||m.querySelector?.(".diagram-block[data-mermaid-source]"))){l=!0;break}if(l)break}l&&C1(e)}).observe(n,{childList:!0,subtree:!0})}function C1(e){const n=e.querySelectorAll(c6);for(const r of n)r.dataset.diagramHydrating!=="true"&&(r.dataset.diagramHydrating="true",r.dataset.diagramState="pending",b6(r))}async function b6(e){const n=e.getAttribute("data-mermaid-source")??"";let r="";try{r=UM(n)}catch{Gf(e,"Invalid diagram source");return}if(!r.trim()){Gf(e,"Empty diagram source");return}try{const a=await S6(),l=`mermaid-diagram-${++m6}`,{svg:f}=await a.render(l,r);e.innerHTML=y6(f),x6(e,f),E6(e),T6(e),e.dataset.diagramState="rendered"}catch(a){const l=a instanceof Error?a.message:String(a);Gf(e,l)}}function Gf(e,n){e.dataset.diagramState="error",e.textContent=`Diagram render failed: ${n}`}function y6(e){const n=(r,a)=>{h6.test(a.attrName)&&(a.keepAttr=!1)};Rl.addHook("uponSanitizeAttribute",n);try{return Rl.sanitize(e,d6)}finally{Rl.removeHook("uponSanitizeAttribute",n)}}async function S6(){return Wf||(Wf=(async()=>{const e=await l6(()=>import("./mermaid.core-pNTEyfuV.js").then(r=>r.bC),[]),n=e.default??e;return n.initialize({securityLevel:"strict",htmlLabels:!1,suppressErrorRendering:!0,startOnLoad:!1,theme:"base",look:"handDrawn",themeVariables:w6(),themeCSS:C6(),flowchart:{htmlLabels:!1,useMaxWidth:!1}}),n})()),Wf}function w6(){const e=getComputedStyle(document.documentElement),n=(T,p)=>{const v=e.getPropertyValue(T).trim();return _s(v||p)},r=(T,p)=>e.getPropertyValue(T).trim()||p,a=n("--brass","#c69a4a"),l=n("--brass-bright","#e6b86a"),f=n("--brass-deep","#a0782a"),m=n("--aurora","#8bd7e6"),c=n("--aurora-deep","#1f8aa8"),u=n("--coral","#ef7c63"),h=n("--ink-deep","#1d2734"),y=n("--ink-fog","#a6afbb"),g=n("--ink-pearl","#e6e9ef"),C=n("--ink-spectral","#bcc4d0"),E=[l,a,m,u,_s("oklch(70% 0.11 68)"),c,_s("oklch(76% 0.09 205)"),f,_s("oklch(68% 0.14 30)"),y,_s("oklch(62% 0.08 228)"),_s("oklch(52% 0.05 248)")],A=Object.fromEntries(g6.map((T,p)=>[T,E[p]??h]));return{background:"transparent",primaryColor:"transparent",primaryTextColor:g,primaryBorderColor:a,secondaryColor:"transparent",secondaryTextColor:g,secondaryBorderColor:l,tertiaryColor:"transparent",tertiaryTextColor:C,tertiaryBorderColor:a,lineColor:c,edgeLabelBackground:"transparent",titleColor:l,fontFamily:"JetBrains Mono Variable, ui-monospace, monospace",mainBkg:"transparent",nodeBorder:a,clusterBkg:"transparent",clusterBorder:a,pieTitleTextColor:l,pieTitleTextSize:r("--font-size-title-lg","19px"),pieSectionTextColor:g,pieSectionTextSize:r("--font-size-md","13px"),pieLegendTextColor:g,pieLegendTextSize:r("--font-size-lg","14px"),pieStrokeColor:f,pieStrokeWidth:"1.35px",pieOuterStrokeColor:l,pieOuterStrokeWidth:"2.5px",pieOpacity:"0.96",...A}}function C6(){const e=getComputedStyle(document.documentElement),n=(h,y)=>{const g=e.getPropertyValue(h).trim();return _s(g||y)},r=n("--brass-deep","#a0782a"),a=n("--brass-bright","#e6b86a"),l=n("--aurora-deep","#1f8aa8"),f=n("--ink-abyss","#131920"),m=_s("oklch(15% 0.04 250 / 34%)"),c=n("--surface-glass","#1d2734"),u=n("--ink-pearl","#e6e9ef");return`
218
+ `}const a6="modulepreload",o6=function(e){return"/console/"+e},y1={},l6=function(n,r,a){let l=Promise.resolve();if(r&&r.length>0){let u=function(h){return Promise.all(h.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const m=document.querySelector("meta[property=csp-nonce]"),c=m?.nonce||m?.getAttribute("nonce");l=u(r.map(h=>{if(h=o6(h),h in y1)return;y1[h]=!0;const y=h.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const C=document.createElement("link");if(C.rel=y?"stylesheet":a6,y||(C.as="script"),C.crossOrigin="",C.href=h,c&&C.setAttribute("nonce",c),document.head.appendChild(C),y)return new Promise((E,A)=>{C.addEventListener("load",E),C.addEventListener("error",()=>A(new Error(`Unable to preload CSS for ${h}`)))})}))}function f(m){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=m,window.dispatchEvent(c),!c.defaultPrevented)throw m}return l.then(m=>{for(const c of m||[])c.status==="rejected"&&f(c.reason);return n().catch(f)})},c6=".diagram-block[data-mermaid-source]:not([data-diagram-state='rendered']):not([data-diagram-state='error'])",u6=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(","),h6=/^on/i,d6={USE_PROFILES:{svg:!0,svgFilters:!1},FORBID_TAGS:["foreignObject","script"],FORBID_ATTR:["href","xlink:href"]},S1="diagramInteractionBound",f6=/^oklch\s*\(\s*([^)]+)\s*\)$/i,p6=/^(-?\d+(?:\.\d+)?)(deg)?$/i,Ai=[25,50,75,100,125,150,200],g6=["pie1","pie2","pie3","pie4","pie5","pie6","pie7","pie8","pie9","pie10","pie11","pie12"];let Wf=null,w1=!1,m6=0,_6=0,Bl=null;function _s(e){const n=e.trim();if(!n)return n;const r=P6(n);return r?H6(r):n}function v6(e){if(w1)return;w1=!0,C1(e);const n=e instanceof Node?e:document.body;new MutationObserver(a=>{let l=!1;for(const f of a)if(f.type==="childList"){Bl&&!Bl.trigger.isConnected&&Cl(!1);for(const m of f.addedNodes)if(m instanceof Element&&(m.matches?.(".diagram-block[data-mermaid-source]")||m.querySelector?.(".diagram-block[data-mermaid-source]"))){l=!0;break}if(l)break}l&&C1(e)}).observe(n,{childList:!0,subtree:!0})}function C1(e){const n=e.querySelectorAll(c6);for(const r of n)r.dataset.diagramHydrating!=="true"&&(r.dataset.diagramHydrating="true",r.dataset.diagramState="pending",b6(r))}async function b6(e){const n=e.getAttribute("data-mermaid-source")??"";let r="";try{r=UM(n)}catch{Gf(e,"Invalid diagram source");return}if(!r.trim()){Gf(e,"Empty diagram source");return}try{const a=await S6(),l=`mermaid-diagram-${++m6}`,{svg:f}=await a.render(l,r);e.innerHTML=y6(f),x6(e,f),E6(e),T6(e),e.dataset.diagramState="rendered"}catch(a){const l=a instanceof Error?a.message:String(a);Gf(e,l)}}function Gf(e,n){e.dataset.diagramState="error",e.textContent=`Diagram render failed: ${n}`}function y6(e){const n=(r,a)=>{h6.test(a.attrName)&&(a.keepAttr=!1)};Rl.addHook("uponSanitizeAttribute",n);try{return Rl.sanitize(e,d6)}finally{Rl.removeHook("uponSanitizeAttribute",n)}}async function S6(){return Wf||(Wf=(async()=>{const e=await l6(()=>import("./mermaid.core-Ddi7z3V3.js").then(r=>r.bC),[]),n=e.default??e;return n.initialize({securityLevel:"strict",htmlLabels:!1,suppressErrorRendering:!0,startOnLoad:!1,theme:"base",look:"handDrawn",themeVariables:w6(),themeCSS:C6(),flowchart:{htmlLabels:!1,useMaxWidth:!1}}),n})()),Wf}function w6(){const e=getComputedStyle(document.documentElement),n=(T,p)=>{const v=e.getPropertyValue(T).trim();return _s(v||p)},r=(T,p)=>e.getPropertyValue(T).trim()||p,a=n("--brass","#c69a4a"),l=n("--brass-bright","#e6b86a"),f=n("--brass-deep","#a0782a"),m=n("--aurora","#8bd7e6"),c=n("--aurora-deep","#1f8aa8"),u=n("--coral","#ef7c63"),h=n("--ink-deep","#1d2734"),y=n("--ink-fog","#a6afbb"),g=n("--ink-pearl","#e6e9ef"),C=n("--ink-spectral","#bcc4d0"),E=[l,a,m,u,_s("oklch(70% 0.11 68)"),c,_s("oklch(76% 0.09 205)"),f,_s("oklch(68% 0.14 30)"),y,_s("oklch(62% 0.08 228)"),_s("oklch(52% 0.05 248)")],A=Object.fromEntries(g6.map((T,p)=>[T,E[p]??h]));return{background:"transparent",primaryColor:"transparent",primaryTextColor:g,primaryBorderColor:a,secondaryColor:"transparent",secondaryTextColor:g,secondaryBorderColor:l,tertiaryColor:"transparent",tertiaryTextColor:C,tertiaryBorderColor:a,lineColor:c,edgeLabelBackground:"transparent",titleColor:l,fontFamily:"JetBrains Mono Variable, ui-monospace, monospace",mainBkg:"transparent",nodeBorder:a,clusterBkg:"transparent",clusterBorder:a,pieTitleTextColor:l,pieTitleTextSize:r("--font-size-title-lg","19px"),pieSectionTextColor:g,pieSectionTextSize:r("--font-size-md","13px"),pieLegendTextColor:g,pieLegendTextSize:r("--font-size-lg","14px"),pieStrokeColor:f,pieStrokeWidth:"1.35px",pieOuterStrokeColor:l,pieOuterStrokeWidth:"2.5px",pieOpacity:"0.96",...A}}function C6(){const e=getComputedStyle(document.documentElement),n=(h,y)=>{const g=e.getPropertyValue(h).trim();return _s(g||y)},r=n("--brass-deep","#a0782a"),a=n("--brass-bright","#e6b86a"),l=n("--aurora-deep","#1f8aa8"),f=n("--ink-abyss","#131920"),m=_s("oklch(15% 0.04 250 / 34%)"),c=n("--surface-glass","#1d2734"),u=n("--ink-pearl","#e6e9ef");return`
219
219
  .node rect, .node polygon, .node circle, .node ellipse, .actor, .classGroup rect {
220
220
  stroke: ${r};
221
221
  fill: ${c};