@usine/server 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/backend.d.ts +5 -1
  2. package/dist/backend.d.ts.map +1 -1
  3. package/dist/backend.js +7 -0
  4. package/dist/backend.js.map +1 -1
  5. package/dist/http.d.ts.map +1 -1
  6. package/dist/http.js +5 -0
  7. package/dist/http.js.map +1 -1
  8. package/dist/up.d.ts +1 -1
  9. package/dist/up.d.ts.map +1 -1
  10. package/dist/web/assets/{_name-D1NH8oUE.js → _name-DdyMEUN6.js} +2 -2
  11. package/dist/web/assets/_name-eoobiMh0.js +1 -0
  12. package/dist/web/assets/{_name-BHFMXhWe.js → _name-pUxlKZt5.js} +1 -1
  13. package/dist/web/assets/badge-t7m0Vk1K.js +146 -0
  14. package/dist/web/assets/{core-Cg4Mi2IQ.js → core-CLXRiB63.js} +1 -1
  15. package/dist/web/assets/index-CVBBoW6r.css +2 -0
  16. package/dist/web/assets/index-CsW8KcJW.js +10 -0
  17. package/dist/web/assets/{loops-huxrr83I.js → loops-DghpuoiG.js} +1 -1
  18. package/dist/web/assets/{operator-copy-BDZ_fazz.js → operator-copy-DIsVXn17.js} +1 -1
  19. package/dist/web/assets/overview-DmCIVPwN.js +1 -0
  20. package/dist/web/assets/{routes-CbvAb2gn.js → routes-BDyP7vCr.js} +1 -1
  21. package/dist/web/assets/run-drawer-B-xhTXe4.js +157 -0
  22. package/dist/web/assets/{status-badge-BTkHx8qb.js → status-badge-yblcElE0.js} +1 -1
  23. package/dist/web/assets/{useCompositeItem-CuLyiETJ.js → useCompositeItem-HmBmWxUW.js} +1 -1
  24. package/dist/web/index.html +5 -5
  25. package/package.json +8 -8
  26. package/dist/web/assets/_name-Cz2YmpSb.js +0 -1
  27. package/dist/web/assets/badge-BQobsECb.js +0 -142
  28. package/dist/web/assets/index-CJ-Nk5DM.js +0 -10
  29. package/dist/web/assets/index-DxGXwXIP.css +0 -2
  30. package/dist/web/assets/overview-DTxvvQ4b.js +0 -1
  31. package/dist/web/assets/run-drawer-3blrdBMZ.js +0 -157
