@eliya-oss/agent-diff 0.1.0-alpha.212 → 0.1.0-alpha.213

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 (34) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/main.js +1 -1
  3. package/dist/web/nitro.json +1 -1
  4. package/dist/web/public/assets/{_deck-CyoyHMyL.js → _deck-BDC_r92m.js} +1 -1
  5. package/dist/web/public/assets/{_point-CYZXMbyL.js → _point-I_vt1otH.js} +1 -1
  6. package/dist/web/public/assets/{index-D3quZsre.js → index-X7OFY5bM.js} +2 -2
  7. package/dist/web/public/assets/{review-Cu9qERg1.js → review-DE0jDEPH.js} +1 -1
  8. package/dist/web/public/assets/{review-block-Bng1Lrgg.js → review-block-CbmQ0t4L.js} +1 -1
  9. package/dist/web/public/assets/{routes-BnF0AJkz.js → routes-CYn3-ePX.js} +1 -1
  10. package/dist/web/public/assets/{viewed-store-DsqSJn2J.js → viewed-store-CuareBUI.js} +1 -1
  11. package/dist/web/server/{_deck-CxY-KSJu.mjs → _deck-x23t7F7l.mjs} +3 -3
  12. package/dist/web/server/{_point-Bl3MEO09.mjs → _point-CaM245BE.mjs} +4 -4
  13. package/dist/web/server/_ssr/{adhoc.functions-PKrFaWO1.mjs → adhoc.functions-CDadmCcu.mjs} +3 -3
  14. package/dist/web/server/_ssr/{createServerRpc-DYHyF6mI.mjs → createServerRpc-Xq42ilNx.mjs} +1 -1
  15. package/dist/web/server/_ssr/{decks.functions-DPok33k1.mjs → decks.functions-BHxu668D.mjs} +3 -3
  16. package/dist/web/server/_ssr/{empty-plugin-adapters-C_GlPYKD.mjs → empty-plugin-adapters-B3CY_z0V.mjs} +1 -1
  17. package/dist/web/server/_ssr/{listener.functions-DeWc_4uW.mjs → listener.functions-DygHonX4.mjs} +4 -4
  18. package/dist/web/server/_ssr/{listener.server-DzZGa8GT.mjs → listener.server-BUJSjrgf.mjs} +14 -3
  19. package/dist/web/server/_ssr/{pull.functions-6Ywbtb50.mjs → pull.functions-Dyi9ubGh.mjs} +2 -2
  20. package/dist/web/server/_ssr/{review-block-BCVuzSG_.mjs → review-block-C-oUK43P.mjs} +4 -4
  21. package/dist/web/server/_ssr/{review-Bj0xIgoW.mjs → review-e0zRsKyC.mjs} +3 -3
  22. package/dist/web/server/_ssr/{review-parts.server-B2XqQUAB.mjs → review-parts.server-j_3LS0HZ.mjs} +2 -2
  23. package/dist/web/server/_ssr/{review-target.server-rsHUeYW_.mjs → review-target.server-DA41RDao.mjs} +9 -1
  24. package/dist/web/server/_ssr/{review.functions-eAVBYvOS.mjs → review.functions-Cvig5BYP.mjs} +4 -4
  25. package/dist/web/server/_ssr/{router-BLRO6kTw.mjs → router-DH6_gEUb.mjs} +89 -37
  26. package/dist/web/server/_ssr/{routes-BovmU9kO.mjs → routes-BP_s9iFs.mjs} +2 -2
  27. package/dist/web/server/_ssr/shortcuts-B7llaLLc.mjs +1 -1
  28. package/dist/web/server/_ssr/ssr.mjs +40 -36
  29. package/dist/web/server/_ssr/{type-hover.functions-DPCO8VcS.mjs → type-hover.functions-B_9iC3Xs.mjs} +3 -3
  30. package/dist/web/server/_ssr/{viewed-store-xn13Ju6x.mjs → viewed-store-RX0hDmiV.mjs} +2 -2
  31. package/dist/web/server/{_tanstack-start-manifest_v-CZLPm-IJ.mjs → _tanstack-start-manifest_v-D8_4kgre.mjs} +8 -8
  32. package/dist/web/server/index.mjs +46 -46
  33. package/package.json +1 -1
  34. package/skills/adiff-web/SKILL.md +2 -1
