ccgauge 1.2.3 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-build-manifest.json +59 -43
  3. package/.next/standalone/.next/app-path-routes-manifest.json +12 -10
  4. package/.next/standalone/.next/build-manifest.json +2 -2
  5. package/.next/standalone/.next/prerender-manifest.json +3 -3
  6. package/.next/standalone/.next/routes-manifest.json +6 -0
  7. package/.next/standalone/.next/server/app/_not-found/page.js +2 -2
  8. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  9. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/.next/server/app/api/blocks/route.js +1 -1
  11. package/.next/standalone/.next/server/app/api/blocks/route.js.nft.json +1 -1
  12. package/.next/standalone/.next/server/app/api/blocks/route_client-reference-manifest.js +1 -1
  13. package/.next/standalone/.next/server/app/api/export/usage/route.js +1 -1
  14. package/.next/standalone/.next/server/app/api/export/usage/route.js.nft.json +1 -1
  15. package/.next/standalone/.next/server/app/api/export/usage/route_client-reference-manifest.js +1 -1
  16. package/.next/standalone/.next/server/app/api/pricing/refresh/route.js +1 -0
  17. package/.next/standalone/.next/server/app/api/pricing/refresh/route.js.nft.json +1 -0
  18. package/.next/standalone/.next/server/app/api/pricing/refresh/route_client-reference-manifest.js +1 -0
  19. package/.next/standalone/.next/server/app/api/pricing/route.js +1 -1
  20. package/.next/standalone/.next/server/app/api/pricing/route.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
  22. package/.next/standalone/.next/server/app/api/projects/route.js +1 -1
  23. package/.next/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  25. package/.next/standalone/.next/server/app/api/scan/route.js +1 -1
  26. package/.next/standalone/.next/server/app/api/scan/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/scan/route_client-reference-manifest.js +1 -1
  28. package/.next/standalone/.next/server/app/api/sessions/route.js +1 -1
  29. package/.next/standalone/.next/server/app/api/sessions/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
  31. package/.next/standalone/.next/server/app/api/turns/route.js +1 -1
  32. package/.next/standalone/.next/server/app/api/turns/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/turns/route_client-reference-manifest.js +1 -1
  34. package/.next/standalone/.next/server/app/api/usage/route.js +1 -1
  35. package/.next/standalone/.next/server/app/api/usage/route.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/api/usage/route_client-reference-manifest.js +1 -1
  37. package/.next/standalone/.next/server/app/models/page.js +2 -2
  38. package/.next/standalone/.next/server/app/models/page.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/models/page_client-reference-manifest.js +1 -1
  40. package/.next/standalone/.next/server/app/page.js +2 -2
  41. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  43. package/.next/standalone/.next/server/app/projects/[id]/page.js +2 -2
  44. package/.next/standalone/.next/server/app/projects/[id]/page.js.nft.json +1 -1
  45. package/.next/standalone/.next/server/app/projects/[id]/page_client-reference-manifest.js +1 -1
  46. package/.next/standalone/.next/server/app/projects/page.js +2 -2
  47. package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  49. package/.next/standalone/.next/server/app/sessions/[id]/page.js +2 -2
  50. package/.next/standalone/.next/server/app/sessions/[id]/page.js.nft.json +1 -1
  51. package/.next/standalone/.next/server/app/sessions/[id]/page_client-reference-manifest.js +1 -1
  52. package/.next/standalone/.next/server/app/sessions/page.js +2 -2
  53. package/.next/standalone/.next/server/app/sessions/page.js.nft.json +1 -1
  54. package/.next/standalone/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  55. package/.next/standalone/.next/server/app/settings/page.js +2 -2
  56. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  57. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  58. package/.next/standalone/.next/server/app/tools/page.js +2 -0
  59. package/.next/standalone/.next/server/app/tools/page.js.nft.json +1 -0
  60. package/.next/standalone/.next/server/app/tools/page_client-reference-manifest.js +1 -0
  61. package/.next/standalone/.next/server/app/usage/page.js +3 -3
  62. package/.next/standalone/.next/server/app/usage/page.js.nft.json +1 -1
  63. package/.next/standalone/.next/server/app/usage/page_client-reference-manifest.js +1 -1
  64. package/.next/standalone/.next/server/app-paths-manifest.json +12 -10
  65. package/.next/standalone/.next/server/chunks/177.js +28 -0
  66. package/.next/standalone/.next/server/chunks/195.js +1 -0
  67. package/.next/standalone/.next/server/chunks/68.js +1 -0
  68. package/.next/standalone/.next/server/chunks/704.js +1 -0
  69. package/.next/standalone/.next/server/chunks/860.js +1 -0
  70. package/.next/standalone/.next/server/chunks/98.js +1 -1
  71. package/.next/standalone/.next/server/functions-config-manifest.json +5 -4
  72. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  73. package/.next/standalone/.next/server/pages/500.html +1 -1
  74. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  75. package/.next/standalone/.next/static/chunks/148-086250dab6a8a8d0.js +1 -0
  76. package/.next/standalone/.next/static/chunks/app/api/blocks/route-bcee47c5d093728c.js +1 -0
  77. package/.next/standalone/.next/static/chunks/app/api/export/usage/route-bcee47c5d093728c.js +1 -0
  78. package/.next/standalone/.next/static/chunks/app/api/pricing/refresh/route-bcee47c5d093728c.js +1 -0
  79. package/.next/standalone/.next/static/chunks/app/api/pricing/route-bcee47c5d093728c.js +1 -0
  80. package/.next/standalone/.next/static/chunks/app/api/projects/route-bcee47c5d093728c.js +1 -0
  81. package/.next/standalone/.next/static/chunks/app/api/scan/route-bcee47c5d093728c.js +1 -0
  82. package/.next/standalone/.next/static/chunks/app/api/sessions/route-bcee47c5d093728c.js +1 -0
  83. package/.next/standalone/.next/static/chunks/app/api/turns/route-bcee47c5d093728c.js +1 -0
  84. package/.next/standalone/.next/static/chunks/app/api/usage/route-bcee47c5d093728c.js +1 -0
  85. package/.next/standalone/.next/static/chunks/app/layout-e349a18fcb94a7c0.js +1 -0
  86. package/.next/standalone/.next/static/chunks/app/loading-bcee47c5d093728c.js +1 -0
  87. package/.next/standalone/.next/static/chunks/app/settings/page-799eab6a6fb5294f.js +1 -0
  88. package/.next/standalone/.next/static/chunks/app/tools/page-f853bb04cc730994.js +1 -0
  89. package/.next/standalone/.next/static/chunks/app/usage/loading-bcee47c5d093728c.js +1 -0
  90. package/.next/standalone/.next/static/chunks/app/usage/page-64b22de6021c8bfb.js +1 -0
  91. package/.next/standalone/.next/static/css/cc3c7c3125ee7611.css +5 -0
  92. package/.next/standalone/.next/static/qXwEuv57GWCs9fn7xJz_q/_buildManifest.js +1 -0
  93. package/.next/standalone/node_modules/next/node_modules/postcss/package.json +0 -0
  94. package/.next/standalone/package.json +2 -2
  95. package/CHANGELOG.md +65 -0
  96. package/README.md +1 -1
  97. package/README.zh-CN.md +2 -2
  98. package/dist/mcp/server.mjs +16 -16
  99. package/dist/report/index.mjs +29 -29
  100. package/package.json +23 -25
  101. package/.next/standalone/.next/server/chunks/567.js +0 -28
  102. package/.next/standalone/.next/server/chunks/697.js +0 -1
  103. package/.next/standalone/.next/server/chunks/716.js +0 -1
  104. package/.next/standalone/.next/server/chunks/730.js +0 -1
  105. package/.next/standalone/.next/static/Lq6oOv9BIs0oxAoucpUNd/_buildManifest.js +0 -1
  106. package/.next/standalone/.next/static/chunks/148-1212b038580a0433.js +0 -1
  107. package/.next/standalone/.next/static/chunks/app/api/blocks/route-c50a1245d93c020a.js +0 -1
  108. package/.next/standalone/.next/static/chunks/app/api/export/usage/route-c50a1245d93c020a.js +0 -1
  109. package/.next/standalone/.next/static/chunks/app/api/pricing/route-c50a1245d93c020a.js +0 -1
  110. package/.next/standalone/.next/static/chunks/app/api/projects/route-c50a1245d93c020a.js +0 -1
  111. package/.next/standalone/.next/static/chunks/app/api/scan/route-c50a1245d93c020a.js +0 -1
  112. package/.next/standalone/.next/static/chunks/app/api/sessions/route-c50a1245d93c020a.js +0 -1
  113. package/.next/standalone/.next/static/chunks/app/api/turns/route-c50a1245d93c020a.js +0 -1
  114. package/.next/standalone/.next/static/chunks/app/api/usage/route-c50a1245d93c020a.js +0 -1
  115. package/.next/standalone/.next/static/chunks/app/layout-6eefa1ce02863d7b.js +0 -1
  116. package/.next/standalone/.next/static/chunks/app/loading-c50a1245d93c020a.js +0 -1
  117. package/.next/standalone/.next/static/chunks/app/settings/page-1ba7c4a4c0fae2f8.js +0 -1
  118. package/.next/standalone/.next/static/chunks/app/usage/loading-c50a1245d93c020a.js +0 -1
  119. package/.next/standalone/.next/static/chunks/app/usage/page-02dd25ce6058f096.js +0 -1
  120. package/.next/standalone/.next/static/css/169dd00e280f7237.css +0 -5
  121. /package/.next/standalone/.next/static/{Lq6oOv9BIs0oxAoucpUNd → qXwEuv57GWCs9fn7xJz_q}/_ssgManifest.js +0 -0
@@ -1,36 +1,36 @@
1
- var zD=Object.create;var Au=Object.defineProperty;var YD=Object.getOwnPropertyDescriptor;var XD=Object.getOwnPropertyNames;var JD=Object.getPrototypeOf,ZD=Object.prototype.hasOwnProperty;var Ru=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,u)=>(typeof require<"u"?require:t)[u]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var A=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var QD=(e,t,u,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of XD(t))!ZD.call(e,r)&&r!==u&&Au(e,r,{get:()=>t[r],enumerable:!(n=YD(t,r))||n.enumerable});return e};var le=(e,t,u)=>(u=e!=null?zD(JD(e)):{},QD(t||!e||!e.__esModule?Au(u,"default",{value:e,enumerable:!0}):u,e));var An=A((w0,bn)=>{bn.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var Nn=A((q0,Ln)=>{Ln.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var Un=A((X0,ki)=>{ki.exports={single:{topLeft:"\u250C",top:"\u2500",topRight:"\u2510",right:"\u2502",bottomRight:"\u2518",bottom:"\u2500",bottomLeft:"\u2514",left:"\u2502"},double:{topLeft:"\u2554",top:"\u2550",topRight:"\u2557",right:"\u2551",bottomRight:"\u255D",bottom:"\u2550",bottomLeft:"\u255A",left:"\u2551"},round:{topLeft:"\u256D",top:"\u2500",topRight:"\u256E",right:"\u2502",bottomRight:"\u256F",bottom:"\u2500",bottomLeft:"\u2570",left:"\u2502"},bold:{topLeft:"\u250F",top:"\u2501",topRight:"\u2513",right:"\u2503",bottomRight:"\u251B",bottom:"\u2501",bottomLeft:"\u2517",left:"\u2503"},singleDouble:{topLeft:"\u2553",top:"\u2500",topRight:"\u2556",right:"\u2551",bottomRight:"\u255C",bottom:"\u2500",bottomLeft:"\u2559",left:"\u2551"},doubleSingle:{topLeft:"\u2552",top:"\u2550",topRight:"\u2555",right:"\u2502",bottomRight:"\u255B",bottom:"\u2550",bottomLeft:"\u2558",left:"\u2502"},classic:{topLeft:"+",top:"-",topRight:"+",right:"|",bottomRight:"+",bottom:"-",bottomLeft:"+",left:"|"},arrow:{topLeft:"\u2198",top:"\u2193",topRight:"\u2199",right:"\u2190",bottomRight:"\u2196",bottom:"\u2191",bottomLeft:"\u2197",left:"\u2192"}}});var Lt=A((J0,Ot)=>{"use strict";var Wn=Un();Ot.exports=Wn;Ot.exports.default=Wn});var Ut=A((Q0,Vn)=>{"use strict";Vn.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var zn=A((eF,Kn)=>{"use strict";var Pi=Ut();Kn.exports=e=>typeof e=="string"?e.replace(Pi(),""):e});var jt=A((tF,Wt)=>{"use strict";var Yn=e=>Number.isNaN(e)?!1:e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141);Wt.exports=Yn;Wt.exports.default=Yn});var Gt=A((uF,Xn)=>{"use strict";Xn.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var Zn=A((nF,qt)=>{"use strict";var Oi=zn(),Li=jt(),Ni=Gt(),Jn=e=>{if(typeof e!="string"||e.length===0||(e=Oi(e),e.length===0))return 0;e=e.replace(Ni()," ");let t=0;for(let u=0;u<e.length;u++){let n=e.codePointAt(u);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&u++,t+=Li(n)?2:1)}return t};qt.exports=Jn;qt.exports.default=Jn});var er=A((rF,Qn)=>{"use strict";var $i=Zn();function ae(e,t){if(!e)return e;t=t||{};let u=t.align||"center";if(u==="left")return e;let n=t.split||`
2
- `,r=t.pad||" ",D=u!=="right"?Ui:Wi,o=!1;Array.isArray(e)||(o=!0,e=String(e).split(n));let i,s=0;return e=e.map(function(a){return a=String(a),i=$i(a),s=Math.max(i,s),{str:a,width:i}}).map(function(a){return new Array(D(s,a.width)+1).join(r)+a.str}),o?e.join(n):e}ae.left=function(t){return ae(t,{align:"left"})};ae.center=function(t){return ae(t,{align:"center"})};ae.right=function(t){return ae(t,{align:"right"})};Qn.exports=ae;function Ui(e,t){return Math.floor((e-t)/2)}function Wi(e,t){return e-t}});var rt=A((gF,pr)=>{var Xt=[],hr=0,T=(e,t)=>{hr>=t&&Xt.push(e)};T.WARN=1;T.INFO=2;T.DEBUG=3;T.reset=()=>{Xt=[]};T.setDebugLevel=e=>{hr=e};T.warn=e=>T(e,T.WARN);T.info=e=>T(e,T.INFO);T.debug=e=>T(e,T.DEBUG);T.debugMessages=()=>Xt;pr.exports=T});var Cr=A((EF,fr)=>{"use strict";var os=Ut();fr.exports=e=>typeof e=="string"?e.replace(os(),""):e});var gr=A((BF,Jt)=>{"use strict";var is=Cr(),ss=jt(),as=Gt(),mr=e=>{if(typeof e!="string"||e.length===0||(e=is(e),e.length===0))return 0;e=e.replace(as()," ");let t=0;for(let u=0;u<e.length;u++){let n=e.codePointAt(u);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&u++,t+=ss(n)?2:1)}return t};Jt.exports=mr;Jt.exports.default=mr});var Zt=A((bF,Ar)=>{var Er=gr();function Dt(e){return e?/\u001b\[((?:\d*;){0,5}\d*)m/g:/\u001b\[(?:\d*;){0,5}\d*m/g}function H(e){let t=Dt();return(""+e).replace(t,"").split(`
3
- `).reduce(function(r,D){return Er(D)>r?Er(D):r},0)}function Ie(e,t){return Array(t+1).join(e)}function cs(e,t,u,n){let r=H(e);if(t+1>=r){let D=t-r;switch(n){case"right":{e=Ie(u,D)+e;break}case"center":{let o=Math.ceil(D/2),i=D-o;e=Ie(u,i)+e+Ie(u,o);break}default:{e=e+Ie(u,D);break}}}return e}var Ce={};function Me(e,t,u){t="\x1B["+t+"m",u="\x1B["+u+"m",Ce[t]={set:e,to:!0},Ce[u]={set:e,to:!1},Ce[e]={on:t,off:u}}Me("bold",1,22);Me("italics",3,23);Me("underline",4,24);Me("inverse",7,27);Me("strikethrough",9,29);function Br(e,t){let u=t[1]?parseInt(t[1].split(";")[0]):0;if(u>=30&&u<=39||u>=90&&u<=97){e.lastForegroundAdded=t[0];return}if(u>=40&&u<=49||u>=100&&u<=107){e.lastBackgroundAdded=t[0];return}if(u===0){for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&delete e[r];return}let n=Ce[t[0]];n&&(e[n.set]=n.to)}function ls(e){let t=Dt(!0),u=t.exec(e),n={};for(;u!==null;)Br(n,u),u=t.exec(e);return n}function br(e,t){let u=e.lastBackgroundAdded,n=e.lastForegroundAdded;return delete e.lastBackgroundAdded,delete e.lastForegroundAdded,Object.keys(e).forEach(function(r){e[r]&&(t+=Ce[r].off)}),u&&u!="\x1B[49m"&&(t+="\x1B[49m"),n&&n!="\x1B[39m"&&(t+="\x1B[39m"),t}function Fs(e,t){let u=e.lastBackgroundAdded,n=e.lastForegroundAdded;return delete e.lastBackgroundAdded,delete e.lastForegroundAdded,Object.keys(e).forEach(function(r){e[r]&&(t=Ce[r].on+t)}),u&&u!="\x1B[49m"&&(t=u+t),n&&n!="\x1B[39m"&&(t=n+t),t}function ds(e,t){if(e.length===H(e))return e.substr(0,t);for(;H(e)>t;)e=e.slice(0,-1);return e}function hs(e,t){let u=Dt(!0),n=e.split(Dt()),r=0,D=0,o="",i,s={};for(;D<t;){i=u.exec(e);let a=n[r];if(r++,D+H(a)>t&&(a=ds(a,t-D)),o+=a,D+=H(a),D<t){if(!i)break;o+=i[0],Br(s,i)}}return br(s,o)}function ps(e,t,u){if(u=u||"\u2026",H(e)<=t)return e;t-=H(u);let r=hs(e,t);r+=u;let D="\x1B]8;;\x07";return e.includes(D)&&!r.includes(D)&&(r+=D),r}function fs(){return{chars:{top:"\u2500","top-mid":"\u252C","top-left":"\u250C","top-right":"\u2510",bottom:"\u2500","bottom-mid":"\u2534","bottom-left":"\u2514","bottom-right":"\u2518",left:"\u2502","left-mid":"\u251C",mid:"\u2500","mid-mid":"\u253C",right:"\u2502","right-mid":"\u2524",middle:"\u2502"},truncate:"\u2026",colWidths:[],rowHeights:[],colAligns:[],rowAligns:[],style:{"padding-left":1,"padding-right":1,head:["red"],border:["grey"],compact:!1},head:[]}}function Cs(e,t){e=e||{},t=t||fs();let u=Object.assign({},t,e);return u.chars=Object.assign({},t.chars,e.chars),u.style=Object.assign({},t.style,e.style),u}function ms(e,t){let u=[],n=t.split(/(\s+)/g),r=[],D=0,o;for(let i=0;i<n.length;i+=2){let s=n[i],a=D+H(s);D>0&&o&&(a+=o.length),a>e?(D!==0&&u.push(r.join("")),r=[s],D=H(s)):(r.push(o||"",s),D=a),o=n[i+1]}return D&&u.push(r.join("")),u}function gs(e,t){let u=[],n="";function r(o,i){for(n.length&&i&&(n+=i),n+=o;n.length>e;)u.push(n.slice(0,e)),n=n.slice(e)}let D=t.split(/(\s+)/g);for(let o=0;o<D.length;o+=2)r(D[o],o&&D[o-1]);return n.length&&u.push(n),u}function Es(e,t,u=!0){let n=[];t=t.split(`
4
- `);let r=u?ms:gs;for(let D=0;D<t.length;D++)n.push.apply(n,r(e,t[D]));return n}function Bs(e){let t={},u=[];for(let n=0;n<e.length;n++){let r=Fs(t,e[n]);t=ls(r);let D=Object.assign({},t);u.push(br(D,r))}return u}function bs(e,t){return["\x1B]","8",";",";",e||t,"\x07",t,"\x1B]","8",";",";","\x07"].join("")}Ar.exports={strlen:H,repeat:Ie,pad:cs,truncate:ps,mergeOptions:Cs,wordWrap:Es,colorizeLines:Bs,hyperlink:bs}});var wr=A((AF,xr)=>{var yr={};xr.exports=yr;var Rr={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(Rr).forEach(function(e){var t=Rr[e],u=yr[e]=[];u.open="\x1B["+t[0]+"m",u.close="\x1B["+t[1]+"m"})});var Sr=A((RF,kr)=>{"use strict";kr.exports=function(e,t){t=t||process.argv;var u=t.indexOf("--"),n=/^-{1,2}/.test(e)?"":"--",r=t.indexOf(n+e);return r!==-1&&(u===-1?!0:r<u)}});var _r=A((yF,Tr)=>{"use strict";var As=Ru("os"),j=Sr(),_=process.env,me=void 0;j("no-color")||j("no-colors")||j("color=false")?me=!1:(j("color")||j("colors")||j("color=true")||j("color=always"))&&(me=!0);"FORCE_COLOR"in _&&(me=_.FORCE_COLOR.length===0||parseInt(_.FORCE_COLOR,10)!==0);function Rs(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function ys(e){if(me===!1)return 0;if(j("color=16m")||j("color=full")||j("color=truecolor"))return 3;if(j("color=256"))return 2;if(e&&!e.isTTY&&me!==!0)return 0;var t=me?1:0;if(process.platform==="win32"){var u=As.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(u[0])>=10&&Number(u[2])>=10586?Number(u[2])>=14931?3:2:1}if("CI"in _)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(r){return r in _})||_.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in _)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(_.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in _){var n=parseInt((_.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(_.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(_.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(_.TERM)||"COLORTERM"in _?1:(_.TERM==="dumb",t)}function Qt(e){var t=ys(e);return Rs(t)}Tr.exports={supportsColor:Qt,stdout:Qt(process.stdout),stderr:Qt(process.stderr)}});var Ir=A((xF,vr)=>{vr.exports=function(t,u){var n="";t=t||"Run the trap, drop the bass",t=t.split("");var r={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return t.forEach(function(D){D=D.toLowerCase();var o=r[D]||[" "],i=Math.floor(Math.random()*o.length);typeof r[D]<"u"?n+=r[D][i]:n+=D}),n}});var Pr=A((wF,Mr)=>{Mr.exports=function(t,u){t=t||" he is here ";var n={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},r=[].concat(n.up,n.down,n.mid);function D(s){var a=Math.floor(Math.random()*s);return a}function o(s){var a=!1;return r.filter(function(F){a=F===s}),a}function i(s,a){var F="",c,h;a=a||{},a.up=typeof a.up<"u"?a.up:!0,a.mid=typeof a.mid<"u"?a.mid:!0,a.down=typeof a.down<"u"?a.down:!0,a.size=typeof a.size<"u"?a.size:"maxi",s=s.split("");for(h in s)if(!o(h)){switch(F=F+s[h],c={up:0,down:0,mid:0},a.size){case"mini":c.up=D(8),c.mid=D(2),c.down=D(8);break;case"maxi":c.up=D(16)+3,c.mid=D(4)+1,c.down=D(64)+3;break;default:c.up=D(8)+1,c.mid=D(6)/2,c.down=D(8)+1;break}var d=["up","mid","down"];for(var l in d)for(var C=d[l],f=0;f<=c[C];f++)a[C]&&(F=F+n[C][D(n[C].length)])}return F}return i(t,u)}});var Lr=A((kF,Or)=>{Or.exports=function(e){return function(t,u,n){if(t===" ")return t;switch(u%3){case 0:return e.red(t);case 1:return e.white(t);case 2:return e.blue(t)}}}});var $r=A((SF,Nr)=>{Nr.exports=function(e){return function(t,u,n){return u%2===0?t:e.inverse(t)}}});var Wr=A((TF,Ur)=>{Ur.exports=function(e){var t=["red","yellow","green","blue","magenta"];return function(u,n,r){return u===" "?u:e[t[n++%t.length]](u)}}});var Gr=A((_F,jr)=>{jr.exports=function(e){var t=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(u,n,r){return u===" "?u:e[t[Math.round(Math.random()*(t.length-2))]](u)}}});var Yr=A((IF,zr)=>{var E={};zr.exports=E;E.themes={};var xs=Ru("util"),ce=E.styles=wr(),Hr=Object.defineProperties,ws=new RegExp(/[\r\n]+/g);E.supportsColor=_r().supportsColor;typeof E.enabled>"u"&&(E.enabled=E.supportsColor()!==!1);E.enable=function(){E.enabled=!0};E.disable=function(){E.enabled=!1};E.stripColors=E.strip=function(e){return(""+e).replace(/\x1B\[\d+m/g,"")};var vF=E.stylize=function(t,u){if(!E.enabled)return t+"";var n=ce[u];return!n&&u in E?E[u](t):n.open+t+n.close},ks=/[|\\{}()[\]^$+*?.]/g,Ss=function(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(ks,"\\$&")};function Vr(e){var t=function u(){return _s.apply(u,arguments)};return t._styles=e,t.__proto__=Ts,t}var Kr=(function(){var e={};return ce.grey=ce.gray,Object.keys(ce).forEach(function(t){ce[t].closeRe=new RegExp(Ss(ce[t].close),"g"),e[t]={get:function(){return Vr(this._styles.concat(t))}}}),e})(),Ts=Hr(function(){},Kr);function _s(){var e=Array.prototype.slice.call(arguments),t=e.map(function(o){return o!=null&&o.constructor===String?o:xs.inspect(o)}).join(" ");if(!E.enabled||!t)return t;for(var u=t.indexOf(`
5
- `)!=-1,n=this._styles,r=n.length;r--;){var D=ce[n[r]];t=D.open+t.replace(D.closeRe,D.open)+D.close,u&&(t=t.replace(ws,function(o){return D.close+o+D.open}))}return t}E.setTheme=function(e){if(typeof e=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var t in e)(function(u){E[u]=function(n){if(typeof e[u]=="object"){var r=n;for(var D in e[u])r=E[e[u][D]](r);return r}return E[e[u]](n)}})(t)};function vs(){var e={};return Object.keys(Kr).forEach(function(t){e[t]={get:function(){return Vr([t])}}}),e}var Is=function(t,u){var n=u.split("");return n=n.map(t),n.join("")};E.trap=Ir();E.zalgo=Pr();E.maps={};E.maps.america=Lr()(E);E.maps.zebra=$r()(E);E.maps.rainbow=Wr()(E);E.maps.random=Gr()(E);for(qr in E.maps)(function(e){E[e]=function(t){return Is(E.maps[e],t)}})(qr);var qr;Hr(E,vs())});var Jr=A((MF,Xr)=>{var Ms=Yr();Xr.exports=Ms});var tD=A((PF,ot)=>{var{info:Ps,debug:eD}=rt(),L=Zt(),tu=class e{constructor(t){this.setOptions(t),this.x=null,this.y=null}setOptions(t){["boolean","number","bigint","string"].indexOf(typeof t)!==-1&&(t={content:""+t}),t=t||{},this.options=t;let u=t.content;if(["boolean","number","bigint","string"].indexOf(typeof u)!==-1)this.content=String(u);else if(!u)this.content=this.options.href||"";else throw new Error("Content needs to be a primitive, got: "+typeof u);this.colSpan=t.colSpan||1,this.rowSpan=t.rowSpan||1,this.options.href&&Object.defineProperty(this,"href",{get(){return this.options.href}})}mergeTableOptions(t,u){this.cells=u;let n=this.options.chars||{},r=t.chars,D=this.chars={};Ls.forEach(function(s){eu(n,r,s,D)}),this.truncate=this.options.truncate||t.truncate;let o=this.options.style=this.options.style||{},i=t.style;eu(o,i,"padding-left",this),eu(o,i,"padding-right",this),this.head=o.head||i.head,this.border=o.border||i.border,this.fixedWidth=t.colWidths[this.x],this.lines=this.computeLines(t),this.desiredWidth=L.strlen(this.content)+this.paddingLeft+this.paddingRight,this.desiredHeight=this.lines.length}computeLines(t){let u=t.wordWrap||t.textWrap,{wordWrap:n=u}=this.options;if(this.fixedWidth&&n){if(this.fixedWidth-=this.paddingLeft+this.paddingRight,this.colSpan){let o=1;for(;o<this.colSpan;)this.fixedWidth+=t.colWidths[this.x+o],o++}let{wrapOnWordBoundary:r=!0}=t,{wrapOnWordBoundary:D=r}=this.options;return this.wrapLines(L.wordWrap(this.fixedWidth,this.content,D))}return this.wrapLines(this.content.split(`
6
- `))}wrapLines(t){let u=L.colorizeLines(t);return this.href?u.map(n=>L.hyperlink(this.href,n)):u}init(t){let u=this.x,n=this.y;this.widths=t.colWidths.slice(u,u+this.colSpan),this.heights=t.rowHeights.slice(n,n+this.rowSpan),this.width=this.widths.reduce(Qr,-1),this.height=this.heights.reduce(Qr,-1),this.hAlign=this.options.hAlign||t.colAligns[u],this.vAlign=this.options.vAlign||t.rowAligns[n],this.drawRight=u+this.colSpan==t.colWidths.length}draw(t,u){if(t=="top")return this.drawTop(this.drawRight);if(t=="bottom")return this.drawBottom(this.drawRight);let n=L.truncate(this.content,10,this.truncate);t||Ps(`${this.y}-${this.x}: ${this.rowSpan-t}x${this.colSpan} Cell ${n}`);let r=Math.max(this.height-this.lines.length,0),D;switch(this.vAlign){case"center":D=Math.ceil(r/2);break;case"bottom":D=r;break;default:D=0}if(t<D||t>=D+this.lines.length)return this.drawEmpty(this.drawRight,u);let o=this.lines.length>this.height&&t+1>=this.height;return this.drawLine(t-D,this.drawRight,o,u)}drawTop(t){let u=[];return this.cells?this.widths.forEach(function(n,r){u.push(this._topLeftChar(r)),u.push(L.repeat(this.chars[this.y==0?"top":"mid"],n))},this):(u.push(this._topLeftChar(0)),u.push(L.repeat(this.chars[this.y==0?"top":"mid"],this.width))),t&&u.push(this.chars[this.y==0?"topRight":"rightMid"]),this.wrapWithStyleColors("border",u.join(""))}_topLeftChar(t){let u=this.x+t,n;if(this.y==0)n=u==0?"topLeft":t==0?"topMid":"top";else if(u==0)n="leftMid";else if(n=t==0?"midMid":"bottomMid",this.cells&&(this.cells[this.y-1][u]instanceof e.ColSpanCell&&(n=t==0?"topMid":"mid"),t==0)){let D=1;for(;this.cells[this.y][u-D]instanceof e.ColSpanCell;)D++;this.cells[this.y][u-D]instanceof e.RowSpanCell&&(n="leftMid")}return this.chars[n]}wrapWithStyleColors(t,u){if(this[t]&&this[t].length)try{let n=Jr();for(let r=this[t].length-1;r>=0;r--)n=n[this[t][r]];return n(u)}catch{return u}else return u}drawLine(t,u,n,r){let D=this.chars[this.x==0?"left":"middle"];if(this.x&&r&&this.cells){let h=this.cells[this.y+r][this.x-1];for(;h instanceof Pe;)h=this.cells[h.y][h.x-1];h instanceof Oe||(D=this.chars.rightMid)}let o=L.repeat(" ",this.paddingLeft),i=u?this.chars.right:"",s=L.repeat(" ",this.paddingRight),a=this.lines[t],F=this.width-(this.paddingLeft+this.paddingRight);n&&(a+=this.truncate||"\u2026");let c=L.truncate(a,F,this.truncate);return c=L.pad(c,F," ",this.hAlign),c=o+c+s,this.stylizeLine(D,c,i)}stylizeLine(t,u,n){return t=this.wrapWithStyleColors("border",t),n=this.wrapWithStyleColors("border",n),this.y===0&&(u=this.wrapWithStyleColors("head",u)),t+u+n}drawBottom(t){let u=this.chars[this.x==0?"bottomLeft":"bottomMid"],n=L.repeat(this.chars.bottom,this.width),r=t?this.chars.bottomRight:"";return this.wrapWithStyleColors("border",u+n+r)}drawEmpty(t,u){let n=this.chars[this.x==0?"left":"middle"];if(this.x&&u&&this.cells){let o=this.cells[this.y+u][this.x-1];for(;o instanceof Pe;)o=this.cells[o.y][o.x-1];o instanceof Oe||(n=this.chars.rightMid)}let r=t?this.chars.right:"",D=L.repeat(" ",this.width);return this.stylizeLine(n,D,r)}},Pe=class{constructor(){}draw(t){return typeof t=="number"&&eD(`${this.y}-${this.x}: 1x1 ColSpanCell`),""}init(){}mergeTableOptions(){}},Oe=class{constructor(t){this.originalCell=t}init(t){let u=this.y,n=this.originalCell.y;this.cellOffset=u-n,this.offset=Os(t.rowHeights,n,this.cellOffset)}draw(t){return t=="top"?this.originalCell.draw(this.offset,this.cellOffset):t=="bottom"?this.originalCell.draw("bottom"):(eD(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`),this.originalCell.draw(this.offset+1+t))}mergeTableOptions(){}};function Zr(...e){return e.filter(t=>t!=null).shift()}function eu(e,t,u,n){let r=u.split("-");r.length>1?(r[1]=r[1].charAt(0).toUpperCase()+r[1].substr(1),r=r.join(""),n[r]=Zr(e[r],e[u],t[r],t[u])):n[u]=Zr(e[u],t[u])}function Os(e,t,u){let n=e[t];for(let r=1;r<u;r++)n+=1+e[t+r];return n}function Qr(e,t){return e+t+1}var Ls=["top","top-mid","top-left","top-right","bottom","bottom-mid","bottom-left","bottom-right","left","left-mid","mid","mid-mid","right","right-mid","middle"];ot.exports=tu;ot.exports.ColSpanCell=Pe;ot.exports.RowSpanCell=Oe});var rD=A((OF,nD)=>{var{warn:Ns,debug:$s}=rt(),uu=tD(),{ColSpanCell:Us,RowSpanCell:Ws}=uu;(function(){function e(d,l){return d[l]>0?e(d,l+1):l}function t(d){let l={};d.forEach(function(C,f){let p=0;C.forEach(function(m){m.y=f,m.x=f?e(l,p):p;let B=m.rowSpan||1,g=m.colSpan||1;if(B>1)for(let b=0;b<g;b++)l[m.x+b]=B;p=m.x+g}),Object.keys(l).forEach(m=>{l[m]--,l[m]<1&&delete l[m]})})}function u(d){let l=0;return d.forEach(function(C){C.forEach(function(f){l=Math.max(l,f.x+(f.colSpan||1))})}),l}function n(d){return d.length}function r(d,l){let C=d.y,f=d.y-1+(d.rowSpan||1),p=l.y,m=l.y-1+(l.rowSpan||1),B=!(C>m||p>f),g=d.x,b=d.x-1+(d.colSpan||1),k=l.x,se=l.x-1+(l.colSpan||1),S=!(g>se||k>b);return B&&S}function D(d,l,C){let f=Math.min(d.length-1,C),p={x:l,y:C};for(let m=0;m<=f;m++){let B=d[m];for(let g=0;g<B.length;g++)if(r(p,B[g]))return!0}return!1}function o(d,l,C,f){for(let p=C;p<f;p++)if(D(d,p,l))return!1;return!0}function i(d){d.forEach(function(l,C){l.forEach(function(f){for(let p=1;p<f.rowSpan;p++){let m=new Ws(f);m.x=f.x,m.y=f.y+p,m.colSpan=f.colSpan,a(m,d[C+p])}})})}function s(d){for(let l=d.length-1;l>=0;l--){let C=d[l];for(let f=0;f<C.length;f++){let p=C[f];for(let m=1;m<p.colSpan;m++){let B=new Us;B.x=p.x+m,B.y=p.y,C.splice(f+1,0,B)}}}}function a(d,l){let C=0;for(;C<l.length&&l[C].x<d.x;)C++;l.splice(C,0,d)}function F(d){let l=n(d),C=u(d);$s(`Max rows: ${l}; Max cols: ${C}`);for(let f=0;f<l;f++)for(let p=0;p<C;p++)if(!D(d,p,f)){let m={x:p,y:f,colSpan:1,rowSpan:1};for(p++;p<C&&!D(d,p,f);)m.colSpan++,p++;let B=f+1;for(;B<l&&o(d,B,m.x,m.x+m.colSpan);)m.rowSpan++,B++;let g=new uu(m);g.x=m.x,g.y=m.y,Ns(`Missing cell at ${g.y}-${g.x}.`),a(g,d[f])}}function c(d){return d.map(function(l){if(!Array.isArray(l)){let C=Object.keys(l)[0];l=l[C],Array.isArray(l)?(l=l.slice(),l.unshift(C)):l=[C,l]}return l.map(function(C){return new uu(C)})})}function h(d){let l=c(d);return t(l),F(l),i(l),s(l),l}nD.exports={makeTableLayout:h,layoutTable:t,addRowSpanCells:i,maxWidth:u,fillInTable:F,computeWidths:uD("colSpan","desiredWidth","x",1),computeHeights:uD("rowSpan","desiredHeight","y",1)}})();function uD(e,t,u,n){return function(r,D){let o=[],i=[],s={};D.forEach(function(a){a.forEach(function(F){(F[e]||1)>1?i.push(F):o[F[u]]=Math.max(o[F[u]]||0,F[t]||0,n)})}),r.forEach(function(a,F){typeof a=="number"&&(o[F]=a)});for(let a=i.length-1;a>=0;a--){let F=i[a],c=F[e],h=F[u],d=o[h],l=typeof r[h]=="number"?0:1;if(typeof d=="number")for(let C=1;C<c;C++)d+=1+o[h+C],typeof r[h+C]!="number"&&l++;else d=t==="desiredWidth"?F.desiredWidth-1:1,(!s[h]||s[h]<d)&&(s[h]=d);if(F[t]>d){let C=0;for(;l>0&&F[t]>d;){if(typeof r[h+C]!="number"){let f=Math.round((F[t]-d)/l);d+=f,o[h+C]+=f,l--}C++}}}Object.assign(r,o,s);for(let a=0;a<r.length;a++)r[a]=Math.max(n,r[a]||0)}}});var oD=A((LF,DD)=>{var J=rt(),js=Zt(),nu=rD(),it=class extends Array{constructor(t){super();let u=js.mergeOptions(t);if(Object.defineProperty(this,"options",{value:u,enumerable:u.debug}),u.debug){switch(typeof u.debug){case"boolean":J.setDebugLevel(J.WARN);break;case"number":J.setDebugLevel(u.debug);break;case"string":J.setDebugLevel(parseInt(u.debug,10));break;default:J.setDebugLevel(J.WARN),J.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof u.debug}`)}Object.defineProperty(this,"messages",{get(){return J.debugMessages()}})}}toString(){let t=this,u=this.options.head&&this.options.head.length;u?(t=[this.options.head],this.length&&t.push.apply(t,this)):this.options.style.head=[];let n=nu.makeTableLayout(t);n.forEach(function(D){D.forEach(function(o){o.mergeTableOptions(this.options,n)},this)},this),nu.computeWidths(this.options.colWidths,n),nu.computeHeights(this.options.rowHeights,n),n.forEach(function(D){D.forEach(function(o){o.init(this.options)},this)},this);let r=[];for(let D=0;D<n.length;D++){let o=n[D],i=this.options.rowHeights[D];(D===0||!this.options.style.compact||D==1&&u)&&ru(o,"top",r);for(let s=0;s<i;s++)ru(o,s,r);D+1==n.length&&ru(o,"bottom",r)}return r.join(`
1
+ var uo=Object.create;var Ru=Object.defineProperty;var no=Object.getOwnPropertyDescriptor;var ro=Object.getOwnPropertyNames;var Do=Object.getPrototypeOf,oo=Object.prototype.hasOwnProperty;var yu=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,u)=>(typeof require<"u"?require:t)[u]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var A=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var io=(e,t,u,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ro(t))!oo.call(e,r)&&r!==u&&Ru(e,r,{get:()=>t[r],enumerable:!(n=no(t,r))||n.enumerable});return e};var ce=(e,t,u)=>(u=e!=null?uo(Do(e)):{},io(t||!e||!e.__esModule?Ru(u,"default",{value:e,enumerable:!0}):u,e));var Tn=A((bF,_n)=>{_n.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var Vn=A(($F,Hn)=>{Hn.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var zn=A((HF,as)=>{as.exports={single:{topLeft:"\u250C",top:"\u2500",topRight:"\u2510",right:"\u2502",bottomRight:"\u2518",bottom:"\u2500",bottomLeft:"\u2514",left:"\u2502"},double:{topLeft:"\u2554",top:"\u2550",topRight:"\u2557",right:"\u2551",bottomRight:"\u255D",bottom:"\u2550",bottomLeft:"\u255A",left:"\u2551"},round:{topLeft:"\u256D",top:"\u2500",topRight:"\u256E",right:"\u2502",bottomRight:"\u256F",bottom:"\u2500",bottomLeft:"\u2570",left:"\u2502"},bold:{topLeft:"\u250F",top:"\u2501",topRight:"\u2513",right:"\u2503",bottomRight:"\u251B",bottom:"\u2501",bottomLeft:"\u2517",left:"\u2503"},singleDouble:{topLeft:"\u2553",top:"\u2500",topRight:"\u2556",right:"\u2551",bottomRight:"\u255C",bottom:"\u2500",bottomLeft:"\u2559",left:"\u2551"},doubleSingle:{topLeft:"\u2552",top:"\u2550",topRight:"\u2555",right:"\u2502",bottomRight:"\u255B",bottom:"\u2550",bottomLeft:"\u2558",left:"\u2502"},classic:{topLeft:"+",top:"-",topRight:"+",right:"|",bottomRight:"+",bottom:"-",bottomLeft:"+",left:"|"},arrow:{topLeft:"\u2198",top:"\u2193",topRight:"\u2199",right:"\u2190",bottomRight:"\u2196",bottom:"\u2191",bottomLeft:"\u2197",left:"\u2192"}}});var Nt=A((VF,Lt)=>{"use strict";var Yn=zn();Lt.exports=Yn;Lt.exports.default=Yn});var jt=A((zF,er)=>{"use strict";er.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var ur=A((YF,tr)=>{"use strict";var fs=jt();tr.exports=e=>typeof e=="string"?e.replace(fs(),""):e});var Gt=A((JF,Wt)=>{"use strict";var nr=e=>Number.isNaN(e)?!1:e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141);Wt.exports=nr;Wt.exports.default=nr});var qt=A((XF,rr)=>{"use strict";rr.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var or=A((ZF,Ht)=>{"use strict";var Cs=ur(),gs=Gt(),ms=qt(),Dr=e=>{if(typeof e!="string"||e.length===0||(e=Cs(e),e.length===0))return 0;e=e.replace(ms()," ");let t=0;for(let u=0;u<e.length;u++){let n=e.codePointAt(u);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&u++,t+=gs(n)?2:1)}return t};Ht.exports=Dr;Ht.exports.default=Dr});var sr=A((QF,ir)=>{"use strict";var Es=or();function se(e,t){if(!e)return e;t=t||{};let u=t.align||"center";if(u==="left")return e;let n=t.split||`
2
+ `,r=t.pad||" ",D=u!=="right"?Bs:bs,o=!1;Array.isArray(e)||(o=!0,e=String(e).split(n));let i,s=0;return e=e.map(function(a){return a=String(a),i=Es(a),s=Math.max(i,s),{str:a,width:i}}).map(function(a){return new Array(D(s,a.width)+1).join(r)+a.str}),o?e.join(n):e}se.left=function(t){return se(t,{align:"left"})};se.center=function(t){return se(t,{align:"center"})};se.right=function(t){return se(t,{align:"right"})};ir.exports=se;function Bs(e,t){return Math.floor((e-t)/2)}function bs(e,t){return e-t}});var rt=A((hd,Ar)=>{var Xt=[],br=0,_=(e,t)=>{br>=t&&Xt.push(e)};_.WARN=1;_.INFO=2;_.DEBUG=3;_.reset=()=>{Xt=[]};_.setDebugLevel=e=>{br=e};_.warn=e=>_(e,_.WARN);_.info=e=>_(e,_.INFO);_.debug=e=>_(e,_.DEBUG);_.debugMessages=()=>Xt;Ar.exports=_});var yr=A((pd,Rr)=>{"use strict";var js=jt();Rr.exports=e=>typeof e=="string"?e.replace(js(),""):e});var wr=A((fd,Zt)=>{"use strict";var Ws=yr(),Gs=Gt(),qs=qt(),xr=e=>{if(typeof e!="string"||e.length===0||(e=Ws(e),e.length===0))return 0;e=e.replace(qs()," ");let t=0;for(let u=0;u<e.length;u++){let n=e.codePointAt(u);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&u++,t+=Gs(n)?2:1)}return t};Zt.exports=xr;Zt.exports.default=xr});var Qt=A((Cd,Tr)=>{var kr=wr();function Dt(e){return e?/\u001b\[((?:\d*;){0,5}\d*)m/g:/\u001b\[(?:\d*;){0,5}\d*m/g}function q(e){let t=Dt();return(""+e).replace(t,"").split(`
3
+ `).reduce(function(r,D){return kr(D)>r?kr(D):r},0)}function Ie(e,t){return Array(t+1).join(e)}function Hs(e,t,u,n){let r=q(e);if(t+1>=r){let D=t-r;switch(n){case"right":{e=Ie(u,D)+e;break}case"center":{let o=Math.ceil(D/2),i=D-o;e=Ie(u,i)+e+Ie(u,o);break}default:{e=e+Ie(u,D);break}}}return e}var fe={};function Pe(e,t,u){t="\x1B["+t+"m",u="\x1B["+u+"m",fe[t]={set:e,to:!0},fe[u]={set:e,to:!1},fe[e]={on:t,off:u}}Pe("bold",1,22);Pe("italics",3,23);Pe("underline",4,24);Pe("inverse",7,27);Pe("strikethrough",9,29);function Sr(e,t){let u=t[1]?parseInt(t[1].split(";")[0]):0;if(u>=30&&u<=39||u>=90&&u<=97){e.lastForegroundAdded=t[0];return}if(u>=40&&u<=49||u>=100&&u<=107){e.lastBackgroundAdded=t[0];return}if(u===0){for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&delete e[r];return}let n=fe[t[0]];n&&(e[n.set]=n.to)}function Vs(e){let t=Dt(!0),u=t.exec(e),n={};for(;u!==null;)Sr(n,u),u=t.exec(e);return n}function _r(e,t){let u=e.lastBackgroundAdded,n=e.lastForegroundAdded;return delete e.lastBackgroundAdded,delete e.lastForegroundAdded,Object.keys(e).forEach(function(r){e[r]&&(t+=fe[r].off)}),u&&u!="\x1B[49m"&&(t+="\x1B[49m"),n&&n!="\x1B[39m"&&(t+="\x1B[39m"),t}function Ks(e,t){let u=e.lastBackgroundAdded,n=e.lastForegroundAdded;return delete e.lastBackgroundAdded,delete e.lastForegroundAdded,Object.keys(e).forEach(function(r){e[r]&&(t=fe[r].on+t)}),u&&u!="\x1B[49m"&&(t=u+t),n&&n!="\x1B[39m"&&(t=n+t),t}function zs(e,t){if(e.length===q(e))return e.substr(0,t);for(;q(e)>t;)e=e.slice(0,-1);return e}function Ys(e,t){let u=Dt(!0),n=e.split(Dt()),r=0,D=0,o="",i,s={};for(;D<t;){i=u.exec(e);let a=n[r];if(r++,D+q(a)>t&&(a=zs(a,t-D)),o+=a,D+=q(a),D<t){if(!i)break;o+=i[0],Sr(s,i)}}return _r(s,o)}function Js(e,t,u){if(u=u||"\u2026",q(e)<=t)return e;t-=q(u);let r=Ys(e,t);r+=u;let D="\x1B]8;;\x07";return e.includes(D)&&!r.includes(D)&&(r+=D),r}function Xs(){return{chars:{top:"\u2500","top-mid":"\u252C","top-left":"\u250C","top-right":"\u2510",bottom:"\u2500","bottom-mid":"\u2534","bottom-left":"\u2514","bottom-right":"\u2518",left:"\u2502","left-mid":"\u251C",mid:"\u2500","mid-mid":"\u253C",right:"\u2502","right-mid":"\u2524",middle:"\u2502"},truncate:"\u2026",colWidths:[],rowHeights:[],colAligns:[],rowAligns:[],style:{"padding-left":1,"padding-right":1,head:["red"],border:["grey"],compact:!1},head:[]}}function Zs(e,t){e=e||{},t=t||Xs();let u=Object.assign({},t,e);return u.chars=Object.assign({},t.chars,e.chars),u.style=Object.assign({},t.style,e.style),u}function Qs(e,t){let u=[],n=t.split(/(\s+)/g),r=[],D=0,o;for(let i=0;i<n.length;i+=2){let s=n[i],a=D+q(s);D>0&&o&&(a+=o.length),a>e?(D!==0&&u.push(r.join("")),r=[s],D=q(s)):(r.push(o||"",s),D=a),o=n[i+1]}return D&&u.push(r.join("")),u}function ea(e,t){let u=[],n="";function r(o,i){for(n.length&&i&&(n+=i),n+=o;n.length>e;)u.push(n.slice(0,e)),n=n.slice(e)}let D=t.split(/(\s+)/g);for(let o=0;o<D.length;o+=2)r(D[o],o&&D[o-1]);return n.length&&u.push(n),u}function ta(e,t,u=!0){let n=[];t=t.split(`
4
+ `);let r=u?Qs:ea;for(let D=0;D<t.length;D++)n.push.apply(n,r(e,t[D]));return n}function ua(e){let t={},u=[];for(let n=0;n<e.length;n++){let r=Ks(t,e[n]);t=Vs(r);let D=Object.assign({},t);u.push(_r(D,r))}return u}function na(e,t){return["\x1B]","8",";",";",e||t,"\x07",t,"\x1B]","8",";",";","\x07"].join("")}Tr.exports={strlen:q,repeat:Ie,pad:Hs,truncate:Js,mergeOptions:Zs,wordWrap:ta,colorizeLines:ua,hyperlink:na}});var Mr=A((gd,Pr)=>{var Ir={};Pr.exports=Ir;var vr={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(vr).forEach(function(e){var t=vr[e],u=Ir[e]=[];u.open="\x1B["+t[0]+"m",u.close="\x1B["+t[1]+"m"})});var Lr=A((md,Or)=>{"use strict";Or.exports=function(e,t){t=t||process.argv;var u=t.indexOf("--"),n=/^-{1,2}/.test(e)?"":"--",r=t.indexOf(n+e);return r!==-1&&(u===-1?!0:r<u)}});var $r=A((Ed,Nr)=>{"use strict";var ra=yu("os"),j=Lr(),T=process.env,Ce=void 0;j("no-color")||j("no-colors")||j("color=false")?Ce=!1:(j("color")||j("colors")||j("color=true")||j("color=always"))&&(Ce=!0);"FORCE_COLOR"in T&&(Ce=T.FORCE_COLOR.length===0||parseInt(T.FORCE_COLOR,10)!==0);function Da(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function oa(e){if(Ce===!1)return 0;if(j("color=16m")||j("color=full")||j("color=truecolor"))return 3;if(j("color=256"))return 2;if(e&&!e.isTTY&&Ce!==!0)return 0;var t=Ce?1:0;if(process.platform==="win32"){var u=ra.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(u[0])>=10&&Number(u[2])>=10586?Number(u[2])>=14931?3:2:1}if("CI"in T)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(r){return r in T})||T.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in T)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(T.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in T){var n=parseInt((T.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(T.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(T.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(T.TERM)||"COLORTERM"in T?1:(T.TERM==="dumb",t)}function eu(e){var t=oa(e);return Da(t)}Nr.exports={supportsColor:eu,stdout:eu(process.stdout),stderr:eu(process.stderr)}});var jr=A((Bd,Ur)=>{Ur.exports=function(t,u){var n="";t=t||"Run the trap, drop the bass",t=t.split("");var r={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return t.forEach(function(D){D=D.toLowerCase();var o=r[D]||[" "],i=Math.floor(Math.random()*o.length);typeof r[D]<"u"?n+=r[D][i]:n+=D}),n}});var Gr=A((bd,Wr)=>{Wr.exports=function(t,u){t=t||" he is here ";var n={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},r=[].concat(n.up,n.down,n.mid);function D(s){var a=Math.floor(Math.random()*s);return a}function o(s){var a=!1;return r.filter(function(l){a=l===s}),a}function i(s,a){var l="",c,h;a=a||{},a.up=typeof a.up<"u"?a.up:!0,a.mid=typeof a.mid<"u"?a.mid:!0,a.down=typeof a.down<"u"?a.down:!0,a.size=typeof a.size<"u"?a.size:"maxi",s=s.split("");for(h in s)if(!o(h)){switch(l=l+s[h],c={up:0,down:0,mid:0},a.size){case"mini":c.up=D(8),c.mid=D(2),c.down=D(8);break;case"maxi":c.up=D(16)+3,c.mid=D(4)+1,c.down=D(64)+3;break;default:c.up=D(8)+1,c.mid=D(6)/2,c.down=D(8)+1;break}var d=["up","mid","down"];for(var F in d)for(var C=d[F],f=0;f<=c[C];f++)a[C]&&(l=l+n[C][D(n[C].length)])}return l}return i(t,u)}});var Hr=A((Ad,qr)=>{qr.exports=function(e){return function(t,u,n){if(t===" ")return t;switch(u%3){case 0:return e.red(t);case 1:return e.white(t);case 2:return e.blue(t)}}}});var Kr=A((Rd,Vr)=>{Vr.exports=function(e){return function(t,u,n){return u%2===0?t:e.inverse(t)}}});var Yr=A((yd,zr)=>{zr.exports=function(e){var t=["red","yellow","green","blue","magenta"];return function(u,n,r){return u===" "?u:e[t[n++%t.length]](u)}}});var Xr=A((xd,Jr)=>{Jr.exports=function(e){var t=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(u,n,r){return u===" "?u:e[t[Math.round(Math.random()*(t.length-2))]](u)}}});var nD=A((kd,uD)=>{var E={};uD.exports=E;E.themes={};var ia=yu("util"),ae=E.styles=Mr(),Qr=Object.defineProperties,sa=new RegExp(/[\r\n]+/g);E.supportsColor=$r().supportsColor;typeof E.enabled>"u"&&(E.enabled=E.supportsColor()!==!1);E.enable=function(){E.enabled=!0};E.disable=function(){E.enabled=!1};E.stripColors=E.strip=function(e){return(""+e).replace(/\x1B\[\d+m/g,"")};var wd=E.stylize=function(t,u){if(!E.enabled)return t+"";var n=ae[u];return!n&&u in E?E[u](t):n.open+t+n.close},aa=/[|\\{}()[\]^$+*?.]/g,ca=function(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(aa,"\\$&")};function eD(e){var t=function u(){return Fa.apply(u,arguments)};return t._styles=e,t.__proto__=la,t}var tD=(function(){var e={};return ae.grey=ae.gray,Object.keys(ae).forEach(function(t){ae[t].closeRe=new RegExp(ca(ae[t].close),"g"),e[t]={get:function(){return eD(this._styles.concat(t))}}}),e})(),la=Qr(function(){},tD);function Fa(){var e=Array.prototype.slice.call(arguments),t=e.map(function(o){return o!=null&&o.constructor===String?o:ia.inspect(o)}).join(" ");if(!E.enabled||!t)return t;for(var u=t.indexOf(`
5
+ `)!=-1,n=this._styles,r=n.length;r--;){var D=ae[n[r]];t=D.open+t.replace(D.closeRe,D.open)+D.close,u&&(t=t.replace(sa,function(o){return D.close+o+D.open}))}return t}E.setTheme=function(e){if(typeof e=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var t in e)(function(u){E[u]=function(n){if(typeof e[u]=="object"){var r=n;for(var D in e[u])r=E[e[u][D]](r);return r}return E[e[u]](n)}})(t)};function da(){var e={};return Object.keys(tD).forEach(function(t){e[t]={get:function(){return eD([t])}}}),e}var ha=function(t,u){var n=u.split("");return n=n.map(t),n.join("")};E.trap=jr();E.zalgo=Gr();E.maps={};E.maps.america=Hr()(E);E.maps.zebra=Kr()(E);E.maps.rainbow=Yr()(E);E.maps.random=Xr()(E);for(Zr in E.maps)(function(e){E[e]=function(t){return ha(E.maps[e],t)}})(Zr);var Zr;Qr(E,da())});var DD=A((Sd,rD)=>{var pa=nD();rD.exports=pa});var aD=A((_d,ot)=>{var{info:fa,debug:sD}=rt(),L=Qt(),uu=class e{constructor(t){this.setOptions(t),this.x=null,this.y=null}setOptions(t){["boolean","number","bigint","string"].indexOf(typeof t)!==-1&&(t={content:""+t}),t=t||{},this.options=t;let u=t.content;if(["boolean","number","bigint","string"].indexOf(typeof u)!==-1)this.content=String(u);else if(!u)this.content=this.options.href||"";else throw new Error("Content needs to be a primitive, got: "+typeof u);this.colSpan=t.colSpan||1,this.rowSpan=t.rowSpan||1,this.options.href&&Object.defineProperty(this,"href",{get(){return this.options.href}})}mergeTableOptions(t,u){this.cells=u;let n=this.options.chars||{},r=t.chars,D=this.chars={};ga.forEach(function(s){tu(n,r,s,D)}),this.truncate=this.options.truncate||t.truncate;let o=this.options.style=this.options.style||{},i=t.style;tu(o,i,"padding-left",this),tu(o,i,"padding-right",this),this.head=o.head||i.head,this.border=o.border||i.border,this.fixedWidth=t.colWidths[this.x],this.lines=this.computeLines(t),this.desiredWidth=L.strlen(this.content)+this.paddingLeft+this.paddingRight,this.desiredHeight=this.lines.length}computeLines(t){let u=t.wordWrap||t.textWrap,{wordWrap:n=u}=this.options;if(this.fixedWidth&&n){if(this.fixedWidth-=this.paddingLeft+this.paddingRight,this.colSpan){let o=1;for(;o<this.colSpan;)this.fixedWidth+=t.colWidths[this.x+o],o++}let{wrapOnWordBoundary:r=!0}=t,{wrapOnWordBoundary:D=r}=this.options;return this.wrapLines(L.wordWrap(this.fixedWidth,this.content,D))}return this.wrapLines(this.content.split(`
6
+ `))}wrapLines(t){let u=L.colorizeLines(t);return this.href?u.map(n=>L.hyperlink(this.href,n)):u}init(t){let u=this.x,n=this.y;this.widths=t.colWidths.slice(u,u+this.colSpan),this.heights=t.rowHeights.slice(n,n+this.rowSpan),this.width=this.widths.reduce(iD,-1),this.height=this.heights.reduce(iD,-1),this.hAlign=this.options.hAlign||t.colAligns[u],this.vAlign=this.options.vAlign||t.rowAligns[n],this.drawRight=u+this.colSpan==t.colWidths.length}draw(t,u){if(t=="top")return this.drawTop(this.drawRight);if(t=="bottom")return this.drawBottom(this.drawRight);let n=L.truncate(this.content,10,this.truncate);t||fa(`${this.y}-${this.x}: ${this.rowSpan-t}x${this.colSpan} Cell ${n}`);let r=Math.max(this.height-this.lines.length,0),D;switch(this.vAlign){case"center":D=Math.ceil(r/2);break;case"bottom":D=r;break;default:D=0}if(t<D||t>=D+this.lines.length)return this.drawEmpty(this.drawRight,u);let o=this.lines.length>this.height&&t+1>=this.height;return this.drawLine(t-D,this.drawRight,o,u)}drawTop(t){let u=[];return this.cells?this.widths.forEach(function(n,r){u.push(this._topLeftChar(r)),u.push(L.repeat(this.chars[this.y==0?"top":"mid"],n))},this):(u.push(this._topLeftChar(0)),u.push(L.repeat(this.chars[this.y==0?"top":"mid"],this.width))),t&&u.push(this.chars[this.y==0?"topRight":"rightMid"]),this.wrapWithStyleColors("border",u.join(""))}_topLeftChar(t){let u=this.x+t,n;if(this.y==0)n=u==0?"topLeft":t==0?"topMid":"top";else if(u==0)n="leftMid";else if(n=t==0?"midMid":"bottomMid",this.cells&&(this.cells[this.y-1][u]instanceof e.ColSpanCell&&(n=t==0?"topMid":"mid"),t==0)){let D=1;for(;this.cells[this.y][u-D]instanceof e.ColSpanCell;)D++;this.cells[this.y][u-D]instanceof e.RowSpanCell&&(n="leftMid")}return this.chars[n]}wrapWithStyleColors(t,u){if(this[t]&&this[t].length)try{let n=DD();for(let r=this[t].length-1;r>=0;r--)n=n[this[t][r]];return n(u)}catch{return u}else return u}drawLine(t,u,n,r){let D=this.chars[this.x==0?"left":"middle"];if(this.x&&r&&this.cells){let h=this.cells[this.y+r][this.x-1];for(;h instanceof Me;)h=this.cells[h.y][h.x-1];h instanceof Oe||(D=this.chars.rightMid)}let o=L.repeat(" ",this.paddingLeft),i=u?this.chars.right:"",s=L.repeat(" ",this.paddingRight),a=this.lines[t],l=this.width-(this.paddingLeft+this.paddingRight);n&&(a+=this.truncate||"\u2026");let c=L.truncate(a,l,this.truncate);return c=L.pad(c,l," ",this.hAlign),c=o+c+s,this.stylizeLine(D,c,i)}stylizeLine(t,u,n){return t=this.wrapWithStyleColors("border",t),n=this.wrapWithStyleColors("border",n),this.y===0&&(u=this.wrapWithStyleColors("head",u)),t+u+n}drawBottom(t){let u=this.chars[this.x==0?"bottomLeft":"bottomMid"],n=L.repeat(this.chars.bottom,this.width),r=t?this.chars.bottomRight:"";return this.wrapWithStyleColors("border",u+n+r)}drawEmpty(t,u){let n=this.chars[this.x==0?"left":"middle"];if(this.x&&u&&this.cells){let o=this.cells[this.y+u][this.x-1];for(;o instanceof Me;)o=this.cells[o.y][o.x-1];o instanceof Oe||(n=this.chars.rightMid)}let r=t?this.chars.right:"",D=L.repeat(" ",this.width);return this.stylizeLine(n,D,r)}},Me=class{constructor(){}draw(t){return typeof t=="number"&&sD(`${this.y}-${this.x}: 1x1 ColSpanCell`),""}init(){}mergeTableOptions(){}},Oe=class{constructor(t){this.originalCell=t}init(t){let u=this.y,n=this.originalCell.y;this.cellOffset=u-n,this.offset=Ca(t.rowHeights,n,this.cellOffset)}draw(t){return t=="top"?this.originalCell.draw(this.offset,this.cellOffset):t=="bottom"?this.originalCell.draw("bottom"):(sD(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`),this.originalCell.draw(this.offset+1+t))}mergeTableOptions(){}};function oD(...e){return e.filter(t=>t!=null).shift()}function tu(e,t,u,n){let r=u.split("-");r.length>1?(r[1]=r[1].charAt(0).toUpperCase()+r[1].substr(1),r=r.join(""),n[r]=oD(e[r],e[u],t[r],t[u])):n[u]=oD(e[u],t[u])}function Ca(e,t,u){let n=e[t];for(let r=1;r<u;r++)n+=1+e[t+r];return n}function iD(e,t){return e+t+1}var ga=["top","top-mid","top-left","top-right","bottom","bottom-mid","bottom-left","bottom-right","left","left-mid","mid","mid-mid","right","right-mid","middle"];ot.exports=uu;ot.exports.ColSpanCell=Me;ot.exports.RowSpanCell=Oe});var FD=A((Td,lD)=>{var{warn:ma,debug:Ea}=rt(),nu=aD(),{ColSpanCell:Ba,RowSpanCell:ba}=nu;(function(){function e(d,F){return d[F]>0?e(d,F+1):F}function t(d){let F={};d.forEach(function(C,f){let p=0;C.forEach(function(g){g.y=f,g.x=f?e(F,p):p;let B=g.rowSpan||1,m=g.colSpan||1;if(B>1)for(let b=0;b<m;b++)F[g.x+b]=B;p=g.x+m}),Object.keys(F).forEach(g=>{F[g]--,F[g]<1&&delete F[g]})})}function u(d){let F=0;return d.forEach(function(C){C.forEach(function(f){F=Math.max(F,f.x+(f.colSpan||1))})}),F}function n(d){return d.length}function r(d,F){let C=d.y,f=d.y-1+(d.rowSpan||1),p=F.y,g=F.y-1+(F.rowSpan||1),B=!(C>g||p>f),m=d.x,b=d.x-1+(d.colSpan||1),k=F.x,ie=F.x-1+(F.colSpan||1),S=!(m>ie||k>b);return B&&S}function D(d,F,C){let f=Math.min(d.length-1,C),p={x:F,y:C};for(let g=0;g<=f;g++){let B=d[g];for(let m=0;m<B.length;m++)if(r(p,B[m]))return!0}return!1}function o(d,F,C,f){for(let p=C;p<f;p++)if(D(d,p,F))return!1;return!0}function i(d){d.forEach(function(F,C){F.forEach(function(f){for(let p=1;p<f.rowSpan;p++){let g=new ba(f);g.x=f.x,g.y=f.y+p,g.colSpan=f.colSpan,a(g,d[C+p])}})})}function s(d){for(let F=d.length-1;F>=0;F--){let C=d[F];for(let f=0;f<C.length;f++){let p=C[f];for(let g=1;g<p.colSpan;g++){let B=new Ba;B.x=p.x+g,B.y=p.y,C.splice(f+1,0,B)}}}}function a(d,F){let C=0;for(;C<F.length&&F[C].x<d.x;)C++;F.splice(C,0,d)}function l(d){let F=n(d),C=u(d);Ea(`Max rows: ${F}; Max cols: ${C}`);for(let f=0;f<F;f++)for(let p=0;p<C;p++)if(!D(d,p,f)){let g={x:p,y:f,colSpan:1,rowSpan:1};for(p++;p<C&&!D(d,p,f);)g.colSpan++,p++;let B=f+1;for(;B<F&&o(d,B,g.x,g.x+g.colSpan);)g.rowSpan++,B++;let m=new nu(g);m.x=g.x,m.y=g.y,ma(`Missing cell at ${m.y}-${m.x}.`),a(m,d[f])}}function c(d){return d.map(function(F){if(!Array.isArray(F)){let C=Object.keys(F)[0];F=F[C],Array.isArray(F)?(F=F.slice(),F.unshift(C)):F=[C,F]}return F.map(function(C){return new nu(C)})})}function h(d){let F=c(d);return t(F),l(F),i(F),s(F),F}lD.exports={makeTableLayout:h,layoutTable:t,addRowSpanCells:i,maxWidth:u,fillInTable:l,computeWidths:cD("colSpan","desiredWidth","x",1),computeHeights:cD("rowSpan","desiredHeight","y",1)}})();function cD(e,t,u,n){return function(r,D){let o=[],i=[],s={};D.forEach(function(a){a.forEach(function(l){(l[e]||1)>1?i.push(l):o[l[u]]=Math.max(o[l[u]]||0,l[t]||0,n)})}),r.forEach(function(a,l){typeof a=="number"&&(o[l]=a)});for(let a=i.length-1;a>=0;a--){let l=i[a],c=l[e],h=l[u],d=o[h],F=typeof r[h]=="number"?0:1;if(typeof d=="number")for(let C=1;C<c;C++)d+=1+o[h+C],typeof r[h+C]!="number"&&F++;else d=t==="desiredWidth"?l.desiredWidth-1:1,(!s[h]||s[h]<d)&&(s[h]=d);if(l[t]>d){let C=0;for(;F>0&&l[t]>d;){if(typeof r[h+C]!="number"){let f=Math.round((l[t]-d)/F);d+=f,o[h+C]+=f,F--}C++}}}Object.assign(r,o,s);for(let a=0;a<r.length;a++)r[a]=Math.max(n,r[a]||0)}}});var hD=A((vd,dD)=>{var J=rt(),Aa=Qt(),ru=FD(),it=class extends Array{constructor(t){super();let u=Aa.mergeOptions(t);if(Object.defineProperty(this,"options",{value:u,enumerable:u.debug}),u.debug){switch(typeof u.debug){case"boolean":J.setDebugLevel(J.WARN);break;case"number":J.setDebugLevel(u.debug);break;case"string":J.setDebugLevel(parseInt(u.debug,10));break;default:J.setDebugLevel(J.WARN),J.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof u.debug}`)}Object.defineProperty(this,"messages",{get(){return J.debugMessages()}})}}toString(){let t=this,u=this.options.head&&this.options.head.length;u?(t=[this.options.head],this.length&&t.push.apply(t,this)):this.options.style.head=[];let n=ru.makeTableLayout(t);n.forEach(function(D){D.forEach(function(o){o.mergeTableOptions(this.options,n)},this)},this),ru.computeWidths(this.options.colWidths,n),ru.computeHeights(this.options.rowHeights,n),n.forEach(function(D){D.forEach(function(o){o.init(this.options)},this)},this);let r=[];for(let D=0;D<n.length;D++){let o=n[D],i=this.options.rowHeights[D];(D===0||!this.options.style.compact||D==1&&u)&&Du(o,"top",r);for(let s=0;s<i;s++)Du(o,s,r);D+1==n.length&&Du(o,"bottom",r)}return r.join(`
7
7
  `)}get width(){return this.toString().split(`
8
- `)[0].length}};it.reset=()=>J.reset();function ru(e,t,u){let n=[];e.forEach(function(D){n.push(D.draw(t))});let r=n.join("");r.length&&u.push(r)}DD.exports=it});var sD=A((NF,iD)=>{iD.exports=oD()});import He from"node:path";import oo from"node:os";import{createReadStream as eo}from"node:fs";import to from"node:readline";var Et=200;async function yu(e){let t=eo(e,{encoding:"utf8"}),u=to.createInterface({input:t,crlfDelay:1/0}),n=[],r=[],D=[];for await(let o of u){if(!o.trim())continue;let i;try{i=JSON.parse(o)}catch{continue}if(!(!i||typeof i!="object")){if(i.uuid&&D.push([i.uuid,i.parentUuid??null]),i.type==="assistant"){let s=uo(i,e);s&&n.push(s)}else if(i.type==="user"){let s=no(i,e);s&&r.push(s)}}}return{assistant:n,user:r,parentLinks:D}}function uo(e,t){let u=e.message;if(!u)return null;let n=u.usage;if(!n)return null;let r=u.model??"";if(!r||r==="<synthetic>")return null;let D=u.id??e.uuid??"";if(!D&&!e.requestId)return null;let o=n.cache_creation,i=Array.isArray(u.content)?u.content:[],s=[],a=!1,F="";for(let c of i)c.type==="tool_use"&&typeof c.name=="string"?s.push(c.name):c.type==="thinking"?a=!0:c.type==="text"&&typeof c.text=="string"&&!F&&(F=c.text.slice(0,Et));return{type:"assistant",source:"claude",uuid:e.uuid??D,parentUuid:e.parentUuid??null,timestamp:e.timestamp??new Date().toISOString(),sessionId:e.sessionId??"",requestId:e.requestId??"",cwd:e.cwd??"",gitBranch:e.gitBranch,version:e.version,model:r,messageId:D,usage:{input_tokens:Number(n.input_tokens)||0,output_tokens:Number(n.output_tokens)||0,cache_creation_input_tokens:Number(n.cache_creation_input_tokens)||0,cache_read_input_tokens:Number(n.cache_read_input_tokens)||0,cache_creation_5m:Number(o?.ephemeral_5m_input_tokens)||0,cache_creation_1h:Number(o?.ephemeral_1h_input_tokens)||0},toolNames:s,hasThinking:a,textPreview:F,filePath:t,isSidechain:e.isSidechain===!0?!0:void 0}}function no(e,t){if(!e.uuid)return null;let u=e.message,n="";if(u){let o=u.content;if(typeof o=="string")n=o.slice(0,Et);else if(Array.isArray(o)){for(let i of o)if(i.type==="text"&&typeof i.text=="string"){n=i.text.slice(0,Et);break}}}let r=e.isSidechain===!0,D=r||!!n&&ro(n);return{type:"user",source:"claude",uuid:e.uuid,parentUuid:e.parentUuid??null,timestamp:e.timestamp??new Date().toISOString(),sessionId:e.sessionId??"",cwd:e.cwd??"",textPreview:n,isSynthetic:D,isSidechain:r?!0:void 0,filePath:t}}function ro(e){let t=e.trimStart();return!!(t.startsWith("Base directory for this skill:")||t.startsWith("<system-reminder>")||t.startsWith("Caveat: The messages below were generated by")||t.startsWith("<task-notification>"))}var xu={"claude-3-7-sonnet-20250219":{input:3,output:15,cacheCreation5m:3.75,cacheCreation1h:6,cacheRead:.3},"claude-3-haiku-20240307":{input:.25,output:1.25,cacheCreation5m:.3,cacheCreation1h:.5,cacheRead:.03},"claude-3-opus-20240229":{input:15,output:75,cacheCreation5m:18.75,cacheCreation1h:30,cacheRead:1.5},"claude-4-opus-20250514":{input:15,output:75,cacheCreation5m:18.75,cacheCreation1h:30,cacheRead:1.5},"claude-4-sonnet-20250514":{input:3,output:15,cacheCreation5m:3.75,cacheCreation1h:6,cacheRead:.3},"claude-fable-5":{input:10,output:50,cacheCreation5m:12.5,cacheCreation1h:20,cacheRead:1},"claude-haiku-4-5":{input:1,output:5,cacheCreation5m:1.25,cacheCreation1h:2,cacheRead:.1},"claude-haiku-4-5-20251001":{input:1,output:5,cacheCreation5m:1.25,cacheCreation1h:2,cacheRead:.1},"claude-opus-4-1":{input:15,output:75,cacheCreation5m:18.75,cacheCreation1h:30,cacheRead:1.5},"claude-opus-4-1-20250805":{input:15,output:75,cacheCreation5m:18.75,cacheCreation1h:30,cacheRead:1.5},"claude-opus-4-20250514":{input:15,output:75,cacheCreation5m:18.75,cacheCreation1h:30,cacheRead:1.5},"claude-opus-4-5":{input:5,output:25,cacheCreation5m:6.25,cacheCreation1h:10,cacheRead:.5},"claude-opus-4-5-20251101":{input:5,output:25,cacheCreation5m:6.25,cacheCreation1h:10,cacheRead:.5},"claude-opus-4-6":{input:5,output:25,cacheCreation5m:6.25,cacheCreation1h:10,cacheRead:.5},"claude-opus-4-6-20260205":{input:5,output:25,cacheCreation5m:6.25,cacheCreation1h:10,cacheRead:.5},"claude-opus-4-7":{input:5,output:25,cacheCreation5m:6.25,cacheCreation1h:10,cacheRead:.5},"claude-opus-4-7-20260416":{input:5,output:25,cacheCreation5m:6.25,cacheCreation1h:10,cacheRead:.5},"claude-opus-4-8":{input:5,output:25,cacheCreation5m:6.25,cacheCreation1h:10,cacheRead:.5},"claude-sonnet-4-20250514":{input:3,output:15,cacheCreation5m:3.75,cacheCreation1h:6,cacheRead:.3},"claude-sonnet-4-5":{input:3,output:15,cacheCreation5m:3.75,cacheCreation1h:6,cacheRead:.3},"claude-sonnet-4-5-20250929":{input:3,output:15,cacheCreation5m:3.75,cacheCreation1h:6,cacheRead:.3},"claude-sonnet-4-6":{input:3,output:15,cacheCreation5m:3.75,cacheCreation1h:6,cacheRead:.3}},wu={"chatgpt-4o-latest":{input:5,output:15,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.5},"codex-mini-latest":{input:1.5,output:6,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.375},"gpt-3.5-turbo":{input:.5,output:1.5,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.05},"gpt-3.5-turbo-0125":{input:.5,output:1.5,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.05},"gpt-3.5-turbo-1106":{input:1,output:2,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.1},"gpt-3.5-turbo-16k":{input:3,output:4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.3},"gpt-4":{input:30,output:60,cacheCreation5m:0,cacheCreation1h:0,cacheRead:3},"gpt-4-0125-preview":{input:10,output:30,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1},"gpt-4-0314":{input:30,output:60,cacheCreation5m:0,cacheCreation1h:0,cacheRead:3},"gpt-4-0613":{input:30,output:60,cacheCreation5m:0,cacheCreation1h:0,cacheRead:3},"gpt-4-1106-preview":{input:10,output:30,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1},"gpt-4-turbo":{input:10,output:30,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1},"gpt-4-turbo-2024-04-09":{input:10,output:30,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1},"gpt-4-turbo-preview":{input:10,output:30,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1},"gpt-4.1":{input:2,output:8,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.5},"gpt-4.1-2025-04-14":{input:2,output:8,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.5},"gpt-4.1-mini":{input:.4,output:1.6,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.1},"gpt-4.1-mini-2025-04-14":{input:.4,output:1.6,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.1},"gpt-4.1-nano":{input:.1,output:.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.025},"gpt-4.1-nano-2025-04-14":{input:.1,output:.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.025},"gpt-4o":{input:2.5,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1.25},"gpt-4o-2024-05-13":{input:5,output:15,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.5},"gpt-4o-2024-08-06":{input:2.5,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1.25},"gpt-4o-2024-11-20":{input:2.5,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1.25},"gpt-4o-audio-preview":{input:2.5,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.25},"gpt-4o-audio-preview-2024-12-17":{input:2.5,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.25},"gpt-4o-audio-preview-2025-06-03":{input:2.5,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.25},"gpt-4o-mini":{input:.15,output:.6,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.075},"gpt-4o-mini-2024-07-18":{input:.15,output:.6,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.075},"gpt-4o-mini-audio-preview":{input:.15,output:.6,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.015},"gpt-4o-mini-audio-preview-2024-12-17":{input:.15,output:.6,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.015},"gpt-4o-mini-realtime-preview":{input:.6,output:2.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.3},"gpt-4o-mini-realtime-preview-2024-12-17":{input:.6,output:2.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.3},"gpt-4o-mini-search-preview":{input:.15,output:.6,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.075},"gpt-4o-mini-search-preview-2025-03-11":{input:.15,output:.6,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.075},"gpt-4o-realtime-preview":{input:5,output:20,cacheCreation5m:0,cacheCreation1h:0,cacheRead:2.5},"gpt-4o-realtime-preview-2024-12-17":{input:5,output:20,cacheCreation5m:0,cacheCreation1h:0,cacheRead:2.5},"gpt-4o-realtime-preview-2025-06-03":{input:5,output:20,cacheCreation5m:0,cacheCreation1h:0,cacheRead:2.5},"gpt-4o-search-preview":{input:2.5,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1.25},"gpt-4o-search-preview-2025-03-11":{input:2.5,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1.25},"gpt-5":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5-2025-08-07":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5-chat":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5-chat-latest":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5-codex":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5-mini":{input:.25,output:2,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.025},"gpt-5-mini-2025-08-07":{input:.25,output:2,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.025},"gpt-5-nano":{input:.05,output:.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.005},"gpt-5-nano-2025-08-07":{input:.05,output:.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.005},"gpt-5-pro":{input:15,output:120,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1.5},"gpt-5-pro-2025-10-06":{input:15,output:120,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1.5},"gpt-5-search-api":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5-search-api-2025-10-14":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5.1":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5.1-2025-11-13":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5.1-chat-latest":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5.1-codex":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5.1-codex-max":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5.1-codex-mini":{input:.25,output:2,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.025},"gpt-5.2":{input:1.75,output:14,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.175},"gpt-5.2-2025-12-11":{input:1.75,output:14,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.175},"gpt-5.2-chat-latest":{input:1.75,output:14,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.175},"gpt-5.2-codex":{input:1.75,output:14,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.175},"gpt-5.2-pro":{input:21,output:168,cacheCreation5m:0,cacheCreation1h:0,cacheRead:2.1},"gpt-5.2-pro-2025-12-11":{input:21,output:168,cacheCreation5m:0,cacheCreation1h:0,cacheRead:2.1},"gpt-5.3-chat-latest":{input:1.75,output:14,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.175},"gpt-5.3-codex":{input:1.75,output:14,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.175},"gpt-5.4":{input:2.5,output:15,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.25},"gpt-5.4-2026-03-05":{input:2.5,output:15,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.25},"gpt-5.4-mini":{input:.75,output:4.5,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.075},"gpt-5.4-mini-2026-03-17":{input:.75,output:4.5,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.075},"gpt-5.4-nano":{input:.2,output:1.25,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.02},"gpt-5.4-nano-2026-03-17":{input:.2,output:1.25,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.02},"gpt-5.4-pro":{input:30,output:180,cacheCreation5m:0,cacheCreation1h:0,cacheRead:3},"gpt-5.4-pro-2026-03-05":{input:30,output:180,cacheCreation5m:0,cacheCreation1h:0,cacheRead:3},"gpt-5.5":{input:5,output:30,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.5},"gpt-5.5-2026-04-23":{input:5,output:30,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.5},"gpt-5.5-pro":{input:30,output:180,cacheCreation5m:0,cacheCreation1h:0,cacheRead:3},"gpt-5.5-pro-2026-04-23":{input:30,output:180,cacheCreation5m:0,cacheCreation1h:0,cacheRead:3},"gpt-audio":{input:2.5,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.25},"gpt-audio-1.5":{input:2.5,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.25},"gpt-audio-2025-08-28":{input:2.5,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.25},"gpt-audio-mini":{input:.6,output:2.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.06},"gpt-audio-mini-2025-10-06":{input:.6,output:2.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.06},"gpt-audio-mini-2025-12-15":{input:.6,output:2.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.06},"gpt-realtime":{input:4,output:16,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.4},"gpt-realtime-1.5":{input:4,output:16,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.4},"gpt-realtime-2":{input:4,output:16,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.4},"gpt-realtime-2025-08-28":{input:4,output:16,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.4},"gpt-realtime-mini":{input:.6,output:2.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.06},"gpt-realtime-mini-2025-10-06":{input:.6,output:2.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.06},"gpt-realtime-mini-2025-12-15":{input:.6,output:2.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.06},o1:{input:15,output:60,cacheCreation5m:0,cacheCreation1h:0,cacheRead:7.5},"o1-2024-12-17":{input:15,output:60,cacheCreation5m:0,cacheCreation1h:0,cacheRead:7.5},"o1-pro":{input:150,output:600,cacheCreation5m:0,cacheCreation1h:0,cacheRead:15},"o1-pro-2025-03-19":{input:150,output:600,cacheCreation5m:0,cacheCreation1h:0,cacheRead:15},o3:{input:2,output:8,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.5},"o3-2025-04-16":{input:2,output:8,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.5},"o3-deep-research":{input:10,output:40,cacheCreation5m:0,cacheCreation1h:0,cacheRead:2.5},"o3-deep-research-2025-06-26":{input:10,output:40,cacheCreation5m:0,cacheCreation1h:0,cacheRead:2.5},"o3-mini":{input:1.1,output:4.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.55},"o3-mini-2025-01-31":{input:1.1,output:4.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.55},"o3-pro":{input:20,output:80,cacheCreation5m:0,cacheCreation1h:0,cacheRead:2},"o3-pro-2025-06-10":{input:20,output:80,cacheCreation5m:0,cacheCreation1h:0,cacheRead:2},"o4-mini":{input:1.1,output:4.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.275},"o4-mini-2025-04-16":{input:1.1,output:4.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.275},"o4-mini-deep-research":{input:2,output:8,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.5},"o4-mini-deep-research-2025-06-26":{input:2,output:8,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.5}};var Do={"claude-opus-4":{input:15,output:75,cacheCreation5m:18.75,cacheCreation1h:30,cacheRead:1.5},"claude-sonnet-4":{input:3,output:15,cacheCreation5m:3.75,cacheCreation1h:6,cacheRead:.3},"claude-sonnet-3-7":{input:3,output:15,cacheCreation5m:3.75,cacheCreation1h:6,cacheRead:.3},"claude-haiku-3-5":{input:.8,output:4,cacheCreation5m:1,cacheCreation1h:1.6,cacheRead:.08},"claude-haiku-3":{input:.25,output:1.25,cacheCreation5m:.3,cacheCreation1h:.5,cacheRead:.03}},U={...Do,...xu},ku={fable:U["claude-fable-5"],opus:U["claude-opus-4-8"],sonnet:U["claude-sonnet-4-6"],haiku:U["claude-haiku-4-5"]};function Fe(e,t){if(!t)return{input:0,output:0,cacheCreation5m:0,cacheCreation1h:0,cacheRead:0,total:0,saved:0};let u=e.input_tokens/1e6*t.input,n=e.output_tokens/1e6*t.output,r=e.cache_creation_5m/1e6*t.cacheCreation5m,D=e.cache_creation_1h/1e6*t.cacheCreation1h;r+D===0&&e.cache_creation_input_tokens>0&&(r=e.cache_creation_input_tokens/1e6*t.cacheCreation5m);let o=e.cache_read_input_tokens/1e6*t.cacheRead,i=u+n+r+D+o,s=e.cache_read_input_tokens/1e6*(t.input-t.cacheRead);return{input:u,output:n,cacheCreation5m:r,cacheCreation1h:D,cacheRead:o,total:i,saved:s}}function Su(e){return e.replace(/\b\w/g,t=>t.toUpperCase())}function Tu(e){if(!e)return"(unknown)";let t=e.replace(/-(\d{8})$/,"").replace(/^(vertex_ai|bedrock|anthropic)\//,"");t=t.replace(/^claude-/,"");let u=t.split("-");if(u.length>=2){let n=u[0],r=u.slice(1).join(".");return Su(n)+" "+r}return Su(t.replace(/-/g," "))}var io=/-\d{8}$/,so=/^(vertex_ai|bedrock|anthropic)\//;function ao(e){if(!e)return{pricing:null,matchType:"none",matchedKey:null};if(U[e])return{pricing:U[e],matchType:"exact",matchedKey:e};let t=e.replace(io,"");if(U[t])return{pricing:U[t],matchType:"date-stripped",matchedKey:t};let u=t.replace(so,"");if(U[u])return{pricing:U[u],matchType:"prefix-stripped",matchedKey:u};for(let n of["fable","opus","sonnet","haiku"])if(e.toLowerCase().includes(n))return{pricing:ku[n],matchType:"family-fallback",matchedKey:`claude-${n}-(latest)`};return{pricing:null,matchType:"none",matchedKey:null}}function co(){let e=oo.homedir(),t=[He.join(e,".claude","projects"),He.join(e,".config","claude","projects")];return process.env.CCGAUGE_CONFIG_DIR&&t.push(He.join(process.env.CCGAUGE_CONFIG_DIR,"projects")),process.env.CLAUDE_CONFIG_DIR&&t.push(He.join(process.env.CLAUDE_CONFIG_DIR,"projects")),Array.from(new Set(t))}var _u={id:"claude",displayName:{en:"Claude",zh:"Claude"},shortLabel:"C",color:{fg:"#b45309",bg:"#fef3c7"},logoSrc:"/claude-logo.webp",parserVersion:"claude-v5-task-notification-synthetic",capabilities:{hasCacheCreation:!0,hasReasoningTokens:!1,blockWindowMs:300*60*1e3},getDirs:co,shouldSkipDir:e=>e==="tool-results"||e==="memory",parseFile:async e=>await yu(e),resolvePricing:ao,shortenModel:Tu,costFromUsage:Fe,costFootnoteKey:null};import Ve from"node:path";import So from"node:os";import{createReadStream as lo,promises as Fo}from"node:fs";import ho from"node:readline";var Bt=200;async function po(e){try{let t=await Fo.stat(e);return new Date(t.mtimeMs).toISOString()}catch{return new Date().toISOString()}}function M(e){return typeof e=="string"?e:""}function ne(e){let t=Number(e);return Number.isFinite(t)?t:0}function bt(e){let t=e.message;if(typeof t=="string")return t;let u=e.content;if(typeof u=="string")return u;if(Array.isArray(u))for(let n of u){let r=n?.type;if((r==="input_text"||r==="output_text"||r==="text")&&typeof n.text=="string")return n.text}return""}async function vu(e){let t=lo(e,{encoding:"utf8"}),u=ho.createInterface({input:t,crlfDelay:1/0}),n=[],r=[],D=[],o="",i,s="",a=0,F=0,c=null,d=await po(e),l={turnId:null,cwd:"",model:"gpt-unknown",userUuid:null,toolNames:[],hasThinking:!1,pendingTextPreview:""};for await(let C of u){if(!C.trim())continue;let f;try{f=JSON.parse(C)}catch{continue}if(!f||typeof f!="object"||!f.type)continue;let p=f.payload??{},m=M(f.timestamp),B=m||d;if(m&&(d=m),f.type==="session_meta"){o=M(p.id),s=M(p.cwd),i=M(p.cli_version)||void 0;let g=M(p.timestamp);g&&(d=g),l.cwd||(l.cwd=s);continue}if(f.type==="turn_context"){l.turnId=M(p.turn_id)||l.turnId,l.cwd=M(p.cwd)||s;let g=M(p.model);g&&(l.model=g);let b=M(p.effort);b&&(l.effort=b),l.toolNames=[],l.hasThinking=!1,l.pendingTextPreview="";continue}if(f.type==="event_msg"){let g=M(p.type);if(g==="user_message"){let b=bt(p);if(!b)continue;let k=`${o}::u${a++}`;r.push({type:"user",source:"codex",uuid:k,parentUuid:null,timestamp:B,sessionId:o,cwd:l.cwd||s,textPreview:b.slice(0,Bt),filePath:e}),D.push([k,null]),l.userUuid=k;continue}if(g==="agent_message"){let b=bt(p);b&&!l.pendingTextPreview&&(l.pendingTextPreview=b.slice(0,Bt));continue}if(g==="agent_reasoning"){l.hasThinking=!0;continue}if(g==="token_count"){let b=p.info;if(!b)continue;let k=b.total_token_usage,se=b.last_token_usage,S=k?{input:ne(k.input_tokens),cached:ne(k.cached_input_tokens),output:ne(k.output_tokens),reasoning:ne(k.reasoning_output_tokens)}:null,ee,K,te,ue;if(S){if(c===null?(ee=S.input,K=S.cached,te=S.output,ue=S.reasoning):(ee=Math.max(0,S.input-c.input),K=Math.max(0,S.cached-c.cached),te=Math.max(0,S.output-c.output),ue=Math.max(0,S.reasoning-c.reasoning)),ee===0&&K===0&&te===0&&ue===0)continue;c===null?c={...S}:c={input:Math.max(c.input,S.input),cached:Math.max(c.cached,S.cached),output:Math.max(c.output,S.output),reasoning:Math.max(c.reasoning,S.reasoning)}}else if(se){if(ee=ne(se.input_tokens),K=ne(se.cached_input_tokens),te=ne(se.output_tokens),ue=ne(se.reasoning_output_tokens),ee===0&&K===0&&te===0&&ue===0)continue;c===null?c={input:ee,cached:K,output:te,reasoning:ue}:c={input:c.input+ee,cached:c.cached+K,output:c.output+te,reasoning:c.reasoning+ue}}else continue;let Bu=`${o}::a${F++}`,bu=l.turnId?`${l.turnId}::a${F}`:`${o}::a${F}`;n.push({type:"assistant",source:"codex",uuid:Bu,parentUuid:l.userUuid,timestamp:B,sessionId:o,requestId:bu,cwd:l.cwd||s,version:i,model:l.model||"gpt-unknown",messageId:bu,usage:{input_tokens:Math.max(0,ee-K),output_tokens:te,cache_creation_input_tokens:0,cache_read_input_tokens:K,cache_creation_5m:0,cache_creation_1h:0,reasoning_tokens:ue},toolNames:[...l.toolNames],hasThinking:l.hasThinking,textPreview:l.pendingTextPreview,filePath:e,effort:l.effort}),D.push([Bu,l.userUuid]),l.toolNames=[],l.hasThinking=!1,l.pendingTextPreview="";continue}continue}if(f.type==="response_item"){let g=M(p.type);if(g==="function_call"||g==="custom_tool_call"){let b=M(p.name);b&&l.toolNames.push(b);continue}if(g==="reasoning"){l.hasThinking=!0;continue}if(g==="message"){if(M(p.role)==="assistant"){let k=bt(p);k&&!l.pendingTextPreview&&(l.pendingTextPreview=k.slice(0,Bt))}continue}continue}}return{assistant:n,user:r,parentLinks:D}}var fo={},re={...fo,...wu},Iu={gpt:re["gpt-5.5"],o:re.o3},Co=/-\d{8}$/,mo=/^(openai)\//;function Mu(e){if(!e)return{pricing:null,matchType:"none",matchedKey:null};if(re[e])return{pricing:re[e],matchType:"exact",matchedKey:e};let t=e.replace(Co,"");if(re[t])return{pricing:re[t],matchType:"date-stripped",matchedKey:t};let u=t.replace(mo,"");if(re[u])return{pricing:re[u],matchType:"prefix-stripped",matchedKey:u};let n=e.toLowerCase();return n.startsWith("gpt-")||n==="gpt"?{pricing:Iu.gpt,matchType:"family-fallback",matchedKey:"gpt-(latest)"}:/^o\d/.test(n)?{pricing:Iu.o,matchType:"family-fallback",matchedKey:"o-(latest)"}:{pricing:null,matchType:"none",matchedKey:null}}function go(e){return e.replace(/\b\w/g,t=>t.toUpperCase())}var Eo={mini:"Mini",nano:"Nano",pro:"Pro",turbo:"Turbo",preview:"Preview"};function Pu(e){if(!e)return"(unknown)";let t=e.replace(/^openai\//,"");return t.toLowerCase().startsWith("gpt-")?"GPT-"+t.slice(4).split("-").map(r=>Eo[r.toLowerCase()]??r).join(" "):t.toLowerCase().startsWith("o")?t.toUpperCase():go(t.replace(/-/g," "))}import{readFileSync as Bo}from"node:fs";import bo from"node:os";import Ou from"node:path";var Ao={"gpt-5.5":2.5,"gpt-5.4":2,"gpt-5.3-codex":2},Ro=2;function yo(e){return e.replace(/^openai\//,"").replace(/-\d{8}$/,"")}function xo(e){for(let t of e.split(/\r?\n/)){let u=(t.split("#")[0]??"").trim(),n=u.indexOf("=");if(n===-1||u.slice(0,n).trim()!=="service_tier")continue;let D=u.slice(n+1).trim().replace(/^['"]+|['"]+$/g,"");if(D==="fast"||D==="priority")return!0}return!1}function wo(){let e=[];return process.env.CODEX_HOME&&e.push(process.env.CODEX_HOME),e.push(Ou.join(bo.homedir(),".codex")),Array.from(new Set(e))}function ko(){for(let e of wo())try{let t=Bo(Ou.join(e,"config.toml"),"utf8");if(xo(t))return!0}catch{}return!1}function Lu(e){return ko()?Ao[yo(e)]??Ro:1}function Nu(e,t){return t===1?e:{input:e.input*t,output:e.output*t,cacheRead:e.cacheRead*t,cacheCreation5m:e.cacheCreation5m*t,cacheCreation1h:e.cacheCreation1h*t}}function To(){let e=So.homedir(),t=[Ve.join(e,".codex","sessions"),Ve.join(e,".codex","archived_sessions")];return process.env.CCGAUGE_CODEX_DIR&&t.push(process.env.CCGAUGE_CODEX_DIR),process.env.CODEX_HOME&&(t.push(Ve.join(process.env.CODEX_HOME,"sessions")),t.push(Ve.join(process.env.CODEX_HOME,"archived_sessions"))),Array.from(new Set(t))}function _o(e,t,u){if(!t)return Fe(e,null);let n=Lu(u??"");return Fe(e,n===1?t:Nu(t,n))}var $u={id:"codex",displayName:{en:"Codex",zh:"Codex"},shortLabel:"X",color:{fg:"#047857",bg:"#d1fae5"},logoSrc:"/codex-logo.webp",parserVersion:"codex-v6-output-excludes-readded-reasoning",capabilities:{hasCacheCreation:!1,hasReasoningTokens:!0,blockWindowMs:300*60*1e3},getDirs:To,shouldSkipDir:()=>!1,parseFile:vu,resolvePricing:Mu,shortenModel:Pu,costFromUsage:_o,costFootnoteKey:"cost.footnote.codex"};var Uu={claude:_u,codex:$u},At=["claude","codex"];function De(e){return Uu[e]}function Rt(){return At.map(e=>Uu[e])}function Wu(e){return typeof e=="string"&&(e==="claude"||e==="codex")}import{promises as be,watch as No}from"node:fs";import Ju from"node:path";function vo(e){let t=`${e.source}:`;return e.messageId&&e.requestId?`${t}${e.messageId}::${e.requestId}`:e.messageId?`${t}mid:${e.messageId}`:e.requestId?`${t}req:${e.requestId}`:`${t}uuid:${e.uuid}`}function ju(e){let t=new Map;for(let u of e){let n=vo(u),r=t.get(n);if(!r){t.set(n,u);continue}u.timestamp<r.timestamp&&t.set(n,u)}return Array.from(t.values())}import{promises as Ke}from"node:fs";import yt from"node:path";import Io from"node:os";var ze=2,de="default";function Mo(){return process.env.CCGAUGE_STATE_DIR?process.env.CCGAUGE_STATE_DIR:yt.join(Io.homedir(),".ccgauge")}function Gu(e){let t=e===de?`index-v${ze}.json`:`index-${e}-v${ze}.json`;return yt.join(Mo(),"cache",t)}async function qu(e=de){let t=Gu(e);try{let u=await Ke.readFile(t,"utf8"),n=JSON.parse(u);return n.schemaVersion!==ze||!Array.isArray(n.files)?null:n}catch{return null}}async function Hu(e,t=de){let u=Gu(t),n=yt.dirname(u);await Ke.mkdir(n,{recursive:!0});let r={schemaVersion:ze,savedAt:e.savedAt,files:e.files},D=`${u}.tmp-${process.pid}`;await Ke.writeFile(D,JSON.stringify(r)),await Ke.rename(D,u)}var Vu=/[\\/]([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})[\\/]subagents[\\/](?:[^\\/]+[\\/])*agent-[^\\/]+\.jsonl$/i,Po=/[\\/]subagents[\\/]workflows[\\/]/i;function Oo(e){let t=Vu.exec(e);return t?t[1]:null}function Ku(e){return Vu.test(e)?Po.test(e)?"workflow":"task":null}function zu({assistantRecords:e,userRecords:t,parentMap:u}){let n=new Map;for(let o of e){if(o.isSidechain||!o.sessionId)continue;let i=n.get(o.sessionId);i||(i=[],n.set(o.sessionId,i)),i.push(o)}for(let o of n.values())o.sort((i,s)=>i.timestamp<s.timestamp?-1:i.timestamp>s.timestamp?1:0);let r=new Map;for(let o of t){if(!o.isSidechain)continue;let i=r.get(o.filePath);(!i||o.timestamp<i.timestamp)&&r.set(o.filePath,o)}let D={subagentFiles:0,relinked:0,orphans:0,alreadyLinked:0};for(let[o,i]of r){let s=Oo(o);if(!s)continue;D.subagentFiles+=1;let a=u[i.uuid];if(a!=null){D.alreadyLinked+=1;continue}let F=n.get(s);if(!F||F.length===0){D.orphans+=1;continue}let c=i.timestamp,h;for(let d=F.length-1;d>=0;d-=1)if(F[d].timestamp<=c){h=F[d];break}h||(h=F[0]),u[i.uuid]=h.uuid,D.relinked+=1}return D}import{homedir as Lo}from"node:os";function Yu(e){let t=Lo();if(!t)return e;let u=new Set([t]);process.platform==="win32"&&(u.add(t.replace(/\\/g,"/")),u.add(t.replace(/\\/g,"\\\\")),u.add("\\\\?\\"+t),u.add("\\\\?\\"+t.replace(/\\/g,"/")));let n=e;for(let r of u){let D=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n=n.replace(new RegExp(D,"g"),"~")}return n}var $o=200,Uo=100,Wo=3e4,jo=2e3,Go=8,xt=20,wt=class{cacheName;files=new Map;snapshot=null;watchers=new Map;pollTimer=null;snapshotRebuildTimer=null;persistTimer=null;fileDebouncers=new Map;initPromise=null;isIndexing=!1;lastIndexedAt=null;indexDurationMs=null;existingDirs=[];dirToProvider=new Map;errors=[];loadedFromDisk=!1;lastWorkStart=null;rescanPromise=null;mutationTail=Promise.resolve();constructor(t=de){this.cacheName=t}runExclusive(t){let u=this.mutationTail.then(t,t);return this.mutationTail=u.then(()=>{},()=>{}),u}init(){return this.initPromise||(this.initPromise=this.doInit()),this.initPromise}async doInit(){let t=Date.now();this.isIndexing=!0,this.lastWorkStart=t;try{await this.detectProviderDirs();let u=await qu(this.cacheName);this.loadedFromDisk=u!==null;let n=new Map;if(u)for(let r of u.files)n.set(r.filePath,r);await this.runExclusive(async()=>{await this.fullScan(n),this.rebuildSnapshotNow(),this.indexDurationMs=Date.now()-t,this.lastIndexedAt=new Date().toISOString(),this.schedulePersist()}),this.syncWatchersToDirs(),this.setupPolling()}finally{this.isIndexing=!1}}async detectProviderDirs(){let t=new Map,u=[];for(let D of Rt())for(let o of D.getDirs())await qo(o)&&(t.has(o)||(t.set(o,D),u.push(o)));let n=[],r=[];for(let D of t.keys())this.dirToProvider.has(D)||n.push(D);for(let D of this.dirToProvider.keys())t.has(D)||r.push(D);return this.dirToProvider=t,this.existingDirs=u,{added:n,removed:r}}async fullScan(t){let u=[];for(let[r,D]of this.dirToProvider){let o=await Xu(r,D);for(let i of o)u.push({file:i,provider:D})}let n=new Set(u.map(r=>r.file));await Promise.all(u.map(async({file:r,provider:D})=>{try{let o=await be.stat(r),i=t.get(r);if(i&&i.source===D.id&&i.parserVersion===D.parserVersion&&i.mtimeMs===o.mtimeMs&&i.size===o.size){this.files.set(r,{source:D.id,parserVersion:D.parserVersion,mtimeMs:o.mtimeMs,size:o.size,assistantRecords:i.assistantRecords,userRecords:i.userRecords,parentLinks:i.parentLinks});return}let s=await D.parseFile(r);this.files.set(r,{source:D.id,parserVersion:D.parserVersion,mtimeMs:o.mtimeMs,size:o.size,assistantRecords:s.assistant,userRecords:s.user,parentLinks:s.parentLinks})}catch(o){this.recordError(`parse ${r}: ${o.message}`)}}));for(let r of Array.from(this.files.keys()))n.has(r)||this.files.delete(r)}syncWatchersToDirs(){for(let[t,u]of this.watchers)if(!this.dirToProvider.has(t)){try{u.close()}catch{}this.watchers.delete(t)}for(let[t,u]of this.dirToProvider)if(!this.watchers.has(t))try{let n=No(t,{recursive:!0},(r,D)=>{if(!D||typeof D!="string"||!D.endsWith(".jsonl"))return;let o=Ju.join(t,D);this.scheduleFileReconcile(o,u)});n.on("error",r=>{this.recordError(`watcher ${t}: ${r.message}`)}),this.watchers.set(t,n)}catch(n){this.recordError(`watch ${t}: ${n.message}`)}}setupPolling(){this.pollTimer&&clearInterval(this.pollTimer);let t=this.cacheName==="mcp",u=process.env.CCGAUGE_POLL_FALLBACK;(u==="1"||u!=="0"&&!t)&&(this.pollTimer=setInterval(()=>{this.pollOnce().catch(r=>this.recordError(`poll: ${r.message}`))},Wo),this.pollTimer.unref?.())}async pollOnce(){await this.runExclusive(async()=>{let t=Date.now(),u=await this.detectProviderDirs(),n=u.added.length>0||u.removed.length>0;n&&this.syncWatchersToDirs();let r=[];for(let[o,i]of this.dirToProvider){let s=await Xu(o,i);for(let a of s)r.push({file:a,provider:i})}let D=new Set(r.map(o=>o.file));await Promise.all(r.map(async({file:o,provider:i})=>{try{let s=await be.stat(o),a=this.files.get(o);if(a&&a.mtimeMs===s.mtimeMs&&a.size===s.size)return;let F=await i.parseFile(o);this.files.set(o,{source:i.id,parserVersion:i.parserVersion,mtimeMs:s.mtimeMs,size:s.size,assistantRecords:F.assistant,userRecords:F.user,parentLinks:F.parentLinks}),n=!0}catch(s){this.recordError(`poll-parse ${o}: ${s.message}`)}}));for(let o of Array.from(this.files.keys()))D.has(o)||(this.files.delete(o),n=!0);n&&(this.lastWorkStart=t,this.scheduleSnapshotRebuild(),this.schedulePersist())})}scheduleFileReconcile(t,u){let n=this.fileDebouncers.get(t);n&&clearTimeout(n);let r=setTimeout(()=>{this.fileDebouncers.delete(t),this.reconcileFile(t,u).catch(D=>this.recordError(`reconcile ${t}: ${D.message}`))},$o);r.unref?.(),this.fileDebouncers.set(t,r)}async reconcileFile(t,u){await this.runExclusive(async()=>{let n=Date.now(),r=null;try{r=await be.stat(t)}catch{}if(!r||!r.isFile()){this.files.has(t)&&(this.files.delete(t),this.lastWorkStart=n,this.scheduleSnapshotRebuild(),this.schedulePersist());return}let D=this.files.get(t);if(!(D&&D.mtimeMs===r.mtimeMs&&D.size===r.size))try{let o=await u.parseFile(t);this.files.set(t,{source:u.id,parserVersion:u.parserVersion,mtimeMs:r.mtimeMs,size:r.size,assistantRecords:o.assistant,userRecords:o.user,parentLinks:o.parentLinks}),this.lastWorkStart=n,this.scheduleSnapshotRebuild(),this.schedulePersist()}catch(o){this.recordError(`parse ${t}: ${o.message}`)}})}scheduleSnapshotRebuild(){this.snapshotRebuildTimer&&clearTimeout(this.snapshotRebuildTimer),this.snapshotRebuildTimer=setTimeout(()=>{this.snapshotRebuildTimer=null,this.rebuildSnapshotNow()},Uo),this.snapshotRebuildTimer.unref?.()}rebuildSnapshotNow(){let t=Date.now(),u=this.lastWorkStart??t,n=[],r=[],D={},o=0,i={claude:{source:"claude",filesScanned:0,recordsParsed:0,assistantRecords:0,scannedDirs:[]},codex:{source:"codex",filesScanned:0,recordsParsed:0,assistantRecords:0,scannedDirs:[]}};for(let[c,h]of this.dirToProvider)i[h.id].scannedDirs.push(c);for(let c of this.files.values()){n.push(...c.assistantRecords),r.push(...c.userRecords);for(let[h,d]of c.parentLinks)D[h]=d;o+=c.assistantRecords.length+c.userRecords.length,i[c.source].filesScanned+=1,i[c.source].recordsParsed+=c.assistantRecords.length+c.userRecords.length}let s=ju(n).sort((c,h)=>c.timestamp.localeCompare(h.timestamp)),a=Ho(r).sort((c,h)=>c.timestamp.localeCompare(h.timestamp));zu({assistantRecords:s,userRecords:a,parentMap:D});for(let c of s)c.isSidechain&&(c.isWorkflowSubagent=Ku(c.filePath)==="workflow");for(let c of s)i[c.source].assistantRecords+=1;let F={filesScanned:this.files.size,recordsParsed:o,assistantRecords:s.length,durationMs:Date.now()-u,scannedDirs:this.existingDirs};this.snapshot={records:s,userRecords:a,parentMap:D,stats:F,bySource:Object.values(i)},this.lastWorkStart=null}getSnapshot(){if(!this.snapshot)throw new Error("Indexer not initialized \u2014 call init() first.");return this.snapshot}async forceRescan(){let t=!this.initPromise;if(await this.init(),t)return this.snapshot;if(this.rescanPromise)return this.rescanPromise;this.rescanPromise=this.runRescan();try{return await this.rescanPromise}finally{this.rescanPromise=null}}async runRescan(){this.isIndexing=!0;try{return await this.runExclusive(async()=>{let t=Date.now();return this.lastWorkStart=t,this.snapshotRebuildTimer&&(clearTimeout(this.snapshotRebuildTimer),this.snapshotRebuildTimer=null),this.persistTimer&&(clearTimeout(this.persistTimer),this.persistTimer=null),this.files.clear(),await this.detectProviderDirs(),await this.fullScan(new Map),this.rebuildSnapshotNow(),this.indexDurationMs=Date.now()-t,this.lastIndexedAt=new Date().toISOString(),this.syncWatchersToDirs(),this.schedulePersist(),this.snapshot})}finally{this.isIndexing=!1}}getStatus(){let t=this.snapshot;return{initialized:t!==null,isIndexing:this.isIndexing,lastIndexedAt:this.lastIndexedAt,indexDurationMs:this.indexDurationMs,filesIndexed:this.files.size,recordsIndexed:t?.stats.assistantRecords??0,bySource:t?.bySource??[],watchers:this.watchers.size,errors:this.errors.slice(-xt),pendingReconciles:this.fileDebouncers.size,loadedFromDisk:this.loadedFromDisk}}schedulePersist(){this.persistTimer&&clearTimeout(this.persistTimer),this.persistTimer=setTimeout(()=>{this.persistTimer=null;let t=[];for(let[u,n]of this.files)t.push({filePath:u,source:n.source,parserVersion:n.parserVersion,mtimeMs:n.mtimeMs,size:n.size,assistantRecords:n.assistantRecords,userRecords:n.userRecords,parentLinks:n.parentLinks});Hu({savedAt:new Date().toISOString(),files:t},this.cacheName).catch(u=>this.recordError(`persist: ${u.message}`))},jo),this.persistTimer.unref?.()}recordError(t){let u=`${new Date().toISOString()} ${Yu(t)}`;this.errors.push(u),this.errors.length>xt*2&&this.errors.splice(0,this.errors.length-xt),process.env.CCGAUGE_DEBUG&&console.error(`[ccgauge:indexer] ${new Date().toISOString()} ${t}`)}disposeWatchers(){for(let t of this.watchers.values())try{t.close()}catch{}this.watchers.clear()}dispose(){this.disposeWatchers(),this.pollTimer&&clearInterval(this.pollTimer),this.snapshotRebuildTimer&&clearTimeout(this.snapshotRebuildTimer),this.persistTimer&&clearTimeout(this.persistTimer);for(let t of this.fileDebouncers.values())clearTimeout(t);this.fileDebouncers.clear()}};async function qo(e){try{return(await be.stat(e)).isDirectory()}catch{return!1}}async function Xu(e,t){let u=[];async function n(r,D){if(D>Go)return;let o;try{o=await be.readdir(r,{withFileTypes:!0})}catch{return}for(let i of o){let s=Ju.join(r,i.name);if(i.isDirectory()){if(t.shouldSkipDir(i.name))continue;await n(s,D+1)}else i.isFile()&&i.name.endsWith(".jsonl")&&u.push(s)}}return await n(e,0),u}function Ho(e){let t=new Set;return e.filter(u=>{let n=u.uuid;return n?t.has(n)?!1:(t.add(n),!0):!0})}function Vo(){return globalThis.__ccgaugeIndexers||(globalThis.__ccgaugeIndexers=new Map),globalThis.__ccgaugeIndexers}function Zu(e=de){let t=Vo(),u=t.get(e);return u||(u=new wt(e),t.set(e,u)),u}async function Qu(e={}){let t=Zu();return e.force?t.forceRescan():(await t.init(),t.getSnapshot())}function oe(e){let t=De(e.source),{pricing:u}=t.resolvePricing(e.model);return t.costFromUsage(e.usage,u,e.model)}function en(e,t){return new Intl.NumberFormat("en-US",{maximumFractionDigits:t?.maxFrac??0}).format(e)}function v(e,t="en"){return Number.isFinite(e)?t==="zh"?e>=1e8?(e/1e8).toFixed(2)+"\u4EBF":e>=1e4?(e/1e4).toFixed(1)+"\u4E07":en(e):e>=1e9?(e/1e9).toFixed(2)+"B":e>=1e6?(e/1e6).toFixed(2)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":en(e):"0"}function N(e,t){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:t?.minFrac??2,maximumFractionDigits:t?.maxFrac??2}).format(e)}function he(e,t=1){return Number.isFinite(e)?`${(e*100).toFixed(t)}%`:"0%"}function tn(e){if(e<1e3)return`${e}ms`;let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let u=Math.floor(t/60);if(u<60){let D=t%60;return D?`${u}m ${D}s`:`${u}m`}let n=Math.floor(u/60),r=u%60;return r?`${n}h ${r}m`:`${n}h`}function Ae(e){if(!e)return"(unknown)";let u=e.replace(/[/\\]+$/,"").split(/[/\\]+/);return u[u.length-1]||e}import{readFileSync as Ko,statSync as zo}from"node:fs";import{basename as un}from"node:path";var nn=new Map,Yo=/^(.+?)[/\\]\.git[/\\]worktrees[/\\]([^/\\]+)[/\\]?$/,Xo=/^(.+?)[/\\](?:\.git|\.claude)[/\\]worktrees[/\\]([^/\\]+)(?:[/\\].*)?$/;function Jo(e){let t=Ae(e);if(!e)return{label:t,isWorktree:!1,mainName:t,worktreeName:"",canonicalCwd:e};let u=Xo.exec(e);if(u){let n=u[1],r=u[2],D=un(n)||n;return{label:`${D} (${r})`,isWorktree:!0,mainName:D,worktreeName:r,canonicalCwd:n}}try{let n=`${e}/.git`;if(!zo(n).isFile())return{label:t,isWorktree:!1,mainName:t,worktreeName:"",canonicalCwd:e};let o=Ko(n,"utf8").trim().split(/\r?\n/,1)[0]??"",i=/^gitdir:\s*(.+)$/.exec(o);if(!i)return{label:t,isWorktree:!1,mainName:t,worktreeName:"",canonicalCwd:e};let s=i[1].trim(),a=Yo.exec(s);if(!a)return{label:t,isWorktree:!1,mainName:t,worktreeName:"",canonicalCwd:e};let F=a[1],c=a[2],h=un(F)||F;return{label:`${h} (${c})`,isWorktree:!0,mainName:h,worktreeName:c,canonicalCwd:F}}catch{return{label:t,isWorktree:!1,mainName:t,worktreeName:"",canonicalCwd:e}}}function rn(e){let t=nn.get(e);if(t)return t.label;let u=Jo(e);return nn.set(e,u),u.label}var Zo=["hour","day","week","month"];function Dn(e){return typeof e=="string"&&Zo.includes(e)}function kt(e,t){let u=new Date(e),n=u.getFullYear(),r=String(u.getMonth()+1).padStart(2,"0"),D=String(u.getDate()).padStart(2,"0"),o=String(u.getHours()).padStart(2,"0");if(t==="hour")return{key:`${n}-${r}-${D}T${o}`,label:`${r}/${D} ${o}:00`};if(t==="day")return{key:`${n}-${r}-${D}`,label:`${r}/${D}`};if(t==="week"){let i=new Date(u),s=i.getDay()||7;i.setDate(i.getDate()-s+1);let a=String(i.getMonth()+1).padStart(2,"0"),F=String(i.getDate()).padStart(2,"0");return{key:`${i.getFullYear()}-W${a}${F}`,label:`Wk ${a}/${F}`}}return{key:`${n}-${r}`,label:`${n}-${r}`}}function Re(e){return{source:e.source,fromIso:e.from?.toISOString(),toIso:e.to?.toISOString(),models:e.models&&e.models.length?new Set(e.models):void 0,projects:e.projects&&e.projects.length?new Set(e.projects):void 0}}function ye(e,t){return!(e.source!==t.source||t.fromIso&&e.timestamp<t.fromIso||t.toIso&&e.timestamp>t.toIso||t.models&&!t.models.has(e.model)||t.projects&&!t.projects.has(e.cwd))}function on(e,t,u){let n=new Map,r=Re(u);for(let D of e){if(!ye(D,r))continue;let{key:o,label:i}=kt(D.timestamp,t),s=n.get(o);s||(s=Qo(o,i),n.set(o,s)),ei(s,D)}return Array.from(n.values()).sort((D,o)=>D.key.localeCompare(o.key))}function Qo(e,t){return{key:e,label:t,inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,totalTokens:0,cost:0,saved:0,requests:0,models:{}}}function ei(e,t){let u=oe(t);e.inputTokens+=t.usage.input_tokens,e.outputTokens+=t.usage.output_tokens,e.cacheReadTokens+=t.usage.cache_read_input_tokens,e.cacheCreationTokens+=t.usage.cache_creation_input_tokens,e.totalTokens=e.inputTokens+e.outputTokens+e.cacheReadTokens+e.cacheCreationTokens,e.cost+=u.total,e.saved+=u.saved,e.requests+=1;let n=e.models[t.model]??{tokens:0,cost:0,requests:0};n.tokens+=t.usage.input_tokens+t.usage.output_tokens+t.usage.cache_read_input_tokens+t.usage.cache_creation_input_tokens,n.cost+=u.total,n.requests+=1,e.models[t.model]=n}function sn(e,t){let u=new Map,n=Re(t);for(let r of e){if(!ye(r,n))continue;let D=u.get(r.model);if(!D){let{pricing:i,matchType:s}=De(r.source).resolvePricing(r.model);D={model:r.model,source:r.source,requests:0,inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,totalTokens:0,cost:0,saved:0,pricing:i,pricingResolved:s==="exact"||s==="date-stripped"||s==="prefix-stripped"},u.set(r.model,D)}let o=oe(r);D.requests+=1,D.inputTokens+=r.usage.input_tokens,D.outputTokens+=r.usage.output_tokens,D.cacheReadTokens+=r.usage.cache_read_input_tokens,D.cacheCreationTokens+=r.usage.cache_creation_input_tokens,D.totalTokens=D.inputTokens+D.outputTokens+D.cacheReadTokens+D.cacheCreationTokens,D.cost+=o.total,D.saved+=o.saved}return Array.from(u.values()).sort((r,D)=>D.cost-r.cost)}function an(e,t){let u=new Map,n=new Map,r=Re(t);for(let D of e){if(!ye(D,r))continue;let o=D.cwd||"(unknown)",i=u.get(o);i||(i={source:t.source,cwd:o,projectName:Ae(o),sessions:0,requests:0,inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,totalTokens:0,cost:0,saved:0,firstActivity:D.timestamp,lastActivity:D.timestamp,models:[]},u.set(o,i),n.set(o,new Set)),n.get(o).add(D.sessionId);let s=oe(D);i.requests+=1,i.inputTokens+=D.usage.input_tokens,i.outputTokens+=D.usage.output_tokens,i.cacheReadTokens+=D.usage.cache_read_input_tokens,i.cacheCreationTokens+=D.usage.cache_creation_input_tokens,i.totalTokens=i.inputTokens+i.outputTokens+i.cacheReadTokens+i.cacheCreationTokens,i.cost+=s.total,i.saved+=s.saved,D.timestamp<i.firstActivity&&(i.firstActivity=D.timestamp),D.timestamp>i.lastActivity&&(i.lastActivity=D.timestamp),i.models.includes(D.model)||i.models.push(D.model)}for(let[D,o]of n){let i=u.get(D);i.sessions=o.size}return Array.from(u.values()).sort((D,o)=>o.cost-D.cost)}function cn(e,t,u){let n=new Map,r=Re(u);for(let o of e){if(!ye(o,r))continue;let i=o.sessionId||o.uuid,s=n.get(i);s||(s={sessionId:i,source:o.source,cwd:o.cwd,projectName:Ae(o.cwd),projectLabel:rn(o.cwd),startTime:o.timestamp,endTime:o.timestamp,durationMs:0,requests:0,inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,totalTokens:0,cost:0,saved:0,models:[],modelBreakdown:{}},n.set(i,s));let a=oe(o);s.requests+=1,s.inputTokens+=o.usage.input_tokens,s.outputTokens+=o.usage.output_tokens,s.cacheReadTokens+=o.usage.cache_read_input_tokens,s.cacheCreationTokens+=o.usage.cache_creation_input_tokens,s.totalTokens=s.inputTokens+s.outputTokens+s.cacheReadTokens+s.cacheCreationTokens,s.cost+=a.total,s.saved+=a.saved,o.timestamp<s.startTime&&(s.startTime=o.timestamp),o.timestamp>s.endTime&&(s.endTime=o.timestamp),s.models.includes(o.model)||s.models.push(o.model);let F=s.modelBreakdown[o.model]??{tokens:0,cost:0,requests:0};F.tokens+=o.usage.input_tokens+o.usage.output_tokens+o.usage.cache_read_input_tokens+o.usage.cache_creation_input_tokens,F.cost+=a.total,F.requests+=1,s.modelBreakdown[o.model]=F}let D=new Map;for(let o of t){let i=D.get(o.sessionId);(!i||o.timestamp<i.timestamp)&&D.set(o.sessionId,o)}for(let o of n.values()){o.durationMs=Math.max(0,new Date(o.endTime).getTime()-new Date(o.startTime).getTime());let i=D.get(o.sessionId);i&&i.textPreview&&(o.firstUserMessage=i.textPreview,o.title=i.textPreview.slice(0,80))}return Array.from(n.values()).sort((o,i)=>i.endTime.localeCompare(o.endTime))}function ln(e,t){let u=0,n=0,r=0,D=0,o=0,i=0,s=0,a=Re(t);for(let F of e){if(!ye(F,a))continue;let c=oe(F);u+=F.usage.input_tokens,n+=F.usage.output_tokens,r+=F.usage.cache_read_input_tokens,D+=F.usage.cache_creation_input_tokens,o+=c.total,i+=c.saved,s+=1}return{inputTokens:u,outputTokens:n,cacheReadTokens:r,cacheCreationTokens:D,totalTokens:u+n+r+D,cost:o,saved:i,requests:s}}var ti=["1d","7d","30d","90d","all","custom"];function Fn(e){return typeof e=="string"&&ti.includes(e)}function dn(e){let t=new Date;if(e==="all"||e==="custom")return{};if(e==="1d")return{from:new Date(t.getFullYear(),t.getMonth(),t.getDate())};let u=e.match(/^(\d+)([dwm])$/);if(!u)return{};let n=parseInt(u[1],10),r=u[2],D=new Date(t);return r==="d"?D.setDate(D.getDate()-n):r==="w"?D.setDate(D.getDate()-n*7):r==="m"&&D.setMonth(D.getMonth()-n),{from:D}}function ui(e,t,u){let n=new Map;for(let i of t)i.isSynthetic||i.textPreview&&i.textPreview.trim()&&n.set(i.uuid,i.textPreview);let r=new Map,D=new Map;function o(i){let s=[],a=i,F=null,c=0,h=new Set;for(;a&&c++<5e3&&!h.has(a);){h.add(a);let d=D.get(a);if(d){F=d;break}if(s.push(a),n.has(a)){F=a;break}a=u[a]??null}F||(F=i);for(let d of s)D.set(d,F);return F}for(let i of e)r.set(i.uuid,o(i.uuid));return r}function xe(e,t,u){let n=ui(e,t,u),r=new Map;for(let D of e){let o=n.get(D.uuid)??D.uuid,i=r.get(o);(!i||D.timestamp<i.firstTimestamp)&&r.set(o,{turnId:o,firstTimestamp:D.timestamp,firstModel:D.model,cwd:D.cwd,sessionId:D.sessionId,source:D.source})}return r}import nt from"node:process";function St({onlyFirst:e=!1}={}){let r="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(r,e?void 0:"g")}var ni=St();function z(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes("\x1B")&&!e.includes("\x9B")?e:e.replace(ni,"")}var hn=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],pn=12288,fn=65510,Cn=[12288,12288,65281,65376,65504,65510];var mn=4352,gn=262141,Tt=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];var Ye=(e,t)=>{let u=0,n=Math.floor(e.length/2)-1;for(;u<=n;){let r=Math.floor((u+n)/2),D=r*2;if(t<e[D])n=r-1;else if(t>e[D+1])u=r+1;else return!0}return!1};var En=19968,[oi,ii]=si(Tt);function si(e){let t=e[0],u=e[1];for(let n=0;n<e.length;n+=2){let r=e[n],D=e[n+1];if(En>=r&&En<=D)return[r,D];D-r>u-t&&(t=r,u=D)}return[t,u]}var Bn=e=>e<161||e>1114109?!1:Ye(hn,e),we=e=>e<pn||e>fn?!1:Ye(Cn,e);var ke=e=>e>=oi&&e<=ii?!0:e<mn||e>gn?!1:Ye(Tt,e);function ai(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function Y(e,{ambiguousAsWide:t=!1}={}){return ai(e),we(e)||ke(e)||t&&Bn(e)?2:1}var Rn=le(An(),1),ci=new Intl.Segmenter,li=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function P(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:u=!0,countAnsiEscapeCodes:n=!1}=t;if(n||(e=z(e)),e.length===0)return 0;let r=0,D={ambiguousAsWide:!u};for(let{segment:o}of ci.segment(e)){let i=o.codePointAt(0);if(!(i<=31||i>=127&&i<=159)&&!(i>=8203&&i<=8207||i===65279)&&!(i>=768&&i<=879||i>=6832&&i<=6911||i>=7616&&i<=7679||i>=8400&&i<=8447||i>=65056&&i<=65071)&&!(i>=55296&&i<=57343)&&!(i>=65024&&i<=65039)&&!li.test(o)){if((0,Rn.default)().test(o)){r+=2;continue}r+=Y(i,D)}}return r}var yn=(e=0)=>t=>`\x1B[${t+e}m`,xn=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,wn=(e=0)=>(t,u,n)=>`\x1B[${38+e};2;${t};${u};${n}m`,R={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},_0=Object.keys(R.modifier),Fi=Object.keys(R.color),di=Object.keys(R.bgColor),v0=[...Fi,...di];function hi(){let e=new Map;for(let[t,u]of Object.entries(R)){for(let[n,r]of Object.entries(u))R[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},u[n]=R[n],e.set(r[0],r[1]);Object.defineProperty(R,t,{value:u,enumerable:!1})}return Object.defineProperty(R,"codes",{value:e,enumerable:!1}),R.color.close="\x1B[39m",R.bgColor.close="\x1B[49m",R.color.ansi=yn(),R.color.ansi256=xn(),R.color.ansi16m=wn(),R.bgColor.ansi=yn(10),R.bgColor.ansi256=xn(10),R.bgColor.ansi16m=wn(10),Object.defineProperties(R,{rgbToAnsi256:{value(t,u,n){return t===u&&u===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(u/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){let u=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!u)return[0,0,0];let[n]=u;n.length===3&&(n=[...n].map(D=>D+D).join(""));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>R.rgbToAnsi256(...R.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let u,n,r;if(t>=232)u=((t-232)*10+8)/255,n=u,r=u;else{t-=16;let i=t%36;u=Math.floor(t/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let D=Math.max(u,n,r)*2;if(D===0)return 30;let o=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(u));return D===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,u,n)=>R.ansi256ToAnsi(R.rgbToAnsi256(t,u,n)),enumerable:!1},hexToAnsi:{value:t=>R.ansi256ToAnsi(R.hexToAnsi256(t)),enumerable:!1}}),R}var pi=hi(),W=pi;import _t from"node:process";import fi from"node:os";import kn from"node:tty";function $(e,t=globalThis.Deno?globalThis.Deno.args:_t.argv){let u=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(u+e),r=t.indexOf("--");return n!==-1&&(r===-1||n<r)}var{env:y}=_t,Xe;$("no-color")||$("no-colors")||$("color=false")||$("color=never")?Xe=0:($("color")||$("colors")||$("color=true")||$("color=always"))&&(Xe=1);function Ci(){if("FORCE_COLOR"in y)return y.FORCE_COLOR==="true"?1:y.FORCE_COLOR==="false"?0:y.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(y.FORCE_COLOR,10),3)}function mi(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function gi(e,{streamIsTTY:t,sniffFlags:u=!0}={}){let n=Ci();n!==void 0&&(Xe=n);let r=u?Xe:n;if(r===0)return 0;if(u){if($("color=16m")||$("color=full")||$("color=truecolor"))return 3;if($("color=256"))return 2}if("TF_BUILD"in y&&"AGENT_NAME"in y)return 1;if(e&&!t&&r===void 0)return 0;let D=r||0;if(y.TERM==="dumb")return D;if(_t.platform==="win32"){let o=fi.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in y)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in y)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in y)||y.CI_NAME==="codeship"?1:D;if("TEAMCITY_VERSION"in y)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(y.TEAMCITY_VERSION)?1:0;if(y.COLORTERM==="truecolor"||y.TERM==="xterm-kitty"||y.TERM==="xterm-ghostty"||y.TERM==="wezterm")return 3;if("TERM_PROGRAM"in y){let o=Number.parseInt((y.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(y.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(y.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(y.TERM)||"COLORTERM"in y?1:D}function Sn(e,t={}){let u=gi(e,{streamIsTTY:e&&e.isTTY,...t});return mi(u)}var Ei={stdout:Sn({isTTY:kn.isatty(1)}),stderr:Sn({isTTY:kn.isatty(2)})},Tn=Ei;function _n(e,t,u){let n=e.indexOf(t);if(n===-1)return e;let r=t.length,D=0,o="";do o+=e.slice(D,n)+t+u,D=n+r,n=e.indexOf(t,D);while(n!==-1);return o+=e.slice(D),o}function vn(e,t,u,n){let r=0,D="";do{let o=e[n-1]==="\r";D+=e.slice(r,o?n-1:n)+t+(o?`\r
8
+ `)[0].length}};it.reset=()=>J.reset();function Du(e,t,u){let n=[];e.forEach(function(D){n.push(D.draw(t))});let r=n.join("");r.length&&u.push(r)}dD.exports=it});var fD=A((Id,pD)=>{pD.exports=hD()});import He from"node:path";import mo from"node:os";import{createReadStream as so}from"node:fs";import ao from"node:readline";var wu=200;function co(e){try{return JSON.stringify(e)?.length??0}catch{return 0}}function xu(e){if(typeof e=="string")return e.length;if(Array.isArray(e)){let t=0;for(let u of e)if(u&&typeof u=="object"){let n=u.text;t+=typeof n=="string"?n.length:co(u)}else typeof u=="string"&&(t+=u.length);return t}return 0}function lo(e){if(typeof e=="string")return e;if(Array.isArray(e)){for(let t of e)if(t.type==="text"&&typeof t.text=="string")return t.text}return""}var Fo=/^Base directory for this skill:\s*(\S+)/;function ho(e){let t=Fo.exec(e.trimStart());return t&&t[1].split(/[\\/]/).filter(Boolean).pop()||null}async function ku(e){let t=so(e,{encoding:"utf8"}),u=ao.createInterface({input:t,crlfDelay:1/0}),n=[],r=[],D=[];for await(let o of u){if(!o.trim())continue;let i;try{i=JSON.parse(o)}catch{continue}if(!(!i||typeof i!="object")){if(i.uuid&&D.push([i.uuid,i.parentUuid??null]),i.type==="assistant"){let s=po(i,e);s&&n.push(s)}else if(i.type==="user"){let s=fo(i,e);s&&r.push(s)}}}return{assistant:n,user:r,parentLinks:D}}function po(e,t){let u=e.message;if(!u)return null;let n=u.usage;if(!n)return null;let r=u.model??"";if(!r||r==="<synthetic>")return null;let D=u.id??e.uuid??"";if(!D&&!e.requestId)return null;let o=n.cache_creation,i=Array.isArray(u.content)?u.content:[],s=[],a=[],l=!1,c="";for(let h of i)h.type==="tool_use"&&typeof h.name=="string"?(s.push(h.name),typeof h.id=="string"&&a.push({id:h.id,name:h.name})):h.type==="thinking"?l=!0:h.type==="text"&&typeof h.text=="string"&&!c&&(c=h.text.slice(0,wu));return{type:"assistant",source:"claude",uuid:e.uuid??D,parentUuid:e.parentUuid??null,timestamp:e.timestamp??new Date().toISOString(),sessionId:e.sessionId??"",requestId:e.requestId??"",cwd:e.cwd??"",gitBranch:e.gitBranch,version:e.version,model:r,messageId:D,usage:{input_tokens:Number(n.input_tokens)||0,output_tokens:Number(n.output_tokens)||0,cache_creation_input_tokens:Number(n.cache_creation_input_tokens)||0,cache_read_input_tokens:Number(n.cache_read_input_tokens)||0,cache_creation_5m:Number(o?.ephemeral_5m_input_tokens)||0,cache_creation_1h:Number(o?.ephemeral_1h_input_tokens)||0},toolNames:s,toolUses:a.length?a:void 0,hasThinking:l,textPreview:c,filePath:t,isSidechain:e.isSidechain===!0?!0:void 0}}function fo(e,t){if(!e.uuid)return null;let n=e.message?.content,r=lo(n),D=r.slice(0,wu),o;if(Array.isArray(n))for(let c of n)c.type==="tool_result"&&typeof c.tool_use_id=="string"&&(o||(o=[]),o.push({toolUseId:c.tool_use_id,chars:xu(c.content)}));let i,s=ho(r);s&&(i={skill:s,chars:xu(n)});let a=e.isSidechain===!0,l=a||!!D&&Co(D);return{type:"user",source:"claude",uuid:e.uuid,parentUuid:e.parentUuid??null,timestamp:e.timestamp??new Date().toISOString(),sessionId:e.sessionId??"",cwd:e.cwd??"",textPreview:D,toolResults:o,skillInject:i,isSynthetic:l,isSidechain:a?!0:void 0,filePath:t}}function Co(e){let t=e.trimStart();return!!(t.startsWith("Base directory for this skill:")||t.startsWith("<system-reminder>")||t.startsWith("Caveat: The messages below were generated by")||t.startsWith("<task-notification>"))}var Su={"claude-3-7-sonnet-20250219":{input:3,output:15,cacheCreation5m:3.75,cacheCreation1h:6,cacheRead:.3},"claude-3-haiku-20240307":{input:.25,output:1.25,cacheCreation5m:.3,cacheCreation1h:.5,cacheRead:.03},"claude-3-opus-20240229":{input:15,output:75,cacheCreation5m:18.75,cacheCreation1h:30,cacheRead:1.5},"claude-4-opus-20250514":{input:15,output:75,cacheCreation5m:18.75,cacheCreation1h:30,cacheRead:1.5},"claude-4-sonnet-20250514":{input:3,output:15,cacheCreation5m:3.75,cacheCreation1h:6,cacheRead:.3},"claude-fable-5":{input:10,output:50,cacheCreation5m:12.5,cacheCreation1h:20,cacheRead:1},"claude-haiku-4-5":{input:1,output:5,cacheCreation5m:1.25,cacheCreation1h:2,cacheRead:.1},"claude-haiku-4-5-20251001":{input:1,output:5,cacheCreation5m:1.25,cacheCreation1h:2,cacheRead:.1},"claude-opus-4-1":{input:15,output:75,cacheCreation5m:18.75,cacheCreation1h:30,cacheRead:1.5},"claude-opus-4-1-20250805":{input:15,output:75,cacheCreation5m:18.75,cacheCreation1h:30,cacheRead:1.5},"claude-opus-4-20250514":{input:15,output:75,cacheCreation5m:18.75,cacheCreation1h:30,cacheRead:1.5},"claude-opus-4-5":{input:5,output:25,cacheCreation5m:6.25,cacheCreation1h:10,cacheRead:.5},"claude-opus-4-5-20251101":{input:5,output:25,cacheCreation5m:6.25,cacheCreation1h:10,cacheRead:.5},"claude-opus-4-6":{input:5,output:25,cacheCreation5m:6.25,cacheCreation1h:10,cacheRead:.5},"claude-opus-4-6-20260205":{input:5,output:25,cacheCreation5m:6.25,cacheCreation1h:10,cacheRead:.5},"claude-opus-4-7":{input:5,output:25,cacheCreation5m:6.25,cacheCreation1h:10,cacheRead:.5},"claude-opus-4-7-20260416":{input:5,output:25,cacheCreation5m:6.25,cacheCreation1h:10,cacheRead:.5},"claude-opus-4-8":{input:5,output:25,cacheCreation5m:6.25,cacheCreation1h:10,cacheRead:.5},"claude-sonnet-4-20250514":{input:3,output:15,cacheCreation5m:3.75,cacheCreation1h:6,cacheRead:.3},"claude-sonnet-4-5":{input:3,output:15,cacheCreation5m:3.75,cacheCreation1h:6,cacheRead:.3},"claude-sonnet-4-5-20250929":{input:3,output:15,cacheCreation5m:3.75,cacheCreation1h:6,cacheRead:.3},"claude-sonnet-4-6":{input:3,output:15,cacheCreation5m:3.75,cacheCreation1h:6,cacheRead:.3},"claude-sonnet-5":{input:2,output:10,cacheCreation5m:2.5,cacheCreation1h:4,cacheRead:.2}},_u={"chatgpt-4o-latest":{input:5,output:15,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.5},"codex-mini-latest":{input:1.5,output:6,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.375},"gpt-3.5-turbo":{input:.5,output:1.5,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.05},"gpt-3.5-turbo-0125":{input:.5,output:1.5,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.05},"gpt-3.5-turbo-1106":{input:1,output:2,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.1},"gpt-3.5-turbo-16k":{input:3,output:4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.3},"gpt-4":{input:30,output:60,cacheCreation5m:0,cacheCreation1h:0,cacheRead:3},"gpt-4-0125-preview":{input:10,output:30,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1},"gpt-4-0314":{input:30,output:60,cacheCreation5m:0,cacheCreation1h:0,cacheRead:3},"gpt-4-0613":{input:30,output:60,cacheCreation5m:0,cacheCreation1h:0,cacheRead:3},"gpt-4-1106-preview":{input:10,output:30,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1},"gpt-4-turbo":{input:10,output:30,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1},"gpt-4-turbo-2024-04-09":{input:10,output:30,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1},"gpt-4-turbo-preview":{input:10,output:30,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1},"gpt-4.1":{input:2,output:8,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.5},"gpt-4.1-2025-04-14":{input:2,output:8,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.5},"gpt-4.1-mini":{input:.4,output:1.6,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.1},"gpt-4.1-mini-2025-04-14":{input:.4,output:1.6,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.1},"gpt-4.1-nano":{input:.1,output:.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.025},"gpt-4.1-nano-2025-04-14":{input:.1,output:.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.025},"gpt-4o":{input:2.5,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1.25},"gpt-4o-2024-05-13":{input:5,output:15,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.5},"gpt-4o-2024-08-06":{input:2.5,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1.25},"gpt-4o-2024-11-20":{input:2.5,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1.25},"gpt-4o-audio-preview":{input:2.5,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.25},"gpt-4o-audio-preview-2024-12-17":{input:2.5,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.25},"gpt-4o-audio-preview-2025-06-03":{input:2.5,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.25},"gpt-4o-mini":{input:.15,output:.6,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.075},"gpt-4o-mini-2024-07-18":{input:.15,output:.6,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.075},"gpt-4o-mini-audio-preview":{input:.15,output:.6,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.015},"gpt-4o-mini-audio-preview-2024-12-17":{input:.15,output:.6,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.015},"gpt-4o-mini-realtime-preview":{input:.6,output:2.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.3},"gpt-4o-mini-realtime-preview-2024-12-17":{input:.6,output:2.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.3},"gpt-4o-mini-search-preview":{input:.15,output:.6,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.075},"gpt-4o-mini-search-preview-2025-03-11":{input:.15,output:.6,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.075},"gpt-4o-realtime-preview":{input:5,output:20,cacheCreation5m:0,cacheCreation1h:0,cacheRead:2.5},"gpt-4o-realtime-preview-2024-12-17":{input:5,output:20,cacheCreation5m:0,cacheCreation1h:0,cacheRead:2.5},"gpt-4o-realtime-preview-2025-06-03":{input:5,output:20,cacheCreation5m:0,cacheCreation1h:0,cacheRead:2.5},"gpt-4o-search-preview":{input:2.5,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1.25},"gpt-4o-search-preview-2025-03-11":{input:2.5,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1.25},"gpt-5":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5-2025-08-07":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5-chat":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5-chat-latest":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5-codex":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5-mini":{input:.25,output:2,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.025},"gpt-5-mini-2025-08-07":{input:.25,output:2,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.025},"gpt-5-nano":{input:.05,output:.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.005},"gpt-5-nano-2025-08-07":{input:.05,output:.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.005},"gpt-5-pro":{input:15,output:120,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1.5},"gpt-5-pro-2025-10-06":{input:15,output:120,cacheCreation5m:0,cacheCreation1h:0,cacheRead:1.5},"gpt-5-search-api":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5-search-api-2025-10-14":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5.1":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5.1-2025-11-13":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5.1-chat-latest":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5.1-codex":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5.1-codex-max":{input:1.25,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.125},"gpt-5.1-codex-mini":{input:.25,output:2,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.025},"gpt-5.2":{input:1.75,output:14,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.175},"gpt-5.2-2025-12-11":{input:1.75,output:14,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.175},"gpt-5.2-chat-latest":{input:1.75,output:14,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.175},"gpt-5.2-codex":{input:1.75,output:14,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.175},"gpt-5.2-pro":{input:21,output:168,cacheCreation5m:0,cacheCreation1h:0,cacheRead:2.1},"gpt-5.2-pro-2025-12-11":{input:21,output:168,cacheCreation5m:0,cacheCreation1h:0,cacheRead:2.1},"gpt-5.3-chat-latest":{input:1.75,output:14,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.175},"gpt-5.3-codex":{input:1.75,output:14,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.175},"gpt-5.4":{input:2.5,output:15,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.25},"gpt-5.4-2026-03-05":{input:2.5,output:15,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.25},"gpt-5.4-mini":{input:.75,output:4.5,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.075},"gpt-5.4-mini-2026-03-17":{input:.75,output:4.5,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.075},"gpt-5.4-nano":{input:.2,output:1.25,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.02},"gpt-5.4-nano-2026-03-17":{input:.2,output:1.25,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.02},"gpt-5.4-pro":{input:30,output:180,cacheCreation5m:0,cacheCreation1h:0,cacheRead:3},"gpt-5.4-pro-2026-03-05":{input:30,output:180,cacheCreation5m:0,cacheCreation1h:0,cacheRead:3},"gpt-5.5":{input:5,output:30,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.5},"gpt-5.5-2026-04-23":{input:5,output:30,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.5},"gpt-5.5-pro":{input:30,output:180,cacheCreation5m:0,cacheCreation1h:0,cacheRead:3},"gpt-5.5-pro-2026-04-23":{input:30,output:180,cacheCreation5m:0,cacheCreation1h:0,cacheRead:3},"gpt-5.6":{input:5,output:30,cacheCreation5m:6.25,cacheCreation1h:10,cacheRead:.5},"gpt-5.6-luna":{input:1,output:6,cacheCreation5m:1.25,cacheCreation1h:2,cacheRead:.1},"gpt-5.6-sol":{input:5,output:30,cacheCreation5m:6.25,cacheCreation1h:10,cacheRead:.5},"gpt-5.6-terra":{input:2.5,output:15,cacheCreation5m:3.125,cacheCreation1h:5,cacheRead:.25},"gpt-audio":{input:2.5,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.25},"gpt-audio-1.5":{input:2.5,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.25},"gpt-audio-2025-08-28":{input:2.5,output:10,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.25},"gpt-audio-mini":{input:.6,output:2.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.06},"gpt-audio-mini-2025-10-06":{input:.6,output:2.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.06},"gpt-audio-mini-2025-12-15":{input:.6,output:2.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.06},"gpt-realtime":{input:4,output:16,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.4},"gpt-realtime-1.5":{input:4,output:16,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.4},"gpt-realtime-2":{input:4,output:16,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.4},"gpt-realtime-2.1":{input:4,output:24,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.4},"gpt-realtime-2.1-mini":{input:.6,output:2.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.06},"gpt-realtime-2025-08-28":{input:4,output:16,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.4},"gpt-realtime-mini":{input:.6,output:2.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.06},"gpt-realtime-mini-2025-10-06":{input:.6,output:2.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.06},"gpt-realtime-mini-2025-12-15":{input:.6,output:2.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.06},o1:{input:15,output:60,cacheCreation5m:0,cacheCreation1h:0,cacheRead:7.5},"o1-2024-12-17":{input:15,output:60,cacheCreation5m:0,cacheCreation1h:0,cacheRead:7.5},"o1-pro":{input:150,output:600,cacheCreation5m:0,cacheCreation1h:0,cacheRead:15},"o1-pro-2025-03-19":{input:150,output:600,cacheCreation5m:0,cacheCreation1h:0,cacheRead:15},o3:{input:2,output:8,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.5},"o3-2025-04-16":{input:2,output:8,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.5},"o3-deep-research":{input:10,output:40,cacheCreation5m:0,cacheCreation1h:0,cacheRead:2.5},"o3-deep-research-2025-06-26":{input:10,output:40,cacheCreation5m:0,cacheCreation1h:0,cacheRead:2.5},"o3-mini":{input:1.1,output:4.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.55},"o3-mini-2025-01-31":{input:1.1,output:4.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.55},"o3-pro":{input:20,output:80,cacheCreation5m:0,cacheCreation1h:0,cacheRead:2},"o3-pro-2025-06-10":{input:20,output:80,cacheCreation5m:0,cacheCreation1h:0,cacheRead:2},"o4-mini":{input:1.1,output:4.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.275},"o4-mini-2025-04-16":{input:1.1,output:4.4,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.275},"o4-mini-deep-research":{input:2,output:8,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.5},"o4-mini-deep-research-2025-06-26":{input:2,output:8,cacheCreation5m:0,cacheCreation1h:0,cacheRead:.5}};var go={"claude-opus-4":{input:15,output:75,cacheCreation5m:18.75,cacheCreation1h:30,cacheRead:1.5},"claude-sonnet-4":{input:3,output:15,cacheCreation5m:3.75,cacheCreation1h:6,cacheRead:.3},"claude-sonnet-3-7":{input:3,output:15,cacheCreation5m:3.75,cacheCreation1h:6,cacheRead:.3},"claude-haiku-3-5":{input:.8,output:4,cacheCreation5m:1,cacheCreation1h:1.6,cacheRead:.08},"claude-haiku-3":{input:.25,output:1.25,cacheCreation5m:.3,cacheCreation1h:.5,cacheRead:.03}},ue={...go,...Su},Tu={fable:ue["claude-fable-5"],opus:ue["claude-opus-4-8"],sonnet:ue["claude-sonnet-4-6"],haiku:ue["claude-haiku-4-5"]};function le(e,t){if(!t)return{input:0,output:0,cacheCreation5m:0,cacheCreation1h:0,cacheRead:0,total:0,saved:0};let u=e.input_tokens/1e6*t.input,n=e.output_tokens/1e6*t.output,r=e.cache_creation_5m/1e6*t.cacheCreation5m,D=e.cache_creation_1h/1e6*t.cacheCreation1h;r+D===0&&e.cache_creation_input_tokens>0&&(r=e.cache_creation_input_tokens/1e6*t.cacheCreation5m);let o=e.cache_read_input_tokens/1e6*t.cacheRead,i=u+n+r+D+o,s=e.cache_read_input_tokens/1e6*(t.input-t.cacheRead);return{input:u,output:n,cacheCreation5m:r,cacheCreation1h:D,cacheRead:o,total:i,saved:s}}function vu(e){return e.replace(/\b\w/g,t=>t.toUpperCase())}function Iu(e){if(!e)return"(unknown)";let t=e.replace(/-(\d{8})$/,"").replace(/^(vertex_ai|bedrock|anthropic)\//,"");t=t.replace(/^claude-/,"");let u=t.split("-");if(u.length>=2){let n=u[0],r=u.slice(1).join(".");return vu(n)+" "+r}return vu(t.replace(/-/g," "))}var Eo=/-\d{8}$/,Bo=/^(vertex_ai|bedrock|anthropic)\//;function Pu(){return globalThis.__ccgaugePricing?.state}function bo(){return Pu()?.claude??ue}function Ao(){return Pu()?.claudeFallback??Tu}function Ro(e){if(!e)return{pricing:null,matchType:"none",matchedKey:null};let t=bo();if(t[e])return{pricing:t[e],matchType:"exact",matchedKey:e};let u=e.replace(Eo,"");if(t[u])return{pricing:t[u],matchType:"date-stripped",matchedKey:u};let n=u.replace(Bo,"");if(t[n])return{pricing:t[n],matchType:"prefix-stripped",matchedKey:n};let r=Ao();for(let D of["fable","opus","sonnet","haiku"])if(e.toLowerCase().includes(D))return{pricing:r[D]??null,matchType:"family-fallback",matchedKey:`claude-${D}-(latest)`};return{pricing:null,matchType:"none",matchedKey:null}}function yo(){let e=mo.homedir(),t=[He.join(e,".claude","projects"),He.join(e,".config","claude","projects")];return process.env.CCGAUGE_CONFIG_DIR&&t.push(He.join(process.env.CCGAUGE_CONFIG_DIR,"projects")),process.env.CLAUDE_CONFIG_DIR&&t.push(He.join(process.env.CLAUDE_CONFIG_DIR,"projects")),Array.from(new Set(t))}var Mu={id:"claude",displayName:{en:"Claude",zh:"Claude"},shortLabel:"C",color:{fg:"#b45309",bg:"#fef3c7"},logoSrc:"/claude-logo.webp",parserVersion:"claude-v6-tool-result-sizes",capabilities:{hasCacheCreation:!0,hasReasoningTokens:!1,blockWindowMs:300*60*1e3},getDirs:yo,shouldSkipDir:e=>e==="tool-results"||e==="memory",parseFile:async e=>await ku(e),resolvePricing:Ro,shortenModel:Iu,costFromUsage:le,costFootnoteKey:null};import Ve from"node:path";import Vo from"node:os";import{createReadStream as xo,promises as wo}from"node:fs";import ko from"node:readline";var Et=200;async function So(e){try{let t=await wo.stat(e);return new Date(t.mtimeMs).toISOString()}catch{return new Date().toISOString()}}function P(e){return typeof e=="string"?e:""}function ne(e){let t=Number(e);return Number.isFinite(t)?t:0}function Bt(e){let t=e.message;if(typeof t=="string")return t;let u=e.content;if(typeof u=="string")return u;if(Array.isArray(u))for(let n of u){let r=n?.type;if((r==="input_text"||r==="output_text"||r==="text")&&typeof n.text=="string")return n.text}return""}async function Ou(e){let t=xo(e,{encoding:"utf8"}),u=ko.createInterface({input:t,crlfDelay:1/0}),n=[],r=[],D=[],o="",i,s="",a=0,l=0,c=null,d=await So(e),F={turnId:null,cwd:"",model:"gpt-unknown",userUuid:null,toolNames:[],hasThinking:!1,pendingTextPreview:""};for await(let C of u){if(!C.trim())continue;let f;try{f=JSON.parse(C)}catch{continue}if(!f||typeof f!="object"||!f.type)continue;let p=f.payload??{},g=P(f.timestamp),B=g||d;if(g&&(d=g),f.type==="session_meta"){o=P(p.id),s=P(p.cwd),i=P(p.cli_version)||void 0;let m=P(p.timestamp);m&&(d=m),F.cwd||(F.cwd=s);continue}if(f.type==="turn_context"){F.turnId=P(p.turn_id)||F.turnId,F.cwd=P(p.cwd)||s;let m=P(p.model);m&&(F.model=m);let b=P(p.effort);b&&(F.effort=b),F.toolNames=[],F.hasThinking=!1,F.pendingTextPreview="";continue}if(f.type==="event_msg"){let m=P(p.type);if(m==="user_message"){let b=Bt(p);if(!b)continue;let k=`${o}::u${a++}`;r.push({type:"user",source:"codex",uuid:k,parentUuid:null,timestamp:B,sessionId:o,cwd:F.cwd||s,textPreview:b.slice(0,Et),filePath:e}),D.push([k,null]),F.userUuid=k;continue}if(m==="agent_message"){let b=Bt(p);b&&!F.pendingTextPreview&&(F.pendingTextPreview=b.slice(0,Et));continue}if(m==="agent_reasoning"){F.hasThinking=!0;continue}if(m==="token_count"){let b=p.info;if(!b)continue;let k=b.total_token_usage,ie=b.last_token_usage,S=k?{input:ne(k.input_tokens),cached:ne(k.cached_input_tokens),output:ne(k.output_tokens),reasoning:ne(k.reasoning_output_tokens)}:null,Q,V,ee,te;if(S){if(c===null?(Q=S.input,V=S.cached,ee=S.output,te=S.reasoning):(Q=Math.max(0,S.input-c.input),V=Math.max(0,S.cached-c.cached),ee=Math.max(0,S.output-c.output),te=Math.max(0,S.reasoning-c.reasoning)),Q===0&&V===0&&ee===0&&te===0)continue;c===null?c={...S}:c={input:Math.max(c.input,S.input),cached:Math.max(c.cached,S.cached),output:Math.max(c.output,S.output),reasoning:Math.max(c.reasoning,S.reasoning)}}else if(ie){if(Q=ne(ie.input_tokens),V=ne(ie.cached_input_tokens),ee=ne(ie.output_tokens),te=ne(ie.reasoning_output_tokens),Q===0&&V===0&&ee===0&&te===0)continue;c===null?c={input:Q,cached:V,output:ee,reasoning:te}:c={input:c.input+Q,cached:c.cached+V,output:c.output+ee,reasoning:c.reasoning+te}}else continue;let bu=`${o}::a${l++}`,Au=F.turnId?`${F.turnId}::a${l}`:`${o}::a${l}`;n.push({type:"assistant",source:"codex",uuid:bu,parentUuid:F.userUuid,timestamp:B,sessionId:o,requestId:Au,cwd:F.cwd||s,version:i,model:F.model||"gpt-unknown",messageId:Au,usage:{input_tokens:Math.max(0,Q-V),output_tokens:ee,cache_creation_input_tokens:0,cache_read_input_tokens:V,cache_creation_5m:0,cache_creation_1h:0,reasoning_tokens:te},toolNames:[...F.toolNames],hasThinking:F.hasThinking,textPreview:F.pendingTextPreview,filePath:e,effort:F.effort}),D.push([bu,F.userUuid]),F.toolNames=[],F.hasThinking=!1,F.pendingTextPreview="";continue}continue}if(f.type==="response_item"){let m=P(p.type);if(m==="function_call"||m==="custom_tool_call"){let b=P(p.name);b&&F.toolNames.push(b);continue}if(m==="reasoning"){F.hasThinking=!0;continue}if(m==="message"){if(P(p.role)==="assistant"){let k=Bt(p);k&&!F.pendingTextPreview&&(F.pendingTextPreview=k.slice(0,Et))}continue}continue}}return{assistant:n,user:r,parentLinks:D}}var _o={},Be={..._o,..._u},To={gpt:Be["gpt-5.5"],o:Be.o3};function Lu(){return globalThis.__ccgaugePricing?.state}function vo(){return Lu()?.openai??Be}function Io(){return Lu()?.openaiFallback??To}var Po=/-\d{8}$/,Mo=/^(openai)\//;function Nu(e){if(!e)return{pricing:null,matchType:"none",matchedKey:null};let t=vo();if(t[e])return{pricing:t[e],matchType:"exact",matchedKey:e};let u=e.replace(Po,"");if(t[u])return{pricing:t[u],matchType:"date-stripped",matchedKey:u};let n=u.replace(Mo,"");if(t[n])return{pricing:t[n],matchType:"prefix-stripped",matchedKey:n};let r=Io(),D=e.toLowerCase();return D.startsWith("gpt-")||D==="gpt"?{pricing:r.gpt??null,matchType:"family-fallback",matchedKey:"gpt-(latest)"}:/^o\d/.test(D)?{pricing:r.o??null,matchType:"family-fallback",matchedKey:"o-(latest)"}:{pricing:null,matchType:"none",matchedKey:null}}function Oo(e){return e.replace(/\b\w/g,t=>t.toUpperCase())}var Lo={mini:"Mini",nano:"Nano",pro:"Pro",turbo:"Turbo",preview:"Preview"};function $u(e){if(!e)return"(unknown)";let t=e.replace(/^openai\//,"");return t.toLowerCase().startsWith("gpt-")?"GPT-"+t.slice(4).split("-").map(r=>Lo[r.toLowerCase()]??r).join(" "):t.toLowerCase().startsWith("o")?t.toUpperCase():Oo(t.replace(/-/g," "))}import{readFileSync as No}from"node:fs";import $o from"node:os";import Uu from"node:path";var Uo={"gpt-5.5":2.5,"gpt-5.4":2,"gpt-5.3-codex":2},jo=2;function Wo(e){return e.replace(/^openai\//,"").replace(/-\d{8}$/,"")}function Go(e){for(let t of e.split(/\r?\n/)){let u=(t.split("#")[0]??"").trim(),n=u.indexOf("=");if(n===-1||u.slice(0,n).trim()!=="service_tier")continue;let D=u.slice(n+1).trim().replace(/^['"]+|['"]+$/g,"");if(D==="fast"||D==="priority")return!0}return!1}function qo(){let e=[];return process.env.CODEX_HOME&&e.push(process.env.CODEX_HOME),e.push(Uu.join($o.homedir(),".codex")),Array.from(new Set(e))}function Ho(){for(let e of qo())try{let t=No(Uu.join(e,"config.toml"),"utf8");if(Go(t))return!0}catch{}return!1}function ju(e){return Ho()?Uo[Wo(e)]??jo:1}function Wu(e,t){return t===1?e:{input:e.input*t,output:e.output*t,cacheRead:e.cacheRead*t,cacheCreation5m:e.cacheCreation5m*t,cacheCreation1h:e.cacheCreation1h*t}}function Ko(){let e=Vo.homedir(),t=[Ve.join(e,".codex","sessions"),Ve.join(e,".codex","archived_sessions")];return process.env.CCGAUGE_CODEX_DIR&&t.push(process.env.CCGAUGE_CODEX_DIR),process.env.CODEX_HOME&&(t.push(Ve.join(process.env.CODEX_HOME,"sessions")),t.push(Ve.join(process.env.CODEX_HOME,"archived_sessions"))),Array.from(new Set(t))}function zo(e,t,u){if(!t)return le(e,null);let n=ju(u??"");return le(e,n===1?t:Wu(t,n))}var Gu={id:"codex",displayName:{en:"Codex",zh:"Codex"},shortLabel:"X",color:{fg:"#047857",bg:"#d1fae5"},logoSrc:"/codex-logo.webp",parserVersion:"codex-v6-output-excludes-readded-reasoning",capabilities:{hasCacheCreation:!1,hasReasoningTokens:!0,blockWindowMs:300*60*1e3},getDirs:Ko,shouldSkipDir:()=>!1,parseFile:Ou,resolvePricing:Nu,shortenModel:$u,costFromUsage:zo,costFootnoteKey:"cost.footnote.codex"};var qu={claude:Mu,codex:Gu},bt=["claude","codex"];function re(e){return qu[e]}function At(){return bt.map(e=>qu[e])}function Hu(e){return typeof e=="string"&&(e==="claude"||e==="codex")}import{promises as be,watch as ui}from"node:fs";import tn from"node:path";function Yo(e){let t=`${e.source}:`;return e.messageId&&e.requestId?`${t}${e.messageId}::${e.requestId}`:e.messageId?`${t}mid:${e.messageId}`:e.requestId?`${t}req:${e.requestId}`:`${t}uuid:${e.uuid}`}function Vu(e){let t=new Map;for(let u of e){let n=Yo(u),r=t.get(n);if(!r){t.set(n,u);continue}let D=u.timestamp<r.timestamp?u:r,o=D===u?r:u;t.set(n,Jo(D,o))}return Array.from(t.values())}function Jo(e,t){if(!t.toolUses?.length)return e;let u=new Set((e.toolUses??[]).map(r=>r.id)),n=t.toolUses.filter(r=>!u.has(r.id));return n.length?{...e,toolUses:[...e.toolUses??[],...n]}:e}import{promises as Ke}from"node:fs";import Rt from"node:path";import Xo from"node:os";var ze=2,Fe="default";function Zo(){return process.env.CCGAUGE_STATE_DIR?process.env.CCGAUGE_STATE_DIR:Rt.join(Xo.homedir(),".ccgauge")}function Ku(e){let t=e===Fe?`index-v${ze}.json`:`index-${e}-v${ze}.json`;return Rt.join(Zo(),"cache",t)}async function zu(e=Fe){let t=Ku(e);try{let u=await Ke.readFile(t,"utf8"),n=JSON.parse(u);return n.schemaVersion!==ze||!Array.isArray(n.files)?null:n}catch{return null}}async function Yu(e,t=Fe){let u=Ku(t),n=Rt.dirname(u);await Ke.mkdir(n,{recursive:!0});let r={schemaVersion:ze,savedAt:e.savedAt,files:e.files},D=`${u}.tmp-${process.pid}`;await Ke.writeFile(D,JSON.stringify(r)),await Ke.rename(D,u)}var Ju=/[\\/]([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})[\\/]subagents[\\/](?:[^\\/]+[\\/])*agent-[^\\/]+\.jsonl$/i,Qo=/[\\/]subagents[\\/]workflows[\\/]/i;function ei(e){let t=Ju.exec(e);return t?t[1]:null}function Xu(e){return Ju.test(e)?Qo.test(e)?"workflow":"task":null}function Zu({assistantRecords:e,userRecords:t,parentMap:u}){let n=new Map;for(let o of e){if(o.isSidechain||!o.sessionId)continue;let i=n.get(o.sessionId);i||(i=[],n.set(o.sessionId,i)),i.push(o)}for(let o of n.values())o.sort((i,s)=>i.timestamp<s.timestamp?-1:i.timestamp>s.timestamp?1:0);let r=new Map;for(let o of t){if(!o.isSidechain)continue;let i=r.get(o.filePath);(!i||o.timestamp<i.timestamp)&&r.set(o.filePath,o)}let D={subagentFiles:0,relinked:0,orphans:0,alreadyLinked:0};for(let[o,i]of r){let s=ei(o);if(!s)continue;D.subagentFiles+=1;let a=u[i.uuid];if(a!=null){D.alreadyLinked+=1;continue}let l=n.get(s);if(!l||l.length===0){D.orphans+=1;continue}let c=i.timestamp,h;for(let d=l.length-1;d>=0;d-=1)if(l[d].timestamp<=c){h=l[d];break}h||(h=l[0]),u[i.uuid]=h.uuid,D.relinked+=1}return D}import{homedir as ti}from"node:os";function Qu(e){let t=ti();if(!t)return e;let u=new Set([t]);process.platform==="win32"&&(u.add(t.replace(/\\/g,"/")),u.add(t.replace(/\\/g,"\\\\")),u.add("\\\\?\\"+t),u.add("\\\\?\\"+t.replace(/\\/g,"/")));let n=e;for(let r of u){let D=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n=n.replace(new RegExp(D,"g"),"~")}return n}var ni=200,ri=100,Di=3e4,oi=2e3,ii=8,yt=20,xt=class{cacheName;files=new Map;snapshot=null;watchers=new Map;pollTimer=null;snapshotRebuildTimer=null;persistTimer=null;fileDebouncers=new Map;initPromise=null;isIndexing=!1;lastIndexedAt=null;indexDurationMs=null;existingDirs=[];dirToProvider=new Map;errors=[];loadedFromDisk=!1;lastWorkStart=null;rescanPromise=null;mutationTail=Promise.resolve();constructor(t=Fe){this.cacheName=t}runExclusive(t){let u=this.mutationTail.then(t,t);return this.mutationTail=u.then(()=>{},()=>{}),u}init(){return this.initPromise||(this.initPromise=this.doInit()),this.initPromise}async doInit(){let t=Date.now();this.isIndexing=!0,this.lastWorkStart=t;try{await this.detectProviderDirs();let u=await zu(this.cacheName);this.loadedFromDisk=u!==null;let n=new Map;if(u)for(let r of u.files)n.set(r.filePath,r);await this.runExclusive(async()=>{await this.fullScan(n),this.rebuildSnapshotNow(),this.indexDurationMs=Date.now()-t,this.lastIndexedAt=new Date().toISOString(),this.schedulePersist()}),this.syncWatchersToDirs(),this.setupPolling()}finally{this.isIndexing=!1}}async detectProviderDirs(){let t=new Map,u=[];for(let D of At())for(let o of D.getDirs())await si(o)&&(t.has(o)||(t.set(o,D),u.push(o)));let n=[],r=[];for(let D of t.keys())this.dirToProvider.has(D)||n.push(D);for(let D of this.dirToProvider.keys())t.has(D)||r.push(D);return this.dirToProvider=t,this.existingDirs=u,{added:n,removed:r}}async fullScan(t){let u=[];for(let[r,D]of this.dirToProvider){let o=await en(r,D);for(let i of o)u.push({file:i,provider:D})}let n=new Set(u.map(r=>r.file));await Promise.all(u.map(async({file:r,provider:D})=>{try{let o=await be.stat(r),i=t.get(r);if(i&&i.source===D.id&&i.parserVersion===D.parserVersion&&i.mtimeMs===o.mtimeMs&&i.size===o.size){this.files.set(r,{source:D.id,parserVersion:D.parserVersion,mtimeMs:o.mtimeMs,size:o.size,assistantRecords:i.assistantRecords,userRecords:i.userRecords,parentLinks:i.parentLinks});return}let s=await D.parseFile(r);this.files.set(r,{source:D.id,parserVersion:D.parserVersion,mtimeMs:o.mtimeMs,size:o.size,assistantRecords:s.assistant,userRecords:s.user,parentLinks:s.parentLinks})}catch(o){this.recordError(`parse ${r}: ${o.message}`)}}));for(let r of Array.from(this.files.keys()))n.has(r)||this.files.delete(r)}syncWatchersToDirs(){for(let[t,u]of this.watchers)if(!this.dirToProvider.has(t)){try{u.close()}catch{}this.watchers.delete(t)}for(let[t,u]of this.dirToProvider)if(!this.watchers.has(t))try{let n=ui(t,{recursive:!0},(r,D)=>{if(!D||typeof D!="string"||!D.endsWith(".jsonl"))return;let o=tn.join(t,D);this.scheduleFileReconcile(o,u)});n.on("error",r=>{this.recordError(`watcher ${t}: ${r.message}`)}),this.watchers.set(t,n)}catch(n){this.recordError(`watch ${t}: ${n.message}`)}}setupPolling(){this.pollTimer&&clearInterval(this.pollTimer);let t=this.cacheName==="mcp",u=process.env.CCGAUGE_POLL_FALLBACK;(u==="1"||u!=="0"&&!t)&&(this.pollTimer=setInterval(()=>{this.pollOnce().catch(r=>this.recordError(`poll: ${r.message}`))},Di),this.pollTimer.unref?.())}async pollOnce(){await this.runExclusive(async()=>{let t=Date.now(),u=await this.detectProviderDirs(),n=u.added.length>0||u.removed.length>0;n&&this.syncWatchersToDirs();let r=[];for(let[o,i]of this.dirToProvider){let s=await en(o,i);for(let a of s)r.push({file:a,provider:i})}let D=new Set(r.map(o=>o.file));await Promise.all(r.map(async({file:o,provider:i})=>{try{let s=await be.stat(o),a=this.files.get(o);if(a&&a.mtimeMs===s.mtimeMs&&a.size===s.size)return;let l=await i.parseFile(o);this.files.set(o,{source:i.id,parserVersion:i.parserVersion,mtimeMs:s.mtimeMs,size:s.size,assistantRecords:l.assistant,userRecords:l.user,parentLinks:l.parentLinks}),n=!0}catch(s){this.recordError(`poll-parse ${o}: ${s.message}`)}}));for(let o of Array.from(this.files.keys()))D.has(o)||(this.files.delete(o),n=!0);n&&(this.lastWorkStart=t,this.scheduleSnapshotRebuild(),this.schedulePersist())})}scheduleFileReconcile(t,u){let n=this.fileDebouncers.get(t);n&&clearTimeout(n);let r=setTimeout(()=>{this.fileDebouncers.delete(t),this.reconcileFile(t,u).catch(D=>this.recordError(`reconcile ${t}: ${D.message}`))},ni);r.unref?.(),this.fileDebouncers.set(t,r)}async reconcileFile(t,u){await this.runExclusive(async()=>{let n=Date.now(),r=null;try{r=await be.stat(t)}catch{}if(!r||!r.isFile()){this.files.has(t)&&(this.files.delete(t),this.lastWorkStart=n,this.scheduleSnapshotRebuild(),this.schedulePersist());return}let D=this.files.get(t);if(!(D&&D.mtimeMs===r.mtimeMs&&D.size===r.size))try{let o=await u.parseFile(t);this.files.set(t,{source:u.id,parserVersion:u.parserVersion,mtimeMs:r.mtimeMs,size:r.size,assistantRecords:o.assistant,userRecords:o.user,parentLinks:o.parentLinks}),this.lastWorkStart=n,this.scheduleSnapshotRebuild(),this.schedulePersist()}catch(o){this.recordError(`parse ${t}: ${o.message}`)}})}scheduleSnapshotRebuild(){this.snapshotRebuildTimer&&clearTimeout(this.snapshotRebuildTimer),this.snapshotRebuildTimer=setTimeout(()=>{this.snapshotRebuildTimer=null,this.rebuildSnapshotNow()},ri),this.snapshotRebuildTimer.unref?.()}rebuildSnapshotNow(){let t=Date.now(),u=this.lastWorkStart??t,n=[],r=[],D={},o=0,i={claude:{source:"claude",filesScanned:0,recordsParsed:0,assistantRecords:0,scannedDirs:[]},codex:{source:"codex",filesScanned:0,recordsParsed:0,assistantRecords:0,scannedDirs:[]}};for(let[c,h]of this.dirToProvider)i[h.id].scannedDirs.push(c);for(let c of this.files.values()){n.push(...c.assistantRecords),r.push(...c.userRecords);for(let[h,d]of c.parentLinks)D[h]=d;o+=c.assistantRecords.length+c.userRecords.length,i[c.source].filesScanned+=1,i[c.source].recordsParsed+=c.assistantRecords.length+c.userRecords.length}let s=Vu(n).sort((c,h)=>c.timestamp.localeCompare(h.timestamp)),a=ai(r).sort((c,h)=>c.timestamp.localeCompare(h.timestamp));Zu({assistantRecords:s,userRecords:a,parentMap:D});for(let c of s)c.isSidechain&&(c.isWorkflowSubagent=Xu(c.filePath)==="workflow");for(let c of s)i[c.source].assistantRecords+=1;let l={filesScanned:this.files.size,recordsParsed:o,assistantRecords:s.length,durationMs:Date.now()-u,scannedDirs:this.existingDirs};this.snapshot={records:s,userRecords:a,parentMap:D,stats:l,bySource:Object.values(i)},this.lastWorkStart=null}getSnapshot(){if(!this.snapshot)throw new Error("Indexer not initialized \u2014 call init() first.");return this.snapshot}async forceRescan(){let t=!this.initPromise;if(await this.init(),t)return this.snapshot;if(this.rescanPromise)return this.rescanPromise;this.rescanPromise=this.runRescan();try{return await this.rescanPromise}finally{this.rescanPromise=null}}async runRescan(){this.isIndexing=!0;try{return await this.runExclusive(async()=>{let t=Date.now();return this.lastWorkStart=t,this.snapshotRebuildTimer&&(clearTimeout(this.snapshotRebuildTimer),this.snapshotRebuildTimer=null),this.persistTimer&&(clearTimeout(this.persistTimer),this.persistTimer=null),this.files.clear(),await this.detectProviderDirs(),await this.fullScan(new Map),this.rebuildSnapshotNow(),this.indexDurationMs=Date.now()-t,this.lastIndexedAt=new Date().toISOString(),this.syncWatchersToDirs(),this.schedulePersist(),this.snapshot})}finally{this.isIndexing=!1}}getStatus(){let t=this.snapshot;return{initialized:t!==null,isIndexing:this.isIndexing,lastIndexedAt:this.lastIndexedAt,indexDurationMs:this.indexDurationMs,filesIndexed:this.files.size,recordsIndexed:t?.stats.assistantRecords??0,bySource:t?.bySource??[],watchers:this.watchers.size,errors:this.errors.slice(-yt),pendingReconciles:this.fileDebouncers.size,loadedFromDisk:this.loadedFromDisk}}schedulePersist(){this.persistTimer&&clearTimeout(this.persistTimer),this.persistTimer=setTimeout(()=>{this.persistTimer=null;let t=[];for(let[u,n]of this.files)t.push({filePath:u,source:n.source,parserVersion:n.parserVersion,mtimeMs:n.mtimeMs,size:n.size,assistantRecords:n.assistantRecords,userRecords:n.userRecords,parentLinks:n.parentLinks});Yu({savedAt:new Date().toISOString(),files:t},this.cacheName).catch(u=>this.recordError(`persist: ${u.message}`))},oi),this.persistTimer.unref?.()}recordError(t){let u=`${new Date().toISOString()} ${Qu(t)}`;this.errors.push(u),this.errors.length>yt*2&&this.errors.splice(0,this.errors.length-yt),process.env.CCGAUGE_DEBUG&&console.error(`[ccgauge:indexer] ${new Date().toISOString()} ${t}`)}disposeWatchers(){for(let t of this.watchers.values())try{t.close()}catch{}this.watchers.clear()}dispose(){this.disposeWatchers(),this.pollTimer&&clearInterval(this.pollTimer),this.snapshotRebuildTimer&&clearTimeout(this.snapshotRebuildTimer),this.persistTimer&&clearTimeout(this.persistTimer);for(let t of this.fileDebouncers.values())clearTimeout(t);this.fileDebouncers.clear()}};async function si(e){try{return(await be.stat(e)).isDirectory()}catch{return!1}}async function en(e,t){let u=[];async function n(r,D){if(D>ii)return;let o;try{o=await be.readdir(r,{withFileTypes:!0})}catch{return}for(let i of o){let s=tn.join(r,i.name);if(i.isDirectory()){if(t.shouldSkipDir(i.name))continue;await n(s,D+1)}else i.isFile()&&i.name.endsWith(".jsonl")&&u.push(s)}}return await n(e,0),u}function ai(e){let t=new Set;return e.filter(u=>{let n=u.uuid;return n?t.has(n)?!1:(t.add(n),!0):!0})}function ci(){return globalThis.__ccgaugeIndexers||(globalThis.__ccgaugeIndexers=new Map),globalThis.__ccgaugeIndexers}function un(e=Fe){let t=ci(),u=t.get(e);return u||(u=new xt(e),t.set(e,u)),u}async function nn(e={}){let t=un();return e.force?t.forceRescan():(await t.init(),t.getSnapshot())}function De(e){let t=re(e.source),{pricing:u}=t.resolvePricing(e.model);return t.costFromUsage(e.usage,u,e.model)}function rn(e,t){return new Intl.NumberFormat("en-US",{maximumFractionDigits:t?.maxFrac??0}).format(e)}function v(e,t="en"){return Number.isFinite(e)?t==="zh"?e>=1e8?(e/1e8).toFixed(2)+"\u4EBF":e>=1e4?(e/1e4).toFixed(1)+"\u4E07":rn(e):e>=1e9?(e/1e9).toFixed(2)+"B":e>=1e6?(e/1e6).toFixed(2)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":rn(e):"0"}function N(e,t){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:t?.minFrac??2,maximumFractionDigits:t?.maxFrac??2}).format(e)}function de(e,t=1){return Number.isFinite(e)?`${(e*100).toFixed(t)}%`:"0%"}function Dn(e){if(e<1e3)return`${e}ms`;let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let u=Math.floor(t/60);if(u<60){let D=t%60;return D?`${u}m ${D}s`:`${u}m`}let n=Math.floor(u/60),r=u%60;return r?`${n}h ${r}m`:`${n}h`}function Ae(e){if(!e)return"(unknown)";let u=e.replace(/[/\\]+$/,"").split(/[/\\]+/);return u[u.length-1]||e}import{readFileSync as li,statSync as Fi}from"node:fs";import{basename as on}from"node:path";var sn=new Map,di=/^(.+?)[/\\]\.git[/\\]worktrees[/\\]([^/\\]+)[/\\]?$/,hi=/^(.+?)[/\\](?:\.git|\.claude)[/\\]worktrees[/\\]([^/\\]+)(?:[/\\].*)?$/;function pi(e){let t=Ae(e);if(!e)return{label:t,isWorktree:!1,mainName:t,worktreeName:"",canonicalCwd:e};let u=hi.exec(e);if(u){let n=u[1],r=u[2],D=on(n)||n;return{label:`${D} (${r})`,isWorktree:!0,mainName:D,worktreeName:r,canonicalCwd:n}}try{let n=`${e}/.git`;if(!Fi(n).isFile())return{label:t,isWorktree:!1,mainName:t,worktreeName:"",canonicalCwd:e};let o=li(n,"utf8").trim().split(/\r?\n/,1)[0]??"",i=/^gitdir:\s*(.+)$/.exec(o);if(!i)return{label:t,isWorktree:!1,mainName:t,worktreeName:"",canonicalCwd:e};let s=i[1].trim(),a=di.exec(s);if(!a)return{label:t,isWorktree:!1,mainName:t,worktreeName:"",canonicalCwd:e};let l=a[1],c=a[2],h=on(l)||l;return{label:`${h} (${c})`,isWorktree:!0,mainName:h,worktreeName:c,canonicalCwd:l}}catch{return{label:t,isWorktree:!1,mainName:t,worktreeName:"",canonicalCwd:e}}}function an(e){let t=sn.get(e);if(t)return t.label;let u=pi(e);return sn.set(e,u),u.label}var fi=["hour","day","week","month"];function cn(e){return typeof e=="string"&&fi.includes(e)}function wt(e,t){let u=new Date(e),n=u.getFullYear(),r=String(u.getMonth()+1).padStart(2,"0"),D=String(u.getDate()).padStart(2,"0"),o=String(u.getHours()).padStart(2,"0");if(t==="hour")return{key:`${n}-${r}-${D}T${o}`,label:`${r}/${D} ${o}:00`};if(t==="day")return{key:`${n}-${r}-${D}`,label:`${r}/${D}`};if(t==="week"){let i=new Date(u),s=i.getDay()||7;i.setDate(i.getDate()-s+1);let a=String(i.getMonth()+1).padStart(2,"0"),l=String(i.getDate()).padStart(2,"0");return{key:`${i.getFullYear()}-W${a}${l}`,label:`Wk ${a}/${l}`}}return{key:`${n}-${r}`,label:`${n}-${r}`}}function Re(e){return{source:e.source,fromIso:e.from?.toISOString(),toIso:e.to?.toISOString(),models:e.models&&e.models.length?new Set(e.models):void 0,projects:e.projects&&e.projects.length?new Set(e.projects):void 0}}function ye(e,t){return!(e.source!==t.source||t.fromIso&&e.timestamp<t.fromIso||t.toIso&&e.timestamp>t.toIso||t.models&&!t.models.has(e.model)||t.projects&&!t.projects.has(e.cwd))}function ln(e,t,u){let n=new Map,r=Re(u);for(let D of e){if(!ye(D,r))continue;let{key:o,label:i}=wt(D.timestamp,t),s=n.get(o);s||(s=Ci(o,i),n.set(o,s)),gi(s,D)}return Array.from(n.values()).sort((D,o)=>D.key.localeCompare(o.key))}function Ci(e,t){return{key:e,label:t,inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,totalTokens:0,cost:0,saved:0,requests:0,models:{}}}function gi(e,t){let u=De(t);e.inputTokens+=t.usage.input_tokens,e.outputTokens+=t.usage.output_tokens,e.cacheReadTokens+=t.usage.cache_read_input_tokens,e.cacheCreationTokens+=t.usage.cache_creation_input_tokens,e.totalTokens=e.inputTokens+e.outputTokens+e.cacheReadTokens+e.cacheCreationTokens,e.cost+=u.total,e.saved+=u.saved,e.requests+=1;let n=e.models[t.model]??{tokens:0,cost:0,requests:0};n.tokens+=t.usage.input_tokens+t.usage.output_tokens+t.usage.cache_read_input_tokens+t.usage.cache_creation_input_tokens,n.cost+=u.total,n.requests+=1,e.models[t.model]=n}function Fn(e,t){let u=new Map,n=Re(t);for(let r of e){if(!ye(r,n))continue;let D=u.get(r.model);if(!D){let{pricing:i,matchType:s}=re(r.source).resolvePricing(r.model);D={model:r.model,source:r.source,requests:0,inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,totalTokens:0,cost:0,saved:0,pricing:i,pricingResolved:s==="exact"||s==="date-stripped"||s==="prefix-stripped"},u.set(r.model,D)}let o=De(r);D.requests+=1,D.inputTokens+=r.usage.input_tokens,D.outputTokens+=r.usage.output_tokens,D.cacheReadTokens+=r.usage.cache_read_input_tokens,D.cacheCreationTokens+=r.usage.cache_creation_input_tokens,D.totalTokens=D.inputTokens+D.outputTokens+D.cacheReadTokens+D.cacheCreationTokens,D.cost+=o.total,D.saved+=o.saved}return Array.from(u.values()).sort((r,D)=>D.cost-r.cost)}function dn(e,t){let u=new Map,n=new Map,r=Re(t);for(let D of e){if(!ye(D,r))continue;let o=D.cwd||"(unknown)",i=u.get(o);i||(i={source:t.source,cwd:o,projectName:Ae(o),sessions:0,requests:0,inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,totalTokens:0,cost:0,saved:0,firstActivity:D.timestamp,lastActivity:D.timestamp,models:[]},u.set(o,i),n.set(o,new Set)),n.get(o).add(D.sessionId);let s=De(D);i.requests+=1,i.inputTokens+=D.usage.input_tokens,i.outputTokens+=D.usage.output_tokens,i.cacheReadTokens+=D.usage.cache_read_input_tokens,i.cacheCreationTokens+=D.usage.cache_creation_input_tokens,i.totalTokens=i.inputTokens+i.outputTokens+i.cacheReadTokens+i.cacheCreationTokens,i.cost+=s.total,i.saved+=s.saved,D.timestamp<i.firstActivity&&(i.firstActivity=D.timestamp),D.timestamp>i.lastActivity&&(i.lastActivity=D.timestamp),i.models.includes(D.model)||i.models.push(D.model)}for(let[D,o]of n){let i=u.get(D);i.sessions=o.size}return Array.from(u.values()).sort((D,o)=>o.cost-D.cost)}function hn(e,t,u){let n=new Map,r=Re(u);for(let o of e){if(!ye(o,r))continue;let i=o.sessionId||o.uuid,s=n.get(i);s||(s={sessionId:i,source:o.source,cwd:o.cwd,projectName:Ae(o.cwd),projectLabel:an(o.cwd),startTime:o.timestamp,endTime:o.timestamp,durationMs:0,requests:0,inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,totalTokens:0,cost:0,saved:0,models:[],modelBreakdown:{}},n.set(i,s));let a=De(o);s.requests+=1,s.inputTokens+=o.usage.input_tokens,s.outputTokens+=o.usage.output_tokens,s.cacheReadTokens+=o.usage.cache_read_input_tokens,s.cacheCreationTokens+=o.usage.cache_creation_input_tokens,s.totalTokens=s.inputTokens+s.outputTokens+s.cacheReadTokens+s.cacheCreationTokens,s.cost+=a.total,s.saved+=a.saved,o.timestamp<s.startTime&&(s.startTime=o.timestamp),o.timestamp>s.endTime&&(s.endTime=o.timestamp),s.models.includes(o.model)||s.models.push(o.model);let l=s.modelBreakdown[o.model]??{tokens:0,cost:0,requests:0};l.tokens+=o.usage.input_tokens+o.usage.output_tokens+o.usage.cache_read_input_tokens+o.usage.cache_creation_input_tokens,l.cost+=a.total,l.requests+=1,s.modelBreakdown[o.model]=l}let D=new Map;for(let o of t){let i=D.get(o.sessionId);(!i||o.timestamp<i.timestamp)&&D.set(o.sessionId,o)}for(let o of n.values()){o.durationMs=Math.max(0,new Date(o.endTime).getTime()-new Date(o.startTime).getTime());let i=D.get(o.sessionId);i&&i.textPreview&&(o.firstUserMessage=i.textPreview,o.title=i.textPreview.slice(0,80))}return Array.from(n.values()).sort((o,i)=>i.endTime.localeCompare(o.endTime))}function pn(e,t){let u=0,n=0,r=0,D=0,o=0,i=0,s=0,a=Re(t);for(let l of e){if(!ye(l,a))continue;let c=De(l);u+=l.usage.input_tokens,n+=l.usage.output_tokens,r+=l.usage.cache_read_input_tokens,D+=l.usage.cache_creation_input_tokens,o+=c.total,i+=c.saved,s+=1}return{inputTokens:u,outputTokens:n,cacheReadTokens:r,cacheCreationTokens:D,totalTokens:u+n+r+D,cost:o,saved:i,requests:s}}var mi=["1d","7d","30d","90d","all","custom"];function fn(e){return typeof e=="string"&&mi.includes(e)}function Cn(e){let t=new Date;if(e==="all"||e==="custom")return{};if(e==="1d")return{from:new Date(t.getFullYear(),t.getMonth(),t.getDate())};let u=e.match(/^(\d+)([dwm])$/);if(!u)return{};let n=parseInt(u[1],10),r=u[2],D=new Date(t);return r==="d"?D.setDate(D.getDate()-n):r==="w"?D.setDate(D.getDate()-n*7):r==="m"&&D.setMonth(D.getMonth()-n),{from:D}}import{promises as z0,readFileSync as Bi}from"node:fs";import En from"node:path";import bi from"node:os";var Ei=["input","output","cacheCreation5m","cacheCreation1h","cacheRead"];function gn(e){if(!e||typeof e!="object")return!1;for(let t of Ei){let u=e[t];if(typeof u!="number"||!Number.isFinite(u)||u<0)return!1}return!0}function mn(e,t,u={}){let n=u.minClaude??15,r=u.minOpenai??80;if(!e||typeof e!="object")return"claude table missing";if(!t||typeof t!="object")return"openai table missing";let D=Object.keys(e),o=Object.keys(t);if(D.length<n)return`claude count ${D.length} < ${n}`;if(o.length<r)return`openai count ${o.length} < ${r}`;if(!D.some(i=>i.startsWith("claude-")))return"no claude-* key";if(!o.some(i=>i.startsWith("gpt-")))return"no gpt-* key";for(let[i,s]of Object.entries(e))if(!gn(s))return`bad claude entry ${i}`;for(let[i,s]of Object.entries(t))if(!gn(s))return`bad openai entry ${i}`;return null}function kt(e,t){return t?{...e,...t}:{...e}}function St(e,t){let u={};for(let[n,r]of Object.entries(t))e[r]&&(u[n]=e[r]);return u}var Ai=1,Ri="litellm-pricing.json",tF=1440*60*1e3;var yi=15,xi=80,wi={fable:"claude-fable-5",opus:"claude-opus-4-8",sonnet:"claude-sonnet-4-6",haiku:"claude-haiku-4-5"},ki={gpt:"gpt-5.5",o:"o3"};function Si(){return process.env.CCGAUGE_STATE_DIR?process.env.CCGAUGE_STATE_DIR:En.join(bi.homedir(),".ccgauge")}function _i(){return En.join(Si(),"cache",Ri)}function Ti(){let e=globalThis;return e.__ccgaugePricing||(e.__ccgaugePricing={state:null,inflight:null}),e.__ccgaugePricing}function vi(e,t){return mn(e,t,{minClaude:yi,minOpenai:xi})}function Ii(e){let t=kt(ue,e?.claude),u=kt(Be,e?.openai);return{claude:t,openai:u,claudeFallback:St(t,wi),openaiFallback:St(u,ki),source:e?"cache":"builtin",fetchedAt:e?.fetchedAt??null}}function Pi(e){try{let t=JSON.parse(e);return!t||t.version!==Ai||typeof t.fetchedAt!="string"||!t.claude||!t.openai||vi(t.claude,t.openai)?null:t}catch{return null}}function Mi(){try{return Pi(Bi(_i(),"utf8"))}catch{return null}}function Oi(){let e=Ti();return e.state||(e.state=Ii(Mi())),e.state}function Bn(){Oi()}function Li(e,t,u){let n=new Map;for(let i of t)i.isSynthetic||i.textPreview&&i.textPreview.trim()&&n.set(i.uuid,i.textPreview);let r=new Map,D=new Map;function o(i){let s=[],a=i,l=null,c=0,h=new Set;for(;a&&c++<5e3&&!h.has(a);){h.add(a);let d=D.get(a);if(d){l=d;break}if(s.push(a),n.has(a)){l=a;break}a=u[a]??null}l||(l=i);for(let d of s)D.set(d,l);return l}for(let i of e)r.set(i.uuid,o(i.uuid));return r}function xe(e,t,u){let n=Li(e,t,u),r=new Map;for(let D of e){let o=n.get(D.uuid)??D.uuid,i=r.get(o);(!i||D.timestamp<i.firstTimestamp)&&r.set(o,{turnId:o,firstTimestamp:D.timestamp,firstModel:D.model,cwd:D.cwd,sessionId:D.sessionId,source:D.source})}return r}import nt from"node:process";function _t({onlyFirst:e=!1}={}){let r="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(r,e?void 0:"g")}var Ni=_t();function K(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes("\x1B")&&!e.includes("\x9B")?e:e.replace(Ni,"")}var bn=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],An=12288,Rn=65510,yn=[12288,12288,65281,65376,65504,65510];var xn=4352,wn=262141,Tt=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];var Ye=(e,t)=>{let u=0,n=Math.floor(e.length/2)-1;for(;u<=n;){let r=Math.floor((u+n)/2),D=r*2;if(t<e[D])n=r-1;else if(t>e[D+1])u=r+1;else return!0}return!1};var kn=19968,[ji,Wi]=Gi(Tt);function Gi(e){let t=e[0],u=e[1];for(let n=0;n<e.length;n+=2){let r=e[n],D=e[n+1];if(kn>=r&&kn<=D)return[r,D];D-r>u-t&&(t=r,u=D)}return[t,u]}var Sn=e=>e<161||e>1114109?!1:Ye(bn,e),we=e=>e<An||e>Rn?!1:Ye(yn,e);var ke=e=>e>=ji&&e<=Wi?!0:e<xn||e>wn?!1:Ye(Tt,e);function qi(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function z(e,{ambiguousAsWide:t=!1}={}){return qi(e),we(e)||ke(e)||t&&Sn(e)?2:1}var vn=ce(Tn(),1),Hi=new Intl.Segmenter,Vi=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function M(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:u=!0,countAnsiEscapeCodes:n=!1}=t;if(n||(e=K(e)),e.length===0)return 0;let r=0,D={ambiguousAsWide:!u};for(let{segment:o}of Hi.segment(e)){let i=o.codePointAt(0);if(!(i<=31||i>=127&&i<=159)&&!(i>=8203&&i<=8207||i===65279)&&!(i>=768&&i<=879||i>=6832&&i<=6911||i>=7616&&i<=7679||i>=8400&&i<=8447||i>=65056&&i<=65071)&&!(i>=55296&&i<=57343)&&!(i>=65024&&i<=65039)&&!Vi.test(o)){if((0,vn.default)().test(o)){r+=2;continue}r+=z(i,D)}}return r}var In=(e=0)=>t=>`\x1B[${t+e}m`,Pn=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Mn=(e=0)=>(t,u,n)=>`\x1B[${38+e};2;${t};${u};${n}m`,R={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},xF=Object.keys(R.modifier),Ki=Object.keys(R.color),zi=Object.keys(R.bgColor),wF=[...Ki,...zi];function Yi(){let e=new Map;for(let[t,u]of Object.entries(R)){for(let[n,r]of Object.entries(u))R[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},u[n]=R[n],e.set(r[0],r[1]);Object.defineProperty(R,t,{value:u,enumerable:!1})}return Object.defineProperty(R,"codes",{value:e,enumerable:!1}),R.color.close="\x1B[39m",R.bgColor.close="\x1B[49m",R.color.ansi=In(),R.color.ansi256=Pn(),R.color.ansi16m=Mn(),R.bgColor.ansi=In(10),R.bgColor.ansi256=Pn(10),R.bgColor.ansi16m=Mn(10),Object.defineProperties(R,{rgbToAnsi256:{value(t,u,n){return t===u&&u===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(u/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){let u=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!u)return[0,0,0];let[n]=u;n.length===3&&(n=[...n].map(D=>D+D).join(""));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>R.rgbToAnsi256(...R.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let u,n,r;if(t>=232)u=((t-232)*10+8)/255,n=u,r=u;else{t-=16;let i=t%36;u=Math.floor(t/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let D=Math.max(u,n,r)*2;if(D===0)return 30;let o=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(u));return D===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,u,n)=>R.ansi256ToAnsi(R.rgbToAnsi256(t,u,n)),enumerable:!1},hexToAnsi:{value:t=>R.ansi256ToAnsi(R.hexToAnsi256(t)),enumerable:!1}}),R}var Ji=Yi(),U=Ji;import vt from"node:process";import Xi from"node:os";import On from"node:tty";function $(e,t=globalThis.Deno?globalThis.Deno.args:vt.argv){let u=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(u+e),r=t.indexOf("--");return n!==-1&&(r===-1||n<r)}var{env:y}=vt,Je;$("no-color")||$("no-colors")||$("color=false")||$("color=never")?Je=0:($("color")||$("colors")||$("color=true")||$("color=always"))&&(Je=1);function Zi(){if("FORCE_COLOR"in y)return y.FORCE_COLOR==="true"?1:y.FORCE_COLOR==="false"?0:y.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(y.FORCE_COLOR,10),3)}function Qi(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function es(e,{streamIsTTY:t,sniffFlags:u=!0}={}){let n=Zi();n!==void 0&&(Je=n);let r=u?Je:n;if(r===0)return 0;if(u){if($("color=16m")||$("color=full")||$("color=truecolor"))return 3;if($("color=256"))return 2}if("TF_BUILD"in y&&"AGENT_NAME"in y)return 1;if(e&&!t&&r===void 0)return 0;let D=r||0;if(y.TERM==="dumb")return D;if(vt.platform==="win32"){let o=Xi.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in y)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in y)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in y)||y.CI_NAME==="codeship"?1:D;if("TEAMCITY_VERSION"in y)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(y.TEAMCITY_VERSION)?1:0;if(y.COLORTERM==="truecolor"||y.TERM==="xterm-kitty"||y.TERM==="xterm-ghostty"||y.TERM==="wezterm")return 3;if("TERM_PROGRAM"in y){let o=Number.parseInt((y.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(y.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(y.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(y.TERM)||"COLORTERM"in y?1:D}function Ln(e,t={}){let u=es(e,{streamIsTTY:e&&e.isTTY,...t});return Qi(u)}var ts={stdout:Ln({isTTY:On.isatty(1)}),stderr:Ln({isTTY:On.isatty(2)})},Nn=ts;function $n(e,t,u){let n=e.indexOf(t);if(n===-1)return e;let r=t.length,D=0,o="";do o+=e.slice(D,n)+t+u,D=n+r,n=e.indexOf(t,D);while(n!==-1);return o+=e.slice(D),o}function Un(e,t,u,n){let r=0,D="";do{let o=e[n-1]==="\r";D+=e.slice(r,o?n-1:n)+t+(o?`\r
9
9
  `:`
10
10
  `)+u,r=n+1,n=e.indexOf(`
11
- `,r)}while(n!==-1);return D+=e.slice(r),D}var{stdout:In,stderr:Mn}=Tn,vt=Symbol("GENERATOR"),pe=Symbol("STYLER"),Se=Symbol("IS_EMPTY"),Pn=["ansi","ansi","ansi256","ansi16m"],fe=Object.create(null),Bi=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let u=In?In.level:0;e.level=t.level===void 0?u:t.level},Je=class{constructor(t){return On(t)}},On=e=>{let t=(...u)=>u.join(" ");return Bi(t,e),Object.setPrototypeOf(t,Te.prototype),t};function Te(e){return On(e)}Object.setPrototypeOf(Te.prototype,Function.prototype);for(let[e,t]of Object.entries(W))fe[e]={get(){let u=Ze(this,Mt(t.open,t.close,this[pe]),this[Se]);return Object.defineProperty(this,e,{value:u}),u}};fe.visible={get(){let e=Ze(this,this[pe],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var It=(e,t,u,...n)=>e==="rgb"?t==="ansi16m"?W[u].ansi16m(...n):t==="ansi256"?W[u].ansi256(W.rgbToAnsi256(...n)):W[u].ansi(W.rgbToAnsi(...n)):e==="hex"?It("rgb",t,u,...W.hexToRgb(...n)):W[u][e](...n),bi=["rgb","hex","ansi256"];for(let e of bi){fe[e]={get(){let{level:u}=this;return function(...n){let r=Mt(It(e,Pn[u],"color",...n),W.color.close,this[pe]);return Ze(this,r,this[Se])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);fe[t]={get(){let{level:u}=this;return function(...n){let r=Mt(It(e,Pn[u],"bgColor",...n),W.bgColor.close,this[pe]);return Ze(this,r,this[Se])}}}}var Ai=Object.defineProperties(()=>{},{...fe,level:{enumerable:!0,get(){return this[vt].level},set(e){this[vt].level=e}}}),Mt=(e,t,u)=>{let n,r;return u===void 0?(n=e,r=t):(n=u.openAll+e,r=t+u.closeAll),{open:e,close:t,openAll:n,closeAll:r,parent:u}},Ze=(e,t,u)=>{let n=(...r)=>Ri(n,r.length===1?""+r[0]:r.join(" "));return Object.setPrototypeOf(n,Ai),n[vt]=e,n[pe]=t,n[Se]=u,n},Ri=(e,t)=>{if(e.level<=0||!t)return e[Se]?"":t;let u=e[pe];if(u===void 0)return t;let{openAll:n,closeAll:r}=u;if(t.includes("\x1B"))for(;u!==void 0;)t=_n(t,u.close,u.open),u=u.parent;let D=t.indexOf(`
12
- `);return D!==-1&&(t=vn(t,r,n,D)),n+t+r};Object.defineProperties(Te.prototype,fe);var yi=Te(),j0=Te({level:Mn?Mn.level:0});var X=yi;var $n=le(Nn(),1),xi=new Intl.Segmenter,wi=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function Pt(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:u=!0,countAnsiEscapeCodes:n=!1}=t;if(n||(e=z(e)),e.length===0)return 0;let r=0,D={ambiguousAsWide:!u};for(let{segment:o}of xi.segment(e)){let i=o.codePointAt(0);if(!(i<=31||i>=127&&i<=159)&&!(i>=8203&&i<=8207||i===65279)&&!(i>=768&&i<=879||i>=6832&&i<=6911||i>=7616&&i<=7679||i>=8400&&i<=8447||i>=65056&&i<=65071)&&!(i>=55296&&i<=57343)&&!(i>=65024&&i<=65039)&&!wi.test(o)){if((0,$n.default)().test(o)){r+=2;continue}r+=Y(i,D)}}return r}function Qe(e){let t=0;for(let u of e.split(`
13
- `))t=Math.max(t,Pt(u));return t}var Fr=le(Lt(),1);var Si=/[\p{Lu}]/u,Ti=/[\p{Ll}]/u,jn=/^[\p{Lu}](?![\p{Lu}])/gu,Hn=/([\p{Alpha}\p{N}_]|$)/u,Nt=/[_.\- ]+/,_i=new RegExp("^"+Nt.source),Gn=new RegExp(Nt.source+Hn.source,"gu"),qn=new RegExp("\\d+"+Hn.source,"gu"),vi=(e,t,u,n)=>{let r=!1,D=!1,o=!1,i=!1;for(let s=0;s<e.length;s++){let a=e[s];i=s>2?e[s-3]==="-":!0,r&&Si.test(a)?(e=e.slice(0,s)+"-"+e.slice(s),r=!1,o=D,D=!0,s++):D&&o&&Ti.test(a)&&(!i||n)?(e=e.slice(0,s-1)+"-"+e.slice(s-1),o=D,D=!1,r=!0):(r=t(a)===a&&u(a)!==a,o=D,D=u(a)===a&&t(a)!==a)}return e},Ii=(e,t)=>(jn.lastIndex=0,e.replaceAll(jn,u=>t(u))),Mi=(e,t)=>(Gn.lastIndex=0,qn.lastIndex=0,e.replaceAll(qn,(u,n,r)=>["_","-"].includes(e.charAt(r+u.length))?u:t(u)).replaceAll(Gn,(u,n)=>t(n)));function $t(e,t){if(!(typeof e=="string"||Array.isArray(e)))throw new TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,...t},Array.isArray(e)?e=e.map(D=>D.trim()).filter(D=>D.length).join("-"):e=e.trim(),e.length===0)return"";let u=t.locale===!1?D=>D.toLowerCase():D=>D.toLocaleLowerCase(t.locale),n=t.locale===!1?D=>D.toUpperCase():D=>D.toLocaleUpperCase(t.locale);return e.length===1?Nt.test(e)?"":t.pascalCase?n(e):u(e):(e!==u(e)&&(e=vi(e,u,n,t.preserveConsecutiveUppercase)),e=e.replace(_i,""),e=t.preserveConsecutiveUppercase?Ii(e,u):u(e),t.pascalCase&&(e=n(e.charAt(0))+e.slice(1)),Mi(e,n))}var Kt=le(er(),1);var tr=(e=0)=>t=>`\x1B[${t+e}m`,ur=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,nr=(e=0)=>(t,u,n)=>`\x1B[${38+e};2;${t};${u};${n}m`,x={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},DF=Object.keys(x.modifier),ji=Object.keys(x.color),Gi=Object.keys(x.bgColor),oF=[...ji,...Gi];function qi(){let e=new Map;for(let[t,u]of Object.entries(x)){for(let[n,r]of Object.entries(u))x[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},u[n]=x[n],e.set(r[0],r[1]);Object.defineProperty(x,t,{value:u,enumerable:!1})}return Object.defineProperty(x,"codes",{value:e,enumerable:!1}),x.color.close="\x1B[39m",x.bgColor.close="\x1B[49m",x.color.ansi=tr(),x.color.ansi256=ur(),x.color.ansi16m=nr(),x.bgColor.ansi=tr(10),x.bgColor.ansi256=ur(10),x.bgColor.ansi16m=nr(10),Object.defineProperties(x,{rgbToAnsi256:{value(t,u,n){return t===u&&u===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(u/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){let u=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!u)return[0,0,0];let[n]=u;n.length===3&&(n=[...n].map(D=>D+D).join(""));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>x.rgbToAnsi256(...x.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let u,n,r;if(t>=232)u=((t-232)*10+8)/255,n=u,r=u;else{t-=16;let i=t%36;u=Math.floor(t/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let D=Math.max(u,n,r)*2;if(D===0)return 30;let o=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(u));return D===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,u,n)=>x.ansi256ToAnsi(x.rgbToAnsi256(t,u,n)),enumerable:!1},hexToAnsi:{value:t=>x.ansi256ToAnsi(x.hexToAnsi256(t)),enumerable:!1}}),x}var Hi=qi(),rr=Hi;var tt=new Set(["\x1B","\x9B"]),Vi=39,Vt="\x07",ir="[",Ki="]",sr="m",et=`${Ki}8;;`,Dr=e=>`${tt.values().next().value}${ir}${e}${sr}`,or=e=>`${tt.values().next().value}${et}${e}${Vt}`,zi=e=>e.split(" ").map(t=>P(t)),Ht=(e,t,u)=>{let n=[...t],r=!1,D=!1,o=P(z(e.at(-1)));for(let[i,s]of n.entries()){let a=P(s);if(o+a<=u?e[e.length-1]+=s:(e.push(s),o=0),tt.has(s)&&(r=!0,D=n.slice(i+1,i+1+et.length).join("")===et),r){D?s===Vt&&(r=!1,D=!1):s===sr&&(r=!1);continue}o+=a,o===u&&i<n.length-1&&(e.push(""),o=0)}!o&&e.at(-1).length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Yi=e=>{let t=e.split(" "),u=t.length;for(;u>0&&!(P(t[u-1])>0);)u--;return u===t.length?e:t.slice(0,u).join(" ")+t.slice(u).join("")},Xi=(e,t,u={})=>{if(u.trim!==!1&&e.trim()==="")return"";let n="",r,D,o=zi(e),i=[""];for(let[c,h]of e.split(" ").entries()){u.trim!==!1&&(i[i.length-1]=i.at(-1).trimStart());let d=P(i.at(-1));if(c!==0&&(d>=t&&(u.wordWrap===!1||u.trim===!1)&&(i.push(""),d=0),(d>0||u.trim===!1)&&(i[i.length-1]+=" ",d++)),u.hard&&o[c]>t){let l=t-d,C=1+Math.floor((o[c]-l-1)/t);Math.floor((o[c]-1)/t)<C&&i.push(""),Ht(i,h,t);continue}if(d+o[c]>t&&d>0&&o[c]>0){if(u.wordWrap===!1&&d<t){Ht(i,h,t);continue}i.push("")}if(d+o[c]>t&&u.wordWrap===!1){Ht(i,h,t);continue}i[i.length-1]+=h}u.trim!==!1&&(i=i.map(c=>Yi(c)));let s=i.join(`
14
- `),a=[...s],F=0;for(let[c,h]of a.entries()){if(n+=h,tt.has(h)){let{groups:l}=new RegExp(`(?:\\${ir}(?<code>\\d+)m|\\${et}(?<uri>.*)${Vt})`).exec(s.slice(F))||{groups:{}};if(l.code!==void 0){let C=Number.parseFloat(l.code);r=C===Vi?void 0:C}else l.uri!==void 0&&(D=l.uri.length===0?void 0:l.uri)}let d=rr.codes.get(Number(r));a[c+1]===`
15
- `?(D&&(n+=or("")),r&&d&&(n+=Dr(d))):h===`
16
- `&&(r&&d&&(n+=Dr(r)),D&&(n+=or(D))),F+=h.length}return n};function ut(e,t,u){return String(e).normalize().replaceAll(`\r
11
+ `,r)}while(n!==-1);return D+=e.slice(r),D}var{stdout:jn,stderr:Wn}=Nn,It=Symbol("GENERATOR"),he=Symbol("STYLER"),Se=Symbol("IS_EMPTY"),Gn=["ansi","ansi","ansi256","ansi16m"],pe=Object.create(null),us=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let u=jn?jn.level:0;e.level=t.level===void 0?u:t.level},Xe=class{constructor(t){return qn(t)}},qn=e=>{let t=(...u)=>u.join(" ");return us(t,e),Object.setPrototypeOf(t,_e.prototype),t};function _e(e){return qn(e)}Object.setPrototypeOf(_e.prototype,Function.prototype);for(let[e,t]of Object.entries(U))pe[e]={get(){let u=Ze(this,Mt(t.open,t.close,this[he]),this[Se]);return Object.defineProperty(this,e,{value:u}),u}};pe.visible={get(){let e=Ze(this,this[he],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Pt=(e,t,u,...n)=>e==="rgb"?t==="ansi16m"?U[u].ansi16m(...n):t==="ansi256"?U[u].ansi256(U.rgbToAnsi256(...n)):U[u].ansi(U.rgbToAnsi(...n)):e==="hex"?Pt("rgb",t,u,...U.hexToRgb(...n)):U[u][e](...n),ns=["rgb","hex","ansi256"];for(let e of ns){pe[e]={get(){let{level:u}=this;return function(...n){let r=Mt(Pt(e,Gn[u],"color",...n),U.color.close,this[he]);return Ze(this,r,this[Se])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);pe[t]={get(){let{level:u}=this;return function(...n){let r=Mt(Pt(e,Gn[u],"bgColor",...n),U.bgColor.close,this[he]);return Ze(this,r,this[Se])}}}}var rs=Object.defineProperties(()=>{},{...pe,level:{enumerable:!0,get(){return this[It].level},set(e){this[It].level=e}}}),Mt=(e,t,u)=>{let n,r;return u===void 0?(n=e,r=t):(n=u.openAll+e,r=t+u.closeAll),{open:e,close:t,openAll:n,closeAll:r,parent:u}},Ze=(e,t,u)=>{let n=(...r)=>Ds(n,r.length===1?""+r[0]:r.join(" "));return Object.setPrototypeOf(n,rs),n[It]=e,n[he]=t,n[Se]=u,n},Ds=(e,t)=>{if(e.level<=0||!t)return e[Se]?"":t;let u=e[he];if(u===void 0)return t;let{openAll:n,closeAll:r}=u;if(t.includes("\x1B"))for(;u!==void 0;)t=$n(t,u.close,u.open),u=u.parent;let D=t.indexOf(`
12
+ `);return D!==-1&&(t=Un(t,r,n,D)),n+t+r};Object.defineProperties(_e.prototype,pe);var os=_e(),LF=_e({level:Wn?Wn.level:0});var Y=os;var Kn=ce(Vn(),1),is=new Intl.Segmenter,ss=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function Ot(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:u=!0,countAnsiEscapeCodes:n=!1}=t;if(n||(e=K(e)),e.length===0)return 0;let r=0,D={ambiguousAsWide:!u};for(let{segment:o}of is.segment(e)){let i=o.codePointAt(0);if(!(i<=31||i>=127&&i<=159)&&!(i>=8203&&i<=8207||i===65279)&&!(i>=768&&i<=879||i>=6832&&i<=6911||i>=7616&&i<=7679||i>=8400&&i<=8447||i>=65056&&i<=65071)&&!(i>=55296&&i<=57343)&&!(i>=65024&&i<=65039)&&!ss.test(o)){if((0,Kn.default)().test(o)){r+=2;continue}r+=z(i,D)}}return r}function Qe(e){let t=0;for(let u of e.split(`
13
+ `))t=Math.max(t,Ot(u));return t}var Er=ce(Nt(),1);var cs=/[\p{Lu}]/u,ls=/[\p{Ll}]/u,Jn=/^[\p{Lu}](?![\p{Lu}])/gu,Qn=/([\p{Alpha}\p{N}_]|$)/u,$t=/[_.\- ]+/,Fs=new RegExp("^"+$t.source),Xn=new RegExp($t.source+Qn.source,"gu"),Zn=new RegExp("\\d+"+Qn.source,"gu"),ds=(e,t,u,n)=>{let r=!1,D=!1,o=!1,i=!1;for(let s=0;s<e.length;s++){let a=e[s];i=s>2?e[s-3]==="-":!0,r&&cs.test(a)?(e=e.slice(0,s)+"-"+e.slice(s),r=!1,o=D,D=!0,s++):D&&o&&ls.test(a)&&(!i||n)?(e=e.slice(0,s-1)+"-"+e.slice(s-1),o=D,D=!1,r=!0):(r=t(a)===a&&u(a)!==a,o=D,D=u(a)===a&&t(a)!==a)}return e},hs=(e,t)=>(Jn.lastIndex=0,e.replaceAll(Jn,u=>t(u))),ps=(e,t)=>(Xn.lastIndex=0,Zn.lastIndex=0,e.replaceAll(Zn,(u,n,r)=>["_","-"].includes(e.charAt(r+u.length))?u:t(u)).replaceAll(Xn,(u,n)=>t(n)));function Ut(e,t){if(!(typeof e=="string"||Array.isArray(e)))throw new TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,...t},Array.isArray(e)?e=e.map(D=>D.trim()).filter(D=>D.length).join("-"):e=e.trim(),e.length===0)return"";let u=t.locale===!1?D=>D.toLowerCase():D=>D.toLocaleLowerCase(t.locale),n=t.locale===!1?D=>D.toUpperCase():D=>D.toLocaleUpperCase(t.locale);return e.length===1?$t.test(e)?"":t.pascalCase?n(e):u(e):(e!==u(e)&&(e=ds(e,u,n,t.preserveConsecutiveUppercase)),e=e.replace(Fs,""),e=t.preserveConsecutiveUppercase?hs(e,u):u(e),t.pascalCase&&(e=n(e.charAt(0))+e.slice(1)),ps(e,n))}var zt=ce(sr(),1);var ar=(e=0)=>t=>`\x1B[${t+e}m`,cr=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,lr=(e=0)=>(t,u,n)=>`\x1B[${38+e};2;${t};${u};${n}m`,x={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},ed=Object.keys(x.modifier),As=Object.keys(x.color),Rs=Object.keys(x.bgColor),td=[...As,...Rs];function ys(){let e=new Map;for(let[t,u]of Object.entries(x)){for(let[n,r]of Object.entries(u))x[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},u[n]=x[n],e.set(r[0],r[1]);Object.defineProperty(x,t,{value:u,enumerable:!1})}return Object.defineProperty(x,"codes",{value:e,enumerable:!1}),x.color.close="\x1B[39m",x.bgColor.close="\x1B[49m",x.color.ansi=ar(),x.color.ansi256=cr(),x.color.ansi16m=lr(),x.bgColor.ansi=ar(10),x.bgColor.ansi256=cr(10),x.bgColor.ansi16m=lr(10),Object.defineProperties(x,{rgbToAnsi256:{value(t,u,n){return t===u&&u===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(u/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){let u=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!u)return[0,0,0];let[n]=u;n.length===3&&(n=[...n].map(D=>D+D).join(""));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>x.rgbToAnsi256(...x.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let u,n,r;if(t>=232)u=((t-232)*10+8)/255,n=u,r=u;else{t-=16;let i=t%36;u=Math.floor(t/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let D=Math.max(u,n,r)*2;if(D===0)return 30;let o=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(u));return D===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,u,n)=>x.ansi256ToAnsi(x.rgbToAnsi256(t,u,n)),enumerable:!1},hexToAnsi:{value:t=>x.ansi256ToAnsi(x.hexToAnsi256(t)),enumerable:!1}}),x}var xs=ys(),Fr=xs;var tt=new Set(["\x1B","\x9B"]),ws=39,Kt="\x07",pr="[",ks="]",fr="m",et=`${ks}8;;`,dr=e=>`${tt.values().next().value}${pr}${e}${fr}`,hr=e=>`${tt.values().next().value}${et}${e}${Kt}`,Ss=e=>e.split(" ").map(t=>M(t)),Vt=(e,t,u)=>{let n=[...t],r=!1,D=!1,o=M(K(e.at(-1)));for(let[i,s]of n.entries()){let a=M(s);if(o+a<=u?e[e.length-1]+=s:(e.push(s),o=0),tt.has(s)&&(r=!0,D=n.slice(i+1,i+1+et.length).join("")===et),r){D?s===Kt&&(r=!1,D=!1):s===fr&&(r=!1);continue}o+=a,o===u&&i<n.length-1&&(e.push(""),o=0)}!o&&e.at(-1).length>0&&e.length>1&&(e[e.length-2]+=e.pop())},_s=e=>{let t=e.split(" "),u=t.length;for(;u>0&&!(M(t[u-1])>0);)u--;return u===t.length?e:t.slice(0,u).join(" ")+t.slice(u).join("")},Ts=(e,t,u={})=>{if(u.trim!==!1&&e.trim()==="")return"";let n="",r,D,o=Ss(e),i=[""];for(let[c,h]of e.split(" ").entries()){u.trim!==!1&&(i[i.length-1]=i.at(-1).trimStart());let d=M(i.at(-1));if(c!==0&&(d>=t&&(u.wordWrap===!1||u.trim===!1)&&(i.push(""),d=0),(d>0||u.trim===!1)&&(i[i.length-1]+=" ",d++)),u.hard&&o[c]>t){let F=t-d,C=1+Math.floor((o[c]-F-1)/t);Math.floor((o[c]-1)/t)<C&&i.push(""),Vt(i,h,t);continue}if(d+o[c]>t&&d>0&&o[c]>0){if(u.wordWrap===!1&&d<t){Vt(i,h,t);continue}i.push("")}if(d+o[c]>t&&u.wordWrap===!1){Vt(i,h,t);continue}i[i.length-1]+=h}u.trim!==!1&&(i=i.map(c=>_s(c)));let s=i.join(`
14
+ `),a=[...s],l=0;for(let[c,h]of a.entries()){if(n+=h,tt.has(h)){let{groups:F}=new RegExp(`(?:\\${pr}(?<code>\\d+)m|\\${et}(?<uri>.*)${Kt})`).exec(s.slice(l))||{groups:{}};if(F.code!==void 0){let C=Number.parseFloat(F.code);r=C===ws?void 0:C}else F.uri!==void 0&&(D=F.uri.length===0?void 0:F.uri)}let d=Fr.codes.get(Number(r));a[c+1]===`
15
+ `?(D&&(n+=hr("")),r&&d&&(n+=dr(d))):h===`
16
+ `&&(r&&d&&(n+=dr(r)),D&&(n+=hr(D))),l+=h.length}return n};function ut(e,t,u){return String(e).normalize().replaceAll(`\r
17
17
  `,`
18
18
  `).split(`
19
- `).map(n=>Xi(n,t,u)).join(`
20
- `)}var Ds=le(Lt(),1),ie=`
21
- `,O=" ",_e="none",dr=()=>{let{env:e,stdout:t,stderr:u}=nt;return t?.columns?t.columns:u?.columns?u.columns:e.COLUMNS?Number.parseInt(e.COLUMNS,10):80},ar=e=>typeof e=="number"?{top:e,right:e*3,bottom:e,left:e*3}:{top:0,right:0,bottom:0,left:0,...e},ve=e=>e===_e?0:2,Ji=e=>{let t=["topLeft","topRight","bottomRight","bottomLeft","left","right","top","bottom"],u;if(e===_e){e={};for(let n of t)e[n]=""}if(typeof e=="string"){if(u=Fr.default[e],!u)throw new TypeError(`Invalid border style: ${e}`)}else{typeof e?.vertical=="string"&&(e.left=e.vertical,e.right=e.vertical),typeof e?.horizontal=="string"&&(e.top=e.horizontal,e.bottom=e.horizontal);for(let n of t)if(e[n]===null||typeof e[n]!="string")throw new TypeError(`Invalid border style: ${n}`);u=e}return u},Zi=(e,t,u)=>{let n="",r=P(e);switch(u){case"left":{n=e+t.slice(r);break}case"right":{n=t.slice(r)+e;break}default:{t=t.slice(r),t.length%2===1?(t=t.slice(Math.floor(t.length/2)),n=t.slice(1)+e+t):(t=t.slice(t.length/2),n=t+e+t);break}}return n},Qi=(e,{padding:t,width:u,textAlignment:n,height:r})=>{e=(0,Kt.default)(e,{align:n});let D=e.split(ie),o=Qe(e),i=u-t.left-t.right;if(o>i){let F=[];for(let c of D){let h=ut(c,i,{hard:!0}),l=(0,Kt.default)(h,{align:n}).split(`
22
- `),C=Math.max(...l.map(f=>P(f)));for(let f of l){let p;switch(n){case"center":{p=O.repeat((i-C)/2)+f;break}case"right":{p=O.repeat(i-C)+f;break}default:{p=f;break}}F.push(p)}}D=F}n==="center"&&o<i?D=D.map(F=>O.repeat((i-o)/2)+F):n==="right"&&o<i&&(D=D.map(F=>O.repeat(i-o)+F));let s=O.repeat(t.left),a=O.repeat(t.right);return D=D.map(F=>{let c=s+F+a;return c+O.repeat(u-P(c))}),t.top>0&&(D=[...Array.from({length:t.top}).fill(O.repeat(u)),...D]),t.bottom>0&&(D=[...D,...Array.from({length:t.bottom}).fill(O.repeat(u))]),r&&D.length>r?D=D.slice(0,r):r&&D.length<r&&(D=[...D,...Array.from({length:r-D.length}).fill(O.repeat(u))]),D.join(ie)},es=(e,t,u)=>{let n=F=>{let c=u.borderColor?ns(u.borderColor)(F):F;return u.dimBorder?X.dim(c):c},r=F=>u.backgroundColor?rs(u.backgroundColor)(F):F,D=Ji(u.borderStyle),o=dr(),i=O.repeat(u.margin.left);if(u.float==="center"){let F=Math.max((o-t-ve(u.borderStyle))/2,0);i=O.repeat(F)}else if(u.float==="right"){let F=Math.max(o-t-u.margin.right-ve(u.borderStyle),0);i=O.repeat(F)}let s="";u.margin.top&&(s+=ie.repeat(u.margin.top)),(u.borderStyle!==_e||u.title)&&(s+=n(i+D.topLeft+(u.title?Zi(u.title,D.top.repeat(t),u.titleAlignment):D.top.repeat(t))+D.topRight)+ie);let a=e.split(ie);return s+=a.map(F=>i+n(D.left)+r(F)+n(D.right)).join(ie),u.borderStyle!==_e&&(s+=ie+n(i+D.bottomLeft+D.bottom.repeat(t)+D.bottomRight)),u.margin.bottom&&(s+=ie.repeat(u.margin.bottom)),s},ts=e=>{if(e.fullscreen&&nt?.stdout){let t=[nt.stdout.columns,nt.stdout.rows];typeof e.fullscreen=="function"&&(t=e.fullscreen(...t)),e.width||=t[0],e.height||=t[1]}return e.width&&=Math.max(1,e.width-ve(e.borderStyle)),e.height&&=Math.max(1,e.height-ve(e.borderStyle)),e},cr=(e,t)=>t===_e?e:` ${e} `,us=(e,t)=>{t=ts(t);let u=t.width!==void 0,n=dr(),r=ve(t.borderStyle),D=n-t.margin.left-t.margin.right-r,o=Qe(ut(e,n-r,{hard:!0,trim:!1}))+t.padding.left+t.padding.right;if(t.title&&u?(t.title=t.title.slice(0,Math.max(0,t.width-2)),t.title&&=cr(t.title,t.borderStyle)):t.title&&(t.title=t.title.slice(0,Math.max(0,D-2)),t.title&&(t.title=cr(t.title,t.borderStyle),P(t.title)>o&&(t.width=P(t.title)))),t.width||=o,!u){if(t.margin.left&&t.margin.right&&t.width>D){let s=(n-t.width-r)/(t.margin.left+t.margin.right);t.margin.left=Math.max(0,Math.floor(t.margin.left*s)),t.margin.right=Math.max(0,Math.floor(t.margin.right*s))}t.width=Math.min(t.width,n-r-t.margin.left-t.margin.right)}return t.width-(t.padding.left+t.padding.right)<=0&&(t.padding.left=0,t.padding.right=0),t.height&&t.height-(t.padding.top+t.padding.bottom)<=0&&(t.padding.top=0,t.padding.bottom=0),t},zt=e=>e.match(/^#(?:[0-f]{3}){1,2}$/i),lr=e=>typeof e=="string"&&(X[e]??zt(e)),ns=e=>zt(e)?X.hex(e):X[e],rs=e=>zt(e)?X.bgHex(e):X[$t(["bg",e])];function Yt(e,t){if(t={padding:0,borderStyle:"single",dimBorder:!1,textAlignment:"left",float:"left",titleAlignment:"left",...t},t.align&&(t.textAlignment=t.align),t.borderColor&&!lr(t.borderColor))throw new Error(`${t.borderColor} is not a valid borderColor`);if(t.backgroundColor&&!lr(t.backgroundColor))throw new Error(`${t.backgroundColor} is not a valid backgroundColor`);return t.padding=ar(t.padding),t.margin=ar(t.margin),t=us(e,t),e=Qi(e,t),es(e,t.width,t)}var jD=le(sD(),1);import aD from"node:process";function Du(){let{env:e}=aD,{TERM:t,TERM_PROGRAM:u}=e;return aD.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||u==="Terminus-Sublime"||u==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var cD={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},lD={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},Gs={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},qs={...cD,...lD},Hs={...cD,...Gs},Vs=Du(),Ks=Vs?qs:Hs,I=Ks,jF=Object.entries(lD);var FD=(e=0)=>t=>`\x1B[${t+e}m`,dD=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,hD=(e=0)=>(t,u,n)=>`\x1B[${38+e};2;${t};${u};${n}m`,w={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},qF=Object.keys(w.modifier),zs=Object.keys(w.color),Ys=Object.keys(w.bgColor),HF=[...zs,...Ys];function Xs(){let e=new Map;for(let[t,u]of Object.entries(w)){for(let[n,r]of Object.entries(u))w[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},u[n]=w[n],e.set(r[0],r[1]);Object.defineProperty(w,t,{value:u,enumerable:!1})}return Object.defineProperty(w,"codes",{value:e,enumerable:!1}),w.color.close="\x1B[39m",w.bgColor.close="\x1B[49m",w.color.ansi=FD(),w.color.ansi256=dD(),w.color.ansi16m=hD(),w.bgColor.ansi=FD(10),w.bgColor.ansi256=dD(10),w.bgColor.ansi16m=hD(10),Object.defineProperties(w,{rgbToAnsi256:{value(t,u,n){return t===u&&u===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(u/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){let u=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!u)return[0,0,0];let[n]=u;n.length===3&&(n=[...n].map(D=>D+D).join(""));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>w.rgbToAnsi256(...w.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let u,n,r;if(t>=232)u=((t-232)*10+8)/255,n=u,r=u;else{t-=16;let i=t%36;u=Math.floor(t/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let D=Math.max(u,n,r)*2;if(D===0)return 30;let o=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(u));return D===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,u,n)=>w.ansi256ToAnsi(w.rgbToAnsi256(t,u,n)),enumerable:!1},hexToAnsi:{value:t=>w.ansi256ToAnsi(w.hexToAnsi256(t)),enumerable:!1}}),w}var Js=Xs(),Z=Js;function st(e){return Number.isInteger(e)?we(e)||ke(e):!1}var Ne=27,mD=144,gD=152,ED=155,BD=156,Ft=157,bD=158,AD=159,$e=new Set([Ne,mD,gD,ED,BD,Ft,bD,AD]),ge="\x1B",au="\x07",Fu="[",RD="]",Zs="P",Qs="X",ea="^",ta="_",yD="m",ct="\\",xD=`${ge}${ct}`,ua="\x9D",lt="\x9C",cu=`${ge}${RD}8;`,lu=`${ua}8;`,na=`${cu};`,ra=`${lu};`,Da="0".codePointAt(0),oa="9".codePointAt(0),ia=";".codePointAt(0),sa=":".codePointAt(0),aa="0".codePointAt(0),ca="?".codePointAt(0),la=" ".codePointAt(0),Fa="/".codePointAt(0),da="@".codePointAt(0),ha="~".codePointAt(0),pa=127462,fa=127487,pD=0,at=38,ou=39,Ca=48,iu=49,ma=5,ga=2,fD=3,CD=5,Ea=2,Ba=4,ba=65039,Aa=8419,Ra=new RegExp("\\p{Emoji_Presentation}","v"),du=new Intl.Segmenter(void 0,{granularity:"grapheme"}),wD=new Set;for(let[,e]of Z.codes)wD.add(e);function ya(e){return e>=Da&&e<=oa||e===ia||e===sa}function xa(e){return e>=aa&&e<=ca}function wa(e){return e>=la&&e<=Fa}function ka(e){return e>=da&&e<=ha}function Sa(e){return e>=pa&&e<=fa}function G(e,t){return{token:{type:"control",code:e},endIndex:t}}function Ta(e){if(Ra.test(e))return!0;for(let t of e){let u=t.codePointAt(0);if(u===ba||u===Aa)return!0}return!1}function kD(e){let t=0;for(let u of e){let n=u.codePointAt(0);if(st(n))return 2;Sa(n)&&t++}return t>=1||Ta(e)?2:1}function _a(e){return e.startsWith("\x9B")?"\x9B":`${ge}${Fu}`}function Le(e,t){return`${e}${t.join(";")}${yD}`}function va(e){let t=[],u=_a(e),n;if(e.startsWith(`${ge}${Fu}`))n=e.slice(2,-1);else if(e.startsWith("\x9B"))n=e.slice(1,-1);else return t;let r=n.length===0?[String(pD)]:n.split(";"),D=0;for(;D<r.length;){let o=Number.parseInt(r[D],10);if(Number.isNaN(o)){D++;continue}if(o===pD){t.push({type:"reset"}),D++;continue}if(o===at||o===Ca){let a=Number.parseInt(r[D+1],10);if(a===ma&&D+Ea<r.length){let c=Le(u,r.slice(D,D+fD));t.push({type:"start",code:c,endCode:Z.color.ansi(o===at?ou:iu)}),D+=fD;continue}if(a===ga&&D+Ba<r.length){let c=Le(u,r.slice(D,D+CD));t.push({type:"start",code:c,endCode:Z.color.ansi(o===at?ou:iu)}),D+=CD;continue}let F=Le(u,[r[D]]);t.push({type:"start",code:F,endCode:Z.color.ansi(o===at?ou:iu)}),D++;continue}if(wD.has(o)){t.push({type:"end",endCode:Z.color.ansi(o)}),D++;continue}let i=Z.codes.get(o);if(i!==void 0){let a=Le(u,[r[D]]);t.push({type:"start",code:a,endCode:Z.color.ansi(i)}),D++;continue}let s=Le(u,[r[D]]);t.push({type:"start",code:s,endCode:Z.reset.open}),D++}return t.length===0&&t.push({type:"reset"}),t}function Ia(e,t){let u=e.codePointAt(t),n;if(u===Ne){if(e[t+1]!==Fu)return;n=t+2}else if(u===ED)n=t+1;else return;let r=!0;for(let D=n;D<e.length;D++){let o=e.codePointAt(D);if(ka(o)){let s=e.slice(t,D+1);return e[D]!==yD||!r?G(s,D+1):{token:{type:"sgr",code:s,fragments:va(s)},endIndex:D+1}}if(xa(o)){ya(o)||(r=!1);continue}if(wa(o)){r=!1;continue}let i=D;return G(e.slice(t,i),i)}return G(e.slice(t),e.length)}function Ma(e,t){let u,n,r=e.codePointAt(t);if(r===Ne&&e.startsWith(cu,t))u=cu,n=na;else if(r===Ft&&e.startsWith(lu,t))u=lu,n=ra;else return;let D=e.indexOf(";",t+u.length);if(D===-1)return G(e.slice(t),e.length);for(let o=D+1;o<e.length;o++){let i=e[o];if(i===au){let s=e.slice(t,o+1),a=o===D+1?"close":"open";return{token:{type:"hyperlink",code:s,action:a,closePrefix:n,terminator:au},endIndex:o+1}}if(i===ge&&e[o+1]===ct){let s=e.slice(t,o+2),a=o===D+1?"close":"open";return{token:{type:"hyperlink",code:s,action:a,closePrefix:n,terminator:xD},endIndex:o+2}}if(i===lt){let s=e.slice(t,o+1),a=o===D+1?"close":"open";return{token:{type:"hyperlink",code:s,action:a,closePrefix:n,terminator:lt},endIndex:o+1}}}return G(e.slice(t),e.length)}function Pa(e,t){let u=e.codePointAt(t),n,r=!1;switch(u){case Ne:{switch(e[t+1]){case RD:{n=t+2,r=!0;break}case Zs:case Qs:case ea:case ta:{n=t+2;break}case ct:return G(xD,t+2);default:return}break}case Ft:{n=t+1,r=!0;break}case mD:case gD:case bD:case AD:{n=t+1;break}case BD:return G(lt,t+1);default:return}for(let D=n;D<e.length;D++){if(r&&e[D]===au)return G(e.slice(t,D+1),D+1);if(e[D]===ge&&e[D+1]===ct)return G(e.slice(t,D+2),D+2);if(e[D]===lt)return G(e.slice(t,D+1),D+1)}return G(e.slice(t),e.length)}function Ue(e,t){let u=e.codePointAt(t);if(u===Ne||u===Ft){let r=Ma(e,t);if(r)return r}let n=Pa(e,t);return n||Ia(e,t)}function SD(e,t,u){for(;t<e.length;){let n=e.codePointAt(t);if(!$e.has(n))break;let r=Ue(e,t);if(!r)break;u.push(r.token),t=r.endIndex}return t}function TD(e,t,u){let n=u.containing(t);if(!(!n||n.index!==t))return{token:{type:"character",value:n.segment,visibleWidth:kD(n.segment),isGraphemeContinuation:!1},endIndex:t+n.segment.length}}function Oa(e){let t=[],u=0;for(;u<e.length;){let n=e.codePointAt(u);if($e.has(n)){let D=Ue(e,u);if(D){u=D.endIndex;continue}}let r=String.fromCodePoint(n);t.push({value:r,visibleWidth:1,isGraphemeContinuation:!1}),u+=r.length}return t}function La(e){if(e.length===0)return;let t=e.map(({value:D})=>D).join(""),u=[],n=0;for(let D of e)u.push(n),n+=D.value.length;let r=0;for(let D of du.segment(t)){for(;r<e.length&&u[r]<D.index;)r++;let o=r,i=!0;for(;o<e.length&&u[o]<D.index+D.segment.length;)e[o].visibleWidth=i?kD(D.segment):0,e[o].isGraphemeContinuation=!i,i=!1,o++;r=o}}function su(e,{endCharacter:t=Number.POSITIVE_INFINITY}={}){let u=[],n=Oa(e);La(n);let r=0,D=0,o=0;for(;r<e.length;){let i=e.codePointAt(r);if($e.has(i)){let h=Ue(e,r);if(h){u.push(h.token),r=h.endIndex;continue}}let s=String.fromCodePoint(i),a=n[D],F=st(i)?2:s.length;a&&(F=a.visibleWidth);let c={type:"character",value:s,visibleWidth:F,isGraphemeContinuation:a?a.isGraphemeContinuation:!1};if(u.push(c),r+=s.length,D++,o+=c.visibleWidth,o>=t){let h=n[D];if(!h||!h.isGraphemeContinuation){r=SD(e,r,u);break}}}return u}function _D(e,t){let u=`${e}${t}`,n=e.length;for(let r of du.segment(u)){if(r.index===n)return!1;if(r.index>n)return!0}return!0}function Na(e,t,u,n){if(!u)return!1;let r=t,D=!1;for(;r<e.length;){let o=e.codePointAt(r);if($e.has(o)){let s=Ue(e,r);if(s){D=!0,r=s.endIndex;continue}}if(!D)return!1;let i=TD(e,r,n);return i?_D(u,i.token.value):!0}return!1}function hu(e,{endCharacter:t=Number.POSITIVE_INFINITY}={}){let u=[],n=du.segment(e),r=0,D=0,o,i=!1;for(;r<e.length;){let s=e.codePointAt(r);if($e.has(s)){let F=Ue(e,r);if(F){u.push(F.token),r=F.endIndex,i=!0;continue}}let a=TD(e,r,n);if(!a)return su(e,{endCharacter:t});if(i&&o&&_D(o,a.token.value))return su(e,{endCharacter:t});if(u.push(a.token),r=a.endIndex,D+=a.token.visibleWidth,i=!1,o=a.token.value,D>=t){if(Na(e,r,o,n))return su(e,{endCharacter:t});r=SD(e,r,u);break}}return u}function $a(e,t){for(let u of t)switch(u.type){case"reset":{e.clear();break}case"end":{e.delete(u.endCode);break}case"start":{e.delete(u.endCode),e.set(u.endCode,u.code);break}default:break}return e}function Ua(e){return[...e.keys()].toReversed().join("")}function Wa(e){return`${e.closePrefix}${e.terminator}`}function ja(e,t){let u=!1,n=!1;for(let r of e.fragments){if(r.type==="start"){u=!0;continue}if(r.type==="reset"&&t.size>0){n=!0;continue}r.type==="end"&&t.has(r.endCode)&&(n=!0)}return n&&!u}function Ga(e){return e.fragments.some(t=>t.type==="start")}function vD(e){if(e.activeHyperlink&&!e.activeHyperlinkHasVisibleText&&e.activeHyperlinkOutputIndex!==void 0){let t=e.activeHyperlink.code.length;e.returnValue=e.returnValue.slice(0,e.activeHyperlinkOutputIndex)+e.returnValue.slice(e.activeHyperlinkOutputIndex+t),e.pendingSgrOutputIndex!==void 0&&e.pendingSgrOutputIndex>e.activeHyperlinkOutputIndex&&(e.pendingSgrOutputIndex-=t)}e.activeHyperlink=void 0,e.activeHyperlinkHasVisibleText=!1,e.activeHyperlinkOutputIndex=void 0}function qa(e){return e.isPastEnd&&!ja(e.token,e.activeStyles)||(e.include&&Ga(e.token)&&e.pendingSgrOutputIndex===void 0&&(e.pendingSgrOutputIndex=e.returnValue.length,e.pendingSgrActiveStyles=new Map(e.activeStyles)),e.activeStyles=$a(e.activeStyles,e.token.fragments),e.include&&(e.returnValue+=e.token.code)),e}function Ha(e){if(e.isPastEnd&&(e.token.action!=="close"||!e.activeHyperlink))return e;if(e.token.action==="open")e.activeHyperlink=e.token,e.activeHyperlinkHasVisibleText=!1,e.activeHyperlinkOutputIndex=void 0,e.include&&(e.activeHyperlinkOutputIndex=e.returnValue.length);else if(e.token.action==="close"){if(e.include&&e.activeHyperlink&&!e.activeHyperlinkHasVisibleText)return vD(e),e;e.activeHyperlink=void 0,e.activeHyperlinkHasVisibleText=!1,e.activeHyperlinkOutputIndex=void 0}return e.include&&(e.returnValue+=e.token.code),e}function Va(e){return!e.isPastEnd&&e.include&&(e.returnValue+=e.token.code),e}function Ka(e){return!e.include&&e.position>=e.start&&!e.token.isGraphemeContinuation&&(e.include=!0,e.returnValue=[...e.activeStyles.values()].join(""),e.activeHyperlink&&(e.activeHyperlinkOutputIndex=e.returnValue.length,e.returnValue+=e.activeHyperlink.code)),e.include&&(e.returnValue+=e.token.value,e.pendingSgrOutputIndex=void 0,e.pendingSgrActiveStyles=void 0,e.activeHyperlink&&(e.activeHyperlinkHasVisibleText=!0)),e.position+=e.token.visibleWidth,e}var za={sgr:qa,hyperlink:Ha,control:Va,character:Ka};function Ya(e){let t=za[e.token.type];return t?t(e):e}function Xa(e){let t=Array.from({length:e.length},()=>!1),u=!1;for(let n=e.length-1;n>=0;n--){let r=e[n];t[n]=u,r.type==="character"&&(u=!!r.isGraphemeContinuation)}return t}function Ja(e,t,u){return u===void 0?!1:t>=u?!0:e.type==="character"&&!e.isGraphemeContinuation&&t+e.visibleWidth>u}function V(e,t,u){let n=hu(e,{endCharacter:u}),r=Xa(n),D=new Map,o,i=!1,s,a,F,c=0,h="",d=!1;for(let[l,C]of n.entries()){let f=Ja(C,c,u);if(f&&C.type!=="character"&&r[l]&&(f=!1),f&&C.type==="character"&&!C.isGraphemeContinuation){if(o&&!i){let p={activeHyperlink:o,activeHyperlinkHasVisibleText:i,activeHyperlinkOutputIndex:s,pendingSgrOutputIndex:a,returnValue:h};vD(p),{activeHyperlink:o,activeHyperlinkHasVisibleText:i,activeHyperlinkOutputIndex:s,pendingSgrOutputIndex:a,returnValue:h}=p}a!==void 0&&(h=h.slice(0,a),D=F,a=void 0,F=void 0);break}({activeStyles:D,activeHyperlink:o,activeHyperlinkHasVisibleText:i,activeHyperlinkOutputIndex:s,pendingSgrOutputIndex:a,pendingSgrActiveStyles:F,position:c,returnValue:h,include:d}=Ya({token:C,isPastEnd:f,start:t,activeStyles:D,activeHyperlink:o,activeHyperlinkHasVisibleText:i,activeHyperlinkOutputIndex:s,pendingSgrOutputIndex:a,pendingSgrActiveStyles:F,position:c,returnValue:h,include:d}))}return d?(o&&(h+=Wa(o)),h+=Ua(D),h):""}var Za=new Intl.Segmenter,ID=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Mark}|\\p{Surrogate})+$","v"),Qa=new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+","v"),ec=new RegExp("^\\p{RGI_Emoji}$","v"),tc=/^[\d#*]\u20E3$/,uc=new RegExp("\\p{Extended_Pictographic}","gu");function nc(e){if(e.length>50)return!1;if(tc.test(e))return!0;if(e.includes("\u200D")){let t=e.match(uc);return t!==null&&t.length>=2}return!1}function rc(e){return e.replace(Qa,"")}function Dc(e){return ID.test(e)}function MD(e){return e>=4352&&e<=4447||e>=43360&&e<=43388}function PD(e){return e>=4448&&e<=4519||e>=55216&&e<=55238}function OD(e){return e>=4520&&e<=4607||e>=55243&&e<=55291}function oc(e){return MD(e)||PD(e)||OD(e)}function ic(e,t){let u=[];for(let r of e)ID.test(r)||u.push(r.codePointAt(0));if(u.length===0)return;let n=0;for(let r=0;r<u.length;r++){let D=u[r];if(!oc(D)){if(n===0)return;for(let o=r;o<u.length;o++)n+=Y(u[o],t);return n}if(MD(D)&&PD(u[r+1])){n+=2,r+=OD(u[r+2])?2:1;continue}n+=Y(D,t)}return n}function sc(e,t){let u=0,n=!0;for(let r of e){if(n){n=!1;continue}r>="\uFF00"&&r<="\uFFEF"&&(u+=Y(r.codePointAt(0),t))}return u}function q(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:u=!0,countAnsiEscapeCodes:n=!1}=t,r=e;if(!n&&(r.includes("\x1B")||r.includes("\x9B"))&&(r=z(r)),r.length===0)return 0;if(/^[\u0020-\u007E]*$/.test(r))return r.length;let D=0,o={ambiguousAsWide:!u};for(let{segment:i}of Za.segment(r)){if(Dc(i))continue;if(ec.test(i)||nc(i)){D+=2;continue}let s=rc(i),a=ic(s,o);if(a!==void 0){D+=a;continue}let F=s.codePointAt(0);D+=Y(F,o),D+=sc(s,o)}return D}function dt(e,t,u){if(e.charAt(t)===" ")return t;let n=u?1:-1;for(let r=0;r<=3;r++){let D=t+r*n;if(e.charAt(D)===" ")return D}return t}function Ee(e,t,u={}){let{position:n="end",space:r=!1,preferTruncationOnSpace:D=!1}=u,{truncationCharacter:o="\u2026"}=u;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof e}`);if(typeof t!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof t}`);if(t<1)return"";let i=q(e);if(i<=t)return e;if(t===1)return o;let s={ESC:27,LEFT_BRACKET:91,LETTER_M:109},a=l=>l>=48&&l<=57||l===59;function F(l){let C=0;for(;C+2<l.length&&l.codePointAt(C)===s.ESC&&l.codePointAt(C+1)===s.LEFT_BRACKET;){let f=C+2;for(;f<l.length&&a(l.codePointAt(f));)f++;if(f<l.length&&l.codePointAt(f)===s.LETTER_M){C=f+1;continue}break}return C}function c(l){let C=l.length;for(;C>1&&l.codePointAt(C-1)===s.LETTER_M;){let f=C-2;for(;f>=0&&a(l.codePointAt(f));)f--;if(f>=1&&l.codePointAt(f-1)===s.ESC&&l.codePointAt(f)===s.LEFT_BRACKET){C=f-1;continue}break}return C}function h(l,C){let f=c(l);return f===l.length?l+C:l.slice(0,f)+C+l.slice(f)}function d(l,C){let f=F(C);return f===0?l+C:C.slice(0,f)+l+C.slice(f)}if(n==="start"){if(D){let C=dt(e,i-t+1,!0),f=V(e,C,i).trim();return d(o,f)}r&&(o+=" ");let l=V(e,i-t+q(o),i);return d(o,l)}if(n==="middle"){r&&(o=` ${o} `);let l=Math.floor(t/2);if(D){let C=dt(e,l),f=dt(e,i-(t-l)+1,!0);return V(e,0,C)+o+V(e,f,i).trim()}return V(e,0,l)+o+V(e,i-(t-l)+q(o),i)}if(n==="end"){if(D){let C=dt(e,t-1),f=V(e,0,C);return h(f,o)}r&&(o=` ${o}`);let l=V(e,0,t-q(o));return h(l,o)}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${n}`)}var pu=300*60*1e3;function ac(e,t=pu){if(e.length===0)return[];let u=[...e].sort((i,s)=>i.timestamp.localeCompare(s.timestamp)),n=[],r=null,D=0,o=Date.now();for(let i of u){let s=new Date(i.timestamp).getTime();(!r||s-D>=t)&&(D=s,r={id:i.timestamp,startTime:i.timestamp,endTime:new Date(s+t).toISOString(),actualEndTime:i.timestamp,isActive:!1,inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,totalTokens:0,cost:0,saved:0,models:[],requests:0},n.push(r));let a=oe(i);r.inputTokens+=i.usage.input_tokens,r.outputTokens+=i.usage.output_tokens,r.cacheReadTokens+=i.usage.cache_read_input_tokens,r.cacheCreationTokens+=i.usage.cache_creation_input_tokens,r.totalTokens=r.inputTokens+r.outputTokens+r.cacheReadTokens+r.cacheCreationTokens,r.cost+=a.total,r.saved+=a.saved,r.requests+=1,r.actualEndTime=i.timestamp,r.models.includes(i.model)||r.models.push(i.model)}for(let i of n){let s=new Date(i.endTime).getTime();i.isActive=o<s}return n}function cc(e,t=pu){return ac(e,t).find(r=>r.isActive)??null}function LD(e,t=pu){let u=cc(e,t);if(!u)return{block:null,windowMs:t,elapsedMs:0,remainingMs:0,progress:0,burnRatePerMin:0,costPerMin:0,projectedTotal:0,projectedCost:0};let n=Date.now(),r=new Date(u.startTime).getTime(),D=new Date(u.endTime).getTime(),o=n-r,i=Math.max(0,D-n),s=Math.min(1,o/t),a=o/6e4,F=a>0?u.totalTokens/a:0,c=a>0?u.cost/a:0,h=t/6e4;return{block:u,windowMs:t,elapsedMs:o,remainingMs:i,progress:s,burnRatePerMin:F,costPerMin:c,projectedTotal:F*h,projectedCost:c*h}}function ND(e,t){let u=t.source==="all"?e:e.filter(f=>f.source===t.source);if(u.length===0)return{sessions:0,messages:0,totalTokens:0,activeDays:0,currentStreak:0,longestStreak:0,peakHour:-1,favoriteModel:null,heatmap:ht(),heatmapMax:0,tokenHeatmap:ht(),tokensSummed:0};let n=new Set,r=new Set,D=new Array(24).fill(0),o=new Map,i=ht(),s=ht(),a=0,F=0;for(let f of u){f.sessionId&&n.add(f.sessionId);let p=new Date(f.timestamp);if(Number.isNaN(p.getTime()))continue;let m=lc(p);r.add(m);let B=p.getDay(),g=p.getHours();D[g]+=1,i[B][g]+=1,o.set(f.model,(o.get(f.model)??0)+1);let b=f.usage,k=b.input_tokens+b.output_tokens+b.cache_read_input_tokens+b.cache_creation_input_tokens;s[B][g]+=k,a+=k,F+=1}let c=Fc(D),h=dc(o),{current:d,longest:l}=hc(r,t.streakWindowDays??365),C=0;for(let f of i)for(let p of f)p>C&&(C=p);return{sessions:n.size,messages:F,totalTokens:a,activeDays:r.size,currentStreak:d,longestStreak:l,peakHour:c,favoriteModel:h,heatmap:i,heatmapMax:C,tokenHeatmap:s,tokensSummed:a}}function ht(){return Array.from({length:7},()=>new Array(24).fill(0))}function lc(e){let t=e.getFullYear(),u=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${u}-${n}`}function Fc(e){let t=-1,u=-1;for(let n=0;n<e.length;n+=1)e[n]>u&&(u=e[n],t=n);return t}function dc(e){let t=null,u=-1;for(let[n,r]of e)r>u&&(t=n,u=r);return t}function hc(e,t){if(e.size===0)return{current:0,longest:0};let u=Array.from(e).map(c=>new Date(c+"T00:00:00").getTime()).filter(c=>Number.isFinite(c)).sort((c,h)=>c-h),n=1,r=1;for(let c=1;c<u.length;c+=1)u[c]-u[c-1]===864e5?(r+=1,r>n&&(n=r)):r=1;let D=pc(Date.now()),o=u[u.length-1];if(D-o>864e5)return{current:0,longest:n};let i=o,s=0,a=0,F=new Set(u);for(;a<t&&F.has(i);)s+=1,i-=864e5,a+=1;return{current:s,longest:n}}function pc(e){let t=new Date(e);return t.setHours(0,0,0,0),t.getTime()}var Q={brand:[129,140,248],green:[34,197,94],red:[239,68,68],yellow:[234,179,8],cyan:[34,211,238],input:[96,165,250],cacheWrite:[167,139,250],cacheRead:[52,211,153],output:[251,146,60]};function $D(e){let t=new Je({level:e?3:0}),u=n=>e?r=>t.rgb(n[0],n[1],n[2])(r):r=>r;return{reset:e?"\x1B[0m":"",bold:n=>t.bold(n),dim:n=>t.dim(n),brand:u(Q.brand),green:u(Q.green),red:u(Q.red),yellow:u(Q.yellow),cyan:u(Q.cyan),input:u(Q.input),cacheWrite:u(Q.cacheWrite),cacheRead:u(Q.cacheRead),output:u(Q.output)}}function pt(e){return q(e)}function ft(e,t,u=" "){let n=t-q(e);return n>0?e+u.repeat(n):e}function Be(e,t,u=" "){let n=t-q(e);return n>0?u.repeat(n)+e:e}function fu(e,t,u=" "){let n=t-q(e);if(n<=0)return e;let r=Math.floor(n/2),D=n-r;return u.repeat(r)+e+u.repeat(D)}var fc=["","\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u2588"];function Ct(e,t,u){if(t<=0||!Number.isFinite(e)||e<=0)return" ".repeat(Math.max(0,t));let r=Math.min(1,e)*t,D=Math.floor(r),o=r-D,i=Math.round(o*8),s="\u2588".repeat(D);i>0&&D<t&&(s+=fc[i]);let a=ft(s,t," ");return u?u(a):a}var Cc=["\u2581","\u2582","\u2583","\u2584","\u2585","\u2586","\u2587","\u2588"];function We(e,t,u){if(t<=0)return"";if(e.length===0)return u?u("\u2500".repeat(t)):"\u2500".repeat(t);let n=[];if(e.length===t)n.push(...e);else if(e.length>t){let o=e.length/t;for(let i=0;i<t;i+=1){let s=Math.floor(i*o),a=Math.floor((i+1)*o),F=0,c=0;for(let h=s;h<Math.min(a,e.length);h+=1)F+=e[h],c+=1;n.push(c>0?F/c:0)}}else{let o=t-e.length;for(let i=0;i<o;i+=1)n.push(0);n.push(...e)}let r=Math.max(...n,0);if(r<=0){let o="\u2500".repeat(t);return u?u(o):o}let D=n.map(o=>Cc[Math.min(7,Math.max(0,Math.round(o/r*7)))]).join("");return u?u(D):D}var mc=["","\u2581","\u2582","\u2583","\u2584","\u2585","\u2586","\u2587","\u2588"];function UD(e,t,u){let n=new Array(t).fill(" ");if(t<=0||u<=0)return n;let r=e.reduce((F,c)=>F+Math.max(0,c.value),0);if(r<=0)return n;let D=r/u*t*8,o=t*8,i=Math.min(D,o),s=i,a=0;for(let F of e){if(F.value<=0||s<=0)continue;let c=Math.min(s,F.value/r*i),h=a,d=a+c,l=Math.floor(h/8),C=Math.min(t-1,Math.floor((d-1e-4)/8));for(let f=l;f<=C;f+=1){let p=f*8,m=Math.max(0,h-p),B=Math.min(8,d-p),g;if(B>=8)g="\u2588";else if(m<=0){let b=Math.max(1,Math.round(B));g=mc[Math.min(8,b)]||"\u2581"}else g="\u2588";n[t-1-f]=F.color?F.color(g):g}s-=c,a=d}return n}function GD(e,t,u,n){let r=u.width??process.stdout.columns??100,D=u.color!==!1;X.level=D?3:0;let o=$D(D);if(r<80)return[`[ccgauge] terminal width (${r}) is below the dashboard's 80-column floor.`,"Resize wider for the rich layout, or omit --dashboard for the standard report.","",...Cu(t,u).split(`
19
+ `).map(n=>Ts(n,t,u)).join(`
20
+ `)}var Us=ce(Nt(),1),oe=`
21
+ `,O=" ",Te="none",Br=()=>{let{env:e,stdout:t,stderr:u}=nt;return t?.columns?t.columns:u?.columns?u.columns:e.COLUMNS?Number.parseInt(e.COLUMNS,10):80},Cr=e=>typeof e=="number"?{top:e,right:e*3,bottom:e,left:e*3}:{top:0,right:0,bottom:0,left:0,...e},ve=e=>e===Te?0:2,vs=e=>{let t=["topLeft","topRight","bottomRight","bottomLeft","left","right","top","bottom"],u;if(e===Te){e={};for(let n of t)e[n]=""}if(typeof e=="string"){if(u=Er.default[e],!u)throw new TypeError(`Invalid border style: ${e}`)}else{typeof e?.vertical=="string"&&(e.left=e.vertical,e.right=e.vertical),typeof e?.horizontal=="string"&&(e.top=e.horizontal,e.bottom=e.horizontal);for(let n of t)if(e[n]===null||typeof e[n]!="string")throw new TypeError(`Invalid border style: ${n}`);u=e}return u},Is=(e,t,u)=>{let n="",r=M(e);switch(u){case"left":{n=e+t.slice(r);break}case"right":{n=t.slice(r)+e;break}default:{t=t.slice(r),t.length%2===1?(t=t.slice(Math.floor(t.length/2)),n=t.slice(1)+e+t):(t=t.slice(t.length/2),n=t+e+t);break}}return n},Ps=(e,{padding:t,width:u,textAlignment:n,height:r})=>{e=(0,zt.default)(e,{align:n});let D=e.split(oe),o=Qe(e),i=u-t.left-t.right;if(o>i){let l=[];for(let c of D){let h=ut(c,i,{hard:!0}),F=(0,zt.default)(h,{align:n}).split(`
22
+ `),C=Math.max(...F.map(f=>M(f)));for(let f of F){let p;switch(n){case"center":{p=O.repeat((i-C)/2)+f;break}case"right":{p=O.repeat(i-C)+f;break}default:{p=f;break}}l.push(p)}}D=l}n==="center"&&o<i?D=D.map(l=>O.repeat((i-o)/2)+l):n==="right"&&o<i&&(D=D.map(l=>O.repeat(i-o)+l));let s=O.repeat(t.left),a=O.repeat(t.right);return D=D.map(l=>{let c=s+l+a;return c+O.repeat(u-M(c))}),t.top>0&&(D=[...Array.from({length:t.top}).fill(O.repeat(u)),...D]),t.bottom>0&&(D=[...D,...Array.from({length:t.bottom}).fill(O.repeat(u))]),r&&D.length>r?D=D.slice(0,r):r&&D.length<r&&(D=[...D,...Array.from({length:r-D.length}).fill(O.repeat(u))]),D.join(oe)},Ms=(e,t,u)=>{let n=l=>{let c=u.borderColor?Ns(u.borderColor)(l):l;return u.dimBorder?Y.dim(c):c},r=l=>u.backgroundColor?$s(u.backgroundColor)(l):l,D=vs(u.borderStyle),o=Br(),i=O.repeat(u.margin.left);if(u.float==="center"){let l=Math.max((o-t-ve(u.borderStyle))/2,0);i=O.repeat(l)}else if(u.float==="right"){let l=Math.max(o-t-u.margin.right-ve(u.borderStyle),0);i=O.repeat(l)}let s="";u.margin.top&&(s+=oe.repeat(u.margin.top)),(u.borderStyle!==Te||u.title)&&(s+=n(i+D.topLeft+(u.title?Is(u.title,D.top.repeat(t),u.titleAlignment):D.top.repeat(t))+D.topRight)+oe);let a=e.split(oe);return s+=a.map(l=>i+n(D.left)+r(l)+n(D.right)).join(oe),u.borderStyle!==Te&&(s+=oe+n(i+D.bottomLeft+D.bottom.repeat(t)+D.bottomRight)),u.margin.bottom&&(s+=oe.repeat(u.margin.bottom)),s},Os=e=>{if(e.fullscreen&&nt?.stdout){let t=[nt.stdout.columns,nt.stdout.rows];typeof e.fullscreen=="function"&&(t=e.fullscreen(...t)),e.width||=t[0],e.height||=t[1]}return e.width&&=Math.max(1,e.width-ve(e.borderStyle)),e.height&&=Math.max(1,e.height-ve(e.borderStyle)),e},gr=(e,t)=>t===Te?e:` ${e} `,Ls=(e,t)=>{t=Os(t);let u=t.width!==void 0,n=Br(),r=ve(t.borderStyle),D=n-t.margin.left-t.margin.right-r,o=Qe(ut(e,n-r,{hard:!0,trim:!1}))+t.padding.left+t.padding.right;if(t.title&&u?(t.title=t.title.slice(0,Math.max(0,t.width-2)),t.title&&=gr(t.title,t.borderStyle)):t.title&&(t.title=t.title.slice(0,Math.max(0,D-2)),t.title&&(t.title=gr(t.title,t.borderStyle),M(t.title)>o&&(t.width=M(t.title)))),t.width||=o,!u){if(t.margin.left&&t.margin.right&&t.width>D){let s=(n-t.width-r)/(t.margin.left+t.margin.right);t.margin.left=Math.max(0,Math.floor(t.margin.left*s)),t.margin.right=Math.max(0,Math.floor(t.margin.right*s))}t.width=Math.min(t.width,n-r-t.margin.left-t.margin.right)}return t.width-(t.padding.left+t.padding.right)<=0&&(t.padding.left=0,t.padding.right=0),t.height&&t.height-(t.padding.top+t.padding.bottom)<=0&&(t.padding.top=0,t.padding.bottom=0),t},Yt=e=>e.match(/^#(?:[0-f]{3}){1,2}$/i),mr=e=>typeof e=="string"&&(Y[e]??Yt(e)),Ns=e=>Yt(e)?Y.hex(e):Y[e],$s=e=>Yt(e)?Y.bgHex(e):Y[Ut(["bg",e])];function Jt(e,t){if(t={padding:0,borderStyle:"single",dimBorder:!1,textAlignment:"left",float:"left",titleAlignment:"left",...t},t.align&&(t.textAlignment=t.align),t.borderColor&&!mr(t.borderColor))throw new Error(`${t.borderColor} is not a valid borderColor`);if(t.backgroundColor&&!mr(t.backgroundColor))throw new Error(`${t.backgroundColor} is not a valid backgroundColor`);return t.padding=Cr(t.padding),t.margin=Cr(t.margin),t=Ls(e,t),e=Ps(e,t),Ms(e,t.width,t)}var JD=ce(fD(),1);import CD from"node:process";function ou(){let{env:e}=CD,{TERM:t,TERM_PROGRAM:u}=e;return CD.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||u==="Terminus-Sublime"||u==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var gD={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},mD={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},Ra={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},ya={...gD,...mD},xa={...gD,...Ra},wa=ou(),ka=wa?ya:xa,I=ka,Ld=Object.entries(mD);var ED=(e=0)=>t=>`\x1B[${t+e}m`,BD=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,bD=(e=0)=>(t,u,n)=>`\x1B[${38+e};2;${t};${u};${n}m`,w={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},$d=Object.keys(w.modifier),Sa=Object.keys(w.color),_a=Object.keys(w.bgColor),Ud=[...Sa,..._a];function Ta(){let e=new Map;for(let[t,u]of Object.entries(w)){for(let[n,r]of Object.entries(u))w[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},u[n]=w[n],e.set(r[0],r[1]);Object.defineProperty(w,t,{value:u,enumerable:!1})}return Object.defineProperty(w,"codes",{value:e,enumerable:!1}),w.color.close="\x1B[39m",w.bgColor.close="\x1B[49m",w.color.ansi=ED(),w.color.ansi256=BD(),w.color.ansi16m=bD(),w.bgColor.ansi=ED(10),w.bgColor.ansi256=BD(10),w.bgColor.ansi16m=bD(10),Object.defineProperties(w,{rgbToAnsi256:{value(t,u,n){return t===u&&u===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(u/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){let u=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!u)return[0,0,0];let[n]=u;n.length===3&&(n=[...n].map(D=>D+D).join(""));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>w.rgbToAnsi256(...w.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let u,n,r;if(t>=232)u=((t-232)*10+8)/255,n=u,r=u;else{t-=16;let i=t%36;u=Math.floor(t/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let D=Math.max(u,n,r)*2;if(D===0)return 30;let o=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(u));return D===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,u,n)=>w.ansi256ToAnsi(w.rgbToAnsi256(t,u,n)),enumerable:!1},hexToAnsi:{value:t=>w.ansi256ToAnsi(w.hexToAnsi256(t)),enumerable:!1}}),w}var va=Ta(),X=va;function st(e){return Number.isInteger(e)?we(e)||ke(e):!1}var Ne=27,xD=144,wD=152,kD=155,SD=156,Ft=157,_D=158,TD=159,$e=new Set([Ne,xD,wD,kD,SD,Ft,_D,TD]),ge="\x1B",cu="\x07",du="[",vD="]",Ia="P",Pa="X",Ma="^",Oa="_",ID="m",ct="\\",PD=`${ge}${ct}`,La="\x9D",lt="\x9C",lu=`${ge}${vD}8;`,Fu=`${La}8;`,Na=`${lu};`,$a=`${Fu};`,Ua="0".codePointAt(0),ja="9".codePointAt(0),Wa=";".codePointAt(0),Ga=":".codePointAt(0),qa="0".codePointAt(0),Ha="?".codePointAt(0),Va=" ".codePointAt(0),Ka="/".codePointAt(0),za="@".codePointAt(0),Ya="~".codePointAt(0),Ja=127462,Xa=127487,AD=0,at=38,iu=39,Za=48,su=49,Qa=5,ec=2,RD=3,yD=5,tc=2,uc=4,nc=65039,rc=8419,Dc=new RegExp("\\p{Emoji_Presentation}","v"),hu=new Intl.Segmenter(void 0,{granularity:"grapheme"}),MD=new Set;for(let[,e]of X.codes)MD.add(e);function oc(e){return e>=Ua&&e<=ja||e===Wa||e===Ga}function ic(e){return e>=qa&&e<=Ha}function sc(e){return e>=Va&&e<=Ka}function ac(e){return e>=za&&e<=Ya}function cc(e){return e>=Ja&&e<=Xa}function W(e,t){return{token:{type:"control",code:e},endIndex:t}}function lc(e){if(Dc.test(e))return!0;for(let t of e){let u=t.codePointAt(0);if(u===nc||u===rc)return!0}return!1}function OD(e){let t=0;for(let u of e){let n=u.codePointAt(0);if(st(n))return 2;cc(n)&&t++}return t>=1||lc(e)?2:1}function Fc(e){return e.startsWith("\x9B")?"\x9B":`${ge}${du}`}function Le(e,t){return`${e}${t.join(";")}${ID}`}function dc(e){let t=[],u=Fc(e),n;if(e.startsWith(`${ge}${du}`))n=e.slice(2,-1);else if(e.startsWith("\x9B"))n=e.slice(1,-1);else return t;let r=n.length===0?[String(AD)]:n.split(";"),D=0;for(;D<r.length;){let o=Number.parseInt(r[D],10);if(Number.isNaN(o)){D++;continue}if(o===AD){t.push({type:"reset"}),D++;continue}if(o===at||o===Za){let a=Number.parseInt(r[D+1],10);if(a===Qa&&D+tc<r.length){let c=Le(u,r.slice(D,D+RD));t.push({type:"start",code:c,endCode:X.color.ansi(o===at?iu:su)}),D+=RD;continue}if(a===ec&&D+uc<r.length){let c=Le(u,r.slice(D,D+yD));t.push({type:"start",code:c,endCode:X.color.ansi(o===at?iu:su)}),D+=yD;continue}let l=Le(u,[r[D]]);t.push({type:"start",code:l,endCode:X.color.ansi(o===at?iu:su)}),D++;continue}if(MD.has(o)){t.push({type:"end",endCode:X.color.ansi(o)}),D++;continue}let i=X.codes.get(o);if(i!==void 0){let a=Le(u,[r[D]]);t.push({type:"start",code:a,endCode:X.color.ansi(i)}),D++;continue}let s=Le(u,[r[D]]);t.push({type:"start",code:s,endCode:X.reset.open}),D++}return t.length===0&&t.push({type:"reset"}),t}function hc(e,t){let u=e.codePointAt(t),n;if(u===Ne){if(e[t+1]!==du)return;n=t+2}else if(u===kD)n=t+1;else return;let r=!0;for(let D=n;D<e.length;D++){let o=e.codePointAt(D);if(ac(o)){let s=e.slice(t,D+1);return e[D]!==ID||!r?W(s,D+1):{token:{type:"sgr",code:s,fragments:dc(s)},endIndex:D+1}}if(ic(o)){oc(o)||(r=!1);continue}if(sc(o)){r=!1;continue}let i=D;return W(e.slice(t,i),i)}return W(e.slice(t),e.length)}function pc(e,t){let u,n,r=e.codePointAt(t);if(r===Ne&&e.startsWith(lu,t))u=lu,n=Na;else if(r===Ft&&e.startsWith(Fu,t))u=Fu,n=$a;else return;let D=e.indexOf(";",t+u.length);if(D===-1)return W(e.slice(t),e.length);for(let o=D+1;o<e.length;o++){let i=e[o];if(i===cu){let s=e.slice(t,o+1),a=o===D+1?"close":"open";return{token:{type:"hyperlink",code:s,action:a,closePrefix:n,terminator:cu},endIndex:o+1}}if(i===ge&&e[o+1]===ct){let s=e.slice(t,o+2),a=o===D+1?"close":"open";return{token:{type:"hyperlink",code:s,action:a,closePrefix:n,terminator:PD},endIndex:o+2}}if(i===lt){let s=e.slice(t,o+1),a=o===D+1?"close":"open";return{token:{type:"hyperlink",code:s,action:a,closePrefix:n,terminator:lt},endIndex:o+1}}}return W(e.slice(t),e.length)}function fc(e,t){let u=e.codePointAt(t),n,r=!1;switch(u){case Ne:{switch(e[t+1]){case vD:{n=t+2,r=!0;break}case Ia:case Pa:case Ma:case Oa:{n=t+2;break}case ct:return W(PD,t+2);default:return}break}case Ft:{n=t+1,r=!0;break}case xD:case wD:case _D:case TD:{n=t+1;break}case SD:return W(lt,t+1);default:return}for(let D=n;D<e.length;D++){if(r&&e[D]===cu)return W(e.slice(t,D+1),D+1);if(e[D]===ge&&e[D+1]===ct)return W(e.slice(t,D+2),D+2);if(e[D]===lt)return W(e.slice(t,D+1),D+1)}return W(e.slice(t),e.length)}function Ue(e,t){let u=e.codePointAt(t);if(u===Ne||u===Ft){let r=pc(e,t);if(r)return r}let n=fc(e,t);return n||hc(e,t)}function LD(e,t,u){for(;t<e.length;){let n=e.codePointAt(t);if(!$e.has(n))break;let r=Ue(e,t);if(!r)break;u.push(r.token),t=r.endIndex}return t}function ND(e,t,u){let n=u.containing(t);if(!(!n||n.index!==t))return{token:{type:"character",value:n.segment,visibleWidth:OD(n.segment),isGraphemeContinuation:!1},endIndex:t+n.segment.length}}function Cc(e){let t=[],u=0;for(;u<e.length;){let n=e.codePointAt(u);if($e.has(n)){let D=Ue(e,u);if(D){u=D.endIndex;continue}}let r=String.fromCodePoint(n);t.push({value:r,visibleWidth:1,isGraphemeContinuation:!1}),u+=r.length}return t}function gc(e){if(e.length===0)return;let t=e.map(({value:D})=>D).join(""),u=[],n=0;for(let D of e)u.push(n),n+=D.value.length;let r=0;for(let D of hu.segment(t)){for(;r<e.length&&u[r]<D.index;)r++;let o=r,i=!0;for(;o<e.length&&u[o]<D.index+D.segment.length;)e[o].visibleWidth=i?OD(D.segment):0,e[o].isGraphemeContinuation=!i,i=!1,o++;r=o}}function au(e,{endCharacter:t=Number.POSITIVE_INFINITY}={}){let u=[],n=Cc(e);gc(n);let r=0,D=0,o=0;for(;r<e.length;){let i=e.codePointAt(r);if($e.has(i)){let h=Ue(e,r);if(h){u.push(h.token),r=h.endIndex;continue}}let s=String.fromCodePoint(i),a=n[D],l=st(i)?2:s.length;a&&(l=a.visibleWidth);let c={type:"character",value:s,visibleWidth:l,isGraphemeContinuation:a?a.isGraphemeContinuation:!1};if(u.push(c),r+=s.length,D++,o+=c.visibleWidth,o>=t){let h=n[D];if(!h||!h.isGraphemeContinuation){r=LD(e,r,u);break}}}return u}function $D(e,t){let u=`${e}${t}`,n=e.length;for(let r of hu.segment(u)){if(r.index===n)return!1;if(r.index>n)return!0}return!0}function mc(e,t,u,n){if(!u)return!1;let r=t,D=!1;for(;r<e.length;){let o=e.codePointAt(r);if($e.has(o)){let s=Ue(e,r);if(s){D=!0,r=s.endIndex;continue}}if(!D)return!1;let i=ND(e,r,n);return i?$D(u,i.token.value):!0}return!1}function pu(e,{endCharacter:t=Number.POSITIVE_INFINITY}={}){let u=[],n=hu.segment(e),r=0,D=0,o,i=!1;for(;r<e.length;){let s=e.codePointAt(r);if($e.has(s)){let l=Ue(e,r);if(l){u.push(l.token),r=l.endIndex,i=!0;continue}}let a=ND(e,r,n);if(!a)return au(e,{endCharacter:t});if(i&&o&&$D(o,a.token.value))return au(e,{endCharacter:t});if(u.push(a.token),r=a.endIndex,D+=a.token.visibleWidth,i=!1,o=a.token.value,D>=t){if(mc(e,r,o,n))return au(e,{endCharacter:t});r=LD(e,r,u);break}}return u}function Ec(e,t){for(let u of t)switch(u.type){case"reset":{e.clear();break}case"end":{e.delete(u.endCode);break}case"start":{e.delete(u.endCode),e.set(u.endCode,u.code);break}default:break}return e}function Bc(e){return[...e.keys()].toReversed().join("")}function bc(e){return`${e.closePrefix}${e.terminator}`}function Ac(e,t){let u=!1,n=!1;for(let r of e.fragments){if(r.type==="start"){u=!0;continue}if(r.type==="reset"&&t.size>0){n=!0;continue}r.type==="end"&&t.has(r.endCode)&&(n=!0)}return n&&!u}function Rc(e){return e.fragments.some(t=>t.type==="start")}function UD(e){if(e.activeHyperlink&&!e.activeHyperlinkHasVisibleText&&e.activeHyperlinkOutputIndex!==void 0){let t=e.activeHyperlink.code.length;e.returnValue=e.returnValue.slice(0,e.activeHyperlinkOutputIndex)+e.returnValue.slice(e.activeHyperlinkOutputIndex+t),e.pendingSgrOutputIndex!==void 0&&e.pendingSgrOutputIndex>e.activeHyperlinkOutputIndex&&(e.pendingSgrOutputIndex-=t)}e.activeHyperlink=void 0,e.activeHyperlinkHasVisibleText=!1,e.activeHyperlinkOutputIndex=void 0}function yc(e){return e.isPastEnd&&!Ac(e.token,e.activeStyles)||(e.include&&Rc(e.token)&&e.pendingSgrOutputIndex===void 0&&(e.pendingSgrOutputIndex=e.returnValue.length,e.pendingSgrActiveStyles=new Map(e.activeStyles)),e.activeStyles=Ec(e.activeStyles,e.token.fragments),e.include&&(e.returnValue+=e.token.code)),e}function xc(e){if(e.isPastEnd&&(e.token.action!=="close"||!e.activeHyperlink))return e;if(e.token.action==="open")e.activeHyperlink=e.token,e.activeHyperlinkHasVisibleText=!1,e.activeHyperlinkOutputIndex=void 0,e.include&&(e.activeHyperlinkOutputIndex=e.returnValue.length);else if(e.token.action==="close"){if(e.include&&e.activeHyperlink&&!e.activeHyperlinkHasVisibleText)return UD(e),e;e.activeHyperlink=void 0,e.activeHyperlinkHasVisibleText=!1,e.activeHyperlinkOutputIndex=void 0}return e.include&&(e.returnValue+=e.token.code),e}function wc(e){return!e.isPastEnd&&e.include&&(e.returnValue+=e.token.code),e}function kc(e){return!e.include&&e.position>=e.start&&!e.token.isGraphemeContinuation&&(e.include=!0,e.returnValue=[...e.activeStyles.values()].join(""),e.activeHyperlink&&(e.activeHyperlinkOutputIndex=e.returnValue.length,e.returnValue+=e.activeHyperlink.code)),e.include&&(e.returnValue+=e.token.value,e.pendingSgrOutputIndex=void 0,e.pendingSgrActiveStyles=void 0,e.activeHyperlink&&(e.activeHyperlinkHasVisibleText=!0)),e.position+=e.token.visibleWidth,e}var Sc={sgr:yc,hyperlink:xc,control:wc,character:kc};function _c(e){let t=Sc[e.token.type];return t?t(e):e}function Tc(e){let t=Array.from({length:e.length},()=>!1),u=!1;for(let n=e.length-1;n>=0;n--){let r=e[n];t[n]=u,r.type==="character"&&(u=!!r.isGraphemeContinuation)}return t}function vc(e,t,u){return u===void 0?!1:t>=u?!0:e.type==="character"&&!e.isGraphemeContinuation&&t+e.visibleWidth>u}function H(e,t,u){let n=pu(e,{endCharacter:u}),r=Tc(n),D=new Map,o,i=!1,s,a,l,c=0,h="",d=!1;for(let[F,C]of n.entries()){let f=vc(C,c,u);if(f&&C.type!=="character"&&r[F]&&(f=!1),f&&C.type==="character"&&!C.isGraphemeContinuation){if(o&&!i){let p={activeHyperlink:o,activeHyperlinkHasVisibleText:i,activeHyperlinkOutputIndex:s,pendingSgrOutputIndex:a,returnValue:h};UD(p),{activeHyperlink:o,activeHyperlinkHasVisibleText:i,activeHyperlinkOutputIndex:s,pendingSgrOutputIndex:a,returnValue:h}=p}a!==void 0&&(h=h.slice(0,a),D=l,a=void 0,l=void 0);break}({activeStyles:D,activeHyperlink:o,activeHyperlinkHasVisibleText:i,activeHyperlinkOutputIndex:s,pendingSgrOutputIndex:a,pendingSgrActiveStyles:l,position:c,returnValue:h,include:d}=_c({token:C,isPastEnd:f,start:t,activeStyles:D,activeHyperlink:o,activeHyperlinkHasVisibleText:i,activeHyperlinkOutputIndex:s,pendingSgrOutputIndex:a,pendingSgrActiveStyles:l,position:c,returnValue:h,include:d}))}return d?(o&&(h+=bc(o)),h+=Bc(D),h):""}var Ic=new Intl.Segmenter,jD=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Mark}|\\p{Surrogate})+$","v"),Pc=new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+","v"),Mc=new RegExp("^\\p{RGI_Emoji}$","v"),Oc=/^[\d#*]\u20E3$/,Lc=new RegExp("\\p{Extended_Pictographic}","gu");function Nc(e){if(e.length>50)return!1;if(Oc.test(e))return!0;if(e.includes("\u200D")){let t=e.match(Lc);return t!==null&&t.length>=2}return!1}function $c(e){return e.replace(Pc,"")}function Uc(e){return jD.test(e)}function WD(e){return e>=4352&&e<=4447||e>=43360&&e<=43388}function GD(e){return e>=4448&&e<=4519||e>=55216&&e<=55238}function qD(e){return e>=4520&&e<=4607||e>=55243&&e<=55291}function jc(e){return WD(e)||GD(e)||qD(e)}function Wc(e,t){let u=[];for(let r of e)jD.test(r)||u.push(r.codePointAt(0));if(u.length===0)return;let n=0;for(let r=0;r<u.length;r++){let D=u[r];if(!jc(D)){if(n===0)return;for(let o=r;o<u.length;o++)n+=z(u[o],t);return n}if(WD(D)&&GD(u[r+1])){n+=2,r+=qD(u[r+2])?2:1;continue}n+=z(D,t)}return n}function Gc(e,t){let u=0,n=!0;for(let r of e){if(n){n=!1;continue}r>="\uFF00"&&r<="\uFFEF"&&(u+=z(r.codePointAt(0),t))}return u}function G(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:u=!0,countAnsiEscapeCodes:n=!1}=t,r=e;if(!n&&(r.includes("\x1B")||r.includes("\x9B"))&&(r=K(r)),r.length===0)return 0;if(/^[\u0020-\u007E]*$/.test(r))return r.length;let D=0,o={ambiguousAsWide:!u};for(let{segment:i}of Ic.segment(r)){if(Uc(i))continue;if(Mc.test(i)||Nc(i)){D+=2;continue}let s=$c(i),a=Wc(s,o);if(a!==void 0){D+=a;continue}let l=s.codePointAt(0);D+=z(l,o),D+=Gc(s,o)}return D}function dt(e,t,u){if(e.charAt(t)===" ")return t;let n=u?1:-1;for(let r=0;r<=3;r++){let D=t+r*n;if(e.charAt(D)===" ")return D}return t}function me(e,t,u={}){let{position:n="end",space:r=!1,preferTruncationOnSpace:D=!1}=u,{truncationCharacter:o="\u2026"}=u;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof e}`);if(typeof t!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof t}`);if(t<1)return"";let i=G(e);if(i<=t)return e;if(t===1)return o;let s={ESC:27,LEFT_BRACKET:91,LETTER_M:109},a=F=>F>=48&&F<=57||F===59;function l(F){let C=0;for(;C+2<F.length&&F.codePointAt(C)===s.ESC&&F.codePointAt(C+1)===s.LEFT_BRACKET;){let f=C+2;for(;f<F.length&&a(F.codePointAt(f));)f++;if(f<F.length&&F.codePointAt(f)===s.LETTER_M){C=f+1;continue}break}return C}function c(F){let C=F.length;for(;C>1&&F.codePointAt(C-1)===s.LETTER_M;){let f=C-2;for(;f>=0&&a(F.codePointAt(f));)f--;if(f>=1&&F.codePointAt(f-1)===s.ESC&&F.codePointAt(f)===s.LEFT_BRACKET){C=f-1;continue}break}return C}function h(F,C){let f=c(F);return f===F.length?F+C:F.slice(0,f)+C+F.slice(f)}function d(F,C){let f=l(C);return f===0?F+C:C.slice(0,f)+F+C.slice(f)}if(n==="start"){if(D){let C=dt(e,i-t+1,!0),f=H(e,C,i).trim();return d(o,f)}r&&(o+=" ");let F=H(e,i-t+G(o),i);return d(o,F)}if(n==="middle"){r&&(o=` ${o} `);let F=Math.floor(t/2);if(D){let C=dt(e,F),f=dt(e,i-(t-F)+1,!0);return H(e,0,C)+o+H(e,f,i).trim()}return H(e,0,F)+o+H(e,i-(t-F)+G(o),i)}if(n==="end"){if(D){let C=dt(e,t-1),f=H(e,0,C);return h(f,o)}r&&(o=` ${o}`);let F=H(e,0,t-G(o));return h(F,o)}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${n}`)}var fu=300*60*1e3;function qc(e,t=fu){if(e.length===0)return[];let u=[...e].sort((i,s)=>i.timestamp.localeCompare(s.timestamp)),n=[],r=null,D=0,o=Date.now();for(let i of u){let s=new Date(i.timestamp).getTime();(!r||s-D>=t)&&(D=s,r={id:i.timestamp,startTime:i.timestamp,endTime:new Date(s+t).toISOString(),actualEndTime:i.timestamp,isActive:!1,inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,totalTokens:0,cost:0,saved:0,models:[],requests:0},n.push(r));let a=De(i);r.inputTokens+=i.usage.input_tokens,r.outputTokens+=i.usage.output_tokens,r.cacheReadTokens+=i.usage.cache_read_input_tokens,r.cacheCreationTokens+=i.usage.cache_creation_input_tokens,r.totalTokens=r.inputTokens+r.outputTokens+r.cacheReadTokens+r.cacheCreationTokens,r.cost+=a.total,r.saved+=a.saved,r.requests+=1,r.actualEndTime=i.timestamp,r.models.includes(i.model)||r.models.push(i.model)}for(let i of n){let s=new Date(i.endTime).getTime();i.isActive=o<s}return n}function Hc(e,t=fu){return qc(e,t).find(r=>r.isActive)??null}function HD(e,t=fu){let u=Hc(e,t);if(!u)return{block:null,windowMs:t,elapsedMs:0,remainingMs:0,progress:0,burnRatePerMin:0,costPerMin:0,projectedTotal:0,projectedCost:0};let n=Date.now(),r=new Date(u.startTime).getTime(),D=new Date(u.endTime).getTime(),o=n-r,i=Math.max(0,D-n),s=Math.min(1,o/t),a=o/6e4,l=a>0?u.totalTokens/a:0,c=a>0?u.cost/a:0,h=t/6e4;return{block:u,windowMs:t,elapsedMs:o,remainingMs:i,progress:s,burnRatePerMin:l,costPerMin:c,projectedTotal:l*h,projectedCost:c*h}}function VD(e,t){let u=t.source==="all"?e:e.filter(f=>f.source===t.source);if(u.length===0)return{sessions:0,messages:0,totalTokens:0,activeDays:0,currentStreak:0,longestStreak:0,peakHour:-1,favoriteModel:null,heatmap:ht(),heatmapMax:0,tokenHeatmap:ht(),tokensSummed:0};let n=new Set,r=new Set,D=new Array(24).fill(0),o=new Map,i=ht(),s=ht(),a=0,l=0;for(let f of u){f.sessionId&&n.add(f.sessionId);let p=new Date(f.timestamp);if(Number.isNaN(p.getTime()))continue;let g=Vc(p);r.add(g);let B=p.getDay(),m=p.getHours();D[m]+=1,i[B][m]+=1,o.set(f.model,(o.get(f.model)??0)+1);let b=f.usage,k=b.input_tokens+b.output_tokens+b.cache_read_input_tokens+b.cache_creation_input_tokens;s[B][m]+=k,a+=k,l+=1}let c=Kc(D),h=zc(o),{current:d,longest:F}=Yc(r,t.streakWindowDays??365),C=0;for(let f of i)for(let p of f)p>C&&(C=p);return{sessions:n.size,messages:l,totalTokens:a,activeDays:r.size,currentStreak:d,longestStreak:F,peakHour:c,favoriteModel:h,heatmap:i,heatmapMax:C,tokenHeatmap:s,tokensSummed:a}}function ht(){return Array.from({length:7},()=>new Array(24).fill(0))}function Vc(e){let t=e.getFullYear(),u=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${u}-${n}`}function Kc(e){let t=-1,u=-1;for(let n=0;n<e.length;n+=1)e[n]>u&&(u=e[n],t=n);return t}function zc(e){let t=null,u=-1;for(let[n,r]of e)r>u&&(t=n,u=r);return t}function Yc(e,t){if(e.size===0)return{current:0,longest:0};let u=Array.from(e).map(c=>new Date(c+"T00:00:00").getTime()).filter(c=>Number.isFinite(c)).sort((c,h)=>c-h),n=1,r=1;for(let c=1;c<u.length;c+=1)u[c]-u[c-1]===864e5?(r+=1,r>n&&(n=r)):r=1;let D=Jc(Date.now()),o=u[u.length-1];if(D-o>864e5)return{current:0,longest:n};let i=o,s=0,a=0,l=new Set(u);for(;a<t&&l.has(i);)s+=1,i-=864e5,a+=1;return{current:s,longest:n}}function Jc(e){let t=new Date(e);return t.setHours(0,0,0,0),t.getTime()}var Z={brand:[129,140,248],green:[34,197,94],red:[239,68,68],yellow:[234,179,8],cyan:[34,211,238],input:[96,165,250],cacheWrite:[167,139,250],cacheRead:[52,211,153],output:[251,146,60]};function KD(e){let t=new Xe({level:e?3:0}),u=n=>e?r=>t.rgb(n[0],n[1],n[2])(r):r=>r;return{reset:e?"\x1B[0m":"",bold:n=>t.bold(n),dim:n=>t.dim(n),brand:u(Z.brand),green:u(Z.green),red:u(Z.red),yellow:u(Z.yellow),cyan:u(Z.cyan),input:u(Z.input),cacheWrite:u(Z.cacheWrite),cacheRead:u(Z.cacheRead),output:u(Z.output)}}function pt(e){return G(e)}function ft(e,t,u=" "){let n=t-G(e);return n>0?e+u.repeat(n):e}function Ee(e,t,u=" "){let n=t-G(e);return n>0?u.repeat(n)+e:e}function Cu(e,t,u=" "){let n=t-G(e);if(n<=0)return e;let r=Math.floor(n/2),D=n-r;return u.repeat(r)+e+u.repeat(D)}var Xc=["","\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u2588"];function Ct(e,t,u){if(t<=0||!Number.isFinite(e)||e<=0)return" ".repeat(Math.max(0,t));let r=Math.min(1,e)*t,D=Math.floor(r),o=r-D,i=Math.round(o*8),s="\u2588".repeat(D);i>0&&D<t&&(s+=Xc[i]);let a=ft(s,t," ");return u?u(a):a}var Zc=["\u2581","\u2582","\u2583","\u2584","\u2585","\u2586","\u2587","\u2588"];function je(e,t,u){if(t<=0)return"";if(e.length===0)return u?u("\u2500".repeat(t)):"\u2500".repeat(t);let n=[];if(e.length===t)n.push(...e);else if(e.length>t){let o=e.length/t;for(let i=0;i<t;i+=1){let s=Math.floor(i*o),a=Math.floor((i+1)*o),l=0,c=0;for(let h=s;h<Math.min(a,e.length);h+=1)l+=e[h],c+=1;n.push(c>0?l/c:0)}}else{let o=t-e.length;for(let i=0;i<o;i+=1)n.push(0);n.push(...e)}let r=Math.max(...n,0);if(r<=0){let o="\u2500".repeat(t);return u?u(o):o}let D=n.map(o=>Zc[Math.min(7,Math.max(0,Math.round(o/r*7)))]).join("");return u?u(D):D}var Qc=["","\u2581","\u2582","\u2583","\u2584","\u2585","\u2586","\u2587","\u2588"];function zD(e,t,u){let n=new Array(t).fill(" ");if(t<=0||u<=0)return n;let r=e.reduce((l,c)=>l+Math.max(0,c.value),0);if(r<=0)return n;let D=r/u*t*8,o=t*8,i=Math.min(D,o),s=i,a=0;for(let l of e){if(l.value<=0||s<=0)continue;let c=Math.min(s,l.value/r*i),h=a,d=a+c,F=Math.floor(h/8),C=Math.min(t-1,Math.floor((d-1e-4)/8));for(let f=F;f<=C;f+=1){let p=f*8,g=Math.max(0,h-p),B=Math.min(8,d-p),m;if(B>=8)m="\u2588";else if(g<=0){let b=Math.max(1,Math.round(B));m=Qc[Math.min(8,b)]||"\u2581"}else m="\u2588";n[t-1-f]=l.color?l.color(m):m}s-=c,a=d}return n}function XD(e,t,u,n){let r=u.width??process.stdout.columns??100,D=u.color!==!1;Y.level=D?3:0;let o=KD(D);if(r<80)return[`[ccgauge] terminal width (${r}) is below the dashboard's 80-column floor.`,"Resize wider for the rich layout, or omit --dashboard for the standard report.","",...gu(t,u).split(`
23
23
  `)].join(`
24
- `);let i=r-4,s=[];return u.banner!==!1&&(s.push(...gc(o,i,t)),s.push("")),s.push(...Bc(o,i,e,t)),s.push(""),u.compact!==!0&&t.trend.length>0&&(s.push(...Rc(o,i,t)),s.push("")),s.push(...yc(o,i,t)),s.push(""),s.push(...xc(o,i,n)),s.push(""),s.push(...wc(o,n,t,u)),s.map(a=>" "+a).join(`
25
- `)}function gc(e,t,u){let n=`${e.brand(e.bold("ccgauge"))} ${e.dim(I.line)} ${e.bold("dashboard")}`,r=e.dim([`range: ${u.range}`,`source: ${u.source}`,`by: ${u.by}`,`generated ${new Date(u.generatedAt).toLocaleString()}`].join(` ${I.bullet} `)),D=pt(n),o=pt(r),i=Math.max(2,t-D-o);return[`${n}${" ".repeat(i)}${r}`]}function Ec(e,t){function u(D){return LD(e.filter(o=>o.source===D),De(D).capabilities.blockWindowMs)}if(t==="claude")return u("claude");if(t==="codex")return u("codex");let n=u("claude");if(n.block)return n;let r=u("codex");return r.block?r:n}function Bc(e,t,u,n){let r=n.totals,D=n.trend.map(d=>d.tokens),o=n.trend.map(d=>d.cost),i=n.trend.map(d=>Math.max(0,d.cost-d.cost*.95)),s=n.trend.map(d=>d.turns),a=r.input+r.cacheRead+r.cacheWrite,F=a>0?r.cacheRead/a:0,c=Ec(u.records,n.source),h=[{label:"Total tokens",value:e.bold(v(r.total)),sub:`${r.requests.toLocaleString()} reqs \xB7 ${r.turns.toLocaleString()} convs`,spark:We(D,14,e.input)},{label:"Cost",value:e.bold(N(r.cost)),sub:r.cost>0?`${N(r.cost/Math.max(1,r.requests))} / req`:"\u2014",spark:We(o,14,e.output)},{label:"Cache saved",value:e.bold(e.green(N(r.saved))),sub:"vs full input pricing",spark:We(i,14,e.green)},{label:"Cache hit",value:e.bold(e.green(he(F,0))),spark:Ct(F,14,e.green),sub:`${v(r.cacheRead)} cached`},{label:"Conversations",value:e.bold(r.turns.toLocaleString()),sub:r.requests>0?`${(r.requests/Math.max(1,r.turns)).toFixed(1)} reqs/turn`:"\u2014",spark:We(s,14,e.cacheRead)},{label:"Active 5h block",value:c?.block?e.bold(tn(c.remainingMs)):e.dim("idle"),spark:c?.block?Ct(c.progress,14,e.yellow):void 0,sub:c?.block?`${he(c.progress,0)} elapsed`:"no active window"}];return bc(h,e,t)}function bc(e,t,u){let o=Math.max(1,Math.floor((u+1)/27)),i=[];for(let s=0;s<e.length;s+=o){let F=e.slice(s,s+o).map(c=>Ac(c,22,t));i.push(...qD(F,1).split(`
26
- `)),s+o<e.length&&i.push("")}return i}function Ac(e,t,u){let n=t,r=[u.dim(e.label.toUpperCase()),"",Ee(e.value,n),e.spark?Ee(e.spark,n):"",u.dim(Ee(e.sub,n))].join(`
27
- `);return Yt(r,{padding:{top:0,right:1,bottom:0,left:1},borderStyle:"round",borderColor:"#5a5a64",width:t+4,textAlignment:"left"})}function qD(e,t){let u=e.map(i=>i.split(`
28
- `)),n=Math.max(...u.map(i=>i.length)),r=u.map(i=>Math.max(...i.map(pt))),D=" ".repeat(t),o=[];for(let i=0;i<n;i+=1){let s=u.map((a,F)=>ft(a[i]??"",r[F]));o.push(s.join(D))}return o.join(`
29
- `)}function Rc(e,t,u){let n=u.trend,r=10,D=Math.max(4,Math.min(8,Math.floor((t-8)/Math.max(1,n.length)))),o=Math.max(...n.map(p=>p.input+p.output+p.cacheRead+p.cacheWrite),1),i=`${e.brand(I.pointerSmall)} ${e.bold("Token usage trend")} ${e.dim(`(${u.gran} ${I.bullet} stacked: input / cache-w / cache-r / output)`)}`,s=n.map(p=>UD([{value:p.input,color:e.input},{value:p.cacheWrite,color:e.cacheWrite},{value:p.cacheRead,color:e.cacheRead},{value:p.output,color:e.output}],r,o)),a=[Be(v(o),7),Be(v(o/2),7),Be("0",7)],F=p=>p===0?a[0]:p===Math.floor((r-1)/2)?a[1]:p===r-1?a[2]:" ".repeat(7),c=[i,""];for(let p=0;p<r;p+=1){let m=s.map(B=>fu(B[p],D));c.push(`${e.dim(F(p))} ${e.dim("\u2502")} ${m.join("")}`)}let h="\u2500".repeat(Math.min(t-9,D*n.length));c.push(`${" ".repeat(7)} ${e.dim("\u2514")}${e.dim(h)}`);let d=n[0]?.label??"",l=Math.max(1,Math.ceil((d.length+1)/D)),C=n.map((p,m)=>{if(m%l!==0)return" ".repeat(D);let B=D*Math.min(l,n.length-m);return fu(p.label,B)}),f="";for(let p=0;p<C.length;p+=1)p%l===0&&(f+=C[p]);return c.push(`${" ".repeat(8)} ${e.dim(f)}`),c.push(""),c.push(`${" ".repeat(8)}${e.input(I.circleFilled)} input ${e.cacheWrite(I.circleFilled)} cache-write ${e.cacheRead(I.circleFilled)} cache-read ${e.output(I.circleFilled)} output`),c}function yc(e,t,u){let n=u.breakdown.slice(0,8),r=Math.floor((t-2)/2),D=WD(e,r,`Top ${u.by}s by cost`,n,"cost",u.totals.cost),o=WD(e,r,`Top ${u.by}s by conversations`,n.slice().sort((i,s)=>s.turns-i.turns).slice(0,8),"turns",Math.max(1,...n.map(i=>i.turns)));return qD([D,o],2).split(`
30
- `)}function WD(e,t,u,n,r,D){let o=`${e.brand(I.pointerSmall)} ${e.bold(u)}`;if(n.length===0)return[o,e.dim(" (no data in this window)")].join(`
31
- `);let i=new jD.default({head:[e.dim("#"),e.dim("Item"),e.dim("Conv"),e.dim("Reqs"),e.dim("Tokens"),e.dim("Cost")],style:{head:[],border:["gray"],"padding-left":1,"padding-right":1},chars:{top:"\u2500","top-mid":"\u252C","top-left":"\u256D","top-right":"\u256E",bottom:"\u2500","bottom-mid":"\u2534","bottom-left":"\u2570","bottom-right":"\u256F",left:"\u2502","left-mid":"\u251C",mid:"\u2500","mid-mid":"\u253C",right:"\u2502","right-mid":"\u2524",middle:"\u2502"},wordWrap:!1,colAligns:["right","left","right","right","right","right"]});return n.forEach((s,a)=>{let F=Ee(s.label,Math.max(8,t-40)),c=r==="cost"?s.cost/Math.max(1e-9,D):s.turns/Math.max(1e-9,D),h=Math.max(8,Math.min(24,t-40)),d=Ct(c,h,e.brand);i.push([String(a+1),`${F}
24
+ `);let i=r-4,s=[];return u.banner!==!1&&(s.push(...el(o,i,t)),s.push("")),s.push(...ul(o,i,e,t)),s.push(""),u.compact!==!0&&t.trend.length>0&&(s.push(...Dl(o,i,t)),s.push("")),s.push(...ol(o,i,t)),s.push(""),s.push(...il(o,i,n)),s.push(""),s.push(...sl(o,n,t,u)),s.map(a=>" "+a).join(`
25
+ `)}function el(e,t,u){let n=`${e.brand(e.bold("ccgauge"))} ${e.dim(I.line)} ${e.bold("dashboard")}`,r=e.dim([`range: ${u.range}`,`source: ${u.source}`,`by: ${u.by}`,`generated ${new Date(u.generatedAt).toLocaleString()}`].join(` ${I.bullet} `)),D=pt(n),o=pt(r),i=Math.max(2,t-D-o);return[`${n}${" ".repeat(i)}${r}`]}function tl(e,t){function u(D){return HD(e.filter(o=>o.source===D),re(D).capabilities.blockWindowMs)}if(t==="claude")return u("claude");if(t==="codex")return u("codex");let n=u("claude");if(n.block)return n;let r=u("codex");return r.block?r:n}function ul(e,t,u,n){let r=n.totals,D=n.trend.map(d=>d.tokens),o=n.trend.map(d=>d.cost),i=n.trend.map(d=>Math.max(0,d.cost-d.cost*.95)),s=n.trend.map(d=>d.turns),a=r.input+r.cacheRead+r.cacheWrite,l=a>0?r.cacheRead/a:0,c=tl(u.records,n.source),h=[{label:"Total tokens",value:e.bold(v(r.total)),sub:`${r.requests.toLocaleString()} reqs \xB7 ${r.turns.toLocaleString()} convs`,spark:je(D,14,e.input)},{label:"Cost",value:e.bold(N(r.cost)),sub:r.cost>0?`${N(r.cost/Math.max(1,r.requests))} / req`:"\u2014",spark:je(o,14,e.output)},{label:"Cache saved",value:e.bold(e.green(N(r.saved))),sub:"vs full input pricing",spark:je(i,14,e.green)},{label:"Cache hit",value:e.bold(e.green(de(l,0))),spark:Ct(l,14,e.green),sub:`${v(r.cacheRead)} cached`},{label:"Conversations",value:e.bold(r.turns.toLocaleString()),sub:r.requests>0?`${(r.requests/Math.max(1,r.turns)).toFixed(1)} reqs/turn`:"\u2014",spark:je(s,14,e.cacheRead)},{label:"Active 5h block",value:c?.block?e.bold(Dn(c.remainingMs)):e.dim("idle"),spark:c?.block?Ct(c.progress,14,e.yellow):void 0,sub:c?.block?`${de(c.progress,0)} elapsed`:"no active window"}];return nl(h,e,t)}function nl(e,t,u){let o=Math.max(1,Math.floor((u+1)/27)),i=[];for(let s=0;s<e.length;s+=o){let l=e.slice(s,s+o).map(c=>rl(c,22,t));i.push(...ZD(l,1).split(`
26
+ `)),s+o<e.length&&i.push("")}return i}function rl(e,t,u){let n=t,r=[u.dim(e.label.toUpperCase()),"",me(e.value,n),e.spark?me(e.spark,n):"",u.dim(me(e.sub,n))].join(`
27
+ `);return Jt(r,{padding:{top:0,right:1,bottom:0,left:1},borderStyle:"round",borderColor:"#5a5a64",width:t+4,textAlignment:"left"})}function ZD(e,t){let u=e.map(i=>i.split(`
28
+ `)),n=Math.max(...u.map(i=>i.length)),r=u.map(i=>Math.max(...i.map(pt))),D=" ".repeat(t),o=[];for(let i=0;i<n;i+=1){let s=u.map((a,l)=>ft(a[i]??"",r[l]));o.push(s.join(D))}return o.join(`
29
+ `)}function Dl(e,t,u){let n=u.trend,r=10,D=Math.max(4,Math.min(8,Math.floor((t-8)/Math.max(1,n.length)))),o=Math.max(...n.map(p=>p.input+p.output+p.cacheRead+p.cacheWrite),1),i=`${e.brand(I.pointerSmall)} ${e.bold("Token usage trend")} ${e.dim(`(${u.gran} ${I.bullet} stacked: input / cache-w / cache-r / output)`)}`,s=n.map(p=>zD([{value:p.input,color:e.input},{value:p.cacheWrite,color:e.cacheWrite},{value:p.cacheRead,color:e.cacheRead},{value:p.output,color:e.output}],r,o)),a=[Ee(v(o),7),Ee(v(o/2),7),Ee("0",7)],l=p=>p===0?a[0]:p===Math.floor((r-1)/2)?a[1]:p===r-1?a[2]:" ".repeat(7),c=[i,""];for(let p=0;p<r;p+=1){let g=s.map(B=>Cu(B[p],D));c.push(`${e.dim(l(p))} ${e.dim("\u2502")} ${g.join("")}`)}let h="\u2500".repeat(Math.min(t-9,D*n.length));c.push(`${" ".repeat(7)} ${e.dim("\u2514")}${e.dim(h)}`);let d=n[0]?.label??"",F=Math.max(1,Math.ceil((d.length+1)/D)),C=n.map((p,g)=>{if(g%F!==0)return" ".repeat(D);let B=D*Math.min(F,n.length-g);return Cu(p.label,B)}),f="";for(let p=0;p<C.length;p+=1)p%F===0&&(f+=C[p]);return c.push(`${" ".repeat(8)} ${e.dim(f)}`),c.push(""),c.push(`${" ".repeat(8)}${e.input(I.circleFilled)} input ${e.cacheWrite(I.circleFilled)} cache-write ${e.cacheRead(I.circleFilled)} cache-read ${e.output(I.circleFilled)} output`),c}function ol(e,t,u){let n=u.breakdown.slice(0,8),r=Math.floor((t-2)/2),D=YD(e,r,`Top ${u.by}s by cost`,n,"cost",u.totals.cost),o=YD(e,r,`Top ${u.by}s by conversations`,n.slice().sort((i,s)=>s.turns-i.turns).slice(0,8),"turns",Math.max(1,...n.map(i=>i.turns)));return ZD([D,o],2).split(`
30
+ `)}function YD(e,t,u,n,r,D){let o=`${e.brand(I.pointerSmall)} ${e.bold(u)}`;if(n.length===0)return[o,e.dim(" (no data in this window)")].join(`
31
+ `);let i=new JD.default({head:[e.dim("#"),e.dim("Item"),e.dim("Conv"),e.dim("Reqs"),e.dim("Tokens"),e.dim("Cost")],style:{head:[],border:["gray"],"padding-left":1,"padding-right":1},chars:{top:"\u2500","top-mid":"\u252C","top-left":"\u256D","top-right":"\u256E",bottom:"\u2500","bottom-mid":"\u2534","bottom-left":"\u2570","bottom-right":"\u256F",left:"\u2502","left-mid":"\u251C",mid:"\u2500","mid-mid":"\u253C",right:"\u2502","right-mid":"\u2524",middle:"\u2502"},wordWrap:!1,colAligns:["right","left","right","right","right","right"]});return n.forEach((s,a)=>{let l=me(s.label,Math.max(8,t-40)),c=r==="cost"?s.cost/Math.max(1e-9,D):s.turns/Math.max(1e-9,D),h=Math.max(8,Math.min(24,t-40)),d=Ct(c,h,e.brand);i.push([String(a+1),`${l}
32
32
  ${d}`,s.turns.toLocaleString(),s.requests.toLocaleString(),v(s.tokens),N(s.cost)])}),[o,"",i.toString()].join(`
33
- `)}function xc(e,t,u){let n=ND(u,{source:"all"}),r=n.heatmap,D=n.heatmapMax;if(D===0)return[`${e.brand(I.pointerSmall)} ${e.bold("Activity heatmap")}`,"",e.dim(" (no activity yet \u2014 start a session and re-run)")];let o=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],i=c=>{if(c===0)return e.dim("\xB7");let h=c/D;return h<.2?e.input("\u2591"):h<.4?e.input("\u2592"):h<.6?e.cacheRead("\u2592"):h<.8?e.cacheRead("\u2593"):e.output("\u2588")},s=`${e.brand(I.pointerSmall)} ${e.bold("Activity heatmap")} ${e.dim("(local time, day-of-week \xD7 hour)")}`,a=" "+Array.from({length:24},(c,h)=>Be(String(h),2)).join(" "),F=[s,"",e.dim(a)];for(let c=0;c<7;c+=1){let h=(c+1)%7,l=(r[h]??new Array(24).fill(0)).map(C=>Be(i(C),2)).join(" ");F.push(`${e.dim(ft(o[c],4))} ${l}`)}return F}function wc(e,t,u,n){let r=[];if(n.model&&r.push(`model~${n.model}`),n.project&&r.push(`project~${n.project}`),u.fromIso||u.untilIso){let o=`${u.fromIso?.slice(0,10)??"\u2026"} \u2192 ${u.untilIso?.slice(0,10)??"\u2026"}`;r.push(o)}let D=[`range: ${u.range}`,`source: ${u.source}`,`scope: ${t.length.toLocaleString()} records \xB7 ${u.totals.turns.toLocaleString()} conversations`];return r.length>0&&D.push(`filters: ${r.join(", ")}`),[e.dim(D.join(` ${I.bullet} `)),e.dim(`${I.info} Use ${e.cyan("`ccgauge report`")} for a CI-friendly text summary, or ${e.cyan("`ccgauge report -d --json`")} to pipe.`)]}var gu=["today","1d","7d","30d","90d","all"],KD=["model","project","session"],kc=/^(\d{4})-(\d{2})-(\d{2})$/,Sc={range:"7d",source:"all",by:"model",gran:"day",limit:10,json:!1,color:!0,showTrend:!0,showBreakdown:!0,dashboard:!1,compact:!1,banner:!0};async function _d(e){let t=_c(e),u=await Qu(),n=t.source==="all"?At:[t.source],r=Mc(u,n,t);if(t.json)return JSON.stringify(r,null,2);if(t.dashboard){let D=Tc(u,n,t);return GD(u,r,t,D)}return Cu(r,t)}function Tc(e,t,u){let n=Eu(u),r=n.from?.toISOString(),D=n.until?.toISOString(),o=new Set(t),i=u.model?.toLowerCase(),s=u.project?.toLowerCase();return e.records.filter(a=>{if(!o.has(a.source)||r&&a.timestamp<r||D&&a.timestamp>D||i&&!a.model.toLowerCase().includes(i))return!1;if(s){let F=(a.cwd||"").toLowerCase(),c=F.split(/[/\\]+/).pop()??"";if(!F.includes(s)&&!c.includes(s))return!1}return!0})}function _c(e){let t={...Sc,...e};if(!vc(t.range))throw new Error(je("range",t.range,gu));if(t.source!=="all"&&!Wu(t.source))throw new Error(je("source",t.source,["claude","codex","all"]));if(!Ic(t.by))throw new Error(je("by",t.by,KD));if(!Dn(t.gran))throw new Error(je("gran",t.gran,["hour","day","week","month"]));t.since&&gt(t.since,"since"),t.until&&gt(t.until,"until");let u=Eu(t);if(u.from&&u.until&&u.from.getTime()>u.until.getTime())throw new Error("invalid date range: --since must be before or equal to --until");return t}function vc(e){return typeof e=="string"&&gu.includes(e)}function Ic(e){return typeof e=="string"&&KD.includes(e)}function je(e,t,u){return`invalid ${e}: ${JSON.stringify(t)}. Expected one of: ${u.join(", ")}`}function Mc(e,t,u){let n=e.records,r=Eu(u),D={from:r.from??void 0,to:r.until??void 0},o={input:0,output:0,reasoning:0,cacheRead:0,cacheWrite:0,total:0,cost:0,saved:0,requests:0,turns:0},i=new Map;for(let F of t){let c={...D,source:F},h=n.filter(p=>mt(p,c,u)),d=ln(h,c);o.input+=d.inputTokens,o.output+=d.outputTokens,o.cacheRead+=d.cacheReadTokens,o.cacheWrite+=d.cacheCreationTokens,o.total+=d.totalTokens,o.cost+=d.cost,o.saved+=d.saved,o.requests+=d.requests;for(let p of h)o.reasoning+=p.usage.reasoning_tokens??0;let l=xe(h,e.userRecords,e.parentMap);o.turns+=l.size;let C=new Map;for(let p of l.values()){let{key:m}=kt(p.firstTimestamp,u.gran);C.set(m,(C.get(m)??0)+1)}let f=on(h,u.gran,c);for(let p of f){let m=i.get(p.key),B=C.get(p.key)??0;m?(m.cost+=p.cost,m.tokens+=p.totalTokens,m.turns+=B,m.input+=p.inputTokens,m.output+=p.outputTokens,m.cacheRead+=p.cacheReadTokens,m.cacheWrite+=p.cacheCreationTokens):i.set(p.key,{label:p.label,cost:p.cost,tokens:p.totalTokens,turns:B,input:p.inputTokens,output:p.outputTokens,cacheRead:p.cacheReadTokens,cacheWrite:p.cacheCreationTokens})}}let s=Array.from(i.entries()).sort(([F],[c])=>F.localeCompare(c)).map(([,F])=>F),a=Pc(e,t,D,u);return{generatedAt:new Date().toISOString(),range:u.range,source:u.source,by:u.by,gran:u.gran,fromIso:r.from?.toISOString()??null,untilIso:r.until?.toISOString()??null,totals:o,trend:s,breakdown:a}}function Pc(e,t,u,n){let r=e.records;if(n.by==="model"){let o=[];for(let i of t){let s={...u,source:i},a=r.filter(d=>mt(d,s,n)),F=sn(a,s),c=De(i),h=new Map;for(let d of xe(a,e.userRecords,e.parentMap).values())h.set(d.firstModel,(h.get(d.firstModel)??0)+1);for(let d of F)o.push({key:`${i}::${d.model}`,label:c.shortenModel(d.model),requests:d.requests,turns:h.get(d.model)??0,tokens:d.totalTokens,cost:d.cost,share:0,sub:d.model})}return mu(o,n.limit)}if(n.by==="project"){let o=[];for(let i of t){let s={...u,source:i},a=r.filter(h=>mt(h,s,n)),F=an(a,s),c=new Map;for(let h of xe(a,e.userRecords,e.parentMap).values()){let d=h.cwd||"(unknown)";c.set(d,(c.get(d)??0)+1)}for(let h of F)o.push({key:`${i}::${h.cwd}`,label:h.projectName,requests:h.requests,turns:c.get(h.cwd)??0,tokens:h.totalTokens,cost:h.cost,share:0,sub:h.cwd})}return mu(o,n.limit)}let D=[];for(let o of t){let i={...u,source:o},s=r.filter(c=>mt(c,i,n)),a=cn(s,[],i),F=new Map;for(let c of xe(s,e.userRecords,e.parentMap).values())F.set(c.sessionId,(F.get(c.sessionId)??0)+1);for(let c of a)D.push({key:`${o}::${c.sessionId}`,label:c.title??c.sessionId.slice(0,8),requests:c.requests,turns:F.get(c.sessionId)??0,tokens:c.totalTokens,cost:c.cost,share:0,sub:c.projectLabel})}return mu(D,n.limit)}function mu(e,t){let u=e.reduce((r,D)=>r+D.cost,0);e.sort((r,D)=>D.cost-r.cost);let n=e.slice(0,Math.max(1,t));if(u>0)for(let r of n)r.share=r.cost/u;return n}function mt(e,t,u){if(e.source!==t.source||t.from&&e.timestamp<t.from.toISOString()||t.to&&e.timestamp>t.to.toISOString()||u.model&&!e.model.toLowerCase().includes(u.model.toLowerCase()))return!1;if(u.project){let n=u.project.toLowerCase(),r=(e.cwd||"").toLowerCase(),D=r.split(/[/\\]+/).pop()??"";if(!r.includes(n)&&!D.includes(n))return!1}return!0}function Eu(e){if(e.since||e.until)return{from:e.since?gt(e.since,"since"):null,until:e.until?gt(e.until,"until"):null};let t=e.range==="today"?"1d":e.range;if(!Fn(t))throw new Error(je("range",e.range,gu));let u=dn(t);return{from:u.from??null,until:u.to??null}}function gt(e,t){let u=e.match(kc);if(u){let r=Number(u[1]),D=Number(u[2]),o=Number(u[3]),i=t==="since"?new Date(r,D-1,o,0,0,0,0):new Date(r,D-1,o,23,59,59,999);if(i.getFullYear()!==r||i.getMonth()!==D-1||i.getDate()!==o)throw new Error(`invalid ${t} date: ${e}`);return i}let n=new Date(e);if(Number.isNaN(n.getTime()))throw new Error(`invalid ${t} date: ${e}`);return n}function Oc(e){let t=u=>n=>e?`\x1B[${u}m${n}\x1B[0m`:String(n);return{bold:t("1"),dim:t("2"),cyan:t("36"),green:t("32"),yellow:t("33"),red:t("31"),blue:t("34"),magenta:t("35"),brand:t("38;2;129;140;248")}}function Cu(e,t){let u=Oc(t.color!==!1),n=[],r=new Date(e.generatedAt).toLocaleString();n.push(""),n.push(`${u.brand(u.bold("ccgauge"))} ${u.bold("report")}`),n.push(u.dim([`range: ${e.range}`,`source: ${e.source}`,`by: ${e.by}`,`gran: ${e.gran}`,`generated ${r}`].join(" \xB7 "))),n.push(""),n.push(u.brand("\u25B8")+" "+u.bold("Tokens"));let D=e.totals,o=[["Input",v(D.input),"Output",v(D.output)],["Cache R",u.green(v(D.cacheRead)),"Cache W",v(D.cacheWrite)]];D.reasoning>0&&o.push(["Reasoning",u.dim(v(D.reasoning)),"",""]),o.push(["Total",u.bold(v(D.total)),"",""]),o.push(["Convos",u.bold(D.turns.toLocaleString()),"Requests",D.requests.toLocaleString()]),n.push(HD(o,u)),n.push(""),n.push(u.brand("\u25B8")+" "+u.bold("Cost"));let i=D.input+D.cacheRead+D.cacheWrite,s=i>0?D.cacheRead/i:0,a=D.requests>0?D.cost/D.requests:0,F=[["Total",u.bold(N(D.cost)),"Saved by cache",u.green(N(D.saved))],["Avg / request",a<.01?`$${a.toFixed(4)}`:N(a),"Cache hit",u.green(he(s,1))]];if(n.push(HD(F,u)),n.push(""),t.showTrend!==!1&&e.trend.length>0){n.push(u.brand("\u25B8")+" "+u.bold("Trend")+" "+u.dim(`(${t.gran}, by cost)`));let c=Math.max(...e.trend.map(l=>l.cost),1e-9),h=Math.max(...e.trend.map(l=>l.label.length)),d=Math.max(...e.trend.map(l=>N(l.cost).length));for(let l of e.trend){let C=Nc(l.cost/c,44),f=l.label.padEnd(h),p=N(l.cost).padStart(d);n.push(` ${u.dim(f)} ${p} ${u.brand(C)}`)}n.push("")}if(t.showBreakdown!==!1&&e.breakdown.length>0){let c=e.by[0].toUpperCase()+e.by.slice(1);n.push(u.brand("\u25B8")+" "+u.bold(`Top ${e.breakdown.length} ${c}s`)+" "+u.dim("(by cost)"));let h=["#",c,"Convos","Reqs","Tokens","Cost","Share"],d=e.breakdown.map((l,C)=>[String(C+1),Wc(l.label,28),l.turns.toLocaleString(),l.requests.toLocaleString(),v(l.tokens),N(l.cost),he(l.share,1)]);n.push(Lc(h,d,u,[!1,!1,!0,!0,!0,!0,!0])),n.push("")}return n.join(`
34
- `)}function HD(e,t){let u=[0,0,0,0];for(let r of e)for(let D=0;D<4;D+=1){let o=r[D];qe(o)>u[D]&&(u[D]=qe(o))}let n=[];for(let[r,D,o,i]of e){let s=`${t.dim(Ge(r,u[0]))} ${Ge(D,u[1])}`,a=o?`${t.dim(Ge(o,u[2]))} ${i}`:"";n.push(` ${s} ${a}`.replace(/\s+$/,""))}return n.join(`
35
- `)}function Lc(e,t,u,n){let r=e.map((s,a)=>Math.max(s.length,...t.map(F=>qe(F[a]??"")))),D=" "+e.map((s,a)=>n[a]?VD(s,r[a]):Ge(s,r[a])).map(s=>u.dim(s)).join(" "),o=" "+r.map(s=>"\u2500".repeat(s)).map(s=>u.dim(s)).join(" "),i=t.map(s=>" "+s.map((a,F)=>n[F]?VD(a,r[F]):Ge(a,r[F])).join(" "));return[D,o,...i].join(`
36
- `)}function Nc(e,t){let u=Math.max(0,Math.min(1,e)),n=Math.round(u*t);return"\u2587".repeat(n)+"\u2500".repeat(t-n)}var $c="\x1B",Uc=new RegExp($c+"\\[[0-9;]*m","g");function qe(e){return e.replace(Uc,"").length}function Ge(e,t){return e+" ".repeat(Math.max(0,t-qe(e)))}function VD(e,t){return" ".repeat(Math.max(0,t-qe(e)))+e}function Wc(e,t){return e.length<=t?e:e.slice(0,t-1)+"\u2026"}export{Sc as DEFAULT_REPORT,Tc as filterRecordsForReport,Cu as renderText,_d as runReport};
33
+ `)}function il(e,t,u){let n=VD(u,{source:"all"}),r=n.heatmap,D=n.heatmapMax;if(D===0)return[`${e.brand(I.pointerSmall)} ${e.bold("Activity heatmap")}`,"",e.dim(" (no activity yet \u2014 start a session and re-run)")];let o=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],i=c=>{if(c===0)return e.dim("\xB7");let h=c/D;return h<.2?e.input("\u2591"):h<.4?e.input("\u2592"):h<.6?e.cacheRead("\u2592"):h<.8?e.cacheRead("\u2593"):e.output("\u2588")},s=`${e.brand(I.pointerSmall)} ${e.bold("Activity heatmap")} ${e.dim("(local time, day-of-week \xD7 hour)")}`,a=" "+Array.from({length:24},(c,h)=>Ee(String(h),2)).join(" "),l=[s,"",e.dim(a)];for(let c=0;c<7;c+=1){let h=(c+1)%7,F=(r[h]??new Array(24).fill(0)).map(C=>Ee(i(C),2)).join(" ");l.push(`${e.dim(ft(o[c],4))} ${F}`)}return l}function sl(e,t,u,n){let r=[];if(n.model&&r.push(`model~${n.model}`),n.project&&r.push(`project~${n.project}`),u.fromIso||u.untilIso){let o=`${u.fromIso?.slice(0,10)??"\u2026"} \u2192 ${u.untilIso?.slice(0,10)??"\u2026"}`;r.push(o)}let D=[`range: ${u.range}`,`source: ${u.source}`,`scope: ${t.length.toLocaleString()} records \xB7 ${u.totals.turns.toLocaleString()} conversations`];return r.length>0&&D.push(`filters: ${r.join(", ")}`),[e.dim(D.join(` ${I.bullet} `)),e.dim(`${I.info} Use ${e.cyan("`ccgauge report`")} for a CI-friendly text summary, or ${e.cyan("`ccgauge report -d --json`")} to pipe.`)]}var Eu=["today","1d","7d","30d","90d","all"],to=["model","project","session"],al=/^(\d{4})-(\d{2})-(\d{2})$/,cl={range:"7d",source:"all",by:"model",gran:"day",limit:10,json:!1,color:!0,showTrend:!0,showBreakdown:!0,dashboard:!1,compact:!1,banner:!0};async function wh(e){Bn();let t=Fl(e),u=await nn(),n=t.source==="all"?bt:[t.source],r=pl(u,n,t);if(t.json)return JSON.stringify(r,null,2);if(t.dashboard){let D=ll(u,n,t);return XD(u,r,t,D)}return gu(r,t)}function ll(e,t,u){let n=Bu(u),r=n.from?.toISOString(),D=n.until?.toISOString(),o=new Set(t),i=u.model?.toLowerCase(),s=u.project?.toLowerCase();return e.records.filter(a=>{if(!o.has(a.source)||r&&a.timestamp<r||D&&a.timestamp>D||i&&!a.model.toLowerCase().includes(i))return!1;if(s){let l=(a.cwd||"").toLowerCase(),c=l.split(/[/\\]+/).pop()??"";if(!l.includes(s)&&!c.includes(s))return!1}return!0})}function Fl(e){let t={...cl,...e};if(!dl(t.range))throw new Error(We("range",t.range,Eu));if(t.source!=="all"&&!Hu(t.source))throw new Error(We("source",t.source,["claude","codex","all"]));if(!hl(t.by))throw new Error(We("by",t.by,to));if(!cn(t.gran))throw new Error(We("gran",t.gran,["hour","day","week","month"]));t.since&&mt(t.since,"since"),t.until&&mt(t.until,"until");let u=Bu(t);if(u.from&&u.until&&u.from.getTime()>u.until.getTime())throw new Error("invalid date range: --since must be before or equal to --until");return t}function dl(e){return typeof e=="string"&&Eu.includes(e)}function hl(e){return typeof e=="string"&&to.includes(e)}function We(e,t,u){return`invalid ${e}: ${JSON.stringify(t)}. Expected one of: ${u.join(", ")}`}function pl(e,t,u){let n=e.records,r=Bu(u),D={from:r.from??void 0,to:r.until??void 0},o={input:0,output:0,reasoning:0,cacheRead:0,cacheWrite:0,total:0,cost:0,saved:0,requests:0,turns:0},i=new Map;for(let l of t){let c={...D,source:l},h=n.filter(p=>gt(p,c,u)),d=pn(h,c);o.input+=d.inputTokens,o.output+=d.outputTokens,o.cacheRead+=d.cacheReadTokens,o.cacheWrite+=d.cacheCreationTokens,o.total+=d.totalTokens,o.cost+=d.cost,o.saved+=d.saved,o.requests+=d.requests;for(let p of h)o.reasoning+=p.usage.reasoning_tokens??0;let F=xe(h,e.userRecords,e.parentMap);o.turns+=F.size;let C=new Map;for(let p of F.values()){let{key:g}=wt(p.firstTimestamp,u.gran);C.set(g,(C.get(g)??0)+1)}let f=ln(h,u.gran,c);for(let p of f){let g=i.get(p.key),B=C.get(p.key)??0;g?(g.cost+=p.cost,g.tokens+=p.totalTokens,g.turns+=B,g.input+=p.inputTokens,g.output+=p.outputTokens,g.cacheRead+=p.cacheReadTokens,g.cacheWrite+=p.cacheCreationTokens):i.set(p.key,{label:p.label,cost:p.cost,tokens:p.totalTokens,turns:B,input:p.inputTokens,output:p.outputTokens,cacheRead:p.cacheReadTokens,cacheWrite:p.cacheCreationTokens})}}let s=Array.from(i.entries()).sort(([l],[c])=>l.localeCompare(c)).map(([,l])=>l),a=fl(e,t,D,u);return{generatedAt:new Date().toISOString(),range:u.range,source:u.source,by:u.by,gran:u.gran,fromIso:r.from?.toISOString()??null,untilIso:r.until?.toISOString()??null,totals:o,trend:s,breakdown:a}}function fl(e,t,u,n){let r=e.records;if(n.by==="model"){let o=[];for(let i of t){let s={...u,source:i},a=r.filter(d=>gt(d,s,n)),l=Fn(a,s),c=re(i),h=new Map;for(let d of xe(a,e.userRecords,e.parentMap).values())h.set(d.firstModel,(h.get(d.firstModel)??0)+1);for(let d of l)o.push({key:`${i}::${d.model}`,label:c.shortenModel(d.model),requests:d.requests,turns:h.get(d.model)??0,tokens:d.totalTokens,cost:d.cost,share:0,sub:d.model})}return mu(o,n.limit)}if(n.by==="project"){let o=[];for(let i of t){let s={...u,source:i},a=r.filter(h=>gt(h,s,n)),l=dn(a,s),c=new Map;for(let h of xe(a,e.userRecords,e.parentMap).values()){let d=h.cwd||"(unknown)";c.set(d,(c.get(d)??0)+1)}for(let h of l)o.push({key:`${i}::${h.cwd}`,label:h.projectName,requests:h.requests,turns:c.get(h.cwd)??0,tokens:h.totalTokens,cost:h.cost,share:0,sub:h.cwd})}return mu(o,n.limit)}let D=[];for(let o of t){let i={...u,source:o},s=r.filter(c=>gt(c,i,n)),a=hn(s,[],i),l=new Map;for(let c of xe(s,e.userRecords,e.parentMap).values())l.set(c.sessionId,(l.get(c.sessionId)??0)+1);for(let c of a)D.push({key:`${o}::${c.sessionId}`,label:c.title??c.sessionId.slice(0,8),requests:c.requests,turns:l.get(c.sessionId)??0,tokens:c.totalTokens,cost:c.cost,share:0,sub:c.projectLabel})}return mu(D,n.limit)}function mu(e,t){let u=e.reduce((r,D)=>r+D.cost,0);e.sort((r,D)=>D.cost-r.cost);let n=e.slice(0,Math.max(1,t));if(u>0)for(let r of n)r.share=r.cost/u;return n}function gt(e,t,u){if(e.source!==t.source||t.from&&e.timestamp<t.from.toISOString()||t.to&&e.timestamp>t.to.toISOString()||u.model&&!e.model.toLowerCase().includes(u.model.toLowerCase()))return!1;if(u.project){let n=u.project.toLowerCase(),r=(e.cwd||"").toLowerCase(),D=r.split(/[/\\]+/).pop()??"";if(!r.includes(n)&&!D.includes(n))return!1}return!0}function Bu(e){if(e.since||e.until)return{from:e.since?mt(e.since,"since"):null,until:e.until?mt(e.until,"until"):null};let t=e.range==="today"?"1d":e.range;if(!fn(t))throw new Error(We("range",e.range,Eu));let u=Cn(t);return{from:u.from??null,until:u.to??null}}function mt(e,t){let u=e.match(al);if(u){let r=Number(u[1]),D=Number(u[2]),o=Number(u[3]),i=t==="since"?new Date(r,D-1,o,0,0,0,0):new Date(r,D-1,o,23,59,59,999);if(i.getFullYear()!==r||i.getMonth()!==D-1||i.getDate()!==o)throw new Error(`invalid ${t} date: ${e}`);return i}let n=new Date(e);if(Number.isNaN(n.getTime()))throw new Error(`invalid ${t} date: ${e}`);return n}function Cl(e){let t=u=>n=>e?`\x1B[${u}m${n}\x1B[0m`:String(n);return{bold:t("1"),dim:t("2"),cyan:t("36"),green:t("32"),yellow:t("33"),red:t("31"),blue:t("34"),magenta:t("35"),brand:t("38;2;129;140;248")}}function gu(e,t){let u=Cl(t.color!==!1),n=[],r=new Date(e.generatedAt).toLocaleString();n.push(""),n.push(`${u.brand(u.bold("ccgauge"))} ${u.bold("report")}`),n.push(u.dim([`range: ${e.range}`,`source: ${e.source}`,`by: ${e.by}`,`gran: ${e.gran}`,`generated ${r}`].join(" \xB7 "))),n.push(""),n.push(u.brand("\u25B8")+" "+u.bold("Tokens"));let D=e.totals,o=[["Input",v(D.input),"Output",v(D.output)],["Cache R",u.green(v(D.cacheRead)),"Cache W",v(D.cacheWrite)]];D.reasoning>0&&o.push(["Reasoning",u.dim(v(D.reasoning)),"",""]),o.push(["Total",u.bold(v(D.total)),"",""]),o.push(["Convos",u.bold(D.turns.toLocaleString()),"Requests",D.requests.toLocaleString()]),n.push(QD(o,u)),n.push(""),n.push(u.brand("\u25B8")+" "+u.bold("Cost"));let i=D.input+D.cacheRead+D.cacheWrite,s=i>0?D.cacheRead/i:0,a=D.requests>0?D.cost/D.requests:0,l=[["Total",u.bold(N(D.cost)),"Saved by cache",u.green(N(D.saved))],["Avg / request",a<.01?`$${a.toFixed(4)}`:N(a),"Cache hit",u.green(de(s,1))]];if(n.push(QD(l,u)),n.push(""),t.showTrend!==!1&&e.trend.length>0){n.push(u.brand("\u25B8")+" "+u.bold("Trend")+" "+u.dim(`(${t.gran}, by cost)`));let c=Math.max(...e.trend.map(F=>F.cost),1e-9),h=Math.max(...e.trend.map(F=>F.label.length)),d=Math.max(...e.trend.map(F=>N(F.cost).length));for(let F of e.trend){let C=ml(F.cost/c,44),f=F.label.padEnd(h),p=N(F.cost).padStart(d);n.push(` ${u.dim(f)} ${p} ${u.brand(C)}`)}n.push("")}if(t.showBreakdown!==!1&&e.breakdown.length>0){let c=e.by[0].toUpperCase()+e.by.slice(1);n.push(u.brand("\u25B8")+" "+u.bold(`Top ${e.breakdown.length} ${c}s`)+" "+u.dim("(by cost)"));let h=["#",c,"Convos","Reqs","Tokens","Cost","Share"],d=e.breakdown.map((F,C)=>[String(C+1),bl(F.label,28),F.turns.toLocaleString(),F.requests.toLocaleString(),v(F.tokens),N(F.cost),de(F.share,1)]);n.push(gl(h,d,u,[!1,!1,!0,!0,!0,!0,!0])),n.push("")}return n.join(`
34
+ `)}function QD(e,t){let u=[0,0,0,0];for(let r of e)for(let D=0;D<4;D+=1){let o=r[D];qe(o)>u[D]&&(u[D]=qe(o))}let n=[];for(let[r,D,o,i]of e){let s=`${t.dim(Ge(r,u[0]))} ${Ge(D,u[1])}`,a=o?`${t.dim(Ge(o,u[2]))} ${i}`:"";n.push(` ${s} ${a}`.replace(/\s+$/,""))}return n.join(`
35
+ `)}function gl(e,t,u,n){let r=e.map((s,a)=>Math.max(s.length,...t.map(l=>qe(l[a]??"")))),D=" "+e.map((s,a)=>n[a]?eo(s,r[a]):Ge(s,r[a])).map(s=>u.dim(s)).join(" "),o=" "+r.map(s=>"\u2500".repeat(s)).map(s=>u.dim(s)).join(" "),i=t.map(s=>" "+s.map((a,l)=>n[l]?eo(a,r[l]):Ge(a,r[l])).join(" "));return[D,o,...i].join(`
36
+ `)}function ml(e,t){let u=Math.max(0,Math.min(1,e)),n=Math.round(u*t);return"\u2587".repeat(n)+"\u2500".repeat(t-n)}var El="\x1B",Bl=new RegExp(El+"\\[[0-9;]*m","g");function qe(e){return e.replace(Bl,"").length}function Ge(e,t){return e+" ".repeat(Math.max(0,t-qe(e)))}function eo(e,t){return" ".repeat(Math.max(0,t-qe(e)))+e}function bl(e,t){return e.length<=t?e:e.slice(0,t-1)+"\u2026"}export{cl as DEFAULT_REPORT,ll as filterRecordsForReport,gu as renderText,wh as runReport};