@@ -0,0 +1,157 @@
1
+ import{n as e,r as t,t as n}from"./rolldown-runtime-hePW80VL.js";import{A as r,B as i,H as a,I as o,M as s,N as c,O as l,R as u,V as d,_ as f,a as p,i as m,j as h,k as g,n as _,o as v,s as y,t as b}from"./button-BoOukj77.js";import{$ as x,$t as S,A as C,An as w,At as T,B as E,Bn as D,Bt as O,C as k,Cn as A,Ct as j,D as M,Dn as N,Dt as P,E as F,En as I,Et as ee,F as L,Fn as te,Ft as R,G as ne,Gn as z,Gt as re,H as ie,Hn as ae,Ht as B,I as oe,In as se,It as ce,J as le,Jn as ue,Jt as de,K as fe,Kn as pe,Kt as me,L as he,Ln as ge,Lt as _e,M as ve,Mn as ye,Mt as be,N as xe,Nn as Se,Nt as Ce,O as we,On as Te,Ot as Ee,P as De,Pn as Oe,Pt as ke,Q as Ae,Qt as je,R as Me,Rn as Ne,Rt as Pe,S as Fe,Sn as Ie,St as Le,T as Re,Tn as ze,Tt as Be,U as Ve,Un as He,Ut as Ue,V as We,Vn as Ge,Vt as V,W as Ke,Wn as qe,Wt as Je,X as Ye,Xt as Xe,Y as Ze,Yt as Qe,Z as $e,Zt as et,_ as tt,_n as nt,_r as rt,_t as it,a as at,an as ot,at as st,b as ct,bn as lt,c as ut,ct as dt,d as ft,dn as pt,dt as mt,en as ht,et as gt,f as _t,fn as vt,ft as yt,g as bt,gn as xt,gt as St,h as Ct,hn as wt,ht as Tt,i as Et,in as Dt,it as Ot,j as kt,jn as At,jt,k as Mt,kn as Nt,kt as Pt,l as Ft,ln as It,lt as Lt,m as Rt,mn as zt,mt as Bt,n as Vt,nn as Ht,nt as Ut,o as Wt,on as Gt,ot as Kt,p as qt,pn as Jt,pt as Yt,q as Xt,qn as Zt,qt as Qt,r as $t,rn as en,rt as tn,s as nn,sn as rn,st as an,t as on,tn as sn,tt as cn,u as ln,ut as un,v as dn,vn as fn,vt as pn,w as mn,wn as hn,wt as gn,x as _n,xn as H,y as vn,yn,yt as bn,z as xn,zn as Sn,zt as Cn}from"./badge-t7m0Vk1K.js";import{a as wn,i as Tn,n as En,r as Dn,t as On}from"./useCompositeItem-HmBmWxUW.js";import{Bt as kn,Ct as An,Dt as jn,Et as Mn,Ht as Nn,Ot as Pn,Rt as Fn,Tt as In,Ut as Ln,_ as Rn,_t as zn,a as Bn,c as Vn,d as Hn,et as Un,f as Wn,fn as Gn,g as Kn,h as qn,i as Jn,kt as Yn,l as Xn,mn as Zn,mt as Qn,n as $n,nn as er,nt as tr,p as nr,rn as rr,st as ir,t as ar,tn as or,u as sr,ut as cr,vt as lr,wt as ur,zt as dr}from"./operator-copy-DIsVXn17.js";import{D as fr,T as pr,_ as mr,a as hr,c as gr,g as _r,h as vr,i as yr,l as br,m as xr,n as Sr,o as Cr,s as wr,v as Tr}from"./index-CsW8KcJW.js";import{n as Er}from"./status-badge-yblcElE0.js";var U=t(a(),1),Dr=new Map([[`bold`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M208.49,152.49l-72,72a12,12,0,0,1-17,0l-72-72a12,12,0,0,1,17-17L116,187V40a12,12,0,0,1,24,0V187l51.51-51.52a12,12,0,0,1,17,17Z`}))],[`duotone`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M200,144l-72,72L56,144Z`,opacity:`0.2`}),U.createElement(`path`,{d:`M207.39,140.94A8,8,0,0,0,200,136H136V40a8,8,0,0,0-16,0v96H56a8,8,0,0,0-5.66,13.66l72,72a8,8,0,0,0,11.32,0l72-72A8,8,0,0,0,207.39,140.94ZM128,204.69,75.31,152H180.69Z`}))],[`fill`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M205.66,149.66l-72,72a8,8,0,0,1-11.32,0l-72-72A8,8,0,0,1,56,136h64V40a8,8,0,0,1,16,0v96h64a8,8,0,0,1,5.66,13.66Z`}))],[`light`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M204.24,148.24l-72,72a6,6,0,0,1-8.48,0l-72-72a6,6,0,0,1,8.48-8.48L122,201.51V40a6,6,0,0,1,12,0V201.51l61.76-61.75a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M205.66,149.66l-72,72a8,8,0,0,1-11.32,0l-72-72a8,8,0,0,1,11.32-11.32L120,196.69V40a8,8,0,0,1,16,0V196.69l58.34-58.35a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M202.83,146.83l-72,72a4,4,0,0,1-5.66,0l-72-72a4,4,0,0,1,5.66-5.66L124,206.34V40a4,4,0,0,1,8,0V206.34l65.17-65.17a4,4,0,0,1,5.66,5.66Z`}))]]),Or=new Map([[`bold`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z`}))],[`duotone`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M184,80V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H176A8,8,0,0,1,184,80Z`,opacity:`0.2`}),U.createElement(`path`,{d:`M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z`}))],[`fill`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M192,136v72a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V80A16,16,0,0,1,48,64h72a8,8,0,0,1,0,16H48V208H176V136a8,8,0,0,1,16,0Zm32-96a8,8,0,0,0-8-8H152a8,8,0,0,0-5.66,13.66L172.69,72l-42.35,42.34a8,8,0,0,0,11.32,11.32L184,83.31l26.34,26.35A8,8,0,0,0,224,104Z`}))],[`light`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M222,104a6,6,0,0,1-12,0V54.49l-69.75,69.75a6,6,0,0,1-8.48-8.48L201.51,46H152a6,6,0,0,1,0-12h64a6,6,0,0,1,6,6Zm-38,26a6,6,0,0,0-6,6v72a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V80a2,2,0,0,1,2-2h72a6,6,0,0,0,0-12H48A14,14,0,0,0,34,80V208a14,14,0,0,0,14,14H176a14,14,0,0,0,14-14V136A6,6,0,0,0,184,130Z`}))],[`regular`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z`}))],[`thin`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M220,104a4,4,0,0,1-8,0V49.66l-73.16,73.17a4,4,0,0,1-5.66-5.66L206.34,44H152a4,4,0,0,1,0-8h64a4,4,0,0,1,4,4Zm-36,28a4,4,0,0,0-4,4v72a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4h72a4,4,0,0,0,0-8H48A12,12,0,0,0,36,80V208a12,12,0,0,0,12,12H176a12,12,0,0,0,12-12V136A4,4,0,0,0,184,132Z`}))]]),kr=new Map([[`bold`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M208.49,120.49a12,12,0,0,1-17,0L140,69V216a12,12,0,0,1-24,0V69L64.49,120.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0l72,72A12,12,0,0,1,208.49,120.49Z`}))],[`duotone`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M200,112H56l72-72Z`,opacity:`0.2`}),U.createElement(`path`,{d:`M205.66,106.34l-72-72a8,8,0,0,0-11.32,0l-72,72A8,8,0,0,0,56,120h64v96a8,8,0,0,0,16,0V120h64a8,8,0,0,0,5.66-13.66ZM75.31,104,128,51.31,180.69,104Z`}))],[`fill`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M207.39,115.06A8,8,0,0,1,200,120H136v96a8,8,0,0,1-16,0V120H56a8,8,0,0,1-5.66-13.66l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,207.39,115.06Z`}))],[`light`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M204.24,116.24a6,6,0,0,1-8.48,0L134,54.49V216a6,6,0,0,1-12,0V54.49L60.24,116.24a6,6,0,0,1-8.48-8.48l72-72a6,6,0,0,1,8.48,0l72,72A6,6,0,0,1,204.24,116.24Z`}))],[`regular`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z`}))],[`thin`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M202.83,114.83a4,4,0,0,1-5.66,0L132,49.66V216a4,4,0,0,1-8,0V49.66L58.83,114.83a4,4,0,0,1-5.66-5.66l72-72a4,4,0,0,1,5.66,0l72,72A4,4,0,0,1,202.83,114.83Z`}))]]),Ar=new Map([[`bold`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z`}))],[`duotone`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z`,opacity:`0.2`}),U.createElement(`path`,{d:`M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`fill`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z`}))]]),jr=new Map([[`bold`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M236,128a108,108,0,0,1-216,0c0-42.52,24.73-81.34,63-98.9A12,12,0,1,1,93,50.91C63.24,64.57,44,94.83,44,128a84,84,0,0,0,168,0c0-33.17-19.24-63.43-49-77.09A12,12,0,1,1,173,29.1C211.27,46.66,236,85.48,236,128Z`}))],[`duotone`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),U.createElement(`path`,{d:`M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z`}))],[`fill`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,176A72,72,0,0,1,92,65.64a8,8,0,0,1,8,13.85,56,56,0,1,0,56,0,8,8,0,0,1,8-13.85A72,72,0,0,1,128,200Z`}))],[`light`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M230,128a102,102,0,0,1-204,0c0-40.18,23.35-76.86,59.5-93.45a6,6,0,0,1,5,10.9C58.61,60.09,38,92.49,38,128a90,90,0,0,0,180,0c0-35.51-20.61-67.91-52.5-82.55a6,6,0,0,1,5-10.9C206.65,51.14,230,87.82,230,128Z`}))],[`regular`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z`}))],[`thin`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M228,128a100,100,0,0,1-200,0c0-39.4,22.9-75.37,58.33-91.63a4,4,0,1,1,3.34,7.27C57.07,58.6,36,91.71,36,128a92,92,0,0,0,184,0c0-36.29-21.07-69.4-53.67-84.36a4,4,0,1,1,3.34-7.27C205.1,52.63,228,88.6,228,128Z`}))]]),Mr=new Map([[`bold`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z`}))],[`duotone`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M216,40V168H168V88H88V40Z`,opacity:`0.2`}),U.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`fill`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`light`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z`}))],[`regular`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`thin`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z`}))]]),Nr=new Map([[`bold`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Zm104-60a12,12,0,0,1-12,12H140v12a12,12,0,0,1-24,0V164H104a12,12,0,0,1,0-24h12V128a12,12,0,0,1,24,0v12h12A12,12,0,0,1,164,152Z`}))],[`duotone`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M208,88H152V32Z`,opacity:`0.2`}),U.createElement(`path`,{d:`M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-40-64a8,8,0,0,1-8,8H136v16a8,8,0,0,1-16,0V160H104a8,8,0,0,1,0-16h16V128a8,8,0,0,1,16,0v16h16A8,8,0,0,1,160,152Z`}))],[`fill`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,160H136v16a8,8,0,0,1-16,0V160H104a8,8,0,0,1,0-16h16V128a8,8,0,0,1,16,0v16h16a8,8,0,0,1,0,16Zm0-72V43.31L196.69,88Z`}))],[`light`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Zm-42-66a6,6,0,0,1-6,6H134v18a6,6,0,0,1-12,0V158H104a6,6,0,0,1,0-12h18V128a6,6,0,0,1,12,0v18h18A6,6,0,0,1,158,152Z`}))],[`regular`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-40-64a8,8,0,0,1-8,8H136v16a8,8,0,0,1-16,0V160H104a8,8,0,0,1,0-16h16V128a8,8,0,0,1,16,0v16h16A8,8,0,0,1,160,152Z`}))],[`thin`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Zm-44-68a4,4,0,0,1-4,4H132v20a4,4,0,0,1-8,0V156H104a4,4,0,0,1,0-8h20V128a4,4,0,0,1,8,0v20h20A4,4,0,0,1,156,152Z`}))]]),Pr=new Map([[`bold`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Zm112-80a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,132Zm0,40a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,172Z`}))],[`duotone`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M208,88H152V32Z`,opacity:`0.2`}),U.createElement(`path`,{d:`M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-32-80a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,168Z`}))],[`fill`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,176H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm-8-56V44l44,44Z`}))],[`light`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Zm-34-82a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,136Zm0,32a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,168Z`}))],[`regular`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-32-80a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,168Z`}))],[`thin`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Zm-36-84a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,136Zm0,32a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,168Z`}))]]),Fr=new Map([[`bold`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),U.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]]),Ir=new Map([[`bold`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z`}))],[`duotone`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z`,opacity:`0.2`}),U.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`fill`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`light`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z`}))],[`regular`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`thin`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z`}))]]),Lr=new Map([[`bold`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm40-112v56a12,12,0,0,1-12,12H100a12,12,0,0,1-12-12V100a12,12,0,0,1,12-12h56A12,12,0,0,1,168,100Z`}))],[`duotone`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M128,32a96,96,0,1,0,96,96A96,96,0,0,0,128,32Zm32,128H96V96h64Z`,opacity:`0.2`}),U.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216ZM160,88H96a8,8,0,0,0-8,8v64a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V96A8,8,0,0,0,160,88Zm-8,64H104V104h48Z`}))],[`fill`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm32,132a4,4,0,0,1-4,4H100a4,4,0,0,1-4-4V100a4,4,0,0,1,4-4h56a4,4,0,0,1,4,4Z`}))],[`light`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218ZM160,90H96a6,6,0,0,0-6,6v64a6,6,0,0,0,6,6h64a6,6,0,0,0,6-6V96A6,6,0,0,0,160,90Zm-6,64H102V102h52Z`}))],[`regular`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216ZM160,88H96a8,8,0,0,0-8,8v64a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V96A8,8,0,0,0,160,88Zm-8,64H104V104h48Z`}))],[`thin`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220ZM160,92H96a4,4,0,0,0-4,4v64a4,4,0,0,0,4,4h64a4,4,0,0,0,4-4V96A4,4,0,0,0,160,92Zm-4,64H100V100h56Z`}))]]),Rr=new Map([[`bold`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M120,137,48,201A12,12,0,1,1,32,183l61.91-55L32,73A12,12,0,1,1,48,55l72,64A12,12,0,0,1,120,137Zm96,43H120a12,12,0,0,0,0,24h96a12,12,0,0,0,0-24Z`}))],[`duotone`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M216,80V192H40V64H200A16,16,0,0,1,216,80Z`,opacity:`0.2`}),U.createElement(`path`,{d:`M117.31,134l-72,64a8,8,0,1,1-10.63-12L100,128,34.69,70A8,8,0,1,1,45.32,58l72,64a8,8,0,0,1,0,12ZM216,184H120a8,8,0,0,0,0,16h96a8,8,0,0,0,0-16Z`}))],[`fill`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM77.66,173.66a8,8,0,0,1-11.32-11.32L100.69,128,66.34,93.66A8,8,0,0,1,77.66,82.34l40,40a8,8,0,0,1,0,11.32ZM192,176H128a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z`}))],[`light`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M116,132.48l-72,64a6,6,0,0,1-8-9L103,128,36,68.49a6,6,0,0,1,8-9l72,64a6,6,0,0,1,0,9ZM216,186H120a6,6,0,0,0,0,12h96a6,6,0,0,0,0-12Z`}))],[`regular`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M117.31,134l-72,64a8,8,0,1,1-10.63-12L100,128,34.69,70A8,8,0,1,1,45.32,58l72,64a8,8,0,0,1,0,12ZM216,184H120a8,8,0,0,0,0,16h96a8,8,0,0,0,0-16Z`}))],[`thin`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M116,128a4,4,0,0,1-1.34,3l-72,64a4,4,0,1,1-5.32-6L106,128,37.34,67a4,4,0,0,1,5.32-6l72,64A4,4,0,0,1,116,128Zm100,60H120a4,4,0,0,0,0,8h96a4,4,0,0,0,0-8Z`}))]]),zr=new Map([[`bold`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M72.5,150.63,100.79,128,72.5,105.37a12,12,0,1,1,15-18.74l40,32a12,12,0,0,1,0,18.74l-40,32a12,12,0,0,1-15-18.74ZM144,172h32a12,12,0,0,0,0-24H144a12,12,0,0,0,0,24ZM236,56V200a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56Zm-24,4H44V196H212Z`}))],[`duotone`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M224,56V200a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z`,opacity:`0.2`}),U.createElement(`path`,{d:`M128,128a8,8,0,0,1-3,6.25l-40,32a8,8,0,1,1-10-12.5L107.19,128,75,102.25a8,8,0,1,1,10-12.5l40,32A8,8,0,0,1,128,128Zm48,24H136a8,8,0,0,0,0,16h40a8,8,0,0,0,0-16Zm56-96V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56ZM216,200V56H40V200H216Z`}))],[`fill`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm-91,94.25-40,32a8,8,0,1,1-10-12.5L107.19,128,75,102.25a8,8,0,1,1,10-12.5l40,32a8,8,0,0,1,0,12.5ZM176,168H136a8,8,0,0,1,0-16h40a8,8,0,0,1,0,16Z`}))],[`light`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M126,128a6,6,0,0,1-2.25,4.69l-40,32a6,6,0,0,1-7.5-9.38L110.4,128,76.25,100.69a6,6,0,1,1,7.5-9.38l40,32A6,6,0,0,1,126,128Zm50,26H136a6,6,0,0,0,0,12h40a6,6,0,0,0,0-12Zm54-98V200a14,14,0,0,1-14,14H40a14,14,0,0,1-14-14V56A14,14,0,0,1,40,42H216A14,14,0,0,1,230,56Zm-12,0a2,2,0,0,0-2-2H40a2,2,0,0,0-2,2V200a2,2,0,0,0,2,2H216a2,2,0,0,0,2-2Z`}))],[`regular`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M128,128a8,8,0,0,1-3,6.25l-40,32a8,8,0,1,1-10-12.5L107.19,128,75,102.25a8,8,0,1,1,10-12.5l40,32A8,8,0,0,1,128,128Zm48,24H136a8,8,0,0,0,0,16h40a8,8,0,0,0,0-16Zm56-96V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56ZM216,200V56H40V200H216Z`}))],[`thin`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M122.5,124.88a4,4,0,0,1,0,6.24l-40,32a4,4,0,0,1-5-6.24L113.6,128,77.5,99.12a4,4,0,0,1,5-6.24ZM176,156H136a4,4,0,0,0,0,8h40a4,4,0,0,0,0-8ZM228,56V200a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V56A12,12,0,0,1,40,44H216A12,12,0,0,1,228,56Zm-8,0a4,4,0,0,0-4-4H40a4,4,0,0,0-4,4V200a4,4,0,0,0,4,4H216a4,4,0,0,0,4-4Z`}))]]),Br=new Map([[`bold`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M125.18,156.94a64,64,0,1,0-82.36,0,100.23,100.23,0,0,0-39.49,32,12,12,0,0,0,19.35,14.2,76,76,0,0,1,122.64,0,12,12,0,0,0,19.36-14.2A100.33,100.33,0,0,0,125.18,156.94ZM44,108a40,40,0,1,1,40,40A40,40,0,0,1,44,108Zm206.1,97.67a12,12,0,0,1-16.78-2.57A76.31,76.31,0,0,0,172,172a12,12,0,0,1,0-24,40,40,0,1,0-10.3-78.67,12,12,0,1,1-6.16-23.19,64,64,0,0,1,57.64,110.8,100.23,100.23,0,0,1,39.49,32A12,12,0,0,1,250.1,205.67Z`}))],[`duotone`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M136,108A52,52,0,1,1,84,56,52,52,0,0,1,136,108Z`,opacity:`0.2`}),U.createElement(`path`,{d:`M117.25,157.92a60,60,0,1,0-66.5,0A95.83,95.83,0,0,0,3.53,195.63a8,8,0,1,0,13.4,8.74,80,80,0,0,1,134.14,0,8,8,0,0,0,13.4-8.74A95.83,95.83,0,0,0,117.25,157.92ZM40,108a44,44,0,1,1,44,44A44.05,44.05,0,0,1,40,108Zm210.14,98.7a8,8,0,0,1-11.07-2.33A79.83,79.83,0,0,0,172,168a8,8,0,0,1,0-16,44,44,0,1,0-16.34-84.87,8,8,0,1,1-5.94-14.85,60,60,0,0,1,55.53,105.64,95.83,95.83,0,0,1,47.22,37.71A8,8,0,0,1,250.14,206.7Z`}))],[`fill`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M164.47,195.63a8,8,0,0,1-6.7,12.37H10.23a8,8,0,0,1-6.7-12.37,95.83,95.83,0,0,1,47.22-37.71,60,60,0,1,1,66.5,0A95.83,95.83,0,0,1,164.47,195.63Zm87.91-.15a95.87,95.87,0,0,0-47.13-37.56A60,60,0,0,0,144.7,54.59a4,4,0,0,0-1.33,6A75.83,75.83,0,0,1,147,150.53a4,4,0,0,0,1.07,5.53,112.32,112.32,0,0,1,29.85,30.83,23.92,23.92,0,0,1,3.65,16.47,4,4,0,0,0,3.95,4.64h60.3a8,8,0,0,0,7.73-5.93A8.22,8.22,0,0,0,252.38,195.48Z`}))],[`light`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M112.6,158.43a58,58,0,1,0-57.2,0A93.83,93.83,0,0,0,5.21,196.72a6,6,0,0,0,10.05,6.56,82,82,0,0,1,137.48,0,6,6,0,0,0,10-6.56A93.83,93.83,0,0,0,112.6,158.43ZM38,108a46,46,0,1,1,46,46A46.06,46.06,0,0,1,38,108Zm211,97a6,6,0,0,1-8.3-1.74A81.8,81.8,0,0,0,172,166a6,6,0,0,1,0-12,46,46,0,1,0-17.08-88.73,6,6,0,1,1-4.46-11.14,58,58,0,0,1,50.14,104.3,93.83,93.83,0,0,1,50.19,38.29A6,6,0,0,1,249,205Z`}))],[`regular`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M117.25,157.92a60,60,0,1,0-66.5,0A95.83,95.83,0,0,0,3.53,195.63a8,8,0,1,0,13.4,8.74,80,80,0,0,1,134.14,0,8,8,0,0,0,13.4-8.74A95.83,95.83,0,0,0,117.25,157.92ZM40,108a44,44,0,1,1,44,44A44.05,44.05,0,0,1,40,108Zm210.14,98.7a8,8,0,0,1-11.07-2.33A79.83,79.83,0,0,0,172,168a8,8,0,0,1,0-16,44,44,0,1,0-16.34-84.87,8,8,0,1,1-5.94-14.85,60,60,0,0,1,55.53,105.64,95.83,95.83,0,0,1,47.22,37.71A8,8,0,0,1,250.14,206.7Z`}))],[`thin`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M107.19,159a56,56,0,1,0-46.38,0A91.83,91.83,0,0,0,6.88,197.81a4,4,0,1,0,6.7,4.37,84,84,0,0,1,140.84,0,4,4,0,1,0,6.7-4.37A91.83,91.83,0,0,0,107.19,159ZM36,108a48,48,0,1,1,48,48A48.05,48.05,0,0,1,36,108Zm212,95.35a4,4,0,0,1-5.53-1.17A83.81,83.81,0,0,0,172,164a4,4,0,0,1,0-8,48,48,0,1,0-17.82-92.58,4,4,0,1,1-3-7.43,56,56,0,0,1,44,103,91.83,91.83,0,0,1,53.93,38.86A4,4,0,0,1,248,203.35Z`}))]]),Vr=new Map([[`bold`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M230.47,67.5a12,12,0,0,0-19.26-4.32L172.43,99l-12.68-2.72L157,83.57l35.79-38.78a12,12,0,0,0-4.32-19.26A76.07,76.07,0,0,0,88.41,121.64L30.92,174.18a4.68,4.68,0,0,0-.39.38,36,36,0,0,0,50.91,50.91l.38-.39,52.54-57.49A76.05,76.05,0,0,0,230.47,67.5ZM160,148a51.5,51.5,0,0,1-23.35-5.52,12,12,0,0,0-14.26,2.62L64.31,208.66a12,12,0,0,1-17-17l63.55-58.07a12,12,0,0,0,2.62-14.26A51.5,51.5,0,0,1,108,96a52.06,52.06,0,0,1,52-52h.89L135.17,71.87a12,12,0,0,0-2.91,10.65l5.66,26.35a12,12,0,0,0,9.21,9.21l26.35,5.66a12,12,0,0,0,10.65-2.91L212,95.12c0,.3,0,.59,0,.89A52.06,52.06,0,0,1,160,148Z`}))],[`duotone`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M224,96a64,64,0,0,1-94.94,56L73,217A24,24,0,0,1,39,183L104,126.94a64,64,0,0,1,80-90.29L144,80l5.66,26.34L176,112l43.35-40A63.8,63.8,0,0,1,224,96Z`,opacity:`0.2`}),U.createElement(`path`,{d:`M226.76,69a8,8,0,0,0-12.84-2.88l-40.3,37.19-17.23-3.7-3.7-17.23,37.19-40.3A8,8,0,0,0,187,29.24,72,72,0,0,0,88,96,72.34,72.34,0,0,0,94,124.94L33.79,177c-.15.12-.29.26-.43.39a32,32,0,0,0,45.26,45.26c.13-.13.27-.28.39-.42L131.06,162A72,72,0,0,0,232,96,71.56,71.56,0,0,0,226.76,69ZM160,152a56.14,56.14,0,0,1-27.07-7,8,8,0,0,0-9.92,1.77L67.11,211.51a16,16,0,0,1-22.62-22.62L109.18,133a8,8,0,0,0,1.77-9.93,56,56,0,0,1,58.36-82.31l-31.2,33.81a8,8,0,0,0-1.94,7.1L141.83,108a8,8,0,0,0,6.14,6.14l26.35,5.66a8,8,0,0,0,7.1-1.94l33.81-31.2A56.06,56.06,0,0,1,160,152Z`}))],[`fill`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M232,96a72,72,0,0,1-100.94,66L79,222.22c-.12.14-.26.29-.39.42a32,32,0,0,1-45.26-45.26c.14-.13.28-.27.43-.39L94,124.94a72.07,72.07,0,0,1,83.54-98.78,8,8,0,0,1,3.93,13.19L144,80l5.66,26.35L176,112l40.65-37.52a8,8,0,0,1,13.19,3.93A72.6,72.6,0,0,1,232,96Z`}))],[`light`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M224.91,69.75a6,6,0,0,0-9.63-2.16l-41.07,37.9L154.7,101.3l-4.19-19.51,37.9-41.07a6,6,0,0,0-2.16-9.63,70,70,0,0,0-89.77,94.39l-61.39,53c-.11.09-.21.19-.32.3A30,30,0,0,0,77.2,221.23c.11-.11.21-.21.3-.32l53-61.39a70,70,0,0,0,94.39-89.77ZM160,154a58,58,0,0,1-28-7.22,6,6,0,0,0-7.45,1.33L68.57,212.88a18,18,0,0,1-25.45-25.45l64.76-55.94A6,6,0,0,0,109.2,124a58,58,0,0,1,64-84.53L139.58,75.93a6,6,0,0,0-1.45,5.33l5.65,26.35a6,6,0,0,0,4.61,4.61l26.35,5.65a6,6,0,0,0,5.33-1.45L216.49,82.8A58.06,58.06,0,0,1,160,154Z`}))],[`regular`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M226.76,69a8,8,0,0,0-12.84-2.88l-40.3,37.19-17.23-3.7-3.7-17.23,37.19-40.3A8,8,0,0,0,187,29.24,72,72,0,0,0,88,96,72.34,72.34,0,0,0,94,124.94L33.79,177c-.15.12-.29.26-.43.39a32,32,0,0,0,45.26,45.26c.13-.13.27-.28.39-.42L131.06,162A72,72,0,0,0,232,96,71.56,71.56,0,0,0,226.76,69ZM160,152a56.14,56.14,0,0,1-27.07-7,8,8,0,0,0-9.92,1.77L67.11,211.51a16,16,0,0,1-22.62-22.62L109.18,133a8,8,0,0,0,1.77-9.93,56,56,0,0,1,58.36-82.31l-31.2,33.81a8,8,0,0,0-1.94,7.1L141.83,108a8,8,0,0,0,6.14,6.14l26.35,5.66a8,8,0,0,0,7.1-1.94l33.81-31.2A56.06,56.06,0,0,1,160,152Z`}))],[`thin`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M223.05,70.5a4,4,0,0,0-6.42-1.44l-41.82,38.6L153,103l-4.68-21.79,38.6-41.82a4,4,0,0,0-1.44-6.43A68,68,0,0,0,98.94,126L36.4,180l-.21.2a28,28,0,0,0,39.6,39.6l.2-.21,54-62.54A68,68,0,0,0,228,96,67.51,67.51,0,0,0,223.05,70.5ZM160,156a60,60,0,0,1-29-7.47,4,4,0,0,0-5,.89L70,214.25A20,20,0,0,1,41.75,186l64.82-56a4,4,0,0,0,.89-5,60,60,0,0,1,69.46-86.59L141.05,77.29a4,4,0,0,0-1,3.55l5.66,26.35a4,4,0,0,0,3.07,3.07l26.35,5.66a4,4,0,0,0,3.55-1l38.87-35.87A60.05,60.05,0,0,1,160,156Z`}))]]),Hr=new Map([[`bold`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M168.49,104.49,145,128l23.52,23.51a12,12,0,0,1-17,17L128,145l-23.51,23.52a12,12,0,0,1-17-17L111,128,87.51,104.49a12,12,0,0,1,17-17L128,111l23.51-23.52a12,12,0,0,1,17,17ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z`}))],[`duotone`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),U.createElement(`path`,{d:`M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`fill`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,130.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`light`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M164.24,100.24,136.48,128l27.76,27.76a6,6,0,1,1-8.48,8.48L128,136.48l-27.76,27.76a6,6,0,0,1-8.48-8.48L119.52,128,91.76,100.24a6,6,0,0,1,8.48-8.48L128,119.52l27.76-27.76a6,6,0,0,1,8.48,8.48ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`thin`,U.createElement(U.Fragment,null,U.createElement(`path`,{d:`M162.83,98.83,133.66,128l29.17,29.17a4,4,0,0,1-5.66,5.66L128,133.66,98.83,162.83a4,4,0,0,1-5.66-5.66L122.34,128,93.17,98.83a4,4,0,0,1,5.66-5.66L128,122.34l29.17-29.17a4,4,0,1,1,5.66,5.66ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]]),Ur=U.forwardRef((e,t)=>U.createElement(i,{ref:t,...e,weights:Dr}));Ur.displayName=`ArrowDownIcon`;var Wr=U.forwardRef((e,t)=>U.createElement(i,{ref:t,...e,weights:Or}));Wr.displayName=`ArrowSquareOutIcon`;var Gr=U.forwardRef((e,t)=>U.createElement(i,{ref:t,...e,weights:kr}));Gr.displayName=`ArrowUpIcon`;var Kr=U.forwardRef((e,t)=>U.createElement(i,{ref:t,...e,weights:Ar}));Kr.displayName=`CheckIcon`;var qr=U.forwardRef((e,t)=>U.createElement(i,{ref:t,...e,weights:jr}));qr.displayName=`CircleNotchIcon`;var Jr=U.forwardRef((e,t)=>U.createElement(i,{ref:t,...e,weights:Mr}));Jr.displayName=`CopyIcon`;var Yr=U.forwardRef((e,t)=>U.createElement(i,{ref:t,...e,weights:Nr}));Yr.displayName=`FilePlusIcon`;var Xr=U.forwardRef((e,t)=>U.createElement(i,{ref:t,...e,weights:Pr}));Xr.displayName=`FileTextIcon`;var Zr=U.forwardRef((e,t)=>U.createElement(i,{ref:t,...e,weights:Fr}));Zr.displayName=`MagnifyingGlassIcon`;var Qr=U.forwardRef((e,t)=>U.createElement(i,{ref:t,...e,weights:Ir}));Qr.displayName=`PencilSimpleIcon`;var $r=U.forwardRef((e,t)=>U.createElement(i,{ref:t,...e,weights:Lr}));$r.displayName=`StopCircleIcon`;var ei=U.forwardRef((e,t)=>U.createElement(i,{ref:t,...e,weights:Rr}));ei.displayName=`TerminalIcon`;var ti=U.forwardRef((e,t)=>U.createElement(i,{ref:t,...e,weights:zr}));ti.displayName=`TerminalWindowIcon`;var ni=U.forwardRef((e,t)=>U.createElement(i,{ref:t,...e,weights:Br}));ni.displayName=`UsersIcon`;var ri=U.forwardRef((e,t)=>U.createElement(i,{ref:t,...e,weights:Vr}));ri.displayName=`WrenchIcon`;var ii=U.forwardRef((e,t)=>U.createElement(i,{ref:t,...e,weights:Hr}));ii.displayName=`XCircleIcon`;var ai=ge(`effect/Crypto`);function oi({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=U.useRef(e!==void 0),[a,o]=U.useState(t);return[i?e:a,U.useCallback(e=>{i||o(e)},[])]}var si=P(V),ci=sn(si),li=B({repository:j,labels:re([L.fields.labels,si])}),ui=e=>ci(e)?e.map(e=>new De({name:e,color:Zt(),description:Zt()})):e,di=Xe(P(li)),fi=S(L.fields.labels),pi=e=>t=>Te(t,t=>new oe({operation:e,cause:t})),mi=Ie(function*(){let e=yield*Ke;return{get:H(`RepositoryLabelProjectionReader.get`)(function*(t){let n=(yield*di(yield*e.select({repository:ie.repository,labels:ie.labelsJson}).from(ie).where(Xt(ie.repository,t)).limit(1).execute(),{onExcessProperty:`error`}))[0];return n===void 0?Zt():ue(new L({repository:n.repository,labels:ui(n.labels)}))},pi(`read repository label projection`))}}),hi=Ie(function*(){let e=yield*Ke;return{replace:H(`RepositoryLabelProjectionWriter.replace`)(function*(t){yield*nt({repository:t.repository});let n=fi(t.labels);return(yield*e.insert(ie).values({repository:t.repository,labelsJson:n}).onConflictDoUpdate({target:ie.repository,set:{labelsJson:n},setWhere:Ze(ie.labelsJson,n)}).returning({repository:ie.repository}).execute()).length===0?(yield*A(`Repository label projection already matched GitHub`,{repository:t.repository,labels:t.labels.length}),!1):(yield*A(`Repository label projection updated from trigger polling`,{repository:t.repository,labels:t.labels.length}),!0)},pi(`write repository label projection`))}}),gi=class e extends ge()(`@usine/engine/RepositoryLabelProjectionReader`){static layer=se(e,mi)},_i=class e extends ge()(`@usine/engine/RepositoryLabelProjectionWriter`){static layer=se(e,hi)},vi=new Set([`closedAt`,`createdAt`,`mergedAt`,`submittedAt`,`updatedAt`]),yi=e=>Array.isArray(e)?e.map(yi):sn(Ce)(e)?Object.fromEntries(Object.entries(e).filter(([e])=>!vi.has(e)).sort(([e],[t])=>e<t?-1:+(e>t)).map(([e,t])=>[e,yi(t)])):e,bi=jt.check(Dt(1)),xi=jt.check(Dt(0)),Si=V.check(rn(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/u,{message:`Expected a GitHub UTC timestamp`})),Ci=(e,t)=>_e(e).pipe(Qe(e,{decode:vt(e=>e??t),encode:vt(e=>e)})),wi={totalCount:0,nodes:[]},Ti=B({login:ce}),Ei=_e(Ti),Di=B({name:ce}),Oi=B({totalCount:xi,nodes:P(Di)}),ki=B({author:Ei,body:V,createdAt:Si}),Ai=B({totalCount:xi,nodes:P(ki)}),ji=B({number:bi,title:V,body:V,url:ce,state:V,stateReason:_e(V),createdAt:Si,updatedAt:Si,closedAt:_e(Si),author:Ei,issueType:_e(B({name:V})),milestone:_e(B({title:V})),labels:Ci(Oi,wi),assignees:B({totalCount:xi,nodes:P(Ti)}),comments:Ai,closedByPullRequestsReferences:Ci(B({totalCount:xi,nodes:P(B({number:bi,state:V,isDraft:Ee,url:ce}))}),wi)}),Mi=_e(B({login:It(ce)})),Ni=B({author:Ei,state:V,body:V,submittedAt:_e(Si),commit:_e(B({oid:ce}))}),Pi=B({author:Ei,body:V}),Fi=B({number:bi,title:V,body:V,url:ce,state:V,isDraft:Ee,merged:Ee,createdAt:Si,updatedAt:Si,mergedAt:_e(Si),author:Ei,baseRefName:V,headRefName:V,headRefOid:ce,additions:xi,deletions:xi,changedFiles:xi,reviewDecision:_e(V),statusCheckRollup:_e(B({state:V})),labels:Ci(Oi,wi),reviewRequests:Ci(B({totalCount:xi,nodes:P(B({requestedReviewer:Mi}))}),wi),reviews:Ci(B({totalCount:xi,nodes:P(Ni)}),wi),reviewThreads:B({totalCount:xi,nodes:P(B({isResolved:Ee,isOutdated:Ee,path:V,comments:B({totalCount:xi,nodes:P(Pi)})}))}),comments:Ai,closingIssuesReferences:Ci(B({totalCount:xi,nodes:P(B({number:bi,state:V}))}),wi)}),Ii=V.check(rn(/^[a-f0-9]{64}$/u,{message:`Expected a SHA-256 content hash`})).pipe(Qt(`GitHubContentHash`)),Li=class extends Ue(`@usine/github/IssueSnapshot`)(`IssueSnapshot`,{payload:ji,contentHash:Ii}){},Ri=class extends Ue(`@usine/github/PullRequestSnapshot`)(`PullRequestSnapshot`,{payload:Fi,contentHash:Ii}){};re([Li,Ri]);var zi=`
2
+ query UsineIssuePayload($owner: String!, $name: String!, $number: Int!) {
3
+ repository(owner: $owner, name: $name) {
4
+ issue(number: $number) {
5
+ number
6
+ title
7
+ body
8
+ url
9
+ state
10
+ stateReason
11
+ createdAt
12
+ updatedAt
13
+ closedAt
14
+ author { login }
15
+ issueType { name }
16
+ milestone { title }
17
+ labels(first: 50) {
18
+ totalCount
19
+ nodes { name }
20
+ }
21
+ assignees(first: 10) {
22
+ totalCount
23
+ nodes { login }
24
+ }
25
+ comments(last: 20) {
26
+ totalCount
27
+ nodes {
28
+ author { login }
29
+ body
30
+ createdAt
31
+ }
32
+ }
33
+ closedByPullRequestsReferences(first: 10, includeClosedPrs: true) {
34
+ totalCount
35
+ nodes {
36
+ number
37
+ state
38
+ isDraft
39
+ url
40
+ }
41
+ }
42
+ }
43
+ }
44
+ }
45
+ `,Bi=`
46
+ query UsinePullRequestPayload($owner: String!, $name: String!, $number: Int!) {
47
+ repository(owner: $owner, name: $name) {
48
+ pullRequest(number: $number) {
49
+ number
50
+ title
51
+ body
52
+ url
53
+ state
54
+ isDraft
55
+ merged
56
+ createdAt
57
+ updatedAt
58
+ mergedAt
59
+ author { login }
60
+ baseRefName
61
+ headRefName
62
+ headRefOid
63
+ additions
64
+ deletions
65
+ changedFiles
66
+ reviewDecision
67
+ statusCheckRollup { state }
68
+ labels(first: 50) {
69
+ totalCount
70
+ nodes { name }
71
+ }
72
+ reviewRequests(first: 10) {
73
+ totalCount
74
+ nodes {
75
+ requestedReviewer {
76
+ ... on User { login }
77
+ }
78
+ }
79
+ }
80
+ reviews(last: 20) {
81
+ totalCount
82
+ nodes {
83
+ author { login }
84
+ state
85
+ body
86
+ submittedAt
87
+ commit { oid }
88
+ }
89
+ }
90
+ reviewThreads(first: 50) {
91
+ totalCount
92
+ nodes {
93
+ isResolved
94
+ isOutdated
95
+ path
96
+ comments(first: 10) {
97
+ totalCount
98
+ nodes {
99
+ author { login }
100
+ body
101
+ }
102
+ }
103
+ }
104
+ }
105
+ comments(last: 20) {
106
+ totalCount
107
+ nodes {
108
+ author { login }
109
+ body
110
+ createdAt
111
+ }
112
+ }
113
+ closingIssuesReferences(first: 10) {
114
+ totalCount
115
+ nodes {
116
+ number
117
+ state
118
+ }
119
+ }
120
+ }
121
+ }
122
+ }
123
+ `,Vi=5e3,Hi=100,Ui=10,Wi=100,Gi=6e4,Ki=B({number:jt.check(Dt(1)),updatedAt:T,pullRequest:It(me)}).pipe(je({updatedAt:`updated_at`,pullRequest:`pull_request`})),qi=P(Ki),Ji=P(B({name:Ct,color:Rt,description:_e(V)})),Yi=({name:e,color:t,description:n})=>new _t({name:e,color:t,description:Ge(n)}),Xi=B({data:It(me),errors:It(P(B({message:V,type:It(V)})))}),Zi=B({repository:Cn(B({issue:Cn(ji)}))}),Qi=B({repository:Cn(B({pullRequest:Cn(Fi)}))}),$i=e=>zt(e),ea=e=>e.map(e=>e.pullRequest===void 0?new tt({number:e.number,updatedAt:e.updatedAt}):new dn({number:e.number,updatedAt:e.updatedAt})),ta=e=>{let t=e.flatMap(e=>pe(e,{onNone:()=>[],onSome:e=>[e]}));return t.length===0?Zt():$i(Math.max(...t))},na=(e,t)=>ta([C(e[`retry-after`],t),we(e,Hi)]),ra=(e,t)=>ta([M(e,t),C(e[`retry-after`],t),we(e,Hi)]),ia=e=>{if(e===void 0)return Zt();let t=/<(?<url>[^>]+)>;\s*rel="next"/u.exec(e);return Ge(t?.groups?.url)},aa=e=>{let t=xt(e)-Vi;return`${new Date(t-t%1e3).toISOString().slice(0,19)}Z`},oa=(e,t)=>{let{name:n,owner:r}=Be(e),i=new URL(`${mn}/repos/${encodeURIComponent(r)}/${encodeURIComponent(n)}/issues`);return i.searchParams.set(`state`,`all`),i.searchParams.set(`sort`,`updated`),i.searchParams.set(`direction`,`asc`),i.searchParams.set(`per_page`,`100`),qe(t.watermark)&&i.searchParams.set(`since`,aa(t.watermark.value)),i.toString()},sa=e=>{let{name:t,owner:n}=Be(e),r=new URL(`${mn}/repos/${encodeURIComponent(n)}/${encodeURIComponent(t)}/labels`);return r.searchParams.set(`per_page`,`100`),r.toString()},ca=(e,t)=>{let{name:n,owner:r}=Be(e),i=new URL(`${mn}/repos/${encodeURIComponent(r)}/${encodeURIComponent(n)}/issues/${t}/labels`);return i.searchParams.set(`per_page`,`100`),i.toString()},la=(e,t)=>{let n=t.map(({updatedAt:e})=>xt(e));return qe(e.watermark)&&n.push(xt(e.watermark.value)),n.length===0?Zt():$i(Math.max(...n))},ua=class e extends ge()(`@usine/github/GitHubPolling`){static layer=se(e,Ie(function*(){let e=yield*k,t=yield*ai,n=yield*tn,r=da(t),i=H(`GitHubPolling.execute`)(function*(e,t){return yield*n.execute(t).pipe(Te(t=>ve(e,t)))}),a=H(`GitHubPolling.changesPage`)(function*(t){let n=yield*e.installationToken(),r=Kt(t).pipe(Re(n.value)),a=yield*i(`poll-repository-changes`,r),o=yield*te;return a.status===200?{items:ea(yield*Ot(qi)(a).pipe(Te(e=>F(`poll-repository-changes`,e.message)))),next:ia(a.headers.link)}:yield*kt(`poll-repository-changes`,a,o)}),o=H(`GitHubPolling.labelsPage`)(function*(t,n){let r=yield*e.installationToken(),a=Kt(n).pipe(Re(r.value)),o=yield*i(t,a),s=yield*te;return o.status===200?{labels:(yield*Ot(Ji)(o).pipe(Te(e=>F(t,e.message)))).map(Yi),next:ia(o.headers.link)}:yield*kt(t,o,s)}),s=H(`GitHubPolling.remainingLabelPages`)(function*(e,t){let n=[...t.labels],r=t.next,i=1;for(;qe(r)&&i<Wi;){let t=yield*o(e,r.value);n.push(...t.labels),r=t.next,i+=1}return qe(r)?yield*F(e,`GitHub label list exceeded ${Wi} pages`):n.sort((e,t)=>e.name.localeCompare(t.name))}),c=H(`GitHubPolling.allLabels`)(function*(e,t){return yield*s(e,yield*o(e,t))}),l=H(`GitHubPolling.labels`)(function*(t,n){yield*nt({repository:t});let r=yield*e.installationToken(),a=Kt(sa(t)).pipe(Re(r.value));qe(n)&&(a=dt(a,`if-none-match`,n.value));let o=yield*i(`list-repository-labels`,a),c=yield*te;if(o.status===304)return new bt;if(o.status!==200)return yield*kt(`list-repository-labels`,o,c);let l=yield*Ot(Ji)(o).pipe(Te(e=>F(`list-repository-labels`,e.message))),u=yield*s(`list-repository-labels`,{labels:l.map(Yi),next:ia(o.headers.link)}),d=et(vn)(o.headers.etag);return He(d)&&(yield*I(`GitHub omitted the label catalog ETag; next poll is unconditional`,{repository:t})),new qt({entityTag:d,labels:u})}),u=H(`GitHubPolling.changes`)(function*(t,n){let r=yield*e.installationToken(),o=Kt(oa(t,n)).pipe(Re(r.value));qe(n.entityTag)&&(o=dt(o,`if-none-match`,n.entityTag.value));let s=yield*i(`poll-repository-changes`,o),c=yield*te,l=ra(s.headers,c);if(s.status===304)return new Fe({cursor:n,nextPollAt:l,backoffUntil:na(s.headers,c)});if(s.status!==200)return yield*kt(`poll-repository-changes`,s,c);let u=ea(yield*Ot(qi)(s).pipe(Te(e=>F(`poll-repository-changes`,e.message)))),d=et(vn)(s.headers.etag);He(d)&&(yield*I(`GitHub omitted the changes ETag; next poll is unconditional`,{repository:t}));let f=[...u],p=ia(s.headers.link),m=1;for(;qe(p)&&m<Ui;){let e=yield*a(p.value);f.push(...e.items),p=e.next,m+=1}let h=qe(p);return h&&(yield*ze(`GitHub changes walk hit the page cap; backlog remains`,{repository:t,pages:m,items:f.length})),new _n({cursor:new ct({entityTag:d,watermark:la(n,f)}),items:f,backlog:h,nextPollAt:l,backoffUntil:na(s.headers,c)})}),d=H(`GitHubPolling.graphql`)(function*(t,n,r,a,o){let s=yield*e.installationToken(),{name:c,owner:l}=Be(n),u=an(`${mn}/graphql`).pipe(st({query:a,variables:{owner:l,name:c,number:r}}),Re(s.value)),d=yield*i(t,u),f=yield*te;if(d.status!==200)return yield*kt(t,d,f);let p=yield*Ot(Xi)(d).pipe(Te(e=>F(t,e.message)));if(p.errors!==void 0&&p.errors.length>0){if(p.errors.some(e=>e.type===`RATE_LIMITED`)){let e=ae(Mt(d.headers,f),()=>f+Gi);return yield*new xe({operation:t,retryAt:wt(e),message:`GitHub GraphQL asked the poller to wait before retrying`})}return yield*F(t,`GraphQL errors: ${p.errors.map(e=>e.message).join(`; `)}`)}return yield*Xe(o)(p.data).pipe(Te(e=>F(t,e.message)))});return{changes:u,labels:l,snapshot:H(`GitHubPolling.snapshot`)((e,t)=>Ie(function*(){let n=H(`GitHubPolling.completeItemLabels`)(function*(n){if(n.labels.nodes.length>=n.labels.totalCount)return n.labels;yield*A(`Completing truncated Item label connection for Board matching`,{repository:e,item:t.number,listedLabels:n.labels.nodes.length,totalLabels:n.labels.totalCount});let r=yield*c(`fetch-item-labels`,ca(e,t.number));return{totalCount:r.length,nodes:r.map(({name:e})=>({name:e}))}});if(t._tag===`ChangedIssue`){let i=yield*d(`fetch-issue-snapshot`,e,t.number,zi,Zi),a=D(i.repository,({issue:e})=>e);if(He(a))return yield*F(`fetch-issue-snapshot`,`issue ${t.number} came back null — deleted, transferred, or access lost`);let o={...a.value,labels:yield*n(a.value)};return new Li({payload:o,contentHash:yield*r(o)})}let i=yield*d(`fetch-pull-request-snapshot`,e,t.number,Bi,Qi),a=D(i.repository,({pullRequest:e})=>e);if(He(a))return yield*F(`fetch-pull-request-snapshot`,`pull request ${t.number} came back null — deleted or access lost`);let o={...a.value,labels:yield*n(a.value)};return new Ri({payload:o,contentHash:yield*r(o)})}))}}))},da=e=>H(`GitHubPolling.contentHash`)(function*(t){let n=new TextEncoder().encode(JSON.stringify(yi(t))),r=yield*e.digest(`SHA-256`,n).pipe(Nt);return Ii.make(Array.from(r,e=>e.toString(16).padStart(2,`0`)).join(``))}),fa=e=>e.pipe(Te(e=>e instanceof ut?e:new oe({operation:`update cycle budget`,cause:e}))),pa=class e extends ge()(`@usine/engine/CycleBudgets`){static layer=se(e,Ie(function*(){let e=yield*Ke,t=Wt(e);return{generation:H(`CycleBudgets.generation`)(function*(e){yield*nt({itemKey:e});let n=yield*t.get(e).pipe(Te(e=>new oe({operation:`read cycle generation`,cause:e})));return pe(n,{onNone:()=>Tt.make(0),onSome:e=>e.generation})}),asks:H(`CycleBudgets.asks`)(()=>t.asks().pipe(Te(e=>new oe({operation:`read cycle Asks`,cause:e})))),reset:H(`CycleBudgets.reset`)(function*(t,n){yield*nt({askId:t,eventId:n.id}),yield*e.transaction(e=>Ie(function*(){if((yield*e.select().from(Me).where(Xt(Me.askId,t)).execute())[0]?.eventId===n.id){yield*ze(`Cycle budget reset answer already recorded`,{askId:t,eventId:n.id});return}let r=(yield*Wt(e).asks()).find(({id:e})=>e===t);if(r===void 0)return yield*new ut({askId:t});let i=yield*Wt(e).get(r.itemKey);if(He(i))return yield*lt(Error(`Open cycle Ask has no budget`));let a=i.value.generation+1;yield*e.insert(xn).values({eventId:n.id,dedupKey:n.dedupKey,payloadJson:ln(n.payload),receivedAt:Ft(n.receivedAt)}).execute(),yield*e.insert(Me).values({askId:t,eventId:n.id,itemKey:r.itemKey}).execute(),yield*e.update(E).set({generation:a,askJson:null,resetPending:!0}).where(Xt(E.itemKey,r.itemKey)).execute(),yield*e.update(he).set({generation:a}).where(fe(Xt(he.itemKey,r.itemKey),le(he.runId,e.select({runId:Ve.runId}).from(Ve).where(le(Ye`json_extract(${Ve.stateJson}, '$._tag')`,[...Le]))))).execute(),yield*ze(`Operator reset Item cycle budget`,{askId:t,eventId:n.id,itemKey:r.itemKey,repository:r.repository,generation:a,completedCycles:r.completedCycles,counts:r.counts})})).pipe(fa)}),pendingResets:H(`CycleBudgets.pendingResets`)(()=>t.pendingResets().pipe(N(e=>e.map(e=>new nn(e))),Te(e=>new oe({operation:`read pending cycle resets`,cause:e})))),acknowledgeReset:H(`CycleBudgets.acknowledgeReset`)(function*(t){yield*nt({itemKey:t.itemKey,generation:t.generation}),yield*e.update(E).set({resetPending:!1}).where(fe(Xt(E.itemKey,t.itemKey),Xt(E.generation,t.generation))).execute().pipe(Te(e=>new oe({operation:`acknowledge cycle reset`,cause:e}))),yield*ze(`Cycle reset trigger refresh recorded`,{itemKey:t.itemKey,generation:t.generation})})}}))},ma=ce.pipe(Qt(`ItemProjectionSource`)),ha=ce.pipe(Qt(`ItemContentHash`)),ga=class extends Pt(`@usine/engine/ItemProjection`)({itemKey:St,repository:j,source:ma,number:it,contentHash:ha,payload:Ce}){},_a=B({itemKey:ga.fields.itemKey,repository:j,source:ma,number:it,contentHash:ha,payload:Ce}),va=Xe(P(_a)),ya=S(Ce),ba=e=>t=>Te(t,t=>new oe({operation:e,cause:t})),xa=Ie(function*(){let e=yield*Ke;return{list:H(`ItemProjectionReader.list`)(function*(t,n){return yield*nt({repository:t,limit:n.limit}),(yield*va(yield*e.select({itemKey:We.itemKey,repository:We.repository,source:We.source,number:We.itemNumber,contentHash:We.contentHash,payload:We.payloadJson}).from(We).where(Xt(We.repository,t)).orderBy(ne(We.itemNumber)).limit(n.limit).execute(),{onExcessProperty:`error`})).map(e=>new ga(e))},ba(`list Item projections`))}}),Sa=Ie(function*(){let e=yield*Ke;return{upsert:H(`ItemProjectionWriter.upsert`)(function*(t){return yield*nt({repository:t.repository,item:t.number,itemKey:t.itemKey}),(yield*e.insert(We).values({itemKey:t.itemKey,repository:t.repository,source:t.source,itemNumber:t.number,contentHash:t.contentHash,payloadJson:ya(t.payload)}).onConflictDoUpdate({target:We.itemKey,set:{repository:t.repository,source:t.source,itemNumber:t.number,contentHash:t.contentHash,payloadJson:ya(t.payload)},setWhere:Ze(We.contentHash,t.contentHash)}).returning({itemKey:We.itemKey}).execute()).length===0?(yield*A(`Item projection already matched the observed snapshot`,{repository:t.repository,item:t.number,contentHash:t.contentHash}),!1):(yield*A(`Item projection updated from trigger polling`,{repository:t.repository,item:t.number,source:t.source,contentHash:t.contentHash}),!0)},ba(`write Item projection`))}});(class e extends ge()(`@usine/engine/ItemProjectionReader`){static layer=se(e,xa)});var Ca=class e extends ge()(`@usine/engine/ItemProjectionWriter`){static layer=se(e,Sa)},wa=pt(St).pipe(Qe(ht(Je([ke(`github`),j,it])))),Ta=S(wa),Ea={labels:[],findings:[],catalogChanged:!1,nextPollAt:Zt()},Da=H(`PollingTriggers.applyLabelCatalog`)(function*(e,t,n){yield*nt({repository:e});let r=yield*gi,i=yield*_i,a={labelEntityTag:t,entityTagChanged:!1,confirmedLabels:Zt(),failures:[],nextPollAt:Zt()};if(Ne(n)){let t=n.failure;return t._tag===`GitHubRateLimitError`?(yield*I(`Label catalog rate-limited; kept the stored catalog and deferred label provisioning`,{repository:e,operation:t.operation,retryAt:Jt(t.retryAt)}),{...a,nextPollAt:ue(t.retryAt)}):(yield*hn(`Label catalog request failed; kept the stored catalog, deferred label provisioning, and evaluated items anyway`,{repository:e,...at(t)}),{...a,failures:[new $t({repository:e,errorTag:t._tag,message:t.message})]})}let o=n.success;if(!(o instanceof qt)){let t=yield*r.get(e);return He(t)?(yield*I(`Repository label catalog unchanged (304) but its projection is missing; refetching next cycle and deferring label provisioning`,{repository:e}),{...a,labelEntityTag:Zt(),entityTagChanged:!0}):(yield*A(`Repository label catalog unchanged (304)`,{repository:e}),{...a,confirmedLabels:ue(t.value.labels)})}let s=o.labels.map(({name:e,color:t,description:n})=>new De({name:e,color:ue(t),description:n}));return yield*i.replace(new L({repository:e,labels:s})),{...a,labelEntityTag:o.entityTag,entityTagChanged:!0,confirmedLabels:ue(s)}});H(`PollingTriggers.synchronizeLabels`)(function*(e,t,n){yield*nt({repository:e});let r=yield*ua,i=yield*ft,a=yield*_i,o=yield*Da(e,n,yield*w(r.labels(e,n))),s=yield*pe(o.confirmedLabels,{onNone:()=>ye(Ea),onSome:n=>i.reconcile(e,t,n)}),c={labelEntityTag:s.catalogChanged?Zt():o.labelEntityTag,entityTagChanged:o.entityTagChanged||s.catalogChanged,failures:o.failures,preflightFindings:s.findings,nextPollAt:Et([o.nextPollAt,s.nextPollAt])};return s.catalogChanged&&(yield*a.replace(new L({repository:e,labels:s.labels})).pipe(Te(e=>({_tag:`InterruptedRepositoryCycle`,error:e,failures:c.failures,preflightFindings:c.preflightFindings,nextPollAt:c.nextPollAt})))),c}),H(`PollingTriggers.observeItem`)(function*(e,t){yield*nt({repository:e,item:t.number});let n=yield*ua,r=yield*Ca,i=yield*pa,a=Ta([`github`,j.make(gn(e)),it.make(t.number)]),o=yield*i.generation(a),s=yield*n.snapshot(e,t),c=new ga({itemKey:a,repository:e,source:ma.make(t._tag===`ChangedIssue`?`issue`:`pr`),number:it.make(t.number),contentHash:ha.make(s.contentHash),payload:s.payload});return yield*r.upsert(c),yield*A(`Fetched changed-item snapshot`,{repository:e,item:c.number,stream:c.source,contentHash:c.contentHash}),{projection:c,cycleGeneration:o}});function Oa(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}function ka(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Aa=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ja=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ma={};function Na(e,t){return((t||Ma).jsx?ja:Aa).test(e)}var Pa=/[ \t\n\f\r]/g;function Fa(e){return typeof e==`object`?e.type===`text`&&Ia(e.value):Ia(e)}function Ia(e){return e.replace(Pa,``)===``}var La=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};La.prototype.normal={},La.prototype.property={},La.prototype.space=void 0;function Ra(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new La(n,r,t)}function za(e){return e.toLowerCase()}var Ba=class{constructor(e,t){this.attribute=t,this.property=e}};Ba.prototype.attribute=``,Ba.prototype.booleanish=!1,Ba.prototype.boolean=!1,Ba.prototype.commaOrSpaceSeparated=!1,Ba.prototype.commaSeparated=!1,Ba.prototype.defined=!1,Ba.prototype.mustUseProperty=!1,Ba.prototype.number=!1,Ba.prototype.overloadedBoolean=!1,Ba.prototype.property=``,Ba.prototype.spaceSeparated=!1,Ba.prototype.space=void 0;var Va=e({boolean:()=>W,booleanish:()=>G,commaOrSpaceSeparated:()=>Ga,commaSeparated:()=>Wa,number:()=>K,overloadedBoolean:()=>Ua,spaceSeparated:()=>q}),Ha=0,W=Ka(),G=Ka(),Ua=Ka(),K=Ka(),q=Ka(),Wa=Ka(),Ga=Ka();function Ka(){return 2**++Ha}var qa=Object.keys(Va),Ja=class extends Ba{constructor(e,t,n,r){let i=-1;if(super(e,t),Ya(this,`space`,r),typeof n==`number`)for(;++i<qa.length;){let e=qa[i];Ya(this,qa[i],(n&Va[e])===Va[e])}}};Ja.prototype.defined=!0;function Ya(e,t,n){n&&(e[t]=n)}function Xa(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Ja(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[za(r)]=r,n[za(a.attribute)]=r}return new La(t,n,e.space)}var Za=Xa({properties:{ariaActiveDescendant:null,ariaAtomic:G,ariaAutoComplete:null,ariaBusy:G,ariaChecked:G,ariaColCount:K,ariaColIndex:K,ariaColSpan:K,ariaControls:q,ariaCurrent:null,ariaDescribedBy:q,ariaDetails:null,ariaDisabled:G,ariaDropEffect:q,ariaErrorMessage:null,ariaExpanded:G,ariaFlowTo:q,ariaGrabbed:G,ariaHasPopup:null,ariaHidden:G,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:q,ariaLevel:K,ariaLive:null,ariaModal:G,ariaMultiLine:G,ariaMultiSelectable:G,ariaOrientation:null,ariaOwns:q,ariaPlaceholder:null,ariaPosInSet:K,ariaPressed:G,ariaReadOnly:G,ariaRelevant:null,ariaRequired:G,ariaRoleDescription:q,ariaRowCount:K,ariaRowIndex:K,ariaRowSpan:K,ariaSelected:G,ariaSetSize:K,ariaSort:null,ariaValueMax:K,ariaValueMin:K,ariaValueNow:K,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Qa(e,t){return t in e?e[t]:t}function $a(e,t){return Qa(e,t.toLowerCase())}var eo=Xa({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Wa,acceptCharset:q,accessKey:q,action:null,allow:null,allowFullScreen:W,allowPaymentRequest:W,allowUserMedia:W,alpha:W,alt:null,as:null,async:W,autoCapitalize:null,autoComplete:q,autoFocus:W,autoPlay:W,blocking:q,capture:null,charSet:null,checked:W,cite:null,className:q,closedBy:null,colorSpace:null,cols:K,colSpan:K,command:null,commandFor:null,content:null,contentEditable:G,controls:W,controlsList:q,coords:K|Wa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:W,defer:W,dir:null,dirName:null,disabled:W,download:Ua,draggable:G,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:W,formTarget:null,headers:q,height:K,hidden:Ua,high:K,href:null,hrefLang:null,htmlFor:q,httpEquiv:q,id:null,imageSizes:null,imageSrcSet:null,inert:W,inputMode:null,integrity:null,is:null,isMap:W,itemId:null,itemProp:q,itemRef:q,itemScope:W,itemType:q,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:W,low:K,manifest:null,max:null,maxLength:K,media:null,method:null,min:null,minLength:K,multiple:W,muted:W,name:null,nonce:null,noModule:W,noValidate:W,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:W,optimum:K,pattern:null,ping:q,placeholder:null,playsInline:W,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:W,referrerPolicy:null,rel:q,required:W,reversed:W,rows:K,rowSpan:K,sandbox:q,scope:null,scoped:W,seamless:W,selected:W,shadowRootClonable:W,shadowRootCustomElementRegistry:W,shadowRootDelegatesFocus:W,shadowRootMode:null,shadowRootSerializable:W,shape:null,size:K,sizes:null,slot:null,span:K,spellCheck:G,src:null,srcDoc:null,srcLang:null,srcSet:null,start:K,step:null,style:null,tabIndex:K,target:null,title:null,translate:null,type:null,typeMustMatch:W,useMap:null,value:G,width:K,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:q,axis:null,background:null,bgColor:null,border:K,borderColor:null,bottomMargin:K,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:W,declare:W,event:null,face:null,frame:null,frameBorder:null,hSpace:K,leftMargin:K,link:null,longDesc:null,lowSrc:null,marginHeight:K,marginWidth:K,noResize:W,noHref:W,noShade:W,noWrap:W,object:null,profile:null,prompt:null,rev:null,rightMargin:K,rules:null,scheme:null,scrolling:G,standby:null,summary:null,text:null,topMargin:K,valueType:null,version:null,vAlign:null,vLink:null,vSpace:K,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:W,disablePictureInPicture:W,disableRemotePlayback:W,exportParts:Wa,part:q,prefix:null,property:null,results:K,security:null,unselectable:null},space:`html`,transform:$a}),to=Xa({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Ga,accentHeight:K,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:K,amplitude:K,arabicForm:null,ascent:K,attributeName:null,attributeType:null,azimuth:K,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:K,by:null,calcMode:null,capHeight:K,className:q,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:K,diffuseConstant:K,direction:null,display:null,dur:null,divisor:K,dominantBaseline:null,download:W,dx:null,dy:null,edgeMode:null,editable:null,elevation:K,enableBackground:null,end:null,event:null,exponent:K,externalResourcesRequired:null,fill:null,fillOpacity:K,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Wa,g2:Wa,glyphName:Wa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:K,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:K,horizOriginX:K,horizOriginY:K,id:null,ideographic:K,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:K,k:K,k1:K,k2:K,k3:K,k4:K,kernelMatrix:Ga,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:K,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:K,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:K,overlineThickness:K,paintOrder:null,panose1:null,path:null,pathLength:K,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:q,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:K,pointsAtY:K,pointsAtZ:K,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ga,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ga,rev:Ga,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ga,requiredFeatures:Ga,requiredFonts:Ga,requiredFormats:Ga,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:K,specularExponent:K,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:K,strikethroughThickness:K,string:null,stroke:null,strokeDashArray:Ga,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:K,strokeOpacity:K,strokeWidth:null,style:null,surfaceScale:K,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ga,tabIndex:K,tableValues:null,target:null,targetX:K,targetY:K,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ga,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:K,underlineThickness:K,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:K,values:null,vAlphabetic:K,vMathematical:K,vectorEffect:null,vHanging:K,vIdeographic:K,version:null,vertAdvY:K,vertOriginX:K,vertOriginY:K,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:K,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Qa}),no=Xa({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),ro=Xa({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:$a}),io=Xa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),ao={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},oo=/[A-Z]/g,so=/-[a-z]/g,co=/^data[-\w.:]+$/i;function lo(e,t){let n=za(t),r=t,i=Ba;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&co.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(so,fo);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!so.test(e)){let n=e.replace(oo,uo);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Ja}return new i(r,t)}function uo(e){return`-`+e.toLowerCase()}function fo(e){return e.charAt(1).toUpperCase()}var po=Ra([Za,eo,no,ro,io],`html`),mo=Ra([Za,to,no,ro,io],`svg`);function ho(e){return e.join(` `).trim()}var go=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
124
+ `);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),_o=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(go());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),vo=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),yo=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(_o()),r=vo();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),bo=So(`end`),xo=So(`start`);function So(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Co(e){let t=xo(e),n=bo(e);if(t&&n)return{start:t,end:n}}function wo(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Eo(e.position):`start`in e||`end`in e?Eo(e):`line`in e||`column`in e?To(e):``}function To(e){return Do(e&&e.line)+`:`+Do(e&&e.column)}function Eo(e){return To(e&&e.start)+`-`+To(e&&e.end)}function Do(e){return e&&typeof e==`number`?e:1}var Oo=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=wo(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Oo.prototype.file=``,Oo.prototype.name=``,Oo.prototype.reason=``,Oo.prototype.message=``,Oo.prototype.stack=``,Oo.prototype.column=void 0,Oo.prototype.line=void 0,Oo.prototype.ancestors=void 0,Oo.prototype.cause=void 0,Oo.prototype.fatal=void 0,Oo.prototype.place=void 0,Oo.prototype.ruleId=void 0,Oo.prototype.source=void 0;var ko=t(yo(),1),Ao={}.hasOwnProperty,jo=new Map,Mo=/[A-Z]/g,No=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Po=new Set([`td`,`th`]),Fo=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Io(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=qo(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Ko(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?mo:po,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Lo(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Lo(e,t,n){if(t.type===`element`)return Ro(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return zo(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Vo(e,t,n);if(t.type===`mdxjsEsm`)return Bo(e,t);if(t.type===`root`)return Ho(e,t,n);if(t.type===`text`)return Uo(e,t)}function Ro(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=mo,e.schema=i),e.ancestors.push(t);let a=$o(e,t.tagName,!1),o=Jo(e,t),s=Xo(e,t);return No.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Fa(e)})),Wo(e,o,a,t),Go(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function zo(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}es(e,t.position)}function Bo(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);es(e,t.position)}function Vo(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=mo,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:$o(e,t.name,!0),o=Yo(e,t),s=Xo(e,t);return Wo(e,o,a,t),Go(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Ho(e,t,n){let r={};return Go(r,Xo(e,t)),e.create(t,e.Fragment,r,n)}function Uo(e,t){return t.value}function Wo(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Go(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Ko(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function qo(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=xo(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Jo(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Ao.call(t.properties,i)){let a=Zo(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Po.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Yo(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else es(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else es(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Xo(e,t){let n=[],r=-1,i=e.passKeys?new Map:jo;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Lo(e,a,o);s!==void 0&&n.push(s)}return n}function Zo(e,t,n){let r=lo(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ka(n):ho(n)),r.property===`style`){let t=typeof n==`object`?n:Qo(e,String(n));return e.stylePropertyNameCase===`css`&&(t=ts(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?ao[r.property]||r.property:r.attribute,n]}}function Qo(e,t){try{return(0,ko.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Oo("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Fo+`#cannot-parse-style-attribute`,r}}function $o(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Na(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Na(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Ao.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);es(e)}function es(e,t){let n=new Oo("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Fo+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function ts(e){let t={},n;for(n in e)Ao.call(e,n)&&(t[ns(n)]=e[n]);return t}function ns(e){let t=e.replace(Mo,rs);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function rs(e){return`-`+e.toLowerCase()}var is={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},as={};function os(e,t){let n=t||as;return ss(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function ss(e,t,n){if(ls(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return cs(e.children,t,n)}return Array.isArray(e)?cs(e,t,n):``}function cs(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=ss(e[i],t,n);return r.join(``)}function ls(e){return!!(e&&typeof e==`object`)}var us=document.createElement(`i`);function ds(e){let t=`&`+e+`;`;us.innerHTML=t;let n=us.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function fs(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function ps(e,t){return e.length>0?(fs(e,e.length,0,t),e):t}var ms={}.hasOwnProperty;function hs(e){let t={},n=-1;for(;++n<e.length;)gs(t,e[n]);return t}function gs(e,t){let n;for(n in t){let r=(ms.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){ms.call(r,a)||(r[a]=[]);let e=i[a];_s(r[a],Array.isArray(e)?e:e?[e]:[])}}}function _s(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);fs(e,0,0,r)}function vs(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function ys(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var bs=ks(/[A-Za-z]/),xs=ks(/[\dA-Za-z]/),Ss=ks(/[#-'*+\--9=?A-Z^-~]/);function Cs(e){return e!==null&&(e<32||e===127)}var ws=ks(/\d/),Ts=ks(/[\dA-Fa-f]/),Es=ks(/[!-/:-@[-`{-~]/);function J(e){return e!==null&&e<-2}function Y(e){return e!==null&&(e<0||e===32)}function X(e){return e===-2||e===-1||e===32}var Ds=ks(/\p{P}|\p{S}/u),Os=ks(/\s/);function ks(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function As(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&xs(e.charCodeAt(n+1))&&xs(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Z(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return X(r)?(e.enter(n),s(r)):t(r)}function s(r){return X(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var js={tokenize:Ms};function Ms(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Z(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return J(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Ns={tokenize:Fs},Ps={tokenize:Is};function Fs(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return fs(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ps,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Ps,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return J(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;fs(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Is(e,t,n){return Z(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Ls(e){if(e===null||Y(e)||Os(e))return 1;if(Ds(e))return 2}function Rs(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var zs={name:`attention`,resolveAll:Bs,tokenize:Vs};function Bs(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Hs(d,-c),Hs(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=ps(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=ps(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=ps(l,Rs(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=ps(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=ps(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,fs(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Vs(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ls(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Ls(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Hs(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Us={name:`autolink`,tokenize:Ws};function Ws(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return bs(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||xs(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||xs(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Cs(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Ss(t)?(e.consume(t),l):n(t)}function u(e){return xs(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||xs(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Gs={partial:!0,tokenize:Ks};function Ks(e,t,n){return r;function r(t){return X(t)?Z(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||J(e)?t(e):n(e)}}var qs={continuation:{tokenize:Ys},exit:Xs,name:`blockQuote`,tokenize:Js};function Js(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return X(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Ys(e,t,n){let r=this;return i;function i(t){return X(t)?Z(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(qs,t,n)(r)}}function Xs(e){e.exit(`blockQuote`)}var Zs={name:`characterEscape`,tokenize:Qs};function Qs(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Es(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var $s={name:`characterReference`,tokenize:ec};function ec(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=xs,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Ts,u):(e.enter(`characterReferenceValue`),a=7,o=ws,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===xs&&!ds(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var tc={partial:!0,tokenize:ic},nc={concrete:!0,name:`codeFenced`,tokenize:rc};function rc(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),X(t)?Z(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||J(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(tc,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||J(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):X(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Z(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||J(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||J(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&X(t)?Z(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||J(t)?e.check(tc,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||J(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),X(t)?Z(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),X(t)?Z(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||J(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function ic(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var ac={name:`codeIndented`,tokenize:sc},oc={partial:!0,tokenize:cc};function sc(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),Z(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):J(t)?e.attempt(oc,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||J(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function cc(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):J(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):Z(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):J(e)?i(e):n(e)}}var lc={name:`codeText`,previous:dc,resolve:uc,tokenize:fc};function uc(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function dc(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function fc(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):J(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||J(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var pc=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&mc(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),mc(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),mc(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);mc(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);mc(this.left,t.reverse())}}}};function mc(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function hc(e){let t={},n=-1,r,i,a,o,s,c,l,u=new pc(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,gc(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return fs(e,0,1/0,u.slice(0)),!l}function gc(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var _c={resolve:yc,tokenize:bc},vc={partial:!0,tokenize:xc};function yc(e){return hc(e),e}function bc(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):J(t)?e.check(vc,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function xc(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Z(e,a,`linePrefix`)}function a(i){if(i===null||J(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Sc(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Cs(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||J(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Y(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Cs(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Cc(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):J(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||J(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!X(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function wc(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):J(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Z(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||J(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Tc(e,t){let n;return r;function r(i){return J(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):X(i)?Z(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Ec={name:`definition`,tokenize:Oc},Dc={partial:!0,tokenize:kc};function Oc(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Cc.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=ys(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Y(t)?Tc(e,l)(t):l(t)}function l(t){return Sc(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Dc,d,d)(t)}function d(t){return X(t)?Z(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||J(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function kc(e,t,n){return r;function r(t){return Y(t)?Tc(e,i)(t):n(t)}function i(t){return wc(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return X(t)?Z(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||J(e)?t(e):n(e)}}var Ac={name:`hardBreakEscape`,tokenize:jc};function jc(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return J(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Mc={name:`headingAtx`,resolve:Nc,tokenize:Pc};function Nc(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},fs(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Pc(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Y(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||J(n)?(e.exit(`atxHeading`),t(n)):X(n)?Z(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Y(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Fc=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Ic=[`pre`,`script`,`style`,`textarea`],Lc={concrete:!0,name:`htmlFlow`,resolveTo:Bc,tokenize:Vc},Rc={partial:!0,tokenize:Uc},zc={partial:!0,tokenize:Hc};function Bc(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Vc(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):bs(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):bs(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return bs(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Y(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Ic.includes(l)?(i=1,r.interrupt?t(s):O(s)):Fc.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||xs(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return X(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||bs(t)?(e.consume(t),b):X(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||xs(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):X(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):X(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||J(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Y(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||X(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||J(t)?O(t):X(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),ee):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):J(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Rc,L,k)(t)):t===null||J(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(zc,A,L)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||J(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return Ic.includes(n)?(e.consume(t),ee):O(t)}return bs(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),ee):t===45&&i===2?(e.consume(t),I):O(t)}function ee(t){return t===null||J(t)?(e.exit(`htmlFlowData`),L(t)):(e.consume(t),ee)}function L(n){return e.exit(`htmlFlow`),t(n)}}function Hc(e,t,n){let r=this;return i;function i(t){return J(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Uc(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Gs,t,n)}}var Wc={name:`htmlText`,tokenize:Gc};function Gc(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):bs(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):bs(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):J(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):J(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):J(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):J(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return bs(t)?(e.consume(t),S):n(t)}function S(t){return t===45||xs(t)?(e.consume(t),S):C(t)}function C(t){return J(t)?(o=C,N(t)):X(t)?(e.consume(t),C):M(t)}function w(t){return t===45||xs(t)?(e.consume(t),w):t===47||t===62||Y(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||bs(t)?(e.consume(t),E):J(t)?(o=T,N(t)):X(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||xs(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):J(t)?(o=D,N(t)):X(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):J(t)?(o=O,N(t)):X(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):J(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Y(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||Y(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return X(t)?Z(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var Kc={name:`labelEnd`,resolveAll:Xc,resolveTo:Zc,tokenize:Qc},qc={tokenize:$c},Jc={tokenize:el},Yc={tokenize:tl};function Xc(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&fs(e,0,e.length,n),e}function Zc(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=ps(s,e.slice(a+1,a+r+3)),s=ps(s,[[`enter`,u,t]]),s=ps(s,Rs(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=ps(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=ps(s,e.slice(o+1)),s=ps(s,[[`exit`,c,t]]),fs(e,a,e.length,s),e}function Qc(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(ys(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(qc,u,o?u:d)(t):t===91?e.attempt(Jc,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Yc,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function $c(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Y(t)?Tc(e,a)(t):a(t)}function a(t){return t===41?u(t):Sc(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Y(t)?Tc(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?wc(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Y(t)?Tc(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function el(e,t,n){let r=this;return i;function i(t){return Cc.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(ys(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function tl(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var nl={name:`labelStartImage`,resolveAll:Kc.resolveAll,tokenize:rl};function rl(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var il={name:`labelStartLink`,resolveAll:Kc.resolveAll,tokenize:al};function al(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var ol={name:`lineEnding`,tokenize:sl};function sl(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Z(e,t,`linePrefix`)}}var cl={name:`thematicBreak`,tokenize:ll};function ll(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||J(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),X(t)?Z(e,s,`whitespace`)(t):s(t))}}var ul={continuation:{tokenize:ml},exit:gl,name:`list`,tokenize:pl},dl={partial:!0,tokenize:_l},fl={partial:!0,tokenize:hl};function pl(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:ws(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(cl,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return ws(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Gs,r.interrupt?n:u,e.attempt(dl,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return X(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function ml(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Gs,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Z(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!X(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(fl,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Z(e,e.attempt(ul,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function hl(e,t,n){let r=this;return Z(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function gl(e){e.exit(this.containerState.type)}function _l(e,t,n){let r=this;return Z(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!X(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var vl={name:`setextUnderline`,resolveTo:yl,tokenize:bl};function yl(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function bl(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),X(t)?Z(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||J(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var xl={tokenize:Sl};function Sl(e){let t=this,n=e.attempt(Gs,r,e.attempt(this.parser.constructs.flowInitial,i,Z(e,e.attempt(this.parser.constructs.flow,i,e.attempt(_c,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Cl={resolveAll:Dl()},wl=El(`string`),Tl=El(`text`);function El(e){return{resolveAll:Dl(e===`text`?Ol:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Dl(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Ol(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var kl=e({attentionMarkers:()=>Ll,contentInitial:()=>jl,disable:()=>Rl,document:()=>Al,flow:()=>Nl,flowInitial:()=>Ml,insideSpan:()=>Il,string:()=>Pl,text:()=>Fl}),Al={42:ul,43:ul,45:ul,48:ul,49:ul,50:ul,51:ul,52:ul,53:ul,54:ul,55:ul,56:ul,57:ul,62:qs},jl={91:Ec},Ml={[-2]:ac,[-1]:ac,32:ac},Nl={35:Mc,42:cl,45:[vl,cl],60:Lc,61:vl,95:cl,96:nc,126:nc},Pl={38:$s,92:Zs},Fl={[-5]:ol,[-4]:ol,[-3]:ol,33:nl,38:$s,42:zs,60:[Us,Wc],91:il,92:[Ac,Zs],93:Kc,95:zs,96:lc},Il={null:[zs,Cl]},Ll={null:[42,95]},Rl={null:[]};function zl(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=ps(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Rs(a,l.events,l),l.events):[]}function f(e,t){return Vl(p(e),t)}function p(e){return Bl(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){J(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&fs(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Bl(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Vl(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
125
+ `;break;case-3:o=`\r
126
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Hl(e){let t={constructs:hs([kl,...(e||{}).extensions||[]]),content:n(js),defined:[],document:n(Ns),flow:n(xl),lazy:{},string:n(wl),text:n(Tl)};return t;function n(e){return n;function n(n){return zl(t,e,n)}}}function Ul(e){for(;!hc(e););return e}var Wl=/[\0\t\n\r]/g;function Gl(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Wl.lastIndex=u,c=Wl.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Kl=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ql(e){return e.replace(Kl,Jl)}function Jl(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return vs(n.slice(t?2:1),t?16:10)}return ds(n)||e}var Yl={}.hasOwnProperty;function Xl(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Zl(n)(Ul(Hl(n).document().write(Gl()(e,t,!0))))}function Zl(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(me),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ue),blockQuote:a(B),characterEscape:T,characterReference:T,codeFenced:a(oe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(oe,o),codeText:a(se,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ce),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(le),hardBreakEscape:a(de),hardBreakTrailing:a(de),htmlFlow:a(fe,o),htmlFlowData:T,htmlText:a(fe,o),htmlTextData:T,image:a(pe),label:o,link:a(me),listItem:a(ge),listItemValue:f,listOrdered:a(he,d),listUnordered:a(he),paragraph:a(_e),reference:te,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ue),strong:a(ve),thematicBreak:a(be)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ae,autolinkProtocol:ie,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ne,characterReferenceMarkerNumeric:ne,characterReferenceValue:z,characterReference:re,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:F,labelText:P,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:R,resourceDestinationString:I,resourceTitleString:ee,resource:L,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};$l(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Yl.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||tu).call(a,void 0,e[0])}for(r.position={start:Ql(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Ql(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Ql(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||tu).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+wo({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Ql(e.end)}function u(){return os(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ys(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=ye(),n.position={start:Ql(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Ql(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Ql(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=ql(t),n.identifier=ys(t).toLowerCase()}function F(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function L(){this.data.inReference=void 0}function te(){this.data.referenceType=`collapsed`}function R(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ys(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ne(e){this.data.characterReferenceType=e.type}function z(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=vs(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=ds(t);let i=this.stack[this.stack.length-1];i.value+=r}function re(e){let t=this.stack.pop();t.position.end=Ql(e.end)}function ie(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ae(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function B(){return{type:`blockquote`,children:[]}}function oe(){return{type:`code`,lang:null,meta:null,value:``}}function se(){return{type:`inlineCode`,value:``}}function ce(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function le(){return{type:`emphasis`,children:[]}}function ue(){return{type:`heading`,depth:0,children:[]}}function de(){return{type:`break`}}function fe(){return{type:`html`,value:``}}function pe(){return{type:`image`,title:null,url:``,alt:null}}function me(){return{type:`link`,title:null,url:``,children:[]}}function he(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ge(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function _e(){return{type:`paragraph`,children:[]}}function ve(){return{type:`strong`,children:[]}}function ye(){return{type:`text`,value:``}}function be(){return{type:`thematicBreak`}}}function Ql(e){return{line:e.line,column:e.column,offset:e.offset}}function $l(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?$l(e,r):eu(e,r)}}function eu(e,t){let n;for(n in t)if(Yl.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function tu(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+wo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+wo({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+wo({start:t.start,end:t.end})+`) is still open`)}function nu(e){let t=this;t.parser=n;function n(n){return Xl(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function ru(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function iu(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
127
+ `}]}function au(e,t){let n=t.value?t.value+`
128
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function ou(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function su(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cu(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=As(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function lu(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uu(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function du(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function fu(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return du(e,t);let i={src:As(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function pu(e,t){let n={src:As(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function mu(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function hu(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return du(e,t);let i={href:As(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function gu(e,t){let n={href:As(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function _u(e,t,n){let r=e.all(t),i=n?vu(n):yu(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
129
+ `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
130
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function vu(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=yu(n[r])}return t}function yu(e){return e.spread??e.children.length>1}function bu(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function xu(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Su(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Cu(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wu(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=xo(t.children[1]),o=bo(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Tu(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Eu(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Du=9,Ou=32;function ku(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Au(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Au(t.slice(i),i>0,!1)),a.join(``)}function Au(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Du||t===Ou;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Du||t===Ou;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function ju(e,t){let n={type:`text`,value:ku(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Mu(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Nu={blockquote:ru,break:iu,code:au,delete:ou,emphasis:su,footnoteReference:cu,heading:lu,html:uu,imageReference:fu,image:pu,inlineCode:mu,linkReference:hu,link:gu,listItem:_u,list:bu,paragraph:xu,root:Su,strong:Cu,table:wu,tableCell:Eu,tableRow:Tu,text:ju,thematicBreak:Mu,toml:Pu,yaml:Pu,definition:Pu,footnoteDefinition:Pu};function Pu(){}var{defineProperty:Fu}=Object,Iu=typeof self==`object`?self:globalThis,Lu=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Iu[e](t)},Ru=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?Fu(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof Iu[e]==`function`?Lu(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(Lu(a,o),i)};return r},zu=e=>Ru(new Map,e)(0),Bu=``,{toString:Vu}={},{keys:Hu,is:Uu}=Object,Wu=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Vu.call(e).slice(8,-1);switch(n){case`Array`:return[1,Bu];case`Object`:return[2,Bu];case`Date`:return[3,Bu];case`RegExp`:return[4,Bu];case`Map`:return[5,Bu];case`Set`:return[6,Bu];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},Gu=([e,t])=>e===0&&(t===`function`||t===`symbol`),Ku=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=Wu(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&Uu(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of Hu(o))(e||!Gu(Wu(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?Bu:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(Gu(Wu(n))||Gu(Wu(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!Gu(Wu(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},qu=(e,{json:t,lossy:n}={})=>{let r=[];return Ku(!(t||n),!!t,new Map,r)(e),r},Ju=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?zu(qu(e,t)):structuredClone(e):(e,t)=>zu(qu(e,t));function Yu(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Xu(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Zu(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Yu,r=e.options.footnoteBackLabel||Xu,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=As(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Ju(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
131
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
132
+ `}]}}var Qu=(function(e){if(e==null)return rd;if(typeof e==`function`)return nd(e);if(typeof e==`object`)return Array.isArray(e)?$u(e):ed(e);if(typeof e==`string`)return td(e);throw Error(`Expected function, string, or object as test`)});function $u(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Qu(e[n]);return nd(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function ed(e){let t=e;return nd(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function td(e){return nd(t);function t(t){return t&&t.type===e}}function nd(e){return t;function t(t,n,r){return!!(id(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function rd(){return!0}function id(e){return typeof e==`object`&&!!e&&`type`in e}function ad(e){return e}var od=[];function sd(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=Qu(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+ad(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=od,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=cd(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function cd(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?od:[e]}function ld(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),sd(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var ud={}.hasOwnProperty,dd={};function fd(e,t){let n=t||dd,r=new Map,i=new Map,a={all:s,applyData:md,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Nu,...n.handlers},one:o,options:n,patch:pd,wrap:gd};return ld(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(ud.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=Ju(n);return r.children=a.all(e),r}return Ju(e)}return(a.options.unknownHandler||hd)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=_d(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=_d(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function pd(e,t){e.position&&(t.position=Co(e))}function md(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,Ju(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function hd(e,t){let n=t.data||{},r=`value`in t&&!(ud.call(n,`hProperties`)||ud.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gd(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
133
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
134
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
135
+ `}),n}function _d(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function vd(e,t){let n=fd(e,t),r=n.one(e,void 0),i=Zu(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
136
+ `},i)),a}function yd(e,t){return e&&`run`in e?async function(n,r){let i=vd(n,{file:r,...t});await e.run(i,r)}:function(n,r){return vd(n,{file:r,...e||t})}}function bd(e){if(e)throw e}var xd=n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function Sd(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Cd(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?wd(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function wd(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Td={basename:Ed,dirname:Dd,extname:Od,join:kd,sep:`/`};function Ed(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Md(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Dd(e){if(Md(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Od(e){Md(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function kd(...e){let t=-1,n;for(;++t<e.length;)Md(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Ad(n)}function Ad(e){Md(e);let t=e.codePointAt(0)===47,n=jd(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function jd(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Md(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Nd={cwd:Pd};function Pd(){return`/`}function Fd(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Id(e){if(typeof e==`string`)e=new URL(e);else if(!Fd(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Ld(e)}function Ld(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Rd=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],zd=class{constructor(e){let t;t=e?Fd(e)?{path:e}:typeof e==`string`||Ud(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Nd.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Rd.length;){let e=Rd[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Rd.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Td.basename(this.path):void 0}set basename(e){Vd(e,`basename`),Bd(e,`basename`),this.path=Td.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Td.dirname(this.path):void 0}set dirname(e){Hd(this.basename,`dirname`),this.path=Td.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Td.extname(this.path):void 0}set extname(e){if(Bd(e,`extname`),Hd(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Td.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Fd(e)&&(e=Id(e)),Vd(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Td.basename(this.path,this.extname):void 0}set stem(e){Vd(e,`stem`),Bd(e,`stem`),this.path=Td.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Oo(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Bd(e,t){if(e&&e.includes(Td.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Td.sep+"`")}function Vd(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Hd(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Ud(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Wd=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Gd=t(xd(),1),Kd={}.hasOwnProperty,qd=new class e extends Wd{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Cd()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Gd.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Xd(`data`,this.frozen),this.namespace[e]=t,this):Kd.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Xd(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=$d(e),n=this.parser||this.Parser;return Jd(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Jd(`process`,this.parser||this.Parser),Yd(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=$d(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);tf(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Jd(`processSync`,this.parser||this.Parser),Yd(`processSync`,this.compiler||this.Compiler),this.process(e,r),Qd(`processSync`,`process`,t),n;function r(e,r){t=!0,bd(e),n=r}}run(e,t,n){Zd(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=$d(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Qd(`runSync`,`run`,n),r;function i(e,t){bd(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=$d(t),r=this.compiler||this.Compiler;return Yd(`stringify`,r),Zd(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Xd(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Gd.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];Sd(o)&&Sd(r)&&(r=(0,Gd.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Jd(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Yd(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Xd(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Zd(e){if(!Sd(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Qd(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function $d(e){return ef(e)?e:new zd(e)}function ef(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function tf(e){return typeof e==`string`||nf(e)}function nf(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Q=d(),rf=[],af={allowDangerousHtml:!0},of=/^(https?|ircs?|mailto|xmpp)$/i,sf=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function cf(e){let t=lf(e),n=uf(e);return df(t.runSync(t.parse(n),n),e)}function lf(e){let t=e.rehypePlugins||rf,n=e.remarkPlugins||rf,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...af}:af;return qd().use(nu).use(n).use(yd,r).use(t)}function uf(e){let t=e.children||``,n=new zd;return typeof t==`string`?n.value=t:``+t,n}function df(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||ff;for(let e of sf)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return ld(e,l),Io(e,{Fragment:Q.Fragment,components:i,ignoreInvalidStyle:!0,jsx:Q.jsx,jsxs:Q.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in is)if(Object.hasOwn(is,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=is[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function ff(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||of.test(e.slice(0,t))?e:``}function pf(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function mf(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function hf(e,t,n){let r=Qu((n||{}).ignore||[]),i=gf(t),a=-1;for(;++a<i.length;)sd(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function gf(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([_f(e[0]),vf(e[1])])}return t}function _f(e){return typeof e==`string`?new RegExp(mf(e),`g`):e}function vf(e){return typeof e==`function`?e:function(){return e}}var yf=`phrasing`,bf=[`autolink`,`link`,`image`,`label`];function xf(){return{transforms:[kf],enter:{literalAutolink:Cf,literalAutolinkEmail:wf,literalAutolinkHttp:wf,literalAutolinkWww:wf},exit:{literalAutolink:Of,literalAutolinkEmail:Df,literalAutolinkHttp:Tf,literalAutolinkWww:Ef}}}function Sf(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:yf,notInConstruct:bf},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:yf,notInConstruct:bf},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:yf,notInConstruct:bf}]}}function Cf(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function wf(e){this.config.enter.autolinkProtocol.call(this,e)}function Tf(e){this.config.exit.autolinkProtocol.call(this,e)}function Ef(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Df(e){this.config.exit.autolinkEmail.call(this,e)}function Of(e){this.exit(e)}function kf(e){hf(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Af],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,jf]],{ignore:[`link`,`linkReference`]})}function Af(e,t,n,r,i){let a=``;if(!Pf(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Mf(n)))return!1;let o=Nf(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function jf(e,t,n,r){return!Pf(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Mf(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Nf(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=pf(e,`(`),a=pf(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Pf(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Os(n)||Ds(n))&&(!t||n!==47)}Wf.peek=Uf;function Ff(){this.buffer()}function If(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Lf(){this.buffer()}function Rf(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function zf(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ys(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Bf(e){this.exit(e)}function Vf(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ys(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Hf(e){this.exit(e)}function Uf(){return`[`}function Wf(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Gf(){return{enter:{gfmFootnoteCallString:Ff,gfmFootnoteCall:If,gfmFootnoteDefinitionLabelString:Lf,gfmFootnoteDefinition:Rf},exit:{gfmFootnoteCallString:zf,gfmFootnoteCall:Bf,gfmFootnoteDefinitionLabelString:Vf,gfmFootnoteDefinition:Hf}}}function Kf(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Wf},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
137
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Jf:qf))),s(),o}}function qf(e,t,n){return t===0?e:Jf(e,t,n)}function Jf(e,t,n){return(n?``:` `)+e}var Yf=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];ep.peek=tp;function Xf(){return{canContainEols:[`delete`],enter:{strikethrough:Qf},exit:{strikethrough:$f}}}function Zf(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Yf}],handlers:{delete:ep}}}function Qf(e){this.enter({type:`delete`,children:[]},e)}function $f(e){this.exit(e)}function ep(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function tp(){return`~`}function np(e){return e.length}function rp(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||np,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=ip(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=ap(r[d]);else{let e=ap(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&(n.alignDelimiters!==!1||i!==``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
138
+ `)}function ip(e){return e==null?``:String(e)}function ap(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function op(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),sp);return i(),o}function sp(e,t,n){return`>`+(n?``:` `)+e}function cp(e,t){return lp(e,t.inConstruct,!0)&&!lp(e,t.notInConstruct,!1)}function lp(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function up(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
139
+ `&&cp(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
140
+ `}function dp(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function fp(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function pp(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function mp(e,t,n,r){let i=pp(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(fp(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,hp);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(dp(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
141
+ `,encode:["`"],...s.current()})),t()}return u+=s.move(`
142
+ `),a&&(u+=s.move(a+`
143
+ `)),u+=s.move(c),l(),u}function hp(e,t,n){return(n?``:` `)+e}function gp(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function _p(e,t,n,r){let i=gp(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
144
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function vp(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function yp(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function bp(e,t,n){let r=Ls(e),i=Ls(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}xp.peek=Sp;function xp(e,t,n,r){let i=vp(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=bp(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=yp(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=bp(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+yp(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Sp(e,t,n){return n.options.emphasis||`*`}function Cp(e,t){let n=!1;return ld(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&os(e)&&(t.options.setext||n))}function wp(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Cp(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
145
+ `,after:`
146
+ `});return r(),t(),o+`
147
+ `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
148
+ `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
149
+ `,...a.current()});return/^[\t ]/.test(l)&&(l=yp(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Tp.peek=Ep;function Tp(e){return e.value||``}function Ep(){return`<`}Dp.peek=Op;function Dp(e,t,n,r){let i=gp(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Op(){return`!`}kp.peek=Ap;function kp(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Ap(){return`!`}jp.peek=Mp;function jp(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Mp(){return"`"}function Np(e,t){let n=os(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Pp.peek=Fp;function Pp(e,t,n,r){let i=gp(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(Np(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Fp(e,t,n){return Np(e,n)?`<`:`[`}Ip.peek=Lp;function Ip(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Lp(){return`[`}function Rp(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function zp(e){let t=Rp(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Bp(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Vp(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Hp(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Bp(n):Rp(n),s=e.ordered?o===`.`?`)`:`.`:zp(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),Vp(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Up(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Wp(e,t,n,r){let i=Up(n),a=n.bulletCurrent||Rp(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Gp(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var Kp=Qu([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function qp(e,t,n,r){return(e.children.some(function(e){return Kp(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Jp(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Yp.peek=Xp;function Yp(e,t,n,r){let i=Jp(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=bp(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=yp(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=bp(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+yp(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Xp(e,t,n){return n.options.strong||`*`}function Zp(e,t,n,r){return n.safe(e.value,r)}function Qp(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function $p(e,t,n){let r=(Vp(n)+(n.options.ruleSpaces?` `:``)).repeat(Qp(n));return n.options.ruleSpaces?r.slice(0,-1):r}var em={blockquote:op,break:up,code:mp,definition:_p,emphasis:xp,hardBreak:up,heading:wp,html:Tp,image:Dp,imageReference:kp,inlineCode:jp,link:Pp,linkReference:Ip,list:Hp,listItem:Wp,paragraph:Gp,root:qp,strong:Yp,text:Zp,thematicBreak:$p};function tm(){return{enter:{table:nm,tableData:om,tableHeader:om,tableRow:im},exit:{codeText:sm,table:rm,tableData:am,tableHeader:am,tableRow:am}}}function nm(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function rm(e){this.exit(e),this.data.inTable=void 0}function im(e){this.enter({type:`tableRow`,children:[]},e)}function am(e){this.exit(e)}function om(e){this.enter({type:`tableCell`,children:[]},e)}function sm(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,cm));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function cm(e,t){return t===`|`?t:e}function lm(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
150
+ `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
151
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return rp(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=em.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function um(){return{exit:{taskListCheckValueChecked:fm,taskListCheckValueUnchecked:fm,paragraph:pm}}}function dm(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:mm}}}function fm(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function pm(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function mm(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=em.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function hm(){return[xf(),Gf(),Xf(),tm(),um()]}function gm(e){return{extensions:[Sf(),Kf(e),Zf(),lm(e),dm()]}}var _m={tokenize:jm,partial:!0},vm={tokenize:Mm,partial:!0},ym={tokenize:Nm,partial:!0},bm={tokenize:Pm,partial:!0},xm={tokenize:Fm,partial:!0},Sm={name:`wwwAutolink`,tokenize:km,previous:Im},Cm={name:`protocolAutolink`,tokenize:Am,previous:Lm},wm={name:`emailAutolink`,tokenize:Om,previous:Rm},Tm={};function Em(){return{text:Tm}}for(var Dm=48;Dm<123;)Tm[Dm]=wm,Dm++,Dm===58?Dm=65:Dm===91&&(Dm=97);Tm[43]=wm,Tm[45]=wm,Tm[46]=wm,Tm[95]=wm,Tm[72]=[wm,Cm],Tm[104]=[wm,Cm],Tm[87]=[wm,Sm],Tm[119]=[wm,Sm];function Om(e,t,n){let r=this,i,a;return o;function o(t){return!zm(t)||!Rm.call(r,r.previous)||Bm(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return zm(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(xm,u,l)(t):t===45||t===95||xs(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&bs(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function km(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Im.call(r,r.previous)||Bm(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(_m,e.attempt(vm,e.attempt(ym,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Am(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Lm.call(r,r.previous)&&!Bm(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(bs(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Cs(t)||Y(t)||Os(t)||Ds(t)?n(t):e.attempt(vm,e.attempt(ym,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function jm(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Mm(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(bm,c,s)(t):t===null||Y(t)||Os(t)||t!==45&&Ds(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Nm(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(bm,t,a)(o):o===null||Y(o)||Os(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Pm(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Y(o)||Os(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Y(e)||Os(e)?t(e):r(e)}function a(e){return bs(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):bs(t)?(e.consume(t),o):n(t)}}function Fm(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return xs(e)?n(e):t(e)}}function Im(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Y(e)}function Lm(e){return!bs(e)}function Rm(e){return!(e===47||zm(e))}function zm(e){return e===43||e===45||e===46||e===95||xs(e)}function Bm(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Vm={tokenize:Ym,partial:!0};function Hm(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Km,continuation:{tokenize:qm},exit:Jm}},text:{91:{name:`gfmFootnoteCall`,tokenize:Gm},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Um,resolveTo:Wm}}}}function Um(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=ys(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Wm(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Gm(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Y(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(ys(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Y(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Km(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Y(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=ys(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Y(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Z(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function qm(e,t,n){return e.check(Gs,t,e.attempt(Vm,t,n))}function Jm(e){e.exit(`gfmFootnoteDefinition`)}function Ym(e,t,n){let r=this;return Z(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Xm(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&fs(o,o.length,0,Rs(s,e.slice(r+1,n),t)),fs(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),fs(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Ls(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Ls(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Zm=class{constructor(){this.map=[]}add(e,t,n){Qm(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Qm(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function $m(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function eh(){return{flow:{null:{name:`table`,tokenize:th,resolveAll:nh}}}}function th(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):J(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):X(t)?Z(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Y(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,X(t)?Z(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return X(t)?Z(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||J(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return X(t)?Z(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||J(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||J(n)?(e.exit(`tableRow`),t(n)):X(n)?Z(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Y(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function nh(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Zm;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(ih(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=rh(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=rh(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=rh(f,t,o,i,n,d)):(o[0]=o[1],d=rh(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&ih(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=$m(t.events,n))}return e}function rh(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},ah(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=ah(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=ah(t.events,n[2]),a=ah(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},ah(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function ih(e,t,n,r,i){let a=[],o=ah(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function ah(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var oh={name:`tasklistCheck`,tokenize:ch};function sh(){return{text:{91:oh}}}function ch(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Y(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return J(r)?t(r):X(r)?e.check({tokenize:lh},t,n)(r):n(r)}}function lh(e,t,n){return Z(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function uh(e){return hs([Em(),Hm(),Xm(e),eh(),sh()])}var dh={};function fh(e){let t=this,n=e||dh,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(uh(n)),a.push(hm()),o.push(gm(n))}var ph=[fh],mh={a:({node:e,...t})=>(0,Q.jsx)(`a`,{...t,target:`_blank`,rel:`noreferrer`})},hh=({children:e,className:t})=>(0,Q.jsx)(`div`,{className:l(`typeset typeset-chat`,t),children:(0,Q.jsx)(cf,{remarkPlugins:ph,components:mh,children:e})}),gh=de(wa),_h=e=>pe(gh(e),{onNone:()=>null,onSome:([,e,t])=>({href:`https://github.com/${e}/issues/${t}`,number:t})}),vh=({href:e,label:t})=>(0,Q.jsxs)(b,{variant:`link`,size:`sm`,className:`h-auto p-0 font-mono`,nativeButton:!1,render:(0,Q.jsx)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,draggable:!1}),children:[t,(0,Q.jsx)(Wr,{"data-icon":`inline-end`,"aria-hidden":`true`})]}),yh=({run:e})=>{let t=_h(e.itemKey);return t===null&&e.pullRequestUrl===null?null:(0,Q.jsxs)(`span`,{className:`flex items-center gap-2`,children:[t!==null&&(0,Q.jsx)(vh,{href:t.href,label:`Item #${t.number}`}),e.pullRequestUrl!==null&&(0,Q.jsx)(vh,{href:e.pullRequestUrl,label:`PR`})]})},bh=U.createContext(void 0);function xh(){let e=U.useContext(bh);if(e===void 0)throw Error(u(64));return e}var Sh={tabActivationDirection:e=>({"data-activation-direction":e})},Ch=U.forwardRef(function(e,t){let{className:n,defaultValue:i=0,onValueChange:a,orientation:o=`horizontal`,render:s,value:c,style:l,...u}=e,d=e.defaultValue!==void 0,f=U.useRef([]),[p,m]=U.useState(()=>new Map),[h,g]=oi({controlled:c,default:i,name:`Tabs`,state:`value`}),_=c!==void 0,[b,x]=U.useState(()=>new Map),S=U.useRef(void 0),C=U.useCallback(e=>wh(b,e),[b]),[w,T]=U.useState(()=>({previousValue:h,tabActivationDirection:`none`})),{previousValue:E,tabActivationDirection:D}=w,O=D,k=!1;E!==h&&(O=Th(E,h,o,b),k=E!=null&&h!=null&&C(h)==null);let A=k?E:h,j=E!==A||D!==O;v(()=>{j&&T({previousValue:A,tabActivationDirection:O})},[A,j,O]);let M=y((e,t)=>{t.activationDirection=Th(h,e,o,b),a?.(e,t),!t.isCanceled&&g(e)}),N=y((e,t)=>{a?.(e,ir(t,void 0,void 0,{activationDirection:`none`}))}),P=y((e,t)=>(m(n=>{let r=new Map(n);return r.set(e,t),r}),()=>{m(n=>{if(n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})})),F=U.useCallback(e=>p.get(e),[p]),I=U.useCallback(e=>{for(let t of b.values())if(e===t.value)return t.id},[b]),ee=U.useMemo(()=>({getTabElementBySelectedValue:C,getTabIdByPanelValue:I,getTabPanelIdByValue:F,onValueChange:M,orientation:o,registerMountedTabPanel:P,setTabMap:x,tabActivationDirection:O,value:h}),[C,I,F,M,o,P,x,O,h]),L=U.useMemo(()=>{for(let e of b.values())if(e.value===h)return e},[b,h]),te=U.useMemo(()=>{for(let e of b.values())if(!e.disabled)return e.value},[b]),R=U.useRef(!d),ne=U.useRef(i),z=U.useRef(d),re=U.useRef(!1);v(()=>{if(_)return;function e(e,t){g(e),T({previousValue:e,tabActivationDirection:`none`}),N(e,t),R.current=!1}if(b.size===0){re.current&&h!==null&&!S.current?.isConnected&&e(null,zn);return}re.current=!0,S.current=b.keys().next().value;let t=L?.disabled,n=L==null&&h!==null;if(!t&&h===ne.current&&(z.current=!1),z.current&&t&&h===ne.current)return;let r=R.current;if(t||n){let n=te??null;if(h===n){R.current=!1;return}let i=zn;r?i=Qn:t&&(i=cr),e(n,i);return}r&&L!=null&&(N(h,Qn),R.current=!1)},[te,_,N,L,g,b,h]);let ie=r(`div`,e,{state:{orientation:o,tabActivationDirection:O},ref:t,props:u,stateAttributesMapping:Sh});return(0,Q.jsx)(bh.Provider,{value:ee,children:(0,Q.jsx)(En,{elementsRef:f,children:ie})})});function wh(e,t){for(let[n,r]of e.entries())if(t===r.value)return n;return null}function Th(e,t,n,r){if(e==null||t==null)return`none`;let[i,a,o]=n===`horizontal`?[`left`,`left`,`right`]:[`top`,`up`,`down`],s=wh(r,e),c=wh(r,t);if(s==null||c==null)return s!==c&&(typeof e==`number`||typeof e==`string`)&&typeof e==typeof t?t>e?o:a:`none`;let l=s.getBoundingClientRect()[i],u=c.getBoundingClientRect()[i];return u<l?a:u>l?o:`none`}var Eh=`data-composite-item-active`,Dh=U.createContext(void 0);function Oh(){let e=U.useContext(Dh);if(e===void 0)throw Error(u(65));return e}var kh=U.forwardRef(function(e,t){let{className:n,disabled:i=!1,render:a,value:o,id:s,nativeButton:c=!0,style:l,...u}=e,{value:d,getTabPanelIdByValue:f,onValueChange:m,orientation:h,tabActivationDirection:g}=xh(),{activateOnFocus:b,registerTabResizeObserverElement:x,tabsListElement:S}=Oh(),{highlightedIndex:C,onHighlightedIndexChange:w}=p(),T=Gn(s),E=U.useMemo(()=>({disabled:i,id:T,value:o}),[i,T,o]),{compositeProps:D,compositeRef:O,index:k}=On({metadata:E}),A=o===d,j=U.useRef(!1),M=U.useRef(null),N=y(e=>{M.current?.(),M.current=e?x(e):null});v(()=>{if(j.current){j.current=!1;return}if(!(A&&k>-1&&C!==k))return;let e=S;if(e!=null){let t=or(Zn(e));if(t&&er(e,t))return}i||w(k)},[A,k,C,w,i,S]);let{getButtonProps:P,buttonRef:F}=_({disabled:i,native:c,focusableWhenDisabled:!0}),I=f(o),ee=U.useRef(!1),L=U.useRef(!1);function te(e){m(o,ir(lr,e.nativeEvent,void 0,{activationDirection:`none`}))}function R(e){A||i||te(e)}function ne(e){A||i||b&&(!ee.current||L.current)&&te(e)}function z(e){if(A||i)return;ee.current=!0,L.current=e.button===0;let t=Zn(e.currentTarget);function n(){ee.current=!1,L.current=!1,t.removeEventListener(`pointerup`,n),t.removeEventListener(`pointercancel`,n)}t.addEventListener(`pointerup`,n),t.addEventListener(`pointercancel`,n)}return r(`button`,e,{state:{disabled:i,active:A,orientation:h,tabActivationDirection:g},ref:[t,F,O,N],props:[D,{role:`tab`,"aria-controls":I,"aria-selected":A,id:T,onClick:R,onFocus:ne,onPointerDown:z,[Eh]:A?``:void 0,onKeyDownCapture(){j.current=!0}},u,P],stateAttributesMapping:Sh})}),Ah={...Sh,...Mn},jh=U.forwardRef(function(e,t){let{className:n,value:i,render:a,keepMounted:o=!1,style:s,...c}=e,{value:l,getTabIdByPanelValue:u,orientation:d,tabActivationDirection:f,registerMountedTabPanel:p}=xh(),m=Gn(),{ref:h,index:g}=Dn(),_=i===l,{mounted:y,transitionStatus:b,setMounted:x}=ur(_),S=!y,C=u(i),w={hidden:S,orientation:d,tabActivationDirection:f,transitionStatus:b},T=U.useRef(null),E=r(`div`,e,{state:w,ref:[t,h,T],props:[{"aria-labelledby":C,hidden:S,id:m,role:`tabpanel`,tabIndex:_?0:-1,inert:Vn(!_),"data-index":g},c],stateAttributesMapping:Ah});return jn({open:_,ref:T,onComplete(){_||x(!1)}}),v(()=>{if(!(m==null||S&&!o))return p(i,m)},[S,o,i,m,p]),o||y?E:null}),Mh=[];function Nh(e){let{loopFocus:t=!0,orientation:n=`both`,grid:r,onLoop:i,direction:a,highlightedIndex:s,onHighlightedIndexChange:c,rootRef:l,enableHomeAndEndKeys:u=!1,stopEventPropagation:d,disabledIndices:f,modifierKeys:p=Mh}=e,[m,h]=U.useState(0),g=r!=null,_=U.useRef(null),b=o(_,l),x=U.useRef([]),S=U.useRef(!1),C=s??m,w=y((e,t=!1)=>{if((c??h)(e),t){let t=x.current[e];Rn(_.current,t,a,n)}}),T=y(e=>{if(e.size===0||S.current)return;S.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,i=r?e.get(r)?.index??-1:-1;if(i!==-1)w(i);else if(Ln(t,C,f)){let e=Fn(t,{disabledIndices:f});Nn(t,e)||w(e)}Rn(_.current,r,a,n)});v(()=>{if(f==null||s!=null||!S.current)return;let e=x.current;if(Ln(e,C,f)){let t=Fn(e,{disabledIndices:f});Nn(e,t)||w(t)}},[f,s,C,x,w]);let E=y((e,t,n)=>i?i(e,t,n,x):n),D=y(e=>{let o=e.key===`Home`||e.key===`End`;if(!nr.has(e.key)||!u&&o||Ph(e,p)||!_.current)return;let s=a===`rtl`,c=s?sr:Hn,l=s?Hn:sr,m=n===`vertical`?Xn:c,h=n===`vertical`?Wn:l,v=rr(e.nativeEvent);if(v!=null&&Kn(v)&&!Oa(v)){let t=v.selectionStart,n=v.selectionEnd,r=v.value;if(t==null||e.shiftKey||t!==n||e.key!==h&&t<r.length||e.key!==m&&t>0)return}let y=C,b=kn(x,f),S=dr(x,f);r!=null&&(y=r({disabledIndices:f,elementsRef:x,event:e,highlightedIndex:C,loopFocus:t,maxIndex:S,minIndex:b,onLoop:E,orientation:n,rtl:s}));let T=n!==`vertical`&&e.key===c||n!==`horizontal`&&e.key===`ArrowDown`,D=n!==`vertical`&&e.key===l||n!==`horizontal`&&e.key===`ArrowUp`;u&&(e.key===`Home`?y=b:e.key===`End`&&(y=S)),y===C&&(T||D)&&(t&&y===S&&T?(y=b,i&&(y=i(e,C,y,x))):t&&y===b&&D?(y=S,i&&(y=i(e,C,y,x))):y=Fn(x.current,{startingIndex:y,decrement:D,disabledIndices:f})),y!==C&&!Nn(x.current,y)&&(d&&e.stopPropagation(),(g||o||T||D)&&e.preventDefault(),w(y,!0),queueMicrotask(()=>{x.current[y]?.focus()}))});return{props:{ref:b,onFocus(e){let t=_.current,n=rr(e.nativeEvent);!t||n==null||!Kn(n)||n.setSelectionRange(0,n.value.length)},onKeyDown:D},highlightedIndex:C,onHighlightedIndexChange:w,elementsRef:x,onMapChange:T,relayKeyboardEvent:D}}function Ph(e,t){for(let n of qn)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function Fh(e){let{render:t,className:n,style:i,refs:a=s,props:o=s,state:l=c,stateAttributesMapping:u,highlightedIndex:d,onHighlightedIndexChange:f,orientation:p,grid:h,loopFocus:g,onLoop:_,enableHomeAndEndKeys:v,onMapChange:y,stopEventPropagation:b=!0,rootRef:x,disabledIndices:S,modifierKeys:C,highlightItemOnHover:w=!1,tag:T=`div`,...E}=e,{props:D,highlightedIndex:O,onHighlightedIndexChange:k,elementsRef:A,onMapChange:j,relayKeyboardEvent:M}=Nh({grid:h,loopFocus:g,onLoop:_,orientation:p,highlightedIndex:d,onHighlightedIndexChange:f,rootRef:x,stopEventPropagation:b,enableHomeAndEndKeys:v,direction:Bn(),disabledIndices:S,modifierKeys:C}),N=r(T,e,{state:l,ref:a,props:[D,...o,E],stateAttributesMapping:u}),P=U.useMemo(()=>({highlightedIndex:O,onHighlightedIndexChange:k,highlightItemOnHover:w,relayKeyboardEvent:M}),[O,k,w,M]);return(0,Q.jsx)(m.Provider,{value:P,children:(0,Q.jsx)(En,{elementsRef:A,onMapChange:e=>{y?.(e),j(e)},children:N})})}var Ih=U.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:r,loopFocus:i=!0,render:a,style:o,...c}=e,{orientation:l,setTabMap:u,tabActivationDirection:d}=xh(),[f,p]=U.useState(0),[m,h]=U.useState(null),g=U.useRef(new Set),_=U.useRef(new Set),b=U.useRef(null);v(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{g.current.forEach(e=>{e()})});return b.current=e,m&&e.observe(m),_.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),b.current=null}},[m]);let x=y(e=>(g.current.add(e),()=>{g.current.delete(e)})),S=y(e=>(_.current.add(e),b.current?.observe(e),()=>{_.current.delete(e),b.current?.unobserve(e)})),C={orientation:l,tabActivationDirection:d},w={"aria-orientation":l===`vertical`?`vertical`:void 0,role:`tablist`},T=U.useMemo(()=>({activateOnFocus:n,registerIndicatorUpdateListener:x,registerTabResizeObserverElement:S,tabsListElement:m}),[n,x,S,m]);return(0,Q.jsx)(Dh.Provider,{value:T,children:(0,Q.jsx)(Fh,{render:a,className:r,style:o,state:C,refs:[t,h],props:[w,c],stateAttributesMapping:Sh,highlightedIndex:f,enableHomeAndEndKeys:!0,loopFocus:i,orientation:l,onHighlightedIndexChange:p,onMapChange:u,disabledIndices:s})})});function Lh({className:e,orientation:t=`horizontal`,...n}){return(0,Q.jsx)(Ch,{"data-slot":`tabs`,"data-orientation":t,className:l(`group/tabs flex gap-2 data-horizontal:flex-col`,e),...n})}var Rh=g(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function zh({className:e,variant:t=`default`,...n}){return(0,Q.jsx)(Ih,{"data-slot":`tabs-list`,"data-variant":t,className:l(Rh({variant:t}),e),...n})}function Bh({className:e,...t}){return(0,Q.jsx)(kh,{"data-slot":`tabs-trigger`,className:l(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-xs font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-vertical/tabs:py-[calc(--spacing(1.25))] hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,e),...t})}function Vh({className:e,...t}){return(0,Q.jsx)(jh,{"data-slot":`tabs-content`,className:l(`flex-1 text-xs/relaxed outline-none`,e),...t})}var Hh=(e,t)=>{let n=new Map(e.map(e=>[e.sequence,e]));for(let e of t)n.has(e.sequence)||n.set(e.sequence,e);return[...n.values()].sort((e,t)=>e.sequence-t.sequence)},Uh=(e,t,n)=>[...e.filter(({attemptId:e})=>e!==t),...n].sort((e,t)=>e.before-t.before),Wh=(e,t,n)=>new Ae({...e,transcript:Hh(e.transcript,t.transcript),earlierTranscript:Uh(e.earlierTranscript,n.attemptId,t.earlierTranscript)}),Gh=e=>{let t=new Map;for(let n of e){if(n.payload._tag!==`SessionEvent`)continue;let e=n.payload.event;if(e._tag!==`PoolRateLimitsUpdated`)continue;let r=e=>pe(e,{onNone:()=>null,onSome:({usedPercent:e})=>e});t.set(e.pool,{pool:e.pool,primaryUsedPercent:r(e.rateLimits.primary),secondaryUsedPercent:r(e.rateLimits.secondary)})}return[...t.values()]},Kh=g(`flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1`,{variants:{orientation:{horizontal:`*:data-slot:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-md! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0`,vertical:`flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-md! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0`}},defaultVariants:{orientation:`horizontal`}});function qh({className:e,orientation:t,...n}){return(0,Q.jsx)(`div`,{role:`group`,"data-slot":`button-group`,"data-orientation":t,className:l(Kh({orientation:t}),e),...n})}function Jh({defaultTagName:e,props:t,render:n,state:r={},stateAttributesMapping:i}){let a=Yh(Xh(r,i),t);if(!n)return U.createElement(e,a);if(typeof n==`function`)return n(a,r);if(!U.isValidElement(n))return null;let o=n.props,s={...Yh(a,o),ref:$h(a.ref,o.ref)};return U.cloneElement(n,s)}function Yh(...e){let t={};for(let n of e){if(!n)continue;let e=n;for(let n of Object.keys(e)){let r=e[n];if(r===void 0)continue;let i=t[n];t[n]=n===`className`?[i,r].filter(Boolean).join(` `):n===`style`?{...i,...r}:n===`ref`?$h(i,r):Qh(n)&&typeof i==`function`&&typeof r==`function`?Zh(r,i):r}}return t}function Xh(e,t){let n={};for(let r of Object.keys(e)){let i=e[r],a=t?.[r]?.(i);if(a){Object.assign(n,a);continue}if(r===`slot`){n[`data-slot`]=i;continue}let o=`data-${String(r).replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}`;typeof i==`boolean`?n[o]=i?``:void 0:i!=null&&(n[o]=String(i))}return n}function Zh(e,t){return function(n){e(n),n.defaultPrevented||t(n)}}function Qh(e){return/^on[A-Z]/.test(e)}function $h(...e){let t=e.filter(Boolean);if(t.length!==0)return e=>{for(let n of t)typeof n==`function`?n(e):n&&(n.current=e)}}var eg=8,tg=64,ng=0,rg=.5,ig=180,ag=new Set([`ArrowDown`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`,` `]),og={start:!1,end:!1},sg={currentAnchorId:null,visibleMessageIds:[]};function cg({content:e,scrollEdgeThreshold:t,spacer:n,viewport:r}){if(!r||!e)return og;let i=bg({content:e,spacer:n,viewport:r});return{start:r.scrollTop>t,end:i-r.scrollTop-r.clientHeight>t}}function lg({content:e,scrollMargin:t,scrollPreviousItemPeek:n,spacer:r,viewport:i,visibleMessageIds:a}){if(!e||!i)return sg;let o=i.getBoundingClientRect(),s=o.top+t+n,c=typeof IntersectionObserver>`u`,l=[],u=null;for(let t of ug(e,r)){let e=t.dataset.messageId;if(!e)continue;let n=t.dataset.scrollAnchor===`true`,r=n||c?t.getBoundingClientRect():null;(c&&r?r.bottom>s&&r.top<o.bottom:a.has(e))&&l.push(e),n&&r&&r.top<=s+rg&&(u=e)}return l.length===0&&u===null?sg:{currentAnchorId:u,visibleMessageIds:l}}function ug(e,t){return Array.from(e.children).filter(e=>e instanceof HTMLElement&&e!==t)}function dg(e,t){for(let n=t;n<e.length;n++){let t=e[n];if(t?.dataset.scrollAnchor===`true`)return t}return null}function fg(e,t){for(let n of e)if(n.dataset.scrollAnchor===`true`&&!t.has(n))return n;return null}function pg(e,t){let n=0;for(let r=t;r<e.length;r++)if(e[r]?.dataset.scrollAnchor===`true`&&(n+=1,n>1))return!0;return!1}function mg(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n?.dataset.scrollAnchor===`true`)return n}return null}function hg({content:e,spacer:t,viewport:n}){let r=n.getBoundingClientRect();for(let n of ug(e,t)){if(!n.dataset.messageId)continue;let e=n.getBoundingClientRect();if(e.bottom>r.top&&e.top<r.bottom)return n}return null}function gg({align:e,element:t,scrollMargin:n,spacer:r,viewport:i}){let a=_g(t,i),o=t.getBoundingClientRect().height,s=Cg(r);if(e===`center`){let e=Math.max(0,i.clientHeight-s.start-s.end);return a-s.start-(e-o)/2-n}if(e===`end`)return a-i.clientHeight+o+s.end+n;if(e===`nearest`){let e=a+o,t=i.scrollTop+s.start,r=i.scrollTop+i.clientHeight-s.end;return a>=t&&e<=r?i.scrollTop:a<t?a-s.start-n:e-i.clientHeight+s.end+n}return a-s.start-n}function _g(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top-r.top+t.scrollTop}function vg(e,t){return e.getBoundingClientRect().top-t.getBoundingClientRect().top}function yg({content:e,scrollTop:t,spacer:n,viewport:r}){let i=bg({content:e,spacer:n,viewport:r});return t+r.clientHeight-i}function bg({content:e,spacer:t,viewport:n}){let r=ug(e,t),i=Sg(e),a=n.getBoundingClientRect(),o=n.scrollTop,s=i.start+i.end;for(let e of r){let t=e.getBoundingClientRect();s=Math.max(s,t.bottom-a.top+o+i.end)}return s}function xg(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function Sg(e){let t=window.getComputedStyle(e);return{end:Tg(t.paddingBlockEnd||t.paddingBottom),start:Tg(t.paddingBlockStart||t.paddingTop)}}function Cg(e){let t=e?.parentElement;return t?Sg(t):{end:0,start:0}}function wg(e){if(!e)return 0;let t=window.getComputedStyle(e);return Tg(t.rowGap===`normal`?t.gap:t.rowGap)}function Tg(e){if(!e)return 0;let t=Number.parseFloat(e);return Number.isFinite(t)?t:0}function Eg(e,t){let n=e,r=new Set;return{getSnapshot:()=>n,hasListeners:()=>r.size>0,setSnapshot:e=>{t(n,e)||(n=e,r.forEach(e=>e()))},subscribe:(e,t,n)=>{let i=r.size===0;return r.add(e),i&&t?.(),()=>{r.delete(e),r.size===0&&n?.()}}}}function Dg(e,t){return Eg(e,t)}function Og(){return Eg(sg,Ag)}function kg(e,t){return e.start===t.start&&e.end===t.end}function Ag(e,t){return e.currentAnchorId!==t.currentAnchorId||e.visibleMessageIds.length!==t.visibleMessageIds.length?!1:e.visibleMessageIds.every((e,n)=>e===t.visibleMessageIds[n])}function jg({autoScroll:e,defaultScrollPosition:t,scrollEdgeThreshold:n,scrollMargin:r,scrollPreviousItemPeek:i}){let a=U.useRef(e),o=U.useRef(!1),s=U.useRef(null),c=U.useRef(!1),l=U.useRef(n),u=U.useRef(0),d=U.useRef(null),f=U.useRef(0),p=U.useRef(e?`following-bottom`:`free-scrolling`),m=U.useRef(new Map),h=U.useRef(null),g=U.useRef(null),_=U.useRef(null),v=U.useRef(i),y=U.useRef(!0),b=U.useRef(null),x=U.useRef(r),S=U.useRef(null),C=U.useRef(0),w=U.useRef(0),T=U.useRef(null),E=U.useRef(null),D=U.useRef(null),O=U.useRef(null),k=U.useRef(null),A=U.useRef(null),j=U.useRef(null),M=U.useRef(null),N=U.useRef(null),P=U.useRef(new Set),F=U.useRef(new WeakSet);return D.current===null&&(D.current=Dg(t===`end`||t===`last-anchor`,(e,t)=>e===t)),O.current===null&&(O.current=Dg(og,kg)),N.current===null&&(N.current=Og()),a.current=e,l.current=n,x.current=r,v.current=i,{autoScrollRef:a,autoscrollingRef:o,autoscrollingTimeoutRef:k,streamingTurnRef:_,contentRef:s,defaultScrollPositionAppliedRef:c,firstItemRef:d,itemCountRef:u,lastScrollTopRef:f,messageElementsRef:m,modeRef:p,pendingScrollFrameRef:S,pendingScrollToMessageRef:h,prependRestoreRef:g,preserveScrollOnPrependRef:y,pendingDefaultScrollStore:D.current,rootRef:b,scrollEdgeThresholdRef:l,scrollMarginRef:x,scrollPreviousItemPeekRef:v,spacerGapRef:C,spacerHeightRef:w,spacerRef:T,stateFrameRef:E,stateStore:O.current,viewportRef:A,visibilityFrameRef:j,visibilityObserverRef:M,visibilityStore:N.current,visibleMessageIdsRef:P,handledScrollAnchorsRef:F}}function Mg(e){e.pendingDefaultScrollStore.setSnapshot(!1)}function Ng(e){e.defaultScrollPositionAppliedRef.current=!0,Mg(e)}function Pg({refs:e,commitScrollState:t,scheduleStateCommit:n,scheduleVisibilitySync:r}){let{streamingTurnRef:i,autoScrollRef:a,autoscrollingRef:o,autoscrollingTimeoutRef:s,contentRef:c,itemCountRef:l,messageElementsRef:u,modeRef:d,pendingScrollToMessageRef:f,prependRestoreRef:p,scrollMarginRef:m,scrollPreviousItemPeekRef:h,spacerGapRef:g,spacerHeightRef:_,spacerRef:v,viewportRef:y}=e,b=U.useCallback(e=>{s.current!==null&&(window.clearTimeout(s.current),s.current=null),o.current!==e&&(o.current=e,t()),e&&(s.current=window.setTimeout(()=>{s.current=null,o.current=!1,t()},ig))},[t]),x=U.useCallback(e=>{let t=v.current;if(!t)return;let n=Math.max(0,Math.ceil(e));_.current!==n&&(_.current=n,t.hidden=n===0,t.style.height=`${n}px`,t.style.marginTop=n>0?`${-g.current}px`:``)},[]),S=U.useCallback((e,{behavior:r=`auto`,autoscrolling:i=!1}={})=>{let a=y.current;if(!a)return;let o=Math.max(0,e);if(Math.abs(a.scrollTop-o)<=rg){a.scrollTop=o,t();return}i&&b(!0),a.scrollTo({top:o,behavior:r}),n()},[t,n,b]),C=U.useCallback(({behavior:e=`auto`}={})=>y.current?(x(0),i.current=null,d.current=`free-scrolling`,S(0,{behavior:e}),r(),!0):!1,[r,S,x]),w=U.useCallback(({behavior:e=`auto`}={})=>{let t=y.current;return t?(x(0),i.current=null,d.current=a.current?`following-bottom`:`free-scrolling`,S(xg(t),{autoscrolling:!0,behavior:e}),r(),!0):!1},[r,S,x]),T=U.useCallback((e,{align:t=`start`,behavior:n=`auto`,scrollMargin:a=m.current}={},{keepPreviousPeek:o=!1}={})=>{let s=c.current,l=y.current;if(!s||!l||!s.contains(e))return!1;let u=gg({align:t,element:e,scrollMargin:o?a+h.current:a,spacer:v.current,viewport:l}),f=yg({content:s,scrollTop:u,spacer:v.current,viewport:l});return x(f),p.current={element:e,viewportTop:vg(e,l)},d.current=o?`anchored-to-message`:`settling-jump`,i.current=o?e:null,S(u,{behavior:n}),r(),!0},[r,S,x]),E=U.useCallback(()=>{let e=i.current;return!e||!e.isConnected||d.current!==`anchored-to-message`?!1:T(e,{align:`start`},{keepPreviousPeek:!0})},[T]),D=U.useCallback((t,n)=>{let r=u.current.get(t);return r?(Ng(e),T(r,n)?(f.current=null,!0):(f.current={messageId:t,options:n},!0)):l.current===0&&(f.current={messageId:t,options:n},Ng(e),!0)},[T]);return{flushPendingScrollToMessage:U.useCallback(()=>{let t=f.current;if(!t)return!1;let n=u.current.get(t.messageId);return!n||!T(n,t.options)?!1:(f.current=null,Ng(e),!0)},[T]),reanchorToAnchoredMessage:E,scrollToElement:T,scrollToEnd:w,scrollToMessage:D,scrollToStart:C}}function Fg(e,t){return U.useCallback(n=>{e.current=n,n&&t()},[e,t])}function Ig({autoScroll:e=!1,defaultScrollPosition:t=`end`,scrollEdgeThreshold:n=eg,scrollPreviousItemPeek:r=tg,scrollMargin:i=ng}){let a=jg({autoScroll:e,defaultScrollPosition:t,scrollEdgeThreshold:n,scrollMargin:i,scrollPreviousItemPeek:r}),{streamingTurnRef:o,autoScrollRef:s,autoscrollingRef:c,autoscrollingTimeoutRef:l,contentRef:u,defaultScrollPositionAppliedRef:d,firstItemRef:f,itemCountRef:p,lastScrollTopRef:m,messageElementsRef:h,modeRef:g,pendingScrollFrameRef:_,pendingScrollToMessageRef:v,prependRestoreRef:y,preserveScrollOnPrependRef:b,pendingDefaultScrollStore:x,rootRef:S,scrollEdgeThresholdRef:C,scrollMarginRef:w,scrollPreviousItemPeekRef:T,spacerGapRef:E,spacerHeightRef:D,spacerRef:O,stateFrameRef:k,stateStore:A,viewportRef:j,visibilityFrameRef:M,visibilityObserverRef:N,visibilityStore:P,visibleMessageIdsRef:F,handledScrollAnchorsRef:I}=a,ee=U.useRef(t);ee.current!==t&&(ee.current=t,d.current=!1);let L=U.useCallback(e=>{let t=S.current,n=j.current,r=[e.start&&`start`,e.end&&`end`].filter(Boolean).join(` `),i=c.current;for(let e of[t,n])e&&(r?e.setAttribute(`data-scrollable`,r):e.removeAttribute(`data-scrollable`),e.toggleAttribute(`data-autoscrolling`,i))},[]),te=U.useCallback(e=>{let t=j.current?.scrollTop??0,n=t<m.current-rg;m.current=t,s.current&&!e.end&&g.current!==`settling-jump`&&g.current!==`anchored-to-message`?g.current=`following-bottom`:g.current===`following-bottom`&&e.end&&n&&!c.current&&(g.current=`free-scrolling`)},[]),R=U.useCallback(()=>{let e=cg({content:u.current,scrollEdgeThreshold:C.current,spacer:O.current,viewport:j.current});te(e);let t=g.current===`following-bottom`?{...e,end:!1}:e;L(t),A.setSnapshot(t)},[te,A,L]),ne=U.useCallback(()=>{k.current===null&&(k.current=window.requestAnimationFrame(()=>{k.current=null,R()}))},[R]),z=U.useCallback(()=>{P.hasListeners()&&M.current===null&&(M.current=window.requestAnimationFrame(()=>{M.current=null,P.hasListeners()&&P.setSnapshot(lg({content:u.current,scrollMargin:w.current,scrollPreviousItemPeek:T.current,spacer:O.current,viewport:j.current,visibleMessageIds:F.current}))}))},[P]),{flushPendingScrollToMessage:re,reanchorToAnchoredMessage:ie,scrollToElement:ae,scrollToEnd:B,scrollToMessage:oe,scrollToStart:se}=Pg({refs:a,commitScrollState:R,scheduleStateCommit:ne,scheduleVisibilitySync:z}),ce=U.useCallback(()=>{let e=y.current,t=j.current;if(!e||!t||!e.element.isConnected)return!1;let n=vg(e.element,t)-e.viewportTop;return Math.abs(n)<=rg?!1:(t.scrollTop+=n,e.viewportTop=vg(e.element,t),ne(),z(),!0)},[ne,z]),le=U.useCallback(()=>{let e=u.current,t=j.current;if(!e||!t){y.current=null;return}let n=hg({content:e,spacer:O.current,viewport:t});y.current=n?{element:n,viewportTop:vg(n,t)}:null},[]),ue=U.useCallback(()=>{_.current===null&&(_.current=window.requestAnimationFrame(()=>{_.current=null,re()&&le()}))},[le,re]),de=U.useCallback(()=>{if(!t||d.current||p.current===0)return!1;let e=!1;if(t===`last-anchor`){let t=u.current,n=j.current,r=t&&n?mg(ug(t,O.current)):null;if(!t||!n||!r)e=B({behavior:`auto`});else{let i=_g(r,n);e=bg({content:t,spacer:O.current,viewport:n})-i<=n.clientHeight?B({behavior:`auto`}):ae(r,{align:`start`},{keepPreviousPeek:!0})}}else e=t===`end`?B({behavior:`auto`}):se({behavior:`auto`});return e?(Ng(a),!0):!1},[t,ae,B,se]),fe=U.useCallback(()=>{let e=u.current;if(!e)return;let t=ug(e,O.current),n=p.current,r=f.current;p.current=t.length,f.current=t[0]??null,(()=>{if(re())return;if(n===0){if(de()||t.length>0&&s.current&&B({behavior:`auto`}))return;R(),z();return}let e=r?t.indexOf(r):-1;if(b.current&&e>0){ce();return}if(t.length>n){let e=dg(t,n);if(e){if(s.current&&g.current===`following-bottom`&&pg(t,n)){B({behavior:`auto`});return}ae(e,{align:`start`},{keepPreviousPeek:!0}),I.current.add(e);return}}if(t.length===n){let e=fg(t,I.current);if(e){ae(e,{align:`start`},{keepPreviousPeek:!0}),I.current.add(e);return}}g.current===`following-bottom`&&s.current?B({behavior:`auto`}):(R(),z())})(),le()},[de,le,R,re,ce,z,ae,B]),pe=U.useCallback(()=>{if(g.current===`following-bottom`&&s.current){B({behavior:`auto`});return}let e=D.current;if(ie()){s.current&&e>0&&D.current===0&&B({behavior:`auto`});return}ne(),z()},[ie,ne,z,B]),me=U.useCallback(()=>{let e=j.current;if(!(!e||!P.hasListeners())){if(typeof IntersectionObserver>`u`){z();return}N.current||=new IntersectionObserver(e=>{for(let t of e){let e=t.target.dataset.messageId;e&&(t.isIntersecting?F.current.add(e):F.current.delete(e))}z()},{root:e,rootMargin:`${-(w.current+T.current)}px 0px 0px 0px`,threshold:[0,.01,.5,1]}),h.current.forEach(e=>{N.current?.observe(e)}),z()}},[z,P]),he=U.useCallback(()=>{M.current!==null&&(window.cancelAnimationFrame(M.current),M.current=null),N.current?.disconnect(),N.current=null,F.current.clear(),P.setSnapshot(sg)},[P]),ge=U.useCallback((e,t,n)=>{if(t){h.current.set(e,t),N.current?.observe(t),z(),v.current?.messageId===e&&ue();return}n&&h.current.get(e)===n&&(h.current.delete(e),F.current.delete(e),N.current?.unobserve(n),z())},[ue,z]),_e=U.useCallback(()=>{(g.current===`following-bottom`||g.current===`anchored-to-message`||g.current===`settling-jump`)&&(o.current=null,g.current=`free-scrolling`)},[]),ve=U.useCallback(()=>L(A.getSnapshot()),[A,L]),ye=Fg(S,ve),be=Fg(j,ve),xe=U.useCallback(e=>{u.current=e},[]),Se=U.useCallback(e=>{O.current=e,E.current=wg(e?.parentElement??null)},[]),Ce=U.useCallback(()=>{R(),z(),le()},[le,R,z]),we=U.useMemo(()=>({handleContentChange:fe,handleResize:pe,observeVisibility:me,pendingDefaultScrollStore:x,preserveScrollOnPrependRef:b,scrollToEnd:B,scrollToMessage:oe,scrollToStart:se,setContentElement:xe,setRootElement:ye,setSpacerElement:Se,setViewportElement:be,stateStore:A,syncAfterScroll:Ce,unobserveVisibility:he,userScrollIntent:_e,viewportRef:j,visibilityStore:P}),[fe,pe,me,x,B,oe,se,xe,ye,Se,be,A,Ce,he,_e,P]);return U.useLayoutEffect(()=>{de()||p.current===0&&Mg(a)},[de]),U.useEffect(()=>()=>{k.current!==null&&(window.cancelAnimationFrame(k.current),k.current=null),M.current!==null&&(window.cancelAnimationFrame(M.current),M.current=null),l.current!==null&&(window.clearTimeout(l.current),l.current=null),_.current!==null&&(window.cancelAnimationFrame(_.current),_.current=null),N.current?.disconnect(),N.current=null},[]),U.useLayoutEffect(()=>{if(e&&g.current===`following-bottom`&&p.current>0){B({behavior:`auto`});return}R()},[e,R,B]),{context:we,registerMessage:ge}}function Lg(e){let t=U.useRef(e);return t.current=e,t}var Rg=U.createContext(null),zg=U.createContext(null);function Bg(){let e=U.useContext(Rg);if(!e)throw Error(`useMessageScroller must be used within a MessageScroller.`);return e}function Vg(){let e=U.useContext(zg);if(!e)throw Error(`MessageScrollerItem must be used within a MessageScroller.`);return e}function Hg(){let{scrollToEnd:e,scrollToMessage:t,scrollToStart:n}=Bg();return U.useMemo(()=>({scrollToEnd:e,scrollToMessage:t,scrollToStart:n}),[e,t,n])}function Ug(){let{stateStore:e}=Bg();return U.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function Wg({autoScroll:e=!1,children:t,defaultScrollPosition:n=`end`,scrollEdgeThreshold:r,scrollPreviousItemPeek:i,scrollMargin:a}){let{context:o,registerMessage:s}=Ig({autoScroll:e,defaultScrollPosition:n,scrollEdgeThreshold:r,scrollPreviousItemPeek:i,scrollMargin:a});return(0,Q.jsx)(Rg.Provider,{value:o,children:(0,Q.jsx)(zg.Provider,{value:s,children:t})})}function Gg(){let{pendingDefaultScrollStore:e}=Bg();return U.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function Kg({children:e,...t}){let{setRootElement:n}=Bg(),r=Gg();return(0,Q.jsx)(`div`,{ref:n,...t,...r?{"data-pending-scroll":``}:null,children:e})}function qg({"aria-label":e,children:t,onKeyDown:n,onScroll:r,onTouchMove:i,onWheel:a,preserveScrollOnPrepend:o=!0,ref:s,role:c,tabIndex:l,...u}){let{handleResize:d,preserveScrollOnPrependRef:f,setViewportElement:p,syncAfterScroll:m,userScrollIntent:h,viewportRef:g}=Bg(),_=Gg();f.current=o;let v=U.useCallback(e=>{p(e),$h(s)?.(e)},[s,p]);function y(e){m(),r?.(e)}function b(e){h(),a?.(e)}function x(e){h(),i?.(e)}function S(e){ag.has(e.key)&&h(),n?.(e)}return U.useEffect(()=>{let e=g.current;if(!e||typeof ResizeObserver>`u`)return;let t=0,n=new ResizeObserver(()=>{window.cancelAnimationFrame(t),t=window.requestAnimationFrame(d)});return n.observe(e),()=>{window.cancelAnimationFrame(t),n.disconnect()}},[d,g]),(0,Q.jsx)(`div`,{ref:v,role:c??`region`,"aria-label":e??`Messages`,tabIndex:l??0,onKeyDown:S,onScroll:y,onTouchMove:x,onWheel:b,...u,..._?{"data-pending-scroll":``}:null,children:t})}function Jg({"aria-relevant":e,children:t,ref:n,role:r,spacerClassName:i,...a}){let{handleContentChange:o,handleResize:s,setContentElement:c,setSpacerElement:l}=Bg(),u=U.useRef(null),d=U.useCallback(e=>{u.current=e,c(e),$h(n)?.(e)},[n,c]);return U.useLayoutEffect(()=>{let e=u.current;if(!e||(o(),typeof MutationObserver>`u`))return;let t=new MutationObserver(()=>{o()});return t.observe(e,{childList:!0}),()=>t.disconnect()},[o]),U.useEffect(()=>{let e=u.current;if(!e||typeof ResizeObserver>`u`)return;let t=0,n=new ResizeObserver(()=>{window.cancelAnimationFrame(t),t=window.requestAnimationFrame(s)});return n.observe(e),()=>{window.cancelAnimationFrame(t),n.disconnect()}},[s]),(0,Q.jsxs)(`div`,{ref:d,role:r??`log`,"aria-relevant":e??`additions`,...a,children:[t,(0,Q.jsx)(`div`,{ref:l,"aria-hidden":`true`,"data-message-scroller-spacer":``,hidden:!0,className:i})]})}function Yg({messageId:e,ref:t,scrollAnchor:n=!1,...r}){let i=Vg(),a=U.useRef(null),o=U.useCallback(n=>{let r=a.current;a.current=n,e&&i(e,n,r),$h(t)?.(n)},[e,t,i]);return(0,Q.jsx)(`div`,{ref:o,"data-message-id":e,"data-scroll-anchor":n?`true`:`false`,...r})}function Xg({behavior:e=`smooth`,children:t,direction:n=`end`,onClick:r,render:i,tabIndex:a,type:o=`button`,...s}){let{scrollToEnd:c,scrollToStart:l,stateStore:u}=Bg(),d=Lg(r),f=U.useCallback(e=>u.subscribe(e),[u]),p=U.useCallback(()=>{let e=u.getSnapshot();return n===`start`?e.start:e.end},[n,u]),m=U.useSyncExternalStore(f,p,p),h=U.useCallback(t=>{m&&(d.current?.(t),t.defaultPrevented||(t.currentTarget.blur(),n===`start`?l({behavior:e}):c({behavior:e})))},[e,n,m,d,c,l]);return Jh({defaultTagName:`button`,props:Yh({type:o,inert:!m,tabIndex:m?a:-1,children:t??(0,Q.jsxs)(`span`,{children:[`Scroll to `,n]}),onClick:h},s),render:i,state:{active:m,direction:n},stateAttributesMapping:{active:e=>({"data-active":e?`true`:`false`})}})}var Zg={Provider:Wg,Root:Kg,Viewport:qg,Content:Jg,Item:Yg,Button:Xg};function Qg(e){return(0,Q.jsx)(Zg.Provider,{...e})}function $g({className:e,...t}){return(0,Q.jsx)(Zg.Root,{"data-slot":`message-scroller`,className:l(`group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden`,e),...t})}function e_({className:e,...t}){return(0,Q.jsx)(Zg.Viewport,{"data-slot":`message-scroller-viewport`,className:l(`size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-thumb-transparent data-autoscrolling:scrollbar-track-transparent data-pending-scroll:invisible`,e),...t})}function t_({className:e,...t}){return(0,Q.jsx)(Zg.Content,{"data-slot":`message-scroller-content`,className:l(`flex h-max min-h-full flex-col gap-6`,e),...t})}function n_({className:e,scrollAnchor:t=!1,...n}){return(0,Q.jsx)(Zg.Item,{"data-slot":`message-scroller-item`,scrollAnchor:t,className:l(`min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]`,e),...n})}function r_({direction:e=`end`,className:t,children:n,render:r,variant:i=`secondary`,size:a=`icon-sm`,...o}){return(0,Q.jsx)(Zg.Button,{"data-slot":`message-scroller-button`,"data-direction":e,"data-variant":i,"data-size":a,direction:e,className:l(`absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180`,t),render:r??(0,Q.jsx)(b,{variant:i,size:a}),...o,children:n??(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Ur,{}),(0,Q.jsx)(`span`,{className:`sr-only`,children:e===`end`?`Scroll to end`:`Scroll to start`})]})})}var i_=(e,t,n)=>{let r=new Set(e.map(({sequence:e})=>e)),i=[...new Map([...t,...e].map(e=>[e.sequence,e])).values()].sort((e,t)=>e.sequence-t.sequence),a=new Map,o=new Map,s=(e,t)=>JSON.stringify([e,t]);for(let e of i){let t=e.payload;if(t._tag!==`SessionEvent`)continue;let i=t.event;if(i._tag===`PoolRateLimitsUpdated`||i._tag===`SessionTokensUpdated`)continue;let c=s(e.attemptId,i.session.id),l=a.get(c);l===void 0&&(l={attemptId:e.attemptId,session:i.session,first:e,harnessSession:Zt(),latestSequence:e.sequence,status:n.has(e.attemptId)?`Stopped`:`Live`,held:!1,paused:!1,idle:!1,events:[],interventions:[]},a.set(c,l),i.session._tag===`ParentSession`&&o.set(e.attemptId,l)),l.latestSequence=e.sequence,i._tag===`SessionStarted`&&(l.harnessSession=i.harnessSession),i._tag===`SessionFinished`&&(l.status=`Finished`),i._tag===`SessionIdle`&&(l.idle=!0),i._tag===`SessionResumed`&&(l.idle=!1),r.has(e.sequence)&&l.events.push({sequence:e.sequence,receivedAt:e.receivedAt,event:i})}let c=[];for(let e of i){let t=e.payload;if(t._tag!==`InterventionApplied`&&t._tag!==`InterventionRejected`)continue;let n=t.intervention.target,i=n._tag===`Parent`?o.get(e.attemptId):a.get(s(e.attemptId,n.sessionId));if(i===void 0){r.has(e.sequence)&&c.push({...e,payload:t});continue}e.sequence>i.latestSequence&&(i.latestSequence=e.sequence),t._tag===`InterventionApplied`&&(i.held=t.state.held,i.paused=t.state.paused),r.has(e.sequence)&&i.interventions.push({...e,payload:t})}return{groups:a,unmatched:c}},a_=e=>({key:`event:${e.sequence}`,sequence:e.sequence,latestSequence:e.sequence,receivedAt:e.receivedAt}),o_=(e,t)=>({_tag:`Notice`,...a_(e),...t}),s_=(e,t)=>{let n=[],r=new Map;for(let i of e.events){let a=i.event;if(a._tag===`ToolStarted`||a._tag===`ToolFinished`){let n=JSON.stringify([e.attemptId,e.session.id,a.callId]),o=r.get(n),s=o?.start??Zt();r.set(n,{_tag:`Tool`,...a_(i),key:n,sequence:o?.sequence??i.sequence,receivedAt:o?.receivedAt??i.receivedAt,name:a.tool,start:a._tag===`ToolStarted`?ue({receivedAt:i.receivedAt,input:a.input}):s,state:a._tag===`ToolFinished`?{_tag:a.isError?`Error`:`Finished`,receivedAt:i.receivedAt,output:a.output}:o?.state??{_tag:t===`Live`?`Running`:`Stopped`}});continue}let o=ee(a,{TextOutput:({text:t})=>({kind:`message`,label:e.session.agent,detail:t,format:`markdown`,isError:!1}),SessionStarted:()=>({kind:`status`,label:`${e.session.agent} started`,detail:ar(e.session.brain),format:`plain`,isError:!1}),SessionIdle:()=>({kind:`status`,label:`${e.session.agent} is waiting`,detail:`The session remains open for operator input.`,format:`plain`,isError:!1}),SessionResumed:()=>({kind:`status`,label:`${e.session.agent} resumed`,detail:``,format:`plain`,isError:!1}),SessionFinished:()=>({kind:`status`,label:`${e.session.agent} finished`,detail:``,format:`plain`,isError:!1})});n.push(o_(i,o))}return[...n,...r.values()].sort((e,t)=>e.sequence-t.sequence)},c_=e=>{let{action:t,operator:n}=e.payload.intervention,r=e.payload._tag===`InterventionRejected`,i=t._tag===`OperatorMessage`||t._tag===`Steer`;return o_(e,{kind:i?`message`:`status`,label:r?`${n} · not delivered`:i?n:t._tag===`Release`?`${n} released the child`:`${n} paused the session`,detail:r?`${i?`${t.message}\n\n`:``}${e.payload.message}`:i?t.message:``,format:i?`markdown`:`plain`,isError:r})},l_=(e,t,n=[])=>{let r=new Set(t.filter(({outcome:e})=>e!==null).map(({id:e})=>e));for(let{attemptId:t,payload:n}of e)(n._tag===`Final`||n._tag===`Failed`||n._tag===`Interrupted`)&&r.add(t);let{groups:i,unmatched:a}=i_(e,n,r),o=[];for(let t of[...e].sort((e,t)=>e.sequence-t.sequence)){let e=t.payload;e._tag!==`InterventionApplied`&&e._tag!==`InterventionRejected`&&(t.direction!==`inbound`||t.operator===void 0||e._tag===`Cancel`)&&e._tag!==`SessionEvent`&&o.push(o_(t,ee(e,{Started:({parentModel:e})=>({kind:`status`,label:`Attempt started`,detail:e,format:`plain`,isError:!1}),Final:({result:e})=>({kind:`status`,label:`Attempt finished`,detail:e.message,format:`markdown`,isError:!1}),Failed:({failure:e})=>({kind:`status`,label:`Attempt failed`,detail:$n(e),format:`plain`,isError:!0}),Cancel:()=>({kind:`status`,label:`Cancel requested`,detail:`The Attempt is stopping.`,format:`plain`,isError:!1}),Interrupted:()=>({kind:`status`,label:`Interrupted`,detail:`The run host acknowledged the interrupt.`,format:`plain`,isError:!1}),Steer:({message:e})=>({kind:`message`,label:`Operator`,detail:e,format:`markdown`,isError:!1}),Interrupt:()=>({kind:`status`,label:`Interrupt requested`,detail:`The operator asked the run host to stop.`,format:`plain`,isError:!1}),OperatorMessage:({message:e})=>({kind:`message`,label:`Operator`,detail:e,format:`markdown`,isError:!1}),Release:()=>({kind:`status`,label:`Released`,detail:`The operator released the held child.`,format:`plain`,isError:!1})})))}let s=[];for(let[e,t]of i)s.push({_tag:`Session`,...a_(t.first),key:e,latestSequence:t.latestSequence,attemptId:t.attemptId,session:t.session,harnessSession:t.harnessSession,status:t.status,held:t.status===`Live`&&t.held,paused:t.status===`Live`&&t.paused,idle:t.status===`Live`&&t.idle,entries:[...s_(t,t.status),...t.interventions.map(e=>c_(e))].sort((e,t)=>e.sequence-t.sequence)});return o.push(...a.map(e=>{let t=c_(e),n=e.payload.intervention.target;return{...t,label:`${t.label} · ${n._tag===`Parent`?`parent`:n.sessionId}`}})),{sessions:s,terminalAttempts:r,items:[...o,...s.flatMap(e=>e.session._tag===`ChildSession`?[e]:e.entries)].sort((e,t)=>e.sequence-t.sequence)}},u_=(e,t)=>e._tag===`Tool`?t!==`messages`:e.kind===`status`||t!==`tools`,d_=e=>{if(e.status!==`Live`)return e.status;if(e.paused)return`Paused · send a message to resume`;if(e.held)return e.idle?`Held · waiting for you`:`Held · working`;if(e.idle)return`Waiting for operator input`;let t=[...e.entries].reverse().find(e=>e._tag===`Tool`&&e.state._tag===`Running`);return t?._tag===`Tool`?`Running ${t.name}`:`Working`},f_=e=>{let t=e.getBoundingClientRect().top+e.clientTop,n=t+e.clientHeight,r;for(let i of e.querySelectorAll(`[data-transcript-id]`)){let e=i.getBoundingClientRect();if(!(e.height===0||e.bottom<=t||e.top>=n)){if(r!==void 0&&!r.contains(i))break;r=i}}return r},p_=class extends U.Component{pendingPosition=null;getSnapshotBeforeUpdate(e){if(!e.active||e.active===this.props.active&&e.revision===this.props.revision)return null;let t=this.props.viewportRef.current;if(t===null||t.clientHeight===0||t.scrollHeight-t.clientHeight-t.scrollTop<=8)return null;let n=t.getBoundingClientRect().top+t.clientTop,r=f_(t);return r===void 0?null:{viewport:t,element:r,identity:r.getAttribute(`data-transcript-id`),offset:r.getBoundingClientRect().top-n}}componentDidUpdate(e,t,n){if(n!==null&&(this.pendingPosition=n),!this.props.active||this.pendingPosition===null)return;let r=this.props.viewportRef.current;if(r===null||r.clientHeight===0)return;let i=this.pendingPosition;if(this.pendingPosition=null,r!==i.viewport)return;let a=r.contains(i.element)?i.element:Array.from(r.querySelectorAll(`[data-transcript-id]`)).find(e=>e.getAttribute(`data-transcript-id`)===i.identity);if(a===void 0)return;let o=r.getBoundingClientRect().top+r.clientTop,s=a.getBoundingClientRect().top-o;r.scrollTop+=s-i.offset}render(){return this.props.children}};function m_({className:e,...t}){return(0,Q.jsx)(`textarea`,{"data-slot":`textarea`,className:l(`flex field-sizing-content min-h-16 w-full resize-none rounded-md border border-input bg-input/20 px-2 py-2 text-sm transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function h_({className:e,...t}){return(0,Q.jsx)(`label`,{"data-slot":`label`,className:l(`flex items-center gap-2 text-xs/relaxed leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}var g_=({runId:e,attemptId:t,target:n,paused:r})=>{let[i,a]=(0,U.useState)(``),o=(0,U.useId)(),s=rt(),c=n._tag===`Child`,l=fr({mutationFn:r=>Vt(i=>i.intervene({params:{runId:e},payload:new x({attemptId:t,target:n,action:r})})),onSuccess:async(t,n)=>{n._tag===`OperatorMessage`&&a(e=>e===n.message?``:e),await s.invalidateQueries({queryKey:[`run`,e]})}}),u=()=>{i.trim().length>0&&!l.isPending&&l.mutate(new yt({message:i}))};return(0,Q.jsxs)(`div`,{className:`space-y-2 border-t pt-3`,children:[(0,Q.jsx)(h_,{htmlFor:o,children:c?`Message this child`:`Message the parent`}),(0,Q.jsx)(m_,{id:o,value:i,onChange:e=>a(e.target.value),rows:3,placeholder:r?`Send guidance to resume`:`Add guidance or ask a question`,onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),u())}}),(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Q.jsx)(b,{size:`sm`,onClick:u,disabled:l.isPending||i.trim().length===0,children:r?`Send and resume`:`Send`}),(0,Q.jsx)(b,{size:`sm`,variant:`outline`,disabled:l.isPending||r,onClick:()=>l.mutate(new mt),children:`Pause session`}),c&&(0,Q.jsx)(b,{size:`sm`,variant:`secondary`,disabled:l.isPending,onClick:()=>l.mutate(new Bt),children:`Release child`})]}),c&&(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Sending a message keeps this child open. Release it when you’re ready for its result to return to the parent.`}),l.isError&&(0,Q.jsx)(Sr,{message:l.error.message})]})};function __(e){let{open:t,defaultOpen:n,onOpenChange:r,disabled:i}=e,[a,o]=oi({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:s,setMounted:c,transitionStatus:l}=ur(a,!0,!0),u=Gn(),[d,f]=U.useState(),p=d===null?void 0:d??u,m=y(e=>{let t=!a,n=ir(An,e.nativeEvent);r(t,n),!n.isCanceled&&o(t)});return U.useMemo(()=>({defaultPanelId:u,disabled:i,handleTrigger:m,mounted:s,open:a,panelId:p,setMounted:c,setOpen:o,setPanelIdState:f,transitionStatus:l}),[u,i,m,s,a,p,c,o,f,l])}var v_=U.createContext(void 0);function y_(){let e=U.useContext(v_);if(e===void 0)throw Error(u(15));return e}var b_=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=In.startingStyle]=`startingStyle`,e[e.endingStyle=In.endingStyle]=`endingStyle`,e}({}),x_=function(e){return e.panelOpen=`data-panel-open`,e}({}),S_={[b_.open]:``},C_={[b_.closed]:``},w_={open(e){return e?{[x_.panelOpen]:``}:null}},T_={open(e){return e?S_:C_},...Mn},E_=U.forwardRef(function(e,t){let{render:n,className:i,defaultOpen:a=!1,disabled:o=!1,onOpenChange:s,open:c,style:l,...u}=e,d=y(s),f=__({open:c,defaultOpen:a,onOpenChange:d,disabled:o}),p=U.useMemo(()=>({open:f.open,disabled:f.disabled,transitionStatus:f.transitionStatus}),[f.open,f.disabled,f.transitionStatus]),m=U.useMemo(()=>({...f,onOpenChange:d,state:p}),[f,d,p]),h=r(`div`,e,{state:p,ref:t,props:u,stateAttributesMapping:T_});return(0,Q.jsx)(v_.Provider,{value:m,children:h})}),D_={...w_,...Mn},O_=U.forwardRef(function(e,t){let{panelId:n,open:i,handleTrigger:a,state:o,disabled:s}=y_(),{className:c,disabled:l=s,render:u,nativeButton:d=!0,style:f,...p}=e,{getButtonProps:m,buttonRef:h}=_({disabled:l,focusableWhenDisabled:!0,native:d});return r(`button`,e,{state:o,ref:[t,h],props:[{"aria-controls":i?n:void 0,"aria-expanded":i,onClick:a},p,m],stateAttributesMapping:D_})}),k_={height:void 0,width:void 0};function A_(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:i,mounted:a,onOpenChange:s,open:c,setMounted:l,setOpen:u,transitionStatus:d}=e,f=U.useRef(null),p=U.useRef(null),[m,h]=U.useState(k_),g=U.useRef(k_),_=U.useRef(!1),b=U.useRef(c),x=U.useRef(!1),[S,C]=U.useState(!1),w=U.useRef(null),T=o(t,f),E=Un(c),D=Pn(f),O=!c&&!a,k=S?`idle`:d,A=c&&(b.current||x.current),j=!c&&a&&p.current===`css-animation`&&m.height===void 0&&m.width===void 0?g.current:m,M=n&&O&&p.current!==`css-animation`,N=y((e,t=!0)=>{t&&(g.current=e),h(e)}),P=y(()=>{w.current?.(),w.current=null}),F=y(e=>{P(),w.current=()=>{w.current=null,e()}}),I=y(()=>{c&&a&&p.current===`css-animation`&&(x.current=!0)});v(()=>{!S||d===`starting`||C(!1)},[S,d]),U.useEffect(()=>()=>{I(),P()},[I,P]),v(()=>{let e=f.current;if(!e)return;!c&&w.current&&P();let t=M_(e,A);if(p.current=t,c&&d===`idle`&&b.current&&t===`css-animation`){g.current=j_(e);return}if(c&&d===`starting`){let n=_.current;if(_.current=!1,t===`none`){N(j_(e)),C(!0);return}if(t===`css-transition`){let t=F_(e);if(N(j_(e)),!n)return t;let r=P_(e,`transition-duration`,`0s`);return F(r),C(!0),t}N(j_(e));let r=P_(e,`animation-name`,`none`);if(!n){r();return}let i=P_(e,`animation-duration`,`0s`);r(),F(i),C(!0);return}if(!c&&a&&(d===`idle`||d===`starting`)){if(b.current=!1,x.current=!1,t===`none`){N(k_,!1),l(!1);return}N(j_(e));return}if(d!==`ending`)return;if(t===`none`){l(!1);return}let n=j_(e);if(!(n.height>0||n.width>0)){l(!1);return}N(n),t===`css-animation`&&P_(e,`animation-name`,`none`)()},[a,c,P,N,l,F,A,d]),jn({enabled:c&&a&&k===`idle`,open:!0,ref:f,onComplete(){c&&N(k_,!1)}}),U.useEffect(()=>{if(c||!a||k!==`ending`||!f.current)return;let e=new AbortController,t=-1;function n(){E.current||(l(!1),N(k_,!1))}return t=Yn.request(()=>{D(n,e.signal)}),()=>{Yn.cancel(t),e.abort()}},[E,a,c,k,D,N,l]),v(()=>{let e=f.current;!e||!n||!O||e.setAttribute(`hidden`,`until-found`)},[O,n]),U.useEffect(function(){let e=f.current;if(!e)return;function t(e){let t=ir(lr,e);s(!0,t),!t.isCanceled&&(_.current=!0,u(!0))}return tr(e,`beforematch`,t)},[s,u]);let ee=i||n||a||c;return{height:j.height,props:{...M?{[b_.startingStyle]:``}:void 0,hidden:O,id:r},ref:T,shouldPreventOpenAnimation:A,shouldRender:ee,transitionStatus:k,width:j.width}}function j_(e){return{height:e.scrollHeight,width:e.scrollWidth}}function M_(e,t){let n=f(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&N_(n.animationDuration),i=N_(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function N_(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function P_(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===``){e.style.removeProperty(t);return}e.style.setProperty(t,r,i)}}function F_(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{if(n===``){e.style.removeProperty(t);return}e.style.setProperty(t,n)})}let r=Yn.request(n);return()=>{Yn.cancel(r),n()}}var I_=function(e){return e.collapsiblePanelHeight=`--collapsible-panel-height`,e.collapsiblePanelWidth=`--collapsible-panel-width`,e}({}),L_=U.forwardRef(function(e,t){let{className:n,hiddenUntilFound:i,keepMounted:a,render:o,id:s,style:c,...l}=e,{defaultPanelId:u,mounted:d,onOpenChange:f,open:p,setMounted:m,setPanelIdState:g,setOpen:_,state:y,transitionStatus:b}=y_(),x=i??!1,S=a??!1,C=s||void 0,w=C??u;v(()=>(g(e=>C??(e===null?void 0:e)),()=>{g(e=>e===C?null:e)}),[C,g]);let{height:T,props:E,ref:D,shouldPreventOpenAnimation:O,shouldRender:k,transitionStatus:A,width:j}=A_({externalRef:t,hiddenUntilFound:x,id:w,keepMounted:S,mounted:d,onOpenChange:f,open:p,setMounted:m,setOpen:_,transitionStatus:b}),M={...y,transitionStatus:A},N=h(c,M),P=r(`div`,{...e,style:void 0},{state:M,ref:D,props:[E,{style:{[I_.collapsiblePanelHeight]:T===void 0?`auto`:`${T}px`,[I_.collapsiblePanelWidth]:j===void 0?`auto`:`${j}px`}},l,N?{style:N}:void 0,O?{style:{animationName:`none`}}:void 0],stateAttributesMapping:T_});return k?P:null});function R_({...e}){return(0,Q.jsx)(E_,{"data-slot":`collapsible`,...e})}function z_({...e}){return(0,Q.jsx)(O_,{"data-slot":`collapsible-trigger`,...e})}function B_({...e}){return(0,Q.jsx)(L_,{"data-slot":`collapsible-content`,...e})}function V_({className:e,align:t=`start`,...n}){return(0,Q.jsx)(`div`,{"data-slot":`message`,"data-align":t,className:l(`group/message relative flex w-full min-w-0 gap-1.5 text-xs/relaxed data-[align=end]:flex-row-reverse`,e),...n})}function H_({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`message-content`,className:l(`flex w-full min-w-0 flex-col gap-2 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end`,e),...t})}function U_({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`message-header`,className:l(`flex max-w-full min-w-0 items-center px-2.5 text-[0.625rem] font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0`,e),...t})}var W_={Running:(0,Q.jsx)(qr,{className:`motion-safe:animate-spin text-run-active`}),Error:(0,Q.jsx)(ii,{className:`text-destructive`}),Stopped:(0,Q.jsx)($r,{className:`text-muted-foreground`})},G_=({className:e,...t})=>(0,Q.jsx)(R_,{className:l(`group/tool not-prose w-full min-w-0`,e),...t}),K_=({title:e,status:t,icon:n,description:r,children:i,className:a,...o})=>(0,Q.jsxs)(z_,{className:l(`group/tool-trigger -mx-2 flex min-h-11 w-[calc(100%+1rem)] min-w-0 items-center gap-2 rounded-md px-2 py-2 text-left outline-none hover:bg-muted/30 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring data-[panel-open]:bg-muted/30`,a),...o,children:[(0,Q.jsx)(`span`,{className:`shrink-0 text-muted-foreground [&_svg]:size-3.5`,children:n??(0,Q.jsx)(ri,{})}),(0,Q.jsxs)(`span`,{className:`min-w-0 flex-1 space-y-1`,children:[(0,Q.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Q.jsx)(`span`,{className:`text-xs font-medium wrap-anywhere`,children:e}),t!==`Completed`&&(0,Q.jsxs)(on,{variant:`secondary`,className:`gap-1`,children:[W_[t],t]}),i]}),r&&(0,Q.jsx)(`span`,{className:`block truncate font-mono text-xs text-muted-foreground group-data-[panel-open]/tool-trigger:whitespace-normal group-data-[panel-open]/tool-trigger:wrap-anywhere`,children:r})]}),(0,Q.jsx)(Tn,{className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-[panel-open]/tool-trigger:rotate-180`})]}),q_=({className:e,...t})=>(0,Q.jsx)(B_,{className:l(`min-w-0 space-y-3 pt-2 pb-2 pl-5.5 outline-none`,e),...t}),J_=({className:e,title:t=`Result`,children:n,...r})=>(0,Q.jsxs)(`div`,{className:l(`min-w-0 space-y-2`,e),...r,children:[(0,Q.jsx)(`h4`,{className:`text-xs font-medium text-muted-foreground`,children:t}),n]}),Y_=({value:e,label:t,...n})=>{let[r,i]=(0,U.useState)(`idle`),a=(0,U.useRef)(void 0);return(0,U.useEffect)(()=>()=>clearTimeout(a.current),[]),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(b,{size:`icon-xs`,variant:`ghost`,"aria-label":r===`copied`?`Copied`:t,title:r===`copied`?`Copied`:t,disabled:r===`copying`,onClick:async()=>{i(`copying`),clearTimeout(a.current);try{await navigator.clipboard.writeText(e),i(`copied`),a.current=setTimeout(()=>i(`idle`),2e3)}catch{i(`failed`)}},...n,children:r===`copied`?(0,Q.jsx)(Kr,{}):(0,Q.jsx)(Jr,{})}),(0,Q.jsx)(`span`,{role:`status`,className:r===`failed`?`text-xs text-destructive`:`sr-only`,children:r===`failed`?`Copy failed. Select the text to copy it.`:r===`copied`?`Copied to clipboard`:``})]})},X_=(0,U.createContext)(``),Z_={bash:()=>Jn(()=>import(`./bash-CLZ0U2zV.js`),[]),diff:()=>Jn(()=>import(`./diff-woXpYk--.js`),[]),typescript:()=>Jn(()=>import(`./typescript-bsJCZSQ-.js`),[]),json:()=>Jn(()=>import(`./json-qhed-kSA.js`),[])},Q_=async(e,t)=>{let[n,r,i]=await Promise.all([Jn(()=>import(`./core-CLXRiB63.js`),[]),Jn(()=>import(`./engine-javascript-h-x4hGa4.js`),[]),Z_[t]()]),a=n.createCssVariablesTheme({name:`usine`,variableDefaults:{foreground:`var(--foreground)`,background:`transparent`,"token-constant":`var(--needs-you)`,"token-string":`var(--run-succeeded)`,"token-comment":`var(--muted-foreground)`,"token-keyword":`var(--primary)`,"token-parameter":`var(--foreground)`,"token-function":`var(--run-active)`,"token-string-expression":`var(--run-succeeded)`,"token-punctuation":`var(--muted-foreground)`,"token-link":`var(--run-active)`,"token-inserted":`var(--run-succeeded)`,"token-deleted":`var(--destructive)`,"token-changed":`var(--needs-you)`}}),o=await n.createHighlighterCore({engine:r.createJavaScriptRegexEngine(),themes:[a],langs:[i.default]});try{return o.codeToTokens(e,{lang:t,theme:`usine`}).tokens.map(e=>e.map(e=>({content:e.content,style:{color:e.color,backgroundColor:e.bgColor,fontStyle:(e.fontStyle??0)&1?`italic`:void 0,fontWeight:(e.fontStyle??0)&2?`bold`:void 0,textDecoration:(e.fontStyle??0)&4?`underline`:void 0}})))}finally{o.dispose()}},$_=({code:e,language:t,showLineNumbers:n})=>{let[r,i]=(0,U.useState)(null);(0,U.useEffect)(()=>{if(t===`text`)return;let n=!1;return Q_(e,t).then(r=>{n||i({_tag:`Highlighted`,code:e,language:t,lines:r})},()=>{n||i({_tag:`Failed`,code:e,language:t})}),()=>{n=!0}},[e,t]);let a=r?.code===e&&r.language===t&&r._tag===`Highlighted`?r.lines:e.split(`
152
+ `).map(e=>[{content:e,style:{}}]),o=r?.code===e&&r.language===t&&r._tag===`Failed`;return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`div`,{className:`max-h-96 overflow-auto`,children:(0,Q.jsx)(`pre`,{className:`m-0 p-3 font-mono text-xs/relaxed`,children:(0,Q.jsx)(`code`,{children:a.map((e,t)=>(0,Q.jsxs)(`span`,{children:[n&&(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`mr-4 inline-block w-8 select-none text-right text-muted-foreground`,children:t+1}),e.map((e,t)=>(0,Q.jsx)(`span`,{style:e.style,children:e.content},t)),t<a.length-1?`
153
+ `:null]},t))})})}),o&&(0,Q.jsx)(`p`,{role:`status`,className:`px-3 pb-2 text-xs text-muted-foreground`,children:`Syntax highlighting unavailable. Original text is shown.`})]})},ev=({code:e,language:t,showLineNumbers:n=!1,children:r,className:i,...a})=>(0,Q.jsx)(X_.Provider,{value:e,children:(0,Q.jsxs)(`div`,{className:l(`not-prose min-w-0 overflow-hidden rounded-md border bg-background text-foreground`,i),...a,children:[r,(0,Q.jsx)($_,{code:e,language:t,showLineNumbers:n})]})}),tv=({className:e,...t})=>(0,Q.jsx)(`div`,{className:l(`flex items-center justify-between gap-2 border-b bg-muted/30 px-3 py-2 text-xs text-muted-foreground`,e),...t}),nv=({className:e,...t})=>(0,Q.jsx)(`div`,{className:l(`flex min-w-0 items-center gap-2`,e),...t}),rv=({className:e,...t})=>(0,Q.jsx)(`div`,{className:l(`flex shrink-0 items-center gap-2`,e),...t}),iv=e=>(0,Q.jsx)(Y_,{value:(0,U.useContext)(X_),label:`Copy code`,...e}),av=n(((e,t)=>{var n=[[{color:`0, 0, 0`,class:`ansi-black`},{color:`187, 0, 0`,class:`ansi-red`},{color:`0, 187, 0`,class:`ansi-green`},{color:`187, 187, 0`,class:`ansi-yellow`},{color:`0, 0, 187`,class:`ansi-blue`},{color:`187, 0, 187`,class:`ansi-magenta`},{color:`0, 187, 187`,class:`ansi-cyan`},{color:`255,255,255`,class:`ansi-white`}],[{color:`85, 85, 85`,class:`ansi-bright-black`},{color:`255, 85, 85`,class:`ansi-bright-red`},{color:`0, 255, 0`,class:`ansi-bright-green`},{color:`255, 255, 85`,class:`ansi-bright-yellow`},{color:`85, 85, 255`,class:`ansi-bright-blue`},{color:`255, 85, 255`,class:`ansi-bright-magenta`},{color:`85, 255, 255`,class:`ansi-bright-cyan`},{color:`255, 255, 255`,class:`ansi-bright-white`}]],r=/(https?:\/\/(?:[A-Za-z0-9#;/?:@=+$',_.!~*()[\]-]|&amp;|%[A-Fa-f0-9]{2})+)/gm;t.exports=class e{static escapeForHtml(t){return new e().escapeForHtml(t)}static linkify(t){return new e().linkify(t)}static ansiToHtml(t,n){return new e().ansiToHtml(t,n)}static ansiToJson(t,n){return new e().ansiToJson(t,n)}static ansiToText(t){return new e().ansiToText(t)}constructor(){this.fg=this.bg=this.fg_truecolor=this.bg_truecolor=null,this.bright=0,this.decorations=[]}setupPalette(){this.PALETTE_COLORS=[];for(let e=0;e<2;++e)for(let t=0;t<8;++t)this.PALETTE_COLORS.push(n[e][t].color);let e=[0,95,135,175,215,255],t=(t,n,r)=>e[t]+`, `+e[n]+`, `+e[r];for(let e=0;e<6;++e)for(let n=0;n<6;++n)for(let r=0;r<6;++r)this.PALETTE_COLORS.push(t(e,n,r));let r=8;for(let e=0;e<24;++e,r+=10)this.PALETTE_COLORS.push(r+`, `+r+`, `+r)}escapeForHtml(e){return e.replace(/[&<>\"]/gm,e=>e==`&`?`&amp;`:e==`"`?`&quot;`:e==`<`?`&lt;`:e==`>`?`&gt;`:``)}linkify(e){return e.replace(r,e=>`<a href="${e}">${e}</a>`)}ansiToHtml(e,t){return this.process(e,t,!0)}ansiToJson(e,t){return t||={},t.json=!0,t.clearLine=!1,this.process(e,t,!0)}ansiToText(e){return this.process(e,{},!1)}process(e,t,n){let r=this,i=e.split(/\033\[/),a=i.shift();t??={},t.clearLine=/\r/.test(e);let o=i.map(e=>this.processChunk(e,t,n));if(t&&t.json){let e=r.processChunkJson(``);return e.content=a,e.clearLine=t.clearLine,o.unshift(e),t.remove_empty&&(o=o.filter(e=>!e.isEmpty())),o}return o.unshift(a),o.join(``)}processChunkJson(e,t,r){t=t===void 0?{}:t;let i=t.use_classes=t.use_classes!==void 0&&t.use_classes,a=t.key=i?`class`:`color`,o={content:e,fg:null,bg:null,fg_truecolor:null,bg_truecolor:null,isInverted:!1,clearLine:t.clearLine,decoration:null,decorations:[],was_processed:!1,isEmpty:()=>!o.content},s=e.match(/^([!\x3c-\x3f]*)([\d;]*)([\x20-\x2c]*[\x40-\x7e])([\s\S]*)/m);if(!s)return o;o.content=s[4];let c=s[2].split(`;`);if(s[1]!==``||s[3]!==`m`||!r)return o;let l=this;for(;c.length>0;){let e=c.shift(),t=parseInt(e);if(isNaN(t)||t===0)l.fg=l.bg=null,l.decorations=[];else if(t===1)l.decorations.push(`bold`);else if(t===2)l.decorations.push(`dim`);else if(t===3)l.decorations.push(`italic`);else if(t===4)l.decorations.push(`underline`);else if(t===5)l.decorations.push(`blink`);else if(t===7)l.decorations.push(`reverse`);else if(t===8)l.decorations.push(`hidden`);else if(t===9)l.decorations.push(`strikethrough`);else if(t===21)l.removeDecoration(`bold`);else if(t===22)l.removeDecoration(`bold`),l.removeDecoration(`dim`);else if(t===23)l.removeDecoration(`italic`);else if(t===24)l.removeDecoration(`underline`);else if(t===25)l.removeDecoration(`blink`);else if(t===27)l.removeDecoration(`reverse`);else if(t===28)l.removeDecoration(`hidden`);else if(t===29)l.removeDecoration(`strikethrough`);else if(t===39)l.fg=null;else if(t===49)l.bg=null;else if(t>=30&&t<38)l.fg=n[0][t%10][a];else if(t>=90&&t<98)l.fg=n[1][t%10][a];else if(t>=40&&t<48)l.bg=n[0][t%10][a];else if(t>=100&&t<108)l.bg=n[1][t%10][a];else if(t===38||t===48){let e=t===38;if(c.length>=1){let t=c.shift();if(t===`5`&&c.length>=1){let t=parseInt(c.shift());if(t>=0&&t<=255){if(!i)this.PALETTE_COLORS||l.setupPalette(),e?l.fg=this.PALETTE_COLORS[t]:l.bg=this.PALETTE_COLORS[t];else{let r=t>=16?`ansi-palette-`+t:n[+(t>7)][t%8].class;e?l.fg=r:l.bg=r}}}else if(t===`2`&&c.length>=3){let t=parseInt(c.shift()),n=parseInt(c.shift()),r=parseInt(c.shift());if(t>=0&&t<=255&&n>=0&&n<=255&&r>=0&&r<=255){let a=t+`, `+n+`, `+r;i?e?(l.fg=`ansi-truecolor`,l.fg_truecolor=a):(l.bg=`ansi-truecolor`,l.bg_truecolor=a):e?l.fg=a:l.bg=a}}}}}return l.fg===null&&l.bg===null&&l.decorations.length===0?o:(o.fg=l.fg,o.bg=l.bg,o.fg_truecolor=l.fg_truecolor,o.bg_truecolor=l.bg_truecolor,o.decorations=l.decorations,o.decoration=l.decorations.slice(-1).pop()||null,o.was_processed=!0,o)}processChunk(e,t,r){t||={};let i=this.processChunkJson(e,t,r),a=t.use_classes;if(i.decorations=i.decorations.filter(e=>{if(e===`reverse`){i.fg||=n[0][7][a?`class`:`color`],i.bg||=n[0][0][a?`class`:`color`];let e=i.fg;i.fg=i.bg,i.bg=e;let t=i.fg_truecolor;return i.fg_truecolor=i.bg_truecolor,i.bg_truecolor=t,i.isInverted=!0,!1}return!0}),t.json)return i;if(i.isEmpty())return``;if(!i.was_processed)return i.content;let o=[],s=[],c=[],l={},u=e=>{let t=[],n;for(n in e)e.hasOwnProperty(n)&&t.push(`data-`+n+`="`+this.escapeForHtml(e[n])+`"`);return t.length>0?` `+t.join(` `):``};return i.isInverted&&(l[`ansi-is-inverted`]=`true`),i.fg&&(a?(o.push(i.fg+`-fg`),i.fg_truecolor!==null&&(l[`ansi-truecolor-fg`]=i.fg_truecolor,i.fg_truecolor=null)):o.push(`color:rgb(`+i.fg+`)`)),i.bg&&(a?(o.push(i.bg+`-bg`),i.bg_truecolor!==null&&(l[`ansi-truecolor-bg`]=i.bg_truecolor,i.bg_truecolor=null)):o.push(`background-color:rgb(`+i.bg+`)`)),i.decorations.forEach(e=>{if(a){s.push(`ansi-`+e);return}e===`bold`?s.push(`font-weight:bold`):e===`dim`?s.push(`opacity:0.5`):e===`italic`?s.push(`font-style:italic`):e===`hidden`?s.push(`visibility:hidden`):e===`strikethrough`?c.push(`line-through`):c.push(e)}),c.length&&s.push(`text-decoration:`+c.join(` `)),a?`<span class="`+o.concat(s).join(` `)+`"`+u(l)+`>`+i.content+`</span>`:`<span style="`+o.concat(s).join(`;`)+`"`+u(l)+`>`+i.content+`</span>`}removeDecoration(e){let t=this.decorations.indexOf(e);t>=0&&this.decorations.splice(t,1)}}})),ov=n(((e,t)=>{function n(e){if(!e)return``;if(!/\r/.test(e))return e;for(e=e.replace(/\r+\n/gm,`
154
+ `);/\r./.test(e);)e=e.replace(/^([^\r\n]*)\r+([^\r\n]+)/gm,function(e,t,n){return n+t.slice(n.length)});return e}function r(e){for(var t=0,n=0;n<e.length;n++)e[t].length<=e[n].length&&(t=n);return t}function i(e){if(!/\r/.test(e))return e;for(var t=e.split(`\r`),n=[];t.length>0;){var i=r(t);n.push(t[i]),t=t.slice(i+1)}return n.join(`\r`)}function a(e){if(!e)return``;if(!/\r/.test(e))return e;if(!/\n/.test(e))return i(e);e=e.replace(/\r+\n/gm,`
155
+ `);var t=e.lastIndexOf(`
156
+ `);return n(e.slice(0,t))+`
157
+ `+i(e.slice(t+1))}t.exports=n,t.exports.escapeCarriageReturn=n,t.exports.escapeCarriageReturnSafe=a})),sv=n(((e,t)=>{t.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/})),cv=n(((e,t)=>{t.exports=/[\0-\x1F\x7F-\x9F]/})),lv=n(((e,t)=>{t.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/})),uv=n(((e,t)=>{t.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/})),dv=n(((e,t)=>{t.exports=function(e){var t={};t.src_Any=sv().source,t.src_Cc=cv().source,t.src_Z=lv().source,t.src_P=uv().source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join(`|`),t.src_ZCc=[t.src_Z,t.src_Cc].join(`|`);var n=`[><|]`;return t.src_pseudo_letter=`(?:(?!`+n+`|`+t.src_ZPCc+`)`+t.src_Any+`)`,t.src_ip4=`(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)`,t.src_auth=`(?:(?:(?!`+t.src_ZCc+`|[@/\\[\\]()]).)+@)?`,t.src_port=`(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?`,t.src_host_terminator=`(?=$|`+n+`|`+t.src_ZPCc+`)(?!-|_|:\\d|\\.-|\\.(?!$|`+t.src_ZPCc+`))`,t.src_path=`(?:[/?#](?:(?!`+t.src_ZCc+`|`+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+`|\\]).)*\\]|\\((?:(?!`+t.src_ZCc+`|[)]).)*\\)|\\{(?:(?!`+t.src_ZCc+`|[}]).)*\\}|\\"(?:(?!`+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+`|[']).)+\\'|\\'(?=`+t.src_pseudo_letter+`|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!`+t.src_ZCc+`|[.]).|`+(e&&e[`---`]?`\\-(?!--(?:[^-]|$))(?:-*)|`:`\\-+|`)+`,(?!`+t.src_ZCc+`).|;(?!`+t.src_ZCc+`).|\\!+(?!`+t.src_ZCc+`|[!]).|\\?(?!`+t.src_ZCc+`|[?]).)+|\\/)?`,t.src_email_name=`[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*`,t.src_xn=`xn--[a-z0-9\\-]{1,59}`,t.src_domain_root=`(?:`+t.src_xn+`|`+t.src_pseudo_letter+`{1,63})`,t.src_domain=`(?:`+t.src_xn+`|(?:`+t.src_pseudo_letter+`)|(?:`+t.src_pseudo_letter+`(?:-|`+t.src_pseudo_letter+`){0,61}`+t.src_pseudo_letter+`))`,t.src_host=`(?:(?:(?:(?:`+t.src_domain+`)\\.)*`+t.src_domain+`))`,t.tpl_host_fuzzy=`(?:`+t.src_ip4+`|(?:(?:(?:`+t.src_domain+`)\\.)+(?:%TLDS%)))`,t.tpl_host_no_ip_fuzzy=`(?:(?:(?:`+t.src_domain+`)\\.)+(?:%TLDS%))`,t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test=`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:`+t.src_ZPCc+`|>|$))`,t.tpl_email_fuzzy=`(^|`+n+`|"|\\(|`+t.src_ZCc+`)(`+t.src_email_name+`@`+t.tpl_host_fuzzy_strict+`)`,t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+`)`,t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+`)`,t}})),fv=n(((e,t)=>{function n(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function r(e){return Object.prototype.toString.call(e)}function i(e){return r(e)===`[object String]`}function a(e){return r(e)===`[object Object]`}function o(e){return r(e)===`[object RegExp]`}function s(e){return r(e)===`[object Function]`}function c(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,`\\$&`)}var l={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function u(e){return Object.keys(e||{}).reduce(function(e,t){return e||l.hasOwnProperty(t)},!1)}var d={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=RegExp(`^\\/\\/`+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,`i`)),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":`http:`,"ftp:":`http:`,"//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=RegExp(`^`+n.re.src_auth+`(?:localhost|(?:(?:`+n.re.src_domain+`)\\.)+`+n.re.src_domain_root+`)`+n.re.src_port+n.re.src_host_terminator+n.re.src_path,`i`)),n.re.no_http.test(r)?t>=3&&e[t-3]===`:`||t>=3&&e[t-3]===`/`?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=RegExp(`^`+n.re.src_email_name+`@`+n.re.src_host_strict,`i`)),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},f=`a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]`,p=`biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф`.split(`|`);function m(e){e.__index__=-1,e.__text_cache__=``}function h(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function g(){return function(e,t){t.normalize(e)}}function _(e){var t=e.re=dv()(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(f),n.push(t.src_xn),t.src_tlds=n.join(`|`);function r(e){return e.replace(`%TLDS%`,t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),`i`),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),`i`),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),`i`),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),`i`);var l=[];e.__compiled__={};function u(e,t){throw Error(`(LinkifyIt) Invalid schema "`+e+`": `+t)}Object.keys(e.__schemas__).forEach(function(t){var n=e.__schemas__[t];if(n!==null){var r={validate:null,link:null};if(e.__compiled__[t]=r,a(n)){o(n.validate)?r.validate=h(n.validate):s(n.validate)?r.validate=n.validate:u(t,n),s(n.normalize)?r.normalize=n.normalize:n.normalize?u(t,n):r.normalize=g();return}if(i(n)){l.push(t);return}u(t,n)}}),l.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[``]={validate:null,normalize:g()};var d=Object.keys(e.__compiled__).filter(function(t){return t.length>0&&e.__compiled__[t]}).map(c).join(`|`);e.re.schema_test=RegExp(`(^|(?!_)(?:[><|]|`+t.src_ZPCc+`))(`+d+`)`,`i`),e.re.schema_search=RegExp(`(^|(?!_)(?:[><|]|`+t.src_ZPCc+`))(`+d+`)`,`ig`),e.re.pretest=RegExp(`(`+e.re.schema_test.source+`)|(`+e.re.host_fuzzy_test.source+`)|@`,`i`),m(e)}function v(e,t){var n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function y(e,t){var n=new v(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function b(e,t){if(!(this instanceof b))return new b(e,t);t||u(e)&&(t=e,e={}),this.__opts__=n({},l,t),this.__index__=-1,this.__last_index__=-1,this.__schema__=``,this.__text_cache__=``,this.__schemas__=n({},d,e),this.__compiled__={},this.__tlds__=p,this.__tlds_replaced__=!1,this.re={},_(this)}b.prototype.add=function(e,t){return this.__schemas__[e]=t,_(this),this},b.prototype.set=function(e){return this.__opts__=n(this.__opts__,e),this},b.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,i,a,o,s,c,l;if(this.re.schema_test.test(e)){for(s=this.re.schema_search,s.lastIndex=0;(t=s.exec(e))!==null;)if(i=this.testSchemaAt(e,t[2],s.lastIndex),i){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}}return this.__opts__.fuzzyLink&&this.__compiled__[`http:`]&&(c=e.search(this.re.host_fuzzy_test),c>=0&&(this.__index__<0||c<this.__index__)&&(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(a=n.index+n[1].length,(this.__index__<0||a<this.__index__)&&(this.__schema__=``,this.__index__=a,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__[`mailto:`]&&(l=e.indexOf(`@`),l>=0&&(r=e.match(this.re.email_fuzzy))!==null&&(a=r.index+r[1].length,o=r.index+r[0].length,(this.__index__<0||a<this.__index__||a===this.__index__&&o>this.__last_index__)&&(this.__schema__=`mailto:`,this.__index__=a,this.__last_index__=o))),this.__index__>=0},b.prototype.pretest=function(e){return this.re.pretest.test(e)},b.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},b.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(y(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(y(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},b.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse(),_(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,_(this),this)},b.prototype.normalize=function(e){e.schema||(e.url=`http://`+e.url),e.schema===`mailto:`&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:`+e.url)},b.prototype.onCompile=function(){},t.exports=b})),pv=n((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),r=e&&e.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a=e(r),o=0;o<a.length;o++)a[o]!=="default"&&t(i,r,a[o]);return n(i,r),i}})(),i=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=g;var o=i(av()),s=ov(),c=i(fv()),l=r(a());function u(e,t=!1){return e=(0,s.escapeCarriageReturn)(_(e)),o.default.ansiToJson(e,{json:!0,remove_empty:!0,use_classes:t})}function d(e){let t=``;return e.bg&&(t+=`${e.bg}-bg `),e.fg&&(t+=`${e.fg}-fg `),e.decoration&&(t+=`ansi-${e.decoration} `),t===``?null:(t=t.substring(0,t.length-1),t)}function f(e){let t={};switch(e.bg&&(t.backgroundColor=`rgb(${e.bg})`),e.fg&&(t.color=`rgb(${e.fg})`),e.decoration){case`bold`:t.fontWeight=`bold`;break;case`dim`:t.opacity=`0.5`;break;case`italic`:t.fontStyle=`italic`;break;case`hidden`:t.visibility=`hidden`;break;case`strikethrough`:t.textDecoration=`line-through`;break;case`underline`:t.textDecoration=`underline`;break;case`blink`:t.textDecoration=`blink`}return t}function p(e,t,n,r){let i=t?null:f(n),a=t?d(n):null;return e?e===`fuzzy`?h(n,r,i,a):m(n,r,i,a):l.createElement(`span`,{style:i,key:r,className:a},n.content)}function m(e,t,n,r){let i=[],a=/(\s|^)(https?:\/\/(?:www\.|(?!www))[^\s.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/g,o=0,s;for(;(s=a.exec(e.content))!==null;){let[,t,n]=s,r=s.index+t.length;r>o&&i.push(e.content.substring(o,r));let c=n.startsWith(`www.`)?`http://${n}`:n;i.push(l.createElement(`a`,{key:o,href:c,target:`_blank`},`${n}`)),o=a.lastIndex}return o<e.content.length&&i.push(e.content.substring(o)),l.createElement(`span`,{style:n,key:t,className:r},i)}function h(e,t,n,r){let i=(0,c.default)({fuzzyEmail:!1}).tlds([`io`],!0);if(!i.pretest(e.content))return l.createElement(`span`,{style:n,key:t,className:r},e.content);let a=i.match(e.content);if(!a)return l.createElement(`span`,{style:n,key:t,className:r},e.content);let o=[e.content.substring(0,a[0]?.index)];return a.forEach((t,n)=>{o.push(l.createElement(`a`,{href:t.url,target:`_blank`,key:n},e.content.substring(t.index,t.lastIndex))),a[n+1]&&o.push(e.content.substring(a[n].lastIndex,a[n+1]?.index))}),a[a.length-1].lastIndex!==e.content.length&&o.push(e.content.substring(a[a.length-1].lastIndex,e.content.length)),l.createElement(`span`,{style:n,key:t,className:r},o)}function g(e){let{className:t,useClasses:n,children:r,linkify:i}=e;return l.createElement(`code`,{className:t},u(r??``,n??!1).map(p.bind(null,i??!1,n??!1)))}function _(e){let t=e;do e=t,t=e.replace(/[^\n]\x08/gm,``);while(t.length<e.length);return e}})),mv=t(n(((e,t)=>{t.exports=pv().default}))(),1),hv=(0,U.createContext)(``),gv=({className:e,...t})=>(0,Q.jsx)(`div`,{className:l(`flex items-center justify-between gap-2 border-b bg-muted/30 px-3 py-2`,e),...t}),_v=({children:e,className:t,...n})=>(0,Q.jsxs)(`div`,{className:l(`flex min-w-0 items-center gap-2 text-xs text-muted-foreground`,t),...n,children:[(0,Q.jsx)(ei,{className:`size-3.5 shrink-0`}),e??`Output`]}),vv=({className:e,...t})=>(0,Q.jsx)(`div`,{className:l(`flex shrink-0 items-center gap-2`,e),...t}),yv=e=>(0,Q.jsx)(Y_,{value:(0,U.useContext)(hv),label:`Copy output`,...e}),bv=({className:e,...t})=>(0,Q.jsx)(`div`,{className:l(`max-h-96 overflow-auto p-3 font-mono text-xs/relaxed`,e),...t,children:(0,Q.jsx)(`pre`,{className:`m-0 whitespace-pre-wrap break-words`,children:(0,Q.jsx)(mv.default,{children:(0,U.useContext)(hv)})})}),xv=({output:e,title:t=`Terminal`,children:n,className:r,...i})=>(0,Q.jsx)(hv.Provider,{value:e,children:(0,Q.jsx)(`div`,{className:l(`not-prose min-w-0 overflow-hidden rounded-md border bg-background text-foreground`,r),...i,children:n??(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(gv,{children:[(0,Q.jsx)(_v,{children:t}),(0,Q.jsx)(vv,{children:(0,Q.jsx)(yv,{})})]}),(0,Q.jsx)(bv,{})]})})}),Sv=P(be),Cv=({value:e})=>{if(e===null)return(0,Q.jsx)(`span`,{className:`text-muted-foreground`,children:`None`});if(sn(V)(e))return(0,Q.jsx)(`span`,{className:`block max-h-48 overflow-auto whitespace-pre-wrap wrap-anywhere`,children:e});if(sn(Ee)(e))return(0,Q.jsx)(`span`,{children:e?`Yes`:`No`});if(sn(Pe)(e))return(0,Q.jsx)(`span`,{className:`font-mono`,children:e});let t=sn(Sv)(e)?e.map((e,t)=>({label:`Item ${t+1}`,value:e})):Object.entries(e).map(([e,t])=>({label:e,value:t}));return t.length===0?(0,Q.jsx)(`span`,{className:`text-muted-foreground`,children:`Empty`}):(0,Q.jsxs)(R_,{children:[(0,Q.jsxs)(z_,{render:(0,Q.jsx)(b,{variant:`ghost`,size:`sm`,className:`h-auto gap-1 px-0 py-0 text-muted-foreground data-[panel-open]:[&_svg]:rotate-90`}),children:[(0,Q.jsx)(pr,{"aria-hidden":`true`}),t.length,` `,t.length===1?`entry`:`entries`]}),(0,Q.jsx)(B_,{className:`mt-2 border-l pl-3`,children:(0,Q.jsx)(wv,{fields:t})})]})},wv=({fields:e})=>(0,Q.jsx)(`dl`,{className:`space-y-3 text-xs/relaxed`,children:e.map(({label:e,value:t},n)=>(0,Q.jsxs)(`div`,{className:`grid min-w-0 grid-cols-[minmax(5rem,1fr)_minmax(0,3fr)] gap-3`,children:[(0,Q.jsx)(`dt`,{className:`text-muted-foreground wrap-anywhere`,children:e}),(0,Q.jsx)(`dd`,{className:`min-w-0`,children:(0,Q.jsx)(Cv,{value:t})})]},`${e}:${n}`))}),Tv=({sections:e,category:t})=>e.map((e,n)=>(0,Q.jsx)(`div`,{className:`min-w-0`,children:ee(e,{Code:({label:e,text:n,language:r})=>t===`command`&&r===`text`?(0,Q.jsx)(xv,{output:n,title:e}):(0,Q.jsx)(ev,{code:n,language:r,showLineNumbers:t!==`read`&&(r===`typescript`||r===`diff`),children:(0,Q.jsxs)(tv,{children:[(0,Q.jsx)(nv,{className:`wrap-anywhere`,children:e}),(0,Q.jsx)(rv,{children:(0,Q.jsx)(iv,{})})]})}),Text:({label:e,text:t})=>(0,Q.jsx)(`section`,{"aria-label":e,children:(0,Q.jsx)(hh,{children:t})}),Fields:({label:e,fields:t})=>(0,Q.jsx)(`section`,{"aria-label":e,children:(0,Q.jsx)(wv,{fields:t})})})},`${e.label}:${n}`)),Ev=O(V,be),Dv=B({type:R([`text`,`inputText`]),text:V}),Ov=e=>sn(Ev)(e)?e:{},$=e=>sn(V)(e)?e:void 0,kv=e=>{if(e===`cwd`)return`Working directory`;if(e===`durationMs`)return`Duration (ms)`;let t=e.replace(/([a-z])([A-Z])/gu,`$1 $2`).replaceAll(`_`,` `).toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)},Av=(e,t,n=`text`)=>({_tag:`Code`,label:e,text:t,language:n}),jv=(e,t,n=[])=>{let r=Object.entries(t).filter(([e])=>!n.includes(e)).map(([e,t])=>({label:kv(e),value:t}));return r.length===0?[]:[{_tag:`Fields`,label:e,fields:r}]},Mv=(e,t,n=`text`)=>{if(e==null)return[];if(sn(V)(e))return[Av(t,e,n)];if(Array.isArray(e))return e.flatMap(e=>sn(Dv)(e)?[Av(t,e.text,n)]:Mv(e,t,n));if(!sn(Ev)(e))return[{_tag:`Fields`,label:t,fields:[{label:`Value`,value:e}]}];let r=[],i={};for(let[a,o]of Object.entries(e))a===`content`&&Array.isArray(o)?r.push(...Mv(o,t,n)):[`text`,`stdout`,`stderr`,`aggregatedOutput`,`message`].includes(a)?r.push(...Mv(o,a===`text`?t:kv(a),n)):a===`error`?r.push(...Mv(o,`Error`)):i[a]=o;return[...r,...jv(t,i)]},Nv=B({oldText:V,newText:V}),Pv=B({path:V,diff:V,kind:B({type:V})}),Fv=et(P(Pv)),Iv=jt.check(Dt(1)),Lv=e=>/\.[cm]?tsx?$/iu.test(e)?`typescript`:/\.json$/iu.test(e)?`json`:`text`,Rv=e=>Mv(e,`Confirmation`).map(e=>e._tag===`Code`?{_tag:`Text`,label:e.label,text:e.text}:e),zv=(e,t,n)=>{let r=Ov(e),i=Ov(t),a=Fv(i.changes??r.changes),o=$(r.path)??$(r.file_path),s=sn(Iv)(r.offset)?r.offset:void 0,c=sn(Iv)(r.limit)?r.limit:void 0,l=s??(r.offset===void 0?1:void 0),u=n===`read`&&(s!==void 0||c!==void 0)?[l===void 0?``:`From line ${l}`,c===void 0?``:`up to ${c} ${c===1?`line`:`lines`}`].filter(e=>e!==``).join(` · `):``,d=[o??`File details unavailable`,u].filter(e=>e!==``).join(` · `),f=$(Ov(i.details).patch)??$(Ov(i.details).diff),p=et(P(Nv))(r.edits),m=ae(p,()=>sn(V)(r.old_string)&&sn(V)(r.new_string)?[{oldText:r.old_string,newText:r.new_string}]:[]);return{activity:{_tag:`Files`,operation:i.type===`fileChange`||r.type===`fileChange`?`change`:n,paths:pe(a,{onNone:()=>o===void 0?[]:[o],onSome:e=>e.map(({path:e})=>e)})},title:{read:`Read file`,edit:`Edit file`,write:`Write file`}[n],subject:n===`read`?d:o??pe(a,{onNone:()=>`File details unavailable`,onSome:e=>e.length===1?e[0]?.path??`File details unavailable`:`${e.length} files`}),input:[...jv(`Options`,r,[`path`,`file_path`,`edits`,`old_string`,`new_string`,`content`,`changes`,`type`,`id`,`status`,...n===`read`&&s!==void 0?[`offset`]:[],...n===`read`&&c!==void 0?[`limit`]:[]]),...(f===void 0?m:[]).flatMap(({oldText:e,newText:t},n)=>[Av(m.length===1?`Before`:`Before ${n+1}`,e,Lv(o??``)),Av(m.length===1?`After`:`After ${n+1}`,t,Lv(o??``))]),...sn(V)(r.content)?[Av(`Content`,r.content,Lv(o??``))]:[],...t===void 0?pe(Fv(r.changes),{onNone:()=>[],onSome:e=>e.map(({path:e,diff:t})=>Av(e,t,`diff`))}):[]],output:pe(Fv(i.changes),{onNone:()=>f===void 0?n===`read`?Mv(t,o??`Output`,Lv(o??``)):Rv(t):[Av(o??`Changes`,f,`diff`),...Rv(Object.fromEntries(Object.entries(i).filter(([e])=>e!==`details`))),...jv(`Metadata`,Ov(i.details),[`patch`,`diff`])],onSome:e=>e.map(({path:e,diff:t,kind:n})=>Av(`${e} · ${n.type}`,t,`diff`))})}},Bv=e=>{switch(e.toLowerCase()){case`bash`:case`powershell`:case`shell`:case`command`:return`command`;case`read`:return`read`;case`edit`:case`file_change`:return`edit`;case`write`:return`write`;case`grep`:case`glob`:case`find`:case`ls`:case`web_search`:return`search`;case`subagent`:case`agent`:case`task`:return`agent`;default:return`tool`}},Vv=({input:e,output:t})=>{let n=Ov(e??t),r=Ov(t),i=$(n.command)??$(r.command);return{activity:{_tag:`Command`,command:i},title:`Command`,subject:i??`Command details unavailable`,input:[...i===void 0?[]:[Av(`Command`,i,`bash`)],...jv(`Options`,n,[`command`,`type`,`id`,`status`,`aggregatedOutput`,`exitCode`,`durationMs`,`processId`,`source`,`commandActions`])],output:r.type===`commandExecution`?[...Mv(r.aggregatedOutput,`Output`),...jv(`Execution`,r,[`type`,`id`,`status`,`command`,`cwd`,`aggregatedOutput`,`processId`,`source`,`commandActions`])]:Mv(t,`Output`)}},Hv=({input:e,output:t,name:n})=>{let r=Ov(e??t),i=Ov(t),a=Ov(r.action);return{activity:{_tag:`Search`},title:n.toLowerCase()===`ls`?`List files`:`Search`,subject:$(r.pattern)??$(r.query)??$(a.query)??$(a.url)??$(r.path)??`Search details unavailable`,input:jv(`Search`,r,[`type`,`id`]),output:i.type===`webSearch`?jv(`Search`,i,[`type`,`id`]):Mv(t,`Results`)}},Uv=({input:e,output:t})=>{let n=Ov(e),r=$(n.task)??$(n.prompt);return{activity:{_tag:`Delegation`},title:`Delegate`,subject:$(n.description)??r??`Delegated task`,input:[...r===void 0?[]:[{_tag:`Text`,label:`Task`,text:r}],...jv(`Agent`,n,[`task`,`prompt`])],output:Mv(t,`Report`).map(e=>e._tag===`Code`?{_tag:`Text`,label:e.label,text:e.text}:e)}},Wv=({input:e,output:t,name:n})=>{let r=Ov(e),i=Ov(t),a=r.type===`mcpToolCall`||r.type===`dynamicToolCall`||i.type===`mcpToolCall`||i.type===`dynamicToolCall`,o=a?r.arguments??i.arguments:e;return{activity:{_tag:`Tool`},title:(a?[$(r.server)??$(i.server)??$(r.namespace)??$(i.namespace),$(r.tool)??$(i.tool)].filter(e=>e!==void 0).join(` · `):n)||n,subject:sn(Ev)(o)?`${Object.keys(o).length} parameters`:sn(V)(o)?o:`Tool details`,input:Mv(o,`Parameters`),output:a?[...Mv(i.result??i.contentItems,`Output`),...Mv(i.error,`Error`)]:Mv(t,`Output`)}},Gv=e=>{let t={name:e.name,input:pe(e.start,{onNone:()=>void 0,onSome:({input:e})=>e}),output:ee(e.state,{Running:()=>void 0,Stopped:()=>void 0,Finished:({output:e})=>e,Error:({output:e})=>e})},n=Bv(e.name);return{category:n,...{command:Vv,read:({input:e,output:t})=>zv(e,t,`read`),edit:({input:e,output:t})=>zv(e,t,`edit`),write:({input:e,output:t})=>zv(e,t,`write`),search:Hv,agent:Uv,tool:Wv}[n](t)}},Kv=(e,t)=>{let n=new Map(e);if(t._tag===`Item`){let r=e.get(t.key);n.delete(t.key),n.set(t.key,{open:t.open,groupOpen:t.open||r?.groupOpen===!0})}else for(let r of t.keys)n.delete(r),n.set(r,{open:e.get(r)?.open===!0,groupOpen:t.open});return n},qv=(e,t)=>t.some(t=>e.get(t)?.groupOpen===!0),Jv=(0,U.createContext)(null),Yv=({children:e,initialState:t=new Map,onInspect:n})=>{let[r,i]=(0,U.useReducer)(Kv,t),a=(0,U.useCallback)(e=>{e.open&&n?.(),i(e)},[n]);return(0,Q.jsx)(Jv.Provider,{value:{state:r,change:a,reveal:i},children:e})},Xv=()=>{let e=(0,U.useContext)(Jv);if(e===null)throw Error(`TranscriptDisclosureProvider is required`);return e},Zv={command:ti,read:Xr,edit:Qr,write:Yr,search:Zr,agent:ni,tool:ri},Qv=({entry:e})=>{let{scrollToMessage:t}=Hg(),n=Xv(),r=Gv(e),i=Zv[r.category],a=e.state,o=a._tag===`Finished`?`Completed`:a._tag,s=r.category===`edit`&&r.output.some(e=>e._tag===`Code`&&e.language===`diff`),c=(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Tv,{sections:r.input,category:r.category}),He(e.start)&&(0,Q.jsx)(`p`,{className:`text-muted-foreground`,children:`Load earlier history to see this call’s input.`})]}),l=pe(e.start,{onNone:()=>``,onSome:({receivedAt:e})=>{if(a._tag!==`Finished`&&a._tag!==`Error`)return``;let t=Date.parse(a.receivedAt)-Date.parse(e);return!Number.isFinite(t)||t<0?``:t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}});return(0,Q.jsxs)(G_,{"data-transcript-id":e.key,open:n.state.get(e.key)?.open===!0,className:`motion-safe:animate-in motion-safe:fade-in`,onOpenChange:r=>{r&&t(e.key,{align:`nearest`,behavior:`instant`}),n.change({_tag:`Item`,key:e.key,open:r})},children:[(0,Q.jsx)(K_,{title:r.title,status:o,icon:(0,Q.jsx)(i,{"aria-hidden":`true`}),description:r.subject,"aria-label":`${r.title}: ${r.subject} · ${o}`,children:l!==``&&(0,Q.jsx)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:l})}),(0,Q.jsxs)(q_,{children:[!s&&c,(0,Q.jsx)(`div`,{"data-transcript-id":`${e.key}:result`,className:`space-y-3`,children:r.output.length>0?(0,Q.jsx)(Tv,{sections:r.output,category:r.category}):(0,Q.jsx)(J_,{title:a._tag===`Error`?`Error`:`Result`,children:(0,Q.jsx)(`p`,{className:`text-muted-foreground`,children:a._tag===`Running`?`Waiting for a result…`:a._tag===`Stopped`?`The session ended before this tool returned a result.`:`No output was recorded.`})})}),s&&c,(0,Q.jsxs)(R_,{children:[(0,Q.jsxs)(z_,{render:(0,Q.jsx)(b,{variant:`ghost`,size:`sm`,className:`gap-1 px-0 text-muted-foreground data-[panel-open]:[&_svg]:rotate-90`}),children:[(0,Q.jsx)(pr,{"aria-hidden":`true`}),`Raw details`]}),(0,Q.jsxs)(B_,{className:`space-y-3 pt-2`,children:[pe(e.start,{onNone:()=>null,onSome:({input:e})=>(0,Q.jsx)(Tv,{category:`tool`,sections:[{_tag:`Code`,label:`Input payload`,text:JSON.stringify(e,null,2),language:`json`}]})}),(a._tag===`Finished`||a._tag===`Error`)&&(0,Q.jsx)(Tv,{category:`tool`,sections:[{_tag:`Code`,label:`Output payload`,text:JSON.stringify(a.output,null,2),language:`json`}]})]})]})]})]})},$v=e=>{let t=e?.trim().replace(/[ \t]+/gu,` `)??``,n=/^(?:npm|yarn|bun|pnpm(?: --filter (?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*)?)(?: run)? (test|build)$/u.exec(t)?.[1];return n===`test`||/^(?:vitest run|pytest|python3? -m pytest|cargo test|go test(?: \.\/\.\.\.)?|node --test)$/u.test(t)?`tests`:n===`build`?`build`:`command`},ey=e=>{switch(e._tag){case`Files`:return e.operation;case`Command`:return $v(e.command);default:return e._tag}},ty=56,ny=(e,t)=>{let n=e.slice(-57).split(`/`);for(let r=1;r<n.length;r++){let i=n.slice(-r).join(`/`);if(t.every(t=>t===e||t!==i&&!t.endsWith(`/${i}`)))return i}return e.length<=ty?e:void 0},ry=(e,t,n)=>{let r=[...new Set(t.flatMap(e=>e._tag===`Files`?e.paths:[]))],i={read:`read`,edit:`edited`,write:`wrote`,change:`changed`}[e.operation];if(t.some(e=>e._tag===`Files`&&(e.paths.length===0||e.paths.some(e=>e.trim()===``)))){let n=e.operation;return`${t.length} file ${n}${t.length===1?``:`s`}`}let a=`${i} ${r.length} ${r.length===1?`file`:`files`}`;if(r.length>2)return a;let o=[];for(let e of r){let t=ny(e,n);if(t===void 0)return a;o.push(t)}let s=o.join(`, `),c=o.every(e=>e.trim()!==``&&!/[^\p{L}\p{N} ._@()+/-]/u.test(e));return s.length<=ty&&c?`${i} ${s}`:a},iy=(e,t,n)=>{let r=t.length,i=r===1?``:`s`;switch(e._tag){case`Files`:return ry(e,t,n);case`Command`:{let t=$v(e.command);return t===`tests`?`ran tests${r===1?``:` ${r} times`}`:t===`build`?`ran ${r===1?`a build`:`${r} builds`}`:`ran ${r} command${i}`}case`Search`:return r===1?`searched`:`searched ${r} times`;case`Delegation`:return`delegated ${r} task${i}`;case`Tool`:return`${r} tool call${i}`}},ay=e=>{let t=e.tools.map(e=>Gv(e).activity),n=[...new Set(t.flatMap(e=>e._tag===`Files`?e.paths:[]))],r=new Map;for(let e of t){let t=ey(e),n=r.get(t);n===void 0?r.set(t,[e]):n.push(e)}let i=[...r.values()],a=i.slice(0,2).map(e=>iy(e[0],e,n)),o=i.slice(2).reduce((e,t)=>e+t.length,0);o>0&&a.push(`${o} more ${o===1?`call`:`calls`}`);let s=a.join(` · `);return s.charAt(0).toUpperCase()+s.slice(1)},oy=e=>e._tag===`Tool`&&(e.state._tag===`Finished`||e.state._tag===`Error`),sy=(e,t)=>{let n=[],r=[],i,a=()=>{let[e,t,...i]=r;e!==void 0&&t!==void 0?n.push({_tag:`ToolGroup`,key:`tool-group:${e.key}`,tools:[e,t,...i]}):e!==void 0&&n.push(e),r=[]};for(let o of e){let e=t.get(o.key);if(!oy(o)||e===void 0){a(),n.push(o),i=void 0;continue}i!==e&&a(),i=e,r.push(o)}return a(),n},cy=e=>{let t=new Map(e.sessions.flatMap(e=>e.entries.map(t=>[t.key,e.key])));return sy(e.items,t).map(e=>e._tag===`Session`?{...e,activity:d_(e),entries:sy(e.entries,t)}:e)},ly=({group:e})=>{let{state:t,change:n}=Xv(),{scrollToMessage:r}=Hg(),i=e.tools.map(e=>e.key),a=e.tools.filter(e=>e.state._tag===`Error`).length;return(0,Q.jsxs)(R_,{"data-transcript-id":e.key,open:qv(t,i),onOpenChange:t=>{t&&r(e.key,{align:`nearest`,behavior:`instant`}),n({_tag:`Group`,keys:i,open:t})},className:`min-w-0`,children:[(0,Q.jsxs)(z_,{render:(0,Q.jsx)(b,{variant:`ghost`,size:`sm`,className:`-mx-2 h-auto w-[calc(100%+1rem)] justify-start gap-2 border-0 whitespace-normal px-2 py-1 text-left text-muted-foreground data-[panel-open]:[&_svg:first-child]:rotate-90`}),children:[(0,Q.jsx)(pr,{"aria-hidden":`true`,className:`shrink-0 transition-transform`}),(0,Q.jsx)(`span`,{className:`min-w-0 break-words`,children:ay(e)}),a>0&&(0,Q.jsxs)(`span`,{className:`shrink-0 text-destructive`,children:[`· `,a,` `,a===1?`error`:`errors`]}),(0,Q.jsxs)(`span`,{className:`sr-only`,children:[` · `,e.tools.length,` completed tools`]})]}),(0,Q.jsx)(B_,{className:`space-y-2 pl-3 pt-2`,children:e.tools.map(e=>(0,Q.jsx)(n_,{messageId:e.key,className:`-mx-2 px-2`,children:(0,Q.jsx)(Qv,{entry:e})},e.key))})]})},uy=e=>`'${e.replaceAll(`'`,`'\\''`)}'`,dy={claude:ue(`claude --resume`),codex:ue(`codex resume --`),pi:Zt()},fy=({session:e})=>{let t=Sn({resume:dy[e.session.brain.harness],saved:e.harnessSession});if(He(t))return(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No saved harness session recorded.`});let{resume:n,saved:r}=t.value,i=`cd -- ${uy(r.cwd)} && ${n} ${uy(r.id)}`;return(0,Q.jsxs)(`div`,{className:`space-y-2 text-xs`,children:[(0,Q.jsxs)(`p`,{className:`wrap-anywhere text-muted-foreground`,children:[`Harness session: `,(0,Q.jsx)(`span`,{className:`font-mono`,children:r.id})]}),(0,Q.jsxs)(`p`,{className:`wrap-anywhere text-muted-foreground`,children:[`Worker worktree: `,(0,Q.jsx)(`span`,{className:`font-mono`,children:r.cwd})]}),(0,Q.jsx)(ev,{code:i,language:`bash`,children:(0,Q.jsxs)(tv,{children:[(0,Q.jsx)(nv,{children:`Resume on worker`}),(0,Q.jsx)(Y_,{value:i,label:`Copy resume command`})]})}),(0,Q.jsx)(`p`,{className:`text-muted-foreground`,children:`Run on the same worker with the same harness account. Requires its worktree and saved session files; Attempt cleanup removes the worktree.`})]})},py=({receivedAt:e})=>{let t=Math.max(0,Date.now()-Date.parse(e)),n=t<6e4?`now`:t<36e5?`${Math.floor(t/6e4)}m ago`:t<864e5?`${Math.floor(t/36e5)}h ago`:`${Math.floor(t/864e5)}d ago`;return(0,Q.jsx)(`time`,{dateTime:e,title:e,className:`shrink-0 font-mono tabular-nums text-muted-foreground`,children:n})},my=({entry:e})=>(0,Q.jsx)(V_,{"data-transcript-id":e.key,className:`motion-safe:animate-in motion-safe:fade-in`,children:(0,Q.jsxs)(H_,{children:[(0,Q.jsxs)(U_,{className:l(`justify-between gap-3 px-0`,e.isError&&`text-destructive`),children:[(0,Q.jsx)(`span`,{children:e.label}),(0,Q.jsx)(py,{receivedAt:e.receivedAt})]}),e.detail!==``&&(e.format===`markdown`?(0,Q.jsx)(hh,{children:e.detail}):(0,Q.jsx)(`p`,{className:l(`text-xs/relaxed whitespace-pre-wrap wrap-anywhere`,e.isError?`text-destructive`:`text-muted-foreground`),children:e.detail}))]})}),hy=({entry:e})=>e._tag===`ToolGroup`?(0,Q.jsx)(ly,{group:e}):e._tag===`Tool`?(0,Q.jsx)(Qv,{entry:e}):(0,Q.jsx)(my,{entry:e}),gy=(e,t)=>e._tag===`Session`||(e._tag===`ToolGroup`?t!==`messages`:u_(e,t)),_y=({session:e,filter:t,runId:n})=>{let{scrollToMessage:r}=Hg(),{state:i,change:a}=Xv(),o=e.entries.filter(e=>gy(e,t)),s=e.activity;return(0,Q.jsxs)(R_,{"data-transcript-id":e.key,open:i.get(e.key)?.open===!0,className:`min-w-0 rounded-md border`,onOpenChange:t=>{t&&r(e.key,{align:`nearest`,behavior:`instant`}),a({_tag:`Item`,key:e.key,open:t})},children:[(0,Q.jsxs)(z_,{"aria-label":`${e.session.agent} activity · ${s}`,render:(0,Q.jsx)(b,{variant:`ghost`,size:`sm`,className:`h-auto w-full flex-wrap justify-between gap-3 p-2 text-left data-[panel-open]:[&_svg]:rotate-90`}),children:[(0,Q.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1.5 font-mono`,children:[(0,Q.jsx)(pr,{"aria-hidden":`true`,className:`shrink-0 transition-transform`}),(0,Q.jsxs)(`span`,{className:`truncate`,children:[e.session.agent,` activity`]})]}),(0,Q.jsx)(on,{variant:`outline`,className:l(`h-auto max-w-full whitespace-normal wrap-anywhere`,e.status===`Live`&&`text-run-active`),children:s})]}),(0,Q.jsxs)(B_,{className:`space-y-3 px-3 pb-3`,children:[(0,Q.jsxs)(`p`,{className:`font-mono text-[0.625rem] text-muted-foreground`,children:[e.session.brain.harness,` · `,e.session.brain.model,` ·`,` `,e.session.brain.effort]}),(0,Q.jsx)(fy,{session:e}),o.length===0?(0,Q.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`No `,t,` in this session.`]}):o.map(e=>(0,Q.jsx)(n_,{messageId:e.key,className:e._tag===`ToolGroup`||e._tag===`Tool`?`-mx-2 px-2`:void 0,children:(0,Q.jsx)(hy,{entry:e})},e.key)),e.status===`Live`&&(0,Q.jsx)(g_,{runId:n,attemptId:e.attemptId,target:new un({sessionId:e.session.id}),paused:e.paused})]})]})},vy=({projection:e,filter:t,runId:n})=>{let r=(0,U.useMemo)(()=>cy(e),[e]).filter(e=>gy(e,t));return r.length===0?(0,Q.jsx)(n_,{messageId:`empty`,children:(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.items.length===0?`No transcript events yet.`:`No ${t} in the loaded transcript.`})}):(0,Q.jsx)(Q.Fragment,{children:r.map(e=>(0,Q.jsx)(n_,{messageId:e.key,className:e._tag===`ToolGroup`||e._tag===`Tool`?`-mx-2 px-2`:void 0,children:e._tag===`Session`?(0,Q.jsx)(_y,{session:e,filter:t,runId:n}):(0,Q.jsx)(hy,{entry:e})},e.key))})},yy=(e,t)=>{let n=Math.max(0,Math.floor((t-Date.parse(e))/1e3));if(n<60)return`${n}s`;let r=Math.floor(n/60);return r<60?`${r}m ${n%60}s`:`${Math.floor(r/60)}h ${r%60}m`},by=e=>{if(e.status!==`Live`)return{label:e.status,detail:``,since:Zt()};let t=[...e.entries].reverse().find(e=>e._tag===`Tool`&&e.state._tag===`Running`);if(t?._tag!==`Tool`)return{label:`Working`,detail:``,since:Zt()};let n=Gv(t);return{label:{command:`Running command`,read:`Reading file`,edit:`Editing file`,write:`Writing file`,search:`Searching`,agent:`Delegating`,tool:`Running ${n.title}`}[n.category],detail:n.subject,since:z(t.start,({receivedAt:e})=>e)}},xy=({events:e,attempts:t})=>{let n=(0,U.useMemo)(()=>l_(e,t),[e,t]),r=[...t].sort((e,t)=>t.number-e.number)[0],i=n.sessions.filter(({attemptId:e})=>e===r?.id),a=i.find(({session:e})=>e._tag===`ParentSession`),o=i.filter(({session:e})=>e._tag===`ChildSession`),s=r!==void 0&&(a===void 0?!n.terminalAttempts.has(r.id):a.status===`Live`),[c,u]=(0,U.useState)(Date.now);if((0,U.useEffect)(()=>{if(!s)return;let e=setInterval(()=>u(Date.now()),1e3);return()=>clearInterval(e)},[s]),r===void 0)return null;let d=a===void 0?{label:s?`Awaiting parent activity`:`Ended`,detail:``,since:Zt()}:by(a),f=[...e].reverse().find(e=>e.attemptId===r.id&&e.direction===`outbound`&&(e.payload._tag!==`SessionEvent`||e.payload.event._tag!==`PoolRateLimitsUpdated`)),p=[`Live`,`Finished`,`Stopped`].flatMap(e=>{let t=o.filter(t=>t.status===e).length;return t===0?[]:[`${t} ${e.toLowerCase()}`]});return(0,Q.jsxs)(`section`,{"aria-label":`Current activity`,className:`shrink-0 space-y-1.5 border-b px-4 py-2 text-xs sm:px-6`,children:[(0,Q.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,Q.jsxs)(`div`,{role:`status`,className:`min-w-0 space-y-1.5`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-1.5 text-muted-foreground`,children:[(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:l(`size-1.5 shrink-0 rounded-full`,s?`bg-run-active`:`bg-muted-foreground`)}),(0,Q.jsxs)(`span`,{children:[`Attempt `,r.number,` · `,a?.session.agent??`Parent`,` · `,d.label]})]}),d.detail!==``&&(0,Q.jsx)(`p`,{className:`truncate font-mono`,title:d.detail,children:d.detail})]}),pe(d.since,{onNone:()=>null,onSome:e=>(0,Q.jsx)(`span`,{"aria-live":`off`,className:`shrink-0 font-mono tabular-nums text-muted-foreground`,title:`Started ${e}`,children:yy(e,c)})})]}),(p.length>0||s&&f!==void 0)&&(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-3 gap-y-1 text-muted-foreground`,children:[p.length>0&&(0,Q.jsxs)(`span`,{children:[`Children: `,p.join(` · `)]}),s&&f!==void 0&&(0,Q.jsxs)(`span`,{"aria-live":`off`,children:[`Last activity `,yy(f.receivedAt,c),` ago`]})]})]})},Sy=(e,t)=>({key:e.key,sequence:e.sequence,latestSequence:e.latestSequence,isError:e._tag===`Tool`?e.state._tag===`Error`:e.isError,childKey:t,isTool:e._tag===`Tool`}),Cy=e=>e.items.flatMap(e=>e._tag===`Session`?e.entries.map(t=>Sy(t,e.key)):[Sy(e,null)]).sort((e,t)=>e.sequence-t.sequence),wy=e=>({through:e,readThrough:e,keys:new Set}),Ty=(e,t,n)=>{let r=new Set(e.keys);for(let n of t)(e.readThrough===null||n.latestSequence>e.readThrough)&&r.add(n.key);let i=n!==null&&(e.through===null||n>e.through)?n:e.through;return i===e.through&&r.size===e.keys.size?e:{through:i,readThrough:e.readThrough,keys:r}},Ey=e=>e.keys.size===0&&e.readThrough===e.through?e:wy(e.through),Dy=({errors:e,selectedKey:t,earlier:n,onSelect:r})=>{let i=e[0],a=e.at(-1);if(i===void 0||a===void 0)return null;let o=e.findIndex(e=>e.key===t),s=e[o-1]??a,c=e[o+1]??i,l=`${e.length} ${n?`loaded `:``}${e.length===1?`error`:`errors`}`;return(0,Q.jsxs)(`div`,{role:`group`,"aria-label":`Conversation errors`,className:`flex items-center gap-1`,children:[(0,Q.jsx)(`span`,{role:`status`,className:`text-xs tabular-nums text-destructive`,children:o<0?l:`${o+1} of ${l}`}),(0,Q.jsx)(b,{variant:`ghost`,size:`icon-sm`,"aria-label":`Previous error`,title:`Previous error`,onClick:()=>r(s),children:(0,Q.jsx)(Gr,{"aria-hidden":`true`})}),(0,Q.jsx)(b,{variant:`ghost`,size:`icon-sm`,"aria-label":`Next error`,title:`Next error`,onClick:()=>r(c),children:(0,Q.jsx)(Ur,{"aria-hidden":`true`})})]})},Oy=({target:e,filter:t,onRevealed:n})=>{let{state:r,reveal:i}=Xv(),{scrollToMessage:a}=Hg();return(0,U.useEffect)(()=>{if(e===null||t!==`all`)return;let o=[...e.childKey===null?[]:[e.childKey],...e.isTool?[e.key]:[]].filter(t=>r.get(t)?.open!==!0||e.isTool&&t===e.key&&r.get(t)?.groupOpen!==!0);if(o.length>0){for(let e of o)i({_tag:`Item`,key:e,open:!0});return}let s,c=requestAnimationFrame(()=>{a(e.key,{align:`start`,behavior:`instant`})&&(s=requestAnimationFrame(n))});return()=>{cancelAnimationFrame(c),s!==void 0&&cancelAnimationFrame(s)}},[e,t,r,i,a,n]),null},ky=({count:e,active:t,filter:n,pendingLatest:r,revealingError:i,onObserve:a,onLatest:o,onReachedLatest:s})=>{let{end:c}=Ug(),{scrollToEnd:l}=Hg();return(0,U.useEffect)(()=>{a(t&&n===`all`&&!c&&!i)},[t,n,c,i,a]),(0,U.useLayoutEffect)(()=>{r&&n===`all`&&l({behavior:`instant`})&&s()},[r,n,l,s]),e>0?(0,Q.jsxs)(b,{variant:`secondary`,size:`sm`,className:`absolute bottom-4 inset-s-1/2 -translate-x-1/2 gap-1.5 border border-border shadow-sm`,onClick:o,children:[(0,Q.jsx)(Ur,{"aria-hidden":`true`}),e,` new `,e===1?`update`:`updates`]}):(0,Q.jsxs)(r_,{size:`sm`,className:`gap-1.5 shadow-sm`,"aria-label":`Jump to latest`,onClick:e=>{e.preventDefault(),o()},children:[(0,Q.jsx)(Ur,{"aria-hidden":`true`}),` Jump to latest`]})},Ay=V.check(Gt(1),ot(1024)),jy=Pe.check(en(),Dt(0)),My=B({_tag:ke(`Anchor`),key:Ay,surface:R([`row`,`group`,`result`]),sequence:Lt,offset:Pe.check(Ht({minimum:-1e6,maximum:1e6}))}),Ny=re([B({_tag:ke(`Latest`)}),My]),Py=B({filter:R([`all`,`messages`,`tools`]),disclosures:P(B({key:Ay,open:Ee,groupOpen:Ee})).check(ot(200)),position:Ny,readThrough:_e(Lt)}),Fy=B({runId:Ay,savedAt:jy,bookmark:Py}),Iy=ht(B({version:ke(1),runs:P(Fy).check(ot(20))})),Ly=et(Iy,{onExcessProperty:`error`}),Ry=S(Iy),zy=`usine:conversation-readers:v1`,By=2592e6,Vy=512e3,Hy=e=>{let t=()=>{let t=e().getItem(zy);return t===null||t.length>Vy?[]:pe(Ly(t),{onNone:()=>[],onSome:e=>e.runs})},n=(e,t,n,r)=>At(Se({try:n,catch:()=>({operation:e,runId:t})}).pipe(yn(e=>I(`Conversation reader storage unavailable`,e).pipe(fn(r))),Oe(`ConversationReader.${e}`,{attributes:{runId:t}})));return{read:(e,r)=>n(`read`,e,()=>{let n=t().find(t=>t.runId===e);return n!==void 0&&r>=n.savedAt&&r-n.savedAt<By?n.bookmark:null},null),write:(r,i,a)=>{n(`write`,r,()=>{let n=t().filter(e=>e.runId!==r&&a>=e.savedAt&&a-e.savedAt<By);n.push({runId:r,savedAt:a,bookmark:i}),n.sort((e,t)=>t.savedAt-e.savedAt),n.splice(20);let o=Ry({version:1,runs:n});for(;o.length>Vy&&n.length>1;)n.pop(),o=Ry({version:1,runs:n});e().setItem(zy,o)},void 0)}}},Uy=(e,t)=>{let n=[],r=(e,i,a)=>{if(e._tag===`ToolGroup`){if(t===`messages`)return;let a=e.tools.map(e=>e.key);n.push({key:e.tools[0].key,sequence:e.tools[0].sequence,surface:`group`,elementId:e.key,messageId:e.key,openKeys:i,groupKeys:a});for(let t of e.tools)r(t,i,a);return}if(e._tag!==`Session`&&!u_(e,t))return;let o={key:e.key,sequence:e.sequence,surface:`row`,elementId:e.key,messageId:e.key,openKeys:i,groupKeys:a};if(n.push(o),e._tag===`Session`)for(let t of e.entries)r(t,[...i,e.key],[]);e._tag===`Tool`&&n.push({...o,surface:`result`,elementId:`${e.key}:result`,openKeys:[...i,e.key]})};for(let t of cy(e))r(t,[],[]);return n},Wy=(e,t,n)=>{let r=t.find(t=>t.surface===e.surface&&(t.key===e.key||t.surface===`group`&&t.groupKeys.includes(e.key)));if(r!==void 0&&r.sequence<=e.sequence)return{_tag:`Row`,row:r,offset:e.offset,fallback:!1};if(n===`available`)return{_tag:`Earlier`};let i=t.find(t=>t.key===e.key&&t.surface===`row`)??t.filter(e=>e.surface!==`result`).reduce((t,n)=>t===void 0||Math.abs(n.sequence-e.sequence)<Math.abs(t.sequence-e.sequence)?n:t,void 0);return i===void 0?{_tag:`Empty`}:{_tag:`Row`,row:i,offset:0,fallback:!0}},Gy=({target:e,rows:t,history:n,viewportRef:r,active:i,onRestored:a})=>{let{scrollToMessage:o,scrollToStart:s}=Hg(),{state:c,reveal:l}=Xv(),u=(0,U.useRef)(new Set),[d,f]=(0,U.useState)(0);(0,U.useLayoutEffect)(()=>{let t=r.current;if(e===null||t===null)return;let n=new ResizeObserver(()=>f(e=>e+1));return n.observe(t),()=>n.disconnect()},[e,r]);let[p,m]=(0,U.useState)(null);return(0,U.useEffect)(()=>{if(e===null||!i)return;let d=u.current.size>=20,f=Wy(e,t,n.earlier!==void 0&&n.error===null&&!d?`available`:`exhausted`);if(f._tag===`Earlier`){if(n.loading||n.earlier===void 0)return;let e=JSON.stringify([n.earlier.attemptId,n.earlier.before]);if(u.current.has(e))return;u.current.add(e),n.load();return}if(n.loading&&(f._tag===`Empty`||f._tag===`Row`&&f.fallback))return;if(f._tag===`Row`){let e=f.row.openKeys.filter(e=>c.get(e)?.open!==!0),t=f.row.surface!==`group`&&f.row.groupKeys.length>0&&!qv(c,f.row.groupKeys);if(e.length>0||t){for(let t of e)l({_tag:`Item`,key:t,open:!0});t&&l({_tag:`Group`,keys:f.row.groupKeys,open:!0});return}}let p,h=requestAnimationFrame(()=>{let e=r.current;if(e!==null&&e.clientHeight!==0){if(f._tag===`Empty`)s({behavior:`instant`});else{if(!o(f.row.messageId,{align:`start`,behavior:`instant`}))return;let t=Array.from(e.querySelectorAll(`[data-transcript-id]`)).find(e=>e.getAttribute(`data-transcript-id`)===f.row.elementId);if(t===void 0||t.getBoundingClientRect().height===0)return;let n=t.getBoundingClientRect(),r=Math.min(e.clientHeight-24,Math.max(24-n.height,f.offset));e.scrollTop+=n.top-e.getBoundingClientRect().top-e.clientTop-r}(f._tag===`Empty`||f.fallback)&&m(n.earlier===void 0?`Your saved row is no longer available. Showing the nearest remaining activity.`:`Your saved place is outside the loaded history. Showing nearby activity; use Load earlier to continue back.`),p=requestAnimationFrame(a)}});return()=>{cancelAnimationFrame(h),p!==void 0&&cancelAnimationFrame(p)}},[e,d,t,n,r,i,c,l,o,s,a]),p===null?null:(0,Q.jsx)(`p`,{role:`status`,className:`px-4 py-2 text-xs text-muted-foreground`,children:p})},Ky=({runId:e,filter:t,readThrough:n,rows:r,viewportRef:i,active:a,restoring:o,allowLatest:s,initialPosition:c})=>{let{state:l}=Xv(),u=(0,U.useRef)(null),d=(0,U.useRef)(c),f=(0,U.useRef)(void 0),p=(0,U.useRef)(Hy(()=>window.localStorage)),m=(e=i.current)=>{if(!a||o||e===null||e.clientHeight===0)return;let c=f_(e),f=r.find(e=>e.elementId===c?.getAttribute(`data-transcript-id`));s&&e.scrollHeight-e.clientHeight-e.scrollTop<=8?d.current={_tag:`Latest`}:f!==void 0&&c!==void 0&&(d.current={_tag:`Anchor`,key:f.key,surface:f.surface,sequence:f.sequence,offset:c.getBoundingClientRect().top-e.getBoundingClientRect().top-e.clientTop}),u.current={filter:t,readThrough:n,position:d.current,disclosures:[...l].slice(-200).map(([e,t])=>({key:e,...t}))}},h=(0,U.useRef)(m);return(0,U.useLayoutEffect)(()=>{h.current=m,m()}),(0,U.useLayoutEffect)(()=>{let e=i.current;return()=>h.current(e)},[a,e,i]),(0,U.useEffect)(()=>{let t=()=>{clearTimeout(f.current),f.current=void 0,u.current!==null&&p.current.write(e,u.current,Date.now())},n=()=>{h.current(),clearTimeout(f.current),f.current=setTimeout(t,500)},r=()=>{h.current(),t()},a=()=>{document.visibilityState===`hidden`&&r()},o=i.current;return o?.addEventListener(`scroll`,n,{passive:!0}),window.addEventListener(`pagehide`,r),document.addEventListener(`visibilitychange`,a),()=>{o?.removeEventListener(`scroll`,n),window.removeEventListener(`pagehide`,r),document.removeEventListener(`visibilitychange`,a),t()}},[e,i]),(0,U.useEffect)(()=>{if(!a||o)return;let t=requestAnimationFrame(()=>{h.current(),clearTimeout(f.current),f.current=setTimeout(()=>{u.current!==null&&p.current.write(e,u.current,Date.now())},500)});return()=>cancelAnimationFrame(t)},[e,t,n,r,l,a,o,s]),null},qy=({runId:e,events:t,sessionState:n,attempts:r,earlier:i,loadEarlier:a,loadingEarlier:o,earlierError:s,state:c,active:l})=>{let[u]=(0,U.useState)(()=>Hy(()=>window.localStorage).read(e,Date.now())),[d,f]=(0,U.useState)(u?.position._tag===`Anchor`?u.position:null),[p,m]=(0,U.useState)(d===null),[h,g]=(0,U.useState)(d===null?`end`:`start`),_=(0,U.useCallback)(()=>f(null),[]),v=(0,U.useCallback)(()=>{f(null),m(!1)},[]),y=()=>{f(null),m(!0)},[x,S]=(0,U.useState)(u?.filter??`all`),C=(0,U.useRef)(null),w=(0,U.useMemo)(()=>l_(t,r,n),[t,r,n]),T=w.sessions.find(e=>e.session._tag===`ParentSession`&&e.status===`Live`),E=(0,U.useMemo)(()=>Cy(w),[w]),D=(0,U.useMemo)(()=>Uy(w,x),[w,x]),O=t.reduce((e,t)=>e===null||t.sequence>e?t.sequence:e,null),[k,A]=(0,U.useState)(()=>wy(u===null?O:u.readThrough)),[j,M]=(0,U.useState)(null),[N,P]=(0,U.useState)(null),[F,I]=(0,U.useState)(!1),ee=(0,U.useCallback)(e=>{A(t=>{let n=Ty(t,E,O);return e&&d===null&&p?Ey(n):n})},[E,O,d,p]),L=e=>{v(),g(`start`),S(`all`),M(e.key),P(e),I(!1)},te=()=>{y(),g(`end`),S(`all`),I(!0),P(null)},R=(0,U.useCallback)(()=>I(!1),[]),ne=(0,U.useCallback)(()=>P(null),[]),[,z]=(0,U.useReducer)(e=>e+1,0);return(0,U.useEffect)(()=>{let e=setInterval(z,6e4);return()=>clearInterval(e)},[]),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center justify-between gap-2 border-b px-4 py-2 sm:px-6`,children:[(0,Q.jsx)(qh,{"aria-label":`Conversation filter`,children:[`all`,`messages`,`tools`].map(e=>(0,Q.jsx)(b,{size:`sm`,variant:x===e?`secondary`:`ghost`,"aria-pressed":x===e,onClick:()=>{y(),g(`end`),S(e),P(null),I(!1)},children:{all:`Everything`,messages:`Messages`,tools:`Tools`}[e]},e))}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Q.jsx)(Dy,{errors:E.filter(e=>e.isError),selectedKey:j,earlier:i!==void 0,onSelect:L}),(0,Q.jsx)(`span`,{className:`text-muted-foreground`,children:c===`Running`?`Live`:c})]})]}),(0,Q.jsx)(xy,{events:t,attempts:r}),(0,Q.jsx)(Yv,{initialState:new Map(u?.disclosures.map(({key:e,...t})=>[e,t])),onInspect:v,children:(0,Q.jsx)(Qg,{autoScroll:l&&d===null&&p,defaultScrollPosition:h,scrollEdgeThreshold:8,children:(0,Q.jsxs)($g,{className:`min-h-0 flex-1`,children:[(0,Q.jsx)(p_,{active:l&&d===null,viewportRef:C,revision:t.length+r.filter(e=>e.outcome!==null).length,children:(0,Q.jsx)(e_,{ref:C,"aria-label":`Run conversation`,preserveScrollOnPrepend:!1,onWheel:y,onTouchMove:y,onPointerDown:e=>{e.target===e.currentTarget?y():f(null)},onKeyDown:e=>{let t=e.key===` `&&e.target instanceof Element&&e.target.closest(`button, [role="button"]`)!==null;if(e.key===`Enter`||t){f(null);return}!e.defaultPrevented&&[`ArrowUp`,`ArrowDown`,`Home`,`End`,`PageUp`,`PageDown`,` `].includes(e.key)&&y()},children:(0,Q.jsxs)(t_,{className:`gap-4 px-4 pt-4 pb-16 sm:px-6`,children:[i!==void 0&&(0,Q.jsx)(n_,{messageId:`history`,className:`flex justify-center`,children:(0,Q.jsx)(b,{variant:`outline`,size:`sm`,className:`self-center`,disabled:o,onClick:a,children:o?`Loading…`:`Load earlier`})}),s!==null&&(0,Q.jsx)(n_,{messageId:`history-error`,children:(0,Q.jsx)(Sr,{message:s})}),(0,Q.jsx)(vy,{projection:w,filter:x,runId:e})]})})}),(0,Q.jsx)(Gy,{target:d,rows:D,viewportRef:C,active:l,history:{earlier:i,loading:o,error:s,load:a},onRestored:_}),(0,Q.jsx)(Ky,{runId:e,filter:x,rows:D,viewportRef:C,readThrough:k.readThrough,active:l,restoring:d!==null,allowLatest:p,initialPosition:u?.position??{_tag:`Latest`}}),(0,Q.jsx)(Oy,{target:N,filter:x,onRevealed:ne}),(0,Q.jsx)(ky,{count:k.keys.size,active:l,filter:x,pendingLatest:F,revealingError:N!==null,onObserve:ee,onLatest:te,onReachedLatest:R})]})},x)}),c===`Running`&&T!==void 0&&(0,Q.jsx)(`div`,{className:`shrink-0 px-4 pb-4 sm:px-6`,children:(0,Q.jsx)(g_,{runId:e,attemptId:T.attemptId,target:new Yt,paused:T.paused},T.attemptId)})]})},Jy=async(e,t)=>{let n=await t(e);if(e._tag===`ColdTranscriptRequest`)return n;let r=n.transcript;for(;!n.run.canCancel;){let e=n.transcript.at(-1);if(e===void 0)break;n=await t(new Ut({after:e.sequence})),r=Hh(r,n.transcript)}return new Ae({...n,transcript:r})};function Yy({className:e,size:t=`default`,...n}){return(0,Q.jsxs)(`div`,{className:l(`group/native-select relative w-fit has-[select:disabled]:opacity-50`,e),"data-slot":`native-select-wrapper`,"data-size":t,children:[(0,Q.jsx)(`select`,{"data-slot":`native-select`,"data-size":t,className:`h-7 w-full min-w-0 appearance-none rounded-md border border-input bg-input/20 py-0.5 pr-6 pl-2 text-xs/relaxed transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-[size=sm]:h-6 data-[size=sm]:text-[0.625rem] dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,...n}),(0,Q.jsx)(Tn,{className:`pointer-events-none absolute top-1/2 right-1.5 size-3.5 -translate-y-1/2 text-muted-foreground select-none group-data-[size=sm]/native-select:size-3 group-data-[size=sm]/native-select:-translate-y-[calc(--spacing(1.25))]`,"aria-hidden":`true`,"data-slot":`native-select-icon`})]})}function Xy({className:e,...t}){return(0,Q.jsx)(`option`,{"data-slot":`native-select-option`,className:l(`bg-[Canvas] text-[CanvasText]`,e),...t})}var Zy=({run:e,close:t})=>{let[n,r]=(0,U.useState)(e.task),[i,a]=(0,U.useState)(e.agent),o=(0,U.useId)(),s=rt(),c=wn({queryKey:[`agents`],queryFn:()=>Vt(e=>e.agents())}),l=fr({mutationFn:()=>Vt(t=>t.editAndRetry({params:{runId:e.id},payload:new $e({task:pn.make(n),agent:bn.make(i)})})),onSuccess:async()=>{await Promise.all([s.invalidateQueries({queryKey:[`run`,e.id]}),s.invalidateQueries({queryKey:[`overview`]})]),t()}});return(0,Q.jsxs)(`form`,{className:`max-h-[60vh] shrink-0 space-y-3 overflow-y-auto border-b p-4 sm:px-6`,onSubmit:e=>{e.preventDefault(),!l.isPending&&n.trim().length>0&&c.data?.some(e=>e===i)&&l.mutate()},children:[(0,Q.jsx)(`h3`,{className:`font-heading text-sm`,children:`Edit and retry`}),(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Later attempts use this task and agent until you edit them again.`}),(0,Q.jsx)(h_,{htmlFor:`${o}-task`,children:`Task`}),(0,Q.jsx)(m_,{id:`${o}-task`,value:n,onChange:e=>r(e.target.value),rows:7,disabled:l.isPending}),(0,Q.jsx)(h_,{htmlFor:`${o}-agent`,children:`Agent`}),(0,Q.jsxs)(Yy,{id:`${o}-agent`,value:i,onChange:e=>a(e.target.value),disabled:l.isPending||c.isPending,children:[!c.data?.includes(e.agent)&&(0,Q.jsxs)(Xy,{value:e.agent,disabled:!0,children:[e.agent,` · unavailable`]}),c.data?.map(e=>(0,Q.jsx)(Xy,{value:e,children:e},e))]}),(0,Q.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Q.jsx)(b,{type:`submit`,size:`sm`,disabled:l.isPending||n.trim().length===0||!c.data?.some(e=>e===i),children:`Save and retry`}),(0,Q.jsx)(b,{type:`button`,size:`sm`,variant:`ghost`,disabled:l.isPending,onClick:t,children:`Close editor`})]}),c.isError&&(0,Q.jsx)(Sr,{message:c.error.message}),l.isError&&(0,Q.jsx)(Sr,{message:l.error.message})]})},Qy=e=>{let t=Math.max(0,Date.now()-Date.parse(e));return t<6e4?`now`:t<36e5?`${Math.floor(t/6e4)}m`:t<864e5?`${Math.floor(t/36e5)}h`:`${Math.floor(t/864e5)}d`},$y=({runId:e,open:t,close:n})=>{let r=rt(),[i,a]=(0,U.useState)(!1),[o,s]=(0,U.useState)(`conversation`),[c,l]=(0,U.useState)(!1),u=wn({queryKey:[`run`,e],queryFn:async()=>{let t=[`run`,e],n=r.getQueryData(t)?.transcript.at(-1)?.sequence,i=await Jy(n===void 0?new gt:new Ut({after:n}),t=>Vt(n=>n.detail({params:{runId:e},query:t}))),a=r.getQueryData(t);return n===void 0||a===void 0?i:new Ae({...i,transcript:Hh(a.transcript,i.transcript),earlierTranscript:a.earlierTranscript})},structuralSharing:!1,enabled:t,refetchInterval:e=>e.state.data?.run.canCancel===!0&&1e3}),d=fr({mutationFn:t=>Vt(n=>n[t]({params:{runId:e}})),onSuccess:async()=>{a(!1),await Promise.all([r.invalidateQueries({queryKey:[`overview`]}),r.invalidateQueries({queryKey:[`run`,e]})])}}),f=fr({mutationFn:t=>Vt(n=>n.detail({params:{runId:e},query:new cn(t)})),onSuccess:(t,n)=>{let i=[`run`,e];r.setQueryData(i,e=>e===void 0?e:Wh(e,t,n))}}),p=u.data?.run,m=u.data?.earlierTranscript.at(-1),h=Gh(u.data?.transcript??[]);return(0,Q.jsx)(xr,{open:t,onOpenChange:e=>{e||n()},children:(0,Q.jsxs)(vr,{side:`right`,"aria-label":`Run detail`,className:`gap-0 data-[side=right]:w-full data-[side=right]:sm:max-w-3xl`,children:[(0,Q.jsxs)(mr,{className:`shrink-0 gap-2 border-b px-4 py-4 pr-12 sm:px-6 sm:pr-14`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Q.jsx)(Tr,{children:p?.loop??`Loading…`}),p!==void 0&&(0,Q.jsx)(Er,{state:p.state}),p?.loopPaused&&(0,Q.jsx)(on,{variant:`outline`,children:`Loop paused`})]}),(0,Q.jsx)(_r,{className:`font-mono wrap-anywhere`,children:p?.repository??`Loading Run details…`}),p!==void 0&&(0,Q.jsx)(yh,{run:p})]}),u.isError&&(0,Q.jsx)(Sr,{className:`mx-4 my-3`,message:u.error.message}),p!==void 0&&u.data!==void 0&&(0,Q.jsxs)(Q.Fragment,{children:[(p.canApprove||p.canRetry||p.canCancel)&&(0,Q.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2 border-b px-4 py-2 sm:px-6`,children:[(0,Q.jsx)(`span`,{className:`mr-auto text-muted-foreground`,children:p.state===`Queued`?`Waiting for a free worker`:p.agent}),p.canApprove&&(0,Q.jsx)(b,{size:`sm`,disabled:d.isPending,onClick:()=>d.mutate(`approve`),children:`Approve`}),p.canRetry&&(0,Q.jsx)(b,{size:`sm`,variant:`secondary`,disabled:d.isPending,onClick:()=>d.mutate(`retry`),children:`Retry`}),p.canCancel&&(0,Q.jsx)(b,{size:`sm`,variant:i?`destructive`:`outline`,disabled:d.isPending,onClick:()=>i?d.mutate(`cancel`):a(!0),children:i?`Confirm cancel`:`Cancel Run`}),p.canRetry&&(0,Q.jsx)(b,{size:`sm`,variant:`outline`,onClick:()=>l(!0),children:`Edit and retry`}),i&&(0,Q.jsx)(b,{size:`sm`,variant:`ghost`,disabled:d.isPending,onClick:()=>a(!1),children:`Keep running`})]}),d.isError&&(0,Q.jsx)(Sr,{className:`mx-4 my-3`,message:d.error.message}),c&&p.canRetry&&(0,Q.jsx)(Zy,{run:p,close:()=>l(!1)},p.id),(0,Q.jsxs)(Lh,{value:o,onValueChange:s,className:`min-h-0 flex-1 gap-0`,children:[(0,Q.jsxs)(zh,{variant:`line`,className:`w-full shrink-0 justify-start gap-2 border-b px-4 sm:px-6`,"aria-label":`Run views`,children:[(0,Q.jsx)(Bh,{value:`conversation`,className:`flex-none`,children:`Conversation`}),(0,Q.jsx)(Bh,{value:`task`,className:`flex-none`,children:`Task`}),(0,Q.jsx)(Bh,{value:`event`,className:`flex-none`,children:`Event`}),(0,Q.jsxs)(Bh,{value:`attempts`,className:`flex-none`,children:[`Attempts (`,p.attempts.length,`)`]})]}),(0,Q.jsx)(Vh,{value:`conversation`,keepMounted:!0,className:`flex min-h-0 flex-col data-[hidden]:hidden`,children:(0,Q.jsx)(qy,{runId:e,events:u.data.transcript,sessionState:u.data.sessionState,attempts:p.attempts,earlier:m,loadEarlier:()=>{m!==void 0&&f.mutate(m)},loadingEarlier:f.isPending,earlierError:f.isError?f.error.message:null,state:p.state,active:t&&o===`conversation`},e)}),(0,Q.jsxs)(Vh,{value:`task`,className:`min-h-0 overflow-y-auto p-4 sm:p-6`,children:[(0,Q.jsx)(`h3`,{className:`mb-3 font-heading text-sm`,children:`Task`}),(0,Q.jsx)(hh,{className:`max-w-prose`,children:p.task})]}),(0,Q.jsxs)(Vh,{value:`event`,className:`min-h-0 overflow-y-auto p-4 sm:p-6`,children:[(0,Q.jsx)(`h3`,{className:`mb-3 font-heading text-sm`,children:`Triggering Event`}),(0,Q.jsx)(`p`,{className:`mb-3 font-mono text-muted-foreground wrap-anywhere`,children:u.data.eventDedupKey}),(0,Q.jsx)(`pre`,{className:`font-mono text-xs/relaxed whitespace-pre-wrap wrap-anywhere`,children:JSON.stringify(u.data.eventPayload,null,2)})]}),(0,Q.jsxs)(Vh,{value:`attempts`,className:`min-h-0 overflow-y-auto p-4 sm:p-6`,children:[(0,Q.jsxs)(`p`,{className:`mb-4 font-mono text-muted-foreground wrap-anywhere`,children:[`Run `,p.id]}),h.length>0&&(0,Q.jsxs)(`div`,{className:`mb-4 space-y-2`,children:[(0,Q.jsx)(`h3`,{className:`font-heading text-sm`,children:`Account rate windows`}),(0,Q.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:h.map(e=>(0,Q.jsxs)(on,{variant:`outline`,className:`font-mono`,children:[e.pool,e.primaryUsedPercent!==null&&` · primary ${e.primaryUsedPercent}% used`,e.secondaryUsedPercent!==null&&` · secondary ${e.secondaryUsedPercent}% used`]},e.pool))})]}),p.attempts.length===0&&(0,Q.jsx)(`p`,{className:`text-muted-foreground`,children:`No attempt has started.`}),(0,Q.jsx)(wr,{className:`gap-2`,children:p.attempts.map(e=>(0,Q.jsxs)(yr,{variant:`muted`,size:`sm`,children:[(0,Q.jsxs)(gr,{children:[(0,Q.jsxs)(br,{children:[`Attempt `,e.number]}),(0,Q.jsx)(Er,{state:e.outcome?._tag??`Running`})]}),(0,Q.jsxs)(hr,{children:[(0,Q.jsxs)(Cr,{className:`font-mono`,children:[e.agent,` · `,e.worker,` · `,ar(e.brain),` ·`,` `,Qy(e.startedAt)]}),e.operatorIntervened&&(0,Q.jsx)(on,{variant:`outline`,children:`Operator intervened`}),(0,Q.jsxs)(R_,{children:[(0,Q.jsx)(z_,{render:(0,Q.jsx)(b,{size:`sm`,variant:`ghost`}),children:`Task used by this attempt`}),(0,Q.jsx)(B_,{children:(0,Q.jsx)(hh,{children:e.task})})]}),e.outcome?._tag===`Failed`&&(0,Q.jsxs)(`p`,{className:`text-destructive wrap-anywhere`,children:[(0,Q.jsx)(`strong`,{children:e.outcome.failure._tag}),` — ${$n(e.outcome.failure)}`]})]})]},e.id))}),p.resultMessage!==null&&(0,Q.jsxs)(`section`,{className:`mt-6`,children:[(0,Q.jsx)(`h3`,{className:`mb-3 font-heading text-sm`,children:`Result`}),(0,Q.jsx)(hh,{className:`max-w-prose`,children:p.resultMessage})]})]})]})]})]})})};export{$y as RunDrawer,lo as a,mo as i,ho as n,Fa as o,po as r,ka as s,pf as t};