@@ -1 +1 @@
1
- import{t as e}from"./review-block-Bng1Lrgg.js";import{Y as t}from"./decks.functions-tXNTG2sC.js";import{n}from"./index-D3quZsre.js";var r=t(),i={comments:[],answers:{},statuses:{},task:``,seen:[],revisions:{},stamp:``};function a(e,t){return{id:e,stamp:``,num:``,title:t,section:``,sectionTitle:``,prose:``,options:[],notePlaceholder:void 0,blocks:[]}}function o(){let t=n.useLoaderData();return t.ok?(0,r.jsx)(`main`,{className:`h-dvh safe-page`,children:(0,r.jsx)(e,{blockIndex:0,deck:`~`,isFullPage:!0,live:i,stub:{kind:`review`,title:void 0,branch:t.branch,outline:t.outline},view:a(t.point,t.branch)},`${t.point}|${t.branch}`)}):(0,r.jsxs)(`main`,{className:`mx-auto flex max-w-2xl flex-col gap-2 px-4 py-12`,children:[(0,r.jsx)(`h1`,{className:`text-lg font-semibold`,children:`This review cannot open`}),(0,r.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t.error})]})}export{o as component};
1
+ import{t as e}from"./review-block-CbmQ0t4L.js";import{Y as t}from"./decks.functions-tXNTG2sC.js";import{n}from"./index-X7OFY5bM.js";var r=t(),i={comments:[],answers:{},statuses:{},task:``,seen:[],revisions:{},stamp:``};function a(e,t){return{id:e,stamp:``,num:``,title:t,section:``,sectionTitle:``,prose:``,options:[],notePlaceholder:void 0,blocks:[]}}function o(){let t=n.useLoaderData();return t.ok?(0,r.jsx)(`main`,{className:`h-dvh safe-page`,children:(0,r.jsx)(e,{blockIndex:0,deck:`~`,isFullPage:!0,live:i,stub:{kind:`review`,title:void 0,branch:t.branch,outline:t.outline},view:a(t.point,t.branch)},`${t.point}|${t.branch}`)}):(0,r.jsxs)(`main`,{className:`mx-auto flex max-w-2xl flex-col gap-2 px-4 py-12`,children:[(0,r.jsx)(`h1`,{className:`text-lg font-semibold`,children:`This review cannot open`}),(0,r.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t.error})]})}export{o as component};
@@ -1,4 +1,4 @@
1
- import{n as e,r as t,t as n}from"./rolldown-runtime-XKyaHtl9.js";import{A as r,C as i,D as a,E as o,M as s,N as c,O as l,P as u,S as d,T as f,X as p,Y as m,_ as h,b as g,c as _,g as v,h as y,j as b,k as x,kt as S,l as C,m as w,o as T,p as E,s as D,v as O,w as k,x as A,y as ee}from"./decks.functions-tXNTG2sC.js";import{$ as j,$t as M,A as N,An as P,B as te,Bn as F,C as I,Cn as L,Ct as ne,D as re,Dn as ie,Dt as ae,E as oe,En as se,Et as ce,F as le,Fn as R,Ft as ue,Gn as de,H as fe,Hn as pe,Ht as me,I as he,In as ge,J as _e,Jn as z,K as ve,Kn as ye,L as be,Ln as B,Lt as xe,M as Se,Mn as V,Mt as Ce,N as we,O as Te,Ot as Ee,P as De,Pn as Oe,Pt as ke,Q as Ae,R as je,Rn as H,Rt as Me,S as Ne,St as Pe,T as Fe,Tn as Ie,U as Le,Ut as Re,V as ze,Vn as Be,Wn as Ve,Wt as He,X as Ue,Xt as We,Y as Ge,Yn as Ke,Z as qe,_ as Je,_n as Ye,_t as Xe,a as Ze,an as Qe,at as $e,b as et,bn as tt,bt as nt,c as rt,cn as it,ct as at,dn as ot,dt as st,en as ct,et as lt,f as ut,fn as dt,ft,g as pt,gt as mt,h as ht,hn as gt,i as _t,in as U,it as vt,jn as yt,k as bt,kn as xt,kt as St,l as Ct,ln as wt,lt as Tt,m as Et,mn as Dt,n as Ot,nn as kt,nt as At,on as jt,ot as Mt,p as Nt,pn as Pt,pt as Ft,qn as It,r as Lt,rn as Rt,rt as zt,s as Bt,sn as Vt,st as Ht,t as Ut,tn as Wt,tt as Gt,u as Kt,un as qt,ut as Jt,v as Yt,vn as Xt,vt as Zt,w as Qt,x as $t,xn as W,xt as en,yn as tn,yt as nn,z as rn,zn as an,zt as on}from"./use-window-event-BDUVK1pJ.js";import{C as sn,E as cn,S as ln,T as un,a as dn,b as fn,c as pn,h as mn,l as hn,m as gn,n as _n,o as vn,p as yn,r as bn,t as xn,u as Sn,w as Cn}from"./shortcuts-BsNWbUaT.js";import{C as wn,D as Tn,E as En,O as Dn,S as On,T as kn,_ as An,a as jn,c as Mn,d as Nn,f as Pn,g as Fn,h as In,i as Ln,l as Rn,m as zn,o as Bn,p as Vn,s as Hn,u as Un,v as Wn,w as Gn,x as Kn,y as qn}from"./index-D3quZsre.js";var Jn={name:`arrow-down-to-line`,size:24,node:[[`path`,{d:`M12 17V3`,key:`1cwfxf`}],[`path`,{d:`m6 11 6 6 6-6`,key:`12ii2o`}],[`path`,{d:`M19 21H5`,key:`150jfl`}]]};Jn.node;var Yn=z(Jn),Xn={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};Xn.node;var Zn=z(Xn),Qn={name:`arrow-up-to-line`,size:24,node:[[`path`,{d:`M5 3h14`,key:`7usisc`}],[`path`,{d:`m18 13-6-6-6 6`,key:`1kf1n9`}],[`path`,{d:`M12 7v14`,key:`1akyts`}]]};Qn.node;var $n=z(Qn),er={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};er.node;var tr=z(er),nr={name:`check-check`,size:24,node:[[`path`,{d:`M18 6 7 17l-5-5`,key:`116fxf`}],[`path`,{d:`m22 10-7.5 7.5L13 16`,key:`ke71qq`}]]};nr.node;var rr=z(nr),ir={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};ir.node;var ar=z(ir),or={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};or.node;var sr=z(or),cr={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};cr.node;var lr=z(cr),ur={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};ur.node;var dr=z(ur),fr={name:`chevrons-down-up`,size:24,node:[[`path`,{d:`m7 20 5-5 5 5`,key:`13a0gw`}],[`path`,{d:`m7 4 5 5 5-5`,key:`1kwcof`}]]};fr.node;var pr=z(fr),mr={name:`chevrons-up-down`,size:24,node:[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]};mr.node;var hr=z(mr),gr={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};gr.node;var _r=z(gr),vr={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};vr.node;var yr=z(vr),br={name:`clipboard-copy`,size:24,node:[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2`,key:`4jdomd`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v4`,key:`3hqy98`}],[`path`,{d:`M21 14H11`,key:`1bme5i`}],[`path`,{d:`m15 10-4 4 4 4`,key:`5dvupr`}]]};br.node;var xr=z(br),Sr={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};Sr.node;var Cr=z(Sr),wr={name:`corner-down-left`,size:24,node:[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}],[`path`,{d:`m9 10-5 5 5 5`,key:`1kshq7`}]]};wr.node;var Tr=z(wr),Er={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};Er.node;var Dr=z(Er),Or={name:`eye-off`,size:24,node:[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};Or.node;var kr=z(Or),Ar={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};Ar.node;var jr=z(Ar),Mr={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};Mr.node;var Nr=z(Mr),Pr={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};Pr.node;var Fr=z(Pr),Ir={name:`git-compare`,size:24,node:[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`,key:`19pyzm`}]]};Ir.node;var Lr=z(Ir),Rr={name:`git-pull-request`,size:24,node:[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]};Rr.node;var zr=z(Rr),Br={name:`keyboard`,size:24,node:[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]};Br.node;var Vr=z(Br),Hr={name:`layers-2`,size:24,node:[[`path`,{d:`M13 13.74a2 2 0 0 1-2 0L2.5 8.87a1 1 0 0 1 0-1.74L11 2.26a2 2 0 0 1 2 0l8.5 4.87a1 1 0 0 1 0 1.74z`,key:`15q6uc`}],[`path`,{d:`m20 14.285 1.5.845a1 1 0 0 1 0 1.74L13 21.74a2 2 0 0 1-2 0l-8.5-4.87a1 1 0 0 1 0-1.74l1.5-.845`,key:`byia6g`}]]};Hr.node;var Ur=z(Hr),Wr={name:`layers`,size:24,node:[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]],aliases:[`layers-3`]};Wr.node;var Gr=z(Wr),Kr={name:`list-filter`,size:24,node:[[`path`,{d:`M2 5h20`,key:`1fs1ex`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`path`,{d:`M9 19h6`,key:`456am0`}]]};Kr.node;var qr=z(Kr),Jr={name:`list-ordered`,size:24,node:[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]};Jr.node;var Yr=z(Jr),Xr={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};Xr.node;var Zr=z(Xr),Qr={name:`locate-fixed`,size:24,node:[[`line`,{x1:`2`,x2:`5`,y1:`12`,y2:`12`,key:`bvdh0s`}],[`line`,{x1:`19`,x2:`22`,y1:`12`,y2:`12`,key:`1tbv5k`}],[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`5`,key:`11lu5j`}],[`line`,{x1:`12`,x2:`12`,y1:`19`,y2:`22`,key:`x3vr5v`}],[`circle`,{cx:`12`,cy:`12`,r:`7`,key:`fim9np`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};Qr.node;var $r=z(Qr),ei={name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]};ei.node;var ti=z(ei),ni={name:`message-square-plus`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]};ni.node;var ri=z(ni),ii={name:`messages-square`,size:24,node:[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]};ii.node;var ai=z(ii),oi={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};oi.node;var si=z(oi),ci={name:`pin`,size:24,node:[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]};ci.node;var li=z(ci),ui={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};ui.node;var di=z(ui),fi={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};fi.node;var pi=z(fi),mi={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};mi.node;var hi=z(mi),gi={name:`send`,size:24,node:[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]};gi.node;var _i=z(gi),vi={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};vi.node;var yi=z(vi),bi={name:`sparkle`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}]]};bi.node;var xi=z(bi),Si={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};Si.node;var Ci=z(Si),wi={name:`square-arrow-out-up-right`,size:24,node:[[`path`,{d:`M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6`,key:`y09zxi`}],[`path`,{d:`m21 3-9 9`,key:`mpx6sq`}],[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}]],aliases:[`arrow-up-right-from-square`]};wi.node;var Ti=z(wi),Ei={name:`square-dashed-text`,size:24,node:[[`path`,{d:`M14 21h1`,key:`v9vybs`}],[`path`,{d:`M14 3h1`,key:`1ec4yj`}],[`path`,{d:`M19 3a2 2 0 0 1 2 2`,key:`18rm91`}],[`path`,{d:`M21 14v1`,key:`169vum`}],[`path`,{d:`M21 19a2 2 0 0 1-2 2`,key:`1j7049`}],[`path`,{d:`M21 9v1`,key:`mxsmne`}],[`path`,{d:`M3 14v1`,key:`vnatye`}],[`path`,{d:`M3 9v1`,key:`1r0deq`}],[`path`,{d:`M5 21a2 2 0 0 1-2-2`,key:`sbafld`}],[`path`,{d:`M5 3a2 2 0 0 0-2 2`,key:`y57alp`}],[`path`,{d:`M7 12h10`,key:`b7w52i`}],[`path`,{d:`M7 16h6`,key:`1vyc9m`}],[`path`,{d:`M7 8h8`,key:`1jbsf9`}],[`path`,{d:`M9 21h1`,key:`15o7lz`}],[`path`,{d:`M9 3h1`,key:`1yesri`}]],aliases:[`text-selection`,`text-select`]};Ei.node;var Di=z(Ei),Oi={name:`square-terminal`,size:24,node:[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]],aliases:[`terminal-square`]};Oi.node;var ki=z(Oi),Ai={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};Ai.node;var ji=z(Ai),Mi={name:`text-align-start`,size:24,node:[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M17 19H3`,key:`z6ezky`}]],aliases:[`text`,`align-left`]};Mi.node;var Ni=z(Mi),Pi={name:`text-wrap`,size:24,node:[[`path`,{d:`m16 16-3 3 3 3`,key:`117b85`}],[`path`,{d:`M3 12h14.5a1 1 0 0 1 0 7H13`,key:`18xa6z`}],[`path`,{d:`M3 19h6`,key:`1ygdsz`}],[`path`,{d:`M3 5h18`,key:`1u36vt`}]],aliases:[`wrap-text`]};Pi.node;var Fi=z(Pi),Ii={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};Ii.node;var Li=z(Ii),Ri={name:`user-round`,size:24,node:[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]],aliases:[`user-2`]};Ri.node;var zi=z(Ri),Bi={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Bi.node;var Vi=z(Bi),G=t(S(),1),Hi=0;function Ui(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(Hi);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),ie;let o=requestAnimationFrame(a);return Hi=o,()=>{Hi===o&&(cancelAnimationFrame(o),Hi=0)}}var Wi={inert:new WeakMap,"aria-hidden":new WeakMap},Gi=`data-base-ui-inert`,Ki={inert:new WeakSet,"aria-hidden":new WeakSet},qi=new WeakMap,Ji=0;function Yi(e){return Ki[e]}function Xi(e){return e?It(e)?e.host:Xi(e.parentNode):null}var Zi=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Xi(t);return e.contains(n)?n:null}).filter(e=>e!=null),Qi=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},$i=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{F(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function ea(e,t,n,r,{mark:i=!0}){let a=null;r?a=`inert`:n&&(a=`aria-hidden`);let o=null,s=null,c=Zi(t,e),l=i?$i(t,Qi(c),new Set(c)):[],u=[],d=[];if(a){let e=Wi[a],n=Yi(a);s=n,o=e;let r=Zi(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=c.concat(r);$i(t,Qi(i),new Set(i)).forEach(t=>{let r=t.getAttribute(a),i=r!==null&&r!==`false`,o=(e.get(t)||0)+1;e.set(t,o),u.push(t),o===1&&i&&n.add(t),i||t.setAttribute(a,a===`inert`?``:`true`)})}return i&&l.forEach(e=>{let t=(qi.get(e)||0)+1;qi.set(e,t),d.push(e),t===1&&e.setAttribute(Gi,``)}),Ji+=1,()=>{o&&u.forEach(e=>{let t=(o.get(e)||0)-1;o.set(e,t),t||(!s?.has(e)&&a&&e.removeAttribute(a),s?.delete(e))}),i&&d.forEach(e=>{let t=(qi.get(e)||0)-1;qi.set(e,t),t||e.removeAttribute(Gi)}),--Ji,Ji||(Wi.inert=new WeakMap,Wi[`aria-hidden`]=new WeakMap,Ki.inert=new WeakSet,Ki[`aria-hidden`]=new WeakSet,qi=new WeakMap)}}function ta(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0}=t,a=V(e[0]).body;return ea(e,a,n,r,{mark:i})}var K=m();function na(e,t){let n=pe(Qe(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var ra=20,ia=[];function aa(){ia=ia.filter(e=>e.deref()?.isConnected)}function oa(e){aa(),e&&F(e)!==`body`&&(ia.push(new WeakRef(e)),ia.length>ra&&(ia=ia.slice(-20)))}function sa(){return aa(),ia[ia.length-1]?.deref()}function ca(e){return e?$e(e)?e:Mt(e)[0]||e:null}function la(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=j(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return $e(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function ua(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:y,dataRef:b}=h.context,x=H(()=>b.current.floatingContext?.nodeId),S=i===!1,C=Me(_)&&S,w=Zt(i),T=Zt(a),E=Zt(l),D=Zt(g),O=te(p),k=Le(),A=G.useRef(!1),ee=G.useRef(!1),j=G.useRef(!1),M=G.useRef(null),N=G.useRef(``),P=G.useRef(``),I=G.useRef(null),L=G.useRef(null),ne=xt(I,f,k?.beforeInsideRef),re=xt(L,k?.afterInsideRef),ie=gt(),ae=gt(),oe=Xe(),se=k!=null,R=xe(v),ue=H((e=R)=>e?Mt(e):[]),de=H(()=>m?.().filter(e=>e!=null)??[]);G.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&U(R,Rt(V(R)))&&ue().length===0&&!C&&wt(e)}let t=V(R);return nt(t,`keydown`,e)},[r,R,s,C,ue]),G.useEffect(()=>{if(r||!g)return;let e=V(R);function t(){j.current=!1}function n(e){let t=Qe(e),n=de(),r=U(v,t)||U(_,t)||U(k?.portalNode,t)||n.some(e=>e===t||U(e,t));j.current=!r,P.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(ee.current=!0,ae.start(0,()=>{ee.current=!1}))}function i(){P.current=`keyboard`}return nn(nt(e,`pointerdown`,n,!0),nt(e,`pointerup`,t,!0),nt(e,`pointercancel`,t,!0),nt(e,`keydown`,i,!0),t)},[r,v,_,R,g,k,ae,de]),G.useEffect(()=>{if(r||!c)return;let e=V(R);function t(){ee.current=!0,ae.start(0,()=>{ee.current=!1})}function n(e){let t=Qe(e);$e(t)&&(M.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=Qe(t);s&&n==null&&i!=null&&U(v,i)&&oa(i),queueMicrotask(()=>{let a=x(),c=h.context.triggerElements,l=de(),f=n?.hasAttribute(Ue(`focus-guard`))&&[I.current,L.current,k?.beforeInsideRef.current,k?.afterInsideRef.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,le(d),le(u)].includes(n),p=!(U(_,n)||U(v,n)||U(n,v)||U(k?.portalNode,n)||l.some(e=>e===n||U(e,n))||c.hasMatchingElement(e=>U(e,n))||f||O&&(Ae(O.nodesRef.current,a).find(e=>U(e.context?.elements.floating,n)||U(e.context?.elements.domReference,n))||qe(O.nodesRef.current,a).find(e=>[e.context?.elements.floating,xe(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&R&&la(R),o&&r!==_&&!Jt(i)&&Rt(e)===e.body){if(Ve(R)&&(R.focus(),o===`popup`)){oe.request(()=>{R.focus()});return}let e=ue(),t=M.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||R;Ve(n)&&n.focus()}b.current.insideReactTree?b.current.insideReactTree=!1:(C||!s)&&n&&p&&!ee.current&&(C||n!==sa())&&(A.current=!0,h.setOpen(!1,en(ce,t)))})}function a(){j.current||(b.current.insideReactTree=!0,ie.start(0,()=>{b.current.insideReactTree=!1}))}let l=Ve(_)?_:null;if(v||l)return nn(l&&nt(l,`focusout`,i),l&&nt(l,`pointerdown`,t),v&&nt(v,`focusin`,n),v&&nt(v,`focusout`,i),v&&k&&nt(v,`focusout`,a,!0))},[r,_,v,R,s,O,k,h,c,o,ue,C,x,b,ie,ae,oe,u,d,de]),G.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(k?.portalNode?.querySelectorAll(`[${Ue(`portal`)}]`)||[]),t=(O?qe(O.nodesRef.current,x()):[]).find(e=>Me(e.context?.elements.domReference||null))?.context?.elements.domReference,n=ta([v,...e,I.current,L.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,...de(),t,le(d),le(u),C?_:null].filter(e=>e!=null),{ariaHidden:s||C,mark:!1}),i=ta([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,k,C,O,x,u,d,de]),B(()=>{if(!g||r||!Ve(R))return;N.current=``,P.current=``;let e=V(R),t=Rt(e);queueMicrotask(()=>{let n=w.current,r=typeof n==`function`?n(E.current||``):n;if(r===void 0||r===!1||U(R,t))return;let i=null,a=()=>(i??=ue(R),i[0]||R),o;o=r===!0||r===null?a():le(r),o||=a();let s=U(R,Rt(e));Ui(o,{preventScroll:o===R,shouldFocus(){if(!D.current)return!1;if(s)return!0;let t=Rt(e);return!(t!==o&&U(R,t))}})})},[r,g,R,ue,w,E,D]),B(()=>{if(r||!R)return;let e=V(R),t=Rt(e),n=E.current==null;oa(t);function i(e){if(e.open||(N.current=na(e.nativeEvent,P.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(A.current=!0),e.reason===`outside-press`){if(e.nested)A.current=!1;else if(Vt(e.nativeEvent)||it(e.nativeEvent))A.current=!1;else{let e=!1;V(R).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?A.current=!1:A.current=!0}}}y.on(`openchange`,i);function a(e){let r=T.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&F(t)!==`body`?t:null,s=n?o||a:a||o;return s||=sa()||null,typeof i==`boolean`?s:le(i)||s||null}return()=>{y.off(`openchange`,i);let t=Rt(e),n=de(),r=U(v,t)||n.some(e=>e===t||U(e,t))||O&&Ae(O.nodesRef.current,x(),!1).some(e=>U(e.context?.elements.floating,t)),o=T.current,s=N.current,c=a(s);queueMicrotask(()=>{let n=ca(c),i=typeof o!=`boolean`;if(o&&!A.current&&Ve(n)&&(i||n===t||t===e.body||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}A.current=!1})}},[r,v,R,T,E,y,O,_,x,de]),B(()=>{if(!ot||g||!v)return;let e=Rt(V(v));Ve(e)&&on(e)&&U(v,e)&&e.blur()},[g,v]),B(()=>{if(!r&&k)return k.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{k.setFocusManagerState(null)}},[r,k,s,g,h,c,_]),B(()=>{if(!r&&R)return la(R),()=>{queueMicrotask(aa)}},[r,R]);let fe=!r&&(!s||!C)&&(se||s);return(0,K.jsxs)(G.Fragment,{children:[fe&&(0,K.jsx)(Ft,{"data-type":`inside`,ref:ne,onFocus:e=>{if(s){let e=ue();Ui(e[e.length-1])}else k?.portalNode&&(A.current=!1,vt(e,k.portalNode)?lt(_)?.focus():le(d??k.beforeOutsideRef)?.focus())}}),n,fe&&(0,K.jsx)(Ft,{"data-type":`inside`,ref:re,onFocus:e=>{s?Ui(ue()[0]):k?.portalNode&&(c&&(A.current=!0),vt(e,k.portalNode)?Gt(_)?.focus():le(u??k.afterOutsideRef)?.focus())}})]})}function da(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=ue}=t,l=`rootStore`in e?e.rootStore:e,u=l.context.dataRef,d=G.useRef(void 0),f=Xe(),p=gt(),m=G.useMemo(()=>{function e(e,t,n,r){let i=en(c,t,n);e&&r===`touch`&&s>0?p.start(s,()=>{l.setOpen(!0,i)}):l.setOpen(e,i)}function t(e,t,n){let r=u.current.openEvent,a=l.select(`domReferenceElement`)!==t;return e&&a||!e||!i?!0:r&&o?!n(r.type):!1}return{onPointerDown(e){d.current=jt(e.pointerType,!0)&&it(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(n){let i=d.current,o=n.nativeEvent,s=l.select(`open`);if(n.button!==0||r===`click`||jt(i,!0)&&a)return;let c=t(s,n.currentTarget,e=>e===`click`||e===`mousedown`),u=Qe(o);if(on(u)){e(c,o,u,i);return}let p=n.currentTarget;f.request(()=>{e(c,o,p,i)})},onClick(n){if(r===`mousedown-only`)return;let i=d.current;r===`mousedown`&&i?d.current=void 0:jt(i,!0)&&a||e(t(l.select(`open`),n.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),n.nativeEvent,n.currentTarget,i)},onKeyDown(){d.current=void 0}}},[u,r,a,c,l,o,i,f,p,s]);return G.useMemo(()=>n?{reference:m}:se,[n,m])}var fa=`Escape`;function pa(e){return ot&&e.movementX===0&&e.movementY===0}function ma(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function ha(e,t){return ma(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function ga(e,t,n){return ma(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function _a(e,t,n){return ma(t,n?e===ct:e===Wt,e===M)}function va(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===fa:ma(t,n?e===Wt:e===ct,e===kt)}function ya(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,parentOrientation:_,id:v,resetOnPointerLeave:y=!0,externalTree:b,grid:x}=t,S=x!=null,C=`rootStore`in e?e.rootStore:e,w=C.useState(`open`),T=C.useState(`floatingElement`),E=C.useState(`domReferenceElement`),D=C.context.dataRef,O=xe(T),k=Me(E),A=Zt(O),ee=rn(),j=te(b),M=G.useRef(f),N=G.useRef(o??-1),P=G.useRef(null),F=G.useRef(!0),I=H(e=>{i(N.current===-1?null:N.current,e)}),L=G.useRef(!!T),ne=G.useRef(w),re=G.useRef(!1),ie=G.useRef(!1),ae=G.useRef(null),oe=Zt(h),se=Zt(w),le=Zt(o),R=Zt(y),ue=Xe(),de=Xe(),fe=H(()=>{function e(e){d?j?.events.emit(`virtualfocus`,e):ae.current=Ui(e,{sync:re.current,preventScroll:!0})}let t=n.current[N.current],r=ie.current;t&&e(t),(re.current?e=>e():e=>ue.request(e))(()=>{let i=n.current[N.current]||t;i&&(t||e(i),z&&(r||!F.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});B(()=>{D.current.orientation=g},[D,g]),B(()=>{a&&(w&&T?(N.current=o??-1,M.current&&o!=null&&(ie.current=!0,I())):L.current&&(N.current=-1,I()))},[a,w,T,o,I]),B(()=>{if(a){if(!w)re.current=!1;else if(T){if(r==null){if(re.current=!1,le.current!=null)return;if(L.current&&(N.current=-1,fe()),(!ne.current||!L.current)&&M.current&&(P.current!=null||M.current===!0&&P.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>de.request(e):queueMicrotask)(t),e+=1):(N.current=P.current==null||ga(P.current,g,u)||l?Tt(n):at(n),P.current=null,I())};t()}}else st(n.current,r)||(N.current=r,fe(),ie.current=!1)}}},[a,w,T,r,le,l,n,g,u,I,fe,de]),B(()=>{if(!a||T||!j||d||!L.current)return;let e=j.nodesRef.current,t=e.find(e=>e.id===ee)?.context?.elements.floating,n=Rt(V(E??t??null)),r=e.some(e=>e.context&&U(e.context.elements.floating,n));t&&!r&&F.current&&t.focus({preventScroll:!0})},[a,T,E,j,ee,d]),B(()=>{ne.current=w,L.current=!!T}),B(()=>{w||(P.current=null,M.current=f)},[w,f]);let pe=r!=null,me=H(e=>{if(!se.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(N.current!==t||r!==t)&&(N.current=t,I(e))}),he=H(()=>_??j?.nodesRef.current.find(e=>e.id===ee)?.context?.dataRef?.current.orientation),ge=H(()=>Tt(n,oe.current)),_e=H(e=>{if(F.current=!1,re.current=!0,e.which===229||!se.current&&e.currentTarget===A.current)return;if(l&&va(e.key,g,u,S)){ha(e.key,he())||wt(e),C.setOpen(!1,en(St,e.nativeEvent)),Ve(E)&&(d?j?.events.emit(`virtualfocus`,E):E.focus());return}let t=N.current,r=Tt(n,h),i=at(n,h);if(k||(e.key===`Home`&&(wt(e),N.current=r,I(e)),e.key===`End`&&(wt(e),N.current=i,I(e))),x!=null){let t=x(e,N.current,n,g,c,u,h,r,i);if(t!=null&&(N.current=t,I(e)),g===`both`)return}if(ha(e.key,g)){if(wt(e),w&&!d&&Rt(e.currentTarget.ownerDocument)===e.currentTarget){N.current=ga(e.key,g,u)?r:i,I(e);return}ga(e.key,g,u)?c?t>=i?s&&t!==n.current.length?N.current=-1:(re.current=!1,N.current=r):N.current=Ht(n.current,{startingIndex:t,disabledIndices:h}):N.current=Math.min(i,Ht(n.current,{startingIndex:t,disabledIndices:h})):c?t<=r?s&&t!==-1?N.current=n.current.length:(re.current=!1,N.current=i):N.current=Ht(n.current,{startingIndex:t,decrement:!0,disabledIndices:h}):N.current=Math.max(r,Ht(n.current,{startingIndex:t,decrement:!0,disabledIndices:h})),st(n.current,N.current)&&(N.current=-1),I(e)}}),z=G.useMemo(()=>({onFocus(e){re.current=!0,me(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){pa(e)||(re.current=!0,ie.current=!1,p&&me(e))},onPointerLeave(e){if(!se.current||!F.current||e.pointerType===`touch`)return;re.current=!0;let t=e.relatedTarget;if(p&&!n.current.includes(t)&&R.current&&(ae.current?.(),ae.current=null,N.current=-1,I(e),!d)){let e=A.current,t=Rt(V(e));e&&U(e,t)&&e.focus({preventScroll:!0})}}}),[me,se,A,p,n,I,R,d]),ve=G.useMemo(()=>d&&w&&pe&&{"aria-activedescendant":`${v}-${r}`},[d,w,pe,v,r]),ye=G.useMemo(()=>({...k?{}:ve,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&w&&!d){let t=Qe(e.nativeEvent);if(t&&!U(A.current,t))return;wt(e),C.setOpen(!1,en(ce,e.nativeEvent)),Ve(E)&&E.focus()}else _e(e)},onPointerMove(e){pa(e)||(F.current=!0)}}),[ve,_e,A,k,C,w,d,E]),be=G.useMemo(()=>{function e(e){C.setOpen(!0,en(St,e.nativeEvent,e.currentTarget))}function t(e){f===`auto`&&Vt(e.nativeEvent)&&(M.current=!d)}function n(e){M.current=f,f===`auto`&&it(e.nativeEvent)&&(M.current=!0)}return{onKeyDown(t){let n=C.select(`open`);F.current=!1;let r=t.key.startsWith(`Arrow`),i=_a(t.key,he(),u),a=ha(t.key,g),o=(l?i:a)||t.key===`Enter`||t.key.trim()===``;if(d&&n)return _e(t);if(n||m||!r){if(o){let e=ha(t.key,he());P.current=l&&e?null:t.key}l?i&&(wt(t),n?(N.current=ge(),I(t)):e(t)):a&&(le.current!=null&&(N.current=le.current),wt(t),!n&&m?e(t):_e(t),n&&I(t))}},onFocus(e){C.select(`open`)&&!d&&(N.current=-1,I(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[_e,f,ge,l,I,C,m,g,he,u,le,d]),Se=G.useMemo(()=>({...ve,...be}),[ve,be]);return G.useMemo(()=>a?{reference:Se,floating:ye,item:z,trigger:be}:{},[a,Se,ye,be,z])}function ba(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=`rootStore`in e?e.rootStore:e,f=d.useState(`open`),p=gt(),m=G.useRef(``),h=G.useRef(u??i??-1),g=G.useRef(null),_=H(e=>{function t(e){return r?.current[e]}function c(e){let n=t(e);return n&&!Jt(n)||n?.matches(`:disabled`)?!1:o==null||!ft(Ie,e,o)}function d(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&c(n))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(wt(e),s?.(!0)),m.current.length>0&&m.current[0]!==` `&&d(_,m.current)===-1&&e.key!==` `&&s?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(wt(e),s?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&c(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,s?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=d(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,s?.(!1)):(a?.(b),g.current=b)}),v=H(e=>{let t=e.relatedTarget,n=d.select(`domReferenceElement`),r=d.select(`floatingElement`);U(n,t)||U(r,t)||(p.clear(),m.current=``,h.current=g.current,s?.(!1))});B(()=>{(f||u===null)&&(p.clear(),g.current=null,m.current!==``&&(m.current=``))},[f,u,p]);let y=G.useMemo(()=>({onKeyDown:_,onBlur:v}),[_,v]);return G.useMemo(()=>c?{reference:y,floating:y}:{},[c,y])}var xa=t(Ke(),1),Sa=({attachments:e,onRemove:t})=>e.length===0?null:(0,K.jsx)(`ul`,{"aria-label":`Attached screenshots`,className:`m-0 flex list-none flex-wrap gap-2 p-0`,children:e.map(e=>(0,K.jsxs)(`li`,{className:`relative size-14 animate-enter`,children:[(0,K.jsx)(`img`,{alt:`Pasted screenshot`,className:W(`size-14 rounded-md border border-border object-cover`,e.path===null&&`opacity-50`,e.hasFailed&&`border-sign-del`),src:e.preview}),e.path===null&&!e.hasFailed?(0,K.jsx)(Zr,{"aria-label":`Uploading`,className:`absolute inset-0 m-auto size-4 animate-spin text-foreground`}):null,(0,K.jsx)(`span`,{className:`absolute -inset-e-2 -top-2`,children:(0,K.jsx)(On,{label:`Remove screenshot`,onClick:()=>{t(e.id)},size:`icon-xs`,type:`button`,variant:`outline`,children:(0,K.jsx)(Vi,{})})})]},e.id))}),Ca=`review-draft|`,wa=new Map,Ta=e=>{let t=wa.get(e);if(t!==void 0)return t;try{return sessionStorage.getItem(Ca+e)??``}catch{return``}},Ea=(e,t)=>{wa.set(e,t);try{t===``?sessionStorage.removeItem(Ca+e):sessionStorage.setItem(Ca+e,t)}catch{}},Da=16,Oa=2,ka=()=>typeof crypto.randomUUID==`function`?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(Da)),e=>e.toString(Da).padStart(Oa,`0`)).join(``),Aa=[`image/png`,`image/jpeg`,`image/gif`,`image/webp`],ja=e=>Aa.includes(e),Ma=async e=>{let t=new Uint8Array(await e.arrayBuffer());return btoa(Array.from(t,e=>String.fromCodePoint(e)).join(``))},Na=e=>[...e?.items??[]].filter(e=>e.kind===`file`&&ja(e.type)).flatMap(e=>e.getAsFile()??[]),Pa=async(e,t)=>{let n=ja(t.type)?t.type:`image/png`,{path:r}=await E({data:{deck:e,type:n,data:await Ma(t)}});return r},Fa=e=>`![screenshot](${e})`,Ia=e=>({id:ka(),preview:URL.createObjectURL(e),path:null,hasFailed:!1}),La=(e,t)=>[e.trim(),...t.flatMap(e=>e.path===null?[]:[Fa(e.path)])].filter(e=>e!==``).join(`
1
+ import{n as e,r as t,t as n}from"./rolldown-runtime-XKyaHtl9.js";import{A as r,C as i,D as a,E as o,M as s,N as c,O as l,P as u,S as d,T as f,X as p,Y as m,_ as h,b as g,c as _,g as v,h as y,j as b,k as x,kt as S,l as C,m as w,o as T,p as E,s as D,v as O,w as k,x as A,y as ee}from"./decks.functions-tXNTG2sC.js";import{$ as j,$t as M,A as N,An as P,B as te,Bn as F,C as I,Cn as L,Ct as ne,D as re,Dn as ie,Dt as ae,E as oe,En as se,Et as ce,F as le,Fn as R,Ft as ue,Gn as de,H as fe,Hn as pe,Ht as me,I as he,In as ge,J as _e,Jn as z,K as ve,Kn as ye,L as be,Ln as B,Lt as xe,M as Se,Mn as V,Mt as Ce,N as we,O as Te,Ot as Ee,P as De,Pn as Oe,Pt as ke,Q as Ae,R as je,Rn as H,Rt as Me,S as Ne,St as Pe,T as Fe,Tn as Ie,U as Le,Ut as Re,V as ze,Vn as Be,Wn as Ve,Wt as He,X as Ue,Xt as We,Y as Ge,Yn as Ke,Z as qe,_ as Je,_n as Ye,_t as Xe,a as Ze,an as Qe,at as $e,b as et,bn as tt,bt as nt,c as rt,cn as it,ct as at,dn as ot,dt as st,en as ct,et as lt,f as ut,fn as dt,ft,g as pt,gt as mt,h as ht,hn as gt,i as _t,in as U,it as vt,jn as yt,k as bt,kn as xt,kt as St,l as Ct,ln as wt,lt as Tt,m as Et,mn as Dt,n as Ot,nn as kt,nt as At,on as jt,ot as Mt,p as Nt,pn as Pt,pt as Ft,qn as It,r as Lt,rn as Rt,rt as zt,s as Bt,sn as Vt,st as Ht,t as Ut,tn as Wt,tt as Gt,u as Kt,un as qt,ut as Jt,v as Yt,vn as Xt,vt as Zt,w as Qt,x as $t,xn as W,xt as en,yn as tn,yt as nn,z as rn,zn as an,zt as on}from"./use-window-event-BDUVK1pJ.js";import{C as sn,E as cn,S as ln,T as un,a as dn,b as fn,c as pn,h as mn,l as hn,m as gn,n as _n,o as vn,p as yn,r as bn,t as xn,u as Sn,w as Cn}from"./shortcuts-BsNWbUaT.js";import{C as wn,D as Tn,E as En,O as Dn,S as On,T as kn,_ as An,a as jn,c as Mn,d as Nn,f as Pn,g as Fn,h as In,i as Ln,l as Rn,m as zn,o as Bn,p as Vn,s as Hn,u as Un,v as Wn,w as Gn,x as Kn,y as qn}from"./index-X7OFY5bM.js";var Jn={name:`arrow-down-to-line`,size:24,node:[[`path`,{d:`M12 17V3`,key:`1cwfxf`}],[`path`,{d:`m6 11 6 6 6-6`,key:`12ii2o`}],[`path`,{d:`M19 21H5`,key:`150jfl`}]]};Jn.node;var Yn=z(Jn),Xn={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};Xn.node;var Zn=z(Xn),Qn={name:`arrow-up-to-line`,size:24,node:[[`path`,{d:`M5 3h14`,key:`7usisc`}],[`path`,{d:`m18 13-6-6-6 6`,key:`1kf1n9`}],[`path`,{d:`M12 7v14`,key:`1akyts`}]]};Qn.node;var $n=z(Qn),er={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};er.node;var tr=z(er),nr={name:`check-check`,size:24,node:[[`path`,{d:`M18 6 7 17l-5-5`,key:`116fxf`}],[`path`,{d:`m22 10-7.5 7.5L13 16`,key:`ke71qq`}]]};nr.node;var rr=z(nr),ir={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};ir.node;var ar=z(ir),or={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};or.node;var sr=z(or),cr={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};cr.node;var lr=z(cr),ur={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};ur.node;var dr=z(ur),fr={name:`chevrons-down-up`,size:24,node:[[`path`,{d:`m7 20 5-5 5 5`,key:`13a0gw`}],[`path`,{d:`m7 4 5 5 5-5`,key:`1kwcof`}]]};fr.node;var pr=z(fr),mr={name:`chevrons-up-down`,size:24,node:[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]};mr.node;var hr=z(mr),gr={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};gr.node;var _r=z(gr),vr={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};vr.node;var yr=z(vr),br={name:`clipboard-copy`,size:24,node:[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2`,key:`4jdomd`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v4`,key:`3hqy98`}],[`path`,{d:`M21 14H11`,key:`1bme5i`}],[`path`,{d:`m15 10-4 4 4 4`,key:`5dvupr`}]]};br.node;var xr=z(br),Sr={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};Sr.node;var Cr=z(Sr),wr={name:`corner-down-left`,size:24,node:[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}],[`path`,{d:`m9 10-5 5 5 5`,key:`1kshq7`}]]};wr.node;var Tr=z(wr),Er={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};Er.node;var Dr=z(Er),Or={name:`eye-off`,size:24,node:[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};Or.node;var kr=z(Or),Ar={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};Ar.node;var jr=z(Ar),Mr={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};Mr.node;var Nr=z(Mr),Pr={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};Pr.node;var Fr=z(Pr),Ir={name:`git-compare`,size:24,node:[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`,key:`19pyzm`}]]};Ir.node;var Lr=z(Ir),Rr={name:`git-pull-request`,size:24,node:[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]};Rr.node;var zr=z(Rr),Br={name:`keyboard`,size:24,node:[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]};Br.node;var Vr=z(Br),Hr={name:`layers-2`,size:24,node:[[`path`,{d:`M13 13.74a2 2 0 0 1-2 0L2.5 8.87a1 1 0 0 1 0-1.74L11 2.26a2 2 0 0 1 2 0l8.5 4.87a1 1 0 0 1 0 1.74z`,key:`15q6uc`}],[`path`,{d:`m20 14.285 1.5.845a1 1 0 0 1 0 1.74L13 21.74a2 2 0 0 1-2 0l-8.5-4.87a1 1 0 0 1 0-1.74l1.5-.845`,key:`byia6g`}]]};Hr.node;var Ur=z(Hr),Wr={name:`layers`,size:24,node:[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]],aliases:[`layers-3`]};Wr.node;var Gr=z(Wr),Kr={name:`list-filter`,size:24,node:[[`path`,{d:`M2 5h20`,key:`1fs1ex`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`path`,{d:`M9 19h6`,key:`456am0`}]]};Kr.node;var qr=z(Kr),Jr={name:`list-ordered`,size:24,node:[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]};Jr.node;var Yr=z(Jr),Xr={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};Xr.node;var Zr=z(Xr),Qr={name:`locate-fixed`,size:24,node:[[`line`,{x1:`2`,x2:`5`,y1:`12`,y2:`12`,key:`bvdh0s`}],[`line`,{x1:`19`,x2:`22`,y1:`12`,y2:`12`,key:`1tbv5k`}],[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`5`,key:`11lu5j`}],[`line`,{x1:`12`,x2:`12`,y1:`19`,y2:`22`,key:`x3vr5v`}],[`circle`,{cx:`12`,cy:`12`,r:`7`,key:`fim9np`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};Qr.node;var $r=z(Qr),ei={name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]};ei.node;var ti=z(ei),ni={name:`message-square-plus`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]};ni.node;var ri=z(ni),ii={name:`messages-square`,size:24,node:[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]};ii.node;var ai=z(ii),oi={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};oi.node;var si=z(oi),ci={name:`pin`,size:24,node:[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]};ci.node;var li=z(ci),ui={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};ui.node;var di=z(ui),fi={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};fi.node;var pi=z(fi),mi={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};mi.node;var hi=z(mi),gi={name:`send`,size:24,node:[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]};gi.node;var _i=z(gi),vi={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};vi.node;var yi=z(vi),bi={name:`sparkle`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}]]};bi.node;var xi=z(bi),Si={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};Si.node;var Ci=z(Si),wi={name:`square-arrow-out-up-right`,size:24,node:[[`path`,{d:`M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6`,key:`y09zxi`}],[`path`,{d:`m21 3-9 9`,key:`mpx6sq`}],[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}]],aliases:[`arrow-up-right-from-square`]};wi.node;var Ti=z(wi),Ei={name:`square-dashed-text`,size:24,node:[[`path`,{d:`M14 21h1`,key:`v9vybs`}],[`path`,{d:`M14 3h1`,key:`1ec4yj`}],[`path`,{d:`M19 3a2 2 0 0 1 2 2`,key:`18rm91`}],[`path`,{d:`M21 14v1`,key:`169vum`}],[`path`,{d:`M21 19a2 2 0 0 1-2 2`,key:`1j7049`}],[`path`,{d:`M21 9v1`,key:`mxsmne`}],[`path`,{d:`M3 14v1`,key:`vnatye`}],[`path`,{d:`M3 9v1`,key:`1r0deq`}],[`path`,{d:`M5 21a2 2 0 0 1-2-2`,key:`sbafld`}],[`path`,{d:`M5 3a2 2 0 0 0-2 2`,key:`y57alp`}],[`path`,{d:`M7 12h10`,key:`b7w52i`}],[`path`,{d:`M7 16h6`,key:`1vyc9m`}],[`path`,{d:`M7 8h8`,key:`1jbsf9`}],[`path`,{d:`M9 21h1`,key:`15o7lz`}],[`path`,{d:`M9 3h1`,key:`1yesri`}]],aliases:[`text-selection`,`text-select`]};Ei.node;var Di=z(Ei),Oi={name:`square-terminal`,size:24,node:[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]],aliases:[`terminal-square`]};Oi.node;var ki=z(Oi),Ai={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};Ai.node;var ji=z(Ai),Mi={name:`text-align-start`,size:24,node:[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M17 19H3`,key:`z6ezky`}]],aliases:[`text`,`align-left`]};Mi.node;var Ni=z(Mi),Pi={name:`text-wrap`,size:24,node:[[`path`,{d:`m16 16-3 3 3 3`,key:`117b85`}],[`path`,{d:`M3 12h14.5a1 1 0 0 1 0 7H13`,key:`18xa6z`}],[`path`,{d:`M3 19h6`,key:`1ygdsz`}],[`path`,{d:`M3 5h18`,key:`1u36vt`}]],aliases:[`wrap-text`]};Pi.node;var Fi=z(Pi),Ii={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};Ii.node;var Li=z(Ii),Ri={name:`user-round`,size:24,node:[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]],aliases:[`user-2`]};Ri.node;var zi=z(Ri),Bi={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Bi.node;var Vi=z(Bi),G=t(S(),1),Hi=0;function Ui(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(Hi);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),ie;let o=requestAnimationFrame(a);return Hi=o,()=>{Hi===o&&(cancelAnimationFrame(o),Hi=0)}}var Wi={inert:new WeakMap,"aria-hidden":new WeakMap},Gi=`data-base-ui-inert`,Ki={inert:new WeakSet,"aria-hidden":new WeakSet},qi=new WeakMap,Ji=0;function Yi(e){return Ki[e]}function Xi(e){return e?It(e)?e.host:Xi(e.parentNode):null}var Zi=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Xi(t);return e.contains(n)?n:null}).filter(e=>e!=null),Qi=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},$i=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{F(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function ea(e,t,n,r,{mark:i=!0}){let a=null;r?a=`inert`:n&&(a=`aria-hidden`);let o=null,s=null,c=Zi(t,e),l=i?$i(t,Qi(c),new Set(c)):[],u=[],d=[];if(a){let e=Wi[a],n=Yi(a);s=n,o=e;let r=Zi(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=c.concat(r);$i(t,Qi(i),new Set(i)).forEach(t=>{let r=t.getAttribute(a),i=r!==null&&r!==`false`,o=(e.get(t)||0)+1;e.set(t,o),u.push(t),o===1&&i&&n.add(t),i||t.setAttribute(a,a===`inert`?``:`true`)})}return i&&l.forEach(e=>{let t=(qi.get(e)||0)+1;qi.set(e,t),d.push(e),t===1&&e.setAttribute(Gi,``)}),Ji+=1,()=>{o&&u.forEach(e=>{let t=(o.get(e)||0)-1;o.set(e,t),t||(!s?.has(e)&&a&&e.removeAttribute(a),s?.delete(e))}),i&&d.forEach(e=>{let t=(qi.get(e)||0)-1;qi.set(e,t),t||e.removeAttribute(Gi)}),--Ji,Ji||(Wi.inert=new WeakMap,Wi[`aria-hidden`]=new WeakMap,Ki.inert=new WeakSet,Ki[`aria-hidden`]=new WeakSet,qi=new WeakMap)}}function ta(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0}=t,a=V(e[0]).body;return ea(e,a,n,r,{mark:i})}var K=m();function na(e,t){let n=pe(Qe(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var ra=20,ia=[];function aa(){ia=ia.filter(e=>e.deref()?.isConnected)}function oa(e){aa(),e&&F(e)!==`body`&&(ia.push(new WeakRef(e)),ia.length>ra&&(ia=ia.slice(-20)))}function sa(){return aa(),ia[ia.length-1]?.deref()}function ca(e){return e?$e(e)?e:Mt(e)[0]||e:null}function la(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=j(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return $e(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function ua(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:y,dataRef:b}=h.context,x=H(()=>b.current.floatingContext?.nodeId),S=i===!1,C=Me(_)&&S,w=Zt(i),T=Zt(a),E=Zt(l),D=Zt(g),O=te(p),k=Le(),A=G.useRef(!1),ee=G.useRef(!1),j=G.useRef(!1),M=G.useRef(null),N=G.useRef(``),P=G.useRef(``),I=G.useRef(null),L=G.useRef(null),ne=xt(I,f,k?.beforeInsideRef),re=xt(L,k?.afterInsideRef),ie=gt(),ae=gt(),oe=Xe(),se=k!=null,R=xe(v),ue=H((e=R)=>e?Mt(e):[]),de=H(()=>m?.().filter(e=>e!=null)??[]);G.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&U(R,Rt(V(R)))&&ue().length===0&&!C&&wt(e)}let t=V(R);return nt(t,`keydown`,e)},[r,R,s,C,ue]),G.useEffect(()=>{if(r||!g)return;let e=V(R);function t(){j.current=!1}function n(e){let t=Qe(e),n=de(),r=U(v,t)||U(_,t)||U(k?.portalNode,t)||n.some(e=>e===t||U(e,t));j.current=!r,P.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(ee.current=!0,ae.start(0,()=>{ee.current=!1}))}function i(){P.current=`keyboard`}return nn(nt(e,`pointerdown`,n,!0),nt(e,`pointerup`,t,!0),nt(e,`pointercancel`,t,!0),nt(e,`keydown`,i,!0),t)},[r,v,_,R,g,k,ae,de]),G.useEffect(()=>{if(r||!c)return;let e=V(R);function t(){ee.current=!0,ae.start(0,()=>{ee.current=!1})}function n(e){let t=Qe(e);$e(t)&&(M.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=Qe(t);s&&n==null&&i!=null&&U(v,i)&&oa(i),queueMicrotask(()=>{let a=x(),c=h.context.triggerElements,l=de(),f=n?.hasAttribute(Ue(`focus-guard`))&&[I.current,L.current,k?.beforeInsideRef.current,k?.afterInsideRef.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,le(d),le(u)].includes(n),p=!(U(_,n)||U(v,n)||U(n,v)||U(k?.portalNode,n)||l.some(e=>e===n||U(e,n))||c.hasMatchingElement(e=>U(e,n))||f||O&&(Ae(O.nodesRef.current,a).find(e=>U(e.context?.elements.floating,n)||U(e.context?.elements.domReference,n))||qe(O.nodesRef.current,a).find(e=>[e.context?.elements.floating,xe(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&R&&la(R),o&&r!==_&&!Jt(i)&&Rt(e)===e.body){if(Ve(R)&&(R.focus(),o===`popup`)){oe.request(()=>{R.focus()});return}let e=ue(),t=M.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||R;Ve(n)&&n.focus()}b.current.insideReactTree?b.current.insideReactTree=!1:(C||!s)&&n&&p&&!ee.current&&(C||n!==sa())&&(A.current=!0,h.setOpen(!1,en(ce,t)))})}function a(){j.current||(b.current.insideReactTree=!0,ie.start(0,()=>{b.current.insideReactTree=!1}))}let l=Ve(_)?_:null;if(v||l)return nn(l&&nt(l,`focusout`,i),l&&nt(l,`pointerdown`,t),v&&nt(v,`focusin`,n),v&&nt(v,`focusout`,i),v&&k&&nt(v,`focusout`,a,!0))},[r,_,v,R,s,O,k,h,c,o,ue,C,x,b,ie,ae,oe,u,d,de]),G.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(k?.portalNode?.querySelectorAll(`[${Ue(`portal`)}]`)||[]),t=(O?qe(O.nodesRef.current,x()):[]).find(e=>Me(e.context?.elements.domReference||null))?.context?.elements.domReference,n=ta([v,...e,I.current,L.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,...de(),t,le(d),le(u),C?_:null].filter(e=>e!=null),{ariaHidden:s||C,mark:!1}),i=ta([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,k,C,O,x,u,d,de]),B(()=>{if(!g||r||!Ve(R))return;N.current=``,P.current=``;let e=V(R),t=Rt(e);queueMicrotask(()=>{let n=w.current,r=typeof n==`function`?n(E.current||``):n;if(r===void 0||r===!1||U(R,t))return;let i=null,a=()=>(i??=ue(R),i[0]||R),o;o=r===!0||r===null?a():le(r),o||=a();let s=U(R,Rt(e));Ui(o,{preventScroll:o===R,shouldFocus(){if(!D.current)return!1;if(s)return!0;let t=Rt(e);return!(t!==o&&U(R,t))}})})},[r,g,R,ue,w,E,D]),B(()=>{if(r||!R)return;let e=V(R),t=Rt(e),n=E.current==null;oa(t);function i(e){if(e.open||(N.current=na(e.nativeEvent,P.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(A.current=!0),e.reason===`outside-press`){if(e.nested)A.current=!1;else if(Vt(e.nativeEvent)||it(e.nativeEvent))A.current=!1;else{let e=!1;V(R).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?A.current=!1:A.current=!0}}}y.on(`openchange`,i);function a(e){let r=T.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&F(t)!==`body`?t:null,s=n?o||a:a||o;return s||=sa()||null,typeof i==`boolean`?s:le(i)||s||null}return()=>{y.off(`openchange`,i);let t=Rt(e),n=de(),r=U(v,t)||n.some(e=>e===t||U(e,t))||O&&Ae(O.nodesRef.current,x(),!1).some(e=>U(e.context?.elements.floating,t)),o=T.current,s=N.current,c=a(s);queueMicrotask(()=>{let n=ca(c),i=typeof o!=`boolean`;if(o&&!A.current&&Ve(n)&&(i||n===t||t===e.body||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}A.current=!1})}},[r,v,R,T,E,y,O,_,x,de]),B(()=>{if(!ot||g||!v)return;let e=Rt(V(v));Ve(e)&&on(e)&&U(v,e)&&e.blur()},[g,v]),B(()=>{if(!r&&k)return k.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{k.setFocusManagerState(null)}},[r,k,s,g,h,c,_]),B(()=>{if(!r&&R)return la(R),()=>{queueMicrotask(aa)}},[r,R]);let fe=!r&&(!s||!C)&&(se||s);return(0,K.jsxs)(G.Fragment,{children:[fe&&(0,K.jsx)(Ft,{"data-type":`inside`,ref:ne,onFocus:e=>{if(s){let e=ue();Ui(e[e.length-1])}else k?.portalNode&&(A.current=!1,vt(e,k.portalNode)?lt(_)?.focus():le(d??k.beforeOutsideRef)?.focus())}}),n,fe&&(0,K.jsx)(Ft,{"data-type":`inside`,ref:re,onFocus:e=>{s?Ui(ue()[0]):k?.portalNode&&(c&&(A.current=!0),vt(e,k.portalNode)?Gt(_)?.focus():le(u??k.afterOutsideRef)?.focus())}})]})}function da(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=ue}=t,l=`rootStore`in e?e.rootStore:e,u=l.context.dataRef,d=G.useRef(void 0),f=Xe(),p=gt(),m=G.useMemo(()=>{function e(e,t,n,r){let i=en(c,t,n);e&&r===`touch`&&s>0?p.start(s,()=>{l.setOpen(!0,i)}):l.setOpen(e,i)}function t(e,t,n){let r=u.current.openEvent,a=l.select(`domReferenceElement`)!==t;return e&&a||!e||!i?!0:r&&o?!n(r.type):!1}return{onPointerDown(e){d.current=jt(e.pointerType,!0)&&it(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(n){let i=d.current,o=n.nativeEvent,s=l.select(`open`);if(n.button!==0||r===`click`||jt(i,!0)&&a)return;let c=t(s,n.currentTarget,e=>e===`click`||e===`mousedown`),u=Qe(o);if(on(u)){e(c,o,u,i);return}let p=n.currentTarget;f.request(()=>{e(c,o,p,i)})},onClick(n){if(r===`mousedown-only`)return;let i=d.current;r===`mousedown`&&i?d.current=void 0:jt(i,!0)&&a||e(t(l.select(`open`),n.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),n.nativeEvent,n.currentTarget,i)},onKeyDown(){d.current=void 0}}},[u,r,a,c,l,o,i,f,p,s]);return G.useMemo(()=>n?{reference:m}:se,[n,m])}var fa=`Escape`;function pa(e){return ot&&e.movementX===0&&e.movementY===0}function ma(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function ha(e,t){return ma(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function ga(e,t,n){return ma(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function _a(e,t,n){return ma(t,n?e===ct:e===Wt,e===M)}function va(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===fa:ma(t,n?e===Wt:e===ct,e===kt)}function ya(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,parentOrientation:_,id:v,resetOnPointerLeave:y=!0,externalTree:b,grid:x}=t,S=x!=null,C=`rootStore`in e?e.rootStore:e,w=C.useState(`open`),T=C.useState(`floatingElement`),E=C.useState(`domReferenceElement`),D=C.context.dataRef,O=xe(T),k=Me(E),A=Zt(O),ee=rn(),j=te(b),M=G.useRef(f),N=G.useRef(o??-1),P=G.useRef(null),F=G.useRef(!0),I=H(e=>{i(N.current===-1?null:N.current,e)}),L=G.useRef(!!T),ne=G.useRef(w),re=G.useRef(!1),ie=G.useRef(!1),ae=G.useRef(null),oe=Zt(h),se=Zt(w),le=Zt(o),R=Zt(y),ue=Xe(),de=Xe(),fe=H(()=>{function e(e){d?j?.events.emit(`virtualfocus`,e):ae.current=Ui(e,{sync:re.current,preventScroll:!0})}let t=n.current[N.current],r=ie.current;t&&e(t),(re.current?e=>e():e=>ue.request(e))(()=>{let i=n.current[N.current]||t;i&&(t||e(i),z&&(r||!F.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});B(()=>{D.current.orientation=g},[D,g]),B(()=>{a&&(w&&T?(N.current=o??-1,M.current&&o!=null&&(ie.current=!0,I())):L.current&&(N.current=-1,I()))},[a,w,T,o,I]),B(()=>{if(a){if(!w)re.current=!1;else if(T){if(r==null){if(re.current=!1,le.current!=null)return;if(L.current&&(N.current=-1,fe()),(!ne.current||!L.current)&&M.current&&(P.current!=null||M.current===!0&&P.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>de.request(e):queueMicrotask)(t),e+=1):(N.current=P.current==null||ga(P.current,g,u)||l?Tt(n):at(n),P.current=null,I())};t()}}else st(n.current,r)||(N.current=r,fe(),ie.current=!1)}}},[a,w,T,r,le,l,n,g,u,I,fe,de]),B(()=>{if(!a||T||!j||d||!L.current)return;let e=j.nodesRef.current,t=e.find(e=>e.id===ee)?.context?.elements.floating,n=Rt(V(E??t??null)),r=e.some(e=>e.context&&U(e.context.elements.floating,n));t&&!r&&F.current&&t.focus({preventScroll:!0})},[a,T,E,j,ee,d]),B(()=>{ne.current=w,L.current=!!T}),B(()=>{w||(P.current=null,M.current=f)},[w,f]);let pe=r!=null,me=H(e=>{if(!se.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(N.current!==t||r!==t)&&(N.current=t,I(e))}),he=H(()=>_??j?.nodesRef.current.find(e=>e.id===ee)?.context?.dataRef?.current.orientation),ge=H(()=>Tt(n,oe.current)),_e=H(e=>{if(F.current=!1,re.current=!0,e.which===229||!se.current&&e.currentTarget===A.current)return;if(l&&va(e.key,g,u,S)){ha(e.key,he())||wt(e),C.setOpen(!1,en(St,e.nativeEvent)),Ve(E)&&(d?j?.events.emit(`virtualfocus`,E):E.focus());return}let t=N.current,r=Tt(n,h),i=at(n,h);if(k||(e.key===`Home`&&(wt(e),N.current=r,I(e)),e.key===`End`&&(wt(e),N.current=i,I(e))),x!=null){let t=x(e,N.current,n,g,c,u,h,r,i);if(t!=null&&(N.current=t,I(e)),g===`both`)return}if(ha(e.key,g)){if(wt(e),w&&!d&&Rt(e.currentTarget.ownerDocument)===e.currentTarget){N.current=ga(e.key,g,u)?r:i,I(e);return}ga(e.key,g,u)?c?t>=i?s&&t!==n.current.length?N.current=-1:(re.current=!1,N.current=r):N.current=Ht(n.current,{startingIndex:t,disabledIndices:h}):N.current=Math.min(i,Ht(n.current,{startingIndex:t,disabledIndices:h})):c?t<=r?s&&t!==-1?N.current=n.current.length:(re.current=!1,N.current=i):N.current=Ht(n.current,{startingIndex:t,decrement:!0,disabledIndices:h}):N.current=Math.max(r,Ht(n.current,{startingIndex:t,decrement:!0,disabledIndices:h})),st(n.current,N.current)&&(N.current=-1),I(e)}}),z=G.useMemo(()=>({onFocus(e){re.current=!0,me(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){pa(e)||(re.current=!0,ie.current=!1,p&&me(e))},onPointerLeave(e){if(!se.current||!F.current||e.pointerType===`touch`)return;re.current=!0;let t=e.relatedTarget;if(p&&!n.current.includes(t)&&R.current&&(ae.current?.(),ae.current=null,N.current=-1,I(e),!d)){let e=A.current,t=Rt(V(e));e&&U(e,t)&&e.focus({preventScroll:!0})}}}),[me,se,A,p,n,I,R,d]),ve=G.useMemo(()=>d&&w&&pe&&{"aria-activedescendant":`${v}-${r}`},[d,w,pe,v,r]),ye=G.useMemo(()=>({...k?{}:ve,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&w&&!d){let t=Qe(e.nativeEvent);if(t&&!U(A.current,t))return;wt(e),C.setOpen(!1,en(ce,e.nativeEvent)),Ve(E)&&E.focus()}else _e(e)},onPointerMove(e){pa(e)||(F.current=!0)}}),[ve,_e,A,k,C,w,d,E]),be=G.useMemo(()=>{function e(e){C.setOpen(!0,en(St,e.nativeEvent,e.currentTarget))}function t(e){f===`auto`&&Vt(e.nativeEvent)&&(M.current=!d)}function n(e){M.current=f,f===`auto`&&it(e.nativeEvent)&&(M.current=!0)}return{onKeyDown(t){let n=C.select(`open`);F.current=!1;let r=t.key.startsWith(`Arrow`),i=_a(t.key,he(),u),a=ha(t.key,g),o=(l?i:a)||t.key===`Enter`||t.key.trim()===``;if(d&&n)return _e(t);if(n||m||!r){if(o){let e=ha(t.key,he());P.current=l&&e?null:t.key}l?i&&(wt(t),n?(N.current=ge(),I(t)):e(t)):a&&(le.current!=null&&(N.current=le.current),wt(t),!n&&m?e(t):_e(t),n&&I(t))}},onFocus(e){C.select(`open`)&&!d&&(N.current=-1,I(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[_e,f,ge,l,I,C,m,g,he,u,le,d]),Se=G.useMemo(()=>({...ve,...be}),[ve,be]);return G.useMemo(()=>a?{reference:Se,floating:ye,item:z,trigger:be}:{},[a,Se,ye,be,z])}function ba(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=`rootStore`in e?e.rootStore:e,f=d.useState(`open`),p=gt(),m=G.useRef(``),h=G.useRef(u??i??-1),g=G.useRef(null),_=H(e=>{function t(e){return r?.current[e]}function c(e){let n=t(e);return n&&!Jt(n)||n?.matches(`:disabled`)?!1:o==null||!ft(Ie,e,o)}function d(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&c(n))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(wt(e),s?.(!0)),m.current.length>0&&m.current[0]!==` `&&d(_,m.current)===-1&&e.key!==` `&&s?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(wt(e),s?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&c(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,s?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=d(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,s?.(!1)):(a?.(b),g.current=b)}),v=H(e=>{let t=e.relatedTarget,n=d.select(`domReferenceElement`),r=d.select(`floatingElement`);U(n,t)||U(r,t)||(p.clear(),m.current=``,h.current=g.current,s?.(!1))});B(()=>{(f||u===null)&&(p.clear(),g.current=null,m.current!==``&&(m.current=``))},[f,u,p]);let y=G.useMemo(()=>({onKeyDown:_,onBlur:v}),[_,v]);return G.useMemo(()=>c?{reference:y,floating:y}:{},[c,y])}var xa=t(Ke(),1),Sa=({attachments:e,onRemove:t})=>e.length===0?null:(0,K.jsx)(`ul`,{"aria-label":`Attached screenshots`,className:`m-0 flex list-none flex-wrap gap-2 p-0`,children:e.map(e=>(0,K.jsxs)(`li`,{className:`relative size-14 animate-enter`,children:[(0,K.jsx)(`img`,{alt:`Pasted screenshot`,className:W(`size-14 rounded-md border border-border object-cover`,e.path===null&&`opacity-50`,e.hasFailed&&`border-sign-del`),src:e.preview}),e.path===null&&!e.hasFailed?(0,K.jsx)(Zr,{"aria-label":`Uploading`,className:`absolute inset-0 m-auto size-4 animate-spin text-foreground`}):null,(0,K.jsx)(`span`,{className:`absolute -inset-e-2 -top-2`,children:(0,K.jsx)(On,{label:`Remove screenshot`,onClick:()=>{t(e.id)},size:`icon-xs`,type:`button`,variant:`outline`,children:(0,K.jsx)(Vi,{})})})]},e.id))}),Ca=`review-draft|`,wa=new Map,Ta=e=>{let t=wa.get(e);if(t!==void 0)return t;try{return sessionStorage.getItem(Ca+e)??``}catch{return``}},Ea=(e,t)=>{wa.set(e,t);try{t===``?sessionStorage.removeItem(Ca+e):sessionStorage.setItem(Ca+e,t)}catch{}},Da=16,Oa=2,ka=()=>typeof crypto.randomUUID==`function`?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(Da)),e=>e.toString(Da).padStart(Oa,`0`)).join(``),Aa=[`image/png`,`image/jpeg`,`image/gif`,`image/webp`],ja=e=>Aa.includes(e),Ma=async e=>{let t=new Uint8Array(await e.arrayBuffer());return btoa(Array.from(t,e=>String.fromCodePoint(e)).join(``))},Na=e=>[...e?.items??[]].filter(e=>e.kind===`file`&&ja(e.type)).flatMap(e=>e.getAsFile()??[]),Pa=async(e,t)=>{let n=ja(t.type)?t.type:`image/png`,{path:r}=await E({data:{deck:e,type:n,data:await Ma(t)}});return r},Fa=e=>`![screenshot](${e})`,Ia=e=>({id:ka(),preview:URL.createObjectURL(e),path:null,hasFailed:!1}),La=(e,t)=>[e.trim(),...t.flatMap(e=>e.path===null?[]:[Fa(e.path)])].filter(e=>e!==``).join(`
2
2
 
3
3
  `),Ra=e=>{let[t,n]=(0,G.useState)([]),r=(e,t)=>{n(n=>n.map(n=>n.id===e?{...n,...t}:n))},i=async(t,n)=>{try{r(n.id,{path:await Pa(e,t)})}catch{r(n.id,{hasFailed:!0})}};return{attachments:t,add:e=>{let t=e.map(e=>({file:e,attachment:Ia(e)}));n(e=>[...e,...t.map(({attachment:e})=>e)]);for(let{file:e,attachment:n}of t)i(e,n)},remove:e=>{n(t=>t.filter(t=>t.id!==e))},clear:()=>{n([])}}},za=e=>e.some(e=>e.path===null&&!e.hasFailed),Ba=(e,t,n)=>{let[r,i]=(0,G.useState)(()=>n===void 0?``:Ta(n)),a=e=>{i(e),n!==void 0&&Ea(n,e)},[o,s]=(0,G.useState)(!1),{attachments:c,add:l,remove:u,clear:d}=Ra(e),f=La(r,c),p=f!==``&&!o&&!za(c);return{text:r,setText:a,attachments:c,remove:u,canSend:p,submit:async()=>{p&&(s(!0),await t(f),s(!1),a(``),d())},paste:e=>{let t=Na(e.clipboardData);t.length===0?dn(e):(e.preventDefault(),l(t))}}},Va=176,Ha=e=>{e.style.height=`auto`,e.style.height=`${String(Math.min(e.scrollHeight,Va))}px`},Ua=e=>{e.focus(),e.setSelectionRange(e.value.length,e.value.length)},Wa={card:{form:`grid cursor-text gap-2 rounded-xl border border-border bg-composer px-3 pt-2.5 pb-2 transition-colors duration-150 ease-out focus-within:border-muted-foreground hover:border-subtle`,text:`max-h-44 min-h-6 resize-none overflow-y-auto bg-transparent text-sm/6 text-foreground outline-none placeholder:text-subtle`},phone:{form:`flex cursor-text flex-wrap items-end gap-1`,text:`max-h-44 min-h-6 min-w-0 flex-1 resize-none overflow-y-auto bg-transparent pb-2.5 text-base text-foreground outline-none placeholder:text-subtle`}},Ga=({isDisabled:e,label:t})=>(0,K.jsx)(`button`,{"aria-label":t,className:`grid size-11 shrink-0 press place-items-center disabled:opacity-40`,disabled:e,type:`submit`,children:(0,K.jsx)(`span`,{className:`grid size-8.5 place-items-center rounded-full bg-accent text-accent-foreground`,children:(0,K.jsx)(tr,{"aria-hidden":!0,className:`size-4.5`,strokeWidth:2.5})})}),Ka=new WeakSet,qa=(e,t)=>n=>{e.current=n,n!==null&&(Ha(n),t&&!Ka.has(n)&&(Ka.add(n),Ua(n)))},Ja=e=>(e.ctrlKey||e.metaKey)&&e.key===`s`||e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing,Ya=({submit:e,cancel:t})=>n=>{Ja(n)&&(n.preventDefault(),e()),n.key===`Escape`&&t?.()},Xa=({deck:e,placeholder:t,submitLabel:n,isFocused:r=!1,onSubmit:i,onCancel:a,draftKey:o,look:s=`card`})=>{let{text:c,setText:l,attachments:u,remove:d,canSend:f,submit:p,paste:m}=Ba(e,i,o),h=s===`phone`,g=(0,G.useRef)(null),_=(0,G.useRef)(null);return(0,K.jsxs)(`form`,{className:Wa[s].form,onPointerDown:e=>{(e.target===e.currentTarget||e.target===_.current)&&g.current!==null&&(e.preventDefault(),Ua(g.current))},onSubmit:e=>{e.preventDefault(),p()},children:[(0,K.jsx)(Sa,{attachments:u,onRemove:d}),(0,K.jsx)(`textarea`,{"aria-label":t,className:Wa[s].text,onChange:e=>{l(e.target.value),Ha(e.target)},onKeyDown:Ya({submit:p,cancel:a}),onPaste:m,placeholder:t,ref:qa(g,r),rows:1,value:c}),h?(0,K.jsx)(Ga,{isDisabled:!f,label:n}):null,(0,K.jsxs)(`div`,{className:h?`hidden`:`flex items-center justify-end gap-2`,ref:_,children:[a===void 0?null:(0,K.jsx)(On,{label:`Cancel`,onClick:a,shortcut:xn.close,size:`icon-sm`,type:`button`,children:(0,K.jsx)(Vi,{})}),(0,K.jsx)(On,{disabled:!f,label:n,shortcut:xn.send,size:`icon-sm`,type:`submit`,children:(0,K.jsx)(Tr,{})})]})]})};function Za(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Qa=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$a=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eo={};function to(e,t){return((t||eo).jsx?$a:Qa).test(e)}var no=/[ \t\n\f\r]/g;function ro(e){return typeof e==`object`?e.type===`text`&&io(e.value):io(e)}function io(e){return e.replace(no,``)===``}var ao=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};ao.prototype.normal={},ao.prototype.property={},ao.prototype.space=void 0;function oo(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new ao(n,r,t)}function so(e){return e.toLowerCase()}var co=class{constructor(e,t){this.attribute=t,this.property=e}};co.prototype.attribute=``,co.prototype.booleanish=!1,co.prototype.boolean=!1,co.prototype.commaOrSpaceSeparated=!1,co.prototype.commaSeparated=!1,co.prototype.defined=!1,co.prototype.mustUseProperty=!1,co.prototype.number=!1,co.prototype.overloadedBoolean=!1,co.prototype.property=``,co.prototype.spaceSeparated=!1,co.prototype.space=void 0;var lo=e({boolean:()=>q,booleanish:()=>fo,commaOrSpaceSeparated:()=>ho,commaSeparated:()=>mo,number:()=>J,overloadedBoolean:()=>po,spaceSeparated:()=>Y}),uo=0,q=go(),fo=go(),po=go(),J=go(),Y=go(),mo=go(),ho=go();function go(){return 2**++uo}var _o=Object.keys(lo),vo=class extends co{constructor(e,t,n,r){let i=-1;if(super(e,t),yo(this,`space`,r),typeof n==`number`)for(;++i<_o.length;){let e=_o[i];yo(this,_o[i],(n&lo[e])===lo[e])}}};vo.prototype.defined=!0;function yo(e,t,n){n&&(e[t]=n)}function bo(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new vo(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[so(r)]=r,n[so(a.attribute)]=r}return new ao(t,n,e.space)}var xo=bo({properties:{ariaActiveDescendant:null,ariaAtomic:fo,ariaAutoComplete:null,ariaBusy:fo,ariaChecked:fo,ariaColCount:J,ariaColIndex:J,ariaColSpan:J,ariaControls:Y,ariaCurrent:null,ariaDescribedBy:Y,ariaDetails:null,ariaDisabled:fo,ariaDropEffect:Y,ariaErrorMessage:null,ariaExpanded:fo,ariaFlowTo:Y,ariaGrabbed:fo,ariaHasPopup:null,ariaHidden:fo,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Y,ariaLevel:J,ariaLive:null,ariaModal:fo,ariaMultiLine:fo,ariaMultiSelectable:fo,ariaOrientation:null,ariaOwns:Y,ariaPlaceholder:null,ariaPosInSet:J,ariaPressed:fo,ariaReadOnly:fo,ariaRelevant:null,ariaRequired:fo,ariaRoleDescription:Y,ariaRowCount:J,ariaRowIndex:J,ariaRowSpan:J,ariaSelected:fo,ariaSetSize:J,ariaSort:null,ariaValueMax:J,ariaValueMin:J,ariaValueNow:J,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function So(e,t){return t in e?e[t]:t}function Co(e,t){return So(e,t.toLowerCase())}var wo=bo({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:mo,acceptCharset:Y,accessKey:Y,action:null,allow:null,allowFullScreen:q,allowPaymentRequest:q,allowUserMedia:q,alpha:q,alt:null,as:null,async:q,autoCapitalize:null,autoComplete:Y,autoFocus:q,autoPlay:q,blocking:Y,capture:null,charSet:null,checked:q,cite:null,className:Y,closedBy:null,colorSpace:null,cols:J,colSpan:J,command:null,commandFor:null,content:null,contentEditable:fo,controls:q,controlsList:Y,coords:J|mo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:q,defer:q,dir:null,dirName:null,disabled:q,download:po,draggable:fo,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:q,formTarget:null,headers:Y,height:J,hidden:po,high:J,href:null,hrefLang:null,htmlFor:Y,httpEquiv:Y,id:null,imageSizes:null,imageSrcSet:null,inert:q,inputMode:null,integrity:null,is:null,isMap:q,itemId:null,itemProp:Y,itemRef:Y,itemScope:q,itemType:Y,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:q,low:J,manifest:null,max:null,maxLength:J,media:null,method:null,min:null,minLength:J,multiple:q,muted:q,name:null,nonce:null,noModule:q,noValidate:q,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:q,optimum:J,pattern:null,ping:Y,placeholder:null,playsInline:q,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:q,referrerPolicy:null,rel:Y,required:q,reversed:q,rows:J,rowSpan:J,sandbox:Y,scope:null,scoped:q,seamless:q,selected:q,shadowRootClonable:q,shadowRootCustomElementRegistry:q,shadowRootDelegatesFocus:q,shadowRootMode:null,shadowRootSerializable:q,shape:null,size:J,sizes:null,slot:null,span:J,spellCheck:fo,src:null,srcDoc:null,srcLang:null,srcSet:null,start:J,step:null,style:null,tabIndex:J,target:null,title:null,translate:null,type:null,typeMustMatch:q,useMap:null,value:fo,width:J,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Y,axis:null,background:null,bgColor:null,border:J,borderColor:null,bottomMargin:J,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:q,declare:q,event:null,face:null,frame:null,frameBorder:null,hSpace:J,leftMargin:J,link:null,longDesc:null,lowSrc:null,marginHeight:J,marginWidth:J,noResize:q,noHref:q,noShade:q,noWrap:q,object:null,profile:null,prompt:null,rev:null,rightMargin:J,rules:null,scheme:null,scrolling:fo,standby:null,summary:null,text:null,topMargin:J,valueType:null,version:null,vAlign:null,vLink:null,vSpace:J,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:q,disablePictureInPicture:q,disableRemotePlayback:q,exportParts:mo,part:Y,prefix:null,property:null,results:J,security:null,unselectable:null},space:`html`,transform:Co}),To=bo({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:ho,accentHeight:J,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:J,amplitude:J,arabicForm:null,ascent:J,attributeName:null,attributeType:null,azimuth:J,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:J,by:null,calcMode:null,capHeight:J,className:Y,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:J,diffuseConstant:J,direction:null,display:null,dur:null,divisor:J,dominantBaseline:null,download:q,dx:null,dy:null,edgeMode:null,editable:null,elevation:J,enableBackground:null,end:null,event:null,exponent:J,externalResourcesRequired:null,fill:null,fillOpacity:J,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:mo,g2:mo,glyphName:mo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:J,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:J,horizOriginX:J,horizOriginY:J,id:null,ideographic:J,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:J,k:J,k1:J,k2:J,k3:J,k4:J,kernelMatrix:ho,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:J,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:J,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:J,overlineThickness:J,paintOrder:null,panose1:null,path:null,pathLength:J,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Y,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:J,pointsAtY:J,pointsAtZ:J,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ho,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ho,rev:ho,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ho,requiredFeatures:ho,requiredFonts:ho,requiredFormats:ho,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:J,specularExponent:J,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:J,strikethroughThickness:J,string:null,stroke:null,strokeDashArray:ho,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:J,strokeOpacity:J,strokeWidth:null,style:null,surfaceScale:J,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ho,tabIndex:J,tableValues:null,target:null,targetX:J,targetY:J,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ho,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:J,underlineThickness:J,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:J,values:null,vAlphabetic:J,vMathematical:J,vectorEffect:null,vHanging:J,vIdeographic:J,version:null,vertAdvY:J,vertOriginX:J,vertOriginY:J,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:J,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:So}),Eo=bo({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()}}),Do=bo({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Co}),Oo=bo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),ko={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`},Ao=/[A-Z]/g,jo=/-[a-z]/g,Mo=/^data[-\w.:]+$/i;function No(e,t){let n=so(t),r=t,i=co;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Mo.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(jo,Fo);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!jo.test(e)){let n=e.replace(Ao,Po);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=vo}return new i(r,t)}function Po(e){return`-`+e.toLowerCase()}function Fo(e){return e.charAt(1).toUpperCase()}var Io=oo([xo,wo,Eo,Do,Oo],`html`),Lo=oo([xo,To,Eo,Do,Oo],`svg`);function Ro(e){return e.join(` `).trim()}var zo=/\/\*(?:[^*]|\*(?!\/))*\*\//g,Bo=/\n/g,Vo=/^\s*/,Ho=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Uo=/^:\s*/,Wo=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,Go=/^[;\s]*/,Ko=`
4
4
  `,qo=`/`,Jo=`*`,Yo=``,Xo=`comment`,Zo=`declaration`;function Qo(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(Bo);t&&(n+=t.length);var i=e.lastIndexOf(Ko);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(Vo)}function u(e){for(var t;t=d();)e.push(t);return e}function d(){var t=a();if(qo==e.charAt(0)&&Jo==e.charAt(1)){for(var n=2;Yo!=e.charAt(n)&&(Jo!=e.charAt(n)||qo!=e.charAt(n+1));)++n;if(n+=2,Yo===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:Xo,comment:o})}}function f(){var e=a(),t=c(Ho);if(t){if(d(),!c(Uo))return s(`property missing ':'`);var n=c(Wo),r=e({type:Zo,property:t[0].replace(zo,Yo).trim(),value:n?n[0].replace(zo,Yo).trim():Yo});return c(Go),r}}function p(){var e=[];u(e);for(var t;t=f();)e.push(t),u(e);return e}return l(),p()}function $o(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=Qo(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n??={},n[r]=a)}),n}var es=ns(`end`),ts=ns(`start`);function ns(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 rs(e){let t=ts(e),n=es(e);if(t&&n)return{start:t,end:n}}function is(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?os(e.position):`start`in e||`end`in e?os(e):`line`in e||`column`in e?as(e):``}function as(e){return ss(e&&e.line)+`:`+ss(e&&e.column)}function os(e){return as(e&&e.start)+`-`+as(e&&e.end)}function ss(e){return e&&typeof e==`number`?e:1}var cs=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){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=is(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}};Object.defineProperties(cs.prototype,{file:{configurable:!0,enumerable:!0,value:``,writable:!0},name:{configurable:!0,enumerable:!0,value:``,writable:!0},reason:{configurable:!0,enumerable:!0,value:``,writable:!0},message:{configurable:!0,enumerable:!0,value:``,writable:!0},stack:{configurable:!0,enumerable:!0,value:``,writable:!0},column:{configurable:!0,enumerable:!0,writable:!0},line:{configurable:!0,enumerable:!0,writable:!0},ancestors:{configurable:!0,enumerable:!0,writable:!0},cause:{configurable:!0,enumerable:!0,writable:!0},fatal:{configurable:!0,enumerable:!0,writable:!0},place:{configurable:!0,enumerable:!0,writable:!0},ruleId:{configurable:!0,enumerable:!0,writable:!0},source:{configurable:!0,enumerable:!0,writable:!0}});var ls={}.hasOwnProperty,us=new Map,ds=/[A-Z]/g,fs=/-([a-z])/g,ps=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),ms=new Set([`td`,`th`]),hs=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function gs(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=Ds(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=Es(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`?Lo:Io,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=_s(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function _s(e,t,n){if(t.type===`element`)return vs(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return ys(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return xs(e,t,n);if(t.type===`mdxjsEsm`)return bs(e,t);if(t.type===`root`)return Ss(e,t,n);if(t.type===`text`)return Cs(e,t)}function vs(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Lo,e.schema=i),e.ancestors.push(t);let a=Ns(e,t.tagName,!1),o=Os(e,t),s=As(e,t);return ps.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!ro(e)})),ws(e,o,a,t),Ts(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function ys(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)}Ps(e,t.position)}function bs(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ps(e,t.position)}function xs(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Lo,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Ns(e,t.name,!0),o=ks(e,t),s=As(e,t);return ws(e,o,a,t),Ts(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Ss(e,t,n){let r={};return Ts(r,As(e,t)),e.create(t,e.Fragment,r,n)}function Cs(e,t){return t.value}function ws(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ts(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Es(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 Ds(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=ts(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 Os(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&ls.call(t.properties,i)){let a=js(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&ms.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 ks(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 Ps(e,t.position)}else{let{name:i}=r,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 Ps(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function As(e,t){let n=[],r=-1,i=e.passKeys?new Map:us;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=_s(e,a,o);s!==void 0&&n.push(s)}return n}function js(e,t,n){if(n==null||typeof n==`number`&&Number.isNaN(n))return;let r=No(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?Za(n):Ro(n)),r.property===`style`?[`style`,typeof n==`object`?e.stylePropertyNameCase===`dom`?n:Fs(n):Ms(e,String(n))]:[e.elementAttributeNameCase===`react`&&r.space?ko[r.property]||r.property:r.attribute,n]}function Ms(e,t){let n={};try{$o(t,function(t,r){if(t&&r){let i=t;i.slice(0,2)!==`--`&&(i=i.toLowerCase(),e.stylePropertyNameCase===`dom`&&(i.slice(0,4)===`-ms-`&&(i=i.slice(1)),i=i.replace(fs,Rs))),n[i]=r}})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new cs("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=hs+`#cannot-parse-style-attribute`,r}return n}function Ns(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=to(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=to(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return ls.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ps(e)}function Ps(e,t){let n=new cs("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=hs+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Fs(e){let t={},n;for(n in e)ls.call(e,n)&&(t[Is(n)]=e[n]);return t}function Is(e){if(e.slice(0,2)===`--`)return e;let t=e.replace(ds,Ls);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Ls(e){return`-`+e.toLowerCase()}function Rs(e,t){return t.toUpperCase()}var zs={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`]},Bs={};function Vs(e,t){let n=t||Bs;return Hs(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function Hs(e,t,n){if(Ws(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 Us(e.children,t,n)}return Array.isArray(e)?Us(e,t,n):``}function Us(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Hs(e[i],t,n);return r.join(``)}function Ws(e){return!!(e&&typeof e==`object`)}var Gs=document.createElement(`i`);function Ks(e){let t=`&`+e+`;`;Gs.innerHTML=t;let n=Gs.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function qs(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 Js(e,t){return e.length>0?(qs(e,e.length,0,t),e):t}var Ys={}.hasOwnProperty;function Xs(e){let t={},n=-1;for(;++n<e.length;)Zs(t,e[n]);return t}function Zs(e,t){let n;for(n in t){let r=(Ys.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Ys.call(r,a)||(r[a]=[]);let e=i[a];Qs(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Qs(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);qs(e,0,0,r)}function $s(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 ec(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var tc=uc(/[A-Za-z]/),nc=uc(/[\dA-Za-z]/),rc=uc(/[#-'*+\--9=?A-Z^-~]/);function ic(e){return e!==null&&(e<32||e===127)}var ac=uc(/\d/),oc=uc(/[\dA-Fa-f]/),sc=uc(/[!-/:-@[-`{-~]/);function X(e){return e!==null&&e<-2}function Z(e){return e!==null&&(e<0||e===32)}function Q(e){return e===-2||e===-1||e===32}var cc=uc(/\p{P}|\p{S}/u),lc=uc(/\s/);function uc(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function dc(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&nc(e.charCodeAt(n+1))&&nc(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 $(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Q(r)?(e.enter(n),s(r)):t(r)}function s(r){return Q(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function fc(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&Q(t)?(e.enter(r),c(t)):l(t)}function c(t){return Q(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var pc={tokenize:mc};function mc(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),$(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);else return X(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var hc=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){gc(this,e,t,n,!1)}addBefore(e,t,n){gc(this,e,t,n,!0)}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,this.index.clear()}};function gc(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var _c={tokenize:yc},vc={tokenize:bc};function yc(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++;let c=new hc;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),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(vc,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(vc,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);else 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);else return X(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++;let l=new hc;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}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 bc(e,t,n){return $(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function xc(e){if(e===null||Z(e)||lc(e))return 1;if(cc(e))return 2}function Sc(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 Cc={name:`attention`,resolveAll:wc,tokenize:Tc};function wc(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};Ec(o,-a),Ec(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=Js(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=Js(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=Js(r,Sc(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=Js(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=Js(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),qs(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Tc(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=xc(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=xc(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Ec(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Dc={name:`autolink`,tokenize:Oc};function Oc(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 tc(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||nc(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||nc(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||ic(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):rc(t)?(e.consume(t),l):n(t)}function u(e){return nc(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||nc(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var kc={partial:!0,tokenize:Ac};function Ac(e,t,n){return r;function r(t){return Q(t)?$(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||X(e)?t(e):n(e)}}var jc={continuation:{tokenize:Nc},exit:Pc,name:`blockQuote`,tokenize:Mc};function Mc(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 Q(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Nc(e,t,n){let r=this;return i;function i(t){return Q(t)?$(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(jc,t,n)(r)}}function Pc(e){e.exit(`blockQuote`)}var Fc={name:`characterEscape`,tokenize:Ic};function Ic(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 sc(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Lc={name:`characterReference`,tokenize:Rc};function Rc(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=nc,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=oc,u):(e.enter(`characterReferenceValue`),a=7,o=ac,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===nc&&!Ks(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 zc={partial:!0,tokenize:Bc};function Bc(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 Vc={concrete:!0,name:`codeFenced`,tokenize:Hc};function Hc(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`),Q(t)?$(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||X(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(zc,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||X(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),$(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||X(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||X(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&&Q(t)?$(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||X(t)?e.check(zc,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||X(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`),Q(t)?$(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`),Q(t)?$(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||X(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var Uc={name:`codeIndented`,tokenize:Gc},Wc={partial:!0,tokenize:Kc};function Gc(e,t,n){return r;function r(t){return e.enter(`codeIndented`),fc(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):X(t)?e.attempt(Wc,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||X(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function Kc(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):X(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):fc(e,t,a,`linePrefix`,4,4)(o)}function a(e){return X(e)?i(e):n(e)}}var qc={name:`codeText`,previous:Yc,resolve:Jc,tokenize:Xc};function Jc(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 Yc(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Xc(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)):X(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||X(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 Zc=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&&Qc(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),Qc(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Qc(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);Qc(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Qc(this.left,t.reverse())}}}};function Qc(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 $c(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Zc(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,el(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 qs(e,0,1/0,u.slice(0)),!l}function el(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 tl={resolve:rl,tokenize:il},nl={partial:!0,tokenize:al};function rl(e){return $c(e),e}function il(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):X(t)?e.check(nl,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 al(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$(e,a,`linePrefix`)}function a(i){if(i===null||X(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 ol(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||ic(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||X(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||Z(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||ic(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 sl(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):X(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||X(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Q(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function cl(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):X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||X(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 ll(e,t){let n;return r;function r(i){return X(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Q(i)?$(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var ul={name:`definition`,tokenize:fl},dl={partial:!0,tokenize:pl};function fl(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return sl.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=ec(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 Z(t)?ll(e,l)(t):l(t)}function l(t){return ol(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(dl,d,d)(t)}function d(t){return Q(t)?$(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||X(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function pl(e,t,n){return r;function r(t){return Z(t)?ll(e,i)(t):n(t)}function i(t){return cl(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Q(t)?$(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||X(e)?t(e):n(e)}}var ml={name:`hardBreakEscape`,tokenize:hl};function hl(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return X(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var gl={name:`headingAtx`,resolve:_l,tokenize:vl};function _l(e,t){let n=e.length-2,r=3;if(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){let 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`};qs(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function vl(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||Z(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||X(n)?(e.exit(`atxHeading`),t(n)):Q(n)?$(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||Z(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var yl=`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(`.`),bl=[`pre`,`script`,`style`,`textarea`],xl={concrete:!0,name:`htmlFlow`,resolveTo:Cl,tokenize:wl},Sl={partial:!0,tokenize:Tl};function Cl(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 wl(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:te):tc(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):tc(a)?(e.consume(a),i=4,r.interrupt?t:te):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:te):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 tc(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Z(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&bl.includes(l)?(i=1,r.interrupt?t(s):O(s)):yl.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||nc(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 Q(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||tc(t)?(e.consume(t),b):Q(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||nc(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Q(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):Q(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||X(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||Z(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Q(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||X(t)?O(t):Q(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),j):t===60&&i===1?(e.consume(t),M):t===62&&i===4?(e.consume(t),F):t===63&&i===3?(e.consume(t),te):t===93&&i===5?(e.consume(t),P):X(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Sl,I,k)(t)):t===null||X(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(zc,A,I)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return t===null||X(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function j(t){return t===45?(e.consume(t),te):O(t)}function M(t){return t===47?(e.consume(t),o=``,N):O(t)}function N(t){if(t===62){let n=o.toLowerCase();return bl.includes(n)?(e.consume(t),F):O(t)}return tc(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),N):O(t)}function P(t){return t===93?(e.consume(t),te):O(t)}function te(t){return t===62?(e.consume(t),F):t===45&&i===2?(e.consume(t),te):O(t)}function F(t){return t===null||X(t)?(e.exit(`htmlFlowData`),I(t)):(e.consume(t),F)}function I(n){return e.exit(`htmlFlow`),t(n)}}function Tl(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(kc,t,n)}}var El={name:`htmlText`,tokenize:Dl};function Dl(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):tc(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):tc(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):X(t)?(o=d,M(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?j(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):X(t)?(o=h,M(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?j(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?j(t):X(t)?(o=v,M(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):X(t)?(o=y,M(t)):(e.consume(t),y)}function b(e){return e===62?j(e):y(e)}function x(t){return tc(t)?(e.consume(t),S):n(t)}function S(t){return t===45||nc(t)?(e.consume(t),S):C(t)}function C(t){return X(t)?(o=C,M(t)):Q(t)?(e.consume(t),C):j(t)}function w(t){return t===45||nc(t)?(e.consume(t),w):t===47||t===62||Z(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),j):t===58||t===95||tc(t)?(e.consume(t),E):X(t)?(o=T,M(t)):Q(t)?(e.consume(t),T):j(t)}function E(t){return t===45||t===46||t===58||t===95||nc(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):X(t)?(o=D,M(t)):Q(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):X(t)?(o=O,M(t)):Q(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,ee):t===null?n(t):X(t)?(o=k,M(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||Z(t)?T(t):(e.consume(t),A)}function ee(e){return e===47||e===62||Z(e)?T(e):n(e)}function j(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function M(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),N}function N(t){return Q(t)?$(e,P,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):P(t)}function P(t){return e.enter(`htmlTextData`),o(t)}}var Ol={name:`labelEnd`,resolveAll:Ml,resolveTo:Nl,tokenize:Pl},kl={tokenize:Fl},Al={tokenize:Il},jl={tokenize:Ll};function Ml(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&&qs(e,0,e.length,n),e}function Nl(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=Js(o,e.slice(i+1,i+r+3)),o=Js(o,[[`enter`,l,t]]),o=Js(o,Sc(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=Js(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=Js(o,e.slice(a+1)),o=Js(o,[[`exit`,s,t]]),qs(e,i,e.length,o),e}function Pl(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(ec(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(kl,u,o?u:d)(t):t===91?e.attempt(Al,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(jl,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function Fl(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 Z(t)?ll(e,a)(t):a(t)}function a(t){return t===41?u(t):ol(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Z(t)?ll(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?cl(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Z(t)?ll(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 Il(e,t,n){let r=this;return i;function i(t){return sl.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(ec(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Ll(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 Rl={name:`labelStartImage`,resolveAll:Ol.resolveAll,tokenize:zl};function zl(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Bl={name:`labelStartLink`,resolveAll:Ol.resolveAll,tokenize:Vl};function Vl(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Hl={name:`lineEnding`,tokenize:Ul};function Ul(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),$(e,t,`linePrefix`)}}var Wl={name:`thematicBreak`,tokenize:Gl};function Gl(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||X(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Q(t)?$(e,s,`whitespace`)(t):s(t))}}var Kl={continuation:{tokenize:Xl},exit:Ql,name:`list`,tokenize:Yl},ql={partial:!0,tokenize:$l},Jl={partial:!0,tokenize:Zl};function Yl(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:ac(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(Wl,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 ac(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(kc,r.interrupt?n:u,e.attempt(ql,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Q(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 Xl(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(kc,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,$(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Q(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(Jl,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,$(e,e.attempt(Kl,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Zl(e,t,n){let r=this;return $(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 Ql(e){e.exit(this.containerState.type)}function $l(e,t,n){let r=this;return $(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!Q(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var eu={name:`setextUnderline`,resolveTo:tu,tokenize:nu};function tu(e,t){let n=new hc,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function nu(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`),Q(t)?$(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||X(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var ru={tokenize:iu};function iu(e){let t=this,n=e.attempt(kc,r,e.attempt(this.parser.constructs.flowInitial,i,$(e,e.attempt(this.parser.constructs.flow,i,e.attempt(tl,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var au={resolveAll:lu()},ou=cu(`string`),su=cu(`text`);function cu(e){return{resolveAll:lu(e===`text`?uu: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);else 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 lu(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 uu(e,t){let n=new hc,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var du=e({attentionMarkers:()=>yu,contentInitial:()=>pu,disable:()=>bu,document:()=>fu,flow:()=>hu,flowInitial:()=>mu,insideSpan:()=>vu,string:()=>gu,text:()=>_u}),fu={42:Kl,43:Kl,45:Kl,48:Kl,49:Kl,50:Kl,51:Kl,52:Kl,53:Kl,54:Kl,55:Kl,56:Kl,57:Kl,62:jc},pu={91:ul},mu={[-2]:Uc,[-1]:Uc,32:Uc},hu={35:gl,42:Wl,45:[eu,Wl],60:xl,61:eu,95:Wl,96:Vc,126:Vc},gu={38:Lc,92:Fc},_u={[-5]:Hl,[-4]:Hl,[-3]:Hl,33:Rl,38:Lc,42:Cc,60:[Dc,El],91:Bl,92:[ml,Fc],93:Ol,95:Cc,96:qc},vu={null:[Cc,au]},yu={null:[42,95]},bu={null:[]};function xu(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=Js(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Sc(a,l.events,l),l.events):[]}function f(e,t){return Cu(p(e),t)}function p(e){return Su(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(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){X(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&&qs(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 Su(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 Cu(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=`
@@ -1 +1 @@
1
- import{R as e,Y as t}from"./decks.functions-tXNTG2sC.js";import{r as n}from"./index-D3quZsre.js";var r=t();function i(){let t=n.useLoaderData();return(0,r.jsxs)(`main`,{className:`mx-auto flex max-w-3xl flex-col gap-6 px-4 py-12`,children:[(0,r.jsx)(`h1`,{className:`text-2xl font-semibold`,children:`Review decks`}),(0,r.jsx)(`ul`,{className:`flex flex-col gap-1`,children:t.map(t=>(0,r.jsx)(`li`,{children:(0,r.jsxs)(e,{className:`flex justify-between gap-4 rounded-lg px-3 py-2.5 transition-colors duration-150 ease-out hover:bg-secondary`,params:{deck:t.name},to:`/decks/$deck`,children:[(0,r.jsx)(`span`,{children:t.title}),(0,r.jsxs)(`span`,{className:`text-muted-foreground`,children:[t.points,` points`]})]})},t.name))})]})}export{i as component};
1
+ import{R as e,Y as t}from"./decks.functions-tXNTG2sC.js";import{r as n}from"./index-X7OFY5bM.js";var r=t();function i(){let t=n.useLoaderData();return(0,r.jsxs)(`main`,{className:`mx-auto flex max-w-3xl flex-col gap-6 px-4 py-12`,children:[(0,r.jsx)(`h1`,{className:`text-2xl font-semibold`,children:`Review decks`}),(0,r.jsx)(`ul`,{className:`flex flex-col gap-1`,children:t.map(t=>(0,r.jsx)(`li`,{children:(0,r.jsxs)(e,{className:`flex justify-between gap-4 rounded-lg px-3 py-2.5 transition-colors duration-150 ease-out hover:bg-secondary`,params:{deck:t.name},to:`/decks/$deck`,children:[(0,r.jsx)(`span`,{children:t.title}),(0,r.jsxs)(`span`,{className:`text-muted-foreground`,children:[t.points,` points`]})]})},t.name))})]})}export{i as component};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{A as t,G as n,O as r,S as i,Y as a,a as o,f as s,j as c,kt as l,r as u,w as d}from"./decks.functions-tXNTG2sC.js";import{Cn as f,Fn as p,Ln as m,Rn as h,Sn as g,a as _,an as ee,bt as v,dn as y,hn as b,in as x,s as S,xn as C}from"./use-window-event-BDUVK1pJ.js";import{C as w,w as T}from"./shortcuts-BsNWbUaT.js";import{b as E}from"./index-D3quZsre.js";var D=e(l(),1),O=a();function k(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var A=`review-deck-pending-answers`,j=d({choice:i(c()),note:c()}),M=new Map,N=new Map,P=new Map,F=e=>{P.get(e)?.forEach(e=>{e()})},I=(e,t)=>{M.set(e,t),F(e)},L=(e,t)=>{M.has(e)||M.set(e,t)},R=(e,t)=>{let n=P.get(e)??new Set;return n.add(t),P.set(e,n),()=>{n.delete(t)}},z=()=>{try{let e=t(r(c(),j),JSON.parse(localStorage.getItem(A)??`{}`));return e.success?e.output:{}}catch{return{}}},B=e=>{try{return localStorage.setItem(A,JSON.stringify(e)),!0}catch{return!1}},V=(e,t)=>`${e}/${t}`,H=async(e,t,n)=>{let r=V(e,t);B({...z(),[r]:n});let i=await s({data:{deck:e,point:t,...n}}),{[r]:a,...o}=z(),c=M.get(e);return B(o),c&&I(e,{...c,answers:{...c.answers,[t]:i}}),i},te=async(e,t)=>{let n=`${e}/`,r=Object.entries(z()).filter(([e,r])=>e.startsWith(n)&&t.answers[e.slice(n.length)]?.choice!==r.choice);await Promise.all(r.map(([t,r])=>H(e,t.slice(n.length),r)))},U=e=>{let t=N.get(e)??w();return N.set(e,t),t},W=async e=>{let t=await T(U(e),()=>u({data:{deck:e}}));if(t===null)return!1;let n=M.get(e);return I(e,t),await te(e,t),n!==void 0&&n.stamp!==t.stamp},ne=e=>M.get(e),G=4e3,K=(e,t)=>(L(e,t),(0,D.useSyncExternalStore)(t=>R(e,t),()=>ne(e)??t,()=>t)),re=(e,t)=>{let r=n(),i=async()=>{await W(e)&&await r.invalidate()};return E(()=>{i()},G),K(e,t)},ie=(e,t)=>{let r=n(),i=async()=>{let n=await o({data:{deck:e,point:t.id}});n!==null&&n!==t.stamp&&await r.invalidate()};E(()=>{i()},G)},ae=D.createContext(void 0);function q(){let e=D.useContext(ae);if(e===void 0)throw Error(p(53));return e}function J(e,t,n){if(!e)return 0;let r=getComputedStyle(e),i=`${t}${n===`x`?`Inline`:`Block`}`,a=parseFloat(r[`${i}Start`]);return n===`x`&&t===`margin`?a*2:a+parseFloat(r[`${i}End`])}var Y=`base-ui-disable-scrollbar`,X={className:Y,getElement(e){return(0,O.jsx)(`style`,{nonce:e,href:Y,precedence:`base-ui:low`,children:`.${Y}{scrollbar-width:none}.${Y}::-webkit-scrollbar{display:none}`})}},Z=`data-has-overflow-x`,Q=`data-has-overflow-y`,oe=`data-overflow-x-start`,se=`data-overflow-x-end`,ce=`data-overflow-y-start`,le=`data-overflow-y-end`,$=e=>t=>t?{[e]:``}:null,ue={hasOverflowX:$(Z),hasOverflowY:$(Q),overflowXStart:$(oe),overflowXEnd:$(se),overflowYStart:$(ce),overflowYEnd:$(le),cornerHidden:()=>null},de=D.createContext(void 0),fe={disableStyleElements:!1};function pe(){return D.useContext(de)??fe}var me=`--scroll-area-corner-height`,he=`--scroll-area-corner-width`,ge=`data-orientation`,_e={x:0,y:0},ve={width:0,height:0},ye={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},be={x:!0,y:!0,corner:!0},xe=D.forwardRef(function(e,t){let{render:n,className:r,overflowEdgeThreshold:i,style:a,...o}=e,{xStart:s,xEnd:c,yStart:l,yEnd:u}=Se(i),d=S(),p=b(),m=b(),{nonce:g,disableStyleElements:_}=pe(),[ee,v]=D.useState(!1),[y,C]=D.useState(!1),[w,T]=D.useState(!1),[E,k]=D.useState(!1),[A,j]=D.useState(!1),[M,N]=D.useState(ve),[P,F]=D.useState(ve),[I,L]=D.useState(ye),[R,z]=D.useState(be),B=D.useRef(null),V=D.useRef(null),H=D.useRef(null),te=D.useRef(null),U=D.useRef(null),W=D.useRef(null),ne=D.useRef(null),G=D.useRef(null),K=D.useRef(0),re=D.useRef(0),ie=D.useRef(0),q=D.useRef(0),Y=D.useRef(`vertical`),Z=D.useRef(_e),Q=D.useRef(null);function oe(e){let t=e?T:C,n=e?p:m;t(!0),n.start(500,()=>{t(!1)})}let se=h(e=>{let t=e.x-Z.current.x,n=e.y-Z.current.y;Z.current=e,n!==0&&oe(!0),t!==0&&oe(!1)}),ce=h(()=>{let e=V.current;e&&Q.current===null&&(Q.current=e.style.scrollSnapType,e.style.scrollSnapType=`none`)}),le=h(e=>{if(e.button!==0||G.current!==null&&(Y.current===`vertical`?U.current:W.current)?.hasPointerCapture(G.current))return;G.current=e.pointerId,K.current=e.clientY,re.current=e.clientX,Y.current=e.currentTarget.getAttribute(ge);let t=V.current;t&&(ie.current=t.scrollTop,q.current=t.scrollLeft,ce()),(Y.current===`vertical`?U.current:W.current)?.setPointerCapture(e.pointerId)}),$=h(e=>{if(e.pointerId!==G.current)return;G.current=null,(Y.current===`vertical`?T:C)(!1),Q.current!==null&&(V.current&&(V.current.style.scrollSnapType=Q.current),Q.current=null);let t=Y.current===`vertical`?U.current:W.current;t?.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId)}),de=h(e=>{if(e.pointerId!==G.current)return;if(e.buttons%2==0){$(e);return}let t=V.current;if(!t)return;let n=Y.current===`vertical`,r=n?U.current:W.current,i=n?H.current:te.current;if(!r||!i)return;let a=n?`y`:`x`,o=J(i,`padding`,a),s=J(r,`margin`,a),c=n?r.offsetHeight:r.offsetWidth,l=(n?i.offsetHeight:i.offsetWidth)-c-o-s,u=n?e.clientY-K.current:e.clientX-re.current,d=l<=0?0:u/l,f=n?t.scrollHeight:t.scrollWidth,p=n?t.clientHeight:t.clientWidth,m=(n?ie.current:q.current)+d*(f-p);n?t.scrollTop=m:t.scrollLeft=m,e.preventDefault(),oe(n)});function fe(e){k(e.pointerType===`touch`)}function xe(e){if(fe(e),e.pointerType!==`touch`){let t=x(B.current,e.target);v(t)}}let Ce=D.useMemo(()=>({scrolling:y||w,hasOverflowX:!R.x,hasOverflowY:!R.y,overflowXStart:I.xStart,overflowXEnd:I.xEnd,overflowYStart:I.yStart,overflowYEnd:I.yEnd,cornerHidden:R.corner}),[y,w,R.x,R.y,R.corner,I]),we={role:`presentation`,onPointerEnter:xe,onPointerMove:xe,onPointerDown:fe,onPointerLeave(){v(!1)},style:{position:`relative`,[me]:`${M.height}px`,[he]:`${M.width}px`}},Te=f(`div`,e,{state:Ce,ref:[t,B],props:[we,o],stateAttributesMapping:ue}),Ee=D.useMemo(()=>({handlePointerDown:le,handlePointerMove:de,handlePointerUp:$,handleScroll:se,disableViewportSnap:ce,cornerSize:M,setCornerSize:N,thumbSize:P,setThumbSize:F,hasMeasuredScrollbar:A,setHasMeasuredScrollbar:j,touchModality:E,cornerRef:ne,scrollingX:y,scrollingY:w,hovering:ee,setHovering:v,viewportRef:V,scrollbarYRef:H,scrollbarXRef:te,thumbYRef:U,thumbXRef:W,rootId:d,hiddenState:R,setHiddenState:z,overflowEdges:I,setOverflowEdges:L,viewportState:Ce,overflowEdgeThreshold:{xStart:s,xEnd:c,yStart:l,yEnd:u}}),[le,de,$,se,ce,M,P,A,E,y,w,ee,d,R,I,Ce,s,c,l,u]);return(0,O.jsxs)(ae.Provider,{value:Ee,children:[!_&&X.getElement(g),Te]})});function Se(e){let t=typeof e==`number`?{xStart:e,xEnd:e,yStart:e,yEnd:e}:e;return{xStart:Math.max(0,t?.xStart||0),xEnd:Math.max(0,t?.xEnd||0),yStart:Math.max(0,t?.yStart||0),yEnd:Math.max(0,t?.yEnd||0)}}var Ce=D.createContext(void 0);function we(e,t){if(t<=0)return 0;let n=k(e,0,t),r=n,i=t-n,a=r<=1,o=i<=1;return a&&o?r<=i?0:t:a?0:o?t:n}var Te=`--scroll-area-overflow-x-start`,Ee=`--scroll-area-overflow-x-end`,De=`--scroll-area-overflow-y-start`,Oe=`--scroll-area-overflow-y-end`,ke=`--scroll-area-thumb-height`,Ae=`--scroll-area-thumb-width`,je=[Te,Ee,De,Oe],Me=!1;function Ne(){Me||y||(typeof CSS<`u`&&`registerProperty`in CSS&&je.forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),Me=!0)}var Pe=D.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{viewportRef:o,scrollbarYRef:s,scrollbarXRef:c,thumbYRef:l,thumbXRef:u,cornerRef:d,cornerSize:p,setCornerSize:g,setThumbSize:ee,rootId:v,setHiddenState:y,hiddenState:x,setHasMeasuredScrollbar:S,handleScroll:C,touchModality:w,setHovering:T,setOverflowEdges:E,overflowEdgeThreshold:k,viewportState:A}=q(),j=_(),M=D.useRef(!0),N=D.useRef([NaN,NaN,NaN,NaN]),P=b(),F=b(),I=h(()=>{let e=o.current,t=s.current,n=c.current,r=l.current,i=u.current,a=d.current;if(!e)return;let f=e.scrollHeight,m=e.scrollWidth,h=e.clientHeight,_=e.clientWidth,v=e.scrollTop,b=e.scrollLeft,x=N.current,C=Number.isNaN(x[0]);if(x[0]=h,x[1]=f,x[2]=_,x[3]=m,C&&S(!0),f===0||m===0)return;let w=Fe(e),T=w.y,D=w.x,O=_/m,A=h/f,M=Math.max(0,m-_),P=Math.max(0,f-h),F=0,I=0;D||(F=we(j===`rtl`?-b:b,M),I=M-F);let L=T?0:we(v,P),R=T?0:P-L,z=D?0:_,B=T?0:h,V=0,H=0;!D&&!T&&(V=t?.offsetWidth||0,H=n?.offsetHeight||0);let te=p.width===0&&p.height===0,U=te?V:0,W=te?H:0,ne=J(n,`padding`,`x`),G=J(t,`padding`,`y`),K=J(i,`margin`,`x`),re=J(r,`margin`,`y`),ie=z-ne-K,ae=B-G-re,q=n?Math.min(n.offsetWidth-U,ie):ie,Y=t?Math.min(t.offsetHeight-W,ae):ae,X=Math.max(16,q*O),Z=Math.max(16,Y*A);if(ee(e=>Ie(e,{width:X,height:Z})),t&&r){let e=Le(r,ke,v,P,f,Z,t.offsetHeight-Z-G-re);r.style.transform=`translate3d(0,${e}px,0)`}if(n&&i){let e=n.offsetWidth-X-ne-K,t=Le(i,Ae,j===`rtl`?-b:b,M,m,X,e);i.style.transform=`translate3d(${j===`rtl`?-t:t}px,0,0)`}let Q=[F,I,L,R];je.forEach((t,n)=>{e.style.setProperty(t,`${Q[n]}px`)}),a&&g(e=>Ie(e,{width:V,height:H})),y(e=>Ie(e,w));let oe={xStart:!D&&F>k.xStart,xEnd:!D&&I>k.xEnd,yStart:!T&&L>k.yStart,yEnd:!T&&R>k.yEnd};E(e=>Ie(e,oe))});m(()=>{Ne()},[]),m(()=>{queueMicrotask(I)},[I,x,j,k.xStart,k.xEnd,k.yStart,k.yEnd]),m(()=>{o.current?.matches(`:hover`)&&T(!0)},[o,T]),m(()=>{let e=o.current;if(typeof ResizeObserver>`u`||!e)return;let t=!1,n=new ResizeObserver(()=>{if(!t){t=!0;let n=N.current;if(n[0]===e.clientHeight&&n[1]===e.scrollHeight&&n[2]===e.clientWidth&&n[3]===e.scrollWidth)return}I()});return n.observe(e),F.start(0,()=>{let t=e.getAnimations({subtree:!0});t.length!==0&&Promise.allSettled(t.map(e=>e.finished)).then(I).catch(()=>{})}),()=>{n.disconnect(),F.clear()}},[I,o,F]);function L(){M.current=!1}let R={role:`presentation`,...v&&{"data-id":`${v}-viewport`},tabIndex:x.x&&x.y?-1:0,className:X.className,style:{overflow:`scroll`},onScroll(){o.current&&(I(),(w||!M.current)&&C({x:o.current.scrollLeft,y:o.current.scrollTop}),P.start(100,()=>{M.current=!0}))},onWheel:L,onPointerMove:L,onPointerEnter:L,onKeyDown:L},z=f(`div`,e,{ref:[t,o],state:A,props:[R,a],stateAttributesMapping:ue}),B=D.useMemo(()=>({computeThumbPosition:I}),[I]);return(0,O.jsx)(Ce.Provider,{value:B,children:z})});function Fe(e){let t=e.clientHeight>=e.scrollHeight,n=e.clientWidth>=e.scrollWidth;return{y:t,x:n,corner:t||n}}function Ie(e,t){for(let n in t)if(e[n]!==t[n])return t;return e}function Le(e,t,n,r,i,a,o){let s=k(n,0,r),c=n-s,l=Math.max(16,a*i/(i+Math.abs(c)));return e.style.setProperty(t,c?`${l}px`:``),(r?s/r*o:0)+(c>0?a-l:0)}var Re=D.createContext(void 0);function ze(){let e=D.useContext(Re);if(e===void 0)throw Error(p(54));return e}var Be=D.forwardRef(function(e,t){let{render:n,className:r,orientation:i=`vertical`,keepMounted:a=!1,style:o,...s}=e,{hovering:c,scrollingX:l,scrollingY:u,hiddenState:d,scrollbarYRef:p,scrollbarXRef:m,viewportRef:h,thumbYRef:g,thumbXRef:y,handlePointerDown:b,handlePointerUp:S,handleScroll:C,disableViewportSnap:w,rootId:T,thumbSize:E,hasMeasuredScrollbar:k,viewportState:A}=q(),j=i===`vertical`,M={...A,hovering:c,scrolling:j?u:l,orientation:i},N=_(),P=!k&&!a,F=j?d.y:d.x,I=a||!F;D.useEffect(()=>{if(!I)return;let e=h.current,t=j?p.current:m.current;if(!t)return;function n(t){if(!e||t.ctrlKey)return;let n=!j,r=n?`scrollLeft`:`scrollTop`,i=n?t.deltaX:t.deltaY;if(i===0)return;let a=n?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight,o=n&&N===`rtl`?-a:0,s=n&&N===`rtl`?0:a,c=e[r];c<=o&&i<0||c>=s&&i>0||(t.preventDefault(),e[r]=Math.min(s,Math.max(o,c+i)),C({x:e.scrollLeft,y:e.scrollTop}))}return v(t,`wheel`,n,{passive:!1})},[N,C,j,m,p,I,h]);let L={...T&&{"data-id":`${T}-scrollbar`},"aria-hidden":!0,onPointerDown(e){if(e.button!==0)return;let t=ee(e.nativeEvent),n=j?g.current:y.current;if(n&&x(n,t))return;let r=h.current;if(!r)return;let i=j?p.current:m.current;if(!n||!i)return;let a=j?`y`:`x`,o=J(n,`margin`,a),s=J(i,`padding`,a),c=j?n.offsetHeight:n.offsetWidth,l=i.getBoundingClientRect(),u=j?e.clientY-l.top-c/2-s+o/2:e.clientX-l.left-c/2-s+o/2,d=j?r.scrollHeight:r.scrollWidth,f=j?r.clientHeight:r.clientWidth,_=(j?i.offsetHeight:i.offsetWidth)-c-s-o;if(_<=0)return;let v=u/_,S=d-f;w(),j?r.scrollTop=v*S:r.scrollLeft=N===`rtl`?-(1-v)*S:v*S,C({x:r.scrollLeft,y:r.scrollTop}),b(e)},onMouseDown(e){e.preventDefault()},onPointerUp:S,onPointerCancel:S,style:{position:`absolute`,touchAction:`none`,WebkitUserSelect:`none`,userSelect:`none`,visibility:P?`hidden`:void 0,...j?{top:0,bottom:`var(${me})`,insetInlineEnd:0,[ke]:`${E.height}px`}:{insetInlineStart:0,insetInlineEnd:`var(${he})`,bottom:0,[Ae]:`${E.width}px`}}},R=f(`div`,e,{ref:[t,j?p:m],state:M,props:[L,s],stateAttributesMapping:ue});return I?(0,O.jsx)(Re.Provider,{value:i,children:R}):null}),Ve=D.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{thumbYRef:o,thumbXRef:s,handlePointerDown:c,handlePointerMove:l,handlePointerUp:u,scrollingX:d,scrollingY:p,hasMeasuredScrollbar:m}=q(),h=ze(),g=h===`vertical`;return f(`div`,e,{ref:[t,g?o:s],state:{scrolling:g?p:d,orientation:h},props:[{onPointerDown:c,onPointerMove:l,onPointerUp:u,onPointerCancel:u,style:{visibility:m?void 0:`hidden`,...g?{height:`var(--scroll-area-thumb-height)`}:{width:`var(--scroll-area-thumb-width)`}}},a]})}),He=g(`size-full outline-none`,{variants:{variant:{default:``,fade:`chat-scroll`,queue:`queue-scroll`}},defaultVariants:{variant:`default`}});function Ue({className:e,variant:t,viewportRef:n,onScroll:r,children:i,...a}){return(0,O.jsxs)(xe,{className:C(`relative size-full min-h-0`,e),"data-slot":`scroll-area`,...a,children:[(0,O.jsx)(Pe,{className:He({variant:t}),"data-slot":`scroll-area-viewport`,onScroll:r,ref:n,children:i}),(0,O.jsx)(Be,{className:`flex w-2 touch-none p-px opacity-0 transition-opacity select-none data-hovering:opacity-100 data-scrolling:opacity-100`,"data-slot":`scroll-area-scrollbar`,orientation:`vertical`,children:(0,O.jsx)(Ve,{className:`relative flex-1 rounded-full bg-border`})})]})}var We=`review-deck-viewed-at`,Ge=`_since`,Ke={},qe=new Set,Je=null,Ye=()=>{try{let e=t(r(c(),c()),JSON.parse(localStorage.getItem(We)??`null`));return e.success?e.output:null}catch{return null}},Xe=()=>(Je??=Ye()??{[Ge]:new Date().toISOString()},Je),Ze=e=>{try{return localStorage.setItem(We,JSON.stringify(e)),!0}catch{return!1}},Qe=(e,t)=>{let n=new Date().toISOString();Je={...Xe(),[e]:t>n?t:n},Ze(Je),qe.forEach(e=>{e()})},$e=(e,t)=>e[t]??e[Ge]??``,et=e=>(qe.add(e),()=>{qe.delete(e)}),tt=()=>Xe(),nt=()=>Ke;export{et as a,K as c,H as d,Qe as i,ie as l,$e as n,Ue as o,tt as r,re as s,nt as t,W as u};
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{A as t,G as n,O as r,S as i,Y as a,a as o,f as s,j as c,kt as l,r as u,w as d}from"./decks.functions-tXNTG2sC.js";import{Cn as f,Fn as p,Ln as m,Rn as h,Sn as g,a as _,an as ee,bt as v,dn as y,hn as b,in as x,s as S,xn as C}from"./use-window-event-BDUVK1pJ.js";import{C as w,w as T}from"./shortcuts-BsNWbUaT.js";import{b as E}from"./index-X7OFY5bM.js";var D=e(l(),1),O=a();function k(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var A=`review-deck-pending-answers`,j=d({choice:i(c()),note:c()}),M=new Map,N=new Map,P=new Map,F=e=>{P.get(e)?.forEach(e=>{e()})},I=(e,t)=>{M.set(e,t),F(e)},L=(e,t)=>{M.has(e)||M.set(e,t)},R=(e,t)=>{let n=P.get(e)??new Set;return n.add(t),P.set(e,n),()=>{n.delete(t)}},z=()=>{try{let e=t(r(c(),j),JSON.parse(localStorage.getItem(A)??`{}`));return e.success?e.output:{}}catch{return{}}},B=e=>{try{return localStorage.setItem(A,JSON.stringify(e)),!0}catch{return!1}},V=(e,t)=>`${e}/${t}`,H=async(e,t,n)=>{let r=V(e,t);B({...z(),[r]:n});let i=await s({data:{deck:e,point:t,...n}}),{[r]:a,...o}=z(),c=M.get(e);return B(o),c&&I(e,{...c,answers:{...c.answers,[t]:i}}),i},te=async(e,t)=>{let n=`${e}/`,r=Object.entries(z()).filter(([e,r])=>e.startsWith(n)&&t.answers[e.slice(n.length)]?.choice!==r.choice);await Promise.all(r.map(([t,r])=>H(e,t.slice(n.length),r)))},U=e=>{let t=N.get(e)??w();return N.set(e,t),t},W=async e=>{let t=await T(U(e),()=>u({data:{deck:e}}));if(t===null)return!1;let n=M.get(e);return I(e,t),await te(e,t),n!==void 0&&n.stamp!==t.stamp},ne=e=>M.get(e),G=4e3,K=(e,t)=>(L(e,t),(0,D.useSyncExternalStore)(t=>R(e,t),()=>ne(e)??t,()=>t)),re=(e,t)=>{let r=n(),i=async()=>{await W(e)&&await r.invalidate()};return E(()=>{i()},G),K(e,t)},ie=(e,t)=>{let r=n(),i=async()=>{let n=await o({data:{deck:e,point:t.id}});n!==null&&n!==t.stamp&&await r.invalidate()};E(()=>{i()},G)},ae=D.createContext(void 0);function q(){let e=D.useContext(ae);if(e===void 0)throw Error(p(53));return e}function J(e,t,n){if(!e)return 0;let r=getComputedStyle(e),i=`${t}${n===`x`?`Inline`:`Block`}`,a=parseFloat(r[`${i}Start`]);return n===`x`&&t===`margin`?a*2:a+parseFloat(r[`${i}End`])}var Y=`base-ui-disable-scrollbar`,X={className:Y,getElement(e){return(0,O.jsx)(`style`,{nonce:e,href:Y,precedence:`base-ui:low`,children:`.${Y}{scrollbar-width:none}.${Y}::-webkit-scrollbar{display:none}`})}},Z=`data-has-overflow-x`,Q=`data-has-overflow-y`,oe=`data-overflow-x-start`,se=`data-overflow-x-end`,ce=`data-overflow-y-start`,le=`data-overflow-y-end`,$=e=>t=>t?{[e]:``}:null,ue={hasOverflowX:$(Z),hasOverflowY:$(Q),overflowXStart:$(oe),overflowXEnd:$(se),overflowYStart:$(ce),overflowYEnd:$(le),cornerHidden:()=>null},de=D.createContext(void 0),fe={disableStyleElements:!1};function pe(){return D.useContext(de)??fe}var me=`--scroll-area-corner-height`,he=`--scroll-area-corner-width`,ge=`data-orientation`,_e={x:0,y:0},ve={width:0,height:0},ye={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},be={x:!0,y:!0,corner:!0},xe=D.forwardRef(function(e,t){let{render:n,className:r,overflowEdgeThreshold:i,style:a,...o}=e,{xStart:s,xEnd:c,yStart:l,yEnd:u}=Se(i),d=S(),p=b(),m=b(),{nonce:g,disableStyleElements:_}=pe(),[ee,v]=D.useState(!1),[y,C]=D.useState(!1),[w,T]=D.useState(!1),[E,k]=D.useState(!1),[A,j]=D.useState(!1),[M,N]=D.useState(ve),[P,F]=D.useState(ve),[I,L]=D.useState(ye),[R,z]=D.useState(be),B=D.useRef(null),V=D.useRef(null),H=D.useRef(null),te=D.useRef(null),U=D.useRef(null),W=D.useRef(null),ne=D.useRef(null),G=D.useRef(null),K=D.useRef(0),re=D.useRef(0),ie=D.useRef(0),q=D.useRef(0),Y=D.useRef(`vertical`),Z=D.useRef(_e),Q=D.useRef(null);function oe(e){let t=e?T:C,n=e?p:m;t(!0),n.start(500,()=>{t(!1)})}let se=h(e=>{let t=e.x-Z.current.x,n=e.y-Z.current.y;Z.current=e,n!==0&&oe(!0),t!==0&&oe(!1)}),ce=h(()=>{let e=V.current;e&&Q.current===null&&(Q.current=e.style.scrollSnapType,e.style.scrollSnapType=`none`)}),le=h(e=>{if(e.button!==0||G.current!==null&&(Y.current===`vertical`?U.current:W.current)?.hasPointerCapture(G.current))return;G.current=e.pointerId,K.current=e.clientY,re.current=e.clientX,Y.current=e.currentTarget.getAttribute(ge);let t=V.current;t&&(ie.current=t.scrollTop,q.current=t.scrollLeft,ce()),(Y.current===`vertical`?U.current:W.current)?.setPointerCapture(e.pointerId)}),$=h(e=>{if(e.pointerId!==G.current)return;G.current=null,(Y.current===`vertical`?T:C)(!1),Q.current!==null&&(V.current&&(V.current.style.scrollSnapType=Q.current),Q.current=null);let t=Y.current===`vertical`?U.current:W.current;t?.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId)}),de=h(e=>{if(e.pointerId!==G.current)return;if(e.buttons%2==0){$(e);return}let t=V.current;if(!t)return;let n=Y.current===`vertical`,r=n?U.current:W.current,i=n?H.current:te.current;if(!r||!i)return;let a=n?`y`:`x`,o=J(i,`padding`,a),s=J(r,`margin`,a),c=n?r.offsetHeight:r.offsetWidth,l=(n?i.offsetHeight:i.offsetWidth)-c-o-s,u=n?e.clientY-K.current:e.clientX-re.current,d=l<=0?0:u/l,f=n?t.scrollHeight:t.scrollWidth,p=n?t.clientHeight:t.clientWidth,m=(n?ie.current:q.current)+d*(f-p);n?t.scrollTop=m:t.scrollLeft=m,e.preventDefault(),oe(n)});function fe(e){k(e.pointerType===`touch`)}function xe(e){if(fe(e),e.pointerType!==`touch`){let t=x(B.current,e.target);v(t)}}let Ce=D.useMemo(()=>({scrolling:y||w,hasOverflowX:!R.x,hasOverflowY:!R.y,overflowXStart:I.xStart,overflowXEnd:I.xEnd,overflowYStart:I.yStart,overflowYEnd:I.yEnd,cornerHidden:R.corner}),[y,w,R.x,R.y,R.corner,I]),we={role:`presentation`,onPointerEnter:xe,onPointerMove:xe,onPointerDown:fe,onPointerLeave(){v(!1)},style:{position:`relative`,[me]:`${M.height}px`,[he]:`${M.width}px`}},Te=f(`div`,e,{state:Ce,ref:[t,B],props:[we,o],stateAttributesMapping:ue}),Ee=D.useMemo(()=>({handlePointerDown:le,handlePointerMove:de,handlePointerUp:$,handleScroll:se,disableViewportSnap:ce,cornerSize:M,setCornerSize:N,thumbSize:P,setThumbSize:F,hasMeasuredScrollbar:A,setHasMeasuredScrollbar:j,touchModality:E,cornerRef:ne,scrollingX:y,scrollingY:w,hovering:ee,setHovering:v,viewportRef:V,scrollbarYRef:H,scrollbarXRef:te,thumbYRef:U,thumbXRef:W,rootId:d,hiddenState:R,setHiddenState:z,overflowEdges:I,setOverflowEdges:L,viewportState:Ce,overflowEdgeThreshold:{xStart:s,xEnd:c,yStart:l,yEnd:u}}),[le,de,$,se,ce,M,P,A,E,y,w,ee,d,R,I,Ce,s,c,l,u]);return(0,O.jsxs)(ae.Provider,{value:Ee,children:[!_&&X.getElement(g),Te]})});function Se(e){let t=typeof e==`number`?{xStart:e,xEnd:e,yStart:e,yEnd:e}:e;return{xStart:Math.max(0,t?.xStart||0),xEnd:Math.max(0,t?.xEnd||0),yStart:Math.max(0,t?.yStart||0),yEnd:Math.max(0,t?.yEnd||0)}}var Ce=D.createContext(void 0);function we(e,t){if(t<=0)return 0;let n=k(e,0,t),r=n,i=t-n,a=r<=1,o=i<=1;return a&&o?r<=i?0:t:a?0:o?t:n}var Te=`--scroll-area-overflow-x-start`,Ee=`--scroll-area-overflow-x-end`,De=`--scroll-area-overflow-y-start`,Oe=`--scroll-area-overflow-y-end`,ke=`--scroll-area-thumb-height`,Ae=`--scroll-area-thumb-width`,je=[Te,Ee,De,Oe],Me=!1;function Ne(){Me||y||(typeof CSS<`u`&&`registerProperty`in CSS&&je.forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),Me=!0)}var Pe=D.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{viewportRef:o,scrollbarYRef:s,scrollbarXRef:c,thumbYRef:l,thumbXRef:u,cornerRef:d,cornerSize:p,setCornerSize:g,setThumbSize:ee,rootId:v,setHiddenState:y,hiddenState:x,setHasMeasuredScrollbar:S,handleScroll:C,touchModality:w,setHovering:T,setOverflowEdges:E,overflowEdgeThreshold:k,viewportState:A}=q(),j=_(),M=D.useRef(!0),N=D.useRef([NaN,NaN,NaN,NaN]),P=b(),F=b(),I=h(()=>{let e=o.current,t=s.current,n=c.current,r=l.current,i=u.current,a=d.current;if(!e)return;let f=e.scrollHeight,m=e.scrollWidth,h=e.clientHeight,_=e.clientWidth,v=e.scrollTop,b=e.scrollLeft,x=N.current,C=Number.isNaN(x[0]);if(x[0]=h,x[1]=f,x[2]=_,x[3]=m,C&&S(!0),f===0||m===0)return;let w=Fe(e),T=w.y,D=w.x,O=_/m,A=h/f,M=Math.max(0,m-_),P=Math.max(0,f-h),F=0,I=0;D||(F=we(j===`rtl`?-b:b,M),I=M-F);let L=T?0:we(v,P),R=T?0:P-L,z=D?0:_,B=T?0:h,V=0,H=0;!D&&!T&&(V=t?.offsetWidth||0,H=n?.offsetHeight||0);let te=p.width===0&&p.height===0,U=te?V:0,W=te?H:0,ne=J(n,`padding`,`x`),G=J(t,`padding`,`y`),K=J(i,`margin`,`x`),re=J(r,`margin`,`y`),ie=z-ne-K,ae=B-G-re,q=n?Math.min(n.offsetWidth-U,ie):ie,Y=t?Math.min(t.offsetHeight-W,ae):ae,X=Math.max(16,q*O),Z=Math.max(16,Y*A);if(ee(e=>Ie(e,{width:X,height:Z})),t&&r){let e=Le(r,ke,v,P,f,Z,t.offsetHeight-Z-G-re);r.style.transform=`translate3d(0,${e}px,0)`}if(n&&i){let e=n.offsetWidth-X-ne-K,t=Le(i,Ae,j===`rtl`?-b:b,M,m,X,e);i.style.transform=`translate3d(${j===`rtl`?-t:t}px,0,0)`}let Q=[F,I,L,R];je.forEach((t,n)=>{e.style.setProperty(t,`${Q[n]}px`)}),a&&g(e=>Ie(e,{width:V,height:H})),y(e=>Ie(e,w));let oe={xStart:!D&&F>k.xStart,xEnd:!D&&I>k.xEnd,yStart:!T&&L>k.yStart,yEnd:!T&&R>k.yEnd};E(e=>Ie(e,oe))});m(()=>{Ne()},[]),m(()=>{queueMicrotask(I)},[I,x,j,k.xStart,k.xEnd,k.yStart,k.yEnd]),m(()=>{o.current?.matches(`:hover`)&&T(!0)},[o,T]),m(()=>{let e=o.current;if(typeof ResizeObserver>`u`||!e)return;let t=!1,n=new ResizeObserver(()=>{if(!t){t=!0;let n=N.current;if(n[0]===e.clientHeight&&n[1]===e.scrollHeight&&n[2]===e.clientWidth&&n[3]===e.scrollWidth)return}I()});return n.observe(e),F.start(0,()=>{let t=e.getAnimations({subtree:!0});t.length!==0&&Promise.allSettled(t.map(e=>e.finished)).then(I).catch(()=>{})}),()=>{n.disconnect(),F.clear()}},[I,o,F]);function L(){M.current=!1}let R={role:`presentation`,...v&&{"data-id":`${v}-viewport`},tabIndex:x.x&&x.y?-1:0,className:X.className,style:{overflow:`scroll`},onScroll(){o.current&&(I(),(w||!M.current)&&C({x:o.current.scrollLeft,y:o.current.scrollTop}),P.start(100,()=>{M.current=!0}))},onWheel:L,onPointerMove:L,onPointerEnter:L,onKeyDown:L},z=f(`div`,e,{ref:[t,o],state:A,props:[R,a],stateAttributesMapping:ue}),B=D.useMemo(()=>({computeThumbPosition:I}),[I]);return(0,O.jsx)(Ce.Provider,{value:B,children:z})});function Fe(e){let t=e.clientHeight>=e.scrollHeight,n=e.clientWidth>=e.scrollWidth;return{y:t,x:n,corner:t||n}}function Ie(e,t){for(let n in t)if(e[n]!==t[n])return t;return e}function Le(e,t,n,r,i,a,o){let s=k(n,0,r),c=n-s,l=Math.max(16,a*i/(i+Math.abs(c)));return e.style.setProperty(t,c?`${l}px`:``),(r?s/r*o:0)+(c>0?a-l:0)}var Re=D.createContext(void 0);function ze(){let e=D.useContext(Re);if(e===void 0)throw Error(p(54));return e}var Be=D.forwardRef(function(e,t){let{render:n,className:r,orientation:i=`vertical`,keepMounted:a=!1,style:o,...s}=e,{hovering:c,scrollingX:l,scrollingY:u,hiddenState:d,scrollbarYRef:p,scrollbarXRef:m,viewportRef:h,thumbYRef:g,thumbXRef:y,handlePointerDown:b,handlePointerUp:S,handleScroll:C,disableViewportSnap:w,rootId:T,thumbSize:E,hasMeasuredScrollbar:k,viewportState:A}=q(),j=i===`vertical`,M={...A,hovering:c,scrolling:j?u:l,orientation:i},N=_(),P=!k&&!a,F=j?d.y:d.x,I=a||!F;D.useEffect(()=>{if(!I)return;let e=h.current,t=j?p.current:m.current;if(!t)return;function n(t){if(!e||t.ctrlKey)return;let n=!j,r=n?`scrollLeft`:`scrollTop`,i=n?t.deltaX:t.deltaY;if(i===0)return;let a=n?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight,o=n&&N===`rtl`?-a:0,s=n&&N===`rtl`?0:a,c=e[r];c<=o&&i<0||c>=s&&i>0||(t.preventDefault(),e[r]=Math.min(s,Math.max(o,c+i)),C({x:e.scrollLeft,y:e.scrollTop}))}return v(t,`wheel`,n,{passive:!1})},[N,C,j,m,p,I,h]);let L={...T&&{"data-id":`${T}-scrollbar`},"aria-hidden":!0,onPointerDown(e){if(e.button!==0)return;let t=ee(e.nativeEvent),n=j?g.current:y.current;if(n&&x(n,t))return;let r=h.current;if(!r)return;let i=j?p.current:m.current;if(!n||!i)return;let a=j?`y`:`x`,o=J(n,`margin`,a),s=J(i,`padding`,a),c=j?n.offsetHeight:n.offsetWidth,l=i.getBoundingClientRect(),u=j?e.clientY-l.top-c/2-s+o/2:e.clientX-l.left-c/2-s+o/2,d=j?r.scrollHeight:r.scrollWidth,f=j?r.clientHeight:r.clientWidth,_=(j?i.offsetHeight:i.offsetWidth)-c-s-o;if(_<=0)return;let v=u/_,S=d-f;w(),j?r.scrollTop=v*S:r.scrollLeft=N===`rtl`?-(1-v)*S:v*S,C({x:r.scrollLeft,y:r.scrollTop}),b(e)},onMouseDown(e){e.preventDefault()},onPointerUp:S,onPointerCancel:S,style:{position:`absolute`,touchAction:`none`,WebkitUserSelect:`none`,userSelect:`none`,visibility:P?`hidden`:void 0,...j?{top:0,bottom:`var(${me})`,insetInlineEnd:0,[ke]:`${E.height}px`}:{insetInlineStart:0,insetInlineEnd:`var(${he})`,bottom:0,[Ae]:`${E.width}px`}}},R=f(`div`,e,{ref:[t,j?p:m],state:M,props:[L,s],stateAttributesMapping:ue});return I?(0,O.jsx)(Re.Provider,{value:i,children:R}):null}),Ve=D.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{thumbYRef:o,thumbXRef:s,handlePointerDown:c,handlePointerMove:l,handlePointerUp:u,scrollingX:d,scrollingY:p,hasMeasuredScrollbar:m}=q(),h=ze(),g=h===`vertical`;return f(`div`,e,{ref:[t,g?o:s],state:{scrolling:g?p:d,orientation:h},props:[{onPointerDown:c,onPointerMove:l,onPointerUp:u,onPointerCancel:u,style:{visibility:m?void 0:`hidden`,...g?{height:`var(--scroll-area-thumb-height)`}:{width:`var(--scroll-area-thumb-width)`}}},a]})}),He=g(`size-full outline-none`,{variants:{variant:{default:``,fade:`chat-scroll`,queue:`queue-scroll`}},defaultVariants:{variant:`default`}});function Ue({className:e,variant:t,viewportRef:n,onScroll:r,children:i,...a}){return(0,O.jsxs)(xe,{className:C(`relative size-full min-h-0`,e),"data-slot":`scroll-area`,...a,children:[(0,O.jsx)(Pe,{className:He({variant:t}),"data-slot":`scroll-area-viewport`,onScroll:r,ref:n,children:i}),(0,O.jsx)(Be,{className:`flex w-2 touch-none p-px opacity-0 transition-opacity select-none data-hovering:opacity-100 data-scrolling:opacity-100`,"data-slot":`scroll-area-scrollbar`,orientation:`vertical`,children:(0,O.jsx)(Ve,{className:`relative flex-1 rounded-full bg-border`})})]})}var We=`review-deck-viewed-at`,Ge=`_since`,Ke={},qe=new Set,Je=null,Ye=()=>{try{let e=t(r(c(),c()),JSON.parse(localStorage.getItem(We)??`null`));return e.success?e.output:null}catch{return null}},Xe=()=>(Je??=Ye()??{[Ge]:new Date().toISOString()},Je),Ze=e=>{try{return localStorage.setItem(We,JSON.stringify(e)),!0}catch{return!1}},Qe=(e,t)=>{let n=new Date().toISOString();Je={...Xe(),[e]:t>n?t:n},Ze(Je),qe.forEach(e=>{e()})},$e=(e,t)=>e[t]??e[Ge]??``,et=e=>(qe.add(e),()=>{qe.delete(e)}),tt=()=>Xe(),nt=()=>Ke;export{et as a,K as c,H as d,Qe as i,ie as l,$e as n,Ue as o,tt as r,re as s,nt as t,W as u};
@@ -1,12 +1,12 @@
1
1
  import { __toESM } from "./_runtime.mjs";
2
- import { ScrollArea$1, getServerViewed, getViewedAt, getViewedSnapshot, subscribeViewed, useLive } from "./_ssr/viewed-store-xn13Ju6x.mjs";
2
+ import { ScrollArea$1, getServerViewed, getViewedAt, getViewedSnapshot, subscribeViewed, useLive } from "./_ssr/viewed-store-RX0hDmiV.mjs";
3
3
  import { Collapsible$1, CollapsibleContent, CollapsibleTrigger, GROUPS, PreviewCard$1, PreviewCardContent, PreviewCardTrigger, SECOND, SHORTCUTS, createPreviewCardHandle, getActivity, getRelativeTime, getStatus, insertPastedText, isOverlayOpen, isTyping, matches, useNow } from "./_ssr/shortcuts-B7llaLLc.mjs";
4
- import { Kbd, Route$5, cn, useWindowEvent } from "./_ssr/router-BLRO6kTw.mjs";
4
+ import { Kbd, Route$5, cn, useWindowEvent } from "./_ssr/router-DH6_gEUb.mjs";
5
5
  import { require_jsx_runtime, require_react } from "./_libs/@base-ui/react+[...].mjs";
6
6
  import { Link, Outlet, useParams } from "./_libs/@tanstack/react-router+[...].mjs";
7
7
  import { boolean, record, safeParse, string } from "./_libs/valibot.mjs";
8
8
  import { ChevronRight, Search } from "./_libs/lucide-react.mjs";
9
- // node_modules/.nitro/vite/services/ssr/assets/_deck-CxY-KSJu.js
9
+ // node_modules/.nitro/vite/services/ssr/assets/_deck-x23t7F7l.js
10
10
  var import_react = /* @__PURE__ */ __toESM(require_react());
11
11
  var import_jsx_runtime = require_jsx_runtime();
12
12
  var OPEN_KEY = "review-deck-open-groups";
@@ -1,13 +1,13 @@
1
1
  import { __toESM } from "./_runtime.mjs";
2
- import { ScrollArea$1, markViewed, refreshLive, sendAnswer, useLiveState, usePointRefresh } from "./_ssr/viewed-store-xn13Ju6x.mjs";
2
+ import { ScrollArea$1, markViewed, refreshLive, sendAnswer, useLiveState, usePointRefresh } from "./_ssr/viewed-store-RX0hDmiV.mjs";
3
3
  import { SHORTCUTS, getNextOpen, getRevision, isOverlayOpen, isTyping, matches } from "./_ssr/shortcuts-B7llaLLc.mjs";
4
- import { Hint, IconButton, cn, postComment, resolveComment, useReviewPrefs, useToast, useWindowEvent } from "./_ssr/router-BLRO6kTw.mjs";
5
- import { CommentForm, DiffFile, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuShortcut, DropdownMenuTrigger, EDITOR_NAMES, GalleryFrame, GalleryProvider, LineRow, LineThread, LooseThreads, Markdown, Message, ReviewBlock, RowThreads, getEditorLink, getFolderLink, getPicked, openInEditor, placeThreads, toDeckSrc, toRange, useKnownComments, useLineSelection, useOpenGallery } from "./_ssr/review-block-BCVuzSG_.mjs";
4
+ import { Hint, IconButton, cn, postComment, resolveComment, useReviewPrefs, useToast, useWindowEvent } from "./_ssr/router-DH6_gEUb.mjs";
5
+ import { CommentForm, DiffFile, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuShortcut, DropdownMenuTrigger, EDITOR_NAMES, GalleryFrame, GalleryProvider, LineRow, LineThread, LooseThreads, Markdown, Message, ReviewBlock, RowThreads, getEditorLink, getFolderLink, getPicked, openInEditor, placeThreads, toDeckSrc, toRange, useKnownComments, useLineSelection, useOpenGallery } from "./_ssr/review-block-C-oUK43P.mjs";
6
6
  import { RadioGroup, RadioIndicator, RadioRoot, Separator, require_jsx_runtime, require_react } from "./_libs/@base-ui/react+[...].mjs";
7
7
  import { getRouteApi, useNavigate } from "./_libs/@tanstack/react-router+[...].mjs";
8
8
  import { ArrowLeft, ArrowRight, Check, ChevronsRight, Copy, Ellipsis, ExternalLink, Eye, FileText, Link, Maximize2, MessageSquare, Play, SquareArrowOutUpRight } from "./_libs/lucide-react.mjs";
9
9
  import { cva } from "./_libs/class-variance-authority+clsx.mjs";
10
- // node_modules/.nitro/vite/services/ssr/assets/_point-Bl3MEO09.js
10
+ // node_modules/.nitro/vite/services/ssr/assets/_point-CaM245BE.js
11
11
  var import_react = /* @__PURE__ */ __toESM(require_react());
12
12
  var import_jsx_runtime = require_jsx_runtime();
13
13
  var useMarkViewed = (point, latest) => {
@@ -1,8 +1,8 @@
1
- import { createServerRpc } from "./createServerRpc-DYHyF6mI.mjs";
1
+ import { createServerRpc } from "./createServerRpc-Xq42ilNx.mjs";
2
2
  import { createServerFn } from "./ssr.mjs";
3
- import { keptTargetOutline, openTargetOutline, resolveAdhocReview } from "./review-target.server-rsHUeYW_.mjs";
3
+ import { keptTargetOutline, openTargetOutline, resolveAdhocReview } from "./review-target.server-DA41RDao.mjs";
4
4
  import { object, optional, string } from "../_libs/valibot.mjs";
5
- // node_modules/.nitro/vite/services/ssr/assets/adhoc.functions-PKrFaWO1.js
5
+ // node_modules/.nitro/vite/services/ssr/assets/adhoc.functions-CDadmCcu.js
6
6
  var adhocLinkSchema = object({
7
7
  repo: optional(string()),
8
8
  worktree: optional(string()),
@@ -1,5 +1,5 @@
1
1
  import { TSS_SERVER_FUNCTION } from "./ssr.mjs";
2
- // node_modules/.nitro/vite/services/ssr/assets/createServerRpc-DYHyF6mI.js
2
+ // node_modules/.nitro/vite/services/ssr/assets/createServerRpc-Xq42ilNx.js
3
3
  var createServerRpc = (serverFnMeta, splitImportFn) => {
4
4
  const url = "/_serverFn/" + serverFnMeta.id;
5
5
  return Object.assign(splitImportFn, {
@@ -1,13 +1,13 @@
1
- import { createServerRpc } from "./createServerRpc-DYHyF6mI.mjs";
1
+ import { createServerRpc } from "./createServerRpc-Xq42ilNx.mjs";
2
2
  import { createServerFn } from "./ssr.mjs";
3
- import { READ_ONLY_GIT, findReviewBlock, getDeckDir, getReviewFile, getSinceFile, getTargetOutline, highlightTypeScript, keptOutline, listDecks, loadDeck, loadPoints, markReviewed, parsePoint, prewarm, startOutline, toAddress, toRendered } from "./review-target.server-rsHUeYW_.mjs";
3
+ import { READ_ONLY_GIT, findReviewBlock, getDeckDir, getReviewFile, getSinceFile, getTargetOutline, highlightTypeScript, keptOutline, listDecks, loadDeck, loadPoints, markReviewed, parsePoint, prewarm, startOutline, toAddress, toRendered } from "./review-target.server-DA41RDao.mjs";
4
4
  import { answerInputSchema, answerSchema, commentSchema, newCommentSchema, resolveInputSchema, reviewFileSchema, reviewMarkSchema, reviewOutlineSchema, reviewSinceSchema, statusSchema, uploadInputSchema } from "./live-schema-BYm_IvNp.mjs";
5
5
  import { array, object, parse, record, safeParse, string, unknown } from "../_libs/valibot.mjs";
6
6
  import { closeSync, existsSync, mkdirSync, openSync, readFileSync, readSync, statSync, writeFileSync } from "node:fs";
7
7
  import path from "node:path";
8
8
  import { execFileSync } from "node:child_process";
9
9
  import { randomUUID } from "node:crypto";
10
- // node_modules/.nitro/vite/services/ssr/assets/decks.functions-DPok33k1.js
10
+ // node_modules/.nitro/vite/services/ssr/assets/decks.functions-BHxu668D.js
11
11
  var ID_LENGTH = 8;
12
12
  var UPLOAD_ID_LENGTH = 12;
13
13
  var JSON_INDENT = 2;
@@ -1,4 +1,4 @@
1
- // node_modules/.nitro/vite/services/ssr/assets/empty-plugin-adapters-C_GlPYKD.js
1
+ // node_modules/.nitro/vite/services/ssr/assets/empty-plugin-adapters-B3CY_z0V.js
2
2
  var pluginSerializationAdapters = [];
3
3
  var hasPluginAdapters = false;
4
4
  export { hasPluginAdapters, pluginSerializationAdapters };
@@ -1,10 +1,10 @@
1
- import { createServerRpc } from "./createServerRpc-DYHyF6mI.mjs";
1
+ import { createServerRpc } from "./createServerRpc-Xq42ilNx.mjs";
2
2
  import { createServerFn } from "./ssr.mjs";
3
- import { AGENT_IDS, ListenerRefusedError, getListener, saveAgentConfig, startListener, stopListener } from "./listener.server-DzZGa8GT.mjs";
3
+ import { AGENT_IDS, ListenerRefusedError, getListener, saveAgentConfig, startListener, stopListener } from "./listener.server-BUJSjrgf.mjs";
4
4
  import { reviewTargetOnlySchema } from "./live-schema-BYm_IvNp.mjs";
5
- import { findReviewBlock } from "./review-target.server-rsHUeYW_.mjs";
5
+ import { findReviewBlock } from "./review-target.server-DA41RDao.mjs";
6
6
  import { object, optional, picklist, string } from "../_libs/valibot.mjs";
7
- // node_modules/.nitro/vite/services/ssr/assets/listener.functions-DeWc_4uW.js
7
+ // node_modules/.nitro/vite/services/ssr/assets/listener.functions-DygHonX4.js
8
8
  var agentIdSchema = picklist(AGENT_IDS);
9
9
  var loadListener_createServerFn_handler = createServerRpc({
10
10
  id: "0606210e0df9e9467c6143a764ada1aaa034b2a0ed02cb9b03d64eed35e9c04a",
@@ -1,11 +1,11 @@
1
- import { getAdiffRoot, getReviewKey, getWorktree } from "./review-target.server-rsHUeYW_.mjs";
1
+ import { getAdiffRoot, getReviewKey, getWorktree } from "./review-target.server-DA41RDao.mjs";
2
2
  import { array, literal, nullable, number, object, optional, picklist, record, safeParse, string, union, unknown, variant } from "../_libs/valibot.mjs";
3
3
  import { closeSync, existsSync, mkdirSync, openSync, readFileSync, renameSync, writeFileSync } from "node:fs";
4
4
  import { basename, dirname, join } from "node:path";
5
5
  import { spawn } from "node:child_process";
6
6
  import { homedir } from "node:os";
7
7
  import { once } from "node:events";
8
- // node_modules/.nitro/vite/services/ssr/assets/listener.server-DzZGa8GT.js
8
+ // node_modules/.nitro/vite/services/ssr/assets/listener.server-BUJSjrgf.js
9
9
  /**
10
10
  * The coding agents the review page can hand a review to. Each runs headless from a command the
11
11
  * prompt is appended to, so the prompt always goes last, and starts interactive from another for
@@ -530,13 +530,24 @@ var getListener = async (address) => {
530
530
  };
531
531
  };
532
532
  var isNested = (name) => NESTED_NAMES.has(name) || NESTED_PREFIXES.some((prefix) => name.startsWith(prefix));
533
+ /**
534
+ * The agent starts in an interactive shell, which runs the reviewer's rc files. oh-my-zsh may then
535
+ * ask whether to update, and a headless agent has nobody to answer, so it is told not to ask.
536
+ */
537
+ var NO_SHELL_PROMPTS = {
538
+ DISABLE_AUTO_UPDATE: "true",
539
+ DISABLE_UPDATE_PROMPT: "true"
540
+ };
533
541
  /** This server's environment, less what would make the new agent think it runs inside another. */
534
542
  var getCleanEnv = (prompt) => {
535
543
  const env = { ADIFF_PROMPT: prompt };
536
544
  Object.entries(process.env).forEach(([name, value]) => {
537
545
  if (value !== void 0 && !isNested(name)) env[name] = value;
538
546
  });
539
- return env;
547
+ return {
548
+ ...env,
549
+ ...NO_SHELL_PROMPTS
550
+ };
540
551
  };
541
552
  var ListenerRefusedError = class extends Error {
542
553
  constructor(message) {
@@ -1,10 +1,10 @@
1
- import { createServerRpc } from "./createServerRpc-DYHyF6mI.mjs";
1
+ import { createServerRpc } from "./createServerRpc-Xq42ilNx.mjs";
2
2
  import { createServerFn } from "./ssr.mjs";
3
3
  import { getPullKey, pullStateSchema, pullStatesInputSchema } from "./pull-link-CxZ12dkT.mjs";
4
4
  import { safeParse } from "../_libs/valibot.mjs";
5
5
  import { spawn } from "node:child_process";
6
6
  import { once } from "node:events";
7
- // node_modules/.nitro/vite/services/ssr/assets/pull.functions-6Ywbtb50.js
7
+ // node_modules/.nitro/vite/services/ssr/assets/pull.functions-Dyi9ubGh.js
8
8
  var CACHE_MS = 6e4;
9
9
  var GH_TIMEOUT_MS = 15e3;
10
10
  var MAX_RUNNING = 4;