@undefineds.co/xpod 0.4.9 → 0.4.10

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 (96) hide show
  1. package/dist/identity/drizzle/PodLookupRepository.d.ts +5 -16
  2. package/dist/identity/drizzle/PodLookupRepository.js +40 -201
  3. package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsMain.js +1 -0
  4. package/node_modules/@undefineds.co/ai-connections/dist/controller.d.ts +1 -0
  5. package/node_modules/@undefineds.co/ai-connections/dist/controller.js +94 -16
  6. package/node_modules/@undefineds.co/solid-sdk/dist/index.cjs +112 -11
  7. package/node_modules/@undefineds.co/solid-sdk/dist/session.d.ts +2 -0
  8. package/node_modules/@undefineds.co/solid-sdk/dist/session.js +135 -11
  9. package/package.json +2 -2
  10. package/static/app/assets/main.js +12 -12
  11. package/static/auth-callback/assets/{AiConfigContext-DJKvxduw.js → AiConfigContext-C81deMM9.js} +1 -1
  12. package/static/auth-callback/assets/{AiConfigPage-DgGmHb18.js → AiConfigPage-evWI8T56.js} +1 -1
  13. package/static/auth-callback/assets/{DocumentProcessingPanel-CJmxu8x1.js → DocumentProcessingPanel-B9GrDEMe.js} +1 -1
  14. package/static/auth-callback/assets/{IndexLifecyclePanel-byCa7h7L.js → IndexLifecyclePanel-qCo8ABQZ.js} +1 -1
  15. package/static/auth-callback/assets/{IndexSubjectPanel-CDwT4Yx1.js → IndexSubjectPanel-C4YG0whI.js} +1 -1
  16. package/static/auth-callback/assets/{ModelAssignmentsPanel-CwM3k8w7.js → ModelAssignmentsPanel-DG7Lxh3t.js} +1 -1
  17. package/static/auth-callback/assets/ModelsPage-CgEuqE6p.js +10 -0
  18. package/static/auth-callback/assets/{NetworkPage-DkVgxtNj.js → NetworkPage-Cbdn_P1e.js} +1 -1
  19. package/static/auth-callback/assets/{PaneListHeader-DRI0hjmt.js → PaneListHeader-jy70Q00L.js} +1 -1
  20. package/static/auth-callback/assets/{SearchIndexingPanel-mbppDZFE.js → SearchIndexingPanel-ByU3u7kp.js} +1 -1
  21. package/static/auth-callback/assets/{StatusSubjectPanel-DNsW76aC.js → StatusSubjectPanel-hfjoB5aS.js} +1 -1
  22. package/static/auth-callback/assets/{StatusWorkspace-DGcTbHT5.js → StatusWorkspace-BZd617sV.js} +1 -1
  23. package/static/auth-callback/assets/{SystemSettingsPage-C6qklJ9k.js → SystemSettingsPage-BirzWAQM.js} +1 -1
  24. package/static/auth-callback/assets/{SystemSettingsSubjectPanel-B4VV9xkG.js → SystemSettingsSubjectPanel-CmsVWNCx.js} +1 -1
  25. package/static/auth-callback/assets/{activity-Ck-Mfxxo.js → activity-BcsZZxxw.js} +1 -1
  26. package/static/auth-callback/assets/{auth-callback-DG4Ge40c.js → auth-callback-atKg_oig.js} +124 -124
  27. package/static/auth-callback/assets/{badge-GSSnw1VV.js → badge-BWbRHThQ.js} +1 -1
  28. package/static/auth-callback/assets/{download-BYyRX-K2.js → download-BmvG1Vya.js} +1 -1
  29. package/static/auth-callback/assets/{external-link-WEC0Ki-0.js → external-link-DZ34d3g3.js} +1 -1
  30. package/static/auth-callback/assets/{index-kju2k4Dp.js → index-BpV1hsqs.js} +1 -1
  31. package/static/auth-callback/assets/{index-DlsMCgo8.js → index-D9oE6FXK.js} +1 -1
  32. package/static/auth-callback/assets/{index-browser-D8YW6coF.js → index-browser-B9Z7GU-T.js} +1 -1
  33. package/static/auth-callback/assets/{key-round-DJUT5Nh0.js → key-round-tjP76Se-.js} +1 -1
  34. package/static/auth-callback/assets/{rotate-ccw-CXwfZUKU.js → rotate-ccw-C_L5ZLx1.js} +1 -1
  35. package/static/auth-callback/assets/{skeleton-DWPtNhUB.js → skeleton-C7tGDQIs.js} +1 -1
  36. package/static/auth-callback/assets/{waypoints-l1oDnRJ0.js → waypoints-VMNQlWdU.js} +1 -1
  37. package/static/auth-callback/assets/{workspace-layout-B7iKpK-Q.js → workspace-layout-SAp6BtYK.js} +1 -1
  38. package/static/auth-callback/auth-callback.html +1 -1
  39. package/static/dashboard/assets/{AiConfigContext-U0cCSY28.js → AiConfigContext-De-OtAWo.js} +1 -1
  40. package/static/dashboard/assets/{AiConfigPage-CMi0uJdo.js → AiConfigPage-macP4Mop.js} +1 -1
  41. package/static/dashboard/assets/{DocumentProcessingPanel-DEZiEpft.js → DocumentProcessingPanel-C5ObvCCl.js} +1 -1
  42. package/static/dashboard/assets/{IndexLifecyclePanel-CGZfLUog.js → IndexLifecyclePanel-xVNa2l40.js} +1 -1
  43. package/static/dashboard/assets/{IndexSubjectPanel-DiDZauHk.js → IndexSubjectPanel-DQFPP6-p.js} +1 -1
  44. package/static/dashboard/assets/{ModelAssignmentsPanel-DaGGZKuf.js → ModelAssignmentsPanel-DMOATFpQ.js} +1 -1
  45. package/static/dashboard/assets/ModelsPage-91UbnETA.js +25 -0
  46. package/static/dashboard/assets/{NetworkPage-DI5-O7GT.js → NetworkPage-CHQ3YxIB.js} +1 -1
  47. package/static/dashboard/assets/{PaneListHeader-4oa7uf59.js → PaneListHeader-DsXemAdR.js} +1 -1
  48. package/static/dashboard/assets/{SearchIndexingPanel-DoqEwocD.js → SearchIndexingPanel-Dh70PNFZ.js} +1 -1
  49. package/static/dashboard/assets/{StatusSubjectPanel-CLzBC5fu.js → StatusSubjectPanel-D3PGEYT4.js} +1 -1
  50. package/static/dashboard/assets/{StatusWorkspace-UyKADZoM.js → StatusWorkspace-BcpePYUW.js} +1 -1
  51. package/static/dashboard/assets/{SystemSettingsPage-qP0hLHNV.js → SystemSettingsPage-BiN5GcKx.js} +1 -1
  52. package/static/dashboard/assets/{SystemSettingsSubjectPanel-EaWax9Ot.js → SystemSettingsSubjectPanel-B9QrSiFp.js} +1 -1
  53. package/static/dashboard/assets/{activity-CjIoNU4S.js → activity-j5zrznu-.js} +1 -1
  54. package/static/dashboard/assets/{badge-dcDZpKh3.js → badge-CzeBdG7h.js} +1 -1
  55. package/static/dashboard/assets/{dashboard-BY8GdnEI.js → dashboard-D-xANHk1.js} +103 -103
  56. package/static/dashboard/assets/{download-BeYCrc-_.js → download-IcNdEZWi.js} +1 -1
  57. package/static/dashboard/assets/{external-link-626-5KVx.js → external-link-DxBxK8Vu.js} +1 -1
  58. package/static/dashboard/assets/{index-CBbk6hx-.js → index-FWZ-s52O.js} +1 -1
  59. package/static/dashboard/assets/{index-CsxH6Hmz.js → index-ZiQZ96oC.js} +1 -1
  60. package/static/dashboard/assets/{key-round-B9IL4Wua.js → key-round-D1K7warM.js} +1 -1
  61. package/static/dashboard/assets/{rotate-ccw-DM4vCfiI.js → rotate-ccw-CcN1N6p9.js} +1 -1
  62. package/static/dashboard/assets/{skeleton-ChlFAPvP.js → skeleton-CKnmJMUH.js} +1 -1
  63. package/static/dashboard/assets/{waypoints-CvpZzf_I.js → waypoints-DuZPO_wu.js} +1 -1
  64. package/static/dashboard/assets/{workspace-layout-Bxv7V-tt.js → workspace-layout-BUj3wZ_m.js} +1 -1
  65. package/static/dashboard/dashboard.html +1 -1
  66. package/static/settings/assets/{AiConfigContext-CDVIHLBb.js → AiConfigContext-C0cQMPfG.js} +1 -1
  67. package/static/settings/assets/{AiConfigPage-C7qfiiaJ.js → AiConfigPage-CPhB4iFb.js} +1 -1
  68. package/static/settings/assets/{DocumentProcessingPanel-B59QTe-V.js → DocumentProcessingPanel-sYI7OpuH.js} +1 -1
  69. package/static/settings/assets/{IndexLifecyclePanel-C-e-3eVi.js → IndexLifecyclePanel-yj8iyiT8.js} +1 -1
  70. package/static/settings/assets/{IndexSubjectPanel-B-scRZ1u.js → IndexSubjectPanel-73sM16Ma.js} +1 -1
  71. package/static/settings/assets/{ModelAssignmentsPanel-Wy8jzVg4.js → ModelAssignmentsPanel-BFIgUX5v.js} +1 -1
  72. package/static/settings/assets/ModelsPage-BdppXl7E.js +10 -0
  73. package/static/settings/assets/{NetworkPage-tBB-4Ox8.js → NetworkPage-i6j-M2RY.js} +1 -1
  74. package/static/settings/assets/{PaneListHeader-DuD6glzn.js → PaneListHeader-DpqC0jd5.js} +1 -1
  75. package/static/settings/assets/{SearchIndexingPanel-CiDHc0nx.js → SearchIndexingPanel-BlPnrkT3.js} +1 -1
  76. package/static/settings/assets/{StatusSubjectPanel-OF5cgWwt.js → StatusSubjectPanel-Dv4q3PGh.js} +1 -1
  77. package/static/settings/assets/{StatusWorkspace-CZ8Oa0gV.js → StatusWorkspace-CKD_Rzdr.js} +1 -1
  78. package/static/settings/assets/{SystemSettingsPage-DT2tC0F_.js → SystemSettingsPage-CiOm2NzV.js} +1 -1
  79. package/static/settings/assets/{SystemSettingsSubjectPanel-Bkta1oDw.js → SystemSettingsSubjectPanel-Cd-GECon.js} +1 -1
  80. package/static/settings/assets/{activity-2M1f5eBS.js → activity-DaFkk8f3.js} +1 -1
  81. package/static/settings/assets/{badge-CRKan0qX.js → badge-d5SHdc-x.js} +1 -1
  82. package/static/settings/assets/{download-PCHldCdu.js → download-CpkwomDr.js} +1 -1
  83. package/static/settings/assets/{external-link-tmKe7eYO.js → external-link-_4YT42Mf.js} +1 -1
  84. package/static/settings/assets/{index-Cek02M79.js → index-BFi9yn7_.js} +1 -1
  85. package/static/settings/assets/{index-BDCNTwWz.js → index-BGgEhIUy.js} +1 -1
  86. package/static/settings/assets/{index-browser-EVDVm9T5.js → index-browser-B06xjBdZ.js} +1 -1
  87. package/static/settings/assets/{key-round-CUGvQCkt.js → key-round-Dlqmp1Kq.js} +1 -1
  88. package/static/settings/assets/{rotate-ccw-BRA3lIHM.js → rotate-ccw-TAY65xWT.js} +1 -1
  89. package/static/settings/assets/{settings-BdlKrzJ3.js → settings-ExBXGgbj.js} +103 -103
  90. package/static/settings/assets/{skeleton-CuDeifWb.js → skeleton-DKIWjNr9.js} +1 -1
  91. package/static/settings/assets/{waypoints-w6LxsFY1.js → waypoints-9erLIxyR.js} +1 -1
  92. package/static/settings/assets/{workspace-layout-TN-BWmT5.js → workspace-layout-CYXfYIa3.js} +1 -1
  93. package/static/settings/settings.html +1 -1
  94. package/static/auth-callback/assets/ModelsPage-DapY2Dwf.js +0 -10
  95. package/static/dashboard/assets/ModelsPage-DZgAOdxO.js +0 -25
  96. package/static/settings/assets/ModelsPage-DHNiaodk.js +0 -10
@@ -1,25 +0,0 @@
1
- import{j as y,r as G,P as bn,o as Vs,q as xi,x as jd,z as Cp,E as Fe,X as Mp,f as Ke,i as Dp,F as Pp,H as Nd,I as Qs,J as Gs,K as Fd,M as Bd,Q as et,T as Gr,U as iu,V as Js,W as ct,Y as Do,Z as me,_ as di,$ as Vr,a0 as As,a1 as wo,a2 as mn,a3 as tr,a4 as Tp,a5 as kp,a6 as Et,a7 as ur,a8 as Ld,a9 as Op,aa as Ys,ab as Vt,ac as Br,ad as Po,ae as To,af as Ud,ag as ko,B as _e,ah as kt,ai as st,aj as jp,ak as ou,al as er,am as au,t as pt,an as Np,ao as Fp,ap as Bp,aq as Lp,ar as qd,as as or,at as vt,au as Qt,av as St,aw as Kd,ax as Ie,ay as Be,az as yt,aA as Up,aB as qp,aC as Kp,u as zp}from"./dashboard-BY8GdnEI.js";import{A as zd,a as Wp,b as Hp,n as Wd,d as Vp,e as Qp}from"./ai-connections-CHNTKemd.js";import{W as Gp,T as Jp}from"./workspace-layout-Bxv7V-tt.js";import{a as Oo,P as Yp,c as Lt,h as Xp,g as Zp,R as $p,d as ey,F as ty,D as Hd,e as Vd,u as yo,C as ry,i as ny,b as Qd,f as iy,A as oy}from"./index-CBbk6hx-.js";import{B as go}from"./badge-dcDZpKh3.js";import{QueryEngine as ay}from"@comunica/query-sparql-solid";var sy=Object.defineProperty,Mt=(e,t)=>sy(e,"name",{value:t,configurable:!0}),Xs="Dialog",[Gd,VA]=jd(Xs),[ly,Kt]=Gd(Xs),uy=Mt(e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=G.useRef(null),c=G.useRef(null),[d,p]=Vd({prop:n,defaultProp:i??!1,onChange:o,caller:Xs}),[g,_]=G.useState(0),[I,C]=G.useState(0);return y.jsx(ly,{scope:t,triggerRef:s,contentRef:c,contentId:yo(),titleId:yo(),descriptionId:yo(),titlePresent:g>0,descriptionPresent:I>0,setTitleCount:_,setDescriptionCount:C,open:d,onOpenChange:p,onOpenToggle:G.useCallback(()=>p(E=>!E),[p]),modal:a,children:r})},"Dialog"),cy="DialogTrigger",dy=G.forwardRef(Mt(function(t,r){const{__scopeDialog:n,...i}=t,o=Kt(cy,n),a=xi(r,o.triggerRef);return y.jsx(bn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":jo(o.open),...i,ref:a,onClick:Lt(t.onClick,o.onOpenToggle)})},"DialogTrigger")),Jd="DialogPortal",[fy,Yd]=Gd(Jd,{forceMount:void 0}),hy=Mt(e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,o=Kt(Jd,t);return y.jsx(fy,{scope:t,forceMount:r,children:G.Children.map(n,a=>y.jsx(Oo,{present:r||o.open,children:y.jsx(Yp,{asChild:!0,container:i,children:a})}))})},"DialogPortal"),_s="DialogOverlay",Xd=G.forwardRef(Mt(function(t,r){const n=Yd(_s,t.__scopeDialog),{forceMount:i=n.forceMount,...o}=t,a=Kt(_s,t.__scopeDialog);return a.modal?y.jsx(Oo,{present:i||a.open,children:y.jsx(yy,{...o,ref:r})}):null},"DialogOverlay")),py=Cp("DialogOverlay.RemoveScroll"),yy=G.forwardRef(Mt(function(t,r){const{__scopeDialog:n,...i}=t,o=Kt(_s,n),a=Zp(),s=xi(r,a);return y.jsx($p,{as:py,allowPinchZoom:!0,shards:[o.contentRef],children:y.jsx(bn.div,{"data-state":jo(o.open),...i,ref:s,style:{pointerEvents:"auto",...i.style}})})},"DialogOverlayImpl")),yi="DialogContent",Zd=G.forwardRef(Mt(function(t,r){const n=Yd(yi,t.__scopeDialog),{forceMount:i=n.forceMount,...o}=t,a=Kt(yi,t.__scopeDialog);return y.jsx(Oo,{present:i||a.open,children:a.modal?y.jsx(gy,{...o,ref:r}):y.jsx(by,{...o,ref:r})})},"DialogContent")),gy=G.forwardRef(Mt(function(t,r){const n=Kt(yi,t.__scopeDialog),i=G.useRef(null),o=xi(r,n.contentRef,i);return G.useEffect(()=>{const a=i.current;if(a)return Xp(a)},[]),y.jsx($d,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:Lt(t.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Lt(t.onPointerDownOutside,a=>{const s=a.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0;(s.button===2||c)&&a.preventDefault()}),onFocusOutside:Lt(t.onFocusOutside,a=>a.preventDefault())})},"DialogContentModal")),by=G.forwardRef(Mt(function(t,r){const n=Kt(yi,t.__scopeDialog),i=G.useRef(!1),o=G.useRef(!1);return y.jsx($d,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{t.onCloseAutoFocus?.(a),a.defaultPrevented||(i.current||n.triggerRef.current?.focus(),a.preventDefault()),i.current=!1,o.current=!1},onInteractOutside:a=>{t.onInteractOutside?.(a),a.defaultPrevented||(i.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;n.triggerRef.current?.contains(s)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})},"DialogContentNonModal")),$d=G.forwardRef(Mt(function(t,r){const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=t,c=Kt(yi,n);return ey(),y.jsx(y.Fragment,{children:y.jsx(ty,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:o,onUnmountAutoFocus:a,children:y.jsx(Hd,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionPresent?c.descriptionId:void 0,"aria-labelledby":c.titlePresent?c.titleId:void 0,"data-state":jo(c.open),...s,ref:r,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})},"DialogContentImpl")),my="DialogTitle",ef=G.forwardRef(Mt(function(t,r){const{__scopeDialog:n,...i}=t,o=Kt(my,n),{setTitleCount:a}=o;return Vs(()=>(a(s=>s+1),()=>a(s=>s-1)),[a]),y.jsx(bn.h2,{id:o.titleId,...i,ref:r})},"DialogTitle")),wy="DialogDescription",tf=G.forwardRef(Mt(function(t,r){const{__scopeDialog:n,...i}=t,o=Kt(wy,n),{setDescriptionCount:a}=o;return Vs(()=>(a(s=>s+1),()=>a(s=>s-1)),[a]),y.jsx(bn.p,{id:o.descriptionId,...i,ref:r})},"DialogDescription")),Ay="DialogClose",_y=G.forwardRef(Mt(function(t,r){const{__scopeDialog:n,...i}=t,o=Kt(Ay,n);return y.jsx(bn.button,{type:"button",...i,ref:r,onClick:Lt(t.onClick,()=>o.onOpenChange(!1))})},"DialogClose"));function jo(e){return e?"open":"closed"}Mt(jo,"getState");const vy=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],Ao=Fe("box",vy);const Sy=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]],rf=Fe("brain",Sy);const Ey=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],qr=Fe("check",Ey);const xy=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],vs=Fe("copy",xy);const Iy=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],No=Fe("external-link",Iy);const Ry=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Cy=Fe("eye-off",Ry);const My=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Dy=Fe("eye",My);const Py=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],nf=Fe("globe",Py);const Ty=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],ky=Fe("grip-vertical",Ty);const Oy=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],of=Fe("image",Oy);const jy=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],af=Fe("info",jy);const Ny=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Ss=Fe("key-round",Ny);const Fy=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],By=Fe("log-out",Fy);const Ly=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],Uy=Fe("pause",Ly);const qy=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],sf=Fe("pencil",qy);const Ky=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],zy=Fe("play",Ky);const Wy=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]],Hy=Fe("plug-zap",Wy);const Vy=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],wn=Fe("plus",Vy);const Qy=[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]],su=Fe("refresh-ccw",Qy);const Gy=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],Es=Fe("rotate-cw",Gy);const Jy=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],lf=Fe("search",Jy);const Yy=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Xy=Fe("settings-2",Yy);const Zy=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],$y=Fe("square-terminal",Zy);const eg=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Zs=Fe("trash-2",eg);const tg=[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]],rg=Fe("wallet",tg),Ii=uy,ng=dy,ig=hy,uf=G.forwardRef(({className:e,...t},r)=>y.jsx(Xd,{ref:r,className:Ke("fixed inset-0 z-50 bg-black/40","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));uf.displayName=Xd.displayName;const An=G.forwardRef(({className:e,children:t,variant:r="center",...n},i)=>y.jsxs(ig,{children:[y.jsx(uf,{}),y.jsxs(Zd,{ref:i,className:Ke(r==="sheet-left"?"fixed inset-y-0 left-0 z-50 flex h-dvh w-[min(88vw,320px)] flex-col border-r bg-background p-0 shadow-[16px_0_30px_rgba(15,23,42,0.08)] duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:slide-out-to-left-full data-[state=open]:slide-in-from-left-full rounded-none":r==="sheet-right"?"fixed inset-y-0 right-0 z-50 flex h-dvh w-full max-w-4xl flex-col border-l bg-background p-0 shadow-[-16px_0_30px_rgba(15,23,42,0.08)] duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-right-full rounded-none":"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",e),...n,children:[t,y.jsxs(_y,{className:Ke("absolute right-4 top-4 rounded-xl opacity-70 transition-all hover:opacity-100 hover:bg-muted/50 p-1 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",Dp),children:[y.jsx(Mp,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));An.displayName=Zd.displayName;const Ri=({className:e,...t})=>y.jsx("div",{className:Ke("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ri.displayName="DialogHeader";const gi=({className:e,...t})=>y.jsx("div",{className:Ke("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});gi.displayName="DialogFooter";const _n=G.forwardRef(({className:e,...t},r)=>y.jsx(ef,{ref:r,className:Ke("text-lg font-semibold leading-none tracking-tight",e),...t}));_n.displayName=ef.displayName;const og=G.forwardRef(({className:e,...t},r)=>y.jsx(tf,{ref:r,className:Ke("text-sm text-muted-foreground",e),...t}));og.displayName=tf.displayName;var ag=Object.defineProperty,Xe=(e,t)=>ag(e,"name",{value:t,configurable:!0}),[$s,QA]=jd("Tooltip",[Qd]),el=Qd(),sg="TooltipProvider",lg=700,xs="tooltip.open",[ug,tl]=$s(sg),cg=Xe(e=>{const{__scopeTooltip:t,delayDuration:r=lg,skipDelayDuration:n=300,disableHoverableContent:i=!1,children:o}=e,a=G.useRef(!0),s=G.useRef(!1),c=G.useRef(0);return G.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),y.jsx(ug,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:G.useCallback(()=>{n<=0||(window.clearTimeout(c.current),a.current=!1)},[n]),onClose:G.useCallback(()=>{n<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,n))},[n]),isPointerInTransitRef:s,onPointerInTransitChange:G.useCallback(d=>{s.current=d},[]),disableHoverableContent:i,children:o})},"TooltipProvider"),Is="Tooltip",[dg,Fo]=$s(Is),fg=Xe(e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:i,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=e,c=tl(Is,e.__scopeTooltip),d=el(t),[p,g]=G.useState(null),[_,I]=G.useState(void 0),C=yo(),E=G.useRef(0),m=a??c.disableHoverableContent,R=s??c.delayDuration,S=G.useRef(!1),[v,Q]=Vd({prop:n,defaultProp:i??!1,onChange:Xe(P=>{P?(c.onOpen(),document.dispatchEvent(new CustomEvent(xs))):c.onClose(),o?.(P)},"onChange"),caller:Is}),Y=G.useMemo(()=>v?S.current?"delayed-open":"instant-open":"closed",[v]),ee=G.useCallback(()=>{window.clearTimeout(E.current),E.current=0,S.current=!1,Q(!0)},[Q]),te=G.useCallback(()=>{window.clearTimeout(E.current),E.current=0,Q(!1)},[Q]),V=G.useCallback(()=>{window.clearTimeout(E.current),E.current=window.setTimeout(()=>{S.current=!0,Q(!0),E.current=0},R)},[R,Q]);G.useEffect(()=>()=>{E.current&&(window.clearTimeout(E.current),E.current=0)},[]);const de=_??C;return y.jsx(iy,{...d,children:y.jsx(dg,{scope:t,contentId:de,setContentId:I,open:v,stateAttribute:Y,trigger:p,onTriggerChange:g,onTriggerEnter:G.useCallback(()=>{c.isOpenDelayedRef.current?V():ee()},[c.isOpenDelayedRef,V,ee]),onTriggerLeave:G.useCallback(()=>{m?te():(window.clearTimeout(E.current),E.current=0)},[te,m]),onOpen:ee,onClose:te,disableHoverableContent:m,children:r})})},"Tooltip"),lu="TooltipTrigger",hg=G.forwardRef(Xe(function(t,r){const{__scopeTooltip:n,...i}=t,o=Fo(lu,n),a=tl(lu,n),s=el(n),c=G.useRef(null),d=xi(r,c,o.onTriggerChange),p=G.useRef(!1),g=G.useRef(!1),_=G.useCallback(()=>p.current=!1,[]);return G.useEffect(()=>()=>document.removeEventListener("pointerup",_),[_]),y.jsx(oy,{asChild:!0,...s,children:y.jsx(bn.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...i,ref:d,onPointerMove:Lt(t.onPointerMove,I=>{I.pointerType!=="touch"&&!g.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),g.current=!0)}),onPointerLeave:Lt(t.onPointerLeave,()=>{o.onTriggerLeave(),g.current=!1}),onPointerDown:Lt(t.onPointerDown,()=>{o.open&&o.onClose(),p.current=!0,document.addEventListener("pointerup",_,{once:!0})}),onFocus:Lt(t.onFocus,()=>{p.current||o.onOpen()}),onBlur:Lt(t.onBlur,o.onClose),onClick:Lt(t.onClick,o.onClose)})})},"TooltipTrigger")),pg="TooltipPortal",[GA,yg]=$s(pg,{forceMount:void 0}),bi="TooltipContent",gg=G.forwardRef(Xe(function(t,r){const n=yg(bi,t.__scopeTooltip),{forceMount:i=n.forceMount,side:o="top",...a}=t,s=Fo(bi,t.__scopeTooltip);return y.jsx(Oo,{present:i||s.open,children:s.disableHoverableContent?y.jsx(cf,{side:o,...a,ref:r}):y.jsx(bg,{side:o,...a,ref:r})})},"TooltipContent")),bg=G.forwardRef(Xe(function(t,r){const n=Fo(bi,t.__scopeTooltip),i=tl(bi,t.__scopeTooltip),o=G.useRef(null),a=xi(r,o),[s,c]=G.useState(null),{trigger:d,onClose:p}=n,g=o.current,{onPointerInTransitChange:_}=i,I=G.useCallback(()=>{c(null),_(!1)},[_]),C=G.useCallback((E,m)=>{const R=E.currentTarget,S={x:E.clientX,y:E.clientY},v=df(S,R.getBoundingClientRect()),Q=ff(S,v),Y=hf(m.getBoundingClientRect()),ee=yf([...Q,...Y]);c(ee),_(!0)},[_]);return G.useEffect(()=>()=>I(),[I]),G.useEffect(()=>{if(d&&g){const E=Xe(R=>C(R,g),"handleTriggerLeave"),m=Xe(R=>C(R,d),"handleContentLeave");return d.addEventListener("pointerleave",E),g.addEventListener("pointerleave",m),()=>{d.removeEventListener("pointerleave",E),g.removeEventListener("pointerleave",m)}}},[d,g,C,I]),G.useEffect(()=>{if(s){const E=Xe(m=>{const R=m.target,S={x:m.clientX,y:m.clientY},v=d?.contains(R)||g?.contains(R),Q=!pf(S,s);v?I():Q&&(I(),p())},"handleTrackPointerGrace");return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[d,g,s,p,I]),y.jsx(cf,{...t,ref:a})},"TooltipContentHoverable")),mg=Pp("TooltipContent"),cf=G.forwardRef(Xe(function(t,r){const{__scopeTooltip:n,children:i,"aria-label":o,id:a,onEscapeKeyDown:s,onPointerDownOutside:c,...d}=t,p=Fo(bi,n),g=el(n),{onClose:_}=p;G.useEffect(()=>(document.addEventListener(xs,_),()=>document.removeEventListener(xs,_)),[_]),G.useEffect(()=>{if(p.trigger){const C=Xe(E=>{E.target instanceof Node&&E.target.contains(p.trigger)&&_()},"handleScroll");return window.addEventListener("scroll",C,{capture:!0}),()=>window.removeEventListener("scroll",C,{capture:!0})}},[p.trigger,_]);const{setContentId:I}=p;return Vs(()=>(I(a),()=>{I(void 0)}),[a,I]),y.jsx(Hd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:C=>C.preventDefault(),onDismiss:_,children:y.jsxs(ry,{"data-state":p.stateAttribute,role:o?void 0:"tooltip",id:o?void 0:p.contentId,...g,...d,ref:r,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[y.jsx(mg,{children:i}),o?y.jsx(ny,{id:p.contentId,role:"tooltip",children:o}):null]})})},"TooltipContentImpl"));function df(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,i,o)){case o:return"left";case i:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}Xe(df,"getExitSideFromRect");function ff(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}Xe(ff,"getPaddedExitPoints");function hf(e){const{top:t,right:r,bottom:n,left:i}=e;return[{x:i,y:t},{x:r,y:t},{x:r,y:n},{x:i,y:n}]}Xe(hf,"getPointsFromRect");function pf(e,t){const{x:r,y:n}=e;let i=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const s=t[o],c=t[a],d=s.x,p=s.y,g=c.x,_=c.y;p>n!=_>n&&r<(g-d)*(n-p)/(_-p)+d&&(i=!i)}return i}Xe(pf,"isPointInPolygon");function yf(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),gf(t)}Xe(yf,"getHull");function gf(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const i=e[n];for(;t.length>=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const i=e[n];for(;r.length>=2;){const o=r[r.length-1],a=r[r.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))r.pop();else break}r.push(i)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}Xe(gf,"getHullPresorted");var wg=cg,Ag=fg,_g=hg,bf=gg;const mf=wg,Bo=Ag,Lo=_g,Ci=G.forwardRef(({className:e,sideOffset:t=4,...r},n)=>y.jsx(bf,{ref:n,sideOffset:t,className:Ke("z-50 overflow-hidden rounded-md border border-border/50 bg-popover","px-2 py-1 text-xs text-popover-foreground shadow-md","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));Ci.displayName=bf.displayName;function vg(e){const t=Nd(e).type;return Array.isArray(t)&&t.includes(Qs.AccessControlResource)}async function Uo(e,t){if(!Oi(e))return{resourceAcl:null,fallbackAcl:null};try{const r=await wf(e,t);return r===null?{resourceAcl:null,fallbackAcl:await Af(e,t)}:{resourceAcl:r,fallbackAcl:null}}catch(r){if(r instanceof Rs)return{resourceAcl:null,fallbackAcl:null};throw r}}async function wf(e,t){if(!Oi(e))return null;try{const r=await Fd(e.internal_resourceInfo.aclUrl,t);if(vg(r))throw new Rs(e,r);return Bd({...r,internal_accessTo:et(e)})}catch(r){if(r instanceof Rs)throw r;return null}}async function Af(e,t){const r=new URL(et(e)),n=r.pathname;if(n==="/")return null;const i=Sg(n),o=new URL(i,r.origin).href,a=await Gr(o,t);if(!Oi(a))return null;const s=await wf(a,t);return s===null?Af(a,t):s}function Sg(e){const t=e.substring(e.length-1)==="/"?e.substring(0,e.length-1):e;return`${e.substring(0,t.lastIndexOf("/"))}/`}function mr(e){return Js(e).filter(Eg)}function Eg(e){return ct(e,Do.type).includes(me.Authorization)}function rl(e,t){return e.filter(r=>xg(r,t))}function xg(e,t){return ct(e,me.accessTo).includes(t)}function qo(e,t){return e.filter(r=>Ig(r,t))}function Ig(e,t){return ct(e,me.default).includes(t)||ct(e,me.defaultForNew).includes(t)}function Mi(e){const t=ct(e,me.mode);return t.includes(Ut.write)?{read:t.includes(Ut.read),append:!0,write:!0,control:t.includes(Ut.control)}:{read:t.includes(Ut.read),append:t.includes(Ut.append),write:!1,control:t.includes(Ut.control)}}function Di(e){return e.reduce((t,r)=>t.write||r.write?{read:t.read||r.read,append:!0,write:!0,control:t.control||r.control}:{read:t.read||r.read,append:t.append||r.append,write:!1,control:t.control||r.control},{read:!1,append:!1,write:!1,control:!1})}function Rg(e){return mr(e).filter(Cg).reduce(Tp,e)}function Cg(e){return kp(e.predicates,Et.namedNode(e.url),Et.defaultGraph()).some(t=>!Mg(t))?!1:ur(e,me.accessTo)===null&&ur(e,me.default)===null&&ur(e,me.defaultForNew)===null||ur(e,me.mode)===null||ur(e,me.agent)===null&&ur(e,me.agentGroup)===null&&ur(e,me.agentClass)===null}function Mg(e){const{predicate:t}=e,{object:r}=e;return!!(t.equals(Et.namedNode(Do.type))&&r.equals(Et.namedNode(me.Authorization))||t.equals(Et.namedNode(me.accessTo))||t.equals(Et.namedNode(me.default))||t.equals(Et.namedNode(me.defaultForNew))||t.equals(Et.namedNode(me.mode))&&Object.values(Ut).some(n=>r.equals(Et.namedNode(n)))||t.equals(Et.namedNode(me.agent))||t.equals(Et.namedNode(me.agentGroup))||t.equals(Et.namedNode(me.agentClass))||t.equals(Et.namedNode(me.origin)))}const Ut={read:"http://www.w3.org/ns/auth/acl#Read",append:"http://www.w3.org/ns/auth/acl#Append",write:"http://www.w3.org/ns/auth/acl#Write",control:"http://www.w3.org/ns/auth/acl#Control"};function Dg(e,t,r){return e.filter(n=>ct(n,r).includes(t))}function Pg(e,t){const r={};return e.forEach(n=>{const i=ct(n,t),o=Mi(n);i.forEach(a=>{r[a]=typeof r[a]>"u"?o:Di([r[a],o])})}),r}function _f(e){let t=mn();return t=Vr(t,Do.type,me.Authorization),e.read&&(t=tr(t,me.mode,Ut.read)),e.append&&!e.write&&(t=tr(t,me.mode,Ut.append)),e.write&&(t=tr(t,me.mode,Ut.write)),e.control&&(t=tr(t,me.mode,Ut.control)),t}function Tg(e){let t=mn();t=Vr(t,Do.type,me.Authorization);function r(n,i,o){return ct(n,o).reduce((a,s)=>tr(a,o,s),i)}return t=r(e,t,me.accessTo),t=r(e,t,me.default),t=r(e,t,me.defaultForNew),t=r(e,t,me.agent),t=r(e,t,me.agentGroup),t=r(e,t,me.agentClass),t=r(e,t,me.origin),t=r(e,t,me.mode),t}function Pi(e,t){return Object.assign(Gs(e),{internal_acl:t})}const kg=[me.agent,me.agentClass,me.agentGroup,me.origin];function Og(e,t,r,n,i){if(!ct(e,r).includes(t)){const s=_f({read:!1,append:!1,write:!1,control:!1});return[e,s]}const o=As(e,r,t);let a=Tg(e);return a=As(a,me.accessTo,n),a=Vr(a,r,t),kg.filter(s=>s!==r).forEach(s=>{a=wo(a,s)}),[o,a]}function vf(e,t,r,n,i){let o=e;Js(e).forEach(c=>{const[d,p]=Og(c,i,r,e.internal_accessTo);o=di(o,d),o=di(o,p)});let a=_f(t);a=Vr(a,me.accessTo,e.internal_accessTo),a=Vr(a,r,i);const s=di(o,a);return Rg(s)}function Sf(e,t){return Pi(e,{resourceAcl:t,fallbackAcl:null})}function jg(e){return e.internal_acl.resourceAcl}class Rs extends Error{constructor(t,r){super(`[${iu(t)}] is governed by Access Control Policies in [${iu(r)}] rather than by Web Access Control.`)}}function Ti(e){return e.internal_acl.resourceAcl!==null&&et(e)===e.internal_acl.resourceAcl.internal_accessTo&&e.internal_resourceInfo.aclUrl===et(e.internal_acl.resourceAcl)}function nl(e){return Ti(e)?e.internal_acl.resourceAcl:null}function ki(e){return e.internal_acl.fallbackAcl!==null}function Ng(e){return ki(e)?e.internal_acl.fallbackAcl:null}function Fg(e){return Bd({...Op(),internal_accessTo:et(e),internal_resourceInfo:{sourceIri:e.internal_resourceInfo.aclUrl,isRawData:!1,linkedResources:{}}})}function Bg(e){const t=Fg(e),r=mr(e.internal_acl.fallbackAcl);return qo(r,e.internal_acl.fallbackAcl.internal_accessTo).map(a=>(a=wo(a,me.default),a=wo(a,me.defaultForNew),a=Vr(a,me.accessTo,et(e)),a=Vr(a,me.default,et(e)),a)).reduce(di,t)}async function Lg(e,t,r){if(!Oi(e))throw new Error(`Could not determine the location of the ACL for the Resource at [${et(e)}]; possibly the current user does not have Control access to that Resource. Try calling \`hasAccessibleAcl()\` before calling \`saveAclFor()\`.`);return{...await Ld(e.internal_resourceInfo.aclUrl,t,r),internal_accessTo:et(e)}}function Oi(e){return typeof e.internal_resourceInfo.aclUrl=="string"}function Ef(e,t){return Ti(e)?qg(e.internal_acl.resourceAcl,t):ki(e)?Wg(e.internal_acl.fallbackAcl,t):null}function Ug(e){if(Ti(e)){const t=nl(e);return Kg(t)}if(ki(e)){const t=Ng(e);return Hg(t)}return null}function qg(e,t){const r=mr(e),n=rl(r,e.internal_accessTo),o=xf(n,t).map(Mi);return Di(o)}function Kg(e){const t=mr(e),r=rl(t,e.internal_accessTo),n=If(r);return Rf(n)}function zg(e,t,r){return vf(e,r,me.agent,"resource",t)}function Wg(e,t){const r=mr(e),n=qo(r,e.internal_accessTo),o=xf(n,t).map(Mi);return Di(o)}function Hg(e){const t=mr(e),r=qo(t,e.internal_accessTo),n=If(r);return Rf(n)}function xf(e,t){return Dg(e,t,me.agent)}function If(e){return e.filter(Vg)}function Vg(e){return ur(e,me.agent)!==null}function Rf(e){return Pg(e,me.agent)}function Cf(e){return Ti(e)?Qg(e.internal_acl.resourceAcl):ki(e)?Gg(e.internal_acl.fallbackAcl):null}function Qg(e){const t=mr(e),r=rl(t,e.internal_accessTo),i=Mf(r,Ys.Agent).map(Mi);return Di(i)}function Gg(e){const t=mr(e),r=qo(t,e.internal_accessTo),i=Mf(r,Ys.Agent).map(Mi);return Di(i)}function Jg(e,t){return vf(e,t,me.agentClass,"resource",Ys.Agent)}function Mf(e,t){return e.filter(r=>Yg(r,t))}function Yg(e,t){return ct(e,me.agentClass).includes(t)}async function Df(e,t){if(typeof e.internal_resourceInfo.aclUrl!="string")return null;try{return await Gr(e.internal_resourceInfo.aclUrl,t)}catch{return null}}const Dt="http://www.w3.org/ns/solid/acp#",qe={AccessControlResource:Dt.concat("AccessControlResource"),PublicAgent:Dt.concat("PublicAgent"),access:Dt.concat("access"),accessControl:Dt.concat("accessControl"),agent:Dt.concat("agent"),allOf:Dt.concat("allOf"),allow:Dt.concat("allow"),anyOf:Dt.concat("anyOf"),apply:Dt.concat("apply"),deny:Dt.concat("deny"),memberAccessControl:Dt.concat("memberAccessControl"),noneOf:Dt.concat("noneOf")},aa="http://www.w3.org/ns/auth/acl#",nn={Append:aa.concat("Append"),Read:aa.concat("Read"),Write:aa.concat("Write")};async function Pf(e,t){const r=bt(e),n=await Ld(et(r),r,t);return Zg(e,n)}function Xg(e){return typeof e.internal_acp=="object"&&e.internal_acp!==null&&typeof e.internal_acp.acr=="object"&&e.internal_acp.acr!==null}function bt(e){if(!Xg(e))throw new Error(`An Access Control Resource for [${et(e)}] is not available. This could be because the current user is not allowed to see it, or because their Pod Server does not support Access Control Resources.`);return e.internal_acp.acr}function Zg(e,t){return Object.assign(Gs(e),{internal_acp:{...e.internal_acp,acr:t}})}function Tf(e){const t=bt(e),r=et(t);return Vt(t,r)}function kf(e){const t=Tf(e);return t===null?[]:ct(t,qe.accessControl)}function Of(e,t,r){const n=bt(e);return Array.from(new Set(t.map(i=>{const o=Vt(n,i);return o!==null?ct(o,r):[]}).reduce((i,o)=>i.concat(o),[])))}function $g(e){return Of(e,kf(e),qe.apply)}function eb(e){return Of(e,kf(e),qe.access)}function jf(e,t){const r=ct(e,t);return{read:r.includes(nn.Read),append:r.includes(nn.Append),write:r.includes(nn.Write),controlRead:!1,controlWrite:!1}}function tb(e){return jf(e,qe.allow)}function rb(e){return jf(e,qe.deny)}function uu(e,t,r){const n=Br(t,qe.allOf).map(d=>Vt(bt(e),d)).filter(d=>d!==null),i=n.every(d=>Br(d,qe.agent).includes(r)),o=Br(t,qe.anyOf).map(d=>Vt(bt(e),d)).filter(d=>d!==null),a=o.some(d=>Br(d,qe.agent).includes(r)),s=Br(t,qe.noneOf).map(d=>Vt(bt(e),d)).filter(d=>d!==null),c=s.some(d=>Br(d,qe.agent).includes(r));return n.length+o.length>0&&(n.length===0||i)&&(o.length===0||a)&&(s.length===0||!c)}function cu(e,t,r){const n=tb(e),i=rb(e);return r==="control"?{read:t.read,append:t.append,write:t.write,controlRead:(t.controlRead||n.read)&&!i.read,controlWrite:(t.controlWrite||n.write)&&!i.write}:{read:(t.read||n.read)&&!i.read,append:(t.append||n.append)&&!i.append,write:(t.write||n.write)&&!i.write,controlRead:t.controlRead,controlWrite:t.controlWrite}}async function Ko(e,t){let r={read:!1,append:!1,write:!1,controlRead:!1,controlWrite:!1};return $g(e).map(o=>Vt(bt(e),o)).filter(o=>o!==null).forEach(o=>{uu(e,o,t)&&(r=cu(o,r,"resource"))}),eb(e).map(o=>Vt(bt(e),o)).filter(o=>o!==null).forEach(o=>{uu(e,o,t)&&(r=cu(o,r,"control"))}),r}function Nf(e,t){var r,n,i,o;if(e.controlRead!==e.controlWrite)throw new Error("For Pods using Web Access Control, controlRead and controlWrite must be equal.");return{read:(r=e.read)!==null&&r!==void 0?r:t.read,append:(n=e.append)!==null&&n!==void 0?n:t.append,write:(i=e.write)!==null&&i!==void 0?i:t.write,control:(o=e.controlRead)!==null&&o!==void 0?o:t.control}}function il(e){return{read:e.read,write:e.write,append:e.append,controlRead:e.control,controlWrite:e.control}}async function nb(e,t,r,n){const i=await Uo(e,n),o=r(Pi(e,i),t);return o===null?null:il(o)}async function ib(e,t,r){const n=await Uo(e,r),i=t(Pi(e,n));return i===null?null:il(i)}async function ob(e,t,r){const n=await Uo(e,r),i=t(Pi(e,n));if(i===null)return null;const o={};for(const[a,s]of Object.entries(i))o[a]=il(s);return o}function Ff(e,t,r){return nb(e,t,Ef,r)}function Bf(e,t){return ib(e,Cf,t)}function ab(e,t){return ob(e,Ug,t)}async function Lf(e,t){if(!Oi(e))return null;const r=await Uo(e,t),n=Pi(e,r);let i;if(Ti(n))i=jg(n);else if(ki(n))i=Bg(n);else return null;return Sf(n,i)}async function Uf(e,t,r){let n=null;try{return n=await Lg(e,t,r),Sf(e,n)}catch{return null}}async function sb(e,t,r,n,i){const o=await Lf(e,i);if(o===null)return null;const a=nl(o),s=r(o),c=Nf(t,s),d=n(a,c);return Uf(o,d,i)}async function lb(e,t,r,n,i,o){const a=await Lf(e,o);if(a===null)return null;const s=n(a,t),c=nl(a),d=Nf(r,s),p=i(c,t,d);return Uf(a,p,o)}async function ub(e,t,r,n){return lb(e,t,r,Ef,zg,n)}async function cb(e,t,r){return sb(e,t,Cf,Jg,r)}async function db(e,t){const r=await Df(e,t);if(r===null)return null;const n=Nd(r).type;return Array.isArray(n)&&n.includes(qe.AccessControlResource)?et(r):null}async function ji(e,t){const r=await db(e,t);if(r===null)return null;let n;try{n=await Fd(r,t)}catch{return null}return{...e,internal_acp:{acr:{...n,accessTo:et(e)}}}}async function qf(e,t,r){const n=await Gr(e,r),i=await ji(n,r);return i===null?Ff(n,t,r):Ko(i,t)}function fb(e){return Array.from(new Set(Js(bt(e)).map(t=>Br(t,qe.agent)).reduce((t,r)=>t.concat(r),[])))}async function hb(e){return(await Promise.all(fb(e).map(async t=>({[t]:await Ko(e,t)})))).reduce((t,r)=>({...t,...r}),{})}async function pb(e,t){const r=await Gr(e,t),n=await ji(r,t);return n===null?ab(r,t):hb(n)}async function yb(e){return Ko(e,qe.PublicAgent)}async function Kf(e,t){const r=await Gr(e,t),n=await ji(r,t);return n===null?Bf(r,t):yb(n)}function Ni(e,t){return Object.assign(Gs(e),{internal_acp:{...e.internal_acp,acr:di(e.internal_acp.acr,t)}})}const fi="defaultAccessControl",_o="defaultAcrAccessControl";function ol(e,t){const r=bt(e);return et(r).concat("#").concat(t)}function al(e,t,r){return ol(e,t).concat("AgentMatcher").concat(r.charAt(0).toUpperCase()+r.slice(1)).concat("Policy")}function zf(e,t){const r=bt(e),n=ol(e,t),i=Vt(r,n);return i===null||typeof i>"u"?mn({url:n}):i}function du(e){return e.includes("Member")?qe.memberAccessControl:qe.accessControl}function Wf(e,t){const r=ol(e,t),n=bt(e);let i=Tf(e);return(i===null||typeof i>"u")&&(i=mn({url:et(n)})),ct(i,du(t)).includes(r)?e:(i=Po(i).addUrl(du(t),r).build(),Ni(e,i))}function gb(e,t){const r=Wf(e,_o),n=zf(r,_o);return Ni(r,Po(n).addUrl(qe.access,t).build())}function bb(e,t){const r=Wf(e,fi),n=zf(r,fi);return Ni(r,Po(n).addUrl(qe.apply,t).build())}function mb(e,t,r){const n=al(e,t,r);return n.includes("Acr")?gb(e,n):bb(e,n)}function Hf(e,t,r){return al(e,t,r).concat("Matcher")}function wb(e,t,r){let n=wo(e,r);return(t.read||t.controlRead)&&(n=tr(n,r,nn.Read)),t.append&&(n=tr(n,r,nn.Append)),(t.write||t.controlWrite)&&(n=tr(n,r,nn.Write)),n}const fu=qe.anyOf;function Ab(e,t,r){const n=al(e,t,r),i=Hf(e,t,r);let o=Vt(bt(e),n);return o||(e=mb(e,t,r),o=mn({url:n}),o=wb(o,{[r]:!0},qe.allow)),ct(o,fu).includes(i)?e:(o=Po(o).addUrl(fu,i).build(),Ni(e,o))}function _b(e,t){return tr(e,Qs.agent,t)}function vb(e,t){return As(e,Qs.agent,t)}function Ln(e,t,r,n,i){var o;const a=Hf(e,r,n),s=Ab(e,r,n),c=(o=Vt(bt(s),a))!==null&&o!==void 0?o:mn({url:a});return Ni(s,i==="add"?_b(c,t):vb(c,t))}async function Vf(e,t,r){const n=await Ko(e,t);return typeof r.read=="boolean"&&n.read!==r.read&&(e=Ln(e,t,fi,"read",r.read?"add":"remove")),typeof r.append=="boolean"&&n.append!==r.append&&(e=Ln(e,t,fi,"append",r.append?"add":"remove")),typeof r.write=="boolean"&&n.write!==r.write&&(e=Ln(e,t,fi,"write",r.write?"add":"remove")),typeof r.controlRead=="boolean"&&n.controlRead!==r.controlRead&&(e=Ln(e,t,_o,"controlRead",r.controlRead?"add":"remove")),typeof r.controlWrite=="boolean"&&n.controlWrite!==r.controlWrite&&(e=Ln(e,t,_o,"controlWrite",r.controlWrite?"add":"remove")),e}async function Sb(e,t,r,n){const i=await Gr(e,n),o=await ji(i,n);if(o===null)return await ub(i,t,r,n),Ff(i,t,n);try{return await Pf(await Vf(o,t,r),n),await qf(e,t,n)}catch{return null}}async function Eb(e,t){return Vf(e,qe.PublicAgent,t)}async function xb(e,t,r){const n=await Gr(e,r),i=await ji(n,r);if(i===null)return await cb(n,t,r),Bf(n,r);try{return await Pf(await Eb(i,t),r),await Kf(e,r)}catch{return null}}const Ib=Object.freeze(Object.defineProperty({__proto__:null,getAclServerResourceInfo:Df,getAgentAccess:qf,getAgentAccessAll:pb,getPublicAccess:Kf,setAgentAccess:Sb,setPublicAccess:xb},Symbol.toStringTag,{value:"Module"}));function Rb(e){if(!Qf(e))throw new Error("Applet layout descriptor must be an object");if(typeof e.type!="string")throw new Error("Applet layout descriptor type must be a string");switch(e.type){case"single-pane":case"two-pane":return hu(e.context),e;case"three-pane":return hu(e.context),e;default:throw new Error(`Unsupported applet layout type: ${e.type}`)}}function Qf(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function hu(e){if(e!==void 0){if(!Qf(e))throw new Error("Applet layout descriptor context must be an object");if("collapsible"in e&&typeof e.collapsible!="boolean")throw new Error("Applet layout descriptor context.collapsible must be a boolean");if("initiallyCollapsed"in e&&typeof e.initiallyCollapsed!="boolean")throw new Error("Applet layout descriptor context.initiallyCollapsed must be a boolean")}}function Cb(e){const t=e.access??Ib;return{inspectAgentAccess:r=>Mb(r,e.fetch,t),ensureAgentAccess:async r=>{try{for(const n of r.resources){await Db(n.url,n.mediaType,e.fetch);const i=await t.setAgentAccess(n.url,r.service.webId,Tb(n.access),{fetch:e.fetch});if(!i||!Gf(i,n.access))return $t("permissionDenied",r,"Pod did not grant the requested service access.")}return $t("granted",r)}catch(n){return $t("permissionDenied",r,Cs(n))}},revokeAgentAccess:async r=>{try{for(const n of r.resources)if(!await t.setAgentAccess(n.url,r.service.webId,{read:!1,append:!1,write:!1,controlRead:!1,controlWrite:!1},{fetch:e.fetch}))return $t("permissionDenied",r,"Pod did not revoke the service access.");return $t("missing",r)}catch(n){return $t("permissionDenied",r,Cs(n))}}}}async function Mb(e,t,r){try{for(const n of e.resources){const i=await r.getAgentAccess(n.url,e.service.webId,{fetch:t});if(!i||!Gf(i,n.access))return $t("missing",e)}return $t("granted",e)}catch(n){return $t("permissionDenied",e,Cs(n))}}async function Db(e,t,r){const n=await r(e,{method:"HEAD"});if(n.ok)return;if(n.status!==404)throw new Error(`Unable to inspect Pod resource (${n.status}).`);await Pb(e,r);const i=await r(e,{method:"PUT",headers:{"content-type":t},body:`# Created by the Xpod applet permission broker.
2
- `});if(!i.ok)throw new Error(`Unable to create Pod resource (${i.status}).`)}async function Pb(e,t){const r=new URL(e),n=[];let i=new URL("./",r);for(;i.pathname!=="/";){const o=await t(i.href,{method:"HEAD"});if(o.ok)break;if(o.status!==404)throw new Error(`Unable to inspect Pod container (${o.status}).`);n.push(i.href),i=new URL("../",i)}for(const o of n.reverse()){const a=await t(o,{method:"PUT",headers:{"content-type":"text/turtle",link:'<http://www.w3.org/ns/ldp#BasicContainer>; rel="type"'},body:""});if(!a.ok&&a.status!==409)throw new Error(`Unable to create Pod container (${a.status}).`)}}function Tb(e){return{read:e.read===!0,append:e.append===!0,write:e.write===!0,controlRead:!1,controlWrite:!1}}function Gf(e,t){return(!t.read||e.read===!0)&&(!t.append||e.append===!0)&&(!t.write||e.write===!0)}function $t(e,t,r){return{status:e,resources:t.resources,...r?{message:r}:{}}}function Cs(e){return e instanceof Error?e.message:"Unable to update Pod service access."}const kb=Rb;function Ob(e,t){return jb(e,t)}function jb(e,t){const r=Nb(e),n=e.createController(t);return r.type==="single-pane"?{layout:"single-pane",controller:n,element:G.createElement(r.render,{controller:n,host:t})}:r.type==="two-pane"?{layout:"two-pane",controller:n,slots:{listHeader:G.createElement(r.slots.listHeader,{controller:n,host:t}),list:G.createElement(r.slots.list,{controller:n,host:t}),mainHeader:G.createElement(r.slots.mainHeader,{controller:n,host:t}),main:G.createElement(r.slots.main,{controller:n,host:t})}}:{layout:"three-pane",controller:n,contextConfig:r.contextConfig,slots:{listHeader:G.createElement(r.slots.listHeader,{controller:n,host:t}),list:G.createElement(r.slots.list,{controller:n,host:t}),mainHeader:G.createElement(r.slots.mainHeader,{controller:n,host:t}),main:G.createElement(r.slots.main,{controller:n,host:t}),context:G.createElement(r.slots.context,{controller:n,host:t})}}}function Nb(e){if("layout"in e){const t=Lb(e.layout),r=kb(t.descriptor),n=r.type;if(e.manifest.layout!==n)throw new Error(`Applet manifest layout ${e.manifest.layout} does not match descriptor layout ${n}`);if(n==="single-pane"){if(!("render"in t))throw new Error("Applet descriptor single-pane render must be a function");return Kr(t.render,"Applet descriptor single-pane render"),{type:"single-pane",render:t.render}}if(!("slots"in t))throw new Error(`Applet descriptor declares ${n} but no slots were provided`);return n==="two-pane"?(Ms(t.slots,"Applet descriptor two-pane"),{type:"two-pane",slots:t.slots}):(Fb(t.slots,"Applet descriptor three-pane"),{type:"three-pane",contextConfig:r.context,slots:t.slots})}if(e.manifest.layout==="single-pane"){if(!("render"in e))throw new Error("Applet manifest declares single-pane but no single-pane renderer was provided");return Kr(e.render,"Applet single-pane render"),{type:"single-pane",render:e.render}}if(e.manifest.layout==="two-pane"&&"slots"in e)return Ms(e.slots,"Applet two-pane"),{type:"two-pane",slots:e.slots};throw new Error(`Applet manifest declares ${e.manifest.layout} but no supported applet layout was provided`)}function Ms(e,t){Bb(e,t),Kr(e.listHeader,`${t} slot listHeader`),Kr(e.list,`${t} slot list`),Kr(e.mainHeader,`${t} slot mainHeader`),Kr(e.main,`${t} slot main`)}function Fb(e,t){Ms(e,t),Kr(e.context,`${t} slot context`)}function Bb(e,t){if(typeof e!="object"||e===null)throw new Error(`${t} slots must be an object`)}function Kr(e,t){if(typeof e!="function")throw new Error(`${t} must be a function`)}function Lb(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new Error("Applet descriptor layout must be an object");if(!("descriptor"in e)||e.descriptor===void 0)throw new Error("Applet descriptor required");return e}const Ub="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAB7CAAAewgFu0HU+AAA0PUlEQVR4nO2dZ1gUZ9fH/7O7swMEkCJSROyKmgQ1VuyKsaBRQJSIIUEFGyjmERVbjMaGHUVB0ViIEnkpRlGMEmMkiSjWCLF3rIiKtK3zfvCaDTEwO7tsQ+f3Jc9zueyc3Z3/3Oec+5xzE05OTjR4eHiqRGBsA3h4TBleIDw8LPAC4eFhgRcIDw8LvEB4eFjgBcLDwwIvEB4eFniB8PCwwAuEh4cFXiA8PCzwAuHhYYEXCA8PC7xAeHhY4AXCw8MCLxAeHhZ4gfDwsMALhIeHBV4gPDws8ALh4WGBFwgPDwu8QHh4WOAFwsPDAi8QHh4WeIHw8LDAC4SHhwVeIDw8LPAC4eFhgRcIDw8LvEB4eFgQGduAd5U2bdqgTp06EIlEsLGxQb169UCSJJydnfHq1SuUlZVBKpXiyZMnUCgUuHr1KoqKivDy5Utjm85TCV4gOsDMzAzNmzeHm5sbPDw80L59e7Rq1Qrm5uYQCoUQi8Vq3+PRo0coKytDXl4e7t+/j4yMDFy7dg2lpaUG+AQ81UHw54NoT/PmzdG7d294eXmhc+fOoChK9W8KhQJKpRIAVP+tCoIgAAAikQgCwT8eb3l5OW7cuIFffvkF586dw2+//YaKigo9fRKe6uAFogXe3t7o1q0bAgICQFEUBAIBZDIZqxA0RSAQgCRJAIBcLkdeXh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20d%3D%22M16.361%2010.26a.894.894%200%200%200-.558.47l-.072.148.001.207c0%20.193.004.217.059.353.076.193.152.312.291.448.24.238.51.3.872.205a.86.86%200%200%200%20.517-.436.752.752%200%200%200%20.08-.498c-.064-.453-.33-.782-.724-.897a1.06%201.06%200%200%200-.466%200zm-9.203.005c-.305.096-.533.32-.65.639a1.187%201.187%200%200%200-.06.52c.057.309.31.59.598.667.362.095.632.033.872-.205.14-.136.215-.255.291-.448.055-.136.059-.16.059-.353l.001-.207-.072-.148a.894.894%200%200%200-.565-.472%201.02%201.02%200%200%200-.474.007Zm4.184%202c-.131.071-.223.25-.195.383.031.143.157.288.353.407.105.063.112.072.117.136.004.038-.01.146-.029.243-.02.094-.036.194-.036.222.002.074.07.195.143.253.064.052.076.054.255.059.164.005.198.001.264-.03.169-.082.212-.234.15-.525-.052-.243-.042-.28.087-.355.137-.08.281-.219.324-.314a.365.365%200%200%200-.175-.48.394.394%200%200%200-.181-.033c-.126%200-.207.03-.355.124l-.085.053-.053-.032c-.219-.13-.259-.145-.391-.143a.396.396%200%200%200-.193.032zm.39-2.195c-.373.036-.475.05-.654.086-.291.06-.68.195-.951.328-.94.46-1.589%201.226-1.787%202.114-.04.176-.045.234-.045.53%200%20.294.005.357.043.524.264%201.16%201.332%202.017%202.714%202.173.3.033%201.596.033%201.896%200%201.11-.125%202.064-.727%202.493-1.571.114-.226.169-.372.22-.602.039-.167.044-.23.044-.523%200-.297-.005-.355-.045-.531-.288-1.29-1.539-2.304-3.072-2.497a6.873%206.873%200%200%200-.855-.031zm.645.937a3.283%203.283%200%200%201%201.44.514c.223.148.537.458.671.662.166.251.26.508.303.82.02.143.01.251-.043.482-.08.345-.332.705-.672.957a3.115%203.115%200%200%201-.689.348c-.382.122-.632.144-1.525.138-.582-.006-.686-.01-.853-.042-.57-.107-1.022-.334-1.35-.68-.264-.28-.385-.535-.45-.946-.03-.192.025-.509.137-.776.136-.326.488-.73.836-.963.403-.269.934-.46%201.422-.512.187-.02.586-.02.773-.002zm-5.503-11a1.653%201.653%200%200%200-.683.298C5.617.74%205.173%201.666%204.985%202.819c-.07.436-.119%201.04-.119%201.503%200%20.544.064%201.24.155%201.721.02.107.031.202.023.208a8.12%208.12%200%200%201-.187.152%205.324%205.324%200%200%200-.949%201.02%205.49%205.49%200%200%200-.94%202.339%206.625%206.625%200%200%200-.023%201.357c.091.78.325%201.438.727%202.04l.13.195-.037.064c-.269.452-.498%201.105-.605%201.732-.084.496-.095.629-.095%201.294%200%20.67.009.803.088%201.266.095.555.288%201.143.503%201.534.071.128.243.393.264.407.007.003-.014.067-.046.141a7.405%207.405%200%200%200-.548%201.873c-.062.417-.071.552-.071.991%200%20.56.031.832.148%201.279L3.42%2024h1.478l-.05-.091c-.297-.552-.325-1.575-.068-2.597.117-.472.25-.819.498-1.296l.148-.29v-.177c0-.165-.003-.184-.057-.293a.915.915%200%200%200-.194-.25%201.74%201.74%200%200%201-.385-.543c-.424-.92-.506-2.286-.208-3.451.124-.486.329-.918.544-1.154a.787.787%200%200%200%20.223-.531c0-.195-.07-.355-.224-.522a3.136%203.136%200%200%201-.817-1.729c-.14-.96.114-2.005.69-2.834.563-.814%201.353-1.336%202.237-1.475.199-.033.57-.028.776.01.226.04.367.028.512-.041.179-.085.268-.19.374-.431.093-.215.165-.333.36-.576.234-.29.46-.489.822-.729.413-.27.884-.467%201.352-.561.17-.035.25-.04.569-.04.319%200%20.398.005.569.04a4.07%204.07%200%200%201%201.914.997c.117.109.398.457.488.602.034.057.095.177.132.267.105.241.195.346.374.43.14.068.286.082.503.045.343-.058.607-.053.943.016%201.144.23%202.14%201.173%202.581%202.437.385%201.108.276%202.267-.296%203.153-.097.15-.193.27-.333.419-.301.322-.301.722-.001%201.053.493.539.801%201.866.708%203.036-.062.772-.26%201.463-.533%201.854a2.096%202.096%200%200%201-.224.258.916.916%200%200%200-.194.25c-.054.109-.057.128-.057.293v.178l.148.29c.248.476.38.823.498%201.295.253%201.008.231%202.01-.059%202.581a.845.845%200%200%200-.044.098c0%20.006.329.009.732.009h.73l.02-.074.036-.134c.019-.076.057-.3.088-.516.029-.217.029-1.016%200-1.258-.11-.875-.295-1.57-.597-2.226-.032-.074-.053-.138-.046-.141.008-.005.057-.074.108-.152.376-.569.607-1.284.724-2.228.031-.26.031-1.378%200-1.628-.083-.645-.182-1.082-.348-1.525a6.083%206.083%200%200%200-.329-.7l-.038-.064.131-.194c.402-.604.636-1.262.727-2.04a6.625%206.625%200%200%200-.024-1.358%205.512%205.512%200%200%200-.939-2.339%205.325%205.325%200%200%200-.95-1.02%208.097%208.097%200%200%201-.186-.152.692.692%200%200%201%20.023-.208c.208-1.087.201-2.443-.017-3.503-.19-.924-.535-1.658-.98-2.082-.354-.338-.716-.482-1.15-.455-.996.059-1.8%201.205-2.116%203.01a6.805%206.805%200%200%200-.097.726c0%20.036-.007.066-.015.066a.96.96%200%200%201-.149-.078A4.857%204.857%200%200%200%2012%203.03c-.832%200-1.687.243-2.456.698a.958.958%200%200%201-.148.078c-.008%200-.015-.03-.015-.066a6.71%206.71%200%200%200-.097-.725C8.997%201.392%208.337.319%207.46.048a2.096%202.096%200%200%200-.585-.041Zm.293%201.402c.248.197.523.759.682%201.388.03.113.06.244.069.292.007.047.026.152.041.233.067.365.098.76.102%201.24l.002.475-.12.175-.118.178h-.278c-.324%200-.646.041-.954.124l-.238.06c-.033.007-.038-.003-.057-.144a8.438%208.438%200%200%201%20.016-2.323c.124-.788.413-1.501.696-1.711.067-.05.079-.049.157.013zm9.825-.012c.17.126.358.46.498.888.28.854.36%202.028.212%203.145-.019.14-.024.151-.057.144l-.238-.06a3.693%203.693%200%200%200-.954-.124h-.278l-.119-.178-.119-.175.002-.474c.004-.669.066-1.19.214-1.772.157-.623.434-1.185.68-1.382.078-.062.09-.063.159-.012z%22/%3E%3C/svg%3E",Qb={openai:Ub,anthropic:qb,kimi:Kb,bailian:Wb,zhipu:Hb,ollama:Vb,deepseek:zb},Gb={kimi:"#000000",ollama:"#FFFFFF"};function vo(e){return Qb[e]}function So(e){return Gb[e]}const at=[{id:"openai",name:"OpenAI",browserMode:"browserAssistedApiKey",browserLabel:"登录",description:"OpenAI 模型与编码能力",homeUrl:"https://openai.com",apiKeyUrl:"https://platform.openai.com/api-keys",apiKeyPlaceholder:"sk-...",defaultBaseUrl:"https://api.openai.com/v1"},{id:"anthropic",name:"Anthropic",browserMode:"browserAssistedApiKey",browserLabel:"登录",description:"Claude 模型与编码能力",homeUrl:"https://www.anthropic.com",apiKeyUrl:"https://console.anthropic.com/settings/keys",apiKeyPlaceholder:"sk-ant-...",defaultBaseUrl:"https://api.anthropic.com"},{id:"kimi",name:"Kimi",browserMode:"browserAssistedApiKey",browserLabel:"登录",description:"Moonshot AI 模型服务",homeUrl:"https://www.moonshot.cn",apiKeyUrl:"https://platform.moonshot.cn/console/api-keys",apiKeyPlaceholder:"sk-...",defaultBaseUrl:"https://api.moonshot.cn/v1"},{id:"bailian",name:"百炼",browserMode:"browserAssistedApiKey",browserLabel:"登录",description:"阿里云百炼模型服务",homeUrl:"https://www.aliyun.com/product/bailian",apiKeyUrl:"https://bailian.console.aliyun.com/#/api-key",apiKeyPlaceholder:"sk-...",defaultBaseUrl:"https://dashscope.aliyuncs.com/compatible-mode/v1"},{id:"deepseek",name:"DeepSeek",browserMode:"connectUnsupported",browserLabel:"不支持登录",description:"DeepSeek 模型服务",homeUrl:"https://www.deepseek.com",apiKeyUrl:"https://platform.deepseek.com/api_keys",apiKeyPlaceholder:"sk-...",defaultBaseUrl:"https://api.deepseek.com/v1"},{id:"zhipu",name:"智谱 AI",browserMode:"browserAssistedApiKey",browserLabel:"登录",description:"智谱 AI / GLM 模型服务",homeUrl:"https://open.bigmodel.cn",apiKeyUrl:"https://open.bigmodel.cn/usercenter/apikeys",apiKeyPlaceholder:"id.secret-...",defaultBaseUrl:"https://open.bigmodel.cn/api/paas/v4"},{id:"ollama",name:"Ollama",browserMode:"connectUnsupported",browserLabel:"本地服务",description:"本地 Ollama 模型服务",homeUrl:"https://ollama.com",defaultBaseUrl:"http://localhost:11434/v1"},{id:"custom",name:"Custom",browserMode:"browserAssistedApiKey",browserLabel:"配置",description:"OpenAI / Anthropic 兼容的自定义模型服务",homeUrl:"https://undefineds.co",apiKeyPlaceholder:"sk-...",defaultBaseUrl:"https://example.com/v1"}],sl=[{id:"keys",label:"API Keys",title:"API KEYS"}];if(at.map(e=>e.id).join(",")!==zd.join(","))throw new Error("AI Connection provider UI is out of sync with the client catalog");function Jb(e){const t=e.solid.session.getSnapshot(),r=e.solid.pod,n=r?.status==="ready"?r:void 0,o=t.status==="authenticated"&&n!==void 0?Xb(Yb(Wp({webId:t.webId,podBaseUrl:n.current.podUrl,authenticatedFetch:e.solid.session.fetch}),e.capabilities.aiClientCredentials),e.capabilities.aiConnectionsPodStore):null;let a="keys",s="openai",c,d="",p={},g={},_,I=0,C;const E=new Set,m=()=>E.forEach(S=>S()),R={client:o,openExternal:e.navigation.openExternal,clientConfigurationBridge:e.capabilities.aiClientConfiguration,get selectedSection(){return a},get selectedProvider(){return s},get selectedCredentialId(){return c},get searchQuery(){return d},get providerStates(){return p},get providerSummaries(){return g},get providerLoadError(){return _},selectSection(S){a!==S&&(a=S,m())},selectProvider(S,v){const Q=S==="custom"?v:void 0;a==="provider"&&s===S&&c===Q||(a="provider",s=S,c=Q,m())},selectFirstUnconfiguredProvider(){const S=at.findIndex(Y=>Y.id===s),Q=(S<0?at:[...at.slice(S+1),...at.slice(0,S+1)]).find(Y=>p[Y.id]==="unconfigured"&&Y.id!==s)??at.find(Y=>p[Y.id]==="unconfigured")??at[0];Q&&R.selectProvider(Q.id)},setSearchQuery(S){d!==S&&(d=S,m())},setProviderState(S,v){if(p[S]===v)return;I+=1,p={...p,[S]:v};const Q=g[S]?void 0:om(S,v);Q&&(g={...g,[S]:Q}),m()},async loadProviders(){if(o)return C||(C=(async()=>{const S=I+1;I=S,_=void 0,m();try{const v=await o.listProviders();if(S!==I)return;g=Object.fromEntries(v.map(Q=>[Q.id,Q])),p=Object.fromEntries(at.map(Q=>[Q.id,em(g[Q.id])])),m()}catch(v){if(S!==I)return;_=am(v),m()}finally{C=void 0}})(),C)},subscribe(S){return E.add(S),()=>E.delete(S)}};return R}function Yb(e,t){return{...e,async createGatewayKey(r){if(!t)throw new Error("当前账号登录状态不支持创建客户端凭据。");const n=await t.create({name:r.name,webId:e.webId});try{return await e.createGatewayKey({...r,apiKey:n.apiKey,credentialResource:n.resource})}catch(i){try{await t.revoke({clientId:sm(n.apiKey),resource:n.resource,webId:e.webId})}catch{throw new Error("API Key 未能保存到 Pod,且账号凭据撤销失败。该凭据尚未应用到客户端。")}throw i}},async deleteGatewayKey(r){const n=(await e.listGatewayKeys()).find(i=>i.id===r);if(n?.kind==="client-credentials"){if(!t||!n.clientCredentialId)throw new Error("当前账号登录状态无法撤销此客户端凭据,Key 记录已保留。");const o=(await t.list()).find(a=>a.clientId===n.clientCredentialId);if(!o)throw new Error("账号服务中已找不到该客户端凭据,请刷新后重试。");await t.revoke({clientId:o.clientId,resource:o.resource,webId:e.webId})}await e.deleteGatewayKey(r)}}}function Xb(e,t){if(!t)return e;const r=new Map,n=t.readCredentialSecret&&t.updateOAuthCredential?(o,a)=>{const s=JSON.stringify([o,a]),c=r.get(s);if(c)return c;const d=(async()=>{const g=(await t.listProviders()).find(R=>R.id===o)?.credentials.find(R=>R.id===a);if(!g)throw new Error("oauth_credential_not_found");const _=await t.readCredentialSecret(o,a),I=typeof _.refreshToken=="string"?_.refreshToken:void 0;if(!I)throw new Error("oauth_refresh_token_required");const C=await e.refreshOAuthCredential(o,a,I,g.version,g.offeringId,_.authorizationMethodId==="browser-oauth"?"authorizationCodeOAuth":void 0);if(C.status!=="completed"||!C.oauthCredential)throw new Error("oauth_refresh_failed");await t.updateOAuthCredential(o,a,g.version,C.oauthCredential);const{oauthCredential:E,...m}=C;return m})().finally(()=>{r.delete(s)});return r.set(s,d),d}:e.refreshOAuthCredential,i=async(o,a,s=!1)=>{let c=!1,d=await t.readCredentialSecret(o,a.id);const p=typeof d.expiresAt=="string"?d.expiresAt:a.expiresAt;if((a.authMode==="oauth"||a.authMode==="deviceCode")&&(s||p&&Date.parse(p)<=Date.now()+6e4)){if(!t.updateOAuthCredential)throw new Error("oauth_refresh_unavailable");await n(o,a.id,"",a.version);const _=(await t.listProviders()).find(I=>I.id===o)?.credentials.find(I=>I.id===a.id);if(!_)throw new Error("oauth_credential_not_found");c=!0,a=_,d=await t.readCredentialSecret(o,a.id)}return{credential:a,secret:d,didRefresh:c}};return{...e,listProviders:async()=>nm(await t.listProviders(),e.listAuthorizationMethods?await e.listAuthorizationMethods():[]),listModels:t.listModels?async()=>t.listModels():e.listModels,createApiKeyCredential:t.createApiKeyCredential?async(o,a)=>t.createApiKeyCredential(o,a):e.createApiKeyCredential,createLocalCredential:t.createLocalCredential?async(o,a)=>a.authorizationMethodId==="local-session-import"||!a.authorizationMethodId&&a.offeringId==="official-subscription"?e.createLocalCredential(o,a):t.createLocalCredential(o,a):e.createLocalCredential,updateProviderCredential:t.updateProviderCredential?async(o,a,s)=>t.updateProviderCredential(o,a,s):e.updateProviderCredential,deleteProviderCredential:t.deleteProviderCredential?async(o,a)=>t.deleteProviderCredential(o,a):e.deleteProviderCredential,pollDevice:t.saveOAuthCredential?async(o,a)=>{const s=await e.pollDevice(o,a);if(s.status!=="completed"||!s.oauthCredential)return s;const c=await t.saveOAuthCredential(o,s.oauthCredential),{oauthCredential:d,...p}=s;return{...p,credentialId:c?.id??s.credentialId}}:e.pollDevice,refreshOAuthCredential:n,quota:t.readCredentialSecret?async(o,a=!1,s)=>{const d=(await t.listProviders()).find(C=>C.id===o)?.credentials??[],p=s?.credentialId??s?.credentialIri,g=p?d.find(C=>C.id===p):d.find(C=>C.enabled&&(!s?.offeringId||C.offeringId===s.offeringId));if(!g)throw new Error("quota_credential_not_found");const{secret:_}=await i(o,g),I=la(_,g.authMode);if(!I)throw new Error("credential_secret_unavailable");return e.quotaFromSecret(o,{credentialId:g.id,credentialIri:g.id,authMode:g.authMode==="deviceCode"||g.authMode==="oauth"?"deviceCodeOAuth":"apiKey",offeringId:g.offeringId,baseUrl:g.baseUrl,proxyUrl:g.proxyUrl,compatibility:g.compatibility,secret:I})}:e.quota,disconnect:async(o,a)=>!a||!t.deleteProviderCredential?e.disconnect(o,a):await t.deleteProviderCredential(o,a),testProviderCredential:t.readCredentialSecret?async(o,a)=>{let c=(await t.listProviders()).find(C=>C.id===o)?.credentials.find(C=>C.id===a.credentialId);if(!c)throw new Error("test_credential_not_found");const d=await i(o,c);c=d.credential;const{secret:p}=d,g=la(p,c.authMode);if(!g)throw new Error("test_secret_missing");let _;try{_=await e.discoverModels(o,{credentialId:c.id,offeringId:c.offeringId,authMode:c.authMode==="deviceCode"||c.authMode==="oauth"?"deviceCodeOAuth":c.authMode==="local"?"local":"apiKey",secret:g,baseUrl:c.baseUrl,proxyUrl:c.proxyUrl,compatibility:c.compatibility})}catch(C){throw await t.markCredentialHealth?.(o,c.id,"invalid",c.version).catch(()=>{}),C}const I=await t.markCredentialHealth?.(o,c.id,"healthy",c.version);return{ok:!0,credentialId:c.id,...I?{credential:I}:{},modelCount:_.models.length,observedAt:_.observedAt}}:e.testProviderCredential,discoverModels:t.readCredentialSecret?async(o,a)=>{const d=(await t.listProviders()).find(m=>m.id===o)?.credentials.filter(m=>m.enabled&&(!a?.offeringId||m.offeringId===a.offeringId)&&(!a?.credentialId||m.id===a.credentialId))??[];if(d.length===0)throw new Error("models_credential_not_found");const p=m=>JSON.stringify([o,m.offeringId,(m.baseUrl??"").trim().replace(/\/+$/u,""),a?.compatibility??m.compatibility??"auto",o==="custom"?m.id:void 0]),g=new Map;for(const m of[...d].sort((R,S)=>R.priority-S.priority)){const R=p(m),S=g.get(R)??[];S.push(m),g.set(R,S)}const _=await Promise.allSettled([...g.values()].map(async m=>{let R;for(const S of m)try{let v=await i(o,S);const Q=()=>{const ee=la(v.secret,S.authMode);if(!ee)throw new Error("models_secret_missing");return e.discoverModels(o,{credentialId:S.id,offeringId:S.offeringId,authMode:S.authMode==="deviceCode"||S.authMode==="oauth"?"deviceCodeOAuth":S.authMode==="local"?"local":"apiKey",secret:ee,baseUrl:S.baseUrl,proxyUrl:S.proxyUrl,compatibility:a?.compatibility??S.compatibility})};let Y;try{Y=await Q()}catch(ee){if(v.didRefresh||!(ee instanceof Hp)||ee.code!=="provider_models_fetch_failed"||ee.providerStatus!==401||S.authMode!=="oauth"&&S.authMode!=="deviceCode")throw ee;v=await i(o,v.credential,!0),Y=await Q()}return{...Y,credential:S.id,credentialVersion:v.credential.version,models:Y.models.map(ee=>({...ee,offeringId:S.offeringId,...o==="custom"?{credentialId:S.id}:{}}))}}catch(v){R=v}throw R})),I=_.flatMap(m=>m.status==="fulfilled"?[m.value]:[]);if(I.length===0)throw _[0].reason;for(const m of I)await t.markCredentialHealth?.(o,m.credential,"healthy",m.credentialVersion);const C=m=>`${m.offeringId}\0${m.credentialId??""}\0${("resourceId"in m?m.resourceId:void 0)??m.id}`;if(t.saveDiscoveredModels)try{const m=new Set([...g.values()].flatMap((S,v)=>_[v]?.status==="rejected"?[S[0].offeringId]:[])),R=new Map;for(const S of I){const v=d.find(ee=>ee.id===S.credential);if(o!=="custom"&&m.has(v.offeringId))continue;const Q=o==="custom"?v.id:v.offeringId,Y=R.get(Q)??{credential:v.id,models:[]};Y.models.push(...S.models),R.set(Q,Y)}for(const S of R.values())await t.saveDiscoveredModels(o,S.credential,[...new Map(S.models.map(v=>[C(v),v])).values()])}catch{throw new Error("models_persistence_failed")}const E=[...new Map(I.flatMap(m=>m.models).map(m=>[C(m),m])).values()];return{...I[0],models:E,complete:I.length===g.size}}:e.discoverModels,saveModelSelection:t.saveModelSelection?async(o,a,s)=>t.saveModelSelection(o,a,s):e.saveModelSelection}}function ll(e){return G.useSyncExternalStore(e.subscribe,()=>e.selectedSection??"provider",()=>e.selectedSection??"provider")}function ul(e){return G.useSyncExternalStore(e.subscribe,()=>e.selectedProvider,()=>e.selectedProvider)}function Jf(e){return G.useSyncExternalStore(e.subscribe,()=>e.selectedCredentialId,()=>e.selectedCredentialId)}function Yf(e){return G.useSyncExternalStore(e.subscribe,()=>e.searchQuery,()=>e.searchQuery)}function Zb(e){return G.useSyncExternalStore(e.subscribe,()=>e.providerStates,()=>e.providerStates)}function $b(e){return G.useSyncExternalStore(e.subscribe,()=>yu(e.providerSummaries),()=>yu(e.providerSummaries))}function cl(e){return G.useSyncExternalStore(e.subscribe,()=>e.providerSummaries,()=>e.providerSummaries)}function Xf(e){return G.useSyncExternalStore(e.subscribe,()=>e.providerLoadError,()=>e.providerLoadError)}function em(e){if(!e||e.status==="unconfigured"||e.status==="unavailable")return"unconfigured";if(e.status==="configured")return"configured";if(e.status==="attention")return"attention";const t=Zf(e);return t?.authMode==="oauth"||t?.authMode==="deviceCode"?"connected":"configured"}const pu=new WeakMap;function yu(e){const t=pu.get(e);if(t)return t;const r=Object.fromEntries(Object.values(e).filter($f).map(n=>[n.id,tm(n)]));return pu.set(e,r),r}function tm(e){const t=Zf(e),r=e.status==="available"?"connected":e.status==="attention"?"reauthRequired":"disconnected",n=t?.authMode;return{provider:e.id,status:r,authMode:n==="oauth"||n==="deviceCode"?"deviceCodeOAuth":n?"browserAssistedApiKey":void 0,accountLabel:t?.label,expiresAt:t?.expiresAt,reauthRequired:r==="reauthRequired"?!0:void 0,credentialIri:t?.id,version:t?.version,connect:{modes:rm(e),configured:e.status!=="unavailable"}}}function rm(e){const t=[...e.offerings.flatMap(r=>r.authModes??[]),...e.credentials.map(r=>r.authMode)].map(r=>r==="oauth"||r==="deviceCode"?"deviceCodeOAuth":r==="apiKey"||r==="local"?"browserAssistedApiKey":void 0).filter($f);return t.length>0?[...new Set(t)]:["browserAssistedApiKey"]}function Zf(e){return e.credentials.find(t=>t.enabled)??e.credentials[0]}function nm(e,t){if(t.length===0)return e;const r=new Map(t.map(n=>[`${n.provider}:${n.offeringId}`,n]));return e.map(n=>({...n,offerings:n.offerings.map(i=>{const o=r.get(`${n.id}:${i.id}`);if(!o)return i;const a=o.authorizationMethods;return{...i,...o.endpoints?{endpoints:o.endpoints}:{},...a.length?{authorizationMethods:a,authModes:im(i.authModes,a.map(s=>s.authMode))}:{}}})}))}function im(e,t){return Array.from(new Set([...e??[],...t]))}function om(e,t){if(t==="configured")return{id:e,name:sa(e),offerings:[],credentials:[gu(e,"apiKey")],selectedModels:[],status:"available"};if(t==="connected")return{id:e,name:sa(e),offerings:[],credentials:[gu(e,"deviceCode")],selectedModels:[],status:"available"};if(t!=="attention"&&t!=="loading")return{id:e,name:sa(e),offerings:[],credentials:[],selectedModels:[],status:"unconfigured"}}function gu(e,t){return{id:`${e}:current`,offeringId:t==="deviceCode"||t==="oauth"?"official-subscription":"api-platform",authMode:t,enabled:!0,priority:0,health:"healthy",version:0}}function sa(e){return at.find(t=>t.id===e)?.name??e}function la(e,t){if(t==="deviceCode"||t==="oauth"){const n=typeof e.accessToken=="string"&&e.accessToken.trim()?e.accessToken:void 0;return n?{type:"oauth",accessToken:n}:void 0}if(t==="local")return{type:"local"};const r=typeof e.apiKey=="string"&&e.apiKey.trim()?e.apiKey:void 0;return r?{type:"apiKey",apiKey:r}:void 0}function $f(e){return e!==void 0}function am(e){return Wd(e)}function sm(e){const t=atob(e.replace(/^sk-/u,"")),r=t.indexOf(":");if(r<=0)throw new Error("客户端凭据格式无效。");return t.slice(0,r)}function lm({controller:e}){const t=G.useContext(Gp),r=ll(e),n=ul(e),i=Jf(e),o=Yf(e).trim().toLocaleLowerCase(),a=Zb(e),s=cl(e),c=Xf(e),d=at.reduce((E,m)=>{if(m.id!=="custom")return[...E,{...m}];const R=s.custom?.credentials??[];return[...E,...R.map(S=>({...m,name:S.label||m.name,credentialId:S.id}))]},[]),p=o?d.filter(E=>ua(E,s).toLocaleLowerCase().includes(o)):d,g=[...sl.map(E=>({kind:"section",id:E.id,label:E.label})),...p.map(E=>({kind:"provider",provider:E}))],_=G.useRef([]),I=g.findIndex(E=>E.kind==="section"?r===E.id:r==="provider"&&E.provider.id===n&&E.provider.credentialId===i),C=E=>{E.kind==="section"?e.selectSection(E.id):e.selectProvider(E.provider.id,E.provider.credentialId),t?.mode==="stack"&&t.openMain()};return y.jsxs("div",{role:"listbox","aria-label":"AI 服务","aria-orientation":"vertical",className:"py-2",children:[y.jsx("section",{className:"mb-3","aria-label":"API Keys",children:g.filter(E=>E.kind==="section").map(E=>{const m=g.indexOf(E);return y.jsxs(bu,{index:m,selected:r===E.id,tabbable:I===m||I<0&&m===0,label:E.label,optionRefs:_,onActivate:()=>C(E),onMove:R=>mu(g,R,e,_),children:[y.jsx(um,{section:E.id}),y.jsx("span",{className:Ke("min-w-0 flex-1 truncate text-sm font-medium",r===E.id?"text-foreground":"text-foreground/80"),children:E.label})]},E.id)})}),y.jsxs("section",{children:[y.jsx("h2",{className:"px-5 py-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Provider"}),p.map(E=>{const m=g.findIndex(v=>v.kind==="provider"&&v.provider.id===E.id&&v.provider.credentialId===E.credentialId),R=r==="provider"&&n===E.id&&E.credentialId===i,S=a[E.id]??"loading";return y.jsxs(bu,{index:m,selected:R,tabbable:R||I<0&&m===0,label:ua(E,s),describedBy:`ai-connections-provider-${E.id}-${E.credentialId??"default"}-status`,optionRefs:_,onActivate:()=>C({kind:"provider",provider:E}),onMove:v=>mu(g,v,e,_),children:[y.jsxs(To,{className:"h-9 w-9 shrink-0 rounded-md border border-border/20",style:So(E.id)?{backgroundColor:So(E.id)}:void 0,children:[y.jsx(Ud,{src:vo(E.id),className:"object-cover"}),y.jsx(ko,{className:"rounded-md bg-muted text-[10px] font-bold uppercase text-muted-foreground",children:dm(E.id)})]}),y.jsx("span",{className:Ke("min-w-0 flex-1 truncate text-sm font-medium",R?"text-foreground":"text-foreground/80"),children:ua(E,s)}),y.jsx(cm,{state:S,statusId:`ai-connections-provider-${E.id}-${E.credentialId??"default"}-status`})]},`${E.id}:${E.credentialId??"default"}`)}),p.length===0?y.jsx("p",{className:"p-8 text-center text-xs text-muted-foreground",children:"无结果"}):null]}),c?y.jsxs("p",{className:"px-4 py-2 text-xs text-destructive",children:["Provider 状态读取失败:",c]}):null]})}function bu({index:e,selected:t,tabbable:r,label:n,describedBy:i,statusId:o,optionRefs:a,onActivate:s,onMove:c,children:d}){const p=g=>{if(g.key==="ArrowDown")c(e+1);else if(g.key==="ArrowUp")c(e-1);else if(g.key==="Home")c(0);else if(g.key==="End")c(Number.POSITIVE_INFINITY);else if(g.key==="Enter"||g.key===" "){g.preventDefault(),s();return}else return;g.preventDefault()};return y.jsx("button",{ref:g=>{a.current[e]=g},type:"button",role:"option","aria-selected":t,"aria-label":n,"aria-describedby":i??o,tabIndex:r?0:-1,onClick:s,onKeyDown:p,className:Ke("group flex w-full items-center gap-3 border-l-[3px] border-transparent px-4 py-3 text-left transition-colors",t?"border-l-primary bg-accent/80":"hover:bg-muted/40"),children:d})}function mu(e,t,r,n){const i=Math.min(Math.max(t,0),e.length-1),o=e[i];o&&(o.kind==="section"?r.selectSection(o.id):r.selectProvider(o.provider.id,o.provider.credentialId),n.current[i]?.focus())}function um({section:e}){return y.jsx(To,{className:"h-9 w-9 shrink-0 rounded-md border border-border/20 bg-muted",children:y.jsx(ko,{className:"rounded-md bg-muted text-[10px] font-bold uppercase text-muted-foreground",children:"XP"})})}function cm({state:e,statusId:t}){const r=e==="configured"||e==="connected";return y.jsxs("span",{id:t,role:"status","aria-live":"polite",className:"flex shrink-0 items-center gap-1.5",children:[r?y.jsx("span",{className:"h-2 w-2 rounded-full bg-primary","aria-hidden":"true"}):null,y.jsx("span",{className:"text-[11px] font-normal text-muted-foreground",children:fm(e)})]})}function dm(e){switch(e){case"openai":return"OA";case"anthropic":return"A";case"kimi":return"K";case"bailian":return"百";case"deepseek":return"DS";case"zhipu":return"智";case"ollama":return"O";case"custom":return"C"}}function ua(e,t){return e.name||t[e.id]?.name||e.id}function fm(e){switch(e){case"unconfigured":return"未设置";case"configured":return"已配置";case"connected":return"已连接";case"attention":return"需处理";default:return"读取中"}}function on(e){if(e.authorizationMethods?.length)return e.authorizationMethods;const t=e.lifecycle==="unavailable"?"unavailable":"active";return[...new Set(e.authModes??[])].map(r=>{if(r==="apiKey")return{id:"api-key",authMode:"apiKey",connectMode:"browserAssistedApiKey",label:"API Key",lifecycle:t};if(r==="local"){const n=e.kind==="local";return{id:n?"local-service":"local-session-import",authMode:"local",label:n?"本地服务":"已有登录态",lifecycle:t}}return{id:"device-code",authMode:r,connectMode:"deviceCodeOAuth",label:"",lifecycle:t}})}function zo(e){if(e.connectMode)return e.connectMode;if(e.authMode==="oauth"||e.authMode==="deviceCode")return"deviceCodeOAuth";if(e.authMode==="apiKey")return"browserAssistedApiKey"}function zr(e){return e==="deviceCodeOAuth"||e==="authorizationCodeOAuth"}function Ds(e){return zr(zo(e))}function eh(e){return e.authMode==="apiKey"||zo(e)==="browserAssistedApiKey"}function Ps(e){return e.authMode==="local"}function hm(e,t){const r=e.authModes??[];return r.some(n=>n==="oauth"||n==="deviceCode")?"deviceCodeOAuth":r.some(n=>n==="apiKey"||n==="local")||t.browserMode==="connectUnsupported"?"browserAssistedApiKey":t.browserMode}function bo(e){return e?.status==="pending"||e?.status==="authorization_pending"||e?.status==="slow_down"}const th={"oauth-subscription":"Subscription","api-platform":"API Platform","token-plan":"Token Plan",local:"Local"};function $e(e){const t=e.label?.trim();if(t)return t;const r=e.kind?th[e.kind]:void 0;return r||(e.authModes?.some(n=>n==="apiKey")?"API Key":e.authModes?.some(n=>n==="oauth"||n==="deviceCode")?"Account":e.id)}function pm(e){return th[e]??e}function ym(e,t){const r=(t?.length?t:on(e)).map(n=>n.authMode==="apiKey"?"API Key":n.authMode==="local"?n.label:"账号授权");return[...new Set(r)].join(" / ")}function gm(e){return e.length===0?10:Math.max(...e.map(t=>t.priority))+10}function an(e){return e.label?.trim()?e.label:e.maskedHint?`API Key · ${e.maskedHint}`:e.authMode==="oauth"||e.authMode==="deviceCode"?"已授权账号":"API Key"}function wu(e){const t=e.indexOf("@");if(t>0){const r=e.slice(0,t);return`${r.length>6?`${r.slice(0,3)}***${r.slice(-2)}`:r.length>1?`${r[0]}***${r[r.length-1]}`:`${r[0]}***`}${e.slice(t)}`}return e}function bm(e){return e==="healthy"?"有效":e==="unknown"?"未验证":e==="expired"?"已过期":"错误"}function mm(e){return e==="healthy"?{row:"border-emerald-500/40 bg-emerald-500/5",dot:"bg-emerald-500"}:e==="unknown"?{row:"border-border/50 bg-background",dot:"bg-muted-foreground/50"}:{row:"border-destructive/40 bg-destructive/5",dot:"bg-destructive"}}function wm({providerName:e,offeringName:t,quota:r,busy:n,disabled:i=!1,credentialLabel:o,multiple:a=!1,compact:s=!1,paused:c=!1,error:d,onRefresh:p}){if(s){const g=!n&&!d&&r?.status==="available";return y.jsx("div",{className:`min-w-0 text-xs text-muted-foreground ${c?"opacity-60":""}`,children:y.jsxs("div",{className:"flex items-start gap-1",children:[y.jsxs("div",{className:"min-w-0 flex-1 truncate py-1 [&>span+span]:ml-3",children:[c?y.jsx("span",{children:"已停用 · 不参与全部刷新"}):null,n?y.jsx("span",{role:"status",children:"正在查询额度…"}):d?y.jsx("span",{role:"alert",title:d,className:"text-destructive",children:d}):r?r.status==="unsupported"?y.jsx("span",{children:"官方额度接口不支持"}):r.status==="error"?y.jsx("span",{role:"alert",className:"text-destructive",children:"额度查询失败"}):y.jsx(Au,{quota:r}):y.jsx("span",{children:o?"尚未检查":`连接${t}后可查询`}),g&&r.stale?y.jsx("span",{children:"数据可能已过期"}):null]}),y.jsx(Am,{quota:r,label:o??t}),y.jsx(_e,{className:"h-6 w-6 shrink-0 p-0",variant:"ghost",size:"sm","aria-label":`刷新 ${e} ${t}${o?` ${o}`:""}额度`,disabled:n||i,onClick:p,children:n?y.jsx(kt,{"aria-hidden":"true",className:"h-3 w-3 animate-spin"}):y.jsx(su,{"aria-hidden":"true",className:"h-3 w-3"})})]})})}return y.jsxs("div",{className:`${a?"space-y-1.5":"space-y-3"} border-t border-border/40 pt-3 ${c?"opacity-60":""}`,children:[y.jsxs("div",{className:"flex items-center justify-between gap-2",children:[y.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[a?null:y.jsx(rg,{className:"h-4 w-4 shrink-0 text-primary"}),y.jsxs("div",{className:"min-w-0",children:[y.jsx("div",{className:"break-all text-sm font-medium text-foreground/90",children:a?`凭证:${o}`:"剩余额度"}),a&&!n&&!d&&r?.status==="available"?y.jsx("div",{className:"flex flex-wrap gap-x-3 gap-y-1 text-xs text-muted-foreground",children:y.jsx(Au,{quota:r})}):null]})]}),y.jsxs(_e,{className:"shrink-0",variant:"ghost",size:"sm","aria-label":`刷新 ${e} ${t}${a?` ${o}`:""}额度`,disabled:n||i,onClick:p,children:[n?y.jsx(kt,{"aria-hidden":"true",className:"mr-2 h-3.5 w-3.5 animate-spin"}):y.jsx(su,{"aria-hidden":"true",className:"mr-2 h-3.5 w-3.5"}),n?"查询中":"刷新"]})]}),o&&!a?y.jsxs("p",{className:"text-xs text-muted-foreground",children:["凭证:",o]}):null,c?y.jsx("p",{className:"text-xs text-muted-foreground",children:"已停用 · 不参与全部刷新"}):null,n?y.jsx("p",{role:"status",className:"text-xs text-muted-foreground",children:"正在查询额度…"}):d?y.jsx("p",{role:"alert",className:"text-sm text-destructive",children:d}):r?r.status==="unsupported"?y.jsxs(y.Fragment,{children:[y.jsx("p",{className:"text-sm",children:"官方额度接口不支持"}),y.jsxs("p",{className:"text-xs text-muted-foreground",children:["来源:",r.source]})]}):r.status==="error"?y.jsx("p",{className:"text-sm text-destructive",children:"额度查询失败"}):a?y.jsxs("details",{className:"text-xs text-muted-foreground",children:[y.jsx("summary",{className:"cursor-pointer","aria-label":`${o}额度详情`,children:"详情"}),y.jsx("div",{className:"pt-3",children:y.jsx(Ts,{quota:r,hideBalance:!0})})]}):y.jsx(Ts,{quota:r}):y.jsx("p",{className:"text-xs text-muted-foreground",children:o?"尚未检查":`连接${t}后可查询`})]})}function Am({quota:e,label:t}){const[r,n]=G.useState({left:16,top:16,maxHeight:400}),[i,o]=G.useState(!1),a=G.useRef(null),s=G.useRef(null),c=G.useRef(!1);return G.useEffect(()=>{if(!i)return;const d=g=>{!(g.target instanceof Node)||a.current?.contains(g.target)||s.current?.contains(g.target)||(c.current=!0,o(!1))},p=g=>{g.type==="scroll"&&g.target instanceof Node&&s.current?.contains(g.target)||(c.current=!0,o(!1))};return document.addEventListener("pointerdown",d,!0),document.addEventListener("scroll",p,!0),window.addEventListener("resize",p),()=>{document.removeEventListener("pointerdown",d,!0),document.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p)}},[i]),y.jsxs(Ii,{modal:!1,open:i,onOpenChange:d=>{c.current=!1,o(d)},children:[y.jsx(ng,{asChild:!0,children:y.jsx(_e,{ref:a,className:"h-6 w-6 shrink-0 p-0",variant:"ghost",size:"sm","aria-label":`${t}额度详情`,disabled:!e||e.status==="error",onClick:d=>{const p=d.currentTarget.getBoundingClientRect(),g=Math.min(320,window.innerWidth-32),_=Math.max(16,Math.min(p.right-g,window.innerWidth-g-16)),I=Math.max(16,Math.min(p.bottom+8,window.innerHeight-320));n({left:_,top:I,maxHeight:window.innerHeight-I-16})},children:y.jsx(af,{"aria-hidden":"true",className:"h-3 w-3"})})}),y.jsxs(An,{ref:s,className:"w-[calc(100vw-2rem)] max-w-xs overflow-y-auto p-4",onEscapeKeyDown:()=>a.current?.focus(),onCloseAutoFocus:d=>{c.current&&d.preventDefault()},style:{...r,transform:"none",animation:"none"},"aria-describedby":void 0,children:[y.jsx(_n,{className:"pr-8 text-sm",children:"额度详情"}),e?.status==="available"?y.jsx(Ts,{quota:e}):e?y.jsxs("p",{className:"break-words text-xs text-muted-foreground",children:["来源:",e.source]}):null]})]})}function Au({quota:e}){return y.jsxs(y.Fragment,{children:[typeof e.balance=="number"?y.jsxs("span",{children:["余额:",e.balance]}):null,e.windows.map((t,r)=>y.jsxs("span",{children:[ks(t.name)," · ",rh(t)]},r)),typeof e.balance!="number"&&e.windows.length===0?y.jsx("span",{children:"服务商未返回额度数据"}):null]})}function Ts({quota:e,hideBalance:t=!1}){return y.jsxs("div",{className:"space-y-3 text-sm",children:[!t&&typeof e.balance=="number"?y.jsxs("div",{children:["余额:",e.balance]}):null,e.windows.map((r,n)=>y.jsxs("div",{className:"space-y-1.5",children:[y.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y.jsx("span",{className:"font-medium text-foreground",children:ks(r.name)}),y.jsx("span",{className:"text-muted-foreground",children:rh(r)})]}),ii(r)!==void 0?y.jsx("div",{"aria-label":`${ks(r.name)}剩余 ${String(ii(r))}%`,className:"h-1.5 overflow-hidden rounded-full bg-muted",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":ii(r),children:y.jsx("div",{className:"h-full rounded-full bg-primary",style:{width:`${String(ii(r))}%`}})}):null,r.resetsAt?y.jsxs("p",{className:"text-xs text-muted-foreground",children:["重置:",_u(r.resetsAt)]}):null]},`${String(r.name)}-${n}`)),y.jsxs("p",{className:"text-xs text-muted-foreground",children:["更新:",_u(e.observedAt)]}),y.jsxs("p",{className:"break-words text-xs text-muted-foreground",children:["来源:",e.source,e.stale?" · 数据可能已过期":""]})]})}function ks(e){switch(e){case"five-hour":return"5 小时限制";case"weekly":return"周限制";case"monthly":return"月限制";case"weekly-opus":return"Opus 周限制";case"weekly-sonnet":return"Sonnet 周限制";case"available_balance":return"可用余额";case"voucher_balance":return"赠送余额";case"cash_balance":return"现金余额";default:return typeof e=="string"&&e?e:"额度"}}function ii(e){if(!(typeof e.remaining!="number"||typeof e.limit!="number"||e.limit<=0))return Math.max(0,Math.min(100,Math.round(e.remaining/e.limit*1e4)/100))}function rh(e){const t=ii(e);if(t!==void 0)return`剩余 ${String(t)}%`;if(typeof e.remaining=="number"){const r=typeof e.currency=="string"?` ${e.currency}`:"";return`剩余 ${String(e.remaining)}${r}`}return"官方数据可用"}function _u(e){const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function _m({methods:e,offering:t,hasCredentials:r,busy:n,disabled:i,onBeginOffering:o,onCreateLocalCredential:a}){return e.length===0?null:y.jsx("div",{className:"space-y-2",children:y.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(s=>{const c=zo(s);return zr(c)?y.jsxs(_e,{variant:"outline",size:"sm",className:"h-8 gap-1.5 text-xs",disabled:n||i||!o,onClick:()=>o?.(t,c,s),children:[n?y.jsx(kt,{className:"h-3.5 w-3.5 animate-spin"}):y.jsx(No,{className:"h-3.5 w-3.5"}),s.label||(r?"添加账号":"登录")]},s.id):Ps(s)?y.jsxs(_e,{variant:"outline",size:"sm",className:"h-8 gap-1.5 text-xs",title:"导入当前设备已有登录态,不会发起新的浏览器授权。",disabled:n||i||!a,onClick:()=>{a?.(t,s)},children:[n?y.jsx(kt,{className:"h-3.5 w-3.5 animate-spin"}):y.jsx(wn,{className:"h-3.5 w-3.5"}),s.label||"已有登录态"]},s.id):null})})})}function vm(e){const t=e.modelDiscovery?.endpointProtocol;return e.endpoints?.find(r=>r.protocol===t)?.baseUrl??e.endpoints?.[0]?.baseUrl}function Sm(e){try{const t=new URL(e);return`${t.host}${t.pathname.replace(/\/$/u,"")}`}catch{return e}}function Em(e){return e==="responses"?"Responses API":e==="chatCompletions"?"Chat API":e==="anthropic"?"Anthropic API":e}function xm({definition:e,offering:t,createOfferings:r,status:n,credentials:i,attempt:o,apiKey:a,baseUrl:s,busy:c,disabled:d,error:p,onApiKeyChange:g,onBaseUrlChange:_,onBeginApiKey:I,onBeginBrowser:C,onSaveApiKey:E,onDisconnect:m,onCreateApiKeyCredential:R,onUpdateCredential:S,initialEditing:v,initialCreate:Q=!1,onSavingChange:Y,onCloseEdit:ee}){const te=o?.mode==="browserAssistedApiKey"&&o.status==="pending",V=n==="configured",de=n==="connected",P=!!R,[D,z]=G.useState(t.id),x=r.find(w=>w.id===D)??t,[X,re]=G.useState(!1),[ie,he]=G.useState(v?"edit":Q&&R?"create":void 0),[F,oe]=G.useState(v),[b,T]=G.useState(v?.label??""),[Z,O]=G.useState(""),[ae,ue]=G.useState(v?.baseUrl??""),[le,se]=G.useState(v?.proxyUrl??""),[k,U]=G.useState(),[ne,ce]=G.useState(!1),[H,l]=G.useState(!1),f=G.useRef(!1),A=G.useRef(!1);G.useEffect(()=>{Q&&!R&&!A.current&&(A.current=!0,I())},[Q,R,I]);const j=()=>{z(t.id),he("create"),oe(void 0),T(""),O(""),ue(""),se(""),U(void 0),ce(!1)},B=()=>{ee(),he(void 0),oe(void 0),T(""),O(""),ue(""),se(""),U(void 0),ce(!1)},q=async()=>{if(c||d||f.current)return;let w;try{w=Vp(le)}catch{U("Proxy URL 格式无效(支持 http、https)");return}if(U(void 0),ie==="create"){const L=Z.trim();if(!L||!R)return;f.current=!0,l(!0),Y?.(!0);try{await R(x,{apiKey:L,label:b.trim()||void 0,baseUrl:ae.trim()||void 0,proxyUrl:w,priority:gm(i.filter(J=>J.offeringId===x.id))}),B()}catch(J){U(J instanceof Error?J.message:"保存失败,请重试")}finally{f.current=!1,l(!1),Y?.(!1)}return}if(ie==="edit"&&F&&S){const L=le.trim()!==(F.proxyUrl??"").trim();f.current=!0,l(!0),Y?.(!0);try{await S(F,{label:b.trim()||void 0,baseUrl:ae.trim()||void 0,...L?{proxyUrl:w}:{}}),B()}catch(J){U(J instanceof Error?J.message:"保存失败,请重试")}finally{f.current=!1,l(!1),Y?.(!1)}}};return y.jsxs("div",{className:Ke("space-y-3",ie&&"w-full"),children:[o?.userCode?y.jsxs("div",{className:"border-l-2 border-primary bg-muted/30 px-3 py-2 text-sm",children:["验证码:",y.jsx("strong",{className:"font-mono",children:o.userCode})]}):null,!Q&&!v?y.jsxs("div",{className:"flex flex-wrap gap-2",children:[R&&r.length>0?y.jsxs(_e,{variant:"outline",size:"sm",disabled:c||d||H,onClick:j,children:[y.jsx(wn,{className:"mr-2 h-4 w-4"}),"添加 API Key"]}):null,P?null:de?y.jsxs(y.Fragment,{children:[y.jsxs(_e,{variant:"outline",size:"sm",disabled:c||d||H,onClick:C,children:[c?y.jsx(kt,{className:"mr-2 h-4 w-4 animate-spin"}):y.jsx(Es,{className:"mr-2 h-4 w-4"}),"重新连接"]}),y.jsxs(_e,{variant:"ghost",size:"sm",disabled:c||d||H,onClick:m,children:[y.jsx(By,{className:"mr-2 h-4 w-4"}),"断开连接"]})]}):V?y.jsxs(y.Fragment,{children:[y.jsxs(_e,{variant:"outline",size:"sm","aria-label":"更新 API Key",disabled:c||d||H,onClick:I,children:[y.jsx(Ss,{className:"mr-2 h-4 w-4"}),"更新 API Key"]}),y.jsx(_e,{variant:"ghost",size:"sm",disabled:c||d||H,onClick:m,children:"移除配置"})]}):y.jsxs(y.Fragment,{children:[y.jsxs(_e,{variant:"outline",size:"sm",disabled:c||d||H||e.browserMode==="connectUnsupported",onClick:C,children:[c?y.jsx(kt,{className:"mr-2 h-4 w-4 animate-spin"}):y.jsx(No,{className:"mr-2 h-4 w-4"}),e.browserLabel]}),y.jsxs(_e,{variant:"outline",size:"sm","aria-label":`${e.name} API Key`,disabled:c||d||H,onClick:I,children:[y.jsx(Ss,{className:"mr-2 h-4 w-4"}),"配置 API Key"]})]})]}):null,ie?y.jsxs("div",{className:"space-y-2 rounded-lg border border-border/50 bg-muted/10 p-3",children:[ie==="create"&&r.length>1?y.jsxs("label",{className:"block space-y-1 text-xs text-muted-foreground",children:[y.jsx("span",{children:"套餐 / 区域"}),y.jsx("select",{"aria-label":`${e.name} 套餐 / 区域`,value:D,disabled:c||d||H,onChange:w=>{z(w.target.value),U(void 0)},className:"h-9 w-full rounded-md border border-input bg-background px-3 text-sm text-foreground",children:r.map(w=>y.jsx("option",{value:w.id,children:$e(w)},w.id))})]}):null,ie==="edit"?y.jsx(st,{disabled:c||d||H,autoComplete:"off","aria-label":`${e.name} API Key 标签`,placeholder:"名称,例如 Work key",value:b,onChange:w=>T(w.target.value)}):null,ie==="create"?y.jsx(st,{disabled:c||d||H,type:X?"text":"password",autoComplete:"new-password","data-lpignore":"true","data-1p-ignore":!0,"aria-label":`${e.name} API Key 输入`,placeholder:e.apiKeyPlaceholder||"从官方控制台复制 API Key",value:Z,onChange:w=>O(w.target.value),className:"font-mono"}):null,ie==="edit"||ne?y.jsxs(y.Fragment,{children:[y.jsx(st,{disabled:c||d||H,autoComplete:"off","data-lpignore":"true","data-1p-ignore":!0,"aria-label":`${e.name} Base URL 输入`,placeholder:vm(ie==="edit"?t:x)||e.defaultBaseUrl||"默认服务地址",value:ae,onChange:w=>ue(w.target.value),className:"font-mono text-xs"}),y.jsx(st,{disabled:c||d||H,autoComplete:"off","data-lpignore":"true","data-1p-ignore":!0,"aria-label":`${e.name} Proxy URL 输入`,placeholder:"http://127.0.0.1:7890",value:le,onChange:w=>se(w.target.value),className:"font-mono text-xs"})]}):null,k?y.jsx("p",{className:"text-xs text-destructive",children:k}):null,y.jsxs("div",{className:"flex flex-wrap gap-2",children:[y.jsx(_e,{size:"sm","aria-label":ie==="create"?`保存 ${e.name} API Key`:"保存凭证",disabled:c||d||H||ie==="create"&&!Z.trim(),onClick:q,children:ie==="create"?"保存 API Key":"保存凭证"}),y.jsx(_e,{variant:"ghost",size:"sm",disabled:H,onClick:B,children:"取消"}),ie==="create"?y.jsx(_e,{variant:"ghost",size:"sm",disabled:H,onClick:()=>ce(w=>!w),children:ne?"收起高级设置":"高级设置"}):null]})]}):null,te&&!ie?y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-sm font-medium",children:"API Key"}),e.apiKeyUrl?y.jsx("a",{href:e.apiKeyUrl,target:"_blank",rel:"noreferrer",className:"text-xs text-primary hover:underline",children:"获取 API Key"}):null]}),y.jsxs("div",{className:"group relative",children:[y.jsx(st,{disabled:c||d||H,type:X?"text":"password",autoComplete:"new-password","data-lpignore":"true","data-1p-ignore":!0,"aria-label":`${e.name} API Key 输入`,placeholder:e.apiKeyPlaceholder||"从官方控制台复制 API Key",value:a,onChange:w=>g(w.target.value),className:"border-border/60 bg-muted/20 pr-10 font-mono transition-colors focus:border-primary/50 focus:bg-background"}),y.jsx("div",{className:"absolute bottom-1 right-1 top-1 flex items-center",children:y.jsx(_e,{variant:"ghost",size:"icon",className:"h-full w-8 rounded hover:bg-muted",onClick:()=>re(w=>!w),"aria-label":X?"隐藏 API Key":"显示 API Key",children:X?y.jsx(Cy,{className:"h-4 w-4 text-muted-foreground"}):y.jsx(Dy,{className:"h-4 w-4 text-muted-foreground"})})})]}),_?y.jsxs("div",{className:"space-y-1.5",children:[y.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Base URL(选填)"}),y.jsx(st,{disabled:c||d||H,autoComplete:"off","data-lpignore":"true","data-1p-ignore":!0,"aria-label":`${e.name} Base URL 输入`,placeholder:e.defaultBaseUrl||"默认服务地址",value:s,onChange:w=>_(w.target.value),className:"border-border/60 bg-muted/20 font-mono text-xs transition-colors focus:border-primary/50 focus:bg-background"}),y.jsxs("p",{className:"break-all font-mono text-[11px] text-muted-foreground opacity-80",children:[y.jsx("span",{className:"mr-1 select-none opacity-50",children:"预览:"}),(s.trim()||e.defaultBaseUrl||"").replace(/\/+$/,""),"/chat/completions"]})]}):null,y.jsx(_e,{size:"sm","aria-label":`保存 ${e.name} API Key`,disabled:!a.trim()||c||d,onClick:E,children:"保存 API Key"})]}):null,p?y.jsx("p",{className:"text-sm text-destructive",children:p}):null]})}function Im({controller:e,definition:t,offerings:r,apiOfferings:n,credentials:i,status:o,attempt:a,attemptOfferingId:s,apiKey:c,baseUrl:d="",busy:p,disabled:g=!1,error:_,onApiKeyChange:I,onBaseUrlChange:C,onBeginApiKey:E,onBeginBrowser:m,onSaveApiKey:R,onDisconnect:S,onUpdateCredential:v,onCreateApiKeyCredential:Q,onBeginOffering:Y,onCancelConnect:ee,onDismissError:te}){const{editing:V,authorizationOfferingId:de,error:P,saving:D}=e,z=V||de?r.filter(x=>x.id===(V?.offeringId??de)):n;return y.jsx(Ii,{open:e.open,onOpenChange:x=>{x||D||(a&&bo(a)&&zr(a.mode)&&ee?.({mode:a.mode,attemptId:a.attemptId,state:a.state,signature:a.signature,...a.offeringId?{offeringId:a.offeringId}:{}}),e.close())},children:y.jsxs(An,{className:"max-h-[85vh] overflow-y-auto sm:max-w-lg","aria-describedby":void 0,children:[y.jsx(Ri,{children:y.jsx(_n,{children:e.title})}),y.jsx("div",{className:"space-y-5","aria-label":"添加连接",children:z.map(x=>{const X=bo(a)&&zr(a?.mode)&&(s??a?.offeringId)!==x.id,re=g||D||X,ie=on(x),he=ie.filter(ue=>ue.lifecycle==="active"),F=he.some(eh),oe=s===x.id?a:void 0,b=_?.offeringId===x.id?_.authorization:void 0,T=ie.find(ue=>ue.id===(b?.authorizationMethodId??oe?.authorizationMethodId))??he.find(Ds),Z=b?.mode??oe?.mode??(T?zo(T):hm(x,t)),O=_?.offeringId===x.id?_.message:void 0;if(x.lifecycle==="unavailable"&&he.length===0)return y.jsxs("fieldset",{"data-create-offering":x.id,className:"space-y-2 border-t border-border/50 pt-3 first:border-t-0 first:pt-0",children:[y.jsx("legend",{className:"px-1 text-sm font-medium",children:$e(x)}),y.jsx("p",{className:"text-xs text-muted-foreground",children:x.kind==="oauth-subscription"?"暂不可用:账号订阅需在 Xpod 桌面版中导入本机客户端(如 Codex CLI)的登录态,浏览器中无法完成。":"暂不可用:该接入方式尚未提供可用的连接流程。"})]},x.id);const ae=b?.mode;return O&&zr(ae)?y.jsxs("fieldset",{"data-create-offering":x.id,disabled:re,className:"space-y-3 border-t border-border/50 pt-3 first:border-t-0 first:pt-0","aria-label":`${$e(x)}接入操作`,children:[y.jsx("legend",{className:"px-1 text-sm font-medium",children:$e(x)}),oe?.status==="unsupported"?y.jsx("p",{className:"text-sm",children:"当前部署未启用账号授权"}):y.jsx(jp,{title:"登录未完成",description:O,primaryLabel:"重试登录",onPrimary:()=>Y?.(x,ae,T),secondaryLabel:"关闭",onSecondary:()=>{te?.(),e.close()}})]},x.id):bo(oe)&&zr(Z)?y.jsxs("fieldset",{"data-create-offering":x.id,disabled:re,className:"space-y-3 border-t border-border/50 pt-3 first:border-t-0 first:pt-0","aria-label":`${$e(x)}接入操作`,children:[y.jsx("legend",{className:"px-1 text-sm font-medium",children:$e(x)}),y.jsx(ou,{title:"正在连接",detail:Z==="authorizationCodeOAuth"?"等待网页授权,请在打开的页面完成登录。":oe?.userCode?`验证码:${oe.userCode}`:"请在打开的页面完成授权。",providerLabel:T?.label??$e(x),providerHost:t.name}),y.jsx(_e,{variant:"ghost",size:"sm",disabled:g,onClick:()=>{oe&&ee?.({mode:oe.mode,attemptId:oe.attemptId,state:oe.state,signature:oe.signature,...oe.offeringId?{offeringId:oe.offeringId}:{}}),e.close()},children:"取消连接"})]},x.id):y.jsxs("fieldset",{"data-create-offering":x.id,disabled:re,className:"space-y-3 border-t border-border/50 pt-3 first:border-t-0 first:pt-0","aria-label":`${$e(x)}接入操作`,children:[y.jsx("legend",{className:"px-1 text-sm font-medium",children:$e(x)}),F?y.jsx(xm,{definition:t,offering:x,status:o,createOfferings:[x],initialCreate:!V,credentials:i,initialEditing:V?.offeringId===x.id?V:void 0,onCloseEdit:e.close,onSavingChange:e.setSaving,attempt:oe??(a?.mode==="browserAssistedApiKey"?a:void 0),apiKey:c,baseUrl:d,busy:p,disabled:re,onApiKeyChange:I,onBaseUrlChange:C,onBeginApiKey:E,onBeginBrowser:m,onSaveApiKey:R,onDisconnect:S,onUpdateCredential:v,onCreateApiKeyCredential:Q},`${x.id}:${V?.id??""}`):null,de&&!O?y.jsx(ou,{title:"正在连接",detail:"正在启动授权,请稍候。",providerLabel:$e(x),providerHost:t.name}):null,O?y.jsx("p",{className:"w-full text-sm text-destructive",children:O}):null]},x.id)})}),P?y.jsx("p",{role:"alert",className:"text-sm text-destructive",children:P}):null]})})}function Rm({credential:e,label:t,busy:r,disabled:n,dragHandle:i,kindLabel:o,quota:a,onToggle:s,onTest:c,onEdit:d,onDelete:p,deleteAriaLabel:g}){const _=n||r,I=mm(e.health),C=`${e.enabled?"已启用":"已停用"} · ${bm(e.health)}`;return y.jsxs("div",{"data-credential-state":e.enabled?"enabled":"disabled",className:Ke("flex flex-wrap items-center gap-x-3 gap-y-2 rounded-lg border px-3 py-2.5 transition-colors",e.enabled?I.row:"border-border/50 bg-muted/40 opacity-70"),children:[i,y.jsxs(Bo,{children:[y.jsx(Lo,{asChild:!0,children:y.jsx("span",{"aria-label":C,className:Ke("h-2 w-2 shrink-0 rounded-full",e.enabled?I.dot:"bg-muted-foreground/40")})}),y.jsx(Ci,{className:"text-xs",children:C})]}),y.jsxs("div",{className:"min-w-0 flex-1 basis-24",children:[y.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:t}),o?y.jsx("p",{className:"text-xs text-muted-foreground",children:o}):null,e.maskedHint&&!t.includes(e.maskedHint)?y.jsx("p",{className:"mt-1 truncate font-mono text-xs text-muted-foreground",children:e.maskedHint}):null]}),y.jsx("div",{className:"order-last w-full min-w-0 sm:order-none sm:w-auto sm:max-w-[45%]",role:"group","aria-label":`${an(e)}额度`,children:a}),y.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[c?y.jsx(Xi,{label:`测试连接 ${t}`,disabled:_,onClick:()=>c(e),children:y.jsx(Hy,{"aria-hidden":"true",className:"h-3.5 w-3.5"})}):null,d?y.jsx(Xi,{label:`编辑 ${t}`,disabled:_,onClick:d,children:y.jsx(sf,{"aria-hidden":"true",className:"h-3.5 w-3.5"})}):null,s?y.jsx(Xi,{label:`${e.enabled?"停用":"启用"} ${t}`,disabled:_,onClick:()=>s(e,{enabled:!e.enabled}),children:e.enabled?y.jsx(Uy,{"aria-hidden":"true",className:"h-3.5 w-3.5"}):y.jsx(zy,{"aria-hidden":"true",className:"h-3.5 w-3.5"})}):null,p?y.jsx(Xi,{label:g??`删除 ${t}`,disabled:_,onClick:p,children:y.jsx(Zs,{"aria-hidden":"true",className:"h-3.5 w-3.5"})}):null]})]})}function Xi({label:e,disabled:t,onClick:r,children:n}){return y.jsxs(Bo,{children:[y.jsx(Lo,{asChild:!0,children:y.jsx(_e,{variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":e,disabled:t,onClick:r,children:n})}),y.jsx(Ci,{className:"text-xs",children:e})]})}function Cm({offering:e,methods:t}){const r=e.endpoints??[],n=$e(e),i=e.kind?pm(e.kind):void 0,o=i&&i!==n?[i]:[];return y.jsxs("section",{className:"space-y-2","aria-labelledby":`offering-${e.id}`,children:[y.jsxs("div",{className:"flex items-start justify-between gap-3",children:[y.jsxs("div",{children:[y.jsx("h4",{id:`offering-${e.id}`,className:"text-sm font-medium text-foreground",children:n}),o.length?y.jsx("div",{className:"mt-1 flex items-center gap-2 text-xs text-muted-foreground",children:o.map(a=>y.jsx("span",{children:a},a))}):null]}),y.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-x-3 gap-y-1 text-xs",children:[y.jsx("span",{className:"text-muted-foreground",children:ym(e,t)}),e.consoleUrl?y.jsx(Zi,{href:e.consoleUrl,label:"控制台"}):null,e.subscriptionUrl?y.jsx(Zi,{href:e.subscriptionUrl,label:"订阅与账单"}):null,e.quota?.url?y.jsx(Zi,{href:e.quota.url,label:"额度与用量"}):null,e.usagePolicyUrl?y.jsx(Zi,{href:e.usagePolicyUrl,label:"使用政策"}):null]})]}),e.lifecycle==="unavailable"&&!on(e).some(a=>a.lifecycle==="active")?y.jsx("p",{className:"text-xs text-muted-foreground",children:e.kind==="oauth-subscription"?"暂不可用:账号订阅需在 Xpod 桌面版中导入本机客户端(如 Codex CLI)的登录态,浏览器中无法完成。":"暂不可用:该接入方式尚未提供可用的连接流程。"}):null,r.length?y.jsx("dl",{className:"space-y-1 text-[11px] text-muted-foreground",children:r.map(a=>y.jsxs("div",{className:"flex min-w-0 items-baseline gap-2",children:[y.jsx("dt",{className:"shrink-0 text-foreground/70",children:Em(a.protocol)}),y.jsx("dd",{className:"min-w-0 truncate font-mono",title:a.baseUrl,children:Sm(a.baseUrl)})]},`${a.protocol}:${a.baseUrl}`))}):null]})}function Zi({href:e,label:t}){return y.jsx("a",{href:e,target:"_blank",rel:"noreferrer",className:"text-primary hover:underline",children:t})}function Mm({credentials:e,disabled:t,onMove:r,children:n}){const i=G.useRef(null),o=G.useRef(null),a=G.useRef(void 0),s=G.useRef(void 0),c=G.useRef(null),d=G.useRef(void 0),p=G.useRef(t),[g,_]=G.useState(""),I=t||!r||e.length<2,C=e.map(ee=>ee.id).join("\0"),E=()=>Array.from(i.current?.querySelectorAll("[data-sortable-credential]")??[]),m=()=>{a.current!==void 0&&cancelAnimationFrame(a.current),s.current!==void 0&&clearTimeout(s.current),a.current=void 0,s.current=void 0;for(const ee of E()){for(const te of["transform","transition","zIndex","position","boxShadow","willChange","backgroundColor"])ee.style[te]="";delete ee.dataset.dragging}},R=()=>{const ee=c.current;if(!ee)return;c.current=null,m();const te=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1,V=E();for(const de of V){const P=ee.get(de.dataset.sortableCredential);if(!P||te)continue;const D=de.getBoundingClientRect();de.style.transition="none",de.style.transform=`translateY(${P.top-D.top}px)`}i.current?.getBoundingClientRect(),a.current=requestAnimationFrame(()=>{a.current=void 0;for(const de of V)de.style.transition=te?"none":"transform 160ms ease-out, box-shadow 160ms ease-out",de.style.transform="translateY(0px)";s.current=setTimeout(m,te?0:180)})},S=ee=>{const te=o.current;if(te){if(a.current!==void 0&&cancelAnimationFrame(a.current),c.current=new Map(te.rows.map(V=>[V.dataset.sortableCredential,V.getBoundingClientRect()])),d.current=C,ee&&te.from!==te.to&&!I){const V=te.rects[te.from],de=te.rects[te.to],P=Math.max(0,te.rects[1].top-te.rects[0].bottom),D=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1;te.rows.forEach((z,x)=>{const X=x===te.from?te.from<te.to?de.bottom-V.bottom:de.top-V.top:te.from<x&&x<=te.to?-(V.height+P):te.to<=x&&x<te.from?V.height+P:0;z.style.transition=D?"none":"transform 160ms ease-out",z.style.transform=`translateY(${X}px)`;const re=te.rects[x];c.current.set(z.dataset.sortableCredential,{...re,top:re.top+X,bottom:re.bottom+X})})}o.current=null,te.handle.hasPointerCapture?.(te.pointerId)&&te.handle.releasePointerCapture?.(te.pointerId),ee&&!I&&e[te.from]?.id===te.id&&v(te.from,te.to),a.current=requestAnimationFrame(()=>{a.current=void 0,(!ee||!p.current)&&R()}),s.current=setTimeout(R,1e4)}},v=(ee,te)=>{I||ee===te||te<0||te>=e.length||(r?.(ee,te),_(`已请求将${an(e[ee])}移至第 ${te+1} 位`))},Q=G.useRef({finish:S,settle:R,clearMotion:m});G.useLayoutEffect(()=>{Q.current={finish:S,settle:R,clearMotion:m},p.current=t}),G.useLayoutEffect(()=>{o.current&&Q.current.finish(!1),c.current&&(d.current!==C||!t)&&Q.current.settle()},[C,I,t]),G.useEffect(()=>()=>{const ee=o.current;o.current=null,c.current=null,ee?.handle.hasPointerCapture?.(ee.pointerId)&&ee.handle.releasePointerCapture?.(ee.pointerId),Q.current.clearMotion()},[]);const Y=()=>{a.current=void 0;const ee=o.current;if(!ee)return;const te=ee.rects[ee.from],V=ee.rects.length>1?Math.max(0,ee.rects[1].top-ee.rects[0].bottom):0;ee.rows.forEach((de,P)=>{const D=P===ee.from?ee.y-ee.startY:ee.from<P&&P<=ee.to?-(te.height+V):ee.to<=P&&P<ee.from?te.height+V:0;de.style.transform=`translateY(${D}px)`})};return y.jsxs("div",{ref:i,className:"space-y-2",children:[y.jsx("span",{className:"sr-only",role:"status",children:g}),e.map((ee,te)=>y.jsx("div",{"data-sortable-credential":ee.id,className:"rounded-lg",children:n(ee,r?y.jsx("button",{type:"button",disabled:I,"aria-label":`拖动排序 ${an(ee)}`,title:e.length<2?"至少添加两条连接后可拖动排序":"拖动调整优先级,或使用方向键、Home / End 排序",className:"flex h-8 w-6 shrink-0 touch-none select-none items-center justify-center rounded text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary disabled:opacity-40 enabled:cursor-grab active:cursor-grabbing",onKeyDown:V=>{if(V.key==="Escape"){S(!1);return}const de=V.key==="ArrowUp"?te-1:V.key==="ArrowDown"?te+1:V.key==="Home"?0:V.key==="End"?e.length-1:void 0;de!==void 0&&(V.preventDefault(),v(te,de))},onPointerDown:V=>{if(I||V.button!==0||o.current)return;V.preventDefault(),c.current=null,m(),V.currentTarget.focus(),V.currentTarget.setPointerCapture?.(V.pointerId);const de=E(),P=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1;o.current={id:ee.id,from:te,to:te,pointerId:V.pointerId,startY:V.clientY,y:V.clientY,handle:V.currentTarget,rows:de,rects:de.map(D=>D.getBoundingClientRect())};for(const[D,z]of de.entries())z.style.willChange="transform",z.style.transition=P||D===te?"none":"transform 160ms ease-out",D===te&&(z.dataset.dragging="true",z.style.position="relative",z.style.zIndex="10",z.style.boxShadow="0 8px 24px rgb(0 0 0 / 0.18)",z.style.backgroundColor="hsl(var(--card))")},onPointerMove:V=>{const de=o.current;if(!de||de.pointerId!==V.pointerId||I)return;de.y=V.clientY;let P=1/0;de.rects.forEach((D,z)=>{const x=Math.abs(V.clientY-(D.top+D.bottom)/2);x<P&&(P=x,de.to=z)}),a.current===void 0&&(a.current=requestAnimationFrame(Y))},onPointerUp:V=>{o.current?.pointerId===V.pointerId&&S(!0)},onPointerCancel:V=>{o.current?.pointerId===V.pointerId&&S(!1)},onLostPointerCapture:V=>{o.current?.pointerId===V.pointerId&&S(!1)},children:y.jsx(ky,{"aria-hidden":"true",className:"h-4 w-4"})}):null)},ee.id))]})}function Dm({attempt:e,onDismissError:t,onBeginOffering:r,onBeginBrowser:n,onCreateLocalCredential:i}){const[o,a]=G.useState(!1),[s,c]=G.useState(),[d,p]=G.useState(),[g,_]=G.useState(),[I,C]=G.useState(!1),E=o||!!s||!!d,m=G.useCallback(()=>{a(!1),p(void 0),c(void 0),_(void 0)},[]),R=G.useRef(e);G.useEffect(()=>{const V=R.current;R.current=e,E&&e!==V&&e?.status==="completed"&&m()},[e,E,m]);const S=G.useCallback(()=>{_(void 0),t?.()},[t]),v=G.useCallback(()=>{S(),a(!0)},[S]),Q=G.useCallback(()=>{S(),n()},[S,n]),Y=G.useCallback((V,de,P)=>{S(),p(V.id),r?.(V,de,P)},[S,r]),ee=G.useCallback(async(V,de)=>{if(i){S(),C(!0);try{await i(V,de)}catch(P){_(P instanceof Error?P.message:"连接失败,请重试")}finally{C(!1)}}},[S,i]),te=G.useCallback(V=>{c(V)},[]);return{open:E,title:s?"编辑连接":d?"连接账号":"新建连接",...s?{editing:s}:{},...d?{authorizationOfferingId:d}:{},...g?{error:g}:{},saving:I,beginApiKey:v,beginEdit:te,beginAuthorization:Y,beginBrowser:Q,beginLocal:ee,setSaving:C,close:m}}function Pm({definition:e,product:t,status:r,accountLabel:n,attempt:i,attemptOfferingId:o,apiKey:a,baseUrl:s="",busy:c,disabled:d=!1,error:p,suppressError:g=!1,quotas:_={},onApiKeyChange:I,onBaseUrlChange:C,onBeginApiKey:E,onBeginOffering:m,onCancelConnect:R,onBeginBrowser:S,onSaveApiKey:v,onDisconnect:Q,onCreateApiKeyCredential:Y,onCreateLocalCredential:ee,onUpdateCredential:te,onDeleteCredential:V,onTestCredential:de,onReorderCredentials:P,onRefreshQuota:D,onDismissError:z}){const x=[{id:"api-platform",label:"API Key",kind:"api-platform",authModes:["apiKey"]}],X=t?.credentials??[],re=t?.offerings.length?t.offerings:x,ie=re.filter(T=>on(T).some(Z=>Z.lifecycle==="active"&&eh(Z))),he=bo(i)&&zr(i?.mode),F=[...X].sort((T,Z)=>T.priority-Z.priority),oe=X.some(T=>_[T.id]?.busy),b=Dm({attempt:i,onDismissError:z,onBeginOffering:m,onBeginBrowser:S,onCreateLocalCredential:ee});return y.jsx(mf,{children:y.jsxs("section",{className:"space-y-3","aria-label":"当前连接",children:[y.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[y.jsxs("h3",{className:"flex items-center gap-2 text-sm font-medium text-foreground/90",children:[y.jsx(Xy,{className:"h-4 w-4 text-primary"}),"当前连接"]}),y.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[X.length>1?y.jsx(_e,{variant:"ghost",size:"sm","aria-label":`刷新全部 ${e.name}额度`,disabled:d||oe||!X.some(T=>T.enabled)||!D,onClick:()=>re.forEach(T=>D?.(T)),children:oe?"查询中":"刷新全部额度"}):null,re.map(T=>{const Z=on(T).filter(O=>O.lifecycle==="active"&&(Ds(O)||Ps(O)));return Z.length?y.jsx("div",{role:"group","aria-label":`${$e(T)}快捷接入`,children:y.jsx(_m,{methods:Z,offering:T,hasCredentials:X.some(O=>O.offeringId===T.id),busy:c||b.saving,disabled:d||he,onBeginOffering:m?b.beginAuthorization:void 0,onCreateLocalCredential:ee?b.beginLocal:void 0})},T.id):null}),ie.length>0&&!re.some(T=>on(T).some(Z=>Z.lifecycle==="active"&&(Ds(Z)||Ps(Z))))&&e.browserMode==="browserAssistedApiKey"?y.jsxs(_e,{variant:"outline",size:"sm",className:"h-8 gap-1.5 text-xs","aria-label":`${e.name} 登录`,disabled:c||b.saving||d||he,onClick:b.beginBrowser,children:[y.jsx(No,{className:"h-3.5 w-3.5"}),e.browserLabel]}):null,ie.length>0?y.jsxs(_e,{variant:"outline",size:"sm",className:"h-8 gap-1.5 text-xs","aria-label":"新建 API Key 连接",disabled:c||b.saving||d||he||!t&&r==="pending"&&!i,onClick:b.beginApiKey,children:[y.jsx(wn,{className:"h-3.5 w-3.5"}),"API Key"]}):null]})]}),y.jsxs("div",{"aria-label":"凭据列表",className:"space-y-2",children:[y.jsx(Mm,{credentials:F,disabled:c||d,onMove:P?(T,Z)=>{const O=re.find(ae=>ae.id===F[T]?.offeringId);O&&P(O,F,T,Z)}:void 0,children:(T,Z)=>{const O=re.find(se=>se.id===T.offeringId);if(!O)return null;const ae=T.authMode==="apiKey"?an(T):T.label?wu(T.label):an(T),ue=_[T.id],le=ue?.credentialId===T.id?ue:void 0;return y.jsx(Rm,{credential:T,label:ae,dragHandle:Z,kindLabel:T.authMode==="apiKey"?"API Key":$e(O),busy:c,disabled:d,onToggle:te,onTest:de,onEdit:T.authMode==="apiKey"?()=>b.beginEdit(T):void 0,onDelete:()=>T.authMode==="apiKey"?V?.(T):Q(T),deleteAriaLabel:T.authMode==="apiKey"?`删除 ${ae}`:`${ae} 移除`,quota:y.jsx(wm,{compact:!0,providerName:e.name,offeringName:$e(O),credentialLabel:an(T),multiple:X.length>1,quota:le?.quota,busy:le?.busy??!1,error:le?.error,paused:!T.enabled,disabled:d||!D,onRefresh:()=>D?.(O,T)})})}}),X.length?null:y.jsx("p",{className:"py-2 text-xs text-muted-foreground",children:n?wu(n):"尚未添加连接"}),X.length===0&&(r==="configured"||r==="connected")?y.jsx(_e,{variant:"ghost",size:"sm",disabled:c||d,onClick:()=>Q(),children:r==="configured"?"移除配置":"断开连接"}):null]}),y.jsx(Im,{controller:b,definition:e,offerings:re,apiOfferings:ie,credentials:X,status:r,attempt:i,attemptOfferingId:o,apiKey:a,baseUrl:s,busy:c,disabled:d,error:p,onApiKeyChange:I,onBaseUrlChange:C,onBeginApiKey:E,onBeginBrowser:S,onSaveApiKey:v,onDisconnect:Q,onUpdateCredential:te,onCreateApiKeyCredential:Y,onBeginOffering:m,onCancelConnect:R,onDismissError:z}),y.jsxs("details",{className:"text-xs text-muted-foreground",children:[y.jsx("summary",{className:"w-fit cursor-pointer",children:"接入信息"}),y.jsx("div",{className:"mt-2 space-y-3",children:re.map(T=>y.jsx(Cm,{offering:T},T.id))})]}),b.error&&!b.open&&b.error!==p?.message?y.jsx("p",{role:"alert",className:"text-sm text-destructive",children:b.error}):null,p&&(p.offeringId?!b.open:!g)?y.jsx("p",{role:"alert",className:"text-sm text-destructive",children:p.message}):null]})})}function Tm({definition:e,product:t,status:r,accountLabel:n,attempt:i,attemptOfferingId:o,apiKey:a,baseUrl:s="",busy:c,disabled:d=!1,error:p,quotas:g,models:_,verifyPending:I=!1,onApiKeyChange:C,onBaseUrlChange:E,onBeginApiKey:m,onBeginOffering:R,onCancelConnect:S,onBeginBrowser:v,onSaveApiKey:Q,onDisconnect:Y,onCreateApiKeyCredential:ee,onCreateLocalCredential:te,onUpdateCredential:V,onDeleteCredential:de,onTestCredential:P,onReorderCredentials:D,onRefreshQuota:z,onVerify:x,onAddModel:X,onEditModel:re,onDeleteModel:ie,selectedModelIds:he,modelSelectionStatus:F,onModelSelectionChange:oe,onDismissError:b}){const T=r==="configured",Z=r==="connected",O=_.length===0&&p?.message&&!p.offeringId?p.message:void 0,[ae,ue]=G.useState(""),[le,se]=G.useState(),[k,U]=G.useState(he??[]),ne=he??k,ce=G.useMemo(()=>jm(_),[_]),H=fe=>fe.selectionIds.some(we=>ne.includes(we)),l=G.useMemo(()=>{const fe=ae.trim().toLocaleLowerCase();return fe?ce.filter(we=>we.searchText.includes(fe)):ce},[ce,ae]),f=l.filter(fe=>fe.availability!=="unavailable"),A=f.filter(H).length,j=f.length>0&&A===f.length,B=A>0&&!j,q=ce.filter(H).length,w=ce.filter(fe=>fe.availability==="unavailable").length,L=async fe=>{try{await navigator.clipboard.writeText(fe),se(fe),setTimeout(()=>se(we=>we===fe?void 0:we),1500)}catch{se(void 0)}},J=fe=>{const we=new Set(ne),pe=H(fe);for(const Ae of pe?fe.selectionIds:fe.availableSelectionIds)pe?we.delete(Ae):we.add(Ae);const ve=[...we];he===void 0&&U(ve),oe?.(e.id,ve)},W=()=>{const fe=new Set(ne);for(const pe of f)for(const ve of j?pe.selectionIds:pe.availableSelectionIds)j?fe.delete(ve):fe.add(ve);const we=[...fe];he===void 0&&U(we),oe?.(e.id,we)};return y.jsx(mf,{children:y.jsxs("div",{className:"space-y-8",children:[y.jsxs("header",{className:"flex items-start justify-between gap-4",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsxs(To,{className:"h-9 w-9 shrink-0 rounded-lg border border-border/50 bg-muted/50 shadow-sm",style:So(e.id)?{backgroundColor:So(e.id)}:void 0,children:[y.jsx(Ud,{src:vo(e.id),className:"object-cover"}),y.jsx(ko,{className:"rounded-lg bg-transparent text-sm font-bold uppercase text-muted-foreground",children:Om(e.id)})]}),y.jsxs("div",{className:"flex flex-col justify-center gap-0.5",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("h2",{className:"text-base font-semibold leading-none tracking-tight text-foreground",children:e.name}),y.jsxs(Bo,{children:[y.jsx(Lo,{asChild:!0,children:y.jsx("button",{type:"button","aria-label":"提供商说明",className:"cursor-help rounded-sm text-muted-foreground/50 focus:outline-none focus-visible:text-foreground",children:y.jsx(af,{"aria-hidden":"true",className:"h-3.5 w-3.5"})})}),y.jsxs(Ci,{className:"max-w-xs space-y-2 text-xs",children:[y.jsx("p",{children:e.description}),y.jsx("p",{children:"Provider 凭证保存在当前 Pod,由 Pod 权限保护。"})]})]})]}),y.jsxs("a",{href:e.homeUrl,target:"_blank",rel:"noreferrer",className:"flex items-center gap-0.5 text-[10px] leading-none text-muted-foreground transition-colors hover:text-primary",children:["访问官网 ",y.jsx(No,{"aria-hidden":"true",className:"h-2.5 w-2.5"})]})]})]}),y.jsx(go,{variant:Z||T?"default":"secondary",children:Nm(r)})]}),y.jsx(Pm,{definition:e,product:t,status:r,accountLabel:n,attempt:i,attemptOfferingId:o,apiKey:a,baseUrl:s,busy:c,disabled:d,error:p,suppressError:!!O,quotas:g,onApiKeyChange:C,onBaseUrlChange:E,onBeginApiKey:m,onBeginOffering:R,onCancelConnect:S,onBeginBrowser:v,onSaveApiKey:Q,onDisconnect:Y,onCreateApiKeyCredential:t?.offerings.length?ee:void 0,onCreateLocalCredential:t?.offerings.length?te:void 0,onUpdateCredential:V,onDeleteCredential:de,onTestCredential:P,onReorderCredentials:D,onRefreshQuota:z,onDismissError:b}),y.jsxs("section",{className:"space-y-4",children:[y.jsxs("div",{"data-testid":"provider-models-header",className:"flex flex-col gap-3 border-b border-border/40 pb-4 sm:flex-row sm:items-center sm:justify-between",children:[y.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[y.jsx(Ao,{className:"h-4 w-4 shrink-0 text-primary"}),y.jsx("h3",{className:"shrink-0 text-sm font-medium text-foreground/90",children:"可用模型"}),y.jsxs("span",{className:"text-xs text-muted-foreground",children:["共 ",ce.length," · 已加入 ",q," · 已失效 ",w]}),y.jsxs("span",{role:"status","aria-live":"polite","aria-atomic":"true",className:Ke("inline-flex items-center gap-1 text-xs",F==="error"?"text-destructive":"text-muted-foreground"),children:[F==="saving"?y.jsx(kt,{"aria-hidden":"true",className:"h-3 w-3 animate-spin motion-reduce:animate-none"}):F==="saved"?y.jsx(qr,{"aria-hidden":"true",className:"h-3 w-3"}):null,F==="saving"?"保存中…":F==="saved"?"已保存":F==="error"?"保存失败,请重试":"选择后自动保存"]})]}),y.jsxs("div",{"data-testid":"provider-models-actions",className:"flex w-full flex-wrap items-center gap-2 sm:w-auto sm:flex-nowrap sm:justify-end",children:[(T||Z)&&(x||X)?y.jsxs(y.Fragment,{children:[X?y.jsxs(_e,{variant:"outline",size:"sm",className:"h-8 gap-1.5 text-xs",disabled:d||c,onClick:X,children:[y.jsx(wn,{"aria-hidden":"true",className:"h-3.5 w-3.5"}),"添加模型"]}):null,x&&_.length>0?y.jsxs(_e,{variant:"outline",size:"sm",className:"h-8 gap-1.5 text-xs",disabled:d||c||I,onClick:x,children:[I?y.jsx(kt,{"aria-hidden":"true",className:"h-3.5 w-3.5 animate-spin"}):y.jsx(Es,{"aria-hidden":"true",className:"h-3.5 w-3.5"}),I?"同步中...":"刷新模型"]}):x?y.jsxs(_e,{variant:"outline",size:"sm",className:"h-8 gap-1.5 text-xs",disabled:d||c||I,onClick:x,children:[I?y.jsx(kt,{"aria-hidden":"true",className:"h-3.5 w-3.5 animate-spin"}):y.jsx(Es,{"aria-hidden":"true",className:"h-3.5 w-3.5"}),I?"同步中...":"同步模型"]}):null]}):null,y.jsxs("div",{className:"relative w-full sm:w-auto",children:[y.jsx(lf,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),y.jsx(st,{value:ae,onChange:fe=>ue(fe.target.value),placeholder:"搜索模型...",className:"h-8 w-full bg-background pl-8 text-xs sm:w-[232px]",autoComplete:"off","data-lpignore":"true","data-1p-ignore":!0})]})]})]}),_.length===0?y.jsx("div",{className:"rounded-lg border border-dashed border-border/50 bg-muted/5 py-12 text-center text-sm text-muted-foreground",children:O?y.jsx("p",{className:"text-destructive",children:O}):"暂无可用模型"}):l.length===0?y.jsx("div",{className:"rounded-lg border border-dashed border-border/50 bg-muted/5 py-12 text-center text-sm text-muted-foreground",children:"未找到匹配的模型"}):y.jsxs("div",{className:"grid gap-2",children:[y.jsx("div",{className:"flex items-center justify-between px-1 py-1",children:y.jsxs("button",{type:"button",role:"checkbox","aria-label":"全选当前结果","aria-checked":B?"mixed":j,disabled:d||c||f.length===0,onClick:W,className:"flex items-center gap-2 text-xs text-muted-foreground disabled:opacity-50",children:[y.jsx("span",{className:Ke("flex h-4 w-4 items-center justify-center rounded border",j||B?"border-primary bg-primary text-primary-foreground":"border-border"),children:B?y.jsx("span",{"aria-hidden":"true",children:"−"}):y.jsx(qr,{"aria-hidden":"true",className:Ke("h-3 w-3",!j&&"invisible")})}),"全选当前结果"]})}),l.map(fe=>{const we=nh(fe),pe=H(fe),ve=fe.availability==="unavailable",Ae=fe.displayName??fe.id,Ce=[...(fe.inputModalities??[]).filter(De=>De!=="text"),...fe.capabilities??[]];return y.jsxs("div",{className:Ke("group flex items-center gap-3 rounded-lg border bg-card p-3 transition-all duration-200 hover:border-border/60 hover:bg-accent/30",pe?"border-primary/40 bg-primary/[0.03]":"border-border/40",ve&&"opacity-75"),children:[y.jsx("button",{type:"button",role:"checkbox","aria-checked":pe,"aria-label":`${pe?"取消选择":"选择"} ${Ae}`,className:Ke("flex h-5 w-5 shrink-0 items-center justify-center rounded border transition-colors focus:outline-none focus-visible:border-ring",pe?"border-primary bg-primary text-primary-foreground":"border-border text-transparent hover:border-primary/60"),disabled:d||c||ve&&!pe,onClick:()=>J(fe),children:y.jsx(qr,{"aria-hidden":"true",className:"h-3.5 w-3.5"})}),y.jsx("div",{className:"shrink-0 rounded bg-muted/50 p-2 text-muted-foreground transition-colors group-hover:text-primary",children:y.jsx(Ao,{className:"h-4 w-4"})}),y.jsxs("div",{className:"min-w-0 flex-1",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"truncate text-sm font-medium text-foreground/90",children:Ae}),y.jsx("div",{className:"flex items-center gap-1",children:Ce.map(De=>y.jsx(km,{type:De},De))}),fe.custom?y.jsx(go,{variant:"outline",className:"shrink-0 text-[10px] font-normal",children:"手工"}):null,ve?y.jsx(go,{variant:"destructive",className:"shrink-0 text-[10px] font-normal",children:"已失效"}):null]}),fe.displayName?y.jsxs("div",{className:"mt-0.5 flex items-center gap-1.5",children:[y.jsx("code",{className:"max-w-[300px] truncate font-mono text-[10px] text-muted-foreground opacity-70",children:fe.id}),y.jsx("button",{type:"button",onClick:()=>{L(fe.id)},className:"rounded p-0.5 text-muted-foreground opacity-0 transition-opacity hover:bg-muted hover:text-foreground group-hover:opacity-100 group-focus-within:opacity-100 focus:opacity-100","aria-label":`复制 ${fe.displayName} ID`,title:"复制 ID",children:le===fe.id?y.jsx(qr,{"aria-hidden":"true",className:"h-3 w-3 text-primary"}):y.jsx(vs,{"aria-hidden":"true",className:"h-3 w-3"})})]}):null]}),fe.custom&&(re||ie)?y.jsxs("div",{className:"flex shrink-0 items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100 focus-within:opacity-100",children:[re?y.jsx(_e,{variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":`编辑 ${fe.displayName??fe.id}`,onClick:()=>re(fe),children:y.jsx(sf,{"aria-hidden":"true",className:"h-3.5 w-3.5 text-muted-foreground"})}):null,ie?y.jsx(_e,{variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":`删除 ${fe.displayName??fe.id}`,onClick:()=>ie(fe),children:y.jsx(Zs,{"aria-hidden":"true",className:"h-3.5 w-3.5 text-muted-foreground"})}):null]}):null]},we)})]})]})]})})}function km({type:e}){const t={image:{icon:of,label:"视觉识别",className:"text-green-500"},web:{icon:nf,label:"联网搜索",className:"text-blue-500"},tool_call:{icon:Ao,label:"函数调用",className:"text-orange-500"},reasoning:{icon:rf,label:"推理",className:"text-purple-500"}}[e];if(!t)return null;const r=t.icon;return y.jsxs(Bo,{children:[y.jsx(Lo,{asChild:!0,children:y.jsx("button",{type:"button","aria-label":t.label,className:"flex cursor-help items-center justify-center rounded-sm opacity-80 transition-opacity hover:opacity-100 focus:outline-none focus-visible:opacity-100",children:y.jsx(r,{"aria-hidden":"true",className:Ke("h-3.5 w-3.5",t.className)})})}),y.jsx(Ci,{children:t.label})]})}function Om(e){switch(e){case"openai":return"OA";case"anthropic":return"A";case"kimi":return"K";case"bailian":return"百";case"deepseek":return"DS";case"zhipu":return"智";case"ollama":return"O";case"custom":return"C"}}function nh(e){return e.resourceId??(e.offeringId?`${e.offeringId}:${e.id}`:e.id)}function jm(e){const t=new Map;for(const r of e){const n=`${r.provider}\0${r.id}`,i=nh(r),o=t.get(n),a=[r.id,r.displayName].filter(Boolean).join(`
3
- `).toLocaleLowerCase();if(!o){t.set(n,{...r,selectionIds:[i],availableSelectionIds:r.availability==="unavailable"?[]:[i],searchText:a});continue}o.selectionIds.includes(i)||o.selectionIds.push(i),r.availability!=="unavailable"&&!o.availableSelectionIds.includes(i)&&o.availableSelectionIds.push(i),r.availability!=="unavailable"&&(o.availability=r.availability),o.capabilities=[...new Set([...o.capabilities??[],...r.capabilities??[]])],o.inputModalities=[...new Set([...o.inputModalities??[],...r.inputModalities??[]])],o.searchText+=`
4
- ${a}`}return[...t.values()]}function Nm(e){switch(e){case"pending":return"连接中";case"configured":return"已配置";case"connected":return"已连接";case"disconnected":return"未设置";case"reauthRequired":return"需要重新登录";case"failed":return"连接失败";default:return"未检查"}}const Fm=[{id:"image",label:"视觉识别",icon:of}],Bm=[{id:"tool_call",label:"函数调用",icon:Ao},{id:"reasoning",label:"推理",icon:rf},{id:"web",label:"联网搜索",icon:nf}];function Lm({open:e,providerName:t,initialValue:r,error:n,saving:i=!1,onOpenChange:o,onSave:a}){const s=!!r,[c,d]=G.useState(""),[p,g]=G.useState(""),[_,I]=G.useState([]),[C,E]=G.useState([]);G.useEffect(()=>{e&&(d(r?.id??""),g(r?.name??""),I(r?.inputModalities??[]),E(r?.capabilities??[]))},[r,e]);const m=c.trim(),R=!!m&&!i,S=(Q,Y,ee)=>{Y(Q.includes(ee)?Q.filter(te=>te!==ee):[...Q,ee])},v=(Q,Y,ee)=>{const te=Y.includes(Q.id),V=Q.icon;return y.jsxs("button",{type:"button","aria-pressed":te,disabled:i,onClick:()=>S(Y,ee,Q.id),className:Ke("flex items-center gap-1.5 rounded-md border px-2.5 py-1.5 text-xs transition-colors",te?"border-primary/50 bg-primary/10 text-primary":"border-border/60 text-muted-foreground hover:border-border hover:text-foreground"),children:[y.jsx(V,{"aria-hidden":"true",className:"h-3.5 w-3.5"}),Q.label]},Q.id)};return y.jsx(Ii,{open:e,onOpenChange:o,children:y.jsxs(An,{className:"max-w-md",children:[y.jsx(Ri,{children:y.jsxs(_n,{children:[s?"编辑模型":"添加模型"," · ",t]})}),y.jsxs("div",{className:"flex flex-col gap-4 py-2",children:[y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx(er,{htmlFor:"ai-model-id",children:"模型 ID"}),y.jsx(st,{id:"ai-model-id",value:c,disabled:s||i,placeholder:"例如 gpt-4o-mini",onChange:Q=>d(Q.target.value)})]}),y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx(er,{htmlFor:"ai-model-name",children:"显示名称"}),y.jsx(st,{id:"ai-model-name",value:p,disabled:i,placeholder:"留空则使用模型 ID",onChange:Q=>g(Q.target.value)})]}),y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx(er,{children:"输入模态"}),y.jsx("div",{className:"flex flex-wrap gap-2",children:Fm.map(Q=>v(Q,_,I))})]}),y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx(er,{children:"能力标记"}),y.jsx("div",{className:"flex flex-wrap gap-2",children:Bm.map(Q=>v(Q,C,E))})]}),n?y.jsx("p",{className:"text-xs text-destructive",role:"alert",children:n}):null]}),y.jsxs(gi,{children:[y.jsx(_e,{variant:"outline",disabled:i,onClick:()=>o(!1),children:"取消"}),y.jsx(_e,{disabled:!R,onClick:()=>a({id:m,name:p.trim(),inputModalities:_,capabilities:C}),children:i?"保存中...":"保存"})]})]})})}const Um="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20800%22%3E%3Crect%20width%3D%22800%22%20height%3D%22800%22%20rx%3D%22120%22%20fill%3D%22%2309090b%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20fill-rule%3D%22evenodd%22%20d%3D%22%20M165.29%20165.29%20H517.36%20V400%20H400%20V517.36%20H282.65%20V634.72%20H165.29%20Z%20M282.65%20282.65%20V400%20H400%20V282.65%20Z%20%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M517.36%20400%20H634.72%20V634.72%20H517.36%20Z%22%2F%3E%3C%2Fsvg%3E",qm="data:image/svg+xml,%3Csvg%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%220%200%2040%2040%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url(%23clip0_5110_14771)%22%3E%3Crect%20width%3D%2240%22%20height%3D%2240%22%20rx%3D%2220%22%20fill%3D%22url(%23paint0_linear_5110_14771)%22%2F%3E%3Cg%20filter%3D%22url(%23filter0_f_5110_14771)%22%3E%3Ccircle%20cx%3D%2212.6071%22%20cy%3D%2234.9794%22%20r%3D%2214.081%22%20fill%3D%22%2332E6B9%22%20fill-opacity%3D%220.4%22%2F%3E%3C%2Fg%3E%3Cg%20filter%3D%22url(%23filter1_f_5110_14771)%22%3E%3Ccircle%20cx%3D%2233.3404%22%20cy%3D%2243.6185%22%20r%3D%2212.8704%22%20fill%3D%22%2332E6B9%22%2F%3E%3C%2Fg%3E%3Cpath%20d%3D%22M27.6897%203.3426C28.057%203.01322%2028.0795%202.99983%2028.3485%202.98366C28.7851%202.95177%2029.1858%203.16107%2029.8664%203.78072C31.4566%205.22574%2033.6703%208.19724%2035.047%2010.7343L35.5796%2011.7191L36.3309%2012.0927C37.0562%2012.4593%2038.2459%2013.2111%2038.7428%2013.614C38.9673%2013.7997%2038.9992%2013.8032%2039.2326%2013.7124C40.2872%2013.3017%2041.7982%2013.846%2043.1307%2015.1244C44.3302%2016.274%2045.479%2018.2384%2045.9191%2019.8778C45.9833%2020.1417%2046.0683%2020.709%2046.0994%2021.1314C46.1997%2022.6144%2045.7243%2023.7986%2044.8085%2024.3349C44.6213%2024.443%2044.6085%2024.4725%2044.6137%2024.939C44.6559%2027.1604%2044.0571%2029.3777%2042.8543%2031.54C41.4965%2033.9678%2039.0794%2036.4798%2035.8073%2038.846C34.0502%2040.1247%2029.8918%2042.5469%2028.0122%2043.3973C23.5096%2045.4244%2019.8999%2046.2022%2016.7645%2045.8181C14.8943%2045.5915%2012.7771%2044.8611%2011.5246%2044.0137C11.1951%2043.786%2011.1428%2043.7719%2010.8909%2043.8439C9.55017%2044.2289%207.79442%2043.4374%206.30272%2041.7817C5.70771%2041.1197%204.74709%2039.4939%204.43575%2038.6241C3.71569%2036.5887%203.85859%2034.752%204.81783%2033.6551C5.0657%2033.3725%205.07387%2033.3607%205.01972%2032.8856C4.93033%2032.1079%204.88982%2030.9566%204.93066%2030.2138L4.96343%2029.5205L3.92091%2027.6777C2.3078%2024.8074%201.28326%2022.3968%200.887982%2020.5554C0.679402%2019.546%200.692781%2019.0981%200.949061%2018.7667C1.10529%2018.5666%201.61622%2018.3594%202.23252%2018.2455C3.78518%2017.9729%207.17203%2018.2198%2010.9394%2018.885L11.3303%2018.9525L12.1903%2018.1921C13.6179%2016.9275%2014.5665%2016.2176%2016.315%2015.1274C18.1373%2013.9872%2020.1943%2013.0498%2022.5103%2012.3071L23.2533%2012.0687L23.6615%2010.9964C25.1239%207.13587%2026.6218%204.28969%2027.6897%203.3426ZM15.4393%2023.1261C13.7864%2024.0804%2012.9602%2024.5582%2012.3529%2025.093C9.89364%2027.2585%208.9738%2030.6888%2010.0208%2033.7938C10.2794%2034.5606%2010.7568%2035.387%2011.7111%2037.0398C12.6653%2038.6926%2013.1424%2039.5194%2013.6771%2040.1267C15.8426%2042.5859%2019.2732%2043.5045%2022.3783%2042.4574C23.145%2042.1989%2023.972%2041.7223%2025.6248%2040.768L35.1333%2035.2783C36.7862%2034.324%2037.6124%2033.8462%2038.2196%2033.3114C40.6789%2031.1459%2041.5988%2027.7156%2040.5518%2024.6105C40.2932%2023.8438%2039.8157%2023.0174%2038.8615%2021.3646C37.9072%2019.7117%2037.4302%2018.885%2036.8955%2018.2777C34.7299%2015.8185%2031.2993%2014.8999%2028.1943%2015.947C27.4275%2016.2055%2026.6006%2016.6821%2024.9478%2017.6364L15.4393%2023.1261Z%22%20fill%3D%22url(%23paint1_linear_5110_14771)%22%2F%3E%3Crect%20x%3D%2215.8816%22%20y%3D%2230.0273%22%20width%3D%224.00904%22%20height%3D%228.32646%22%20rx%3D%222.00452%22%20transform%3D%22rotate(-30%2015.8816%2030.0273)%22%20fill%3D%22white%22%2F%3E%3Crect%20x%3D%2226.6978%22%20y%3D%2223.7812%22%20width%3D%224.00904%22%20height%3D%228.32646%22%20rx%3D%222.00452%22%20transform%3D%22rotate(-30%2026.6978%2023.7812)%22%20fill%3D%22white%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3Cfilter%20id%3D%22filter0_f_5110_14771%22%20x%3D%22-14.9163%22%20y%3D%227.45599%22%20width%3D%2255.0468%22%20height%3D%2255.047%22%20filterUnits%3D%22userSpaceOnUse%22%20color-interpolation-filters%3D%22sRGB%22%3E%3CfeFlood%20flood-opacity%3D%220%22%20result%3D%22BackgroundImageFix%22%2F%3E%3CfeBlend%20mode%3D%22normal%22%20in%3D%22SourceGraphic%22%20in2%3D%22BackgroundImageFix%22%20result%3D%22shape%22%2F%3E%3CfeGaussianBlur%20stdDeviation%3D%226.72123%22%20result%3D%22effect1_foregroundBlur_5110_14771%22%2F%3E%3C%2Ffilter%3E%3Cfilter%20id%3D%22filter1_f_5110_14771%22%20x%3D%229.46959%22%20y%3D%2219.7477%22%20width%3D%2247.7417%22%20height%3D%2247.741%22%20filterUnits%3D%22userSpaceOnUse%22%20color-interpolation-filters%3D%22sRGB%22%3E%3CfeFlood%20flood-opacity%3D%220%22%20result%3D%22BackgroundImageFix%22%2F%3E%3CfeBlend%20mode%3D%22normal%22%20in%3D%22SourceGraphic%22%20in2%3D%22BackgroundImageFix%22%20result%3D%22shape%22%2F%3E%3CfeGaussianBlur%20stdDeviation%3D%225.50019%22%20result%3D%22effect1_foregroundBlur_5110_14771%22%2F%3E%3C%2Ffilter%3E%3ClinearGradient%20id%3D%22paint0_linear_5110_14771%22%20x1%3D%2220%22%20y1%3D%220%22%20x2%3D%2220%22%20y2%3D%2240%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%236C4DFF%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23583ED3%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22paint1_linear_5110_14771%22%20x1%3D%2214.639%22%20y1%3D%2210.7917%22%20x2%3D%2232.1712%22%20y2%3D%2241.1585%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22white%22%20stop-opacity%3D%220.8%22%2F%3E%3Cstop%20offset%3D%220.437689%22%20stop-color%3D%22white%22%2F%3E%3C%2FlinearGradient%3E%3CclipPath%20id%3D%22clip0_5110_14771%22%3E%3Crect%20width%3D%2240%22%20height%3D%2240%22%20rx%3D%2220%22%20fill%3D%22white%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E",Km={codex:vo("openai"),"claude-code":vo("anthropic"),pi:Um,codebuddy:qm};function zm(e){return Km[e]}const ih=["codex","claude-code","pi","codebuddy"],Zt={codex:"Codex","claude-code":"Claude Code",pi:"Pi",codebuddy:"CodeBuddy"};function Wm({client:e,className:t="h-4 w-4"}){const r=zm(e);return r?y.jsx("img",{src:r,alt:"","aria-hidden":"true",className:`${t} shrink-0 rounded-[3px] object-cover`}):y.jsx($y,{className:t,"aria-hidden":"true"})}function Hm(e,t,r){const n=r??"<粘贴 Xpod API Key>",i=t.trim().replace(/\/+$/,""),o=i.endsWith("/v1")?i:`${i}/v1`,a=i.replace(/\/v1$/,"");switch(e){case"codex":return["# ~/.codex/config.toml","# 将 model_provider 放在第一个配置节之前;已有同名顶层字段时替换",'model_provider = "xpod"',"","[model_providers.xpod]",'name = "Xpod AI Connection"',`base_url = ${JSON.stringify(o)}`,'wire_api = "responses"',"requires_openai_auth = false",`experimental_bearer_token = ${JSON.stringify(n)}`,"# 保留现有订阅登录,Xpod 单独使用此 provider 的 Key"].join(`
5
- `);case"claude-code":return["# ~/.claude/settings.json(合并 env 到现有 JSON)",JSON.stringify({env:{ANTHROPIC_BASE_URL:a,ANTHROPIC_AUTH_TOKEN:n}},null,2)].join(`
6
- `);case"pi":return["# ~/.pi/agent/settings.json(合并到现有 JSON,并将 <model-id> 替换为实际模型)",JSON.stringify({defaultProvider:"xpod",defaultModel:"<model-id>"},null,2),"","# ~/.pi/agent/models.json(合并 providers.xpod 到现有 JSON)",JSON.stringify({providers:{xpod:{baseUrl:o,apiKey:n,authHeader:!0,api:"openai-responses",models:[{id:"<model-id>",name:"<model-id>"}]}}},null,2)].join(`
7
- `);case"codebuddy":return["# ~/.codebuddy/settings.json(合并 env 到现有 JSON)",JSON.stringify({env:{CODEBUDDY_BASE_URL:o,CODEBUDDY_API_KEY:n}},null,2)].join(`
8
- `)}}function Vm({record:e,busy:t,onDestroy:r}){const n=e.name||"未命名 API Key",i=Qm(e),o=e.kind!=="client-credentials"||!!e.clientCredentialId;return y.jsxs("li",{"data-key-id":e.id,"data-key-binding":e.appliedTo?"bound":"unbound",className:"flex flex-wrap items-center gap-x-4 gap-y-2 border-b border-border/60 px-4 py-3 first:rounded-t-xl last:rounded-b-xl last:border-b-0",children:[y.jsxs("dl",{className:"flex min-w-0 flex-1 basis-64 flex-wrap items-center gap-x-6 gap-y-2",children:[y.jsx(ca,{label:"用途",className:"min-w-0 flex-1 basis-28",children:y.jsx("span",{className:"block truncate text-sm font-medium text-foreground/90",title:n,children:n})}),y.jsx(ca,{label:"绑定",className:"min-w-0 flex-1 basis-28",children:y.jsxs("span",{className:"flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground",children:[i.clientId?y.jsx(Wm,{client:i.clientId,className:"h-3.5 w-3.5"}):null,y.jsx("span",{className:"truncate",title:i.label,children:i.label})]})}),y.jsx(ca,{label:"最后使用",className:"shrink-0",children:y.jsx("span",{className:"block text-xs text-muted-foreground",children:e.lastUsedAt?Gm(e.lastUsedAt):"暂无调用记录"})})]}),o?y.jsxs(_e,{variant:"ghost",size:"sm",className:"h-8 shrink-0 gap-1.5 text-xs text-muted-foreground hover:text-destructive","aria-label":`销毁 ${n}`,title:`销毁 ${n}`,disabled:t,onClick:r,children:[y.jsx(Zs,{"aria-hidden":"true",className:"h-3.5 w-3.5"}),"销毁"]}):y.jsx("span",{className:"shrink-0 text-[11px] text-muted-foreground",children:"缺少 CSS 凭据标识,无法在此销毁"})]})}function Qm(e){const t=e.appliedTo?.trim();if(!t)return{label:"未绑定"};const r=ih.find(o=>o===t),n=r?Zt[r]:t,i=e.appliedOn?.trim();return{clientId:r,label:i?`${n} · ${i}`:n}}function ca({label:e,className:t,children:r}){return y.jsxs("div",{className:t,children:[y.jsx("dt",{className:"text-[11px] leading-tight text-muted-foreground/80",children:e}),y.jsx("dd",{className:"mt-0.5",children:r})]})}function Gm(e){const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}const da="我的 API Key",Jm="API Key 已创建,请复制或应用到客户端。",Ym="这个 API Key 只在创建时可见:请销毁它,然后重新创建并立即复制或应用。",Xm="这个 API Key 只在创建时可见:请销毁它,然后重新创建并直接应用到客户端。",Zm=["flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm transition-[border-color]","disabled:cursor-not-allowed disabled:opacity-50",Np].join(" ");function $m({client:e,clientConfigurationBridge:t,gatewayModels:r}){const[n,i]=G.useState([]),[o,a]=G.useState(!0),[s,c]=G.useState(!1),[d,p]=G.useState(da),[g,_]=G.useState(""),[I,C]=G.useState(!1),[E,m]=G.useState(),[R,S]=G.useState(),[v,Q]=G.useState(),[Y,ee]=G.useState(!1),[te,V]=G.useState(),[de,P]=G.useState(),[D,z]=G.useState(),x=G.useRef(new Map),X=G.useRef(!1),re=G.useRef(void 0),ie=G.useRef(void 0),he=G.useCallback(le=>{re.current&&au(re.current),re.current=pt(le)},[]),F=G.useCallback(le=>{he({variant:"destructive",description:Un(le),duration:8e3})},[he]);G.useEffect(()=>{let le=!0;return a(!0),z(void 0),x.current.clear(),e.listGatewayKeys().then(se=>{le&&i(se.filter(k=>!k.revokedAt))}).catch(se=>{le&&F(se)}).finally(()=>{le&&a(!1)}),()=>{le=!1,clearTimeout(ie.current),re.current&&au(re.current)}},[e,F]);const oe=()=>{z(void 0),p(da),_(""),V(void 0),c(!0)},b=()=>{m(void 0),S(void 0),Q(void 0),V(void 0),z(void 0),p(da),_("")},T=async()=>{const le=d.trim();if(!le){z("请填写 API Key 名称。");return}if(!g){z("请选择 API Key 的用途。");return}C(!0),z(void 0);try{const se=await e.createGatewayKey({name:le,appliedTo:g});x.current.set(se.record.id,se.plaintext),i(k=>[se.record,...k.filter(U=>U.id!==se.record.id)]),m(se.record),S(g),Q(void 0),V(void 0),he({variant:"success",description:Jm})}catch(se){z(Un(se))}finally{C(!1)}},Z=(le,se)=>{const k=x.current.get(le.id);if(!k)throw new Error(se);return k},O=async(le,se)=>{z(void 0);try{const k=Z(le,Ym);if(!navigator.clipboard?.writeText)throw new Error("当前浏览器无法访问剪贴板,请允许剪贴板访问后重试。");await navigator.clipboard.writeText(se==="key"?k:Hm(se,e.apiBase,k)),V(se),clearTimeout(ie.current),ie.current=setTimeout(()=>V(void 0),2e3)}catch(k){z(Un(k))}},ae=async()=>{if(!E||!R||!t)return;z(void 0);let le;try{le=Z(E,Xm)}catch(se){z(Un(se));return}ee(!0);try{const se=await t.plan({client:R,endpoint:e.apiBase,...R==="codex"&&r!==void 0?{activeModels:r.map(({id:k,provider:U,displayName:ne,availability:ce,contextWindow:H,inputModalities:l,capabilities:f})=>({id:k,provider:U,displayName:ne,availability:ce,contextWindow:H,inputModalities:l,capabilities:f}))}:{}});await t.apply({client:se.client,planId:se.planId,apiKey:le,...se.confirmation?.required?{confirmation:{token:se.confirmation.token,targetHash:se.confirmation.targetHash}}:{}}),Q(se.client),i(k=>k.map(U=>U.id===E.id?{...U,appliedTo:se.client}:U)),he({variant:"success",description:se.client==="codex"&&r===void 0?"Codex 连接配置已应用,模型目录尚未加载,请稍后刷新配置。":`${Zt[se.client]} 配置已应用。`})}catch(se){z(Un(se))}finally{ee(!1)}},ue=async le=>{if(!X.current){X.current=!0,P(le.id),z(void 0);try{await e.deleteGatewayKey(le.id),x.current.delete(le.id),i(se=>se.filter(k=>k.id!==le.id)),E?.id===le.id&&(m(void 0),S(void 0),Q(void 0),V(void 0))}catch(se){F(se)}finally{X.current=!1,P(void 0)}}};return y.jsxs("section",{className:"space-y-8 [container-type:inline-size]","aria-label":"API Keys",children:[y.jsxs("header",{className:"flex items-start justify-between gap-4",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx(To,{className:"h-9 w-9 shrink-0 rounded-lg border border-border/50 bg-muted/50 shadow-sm",children:y.jsx(ko,{className:"rounded-lg bg-transparent text-sm font-bold uppercase text-muted-foreground",children:"XP"})}),y.jsxs("div",{className:"flex flex-col justify-center gap-1",children:[y.jsx("h2",{className:"text-base font-semibold leading-none tracking-tight text-foreground",children:"Xpod"}),y.jsx("p",{className:"max-w-3xl text-xs leading-snug text-muted-foreground",children:"API Key 用于让客户端把 Xpod 当作 Provider 接入;Xpod 不保存 Key 明文。"})]})]}),y.jsx(go,{variant:n.length>0?"default":"secondary",children:n.length>0?`已签发 ${n.length} 个`:"未配置"})]}),y.jsxs("section",{className:"space-y-3","aria-label":"已签发 API Key",children:[y.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[y.jsxs("h3",{className:"flex items-center gap-2 text-sm font-medium text-foreground/90",children:[y.jsx(Ss,{"aria-hidden":"true",className:"h-4 w-4 text-primary"}),"已签发 API Key"]}),y.jsxs(_e,{size:"sm","aria-label":"新建 API Key",disabled:I||o,onClick:oe,children:[y.jsx(wn,{"aria-hidden":"true",className:"mr-2 h-4 w-4"}),"新建 API Key"]})]}),o?y.jsxs("div",{className:"flex items-center gap-2 py-6 text-sm text-muted-foreground",children:[y.jsx(kt,{"aria-hidden":"true",className:"h-4 w-4 animate-spin"}),"正在读取 API Key"]}):n.length===0?y.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"尚未签发 API Key。"}):y.jsx("ul",{"aria-label":"API Key 列表",className:"rounded-xl border border-border/70",children:n.map(le=>y.jsx(Vm,{record:le,busy:!!de,onDestroy:()=>{ue(le)}},le.id))})]}),y.jsx(Ii,{open:s,onOpenChange:le=>{!le&&(I||Y)||c(le)},children:y.jsxs(An,{className:"sm:max-w-md","aria-describedby":void 0,children:[y.jsx(Ri,{children:y.jsx(_n,{children:E?"API Key 已签发":"新建 API Key"})}),E&&R?y.jsxs("div",{className:"space-y-5",children:[y.jsxs("div",{className:"space-y-1.5",children:[y.jsxs("p",{className:"text-sm",children:["已签发「",E.name||"未命名 API Key","」,用途:",Zt[R],"。"]}),y.jsx("p",{className:"text-xs text-muted-foreground",children:"Xpod 不保存 Key 明文,请立即复制或直接应用到客户端;离开本次会话后无法再次获取。"})]}),E.maskedHint?y.jsx("code",{className:"block truncate rounded-md border border-border/60 bg-muted/30 px-3 py-2 font-mono text-xs text-muted-foreground",children:E.maskedHint}):null,t?null:y.jsx("p",{className:"text-xs text-muted-foreground",children:"当前 Web 环境无法自动写入客户端配置,请复制后手动粘贴;自动应用需要本机连接。"}),D?y.jsx("p",{role:"alert",className:"text-sm text-destructive",children:D}):null,y.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[y.jsxs(_e,{type:"button",variant:"outline",size:"sm","aria-label":"复制 API Key",disabled:Y,onClick:()=>{O(E,"key")},children:[te==="key"?y.jsx(qr,{"aria-hidden":"true",className:"mr-1.5 h-3.5 w-3.5 text-emerald-600"}):y.jsx(vs,{"aria-hidden":"true",className:"mr-1.5 h-3.5 w-3.5"}),te==="key"?"已复制":"复制 API Key"]}),y.jsxs(_e,{type:"button",variant:"outline",size:"sm",disabled:Y,"aria-label":`复制 ${Zt[R]} 配置`,onClick:()=>{O(E,R)},children:[te===R?y.jsx(qr,{"aria-hidden":"true",className:"mr-1.5 h-3.5 w-3.5 text-emerald-600"}):y.jsx(vs,{"aria-hidden":"true",className:"mr-1.5 h-3.5 w-3.5"}),te===R?"已复制":`复制 ${Zt[R]} 配置`]}),t?v?y.jsxs("span",{role:"status",className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[y.jsx(qr,{"aria-hidden":"true",className:"h-3.5 w-3.5"}),"已应用到 ",Zt[v]]}):y.jsxs(_e,{type:"button",size:"sm",disabled:Y,"aria-label":`应用到 ${Zt[R]}`,onClick:()=>{ae()},children:[Y?y.jsx(kt,{"aria-hidden":"true",className:"mr-2 h-4 w-4 animate-spin"}):null,Y?"正在应用…":`应用到 ${Zt[R]}`]}):null]}),y.jsxs(gi,{children:[y.jsx(_e,{type:"button",variant:"ghost",disabled:Y,onClick:b,children:"再建一个"}),y.jsx(_e,{type:"button",variant:"outline",onClick:()=>c(!1),children:"完成"})]})]}):y.jsxs("form",{className:"space-y-5",onSubmit:le=>{le.preventDefault(),I||T()},children:[y.jsxs("label",{className:"block space-y-2",children:[y.jsx("span",{className:"text-sm font-medium",children:"名称"}),y.jsx(st,{autoFocus:!0,"aria-label":"API Key 名称",value:d,disabled:I,onChange:le=>p(le.target.value)})]}),y.jsxs("label",{className:"block space-y-2",children:[y.jsx("span",{className:"text-sm font-medium",children:"用途"}),y.jsxs("select",{"aria-label":"API Key 用途",className:Zm,value:g,disabled:I,onChange:le=>_(le.target.value),children:[y.jsx("option",{value:"",disabled:!0,children:"选择客户端应用"}),ih.map(le=>y.jsx("option",{value:le,children:Zt[le]},le))]})]}),y.jsx("p",{className:"text-xs text-muted-foreground",children:"用途在创建时确定,Key 会绑定到该客户端应用。"}),D?y.jsx("p",{role:"alert",className:"text-sm text-destructive",children:D}):null,y.jsxs(gi,{children:[y.jsx(_e,{type:"button",variant:"outline",disabled:I,onClick:()=>c(!1),children:"取消"}),y.jsxs(_e,{type:"submit","aria-label":"创建 API Key",disabled:I||!d.trim()||!g,children:[I?y.jsx(kt,{"aria-hidden":"true",className:"mr-2 h-4 w-4 animate-spin"}):null,I?"正在创建…":"创建 API Key"]})]})]})]})})]})}function Un(e){const t=e instanceof Error?e.message.trim():"";return/failed to fetch|networkerror|load failed/i.test(t)?"无法连接配置服务,请检查连接后重试。":/EACCES|permission denied/i.test(t)?"没有权限写入配置文件,请检查文件权限后重试。":t==="Client configuration could not be verified locally."?"配置文件写入后的本地检查未通过,请检查文件内容和权限后重试。":!t||/^(?:AI Connection |AI client configuration )?request failed(?:\. Please try again\.)?$/i.test(t)?"API Key 操作失败,请重试。":t}const e0={};function t0({client:e,renderToaster:t=!0,openExternal:r=s0,clientConfigurationBridge:n,selectedSection:i="provider",selectedProvider:o,selectedCredentialId:a,providerSummaries:s=e0,providerProducts:c={},providerLoadError:d,providerLoading:p=!1,onProviderStateChange:g,onModelSelectionChange:_}){const[I,C]=G.useState({}),[E,m]=G.useState([]),[R,S]=G.useState(),[v,Q]=G.useState(0),[Y,ee]=G.useState({}),[te,V]=G.useState({}),[de,P]=G.useState({}),[D,z]=G.useState({}),[x,X]=G.useState({}),[re,ie]=G.useState({}),[he,F]=G.useState({}),[oe,b]=G.useState({}),[T,Z]=G.useState({}),[O,ae]=G.useState({}),[ue,le]=G.useState(),[se,k]=G.useState(),[U,ne]=G.useState(!1),[ce,H]=G.useState({}),l=G.useRef(0),f=G.useRef({}),A={...c,...ce},j=G.useCallback((M,u)=>{C(h=>({...h,[M]:u})),g?.(M,i0(u))},[g]);G.useEffect(()=>{C(Object.fromEntries(Object.values(s).filter(Ru).map(M=>[M.provider,M.status==="connected"&&M.authMode==="browserAssistedApiKey"?"configured":M.status]))),ie(Object.fromEntries(Object.values(s).filter(Ru).map(M=>[M.provider,M.baseUrl??""])))},[s]),G.useEffect(()=>{ee(M=>{const u={...M};let h=!1;for(const[K,N]of Object.entries(c)){if(!N)continue;const $=N.selectedModels.map(dr),ge=M[K];(!ge||ge.join("\0")!==$.join("\0"))&&(u[K]=$,h=!0)}return h?u:M})},[c]),G.useEffect(()=>{let M=!0;return e.listModels().then(u=>{M&&m(u)}).catch(()=>{}),()=>{M=!1,l.current+=1}},[e]),G.useEffect(()=>{let M=!0;return S(void 0),e.listGatewayModels?.().then(u=>{M&&S(u)}).catch(()=>{}),()=>{M=!1}},[e,v]);const B=(M,u)=>{F(h=>({...h,[M]:u}))},q=(M,u,h,K)=>{b(N=>({...N,[M]:u?{message:u,offeringId:h,authorization:K}:void 0}))},w=G.useCallback(async M=>{const u=M.verificationUriComplete??M.authorizationUrl??M.verificationUri;u&&await r(u)},[r]),L=async M=>{B(M,!0),q(M),z(u=>({...u,[M]:void 0}));try{const u=await e.beginConnect(M,"browserAssistedApiKey");P(K=>({...K,[M]:u}));const h=Os(u.status);if(j(M,h?"pending":u.status==="completed"?"configured":"failed"),!h&&u.status!=="completed"){q(M,u.message??vu(u.status));return}await w(u)}catch(u){j(M,"failed"),q(M,Qe(u))}finally{B(M,!1)}},J=async M=>{if(M.browserMode!=="connectUnsupported"){if(M.browserMode==="browserAssistedApiKey"){await L(M.id);return}await fe(M.id,M.browserMode)}},W=async(M,u,h,K)=>{if(h==="browserAssistedApiKey"){await L(M);return}await fe(M,h,u.id,K?.id)},fe=async(M,u,h,K)=>{if(u==="connectUnsupported")return;B(M,!0),q(M),z($=>({...$,[M]:h}));const N=l.current+1;l.current=N;try{const $=await e.beginConnect(M,u,{offeringId:h,authorizationMethodId:K});if(P(ge=>({...ge,[M]:$})),!Os($.status)){const ge=$.status==="completed";ge?await we(M):j(M,"failed"),ge||q(M,$.status==="unsupported"?"当前部署未启用账号授权":$.message??vu($.status),h,{mode:u,authorizationMethodId:K}),B(M,!1);return}j(M,"pending"),await w($),n0(e,M,$,N,l,{onAttempt:ge=>P(be=>({...be,[M]:ge})),onConnected:()=>we(M),onFailed:ge=>{j(M,"failed"),q(M,ge,h,{mode:u,authorizationMethodId:K})},onFinished:()=>B(M,!1)})}catch($){j(M,"failed"),q(M,Qe($),h,{mode:u,authorizationMethodId:K}),B(M,!1)}},we=async M=>{j(M,"connected");try{const u=(await e.listProviders()).find(h=>h.id===M);u&&H(h=>({...h,[M]:u}))}catch(u){q(M,`账号已连接,连接信息刷新失败:${Qe(u)}`)}},pe=async(M,u)=>{l.current+=1,B(M,!1),P(h=>({...h,[M]:void 0})),z(h=>({...h,[M]:void 0})),j(M,"failed");try{await e.cancelConnect?.(M,u),q(M,"连接已取消")}catch(h){q(M,Qe(h))}},ve=async M=>{const u=x[M.id]?.trim(),h=re[M.id]??s[M.id]?.baseUrl??"",K=de[M.id];if(!(!u||!K)){B(M.id,!0),q(M.id);try{const N=await e.completeApiKey(M.id,K,u,void 0,h.trim());P($=>({...$,[M.id]:N})),X($=>({...$,[M.id]:""})),j(M.id,"configured"),pt({description:"API Key 已保存"})}catch(N){q(M.id,Qe(N)),j(M.id,"failed")}finally{B(M.id,!1)}}},Ae=async(M,u)=>{const h=u?A[M]?.credentials.find(K=>K.id===u)?.offeringId:void 0;B(M,!0),q(M);try{await e.disconnect(M,u),P(K=>({...K,[M]:void 0})),z(K=>({...K,[M]:void 0})),Z(K=>({...K,[M]:h?{...K[M],[h]:void 0}:void 0})),u?(H(K=>({...K,[M]:Eu(A[M],M,u)})),pt({description:"已从当前 Pod 移除账号"})):(j(M,"disconnected"),pt({description:"已断开连接"}))}catch(K){q(M,Qe(K),h)}finally{B(M,!1)}},Ce=(M,u)=>{H(h=>({...h,[M]:Su(A[M],M,u)})),j(M,u.authMode==="apiKey"||u.authMode==="local"?"configured":"connected")},De=async(M,u,h=!1,K="")=>{ae(N=>({...N,[M]:!0})),q(M);try{const N=u?await e.discoverModels(M,u):await e.discoverModels(M);Q(be=>be+1);const $=A[M]?.selectedModels??[],ge={...u0(M,u),...N.complete===!1?{markMissing:!1}:{}};try{const ze=(await e.listModels()).filter(Re=>Re.provider===M);m(Re=>{const zt=fa(Re,M,ze,ge),Nn=fa(zt,M,N.models,ge);return Iu(Nn,M,$,N.models,ge)})}catch{m(be=>Iu(fa(be,M,N.models,ge),M,$,N.models,ge))}try{const ze=(await e.listProviders()).find(Re=>Re.id===M);ze&&H(Re=>({...Re,[M]:ze}))}catch{}return N.complete===!1?q(M,"部分连接同步失败,已保留原有模型目录,可稍后重试。",u?.offeringId):h&&pt({variant:N.models.length>0?"success":"default",description:N.models.length>0?`连接成功,已同步 ${N.models.length} 个模型`:"连接成功,但服务商未返回任何模型。请确认该服务支持 /models 接口,或使用「添加模型」手工录入。"}),!0}catch(N){const $=Qe(N);return q(M,`${K}${$}`,u?.offeringId),!1}finally{ae(N=>({...N,[M]:!1}))}},Ft=async(M,u,h)=>{B(M,!0),q(M);try{const K=await e.createApiKeyCredential(M,{offeringId:u.id,apiKey:h.apiKey,label:h.label,baseUrl:h.baseUrl,proxyUrl:h.proxyUrl,priority:h.priority});Ce(M,K),pt({description:"API Key 已添加"}),await De(M,{offeringId:K.offeringId,credentialId:K.id})}catch(K){const N=Qe(K);throw q(M,N,u.id),new Error(N)}finally{B(M,!1)}},Me=async(M,u,h)=>{B(M,!0),q(M);try{const K=u.kind==="local",N=await e.createLocalCredential(M,{offeringId:u.id,authorizationMethodId:h?.id,label:u.label??$e(u),...K?{baseUrl:u.endpoints?.[0]?.baseUrl}:{},priority:10});Ce(M,N),pt({description:`${$e(u)} 已连接`}),u.modelDiscovery?.strategy!=="unsupported"&&await De(M,{offeringId:N.offeringId,credentialId:N.id},!1,K?"本地服务已连接,模型获取失败:":"订阅已读取,模型获取失败:")}catch(K){const N=Qe(K);throw q(M,N,u.id),new Error(N)}finally{B(M,!1)}},Dn=async(M,u,h)=>{B(M,!0),q(M);try{const K=await e.updateProviderCredential(M,u.id,{expectedVersion:u.version,...h});Ce(M,K),pt({description:"凭证已更新"}),K.enabled&&await De(M,{offeringId:K.offeringId,credentialId:K.id})}catch(K){const N=Qe(K);throw q(M,N,u.offeringId),new Error(N)}finally{B(M,!1)}},Pn=async(M,u)=>{if(u.id===`${M}:current`&&u.version===0){if(A[M]?.credentials.some(h=>h.id!==u.id)){q(M,"请重新加载连接后再移除旧连接。",u.offeringId);return}await Ae(M);return}B(M,!0),q(M);try{await e.deleteProviderCredential(M,u.id);const h=Eu(A[M],M,u.id);H(K=>({...K,[M]:h})),j(M,oh(h)),pt({description:"凭证已删除"})}catch(h){q(M,Qe(h),u.offeringId)}finally{B(M,!1)}},Er=async(M,u)=>{B(M,!0),q(M);try{const h=await e.testProviderCredential(M,{credentialId:u.id}),K=o0(h);H(N=>({...N,[M]:K?Su(A[M],M,K):xu(A[M],M,u.id,"healthy")})),pt({variant:"success",description:"测试通过"})}catch(h){const K=(await e.listProviders().catch(()=>[])).find(N=>N.id===M);H(N=>({...N,[M]:K??xu(A[M],M,u.id,"invalid")})),q(M,Qe(h),u.offeringId)}finally{B(M,!1)}},Tn=async(M,u,h,K,N)=>{if(N<0||N>=h.length)return;const $=[...h],[ge]=$.splice(K,1);if(ge){$.splice(N,0,ge),B(M,!0),q(M);try{const be=[];for(const[ze,Re]of $.entries()){const zt=(ze+1)*10;if(Re.priority===zt){be.push(Re);continue}be.push(await e.updateProviderCredential(M,Re.id,{expectedVersion:Re.version,priority:zt}))}H(ze=>({...ze,[M]:a0(A[M],M,u,be)})),pt({description:"顺序已保存"})}catch(be){q(M,Qe(be),u.id)}finally{B(M,!1)}}},xr=G.useRef(new Set),kn=async(M,u,h)=>{const K=h?[h]:(A[M]?.credentials??[]).filter(N=>N.enabled&&N.offeringId===u.id);await Promise.all(K.map(async N=>{const $=`${M}\0${N.id}`;if(xr.current.has($))return;xr.current.add($);const ge=be=>{Z(ze=>({...ze,[M]:{...ze[M],[N.id]:be}}))};ge({busy:!0,credentialId:N.id});try{const be=await e.quota(M,!0,{offeringId:u.id,credentialId:N.id,credentialIri:N.id});ge({quota:be,busy:!1,credentialId:N.id})}catch(be){ge({busy:!1,error:Qe(be),credentialId:N.id})}finally{xr.current.delete($)}}))},Ir=async M=>{await De(M,M==="custom"&&a?{credentialId:a}:void 0,!0)},lr=G.useCallback(async()=>{Q(M=>M+1);try{m(await e.listModels())}catch{}},[e]),en=(M,u)=>{k(void 0),le({provider:M,model:u})},Rr=async M=>{if(!ue)return;const u=!!ue.model;ne(!0),k(void 0);try{await e.saveProviderModel(ue.provider,{id:M.id,displayName:M.name||void 0,inputModalities:M.inputModalities.length>0?M.inputModalities:void 0,capabilities:M.capabilities.length>0?M.capabilities:void 0}),le(void 0),pt({description:u?"模型已更新":"模型已添加"}),await lr()}catch(h){k(Qe(h))}finally{ne(!1)}},Yt=async(M,u)=>{q(M);try{await e.deleteProviderModel(M,u.id),m(h=>h.filter(K=>!(K.provider===M&&K.id===u.id))),pt({description:"模型已移除"}),lr()}catch(h){q(M,Qe(h))}},On=G.useCallback((M,u)=>{const h=[...new Set(u)],K=Y[M]??A[M]?.selectedModels.map(dr)??[],N=(f.current[M]??0)+1;f.current[M]=N,ee($=>({...$,[M]:h})),V($=>({...$,[M]:"saving"})),(async()=>{try{const $=[...E.filter(be=>be.provider===M),...A[M]?.selectedModels??[]],ge=h.map(be=>{const ze=$.find(Re=>dr(Re)===be);return ze?d0(ze):{id:be}});M==="custom"?await e.saveModelSelection?.(M,ge,a):await e.saveModelSelection?.(M,ge),f.current[M]===N&&(Q(be=>be+1),V(be=>({...be,[M]:"saved"})),_?.(M,h))}catch($){if(f.current[M]!==N)return;V(ge=>({...ge,[M]:"error"})),ee(ge=>({...ge,[M]:K})),_?.(M,K),pt({variant:"destructive",description:Qe($)})}})()},[e,A,f,E,_,a,Y]),jn=y.jsxs("section",{children:[d?y.jsxs("p",{className:"mb-4 rounded-md border border-destructive/30 px-3 py-2 text-sm text-destructive",children:["Provider 状态读取失败:",d]}):null,at.filter(M=>M.id===(o??"openai")).map(M=>{const u=A[M.id],h=c0(E.filter(N=>N.provider===M.id&&(M.id!=="custom"||!a||N.credentialId===a)),u?.selectedModels??[]),K=Y[M.id]??u?.selectedModels.map(dr)??[];return y.jsx(Tm,{definition:M,product:u,status:r0(I[M.id],u),accountLabel:s[M.id]?.accountLabel,attempt:de[M.id],attemptOfferingId:D[M.id],apiKey:x[M.id]??"",baseUrl:re[M.id]??s[M.id]?.baseUrl??"",busy:!!(he[M.id]||O[M.id]),disabled:p,error:oe[M.id],quotas:T[M.id],models:h,selectedModelIds:K,modelSelectionStatus:te[M.id],onApiKeyChange:N=>X($=>({...$,[M.id]:N})),onBaseUrlChange:N=>ie($=>({...$,[M.id]:N})),onBeginApiKey:()=>{L(M.id)},onBeginOffering:(N,$,ge)=>{W(M.id,N,$,ge)},onCancelConnect:N=>{pe(M.id,N)},onBeginBrowser:()=>{J(M)},onSaveApiKey:()=>{ve(M)},onDisconnect:N=>{Ae(M.id,N?.id)},onCreateApiKeyCredential:(N,$)=>Ft(M.id,N,$),onCreateLocalCredential:(N,$)=>Me(M.id,N,$),onUpdateCredential:(N,$)=>Dn(M.id,N,$),onDeleteCredential:N=>{Pn(M.id,N)},onTestCredential:N=>{Er(M.id,N)},onReorderCredentials:(N,$,ge,be)=>{Tn(M.id,N,$,ge,be)},onRefreshQuota:(N,$)=>{kn(M.id,N,$)},verifyPending:!!O[M.id],onVerify:()=>{Ir(M.id)},onAddModel:()=>en(M.id),onEditModel:N=>en(M.id,N),onDeleteModel:N=>{Yt(M.id,N)},onModelSelectionChange:On,onDismissError:()=>q(M.id)},M.id)})]}),Xt=y.jsx($m,{client:e,clientConfigurationBridge:n,gatewayModels:R});return y.jsxs("div",{"data-testid":"ai-connections-panel",className:"mx-auto w-full max-w-5xl space-y-10 px-4 py-6 sm:px-8 sm:py-8",children:[t?y.jsx(Fp,{}):null,i==="keys"?Xt:null,i==="provider"?jn:null,i==="provider"&&ue?y.jsx(Lm,{open:!0,providerName:at.find(M=>M.id===ue.provider)?.name??ue.provider,initialValue:ue.model?{id:ue.model.id,name:ue.model.displayName??"",inputModalities:ue.model.inputModalities??[],capabilities:ue.model.capabilities??[]}:void 0,error:se,saving:U,onOpenChange:M=>{M||le(void 0)},onSave:M=>{Rr(M)}}):null]})}function oh(e){if(!e||e.status==="unconfigured"||e.status==="unavailable")return"disconnected";if(e.status==="configured")return"configured";if(e.status==="attention")return"reauthRequired";const t=e.credentials.find(r=>r.enabled)??e.credentials[0];return t?.authMode==="oauth"||t?.authMode==="deviceCode"?"connected":"configured"}function r0(e,t){return e==="pending"||e==="failed"?e:t?oh(t):e??"unknown"}async function n0(e,t,r,n,i,o){let a=r;try{for(;i.current===n&&Os(a.status);){if(await l0(Math.max(1,a.intervalSeconds??2)*1e3),i.current!==n)return;a={...a,...await e.pollDevice(t,a)},o.onAttempt(a)}a.status==="completed"?await o.onConnected():i.current===n&&o.onFailed(a.message||`连接${a.status==="expired"?"已过期":"失败"}`)}catch(s){i.current===n&&o.onFailed(Qe(s))}finally{i.current===n&&o.onFinished()}}function Os(e){return e==="pending"||e==="authorization_pending"||e==="slow_down"}function vu(e){return e==="expired"?"连接已过期,请重新开始":e==="cancelled"?"连接已取消":e==="unsupported"?"当前 Provider 不支持此连接方式":"连接失败"}function i0(e){return e==="configured"?"configured":e==="connected"?"connected":e==="failed"||e==="reauthRequired"?"attention":e==="pending"?"loading":"unconfigured"}function Su(e,t,r){const n=e??Wo(t),i=ah([...n.credentials.filter(o=>o.id!==r.id),r]);return{...n,credentials:i,status:dl(i)}}function Eu(e,t,r){const n=e??Wo(t),i=n.credentials.filter(o=>o.id!==r);return{...n,credentials:i,status:dl(i)}}function xu(e,t,r,n){const i=e??Wo(t),o=i.credentials.map(a=>a.id===r?{...a,health:n}:a);return{...i,credentials:o,status:o.some(a=>a.enabled&&a.health==="invalid")?"attention":dl(o)}}function o0(e){const t=e.credential;if(!t||typeof t!="object")return;const r=t;return typeof r.id=="string"&&typeof r.offeringId=="string"&&(r.authMode==="oauth"||r.authMode==="deviceCode"||r.authMode==="apiKey"||r.authMode==="local")&&typeof r.version=="number"?r:void 0}function dl(e){if(e.length===0)return"unconfigured";const t=e.filter(r=>r.enabled);return t.length===0?"configured":t.some(r=>r.health==="expired"||r.health==="invalid")?"attention":"available"}function a0(e,t,r,n){const i=e??Wo(t),o=new Set(n.map(a=>a.id));return{...i,offerings:i.offerings.some(a=>a.id===r.id)?i.offerings:[...i.offerings,r],credentials:ah([...i.credentials.filter(a=>!o.has(a.id)),...n])}}function Wo(e){return{id:e,name:at.find(t=>t.id===e)?.name??e,offerings:[],credentials:[],selectedModels:[],status:"unconfigured"}}function ah(e){return[...e].sort((t,r)=>t.priority-r.priority)}function s0(e){window.open(e,"_blank","noopener,noreferrer")}function l0(e){return new Promise(t=>window.setTimeout(t,e))}function Qe(e){const t=Wd(e);return t==="AI Connection request failed. Please try again."?"请求未完成。请确认 Xpod 正在运行且登录仍有效,然后重试。":t}function u0(e,t){return e==="custom"?t?.credentialId?{markMissing:!0,credentialId:t.credentialId}:{markMissing:!t}:t?.offeringId?{markMissing:!0,offeringId:t.offeringId}:{markMissing:!t}}function fa(e,t,r,n={markMissing:!1}){const i=new Set(r.map(a=>a.id)),o=e.map(a=>n.markMissing&&a.provider===t&&!a.custom&&!i.has(a.id)&&(n.offeringId===void 0||a.offeringId===n.offeringId)&&(n.credentialId===void 0||a.credentialId===n.credentialId)?sn({...a,availability:"unavailable"}):a);for(const a of r){const s=a,c="provider"in a,d=s.offeringId??(c?void 0:n.offeringId),p=s.credentialId??(c?void 0:n.credentialId),g=o.findIndex(_=>_.provider!==t?!1:s.resourceId&&_.resourceId?s.resourceId===_.resourceId:p!==void 0?_.id===s.id&&_.credentialId===p:d!==void 0?_.id===s.id&&_.offeringId===d:_.id===s.id&&_.offeringId===void 0);g===-1?o.push(sn({...s,id:s.id,provider:t,availability:s.availability??"available",...d?{offeringId:d}:{},...p?{credentialId:p}:{}})):o[g]=sn({...o[g],...s,provider:t,displayName:s.displayName??o[g].displayName,availability:s.availability??"available",...d?{offeringId:d}:{},...p?{credentialId:p}:{}})}return o}function Iu(e,t,r,n,i){if(!i.markMissing||r.length===0)return e;const o=new Set(n.map(s=>s.id)),a=[...e];for(const s of r.filter(c=>c.provider===t)){if(s.custom||i.offeringId!==void 0&&s.offeringId!==i.offeringId||i.credentialId!==void 0&&s.credentialId!==i.credentialId||o.has(s.id))continue;const c=dr(s),d=a.findIndex(g=>g.provider===t&&dr(g)===c),p=sn({...s,availability:"unavailable"});d===-1?a.push(p):a[d]=sn({...a[d],...p,displayName:a[d].displayName??p.displayName})}return a}function c0(e,t){const r=[...e];for(const n of t){const i=r.findIndex(o=>dr(o)===dr(n));if(i===-1){r.push(n);continue}r[i]=sn({...r[i],...n,displayName:r[i].displayName??n.displayName,availability:r[i].availability==="unavailable"?"unavailable":n.availability})}return r}function sn(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}function dr(e){return e.resourceId??(e.offeringId?`${e.offeringId}:${e.id}`:e.id)}function d0(e){return{id:e.id,...e.offeringId?{offeringId:e.offeringId}:{},...e.resourceId?{resourceId:e.resourceId}:{}}}function Ru(e){return e!==void 0}function sh({controller:e,renderToaster:t=!0}){const r=ll(e),n=ul(e),i=Jf(e),o=$b(e),a=cl(e),s=Xf(e),c=at.find(C=>C.id===n),d=n==="custom"?a.custom?.credentials.find(C=>C.id===i):void 0,p=sl.find(C=>C.id===r)?.title,g=d?.label??a[n]?.name??c?.name??n,_=p??`${g} 详情`,I=n==="custom"&&i&&a.custom?{...a,custom:{...a.custom,name:g,offerings:f0(a.custom,d),credentials:a.custom.credentials.filter(C=>C.id===i),selectedModels:a.custom.selectedModels.filter(C=>C.credentialId===i)}}:a;return G.useEffect(()=>{e.client&&e.loadProviders()},[e]),e.client?y.jsx("section",{role:"region","aria-label":_,children:y.jsx(t0,{client:e.client,renderToaster:t,clientConfigurationBridge:e.clientConfigurationBridge,selectedSection:r,selectedProvider:n,selectedCredentialId:i,openExternal:e.openExternal,providerSummaries:o,providerProducts:I,providerLoadError:s,providerLoading:!a[n]&&!s,onProviderStateChange:e.setProviderState})}):y.jsxs("section",{role:"alert","aria-label":"AI Connections unavailable",children:[y.jsx("h2",{children:"AI Connections 尚未就绪"}),y.jsx("p",{children:"宿主需要先提供已登录的 WebID 和可用的 Pod。"})]})}function f0(e,t){if(!t)return e.offerings;const r=t.compatibility??(t.offeringId==="anthropic-compatible"?"anthropic":"openai"),n=e.offerings.find(i=>i.id===t.offeringId)??e.offerings[0];return n?[{...n,id:t.offeringId,label:r==="auto"?"自动探测":r==="anthropic"?"Anthropic 兼容":"OpenAI 兼容",endpoints:t.baseUrl?[{protocol:r==="anthropic"?"anthropic":"chatCompletions",baseUrl:t.baseUrl}]:n.endpoints,modelDiscovery:r==="anthropic"?{strategy:"anthropic",path:"/models",endpointProtocol:"anthropic"}:r==="auto"?{strategy:"auto",path:"/models",endpointProtocol:"auto"}:{strategy:"openaiCompatible",path:"/models",endpointProtocol:"chatCompletions"}}]:[]}function h0({open:e,saving:t=!1,error:r,onOpenChange:n,onSave:i}){const[o,a]=G.useState(""),[s,c]=G.useState("auto"),[d,p]=G.useState(""),[g,_]=G.useState(""),[I,C]=G.useState(""),[E,m]=G.useState();G.useEffect(()=>{e&&(a(""),c("auto"),p(""),_(""),C(""),m(void 0))},[e]);const R=()=>{m(void 0);let S;try{S=p0(d)}catch{m("Base URL 必须是有效的 http(s) 地址。");return}const v=o.trim(),Q=g.trim();if(!v){m("请输入 Provider 名称。");return}if(!Q){m("请输入 API Key。");return}i({offeringId:y0(s),apiKey:Q,label:v,baseUrl:S,priority:10,compatibility:s,...I.trim()?{proxyUrl:I.trim()}:{}})};return y.jsx(Ii,{open:e,onOpenChange:n,children:y.jsxs(An,{className:"max-w-md",style:{maxHeight:"calc(100vh - 2rem)",overflowY:"auto"},"aria-describedby":"ai-custom-provider-description",children:[y.jsx(Ri,{children:y.jsx(_n,{children:"添加自定义 Provider"})}),y.jsx("p",{id:"ai-custom-provider-description",className:"text-sm text-muted-foreground",children:"用 OpenAI/Anthropic 兼容协议接入第三方模型服务。Xpod 会把真实 API Key 存进当前 Pod。"}),y.jsxs("div",{className:"flex flex-col gap-4 py-2",children:[y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx(er,{htmlFor:"ai-custom-provider-name",children:"Provider 名称"}),y.jsx(st,{id:"ai-custom-provider-name",value:o,disabled:t,placeholder:"例如 OpenRouter",onChange:S=>a(S.target.value)})]}),y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx(er,{htmlFor:"ai-custom-provider-compatibility",children:"兼容协议"}),y.jsxs("select",{id:"ai-custom-provider-compatibility",value:s,disabled:t,"aria-label":"兼容协议",className:"h-9 rounded-md border border-input bg-background px-3 text-sm",onChange:S=>c(S.target.value),children:[y.jsx("option",{value:"auto",children:"自动探测"}),y.jsx("option",{value:"openai",children:"OpenAI 兼容优先"}),y.jsx("option",{value:"anthropic",children:"Anthropic 兼容优先"})]})]}),y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx(er,{htmlFor:"ai-custom-provider-base-url",children:"Base URL"}),y.jsx(st,{id:"ai-custom-provider-base-url",value:d,disabled:t,placeholder:"https://openrouter.ai/api 或 https://openrouter.ai/api/v1",onChange:S=>p(S.target.value)}),y.jsx("p",{className:"text-xs text-muted-foreground",children:"裸域名会自动补齐为 /v1。"})]}),y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx(er,{htmlFor:"ai-custom-provider-api-key",children:"API Key"}),y.jsx(st,{id:"ai-custom-provider-api-key",type:"password",value:g,disabled:t,autoComplete:"new-password","data-lpignore":"true",onChange:S=>_(S.target.value)})]}),y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx(er,{htmlFor:"ai-custom-provider-proxy-url",children:"Proxy URL(可选)"}),y.jsx(st,{id:"ai-custom-provider-proxy-url",value:I,disabled:t,placeholder:"http://127.0.0.1:7890",onChange:S=>C(S.target.value)})]}),E||r?y.jsx("p",{className:"text-sm text-destructive",children:E??r}):null]}),y.jsxs(gi,{children:[y.jsx(_e,{type:"button",variant:"outline",disabled:t,onClick:()=>n(!1),children:"取消"}),y.jsx(_e,{type:"button",disabled:t,onClick:R,children:"保存自定义 Provider"})]})]})})}function p0(e){const t=e.trim(),r=new URL(t);if(r.protocol!=="http:"&&r.protocol!=="https:")throw new Error("invalid_custom_base_url");r.hash="";const n=r.pathname.replace(/\/+$/u,"");return!n||n===""?r.pathname="/v1":r.pathname=n,r.href.replace(/\/$/u,"")}function y0(e){return e==="anthropic"?"anthropic-compatible":"openai-compatible"}function g0({controller:e}){const t=Yf(e),[r,n]=G.useState(!1),[i,o]=G.useState(!1),[a,s]=G.useState(),c=async d=>{if(!e.client){s("请先登录后再添加自定义 Provider。");return}o(!0),s(void 0);let p;try{const g=await e.client.createApiKeyCredential("custom",d);p=g.id,await e.client.discoverModels("custom",{offeringId:g.offeringId,credentialId:g.id,compatibility:d.compatibility}),e.selectProvider("custom",g.id),await e.loadProviders(),n(!1)}catch(g){p&&await e.client.deleteProviderCredential("custom",p).catch(()=>{}),s(g instanceof Error?g.message:"AI Connection request failed. Please try again.")}finally{o(!1)}};return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"flex h-full min-w-0 items-center gap-2 px-3",children:[y.jsxs("div",{className:"relative min-w-0 flex-1",children:[y.jsx(lf,{"aria-hidden":"true",className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),y.jsx(st,{type:"search","aria-label":"搜索 Provider",placeholder:"搜索 Provider",value:t,onChange:d=>e.setSearchQuery(d.target.value),className:"h-8 border-transparent bg-muted/50 pl-8 text-xs focus-visible:bg-background"})]}),y.jsx(_e,{type:"button",variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0","aria-label":"添加 AI Connection",title:"添加 AI Connection",onClick:()=>n(!0),children:y.jsx(wn,{className:"h-4 w-4","aria-hidden":"true"})})]}),y.jsx(h0,{open:r,saving:i,error:a,onOpenChange:n,onSave:d=>{c(d)}})]})}function b0({controller:e}){const t=ll(e),r=ul(e),n=cl(e),i=at.find(a=>a.id===r),o=sl.find(a=>a.id===t)?.title??n[r]?.name??i?.name??r;return y.jsx("div",{className:"flex h-full min-w-0 items-center px-4",children:y.jsx("h1",{className:"truncate text-sm font-medium text-foreground",children:o})})}const m0=["navigation.openExternal","aiClientConfiguration"];function w0(e){const t=ha(e,"Extension manifest");Cu(t.extensionId,"extensionId"),tn(t.name,"name"),tn(t.version,"version"),tn(t.sdkVersion,"sdkVersion");const r=ha(t.contributes,"contributes");if(!Array.isArray(r.applets)||r.applets.length===0)throw new Error("Extension manifest must contribute at least one Applet");const n=new Set;for(const i of r.applets){const o=ha(i,"Applet manifest"),a=Cu(o.appId,"appId");if(n.has(a))throw new Error(`Extension manifest has duplicate appId: ${a}`);if(n.add(a),tn(o.name,"Applet name"),tn(o.entry,"Applet entry"),!Array.isArray(o.commands))throw new Error("Applet commands must be an array");if(o.layout!=="single-pane"&&o.layout!=="two-pane")throw new Error("Applet layout must be single-pane or two-pane")}if(!Array.isArray(t.dataModels))throw new Error("Extension dataModels must be an array");if(!Array.isArray(t.hostCapabilities))throw new Error("Extension hostCapabilities must be an array");for(const i of t.hostCapabilities)if(!m0.includes(i))throw new Error(`Extension manifest requested unknown Host capability: ${String(i)}`);return e}function ha(e,t){if(!e||typeof e!="object"||Array.isArray(e))throw new Error(`${t} must be an object`);return e}function tn(e,t){if(typeof e!="string"||e.trim().length===0)throw new Error(`${t} must be a non-empty string`);return e}function Cu(e,t){const r=tn(e,t);let n;try{n=new URL(r)}catch{throw new Error(`${t} must be a valid HTTPS URL`)}if(n.protocol!=="https:")throw new Error(`${t} must be a valid HTTPS URL`);return r}const lh=w0({extensionId:"https://undefineds.co/extensions/ai-connections",name:"AI Connection",version:"0.1.0",sdkVersion:"1",contributes:{applets:[{appId:"https://undefineds.co/applets/ai-connections",name:"AI Connection",entry:".",commands:[],layout:"two-pane"}]},dataModels:[],hostCapabilities:["navigation.openExternal","aiClientConfiguration"]}),fl=lh.contributes.applets[0],js={manifest:fl,createController:Jb,activate(e){e.loadProviders()},slots:{listHeader:g0,list:lm,mainHeader:b0,main:sh}},Mu={manifest:lh,applets:{[fl.appId]:js}};function A0(e={}){return e.renderToaster!==!1?Mu:{...Mu,applets:{[fl.appId]:{...js,slots:{...js.slots,main:({controller:t})=>G.createElement(sh,{controller:t,renderToaster:!1})}}}}}function _0({collection:e,accountIndex:t,fetch:r=window.fetch.bind(window)}){const n=new Set,i=async a=>{const s=await Bp(a,r,t);if(!s||!new URL(s).pathname.startsWith("/.account/"))throw new Error("客户端凭据地址不属于可信账号服务。");return s},o=(a,s,c)=>r(a,{method:s,credentials:"include",redirect:"error",headers:Lp({Accept:"application/json",...c?{"Content-Type":"application/json"}:{}}),...c?{body:JSON.stringify(c)}:{}});return{async create({name:a,webId:s}){if(!a.trim()||!s)throw new Error("创建客户端凭据需要名称和当前 WebID。");const c=await o(await i(e),"POST",{name:a.trim(),webId:s});if(!c.ok)throw new Error(`创建客户端凭据失败(HTTP ${c.status})。`);const d=await c.json();if(typeof d.id!="string"||!d.id||d.id.includes(":")||typeof d.secret!="string"||!d.secret||typeof d.resource!="string"||!d.resource)throw new Error("账号服务未返回有效的客户端凭据。");const p=await i(d.resource),g=new TextEncoder().encode(`${d.id}:${d.secret}`);return{apiKey:`sk-${btoa(Array.from(g,I=>String.fromCharCode(I)).join(""))}`,resource:p}},async list(){const a=await o(await i(e),"GET");if(!a.ok)throw new Error(`读取客户端凭据失败(HTTP ${a.status})。`);const s=await a.json(),c=Object.entries(s.clientCredentials??{});return Promise.all(c.map(async([d,p])=>({clientId:d,label:d,resource:await i(String(p))})))},async revoke({clientId:a,resource:s,webId:c}){const d=await i(s),p=JSON.stringify([d,a,c]),g=await o(d,"GET");if(g.status===404||g.status===410){if(n.has(p))return;throw new Error("无法确认客户端凭据已撤销,请检查当前 Account 登录;Key 记录已保留。")}if(!g.ok)throw new Error(`读取客户端凭据失败(HTTP ${g.status})。`);const _=await g.json();if(_.id!==a||_.webId!==c)throw new Error("客户端凭据与当前 Key 或 WebID 不匹配,未执行删除。");const I=await o(d,"DELETE");if(!I.ok)throw new Error(`撤销客户端凭据失败(HTTP ${I.status})。`);n.add(p)}}}var Pr={},qn={},Tr={},kr={};var Eo="@@__IMMUTABLE_INDEXED__@@";function At(e){return!!(e&&e[Eo])}var xo="@@__IMMUTABLE_KEYED__@@";function ke(e){return!!(e&&e[xo])}function Ho(e){return ke(e)||At(e)}var uh="@@__IMMUTABLE_ITERABLE__@@";function _t(e){return!!(e&&e[uh])}var Je=function(t){return _t(t)?t:rt(t)},Ot=(function(e){function t(r){return ke(r)?r:Ar(r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t})(Je),Jr=(function(e){function t(r){return At(r)?r:Nt(r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t})(Je),vn=(function(e){function t(r){return _t(r)&&!Ho(r)?r:In(r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t})(Je);Je.Keyed=Ot;Je.Indexed=Jr;Je.Set=vn;var Sn=0,Rt=1,Ct=2,Ns=typeof Symbol=="function"&&Symbol.iterator,ch="@@iterator",Vo=Ns||ch,Ee=function(t){this.next=t};Ee.prototype.toString=function(){return"[Iterator]"};Ee.KEYS=Sn;Ee.VALUES=Rt;Ee.ENTRIES=Ct;Ee.prototype.inspect=Ee.prototype.toSource=function(){return this.toString()};Ee.prototype[Vo]=function(){return this};function je(e,t,r,n){var i=e===Sn?t:e===Rt?r:[t,r];return n?n.value=i:n={value:i,done:!1},n}function tt(){return{value:void 0,done:!0}}function hl(e){return Array.isArray(e)?!0:!!Qo(e)}function Du(e){return!!(e&&typeof e.next=="function")}function Fs(e){var t=Qo(e);return t&&t.call(e)}function Qo(e){var t=e&&(Ns&&e[Ns]||e[ch]);if(typeof t=="function")return t}function v0(e){var t=Qo(e);return t&&t===e.entries}function S0(e){var t=Qo(e);return t&&t===e.keys}var Fi="delete",Te=5,It=1<<Te,ut=It-1,Se={};function Bs(){return{value:!1}}function Tt(e){e&&(e.value=!0)}function pl(){}function un(e){return e.size===void 0&&(e.size=e.__iterate(dh)),e.size}function hr(e,t){if(typeof t!="number"){var r=t>>>0;if(""+r!==t||r===4294967295)return NaN;t=r}return t<0?un(e)+t:t}function dh(){return!0}function Bi(e,t,r){return(e===0&&!hh(e)||r!==void 0&&e<=-r)&&(t===void 0||r!==void 0&&t>=r)}function En(e,t){return fh(e,t,0)}function Li(e,t){return fh(e,t,t)}function fh(e,t,r){return e===void 0?r:hh(e)?t===1/0?t:Math.max(0,t+e)|0:t===void 0||t===e?e:Math.min(t,e)|0}function hh(e){return e<0||e===0&&1/e===-1/0}var ph="@@__IMMUTABLE_RECORD__@@";function wr(e){return!!(e&&e[ph])}function jt(e){return _t(e)||wr(e)}var pr="@@__IMMUTABLE_ORDERED__@@";function qt(e){return!!(e&&e[pr])}var yh="@@__IMMUTABLE_SEQ__@@";function Go(e){return!!(e&&e[yh])}var xn=Object.prototype.hasOwnProperty;function yl(e){return Array.isArray(e)||typeof e=="string"?!0:e&&typeof e=="object"&&Number.isInteger(e.length)&&e.length>=0&&(e.length===0?Object.keys(e).length===1:e.hasOwnProperty(e.length-1))}var rt=(function(e){function t(r){return r==null?bl():jt(r)?r.toSeq():x0(r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(n,i){var o=this._cache;if(o){for(var a=o.length,s=0;s!==a;){var c=o[i?a-++s:s++];if(n(c[1],c[0],this)===!1)break}return s}return this.__iterateUncached(n,i)},t.prototype.__iterator=function(n,i){var o=this._cache;if(o){var a=o.length,s=0;return new Ee(function(){if(s===a)return tt();var c=o[i?a-++s:s++];return je(n,c[0],c[1])})}return this.__iteratorUncached(n,i)},t})(Je),Ar=(function(e){function t(r){return r==null?bl().toKeyedSeq():_t(r)?ke(r)?r.toSeq():r.fromEntrySeq():wr(r)?r.toSeq():ml(r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t})(rt),Nt=(function(e){function t(r){return r==null?bl():_t(r)?ke(r)?r.entrySeq():r.toIndexedSeq():wr(r)?r.toSeq().entrySeq():gh(r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t})(rt),In=(function(e){function t(r){return(_t(r)&&!Ho(r)?r:Nt(r)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t})(rt);rt.isSeq=Go;rt.Keyed=Ar;rt.Set=In;rt.Indexed=Nt;rt.prototype[yh]=!0;var cn=(function(e){function t(r){this._array=r,this.size=r.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(n,i){return this.has(n)?this._array[hr(this,n)]:i},t.prototype.__iterate=function(n,i){for(var o=this._array,a=o.length,s=0;s!==a;){var c=i?a-++s:s++;if(n(o[c],c,this)===!1)break}return s},t.prototype.__iterator=function(n,i){var o=this._array,a=o.length,s=0;return new Ee(function(){if(s===a)return tt();var c=i?a-++s:s++;return je(n,c,o[c])})},t})(Nt),gl=(function(e){function t(r){var n=Object.keys(r).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(r):[]);this._object=r,this._keys=n,this.size=n.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(n,i){return i!==void 0&&!this.has(n)?i:this._object[n]},t.prototype.has=function(n){return xn.call(this._object,n)},t.prototype.__iterate=function(n,i){for(var o=this._object,a=this._keys,s=a.length,c=0;c!==s;){var d=a[i?s-++c:c++];if(n(o[d],d,this)===!1)break}return c},t.prototype.__iterator=function(n,i){var o=this._object,a=this._keys,s=a.length,c=0;return new Ee(function(){if(c===s)return tt();var d=a[i?s-++c:c++];return je(n,d,o[d])})},t})(Ar);gl.prototype[pr]=!0;var E0=(function(e){function t(r){this._collection=r,this.size=r.length||r.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(n,i){if(i)return this.cacheResult().__iterate(n,i);var o=this._collection,a=Fs(o),s=0;if(Du(a))for(var c;!(c=a.next()).done&&n(c.value,s++,this)!==!1;);return s},t.prototype.__iteratorUncached=function(n,i){if(i)return this.cacheResult().__iterator(n,i);var o=this._collection,a=Fs(o);if(!Du(a))return new Ee(tt);var s=0;return new Ee(function(){var c=a.next();return c.done?c:je(n,s++,c.value)})},t})(Nt),Pu;function bl(){return Pu||(Pu=new cn([]))}function ml(e){var t=wl(e);if(t)return t.fromEntrySeq();if(typeof e=="object")return new gl(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function gh(e){var t=wl(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function x0(e){var t=wl(e);if(t)return v0(e)?t.fromEntrySeq():S0(e)?t.toSetSeq():t;if(typeof e=="object")return new gl(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}function wl(e){return yl(e)?new cn(e):hl(e)?new E0(e):void 0}function Ui(){return this.__ensureOwner()}function qi(){return this.__ownerID?this:this.__ensureOwner(new pl)}var Kn=typeof Math.imul=="function"&&Math.imul(4294967295,2)===-2?Math.imul:function(t,r){t|=0,r|=0;var n=t&65535,i=r&65535;return n*i+((t>>>16)*i+n*(r>>>16)<<16>>>0)|0};function Jo(e){return e>>>1&1073741824|e&3221225471}var I0=Object.prototype.valueOf;function lt(e){if(e==null)return Tu(e);if(typeof e.hashCode=="function")return Jo(e.hashCode(e));var t=k0(e);if(t==null)return Tu(t);switch(typeof t){case"boolean":return t?1108378657:1108378656;case"number":return R0(t);case"string":return t.length>O0?C0(t):Ls(t);case"object":case"function":return P0(t);case"symbol":return D0(t);default:if(typeof t.toString=="function")return Ls(t.toString());throw new Error("Value type "+typeof t+" cannot be hashed.")}}function Tu(e){return e===null?1108378658:1108378659}function R0(e){if(e!==e||e===1/0)return 0;var t=e|0;for(t!==e&&(t^=e*4294967295);e>4294967295;)e/=4294967295,t^=e;return Jo(t)}function C0(e){var t=ga[e];return t===void 0&&(t=Ls(e),ya===j0&&(ya=0,ga={}),ya++,ga[e]=t),t}function Ls(e){for(var t=0,r=0;r<e.length;r++)t=31*t+e.charCodeAt(r)|0;return Jo(t)}var M0=(Math.random()*1048576|1)%1048576||40503;function Al(e){if(typeof e!="string")return lt(e);for(var t=0,r=0;r<e.length;r++)t=M0*t+e.charCodeAt(r)|0;return t}function D0(e){var t=ju[e];return t!==void 0||(t=bh(),ju[e]=t),t}function P0(e){var t;if(Us&&(t=qs.get(e),t!==void 0)||(t=e[Ur],t!==void 0)||!Ou&&(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Ur],t!==void 0||(t=T0(e),t!==void 0)))return t;if(t=bh(),Us)qs.set(e,t);else{if(ku!==void 0&&ku(e)===!1)throw new Error("Non-extensible objects are not allowed as keys.");if(Ou)Object.defineProperty(e,Ur,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(e.propertyIsEnumerable!==void 0&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Ur]=t;else if(e.nodeType!==void 0)e[Ur]=t;else throw new Error("Unable to set a non-enumerable property on object.")}return t}var ku=Object.isExtensible,Ou=(function(){try{return Object.defineProperty({},"@",{}),!0}catch{return!1}})();function T0(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}function k0(e){return e.valueOf!==I0&&typeof e.valueOf=="function"?e.valueOf(e):e}function bh(){var e=++pa;return pa&1073741824&&(pa=0),e}var Us=typeof WeakMap=="function",qs;Us&&(qs=new WeakMap);var ju=Object.create(null),pa=0,Ur="__immutablehash__";typeof Symbol=="function"&&(Ur=Symbol(Ur));var O0=16,j0=255,ya=0,ga={},Yo=(function(e){function t(r,n){this._iter=r,this._useKeys=n,this.size=r.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(n,i){return this._iter.get(n,i)},t.prototype.has=function(n){return this._iter.has(n)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var n=this,i=_l(this,!0);return this._useKeys||(i.valueSeq=function(){return n._iter.toSeq().reverse()}),i},t.prototype.map=function(n,i){var o=this,a=vh(this,n,i);return this._useKeys||(a.valueSeq=function(){return o._iter.toSeq().map(n,i)}),a},t.prototype.__iterate=function(n,i){var o=this;return this._iter.__iterate(function(a,s){return n(a,s,o)},i)},t.prototype.__iterator=function(n,i){return this._iter.__iterator(n,i)},t})(Ar);Yo.prototype[pr]=!0;var mh=(function(e){function t(r){this._iter=r,this.size=r.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.includes=function(n){return this._iter.includes(n)},t.prototype.__iterate=function(n,i){var o=this,a=0;return i&&un(this),this._iter.__iterate(function(s){return n(s,i?o.size-++a:a++,o)},i)},t.prototype.__iterator=function(n,i){var o=this,a=this._iter.__iterator(Rt,i),s=0;return i&&un(this),new Ee(function(){var c=a.next();return c.done?c:je(n,i?o.size-++s:s++,c.value,c)})},t})(Nt),wh=(function(e){function t(r){this._iter=r,this.size=r.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.has=function(n){return this._iter.includes(n)},t.prototype.__iterate=function(n,i){var o=this;return this._iter.__iterate(function(a){return n(a,a,o)},i)},t.prototype.__iterator=function(n,i){var o=this._iter.__iterator(Rt,i);return new Ee(function(){var a=o.next();return a.done?a:je(n,a.value,a.value,a)})},t})(In),Ah=(function(e){function t(r){this._iter=r,this.size=r.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(n,i){var o=this;return this._iter.__iterate(function(a){if(a){Fu(a);var s=_t(a);return n(s?a.get(1):a[1],s?a.get(0):a[0],o)}},i)},t.prototype.__iterator=function(n,i){var o=this._iter.__iterator(Rt,i);return new Ee(function(){for(;;){var a=o.next();if(a.done)return a;var s=a.value;if(s){Fu(s);var c=_t(s);return je(n,c?s.get(0):s[0],c?s.get(1):s[1],a)}}})},t})(Ar);mh.prototype.cacheResult=Yo.prototype.cacheResult=wh.prototype.cacheResult=Ah.prototype.cacheResult=El;function _h(e){var t=Jt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var r=e.reverse.apply(this);return r.flip=function(){return e.reverse()},r},t.has=function(r){return e.includes(r)},t.includes=function(r){return e.has(r)},t.cacheResult=El,t.__iterateUncached=function(r,n){var i=this;return e.__iterate(function(o,a){return r(a,o,i)!==!1},n)},t.__iteratorUncached=function(r,n){if(r===Ct){var i=e.__iterator(r,n);return new Ee(function(){var o=i.next();if(!o.done){var a=o.value[0];o.value[0]=o.value[1],o.value[1]=a}return o})}return e.__iterator(r===Rt?Sn:Rt,n)},t}function vh(e,t,r){var n=Jt(e);return n.size=e.size,n.has=function(i){return e.has(i)},n.get=function(i,o){var a=e.get(i,Se);return a===Se?o:t.call(r,a,i,e)},n.__iterateUncached=function(i,o){var a=this;return e.__iterate(function(s,c,d){return i(t.call(r,s,c,d),c,a)!==!1},o)},n.__iteratorUncached=function(i,o){var a=e.__iterator(Ct,o);return new Ee(function(){var s=a.next();if(s.done)return s;var c=s.value,d=c[0];return je(i,d,t.call(r,c[1],d,e),s)})},n}function _l(e,t){var r=Jt(e);return r._iter=e,r.size=e.size,r.reverse=function(){return e},e.flip&&(r.flip=function(){var n=_h(e);return n.reverse=function(){return e.flip()},n}),r.get=function(n,i){return e.get(t?n:-1-n,i)},r.has=function(n){return e.has(t?n:-1-n)},r.includes=function(n){return e.includes(n)},r.cacheResult=El,r.__iterate=function(n,i){var o=this,a=0;return i&&un(e),e.__iterate(function(s,c){return n(s,t?c:i?o.size-++a:a++,o)},!i)},r.__iterator=function(n,i){var o=0;i&&un(e);var a=e.__iterator(Ct,!i);return new Ee(function(){var s=a.next();if(s.done)return s;var c=s.value;return je(n,t?c[0]:i?r.size-++o:o++,c[1],s)})},r}function Sh(e,t,r,n){var i=Jt(e);return n&&(i.has=function(o){var a=e.get(o,Se);return a!==Se&&!!t.call(r,a,o,e)},i.get=function(o,a){var s=e.get(o,Se);return s!==Se&&t.call(r,s,o,e)?s:a}),i.__iterateUncached=function(o,a){var s=this,c=0;return e.__iterate(function(d,p,g){if(t.call(r,d,p,g))return c++,o(d,n?p:c-1,s)},a),c},i.__iteratorUncached=function(o,a){var s=e.__iterator(Ct,a),c=0;return new Ee(function(){for(;;){var d=s.next();if(d.done)return d;var p=d.value,g=p[0],_=p[1];if(t.call(r,_,g,e))return je(o,n?g:c++,_,d)}})},i}function N0(e,t,r){var n=Yr().asMutable();return e.__iterate(function(i,o){n.update(t.call(r,i,o,e),0,function(a){return a+1})}),n.asImmutable()}function F0(e,t,r){var n=ke(e),i=(qt(e)?Gt():Yr()).asMutable();e.__iterate(function(a,s){i.update(t.call(r,a,s,e),function(c){return c=c||[],c.push(n?[s,a]:a),c})});var o=Sl(e);return i.map(function(a){return Pe(e,o(a))}).asImmutable()}function B0(e,t,r){var n=ke(e),i=[[],[]];e.__iterate(function(a,s){i[t.call(r,a,s,e)?1:0].push(n?[s,a]:a)});var o=Sl(e);return i.map(function(a){return Pe(e,o(a))})}function vl(e,t,r,n){var i=e.size;if(Bi(t,r,i))return e;if(typeof i>"u"&&(t<0||r<0))return vl(e.toSeq().cacheResult(),t,r,n);var o=En(t,i),a=Li(r,i),s=a-o,c;s===s&&(c=s<0?0:s);var d=Jt(e);return d.size=c===0?c:e.size&&c||void 0,!n&&Go(e)&&c>=0&&(d.get=function(p,g){return p=hr(this,p),p>=0&&p<c?e.get(p+o,g):g}),d.__iterateUncached=function(p,g){var _=this;if(c===0)return 0;if(g)return this.cacheResult().__iterate(p,g);var I=0,C=!0,E=0;return e.__iterate(function(m,R){if(!(C&&(C=I++<o)))return E++,p(m,n?R:E-1,_)!==!1&&E!==c}),E},d.__iteratorUncached=function(p,g){if(c!==0&&g)return this.cacheResult().__iterator(p,g);if(c===0)return new Ee(tt);var _=e.__iterator(p,g),I=0,C=0;return new Ee(function(){for(;I++<o;)_.next();if(++C>c)return tt();var E=_.next();return n||p===Rt||E.done?E:p===Sn?je(p,C-1,void 0,E):je(p,C-1,E.value[1],E)})},d}function L0(e,t,r){var n=Jt(e);return n.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=0;return e.__iterate(function(c,d,p){return t.call(r,c,d,p)&&++s&&i(c,d,a)}),s},n.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(Ct,o),c=!0;return new Ee(function(){if(!c)return tt();var d=s.next();if(d.done)return d;var p=d.value,g=p[0],_=p[1];return t.call(r,_,g,a)?i===Ct?d:je(i,g,_,d):(c=!1,tt())})},n}function Eh(e,t,r,n){var i=Jt(e);return i.__iterateUncached=function(o,a){var s=this;if(a)return this.cacheResult().__iterate(o,a);var c=!0,d=0;return e.__iterate(function(p,g,_){if(!(c&&(c=t.call(r,p,g,_))))return d++,o(p,n?g:d-1,s)}),d},i.__iteratorUncached=function(o,a){var s=this;if(a)return this.cacheResult().__iterator(o,a);var c=e.__iterator(Ct,a),d=!0,p=0;return new Ee(function(){var g,_,I;do{if(g=c.next(),g.done)return n||o===Rt?g:o===Sn?je(o,p++,void 0,g):je(o,p++,g.value[1],g);var C=g.value;_=C[0],I=C[1],d&&(d=t.call(r,I,_,s))}while(d);return o===Ct?g:je(o,_,I,g)})},i}var U0=(function(e){function t(r){this._wrappedIterables=r.flatMap(function(n){return n._wrappedIterables?n._wrappedIterables:[n]}),this.size=this._wrappedIterables.reduce(function(n,i){if(n!==void 0){var o=i.size;if(o!==void 0)return n+o}},0),this[xo]=this._wrappedIterables[0][xo],this[Eo]=this._wrappedIterables[0][Eo],this[pr]=this._wrappedIterables[0][pr]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(n,i){if(this._wrappedIterables.length!==0){if(i)return this.cacheResult().__iterate(n,i);for(var o=0,a=ke(this),s=a?Ct:Rt,c=this._wrappedIterables[o].__iterator(s,i),d=!0,p=0;d;){for(var g=c.next();g.done;){if(o++,o===this._wrappedIterables.length)return p;c=this._wrappedIterables[o].__iterator(s,i),g=c.next()}var _=a?n(g.value[1],g.value[0],this):n(g.value,p,this);d=_!==!1,p++}return p}},t.prototype.__iteratorUncached=function(n,i){var o=this;if(this._wrappedIterables.length===0)return new Ee(tt);if(i)return this.cacheResult().__iterator(n,i);var a=0,s=this._wrappedIterables[a].__iterator(n,i);return new Ee(function(){for(var c=s.next();c.done;){if(a++,a===o._wrappedIterables.length)return c;s=o._wrappedIterables[a].__iterator(n,i),c=s.next()}return c})},t})(rt);function q0(e,t){var r=ke(e),n=[e].concat(t).map(function(o){return _t(o)?r&&(o=Ot(o)):o=r?ml(o):gh(Array.isArray(o)?o:[o]),o}).filter(function(o){return o.size!==0});if(n.length===0)return e;if(n.length===1){var i=n[0];if(i===e||r&&ke(i)||At(e)&&At(i))return i}return new U0(n)}function xh(e,t,r){var n=Jt(e);return n.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var a=0,s=!1;function c(d,p){d.__iterate(function(g,_){return(!t||p<t)&&_t(g)?c(g,p+1):(a++,i(g,r?_:a-1,n)===!1&&(s=!0)),!s},o)}return c(e,0),a},n.__iteratorUncached=function(i,o){if(o)return this.cacheResult().__iterator(i,o);var a=e.__iterator(i,o),s=[],c=0;return new Ee(function(){for(;a;){var d=a.next();if(d.done!==!1){a=s.pop();continue}var p=d.value;if(i===Ct&&(p=p[1]),(!t||s.length<t)&&_t(p))s.push(a),a=p.__iterator(i,o);else return r?d:je(i,c++,p,d)}return tt()})},n}function K0(e,t,r){var n=Sl(e);return e.toSeq().map(function(i,o){return n(t.call(r,i,o,e))}).flatten(!0)}function z0(e,t){var r=Jt(e);return r.size=e.size&&e.size*2-1,r.__iterateUncached=function(n,i){var o=this,a=0;return e.__iterate(function(s){return(!a||n(t,a++,o)!==!1)&&n(s,a++,o)!==!1},i),a},r.__iteratorUncached=function(n,i){var o=e.__iterator(Rt,i),a=0,s;return new Ee(function(){return(!s||a%2)&&(s=o.next(),s.done)?s:a%2?je(n,a++,t):je(n,a++,s.value,s)})},r}function dn(e,t,r){t||(t=Ih);var n=ke(e),i=0,o=e.toSeq().map(function(a,s){return[s,a,i++,r?r(a,s,e):a]}).valueSeq().toArray();return o.sort(function(a,s){return t(a[3],s[3])||a[2]-s[2]}).forEach(n?function(a,s){o[s].length=2}:function(a,s){o[s]=a[1]}),n?Ar(o):At(e)?Nt(o):In(o)}function $i(e,t,r){if(t||(t=Ih),r){var n=e.toSeq().map(function(i,o){return[i,r(i,o,e)]}).reduce(function(i,o){return Nu(t,i[1],o[1])?o:i});return n&&n[0]}return e.reduce(function(i,o){return Nu(t,i,o)?o:i})}function Nu(e,t,r){var n=e(r,t);return n===0&&r!==t&&(r==null||r!==r)||n>0}function eo(e,t,r,n){var i=Jt(e),o=new cn(r).map(function(a){return a.size});return i.size=n?o.max():o.min(),i.__iterate=function(a,s){for(var c=this.__iterator(Rt,s),d,p=0;!(d=c.next()).done&&a(d.value,p++,this)!==!1;);return p},i.__iteratorUncached=function(a,s){var c=r.map(function(g){return g=Je(g),Fs(s?g.reverse():g)}),d=0,p=!1;return new Ee(function(){var g;return p||(g=c.map(function(_){return _.next()}),p=n?g.every(function(_){return _.done}):g.some(function(_){return _.done})),p?tt():je(a,d++,t.apply(null,g.map(function(_){return _.value})))})},i}function Pe(e,t){return e===t?e:Go(e)?t:e.constructor(t)}function Fu(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Sl(e){return ke(e)?Ot:At(e)?Jr:vn}function Jt(e){return Object.create((ke(e)?Ar:At(e)?Nt:In).prototype)}function El(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):rt.prototype.cacheResult.call(this)}function Ih(e,t){return e===void 0&&t===void 0?0:e===void 0?1:t===void 0?-1:e>t?1:e<t?-1:0}function Ks(e){return!!(e&&typeof e.equals=="function"&&typeof e.hashCode=="function")}function Ge(e,t){if(e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1;if(typeof e.valueOf=="function"&&typeof t.valueOf=="function"){if(e=e.valueOf(),t=t.valueOf(),e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1}return!!(Ks(e)&&Ks(t)&&e.equals(t))}function xl(e,t,r,n){return Xr(e,[t],r,n)}function Rh(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Mh(this,e)}function Ch(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if(typeof e!="function")throw new TypeError("Invalid merger function: "+e);return Mh(this,t,e)}function Mh(e,t,r){for(var n=[],i=0;i<t.length;i++){var o=Ot(t[i]);o.size!==0&&n.push(o)}return n.length===0?e:e.toSeq().size===0&&!e.__ownerID&&n.length===1?wr(e)?e:e.constructor(n[0]):e.withMutations(function(a){for(var s=r?function(d,p){xl(a,p,Se,function(g){return g===Se?d:r(g,d,p)})}:function(d,p){a.set(p,d)},c=0;c<n.length;c++)n[c].forEach(s)})}var W0=Object.prototype.toString;function Il(e){if(!e||typeof e!="object"||W0.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t,n=Object.getPrototypeOf(t);n!==null;)r=n,n=Object.getPrototypeOf(r);return r===t}function yr(e){return typeof e=="object"&&(jt(e)||Array.isArray(e)||Il(e))}function Ki(e){return typeof e=="string"&&(e==="__proto__"||e==="constructor")}function Wt(e,t){t=t||0;for(var r=Math.max(0,e.length-t),n=new Array(r),i=0;i<r;i++)n[i]=e[i+t];return n}function Io(e){if(Array.isArray(e))return Wt(e);var t={};for(var r in e)Ki(r)||xn.call(e,r)&&(t[r]=e[r]);return t}function H0(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Wi(e,t)}function V0(e,t){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return Wi(t,r,e)}function Q0(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return zi(e,t)}function G0(e,t){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return zi(t,r,e)}function zi(e,t,r){return Wi(e,t,J0(r))}function Wi(e,t,r){if(!yr(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(jt(e))return typeof r=="function"&&e.mergeWith?e.mergeWith.apply(e,[r].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var n=Array.isArray(e),i=e,o=n?Jr:Ot,a=n?function(c){i===e&&(i=Io(i)),i.push(c)}:function(c,d){if(!Ki(d)){var p=xn.call(i,d),g=p&&r?r(i[d],c,d):c;(!p||g!==i[d])&&(i===e&&(i=Io(i)),i[d]=g)}},s=0;s<t.length;s++)o(t[s]).forEach(a);return i}function J0(e){function t(r,n,i){return yr(r)&&yr(n)&&Y0(r,n)?Wi(r,[n],t):e?e(r,n,i):n}return t}function Y0(e,t){var r=rt(e),n=rt(t);return At(r)===At(n)&&ke(r)===ke(n)}function Dh(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return zi(this,e)}function Ph(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return zi(this,t,e)}function Rl(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Xr(this,e,Ht(),function(n){return zi(n,t)})}function Cl(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Xr(this,e,Ht(),function(n){return Wi(n,t)})}function Th(e,t,r){return Xr(e,t,Se,function(){return r})}function Ml(e,t){return Th(this,e,t)}function Dl(e,t,r){return arguments.length===1?e(this):xl(this,e,t,r)}function Pl(e,t,r){return Xr(this,e,t,r)}function Tl(){return this.__altered}function Hi(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}var kh="@@__IMMUTABLE_MAP__@@";function Xo(e){return!!(e&&e[kh])}function hi(e,t){if(!e)throw new Error(t)}function xt(e){hi(e!==1/0,"Cannot perform this action with an infinite size.")}var Yr=(function(e){function t(r){return r==null?Ht():Xo(r)&&!qt(r)?r:Ht().withMutations(function(n){var i=e(r);xt(i.size),i.forEach(function(o,a){return n.set(a,o)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(n,i){return this._root?this._root.get(0,void 0,n,i):i},t.prototype.set=function(n,i){return Uu(this,n,i)},t.prototype.remove=function(n){return Uu(this,n,Se)},t.prototype.deleteAll=function(n){var i=Je(n);return i.size===0?this:this.withMutations(function(o){i.forEach(function(a){return o.remove(a)})})},t.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Ht()},t.prototype.sort=function(n){return Gt(dn(this,n))},t.prototype.sortBy=function(n,i){return Gt(dn(this,i,n))},t.prototype.map=function(n,i){var o=this;return this.withMutations(function(a){a.forEach(function(s,c){a.set(c,n.call(i,s,c,o))})})},t.prototype.__iterator=function(n,i){return new X0(this,n,i)},t.prototype.__iterate=function(n,i){var o=this,a=0;return this._root&&this._root.iterate(function(s){return a++,n(s[1],s[0],o)},i),a},t.prototype.__ensureOwner=function(n){return n===this.__ownerID?this:n?kl(this.size,this._root,n,this.__hash):this.size===0?Ht():(this.__ownerID=n,this.__altered=!1,this)},t})(Ot);Yr.isMap=Xo;var Ne=Yr.prototype;Ne[kh]=!0;Ne[Fi]=Ne.remove;Ne.removeAll=Ne.deleteAll;Ne.setIn=Ml;Ne.removeIn=Ne.deleteIn=Fl;Ne.update=Dl;Ne.updateIn=Pl;Ne.merge=Ne.concat=Rh;Ne.mergeWith=Ch;Ne.mergeDeep=Dh;Ne.mergeDeepWith=Ph;Ne.mergeIn=Cl;Ne.mergeDeepIn=Rl;Ne.withMutations=Hi;Ne.wasAltered=Tl;Ne.asImmutable=Ui;Ne["@@transducer/init"]=Ne.asMutable=qi;Ne["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])};Ne["@@transducer/result"]=function(e){return e.asImmutable()};var mi=function(t,r){this.ownerID=t,this.entries=r};mi.prototype.get=function(t,r,n,i){for(var o=this.entries,a=0,s=o.length;a<s;a++)if(Ge(n,o[a][0]))return o[a][1];return i};mi.prototype.update=function(t,r,n,i,o,a,s){for(var c=o===Se,d=this.entries,p=0,g=d.length;p<g&&!Ge(i,d[p][0]);p++);var _=p<g;if(_?d[p][1]===o:c)return this;if(Tt(s),(c||!_)&&Tt(a),!(c&&d.length===1)){if(!_&&!c&&d.length>=nw)return Z0(t,d,i,o);var I=t&&t===this.ownerID,C=I?d:Wt(d);return _?c?p===g-1?C.pop():C[p]=C.pop():C[p]=[i,o]:C.push([i,o]),I?(this.entries=C,this):new mi(t,C)}};var fn=function(t,r,n){this.ownerID=t,this.bitmap=r,this.nodes=n};fn.prototype.get=function(t,r,n,i){r===void 0&&(r=lt(n));var o=1<<((t===0?r:r>>>t)&ut),a=this.bitmap;return(a&o)===0?i:this.nodes[Oh(a&o-1)].get(t+Te,r,n,i)};fn.prototype.update=function(t,r,n,i,o,a,s){n===void 0&&(n=lt(i));var c=(r===0?n:n>>>r)&ut,d=1<<c,p=this.bitmap,g=(p&d)!==0;if(!g&&o===Se)return this;var _=Oh(p&d-1),I=this.nodes,C=g?I[_]:void 0,E=Ol(C,t,r+Te,n,i,o,a,s);if(E===C)return this;if(!g&&E&&I.length>=iw)return ew(t,I,p,c,E);if(g&&!E&&I.length===2&&qu(I[_^1]))return I[_^1];if(g&&E&&I.length===1&&qu(E))return E;var m=t&&t===this.ownerID,R=g?E?p:p^d:p|d,S=g?E?jh(I,_,E,m):rw(I,_,m):tw(I,_,E,m);return m?(this.bitmap=R,this.nodes=S,this):new fn(t,R,S)};var wi=function(t,r,n){this.ownerID=t,this.count=r,this.nodes=n};wi.prototype.get=function(t,r,n,i){r===void 0&&(r=lt(n));var o=(t===0?r:r>>>t)&ut,a=this.nodes[o];return a?a.get(t+Te,r,n,i):i};wi.prototype.update=function(t,r,n,i,o,a,s){n===void 0&&(n=lt(i));var c=(r===0?n:n>>>r)&ut,d=o===Se,p=this.nodes,g=p[c];if(d&&!g)return this;var _=Ol(g,t,r+Te,n,i,o,a,s);if(_===g)return this;var I=this.count;if(!g)I++;else if(!_&&(I--,I<ow))return $0(t,p,I,c);var C=t&&t===this.ownerID,E=jh(p,c,_,C);return C?(this.count=I,this.nodes=E,this):new wi(t,I,E)};var gr=function(t,r,n){this.ownerID=t,this.keyHash=r,this.entries=n,this._index=void 0};gr.prototype._positionOf=function(t,r){var n=this.entries,i=this._index;if(i===void 0&&r&&n.length>=aw&&(i=this._buildIndex()),i!==void 0){var o=i[Al(t)];if(o!==void 0)for(var a=0;a<o.length;a++){var s=o[a];if(Ge(t,n[s][0]))return s}return-1}for(var c=0,d=n.length;c<d;c++)if(Ge(t,n[c][0]))return c;return-1};gr.prototype._buildIndex=function(){for(var t=Object.create(null),r=this.entries,n=0,i=r.length;n<i;n++){var o=Al(r[n][0]),a=t[o];a!==void 0?a.push(n):t[o]=[n]}return this._index=t,t};gr.prototype.get=function(t,r,n,i){var o=this._positionOf(n,!0);return o===-1?i:this.entries[o][1]};gr.prototype.update=function(t,r,n,i,o,a,s){n===void 0&&(n=lt(i));var c=o===Se;if(n!==this.keyHash)return c?this:(Tt(s),Tt(a),jl(this,t,r,n,[i,o]));var d=this.entries,p=d.length,g=t&&t===this.ownerID,_=this._positionOf(i,g),I=_===-1?p:_,C=_!==-1;if(C?d[I][1]===o:c)return this;if(Tt(s),(c||!C)&&Tt(a),c&&p===2)return new rr(t,this.keyHash,d[I^1]);var E=g?d:Wt(d);if(C)c?(I===p-1?E.pop():E[I]=E.pop(),g&&(this._index=void 0)):E[I]=[i,o];else if(E.push([i,o]),g&&this._index!==void 0){var m=Al(i),R=this._index[m];R!==void 0?R.push(p):this._index[m]=[p]}return g?(this.entries=E,this):new gr(t,this.keyHash,E)};var rr=function(t,r,n){this.ownerID=t,this.keyHash=r,this.entry=n};rr.prototype.get=function(t,r,n,i){return Ge(n,this.entry[0])?this.entry[1]:i};rr.prototype.update=function(t,r,n,i,o,a,s){var c=o===Se,d=Ge(i,this.entry[0]);if(d?o===this.entry[1]:c)return this;if(Tt(s),c){Tt(a);return}return d?t&&t===this.ownerID?(this.entry[1]=o,this):new rr(t,this.keyHash,[i,o]):(Tt(a),jl(this,t,r,lt(i),[i,o]))};mi.prototype.iterate=gr.prototype.iterate=function(e,t){for(var r=this.entries,n=0,i=r.length-1;n<=i;n++)if(e(r[t?i-n:n])===!1)return!1};fn.prototype.iterate=wi.prototype.iterate=function(e,t){for(var r=this.nodes,n=0,i=r.length-1;n<=i;n++){var o=r[t?i-n:n];if(o&&o.iterate(e,t)===!1)return!1}};rr.prototype.iterate=function(e,t){return e(this.entry)};var X0=(function(e){function t(r,n,i){this._type=n,this._reverse=i,this._stack=r._root&&Bu(r._root)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){for(var n=this._type,i=this._stack;i;){var o=i.node,a=i.index++,s=void 0;if(o.entry){if(a===0)return ba(n,o.entry)}else if(o.entries){if(s=o.entries.length-1,a<=s)return ba(n,o.entries[this._reverse?s-a:a])}else if(s=o.nodes.length-1,a<=s){var c=o.nodes[this._reverse?s-a:a];if(c){if(c.entry)return ba(n,c.entry);i=this._stack=Bu(c,i)}continue}i=this._stack=this._stack.__prev}return tt()},t})(Ee);function ba(e,t){return je(e,t[0],t[1])}function Bu(e,t){return{node:e,index:0,__prev:t}}function kl(e,t,r,n){var i=Object.create(Ne);return i.size=e,i._root=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}var Lu;function Ht(){return Lu||(Lu=kl(0))}function Uu(e,t,r){var n,i;if(e._root){var o=Bs(),a=Bs();if(n=Ol(e._root,e.__ownerID,0,void 0,t,r,o,a),!a.value)return e;i=e.size+(o.value?r===Se?-1:1:0)}else{if(r===Se)return e;i=1,n=new mi(e.__ownerID,[[t,r]])}return e.__ownerID?(e.size=i,e._root=n,e.__hash=void 0,e.__altered=!0,e):n?kl(i,n):Ht()}function Ol(e,t,r,n,i,o,a,s){return e?e.update(t,r,n,i,o,a,s):o===Se?e:(Tt(s),Tt(a),new rr(t,n,[i,o]))}function qu(e){return e.constructor===rr||e.constructor===gr}function jl(e,t,r,n,i){if(e.keyHash===n)return new gr(t,n,[e.entry,i]);var o=(r===0?e.keyHash:e.keyHash>>>r)&ut,a=(r===0?n:n>>>r)&ut,s,c=o===a?[jl(e,t,r+Te,n,i)]:(s=new rr(t,n,i),o<a?[e,s]:[s,e]);return new fn(t,1<<o|1<<a,c)}function Z0(e,t,r,n){e||(e=new pl);for(var i=new rr(e,lt(r),[r,n]),o=0;o<t.length;o++){var a=t[o];i=i.update(e,0,void 0,a[0],a[1])}return i}function $0(e,t,r,n){for(var i=0,o=0,a=new Array(r),s=0,c=1,d=t.length;s<d;s++,c<<=1){var p=t[s];p!==void 0&&s!==n&&(i|=c,a[o++]=p)}return new fn(e,i,a)}function ew(e,t,r,n,i){for(var o=0,a=new Array(It),s=0;r!==0;s++,r>>>=1)a[s]=r&1?t[o++]:void 0;return a[n]=i,new wi(e,o+1,a)}function Oh(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,e&127}function jh(e,t,r,n){var i=n?e:Wt(e);return i[t]=r,i}function tw(e,t,r,n){var i=e.length+1;if(n&&t+1===i)return e[t]=r,e;for(var o=new Array(i),a=0,s=0;s<i;s++)s===t?(o[s]=r,a=-1):o[s]=e[s+a];return o}function rw(e,t,r){var n=e.length-1;if(r&&t===n)return e.pop(),e;for(var i=new Array(n),o=0,a=0;a<n;a++)a===t&&(o=1),i[a]=e[a+o];return i}var nw=It/4,iw=It/2,ow=It/4,aw=16;function Nh(e){if(yl(e)&&typeof e!="string")return e;if(qt(e))return e.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}function Ai(e){try{return typeof e=="string"?JSON.stringify(e):String(e)}catch{return JSON.stringify(e)}}function Fh(e,t){return jt(e)?e.has(t):yr(e)&&xn.call(e,t)}function Nl(e,t,r){return jt(e)?e.get(t,r):Fh(e,t)?typeof e.get=="function"?e.get(t):e[t]:r}function Bh(e,t){if(!yr(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(jt(e)){if(!e.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+e);return e.remove(t)}if(!xn.call(e,t))return e;var r=Io(e);return Array.isArray(r)?r.splice(t,1):delete r[t],r}function Lh(e,t,r){if(Ki(t))return e;if(!yr(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(jt(e)){if(!e.set)throw new TypeError("Cannot update immutable value without .set() method: "+e);return e.set(t,r)}if(xn.call(e,t)&&r===e[t])return e;var n=Io(e);return n[t]=r,n}function Xr(e,t,r,n){n||(n=r,r=void 0);var i=Uh(jt(e),e,Nh(t),0,r,n);return i===Se?r:i}function Uh(e,t,r,n,i,o){var a=t===Se;if(n===r.length){var s=a?i:t,c=o(s);return c===s?t:c}if(!a&&!yr(t))throw new TypeError("Cannot update within non-data-structure value in path ["+Array.from(r).slice(0,n).map(Ai)+"]: "+t);var d=r[n],p=a?Se:Nl(t,d,Se),g=Uh(p===Se?e:jt(p),p,r,n+1,i,o);return g===p?t:g===Se?Bh(t,d):Lh(a?e?Ht():{}:t,d,g)}function qh(e,t){return Xr(e,t,function(){return Se})}function Fl(e){return qh(this,e)}var Kh="@@__IMMUTABLE_LIST__@@";function Bl(e){return!!(e&&e[Kh])}var Vi=(function(e){function t(r){var n=mo();if(r==null)return n;if(Bl(r))return r;var i=e(r),o=i.size;return o===0?n:(xt(o),o>0&&o<It?_i(0,o,Te,void 0,new fr(i.toArray())):n.withMutations(function(a){a.setSize(o),i.forEach(function(s,c){return a.set(c,s)})}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("List [","]")},t.prototype.get=function(n,i){if(n=hr(this,n),n>=0&&n<this.size){n+=this._origin;var o=zh(this,n);return o&&o.array[n&ut]}return i},t.prototype.set=function(n,i){return sw(this,n,i)},t.prototype.remove=function(n){return this.has(n)?n===0?this.shift():n===this.size-1?this.pop():this.splice(n,1):this},t.prototype.insert=function(n,i){return this.splice(n,0,i)},t.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=Te,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):mo()},t.prototype.push=function(){var n=arguments,i=this.size;return this.withMutations(function(o){cr(o,0,i+n.length);for(var a=0;a<n.length;a++)o.set(i+a,n[a])})},t.prototype.pop=function(){return cr(this,0,-1)},t.prototype.unshift=function(){var n=arguments;return this.withMutations(function(i){cr(i,-n.length);for(var o=0;o<n.length;o++)i.set(o,n[o])})},t.prototype.shift=function(){return cr(this,1)},t.prototype.shuffle=function(n){return n===void 0&&(n=Math.random),this.withMutations(function(i){for(var o=i.size,a,s;o;)a=Math.floor(n()*o--),s=i.get(a),i.set(a,i.get(o)),i.set(o,s)})},t.prototype.concat=function(){for(var n=arguments,i=[],o=0;o<arguments.length;o++){var a=n[o],s=e(typeof a!="string"&&hl(a)?a:[a]);s.size!==0&&i.push(s)}return i.length===0?this:this.size===0&&!this.__ownerID&&i.length===1?this.constructor(i[0]):this.withMutations(function(c){i.forEach(function(d){return d.forEach(function(p){return c.push(p)})})})},t.prototype.setSize=function(n){return cr(this,0,n)},t.prototype.map=function(n,i){var o=this;return this.withMutations(function(a){for(var s=0;s<o.size;s++)a.set(s,n.call(i,a.get(s),s,o))})},t.prototype.slice=function(n,i){var o=this.size;return Bi(n,i,o)?this:cr(this,En(n,o),Li(i,o))},t.prototype.__iterator=function(n,i){var o=i?this.size:0,a=Ku(this,i);return new Ee(function(){var s=a();return s===pi?tt():je(n,i?--o:o++,s)})},t.prototype.__iterate=function(n,i){for(var o=i?this.size:0,a=Ku(this,i),s;(s=a())!==pi&&n(s,i?--o:o++,this)!==!1;);return o},t.prototype.__ensureOwner=function(n){return n===this.__ownerID?this:n?_i(this._origin,this._capacity,this._level,this._root,this._tail,n,this.__hash):this.size===0?mo():(this.__ownerID=n,this.__altered=!1,this)},t})(Jr);Vi.isList=Bl;var We=Vi.prototype;We[Kh]=!0;We[Fi]=We.remove;We.merge=We.concat;We.setIn=Ml;We.deleteIn=We.removeIn=Fl;We.update=Dl;We.updateIn=Pl;We.mergeIn=Cl;We.mergeDeepIn=Rl;We.withMutations=Hi;We.wasAltered=Tl;We.asImmutable=Ui;We["@@transducer/init"]=We.asMutable=qi;We["@@transducer/step"]=function(e,t){return e.push(t)};We["@@transducer/result"]=function(e){return e.asImmutable()};var fr=function(t,r){this.array=t,this.ownerID=r};fr.prototype.removeBefore=function(t,r,n){if((n&(1<<r+Te)-1)===0||this.array.length===0)return this;var i=n>>>r&ut;if(i>=this.array.length)return new fr([],t);var o=i===0,a;if(r>0){var s=this.array[i];if(a=s&&s.removeBefore(t,r-Te,n),a===s&&o)return this}if(o&&!a)return this;var c=hn(this,t);if(!o)for(var d=0;d<i;d++)c.array[d]=void 0;return a&&(c.array[i]=a),c};fr.prototype.removeAfter=function(t,r,n){if(n===(r?1<<r+Te:It)||this.array.length===0)return this;var i=n-1>>>r&ut;if(i>=this.array.length)return this;var o;if(r>0){var a=this.array[i];if(o=a&&a.removeAfter(t,r-Te,n),o===a&&i===this.array.length-1)return this}var s=hn(this,t);return s.array.splice(i+1),o&&(s.array[i]=o),s};var pi={};function Ku(e,t){var r=e._origin,n=e._capacity,i=vi(n),o=e._tail;return a(e._root,e._level,0);function a(d,p,g){return p===0?s(d,g):c(d,p,g)}function s(d,p){var g=p===i?o&&o.array:d&&d.array,_=p>r?0:r-p,I=n-p;return I>It&&(I=It),function(){if(_===I)return pi;var C=t?--I:_++;return g&&g[C]}}function c(d,p,g){var _,I=d&&d.array,C=g>r?0:r-g>>p,E=(n-g>>p)+1;return E>It&&(E=It),function(){for(;;){if(_){var m=_();if(m!==pi)return m;_=null}if(C===E)return pi;var R=t?--E:C++;_=a(I&&I[R],p-Te,g+(R<<p))}}}}function _i(e,t,r,n,i,o,a){var s=Object.create(We);return s.size=t-e,s._origin=e,s._capacity=t,s._level=r,s._root=n,s._tail=i,s.__ownerID=o,s.__hash=a,s.__altered=!1,s}function mo(){return _i(0,0,Te)}function sw(e,t,r){if(t=hr(e,t),t!==t)return e;if(t>=e.size||t<0)return e.withMutations(function(a){t<0?cr(a,t).set(0,r):cr(a,0,t+1).set(t,r)});t+=e._origin;var n=e._tail,i=e._root,o=Bs();return t>=vi(e._capacity)?n=zs(n,e.__ownerID,0,t,r,o):i=zs(i,e.__ownerID,e._level,t,r,o),o.value?e.__ownerID?(e._root=i,e._tail=n,e.__hash=void 0,e.__altered=!0,e):_i(e._origin,e._capacity,e._level,i,n):e}function zs(e,t,r,n,i,o){var a=n>>>r&ut,s=e&&a<e.array.length;if(!s&&i===void 0)return e;var c;if(r>0){var d=e&&e.array[a],p=zs(d,t,r-Te,n,i,o);return p===d?e:(c=hn(e,t),c.array[a]=p,c)}return s&&e.array[a]===i?e:(o&&Tt(o),c=hn(e,t),i===void 0&&a===c.array.length-1?c.array.pop():c.array[a]=i,c)}function hn(e,t){return t&&e&&t===e.ownerID?e:new fr(e?e.array.slice():[],t)}function zh(e,t){if(t>=vi(e._capacity))return e._tail;if(t<1<<e._level+Te){for(var r=e._root,n=e._level;r&&n>0;)r=r.array[t>>>n&ut],n-=Te;return r}}function lw(e,t,r){var n=e._origin+(t===void 0?0:t),i=r===void 0?e._capacity:r<0?e._capacity+r:e._origin+r;if(Number.isFinite(i)&&i>to||Number.isFinite(n)&&n<-to||Number.isFinite(i)&&Number.isFinite(n)&&i-n>to)throw new RangeError("Invalid List size: a List cannot hold more than "+to+" (2 ** 30) values.")}function cr(e,t,r){lw(e,t,r),t!==void 0&&(t|=0),r!==void 0&&(r|=0);var n=e.__ownerID||new pl,i=e._origin,o=e._capacity,a=i+t,s=r===void 0?o:r<0?o+r:i+r;if(a===i&&s===o)return e;if(a>=s)return e.clear();for(var c=e._level,d=e._root,p=0;a+p<0;)d=new fr(d&&d.array.length?[void 0,d]:[],n),c+=Te,p+=zu(c);p&&(a+=p,i+=p,s+=p,o+=p);for(var g=vi(o),_=vi(s);_>=zu(c+Te);)d=new fr(d&&d.array.length?[d]:[],n),c+=Te;var I=e._tail,C=_<g?zh(e,s-1):_>g?new fr([],n):I;if(I&&_>g&&a<o&&I.array.length){d=hn(d,n);for(var E=d,m=c;m>Te;m-=Te){var R=g>>>m&ut;E=E.array[R]=hn(E.array[R],n)}E.array[g>>>Te&ut]=I}if(s<o&&(C=C&&C.removeAfter(n,0,s)),a>=_)a-=_,s-=_,c=Te,d=void 0,C=C&&C.removeBefore(n,0,a);else if(a>i||_<g){for(p=0;d;){var S=a>>>c&ut;if(S!==_>>>c&ut)break;S&&(p+=(1<<c)*S),c-=Te,d=d.array[S]}d&&a>i&&(d=d.removeBefore(n,c,a-p)),d&&_<g&&(d=d.removeAfter(n,c,_-p)),p&&(a-=p,s-=p)}return e.__ownerID?(e.size=s-a,e._origin=a,e._capacity=s,e._level=c,e._root=d,e._tail=C,e.__hash=void 0,e.__altered=!0,e):_i(a,s,c,d,C)}function vi(e){return e<It?0:e-1>>>Te<<Te}var to=Math.pow(2,30);function zu(e){return e<31?1<<e:Math.pow(2,e)}function Ll(e){return Xo(e)&&qt(e)}var Gt=(function(e){function t(r){return r==null?oi():Ll(r)?r:oi().withMutations(function(n){var i=Ot(r);xt(i.size),i.forEach(function(o,a){return n.set(a,o)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(n,i){var o=this._map.get(n);return o!==void 0?this._list.get(o)[1]:i},t.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):oi()},t.prototype.set=function(n,i){return Hu(this,n,i)},t.prototype.remove=function(n){return Hu(this,n,Se)},t.prototype.__iterate=function(n,i){var o=this;return this._list.__iterate(function(a){return a&&n(a[1],a[0],o)},i)},t.prototype.__iterator=function(n,i){return this._list.fromEntrySeq().__iterator(n,i)},t.prototype.__ensureOwner=function(n){if(n===this.__ownerID)return this;var i=this._map.__ensureOwner(n),o=this._list.__ensureOwner(n);return n?Ul(i,o,n,this.__hash):this.size===0?oi():(this.__ownerID=n,this.__altered=!1,this._map=i,this._list=o,this)},t})(Yr);Gt.isOrderedMap=Ll;Gt.prototype[pr]=!0;Gt.prototype[Fi]=Gt.prototype.remove;function Ul(e,t,r,n){var i=Object.create(Gt.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}var Wu;function oi(){return Wu||(Wu=Ul(Ht(),mo()))}function Hu(e,t,r){var n=e._map,i=e._list,o=n.get(t),a=o!==void 0,s,c;if(r===Se){if(!a)return e;i.size>=It&&i.size>=n.size*2?(c=i.filter(function(d,p){return d!==void 0&&o!==p}),s=c.toKeyedSeq().map(function(d){return d[0]}).flip().toMap(),e.__ownerID&&(s.__ownerID=c.__ownerID=e.__ownerID)):(s=n.remove(t),c=o===i.size-1?i.pop():i.set(o,void 0))}else if(a){if(r===i.get(o)[1])return e;s=n,c=i.set(o,[t,r])}else s=n.set(t,i.size),c=i.set(i.size,[t,r]);return e.__ownerID?(e.size=s.size,e._map=s,e._list=c,e.__hash=void 0,e.__altered=!0,e):Ul(s,c)}var Wh="@@__IMMUTABLE_STACK__@@";function Ro(e){return!!(e&&e[Wh])}var Zo=(function(e){function t(r){return r==null?ro():Ro(r)?r:ro().pushAll(r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(n,i){var o=this._head;for(n=hr(this,n);o&&n--;)o=o.next;return o?o.value:i},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var n=arguments;if(arguments.length===0)return this;for(var i=this.size+arguments.length,o=this._head,a=arguments.length-1;a>=0;a--)o={value:n[a],next:o};return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):ai(i,o)},t.prototype.pushAll=function(n){if(n=e(n),n.size===0)return this;if(this.size===0&&Ro(n))return n;xt(n.size);var i=this.size,o=this._head;return n.__iterate(function(a){i++,o={value:a,next:o}},!0),this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):ai(i,o)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):ro()},t.prototype.slice=function(n,i){if(Bi(n,i,this.size))return this;var o=En(n,this.size),a=Li(i,this.size);if(a!==this.size)return e.prototype.slice.call(this,n,i);for(var s=this.size-o,c=this._head;o--;)c=c.next;return this.__ownerID?(this.size=s,this._head=c,this.__hash=void 0,this.__altered=!0,this):ai(s,c)},t.prototype.__ensureOwner=function(n){return n===this.__ownerID?this:n?ai(this.size,this._head,n,this.__hash):this.size===0?ro():(this.__ownerID=n,this.__altered=!1,this)},t.prototype.__iterate=function(n,i){var o=this;if(i)return new cn(this.toArray()).__iterate(function(c,d){return n(c,d,o)},i);for(var a=0,s=this._head;s&&n(s.value,a++,this)!==!1;)s=s.next;return a},t.prototype.__iterator=function(n,i){if(i)return new cn(this.toArray()).__iterator(n,i);var o=0,a=this._head;return new Ee(function(){if(a){var s=a.value;return a=a.next,je(n,o++,s)}return tt()})},t})(Jr);Zo.isStack=Ro;var dt=Zo.prototype;dt[Wh]=!0;dt.shift=dt.pop;dt.unshift=dt.push;dt.unshiftAll=dt.pushAll;dt.withMutations=Hi;dt.wasAltered=Tl;dt.asImmutable=Ui;dt["@@transducer/init"]=dt.asMutable=qi;dt["@@transducer/step"]=function(e,t){return e.unshift(t)};dt["@@transducer/result"]=function(e){return e.asImmutable()};function ai(e,t,r,n){var i=Object.create(dt);return i.size=e,i._head=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}var Vu;function ro(){return Vu||(Vu=ai(0))}function Qu(e,t,r,n,i,o){return xt(e.size),e.__iterate(function(a,s,c){i?(i=!1,r=a):r=t.call(n,r,a,s,c)},o),r}function uw(e,t){return t}function cw(e,t){return[t,e]}function ma(e){return function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return!e.apply(this,t)}}function Gu(e){return function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return-e.apply(this,t)}}function Ju(e,t){return e<t?1:e>t?-1:0}function ql(e,t){if(e===t)return!0;if(!_t(t)||e.size!==void 0&&t.size!==void 0&&e.size!==t.size||e.__hash!==void 0&&t.__hash!==void 0&&e.__hash!==t.__hash||ke(e)!==ke(t)||At(e)!==At(t)||qt(e)!==qt(t))return!1;if(e.size===0&&t.size===0)return!0;var r=!Ho(e);if(qt(e)){var n=e.entries();return t.every(function(c,d){var p=n.next().value;return p&&Ge(p[1],c)&&(r||Ge(p[0],d))})&&n.next().done}var i=!1;if(e.size===void 0)if(t.size===void 0)typeof e.cacheResult=="function"&&e.cacheResult();else{i=!0;var o=e;e=t,t=o}var a=!0,s=t.__iterate(function(c,d){if(r?!e.has(c):i?!Ge(c,e.get(d,Se)):!Ge(e.get(d,Se),c))return a=!1,!1});return a&&e.size===s}var Hh=(function(e){function t(r,n,i){if(i===void 0&&(i=1),!(this instanceof t))return new t(r,n,i);if(hi(i!==0,"Cannot step a Range by 0"),hi(r!==void 0,"You must define a start value when using Range"),hi(n!==void 0,"You must define an end value when using Range"),i=Math.abs(i),n<r&&(i=-i),this._start=r,this._end=n,this._step=i,this.size=Math.max(0,Math.ceil((n-r)/i-1)+1),this.size===0){if(wa)return wa;wa=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.size===0?"Range []":"Range [ "+this._start+"..."+this._end+(this._step!==1?" by "+this._step:"")+" ]"},t.prototype.get=function(n,i){return this.has(n)?this._start+hr(this,n)*this._step:i},t.prototype.includes=function(n){var i=(n-this._start)/this._step;return i>=0&&i<this.size&&i===Math.floor(i)},t.prototype.slice=function(n,i){return Bi(n,i,this.size)?this:(n=En(n,this.size),i=Li(i,this.size),i<=n?new t(0,0):new t(this.get(n,this._end),this.get(i,this._end),this._step))},t.prototype.indexOf=function(n){var i=n-this._start;if(i%this._step===0){var o=i/this._step;if(o>=0&&o<this.size)return o}return-1},t.prototype.lastIndexOf=function(n){return this.indexOf(n)},t.prototype.__iterate=function(n,i){for(var o=this.size,a=this._step,s=i?this._start+(o-1)*a:this._start,c=0;c!==o&&n(s,i?o-++c:c++,this)!==!1;)s+=i?-a:a;return c},t.prototype.__iterator=function(n,i){var o=this.size,a=this._step,s=i?this._start+(o-1)*a:this._start,c=0;return new Ee(function(){if(c===o)return tt();var d=s;return s+=i?-a:a,je(n,i?o-++c:c++,d)})},t.prototype.equals=function(n){return n instanceof t?this._start===n._start&&this._end===n._end&&this._step===n._step:ql(this,n)},t})(Nt),wa,Vh="@@__IMMUTABLE_SET__@@";function $o(e){return!!(e&&e[Vh])}var Qi=(function(e){function t(r){return r==null?si():$o(r)&&!qt(r)?r:si().withMutations(function(n){var i=e(r);xt(i.size),i.forEach(function(o){return n.add(o)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(n){return this(Ot(n).keySeq())},t.intersect=function(n){return n=Je(n).toArray(),n.length?Ze.intersect.apply(t(n.pop()),n):si()},t.union=function(n){return n=Je(n).toArray(),n.length?Ze.union.apply(t(n.pop()),n):si()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(n){return this._map.has(n)},t.prototype.add=function(n){return no(this,this._map.set(n,n))},t.prototype.remove=function(n){return no(this,this._map.remove(n))},t.prototype.clear=function(){return no(this,this._map.clear())},t.prototype.map=function(n,i){var o=this,a=!1,s=no(this,this._map.mapEntries(function(c){var d=c[1],p=n.call(i,d,d,o);return p!==d&&(a=!0),[p,p]},i));return a?s:this},t.prototype.union=function(){for(var n=[],i=arguments.length;i--;)n[i]=arguments[i];return n=n.filter(function(o){return o.size!==0}),n.length===0?this:this.size===0&&!this.__ownerID&&n.length===1?this.constructor(n[0]):this.withMutations(function(o){for(var a=0;a<n.length;a++)typeof n[a]=="string"?o.add(n[a]):e(n[a]).forEach(function(s){return o.add(s)})})},t.prototype.intersect=function(){for(var n=[],i=arguments.length;i--;)n[i]=arguments[i];if(n.length===0)return this;n=n.map(function(a){return e(a)});var o=[];return this.forEach(function(a){n.every(function(s){return s.includes(a)})||o.push(a)}),this.withMutations(function(a){o.forEach(function(s){a.remove(s)})})},t.prototype.subtract=function(){for(var n=[],i=arguments.length;i--;)n[i]=arguments[i];if(n.length===0)return this;n=n.map(function(a){return e(a)});var o=[];return this.forEach(function(a){n.some(function(s){return s.includes(a)})&&o.push(a)}),this.withMutations(function(a){o.forEach(function(s){a.remove(s)})})},t.prototype.sort=function(n){return yn(dn(this,n))},t.prototype.sortBy=function(n,i){return yn(dn(this,i,n))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(n,i){var o=this;return this._map.__iterate(function(a){return n(a,a,o)},i)},t.prototype.__iterator=function(n,i){return this._map.__iterator(n,i)},t.prototype.__ensureOwner=function(n){if(n===this.__ownerID)return this;var i=this._map.__ensureOwner(n);return n?this.__make(i,n):this.size===0?this.__empty():(this.__ownerID=n,this._map=i,this)},t})(vn);Qi.isSet=$o;var Ze=Qi.prototype;Ze[Vh]=!0;Ze[Fi]=Ze.remove;Ze.merge=Ze.concat=Ze.union;Ze.withMutations=Hi;Ze.asImmutable=Ui;Ze["@@transducer/init"]=Ze.asMutable=qi;Ze["@@transducer/step"]=function(e,t){return e.add(t)};Ze["@@transducer/result"]=function(e){return e.asImmutable()};Ze.__empty=si;Ze.__make=Qh;function no(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:t.size===0?e.__empty():e.__make(t)}function Qh(e,t){var r=Object.create(Ze);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r}var Yu;function si(){return Yu||(Yu=Qh(Ht()))}function Kl(e,t,r){for(var n=Nh(t),i=0;i!==n.length;)if(e=Nl(e,n[i++],Se),e===Se)return r;return e}function Gh(e,t){return Kl(this,e,t)}function Jh(e,t){return Kl(e,t,Se)!==Se}function dw(e){return Jh(this,e)}function Yh(){xt(this.size);var e={};return this.__iterate(function(t,r){Ki(r)||(e[r]=t)}),e}function Co(e){if(!e||typeof e!="object")return e;if(!_t(e)){if(!yr(e))return e;e=rt(e)}if(ke(e)){var t={};return e.__iterate(function(n,i){Ki(i)||(t[i]=Co(n))}),t}var r=[];return e.__iterate(function(n){r.push(Co(n))}),r}function fw(e){if(e.size===1/0)return 0;var t=qt(e),r=ke(e),n=t?1:0;return e.__iterate(r?t?function(i,o){n=31*n+Xu(lt(i),lt(o))|0}:function(i,o){n=n+Xu(lt(i),lt(o))|0}:t?function(i){n=31*n+lt(i)|0}:function(i){n=n+lt(i)|0}),hw(e.size,n)}function hw(e,t){return t=Kn(t,3432918353),t=Kn(t<<15|t>>>-15,461845907),t=Kn(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=Kn(t^t>>>16,2246822507),t=Kn(t^t>>>13,3266489909),t=Jo(t^t>>>16),t}function Xu(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}function Zr(e,t){var r=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(r),e}Je.Iterator=Ee;Zr(Je,{toArray:function(){xt(this.size);var t=new Array(this.size||0),r=ke(this),n=0;return this.__iterate(function(i,o){t[n++]=r?[o,i]:i}),t},toIndexedSeq:function(){return new mh(this)},toJS:function(){return Co(this)},toKeyedSeq:function(){return new Yo(this,!0)},toMap:function(){return Yr(this.toKeyedSeq())},toObject:Yh,toOrderedMap:function(){return Gt(this.toKeyedSeq())},toOrderedSet:function(){return yn(ke(this)?this.valueSeq():this)},toSet:function(){return Qi(ke(this)?this.valueSeq():this)},toSetSeq:function(){return new wh(this)},toSeq:function(){return At(this)?this.toIndexedSeq():ke(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Zo(ke(this)?this.valueSeq():this)},toList:function(){return Vi(ke(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(t,r){return this.size===0?t+r:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+r},concat:function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return Pe(this,q0(this,t))},includes:function(t){return this.some(function(r){return Ge(r,t)})},entries:function(){return this.__iterator(Ct)},every:function(t,r){xt(this.size);var n=!0;return this.__iterate(function(i,o,a){if(!t.call(r,i,o,a))return n=!1,!1}),n},filter:function(t,r){return Pe(this,Sh(this,t,r,!0))},partition:function(t,r){return B0(this,t,r)},find:function(t,r,n){var i=this.findEntry(t,r);return i?i[1]:n},forEach:function(t,r){return xt(this.size),this.__iterate(r?t.bind(r):t)},join:function(t){xt(this.size),t=t!==void 0?""+t:",";var r="",n=!0;return this.__iterate(function(i){n?n=!1:r+=t,r+=i!=null?i.toString():""}),r},keys:function(){return this.__iterator(Sn)},map:function(t,r){return Pe(this,vh(this,t,r))},reduce:function(t,r,n){return Qu(this,t,r,n,arguments.length<2,!1)},reduceRight:function(t,r,n){return Qu(this,t,r,n,arguments.length<2,!0)},reverse:function(){return Pe(this,_l(this,!0))},slice:function(t,r){return Pe(this,vl(this,t,r,!0))},some:function(t,r){xt(this.size);var n=!1;return this.__iterate(function(i,o,a){if(t.call(r,i,o,a))return n=!0,!1}),n},sort:function(t){return Pe(this,dn(this,t))},values:function(){return this.__iterator(Rt)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return this.size!==void 0?this.size===0:!this.some(function(){return!0})},count:function(t,r){return un(t?this.toSeq().filter(t,r):this)},countBy:function(t,r){return N0(this,t,r)},equals:function(t){return ql(this,t)},entrySeq:function(){var t=this;if(t._cache)return new cn(t._cache);var r=t.toSeq().map(cw).toIndexedSeq();return r.fromEntrySeq=function(){return t.toSeq()},r},filterNot:function(t,r){return this.filter(ma(t),r)},findEntry:function(t,r,n){var i=n;return this.__iterate(function(o,a,s){if(t.call(r,o,a,s))return i=[a,o],!1}),i},findKey:function(t,r){var n=this.findEntry(t,r);return n&&n[0]},findLast:function(t,r,n){return this.toKeyedSeq().reverse().find(t,r,n)},findLastEntry:function(t,r,n){return this.toKeyedSeq().reverse().findEntry(t,r,n)},findLastKey:function(t,r){return this.toKeyedSeq().reverse().findKey(t,r)},first:function(t){return this.find(dh,null,t)},flatMap:function(t,r){return Pe(this,K0(this,t,r))},flatten:function(t){return Pe(this,xh(this,t,!0))},fromEntrySeq:function(){return new Ah(this)},get:function(t,r){return this.find(function(n,i){return Ge(i,t)},void 0,r)},getIn:Gh,groupBy:function(t,r){return F0(this,t,r)},has:function(t){return this.get(t,Se)!==Se},hasIn:dw,isSubset:function(t){return t=typeof t.includes=="function"?t:Je(t),this.every(function(r){return t.includes(r)})},isSuperset:function(t){return t=typeof t.isSubset=="function"?t:Je(t),t.isSubset(this)},keyOf:function(t){return this.findKey(function(r){return Ge(r,t)})},keySeq:function(){return this.toSeq().map(uw).toIndexedSeq()},last:function(t){return this.toSeq().reverse().first(t)},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return $i(this,t)},maxBy:function(t,r){return $i(this,r,t)},min:function(t){return $i(this,t?Gu(t):Ju)},minBy:function(t,r){return $i(this,r?Gu(r):Ju,t)},rest:function(){return this.slice(1)},skip:function(t){return t===0?this:this.slice(Math.max(0,t))},skipLast:function(t){return t===0?this:this.slice(0,-Math.max(0,t))},skipWhile:function(t,r){return Pe(this,Eh(this,t,r,!0))},skipUntil:function(t,r){return this.skipWhile(ma(t),r)},sortBy:function(t,r){return Pe(this,dn(this,r,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return this.slice(-Math.max(0,t))},takeWhile:function(t,r){return Pe(this,L0(this,t,r))},takeUntil:function(t,r){return this.takeWhile(ma(t),r)},update:function(t){return t(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=fw(this))}});var nt=Je.prototype;nt[uh]=!0;nt[Vo]=nt.values;nt.toJSON=nt.toArray;nt.__toStringMapper=Ai;nt.inspect=nt.toSource=function(){return this.toString()};nt.chain=nt.flatMap;nt.contains=nt.includes;Zr(Ot,{flip:function(){return Pe(this,_h(this))},mapEntries:function(t,r){var n=this,i=0;return Pe(this,this.toSeq().map(function(o,a){return t.call(r,[a,o],i++,n)}).fromEntrySeq())},mapKeys:function(t,r){var n=this;return Pe(this,this.toSeq().flip().map(function(i,o){return t.call(r,i,o,n)}).flip())}});var Gi=Ot.prototype;Gi[xo]=!0;Gi[Vo]=nt.entries;Gi.toJSON=Yh;Gi.__toStringMapper=function(e,t){return Ai(t)+": "+Ai(e)};Zr(Jr,{toKeyedSeq:function(){return new Yo(this,!1)},filter:function(t,r){return Pe(this,Sh(this,t,r,!1))},findIndex:function(t,r){var n=this.findEntry(t,r);return n?n[0]:-1},indexOf:function(t){var r=this.keyOf(t);return r===void 0?-1:r},lastIndexOf:function(t){var r=this.lastKeyOf(t);return r===void 0?-1:r},reverse:function(){return Pe(this,_l(this,!1))},slice:function(t,r){return Pe(this,vl(this,t,r,!1))},splice:function(t,r){var n=arguments.length;if(r=Math.max(r||0,0),n===0||n===2&&!r)return this;t=En(t,t<0?this.count():this.size);var i=this.slice(0,t);return Pe(this,n===1?i:i.concat(Wt(arguments,2),this.slice(t+r)))},findLastIndex:function(t,r){var n=this.findLastEntry(t,r);return n?n[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return Pe(this,xh(this,t,!1))},get:function(t,r){return t=hr(this,t),t<0||this.size===1/0||this.size!==void 0&&t>this.size?r:this.find(function(n,i){return i===t},void 0,r)},has:function(t){return t=hr(this,t),t>=0&&(this.size!==void 0?this.size===1/0||t<this.size:this.find(function(r,n){return n===t},void 0,Se)!==Se)},interpose:function(t){return Pe(this,z0(this,t))},interleave:function(){var t=[this].concat(Wt(arguments)),r=eo(this.toSeq(),Nt.of,t),n=r.flatten(!0);return r.size&&(n.size=r.size*t.length),Pe(this,n)},keySeq:function(){return Hh(0,this.size)},last:function(t){return this.get(-1,t)},skipWhile:function(t,r){return Pe(this,Eh(this,t,r,!1))},zip:function(){var t=[this].concat(Wt(arguments));return Pe(this,eo(this,Zu,t))},zipAll:function(){var t=[this].concat(Wt(arguments));return Pe(this,eo(this,Zu,t,!0))},zipWith:function(t){var r=Wt(arguments);return r[0]=this,Pe(this,eo(this,t,r))}});var Rn=Jr.prototype;Rn[Eo]=!0;Rn[pr]=!0;Zr(vn,{get:function(t,r){return this.has(t)?t:r},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}});var pn=vn.prototype;pn.has=nt.includes;pn.contains=pn.includes;pn.keys=pn.values;Zr(Ar,Gi);Zr(Nt,Rn);Zr(In,pn);function Zu(){return Wt(arguments)}function zl(e){return $o(e)&&qt(e)}var yn=(function(e){function t(r){return r==null?Ws():zl(r)?r:Ws().withMutations(function(n){var i=vn(r);xt(i.size),i.forEach(function(o){return n.add(o)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(n){return this(Ot(n).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t})(Qi);yn.isOrderedSet=zl;var $r=yn.prototype;$r[pr]=!0;$r.zip=Rn.zip;$r.zipWith=Rn.zipWith;$r.zipAll=Rn.zipAll;$r.__empty=Ws;$r.__make=Xh;function Xh(e,t){var r=Object.create($r);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r}var $u;function Ws(){return $u||($u=Xh(oi()))}var pw={LeftThenRight:-1,RightThenLeft:1};function yw(e){if(wr(e))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(jt(e))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(e===null||typeof e!="object")throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}var Ve=function(t,r){var n;yw(t);var i=function(s){var c=this;if(s instanceof i)return s;if(!(this instanceof i))return new i(s);if(!n){n=!0;var d=Object.keys(t),p=o._indices={};o._name=r,o._keys=d,o._defaultValues=t;for(var g=0;g<d.length;g++){var _=d[g];p[_]=g,o[_]?typeof console=="object"&&console.warn&&console.warn("Cannot define "+Hl(this)+' with property "'+_+'" since that property name is part of the Record API.'):gw(o,_)}}return this.__ownerID=void 0,this._values=Vi().withMutations(function(I){I.setSize(c._keys.length),Ot(s).forEach(function(C,E){I.set(c._indices[E],C===c._defaultValues[E]?void 0:C)})}),this},o=i.prototype=Object.create(Oe);return o.constructor=i,r&&(i.displayName=r),i};Ve.prototype.toString=function(){for(var t=Hl(this)+" { ",r=this._keys,n,i=0,o=r.length;i!==o;i++)n=r[i],t+=(i?", ":"")+n+": "+Ai(this.get(n));return t+" }"};Ve.prototype.equals=function(t){return this===t||wr(t)&&gn(this).equals(gn(t))};Ve.prototype.hashCode=function(){return gn(this).hashCode()};Ve.prototype.has=function(t){return this._indices.hasOwnProperty(t)};Ve.prototype.get=function(t,r){if(!this.has(t))return r;var n=this._indices[t],i=this._values.get(n);return i===void 0?this._defaultValues[t]:i};Ve.prototype.set=function(t,r){if(this.has(t)){var n=this._values.set(this._indices[t],r===this._defaultValues[t]?void 0:r);if(n!==this._values&&!this.__ownerID)return Wl(this,n)}return this};Ve.prototype.remove=function(t){return this.set(t)};Ve.prototype.clear=function(){var t=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:Wl(this,t)};Ve.prototype.wasAltered=function(){return this._values.wasAltered()};Ve.prototype.toSeq=function(){return gn(this)};Ve.prototype.toJS=function(){return Co(this)};Ve.prototype.entries=function(){return this.__iterator(Ct)};Ve.prototype.__iterator=function(t,r){return gn(this).__iterator(t,r)};Ve.prototype.__iterate=function(t,r){return gn(this).__iterate(t,r)};Ve.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var r=this._values.__ensureOwner(t);return t?Wl(this,r,t):(this.__ownerID=t,this._values=r,this)};Ve.isRecord=wr;Ve.getDescriptiveName=Hl;var Oe=Ve.prototype;Oe[ph]=!0;Oe[Fi]=Oe.remove;Oe.deleteIn=Oe.removeIn=Fl;Oe.getIn=Gh;Oe.hasIn=nt.hasIn;Oe.merge=Rh;Oe.mergeWith=Ch;Oe.mergeIn=Cl;Oe.mergeDeep=Dh;Oe.mergeDeepWith=Ph;Oe.mergeDeepIn=Rl;Oe.setIn=Ml;Oe.update=Dl;Oe.updateIn=Pl;Oe.withMutations=Hi;Oe.asMutable=qi;Oe.asImmutable=Ui;Oe[Vo]=Oe.entries;Oe.toJSON=Oe.toObject=nt.toObject;Oe.inspect=Oe.toSource=function(){return this.toString()};function Wl(e,t,r){var n=Object.create(Object.getPrototypeOf(e));return n._values=t,n.__ownerID=r,n}function Hl(e){return e.constructor.displayName||e.constructor.name||"Record"}function gn(e){return ml(e._keys.map(function(t){return[t,e.get(t)]}))}function gw(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(r){hi(this.__ownerID,"Cannot set on an immutable record."),this.set(t,r)}})}catch{}}var bw=(function(e){function t(r,n){if(!(this instanceof t))return new t(r,n);if(this._value=r,this.size=n===void 0?1/0:Math.max(0,n),this.size===0){if(Aa)return Aa;Aa=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.size===0?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},t.prototype.get=function(n,i){return this.has(n)?this._value:i},t.prototype.includes=function(n){return Ge(this._value,n)},t.prototype.slice=function(n,i){var o=this.size;return Bi(n,i,o)?this:new t(this._value,Li(i,o)-En(n,o))},t.prototype.reverse=function(){return this},t.prototype.indexOf=function(n){return this.size!==0&&Ge(this._value,n)?0:-1},t.prototype.lastIndexOf=function(n){return this.size!==0&&Ge(this._value,n)?this.size-1:-1},t.prototype.__iterate=function(n,i){for(var o=this.size,a=0;a!==o&&n(this._value,i?o-++a:a++,this)!==!1;);return a},t.prototype.__iterator=function(n,i){var o=this,a=this.size,s=0;return new Ee(function(){return s===a?tt():je(n,i?a-++s:s++,o._value)})},t.prototype.equals=function(n){return n instanceof t?Ge(this._value,n._value):ql(this,n)},t})(Nt),Aa;function mw(e,t){return Zh([],t||ww,e,"",t&&t.length>2?[]:void 0,{"":e})}function Zh(e,t,r,n,i,o){if(typeof r!="string"&&!jt(r)&&(yl(r)||hl(r)||Il(r))){if(~e.indexOf(r))throw new TypeError("Cannot convert circular structure to Immutable");e.push(r),i&&n!==""&&i.push(n);var a=t.call(o,n,rt(r).map(function(s,c){return Zh(e,t,s,c,i,r)}),i&&i.slice());return e.pop(),i&&i.pop(),a}return r}function ww(e,t){return At(t)?t.toList():ke(t)?t.toMap():t.toSet()}var Aw="5.1.9",_w=Je;const vw=Object.freeze(Object.defineProperty({__proto__:null,Collection:Je,Iterable:_w,List:Vi,Map:Yr,OrderedMap:Gt,OrderedSet:yn,PairSorting:pw,Range:Hh,Record:Ve,Repeat:bw,Seq:rt,Set:Qi,Stack:Zo,fromJS:mw,get:Nl,getIn:Kl,has:Fh,hasIn:Jh,hash:lt,is:Ge,isAssociative:Ho,isCollection:_t,isImmutable:jt,isIndexed:At,isKeyed:ke,isList:Bl,isMap:Xo,isOrdered:qt,isOrderedMap:Ll,isOrderedSet:zl,isPlainObject:Il,isRecord:wr,isSeq:Go,isSet:$o,isStack:Ro,isValueObject:Ks,merge:H0,mergeDeep:Q0,mergeDeepWith:G0,mergeWith:V0,remove:Bh,removeIn:qh,set:Lh,setIn:Th,update:xl,updateIn:Xr,version:Aw},Symbol.toStringTag,{value:"Module"})),Sw=qd(vw);var ec;function $h(){if(ec)return kr;ec=1,Object.defineProperty(kr,"__esModule",{value:!0}),kr.ActionContextKey=kr.ActionContext=void 0;const e=Sw;let t=class li{constructor(i={}){this.map=(0,e.Map)(i)}setDefault(i,o){return this.has(i)?this:this.set(i,o)}set(i,o){return this.setRaw(i.name,o)}setRaw(i,o){return new li(this.map.set(i,o))}delete(i){return new li(this.map.delete(i.name))}get(i){return this.getRaw(i.name)}getRaw(i){return this.map.get(i)}getSafe(i){if(!this.has(i))throw new Error(`Context entry ${i.name} is required but not available`);return this.get(i)}has(i){return this.hasRaw(i.name)}hasRaw(i){return this.map.has(i)}merge(...i){let o=this;for(const a of i)for(const s of a.keys())o=o.set(s,a.get(s));return o}keys(){return[...this.map.keys()].map(i=>new r(i))}toJS(){return this.map.toJS()}toString(){return`ActionContext(${JSON.stringify(this.map.toJS())})`}[Symbol.for("nodejs.util.inspect.custom")](){return`ActionContext(${JSON.stringify(this.map.toJS(),null," ")})`}static ensureActionContext(i){return i instanceof li?i:new li((0,e.Map)(i??{}))}};kr.ActionContext=t;class r{constructor(i){this.name=i}}return kr.ActionContextKey=r,kr}var zn={},tc;function ep(){if(tc)return zn;tc=1,Object.defineProperty(zn,"__esModule",{value:!0}),zn.Bus=void 0;let e=class{constructor(r){this.actors=[],this.observers=[],this.dependencyLinks=new Map,Object.assign(this,r),this.failMessage=`All actors over bus ${this.name} failed to handle an action`}subscribe(r){this.actors.push(r),this.reorderForDependencies()}subscribeObserver(r){this.observers.push(r)}unsubscribe(r){const n=this.actors.indexOf(r);return n>=0?(this.actors.splice(n,1),!0):!1}unsubscribeObserver(r){const n=this.observers.indexOf(r);return n>=0?(this.observers.splice(n,1),!0):!1}publish(r){return this.actors.map(n=>({actor:n,reply:n.test(r)}))}onRun(r,n,i){for(const o of this.observers)o.onRun(r,n,i)}addDependencies(r,n){for(const i of n){let o=this.dependencyLinks.get(i);o||(o=[],this.dependencyLinks.set(i,o)),o.push(r)}this.reorderForDependencies()}reorderForDependencies(){if(this.dependencyLinks.size>0){const r=[];for(const n of this.dependencyLinks.keys()){const i=this.actors.indexOf(n);i>=0&&(this.actors.splice(i,1),r.push(n))}for(;r.length>0;){let n=-1;for(let o=0;o<r.length;o++){let a=!0;for(const s of this.dependencyLinks.get(r[o]))if(!this.actors.includes(s)&&r.includes(s)){a=!1;break}if(a){n=o;break}}if(n<0)throw new Error(`Cyclic dependency links detected in bus ${this.name}`);const i=r.splice(n,1)[0];this.actors.push(i)}}}};return zn.Bus=e,zn}var Wn={},rc;function Ew(){if(rc)return Wn;rc=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.BusIndexed=void 0;const e=ep();let t=class extends e.Bus{constructor(n){super(n),this.actorsIndex={}}subscribe(n){const i=this.getActorIdentifiers(n)??["_undefined_"];for(const o of i){let a=this.actorsIndex[o];a||(a=this.actorsIndex[o]=[]),a.push(n),super.subscribe(n)}}unsubscribe(n){const i=this.getActorIdentifiers(n)??["_undefined_"];let o=!1;for(const a of i){const s=this.actorsIndex[a];if(s){const c=s.indexOf(n);c>=0&&s.splice(c,1),s.length===0&&delete this.actorsIndex[a]}o=o||super.unsubscribe(n)}return o}publish(n){const i=this.getActionIdentifier(n);return i?[...this.actorsIndex[i]||[],...this.actorsIndex._undefined_||[]].map(a=>({actor:a,reply:a.test(n)})):super.publish(n)}getActorIdentifiers(n){const i=this.actorIdentifierFields.reduce((o,a)=>o[a],n);if(i)return Array.isArray(i)?i:[i]}getActionIdentifier(n){return this.actionIdentifierFields.reduce((i,o)=>i[o],n)}};return Wn.BusIndexed=t,Wn}var Hn={},nc;function tp(){if(nc)return Hn;nc=1,Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.CONTEXT_KEY_LOGGER=void 0;const e=$h();return Hn.CONTEXT_KEY_LOGGER=new e.ActionContextKey("@comunica/core:log"),Hn}var Vn={},ic;function xw(){if(ic)return Vn;ic=1,Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.ActionObserver=void 0;let e=class{constructor(r){Object.assign(this,r)}};return Vn.ActionObserver=e,Vn}var Qn={},oc;function Iw(){if(oc)return Qn;oc=1,Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.Actor=void 0;const e=tp();let t=class Lr{constructor(n){this.beforeActors=[],Object.assign(this,n),this.bus.subscribe(this),this.beforeActors.length>0&&this.bus.addDependencies(this,this.beforeActors),n.busFailMessage&&(this.bus.failMessage=n.busFailMessage)}static getContextLogger(n){return n.get(e.CONTEXT_KEY_LOGGER)}runObservable(n,i){const o=this.run(n,i);return this.bus.onRun(this,n,o),o}getDefaultLogData(n,i){const o=i?i():{};return o.actor=this.name,o}logTrace(n,i,o){const a=Lr.getContextLogger(n);a&&a.trace(i,this.getDefaultLogData(n,o))}logDebug(n,i,o){const a=Lr.getContextLogger(n);a&&a.debug(i,this.getDefaultLogData(n,o))}logInfo(n,i,o){const a=Lr.getContextLogger(n);a&&a.info(i,this.getDefaultLogData(n,o))}logWarn(n,i,o){const a=Lr.getContextLogger(n);a&&a.warn(i,this.getDefaultLogData(n,o))}logError(n,i,o){const a=Lr.getContextLogger(n);a&&a.error(i,this.getDefaultLogData(n,o))}logFatal(n,i,o){const a=Lr.getContextLogger(n);a&&a.fatal(i,this.getDefaultLogData(n,o))}};return Qn.Actor=t,Qn}var Gn={},ac;function Rw(){if(ac)return Gn;ac=1,Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.Mediator=void 0;let e=class Hs{constructor(r){Object.assign(this,r)}publish(r){const n=this.bus.publish(r);if(n.length===0)throw new Error(`No actors are able to reply to a message in the bus ${this.bus.name}`);return n}async mediateActor(r){return await this.mediateWith(r,this.publish(r))}async mediateTestable(r){return(await this.mediateActor(r)).mapAsync((i,o)=>i.runObservable(r,o))}async mediate(r){return(await this.mediateTestable(r)).getOrThrow()}constructFailureMessage(r,n){const i=`
9
- `;return`${this.bus.failMessage.replaceAll(/\$\{(.*?)\}/gu,(a,s)=>Hs.getObjectValue({action:r},s.split("."))||a)}
10
- Error messages of failing actors:${i}${n.join(i)}`}static getObjectValue(r,n){if(n.length===0)return r;if(r)return Hs.getObjectValue(r[n[0]],n.slice(1))}};return Gn.Mediator=e,Gn}var Ye={},sc;function Cw(){if(sc)return Ye;sc=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.TestResultFailed=Ye.TestResultPassed=Ye.failTest=Ye.passTestVoidWithSideData=Ye.passTestWithSideData=Ye.passTestVoid=Ye.passTest=void 0;function e(s){return new o(s,void 0)}Ye.passTest=e;function t(){return new o(!0,void 0)}Ye.passTestVoid=t;function r(s,c){return new o(s,c)}Ye.passTestWithSideData=r;function n(s){return new o(!0,s)}Ye.passTestVoidWithSideData=n;function i(s){return new a(s)}Ye.failTest=i;class o{constructor(c,d){this.value=c,this.sideData=d}isPassed(){return!0}isFailed(){return!1}get(){return this.value}getOrThrow(){return this.value}getSideData(){return this.sideData}getFailMessage(){}map(c){return new o(c(this.value,this.sideData),this.sideData)}async mapAsync(c){return new o(await c(this.value,this.sideData),this.sideData)}}Ye.TestResultPassed=o;class a{constructor(c){this.failMessage=c}isPassed(){return!1}isFailed(){return!0}get(){}getOrThrow(){throw new Error(this.getFailMessage())}getSideData(){throw new Error(this.getFailMessage())}getFailMessage(){return this.failMessage}map(){return this}async mapAsync(){return this}}return Ye.TestResultFailed=a,Ye}var lc;function _r(){return lc||(lc=1,(function(e){var t=Tr&&Tr.__createBinding||(Object.create?(function(n,i,o,a){a===void 0&&(a=o);var s=Object.getOwnPropertyDescriptor(i,o);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,a,s)}):(function(n,i,o,a){a===void 0&&(a=o),n[a]=i[o]})),r=Tr&&Tr.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,n,o)};Object.defineProperty(e,"__esModule",{value:!0}),r($h(),e),r(ep(),e),r(Ew(),e),r(tp(),e),r(xw(),e),r(Iw(),e),r(Rw(),e),r(Cw(),e)})(Tr)),Tr}var uc;function Mw(){if(uc)return qn;uc=1,Object.defineProperty(qn,"__esModule",{value:!0}),qn.ActionObserverHttp=void 0;const e=_r();class t extends e.ActionObserver{constructor(n){super(n),this.requests=0,this.bus.subscribeObserver(this),this.httpInvalidator.addInvalidateListener(()=>{this.requests=0})}onRun(n,i,o){this.observedActors.includes(n.name)&&this.requests++}}return qn.ActionObserverHttp=t,qn}var Jn={},Or={},Yn={},jr={},Xn={},cc;function rp(){if(cc)return Xn;cc=1,Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.ActorAbstractMediaTyped=void 0;const e=_r();let t=class extends e.Actor{constructor(n){super(n)}async run(n){if("handle"in n){const i=n;return{handle:await this.runHandle(i.handle,i.handleMediaType,n.context)}}if("mediaTypes"in n)return{mediaTypes:await this.getMediaTypes(n.context)};if("mediaTypeFormats"in n)return{mediaTypeFormats:await this.getMediaTypeFormats(n.context)};throw new Error("Either a handle, mediaTypes or mediaTypeFormats action needs to be provided")}async test(n){if("handle"in n){const i=n;return(await this.testHandle(i.handle,i.handleMediaType,n.context)).map(o=>({handle:o}))}return"mediaTypes"in n?(await this.testMediaType(n.context)).map(i=>({mediaTypes:i})):"mediaTypeFormats"in n?(await this.testMediaTypeFormats(n.context)).map(i=>({mediaTypeFormats:i})):(0,e.failTest)("Either a handle, mediaTypes or mediaTypeFormats action needs to be provided")}};return Xn.ActorAbstractMediaTyped=t,Xn}var Zn={},dc;function Dw(){if(dc)return Zn;dc=1,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.ActorAbstractMediaTypedFixed=void 0;const e=_r(),t=rp();let r=class extends t.ActorAbstractMediaTyped{constructor(i){super(i);const o=this.priorityScale||this.priorityScale===0?this.priorityScale:1;if(this.mediaTypePriorities)for(const[a,[s,c]]of Object.entries(this.mediaTypePriorities).entries())this.mediaTypePriorities[s]=o*c;this.mediaTypePriorities=Object.freeze(this.mediaTypePriorities),this.mediaTypeFormats=Object.freeze(this.mediaTypeFormats)}async testHandle(i,o,a){return!o||!(o in this.mediaTypePriorities)?(0,e.failTest)(`Unrecognized media type: ${o}`):await this.testHandleChecked(i,a)}async testMediaType(i){return(0,e.passTestVoid)()}async getMediaTypes(i){return this.mediaTypePriorities}async testMediaTypeFormats(i){return(0,e.passTestVoid)()}async getMediaTypeFormats(i){return this.mediaTypeFormats}};return Zn.ActorAbstractMediaTypedFixed=r,Zn}var fc;function np(){return fc||(fc=1,(function(e){var t=jr&&jr.__createBinding||(Object.create?(function(n,i,o,a){a===void 0&&(a=o);var s=Object.getOwnPropertyDescriptor(i,o);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,a,s)}):(function(n,i,o,a){a===void 0&&(a=o),n[a]=i[o]})),r=jr&&jr.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,n,o)};Object.defineProperty(e,"__esModule",{value:!0}),r(rp(),e),r(Dw(),e)})(jr)),jr}var hc;function Pw(){if(hc)return Yn;hc=1,Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.ActorQueryResultSerialize=void 0;const e=np();let t=class extends e.ActorAbstractMediaTyped{constructor(n){super(n)}};return Yn.ActorQueryResultSerialize=t,Yn}var $n={},pc;function Tw(){if(pc)return $n;pc=1,Object.defineProperty($n,"__esModule",{value:!0}),$n.ActorQueryResultSerializeFixedMediaTypes=void 0;const e=np(),t=_r();let r=class extends e.ActorAbstractMediaTypedFixed{constructor(i){super(i)}async testHandleChecked(i,o){return(0,t.passTestVoid)()}};return $n.ActorQueryResultSerializeFixedMediaTypes=r,$n}var yc;function ip(){return yc||(yc=1,(function(e){var t=Or&&Or.__createBinding||(Object.create?(function(n,i,o,a){a===void 0&&(a=o);var s=Object.getOwnPropertyDescriptor(i,o);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,a,s)}):(function(n,i,o,a){a===void 0&&(a=o),n[a]=i[o]})),r=Or&&Or.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,n,o)};Object.defineProperty(e,"__esModule",{value:!0}),r(Pw(),e),r(Tw(),e)})(Or)),Or}var Nr={},xe={},gc;function kw(){if(gc)return xe;gc=1,Object.defineProperty(xe,"__esModule",{value:!0}),xe.KeysStatistics=xe.KeysRdfJoin=xe.KeysMergeBindingsContext=xe.KeysRdfUpdateQuads=xe.KeysQuerySourceIdentify=xe.KeysRdfParseHtmlScript=xe.KeysRdfParseJsonLd=xe.KeysQueryOperation=xe.KeysExpressionEvaluator=xe.KeysInitQuery=xe.KeysHttpProxy=xe.KeysHttpMemento=xe.KeysHttpWayback=xe.KeysHttp=xe.KeysCore=void 0;const e=_r();return xe.KeysCore={log:e.CONTEXT_KEY_LOGGER},xe.KeysHttp={includeCredentials:new e.ActionContextKey("@comunica/bus-http:include-credentials"),auth:new e.ActionContextKey("@comunica/bus-http:auth"),fetch:new e.ActionContextKey("@comunica/bus-http:fetch"),httpTimeout:new e.ActionContextKey("@comunica/bus-http:http-timeout"),httpBodyTimeout:new e.ActionContextKey("@comunica/bus-http:http-body-timeout"),httpRetryCount:new e.ActionContextKey("@comunica/bus-http:http-retry-count"),httpRetryDelayFallback:new e.ActionContextKey("@comunica/bus-http:http-retry-delay-fallback"),httpRetryDelayLimit:new e.ActionContextKey("@comunica/bus-http:http-retry-delay-limit"),httpRetryStatusCodes:new e.ActionContextKey("@comunica/bus-http:http-retry-status-codes")},xe.KeysHttpWayback={recoverBrokenLinks:new e.ActionContextKey("@comunica/bus-http:recover-broken-links")},xe.KeysHttpMemento={datetime:new e.ActionContextKey("@comunica/actor-http-memento:datetime")},xe.KeysHttpProxy={httpProxyHandler:new e.ActionContextKey("@comunica/actor-http-proxy:httpProxyHandler")},xe.KeysInitQuery={querySourcesUnidentified:new e.ActionContextKey("@comunica/actor-init-query:querySourcesUnidentified"),initialBindings:new e.ActionContextKey("@comunica/actor-init-query:initialBindings"),queryFormat:new e.ActionContextKey("@comunica/actor-init-query:queryFormat"),graphqlSingularizeVariables:new e.ActionContextKey("@comunica/actor-init-query:singularizeVariables"),lenient:new e.ActionContextKey("@comunica/actor-init-query:lenient"),queryString:new e.ActionContextKey("@comunica/actor-init-query:queryString"),query:new e.ActionContextKey("@comunica/actor-init-query:query"),baseIRI:new e.ActionContextKey("@comunica/actor-init-query:baseIRI"),fileBaseIRI:new e.ActionContextKey("@comunica/actor-init-query:fileBaseIRI"),functionArgumentsCache:new e.ActionContextKey("@comunica/actor-init-query:functionArgumentsCache"),queryTimestamp:new e.ActionContextKey("@comunica/actor-init-query:queryTimestamp"),queryTimestampHighResolution:new e.ActionContextKey("@comunica/actor-init-query:queryTimestampHighResolution"),extensionFunctionCreator:new e.ActionContextKey("@comunica/actor-init-query:extensionFunctionCreator"),extensionFunctions:new e.ActionContextKey("@comunica/actor-init-query:extensionFunctions"),extensionFunctionsAlwaysPushdown:new e.ActionContextKey("@comunica/actor-init-query:extensionFunctionsAlwaysPushdown"),cliArgsHandlers:new e.ActionContextKey("@comunica/actor-init-query:cliArgsHandlers"),explain:new e.ActionContextKey("@comunica/actor-init-query:explain"),physicalQueryPlanLogger:new e.ActionContextKey("@comunica/actor-init-query:physicalQueryPlanLogger"),physicalQueryPlanNode:new e.ActionContextKey("@comunica/actor-init-query:physicalQueryPlanNode"),jsonLdContext:new e.ActionContextKey("@context"),invalidateCache:new e.ActionContextKey("@comunica/actor-init-query:invalidateCache"),dataFactory:new e.ActionContextKey("@comunica/actor-init-query:dataFactory"),distinctConstruct:new e.ActionContextKey("@comunica/actor-init-query:distinctConstruct")},xe.KeysExpressionEvaluator={extensionFunctionCreator:new e.ActionContextKey("@comunica/utils-expression-evaluator:extensionFunctionCreator"),superTypeProvider:new e.ActionContextKey("@comunica/utils-expression-evaluator:superTypeProvider"),defaultTimeZone:new e.ActionContextKey("@comunica/utils-expression-evaluator:defaultTimeZone"),actionContext:new e.ActionContextKey("@comunica/utils-expression-evaluator:actionContext")},xe.KeysQueryOperation={operation:new e.ActionContextKey("@comunica/bus-query-operation:operation"),joinLeftMetadata:new e.ActionContextKey("@comunica/bus-query-operation:joinLeftMetadata"),joinRightMetadatas:new e.ActionContextKey("@comunica/bus-query-operation:joinRightMetadatas"),joinBindings:new e.ActionContextKey("@comunica/bus-query-operation:joinBindings"),readOnly:new e.ActionContextKey("@comunica/bus-query-operation:readOnly"),isPathArbitraryLengthDistinctKey:new e.ActionContextKey("@comunica/bus-query-operation:isPathArbitraryLengthDistinct"),limitIndicator:new e.ActionContextKey("@comunica/bus-query-operation:limitIndicator"),unionDefaultGraph:new e.ActionContextKey("@comunica/bus-query-operation:unionDefaultGraph"),querySources:new e.ActionContextKey("@comunica/bus-query-operation:querySources")},xe.KeysRdfParseJsonLd={documentLoader:new e.ActionContextKey("@comunica/actor-rdf-parse-jsonld:documentLoader"),strictValues:new e.ActionContextKey("@comunica/actor-rdf-parse-jsonld:strictValues"),parserOptions:new e.ActionContextKey("@comunica/actor-rdf-parse-jsonld:parserOptions")},xe.KeysRdfParseHtmlScript={processingHtmlScript:new e.ActionContextKey("@comunica/actor-rdf-parse-html-script:processingHtmlScript"),extractAllScripts:new e.ActionContextKey("extractAllScripts")},xe.KeysQuerySourceIdentify={sourceIds:new e.ActionContextKey("@comunica/bus-query-source-identify:sourceIds"),hypermediaSourcesAggregatedStores:new e.ActionContextKey("@comunica/bus-query-source-identify:hypermediaSourcesAggregatedStores"),traverse:new e.ActionContextKey("@comunica/bus-query-source-identify:traverse")},xe.KeysRdfUpdateQuads={destination:new e.ActionContextKey("@comunica/bus-rdf-update-quads:destination")},xe.KeysMergeBindingsContext={sourcesBinding:new e.ActionContextKey("@comunica/bus-merge-bindings-context:sourcesBinding")},xe.KeysRdfJoin={lastPhysicalJoin:new e.ActionContextKey("@comunica/bus-rdf-join:lastPhysicalJoin")},xe.KeysStatistics={discoveredLinks:new e.ActionContextKey("@comunica/statistic:discoveredLinks"),dereferencedLinks:new e.ActionContextKey("@comunica/statistic:dereferencedLinks"),intermediateResults:new e.ActionContextKey("@comunica/statistic:intermediateResults")},xe}var bc;function Ow(){return bc||(bc=1,(function(e){var t=Nr&&Nr.__createBinding||(Object.create?(function(n,i,o,a){a===void 0&&(a=o);var s=Object.getOwnPropertyDescriptor(i,o);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,a,s)}):(function(n,i,o,a){a===void 0&&(a=o),n[a]=i[o]})),r=Nr&&Nr.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,n,o)};Object.defineProperty(e,"__esModule",{value:!0}),r(kw(),e)})(Nr)),Nr}var _a={},ei={},mc;function jw(){if(mc)return ei;mc=1,Object.defineProperty(ei,"__esModule",{value:!0}),ei.LinkedList=void 0;class e{constructor(){this._length=0,this._head=null,this._tail=null}get length(){return this._length}get first(){var r;return(r=this._head)===null||r===void 0?void 0:r.value}get last(){var r;return(r=this._tail)===null||r===void 0?void 0:r.value}get empty(){return this._head===null}push(r){const n={value:r,next:null};this._tail===null?this._head=this._tail=n:this._tail.next=this._tail=n,this._length++}shift(){if(this._head===null)return;const{value:r,next:n}=this._head;return this._head=n,n===null&&(this._tail=null),this._length--,r}clear(){this._length=0,this._head=this._tail=null}}return ei.LinkedList=e,ei}var ti={};let va=1;const Vl=new Map;let Sa=!1,Ql,op=(e,...t)=>(Vl.set(va,[e,t]),Ql(va),va++),Gl=e=>{Vl.delete(e)};function Jl(e){if(Sa)setTimeout(Jl,0,e);else{const t=Vl.get(e);if(t){Sa=!0;try{t[0](...t[1])}finally{Gl(e),Sa=!1}}}}function Nw(){const e=new MessageChannel;e.port1.onmessage=t=>{Jl(t.data)},Ql=t=>{e.port2.postMessage(t)}}function Fw(){const e=`setImmediate$${Math.random()}$`;window.addEventListener("message",t=>{typeof t.data=="string"&&t.data.startsWith(e)&&Jl(+t.data.slice(e.length))}),Ql=t=>{window.postMessage(e+t,"*")}}const io=typeof self>"u"?typeof global>"u"?void 0:global:self;io.setImmediate?(op=io.setImmediate,Gl=io.clearImmediate):io.importScripts?Nw():Fw();const Bw=Object.freeze(Object.defineProperty({__proto__:null,get clearImmediate(){return Gl},get setImmediate(){return op}},Symbol.toStringTag,{value:"Module"})),Lw=qd(Bw);var wc;function Uw(){if(wc)return ti;wc=1,Object.defineProperty(ti,"__esModule",{value:!0}),ti.createTaskScheduler=void 0;const e=Lw,t=Promise.resolve(void 0);function r(n=e.setImmediate){const i=typeof queueMicrotask=="function"?queueMicrotask:s=>t.then(s);let o=0,a=null;return s=>{a!==null?a.push(s):++o<100?i(s):(a=[s],n(()=>{for(const c of a)i(c);a=null,o=0}))}}return ti.createTaskScheduler=r,ti}var Ac;function ap(){return Ac||(Ac=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isIterator=e.isIterable=e.isSourceExpression=e.isPromise=e.isEventEmitter=e.isFunction=e.range=e.union=e.fromIterable=e.fromIterator=e.fromArray=e.single=e.empty=e.wrap=e.WrappingIterator=e.ClonedIterator=e.UnionIterator=e.MultiTransformIterator=e.SimpleTransformIterator=e.TransformIterator=e.BufferedIterator=e.MappingIterator=e.DESTINATION=e.identity=e.IntegerIterator=e.ArrayIterator=e.SingletonIterator=e.EmptyIterator=e.AsyncIterator=e.DESTROYED=e.ENDED=e.CLOSED=e.CLOSING=e.OPEN=e.INIT=e.setTaskScheduler=e.getTaskScheduler=e.scheduleTask=e.LinkedList=void 0;const t=or(),r=jw();Object.defineProperty(e,"LinkedList",{enumerable:!0,get:function(){return r.LinkedList}});let i=Uw().createTaskScheduler();function o(H){i(H)}e.scheduleTask=o;function a(){return i}e.getTaskScheduler=a;function s(H){i=H}e.setTaskScheduler=s,e.INIT=1,e.OPEN=2,e.CLOSING=4,e.CLOSED=8,e.ENDED=16,e.DESTROYED=32;class c extends t.EventEmitter{constructor(l=e.OPEN){super(),this._readable=!1,this._state=l,this.on("newListener",d)}_changeState(l,f=!1){const A=l>this._state&&this._state<e.ENDED;return A&&(this._state=l,l===e.ENDED&&(f?i(()=>this.emit("end")):this.emit("end"))),A}read(){return null}forEach(l,f){this.on("data",ue(l,f))}close(){this._changeState(e.CLOSED)&&this._endAsync()}destroy(l){this.done||this._destroy(l,f=>{l=l||f,l&&this.emit("error",l),this._end(!0)})}_destroy(l,f){f()}_end(l=!1){this._changeState(l?e.DESTROYED:e.ENDED)&&(this._readable=!1,this.removeAllListeners("readable"),this.removeAllListeners("data"),this.removeAllListeners("end"))}_endAsync(){i(()=>this._end())}get readable(){return this._readable}set readable(l){l=!!l&&!this.done,this._readable!==l&&(this._readable=l,l&&i(()=>this.emit("readable")))}get closed(){return this._state>=e.CLOSING}get ended(){return this._state===e.ENDED}get destroyed(){return this._state===e.DESTROYED}get done(){return this._state>=e.ENDED}toString(){const l=this._toStringDetails();return`[${this.constructor.name}${l?` ${l}`:""}]`}_toStringDetails(){return""}toArray(l){const f=[],A=typeof l?.limit=="number"?l.limit:1/0;return this.ended||A<=0?Promise.resolve(f):new Promise((j,B)=>{const q=()=>j(f),w=L=>{f.push(L),f.length>=A&&(this.removeListener("error",B),this.removeListener("data",w),this.removeListener("end",q),j(f))};this.on("error",B),this.on("data",w),this.on("end",q)})}getProperty(l,f){const A=this._properties;if(!f)return A&&A[l];if(A&&l in A)i(()=>f(A[l]));else{let j;(j=this._propertyCallbacks)||(this._propertyCallbacks=j=Object.create(null)),l in j?j[l].push(f):j[l]=[f]}}setProperty(l,f){const A=this._properties||(this._properties=Object.create(null));A[l]=f;const j=this._propertyCallbacks||{},B=j[l];if(B){delete j[l],i(()=>{for(const q of B)q(f)});for(l in j)return;delete this._propertyCallbacks}}getProperties(){const l=this._properties,f={};for(const A in l)f[A]=l[A];return f}setProperties(l){for(const f in l)this.setProperty(f,l[f])}copyProperties(l,f){for(const A of f)l.getProperty(A,j=>this.setProperty(A,j))}transform(l){return new P(this,l)}map(l,f){return new R(this,ue(l,f))}filter(l,f){return this.map(function(A){return l.call(f||this,A)?A:null})}uniq(l=m){const f=new Set;return this.filter(function(A){const j=l.call(this,A);return f.has(j)?!1:(f.add(j),!0)})}prepend(l){return this.transform({prepend:l})}append(l){return this.transform({append:l})}surround(l,f){return this.transform({prepend:l,append:f})}skip(l){return this.map(f=>l-- >0?null:f)}take(l){return this.transform({limit:l})}range(l,f){return this.transform({offset:l,limit:Math.max(f-l+1,0)})}clone(){return new X(this)}[Symbol.asyncIterator](){const l=this;let f=null,A=null,j=null;l.addListener("readable",B),l.addListener("end",B),l.addListener("error",q);function B(){if(f!==null)if(j!==null)q(j);else if(l.done)f({done:!0,value:void 0}),f=A=null,w();else{const L=l.read();L!==null&&(f({done:!1,value:L}),f=A=null)}}function q(L){A!==null?(A(L),f=A=j=null,w()):j===null&&(j=L)}function w(){l.removeListener("readable",B),l.removeListener("end",B),l.removeListener("error",q)}return{next(){return new Promise((L,J)=>{f=L,A=J,B()})}}}}e.AsyncIterator=c;function d(H){H==="data"&&(this.removeListener("newListener",d),g(this,"readable",p),this.readable&&i(()=>p.call(this)))}function p(){let H;for(;this.listenerCount("data")!==0&&(H=this.read())!==null;)this.emit("data",H);this.listenerCount("data")===0&&!this.done&&(this.removeListener("readable",p),g(this,"newListener",d))}function g(H,l,f){H.listeners(l).includes(f)||H.on(l,f)}class _ extends c{constructor(){super(),this._changeState(e.ENDED,!0)}}e.EmptyIterator=_;class I extends c{constructor(l){super(),this._item=l,l===null?this.close():this.readable=!0}read(){const l=this._item;return this._item=null,this.close(),l}_toStringDetails(){return this._item===null?"":`(${this._item})`}}e.SingletonIterator=I;class C extends c{constructor(l=[],{autoStart:f=!0,preserve:A=!0}={}){super();const j=A||!Array.isArray(l)?[...l]:l;this._index=0,this._sourceStarted=f!==!1,this._truncateThreshold=A?-1:64,this._sourceStarted&&j.length===0?this.close():this._buffer=j,this.readable=!0}read(){this._sourceStarted||(this._sourceStarted=!0);let l=null;return this._buffer&&(this._index<this._buffer.length&&(l=this._buffer[this._index++]),this._index===this._buffer.length?(delete this._buffer,this.close()):this._index===this._truncateThreshold&&(this._buffer.splice(0,this._truncateThreshold),this._index=0)),l}_toStringDetails(){return`(${this._buffer?this._buffer.length-this._index:0})`}_destroy(l,f){delete this._buffer,f()}toArray(l={}){if(!this._buffer)return Promise.resolve([]);const{length:f}=this._buffer,A=this._index,j=typeof l.limit!="number"?f:A+l.limit,B=this._buffer.slice(A,j);return this._index=j,j>=f&&this.close(),Promise.resolve(B)}}e.ArrayIterator=C;class E extends c{constructor({start:l=0,step:f=1,end:A}={}){super(),Number.isFinite(l)&&(l=Math.trunc(l)),this._next=l,Number.isFinite(f)&&(f=Math.trunc(f)),this._step=f;const j=f>=0,B=j?1/0:-1/0;Number.isFinite(A)?A=Math.trunc(A):A!==-B&&(A=B),this._last=A,!Number.isFinite(l)||(j?l>A:l<A)?this.close():this.readable=!0}read(){if(this.closed)return null;const l=this._next,f=this._step,A=this._last,j=this._next+=f;return(f>=0?j>A:j<A)&&this.close(),l}_toStringDetails(){return`(${this._next}...${this._last})`}}e.IntegerIterator=E;function m(H){return H}e.identity=m,e.DESTINATION=Symbol("destination");class R extends c{constructor(l,f=m,A={}){super(),this._map=f,this._source=S(l),this._destroySource=A.destroySource!==!1,l.done?this.close():(this._source[e.DESTINATION]=this,this._source.on("end",te),this._source.on("error",ee),this._source.on("readable",Y),this.readable=this._source.readable)}read(){if(!this.done){if(this._source.readable){let l,f;for(;(l=this._source.read())!==null;)if((f=this._map(l))!==null)return f}this.readable=!1,this._source.done&&this.close()}return null}_end(l){this._source.removeListener("end",te),this._source.removeListener("error",ee),this._source.removeListener("readable",Y),delete this._source[e.DESTINATION],this._destroySource&&this._source.destroy(),super._end(l)}}e.MappingIterator=R;function S(H,l=!1){if(!H||!le(H.read)||!le(H.on))throw new TypeError(`Invalid source: ${H}`);if(!l&&H[e.DESTINATION])throw new Error("The source already has a destination");return H}class v extends c{constructor({maxBufferSize:l=4,autoStart:f=!0}={}){super(e.INIT),this._buffer=new r.LinkedList,this._maxBufferSize=4,this._reading=!0,this._pushedCount=0,this.maxBufferSize=l,i(()=>this._init(f)),this._sourceStarted=f!==!1}get maxBufferSize(){return this._maxBufferSize}set maxBufferSize(l){l!==1/0&&(l=Number.isFinite(l)?Math.max(Math.trunc(l),1):4),this._maxBufferSize!==l&&(this._maxBufferSize=l,this._state===e.OPEN&&this._fillBuffer())}_init(l){let f=!1;this._reading=!0,this._begin(()=>{if(f)throw new Error("done callback called multiple times");f=!0,this._reading=!1,this._changeState(e.OPEN),l?this._fillBufferAsync():this.readable=!0})}_begin(l){l()}read(){if(this.done)return null;this._sourceStarted||(this._sourceStarted=!0);const l=this._buffer;let f;return l.empty?(f=null,this.readable=!1):f=l.shift(),!this._reading&&l.length<this._maxBufferSize&&(this.closed?l.empty&&this._endAsync():this._fillBufferAsync()),f}_read(l,f){f()}_push(l){this.done||(this._pushedCount++,this._buffer.push(l),this.readable=!0)}_fillBuffer(){let l;this._reading||(this.closed?this._completeClose():(l=Math.min(this._maxBufferSize-this._buffer.length,128))>0&&(this._pushedCount=0,this._reading=!0,this._read(l,()=>{if(!l)throw new Error("done callback called multiple times");l=0,this._reading=!1,this.closed?this._completeClose():this._pushedCount&&(this.readable=!0,this._buffer.length<this._maxBufferSize/2&&this._fillBufferAsync())})))}_fillBufferAsync(){this._reading||(this._reading=!0,i(()=>{this._reading=!1,this._fillBuffer()}))}close(){this._reading?this._changeState(e.CLOSING):this._completeClose()}_completeClose(){this._changeState(e.CLOSED)&&(this._reading=!0,this._flush(()=>{if(!this._reading)throw new Error("done callback called multiple times");this._reading=!1,this._buffer.empty&&this._endAsync()}))}_destroy(l,f){this._buffer.clear(),f()}_flush(l){l()}_toStringDetails(){const l=this._buffer;return`{${l.empty?"":`next: ${l.first}, `}buffer: ${l.length}}`}}e.BufferedIterator=v;class Q extends v{constructor(l,f=l||{}){super(f),this._boundPush=A=>this._push(A),U(l)||(l=f.source),se(l)?this.source=l:l&&(this._createSource=k(l)?()=>l:l,this._sourceStarted&&this._loadSourceAsync()),this._optional=!!f.optional,this._destroySource=f.destroySource!==!1}get source(){return le(this._createSource)&&this._loadSourceAsync(),this._source}set source(l){const f=this._source=this._validateSource(l);f[e.DESTINATION]=this,this.done?this._destroySource&&f.destroy():f.done?this.close():(f.on("end",V),f.on("readable",de),f.on("error",ee))}_loadSourceAsync(){le(this._createSource)&&(Promise.resolve(this._createSource()).then(l=>{delete this._createSource,this.source=l,this._fillBuffer()},l=>this.emit("error",l)),this._createSource=null)}_validateSource(l,f=!1){if(this._source||typeof this._createSource<"u")throw new Error("The source cannot be changed after it has been set");return S(l,f)}_read(l,f){const A=()=>{this._pushedCount<l&&!this.closed?i(()=>this._readAndTransform(A,f)):f()};this._readAndTransform(A,f)}_readAndTransform(l,f){let A;const j=this.source;!j||j.done||(A=j.read())===null?f():this._optional?this._optionalTransform(A,l):this._transform(A,l,this._boundPush)}_optionalTransform(l,f){const A=this._pushedCount;this._transform(l,()=>{A===this._pushedCount&&this._push(l),f()},this._boundPush)}_transform(l,f,A){A(l),f()}_closeWhenDone(){this.close()}_end(l){const f=this._source;f&&(f.removeListener("end",V),f.removeListener("error",ee),f.removeListener("readable",de),delete f[e.DESTINATION],this._destroySource&&f.destroy()),super._end(l)}}e.TransformIterator=Q;function Y(){this[e.DESTINATION].readable=!0}function ee(H){this[e.DESTINATION].emit("error",H)}function te(){this[e.DESTINATION].close()}function V(){this[e.DESTINATION]._closeWhenDone()}function de(){this[e.DESTINATION]._sourceStarted!==!1&&this[e.DESTINATION]._fillBuffer()}class P extends Q{constructor(l,f){if(super(l,f),this._offset=0,this._limit=1/0,this._filter=A=>!0,f=f||(U(l)?null:l),f){const A=le(f)?f:f.transform,{limit:j,offset:B,filter:q,map:w,prepend:L,append:J}=f;B===1/0||j===-1/0?this._limit=0:(Number.isFinite(B)&&(this._offset=Math.max(Math.trunc(B),0)),Number.isFinite(j)&&(this._limit=Math.max(Math.trunc(j),0)),le(q)&&(this._filter=q),le(w)&&(this._map=w),this._transform=le(A)?A:null),L&&(this._prepender=se(L)?L:b(L)),J&&(this._appender=se(J)?J:b(J))}}_read(l,f){const A=()=>this._readAndTransformSimple(l,j,f);this._readAndTransformSimple(l,j,f);function j(){i(A)}}_readAndTransformSimple(l,f,A){let j;const{source:B}=this;if(!B||B.done){A();return}for(this._limit===0&&this.close();!this.closed&&this._pushedCount<l&&(j=B.read())!==null;){if(!this._filter(j)||this._offset!==0&&this._offset--)continue;const q=typeof this._map>"u"?j:this._map(j);if(q===null)this._optional&&this._push(j);else if(!le(this._transform))this._push(q);else{this._optional?this._optionalTransform(q,f):this._transform(q,f,this._boundPush);return}--this._limit===0&&this.close()}A()}_begin(l){this._insert(this._prepender,l),delete this._prepender}_flush(l){this._insert(this._appender,l),delete this._appender}_insert(l,f){const A=B=>this._push(B);!l||l.done?f():(l.on("data",A),l.on("end",j));function j(){l.removeListener("data",A),l.removeListener("end",j),f()}}}e.SimpleTransformIterator=P;class D extends Q{constructor(l,f){if(super(l,f),this._transformerQueue=[],f){const A=le(f)?f:f.multiTransform;A&&(this._createTransformer=A)}}_read(l,f){const A=this._transformerQueue,j=this._optional;let B,q;for(;(B=A[0])&&B.transformer.done;){j&&B.item!==null&&(l--,this._push(B.item)),A.shift();const{transformer:L}=B;L.removeListener("end",de),L.removeListener("readable",de),L.removeListener("error",ee)}const{source:w}=this;for(;w&&!w.done&&A.length<this.maxBufferSize&&(q=w.read(),q!==null);){const L=this._createTransformer(q)||new _;L[e.DESTINATION]=this,L.on("end",de),L.on("readable",de),L.on("error",ee),A.push({transformer:L,item:q})}if(B=A[0],B){const{transformer:L}=B;for(;l-- >0&&(q=L.read())!==null;)this._push(q),j&&(B.item=null)}else w&&w.done&&this.close();f()}_createTransformer(l){return new I(l)}_closeWhenDone(){this._transformerQueue.length||this.close()}_end(l){if(super._end(l),this._destroySource)for(const f of this._transformerQueue)f.transformer.destroy()}}e.MultiTransformIterator=D;class z extends v{constructor(l,f={}){super(f),this._sources=[],this._currentSource=-1;const A=f.autoStart!==!1;if(se(l))l.on("error",j=>this.emit("error",j)),this._pending={loading:!1,sources:l},A&&this._loadSources();else if(Array.isArray(l)&&l.length>0)for(const j of l)this._addSource(j);else A&&this.close();this._destroySources=f.destroySources!==!1}_loadSources(){const l=this._pending.sources;this._pending.loading=!0,l.done?(delete this._pending,this.close()):(l.on("data",f=>{this._addSource(f),this._fillBufferAsync()}),l.on("end",()=>{delete this._pending,this._fillBuffer()}))}_addSource(l){k(l)&&(l=he(l)),l.done||(this._sources.push(l),l[e.DESTINATION]=this,l.on("error",ee),l.on("readable",de),l.on("end",x))}_removeEmptySources(){this._sources=this._sources.filter((l,f)=>(l.done&&f<=this._currentSource&&this._currentSource--,!l.done)),this._fillBuffer()}_read(l,f){var A;((A=this._pending)===null||A===void 0?void 0:A.loading)===!1&&this._loadSources();let j=0,B;for(;j!==(j=l);)for(let q=0;q<this._sources.length&&l>0;q++)this._currentSource=(this._currentSource+1)%this._sources.length,(B=this._sources[this._currentSource].read())!==null&&(l--,this._push(B));!this._pending&&this._sources.length===0&&this.close(),f()}_end(l=!1){if(super._end(l),this._destroySources){for(const f of this._sources)f.destroy();this._pending&&(this._pending.sources.destroy(),delete this._pending)}}}e.UnionIterator=z;function x(){this[e.DESTINATION]._removeEmptySources()}class X extends Q{constructor(l){super(l,{autoStart:!1}),this._readPosition=0,this._reading=!1,l&&(this.readable=!0)}_init(){}close(){c.prototype.close.call(this)}get source(){return super.source}set source(l){const f=this._source=this._validateSource(l),A=f&&f[e.DESTINATION]||(f[e.DESTINATION]=new re(f));this.done?this._destroySource&&f.destroy():A.endsAt(0)?this.close():(A.register(this),(f._sourceStarted===!1||A.readAt(0)!==null)&&(this.readable=!0));const j=this._propertyCallbacks;for(const B in j){const q=j[B];for(const w of q)this._getSourceProperty(B,w)}}_validateSource(l,f=!1){const A=l&&l[e.DESTINATION];return super._validateSource(l,!A||A instanceof re)}getProperty(l,f){const{source:A}=this,j=this._properties,B=j&&l in j;if(!f)return B?j&&j[l]:A&&A.getProperty(l);super.getProperty(l,f),A&&!B&&this._getSourceProperty(l,f)}_getSourceProperty(l,f){this.source.getProperty(l,A=>{(!this._properties||!(l in this._properties))&&f(A)})}getProperties(){const l=this.source?this.source.getProperties():{},f=this._properties;for(const A in f)l[A]=f[A];return l}_toStringDetails(){return`{source: ${this.source?this.source.toString():"none"}}`}read(){this._sourceStarted||(this._sourceStarted=!0);const l=this.source;let f=null;if(!this.done&&l){const A=l[e.DESTINATION];(f=A.readAt(this._readPosition))!==null?this._readPosition++:this.readable=!1,A.endsAt(this._readPosition)&&this.close()}return f}_end(l){const f=this.source,A=f?.[e.DESTINATION];A&&A.unregister(this),v.prototype._end.call(this,l)}}e.ClonedIterator=X;class re{constructor(l){if(this._history=[],this._trackers=new Set,this._source=l,!l.done){const f=()=>{for(const B of this._trackers)B.readable=!0},A=B=>{for(const q of this._trackers)q.emit("error",B)},j=()=>{for(const B of this._trackers)B._sourceStarted!==!1&&B._readPosition===this._history.length&&B.close();this._trackers.clear(),l.removeListener("end",j),l.removeListener("error",A),l.removeListener("readable",f)};l.on("end",j),l.on("error",A),l.on("readable",f)}}register(l){this._source.done||this._trackers.add(l)}unregister(l){this._trackers.delete(l)}readAt(l){let f=null;return l<this._history.length?f=this._history[l]:!this._source.done&&(f=this._source.read())!==null&&(this._history[l]=f),f}endsAt(l){return this._source.done&&this._history.length===l}}class ie extends c{constructor(l,f){super(),this._source=null,this._destroySource=f?.destroySource!==!1,k(l)?(this._source=new c,l.then(A=>{this._source=null,this.source=A}).catch(A=>this.emit("error",A))):l&&(this.source=l)}set source(l){let f=l;if(this._source!==null)throw new Error("The source cannot be changed after it has been set");if(ne(f)&&(f=f[Symbol.iterator]()),ce(f)){let A=f;f=new t.EventEmitter,f.read=()=>{if(A!==null){let j;for(;!(j=A.next()).done;)if(j.value!==null)return j.value;A=null,this.close()}return null}}else f=S(f);if(this.done){this._destroySource&&le(f.destroy)&&f.destroy();return}f[e.DESTINATION]=this,f.on("end",te),f.on("error",ee),f.on("readable",Y),this._source=f,this.readable=f.readable!==!1}read(){if(this._source!==null&&this._source.readable!==!1){const l=this._source.read();if(l!==null)return l;this.readable=!1}return null}_end(l=!1){this._source!==null&&(this._source.removeListener("end",te),this._source.removeListener("error",ee),this._source.removeListener("readable",Y),delete this._source[e.DESTINATION],this._destroySource&&le(this._source.destroy)&&this._source.destroy(),this._source=null),super._end(l)}}e.WrappingIterator=ie;function he(H,l){if(l&&("autoStart"in l||"optional"in l||"source"in l||"maxBufferSize"in l))return H&&!se(H)&&(H=new ie(H)),new Q(H,l);if(!H)return F();if(k(H))return new ie(H,l);if(H instanceof c)return H;if(Array.isArray(H))return b(H);if(ne(H)||ce(H)||se(H))return new ie(H,l);throw new TypeError(`Invalid source: ${H}`)}e.wrap=he;function F(){return new _}e.empty=F;function oe(H){return new I(H)}e.single=oe;function b(H){return new C(H)}e.fromArray=b;function T(H){return new ie(H)}e.fromIterator=T;function Z(H){return new ie(H)}e.fromIterable=Z;function O(H){return new z(H)}e.union=O;function ae(H,l,f){return new E({start:H,end:l,step:f})}e.range=ae;function ue(H,l){return l?H.bind(l):H}function le(H){return typeof H=="function"}e.isFunction=le;function se(H){return le(H?.on)}e.isEventEmitter=se;function k(H){return le(H?.then)}e.isPromise=k;function U(H){return H&&(se(H)||k(H)||le(H))}e.isSourceExpression=U;function ne(H){return H&&Symbol.iterator in H}e.isIterable=ne;function ce(H){return le(H?.next)}e.isIterator=ce})(_a)),_a}var Ea={exports:{}},xa={exports:{}},Ia,_c;function Le(){if(_c)return Ia;_c=1;class e extends Error{constructor(r){if(!Array.isArray(r))throw new TypeError(`Expected input to be an Array, got ${typeof r}`);let n="";for(let i=0;i<r.length;i++)n+=` ${r[i].stack}
11
- `;super(n),this.name="AggregateError",this.errors=r}}return Ia={AggregateError:e,ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,r){return t.includes(r)},ArrayPrototypeIndexOf(t,r){return t.indexOf(r)},ArrayPrototypeJoin(t,r){return t.join(r)},ArrayPrototypeMap(t,r){return t.map(r)},ArrayPrototypePop(t,r){return t.pop(r)},ArrayPrototypePush(t,r){return t.push(r)},ArrayPrototypeSlice(t,r,n){return t.slice(r,n)},Error,FunctionPrototypeCall(t,r,...n){return t.call(r,...n)},FunctionPrototypeSymbolHasInstance(t,r){return Function.prototype[Symbol.hasInstance].call(t,r)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,r){return Object.defineProperties(t,r)},ObjectDefineProperty(t,r,n){return Object.defineProperty(t,r,n)},ObjectGetOwnPropertyDescriptor(t,r){return Object.getOwnPropertyDescriptor(t,r)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,r){return Object.setPrototypeOf(t,r)},Promise,PromisePrototypeCatch(t,r){return t.catch(r)},PromisePrototypeThen(t,r,n){return t.then(r,n)},PromiseReject(t){return Promise.reject(t)},PromiseResolve(t){return Promise.resolve(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,r){return t.test(r)},SafeSet:Set,String,StringPrototypeSlice(t,r,n){return t.slice(r,n)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(t,r,n){return t.set(r,n)},Boolean,Uint8Array},Ia}var Ra={exports:{}},Ca,vc;function sp(){return vc||(vc=1,Ca={format(e,...t){return e.replace(/%([sdifj])/g,function(...[r,n]){const i=t.shift();return n==="f"?i.toFixed(6):n==="j"?JSON.stringify(i):n==="s"&&typeof i=="object"?`${i.constructor!==Object?i.constructor.name:""} {}`.trim():i.toString()})},inspect(e){switch(typeof e){case"string":if(e.includes("'"))if(e.includes('"')){if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}else return`"${e}"`;return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}}}),Ca}var Ma,Sc;function ft(){if(Sc)return Ma;Sc=1;const{format:e,inspect:t}=sp(),{AggregateError:r}=Le(),n=globalThis.AggregateError||r,i=Symbol("kIsNodeError"),o=["string","function","number","object","Function","Object","boolean","bigint","symbol"],a=/^([A-Z][a-z0-9]*)+$/,s="__node_internal_",c={};function d(m,R){if(!m)throw new c.ERR_INTERNAL_ASSERTION(R)}function p(m){let R="",S=m.length;const v=m[0]==="-"?1:0;for(;S>=v+4;S-=3)R=`_${m.slice(S-3,S)}${R}`;return`${m.slice(0,S)}${R}`}function g(m,R,S){if(typeof R=="function")return d(R.length<=S.length,`Code: ${m}; The provided arguments length (${S.length}) does not match the required ones (${R.length}).`),R(...S);const v=(R.match(/%[dfijoOs]/g)||[]).length;return d(v===S.length,`Code: ${m}; The provided arguments length (${S.length}) does not match the required ones (${v}).`),S.length===0?R:e(R,...S)}function _(m,R,S){S||(S=Error);class v extends S{constructor(...Y){super(g(m,R,Y))}toString(){return`${this.name} [${m}]: ${this.message}`}}Object.defineProperties(v.prototype,{name:{value:S.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${m}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),v.prototype.code=m,v.prototype[i]=!0,c[m]=v}function I(m){const R=s+m.name;return Object.defineProperty(m,"name",{value:R}),m}function C(m,R){if(m&&R&&m!==R){if(Array.isArray(R.errors))return R.errors.push(m),R;const S=new n([R,m],R.message);return S.code=R.code,S}return m||R}class E extends Error{constructor(R="The operation was aborted",S=void 0){if(S!==void 0&&typeof S!="object")throw new c.ERR_INVALID_ARG_TYPE("options","Object",S);super(R,S),this.code="ABORT_ERR",this.name="AbortError"}}return _("ERR_ASSERTION","%s",Error),_("ERR_INVALID_ARG_TYPE",(m,R,S)=>{d(typeof m=="string","'name' must be a string"),Array.isArray(R)||(R=[R]);let v="The ";m.endsWith(" argument")?v+=`${m} `:v+=`"${m}" ${m.includes(".")?"property":"argument"} `,v+="must be ";const Q=[],Y=[],ee=[];for(const V of R)d(typeof V=="string","All expected entries have to be of type string"),o.includes(V)?Q.push(V.toLowerCase()):a.test(V)?Y.push(V):(d(V!=="object",'The value "object" should be written as "Object"'),ee.push(V));if(Y.length>0){const V=Q.indexOf("object");V!==-1&&(Q.splice(Q,V,1),Y.push("Object"))}if(Q.length>0){switch(Q.length){case 1:v+=`of type ${Q[0]}`;break;case 2:v+=`one of type ${Q[0]} or ${Q[1]}`;break;default:{const V=Q.pop();v+=`one of type ${Q.join(", ")}, or ${V}`}}(Y.length>0||ee.length>0)&&(v+=" or ")}if(Y.length>0){switch(Y.length){case 1:v+=`an instance of ${Y[0]}`;break;case 2:v+=`an instance of ${Y[0]} or ${Y[1]}`;break;default:{const V=Y.pop();v+=`an instance of ${Y.join(", ")}, or ${V}`}}ee.length>0&&(v+=" or ")}switch(ee.length){case 0:break;case 1:ee[0].toLowerCase()!==ee[0]&&(v+="an "),v+=`${ee[0]}`;break;case 2:v+=`one of ${ee[0]} or ${ee[1]}`;break;default:{const V=ee.pop();v+=`one of ${ee.join(", ")}, or ${V}`}}if(S==null)v+=`. Received ${S}`;else if(typeof S=="function"&&S.name)v+=`. Received function ${S.name}`;else if(typeof S=="object"){var te;if((te=S.constructor)!==null&&te!==void 0&&te.name)v+=`. Received an instance of ${S.constructor.name}`;else{const V=t(S,{depth:-1});v+=`. Received ${V}`}}else{let V=t(S,{colors:!1});V.length>25&&(V=`${V.slice(0,25)}...`),v+=`. Received type ${typeof S} (${V})`}return v},TypeError),_("ERR_INVALID_ARG_VALUE",(m,R,S="is invalid")=>{let v=t(R);return v.length>128&&(v=v.slice(0,128)+"..."),`The ${m.includes(".")?"property":"argument"} '${m}' ${S}. Received ${v}`},TypeError),_("ERR_INVALID_RETURN_VALUE",(m,R,S)=>{var v;const Q=S!=null&&(v=S.constructor)!==null&&v!==void 0&&v.name?`instance of ${S.constructor.name}`:`type ${typeof S}`;return`Expected ${m} to be returned from the "${R}" function but got ${Q}.`},TypeError),_("ERR_MISSING_ARGS",(...m)=>{d(m.length>0,"At least one arg needs to be specified");let R;const S=m.length;switch(m=(Array.isArray(m)?m:[m]).map(v=>`"${v}"`).join(" or "),S){case 1:R+=`The ${m[0]} argument`;break;case 2:R+=`The ${m[0]} and ${m[1]} arguments`;break;default:{const v=m.pop();R+=`The ${m.join(", ")}, and ${v} arguments`}break}return`${R} must be specified`},TypeError),_("ERR_OUT_OF_RANGE",(m,R,S)=>{d(R,'Missing "range" argument');let v;if(Number.isInteger(S)&&Math.abs(S)>2**32)v=p(String(S));else if(typeof S=="bigint"){v=String(S);const Q=BigInt(2)**BigInt(32);(S>Q||S<-Q)&&(v=p(v)),v+="n"}else v=t(S);return`The value of "${m}" is out of range. It must be ${R}. Received ${v}`},RangeError),_("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),_("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),_("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),_("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),_("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),_("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),_("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),_("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),_("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),_("ERR_STREAM_WRITE_AFTER_END","write after end",Error),_("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),Ma={AbortError:E,aggregateTwoErrors:I(C),hideStackFrames:I,codes:c},Ma}var Ec;function mt(){return Ec||(Ec=1,(function(e){const t=vt(),{format:r,inspect:n}=sp(),{codes:{ERR_INVALID_ARG_TYPE:i}}=ft(),{kResistStopPropagation:o,AggregateError:a,SymbolDispose:s}=Le(),c=globalThis.AbortSignal||Qt().AbortSignal,d=globalThis.AbortController||Qt().AbortController,p=Object.getPrototypeOf(async function(){}).constructor,g=globalThis.Blob||t.Blob,_=typeof g<"u"?function(m){return m instanceof g}:function(m){return!1},I=(E,m)=>{if(E!==void 0&&(E===null||typeof E!="object"||!("aborted"in E)))throw new i(m,"AbortSignal",E)},C=(E,m)=>{if(typeof E!="function")throw new i(m,"Function",E)};e.exports={AggregateError:a,kEmptyObject:Object.freeze({}),once(E){let m=!1;return function(...R){m||(m=!0,E.apply(this,R))}},createDeferredPromise:function(){let E,m;return{promise:new Promise((S,v)=>{E=S,m=v}),resolve:E,reject:m}},promisify(E){return new Promise((m,R)=>{E((S,...v)=>S?R(S):m(...v))})},debuglog(){return function(){}},format:r,inspect:n,types:{isAsyncFunction(E){return E instanceof p},isArrayBufferView(E){return ArrayBuffer.isView(E)}},isBlob:_,deprecate(E,m){return E},addAbortListener:or().addAbortListener||function(m,R){if(m===void 0)throw new i("signal","AbortSignal",m);I(m,"signal"),C(R,"listener");let S;return m.aborted?queueMicrotask(()=>R()):(m.addEventListener("abort",R,{__proto__:null,once:!0,[o]:!0}),S=()=>{m.removeEventListener("abort",R)}),{__proto__:null,[s](){var v;(v=S)===null||v===void 0||v()}}},AbortSignalAny:c.any||function(m){if(m.length===1)return m[0];const R=new d,S=()=>R.abort();return m.forEach(v=>{I(v,"signals"),v.addEventListener("abort",S,{once:!0})}),R.signal.addEventListener("abort",()=>{m.forEach(v=>v.removeEventListener("abort",S))},{once:!0}),R.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")})(Ra)),Ra.exports}var oo={},Da,xc;function Ji(){if(xc)return Da;xc=1;const{ArrayIsArray:e,ArrayPrototypeIncludes:t,ArrayPrototypeJoin:r,ArrayPrototypeMap:n,NumberIsInteger:i,NumberIsNaN:o,NumberMAX_SAFE_INTEGER:a,NumberMIN_SAFE_INTEGER:s,NumberParseInt:c,ObjectPrototypeHasOwnProperty:d,RegExpPrototypeExec:p,String:g,StringPrototypeToUpperCase:_,StringPrototypeTrim:I}=Le(),{hideStackFrames:C,codes:{ERR_SOCKET_BAD_PORT:E,ERR_INVALID_ARG_TYPE:m,ERR_INVALID_ARG_VALUE:R,ERR_OUT_OF_RANGE:S,ERR_UNKNOWN_SIGNAL:v}}=ft(),{normalizeEncoding:Q}=mt(),{isAsyncFunction:Y,isArrayBufferView:ee}=mt().types,te={};function V(w){return w===(w|0)}function de(w){return w===w>>>0}const P=/^[0-7]+$/,D="must be a 32-bit unsigned integer or an octal string";function z(w,L,J){if(typeof w>"u"&&(w=J),typeof w=="string"){if(p(P,w)===null)throw new R(L,w,D);w=c(w,8)}return re(w,L),w}const x=C((w,L,J=s,W=a)=>{if(typeof w!="number")throw new m(L,"number",w);if(!i(w))throw new S(L,"an integer",w);if(w<J||w>W)throw new S(L,`>= ${J} && <= ${W}`,w)}),X=C((w,L,J=-2147483648,W=2147483647)=>{if(typeof w!="number")throw new m(L,"number",w);if(!i(w))throw new S(L,"an integer",w);if(w<J||w>W)throw new S(L,`>= ${J} && <= ${W}`,w)}),re=C((w,L,J=!1)=>{if(typeof w!="number")throw new m(L,"number",w);if(!i(w))throw new S(L,"an integer",w);const W=J?1:0,fe=4294967295;if(w<W||w>fe)throw new S(L,`>= ${W} && <= ${fe}`,w)});function ie(w,L){if(typeof w!="string")throw new m(L,"string",w)}function he(w,L,J=void 0,W){if(typeof w!="number")throw new m(L,"number",w);if(J!=null&&w<J||W!=null&&w>W||(J!=null||W!=null)&&o(w))throw new S(L,`${J!=null?`>= ${J}`:""}${J!=null&&W!=null?" && ":""}${W!=null?`<= ${W}`:""}`,w)}const F=C((w,L,J)=>{if(!t(J,w)){const fe="must be one of: "+r(n(J,we=>typeof we=="string"?`'${we}'`:g(we)),", ");throw new R(L,w,fe)}});function oe(w,L){if(typeof w!="boolean")throw new m(L,"boolean",w)}function b(w,L,J){return w==null||!d(w,L)?J:w[L]}const T=C((w,L,J=null)=>{const W=b(J,"allowArray",!1),fe=b(J,"allowFunction",!1);if(!b(J,"nullable",!1)&&w===null||!W&&e(w)||typeof w!="object"&&(!fe||typeof w!="function"))throw new m(L,"Object",w)}),Z=C((w,L)=>{if(w!=null&&typeof w!="object"&&typeof w!="function")throw new m(L,"a dictionary",w)}),O=C((w,L,J=0)=>{if(!e(w))throw new m(L,"Array",w);if(w.length<J){const W=`must be longer than ${J}`;throw new R(L,w,W)}});function ae(w,L){O(w,L);for(let J=0;J<w.length;J++)ie(w[J],`${L}[${J}]`)}function ue(w,L){O(w,L);for(let J=0;J<w.length;J++)oe(w[J],`${L}[${J}]`)}function le(w,L){O(w,L);for(let J=0;J<w.length;J++){const W=w[J],fe=`${L}[${J}]`;if(W==null)throw new m(fe,"AbortSignal",W);ce(W,fe)}}function se(w,L="signal"){if(ie(w,L),te[w]===void 0)throw te[_(w)]!==void 0?new v(w+" (signals must use all capital letters)"):new v(w)}const k=C((w,L="buffer")=>{if(!ee(w))throw new m(L,["Buffer","TypedArray","DataView"],w)});function U(w,L){const J=Q(L),W=w.length;if(J==="hex"&&W%2!==0)throw new R("encoding",L,`is invalid for data of length ${W}`)}function ne(w,L="Port",J=!0){if(typeof w!="number"&&typeof w!="string"||typeof w=="string"&&I(w).length===0||+w!==+w>>>0||w>65535||w===0&&!J)throw new E(L,w,J);return w|0}const ce=C((w,L)=>{if(w!==void 0&&(w===null||typeof w!="object"||!("aborted"in w)))throw new m(L,"AbortSignal",w)}),H=C((w,L)=>{if(typeof w!="function")throw new m(L,"Function",w)}),l=C((w,L)=>{if(typeof w!="function"||Y(w))throw new m(L,"Function",w)}),f=C((w,L)=>{if(w!==void 0)throw new m(L,"undefined",w)});function A(w,L,J){if(!t(J,w))throw new m(L,`('${r(J,"|")}')`,w)}const j=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function B(w,L){if(typeof w>"u"||!p(j,w))throw new R(L,w,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function q(w){if(typeof w=="string")return B(w,"hints"),w;if(e(w)){const L=w.length;let J="";if(L===0)return J;for(let W=0;W<L;W++){const fe=w[W];B(fe,"hints"),J+=fe,W!==L-1&&(J+=", ")}return J}throw new R("hints",w,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}return Da={isInt32:V,isUint32:de,parseFileMode:z,validateArray:O,validateStringArray:ae,validateBooleanArray:ue,validateAbortSignalArray:le,validateBoolean:oe,validateBuffer:k,validateDictionary:Z,validateEncoding:U,validateFunction:H,validateInt32:X,validateInteger:x,validateNumber:he,validateObject:T,validateOneOf:F,validatePlainFunction:l,validatePort:ne,validateSignalName:se,validateString:ie,validateUint32:re,validateUndefined:f,validateUnion:A,validateAbortSignal:ce,validateLinkHeaderValue:q},Da}var ao={exports:{}},Pa,Ic;function ar(){if(Ic)return Pa;Ic=1;const{SymbolAsyncIterator:e,SymbolIterator:t,SymbolFor:r}=Le(),n=r("nodejs.stream.destroyed"),i=r("nodejs.stream.errored"),o=r("nodejs.stream.readable"),a=r("nodejs.stream.writable"),s=r("nodejs.stream.disturbed"),c=r("nodejs.webstream.isClosedPromise"),d=r("nodejs.webstream.controllerErrorFunction");function p(b,T=!1){var Z;return!!(b&&typeof b.pipe=="function"&&typeof b.on=="function"&&(!T||typeof b.pause=="function"&&typeof b.resume=="function")&&(!b._writableState||((Z=b._readableState)===null||Z===void 0?void 0:Z.readable)!==!1)&&(!b._writableState||b._readableState))}function g(b){var T;return!!(b&&typeof b.write=="function"&&typeof b.on=="function"&&(!b._readableState||((T=b._writableState)===null||T===void 0?void 0:T.writable)!==!1))}function _(b){return!!(b&&typeof b.pipe=="function"&&b._readableState&&typeof b.on=="function"&&typeof b.write=="function")}function I(b){return b&&(b._readableState||b._writableState||typeof b.write=="function"&&typeof b.on=="function"||typeof b.pipe=="function"&&typeof b.on=="function")}function C(b){return!!(b&&!I(b)&&typeof b.pipeThrough=="function"&&typeof b.getReader=="function"&&typeof b.cancel=="function")}function E(b){return!!(b&&!I(b)&&typeof b.getWriter=="function"&&typeof b.abort=="function")}function m(b){return!!(b&&!I(b)&&typeof b.readable=="object"&&typeof b.writable=="object")}function R(b){return C(b)||E(b)||m(b)}function S(b,T){return b==null?!1:T===!0?typeof b[e]=="function":T===!1?typeof b[t]=="function":typeof b[e]=="function"||typeof b[t]=="function"}function v(b){if(!I(b))return null;const T=b._writableState,Z=b._readableState,O=T||Z;return!!(b.destroyed||b[n]||O!=null&&O.destroyed)}function Q(b){if(!g(b))return null;if(b.writableEnded===!0)return!0;const T=b._writableState;return T!=null&&T.errored?!1:typeof T?.ended!="boolean"?null:T.ended}function Y(b,T){if(!g(b))return null;if(b.writableFinished===!0)return!0;const Z=b._writableState;return Z!=null&&Z.errored?!1:typeof Z?.finished!="boolean"?null:!!(Z.finished||T===!1&&Z.ended===!0&&Z.length===0)}function ee(b){if(!p(b))return null;if(b.readableEnded===!0)return!0;const T=b._readableState;return!T||T.errored?!1:typeof T?.ended!="boolean"?null:T.ended}function te(b,T){if(!p(b))return null;const Z=b._readableState;return Z!=null&&Z.errored?!1:typeof Z?.endEmitted!="boolean"?null:!!(Z.endEmitted||T===!1&&Z.ended===!0&&Z.length===0)}function V(b){return b&&b[o]!=null?b[o]:typeof b?.readable!="boolean"?null:v(b)?!1:p(b)&&b.readable&&!te(b)}function de(b){return b&&b[a]!=null?b[a]:typeof b?.writable!="boolean"?null:v(b)?!1:g(b)&&b.writable&&!Q(b)}function P(b,T){return I(b)?v(b)?!0:!(T?.readable!==!1&&V(b)||T?.writable!==!1&&de(b)):null}function D(b){var T,Z;return I(b)?b.writableErrored?b.writableErrored:(T=(Z=b._writableState)===null||Z===void 0?void 0:Z.errored)!==null&&T!==void 0?T:null:null}function z(b){var T,Z;return I(b)?b.readableErrored?b.readableErrored:(T=(Z=b._readableState)===null||Z===void 0?void 0:Z.errored)!==null&&T!==void 0?T:null:null}function x(b){if(!I(b))return null;if(typeof b.closed=="boolean")return b.closed;const T=b._writableState,Z=b._readableState;return typeof T?.closed=="boolean"||typeof Z?.closed=="boolean"?T?.closed||Z?.closed:typeof b._closed=="boolean"&&X(b)?b._closed:null}function X(b){return typeof b._closed=="boolean"&&typeof b._defaultKeepAlive=="boolean"&&typeof b._removedConnection=="boolean"&&typeof b._removedContLen=="boolean"}function re(b){return typeof b._sent100=="boolean"&&X(b)}function ie(b){var T;return typeof b._consuming=="boolean"&&typeof b._dumped=="boolean"&&((T=b.req)===null||T===void 0?void 0:T.upgradeOrConnect)===void 0}function he(b){if(!I(b))return null;const T=b._writableState,Z=b._readableState,O=T||Z;return!O&&re(b)||!!(O&&O.autoDestroy&&O.emitClose&&O.closed===!1)}function F(b){var T;return!!(b&&((T=b[s])!==null&&T!==void 0?T:b.readableDidRead||b.readableAborted))}function oe(b){var T,Z,O,ae,ue,le,se,k,U,ne;return!!(b&&((T=(Z=(O=(ae=(ue=(le=b[i])!==null&&le!==void 0?le:b.readableErrored)!==null&&ue!==void 0?ue:b.writableErrored)!==null&&ae!==void 0?ae:(se=b._readableState)===null||se===void 0?void 0:se.errorEmitted)!==null&&O!==void 0?O:(k=b._writableState)===null||k===void 0?void 0:k.errorEmitted)!==null&&Z!==void 0?Z:(U=b._readableState)===null||U===void 0?void 0:U.errored)!==null&&T!==void 0?T:!((ne=b._writableState)===null||ne===void 0)&&ne.errored))}return Pa={isDestroyed:v,kIsDestroyed:n,isDisturbed:F,kIsDisturbed:s,isErrored:oe,kIsErrored:i,isReadable:V,kIsReadable:o,kIsClosedPromise:c,kControllerErrorFunction:d,kIsWritable:a,isClosed:x,isDuplexNodeStream:_,isFinished:P,isIterable:S,isReadableNodeStream:p,isReadableStream:C,isReadableEnded:ee,isReadableFinished:te,isReadableErrored:z,isNodeStream:I,isWebStream:R,isWritable:de,isWritableNodeStream:g,isWritableStream:E,isWritableEnded:Q,isWritableFinished:Y,isWritableErrored:D,isServerRequest:ie,isServerResponse:re,willEmitClose:he,isTransformStream:m},Pa}var Rc;function vr(){if(Rc)return ao.exports;Rc=1;const e=St(),{AbortError:t,codes:r}=ft(),{ERR_INVALID_ARG_TYPE:n,ERR_STREAM_PREMATURE_CLOSE:i}=r,{kEmptyObject:o,once:a}=mt(),{validateAbortSignal:s,validateFunction:c,validateObject:d,validateBoolean:p}=Ji(),{Promise:g,PromisePrototypeThen:_,SymbolDispose:I}=Le(),{isClosed:C,isReadable:E,isReadableNodeStream:m,isReadableStream:R,isReadableFinished:S,isReadableErrored:v,isWritable:Q,isWritableNodeStream:Y,isWritableStream:ee,isWritableFinished:te,isWritableErrored:V,isNodeStream:de,willEmitClose:P,kIsClosedPromise:D}=ar();let z;function x(F){return F.setHeader&&typeof F.abort=="function"}const X=()=>{};function re(F,oe,b){var T,Z;if(arguments.length===2?(b=oe,oe=o):oe==null?oe=o:d(oe,"options"),c(b,"callback"),s(oe.signal,"options.signal"),b=a(b),R(F)||ee(F))return ie(F,oe,b);if(!de(F))throw new n("stream",["ReadableStream","WritableStream","Stream"],F);const O=(T=oe.readable)!==null&&T!==void 0?T:m(F),ae=(Z=oe.writable)!==null&&Z!==void 0?Z:Y(F),ue=F._writableState,le=F._readableState,se=()=>{F.writable||ne()};let k=P(F)&&m(F)===O&&Y(F)===ae,U=te(F,!1);const ne=()=>{U=!0,F.destroyed&&(k=!1),!(k&&(!F.readable||O))&&(!O||ce)&&b.call(F)};let ce=S(F,!1);const H=()=>{ce=!0,F.destroyed&&(k=!1),!(k&&(!F.writable||ae))&&(!ae||U)&&b.call(F)},l=w=>{b.call(F,w)};let f=C(F);const A=()=>{f=!0;const w=V(F)||v(F);if(w&&typeof w!="boolean")return b.call(F,w);if(O&&!ce&&m(F,!0)&&!S(F,!1))return b.call(F,new i);if(ae&&!U&&!te(F,!1))return b.call(F,new i);b.call(F)},j=()=>{f=!0;const w=V(F)||v(F);if(w&&typeof w!="boolean")return b.call(F,w);b.call(F)},B=()=>{F.req.on("finish",ne)};x(F)?(F.on("complete",ne),k||F.on("abort",A),F.req?B():F.on("request",B)):ae&&!ue&&(F.on("end",se),F.on("close",se)),!k&&typeof F.aborted=="boolean"&&F.on("aborted",A),F.on("end",H),F.on("finish",ne),oe.error!==!1&&F.on("error",l),F.on("close",A),f?e.nextTick(A):ue!=null&&ue.errorEmitted||le!=null&&le.errorEmitted?k||e.nextTick(j):(!O&&(!k||E(F))&&(U||Q(F)===!1)||!ae&&(!k||Q(F))&&(ce||E(F)===!1)||le&&F.req&&F.aborted)&&e.nextTick(j);const q=()=>{b=X,F.removeListener("aborted",A),F.removeListener("complete",ne),F.removeListener("abort",A),F.removeListener("request",B),F.req&&F.req.removeListener("finish",ne),F.removeListener("end",se),F.removeListener("close",se),F.removeListener("finish",ne),F.removeListener("end",H),F.removeListener("error",l),F.removeListener("close",A)};if(oe.signal&&!f){const w=()=>{const L=b;q(),L.call(F,new t(void 0,{cause:oe.signal.reason}))};if(oe.signal.aborted)e.nextTick(w);else{z=z||mt().addAbortListener;const L=z(oe.signal,w),J=b;b=a((...W)=>{L[I](),J.apply(F,W)})}}return q}function ie(F,oe,b){let T=!1,Z=X;if(oe.signal)if(Z=()=>{T=!0,b.call(F,new t(void 0,{cause:oe.signal.reason}))},oe.signal.aborted)e.nextTick(Z);else{z=z||mt().addAbortListener;const ae=z(oe.signal,Z),ue=b;b=a((...le)=>{ae[I](),ue.apply(F,le)})}const O=(...ae)=>{T||e.nextTick(()=>b.apply(F,ae))};return _(F[D].promise,O,O),X}function he(F,oe){var b;let T=!1;return oe===null&&(oe=o),(b=oe)!==null&&b!==void 0&&b.cleanup&&(p(oe.cleanup,"cleanup"),T=oe.cleanup),new g((Z,O)=>{const ae=re(F,oe,ue=>{T&&ae(),ue?O(ue):Z()})})}return ao.exports=re,ao.exports.finished=he,ao.exports}var Ta,Cc;function Cn(){if(Cc)return Ta;Cc=1;const e=St(),{aggregateTwoErrors:t,codes:{ERR_MULTIPLE_CALLBACK:r},AbortError:n}=ft(),{Symbol:i}=Le(),{kIsDestroyed:o,isDestroyed:a,isFinished:s,isServerRequest:c}=ar(),d=i("kDestroy"),p=i("kConstruct");function g(P,D,z){P&&(P.stack,D&&!D.errored&&(D.errored=P),z&&!z.errored&&(z.errored=P))}function _(P,D){const z=this._readableState,x=this._writableState,X=x||z;return x!=null&&x.destroyed||z!=null&&z.destroyed?(typeof D=="function"&&D(),this):(g(P,x,z),x&&(x.destroyed=!0),z&&(z.destroyed=!0),X.constructed?I(this,P,D):this.once(d,function(re){I(this,t(re,P),D)}),this)}function I(P,D,z){let x=!1;function X(re){if(x)return;x=!0;const ie=P._readableState,he=P._writableState;g(re,he,ie),he&&(he.closed=!0),ie&&(ie.closed=!0),typeof z=="function"&&z(re),re?e.nextTick(C,P,re):e.nextTick(E,P)}try{P._destroy(D||null,X)}catch(re){X(re)}}function C(P,D){m(P,D),E(P)}function E(P){const D=P._readableState,z=P._writableState;z&&(z.closeEmitted=!0),D&&(D.closeEmitted=!0),(z!=null&&z.emitClose||D!=null&&D.emitClose)&&P.emit("close")}function m(P,D){const z=P._readableState,x=P._writableState;x!=null&&x.errorEmitted||z!=null&&z.errorEmitted||(x&&(x.errorEmitted=!0),z&&(z.errorEmitted=!0),P.emit("error",D))}function R(){const P=this._readableState,D=this._writableState;P&&(P.constructed=!0,P.closed=!1,P.closeEmitted=!1,P.destroyed=!1,P.errored=null,P.errorEmitted=!1,P.reading=!1,P.ended=P.readable===!1,P.endEmitted=P.readable===!1),D&&(D.constructed=!0,D.destroyed=!1,D.closed=!1,D.closeEmitted=!1,D.errored=null,D.errorEmitted=!1,D.finalCalled=!1,D.prefinished=!1,D.ended=D.writable===!1,D.ending=D.writable===!1,D.finished=D.writable===!1)}function S(P,D,z){const x=P._readableState,X=P._writableState;if(X!=null&&X.destroyed||x!=null&&x.destroyed)return this;x!=null&&x.autoDestroy||X!=null&&X.autoDestroy?P.destroy(D):D&&(D.stack,X&&!X.errored&&(X.errored=D),x&&!x.errored&&(x.errored=D),z?e.nextTick(m,P,D):m(P,D))}function v(P,D){if(typeof P._construct!="function")return;const z=P._readableState,x=P._writableState;z&&(z.constructed=!1),x&&(x.constructed=!1),P.once(p,D),!(P.listenerCount(p)>1)&&e.nextTick(Q,P)}function Q(P){let D=!1;function z(x){if(D){S(P,x??new r);return}D=!0;const X=P._readableState,re=P._writableState,ie=re||X;X&&(X.constructed=!0),re&&(re.constructed=!0),ie.destroyed?P.emit(d,x):x?S(P,x,!0):e.nextTick(Y,P)}try{P._construct(x=>{e.nextTick(z,x)})}catch(x){e.nextTick(z,x)}}function Y(P){P.emit(p)}function ee(P){return P?.setHeader&&typeof P.abort=="function"}function te(P){P.emit("close")}function V(P,D){P.emit("error",D),e.nextTick(te,P)}function de(P,D){!P||a(P)||(!D&&!s(P)&&(D=new n),c(P)?(P.socket=null,P.destroy(D)):ee(P)?P.abort():ee(P.req)?P.req.abort():typeof P.destroy=="function"?P.destroy(D):typeof P.close=="function"?P.close():D?e.nextTick(V,P,D):e.nextTick(te,P),P.destroyed||(P[o]=!0))}return Ta={construct:v,destroyer:de,destroy:_,undestroy:R,errorOrDestroy:S},Ta}var ka,Mc;function Yl(){if(Mc)return ka;Mc=1;const{ArrayIsArray:e,ObjectSetPrototypeOf:t}=Le(),{EventEmitter:r}=or();function n(o){r.call(this,o)}t(n.prototype,r.prototype),t(n,r),n.prototype.pipe=function(o,a){const s=this;function c(E){o.writable&&o.write(E)===!1&&s.pause&&s.pause()}s.on("data",c);function d(){s.readable&&s.resume&&s.resume()}o.on("drain",d),!o._isStdio&&(!a||a.end!==!1)&&(s.on("end",g),s.on("close",_));let p=!1;function g(){p||(p=!0,o.end())}function _(){p||(p=!0,typeof o.destroy=="function"&&o.destroy())}function I(E){C(),r.listenerCount(this,"error")===0&&this.emit("error",E)}i(s,"error",I),i(o,"error",I);function C(){s.removeListener("data",c),o.removeListener("drain",d),s.removeListener("end",g),s.removeListener("close",_),s.removeListener("error",I),o.removeListener("error",I),s.removeListener("end",C),s.removeListener("close",C),o.removeListener("close",C)}return s.on("end",C),s.on("close",C),o.on("close",C),o.emit("pipe",s),o};function i(o,a,s){if(typeof o.prependListener=="function")return o.prependListener(a,s);!o._events||!o._events[a]?o.on(a,s):e(o._events[a])?o._events[a].unshift(s):o._events[a]=[s,o._events[a]]}return ka={Stream:n,prependListener:i},ka}var Oa={exports:{}},Dc;function ea(){return Dc||(Dc=1,(function(e){const{SymbolDispose:t}=Le(),{AbortError:r,codes:n}=ft(),{isNodeStream:i,isWebStream:o,kControllerErrorFunction:a}=ar(),s=vr(),{ERR_INVALID_ARG_TYPE:c}=n;let d;const p=(g,_)=>{if(typeof g!="object"||!("aborted"in g))throw new c(_,"AbortSignal",g)};e.exports.addAbortSignal=function(_,I){if(p(_,"signal"),!i(I)&&!o(I))throw new c("stream",["ReadableStream","WritableStream","Stream"],I);return e.exports.addAbortSignalNoValidate(_,I)},e.exports.addAbortSignalNoValidate=function(g,_){if(typeof g!="object"||!("aborted"in g))return _;const I=i(_)?()=>{_.destroy(new r(void 0,{cause:g.reason}))}:()=>{_[a](new r(void 0,{cause:g.reason}))};if(g.aborted)I();else{d=d||mt().addAbortListener;const C=d(g,I);s(_,C[t])}return _}})(Oa)),Oa.exports}var ja,Pc;function qw(){if(Pc)return ja;Pc=1;const{StringPrototypeSlice:e,SymbolIterator:t,TypedArrayPrototypeSet:r,Uint8Array:n}=Le(),{Buffer:i}=vt(),{inspect:o}=mt();return ja=class{constructor(){this.head=null,this.tail=null,this.length=0}push(s){const c={data:s,next:null};this.length>0?this.tail.next=c:this.head=c,this.tail=c,++this.length}unshift(s){const c={data:s,next:this.head};this.length===0&&(this.tail=c),this.head=c,++this.length}shift(){if(this.length===0)return;const s=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,s}clear(){this.head=this.tail=null,this.length=0}join(s){if(this.length===0)return"";let c=this.head,d=""+c.data;for(;(c=c.next)!==null;)d+=s+c.data;return d}concat(s){if(this.length===0)return i.alloc(0);const c=i.allocUnsafe(s>>>0);let d=this.head,p=0;for(;d;)r(c,d.data,p),p+=d.data.length,d=d.next;return c}consume(s,c){const d=this.head.data;if(s<d.length){const p=d.slice(0,s);return this.head.data=d.slice(s),p}return s===d.length?this.shift():c?this._getString(s):this._getBuffer(s)}first(){return this.head.data}*[t](){for(let s=this.head;s;s=s.next)yield s.data}_getString(s){let c="",d=this.head,p=0;do{const g=d.data;if(s>g.length)c+=g,s-=g.length;else{s===g.length?(c+=g,++p,d.next?this.head=d.next:this.head=this.tail=null):(c+=e(g,0,s),this.head=d,d.data=e(g,s));break}++p}while((d=d.next)!==null);return this.length-=p,c}_getBuffer(s){const c=i.allocUnsafe(s),d=s;let p=this.head,g=0;do{const _=p.data;if(s>_.length)r(c,_,d-s),s-=_.length;else{s===_.length?(r(c,_,d-s),++g,p.next?this.head=p.next:this.head=this.tail=null):(r(c,new n(_.buffer,_.byteOffset,s),d-s),this.head=p,p.data=_.slice(s));break}++g}while((p=p.next)!==null);return this.length-=g,c}[Symbol.for("nodejs.util.inspect.custom")](s,c){return o(this,{...c,depth:0,customInspect:!1})}},ja}var Na,Tc;function ta(){if(Tc)return Na;Tc=1;const{MathFloor:e,NumberIsInteger:t}=Le(),{validateInteger:r}=Ji(),{ERR_INVALID_ARG_VALUE:n}=ft().codes;let i=16*1024,o=16;function a(p,g,_){return p.highWaterMark!=null?p.highWaterMark:g?p[_]:null}function s(p){return p?o:i}function c(p,g){r(g,"value",0),p?o=g:i=g}function d(p,g,_,I){const C=a(g,I,_);if(C!=null){if(!t(C)||C<0){const E=I?`options.${_}`:"options.highWaterMark";throw new n(E,C)}return e(C)}return s(p.objectMode)}return Na={getHighWaterMark:d,getDefaultHighWaterMark:s,setDefaultHighWaterMark:c},Na}var Fa,kc;function lp(){if(kc)return Fa;kc=1;const e=St(),{PromisePrototypeThen:t,SymbolAsyncIterator:r,SymbolIterator:n}=Le(),{Buffer:i}=vt(),{ERR_INVALID_ARG_TYPE:o,ERR_STREAM_NULL_VALUES:a}=ft().codes;function s(c,d,p){let g;if(typeof d=="string"||d instanceof i)return new c({objectMode:!0,...p,read(){this.push(d),this.push(null)}});let _;if(d&&d[r])_=!0,g=d[r]();else if(d&&d[n])_=!1,g=d[n]();else throw new o("iterable",["Iterable"],d);const I=new c({objectMode:!0,highWaterMark:1,...p});let C=!1;I._read=function(){C||(C=!0,m())},I._destroy=function(R,S){t(E(R),()=>e.nextTick(S,R),v=>e.nextTick(S,v||R))};async function E(R){const S=R!=null,v=typeof g.throw=="function";if(S&&v){const{value:Q,done:Y}=await g.throw(R);if(await Q,Y)return}if(typeof g.return=="function"){const{value:Q}=await g.return();await Q}}async function m(){for(;;){try{const{value:R,done:S}=_?await g.next():g.next();if(S)I.push(null);else{const v=R&&typeof R.then=="function"?await R:R;if(v===null)throw C=!1,new a;if(I.push(v))continue;C=!1}}catch(R){I.destroy(R)}break}}return I}return Fa=s,Fa}var Ba,Oc;function ra(){if(Oc)return Ba;Oc=1;const e=St(),{ArrayPrototypeIndexOf:t,NumberIsInteger:r,NumberIsNaN:n,NumberParseInt:i,ObjectDefineProperties:o,ObjectKeys:a,ObjectSetPrototypeOf:s,Promise:c,SafeSet:d,SymbolAsyncDispose:p,SymbolAsyncIterator:g,Symbol:_}=Le();Ba=W,W.ReadableState=J;const{EventEmitter:I}=or(),{Stream:C,prependListener:E}=Yl(),{Buffer:m}=vt(),{addAbortSignal:R}=ea(),S=vr();let v=mt().debuglog("stream",u=>{v=u});const Q=qw(),Y=Cn(),{getHighWaterMark:ee,getDefaultHighWaterMark:te}=ta(),{aggregateTwoErrors:V,codes:{ERR_INVALID_ARG_TYPE:de,ERR_METHOD_NOT_IMPLEMENTED:P,ERR_OUT_OF_RANGE:D,ERR_STREAM_PUSH_AFTER_EOF:z,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:x},AbortError:X}=ft(),{validateObject:re}=Ji(),ie=_("kPaused"),{StringDecoder:he}=Kd(),F=lp();s(W.prototype,C.prototype),s(W,C);const oe=()=>{},{errorOrDestroy:b}=Y,T=1,Z=2,O=4,ae=8,ue=16,le=32,se=64,k=128,U=256,ne=512,ce=1024,H=2048,l=4096,f=8192,A=16384,j=32768,B=65536,q=1<<17,w=1<<18;function L(u){return{enumerable:!1,get(){return(this.state&u)!==0},set(h){h?this.state|=u:this.state&=~u}}}o(J.prototype,{objectMode:L(T),ended:L(Z),endEmitted:L(O),reading:L(ae),constructed:L(ue),sync:L(le),needReadable:L(se),emittedReadable:L(k),readableListening:L(U),resumeScheduled:L(ne),errorEmitted:L(ce),emitClose:L(H),autoDestroy:L(l),destroyed:L(f),closed:L(A),closeEmitted:L(j),multiAwaitDrain:L(B),readingMore:L(q),dataEmitted:L(w)});function J(u,h,K){typeof K!="boolean"&&(K=h instanceof nr()),this.state=H|l|ue|le,u&&u.objectMode&&(this.state|=T),K&&u&&u.readableObjectMode&&(this.state|=T),this.highWaterMark=u?ee(this,u,"readableHighWaterMark",K):te(!1),this.buffer=new Q,this.length=0,this.pipes=[],this.flowing=null,this[ie]=null,u&&u.emitClose===!1&&(this.state&=~H),u&&u.autoDestroy===!1&&(this.state&=~l),this.errored=null,this.defaultEncoding=u&&u.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,u&&u.encoding&&(this.decoder=new he(u.encoding),this.encoding=u.encoding)}function W(u){if(!(this instanceof W))return new W(u);const h=this instanceof nr();this._readableState=new J(u,this,h),u&&(typeof u.read=="function"&&(this._read=u.read),typeof u.destroy=="function"&&(this._destroy=u.destroy),typeof u.construct=="function"&&(this._construct=u.construct),u.signal&&!h&&R(u.signal,this)),C.call(this,u),Y.construct(this,()=>{this._readableState.needReadable&&Me(this,this._readableState)})}W.prototype.destroy=Y.destroy,W.prototype._undestroy=Y.undestroy,W.prototype._destroy=function(u,h){h(u)},W.prototype[I.captureRejectionSymbol]=function(u){this.destroy(u)},W.prototype[p]=function(){let u;return this.destroyed||(u=this.readableEnded?null:new X,this.destroy(u)),new c((h,K)=>S(this,N=>N&&N!==u?K(N):h(null)))},W.prototype.push=function(u,h){return fe(this,u,h,!1)},W.prototype.unshift=function(u,h){return fe(this,u,h,!0)};function fe(u,h,K,N){v("readableAddChunk",h);const $=u._readableState;let ge;if(($.state&T)===0&&(typeof h=="string"?(K=K||$.defaultEncoding,$.encoding!==K&&(N&&$.encoding?h=m.from(h,K).toString($.encoding):(h=m.from(h,K),K=""))):h instanceof m?K="":C._isUint8Array(h)?(h=C._uint8ArrayToBuffer(h),K=""):h!=null&&(ge=new de("chunk",["string","Buffer","Uint8Array"],h))),ge)b(u,ge);else if(h===null)$.state&=~ae,Ce(u,$);else if(($.state&T)!==0||h&&h.length>0)if(N)if(($.state&O)!==0)b(u,new x);else{if($.destroyed||$.errored)return!1;we(u,$,h,!0)}else if($.ended)b(u,new z);else{if($.destroyed||$.errored)return!1;$.state&=~ae,$.decoder&&!K?(h=$.decoder.write(h),$.objectMode||h.length!==0?we(u,$,h,!1):Me(u,$)):we(u,$,h,!1)}else N||($.state&=~ae,Me(u,$));return!$.ended&&($.length<$.highWaterMark||$.length===0)}function we(u,h,K,N){h.flowing&&h.length===0&&!h.sync&&u.listenerCount("data")>0?((h.state&B)!==0?h.awaitDrainWriters.clear():h.awaitDrainWriters=null,h.dataEmitted=!0,u.emit("data",K)):(h.length+=h.objectMode?1:K.length,N?h.buffer.unshift(K):h.buffer.push(K),(h.state&se)!==0&&De(u)),Me(u,h)}W.prototype.isPaused=function(){const u=this._readableState;return u[ie]===!0||u.flowing===!1},W.prototype.setEncoding=function(u){const h=new he(u);this._readableState.decoder=h,this._readableState.encoding=this._readableState.decoder.encoding;const K=this._readableState.buffer;let N="";for(const $ of K)N+=h.write($);return K.clear(),N!==""&&K.push(N),this._readableState.length=N.length,this};const pe=1073741824;function ve(u){if(u>pe)throw new D("size","<= 1GiB",u);return u--,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u++,u}function Ae(u,h){return u<=0||h.length===0&&h.ended?0:(h.state&T)!==0?1:n(u)?h.flowing&&h.length?h.buffer.first().length:h.length:u<=h.length?u:h.ended?h.length:0}W.prototype.read=function(u){v("read",u),u===void 0?u=NaN:r(u)||(u=i(u,10));const h=this._readableState,K=u;if(u>h.highWaterMark&&(h.highWaterMark=ve(u)),u!==0&&(h.state&=~k),u===0&&h.needReadable&&((h.highWaterMark!==0?h.length>=h.highWaterMark:h.length>0)||h.ended))return v("read: emitReadable",h.length,h.ended),h.length===0&&h.ended?Yt(this):De(this),null;if(u=Ae(u,h),u===0&&h.ended)return h.length===0&&Yt(this),null;let N=(h.state&se)!==0;if(v("need readable",N),(h.length===0||h.length-u<h.highWaterMark)&&(N=!0,v("length less than watermark",N)),h.ended||h.reading||h.destroyed||h.errored||!h.constructed)N=!1,v("reading, ended or constructing",N);else if(N){v("do read"),h.state|=ae|le,h.length===0&&(h.state|=se);try{this._read(h.highWaterMark)}catch(ge){b(this,ge)}h.state&=~le,h.reading||(u=Ae(K,h))}let $;return u>0?$=Rr(u,h):$=null,$===null?(h.needReadable=h.length<=h.highWaterMark,u=0):(h.length-=u,h.multiAwaitDrain?h.awaitDrainWriters.clear():h.awaitDrainWriters=null),h.length===0&&(h.ended||(h.needReadable=!0),K!==u&&h.ended&&Yt(this)),$!==null&&!h.errorEmitted&&!h.closeEmitted&&(h.dataEmitted=!0,this.emit("data",$)),$};function Ce(u,h){if(v("onEofChunk"),!h.ended){if(h.decoder){const K=h.decoder.end();K&&K.length&&(h.buffer.push(K),h.length+=h.objectMode?1:K.length)}h.ended=!0,h.sync?De(u):(h.needReadable=!1,h.emittedReadable=!0,Ft(u))}}function De(u){const h=u._readableState;v("emitReadable",h.needReadable,h.emittedReadable),h.needReadable=!1,h.emittedReadable||(v("emitReadable",h.flowing),h.emittedReadable=!0,e.nextTick(Ft,u))}function Ft(u){const h=u._readableState;v("emitReadable_",h.destroyed,h.length,h.ended),!h.destroyed&&!h.errored&&(h.length||h.ended)&&(u.emit("readable"),h.emittedReadable=!1),h.needReadable=!h.flowing&&!h.ended&&h.length<=h.highWaterMark,Ir(u)}function Me(u,h){!h.readingMore&&h.constructed&&(h.readingMore=!0,e.nextTick(Dn,u,h))}function Dn(u,h){for(;!h.reading&&!h.ended&&(h.length<h.highWaterMark||h.flowing&&h.length===0);){const K=h.length;if(v("maybeReadMore read 0"),u.read(0),K===h.length)break}h.readingMore=!1}W.prototype._read=function(u){throw new P("_read()")},W.prototype.pipe=function(u,h){const K=this,N=this._readableState;N.pipes.length===1&&(N.multiAwaitDrain||(N.multiAwaitDrain=!0,N.awaitDrainWriters=new d(N.awaitDrainWriters?[N.awaitDrainWriters]:[]))),N.pipes.push(u),v("pipe count=%d opts=%j",N.pipes.length,h);const ge=(!h||h.end!==!1)&&u!==e.stdout&&u!==e.stderr?ze:Bt;N.endEmitted?e.nextTick(ge):K.once("end",ge),u.on("unpipe",be);function be(it,He){v("onunpipe"),it===K&&He&&He.hasUnpiped===!1&&(He.hasUnpiped=!0,Nn())}function ze(){v("onend"),u.end()}let Re,zt=!1;function Nn(){v("cleanup"),u.removeListener("close",Mr),u.removeListener("finish",Dr),Re&&u.removeListener("drain",Re),u.removeListener("error",Cr),u.removeListener("unpipe",be),K.removeListener("end",ze),K.removeListener("end",Bt),K.removeListener("data",Bn),zt=!0,Re&&N.awaitDrainWriters&&(!u._writableState||u._writableState.needDrain)&&Re()}function Fn(){zt||(N.pipes.length===1&&N.pipes[0]===u?(v("false write response, pause",0),N.awaitDrainWriters=u,N.multiAwaitDrain=!1):N.pipes.length>1&&N.pipes.includes(u)&&(v("false write response, pause",N.awaitDrainWriters.size),N.awaitDrainWriters.add(u)),K.pause()),Re||(Re=Pn(K,u),u.on("drain",Re))}K.on("data",Bn);function Bn(it){v("ondata");const He=u.write(it);v("dest.write",He),He===!1&&Fn()}function Cr(it){if(v("onerror",it),Bt(),u.removeListener("error",Cr),u.listenerCount("error")===0){const He=u._writableState||u._readableState;He&&!He.errorEmitted?b(u,it):u.emit("error",it)}}E(u,"error",Cr);function Mr(){u.removeListener("finish",Dr),Bt()}u.once("close",Mr);function Dr(){v("onfinish"),u.removeListener("close",Mr),Bt()}u.once("finish",Dr);function Bt(){v("unpipe"),K.unpipe(u)}return u.emit("pipe",K),u.writableNeedDrain===!0?Fn():N.flowing||(v("pipe resume"),K.resume()),u};function Pn(u,h){return function(){const N=u._readableState;N.awaitDrainWriters===h?(v("pipeOnDrain",1),N.awaitDrainWriters=null):N.multiAwaitDrain&&(v("pipeOnDrain",N.awaitDrainWriters.size),N.awaitDrainWriters.delete(h)),(!N.awaitDrainWriters||N.awaitDrainWriters.size===0)&&u.listenerCount("data")&&u.resume()}}W.prototype.unpipe=function(u){const h=this._readableState,K={hasUnpiped:!1};if(h.pipes.length===0)return this;if(!u){const $=h.pipes;h.pipes=[],this.pause();for(let ge=0;ge<$.length;ge++)$[ge].emit("unpipe",this,{hasUnpiped:!1});return this}const N=t(h.pipes,u);return N===-1?this:(h.pipes.splice(N,1),h.pipes.length===0&&this.pause(),u.emit("unpipe",this,K),this)},W.prototype.on=function(u,h){const K=C.prototype.on.call(this,u,h),N=this._readableState;return u==="data"?(N.readableListening=this.listenerCount("readable")>0,N.flowing!==!1&&this.resume()):u==="readable"&&!N.endEmitted&&!N.readableListening&&(N.readableListening=N.needReadable=!0,N.flowing=!1,N.emittedReadable=!1,v("on readable",N.length,N.reading),N.length?De(this):N.reading||e.nextTick(Tn,this)),K},W.prototype.addListener=W.prototype.on,W.prototype.removeListener=function(u,h){const K=C.prototype.removeListener.call(this,u,h);return u==="readable"&&e.nextTick(Er,this),K},W.prototype.off=W.prototype.removeListener,W.prototype.removeAllListeners=function(u){const h=C.prototype.removeAllListeners.apply(this,arguments);return(u==="readable"||u===void 0)&&e.nextTick(Er,this),h};function Er(u){const h=u._readableState;h.readableListening=u.listenerCount("readable")>0,h.resumeScheduled&&h[ie]===!1?h.flowing=!0:u.listenerCount("data")>0?u.resume():h.readableListening||(h.flowing=null)}function Tn(u){v("readable nexttick read 0"),u.read(0)}W.prototype.resume=function(){const u=this._readableState;return u.flowing||(v("resume"),u.flowing=!u.readableListening,xr(this,u)),u[ie]=!1,this};function xr(u,h){h.resumeScheduled||(h.resumeScheduled=!0,e.nextTick(kn,u,h))}function kn(u,h){v("resume",h.reading),h.reading||u.read(0),h.resumeScheduled=!1,u.emit("resume"),Ir(u),h.flowing&&!h.reading&&u.read(0)}W.prototype.pause=function(){return v("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(v("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[ie]=!0,this};function Ir(u){const h=u._readableState;for(v("flow",h.flowing);h.flowing&&u.read()!==null;);}W.prototype.wrap=function(u){let h=!1;u.on("data",N=>{!this.push(N)&&u.pause&&(h=!0,u.pause())}),u.on("end",()=>{this.push(null)}),u.on("error",N=>{b(this,N)}),u.on("close",()=>{this.destroy()}),u.on("destroy",()=>{this.destroy()}),this._read=()=>{h&&u.resume&&(h=!1,u.resume())};const K=a(u);for(let N=1;N<K.length;N++){const $=K[N];this[$]===void 0&&typeof u[$]=="function"&&(this[$]=u[$].bind(u))}return this},W.prototype[g]=function(){return lr(this)},W.prototype.iterator=function(u){return u!==void 0&&re(u,"options"),lr(this,u)};function lr(u,h){typeof u.read!="function"&&(u=W.wrap(u,{objectMode:!0}));const K=en(u,h);return K.stream=u,K}async function*en(u,h){let K=oe;function N(be){this===u?(K(),K=oe):K=be}u.on("readable",N);let $;const ge=S(u,{writable:!1},be=>{$=be?V($,be):null,K(),K=oe});try{for(;;){const be=u.destroyed?null:u.read();if(be!==null)yield be;else{if($)throw $;if($===null)return;await new c(N)}}}catch(be){throw $=V($,be),$}finally{($||h?.destroyOnReturn!==!1)&&($===void 0||u._readableState.autoDestroy)?Y.destroyer(u,null):(u.off("readable",N),ge())}}o(W.prototype,{readable:{__proto__:null,get(){const u=this._readableState;return!!u&&u.readable!==!1&&!u.destroyed&&!u.errorEmitted&&!u.endEmitted},set(u){this._readableState&&(this._readableState.readable=!!u)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(u){this._readableState&&(this._readableState.flowing=u)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(u){this._readableState&&(this._readableState.destroyed=u)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),o(J.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[ie]!==!1},set(u){this[ie]=!!u}}}),W._fromList=Rr;function Rr(u,h){if(h.length===0)return null;let K;return h.objectMode?K=h.buffer.shift():!u||u>=h.length?(h.decoder?K=h.buffer.join(""):h.buffer.length===1?K=h.buffer.first():K=h.buffer.concat(h.length),h.buffer.clear()):K=h.buffer.consume(u,h.decoder),K}function Yt(u){const h=u._readableState;v("endReadable",h.endEmitted),h.endEmitted||(h.ended=!0,e.nextTick(On,h,u))}function On(u,h){if(v("endReadableNT",u.endEmitted,u.length),!u.errored&&!u.closeEmitted&&!u.endEmitted&&u.length===0){if(u.endEmitted=!0,h.emit("end"),h.writable&&h.allowHalfOpen===!1)e.nextTick(jn,h);else if(u.autoDestroy){const K=h._writableState;(!K||K.autoDestroy&&(K.finished||K.writable===!1))&&h.destroy()}}}function jn(u){u.writable&&!u.writableEnded&&!u.destroyed&&u.end()}W.from=function(u,h){return F(W,u,h)};let Xt;function M(){return Xt===void 0&&(Xt={}),Xt}return W.fromWeb=function(u,h){return M().newStreamReadableFromReadableStream(u,h)},W.toWeb=function(u,h){return M().newReadableStreamFromStreamReadable(u,h)},W.wrap=function(u,h){var K,N;return new W({objectMode:(K=(N=u.readableObjectMode)!==null&&N!==void 0?N:u.objectMode)!==null&&K!==void 0?K:!0,...h,destroy($,ge){Y.destroyer(u,$),ge($)}}).wrap(u)},Ba}var La,jc;function Xl(){if(jc)return La;jc=1;const e=St(),{ArrayPrototypeSlice:t,Error:r,FunctionPrototypeSymbolHasInstance:n,ObjectDefineProperty:i,ObjectDefineProperties:o,ObjectSetPrototypeOf:a,StringPrototypeToLowerCase:s,Symbol:c,SymbolHasInstance:d}=Le();La=re,re.WritableState=x;const{EventEmitter:p}=or(),g=Yl().Stream,{Buffer:_}=vt(),I=Cn(),{addAbortSignal:C}=ea(),{getHighWaterMark:E,getDefaultHighWaterMark:m}=ta(),{ERR_INVALID_ARG_TYPE:R,ERR_METHOD_NOT_IMPLEMENTED:S,ERR_MULTIPLE_CALLBACK:v,ERR_STREAM_CANNOT_PIPE:Q,ERR_STREAM_DESTROYED:Y,ERR_STREAM_ALREADY_FINISHED:ee,ERR_STREAM_NULL_VALUES:te,ERR_STREAM_WRITE_AFTER_END:V,ERR_UNKNOWN_ENCODING:de}=ft().codes,{errorOrDestroy:P}=I;a(re.prototype,g.prototype),a(re,g);function D(){}const z=c("kOnFinished");function x(l,f,A){typeof A!="boolean"&&(A=f instanceof nr()),this.objectMode=!!(l&&l.objectMode),A&&(this.objectMode=this.objectMode||!!(l&&l.writableObjectMode)),this.highWaterMark=l?E(this,l,"writableHighWaterMark",A):m(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const j=!!(l&&l.decodeStrings===!1);this.decodeStrings=!j,this.defaultEncoding=l&&l.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=b.bind(void 0,f),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,X(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!l||l.emitClose!==!1,this.autoDestroy=!l||l.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[z]=[]}function X(l){l.buffered=[],l.bufferedIndex=0,l.allBuffers=!0,l.allNoop=!0}x.prototype.getBuffer=function(){return t(this.buffered,this.bufferedIndex)},i(x.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function re(l){const f=this instanceof nr();if(!f&&!n(re,this))return new re(l);this._writableState=new x(l,this,f),l&&(typeof l.write=="function"&&(this._write=l.write),typeof l.writev=="function"&&(this._writev=l.writev),typeof l.destroy=="function"&&(this._destroy=l.destroy),typeof l.final=="function"&&(this._final=l.final),typeof l.construct=="function"&&(this._construct=l.construct),l.signal&&C(l.signal,this)),g.call(this,l),I.construct(this,()=>{const A=this._writableState;A.writing||ae(this,A),k(this,A)})}i(re,d,{__proto__:null,value:function(l){return n(this,l)?!0:this!==re?!1:l&&l._writableState instanceof x}}),re.prototype.pipe=function(){P(this,new Q)};function ie(l,f,A,j){const B=l._writableState;if(typeof A=="function")j=A,A=B.defaultEncoding;else{if(!A)A=B.defaultEncoding;else if(A!=="buffer"&&!_.isEncoding(A))throw new de(A);typeof j!="function"&&(j=D)}if(f===null)throw new te;if(!B.objectMode)if(typeof f=="string")B.decodeStrings!==!1&&(f=_.from(f,A),A="buffer");else if(f instanceof _)A="buffer";else if(g._isUint8Array(f))f=g._uint8ArrayToBuffer(f),A="buffer";else throw new R("chunk",["string","Buffer","Uint8Array"],f);let q;return B.ending?q=new V:B.destroyed&&(q=new Y("write")),q?(e.nextTick(j,q),P(l,q,!0),q):(B.pendingcb++,he(l,B,f,A,j))}re.prototype.write=function(l,f,A){return ie(this,l,f,A)===!0},re.prototype.cork=function(){this._writableState.corked++},re.prototype.uncork=function(){const l=this._writableState;l.corked&&(l.corked--,l.writing||ae(this,l))},re.prototype.setDefaultEncoding=function(f){if(typeof f=="string"&&(f=s(f)),!_.isEncoding(f))throw new de(f);return this._writableState.defaultEncoding=f,this};function he(l,f,A,j,B){const q=f.objectMode?1:A.length;f.length+=q;const w=f.length<f.highWaterMark;return w||(f.needDrain=!0),f.writing||f.corked||f.errored||!f.constructed?(f.buffered.push({chunk:A,encoding:j,callback:B}),f.allBuffers&&j!=="buffer"&&(f.allBuffers=!1),f.allNoop&&B!==D&&(f.allNoop=!1)):(f.writelen=q,f.writecb=B,f.writing=!0,f.sync=!0,l._write(A,j,f.onwrite),f.sync=!1),w&&!f.errored&&!f.destroyed}function F(l,f,A,j,B,q,w){f.writelen=j,f.writecb=w,f.writing=!0,f.sync=!0,f.destroyed?f.onwrite(new Y("write")):A?l._writev(B,f.onwrite):l._write(B,q,f.onwrite),f.sync=!1}function oe(l,f,A,j){--f.pendingcb,j(A),O(f),P(l,A)}function b(l,f){const A=l._writableState,j=A.sync,B=A.writecb;if(typeof B!="function"){P(l,new v);return}A.writing=!1,A.writecb=null,A.length-=A.writelen,A.writelen=0,f?(f.stack,A.errored||(A.errored=f),l._readableState&&!l._readableState.errored&&(l._readableState.errored=f),j?e.nextTick(oe,l,A,f,B):oe(l,A,f,B)):(A.buffered.length>A.bufferedIndex&&ae(l,A),j?A.afterWriteTickInfo!==null&&A.afterWriteTickInfo.cb===B?A.afterWriteTickInfo.count++:(A.afterWriteTickInfo={count:1,cb:B,stream:l,state:A},e.nextTick(T,A.afterWriteTickInfo)):Z(l,A,1,B))}function T({stream:l,state:f,count:A,cb:j}){return f.afterWriteTickInfo=null,Z(l,f,A,j)}function Z(l,f,A,j){for(!f.ending&&!l.destroyed&&f.length===0&&f.needDrain&&(f.needDrain=!1,l.emit("drain"));A-- >0;)f.pendingcb--,j();f.destroyed&&O(f),k(l,f)}function O(l){if(l.writing)return;for(let B=l.bufferedIndex;B<l.buffered.length;++B){var f;const{chunk:q,callback:w}=l.buffered[B],L=l.objectMode?1:q.length;l.length-=L,w((f=l.errored)!==null&&f!==void 0?f:new Y("write"))}const A=l[z].splice(0);for(let B=0;B<A.length;B++){var j;A[B]((j=l.errored)!==null&&j!==void 0?j:new Y("end"))}X(l)}function ae(l,f){if(f.corked||f.bufferProcessing||f.destroyed||!f.constructed)return;const{buffered:A,bufferedIndex:j,objectMode:B}=f,q=A.length-j;if(!q)return;let w=j;if(f.bufferProcessing=!0,q>1&&l._writev){f.pendingcb-=q-1;const L=f.allNoop?D:W=>{for(let fe=w;fe<A.length;++fe)A[fe].callback(W)},J=f.allNoop&&w===0?A:t(A,w);J.allBuffers=f.allBuffers,F(l,f,!0,f.length,J,"",L),X(f)}else{do{const{chunk:L,encoding:J,callback:W}=A[w];A[w++]=null;const fe=B?1:L.length;F(l,f,!1,fe,L,J,W)}while(w<A.length&&!f.writing);w===A.length?X(f):w>256?(A.splice(0,w),f.bufferedIndex=0):f.bufferedIndex=w}f.bufferProcessing=!1}re.prototype._write=function(l,f,A){if(this._writev)this._writev([{chunk:l,encoding:f}],A);else throw new S("_write()")},re.prototype._writev=null,re.prototype.end=function(l,f,A){const j=this._writableState;typeof l=="function"?(A=l,l=null,f=null):typeof f=="function"&&(A=f,f=null);let B;if(l!=null){const q=ie(this,l,f);q instanceof r&&(B=q)}return j.corked&&(j.corked=1,this.uncork()),B||(!j.errored&&!j.ending?(j.ending=!0,k(this,j,!0),j.ended=!0):j.finished?B=new ee("end"):j.destroyed&&(B=new Y("end"))),typeof A=="function"&&(B||j.finished?e.nextTick(A,B):j[z].push(A)),this};function ue(l){return l.ending&&!l.destroyed&&l.constructed&&l.length===0&&!l.errored&&l.buffered.length===0&&!l.finished&&!l.writing&&!l.errorEmitted&&!l.closeEmitted}function le(l,f){let A=!1;function j(B){if(A){P(l,B??v());return}if(A=!0,f.pendingcb--,B){const q=f[z].splice(0);for(let w=0;w<q.length;w++)q[w](B);P(l,B,f.sync)}else ue(f)&&(f.prefinished=!0,l.emit("prefinish"),f.pendingcb++,e.nextTick(U,l,f))}f.sync=!0,f.pendingcb++;try{l._final(j)}catch(B){j(B)}f.sync=!1}function se(l,f){!f.prefinished&&!f.finalCalled&&(typeof l._final=="function"&&!f.destroyed?(f.finalCalled=!0,le(l,f)):(f.prefinished=!0,l.emit("prefinish")))}function k(l,f,A){ue(f)&&(se(l,f),f.pendingcb===0&&(A?(f.pendingcb++,e.nextTick((j,B)=>{ue(B)?U(j,B):B.pendingcb--},l,f)):ue(f)&&(f.pendingcb++,U(l,f))))}function U(l,f){f.pendingcb--,f.finished=!0;const A=f[z].splice(0);for(let j=0;j<A.length;j++)A[j]();if(l.emit("finish"),f.autoDestroy){const j=l._readableState;(!j||j.autoDestroy&&(j.endEmitted||j.readable===!1))&&l.destroy()}}o(re.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(l){this._writableState&&(this._writableState.destroyed=l)}},writable:{__proto__:null,get(){const l=this._writableState;return!!l&&l.writable!==!1&&!l.destroyed&&!l.errored&&!l.ending&&!l.ended},set(l){this._writableState&&(this._writableState.writable=!!l)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){const l=this._writableState;return l?!l.destroyed&&!l.ending&&l.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});const ne=I.destroy;re.prototype.destroy=function(l,f){const A=this._writableState;return!A.destroyed&&(A.bufferedIndex<A.buffered.length||A[z].length)&&e.nextTick(O,A),ne.call(this,l,f),this},re.prototype._undestroy=I.undestroy,re.prototype._destroy=function(l,f){f(l)},re.prototype[p.captureRejectionSymbol]=function(l){this.destroy(l)};let ce;function H(){return ce===void 0&&(ce={}),ce}return re.fromWeb=function(l,f){return H().newStreamWritableFromWritableStream(l,f)},re.toWeb=function(l){return H().newWritableStreamFromStreamWritable(l)},La}var Ua,Nc;function Kw(){if(Nc)return Ua;Nc=1;const e=St(),t=vt(),{isReadable:r,isWritable:n,isIterable:i,isNodeStream:o,isReadableNodeStream:a,isWritableNodeStream:s,isDuplexNodeStream:c,isReadableStream:d,isWritableStream:p}=ar(),g=vr(),{AbortError:_,codes:{ERR_INVALID_ARG_TYPE:I,ERR_INVALID_RETURN_VALUE:C}}=ft(),{destroyer:E}=Cn(),m=nr(),R=ra(),S=Xl(),{createDeferredPromise:v}=mt(),Q=lp(),Y=globalThis.Blob||t.Blob,ee=typeof Y<"u"?function(x){return x instanceof Y}:function(x){return!1},te=globalThis.AbortController||Qt().AbortController,{FunctionPrototypeCall:V}=Le();class de extends m{constructor(x){super(x),x?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),x?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}Ua=function z(x,X){if(c(x))return x;if(a(x))return D({readable:x});if(s(x))return D({writable:x});if(o(x))return D({writable:!1,readable:!1});if(d(x))return D({readable:R.fromWeb(x)});if(p(x))return D({writable:S.fromWeb(x)});if(typeof x=="function"){const{value:ie,write:he,final:F,destroy:oe}=P(x);if(i(ie))return Q(de,ie,{objectMode:!0,write:he,final:F,destroy:oe});const b=ie?.then;if(typeof b=="function"){let T;const Z=V(b,ie,O=>{if(O!=null)throw new C("nully","body",O)},O=>{E(T,O)});return T=new de({objectMode:!0,readable:!1,write:he,final(O){F(async()=>{try{await Z,e.nextTick(O,null)}catch(ae){e.nextTick(O,ae)}})},destroy:oe})}throw new C("Iterable, AsyncIterable or AsyncFunction",X,ie)}if(ee(x))return z(x.arrayBuffer());if(i(x))return Q(de,x,{objectMode:!0,writable:!1});if(d(x?.readable)&&p(x?.writable))return de.fromWeb(x);if(typeof x?.writable=="object"||typeof x?.readable=="object"){const ie=x!=null&&x.readable?a(x?.readable)?x?.readable:z(x.readable):void 0,he=x!=null&&x.writable?s(x?.writable)?x?.writable:z(x.writable):void 0;return D({readable:ie,writable:he})}const re=x?.then;if(typeof re=="function"){let ie;return V(re,x,he=>{he!=null&&ie.push(he),ie.push(null)},he=>{E(ie,he)}),ie=new de({objectMode:!0,writable:!1,read(){}})}throw new I(X,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],x)};function P(z){let{promise:x,resolve:X}=v();const re=new te,ie=re.signal;return{value:z((async function*(){for(;;){const F=x;x=null;const{chunk:oe,done:b,cb:T}=await F;if(e.nextTick(T),b)return;if(ie.aborted)throw new _(void 0,{cause:ie.reason});({promise:x,resolve:X}=v()),yield oe}})(),{signal:ie}),write(F,oe,b){const T=X;X=null,T({chunk:F,done:!1,cb:b})},final(F){const oe=X;X=null,oe({done:!0,cb:F})},destroy(F,oe){re.abort(),oe(F)}}}function D(z){const x=z.readable&&typeof z.readable.read!="function"?R.wrap(z.readable):z.readable,X=z.writable;let re=!!r(x),ie=!!n(X),he,F,oe,b,T;function Z(O){const ae=b;b=null,ae?ae(O):O&&T.destroy(O)}return T=new de({readableObjectMode:!!(x!=null&&x.readableObjectMode),writableObjectMode:!!(X!=null&&X.writableObjectMode),readable:re,writable:ie}),ie&&(g(X,O=>{ie=!1,O&&E(x,O),Z(O)}),T._write=function(O,ae,ue){X.write(O,ae)?ue():he=ue},T._final=function(O){X.end(),F=O},X.on("drain",function(){if(he){const O=he;he=null,O()}}),X.on("finish",function(){if(F){const O=F;F=null,O()}})),re&&(g(x,O=>{re=!1,O&&E(x,O),Z(O)}),x.on("readable",function(){if(oe){const O=oe;oe=null,O()}}),x.on("end",function(){T.push(null)}),T._read=function(){for(;;){const O=x.read();if(O===null){oe=T._read;return}if(!T.push(O))return}}),T._destroy=function(O,ae){!O&&b!==null&&(O=new _),oe=null,he=null,F=null,b===null?ae(O):(b=ae,E(X,O),E(x,O))},T}return Ua}var qa,Fc;function nr(){if(Fc)return qa;Fc=1;const{ObjectDefineProperties:e,ObjectGetOwnPropertyDescriptor:t,ObjectKeys:r,ObjectSetPrototypeOf:n}=Le();qa=a;const i=ra(),o=Xl();n(a.prototype,i.prototype),n(a,i);{const p=r(o.prototype);for(let g=0;g<p.length;g++){const _=p[g];a.prototype[_]||(a.prototype[_]=o.prototype[_])}}function a(p){if(!(this instanceof a))return new a(p);i.call(this,p),o.call(this,p),p?(this.allowHalfOpen=p.allowHalfOpen!==!1,p.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),p.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}e(a.prototype,{writable:{__proto__:null,...t(o.prototype,"writable")},writableHighWaterMark:{__proto__:null,...t(o.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...t(o.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...t(o.prototype,"writableBuffer")},writableLength:{__proto__:null,...t(o.prototype,"writableLength")},writableFinished:{__proto__:null,...t(o.prototype,"writableFinished")},writableCorked:{__proto__:null,...t(o.prototype,"writableCorked")},writableEnded:{__proto__:null,...t(o.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...t(o.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(p){this._readableState&&this._writableState&&(this._readableState.destroyed=p,this._writableState.destroyed=p)}}});let s;function c(){return s===void 0&&(s={}),s}a.fromWeb=function(p,g){return c().newStreamDuplexFromReadableWritablePair(p,g)},a.toWeb=function(p){return c().newReadableWritablePairFromDuplex(p)};let d;return a.from=function(p){return d||(d=Kw()),d(p,"body")},qa}var Ka,Bc;function up(){if(Bc)return Ka;Bc=1;const{ObjectSetPrototypeOf:e,Symbol:t}=Le();Ka=a;const{ERR_METHOD_NOT_IMPLEMENTED:r}=ft().codes,n=nr(),{getHighWaterMark:i}=ta();e(a.prototype,n.prototype),e(a,n);const o=t("kCallback");function a(d){if(!(this instanceof a))return new a(d);const p=d?i(this,d,"readableHighWaterMark",!0):null;p===0&&(d={...d,highWaterMark:null,readableHighWaterMark:p,writableHighWaterMark:d.writableHighWaterMark||0}),n.call(this,d),this._readableState.sync=!1,this[o]=null,d&&(typeof d.transform=="function"&&(this._transform=d.transform),typeof d.flush=="function"&&(this._flush=d.flush)),this.on("prefinish",c)}function s(d){typeof this._flush=="function"&&!this.destroyed?this._flush((p,g)=>{if(p){d?d(p):this.destroy(p);return}g!=null&&this.push(g),this.push(null),d&&d()}):(this.push(null),d&&d())}function c(){this._final!==s&&s.call(this)}return a.prototype._final=s,a.prototype._transform=function(d,p,g){throw new r("_transform()")},a.prototype._write=function(d,p,g){const _=this._readableState,I=this._writableState,C=_.length;this._transform(d,p,(E,m)=>{if(E){g(E);return}m!=null&&this.push(m),I.ended||C===_.length||_.length<_.highWaterMark?g():this[o]=g})},a.prototype._read=function(){if(this[o]){const d=this[o];this[o]=null,d()}},Ka}var za,Lc;function cp(){if(Lc)return za;Lc=1;const{ObjectSetPrototypeOf:e}=Le();za=r;const t=up();e(r.prototype,t.prototype),e(r,t);function r(n){if(!(this instanceof r))return new r(n);t.call(this,n)}return r.prototype._transform=function(n,i,o){o(null,n)},za}var Wa,Uc;function Zl(){if(Uc)return Wa;Uc=1;const e=St(),{ArrayIsArray:t,Promise:r,SymbolAsyncIterator:n,SymbolDispose:i}=Le(),o=vr(),{once:a}=mt(),s=Cn(),c=nr(),{aggregateTwoErrors:d,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:g,ERR_MISSING_ARGS:_,ERR_STREAM_DESTROYED:I,ERR_STREAM_PREMATURE_CLOSE:C},AbortError:E}=ft(),{validateFunction:m,validateAbortSignal:R}=Ji(),{isIterable:S,isReadable:v,isReadableNodeStream:Q,isNodeStream:Y,isTransformStream:ee,isWebStream:te,isReadableStream:V,isReadableFinished:de}=ar(),P=globalThis.AbortController||Qt().AbortController;let D,z,x;function X(O,ae,ue){let le=!1;O.on("close",()=>{le=!0});const se=o(O,{readable:ae,writable:ue},k=>{le=!k});return{destroy:k=>{le||(le=!0,s.destroyer(O,k||new I("pipe")))},cleanup:se}}function re(O){return m(O[O.length-1],"streams[stream.length - 1]"),O.pop()}function ie(O){if(S(O))return O;if(Q(O))return he(O);throw new p("val",["Readable","Iterable","AsyncIterable"],O)}async function*he(O){z||(z=ra()),yield*z.prototype[n].call(O)}async function F(O,ae,ue,{end:le}){let se,k=null;const U=H=>{if(H&&(se=H),k){const l=k;k=null,l()}},ne=()=>new r((H,l)=>{se?l(se):k=()=>{se?l(se):H()}});ae.on("drain",U);const ce=o(ae,{readable:!1},U);try{ae.writableNeedDrain&&await ne();for await(const H of O)ae.write(H)||await ne();le&&(ae.end(),await ne()),ue()}catch(H){ue(se!==H?d(se,H):H)}finally{ce(),ae.off("drain",U)}}async function oe(O,ae,ue,{end:le}){ee(ae)&&(ae=ae.writable);const se=ae.getWriter();try{for await(const k of O)await se.ready,se.write(k).catch(()=>{});await se.ready,le&&await se.close(),ue()}catch(k){try{await se.abort(k),ue(k)}catch(U){ue(U)}}}function b(...O){return T(O,a(re(O)))}function T(O,ae,ue){if(O.length===1&&t(O[0])&&(O=O[0]),O.length<2)throw new _("streams");const le=new P,se=le.signal,k=ue?.signal,U=[];R(k,"options.signal");function ne(){B(new E)}x=x||mt().addAbortListener;let ce;k&&(ce=x(k,ne));let H,l;const f=[];let A=0;function j(J){B(J,--A===0)}function B(J,W){var fe;if(J&&(!H||H.code==="ERR_STREAM_PREMATURE_CLOSE")&&(H=J),!(!H&&!W)){for(;f.length;)f.shift()(H);(fe=ce)===null||fe===void 0||fe[i](),le.abort(),W&&(H||U.forEach(we=>we()),e.nextTick(ae,H,l))}}let q;for(let J=0;J<O.length;J++){const W=O[J],fe=J<O.length-1,we=J>0,pe=fe||ue?.end!==!1,ve=J===O.length-1;if(Y(W)){let Ae=function(Ce){Ce&&Ce.name!=="AbortError"&&Ce.code!=="ERR_STREAM_PREMATURE_CLOSE"&&j(Ce)};if(pe){const{destroy:Ce,cleanup:De}=X(W,fe,we);f.push(Ce),v(W)&&ve&&U.push(De)}W.on("error",Ae),v(W)&&ve&&U.push(()=>{W.removeListener("error",Ae)})}if(J===0)if(typeof W=="function"){if(q=W({signal:se}),!S(q))throw new g("Iterable, AsyncIterable or Stream","source",q)}else S(W)||Q(W)||ee(W)?q=W:q=c.from(W);else if(typeof W=="function"){if(ee(q)){var w;q=ie((w=q)===null||w===void 0?void 0:w.readable)}else q=ie(q);if(q=W(q,{signal:se}),fe){if(!S(q,!0))throw new g("AsyncIterable",`transform[${J-1}]`,q)}else{var L;D||(D=cp());const Ae=new D({objectMode:!0}),Ce=(L=q)===null||L===void 0?void 0:L.then;if(typeof Ce=="function")A++,Ce.call(q,Me=>{l=Me,Me!=null&&Ae.write(Me),pe&&Ae.end(),e.nextTick(j)},Me=>{Ae.destroy(Me),e.nextTick(j,Me)});else if(S(q,!0))A++,F(q,Ae,j,{end:pe});else if(V(q)||ee(q)){const Me=q.readable||q;A++,F(Me,Ae,j,{end:pe})}else throw new g("AsyncIterable or Promise","destination",q);q=Ae;const{destroy:De,cleanup:Ft}=X(q,!1,!0);f.push(De),ve&&U.push(Ft)}}else if(Y(W)){if(Q(q)){A+=2;const Ae=Z(q,W,j,{end:pe});v(W)&&ve&&U.push(Ae)}else if(ee(q)||V(q)){const Ae=q.readable||q;A++,F(Ae,W,j,{end:pe})}else if(S(q))A++,F(q,W,j,{end:pe});else throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],q);q=W}else if(te(W)){if(Q(q))A++,oe(ie(q),W,j,{end:pe});else if(V(q)||S(q))A++,oe(q,W,j,{end:pe});else if(ee(q))A++,oe(q.readable,W,j,{end:pe});else throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],q);q=W}else q=c.from(W)}return(se!=null&&se.aborted||k!=null&&k.aborted)&&e.nextTick(ne),q}function Z(O,ae,ue,{end:le}){let se=!1;if(ae.on("close",()=>{se||ue(new C)}),O.pipe(ae,{end:!1}),le){let k=function(){se=!0,ae.end()};de(O)?e.nextTick(k):O.once("end",k)}else ue();return o(O,{readable:!0,writable:!1},k=>{const U=O._readableState;k&&k.code==="ERR_STREAM_PREMATURE_CLOSE"&&U&&U.ended&&!U.errored&&!U.errorEmitted?O.once("end",ue).once("error",ue):ue(k)}),o(ae,{readable:!1,writable:!0},ue)}return Wa={pipelineImpl:T,pipeline:b},Wa}var Ha,qc;function dp(){if(qc)return Ha;qc=1;const{pipeline:e}=Zl(),t=nr(),{destroyer:r}=Cn(),{isNodeStream:n,isReadable:i,isWritable:o,isWebStream:a,isTransformStream:s,isWritableStream:c,isReadableStream:d}=ar(),{AbortError:p,codes:{ERR_INVALID_ARG_VALUE:g,ERR_MISSING_ARGS:_}}=ft(),I=vr();return Ha=function(...E){if(E.length===0)throw new _("streams");if(E.length===1)return t.from(E[0]);const m=[...E];if(typeof E[0]=="function"&&(E[0]=t.from(E[0])),typeof E[E.length-1]=="function"){const D=E.length-1;E[D]=t.from(E[D])}for(let D=0;D<E.length;++D)if(!(!n(E[D])&&!a(E[D]))){if(D<E.length-1&&!(i(E[D])||d(E[D])||s(E[D])))throw new g(`streams[${D}]`,m[D],"must be readable");if(D>0&&!(o(E[D])||c(E[D])||s(E[D])))throw new g(`streams[${D}]`,m[D],"must be writable")}let R,S,v,Q,Y;function ee(D){const z=Q;Q=null,z?z(D):D?Y.destroy(D):!P&&!de&&Y.destroy()}const te=E[0],V=e(E,ee),de=!!(o(te)||c(te)||s(te)),P=!!(i(V)||d(V)||s(V));if(Y=new t({writableObjectMode:!!(te!=null&&te.writableObjectMode),readableObjectMode:!!(V!=null&&V.readableObjectMode),writable:de,readable:P}),de){if(n(te))Y._write=function(z,x,X){te.write(z,x)?X():R=X},Y._final=function(z){te.end(),S=z},te.on("drain",function(){if(R){const z=R;R=null,z()}});else if(a(te)){const x=(s(te)?te.writable:te).getWriter();Y._write=async function(X,re,ie){try{await x.ready,x.write(X).catch(()=>{}),ie()}catch(he){ie(he)}},Y._final=async function(X){try{await x.ready,x.close().catch(()=>{}),S=X}catch(re){X(re)}}}const D=s(V)?V.readable:V;I(D,()=>{if(S){const z=S;S=null,z()}})}if(P){if(n(V))V.on("readable",function(){if(v){const D=v;v=null,D()}}),V.on("end",function(){Y.push(null)}),Y._read=function(){for(;;){const D=V.read();if(D===null){v=Y._read;return}if(!Y.push(D))return}};else if(a(V)){const z=(s(V)?V.readable:V).getReader();Y._read=async function(){for(;;)try{const{value:x,done:X}=await z.read();if(!Y.push(x))return;if(X){Y.push(null);return}}catch{return}}}}return Y._destroy=function(D,z){!D&&Q!==null&&(D=new p),v=null,R=null,S=null,Q===null?z(D):(Q=z,n(V)&&r(V,D))},Y},Ha}var Kc;function zw(){if(Kc)return oo;Kc=1;const e=globalThis.AbortController||Qt().AbortController,{codes:{ERR_INVALID_ARG_VALUE:t,ERR_INVALID_ARG_TYPE:r,ERR_MISSING_ARGS:n,ERR_OUT_OF_RANGE:i},AbortError:o}=ft(),{validateAbortSignal:a,validateInteger:s,validateObject:c}=Ji(),d=Le().Symbol("kWeak"),p=Le().Symbol("kResistStopPropagation"),{finished:g}=vr(),_=dp(),{addAbortSignalNoValidate:I}=ea(),{isWritable:C,isNodeStream:E}=ar(),{deprecate:m}=mt(),{ArrayPrototypePush:R,Boolean:S,MathFloor:v,Number:Q,NumberIsNaN:Y,Promise:ee,PromiseReject:te,PromiseResolve:V,PromisePrototypeThen:de,Symbol:P}=Le(),D=P("kEmpty"),z=P("kEof");function x(k,U){if(U!=null&&c(U,"options"),U?.signal!=null&&a(U.signal,"options.signal"),E(k)&&!C(k))throw new t("stream",k,"must be writable");const ne=_(this,k);return U!=null&&U.signal&&I(U.signal,ne),ne}function X(k,U){if(typeof k!="function")throw new r("fn",["Function","AsyncFunction"],k);U!=null&&c(U,"options"),U?.signal!=null&&a(U.signal,"options.signal");let ne=1;U?.concurrency!=null&&(ne=v(U.concurrency));let ce=ne-1;return U?.highWaterMark!=null&&(ce=v(U.highWaterMark)),s(ne,"options.concurrency",1),s(ce,"options.highWaterMark",0),ce+=ne,(async function*(){const l=mt().AbortSignalAny([U?.signal].filter(S)),f=this,A=[],j={signal:l};let B,q,w=!1,L=0;function J(){w=!0,W()}function W(){L-=1,fe()}function fe(){q&&!w&&L<ne&&A.length<ce&&(q(),q=null)}async function we(){try{for await(let pe of f){if(w)return;if(l.aborted)throw new o;try{if(pe=k(pe,j),pe===D)continue;pe=V(pe)}catch(ve){pe=te(ve)}L+=1,de(pe,W,J),A.push(pe),B&&(B(),B=null),!w&&(A.length>=ce||L>=ne)&&await new ee(ve=>{q=ve})}A.push(z)}catch(pe){const ve=te(pe);de(ve,W,J),A.push(ve)}finally{w=!0,B&&(B(),B=null)}}we();try{for(;;){for(;A.length>0;){const pe=await A[0];if(pe===z)return;if(l.aborted)throw new o;pe!==D&&(yield pe),A.shift(),fe()}await new ee(pe=>{B=pe})}}finally{w=!0,q&&(q(),q=null)}}).call(this)}function re(k=void 0){return k!=null&&c(k,"options"),k?.signal!=null&&a(k.signal,"options.signal"),(async function*(){let ne=0;for await(const H of this){var ce;if(k!=null&&(ce=k.signal)!==null&&ce!==void 0&&ce.aborted)throw new o({cause:k.signal.reason});yield[ne++,H]}}).call(this)}async function ie(k,U=void 0){for await(const ne of b.call(this,k,U))return!0;return!1}async function he(k,U=void 0){if(typeof k!="function")throw new r("fn",["Function","AsyncFunction"],k);return!await ie.call(this,async(...ne)=>!await k(...ne),U)}async function F(k,U){for await(const ne of b.call(this,k,U))return ne}async function oe(k,U){if(typeof k!="function")throw new r("fn",["Function","AsyncFunction"],k);async function ne(ce,H){return await k(ce,H),D}for await(const ce of X.call(this,ne,U));}function b(k,U){if(typeof k!="function")throw new r("fn",["Function","AsyncFunction"],k);async function ne(ce,H){return await k(ce,H)?ce:D}return X.call(this,ne,U)}class T extends n{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}async function Z(k,U,ne){var ce;if(typeof k!="function")throw new r("reducer",["Function","AsyncFunction"],k);ne!=null&&c(ne,"options"),ne?.signal!=null&&a(ne.signal,"options.signal");let H=arguments.length>1;if(ne!=null&&(ce=ne.signal)!==null&&ce!==void 0&&ce.aborted){const B=new o(void 0,{cause:ne.signal.reason});throw this.once("error",()=>{}),await g(this.destroy(B)),B}const l=new e,f=l.signal;if(ne!=null&&ne.signal){const B={once:!0,[d]:this,[p]:!0};ne.signal.addEventListener("abort",()=>l.abort(),B)}let A=!1;try{for await(const B of this){var j;if(A=!0,ne!=null&&(j=ne.signal)!==null&&j!==void 0&&j.aborted)throw new o;H?U=await k(U,B,{signal:f}):(U=B,H=!0)}if(!A&&!H)throw new T}finally{l.abort()}return U}async function O(k){k!=null&&c(k,"options"),k?.signal!=null&&a(k.signal,"options.signal");const U=[];for await(const ce of this){var ne;if(k!=null&&(ne=k.signal)!==null&&ne!==void 0&&ne.aborted)throw new o(void 0,{cause:k.signal.reason});R(U,ce)}return U}function ae(k,U){const ne=X.call(this,k,U);return(async function*(){for await(const H of ne)yield*H}).call(this)}function ue(k){if(k=Q(k),Y(k))return 0;if(k<0)throw new i("number",">= 0",k);return k}function le(k,U=void 0){return U!=null&&c(U,"options"),U?.signal!=null&&a(U.signal,"options.signal"),k=ue(k),(async function*(){var ce;if(U!=null&&(ce=U.signal)!==null&&ce!==void 0&&ce.aborted)throw new o;for await(const l of this){var H;if(U!=null&&(H=U.signal)!==null&&H!==void 0&&H.aborted)throw new o;k--<=0&&(yield l)}}).call(this)}function se(k,U=void 0){return U!=null&&c(U,"options"),U?.signal!=null&&a(U.signal,"options.signal"),k=ue(k),(async function*(){var ce;if(U!=null&&(ce=U.signal)!==null&&ce!==void 0&&ce.aborted)throw new o;for await(const l of this){var H;if(U!=null&&(H=U.signal)!==null&&H!==void 0&&H.aborted)throw new o;if(k-- >0&&(yield l),k<=0)return}}).call(this)}return oo.streamReturningOperators={asIndexedPairs:m(re,"readable.asIndexedPairs will be removed in a future version."),drop:le,filter:b,flatMap:ae,map:X,take:se,compose:x},oo.promiseReturningOperators={every:he,forEach:oe,reduce:Z,toArray:O,some:ie,find:F},oo}var Va,zc;function fp(){if(zc)return Va;zc=1;const{ArrayPrototypePop:e,Promise:t}=Le(),{isIterable:r,isNodeStream:n,isWebStream:i}=ar(),{pipelineImpl:o}=Zl(),{finished:a}=vr();hp();function s(...c){return new t((d,p)=>{let g,_;const I=c[c.length-1];if(I&&typeof I=="object"&&!n(I)&&!r(I)&&!i(I)){const C=e(c);g=C.signal,_=C.end}o(c,(C,E)=>{C?p(C):d(E)},{signal:g,end:_})})}return Va={finished:a,pipeline:s},Va}var Wc;function hp(){if(Wc)return xa.exports;Wc=1;const{Buffer:e}=vt(),{ObjectDefineProperty:t,ObjectKeys:r,ReflectApply:n}=Le(),{promisify:{custom:i}}=mt(),{streamReturningOperators:o,promiseReturningOperators:a}=zw(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:s}}=ft(),c=dp(),{setDefaultHighWaterMark:d,getDefaultHighWaterMark:p}=ta(),{pipeline:g}=Zl(),{destroyer:_}=Cn(),I=vr(),C=fp(),E=ar(),m=xa.exports=Yl().Stream;m.isDestroyed=E.isDestroyed,m.isDisturbed=E.isDisturbed,m.isErrored=E.isErrored,m.isReadable=E.isReadable,m.isWritable=E.isWritable,m.Readable=ra();for(const S of r(o)){let Q=function(...Y){if(new.target)throw s();return m.Readable.from(n(v,this,Y))};const v=o[S];t(Q,"name",{__proto__:null,value:v.name}),t(Q,"length",{__proto__:null,value:v.length}),t(m.Readable.prototype,S,{__proto__:null,value:Q,enumerable:!1,configurable:!0,writable:!0})}for(const S of r(a)){let Q=function(...Y){if(new.target)throw s();return n(v,this,Y)};const v=a[S];t(Q,"name",{__proto__:null,value:v.name}),t(Q,"length",{__proto__:null,value:v.length}),t(m.Readable.prototype,S,{__proto__:null,value:Q,enumerable:!1,configurable:!0,writable:!0})}m.Writable=Xl(),m.Duplex=nr(),m.Transform=up(),m.PassThrough=cp(),m.pipeline=g;const{addAbortSignal:R}=ea();return m.addAbortSignal=R,m.finished=I,m.destroy=_,m.compose=c,m.setDefaultHighWaterMark=d,m.getDefaultHighWaterMark=p,t(m,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return C}}),t(g,i,{__proto__:null,enumerable:!0,get(){return C.pipeline}}),t(I,i,{__proto__:null,enumerable:!0,get(){return C.finished}}),m.Stream=m,m._isUint8Array=function(v){return v instanceof Uint8Array},m._uint8ArrayToBuffer=function(v){return e.from(v.buffer,v.byteOffset,v.byteLength)},xa.exports}var Hc;function Ww(){return Hc||(Hc=1,(function(e){const t=hp(),r=fp(),n=t.Readable.destroy;e.exports=t.Readable,e.exports._uint8ArrayToBuffer=t._uint8ArrayToBuffer,e.exports._isUint8Array=t._isUint8Array,e.exports.isDisturbed=t.isDisturbed,e.exports.isErrored=t.isErrored,e.exports.isReadable=t.isReadable,e.exports.Readable=t.Readable,e.exports.Writable=t.Writable,e.exports.Duplex=t.Duplex,e.exports.Transform=t.Transform,e.exports.PassThrough=t.PassThrough,e.exports.addAbortSignal=t.addAbortSignal,e.exports.finished=t.finished,e.exports.destroy=t.destroy,e.exports.destroy=n,e.exports.pipeline=t.pipeline,e.exports.compose=t.compose,Object.defineProperty(t,"promises",{configurable:!0,enumerable:!0,get(){return r}}),e.exports.Stream=t.Stream,e.exports.default=e.exports})(Ea)),Ea.exports}var Vc;function Hw(){if(Vc)return Jn;Vc=1,Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.ActorQueryResultSerializeStats=void 0;const e=ip(),t=Ow(),r=_r(),n=ap(),i=Ww();let o=class extends e.ActorQueryResultSerializeFixedMediaTypes{constructor(s){super(s)}async testHandleChecked(s,c){return["bindings","quads"].includes(s.type)?(0,r.passTestVoid)():(0,r.failTest)("This actor can only handle bindings streams or quad streams.")}pushHeader(s){const c=["Result","Delay (ms)","HTTP requests"].join(",");s.push(`${c}
12
- `)}createStat(s,c){return`${[c,this.delay(s),this.httpObserver.requests].join(",")}
13
- `}createSpecialLine(s,c){return`${[s,this.delay(c),this.httpObserver.requests].join(",")}
14
- `}async runHandle(s,c,d){const p=new i.Readable,g=s.type==="bindings"?s.bindingsStream:s.quadStream,_=s.context.getSafe(t.KeysInitQuery.queryTimestampHighResolution);let I=1;function*C(m){yield m()}const E=(0,n.wrap)(g).map(()=>this.createStat(_,I++)).prepend([this.createSpecialLine("PLANNING",_)]).append((0,n.wrap)(C(()=>this.createSpecialLine("TOTAL",_))));return this.pushHeader(p),p.wrap(E),{data:p}}now(){return performance.now()}delay(s){return this.now()-s}};return Jn.ActorQueryResultSerializeStats=o,Jn}var Qc;function Vw(){return Qc||(Qc=1,(function(e){var t=Pr&&Pr.__createBinding||(Object.create?(function(n,i,o,a){a===void 0&&(a=o);var s=Object.getOwnPropertyDescriptor(i,o);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,a,s)}):(function(n,i,o,a){a===void 0&&(a=o),n[a]=i[o]})),r=Pr&&Pr.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,n,o)};Object.defineProperty(e,"__esModule",{value:!0}),r(Mw(),e),r(Hw(),e)})(Pr)),Pr}var Qw=Vw(),Fr={},ri={},Gc;function Gw(){if(Gc)return ri;Gc=1,Object.defineProperty(ri,"__esModule",{value:!0}),ri.ActionObserverHttp=void 0;const e=_r();let t=class extends e.ActionObserver{constructor(n){super(n),this.requests=0,this.bus.subscribeObserver(this),this.httpInvalidator.addInvalidateListener(()=>{this.requests=0})}onRun(n,i,o){this.observedActors.includes(n.name)&&this.requests++}};return ri.ActionObserverHttp=t,ri}var ni={},Qa={exports:{}},Ga={exports:{}},Ja,Jc;function Ue(){if(Jc)return Ja;Jc=1;class e extends Error{constructor(r){if(!Array.isArray(r))throw new TypeError(`Expected input to be an Array, got ${typeof r}`);let n="";for(let i=0;i<r.length;i++)n+=` ${r[i].stack}
15
- `;super(n),this.name="AggregateError",this.errors=r}}return Ja={AggregateError:e,ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,r){return t.includes(r)},ArrayPrototypeIndexOf(t,r){return t.indexOf(r)},ArrayPrototypeJoin(t,r){return t.join(r)},ArrayPrototypeMap(t,r){return t.map(r)},ArrayPrototypePop(t,r){return t.pop(r)},ArrayPrototypePush(t,r){return t.push(r)},ArrayPrototypeSlice(t,r,n){return t.slice(r,n)},Error,FunctionPrototypeCall(t,r,...n){return t.call(r,...n)},FunctionPrototypeSymbolHasInstance(t,r){return Function.prototype[Symbol.hasInstance].call(t,r)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,r){return Object.defineProperties(t,r)},ObjectDefineProperty(t,r,n){return Object.defineProperty(t,r,n)},ObjectGetOwnPropertyDescriptor(t,r){return Object.getOwnPropertyDescriptor(t,r)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,r){return Object.setPrototypeOf(t,r)},Promise,PromisePrototypeCatch(t,r){return t.catch(r)},PromisePrototypeThen(t,r,n){return t.then(r,n)},PromiseReject(t){return Promise.reject(t)},PromiseResolve(t){return Promise.resolve(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,r){return t.test(r)},SafeSet:Set,String,StringPrototypeSlice(t,r,n){return t.slice(r,n)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(t,r,n){return t.set(r,n)},Boolean,Uint8Array},Ja}var Ya={exports:{}},Xa,Yc;function pp(){return Yc||(Yc=1,Xa={format(e,...t){return e.replace(/%([sdifj])/g,function(...[r,n]){const i=t.shift();return n==="f"?i.toFixed(6):n==="j"?JSON.stringify(i):n==="s"&&typeof i=="object"?`${i.constructor!==Object?i.constructor.name:""} {}`.trim():i.toString()})},inspect(e){switch(typeof e){case"string":if(e.includes("'"))if(e.includes('"')){if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}else return`"${e}"`;return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}}}),Xa}var Za,Xc;function ht(){if(Xc)return Za;Xc=1;const{format:e,inspect:t}=pp(),{AggregateError:r}=Ue(),n=globalThis.AggregateError||r,i=Symbol("kIsNodeError"),o=["string","function","number","object","Function","Object","boolean","bigint","symbol"],a=/^([A-Z][a-z0-9]*)+$/,s="__node_internal_",c={};function d(m,R){if(!m)throw new c.ERR_INTERNAL_ASSERTION(R)}function p(m){let R="",S=m.length;const v=m[0]==="-"?1:0;for(;S>=v+4;S-=3)R=`_${m.slice(S-3,S)}${R}`;return`${m.slice(0,S)}${R}`}function g(m,R,S){if(typeof R=="function")return d(R.length<=S.length,`Code: ${m}; The provided arguments length (${S.length}) does not match the required ones (${R.length}).`),R(...S);const v=(R.match(/%[dfijoOs]/g)||[]).length;return d(v===S.length,`Code: ${m}; The provided arguments length (${S.length}) does not match the required ones (${v}).`),S.length===0?R:e(R,...S)}function _(m,R,S){S||(S=Error);class v extends S{constructor(...Y){super(g(m,R,Y))}toString(){return`${this.name} [${m}]: ${this.message}`}}Object.defineProperties(v.prototype,{name:{value:S.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${m}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),v.prototype.code=m,v.prototype[i]=!0,c[m]=v}function I(m){const R=s+m.name;return Object.defineProperty(m,"name",{value:R}),m}function C(m,R){if(m&&R&&m!==R){if(Array.isArray(R.errors))return R.errors.push(m),R;const S=new n([R,m],R.message);return S.code=R.code,S}return m||R}class E extends Error{constructor(R="The operation was aborted",S=void 0){if(S!==void 0&&typeof S!="object")throw new c.ERR_INVALID_ARG_TYPE("options","Object",S);super(R,S),this.code="ABORT_ERR",this.name="AbortError"}}return _("ERR_ASSERTION","%s",Error),_("ERR_INVALID_ARG_TYPE",(m,R,S)=>{d(typeof m=="string","'name' must be a string"),Array.isArray(R)||(R=[R]);let v="The ";m.endsWith(" argument")?v+=`${m} `:v+=`"${m}" ${m.includes(".")?"property":"argument"} `,v+="must be ";const Q=[],Y=[],ee=[];for(const V of R)d(typeof V=="string","All expected entries have to be of type string"),o.includes(V)?Q.push(V.toLowerCase()):a.test(V)?Y.push(V):(d(V!=="object",'The value "object" should be written as "Object"'),ee.push(V));if(Y.length>0){const V=Q.indexOf("object");V!==-1&&(Q.splice(Q,V,1),Y.push("Object"))}if(Q.length>0){switch(Q.length){case 1:v+=`of type ${Q[0]}`;break;case 2:v+=`one of type ${Q[0]} or ${Q[1]}`;break;default:{const V=Q.pop();v+=`one of type ${Q.join(", ")}, or ${V}`}}(Y.length>0||ee.length>0)&&(v+=" or ")}if(Y.length>0){switch(Y.length){case 1:v+=`an instance of ${Y[0]}`;break;case 2:v+=`an instance of ${Y[0]} or ${Y[1]}`;break;default:{const V=Y.pop();v+=`an instance of ${Y.join(", ")}, or ${V}`}}ee.length>0&&(v+=" or ")}switch(ee.length){case 0:break;case 1:ee[0].toLowerCase()!==ee[0]&&(v+="an "),v+=`${ee[0]}`;break;case 2:v+=`one of ${ee[0]} or ${ee[1]}`;break;default:{const V=ee.pop();v+=`one of ${ee.join(", ")}, or ${V}`}}if(S==null)v+=`. Received ${S}`;else if(typeof S=="function"&&S.name)v+=`. Received function ${S.name}`;else if(typeof S=="object"){var te;if((te=S.constructor)!==null&&te!==void 0&&te.name)v+=`. Received an instance of ${S.constructor.name}`;else{const V=t(S,{depth:-1});v+=`. Received ${V}`}}else{let V=t(S,{colors:!1});V.length>25&&(V=`${V.slice(0,25)}...`),v+=`. Received type ${typeof S} (${V})`}return v},TypeError),_("ERR_INVALID_ARG_VALUE",(m,R,S="is invalid")=>{let v=t(R);return v.length>128&&(v=v.slice(0,128)+"..."),`The ${m.includes(".")?"property":"argument"} '${m}' ${S}. Received ${v}`},TypeError),_("ERR_INVALID_RETURN_VALUE",(m,R,S)=>{var v;const Q=S!=null&&(v=S.constructor)!==null&&v!==void 0&&v.name?`instance of ${S.constructor.name}`:`type ${typeof S}`;return`Expected ${m} to be returned from the "${R}" function but got ${Q}.`},TypeError),_("ERR_MISSING_ARGS",(...m)=>{d(m.length>0,"At least one arg needs to be specified");let R;const S=m.length;switch(m=(Array.isArray(m)?m:[m]).map(v=>`"${v}"`).join(" or "),S){case 1:R+=`The ${m[0]} argument`;break;case 2:R+=`The ${m[0]} and ${m[1]} arguments`;break;default:{const v=m.pop();R+=`The ${m.join(", ")}, and ${v} arguments`}break}return`${R} must be specified`},TypeError),_("ERR_OUT_OF_RANGE",(m,R,S)=>{d(R,'Missing "range" argument');let v;if(Number.isInteger(S)&&Math.abs(S)>2**32)v=p(String(S));else if(typeof S=="bigint"){v=String(S);const Q=BigInt(2)**BigInt(32);(S>Q||S<-Q)&&(v=p(v)),v+="n"}else v=t(S);return`The value of "${m}" is out of range. It must be ${R}. Received ${v}`},RangeError),_("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),_("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),_("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),_("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),_("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),_("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),_("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),_("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),_("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),_("ERR_STREAM_WRITE_AFTER_END","write after end",Error),_("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),Za={AbortError:E,aggregateTwoErrors:I(C),hideStackFrames:I,codes:c},Za}var Zc;function wt(){return Zc||(Zc=1,(function(e){const t=vt(),{format:r,inspect:n}=pp(),{codes:{ERR_INVALID_ARG_TYPE:i}}=ht(),{kResistStopPropagation:o,AggregateError:a,SymbolDispose:s}=Ue(),c=globalThis.AbortSignal||Qt().AbortSignal,d=globalThis.AbortController||Qt().AbortController,p=Object.getPrototypeOf(async function(){}).constructor,g=globalThis.Blob||t.Blob,_=typeof g<"u"?function(m){return m instanceof g}:function(m){return!1},I=(E,m)=>{if(E!==void 0&&(E===null||typeof E!="object"||!("aborted"in E)))throw new i(m,"AbortSignal",E)},C=(E,m)=>{if(typeof E!="function")throw new i(m,"Function",E)};e.exports={AggregateError:a,kEmptyObject:Object.freeze({}),once(E){let m=!1;return function(...R){m||(m=!0,E.apply(this,R))}},createDeferredPromise:function(){let E,m;return{promise:new Promise((S,v)=>{E=S,m=v}),resolve:E,reject:m}},promisify(E){return new Promise((m,R)=>{E((S,...v)=>S?R(S):m(...v))})},debuglog(){return function(){}},format:r,inspect:n,types:{isAsyncFunction(E){return E instanceof p},isArrayBufferView(E){return ArrayBuffer.isView(E)}},isBlob:_,deprecate(E,m){return E},addAbortListener:or().addAbortListener||function(m,R){if(m===void 0)throw new i("signal","AbortSignal",m);I(m,"signal"),C(R,"listener");let S;return m.aborted?queueMicrotask(()=>R()):(m.addEventListener("abort",R,{__proto__:null,once:!0,[o]:!0}),S=()=>{m.removeEventListener("abort",R)}),{__proto__:null,[s](){var v;(v=S)===null||v===void 0||v()}}},AbortSignalAny:c.any||function(m){if(m.length===1)return m[0];const R=new d,S=()=>R.abort();return m.forEach(v=>{I(v,"signals"),v.addEventListener("abort",S,{once:!0})}),R.signal.addEventListener("abort",()=>{m.forEach(v=>v.removeEventListener("abort",S))},{once:!0}),R.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")})(Ya)),Ya.exports}var so={},$a,$c;function Yi(){if($c)return $a;$c=1;const{ArrayIsArray:e,ArrayPrototypeIncludes:t,ArrayPrototypeJoin:r,ArrayPrototypeMap:n,NumberIsInteger:i,NumberIsNaN:o,NumberMAX_SAFE_INTEGER:a,NumberMIN_SAFE_INTEGER:s,NumberParseInt:c,ObjectPrototypeHasOwnProperty:d,RegExpPrototypeExec:p,String:g,StringPrototypeToUpperCase:_,StringPrototypeTrim:I}=Ue(),{hideStackFrames:C,codes:{ERR_SOCKET_BAD_PORT:E,ERR_INVALID_ARG_TYPE:m,ERR_INVALID_ARG_VALUE:R,ERR_OUT_OF_RANGE:S,ERR_UNKNOWN_SIGNAL:v}}=ht(),{normalizeEncoding:Q}=wt(),{isAsyncFunction:Y,isArrayBufferView:ee}=wt().types,te={};function V(w){return w===(w|0)}function de(w){return w===w>>>0}const P=/^[0-7]+$/,D="must be a 32-bit unsigned integer or an octal string";function z(w,L,J){if(typeof w>"u"&&(w=J),typeof w=="string"){if(p(P,w)===null)throw new R(L,w,D);w=c(w,8)}return re(w,L),w}const x=C((w,L,J=s,W=a)=>{if(typeof w!="number")throw new m(L,"number",w);if(!i(w))throw new S(L,"an integer",w);if(w<J||w>W)throw new S(L,`>= ${J} && <= ${W}`,w)}),X=C((w,L,J=-2147483648,W=2147483647)=>{if(typeof w!="number")throw new m(L,"number",w);if(!i(w))throw new S(L,"an integer",w);if(w<J||w>W)throw new S(L,`>= ${J} && <= ${W}`,w)}),re=C((w,L,J=!1)=>{if(typeof w!="number")throw new m(L,"number",w);if(!i(w))throw new S(L,"an integer",w);const W=J?1:0,fe=4294967295;if(w<W||w>fe)throw new S(L,`>= ${W} && <= ${fe}`,w)});function ie(w,L){if(typeof w!="string")throw new m(L,"string",w)}function he(w,L,J=void 0,W){if(typeof w!="number")throw new m(L,"number",w);if(J!=null&&w<J||W!=null&&w>W||(J!=null||W!=null)&&o(w))throw new S(L,`${J!=null?`>= ${J}`:""}${J!=null&&W!=null?" && ":""}${W!=null?`<= ${W}`:""}`,w)}const F=C((w,L,J)=>{if(!t(J,w)){const fe="must be one of: "+r(n(J,we=>typeof we=="string"?`'${we}'`:g(we)),", ");throw new R(L,w,fe)}});function oe(w,L){if(typeof w!="boolean")throw new m(L,"boolean",w)}function b(w,L,J){return w==null||!d(w,L)?J:w[L]}const T=C((w,L,J=null)=>{const W=b(J,"allowArray",!1),fe=b(J,"allowFunction",!1);if(!b(J,"nullable",!1)&&w===null||!W&&e(w)||typeof w!="object"&&(!fe||typeof w!="function"))throw new m(L,"Object",w)}),Z=C((w,L)=>{if(w!=null&&typeof w!="object"&&typeof w!="function")throw new m(L,"a dictionary",w)}),O=C((w,L,J=0)=>{if(!e(w))throw new m(L,"Array",w);if(w.length<J){const W=`must be longer than ${J}`;throw new R(L,w,W)}});function ae(w,L){O(w,L);for(let J=0;J<w.length;J++)ie(w[J],`${L}[${J}]`)}function ue(w,L){O(w,L);for(let J=0;J<w.length;J++)oe(w[J],`${L}[${J}]`)}function le(w,L){O(w,L);for(let J=0;J<w.length;J++){const W=w[J],fe=`${L}[${J}]`;if(W==null)throw new m(fe,"AbortSignal",W);ce(W,fe)}}function se(w,L="signal"){if(ie(w,L),te[w]===void 0)throw te[_(w)]!==void 0?new v(w+" (signals must use all capital letters)"):new v(w)}const k=C((w,L="buffer")=>{if(!ee(w))throw new m(L,["Buffer","TypedArray","DataView"],w)});function U(w,L){const J=Q(L),W=w.length;if(J==="hex"&&W%2!==0)throw new R("encoding",L,`is invalid for data of length ${W}`)}function ne(w,L="Port",J=!0){if(typeof w!="number"&&typeof w!="string"||typeof w=="string"&&I(w).length===0||+w!==+w>>>0||w>65535||w===0&&!J)throw new E(L,w,J);return w|0}const ce=C((w,L)=>{if(w!==void 0&&(w===null||typeof w!="object"||!("aborted"in w)))throw new m(L,"AbortSignal",w)}),H=C((w,L)=>{if(typeof w!="function")throw new m(L,"Function",w)}),l=C((w,L)=>{if(typeof w!="function"||Y(w))throw new m(L,"Function",w)}),f=C((w,L)=>{if(w!==void 0)throw new m(L,"undefined",w)});function A(w,L,J){if(!t(J,w))throw new m(L,`('${r(J,"|")}')`,w)}const j=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function B(w,L){if(typeof w>"u"||!p(j,w))throw new R(L,w,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function q(w){if(typeof w=="string")return B(w,"hints"),w;if(e(w)){const L=w.length;let J="";if(L===0)return J;for(let W=0;W<L;W++){const fe=w[W];B(fe,"hints"),J+=fe,W!==L-1&&(J+=", ")}return J}throw new R("hints",w,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}return $a={isInt32:V,isUint32:de,parseFileMode:z,validateArray:O,validateStringArray:ae,validateBooleanArray:ue,validateAbortSignalArray:le,validateBoolean:oe,validateBuffer:k,validateDictionary:Z,validateEncoding:U,validateFunction:H,validateInt32:X,validateInteger:x,validateNumber:he,validateObject:T,validateOneOf:F,validatePlainFunction:l,validatePort:ne,validateSignalName:se,validateString:ie,validateUint32:re,validateUndefined:f,validateUnion:A,validateAbortSignal:ce,validateLinkHeaderValue:q},$a}var lo={exports:{}},es,ed;function sr(){if(ed)return es;ed=1;const{SymbolAsyncIterator:e,SymbolIterator:t,SymbolFor:r}=Ue(),n=r("nodejs.stream.destroyed"),i=r("nodejs.stream.errored"),o=r("nodejs.stream.readable"),a=r("nodejs.stream.writable"),s=r("nodejs.stream.disturbed"),c=r("nodejs.webstream.isClosedPromise"),d=r("nodejs.webstream.controllerErrorFunction");function p(b,T=!1){var Z;return!!(b&&typeof b.pipe=="function"&&typeof b.on=="function"&&(!T||typeof b.pause=="function"&&typeof b.resume=="function")&&(!b._writableState||((Z=b._readableState)===null||Z===void 0?void 0:Z.readable)!==!1)&&(!b._writableState||b._readableState))}function g(b){var T;return!!(b&&typeof b.write=="function"&&typeof b.on=="function"&&(!b._readableState||((T=b._writableState)===null||T===void 0?void 0:T.writable)!==!1))}function _(b){return!!(b&&typeof b.pipe=="function"&&b._readableState&&typeof b.on=="function"&&typeof b.write=="function")}function I(b){return b&&(b._readableState||b._writableState||typeof b.write=="function"&&typeof b.on=="function"||typeof b.pipe=="function"&&typeof b.on=="function")}function C(b){return!!(b&&!I(b)&&typeof b.pipeThrough=="function"&&typeof b.getReader=="function"&&typeof b.cancel=="function")}function E(b){return!!(b&&!I(b)&&typeof b.getWriter=="function"&&typeof b.abort=="function")}function m(b){return!!(b&&!I(b)&&typeof b.readable=="object"&&typeof b.writable=="object")}function R(b){return C(b)||E(b)||m(b)}function S(b,T){return b==null?!1:T===!0?typeof b[e]=="function":T===!1?typeof b[t]=="function":typeof b[e]=="function"||typeof b[t]=="function"}function v(b){if(!I(b))return null;const T=b._writableState,Z=b._readableState,O=T||Z;return!!(b.destroyed||b[n]||O!=null&&O.destroyed)}function Q(b){if(!g(b))return null;if(b.writableEnded===!0)return!0;const T=b._writableState;return T!=null&&T.errored?!1:typeof T?.ended!="boolean"?null:T.ended}function Y(b,T){if(!g(b))return null;if(b.writableFinished===!0)return!0;const Z=b._writableState;return Z!=null&&Z.errored?!1:typeof Z?.finished!="boolean"?null:!!(Z.finished||T===!1&&Z.ended===!0&&Z.length===0)}function ee(b){if(!p(b))return null;if(b.readableEnded===!0)return!0;const T=b._readableState;return!T||T.errored?!1:typeof T?.ended!="boolean"?null:T.ended}function te(b,T){if(!p(b))return null;const Z=b._readableState;return Z!=null&&Z.errored?!1:typeof Z?.endEmitted!="boolean"?null:!!(Z.endEmitted||T===!1&&Z.ended===!0&&Z.length===0)}function V(b){return b&&b[o]!=null?b[o]:typeof b?.readable!="boolean"?null:v(b)?!1:p(b)&&b.readable&&!te(b)}function de(b){return b&&b[a]!=null?b[a]:typeof b?.writable!="boolean"?null:v(b)?!1:g(b)&&b.writable&&!Q(b)}function P(b,T){return I(b)?v(b)?!0:!(T?.readable!==!1&&V(b)||T?.writable!==!1&&de(b)):null}function D(b){var T,Z;return I(b)?b.writableErrored?b.writableErrored:(T=(Z=b._writableState)===null||Z===void 0?void 0:Z.errored)!==null&&T!==void 0?T:null:null}function z(b){var T,Z;return I(b)?b.readableErrored?b.readableErrored:(T=(Z=b._readableState)===null||Z===void 0?void 0:Z.errored)!==null&&T!==void 0?T:null:null}function x(b){if(!I(b))return null;if(typeof b.closed=="boolean")return b.closed;const T=b._writableState,Z=b._readableState;return typeof T?.closed=="boolean"||typeof Z?.closed=="boolean"?T?.closed||Z?.closed:typeof b._closed=="boolean"&&X(b)?b._closed:null}function X(b){return typeof b._closed=="boolean"&&typeof b._defaultKeepAlive=="boolean"&&typeof b._removedConnection=="boolean"&&typeof b._removedContLen=="boolean"}function re(b){return typeof b._sent100=="boolean"&&X(b)}function ie(b){var T;return typeof b._consuming=="boolean"&&typeof b._dumped=="boolean"&&((T=b.req)===null||T===void 0?void 0:T.upgradeOrConnect)===void 0}function he(b){if(!I(b))return null;const T=b._writableState,Z=b._readableState,O=T||Z;return!O&&re(b)||!!(O&&O.autoDestroy&&O.emitClose&&O.closed===!1)}function F(b){var T;return!!(b&&((T=b[s])!==null&&T!==void 0?T:b.readableDidRead||b.readableAborted))}function oe(b){var T,Z,O,ae,ue,le,se,k,U,ne;return!!(b&&((T=(Z=(O=(ae=(ue=(le=b[i])!==null&&le!==void 0?le:b.readableErrored)!==null&&ue!==void 0?ue:b.writableErrored)!==null&&ae!==void 0?ae:(se=b._readableState)===null||se===void 0?void 0:se.errorEmitted)!==null&&O!==void 0?O:(k=b._writableState)===null||k===void 0?void 0:k.errorEmitted)!==null&&Z!==void 0?Z:(U=b._readableState)===null||U===void 0?void 0:U.errored)!==null&&T!==void 0?T:!((ne=b._writableState)===null||ne===void 0)&&ne.errored))}return es={isDestroyed:v,kIsDestroyed:n,isDisturbed:F,kIsDisturbed:s,isErrored:oe,kIsErrored:i,isReadable:V,kIsReadable:o,kIsClosedPromise:c,kControllerErrorFunction:d,kIsWritable:a,isClosed:x,isDuplexNodeStream:_,isFinished:P,isIterable:S,isReadableNodeStream:p,isReadableStream:C,isReadableEnded:ee,isReadableFinished:te,isReadableErrored:z,isNodeStream:I,isWebStream:R,isWritable:de,isWritableNodeStream:g,isWritableStream:E,isWritableEnded:Q,isWritableFinished:Y,isWritableErrored:D,isServerRequest:ie,isServerResponse:re,willEmitClose:he,isTransformStream:m},es}var td;function Sr(){if(td)return lo.exports;td=1;const e=St(),{AbortError:t,codes:r}=ht(),{ERR_INVALID_ARG_TYPE:n,ERR_STREAM_PREMATURE_CLOSE:i}=r,{kEmptyObject:o,once:a}=wt(),{validateAbortSignal:s,validateFunction:c,validateObject:d,validateBoolean:p}=Yi(),{Promise:g,PromisePrototypeThen:_,SymbolDispose:I}=Ue(),{isClosed:C,isReadable:E,isReadableNodeStream:m,isReadableStream:R,isReadableFinished:S,isReadableErrored:v,isWritable:Q,isWritableNodeStream:Y,isWritableStream:ee,isWritableFinished:te,isWritableErrored:V,isNodeStream:de,willEmitClose:P,kIsClosedPromise:D}=sr();let z;function x(F){return F.setHeader&&typeof F.abort=="function"}const X=()=>{};function re(F,oe,b){var T,Z;if(arguments.length===2?(b=oe,oe=o):oe==null?oe=o:d(oe,"options"),c(b,"callback"),s(oe.signal,"options.signal"),b=a(b),R(F)||ee(F))return ie(F,oe,b);if(!de(F))throw new n("stream",["ReadableStream","WritableStream","Stream"],F);const O=(T=oe.readable)!==null&&T!==void 0?T:m(F),ae=(Z=oe.writable)!==null&&Z!==void 0?Z:Y(F),ue=F._writableState,le=F._readableState,se=()=>{F.writable||ne()};let k=P(F)&&m(F)===O&&Y(F)===ae,U=te(F,!1);const ne=()=>{U=!0,F.destroyed&&(k=!1),!(k&&(!F.readable||O))&&(!O||ce)&&b.call(F)};let ce=S(F,!1);const H=()=>{ce=!0,F.destroyed&&(k=!1),!(k&&(!F.writable||ae))&&(!ae||U)&&b.call(F)},l=w=>{b.call(F,w)};let f=C(F);const A=()=>{f=!0;const w=V(F)||v(F);if(w&&typeof w!="boolean")return b.call(F,w);if(O&&!ce&&m(F,!0)&&!S(F,!1))return b.call(F,new i);if(ae&&!U&&!te(F,!1))return b.call(F,new i);b.call(F)},j=()=>{f=!0;const w=V(F)||v(F);if(w&&typeof w!="boolean")return b.call(F,w);b.call(F)},B=()=>{F.req.on("finish",ne)};x(F)?(F.on("complete",ne),k||F.on("abort",A),F.req?B():F.on("request",B)):ae&&!ue&&(F.on("end",se),F.on("close",se)),!k&&typeof F.aborted=="boolean"&&F.on("aborted",A),F.on("end",H),F.on("finish",ne),oe.error!==!1&&F.on("error",l),F.on("close",A),f?e.nextTick(A):ue!=null&&ue.errorEmitted||le!=null&&le.errorEmitted?k||e.nextTick(j):(!O&&(!k||E(F))&&(U||Q(F)===!1)||!ae&&(!k||Q(F))&&(ce||E(F)===!1)||le&&F.req&&F.aborted)&&e.nextTick(j);const q=()=>{b=X,F.removeListener("aborted",A),F.removeListener("complete",ne),F.removeListener("abort",A),F.removeListener("request",B),F.req&&F.req.removeListener("finish",ne),F.removeListener("end",se),F.removeListener("close",se),F.removeListener("finish",ne),F.removeListener("end",H),F.removeListener("error",l),F.removeListener("close",A)};if(oe.signal&&!f){const w=()=>{const L=b;q(),L.call(F,new t(void 0,{cause:oe.signal.reason}))};if(oe.signal.aborted)e.nextTick(w);else{z=z||wt().addAbortListener;const L=z(oe.signal,w),J=b;b=a((...W)=>{L[I](),J.apply(F,W)})}}return q}function ie(F,oe,b){let T=!1,Z=X;if(oe.signal)if(Z=()=>{T=!0,b.call(F,new t(void 0,{cause:oe.signal.reason}))},oe.signal.aborted)e.nextTick(Z);else{z=z||wt().addAbortListener;const ae=z(oe.signal,Z),ue=b;b=a((...le)=>{ae[I](),ue.apply(F,le)})}const O=(...ae)=>{T||e.nextTick(()=>b.apply(F,ae))};return _(F[D].promise,O,O),X}function he(F,oe){var b;let T=!1;return oe===null&&(oe=o),(b=oe)!==null&&b!==void 0&&b.cleanup&&(p(oe.cleanup,"cleanup"),T=oe.cleanup),new g((Z,O)=>{const ae=re(F,oe,ue=>{T&&ae(),ue?O(ue):Z()})})}return lo.exports=re,lo.exports.finished=he,lo.exports}var ts,rd;function Mn(){if(rd)return ts;rd=1;const e=St(),{aggregateTwoErrors:t,codes:{ERR_MULTIPLE_CALLBACK:r},AbortError:n}=ht(),{Symbol:i}=Ue(),{kIsDestroyed:o,isDestroyed:a,isFinished:s,isServerRequest:c}=sr(),d=i("kDestroy"),p=i("kConstruct");function g(P,D,z){P&&(P.stack,D&&!D.errored&&(D.errored=P),z&&!z.errored&&(z.errored=P))}function _(P,D){const z=this._readableState,x=this._writableState,X=x||z;return x!=null&&x.destroyed||z!=null&&z.destroyed?(typeof D=="function"&&D(),this):(g(P,x,z),x&&(x.destroyed=!0),z&&(z.destroyed=!0),X.constructed?I(this,P,D):this.once(d,function(re){I(this,t(re,P),D)}),this)}function I(P,D,z){let x=!1;function X(re){if(x)return;x=!0;const ie=P._readableState,he=P._writableState;g(re,he,ie),he&&(he.closed=!0),ie&&(ie.closed=!0),typeof z=="function"&&z(re),re?e.nextTick(C,P,re):e.nextTick(E,P)}try{P._destroy(D||null,X)}catch(re){X(re)}}function C(P,D){m(P,D),E(P)}function E(P){const D=P._readableState,z=P._writableState;z&&(z.closeEmitted=!0),D&&(D.closeEmitted=!0),(z!=null&&z.emitClose||D!=null&&D.emitClose)&&P.emit("close")}function m(P,D){const z=P._readableState,x=P._writableState;x!=null&&x.errorEmitted||z!=null&&z.errorEmitted||(x&&(x.errorEmitted=!0),z&&(z.errorEmitted=!0),P.emit("error",D))}function R(){const P=this._readableState,D=this._writableState;P&&(P.constructed=!0,P.closed=!1,P.closeEmitted=!1,P.destroyed=!1,P.errored=null,P.errorEmitted=!1,P.reading=!1,P.ended=P.readable===!1,P.endEmitted=P.readable===!1),D&&(D.constructed=!0,D.destroyed=!1,D.closed=!1,D.closeEmitted=!1,D.errored=null,D.errorEmitted=!1,D.finalCalled=!1,D.prefinished=!1,D.ended=D.writable===!1,D.ending=D.writable===!1,D.finished=D.writable===!1)}function S(P,D,z){const x=P._readableState,X=P._writableState;if(X!=null&&X.destroyed||x!=null&&x.destroyed)return this;x!=null&&x.autoDestroy||X!=null&&X.autoDestroy?P.destroy(D):D&&(D.stack,X&&!X.errored&&(X.errored=D),x&&!x.errored&&(x.errored=D),z?e.nextTick(m,P,D):m(P,D))}function v(P,D){if(typeof P._construct!="function")return;const z=P._readableState,x=P._writableState;z&&(z.constructed=!1),x&&(x.constructed=!1),P.once(p,D),!(P.listenerCount(p)>1)&&e.nextTick(Q,P)}function Q(P){let D=!1;function z(x){if(D){S(P,x??new r);return}D=!0;const X=P._readableState,re=P._writableState,ie=re||X;X&&(X.constructed=!0),re&&(re.constructed=!0),ie.destroyed?P.emit(d,x):x?S(P,x,!0):e.nextTick(Y,P)}try{P._construct(x=>{e.nextTick(z,x)})}catch(x){e.nextTick(z,x)}}function Y(P){P.emit(p)}function ee(P){return P?.setHeader&&typeof P.abort=="function"}function te(P){P.emit("close")}function V(P,D){P.emit("error",D),e.nextTick(te,P)}function de(P,D){!P||a(P)||(!D&&!s(P)&&(D=new n),c(P)?(P.socket=null,P.destroy(D)):ee(P)?P.abort():ee(P.req)?P.req.abort():typeof P.destroy=="function"?P.destroy(D):typeof P.close=="function"?P.close():D?e.nextTick(V,P,D):e.nextTick(te,P),P.destroyed||(P[o]=!0))}return ts={construct:v,destroyer:de,destroy:_,undestroy:R,errorOrDestroy:S},ts}var rs,nd;function $l(){if(nd)return rs;nd=1;const{ArrayIsArray:e,ObjectSetPrototypeOf:t}=Ue(),{EventEmitter:r}=or();function n(o){r.call(this,o)}t(n.prototype,r.prototype),t(n,r),n.prototype.pipe=function(o,a){const s=this;function c(E){o.writable&&o.write(E)===!1&&s.pause&&s.pause()}s.on("data",c);function d(){s.readable&&s.resume&&s.resume()}o.on("drain",d),!o._isStdio&&(!a||a.end!==!1)&&(s.on("end",g),s.on("close",_));let p=!1;function g(){p||(p=!0,o.end())}function _(){p||(p=!0,typeof o.destroy=="function"&&o.destroy())}function I(E){C(),r.listenerCount(this,"error")===0&&this.emit("error",E)}i(s,"error",I),i(o,"error",I);function C(){s.removeListener("data",c),o.removeListener("drain",d),s.removeListener("end",g),s.removeListener("close",_),s.removeListener("error",I),o.removeListener("error",I),s.removeListener("end",C),s.removeListener("close",C),o.removeListener("close",C)}return s.on("end",C),s.on("close",C),o.on("close",C),o.emit("pipe",s),o};function i(o,a,s){if(typeof o.prependListener=="function")return o.prependListener(a,s);!o._events||!o._events[a]?o.on(a,s):e(o._events[a])?o._events[a].unshift(s):o._events[a]=[s,o._events[a]]}return rs={Stream:n,prependListener:i},rs}var ns={exports:{}},id;function na(){return id||(id=1,(function(e){const{SymbolDispose:t}=Ue(),{AbortError:r,codes:n}=ht(),{isNodeStream:i,isWebStream:o,kControllerErrorFunction:a}=sr(),s=Sr(),{ERR_INVALID_ARG_TYPE:c}=n;let d;const p=(g,_)=>{if(typeof g!="object"||!("aborted"in g))throw new c(_,"AbortSignal",g)};e.exports.addAbortSignal=function(_,I){if(p(_,"signal"),!i(I)&&!o(I))throw new c("stream",["ReadableStream","WritableStream","Stream"],I);return e.exports.addAbortSignalNoValidate(_,I)},e.exports.addAbortSignalNoValidate=function(g,_){if(typeof g!="object"||!("aborted"in g))return _;const I=i(_)?()=>{_.destroy(new r(void 0,{cause:g.reason}))}:()=>{_[a](new r(void 0,{cause:g.reason}))};if(g.aborted)I();else{d=d||wt().addAbortListener;const C=d(g,I);s(_,C[t])}return _}})(ns)),ns.exports}var is,od;function Jw(){if(od)return is;od=1;const{StringPrototypeSlice:e,SymbolIterator:t,TypedArrayPrototypeSet:r,Uint8Array:n}=Ue(),{Buffer:i}=vt(),{inspect:o}=wt();return is=class{constructor(){this.head=null,this.tail=null,this.length=0}push(s){const c={data:s,next:null};this.length>0?this.tail.next=c:this.head=c,this.tail=c,++this.length}unshift(s){const c={data:s,next:this.head};this.length===0&&(this.tail=c),this.head=c,++this.length}shift(){if(this.length===0)return;const s=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,s}clear(){this.head=this.tail=null,this.length=0}join(s){if(this.length===0)return"";let c=this.head,d=""+c.data;for(;(c=c.next)!==null;)d+=s+c.data;return d}concat(s){if(this.length===0)return i.alloc(0);const c=i.allocUnsafe(s>>>0);let d=this.head,p=0;for(;d;)r(c,d.data,p),p+=d.data.length,d=d.next;return c}consume(s,c){const d=this.head.data;if(s<d.length){const p=d.slice(0,s);return this.head.data=d.slice(s),p}return s===d.length?this.shift():c?this._getString(s):this._getBuffer(s)}first(){return this.head.data}*[t](){for(let s=this.head;s;s=s.next)yield s.data}_getString(s){let c="",d=this.head,p=0;do{const g=d.data;if(s>g.length)c+=g,s-=g.length;else{s===g.length?(c+=g,++p,d.next?this.head=d.next:this.head=this.tail=null):(c+=e(g,0,s),this.head=d,d.data=e(g,s));break}++p}while((d=d.next)!==null);return this.length-=p,c}_getBuffer(s){const c=i.allocUnsafe(s),d=s;let p=this.head,g=0;do{const _=p.data;if(s>_.length)r(c,_,d-s),s-=_.length;else{s===_.length?(r(c,_,d-s),++g,p.next?this.head=p.next:this.head=this.tail=null):(r(c,new n(_.buffer,_.byteOffset,s),d-s),this.head=p,p.data=_.slice(s));break}++g}while((p=p.next)!==null);return this.length-=g,c}[Symbol.for("nodejs.util.inspect.custom")](s,c){return o(this,{...c,depth:0,customInspect:!1})}},is}var os,ad;function ia(){if(ad)return os;ad=1;const{MathFloor:e,NumberIsInteger:t}=Ue(),{validateInteger:r}=Yi(),{ERR_INVALID_ARG_VALUE:n}=ht().codes;let i=16*1024,o=16;function a(p,g,_){return p.highWaterMark!=null?p.highWaterMark:g?p[_]:null}function s(p){return p?o:i}function c(p,g){r(g,"value",0),p?o=g:i=g}function d(p,g,_,I){const C=a(g,I,_);if(C!=null){if(!t(C)||C<0){const E=I?`options.${_}`:"options.highWaterMark";throw new n(E,C)}return e(C)}return s(p.objectMode)}return os={getHighWaterMark:d,getDefaultHighWaterMark:s,setDefaultHighWaterMark:c},os}var as,sd;function yp(){if(sd)return as;sd=1;const e=St(),{PromisePrototypeThen:t,SymbolAsyncIterator:r,SymbolIterator:n}=Ue(),{Buffer:i}=vt(),{ERR_INVALID_ARG_TYPE:o,ERR_STREAM_NULL_VALUES:a}=ht().codes;function s(c,d,p){let g;if(typeof d=="string"||d instanceof i)return new c({objectMode:!0,...p,read(){this.push(d),this.push(null)}});let _;if(d&&d[r])_=!0,g=d[r]();else if(d&&d[n])_=!1,g=d[n]();else throw new o("iterable",["Iterable"],d);const I=new c({objectMode:!0,highWaterMark:1,...p});let C=!1;I._read=function(){C||(C=!0,m())},I._destroy=function(R,S){t(E(R),()=>e.nextTick(S,R),v=>e.nextTick(S,v||R))};async function E(R){const S=R!=null,v=typeof g.throw=="function";if(S&&v){const{value:Q,done:Y}=await g.throw(R);if(await Q,Y)return}if(typeof g.return=="function"){const{value:Q}=await g.return();await Q}}async function m(){for(;;){try{const{value:R,done:S}=_?await g.next():g.next();if(S)I.push(null);else{const v=R&&typeof R.then=="function"?await R:R;if(v===null)throw C=!1,new a;if(I.push(v))continue;C=!1}}catch(R){I.destroy(R)}break}}return I}return as=s,as}var ss,ld;function oa(){if(ld)return ss;ld=1;const e=St(),{ArrayPrototypeIndexOf:t,NumberIsInteger:r,NumberIsNaN:n,NumberParseInt:i,ObjectDefineProperties:o,ObjectKeys:a,ObjectSetPrototypeOf:s,Promise:c,SafeSet:d,SymbolAsyncDispose:p,SymbolAsyncIterator:g,Symbol:_}=Ue();ss=W,W.ReadableState=J;const{EventEmitter:I}=or(),{Stream:C,prependListener:E}=$l(),{Buffer:m}=vt(),{addAbortSignal:R}=na(),S=Sr();let v=wt().debuglog("stream",u=>{v=u});const Q=Jw(),Y=Mn(),{getHighWaterMark:ee,getDefaultHighWaterMark:te}=ia(),{aggregateTwoErrors:V,codes:{ERR_INVALID_ARG_TYPE:de,ERR_METHOD_NOT_IMPLEMENTED:P,ERR_OUT_OF_RANGE:D,ERR_STREAM_PUSH_AFTER_EOF:z,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:x},AbortError:X}=ht(),{validateObject:re}=Yi(),ie=_("kPaused"),{StringDecoder:he}=Kd(),F=yp();s(W.prototype,C.prototype),s(W,C);const oe=()=>{},{errorOrDestroy:b}=Y,T=1,Z=2,O=4,ae=8,ue=16,le=32,se=64,k=128,U=256,ne=512,ce=1024,H=2048,l=4096,f=8192,A=16384,j=32768,B=65536,q=1<<17,w=1<<18;function L(u){return{enumerable:!1,get(){return(this.state&u)!==0},set(h){h?this.state|=u:this.state&=~u}}}o(J.prototype,{objectMode:L(T),ended:L(Z),endEmitted:L(O),reading:L(ae),constructed:L(ue),sync:L(le),needReadable:L(se),emittedReadable:L(k),readableListening:L(U),resumeScheduled:L(ne),errorEmitted:L(ce),emitClose:L(H),autoDestroy:L(l),destroyed:L(f),closed:L(A),closeEmitted:L(j),multiAwaitDrain:L(B),readingMore:L(q),dataEmitted:L(w)});function J(u,h,K){typeof K!="boolean"&&(K=h instanceof ir()),this.state=H|l|ue|le,u&&u.objectMode&&(this.state|=T),K&&u&&u.readableObjectMode&&(this.state|=T),this.highWaterMark=u?ee(this,u,"readableHighWaterMark",K):te(!1),this.buffer=new Q,this.length=0,this.pipes=[],this.flowing=null,this[ie]=null,u&&u.emitClose===!1&&(this.state&=~H),u&&u.autoDestroy===!1&&(this.state&=~l),this.errored=null,this.defaultEncoding=u&&u.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,u&&u.encoding&&(this.decoder=new he(u.encoding),this.encoding=u.encoding)}function W(u){if(!(this instanceof W))return new W(u);const h=this instanceof ir();this._readableState=new J(u,this,h),u&&(typeof u.read=="function"&&(this._read=u.read),typeof u.destroy=="function"&&(this._destroy=u.destroy),typeof u.construct=="function"&&(this._construct=u.construct),u.signal&&!h&&R(u.signal,this)),C.call(this,u),Y.construct(this,()=>{this._readableState.needReadable&&Me(this,this._readableState)})}W.prototype.destroy=Y.destroy,W.prototype._undestroy=Y.undestroy,W.prototype._destroy=function(u,h){h(u)},W.prototype[I.captureRejectionSymbol]=function(u){this.destroy(u)},W.prototype[p]=function(){let u;return this.destroyed||(u=this.readableEnded?null:new X,this.destroy(u)),new c((h,K)=>S(this,N=>N&&N!==u?K(N):h(null)))},W.prototype.push=function(u,h){return fe(this,u,h,!1)},W.prototype.unshift=function(u,h){return fe(this,u,h,!0)};function fe(u,h,K,N){v("readableAddChunk",h);const $=u._readableState;let ge;if(($.state&T)===0&&(typeof h=="string"?(K=K||$.defaultEncoding,$.encoding!==K&&(N&&$.encoding?h=m.from(h,K).toString($.encoding):(h=m.from(h,K),K=""))):h instanceof m?K="":C._isUint8Array(h)?(h=C._uint8ArrayToBuffer(h),K=""):h!=null&&(ge=new de("chunk",["string","Buffer","Uint8Array"],h))),ge)b(u,ge);else if(h===null)$.state&=~ae,Ce(u,$);else if(($.state&T)!==0||h&&h.length>0)if(N)if(($.state&O)!==0)b(u,new x);else{if($.destroyed||$.errored)return!1;we(u,$,h,!0)}else if($.ended)b(u,new z);else{if($.destroyed||$.errored)return!1;$.state&=~ae,$.decoder&&!K?(h=$.decoder.write(h),$.objectMode||h.length!==0?we(u,$,h,!1):Me(u,$)):we(u,$,h,!1)}else N||($.state&=~ae,Me(u,$));return!$.ended&&($.length<$.highWaterMark||$.length===0)}function we(u,h,K,N){h.flowing&&h.length===0&&!h.sync&&u.listenerCount("data")>0?((h.state&B)!==0?h.awaitDrainWriters.clear():h.awaitDrainWriters=null,h.dataEmitted=!0,u.emit("data",K)):(h.length+=h.objectMode?1:K.length,N?h.buffer.unshift(K):h.buffer.push(K),(h.state&se)!==0&&De(u)),Me(u,h)}W.prototype.isPaused=function(){const u=this._readableState;return u[ie]===!0||u.flowing===!1},W.prototype.setEncoding=function(u){const h=new he(u);this._readableState.decoder=h,this._readableState.encoding=this._readableState.decoder.encoding;const K=this._readableState.buffer;let N="";for(const $ of K)N+=h.write($);return K.clear(),N!==""&&K.push(N),this._readableState.length=N.length,this};const pe=1073741824;function ve(u){if(u>pe)throw new D("size","<= 1GiB",u);return u--,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u++,u}function Ae(u,h){return u<=0||h.length===0&&h.ended?0:(h.state&T)!==0?1:n(u)?h.flowing&&h.length?h.buffer.first().length:h.length:u<=h.length?u:h.ended?h.length:0}W.prototype.read=function(u){v("read",u),u===void 0?u=NaN:r(u)||(u=i(u,10));const h=this._readableState,K=u;if(u>h.highWaterMark&&(h.highWaterMark=ve(u)),u!==0&&(h.state&=~k),u===0&&h.needReadable&&((h.highWaterMark!==0?h.length>=h.highWaterMark:h.length>0)||h.ended))return v("read: emitReadable",h.length,h.ended),h.length===0&&h.ended?Yt(this):De(this),null;if(u=Ae(u,h),u===0&&h.ended)return h.length===0&&Yt(this),null;let N=(h.state&se)!==0;if(v("need readable",N),(h.length===0||h.length-u<h.highWaterMark)&&(N=!0,v("length less than watermark",N)),h.ended||h.reading||h.destroyed||h.errored||!h.constructed)N=!1,v("reading, ended or constructing",N);else if(N){v("do read"),h.state|=ae|le,h.length===0&&(h.state|=se);try{this._read(h.highWaterMark)}catch(ge){b(this,ge)}h.state&=~le,h.reading||(u=Ae(K,h))}let $;return u>0?$=Rr(u,h):$=null,$===null?(h.needReadable=h.length<=h.highWaterMark,u=0):(h.length-=u,h.multiAwaitDrain?h.awaitDrainWriters.clear():h.awaitDrainWriters=null),h.length===0&&(h.ended||(h.needReadable=!0),K!==u&&h.ended&&Yt(this)),$!==null&&!h.errorEmitted&&!h.closeEmitted&&(h.dataEmitted=!0,this.emit("data",$)),$};function Ce(u,h){if(v("onEofChunk"),!h.ended){if(h.decoder){const K=h.decoder.end();K&&K.length&&(h.buffer.push(K),h.length+=h.objectMode?1:K.length)}h.ended=!0,h.sync?De(u):(h.needReadable=!1,h.emittedReadable=!0,Ft(u))}}function De(u){const h=u._readableState;v("emitReadable",h.needReadable,h.emittedReadable),h.needReadable=!1,h.emittedReadable||(v("emitReadable",h.flowing),h.emittedReadable=!0,e.nextTick(Ft,u))}function Ft(u){const h=u._readableState;v("emitReadable_",h.destroyed,h.length,h.ended),!h.destroyed&&!h.errored&&(h.length||h.ended)&&(u.emit("readable"),h.emittedReadable=!1),h.needReadable=!h.flowing&&!h.ended&&h.length<=h.highWaterMark,Ir(u)}function Me(u,h){!h.readingMore&&h.constructed&&(h.readingMore=!0,e.nextTick(Dn,u,h))}function Dn(u,h){for(;!h.reading&&!h.ended&&(h.length<h.highWaterMark||h.flowing&&h.length===0);){const K=h.length;if(v("maybeReadMore read 0"),u.read(0),K===h.length)break}h.readingMore=!1}W.prototype._read=function(u){throw new P("_read()")},W.prototype.pipe=function(u,h){const K=this,N=this._readableState;N.pipes.length===1&&(N.multiAwaitDrain||(N.multiAwaitDrain=!0,N.awaitDrainWriters=new d(N.awaitDrainWriters?[N.awaitDrainWriters]:[]))),N.pipes.push(u),v("pipe count=%d opts=%j",N.pipes.length,h);const ge=(!h||h.end!==!1)&&u!==e.stdout&&u!==e.stderr?ze:Bt;N.endEmitted?e.nextTick(ge):K.once("end",ge),u.on("unpipe",be);function be(it,He){v("onunpipe"),it===K&&He&&He.hasUnpiped===!1&&(He.hasUnpiped=!0,Nn())}function ze(){v("onend"),u.end()}let Re,zt=!1;function Nn(){v("cleanup"),u.removeListener("close",Mr),u.removeListener("finish",Dr),Re&&u.removeListener("drain",Re),u.removeListener("error",Cr),u.removeListener("unpipe",be),K.removeListener("end",ze),K.removeListener("end",Bt),K.removeListener("data",Bn),zt=!0,Re&&N.awaitDrainWriters&&(!u._writableState||u._writableState.needDrain)&&Re()}function Fn(){zt||(N.pipes.length===1&&N.pipes[0]===u?(v("false write response, pause",0),N.awaitDrainWriters=u,N.multiAwaitDrain=!1):N.pipes.length>1&&N.pipes.includes(u)&&(v("false write response, pause",N.awaitDrainWriters.size),N.awaitDrainWriters.add(u)),K.pause()),Re||(Re=Pn(K,u),u.on("drain",Re))}K.on("data",Bn);function Bn(it){v("ondata");const He=u.write(it);v("dest.write",He),He===!1&&Fn()}function Cr(it){if(v("onerror",it),Bt(),u.removeListener("error",Cr),u.listenerCount("error")===0){const He=u._writableState||u._readableState;He&&!He.errorEmitted?b(u,it):u.emit("error",it)}}E(u,"error",Cr);function Mr(){u.removeListener("finish",Dr),Bt()}u.once("close",Mr);function Dr(){v("onfinish"),u.removeListener("close",Mr),Bt()}u.once("finish",Dr);function Bt(){v("unpipe"),K.unpipe(u)}return u.emit("pipe",K),u.writableNeedDrain===!0?Fn():N.flowing||(v("pipe resume"),K.resume()),u};function Pn(u,h){return function(){const N=u._readableState;N.awaitDrainWriters===h?(v("pipeOnDrain",1),N.awaitDrainWriters=null):N.multiAwaitDrain&&(v("pipeOnDrain",N.awaitDrainWriters.size),N.awaitDrainWriters.delete(h)),(!N.awaitDrainWriters||N.awaitDrainWriters.size===0)&&u.listenerCount("data")&&u.resume()}}W.prototype.unpipe=function(u){const h=this._readableState,K={hasUnpiped:!1};if(h.pipes.length===0)return this;if(!u){const $=h.pipes;h.pipes=[],this.pause();for(let ge=0;ge<$.length;ge++)$[ge].emit("unpipe",this,{hasUnpiped:!1});return this}const N=t(h.pipes,u);return N===-1?this:(h.pipes.splice(N,1),h.pipes.length===0&&this.pause(),u.emit("unpipe",this,K),this)},W.prototype.on=function(u,h){const K=C.prototype.on.call(this,u,h),N=this._readableState;return u==="data"?(N.readableListening=this.listenerCount("readable")>0,N.flowing!==!1&&this.resume()):u==="readable"&&!N.endEmitted&&!N.readableListening&&(N.readableListening=N.needReadable=!0,N.flowing=!1,N.emittedReadable=!1,v("on readable",N.length,N.reading),N.length?De(this):N.reading||e.nextTick(Tn,this)),K},W.prototype.addListener=W.prototype.on,W.prototype.removeListener=function(u,h){const K=C.prototype.removeListener.call(this,u,h);return u==="readable"&&e.nextTick(Er,this),K},W.prototype.off=W.prototype.removeListener,W.prototype.removeAllListeners=function(u){const h=C.prototype.removeAllListeners.apply(this,arguments);return(u==="readable"||u===void 0)&&e.nextTick(Er,this),h};function Er(u){const h=u._readableState;h.readableListening=u.listenerCount("readable")>0,h.resumeScheduled&&h[ie]===!1?h.flowing=!0:u.listenerCount("data")>0?u.resume():h.readableListening||(h.flowing=null)}function Tn(u){v("readable nexttick read 0"),u.read(0)}W.prototype.resume=function(){const u=this._readableState;return u.flowing||(v("resume"),u.flowing=!u.readableListening,xr(this,u)),u[ie]=!1,this};function xr(u,h){h.resumeScheduled||(h.resumeScheduled=!0,e.nextTick(kn,u,h))}function kn(u,h){v("resume",h.reading),h.reading||u.read(0),h.resumeScheduled=!1,u.emit("resume"),Ir(u),h.flowing&&!h.reading&&u.read(0)}W.prototype.pause=function(){return v("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(v("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[ie]=!0,this};function Ir(u){const h=u._readableState;for(v("flow",h.flowing);h.flowing&&u.read()!==null;);}W.prototype.wrap=function(u){let h=!1;u.on("data",N=>{!this.push(N)&&u.pause&&(h=!0,u.pause())}),u.on("end",()=>{this.push(null)}),u.on("error",N=>{b(this,N)}),u.on("close",()=>{this.destroy()}),u.on("destroy",()=>{this.destroy()}),this._read=()=>{h&&u.resume&&(h=!1,u.resume())};const K=a(u);for(let N=1;N<K.length;N++){const $=K[N];this[$]===void 0&&typeof u[$]=="function"&&(this[$]=u[$].bind(u))}return this},W.prototype[g]=function(){return lr(this)},W.prototype.iterator=function(u){return u!==void 0&&re(u,"options"),lr(this,u)};function lr(u,h){typeof u.read!="function"&&(u=W.wrap(u,{objectMode:!0}));const K=en(u,h);return K.stream=u,K}async function*en(u,h){let K=oe;function N(be){this===u?(K(),K=oe):K=be}u.on("readable",N);let $;const ge=S(u,{writable:!1},be=>{$=be?V($,be):null,K(),K=oe});try{for(;;){const be=u.destroyed?null:u.read();if(be!==null)yield be;else{if($)throw $;if($===null)return;await new c(N)}}}catch(be){throw $=V($,be),$}finally{($||h?.destroyOnReturn!==!1)&&($===void 0||u._readableState.autoDestroy)?Y.destroyer(u,null):(u.off("readable",N),ge())}}o(W.prototype,{readable:{__proto__:null,get(){const u=this._readableState;return!!u&&u.readable!==!1&&!u.destroyed&&!u.errorEmitted&&!u.endEmitted},set(u){this._readableState&&(this._readableState.readable=!!u)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(u){this._readableState&&(this._readableState.flowing=u)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(u){this._readableState&&(this._readableState.destroyed=u)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),o(J.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[ie]!==!1},set(u){this[ie]=!!u}}}),W._fromList=Rr;function Rr(u,h){if(h.length===0)return null;let K;return h.objectMode?K=h.buffer.shift():!u||u>=h.length?(h.decoder?K=h.buffer.join(""):h.buffer.length===1?K=h.buffer.first():K=h.buffer.concat(h.length),h.buffer.clear()):K=h.buffer.consume(u,h.decoder),K}function Yt(u){const h=u._readableState;v("endReadable",h.endEmitted),h.endEmitted||(h.ended=!0,e.nextTick(On,h,u))}function On(u,h){if(v("endReadableNT",u.endEmitted,u.length),!u.errored&&!u.closeEmitted&&!u.endEmitted&&u.length===0){if(u.endEmitted=!0,h.emit("end"),h.writable&&h.allowHalfOpen===!1)e.nextTick(jn,h);else if(u.autoDestroy){const K=h._writableState;(!K||K.autoDestroy&&(K.finished||K.writable===!1))&&h.destroy()}}}function jn(u){u.writable&&!u.writableEnded&&!u.destroyed&&u.end()}W.from=function(u,h){return F(W,u,h)};let Xt;function M(){return Xt===void 0&&(Xt={}),Xt}return W.fromWeb=function(u,h){return M().newStreamReadableFromReadableStream(u,h)},W.toWeb=function(u,h){return M().newReadableStreamFromStreamReadable(u,h)},W.wrap=function(u,h){var K,N;return new W({objectMode:(K=(N=u.readableObjectMode)!==null&&N!==void 0?N:u.objectMode)!==null&&K!==void 0?K:!0,...h,destroy($,ge){Y.destroyer(u,$),ge($)}}).wrap(u)},ss}var ls,ud;function eu(){if(ud)return ls;ud=1;const e=St(),{ArrayPrototypeSlice:t,Error:r,FunctionPrototypeSymbolHasInstance:n,ObjectDefineProperty:i,ObjectDefineProperties:o,ObjectSetPrototypeOf:a,StringPrototypeToLowerCase:s,Symbol:c,SymbolHasInstance:d}=Ue();ls=re,re.WritableState=x;const{EventEmitter:p}=or(),g=$l().Stream,{Buffer:_}=vt(),I=Mn(),{addAbortSignal:C}=na(),{getHighWaterMark:E,getDefaultHighWaterMark:m}=ia(),{ERR_INVALID_ARG_TYPE:R,ERR_METHOD_NOT_IMPLEMENTED:S,ERR_MULTIPLE_CALLBACK:v,ERR_STREAM_CANNOT_PIPE:Q,ERR_STREAM_DESTROYED:Y,ERR_STREAM_ALREADY_FINISHED:ee,ERR_STREAM_NULL_VALUES:te,ERR_STREAM_WRITE_AFTER_END:V,ERR_UNKNOWN_ENCODING:de}=ht().codes,{errorOrDestroy:P}=I;a(re.prototype,g.prototype),a(re,g);function D(){}const z=c("kOnFinished");function x(l,f,A){typeof A!="boolean"&&(A=f instanceof ir()),this.objectMode=!!(l&&l.objectMode),A&&(this.objectMode=this.objectMode||!!(l&&l.writableObjectMode)),this.highWaterMark=l?E(this,l,"writableHighWaterMark",A):m(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const j=!!(l&&l.decodeStrings===!1);this.decodeStrings=!j,this.defaultEncoding=l&&l.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=b.bind(void 0,f),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,X(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!l||l.emitClose!==!1,this.autoDestroy=!l||l.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[z]=[]}function X(l){l.buffered=[],l.bufferedIndex=0,l.allBuffers=!0,l.allNoop=!0}x.prototype.getBuffer=function(){return t(this.buffered,this.bufferedIndex)},i(x.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function re(l){const f=this instanceof ir();if(!f&&!n(re,this))return new re(l);this._writableState=new x(l,this,f),l&&(typeof l.write=="function"&&(this._write=l.write),typeof l.writev=="function"&&(this._writev=l.writev),typeof l.destroy=="function"&&(this._destroy=l.destroy),typeof l.final=="function"&&(this._final=l.final),typeof l.construct=="function"&&(this._construct=l.construct),l.signal&&C(l.signal,this)),g.call(this,l),I.construct(this,()=>{const A=this._writableState;A.writing||ae(this,A),k(this,A)})}i(re,d,{__proto__:null,value:function(l){return n(this,l)?!0:this!==re?!1:l&&l._writableState instanceof x}}),re.prototype.pipe=function(){P(this,new Q)};function ie(l,f,A,j){const B=l._writableState;if(typeof A=="function")j=A,A=B.defaultEncoding;else{if(!A)A=B.defaultEncoding;else if(A!=="buffer"&&!_.isEncoding(A))throw new de(A);typeof j!="function"&&(j=D)}if(f===null)throw new te;if(!B.objectMode)if(typeof f=="string")B.decodeStrings!==!1&&(f=_.from(f,A),A="buffer");else if(f instanceof _)A="buffer";else if(g._isUint8Array(f))f=g._uint8ArrayToBuffer(f),A="buffer";else throw new R("chunk",["string","Buffer","Uint8Array"],f);let q;return B.ending?q=new V:B.destroyed&&(q=new Y("write")),q?(e.nextTick(j,q),P(l,q,!0),q):(B.pendingcb++,he(l,B,f,A,j))}re.prototype.write=function(l,f,A){return ie(this,l,f,A)===!0},re.prototype.cork=function(){this._writableState.corked++},re.prototype.uncork=function(){const l=this._writableState;l.corked&&(l.corked--,l.writing||ae(this,l))},re.prototype.setDefaultEncoding=function(f){if(typeof f=="string"&&(f=s(f)),!_.isEncoding(f))throw new de(f);return this._writableState.defaultEncoding=f,this};function he(l,f,A,j,B){const q=f.objectMode?1:A.length;f.length+=q;const w=f.length<f.highWaterMark;return w||(f.needDrain=!0),f.writing||f.corked||f.errored||!f.constructed?(f.buffered.push({chunk:A,encoding:j,callback:B}),f.allBuffers&&j!=="buffer"&&(f.allBuffers=!1),f.allNoop&&B!==D&&(f.allNoop=!1)):(f.writelen=q,f.writecb=B,f.writing=!0,f.sync=!0,l._write(A,j,f.onwrite),f.sync=!1),w&&!f.errored&&!f.destroyed}function F(l,f,A,j,B,q,w){f.writelen=j,f.writecb=w,f.writing=!0,f.sync=!0,f.destroyed?f.onwrite(new Y("write")):A?l._writev(B,f.onwrite):l._write(B,q,f.onwrite),f.sync=!1}function oe(l,f,A,j){--f.pendingcb,j(A),O(f),P(l,A)}function b(l,f){const A=l._writableState,j=A.sync,B=A.writecb;if(typeof B!="function"){P(l,new v);return}A.writing=!1,A.writecb=null,A.length-=A.writelen,A.writelen=0,f?(f.stack,A.errored||(A.errored=f),l._readableState&&!l._readableState.errored&&(l._readableState.errored=f),j?e.nextTick(oe,l,A,f,B):oe(l,A,f,B)):(A.buffered.length>A.bufferedIndex&&ae(l,A),j?A.afterWriteTickInfo!==null&&A.afterWriteTickInfo.cb===B?A.afterWriteTickInfo.count++:(A.afterWriteTickInfo={count:1,cb:B,stream:l,state:A},e.nextTick(T,A.afterWriteTickInfo)):Z(l,A,1,B))}function T({stream:l,state:f,count:A,cb:j}){return f.afterWriteTickInfo=null,Z(l,f,A,j)}function Z(l,f,A,j){for(!f.ending&&!l.destroyed&&f.length===0&&f.needDrain&&(f.needDrain=!1,l.emit("drain"));A-- >0;)f.pendingcb--,j();f.destroyed&&O(f),k(l,f)}function O(l){if(l.writing)return;for(let B=l.bufferedIndex;B<l.buffered.length;++B){var f;const{chunk:q,callback:w}=l.buffered[B],L=l.objectMode?1:q.length;l.length-=L,w((f=l.errored)!==null&&f!==void 0?f:new Y("write"))}const A=l[z].splice(0);for(let B=0;B<A.length;B++){var j;A[B]((j=l.errored)!==null&&j!==void 0?j:new Y("end"))}X(l)}function ae(l,f){if(f.corked||f.bufferProcessing||f.destroyed||!f.constructed)return;const{buffered:A,bufferedIndex:j,objectMode:B}=f,q=A.length-j;if(!q)return;let w=j;if(f.bufferProcessing=!0,q>1&&l._writev){f.pendingcb-=q-1;const L=f.allNoop?D:W=>{for(let fe=w;fe<A.length;++fe)A[fe].callback(W)},J=f.allNoop&&w===0?A:t(A,w);J.allBuffers=f.allBuffers,F(l,f,!0,f.length,J,"",L),X(f)}else{do{const{chunk:L,encoding:J,callback:W}=A[w];A[w++]=null;const fe=B?1:L.length;F(l,f,!1,fe,L,J,W)}while(w<A.length&&!f.writing);w===A.length?X(f):w>256?(A.splice(0,w),f.bufferedIndex=0):f.bufferedIndex=w}f.bufferProcessing=!1}re.prototype._write=function(l,f,A){if(this._writev)this._writev([{chunk:l,encoding:f}],A);else throw new S("_write()")},re.prototype._writev=null,re.prototype.end=function(l,f,A){const j=this._writableState;typeof l=="function"?(A=l,l=null,f=null):typeof f=="function"&&(A=f,f=null);let B;if(l!=null){const q=ie(this,l,f);q instanceof r&&(B=q)}return j.corked&&(j.corked=1,this.uncork()),B||(!j.errored&&!j.ending?(j.ending=!0,k(this,j,!0),j.ended=!0):j.finished?B=new ee("end"):j.destroyed&&(B=new Y("end"))),typeof A=="function"&&(B||j.finished?e.nextTick(A,B):j[z].push(A)),this};function ue(l){return l.ending&&!l.destroyed&&l.constructed&&l.length===0&&!l.errored&&l.buffered.length===0&&!l.finished&&!l.writing&&!l.errorEmitted&&!l.closeEmitted}function le(l,f){let A=!1;function j(B){if(A){P(l,B??v());return}if(A=!0,f.pendingcb--,B){const q=f[z].splice(0);for(let w=0;w<q.length;w++)q[w](B);P(l,B,f.sync)}else ue(f)&&(f.prefinished=!0,l.emit("prefinish"),f.pendingcb++,e.nextTick(U,l,f))}f.sync=!0,f.pendingcb++;try{l._final(j)}catch(B){j(B)}f.sync=!1}function se(l,f){!f.prefinished&&!f.finalCalled&&(typeof l._final=="function"&&!f.destroyed?(f.finalCalled=!0,le(l,f)):(f.prefinished=!0,l.emit("prefinish")))}function k(l,f,A){ue(f)&&(se(l,f),f.pendingcb===0&&(A?(f.pendingcb++,e.nextTick((j,B)=>{ue(B)?U(j,B):B.pendingcb--},l,f)):ue(f)&&(f.pendingcb++,U(l,f))))}function U(l,f){f.pendingcb--,f.finished=!0;const A=f[z].splice(0);for(let j=0;j<A.length;j++)A[j]();if(l.emit("finish"),f.autoDestroy){const j=l._readableState;(!j||j.autoDestroy&&(j.endEmitted||j.readable===!1))&&l.destroy()}}o(re.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(l){this._writableState&&(this._writableState.destroyed=l)}},writable:{__proto__:null,get(){const l=this._writableState;return!!l&&l.writable!==!1&&!l.destroyed&&!l.errored&&!l.ending&&!l.ended},set(l){this._writableState&&(this._writableState.writable=!!l)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){const l=this._writableState;return l?!l.destroyed&&!l.ending&&l.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});const ne=I.destroy;re.prototype.destroy=function(l,f){const A=this._writableState;return!A.destroyed&&(A.bufferedIndex<A.buffered.length||A[z].length)&&e.nextTick(O,A),ne.call(this,l,f),this},re.prototype._undestroy=I.undestroy,re.prototype._destroy=function(l,f){f(l)},re.prototype[p.captureRejectionSymbol]=function(l){this.destroy(l)};let ce;function H(){return ce===void 0&&(ce={}),ce}return re.fromWeb=function(l,f){return H().newStreamWritableFromWritableStream(l,f)},re.toWeb=function(l){return H().newWritableStreamFromStreamWritable(l)},ls}var us,cd;function Yw(){if(cd)return us;cd=1;const e=St(),t=vt(),{isReadable:r,isWritable:n,isIterable:i,isNodeStream:o,isReadableNodeStream:a,isWritableNodeStream:s,isDuplexNodeStream:c,isReadableStream:d,isWritableStream:p}=sr(),g=Sr(),{AbortError:_,codes:{ERR_INVALID_ARG_TYPE:I,ERR_INVALID_RETURN_VALUE:C}}=ht(),{destroyer:E}=Mn(),m=ir(),R=oa(),S=eu(),{createDeferredPromise:v}=wt(),Q=yp(),Y=globalThis.Blob||t.Blob,ee=typeof Y<"u"?function(x){return x instanceof Y}:function(x){return!1},te=globalThis.AbortController||Qt().AbortController,{FunctionPrototypeCall:V}=Ue();class de extends m{constructor(x){super(x),x?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),x?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}us=function z(x,X){if(c(x))return x;if(a(x))return D({readable:x});if(s(x))return D({writable:x});if(o(x))return D({writable:!1,readable:!1});if(d(x))return D({readable:R.fromWeb(x)});if(p(x))return D({writable:S.fromWeb(x)});if(typeof x=="function"){const{value:ie,write:he,final:F,destroy:oe}=P(x);if(i(ie))return Q(de,ie,{objectMode:!0,write:he,final:F,destroy:oe});const b=ie?.then;if(typeof b=="function"){let T;const Z=V(b,ie,O=>{if(O!=null)throw new C("nully","body",O)},O=>{E(T,O)});return T=new de({objectMode:!0,readable:!1,write:he,final(O){F(async()=>{try{await Z,e.nextTick(O,null)}catch(ae){e.nextTick(O,ae)}})},destroy:oe})}throw new C("Iterable, AsyncIterable or AsyncFunction",X,ie)}if(ee(x))return z(x.arrayBuffer());if(i(x))return Q(de,x,{objectMode:!0,writable:!1});if(d(x?.readable)&&p(x?.writable))return de.fromWeb(x);if(typeof x?.writable=="object"||typeof x?.readable=="object"){const ie=x!=null&&x.readable?a(x?.readable)?x?.readable:z(x.readable):void 0,he=x!=null&&x.writable?s(x?.writable)?x?.writable:z(x.writable):void 0;return D({readable:ie,writable:he})}const re=x?.then;if(typeof re=="function"){let ie;return V(re,x,he=>{he!=null&&ie.push(he),ie.push(null)},he=>{E(ie,he)}),ie=new de({objectMode:!0,writable:!1,read(){}})}throw new I(X,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],x)};function P(z){let{promise:x,resolve:X}=v();const re=new te,ie=re.signal;return{value:z((async function*(){for(;;){const F=x;x=null;const{chunk:oe,done:b,cb:T}=await F;if(e.nextTick(T),b)return;if(ie.aborted)throw new _(void 0,{cause:ie.reason});({promise:x,resolve:X}=v()),yield oe}})(),{signal:ie}),write(F,oe,b){const T=X;X=null,T({chunk:F,done:!1,cb:b})},final(F){const oe=X;X=null,oe({done:!0,cb:F})},destroy(F,oe){re.abort(),oe(F)}}}function D(z){const x=z.readable&&typeof z.readable.read!="function"?R.wrap(z.readable):z.readable,X=z.writable;let re=!!r(x),ie=!!n(X),he,F,oe,b,T;function Z(O){const ae=b;b=null,ae?ae(O):O&&T.destroy(O)}return T=new de({readableObjectMode:!!(x!=null&&x.readableObjectMode),writableObjectMode:!!(X!=null&&X.writableObjectMode),readable:re,writable:ie}),ie&&(g(X,O=>{ie=!1,O&&E(x,O),Z(O)}),T._write=function(O,ae,ue){X.write(O,ae)?ue():he=ue},T._final=function(O){X.end(),F=O},X.on("drain",function(){if(he){const O=he;he=null,O()}}),X.on("finish",function(){if(F){const O=F;F=null,O()}})),re&&(g(x,O=>{re=!1,O&&E(x,O),Z(O)}),x.on("readable",function(){if(oe){const O=oe;oe=null,O()}}),x.on("end",function(){T.push(null)}),T._read=function(){for(;;){const O=x.read();if(O===null){oe=T._read;return}if(!T.push(O))return}}),T._destroy=function(O,ae){!O&&b!==null&&(O=new _),oe=null,he=null,F=null,b===null?ae(O):(b=ae,E(X,O),E(x,O))},T}return us}var cs,dd;function ir(){if(dd)return cs;dd=1;const{ObjectDefineProperties:e,ObjectGetOwnPropertyDescriptor:t,ObjectKeys:r,ObjectSetPrototypeOf:n}=Ue();cs=a;const i=oa(),o=eu();n(a.prototype,i.prototype),n(a,i);{const p=r(o.prototype);for(let g=0;g<p.length;g++){const _=p[g];a.prototype[_]||(a.prototype[_]=o.prototype[_])}}function a(p){if(!(this instanceof a))return new a(p);i.call(this,p),o.call(this,p),p?(this.allowHalfOpen=p.allowHalfOpen!==!1,p.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),p.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}e(a.prototype,{writable:{__proto__:null,...t(o.prototype,"writable")},writableHighWaterMark:{__proto__:null,...t(o.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...t(o.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...t(o.prototype,"writableBuffer")},writableLength:{__proto__:null,...t(o.prototype,"writableLength")},writableFinished:{__proto__:null,...t(o.prototype,"writableFinished")},writableCorked:{__proto__:null,...t(o.prototype,"writableCorked")},writableEnded:{__proto__:null,...t(o.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...t(o.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(p){this._readableState&&this._writableState&&(this._readableState.destroyed=p,this._writableState.destroyed=p)}}});let s;function c(){return s===void 0&&(s={}),s}a.fromWeb=function(p,g){return c().newStreamDuplexFromReadableWritablePair(p,g)},a.toWeb=function(p){return c().newReadableWritablePairFromDuplex(p)};let d;return a.from=function(p){return d||(d=Yw()),d(p,"body")},cs}var ds,fd;function gp(){if(fd)return ds;fd=1;const{ObjectSetPrototypeOf:e,Symbol:t}=Ue();ds=a;const{ERR_METHOD_NOT_IMPLEMENTED:r}=ht().codes,n=ir(),{getHighWaterMark:i}=ia();e(a.prototype,n.prototype),e(a,n);const o=t("kCallback");function a(d){if(!(this instanceof a))return new a(d);const p=d?i(this,d,"readableHighWaterMark",!0):null;p===0&&(d={...d,highWaterMark:null,readableHighWaterMark:p,writableHighWaterMark:d.writableHighWaterMark||0}),n.call(this,d),this._readableState.sync=!1,this[o]=null,d&&(typeof d.transform=="function"&&(this._transform=d.transform),typeof d.flush=="function"&&(this._flush=d.flush)),this.on("prefinish",c)}function s(d){typeof this._flush=="function"&&!this.destroyed?this._flush((p,g)=>{if(p){d?d(p):this.destroy(p);return}g!=null&&this.push(g),this.push(null),d&&d()}):(this.push(null),d&&d())}function c(){this._final!==s&&s.call(this)}return a.prototype._final=s,a.prototype._transform=function(d,p,g){throw new r("_transform()")},a.prototype._write=function(d,p,g){const _=this._readableState,I=this._writableState,C=_.length;this._transform(d,p,(E,m)=>{if(E){g(E);return}m!=null&&this.push(m),I.ended||C===_.length||_.length<_.highWaterMark?g():this[o]=g})},a.prototype._read=function(){if(this[o]){const d=this[o];this[o]=null,d()}},ds}var fs,hd;function bp(){if(hd)return fs;hd=1;const{ObjectSetPrototypeOf:e}=Ue();fs=r;const t=gp();e(r.prototype,t.prototype),e(r,t);function r(n){if(!(this instanceof r))return new r(n);t.call(this,n)}return r.prototype._transform=function(n,i,o){o(null,n)},fs}var hs,pd;function tu(){if(pd)return hs;pd=1;const e=St(),{ArrayIsArray:t,Promise:r,SymbolAsyncIterator:n,SymbolDispose:i}=Ue(),o=Sr(),{once:a}=wt(),s=Mn(),c=ir(),{aggregateTwoErrors:d,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:g,ERR_MISSING_ARGS:_,ERR_STREAM_DESTROYED:I,ERR_STREAM_PREMATURE_CLOSE:C},AbortError:E}=ht(),{validateFunction:m,validateAbortSignal:R}=Yi(),{isIterable:S,isReadable:v,isReadableNodeStream:Q,isNodeStream:Y,isTransformStream:ee,isWebStream:te,isReadableStream:V,isReadableFinished:de}=sr(),P=globalThis.AbortController||Qt().AbortController;let D,z,x;function X(O,ae,ue){let le=!1;O.on("close",()=>{le=!0});const se=o(O,{readable:ae,writable:ue},k=>{le=!k});return{destroy:k=>{le||(le=!0,s.destroyer(O,k||new I("pipe")))},cleanup:se}}function re(O){return m(O[O.length-1],"streams[stream.length - 1]"),O.pop()}function ie(O){if(S(O))return O;if(Q(O))return he(O);throw new p("val",["Readable","Iterable","AsyncIterable"],O)}async function*he(O){z||(z=oa()),yield*z.prototype[n].call(O)}async function F(O,ae,ue,{end:le}){let se,k=null;const U=H=>{if(H&&(se=H),k){const l=k;k=null,l()}},ne=()=>new r((H,l)=>{se?l(se):k=()=>{se?l(se):H()}});ae.on("drain",U);const ce=o(ae,{readable:!1},U);try{ae.writableNeedDrain&&await ne();for await(const H of O)ae.write(H)||await ne();le&&(ae.end(),await ne()),ue()}catch(H){ue(se!==H?d(se,H):H)}finally{ce(),ae.off("drain",U)}}async function oe(O,ae,ue,{end:le}){ee(ae)&&(ae=ae.writable);const se=ae.getWriter();try{for await(const k of O)await se.ready,se.write(k).catch(()=>{});await se.ready,le&&await se.close(),ue()}catch(k){try{await se.abort(k),ue(k)}catch(U){ue(U)}}}function b(...O){return T(O,a(re(O)))}function T(O,ae,ue){if(O.length===1&&t(O[0])&&(O=O[0]),O.length<2)throw new _("streams");const le=new P,se=le.signal,k=ue?.signal,U=[];R(k,"options.signal");function ne(){B(new E)}x=x||wt().addAbortListener;let ce;k&&(ce=x(k,ne));let H,l;const f=[];let A=0;function j(J){B(J,--A===0)}function B(J,W){var fe;if(J&&(!H||H.code==="ERR_STREAM_PREMATURE_CLOSE")&&(H=J),!(!H&&!W)){for(;f.length;)f.shift()(H);(fe=ce)===null||fe===void 0||fe[i](),le.abort(),W&&(H||U.forEach(we=>we()),e.nextTick(ae,H,l))}}let q;for(let J=0;J<O.length;J++){const W=O[J],fe=J<O.length-1,we=J>0,pe=fe||ue?.end!==!1,ve=J===O.length-1;if(Y(W)){let Ae=function(Ce){Ce&&Ce.name!=="AbortError"&&Ce.code!=="ERR_STREAM_PREMATURE_CLOSE"&&j(Ce)};if(pe){const{destroy:Ce,cleanup:De}=X(W,fe,we);f.push(Ce),v(W)&&ve&&U.push(De)}W.on("error",Ae),v(W)&&ve&&U.push(()=>{W.removeListener("error",Ae)})}if(J===0)if(typeof W=="function"){if(q=W({signal:se}),!S(q))throw new g("Iterable, AsyncIterable or Stream","source",q)}else S(W)||Q(W)||ee(W)?q=W:q=c.from(W);else if(typeof W=="function"){if(ee(q)){var w;q=ie((w=q)===null||w===void 0?void 0:w.readable)}else q=ie(q);if(q=W(q,{signal:se}),fe){if(!S(q,!0))throw new g("AsyncIterable",`transform[${J-1}]`,q)}else{var L;D||(D=bp());const Ae=new D({objectMode:!0}),Ce=(L=q)===null||L===void 0?void 0:L.then;if(typeof Ce=="function")A++,Ce.call(q,Me=>{l=Me,Me!=null&&Ae.write(Me),pe&&Ae.end(),e.nextTick(j)},Me=>{Ae.destroy(Me),e.nextTick(j,Me)});else if(S(q,!0))A++,F(q,Ae,j,{end:pe});else if(V(q)||ee(q)){const Me=q.readable||q;A++,F(Me,Ae,j,{end:pe})}else throw new g("AsyncIterable or Promise","destination",q);q=Ae;const{destroy:De,cleanup:Ft}=X(q,!1,!0);f.push(De),ve&&U.push(Ft)}}else if(Y(W)){if(Q(q)){A+=2;const Ae=Z(q,W,j,{end:pe});v(W)&&ve&&U.push(Ae)}else if(ee(q)||V(q)){const Ae=q.readable||q;A++,F(Ae,W,j,{end:pe})}else if(S(q))A++,F(q,W,j,{end:pe});else throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],q);q=W}else if(te(W)){if(Q(q))A++,oe(ie(q),W,j,{end:pe});else if(V(q)||S(q))A++,oe(q,W,j,{end:pe});else if(ee(q))A++,oe(q.readable,W,j,{end:pe});else throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],q);q=W}else q=c.from(W)}return(se!=null&&se.aborted||k!=null&&k.aborted)&&e.nextTick(ne),q}function Z(O,ae,ue,{end:le}){let se=!1;if(ae.on("close",()=>{se||ue(new C)}),O.pipe(ae,{end:!1}),le){let k=function(){se=!0,ae.end()};de(O)?e.nextTick(k):O.once("end",k)}else ue();return o(O,{readable:!0,writable:!1},k=>{const U=O._readableState;k&&k.code==="ERR_STREAM_PREMATURE_CLOSE"&&U&&U.ended&&!U.errored&&!U.errorEmitted?O.once("end",ue).once("error",ue):ue(k)}),o(ae,{readable:!1,writable:!0},ue)}return hs={pipelineImpl:T,pipeline:b},hs}var ps,yd;function mp(){if(yd)return ps;yd=1;const{pipeline:e}=tu(),t=ir(),{destroyer:r}=Mn(),{isNodeStream:n,isReadable:i,isWritable:o,isWebStream:a,isTransformStream:s,isWritableStream:c,isReadableStream:d}=sr(),{AbortError:p,codes:{ERR_INVALID_ARG_VALUE:g,ERR_MISSING_ARGS:_}}=ht(),I=Sr();return ps=function(...E){if(E.length===0)throw new _("streams");if(E.length===1)return t.from(E[0]);const m=[...E];if(typeof E[0]=="function"&&(E[0]=t.from(E[0])),typeof E[E.length-1]=="function"){const D=E.length-1;E[D]=t.from(E[D])}for(let D=0;D<E.length;++D)if(!(!n(E[D])&&!a(E[D]))){if(D<E.length-1&&!(i(E[D])||d(E[D])||s(E[D])))throw new g(`streams[${D}]`,m[D],"must be readable");if(D>0&&!(o(E[D])||c(E[D])||s(E[D])))throw new g(`streams[${D}]`,m[D],"must be writable")}let R,S,v,Q,Y;function ee(D){const z=Q;Q=null,z?z(D):D?Y.destroy(D):!P&&!de&&Y.destroy()}const te=E[0],V=e(E,ee),de=!!(o(te)||c(te)||s(te)),P=!!(i(V)||d(V)||s(V));if(Y=new t({writableObjectMode:!!(te!=null&&te.writableObjectMode),readableObjectMode:!!(V!=null&&V.readableObjectMode),writable:de,readable:P}),de){if(n(te))Y._write=function(z,x,X){te.write(z,x)?X():R=X},Y._final=function(z){te.end(),S=z},te.on("drain",function(){if(R){const z=R;R=null,z()}});else if(a(te)){const x=(s(te)?te.writable:te).getWriter();Y._write=async function(X,re,ie){try{await x.ready,x.write(X).catch(()=>{}),ie()}catch(he){ie(he)}},Y._final=async function(X){try{await x.ready,x.close().catch(()=>{}),S=X}catch(re){X(re)}}}const D=s(V)?V.readable:V;I(D,()=>{if(S){const z=S;S=null,z()}})}if(P){if(n(V))V.on("readable",function(){if(v){const D=v;v=null,D()}}),V.on("end",function(){Y.push(null)}),Y._read=function(){for(;;){const D=V.read();if(D===null){v=Y._read;return}if(!Y.push(D))return}};else if(a(V)){const z=(s(V)?V.readable:V).getReader();Y._read=async function(){for(;;)try{const{value:x,done:X}=await z.read();if(!Y.push(x))return;if(X){Y.push(null);return}}catch{return}}}}return Y._destroy=function(D,z){!D&&Q!==null&&(D=new p),v=null,R=null,S=null,Q===null?z(D):(Q=z,n(V)&&r(V,D))},Y},ps}var gd;function Xw(){if(gd)return so;gd=1;const e=globalThis.AbortController||Qt().AbortController,{codes:{ERR_INVALID_ARG_VALUE:t,ERR_INVALID_ARG_TYPE:r,ERR_MISSING_ARGS:n,ERR_OUT_OF_RANGE:i},AbortError:o}=ht(),{validateAbortSignal:a,validateInteger:s,validateObject:c}=Yi(),d=Ue().Symbol("kWeak"),p=Ue().Symbol("kResistStopPropagation"),{finished:g}=Sr(),_=mp(),{addAbortSignalNoValidate:I}=na(),{isWritable:C,isNodeStream:E}=sr(),{deprecate:m}=wt(),{ArrayPrototypePush:R,Boolean:S,MathFloor:v,Number:Q,NumberIsNaN:Y,Promise:ee,PromiseReject:te,PromiseResolve:V,PromisePrototypeThen:de,Symbol:P}=Ue(),D=P("kEmpty"),z=P("kEof");function x(k,U){if(U!=null&&c(U,"options"),U?.signal!=null&&a(U.signal,"options.signal"),E(k)&&!C(k))throw new t("stream",k,"must be writable");const ne=_(this,k);return U!=null&&U.signal&&I(U.signal,ne),ne}function X(k,U){if(typeof k!="function")throw new r("fn",["Function","AsyncFunction"],k);U!=null&&c(U,"options"),U?.signal!=null&&a(U.signal,"options.signal");let ne=1;U?.concurrency!=null&&(ne=v(U.concurrency));let ce=ne-1;return U?.highWaterMark!=null&&(ce=v(U.highWaterMark)),s(ne,"options.concurrency",1),s(ce,"options.highWaterMark",0),ce+=ne,(async function*(){const l=wt().AbortSignalAny([U?.signal].filter(S)),f=this,A=[],j={signal:l};let B,q,w=!1,L=0;function J(){w=!0,W()}function W(){L-=1,fe()}function fe(){q&&!w&&L<ne&&A.length<ce&&(q(),q=null)}async function we(){try{for await(let pe of f){if(w)return;if(l.aborted)throw new o;try{if(pe=k(pe,j),pe===D)continue;pe=V(pe)}catch(ve){pe=te(ve)}L+=1,de(pe,W,J),A.push(pe),B&&(B(),B=null),!w&&(A.length>=ce||L>=ne)&&await new ee(ve=>{q=ve})}A.push(z)}catch(pe){const ve=te(pe);de(ve,W,J),A.push(ve)}finally{w=!0,B&&(B(),B=null)}}we();try{for(;;){for(;A.length>0;){const pe=await A[0];if(pe===z)return;if(l.aborted)throw new o;pe!==D&&(yield pe),A.shift(),fe()}await new ee(pe=>{B=pe})}}finally{w=!0,q&&(q(),q=null)}}).call(this)}function re(k=void 0){return k!=null&&c(k,"options"),k?.signal!=null&&a(k.signal,"options.signal"),(async function*(){let ne=0;for await(const H of this){var ce;if(k!=null&&(ce=k.signal)!==null&&ce!==void 0&&ce.aborted)throw new o({cause:k.signal.reason});yield[ne++,H]}}).call(this)}async function ie(k,U=void 0){for await(const ne of b.call(this,k,U))return!0;return!1}async function he(k,U=void 0){if(typeof k!="function")throw new r("fn",["Function","AsyncFunction"],k);return!await ie.call(this,async(...ne)=>!await k(...ne),U)}async function F(k,U){for await(const ne of b.call(this,k,U))return ne}async function oe(k,U){if(typeof k!="function")throw new r("fn",["Function","AsyncFunction"],k);async function ne(ce,H){return await k(ce,H),D}for await(const ce of X.call(this,ne,U));}function b(k,U){if(typeof k!="function")throw new r("fn",["Function","AsyncFunction"],k);async function ne(ce,H){return await k(ce,H)?ce:D}return X.call(this,ne,U)}class T extends n{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}async function Z(k,U,ne){var ce;if(typeof k!="function")throw new r("reducer",["Function","AsyncFunction"],k);ne!=null&&c(ne,"options"),ne?.signal!=null&&a(ne.signal,"options.signal");let H=arguments.length>1;if(ne!=null&&(ce=ne.signal)!==null&&ce!==void 0&&ce.aborted){const B=new o(void 0,{cause:ne.signal.reason});throw this.once("error",()=>{}),await g(this.destroy(B)),B}const l=new e,f=l.signal;if(ne!=null&&ne.signal){const B={once:!0,[d]:this,[p]:!0};ne.signal.addEventListener("abort",()=>l.abort(),B)}let A=!1;try{for await(const B of this){var j;if(A=!0,ne!=null&&(j=ne.signal)!==null&&j!==void 0&&j.aborted)throw new o;H?U=await k(U,B,{signal:f}):(U=B,H=!0)}if(!A&&!H)throw new T}finally{l.abort()}return U}async function O(k){k!=null&&c(k,"options"),k?.signal!=null&&a(k.signal,"options.signal");const U=[];for await(const ce of this){var ne;if(k!=null&&(ne=k.signal)!==null&&ne!==void 0&&ne.aborted)throw new o(void 0,{cause:k.signal.reason});R(U,ce)}return U}function ae(k,U){const ne=X.call(this,k,U);return(async function*(){for await(const H of ne)yield*H}).call(this)}function ue(k){if(k=Q(k),Y(k))return 0;if(k<0)throw new i("number",">= 0",k);return k}function le(k,U=void 0){return U!=null&&c(U,"options"),U?.signal!=null&&a(U.signal,"options.signal"),k=ue(k),(async function*(){var ce;if(U!=null&&(ce=U.signal)!==null&&ce!==void 0&&ce.aborted)throw new o;for await(const l of this){var H;if(U!=null&&(H=U.signal)!==null&&H!==void 0&&H.aborted)throw new o;k--<=0&&(yield l)}}).call(this)}function se(k,U=void 0){return U!=null&&c(U,"options"),U?.signal!=null&&a(U.signal,"options.signal"),k=ue(k),(async function*(){var ce;if(U!=null&&(ce=U.signal)!==null&&ce!==void 0&&ce.aborted)throw new o;for await(const l of this){var H;if(U!=null&&(H=U.signal)!==null&&H!==void 0&&H.aborted)throw new o;if(k-- >0&&(yield l),k<=0)return}}).call(this)}return so.streamReturningOperators={asIndexedPairs:m(re,"readable.asIndexedPairs will be removed in a future version."),drop:le,filter:b,flatMap:ae,map:X,take:se,compose:x},so.promiseReturningOperators={every:he,forEach:oe,reduce:Z,toArray:O,some:ie,find:F},so}var ys,bd;function wp(){if(bd)return ys;bd=1;const{ArrayPrototypePop:e,Promise:t}=Ue(),{isIterable:r,isNodeStream:n,isWebStream:i}=sr(),{pipelineImpl:o}=tu(),{finished:a}=Sr();Ap();function s(...c){return new t((d,p)=>{let g,_;const I=c[c.length-1];if(I&&typeof I=="object"&&!n(I)&&!r(I)&&!i(I)){const C=e(c);g=C.signal,_=C.end}o(c,(C,E)=>{C?p(C):d(E)},{signal:g,end:_})})}return ys={finished:a,pipeline:s},ys}var md;function Ap(){if(md)return Ga.exports;md=1;const{Buffer:e}=vt(),{ObjectDefineProperty:t,ObjectKeys:r,ReflectApply:n}=Ue(),{promisify:{custom:i}}=wt(),{streamReturningOperators:o,promiseReturningOperators:a}=Xw(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:s}}=ht(),c=mp(),{setDefaultHighWaterMark:d,getDefaultHighWaterMark:p}=ia(),{pipeline:g}=tu(),{destroyer:_}=Mn(),I=Sr(),C=wp(),E=sr(),m=Ga.exports=$l().Stream;m.isDestroyed=E.isDestroyed,m.isDisturbed=E.isDisturbed,m.isErrored=E.isErrored,m.isReadable=E.isReadable,m.isWritable=E.isWritable,m.Readable=oa();for(const S of r(o)){let Q=function(...Y){if(new.target)throw s();return m.Readable.from(n(v,this,Y))};const v=o[S];t(Q,"name",{__proto__:null,value:v.name}),t(Q,"length",{__proto__:null,value:v.length}),t(m.Readable.prototype,S,{__proto__:null,value:Q,enumerable:!1,configurable:!0,writable:!0})}for(const S of r(a)){let Q=function(...Y){if(new.target)throw s();return n(v,this,Y)};const v=a[S];t(Q,"name",{__proto__:null,value:v.name}),t(Q,"length",{__proto__:null,value:v.length}),t(m.Readable.prototype,S,{__proto__:null,value:Q,enumerable:!1,configurable:!0,writable:!0})}m.Writable=eu(),m.Duplex=ir(),m.Transform=gp(),m.PassThrough=bp(),m.pipeline=g;const{addAbortSignal:R}=na();return m.addAbortSignal=R,m.finished=I,m.destroy=_,m.compose=c,m.setDefaultHighWaterMark=d,m.getDefaultHighWaterMark=p,t(m,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return C}}),t(g,i,{__proto__:null,enumerable:!0,get(){return C.pipeline}}),t(I,i,{__proto__:null,enumerable:!0,get(){return C.finished}}),m.Stream=m,m._isUint8Array=function(v){return v instanceof Uint8Array},m._uint8ArrayToBuffer=function(v){return e.from(v.buffer,v.byteOffset,v.byteLength)},Ga.exports}var wd;function Zw(){return wd||(wd=1,(function(e){const t=Ap(),r=wp(),n=t.Readable.destroy;e.exports=t.Readable,e.exports._uint8ArrayToBuffer=t._uint8ArrayToBuffer,e.exports._isUint8Array=t._isUint8Array,e.exports.isDisturbed=t.isDisturbed,e.exports.isErrored=t.isErrored,e.exports.isReadable=t.isReadable,e.exports.Readable=t.Readable,e.exports.Writable=t.Writable,e.exports.Duplex=t.Duplex,e.exports.Transform=t.Transform,e.exports.PassThrough=t.PassThrough,e.exports.addAbortSignal=t.addAbortSignal,e.exports.finished=t.finished,e.exports.destroy=t.destroy,e.exports.destroy=n,e.exports.pipeline=t.pipeline,e.exports.compose=t.compose,Object.defineProperty(t,"promises",{configurable:!0,enumerable:!0,get(){return r}}),e.exports.Stream=t.Stream,e.exports.default=e.exports})(Qa)),Qa.exports}var Ad;function $w(){if(Ad)return ni;Ad=1,Object.defineProperty(ni,"__esModule",{value:!0}),ni.ActorQueryResultSerializeSparqlJson=void 0;const e=ip(),t=_r(),r=ap(),n=Zw();let i=class ui extends e.ActorQueryResultSerializeFixedMediaTypes{constructor(a){super(a)}static bindingToJsonBindings(a){if(a.termType==="Literal"){const s=a,c={value:s.value,type:"literal"},{language:d,datatype:p}=s;return d?c["xml:lang"]=d:p&&p.value!=="http://www.w3.org/2001/XMLSchema#string"&&(c.datatype=p.value),c}return a.termType==="BlankNode"?{value:a.value,type:"bnode"}:a.termType==="Quad"?{value:{subject:ui.bindingToJsonBindings(a.subject),predicate:ui.bindingToJsonBindings(a.predicate),object:ui.bindingToJsonBindings(a.object)},type:"triple"}:{value:a.value,type:"uri"}}async testHandleChecked(a,s){return["bindings","boolean"].includes(a.type)?(0,t.passTestVoid)():(0,t.failTest)("This actor can only handle bindings streams or booleans.")}async runHandle(a,s,c){const d=new n.Readable,p={};if(a.type==="bindings"){const g=await a.metadata();g.variables.length>0&&(p.vars=g.variables.map(_=>_.variable.value))}if(d.push(`{"head": ${JSON.stringify(p)},
16
- `),a.type==="bindings"){const g=a.bindingsStream;d.push(`"results": { "bindings": [
17
- `);let _=!0;function*I(C){yield C()}d.wrap((0,r.wrap)(g).map(C=>{const E=`${_?"":`,
18
- `}${JSON.stringify(Object.fromEntries([...C].map(([m,R])=>[m.value,ui.bindingToJsonBindings(R)])))}`;return _=!1,E}).append((0,r.wrap)(I(()=>`
19
- ]}${this.emitMetadata?`,
20
- "metadata": { "httpRequests": ${this.httpObserver.requests} }`:""}}
21
- `))))}else d.wrap((0,r.wrap)(a.execute().then(g=>[`"boolean":${g}
22
- }
23
- `])));return{data:d}}};return ni.ActorQueryResultSerializeSparqlJson=i,ni}var _d;function eA(){return _d||(_d=1,(function(e){var t=Fr&&Fr.__createBinding||(Object.create?(function(n,i,o,a){a===void 0&&(a=o);var s=Object.getOwnPropertyDescriptor(i,o);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,a,s)}):(function(n,i,o,a){a===void 0&&(a=o),n[a]=i[o]})),r=Fr&&Fr.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,n,o)};Object.defineProperty(e,"__esModule",{value:!0}),r(Gw(),e),r($w(),e)})(Fr)),Fr}var tA=eA();const rA=[{id:"api-platform",label:"API Platform",kind:"api-platform",lifecycle:"active",authModes:["apiKey"]}],uo=[{id:"openai-compatible",label:"OpenAI Compatible",kind:"api-platform",lifecycle:"active",authModes:["apiKey"],runtimeProviderIds:["custom"],consoleUrl:"https://undefineds.co",subscriptionUrl:"https://undefineds.co",endpoints:[{protocol:"chatCompletions",baseUrl:"https://example.invalid/v1"}],modelDiscovery:{strategy:"openaiCompatible",path:"/models",endpointProtocol:"chatCompletions"},quota:{strategy:"unsupported",url:"https://undefineds.co"}},{id:"anthropic-compatible",label:"Anthropic Compatible",kind:"api-platform",lifecycle:"active",authModes:["apiKey"],runtimeProviderIds:["custom"],consoleUrl:"https://undefineds.co",subscriptionUrl:"https://undefineds.co",endpoints:[{protocol:"anthropic",baseUrl:"https://example.invalid/v1"}],modelDiscovery:{strategy:"anthropic",path:"/models",endpointProtocol:"anthropic"},quota:{strategy:"unsupported",url:"https://undefineds.co"}}],gs="https://www.kimi.com/code",nA="https://www.kimi.com/user/agreement",iA="https://api.kimi.com/coding/v1",oA="https://api.kimi.com/coding/",aA="https://platform.moonshot.cn/console/api-keys",vd="https://platform.moonshot.cn/console/account",sA="https://platform.moonshot.cn/docs/intro",lA="https://api.moonshot.ai/v1",co="https://bailian.console.aliyun.com/",fo="https://help.aliyun.com/zh/model-studio/",Sd="https://open.bigmodel.cn/usercenter/apikeys",Ed="https://open.bigmodel.cn/",uA="https://open.bigmodel.cn/api/paas/v4",cA="https://open.bigmodel.cn/api/coding/paas/v4",dA={openai:[{id:"official-subscription",label:"OpenAI Subscription",kind:"oauth-subscription",lifecycle:"unavailable",authModes:["oauth","local"],productLabel:"OpenAI",runtimeProviderIds:["openai"],credentialPrefixHints:[],consoleUrl:"https://chatgpt.com/codex",subscriptionUrl:"https://chatgpt.com/codex",endpoints:[{protocol:"responses",baseUrl:"https://chatgpt.com/backend-api/codex"}],modelDiscovery:{strategy:"unsupported",path:"/models",endpointProtocol:"responses"},quota:{strategy:"subscription",url:"https://chatgpt.com/codex"},usagePolicyUrl:"https://openai.com/policies/usage-policies/",region:"global"},{id:"api-platform",label:"API Platform",kind:"api-platform",lifecycle:"active",authModes:["apiKey"],productLabel:"OpenAI",runtimeProviderIds:["openai"],credentialPrefixHints:["sk-"],consoleUrl:"https://platform.openai.com/api-keys",subscriptionUrl:"https://platform.openai.com/settings/organization/billing/overview",endpoints:[{protocol:"responses",baseUrl:"https://api.openai.com/v1"},{protocol:"chatCompletions",baseUrl:"https://api.openai.com/v1"}],modelDiscovery:{strategy:"openaiCompatible",path:"/models",endpointProtocol:"responses"},quota:{strategy:"providerApi",url:"https://platform.openai.com/usage"},usagePolicyUrl:"https://openai.com/policies/usage-policies/",region:"global"}],anthropic:[{id:"official-subscription",label:"Claude Code Subscription",kind:"oauth-subscription",lifecycle:"unavailable",authModes:["oauth"],productLabel:"Anthropic",runtimeProviderIds:["anthropic"],credentialPrefixHints:[],consoleUrl:"https://claude.ai/",subscriptionUrl:"https://claude.ai/settings/billing",endpoints:[],modelDiscovery:{strategy:"unsupported",path:"/models",endpointProtocol:"anthropic"},quota:{strategy:"subscription",url:"https://claude.ai/settings/usage"},usagePolicyUrl:"https://www.anthropic.com/legal/aup",region:"global"},{id:"api-platform",label:"API Platform",kind:"api-platform",lifecycle:"active",authModes:["apiKey"],productLabel:"Anthropic",runtimeProviderIds:["anthropic"],credentialPrefixHints:["sk-ant-"],consoleUrl:"https://console.anthropic.com/settings/keys",subscriptionUrl:"https://console.anthropic.com/settings/plans",endpoints:[{protocol:"anthropic",baseUrl:"https://api.anthropic.com/v1"}],modelDiscovery:{strategy:"anthropic",path:"/models",endpointProtocol:"anthropic"},quota:{strategy:"console",url:"https://console.anthropic.com/settings/limits"},usagePolicyUrl:"https://www.anthropic.com/legal/aup",region:"global"}],kimi:[xd({id:"subscription-key",label:"Token Plan",kind:"token-plan",authModes:["apiKey"],productLabel:"Kimi Coding",runtimeProviderIds:["kimi"],credentialPrefixHints:["sk-kimi-"],baseUrl:iA,anthropicBaseUrl:oA,quotaStrategy:"subscription",quotaUrl:gs,consoleUrl:gs,subscriptionUrl:gs,usagePolicyUrl:nA,supportsDeveloperMessages:!1}),xd({id:"api-platform",label:"API Platform",kind:"api-platform",authModes:["apiKey"],productLabel:"Moonshot AI",runtimeProviderIds:["kimi"],credentialPrefixHints:["sk-"],baseUrl:lA,quotaStrategy:"console",quotaUrl:vd,consoleUrl:aA,subscriptionUrl:vd,usagePolicyUrl:sA})],bailian:[ho({id:"pay-as-you-go",label:"Pay as You Go",kind:"api-platform",runtimeProviderIds:["bailian"],credentialPrefixHints:["sk-"],region:"cn",baseUrl:"https://dashscope.aliyuncs.com/compatible-mode/v1",anthropicBaseUrl:"https://dashscope.aliyuncs.com/apps/anthropic",quotaStrategy:"console",consoleUrl:co,usagePolicyUrl:fo}),ho({id:"token-plan",label:"Token Plan Personal",kind:"token-plan",runtimeProviderIds:["bailian-token-plan"],credentialPrefixHints:["sk-"],region:"cn-beijing",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",anthropicBaseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/apps/anthropic",quotaStrategy:"subscription",consoleUrl:co,usagePolicyUrl:fo}),ho({id:"token-plan-team",label:"Token Plan Team",kind:"token-plan",runtimeProviderIds:["bailian-token-plan"],credentialPrefixHints:["sk-"],region:"cn-beijing",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",anthropicBaseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/apps/anthropic",quotaStrategy:"subscription",consoleUrl:co,usagePolicyUrl:fo}),ho({id:"coding-plan",label:"Coding Plan Pro",kind:"token-plan",runtimeProviderIds:["bailian-coding-plan"],credentialPrefixHints:["sk-sp-"],region:"cn",baseUrl:"https://coding.dashscope.aliyuncs.com/v1",anthropicBaseUrl:"https://coding.dashscope.aliyuncs.com/apps/anthropic",quotaStrategy:"subscription",consoleUrl:co,usagePolicyUrl:fo})],deepseek:[{id:"api-platform",label:"API Platform",kind:"api-platform",lifecycle:"active",authModes:["apiKey"],productLabel:"DeepSeek",runtimeProviderIds:["deepseek"],credentialPrefixHints:["sk-"],consoleUrl:"https://platform.deepseek.com/api_keys",subscriptionUrl:"https://platform.deepseek.com/usage",endpoints:[{protocol:"chatCompletions",baseUrl:"https://api.deepseek.com/v1"}],modelDiscovery:{strategy:"openaiCompatible",path:"/models",endpointProtocol:"chatCompletions"},quota:{strategy:"console",url:"https://platform.deepseek.com/usage"},usagePolicyUrl:"https://cdn.deepseek.com/policies/en-US/deepseek-open-platform-terms-of-use.html",region:"global"}],ollama:[{id:"local",label:"Local Ollama",kind:"local",lifecycle:"active",authModes:["local"],productLabel:"Ollama",runtimeProviderIds:["ollama"],credentialPrefixHints:[],consoleUrl:"https://ollama.com",subscriptionUrl:"https://ollama.com",endpoints:[{protocol:"chatCompletions",baseUrl:"http://localhost:11434/v1"}],modelDiscovery:{strategy:"openaiCompatible",path:"/models",endpointProtocol:"chatCompletions"},quota:{strategy:"unsupported",url:"https://ollama.com"},usagePolicyUrl:"https://ollama.com",region:"local"}],zhipu:[{id:"api-platform",label:"API Platform",kind:"api-platform",lifecycle:"active",authModes:["apiKey"],productLabel:"智谱 AI",runtimeProviderIds:["zhipu"],credentialPrefixHints:["id."],consoleUrl:Sd,subscriptionUrl:"https://open.bigmodel.cn/finance-center/expense-manage",endpoints:[{protocol:"chatCompletions",baseUrl:uA,region:"cn"}],modelDiscovery:{strategy:"openaiCompatible",path:"/models",endpointProtocol:"chatCompletions"},quota:{strategy:"console",url:"https://open.bigmodel.cn/finance-center/expense-manage"},usagePolicyUrl:Ed,region:"cn"},{id:"coding-plan",label:"GLM Coding Plan",kind:"token-plan",lifecycle:"active",authModes:["apiKey"],productLabel:"智谱 AI",runtimeProviderIds:["zhipu"],credentialPrefixHints:["id."],consoleUrl:Sd,subscriptionUrl:"https://bigmodel.cn/glm-coding",endpoints:[{protocol:"chatCompletions",baseUrl:cA,region:"cn"}],modelDiscovery:{strategy:"openaiCompatible",path:"/models",endpointProtocol:"chatCompletions"},quota:{strategy:"subscription",url:"https://bigmodel.cn/glm-coding"},usagePolicyUrl:Ed,region:"cn"}]};function xd(e){return{id:e.id,label:e.label,kind:e.kind,lifecycle:"active",authModes:e.authModes,productLabel:e.productLabel,runtimeProviderIds:e.runtimeProviderIds,credentialPrefixHints:e.credentialPrefixHints,consoleUrl:e.consoleUrl,subscriptionUrl:e.subscriptionUrl,endpoints:_p(e.baseUrl,e.anthropicBaseUrl,"cn",e.supportsDeveloperMessages),modelDiscovery:{strategy:"openaiCompatible",path:"/models",endpointProtocol:"chatCompletions"},quota:{strategy:e.quotaStrategy,url:e.quotaUrl},usagePolicyUrl:e.usagePolicyUrl,region:"cn"}}function ho(e){return{id:e.id,label:e.label,lifecycle:"active",productLabel:"Alibaba Bailian",kind:e.kind,authModes:["apiKey"],runtimeProviderIds:e.runtimeProviderIds,credentialPrefixHints:e.credentialPrefixHints,consoleUrl:e.consoleUrl,subscriptionUrl:e.consoleUrl,endpoints:_p(e.baseUrl,e.anthropicBaseUrl,e.region),modelDiscovery:{strategy:"openaiCompatible",path:"/models",endpointProtocol:"chatCompletions"},quota:{strategy:e.quotaStrategy,url:e.consoleUrl},usagePolicyUrl:e.usagePolicyUrl,region:e.region}}function _p(e,t,r,n){return[{protocol:"chatCompletions",baseUrl:e,region:r,...n===void 0?{}:{supportsDeveloperMessages:n}},...t?[{protocol:"anthropic",baseUrl:t,region:r}]:[]]}function vp(e,t=!1){return(dA[e]??rA).map(r=>e==="openai"&&r.id==="official-subscription"&&t?{...r,lifecycle:"active",authModes:Array.from(new Set([...r.authModes??[],"local"])),authorizationMethods:[{id:"device-code",authMode:"deviceCode",connectMode:"deviceCodeOAuth",label:"设备码登录",lifecycle:"active"},{id:"local-session-import",authMode:"local",label:"已有登录态",lifecycle:"active"}]}:{...r})}function fA(e,t){return e==="anthropic"||t==="anthropic-compatible"?"anthropic":"openai"}function Mo(e){switch(e){case"openai":return"OpenAI";case"anthropic":return"Anthropic";case"kimi":return"Kimi";case"bailian":return"百炼";case"deepseek":return"DeepSeek";case"zhipu":return"智谱 AI";case"ollama":return"Ollama";case"custom":return"Custom"}}function rn(e,t){return e==="openai"&&(t==="local"||t==="oauth"||t==="deviceCode")?"official-subscription":e==="kimi"&&(t==="oauth"||t==="deviceCode")?"subscription-key":e==="bailian"?"pay-as-you-go":e==="ollama"?"local":e==="custom"?"openai-compatible":"api-platform"}function Id(e,t){const r=vp(e).find(i=>i.id===(t??rn(e,"apiKey")));if(!r)return;const n=r.modelDiscovery?.endpointProtocol;return r.endpoints?.find(i=>i.protocol===n)?.baseUrl??r.endpoints?.[0]?.baseUrl}const Si=Array.from(new Set([...zd,"zhipu","ollama","custom"])),Rd=new WeakMap;function hA(e){gA(),Up({createQueryEngine:async()=>new ay});const t=new URL("settings/-/sparql",e.podUrl).toString();return Ie.setSparqlEndpoint(t),Be.setSparqlEndpoint(t),yt.setSparqlEndpoint(t),{async listModels(){return await e.database.init?.(yt),(await e.database.select().from(yt).execute()).map(vA).filter(ln)},async listProviders(){await e.database.init?.(Ie,Be,yt);const r=await e.database.select().from(Ie).execute(),n=await e.database.select().from(Be).execute(),i=await e.database.select().from(yt).execute();return bA(e,r,n,i)},async createApiKeyCredential(r,n){const i=Pt(r);if(!i)throw new Error("unsupported_provider");await e.database.init?.(Ie,Be);const o=Ie.buildId({id:`${i}-${crypto.randomUUID()}`}),a=1,s=n.offeringId??rn(i,"apiKey"),c=n.baseUrl??Id(i,s),d=ws(n.proxyUrl),p={id:o,provider:i==="custom"?EA(o):ms(i,s),service:"ai",authMode:"apiKey",status:"active",accountLabel:n.label,label:n.label,baseUrl:c,proxyUrl:d,keyVersion:String(a),reauthRequired:!1,encryptedSecret:po(e,i,o,{type:"apiKey",apiKey:n.apiKey}),encryptionAlgorithm:"PLAINTEXT",metadata:{offeringId:s,priority:n.priority??100,enabled:!0,health:"unknown",baseUrl:c,...n.compatibility?{compatibility:n.compatibility}:{}}};return await e.database.insert(Ie).values(p).execute(),ot(e,i,p)},async createLocalCredential(r,n){const i=Pt(r);if(!i)throw new Error("unsupported_provider");await e.database.init?.(Ie,Be);const o=Ie.buildId({id:`${i}-local-${crypto.randomUUID()}`}),a=n.offeringId??rn(i,"local"),s=n.baseUrl??Id(i,a),c={id:o,provider:ms(i,a),service:"ai",authMode:"local",status:"active",accountLabel:n.label??"Local",label:n.label??"Local",baseUrl:s,keyVersion:"1",reauthRequired:!1,encryptedSecret:po(e,i,o,{type:"local"}),encryptionAlgorithm:"PLAINTEXT",metadata:{offeringId:a,priority:n.priority??100,enabled:!0,health:"unknown",baseUrl:s}};return await e.database.insert(Ie).values(c).execute(),ot(e,i,c)},async saveOAuthCredential(r,n){const i=Pt(r);if(!i)throw new Error("unsupported_provider");const a=(Rd.get(e.database)??Promise.resolve()).then(async()=>{await e.database.init?.(Ie,Be);const s=Ei(i,n.offeringId??rn(i,"deviceCode"))??rn(i,"deviceCode"),d=(await e.database.select().from(Ie).execute()).find(S=>{const v=ot(e,i,S);if(!v||v.authMode!=="deviceCode"&&v.authMode!=="oauth"||Ei(i,v.offeringId)!==s||S.status!=="active"&&S.status!=="disabled")return!1;const Q=ci(e,i,v.id,S.encryptedSecret);return wA(n,gt(S.metadata),Q)}),p=d&&ot(e,i,d),g=gt(d?.metadata),_=p&&ci(e,i,p.id,d?.encryptedSecret),I=p?.id??Ie.buildId({id:`${i}-oauth-${crypto.randomUUID()}`}),C=n.accountLabel??"OAuth",E=n.accountId??ye(g?.accountId)??ye(_?.accountId),m=n.accountSubject??ye(g?.authoritativeSubject)??ye(_?.accountSubject)??ye(_?.authoritativeSubject),R={...d,id:I,provider:ms(i,s),service:"ai",authMode:"deviceCodeOAuth",status:p?.enabled===!1?"disabled":"active",accountLabel:d?.accountLabel??C,label:d?.label??C,expiresAt:n.expiresAt,scopes:n.scope?n.scope.split(/\s+/u).filter(Boolean):void 0,keyVersion:String((p?.version??0)+1),reauthRequired:!1,encryptedSecret:po(e,i,I,{type:"deviceCodeOAuth",accessToken:n.accessToken,refreshToken:n.refreshToken,expiresAt:n.expiresAt,scope:n.scope,idToken:n.idToken,accountId:E,accountSubject:m,accountLabel:n.accountLabel,offeringId:s,authorizationMethodId:n.authorizationMethodId}),encryptionAlgorithm:"PLAINTEXT",metadata:{...g,offeringId:s,priority:p?.priority??100,enabled:p?.enabled??!0,health:"healthy",authoritativeSubject:m,accountId:E,authorizationMethodId:n.authorizationMethodId}};if(d){const S={...R};if(delete S.id,!await e.database.updateById(Ie,I,S))throw new Error("credential_version_conflict")}else await e.database.insert(Ie).values(R).execute();return ot(e,i,R)});return Rd.set(e.database,a.then(()=>{},()=>{})),a},async updateOAuthCredential(r,n,i,o){const a=Pt(r);if(!a)throw new Error("unsupported_provider");await e.database.init?.(Ie,Be);const s=await e.database.findById(Ie,n),c=s&&ot(e,a,s);if(!s||!c||c.authMode!=="deviceCode")throw new Error("oauth_credential_not_found");if(c.version!==i)throw new Error("credential_version_conflict");const d=ci(e,a,n,s.encryptedSecret),p=o.accountId??ye(gt(s.metadata)?.accountId)??ye(d?.accountId),g=o.accountSubject??ye(gt(s.metadata)?.authoritativeSubject)??ye(d?.accountSubject)??ye(d?.authoritativeSubject),_={expiresAt:o.expiresAt,scopes:o.scope?o.scope.split(/\s+/u).filter(Boolean):void 0,keyVersion:String(i+1),reauthRequired:!1,status:"active",encryptedSecret:po(e,a,n,{type:"deviceCodeOAuth",accessToken:o.accessToken,refreshToken:o.refreshToken,expiresAt:o.expiresAt,scope:o.scope,idToken:o.idToken,accountId:p,accountSubject:g,accountLabel:o.accountLabel??ye(s.accountLabel),offeringId:o.offeringId??c.offeringId,authorizationMethodId:o.authorizationMethodId??ye(gt(s.metadata)?.authorizationMethodId)}),accountLabel:o.accountLabel??ye(s.accountLabel),label:o.accountLabel??ye(s.label),metadata:{...gt(s.metadata),offeringId:o.offeringId??c.offeringId,enabled:!0,health:"healthy",authoritativeSubject:g,accountId:p,authorizationMethodId:o.authorizationMethodId??ye(gt(s.metadata)?.authorizationMethodId)}},I=await e.database.updateById(Ie,n,_);if(!I)throw new Error("credential_version_conflict");return ot(e,a,I)},async updateProviderCredential(r,n,i){const o=Pt(r);if(!o)throw new Error("unsupported_provider");await e.database.init?.(Ie,Be);const a=await e.database.findById(Ie,n),s=a&&ot(e,o,a);if(!a||!s)throw new Error("credential_not_found");if(s.version!==i.expectedVersion)throw new Error("credential_version_conflict");const c={...gt(a.metadata),...i.priority===void 0?{}:{priority:i.priority},...i.enabled===void 0?{}:{enabled:i.enabled},...i.baseUrl===void 0?{}:{baseUrl:i.baseUrl},...i.proxyUrl===void 0?{}:{proxyUrl:ws(i.proxyUrl)}},d={...i.label===void 0?{}:{accountLabel:i.label,label:i.label},...i.baseUrl===void 0?{}:{baseUrl:i.baseUrl},...i.proxyUrl===void 0?{}:{proxyUrl:ws(i.proxyUrl)},...i.enabled===void 0?{}:{status:i.enabled?"active":"disabled"},keyVersion:String(s.version+1),metadata:c},p=await e.database.updateById(Ie,n,d);if(!p)throw new Error("credential_update_failed");const g=ot(e,o,p);if(!g)throw new Error("credential_update_failed");return g},async markCredentialHealth(r,n,i,o){const a=Pt(r);if(!a)throw new Error("unsupported_provider");await e.database.init?.(Ie);const s=await e.database.findById(Ie,n),c=s&&ot(e,a,s);if(!s||!c)throw new Error("credential_not_found");if(c.version!==o)throw new Error("credential_version_conflict");const d=await e.database.updateById(Ie,n,{keyVersion:String(c.version+1),metadata:{...gt(s.metadata),health:i}});if(!d)throw new Error("credential_update_failed");const p=ot(e,a,d);if(!p)throw new Error("credential_update_failed");return p},async deleteProviderCredential(r,n){const i=Pt(r);if(!i)throw new Error("unsupported_provider");await e.database.init?.(Ie,Be);const o=await e.database.findById(Ie,n),a=o&&ot(e,i,o);if(a)return await e.database.deleteById(Ie,n),a},async readCredentialSecret(r,n){const i=Pt(r);if(!i)throw new Error("unsupported_provider");const o=await e.database.findById(Ie,n);if(!o||!ot(e,i,o))throw new Error("credential_not_found");const a=ci(e,i,n,o.encryptedSecret);if(!a)throw new Error("credential_secret_unavailable");return a},async saveDiscoveredModels(r,n,i){const o=Pt(r);if(!o)throw new Error("unsupported_provider");await e.database.init?.(Ie,Be,yt);const a=await Cd(e,n),s=Dd(o,a);await Pd(e.database,s,Mo(o));const c=await e.database.select().from(yt).execute(),d=new Set(c.map(_=>ye(_.id)).filter(ln)),p=i.map(SA).filter(ln),g=new Set(p.map(_=>_.id));for(const _ of c.filter(I=>Wr(ye(I.isProvidedBy),s))){const I=Hr(ye(_.id),s);I&&!g.has(I)&&ye(_.status)!=="unavailable"&&await e.database.updateById(yt,String(_.id),{status:"unavailable"})}for(const _ of p)await IA(e.database,s,_,d)},async saveModelSelection(r,n,i){const o=Pt(r);if(!o)throw new Error("unsupported_provider");await e.database.init?.(Be,yt);const a=o==="custom"&&i?await Cd(e,i):null;if(o==="custom"&&i&&!a)throw new Error("credential_not_found");const s=a?Dd(o,a):Be.buildId({id:o});await Pd(e.database,s,Mo(o));const d=(await e.database.select().from(Be).execute()).find(E=>Wr(ye(E.id),s)),p=ye(d?.id)??s,g=xp(d?.hasModel),_=await e.database.select().from(yt).execute(),I=[...new Set(n.map(E=>RA(o,E,_,a?s:void 0)))];if(!await e.database.updateById(Be,p,{hasModel:I}))throw new Error("provider_model_selection_update_failed");e.authenticatedFetch&&await yA(e,p,g,I)}}}const pA="https://undefineds.co/ns#hasModel";async function yA(e,t,r,n){const i=bs(Be,e.podUrl,t),o=r.map(p=>bs(yt,e.podUrl,p)),a=n.map(p=>bs(yt,e.podUrl,p)),s=p=>p.map(g=>`<${i}> <${pA}> <${g}> .`).join(`
24
- `),c=[o.length>0?`DELETE DATA { ${s(o)} }`:void 0,a.length>0?`INSERT DATA { ${s(a)} }`:void 0].filter(p=>!!p);if(c.length===0)return;const d=await e.authenticatedFetch(i.split("#",1)[0],{method:"PATCH",headers:{"content-type":"application/sparql-update"},body:c.join(`;
25
- `)});if(!d.ok)throw new Error(`provider_model_selection_persist_failed:${d.status}`)}function bs(e,t,r){return/^https?:\/\//u.test(r)?r:e.buildIri(t,{id:r})}async function Cd(e,t){const r=await e.database.findById(Ie,t);return r||((await e.database.select().from(Ie).execute()).find(i=>{const o=ye(i.id);return o===t||(o?Ie.buildIri(e.podUrl,{id:o})===t:!1)})??null)}function gA(){Md(Qw.ActionObserverHttp.prototype),Md(tA.ActionObserverHttp.prototype)}function Md(e){const t=e;if(t.__xpodObservedActorsPatch)return;const r=t.onRun;t.onRun=function(n,i,o){return Array.isArray(this.observedActors)||(this.observedActors=[]),r.call(this,n,i,o)},t.__xpodObservedActorsPatch=!0}function bA(e,t,r,n){const i=t.filter(o=>ye(o.service)==="ai").filter(o=>ye(o.status)!=="revoked");return Si.map(o=>{const a=i.map(p=>ot(e,o,p)).filter(ln).sort((p,g)=>p.priority-g.priority||p.id.localeCompare(g.id)),s=r.find(p=>Qr(ye(p.id))===o),d=xp(s?.hasModel).map(p=>_A(o,p,n));return{id:o,name:o==="custom"?a.find(p=>p.label)?.label??Mo(o):Mo(o),offerings:o==="custom"?CA(i.filter(p=>ot(e,o,p))):vp(o,e.openAiSubscriptionImportAvailable===!0),credentials:a,selectedModels:d,status:MA(a)}})}function po(e,t,r,n){return JSON.stringify({algorithm:"PLAINTEXT",encoding:"base64",ciphertext:mA(n),webId:e.webId,credentialIri:Ie.buildIri(e.podUrl,{id:r}),provider:t})}function mA(e){const t=new TextEncoder().encode(JSON.stringify(e));let r="";for(const n of t)r+=String.fromCharCode(n);return btoa(r)}function wA(e,t,r){let n=!1;for(const[i,o]of[[e.accountId,[t?.accountId,r?.accountId]],[e.accountSubject,[t?.authoritativeSubject,r?.accountSubject,r?.authoritativeSubject]]]){const a=[...new Set(o.map(ye).filter(ln).filter(s=>s.trim()))];if(a.length>1)return!1;if(!(!i?.trim()||!a.length)){if(a[0]!==i)return!1;n=!0}}return n}function ot(e,t,r){const n=ye(r.id);if(!n)return;const i=ru(ye(r.provider))??TA(n);if(i!==t)return;const o=gt(r.metadata),a=OA(r.authMode);if(a)return{id:n,provider:i,offeringId:ye(o?.offeringId)??nu(ye(r.provider))??rn(i,a),authMode:a,label:ye(r.accountLabel)??ye(r.label),enabled:kd(o?.enabled)??ye(r.status)==="active",priority:Td(o?.priority)??100,health:jA(o?.health)??(kd(r.reauthRequired)?"expired":"healthy"),maskedHint:DA(e,i,n,r.encryptedSecret),baseUrl:ye(r.baseUrl),proxyUrl:kA(ye(r.proxyUrl)??ye(o?.proxyUrl)),compatibility:AA(o?.compatibility),expiresAt:NA(r.expiresAt),version:Td(r.keyVersion)??0}}function AA(e){return e==="auto"||e==="openai"||e==="anthropic"?e:void 0}function _A(e,t,r){const n=r.find(s=>br(ye(s.id))===br(t)),i=ye(n?.isProvidedBy),o=n?Hr(t,i??e)??t:Hr(t,e)??t,a=n??r.find(s=>{const c=ye(s.id),d=ye(s.isProvidedBy);return c===t||Hr(c,e)===o||ru(d)===e&&Hr(c,d??e)===o});return{id:o,provider:e,offeringId:nu(ye(a?.isProvidedBy)),credentialId:Sp(i),resourceId:ye(a?.id)??t,displayName:ye(a?.displayName),availability:ye(a?.status)==="unavailable"||!a?"unavailable":"available"}}function vA(e){const t=ye(e.isProvidedBy),r=ru(t),n=r&&Hr(ye(e.id),t??r);if(!(!r||!n))return{id:n,provider:r,offeringId:nu(t),credentialId:Sp(t),resourceId:ye(e.id),displayName:ye(e.displayName),availability:ye(e.status)==="unavailable"?"unavailable":"available"}}function SA(e){const t=gt(e),r=ye(t?.id);if(r)return{id:r,displayName:ye(t?.displayName)}}function Dd(e,t){const r=ye(t?.provider),n=br(r),i=Qr(r);if(n&&i&&i!==e&&n.includes("#"))return Be.buildId({id:n});const o=ye(gt(t?.metadata)?.offeringId),a=Ei(e,o??xA(e,i));return a?Be.buildId({id:`${e}-${a}.ttl#this`}):Be.buildId({id:e})}function ms(e,t){const r=Ei(e,t)??t;return Be.buildId({id:`${e}-${r}.ttl#this`})}function EA(e){return Be.buildId({id:`custom-instance-${encodeURIComponent(e)}.ttl#this`})}function Sp(e){const t=Qr(e),r=t?.startsWith("custom-instance-")?t.slice(16):void 0;if(r)try{return decodeURIComponent(r)}catch{return}}function Ei(e,t){if(!t)return;const r=t.trim().toLowerCase();if(e==="bailian"){if(r==="token-plan")return"token-plan-personal";if(r==="coding-plan")return"coding-plan-pro";if(r==="payg")return"pay-as-you-go"}return r}function xA(e,t){if(!(!t||t===e)&&e==="bailian"){if(t==="bailian-token-plan")return"token-plan-personal";if(t==="bailian-coding-plan")return"coding-plan-pro"}}function Wr(e,t){const r=br(e),n=br(t);return r!==void 0&&r===n}async function Pd(e,t,r){(await e.select().from(Be).execute()).some(i=>Wr(ye(i.id),t))||await e.insert(Be).values({id:t,displayName:r}).execute()}async function IA(e,t,r,n){const i=Ep(t,r.id),o={displayName:r.displayName??r.id,isProvidedBy:t,status:"active"};if(n.has(i)){await e.updateById(yt,i,o);return}await e.insert(yt).values({id:i,...o}).execute(),n.add(i)}function Ep(e,t){const r=br(e)??`${e}.ttl`;return`${r.split("#",1)[0]??r}#${encodeURIComponent(t)}`}function RA(e,t,r,n){const i=ye(t.resourceId),o=Ei(e,ye(t.offeringId)),a=n??(o?Be.buildId({id:`${e}-${o}.ttl#this`}):Be.buildId({id:e})),s=ye(t.id),c=s?r.filter(p=>{const g=ye(p.isProvidedBy),_=Qr(g);return(n?Wr(g,n):_===e||_?.startsWith(`${e}-`)===!0)&&Hr(ye(p.id),g??a)===s}):[],d=n?c[0]:o?c.find(p=>Wr(ye(p.isProvidedBy),a)):c.length===1?c[0]:void 0;if(i){const p=r.find(E=>ye(E.id)===i);if(!p&&d)return String(d.id);const g=ye(p?.isProvidedBy),_=Qr(g),I=n?Wr(g,n):_===e||_?.startsWith(`${e}-`)===!0,C=!!n||!o||Wr(g,a);if(!p||!I||!C)throw new Error("invalid_model_selection_resource");return i}if(!s)throw new Error("invalid_model_selection_resource");return ye(d?.id)??Ep(a,s)}function Hr(e,t){if(!e)return;const n=br(t)?.split("#",1)[0]??t,i=n.endsWith(".ttl")?`${n}#`:`${n}.ttl#`,o=e.lastIndexOf(i);if(!(o<0))try{return decodeURIComponent(e.slice(o+i.length))}catch{return e.slice(o+i.length)}}function xp(e){if(Array.isArray(e))return e.map(ye).filter(ln);const t=ye(e);return t?[t]:[]}function CA(e){const t=new Map;for(const r of e){const n=gt(r.metadata),i=ye(n?.offeringId)??"openai-compatible",o=fA(n?.compatibility,i),a=ye(r.baseUrl)??ye(n?.baseUrl),s=uo.find(c=>c.id===i)??uo.find(c=>c.id===`${o}-compatible`)??uo[0];t.set(i,{...s,id:i,endpoints:a?[{protocol:o==="anthropic"?"anthropic":"chatCompletions",baseUrl:a}]:s.endpoints,modelDiscovery:o==="anthropic"?{strategy:"anthropic",path:"/models",endpointProtocol:"anthropic"}:{strategy:"openaiCompatible",path:"/models",endpointProtocol:"chatCompletions"}})}return t.size>0?[...t.values()]:uo}function MA(e){return e.some(t=>t.health==="expired"||t.health==="invalid")?"attention":e.some(t=>t.enabled)?"available":e.length>0?"configured":"unconfigured"}function DA(e,t,r,n){const i=ci(e,t,r,n),o=ye(i?.apiKey);if(o)return o.length<=8?`${o.slice(0,2)}…`:`${o.slice(0,3)}...${o.slice(-4)}`}function ci(e,t,r,n){if(!(typeof n!="string"||!n.trim()))try{const i=JSON.parse(n);if(i.algorithm!=="PLAINTEXT"||i.webId!==e.webId||i.provider!==t)return;const o=Ie.buildIri(e.podUrl,{id:r});if(i.credentialIri!==o)return;const a=i.encoding==="base64"?PA(String(i.ciphertext)):JSON.parse(String(i.ciphertext));return gt(a)}catch{return}}function PA(e){const t=atob(e),r=Uint8Array.from(t,n=>n.charCodeAt(0));return JSON.parse(new TextDecoder().decode(r))}function ru(e){const t=Qr(e),r=Pt(t);return r||Si.find(n=>t?.startsWith(`${n}-`))}function nu(e){const t=Qr(e);if(t&&!t.startsWith("custom-instance-")){if(t==="bailian-token-plan-personal")return"token-plan";if(t==="bailian-token-plan-team")return"token-plan-team";if(t==="bailian-coding-plan-pro")return"coding-plan";if(t==="bailian-pay-as-you-go")return"pay-as-you-go";for(const r of Si)if(t.startsWith(`${r}-`))return t.slice(r.length+1)}}function TA(e){const t=/\/([^/#]+)\.ttl#/u.exec(e);return Pt(t?.[1])}function Pt(e){if(typeof e!="string"||!e.trim())return;const t=e.trim().toLowerCase();if(t==="zhipu"||t.startsWith("zhipu-"))return"zhipu";if(Si.includes(t))return t;for(const r of Si)if(t.startsWith(`${r}-`)||r==="bailian"&&(t==="bailian-token-plan"||t==="bailian-coding-plan"))return r}function ws(e){if(e==null||!e.trim())return;let t;try{t=new URL(e.trim())}catch{throw new Error("invalid_proxy_url")}if(!["http:","https:"].includes(t.protocol)||t.username||t.password||t.hash||!t.hostname)throw new Error("invalid_proxy_url");return t.toString().replace(/\/$/u,"")}function kA(e){if(e==null||!e.trim())return;let t;try{t=new URL(e.trim())}catch{return}if(!(!["http:","https:"].includes(t.protocol)||!t.hostname))return t.username="",t.password="",t.search="",t.hash="",t.toString().replace(/\/$/u,"")}function br(e){if(!e)return;const t=e.split("#",1)[0]??e,r=t.split("/").filter(Boolean).at(-1)??t;if(!r)return;const n=r.endsWith(".ttl")?r:`${r}.ttl`,i=e.indexOf("#");return i<0?n:`${n}${e.slice(i)}`}function Qr(e){const t=br(e);if(t)return(t.split("#",1)[0]??t).replace(/\.ttl$/u,"")}function OA(e){if(e==="oauth"||e==="deviceCode"||e==="apiKey"||e==="local")return e;if(e==="deviceCodeOAuth")return"deviceCode"}function jA(e){if(e==="healthy"||e==="expired"||e==="invalid"||e==="unknown")return e;if(e==="reauthRequired")return"expired";if(e==="disabled")return"unknown"}function gt(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:void 0}function ye(e){return typeof e=="string"&&e.trim()?e:void 0}function Td(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"&&e.trim()){const t=Number(e);return Number.isFinite(t)?t:void 0}}function kd(e){if(typeof e=="boolean")return e;if(e==="true")return!0;if(e==="false")return!1}function NA(e){return e instanceof Date?e.toISOString():ye(e)}function ln(e){return e!==void 0}const Ip=A0({renderToaster:!1}),Od=Ip.manifest.contributes.applets[0]?.appId,Rp=Od?Ip.applets[Od]:void 0;if(!Rp)throw new Error("AI Connection extension did not contribute an applet");const FA=Rp;function BA(e,t){const r=Kp({runtime:e}),n=e.currentPod?.podUrl??e.selectedStorage?.storageUrl??e.podUrl,i=e.currentPod?{status:"ready",current:e.currentPod}:e.podError?{status:"error",error:e.podError.error}:e.state.status==="authenticated"?{status:"opening"}:e.state.status==="error"?{status:"error",error:e.state.error}:{status:"unavailable"},o=window.fetch.bind(window);return{solid:{session:{getSnapshot:()=>e.session.getSnapshot(),subscribe:a=>e.session.subscribe(a),fetch:e.fetch},pod:i,permissions:{...Cb({fetch:e.fetch})},requireLogin:async()=>{await r.startLogin()}},navigation:{openExternal:async a=>{window.open(a,"_blank","noopener,noreferrer")}},capabilities:{aiClientCredentials:t?.controls?.account?.clientCredentials?_0({collection:t.controls.account.clientCredentials,accountIndex:t.idpIndex,fetch:o}):void 0,aiConnectionsPodStore:e.currentPod?hA({database:e.currentPod.database,authenticatedFetch:e.fetch,podUrl:e.currentPod.podUrl,webId:e.currentPod.webId}):void 0,aiClientConfiguration:n&&(globalThis.xpodDesktop!==void 0||e.aiClientConfiguration?.available===!0&&e.aiClientConfiguration.authority==="local-filesystem")?Qp({podUrl:n,controlPlaneOrigin:window.location.origin,authenticatedFetch:e.fetch,invocationFetch:o}):void 0}}}function LA(e){const t=G.useContext(qp),r=G.useMemo(()=>BA(e,t),[e,t]);return G.useMemo(()=>{const n=Ob(FA,r);if(n.layout!=="two-pane")throw new Error("AI Connection applet must use a two-pane layout");return n},[r])}function a_(){const e=zp(),t=LA(e);return y.jsx(Jp,{listHeader:t.slots.listHeader,list:t.slots.list,mainHeader:t.slots.mainHeader,main:t.slots.main,mode:"auto"})}export{a_ as default};