ccgauge 1.1.2 → 1.1.3

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 (60) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-build-manifest.json +41 -41
  3. package/.next/standalone/.next/app-path-routes-manifest.json +10 -10
  4. package/.next/standalone/.next/build-manifest.json +2 -2
  5. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  6. package/.next/standalone/.next/server/app/api/blocks/route_client-reference-manifest.js +1 -1
  7. package/.next/standalone/.next/server/app/api/export/usage/route.js +1 -1
  8. package/.next/standalone/.next/server/app/api/export/usage/route_client-reference-manifest.js +1 -1
  9. package/.next/standalone/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
  10. package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  11. package/.next/standalone/.next/server/app/api/scan/route_client-reference-manifest.js +1 -1
  12. package/.next/standalone/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
  13. package/.next/standalone/.next/server/app/api/usage/route_client-reference-manifest.js +1 -1
  14. package/.next/standalone/.next/server/app/models/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/.next/server/app/page.js +1 -1
  16. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  17. package/.next/standalone/.next/server/app/projects/[id]/page_client-reference-manifest.js +1 -1
  18. package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  19. package/.next/standalone/.next/server/app/sessions/[id]/page_client-reference-manifest.js +1 -1
  20. package/.next/standalone/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  21. package/.next/standalone/.next/server/app/settings/page.js +1 -1
  22. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  23. package/.next/standalone/.next/server/app/usage/page.js +2 -2
  24. package/.next/standalone/.next/server/app/usage/page_client-reference-manifest.js +1 -1
  25. package/.next/standalone/.next/server/app-paths-manifest.json +10 -10
  26. package/.next/standalone/.next/server/chunks/567.js +2 -2
  27. package/.next/standalone/.next/server/chunks/98.js +1 -1
  28. package/.next/standalone/.next/server/functions-config-manifest.json +3 -3
  29. package/.next/standalone/.next/server/middleware-manifest.json +1 -1
  30. package/.next/standalone/.next/server/pages/500.html +1 -1
  31. package/.next/standalone/.next/static/chunks/148-59989feca70944f2.js +1 -0
  32. package/.next/standalone/.next/static/chunks/app/usage/page-8af23d9f5420c824.js +1 -0
  33. package/.next/standalone/node_modules/next/dist/compiled/babel/bundle.js +227 -0
  34. package/.next/standalone/node_modules/next/dist/compiled/babel/code-frame.js +1 -0
  35. package/.next/standalone/node_modules/next/dist/compiled/babel/core-lib-block-hoist-plugin.js +1 -0
  36. package/.next/standalone/node_modules/next/dist/compiled/babel/core-lib-config.js +1 -0
  37. package/.next/standalone/node_modules/next/dist/compiled/babel/core-lib-normalize-file.js +1 -0
  38. package/.next/standalone/node_modules/next/dist/compiled/babel/core-lib-normalize-opts.js +1 -0
  39. package/.next/standalone/node_modules/next/dist/compiled/babel/core-lib-plugin-pass.js +1 -0
  40. package/.next/standalone/node_modules/next/dist/compiled/babel/core.js +1 -0
  41. package/.next/standalone/node_modules/next/dist/compiled/babel/generator.js +1 -0
  42. package/.next/standalone/node_modules/next/dist/compiled/babel/package.json +1 -0
  43. package/.next/standalone/node_modules/next/dist/compiled/babel/parser.js +1 -0
  44. package/.next/standalone/node_modules/next/dist/compiled/babel/plugin-syntax-jsx.js +1 -0
  45. package/.next/standalone/node_modules/next/dist/compiled/babel/plugin-transform-define.js +1 -0
  46. package/.next/standalone/node_modules/next/dist/compiled/babel/plugin-transform-modules-commonjs.js +1 -0
  47. package/.next/standalone/node_modules/next/dist/compiled/babel/preset-typescript.js +1 -0
  48. package/.next/standalone/node_modules/next/dist/compiled/babel/traverse.js +1 -0
  49. package/.next/standalone/node_modules/next/dist/compiled/babel/types.js +1 -0
  50. package/.next/standalone/node_modules/next/dist/compiled/babel-packages/package.json +1 -0
  51. package/.next/standalone/node_modules/next/dist/compiled/babel-packages/packages-bundle.js +335 -0
  52. package/.next/standalone/package.json +2 -2
  53. package/CHANGELOG.md +58 -0
  54. package/dist/mcp/server.mjs +14 -14
  55. package/dist/report/index.mjs +28 -28
  56. package/package.json +2 -2
  57. package/.next/standalone/.next/static/chunks/148-edf90b0918345dc2.js +0 -1
  58. package/.next/standalone/.next/static/chunks/app/usage/page-051223f62647aadc.js +0 -1
  59. /package/.next/standalone/.next/static/{EQqRlXV5HyaCYSZWOVllH → CMei_rtoPIOG9ihnAXFks}/_buildManifest.js +0 -0
  60. /package/.next/standalone/.next/static/{EQqRlXV5HyaCYSZWOVllH → CMei_rtoPIOG9ihnAXFks}/_ssgManifest.js +0 -0
@@ -1,36 +1,36 @@
1
- var Wr=Object.create;var At=Object.defineProperty;var jr=Object.getOwnPropertyDescriptor;var Gr=Object.getOwnPropertyNames;var qr=Object.getPrototypeOf,Hr=Object.prototype.hasOwnProperty;var yt=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(u,t)=>(typeof require<"u"?require:u)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var A=(e,u)=>()=>(u||e((u={exports:{}}).exports,u),u.exports);var Vr=(e,u,t,n)=>{if(u&&typeof u=="object"||typeof u=="function")for(let D of Gr(u))!Hr.call(e,D)&&D!==t&&At(e,D,{get:()=>u[D],enumerable:!(n=jr(u,D))||n.enumerable});return e};var le=(e,u,t)=>(t=e!=null?Wr(qr(e)):{},Vr(u||!e||!e.__esModule?At(t,"default",{value:e,enumerable:!0}):t,e));var hn=A((uF,pn)=>{pn.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 _n=A((gF,Tn)=>{Tn.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 In=A((yF,ci)=>{ci.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 Lu=A((xF,Ou)=>{"use strict";var Mn=In();Ou.exports=Mn;Ou.exports.default=Mn});var Uu=A((wF,$n)=>{"use strict";$n.exports=({onlyFirst:e=!1}={})=>{let u=["[\\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(u,e?void 0:"g")}});var Wn=A((kF,Un)=>{"use strict";var Ci=Uu();Un.exports=e=>typeof e=="string"?e.replace(Ci(),""):e});var ju=A((SF,Wu)=>{"use strict";var jn=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);Wu.exports=jn;Wu.exports.default=jn});var Gu=A((TF,Gn)=>{"use strict";Gn.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 Hn=A((_F,qu)=>{"use strict";var gi=Wn(),mi=ju(),Ei=Gu(),qn=e=>{if(typeof e!="string"||e.length===0||(e=gi(e),e.length===0))return 0;e=e.replace(Ei()," ");let u=0;for(let t=0;t<e.length;t++){let n=e.codePointAt(t);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&t++,u+=mi(n)?2:1)}return u};qu.exports=qn;qu.exports.default=qn});var zn=A((vF,Vn)=>{"use strict";var Bi=Hn();function ae(e,u){if(!e)return e;u=u||{};let t=u.align||"center";if(t==="left")return e;let n=u.split||`
2
- `,D=u.pad||" ",r=t!=="right"?bi:Ai,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=Bi(a),s=Math.max(i,s),{str:a,width:i}}).map(function(a){return new Array(r(s,a.width)+1).join(D)+a.str}),o?e.join(n):e}ae.left=function(u){return ae(u,{align:"left"})};ae.center=function(u){return ae(u,{align:"center"})};ae.right=function(u){return ae(u,{align:"right"})};Vn.exports=ae;function bi(e,u){return Math.floor((e-u)/2)}function Ai(e,u){return e-u}});var Du=A((zF,sD)=>{var Ju=[],iD=0,T=(e,u)=>{iD>=u&&Ju.push(e)};T.WARN=1;T.INFO=2;T.DEBUG=3;T.reset=()=>{Ju=[]};T.setDebugLevel=e=>{iD=e};T.warn=e=>T(e,T.WARN);T.info=e=>T(e,T.INFO);T.debug=e=>T(e,T.DEBUG);T.debugMessages=()=>Ju;sD.exports=T});var cD=A((KF,aD)=>{"use strict";var ji=Uu();aD.exports=e=>typeof e=="string"?e.replace(ji(),""):e});var FD=A((YF,Xu)=>{"use strict";var Gi=cD(),qi=ju(),Hi=Gu(),lD=e=>{if(typeof e!="string"||e.length===0||(e=Gi(e),e.length===0))return 0;e=e.replace(Hi()," ");let u=0;for(let t=0;t<e.length;t++){let n=e.codePointAt(t);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&t++,u+=qi(n)?2:1)}return u};Xu.exports=lD;Xu.exports.default=lD});var Zu=A((JF,hD)=>{var dD=FD();function ru(e){return e?/\u001b\[((?:\d*;){0,5}\d*)m/g:/\u001b\[(?:\d*;){0,5}\d*m/g}function H(e){let u=ru();return(""+e).replace(u,"").split(`
3
- `).reduce(function(D,r){return dD(r)>D?dD(r):D},0)}function Ie(e,u){return Array(u+1).join(e)}function Vi(e,u,t,n){let D=H(e);if(u+1>=D){let r=u-D;switch(n){case"right":{e=Ie(t,r)+e;break}case"center":{let o=Math.ceil(r/2),i=r-o;e=Ie(t,i)+e+Ie(t,o);break}default:{e=e+Ie(t,r);break}}}return e}var he={};function Me(e,u,t){u="\x1B["+u+"m",t="\x1B["+t+"m",he[u]={set:e,to:!0},he[t]={set:e,to:!1},he[e]={on:u,off:t}}Me("bold",1,22);Me("italics",3,23);Me("underline",4,24);Me("inverse",7,27);Me("strikethrough",9,29);function fD(e,u){let t=u[1]?parseInt(u[1].split(";")[0]):0;if(t>=30&&t<=39||t>=90&&t<=97){e.lastForegroundAdded=u[0];return}if(t>=40&&t<=49||t>=100&&t<=107){e.lastBackgroundAdded=u[0];return}if(t===0){for(let D in e)Object.prototype.hasOwnProperty.call(e,D)&&delete e[D];return}let n=he[u[0]];n&&(e[n.set]=n.to)}function zi(e){let u=ru(!0),t=u.exec(e),n={};for(;t!==null;)fD(n,t),t=u.exec(e);return n}function pD(e,u){let t=e.lastBackgroundAdded,n=e.lastForegroundAdded;return delete e.lastBackgroundAdded,delete e.lastForegroundAdded,Object.keys(e).forEach(function(D){e[D]&&(u+=he[D].off)}),t&&t!="\x1B[49m"&&(u+="\x1B[49m"),n&&n!="\x1B[39m"&&(u+="\x1B[39m"),u}function Ki(e,u){let t=e.lastBackgroundAdded,n=e.lastForegroundAdded;return delete e.lastBackgroundAdded,delete e.lastForegroundAdded,Object.keys(e).forEach(function(D){e[D]&&(u=he[D].on+u)}),t&&t!="\x1B[49m"&&(u=t+u),n&&n!="\x1B[39m"&&(u=n+u),u}function Yi(e,u){if(e.length===H(e))return e.substr(0,u);for(;H(e)>u;)e=e.slice(0,-1);return e}function Ji(e,u){let t=ru(!0),n=e.split(ru()),D=0,r=0,o="",i,s={};for(;r<u;){i=t.exec(e);let a=n[D];if(D++,r+H(a)>u&&(a=Yi(a,u-r)),o+=a,r+=H(a),r<u){if(!i)break;o+=i[0],fD(s,i)}}return pD(s,o)}function Xi(e,u,t){if(t=t||"\u2026",H(e)<=u)return e;u-=H(t);let D=Ji(e,u);D+=t;let r="\x1B]8;;\x07";return e.includes(r)&&!D.includes(r)&&(D+=r),D}function Zi(){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 Qi(e,u){e=e||{},u=u||Zi();let t=Object.assign({},u,e);return t.chars=Object.assign({},u.chars,e.chars),t.style=Object.assign({},u.style,e.style),t}function es(e,u){let t=[],n=u.split(/(\s+)/g),D=[],r=0,o;for(let i=0;i<n.length;i+=2){let s=n[i],a=r+H(s);r>0&&o&&(a+=o.length),a>e?(r!==0&&t.push(D.join("")),D=[s],r=H(s)):(D.push(o||"",s),r=a),o=n[i+1]}return r&&t.push(D.join("")),t}function us(e,u){let t=[],n="";function D(o,i){for(n.length&&i&&(n+=i),n+=o;n.length>e;)t.push(n.slice(0,e)),n=n.slice(e)}let r=u.split(/(\s+)/g);for(let o=0;o<r.length;o+=2)D(r[o],o&&r[o-1]);return n.length&&t.push(n),t}function ts(e,u,t=!0){let n=[];u=u.split(`
4
- `);let D=t?es:us;for(let r=0;r<u.length;r++)n.push.apply(n,D(e,u[r]));return n}function ns(e){let u={},t=[];for(let n=0;n<e.length;n++){let D=Ki(u,e[n]);u=zi(D);let r=Object.assign({},u);t.push(pD(r,D))}return t}function Ds(e,u){return["\x1B]","8",";",";",e||u,"\x07",u,"\x1B]","8",";",";","\x07"].join("")}hD.exports={strlen:H,repeat:Ie,pad:Vi,truncate:Xi,mergeOptions:Qi,wordWrap:ts,colorizeLines:ns,hyperlink:Ds}});var ED=A((XF,mD)=>{var gD={};mD.exports=gD;var CD={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(CD).forEach(function(e){var u=CD[e],t=gD[e]=[];t.open="\x1B["+u[0]+"m",t.close="\x1B["+u[1]+"m"})});var bD=A((ZF,BD)=>{"use strict";BD.exports=function(e,u){u=u||process.argv;var t=u.indexOf("--"),n=/^-{1,2}/.test(e)?"":"--",D=u.indexOf(n+e);return D!==-1&&(t===-1?!0:D<t)}});var yD=A((QF,AD)=>{"use strict";var rs=yt("os"),W=bD(),_=process.env,Ce=void 0;W("no-color")||W("no-colors")||W("color=false")?Ce=!1:(W("color")||W("colors")||W("color=true")||W("color=always"))&&(Ce=!0);"FORCE_COLOR"in _&&(Ce=_.FORCE_COLOR.length===0||parseInt(_.FORCE_COLOR,10)!==0);function os(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function is(e){if(Ce===!1)return 0;if(W("color=16m")||W("color=full")||W("color=truecolor"))return 3;if(W("color=256"))return 2;if(e&&!e.isTTY&&Ce!==!0)return 0;var u=Ce?1:0;if(process.platform==="win32"){var t=rs.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in _)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(D){return D in _})||_.CI_NAME==="codeship"?1:u;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",u)}function Qu(e){var u=is(e);return os(u)}AD.exports={supportsColor:Qu,stdout:Qu(process.stdout),stderr:Qu(process.stderr)}});var RD=A((e0,xD)=>{xD.exports=function(u,t){var n="";u=u||"Run the trap, drop the bass",u=u.split("");var D={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 u.forEach(function(r){r=r.toLowerCase();var o=D[r]||[" "],i=Math.floor(Math.random()*o.length);typeof D[r]<"u"?n+=D[r][i]:n+=r}),n}});var kD=A((u0,wD)=>{wD.exports=function(u,t){u=u||" 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"]},D=[].concat(n.up,n.down,n.mid);function r(s){var a=Math.floor(Math.random()*s);return a}function o(s){var a=!1;return D.filter(function(F){a=F===s}),a}function i(s,a){var F="",c,f;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(f in s)if(!o(f)){switch(F=F+s[f],c={up:0,down:0,mid:0},a.size){case"mini":c.up=r(8),c.mid=r(2),c.down=r(8);break;case"maxi":c.up=r(16)+3,c.mid=r(4)+1,c.down=r(64)+3;break;default:c.up=r(8)+1,c.mid=r(6)/2,c.down=r(8)+1;break}var d=["up","mid","down"];for(var l in d)for(var C=d[l],h=0;h<=c[C];h++)a[C]&&(F=F+n[C][r(n[C].length)])}return F}return i(u,t)}});var TD=A((t0,SD)=>{SD.exports=function(e){return function(u,t,n){if(u===" ")return u;switch(t%3){case 0:return e.red(u);case 1:return e.white(u);case 2:return e.blue(u)}}}});var vD=A((n0,_D)=>{_D.exports=function(e){return function(u,t,n){return t%2===0?u:e.inverse(u)}}});var MD=A((D0,ID)=>{ID.exports=function(e){var u=["red","yellow","green","blue","magenta"];return function(t,n,D){return t===" "?t:e[u[n++%u.length]](t)}}});var OD=A((r0,PD)=>{PD.exports=function(e){var u=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(t,n,D){return t===" "?t:e[u[Math.round(Math.random()*(u.length-2))]](t)}}});var jD=A((i0,WD)=>{var E={};WD.exports=E;E.themes={};var ss=yt("util"),ce=E.styles=ED(),ND=Object.defineProperties,as=new RegExp(/[\r\n]+/g);E.supportsColor=yD().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 o0=E.stylize=function(u,t){if(!E.enabled)return u+"";var n=ce[t];return!n&&t in E?E[t](u):n.open+u+n.close},cs=/[|\\{}()[\]^$+*?.]/g,ls=function(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(cs,"\\$&")};function $D(e){var u=function t(){return ds.apply(t,arguments)};return u._styles=e,u.__proto__=Fs,u}var UD=(function(){var e={};return ce.grey=ce.gray,Object.keys(ce).forEach(function(u){ce[u].closeRe=new RegExp(ls(ce[u].close),"g"),e[u]={get:function(){return $D(this._styles.concat(u))}}}),e})(),Fs=ND(function(){},UD);function ds(){var e=Array.prototype.slice.call(arguments),u=e.map(function(o){return o!=null&&o.constructor===String?o:ss.inspect(o)}).join(" ");if(!E.enabled||!u)return u;for(var t=u.indexOf(`
5
- `)!=-1,n=this._styles,D=n.length;D--;){var r=ce[n[D]];u=r.open+u.replace(r.closeRe,r.open)+r.close,t&&(u=u.replace(as,function(o){return r.close+o+r.open}))}return u}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 u in e)(function(t){E[t]=function(n){if(typeof e[t]=="object"){var D=n;for(var r in e[t])D=E[e[t][r]](D);return D}return E[e[t]](n)}})(u)};function fs(){var e={};return Object.keys(UD).forEach(function(u){e[u]={get:function(){return $D([u])}}}),e}var ps=function(u,t){var n=t.split("");return n=n.map(u),n.join("")};E.trap=RD();E.zalgo=kD();E.maps={};E.maps.america=TD()(E);E.maps.zebra=vD()(E);E.maps.rainbow=MD()(E);E.maps.random=OD()(E);for(LD in E.maps)(function(e){E[e]=function(u){return ps(E.maps[e],u)}})(LD);var LD;ND(E,fs())});var qD=A((s0,GD)=>{var hs=jD();GD.exports=hs});var KD=A((a0,ou)=>{var{info:Cs,debug:zD}=Du(),L=Zu(),ut=class e{constructor(u){this.setOptions(u),this.x=null,this.y=null}setOptions(u){["boolean","number","bigint","string"].indexOf(typeof u)!==-1&&(u={content:""+u}),u=u||{},this.options=u;let t=u.content;if(["boolean","number","bigint","string"].indexOf(typeof t)!==-1)this.content=String(t);else if(!t)this.content=this.options.href||"";else throw new Error("Content needs to be a primitive, got: "+typeof t);this.colSpan=u.colSpan||1,this.rowSpan=u.rowSpan||1,this.options.href&&Object.defineProperty(this,"href",{get(){return this.options.href}})}mergeTableOptions(u,t){this.cells=t;let n=this.options.chars||{},D=u.chars,r=this.chars={};ms.forEach(function(s){et(n,D,s,r)}),this.truncate=this.options.truncate||u.truncate;let o=this.options.style=this.options.style||{},i=u.style;et(o,i,"padding-left",this),et(o,i,"padding-right",this),this.head=o.head||i.head,this.border=o.border||i.border,this.fixedWidth=u.colWidths[this.x],this.lines=this.computeLines(u),this.desiredWidth=L.strlen(this.content)+this.paddingLeft+this.paddingRight,this.desiredHeight=this.lines.length}computeLines(u){let t=u.wordWrap||u.textWrap,{wordWrap:n=t}=this.options;if(this.fixedWidth&&n){if(this.fixedWidth-=this.paddingLeft+this.paddingRight,this.colSpan){let o=1;for(;o<this.colSpan;)this.fixedWidth+=u.colWidths[this.x+o],o++}let{wrapOnWordBoundary:D=!0}=u,{wrapOnWordBoundary:r=D}=this.options;return this.wrapLines(L.wordWrap(this.fixedWidth,this.content,r))}return this.wrapLines(this.content.split(`
6
- `))}wrapLines(u){let t=L.colorizeLines(u);return this.href?t.map(n=>L.hyperlink(this.href,n)):t}init(u){let t=this.x,n=this.y;this.widths=u.colWidths.slice(t,t+this.colSpan),this.heights=u.rowHeights.slice(n,n+this.rowSpan),this.width=this.widths.reduce(VD,-1),this.height=this.heights.reduce(VD,-1),this.hAlign=this.options.hAlign||u.colAligns[t],this.vAlign=this.options.vAlign||u.rowAligns[n],this.drawRight=t+this.colSpan==u.colWidths.length}draw(u,t){if(u=="top")return this.drawTop(this.drawRight);if(u=="bottom")return this.drawBottom(this.drawRight);let n=L.truncate(this.content,10,this.truncate);u||Cs(`${this.y}-${this.x}: ${this.rowSpan-u}x${this.colSpan} Cell ${n}`);let D=Math.max(this.height-this.lines.length,0),r;switch(this.vAlign){case"center":r=Math.ceil(D/2);break;case"bottom":r=D;break;default:r=0}if(u<r||u>=r+this.lines.length)return this.drawEmpty(this.drawRight,t);let o=this.lines.length>this.height&&u+1>=this.height;return this.drawLine(u-r,this.drawRight,o,t)}drawTop(u){let t=[];return this.cells?this.widths.forEach(function(n,D){t.push(this._topLeftChar(D)),t.push(L.repeat(this.chars[this.y==0?"top":"mid"],n))},this):(t.push(this._topLeftChar(0)),t.push(L.repeat(this.chars[this.y==0?"top":"mid"],this.width))),u&&t.push(this.chars[this.y==0?"topRight":"rightMid"]),this.wrapWithStyleColors("border",t.join(""))}_topLeftChar(u){let t=this.x+u,n;if(this.y==0)n=t==0?"topLeft":u==0?"topMid":"top";else if(t==0)n="leftMid";else if(n=u==0?"midMid":"bottomMid",this.cells&&(this.cells[this.y-1][t]instanceof e.ColSpanCell&&(n=u==0?"topMid":"mid"),u==0)){let r=1;for(;this.cells[this.y][t-r]instanceof e.ColSpanCell;)r++;this.cells[this.y][t-r]instanceof e.RowSpanCell&&(n="leftMid")}return this.chars[n]}wrapWithStyleColors(u,t){if(this[u]&&this[u].length)try{let n=qD();for(let D=this[u].length-1;D>=0;D--)n=n[this[u][D]];return n(t)}catch{return t}else return t}drawLine(u,t,n,D){let r=this.chars[this.x==0?"left":"middle"];if(this.x&&D&&this.cells){let f=this.cells[this.y+D][this.x-1];for(;f instanceof Pe;)f=this.cells[f.y][f.x-1];f instanceof Oe||(r=this.chars.rightMid)}let o=L.repeat(" ",this.paddingLeft),i=t?this.chars.right:"",s=L.repeat(" ",this.paddingRight),a=this.lines[u],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(r,c,i)}stylizeLine(u,t,n){return u=this.wrapWithStyleColors("border",u),n=this.wrapWithStyleColors("border",n),this.y===0&&(t=this.wrapWithStyleColors("head",t)),u+t+n}drawBottom(u){let t=this.chars[this.x==0?"bottomLeft":"bottomMid"],n=L.repeat(this.chars.bottom,this.width),D=u?this.chars.bottomRight:"";return this.wrapWithStyleColors("border",t+n+D)}drawEmpty(u,t){let n=this.chars[this.x==0?"left":"middle"];if(this.x&&t&&this.cells){let o=this.cells[this.y+t][this.x-1];for(;o instanceof Pe;)o=this.cells[o.y][o.x-1];o instanceof Oe||(n=this.chars.rightMid)}let D=u?this.chars.right:"",r=L.repeat(" ",this.width);return this.stylizeLine(n,r,D)}},Pe=class{constructor(){}draw(u){return typeof u=="number"&&zD(`${this.y}-${this.x}: 1x1 ColSpanCell`),""}init(){}mergeTableOptions(){}},Oe=class{constructor(u){this.originalCell=u}init(u){let t=this.y,n=this.originalCell.y;this.cellOffset=t-n,this.offset=gs(u.rowHeights,n,this.cellOffset)}draw(u){return u=="top"?this.originalCell.draw(this.offset,this.cellOffset):u=="bottom"?this.originalCell.draw("bottom"):(zD(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`),this.originalCell.draw(this.offset+1+u))}mergeTableOptions(){}};function HD(...e){return e.filter(u=>u!=null).shift()}function et(e,u,t,n){let D=t.split("-");D.length>1?(D[1]=D[1].charAt(0).toUpperCase()+D[1].substr(1),D=D.join(""),n[D]=HD(e[D],e[t],u[D],u[t])):n[t]=HD(e[t],u[t])}function gs(e,u,t){let n=e[u];for(let D=1;D<t;D++)n+=1+e[u+D];return n}function VD(e,u){return e+u+1}var ms=["top","top-mid","top-left","top-right","bottom","bottom-mid","bottom-left","bottom-right","left","left-mid","mid","mid-mid","right","right-mid","middle"];ou.exports=ut;ou.exports.ColSpanCell=Pe;ou.exports.RowSpanCell=Oe});var XD=A((c0,JD)=>{var{warn:Es,debug:Bs}=Du(),tt=KD(),{ColSpanCell:bs,RowSpanCell:As}=tt;(function(){function e(d,l){return d[l]>0?e(d,l+1):l}function u(d){let l={};d.forEach(function(C,h){let p=0;C.forEach(function(g){g.y=h,g.x=h?e(l,p):p;let B=g.rowSpan||1,m=g.colSpan||1;if(B>1)for(let b=0;b<m;b++)l[g.x+b]=B;p=g.x+m}),Object.keys(l).forEach(g=>{l[g]--,l[g]<1&&delete l[g]})})}function t(d){let l=0;return d.forEach(function(C){C.forEach(function(h){l=Math.max(l,h.x+(h.colSpan||1))})}),l}function n(d){return d.length}function D(d,l){let C=d.y,h=d.y-1+(d.rowSpan||1),p=l.y,g=l.y-1+(l.rowSpan||1),B=!(C>g||p>h),m=d.x,b=d.x-1+(d.colSpan||1),k=l.x,se=l.x-1+(l.colSpan||1),S=!(m>se||k>b);return B&&S}function r(d,l,C){let h=Math.min(d.length-1,C),p={x:l,y:C};for(let g=0;g<=h;g++){let B=d[g];for(let m=0;m<B.length;m++)if(D(p,B[m]))return!0}return!1}function o(d,l,C,h){for(let p=C;p<h;p++)if(r(d,p,l))return!1;return!0}function i(d){d.forEach(function(l,C){l.forEach(function(h){for(let p=1;p<h.rowSpan;p++){let g=new As(h);g.x=h.x,g.y=h.y+p,g.colSpan=h.colSpan,a(g,d[C+p])}})})}function s(d){for(let l=d.length-1;l>=0;l--){let C=d[l];for(let h=0;h<C.length;h++){let p=C[h];for(let g=1;g<p.colSpan;g++){let B=new bs;B.x=p.x+g,B.y=p.y,C.splice(h+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=t(d);Bs(`Max rows: ${l}; Max cols: ${C}`);for(let h=0;h<l;h++)for(let p=0;p<C;p++)if(!r(d,p,h)){let g={x:p,y:h,colSpan:1,rowSpan:1};for(p++;p<C&&!r(d,p,h);)g.colSpan++,p++;let B=h+1;for(;B<l&&o(d,B,g.x,g.x+g.colSpan);)g.rowSpan++,B++;let m=new tt(g);m.x=g.x,m.y=g.y,Es(`Missing cell at ${m.y}-${m.x}.`),a(m,d[h])}}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 tt(C)})})}function f(d){let l=c(d);return u(l),F(l),i(l),s(l),l}JD.exports={makeTableLayout:f,layoutTable:u,addRowSpanCells:i,maxWidth:t,fillInTable:F,computeWidths:YD("colSpan","desiredWidth","x",1),computeHeights:YD("rowSpan","desiredHeight","y",1)}})();function YD(e,u,t,n){return function(D,r){let o=[],i=[],s={};r.forEach(function(a){a.forEach(function(F){(F[e]||1)>1?i.push(F):o[F[t]]=Math.max(o[F[t]]||0,F[u]||0,n)})}),D.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],f=F[t],d=o[f],l=typeof D[f]=="number"?0:1;if(typeof d=="number")for(let C=1;C<c;C++)d+=1+o[f+C],typeof D[f+C]!="number"&&l++;else d=u==="desiredWidth"?F.desiredWidth-1:1,(!s[f]||s[f]<d)&&(s[f]=d);if(F[u]>d){let C=0;for(;l>0&&F[u]>d;){if(typeof D[f+C]!="number"){let h=Math.round((F[u]-d)/l);d+=h,o[f+C]+=h,l--}C++}}}Object.assign(D,o,s);for(let a=0;a<D.length;a++)D[a]=Math.max(n,D[a]||0)}}});var QD=A((l0,ZD)=>{var Z=Du(),ys=Zu(),nt=XD(),iu=class extends Array{constructor(u){super();let t=ys.mergeOptions(u);if(Object.defineProperty(this,"options",{value:t,enumerable:t.debug}),t.debug){switch(typeof t.debug){case"boolean":Z.setDebugLevel(Z.WARN);break;case"number":Z.setDebugLevel(t.debug);break;case"string":Z.setDebugLevel(parseInt(t.debug,10));break;default:Z.setDebugLevel(Z.WARN),Z.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof t.debug}`)}Object.defineProperty(this,"messages",{get(){return Z.debugMessages()}})}}toString(){let u=this,t=this.options.head&&this.options.head.length;t?(u=[this.options.head],this.length&&u.push.apply(u,this)):this.options.style.head=[];let n=nt.makeTableLayout(u);n.forEach(function(r){r.forEach(function(o){o.mergeTableOptions(this.options,n)},this)},this),nt.computeWidths(this.options.colWidths,n),nt.computeHeights(this.options.rowHeights,n),n.forEach(function(r){r.forEach(function(o){o.init(this.options)},this)},this);let D=[];for(let r=0;r<n.length;r++){let o=n[r],i=this.options.rowHeights[r];(r===0||!this.options.style.compact||r==1&&t)&&Dt(o,"top",D);for(let s=0;s<i;s++)Dt(o,s,D);r+1==n.length&&Dt(o,"bottom",D)}return D.join(`
1
+ var Gr=Object.create;var At=Object.defineProperty;var qr=Object.getOwnPropertyDescriptor;var Hr=Object.getOwnPropertyNames;var Vr=Object.getPrototypeOf,Kr=Object.prototype.hasOwnProperty;var yt=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(u,t)=>(typeof require<"u"?require:u)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var A=(e,u)=>()=>(u||e((u={exports:{}}).exports,u),u.exports);var zr=(e,u,t,n)=>{if(u&&typeof u=="object"||typeof u=="function")for(let D of Hr(u))!Kr.call(e,D)&&D!==t&&At(e,D,{get:()=>u[D],enumerable:!(n=qr(u,D))||n.enumerable});return e};var le=(e,u,t)=>(t=e!=null?Gr(Vr(e)):{},zr(u||!e||!e.__esModule?At(t,"default",{value:e,enumerable:!0}):t,e));var gn=A((nF,Cn)=>{Cn.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 In=A((EF,vn)=>{vn.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 Pn=A((RF,Fi)=>{Fi.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 Lu=A((wF,Ou)=>{"use strict";var On=Pn();Ou.exports=On;Ou.exports.default=On});var Uu=A((SF,Wn)=>{"use strict";Wn.exports=({onlyFirst:e=!1}={})=>{let u=["[\\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(u,e?void 0:"g")}});var Gn=A((TF,jn)=>{"use strict";var mi=Uu();jn.exports=e=>typeof e=="string"?e.replace(mi(),""):e});var ju=A((_F,Wu)=>{"use strict";var qn=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);Wu.exports=qn;Wu.exports.default=qn});var Gu=A((vF,Hn)=>{"use strict";Hn.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 Kn=A((IF,qu)=>{"use strict";var Ei=Gn(),Bi=ju(),bi=Gu(),Vn=e=>{if(typeof e!="string"||e.length===0||(e=Ei(e),e.length===0))return 0;e=e.replace(bi()," ");let u=0;for(let t=0;t<e.length;t++){let n=e.codePointAt(t);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&t++,u+=Bi(n)?2:1)}return u};qu.exports=Vn;qu.exports.default=Vn});var Yn=A((MF,zn)=>{"use strict";var Ai=Kn();function ae(e,u){if(!e)return e;u=u||{};let t=u.align||"center";if(t==="left")return e;let n=u.split||`
2
+ `,D=u.pad||" ",r=t!=="right"?yi:xi,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=Ai(a),s=Math.max(i,s),{str:a,width:i}}).map(function(a){return new Array(r(s,a.width)+1).join(D)+a.str}),o?e.join(n):e}ae.left=function(u){return ae(u,{align:"left"})};ae.center=function(u){return ae(u,{align:"center"})};ae.right=function(u){return ae(u,{align:"right"})};zn.exports=ae;function yi(e,u){return Math.floor((e-u)/2)}function xi(e,u){return e-u}});var Du=A((YF,cD)=>{var Ju=[],aD=0,T=(e,u)=>{aD>=u&&Ju.push(e)};T.WARN=1;T.INFO=2;T.DEBUG=3;T.reset=()=>{Ju=[]};T.setDebugLevel=e=>{aD=e};T.warn=e=>T(e,T.WARN);T.info=e=>T(e,T.INFO);T.debug=e=>T(e,T.DEBUG);T.debugMessages=()=>Ju;cD.exports=T});var FD=A((JF,lD)=>{"use strict";var qi=Uu();lD.exports=e=>typeof e=="string"?e.replace(qi(),""):e});var fD=A((XF,Xu)=>{"use strict";var Hi=FD(),Vi=ju(),Ki=Gu(),dD=e=>{if(typeof e!="string"||e.length===0||(e=Hi(e),e.length===0))return 0;e=e.replace(Ki()," ");let u=0;for(let t=0;t<e.length;t++){let n=e.codePointAt(t);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&t++,u+=Vi(n)?2:1)}return u};Xu.exports=dD;Xu.exports.default=dD});var Zu=A((ZF,gD)=>{var pD=fD();function ru(e){return e?/\u001b\[((?:\d*;){0,5}\d*)m/g:/\u001b\[(?:\d*;){0,5}\d*m/g}function H(e){let u=ru();return(""+e).replace(u,"").split(`
3
+ `).reduce(function(D,r){return pD(r)>D?pD(r):D},0)}function Ie(e,u){return Array(u+1).join(e)}function zi(e,u,t,n){let D=H(e);if(u+1>=D){let r=u-D;switch(n){case"right":{e=Ie(t,r)+e;break}case"center":{let o=Math.ceil(r/2),i=r-o;e=Ie(t,i)+e+Ie(t,o);break}default:{e=e+Ie(t,r);break}}}return e}var he={};function Me(e,u,t){u="\x1B["+u+"m",t="\x1B["+t+"m",he[u]={set:e,to:!0},he[t]={set:e,to:!1},he[e]={on:u,off:t}}Me("bold",1,22);Me("italics",3,23);Me("underline",4,24);Me("inverse",7,27);Me("strikethrough",9,29);function hD(e,u){let t=u[1]?parseInt(u[1].split(";")[0]):0;if(t>=30&&t<=39||t>=90&&t<=97){e.lastForegroundAdded=u[0];return}if(t>=40&&t<=49||t>=100&&t<=107){e.lastBackgroundAdded=u[0];return}if(t===0){for(let D in e)Object.prototype.hasOwnProperty.call(e,D)&&delete e[D];return}let n=he[u[0]];n&&(e[n.set]=n.to)}function Yi(e){let u=ru(!0),t=u.exec(e),n={};for(;t!==null;)hD(n,t),t=u.exec(e);return n}function CD(e,u){let t=e.lastBackgroundAdded,n=e.lastForegroundAdded;return delete e.lastBackgroundAdded,delete e.lastForegroundAdded,Object.keys(e).forEach(function(D){e[D]&&(u+=he[D].off)}),t&&t!="\x1B[49m"&&(u+="\x1B[49m"),n&&n!="\x1B[39m"&&(u+="\x1B[39m"),u}function Ji(e,u){let t=e.lastBackgroundAdded,n=e.lastForegroundAdded;return delete e.lastBackgroundAdded,delete e.lastForegroundAdded,Object.keys(e).forEach(function(D){e[D]&&(u=he[D].on+u)}),t&&t!="\x1B[49m"&&(u=t+u),n&&n!="\x1B[39m"&&(u=n+u),u}function Xi(e,u){if(e.length===H(e))return e.substr(0,u);for(;H(e)>u;)e=e.slice(0,-1);return e}function Zi(e,u){let t=ru(!0),n=e.split(ru()),D=0,r=0,o="",i,s={};for(;r<u;){i=t.exec(e);let a=n[D];if(D++,r+H(a)>u&&(a=Xi(a,u-r)),o+=a,r+=H(a),r<u){if(!i)break;o+=i[0],hD(s,i)}}return CD(s,o)}function Qi(e,u,t){if(t=t||"\u2026",H(e)<=u)return e;u-=H(t);let D=Zi(e,u);D+=t;let r="\x1B]8;;\x07";return e.includes(r)&&!D.includes(r)&&(D+=r),D}function es(){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 us(e,u){e=e||{},u=u||es();let t=Object.assign({},u,e);return t.chars=Object.assign({},u.chars,e.chars),t.style=Object.assign({},u.style,e.style),t}function ts(e,u){let t=[],n=u.split(/(\s+)/g),D=[],r=0,o;for(let i=0;i<n.length;i+=2){let s=n[i],a=r+H(s);r>0&&o&&(a+=o.length),a>e?(r!==0&&t.push(D.join("")),D=[s],r=H(s)):(D.push(o||"",s),r=a),o=n[i+1]}return r&&t.push(D.join("")),t}function ns(e,u){let t=[],n="";function D(o,i){for(n.length&&i&&(n+=i),n+=o;n.length>e;)t.push(n.slice(0,e)),n=n.slice(e)}let r=u.split(/(\s+)/g);for(let o=0;o<r.length;o+=2)D(r[o],o&&r[o-1]);return n.length&&t.push(n),t}function Ds(e,u,t=!0){let n=[];u=u.split(`
4
+ `);let D=t?ts:ns;for(let r=0;r<u.length;r++)n.push.apply(n,D(e,u[r]));return n}function rs(e){let u={},t=[];for(let n=0;n<e.length;n++){let D=Ji(u,e[n]);u=Yi(D);let r=Object.assign({},u);t.push(CD(r,D))}return t}function os(e,u){return["\x1B]","8",";",";",e||u,"\x07",u,"\x1B]","8",";",";","\x07"].join("")}gD.exports={strlen:H,repeat:Ie,pad:zi,truncate:Qi,mergeOptions:us,wordWrap:Ds,colorizeLines:rs,hyperlink:os}});var bD=A((QF,BD)=>{var ED={};BD.exports=ED;var mD={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(mD).forEach(function(e){var u=mD[e],t=ED[e]=[];t.open="\x1B["+u[0]+"m",t.close="\x1B["+u[1]+"m"})});var yD=A((e0,AD)=>{"use strict";AD.exports=function(e,u){u=u||process.argv;var t=u.indexOf("--"),n=/^-{1,2}/.test(e)?"":"--",D=u.indexOf(n+e);return D!==-1&&(t===-1?!0:D<t)}});var RD=A((u0,xD)=>{"use strict";var is=yt("os"),W=yD(),_=process.env,Ce=void 0;W("no-color")||W("no-colors")||W("color=false")?Ce=!1:(W("color")||W("colors")||W("color=true")||W("color=always"))&&(Ce=!0);"FORCE_COLOR"in _&&(Ce=_.FORCE_COLOR.length===0||parseInt(_.FORCE_COLOR,10)!==0);function ss(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function as(e){if(Ce===!1)return 0;if(W("color=16m")||W("color=full")||W("color=truecolor"))return 3;if(W("color=256"))return 2;if(e&&!e.isTTY&&Ce!==!0)return 0;var u=Ce?1:0;if(process.platform==="win32"){var t=is.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in _)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(D){return D in _})||_.CI_NAME==="codeship"?1:u;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",u)}function Qu(e){var u=as(e);return ss(u)}xD.exports={supportsColor:Qu,stdout:Qu(process.stdout),stderr:Qu(process.stderr)}});var kD=A((t0,wD)=>{wD.exports=function(u,t){var n="";u=u||"Run the trap, drop the bass",u=u.split("");var D={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 u.forEach(function(r){r=r.toLowerCase();var o=D[r]||[" "],i=Math.floor(Math.random()*o.length);typeof D[r]<"u"?n+=D[r][i]:n+=r}),n}});var TD=A((n0,SD)=>{SD.exports=function(u,t){u=u||" 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"]},D=[].concat(n.up,n.down,n.mid);function r(s){var a=Math.floor(Math.random()*s);return a}function o(s){var a=!1;return D.filter(function(F){a=F===s}),a}function i(s,a){var F="",c,f;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(f in s)if(!o(f)){switch(F=F+s[f],c={up:0,down:0,mid:0},a.size){case"mini":c.up=r(8),c.mid=r(2),c.down=r(8);break;case"maxi":c.up=r(16)+3,c.mid=r(4)+1,c.down=r(64)+3;break;default:c.up=r(8)+1,c.mid=r(6)/2,c.down=r(8)+1;break}var d=["up","mid","down"];for(var l in d)for(var C=d[l],h=0;h<=c[C];h++)a[C]&&(F=F+n[C][r(n[C].length)])}return F}return i(u,t)}});var vD=A((D0,_D)=>{_D.exports=function(e){return function(u,t,n){if(u===" ")return u;switch(t%3){case 0:return e.red(u);case 1:return e.white(u);case 2:return e.blue(u)}}}});var MD=A((r0,ID)=>{ID.exports=function(e){return function(u,t,n){return t%2===0?u:e.inverse(u)}}});var OD=A((o0,PD)=>{PD.exports=function(e){var u=["red","yellow","green","blue","magenta"];return function(t,n,D){return t===" "?t:e[u[n++%u.length]](t)}}});var ND=A((i0,LD)=>{LD.exports=function(e){var u=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(t,n,D){return t===" "?t:e[u[Math.round(Math.random()*(u.length-2))]](t)}}});var qD=A((a0,GD)=>{var E={};GD.exports=E;E.themes={};var cs=yt("util"),ce=E.styles=bD(),UD=Object.defineProperties,ls=new RegExp(/[\r\n]+/g);E.supportsColor=RD().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 s0=E.stylize=function(u,t){if(!E.enabled)return u+"";var n=ce[t];return!n&&t in E?E[t](u):n.open+u+n.close},Fs=/[|\\{}()[\]^$+*?.]/g,ds=function(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(Fs,"\\$&")};function WD(e){var u=function t(){return ps.apply(t,arguments)};return u._styles=e,u.__proto__=fs,u}var jD=(function(){var e={};return ce.grey=ce.gray,Object.keys(ce).forEach(function(u){ce[u].closeRe=new RegExp(ds(ce[u].close),"g"),e[u]={get:function(){return WD(this._styles.concat(u))}}}),e})(),fs=UD(function(){},jD);function ps(){var e=Array.prototype.slice.call(arguments),u=e.map(function(o){return o!=null&&o.constructor===String?o:cs.inspect(o)}).join(" ");if(!E.enabled||!u)return u;for(var t=u.indexOf(`
5
+ `)!=-1,n=this._styles,D=n.length;D--;){var r=ce[n[D]];u=r.open+u.replace(r.closeRe,r.open)+r.close,t&&(u=u.replace(ls,function(o){return r.close+o+r.open}))}return u}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 u in e)(function(t){E[t]=function(n){if(typeof e[t]=="object"){var D=n;for(var r in e[t])D=E[e[t][r]](D);return D}return E[e[t]](n)}})(u)};function hs(){var e={};return Object.keys(jD).forEach(function(u){e[u]={get:function(){return WD([u])}}}),e}var Cs=function(u,t){var n=t.split("");return n=n.map(u),n.join("")};E.trap=kD();E.zalgo=TD();E.maps={};E.maps.america=vD()(E);E.maps.zebra=MD()(E);E.maps.rainbow=OD()(E);E.maps.random=ND()(E);for($D in E.maps)(function(e){E[e]=function(u){return Cs(E.maps[e],u)}})($D);var $D;UD(E,hs())});var VD=A((c0,HD)=>{var gs=qD();HD.exports=gs});var JD=A((l0,ou)=>{var{info:ms,debug:YD}=Du(),L=Zu(),ut=class e{constructor(u){this.setOptions(u),this.x=null,this.y=null}setOptions(u){["boolean","number","bigint","string"].indexOf(typeof u)!==-1&&(u={content:""+u}),u=u||{},this.options=u;let t=u.content;if(["boolean","number","bigint","string"].indexOf(typeof t)!==-1)this.content=String(t);else if(!t)this.content=this.options.href||"";else throw new Error("Content needs to be a primitive, got: "+typeof t);this.colSpan=u.colSpan||1,this.rowSpan=u.rowSpan||1,this.options.href&&Object.defineProperty(this,"href",{get(){return this.options.href}})}mergeTableOptions(u,t){this.cells=t;let n=this.options.chars||{},D=u.chars,r=this.chars={};Bs.forEach(function(s){et(n,D,s,r)}),this.truncate=this.options.truncate||u.truncate;let o=this.options.style=this.options.style||{},i=u.style;et(o,i,"padding-left",this),et(o,i,"padding-right",this),this.head=o.head||i.head,this.border=o.border||i.border,this.fixedWidth=u.colWidths[this.x],this.lines=this.computeLines(u),this.desiredWidth=L.strlen(this.content)+this.paddingLeft+this.paddingRight,this.desiredHeight=this.lines.length}computeLines(u){let t=u.wordWrap||u.textWrap,{wordWrap:n=t}=this.options;if(this.fixedWidth&&n){if(this.fixedWidth-=this.paddingLeft+this.paddingRight,this.colSpan){let o=1;for(;o<this.colSpan;)this.fixedWidth+=u.colWidths[this.x+o],o++}let{wrapOnWordBoundary:D=!0}=u,{wrapOnWordBoundary:r=D}=this.options;return this.wrapLines(L.wordWrap(this.fixedWidth,this.content,r))}return this.wrapLines(this.content.split(`
6
+ `))}wrapLines(u){let t=L.colorizeLines(u);return this.href?t.map(n=>L.hyperlink(this.href,n)):t}init(u){let t=this.x,n=this.y;this.widths=u.colWidths.slice(t,t+this.colSpan),this.heights=u.rowHeights.slice(n,n+this.rowSpan),this.width=this.widths.reduce(zD,-1),this.height=this.heights.reduce(zD,-1),this.hAlign=this.options.hAlign||u.colAligns[t],this.vAlign=this.options.vAlign||u.rowAligns[n],this.drawRight=t+this.colSpan==u.colWidths.length}draw(u,t){if(u=="top")return this.drawTop(this.drawRight);if(u=="bottom")return this.drawBottom(this.drawRight);let n=L.truncate(this.content,10,this.truncate);u||ms(`${this.y}-${this.x}: ${this.rowSpan-u}x${this.colSpan} Cell ${n}`);let D=Math.max(this.height-this.lines.length,0),r;switch(this.vAlign){case"center":r=Math.ceil(D/2);break;case"bottom":r=D;break;default:r=0}if(u<r||u>=r+this.lines.length)return this.drawEmpty(this.drawRight,t);let o=this.lines.length>this.height&&u+1>=this.height;return this.drawLine(u-r,this.drawRight,o,t)}drawTop(u){let t=[];return this.cells?this.widths.forEach(function(n,D){t.push(this._topLeftChar(D)),t.push(L.repeat(this.chars[this.y==0?"top":"mid"],n))},this):(t.push(this._topLeftChar(0)),t.push(L.repeat(this.chars[this.y==0?"top":"mid"],this.width))),u&&t.push(this.chars[this.y==0?"topRight":"rightMid"]),this.wrapWithStyleColors("border",t.join(""))}_topLeftChar(u){let t=this.x+u,n;if(this.y==0)n=t==0?"topLeft":u==0?"topMid":"top";else if(t==0)n="leftMid";else if(n=u==0?"midMid":"bottomMid",this.cells&&(this.cells[this.y-1][t]instanceof e.ColSpanCell&&(n=u==0?"topMid":"mid"),u==0)){let r=1;for(;this.cells[this.y][t-r]instanceof e.ColSpanCell;)r++;this.cells[this.y][t-r]instanceof e.RowSpanCell&&(n="leftMid")}return this.chars[n]}wrapWithStyleColors(u,t){if(this[u]&&this[u].length)try{let n=VD();for(let D=this[u].length-1;D>=0;D--)n=n[this[u][D]];return n(t)}catch{return t}else return t}drawLine(u,t,n,D){let r=this.chars[this.x==0?"left":"middle"];if(this.x&&D&&this.cells){let f=this.cells[this.y+D][this.x-1];for(;f instanceof Pe;)f=this.cells[f.y][f.x-1];f instanceof Oe||(r=this.chars.rightMid)}let o=L.repeat(" ",this.paddingLeft),i=t?this.chars.right:"",s=L.repeat(" ",this.paddingRight),a=this.lines[u],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(r,c,i)}stylizeLine(u,t,n){return u=this.wrapWithStyleColors("border",u),n=this.wrapWithStyleColors("border",n),this.y===0&&(t=this.wrapWithStyleColors("head",t)),u+t+n}drawBottom(u){let t=this.chars[this.x==0?"bottomLeft":"bottomMid"],n=L.repeat(this.chars.bottom,this.width),D=u?this.chars.bottomRight:"";return this.wrapWithStyleColors("border",t+n+D)}drawEmpty(u,t){let n=this.chars[this.x==0?"left":"middle"];if(this.x&&t&&this.cells){let o=this.cells[this.y+t][this.x-1];for(;o instanceof Pe;)o=this.cells[o.y][o.x-1];o instanceof Oe||(n=this.chars.rightMid)}let D=u?this.chars.right:"",r=L.repeat(" ",this.width);return this.stylizeLine(n,r,D)}},Pe=class{constructor(){}draw(u){return typeof u=="number"&&YD(`${this.y}-${this.x}: 1x1 ColSpanCell`),""}init(){}mergeTableOptions(){}},Oe=class{constructor(u){this.originalCell=u}init(u){let t=this.y,n=this.originalCell.y;this.cellOffset=t-n,this.offset=Es(u.rowHeights,n,this.cellOffset)}draw(u){return u=="top"?this.originalCell.draw(this.offset,this.cellOffset):u=="bottom"?this.originalCell.draw("bottom"):(YD(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`),this.originalCell.draw(this.offset+1+u))}mergeTableOptions(){}};function KD(...e){return e.filter(u=>u!=null).shift()}function et(e,u,t,n){let D=t.split("-");D.length>1?(D[1]=D[1].charAt(0).toUpperCase()+D[1].substr(1),D=D.join(""),n[D]=KD(e[D],e[t],u[D],u[t])):n[t]=KD(e[t],u[t])}function Es(e,u,t){let n=e[u];for(let D=1;D<t;D++)n+=1+e[u+D];return n}function zD(e,u){return e+u+1}var Bs=["top","top-mid","top-left","top-right","bottom","bottom-mid","bottom-left","bottom-right","left","left-mid","mid","mid-mid","right","right-mid","middle"];ou.exports=ut;ou.exports.ColSpanCell=Pe;ou.exports.RowSpanCell=Oe});var QD=A((F0,ZD)=>{var{warn:bs,debug:As}=Du(),tt=JD(),{ColSpanCell:ys,RowSpanCell:xs}=tt;(function(){function e(d,l){return d[l]>0?e(d,l+1):l}function u(d){let l={};d.forEach(function(C,h){let p=0;C.forEach(function(g){g.y=h,g.x=h?e(l,p):p;let B=g.rowSpan||1,m=g.colSpan||1;if(B>1)for(let b=0;b<m;b++)l[g.x+b]=B;p=g.x+m}),Object.keys(l).forEach(g=>{l[g]--,l[g]<1&&delete l[g]})})}function t(d){let l=0;return d.forEach(function(C){C.forEach(function(h){l=Math.max(l,h.x+(h.colSpan||1))})}),l}function n(d){return d.length}function D(d,l){let C=d.y,h=d.y-1+(d.rowSpan||1),p=l.y,g=l.y-1+(l.rowSpan||1),B=!(C>g||p>h),m=d.x,b=d.x-1+(d.colSpan||1),k=l.x,se=l.x-1+(l.colSpan||1),S=!(m>se||k>b);return B&&S}function r(d,l,C){let h=Math.min(d.length-1,C),p={x:l,y:C};for(let g=0;g<=h;g++){let B=d[g];for(let m=0;m<B.length;m++)if(D(p,B[m]))return!0}return!1}function o(d,l,C,h){for(let p=C;p<h;p++)if(r(d,p,l))return!1;return!0}function i(d){d.forEach(function(l,C){l.forEach(function(h){for(let p=1;p<h.rowSpan;p++){let g=new xs(h);g.x=h.x,g.y=h.y+p,g.colSpan=h.colSpan,a(g,d[C+p])}})})}function s(d){for(let l=d.length-1;l>=0;l--){let C=d[l];for(let h=0;h<C.length;h++){let p=C[h];for(let g=1;g<p.colSpan;g++){let B=new ys;B.x=p.x+g,B.y=p.y,C.splice(h+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=t(d);As(`Max rows: ${l}; Max cols: ${C}`);for(let h=0;h<l;h++)for(let p=0;p<C;p++)if(!r(d,p,h)){let g={x:p,y:h,colSpan:1,rowSpan:1};for(p++;p<C&&!r(d,p,h);)g.colSpan++,p++;let B=h+1;for(;B<l&&o(d,B,g.x,g.x+g.colSpan);)g.rowSpan++,B++;let m=new tt(g);m.x=g.x,m.y=g.y,bs(`Missing cell at ${m.y}-${m.x}.`),a(m,d[h])}}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 tt(C)})})}function f(d){let l=c(d);return u(l),F(l),i(l),s(l),l}ZD.exports={makeTableLayout:f,layoutTable:u,addRowSpanCells:i,maxWidth:t,fillInTable:F,computeWidths:XD("colSpan","desiredWidth","x",1),computeHeights:XD("rowSpan","desiredHeight","y",1)}})();function XD(e,u,t,n){return function(D,r){let o=[],i=[],s={};r.forEach(function(a){a.forEach(function(F){(F[e]||1)>1?i.push(F):o[F[t]]=Math.max(o[F[t]]||0,F[u]||0,n)})}),D.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],f=F[t],d=o[f],l=typeof D[f]=="number"?0:1;if(typeof d=="number")for(let C=1;C<c;C++)d+=1+o[f+C],typeof D[f+C]!="number"&&l++;else d=u==="desiredWidth"?F.desiredWidth-1:1,(!s[f]||s[f]<d)&&(s[f]=d);if(F[u]>d){let C=0;for(;l>0&&F[u]>d;){if(typeof D[f+C]!="number"){let h=Math.round((F[u]-d)/l);d+=h,o[f+C]+=h,l--}C++}}}Object.assign(D,o,s);for(let a=0;a<D.length;a++)D[a]=Math.max(n,D[a]||0)}}});var ur=A((d0,er)=>{var Z=Du(),Rs=Zu(),nt=QD(),iu=class extends Array{constructor(u){super();let t=Rs.mergeOptions(u);if(Object.defineProperty(this,"options",{value:t,enumerable:t.debug}),t.debug){switch(typeof t.debug){case"boolean":Z.setDebugLevel(Z.WARN);break;case"number":Z.setDebugLevel(t.debug);break;case"string":Z.setDebugLevel(parseInt(t.debug,10));break;default:Z.setDebugLevel(Z.WARN),Z.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof t.debug}`)}Object.defineProperty(this,"messages",{get(){return Z.debugMessages()}})}}toString(){let u=this,t=this.options.head&&this.options.head.length;t?(u=[this.options.head],this.length&&u.push.apply(u,this)):this.options.style.head=[];let n=nt.makeTableLayout(u);n.forEach(function(r){r.forEach(function(o){o.mergeTableOptions(this.options,n)},this)},this),nt.computeWidths(this.options.colWidths,n),nt.computeHeights(this.options.rowHeights,n),n.forEach(function(r){r.forEach(function(o){o.init(this.options)},this)},this);let D=[];for(let r=0;r<n.length;r++){let o=n[r],i=this.options.rowHeights[r];(r===0||!this.options.style.compact||r==1&&t)&&Dt(o,"top",D);for(let s=0;s<i;s++)Dt(o,s,D);r+1==n.length&&Dt(o,"bottom",D)}return D.join(`
7
7
  `)}get width(){return this.toString().split(`
8
- `)[0].length}};iu.reset=()=>Z.reset();function Dt(e,u,t){let n=[];e.forEach(function(r){n.push(r.draw(u))});let D=n.join("");D.length&&t.push(D)}ZD.exports=iu});var ur=A((F0,er)=>{er.exports=QD()});import He from"node:path";import Zr from"node:os";import{createReadStream as zr}from"node:fs";import Kr from"node:readline";var Eu=200;async function xt(e){let u=zr(e,{encoding:"utf8"}),t=Kr.createInterface({input:u,crlfDelay:1/0}),n=[],D=[],r=[];for await(let o of t){if(!o.trim())continue;let i;try{i=JSON.parse(o)}catch{continue}if(!(!i||typeof i!="object")){if(i.uuid&&r.push([i.uuid,i.parentUuid??null]),i.type==="assistant"){let s=Yr(i,e);s&&n.push(s)}else if(i.type==="user"){let s=Jr(i,e);s&&D.push(s)}}}return{assistant:n,user:D,parentLinks:r}}function Yr(e,u){let t=e.message;if(!t)return null;let n=t.usage;if(!n)return null;let D=t.model??"";if(!D||D==="<synthetic>")return null;let r=t.id??e.uuid??"";if(!r&&!e.requestId)return null;let o=n.cache_creation,i=Array.isArray(t.content)?t.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,Eu));return{type:"assistant",source:"claude",uuid:e.uuid??r,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:D,messageId:r,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:u,isSidechain:e.isSidechain===!0?!0:void 0}}function Jr(e,u){if(!e.uuid)return null;let t=e.message,n="";if(t){let o=t.content;if(typeof o=="string")n=o.slice(0,Eu);else if(Array.isArray(o)){for(let i of o)if(i.type==="text"&&typeof i.text=="string"){n=i.text.slice(0,Eu);break}}}let D=e.isSidechain===!0,r=D||!!n&&Xr(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:r,isSidechain:D?!0:void 0,filePath:u}}function Xr(e){let u=e.trimStart();return!!(u.startsWith("Base directory for this skill:")||u.startsWith("<system-reminder>")||u.startsWith("Caveat: The messages below were generated by"))}var q={"claude-opus-4-8":{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-6":{input:5,output:25,cacheCreation5m:6.25,cacheCreation1h:10,cacheRead:.5},"claude-opus-4-5":{input:5,output:25,cacheCreation5m:6.25,cacheCreation1h:10,cacheRead:.5},"claude-sonnet-4-6":{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-haiku-4-5":{input:1,output:5,cacheCreation5m:1.25,cacheCreation1h:2,cacheRead:.1},"claude-haiku-3-5":{input:.8,output:4,cacheCreation5m:1,cacheCreation1h:1.6,cacheRead:.08},"claude-opus-4-1":{input:15,output:75,cacheCreation5m:18.75,cacheCreation1h:30,cacheRead:1.5},"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":{input:.25,output:1.25,cacheCreation5m:.3,cacheCreation1h:.5,cacheRead:.03}},Rt={opus:q["claude-opus-4-8"],sonnet:q["claude-sonnet-4-6"],haiku:q["claude-haiku-4-5"]};function Be(e,u){if(!u)return{input:0,output:0,cacheCreation5m:0,cacheCreation1h:0,cacheRead:0,total:0,saved:0};let t=e.input_tokens/1e6*u.input,n=e.output_tokens/1e6*u.output,D=e.cache_creation_5m/1e6*u.cacheCreation5m,r=e.cache_creation_1h/1e6*u.cacheCreation1h;D+r===0&&e.cache_creation_input_tokens>0&&(D=e.cache_creation_input_tokens/1e6*u.cacheCreation5m);let o=e.cache_read_input_tokens/1e6*u.cacheRead,i=t+n+D+r+o,s=e.cache_read_input_tokens/1e6*(u.input-u.cacheRead);return{input:t,output:n,cacheCreation5m:D,cacheCreation1h:r,cacheRead:o,total:i,saved:s}}function wt(e){return e.replace(/\b\w/g,u=>u.toUpperCase())}function kt(e){if(!e)return"(unknown)";let u=e.replace(/-(\d{8})$/,"").replace(/^(vertex_ai|bedrock|anthropic)\//,"");u=u.replace(/^claude-/,"");let t=u.split("-");if(t.length>=2){let n=t[0],D=t.slice(1).join(".");return wt(n)+" "+D}return wt(u.replace(/-/g," "))}var Qr=/-\d{8}$/,eo=/^(vertex_ai|bedrock|anthropic)\//;function uo(e){if(!e)return{pricing:null,matchType:"none",matchedKey:null};if(q[e])return{pricing:q[e],matchType:"exact",matchedKey:e};let u=e.replace(Qr,"");if(q[u])return{pricing:q[u],matchType:"date-stripped",matchedKey:u};let t=u.replace(eo,"");if(q[t])return{pricing:q[t],matchType:"prefix-stripped",matchedKey:t};for(let n of["opus","sonnet","haiku"])if(e.toLowerCase().includes(n))return{pricing:Rt[n],matchType:"family-fallback",matchedKey:`claude-${n}-(latest)`};return{pricing:null,matchType:"none",matchedKey:null}}function to(){let e=Zr.homedir(),u=[He.join(e,".claude","projects"),He.join(e,".config","claude","projects")];return process.env.CCGAUGE_CONFIG_DIR&&u.push(He.join(process.env.CCGAUGE_CONFIG_DIR,"projects")),process.env.CLAUDE_CONFIG_DIR&&u.push(He.join(process.env.CLAUDE_CONFIG_DIR,"projects")),Array.from(new Set(u))}var St={id:"claude",displayName:{en:"Claude",zh:"Claude"},shortLabel:"C",color:{fg:"#b45309",bg:"#fef3c7"},logoSrc:"/claude-logo.webp",parserVersion:"claude-v4-sidechain-merge",capabilities:{hasCacheCreation:!0,hasReasoningTokens:!1,blockWindowMs:300*60*1e3},getDirs:to,shouldSkipDir:e=>e==="tool-results"||e==="memory",parseFile:async e=>await xt(e),resolvePricing:uo,shortenModel:kt,costFromUsage:Be,costFootnoteKey:null};import Ve from"node:path";import lo from"node:os";import{createReadStream as no,promises as Do}from"node:fs";import ro from"node:readline";var Bu=200;async function oo(e){try{let u=await Do.stat(e);return new Date(u.mtimeMs).toISOString()}catch{return new Date().toISOString()}}function M(e){return typeof e=="string"?e:""}function ne(e){let u=Number(e);return Number.isFinite(u)?u:0}function bu(e){let u=e.message;if(typeof u=="string")return u;let t=e.content;if(typeof t=="string")return t;if(Array.isArray(t))for(let n of t){let D=n?.type;if((D==="input_text"||D==="output_text"||D==="text")&&typeof n.text=="string")return n.text}return""}async function Tt(e){let u=no(e,{encoding:"utf8"}),t=ro.createInterface({input:u,crlfDelay:1/0}),n=[],D=[],r=[],o="",i,s="",a=0,F=0,c=null,d=await oo(e),l={turnId:null,cwd:"",model:"gpt-unknown",userUuid:null,toolNames:[],hasThinking:!1,pendingTextPreview:""};for await(let C of t){if(!C.trim())continue;let h;try{h=JSON.parse(C)}catch{continue}if(!h||typeof h!="object"||!h.type)continue;let p=h.payload??{},g=M(h.timestamp),B=g||d;if(g&&(d=g),h.type==="session_meta"){o=M(p.id),s=M(p.cwd),i=M(p.cli_version)||void 0;let m=M(p.timestamp);m&&(d=m),l.cwd||(l.cwd=s);continue}if(h.type==="turn_context"){l.turnId=M(p.turn_id)||l.turnId,l.cwd=M(p.cwd)||s;let m=M(p.model);m&&(l.model=m);let b=M(p.effort);b&&(l.effort=b),l.toolNames=[],l.hasThinking=!1,l.pendingTextPreview="";continue}if(h.type==="event_msg"){let m=M(p.type);if(m==="user_message"){let b=bu(p);if(!b)continue;let k=`${o}::u${a++}`;D.push({type:"user",source:"codex",uuid:k,parentUuid:null,timestamp:B,sessionId:o,cwd:l.cwd||s,textPreview:b.slice(0,Bu),filePath:e}),r.push([k,null]),l.userUuid=k;continue}if(m==="agent_message"){let b=bu(p);b&&!l.pendingTextPreview&&(l.pendingTextPreview=b.slice(0,Bu));continue}if(m==="agent_reasoning"){l.hasThinking=!0;continue}if(m==="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,ue,z,te,K;if(S){if(c===null?(ue=S.input,z=S.cached,te=S.output,K=S.reasoning):(ue=Math.max(0,S.input-c.input),z=Math.max(0,S.cached-c.cached),te=Math.max(0,S.output-c.output),K=Math.max(0,S.reasoning-c.reasoning)),ue===0&&z===0&&te===0&&K===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(ue=ne(se.input_tokens),z=ne(se.cached_input_tokens),te=ne(se.output_tokens),K=ne(se.reasoning_output_tokens),ue===0&&z===0&&te===0&&K===0)continue;c===null?c={input:ue,cached:z,output:te,reasoning:K}:c={input:c.input+ue,cached:c.cached+z,output:c.output+te,reasoning:c.reasoning+K}}else continue;let Bt=`${o}::a${F++}`,bt=l.turnId?`${l.turnId}::a${F}`:`${o}::a${F}`;n.push({type:"assistant",source:"codex",uuid:Bt,parentUuid:l.userUuid,timestamp:B,sessionId:o,requestId:bt,cwd:l.cwd||s,version:i,model:l.model||"gpt-unknown",messageId:bt,usage:{input_tokens:Math.max(0,ue-z),output_tokens:te+K,cache_creation_input_tokens:0,cache_read_input_tokens:z,cache_creation_5m:0,cache_creation_1h:0,reasoning_tokens:K},toolNames:[...l.toolNames],hasThinking:l.hasThinking,textPreview:l.pendingTextPreview,filePath:e,effort:l.effort}),r.push([Bt,l.userUuid]),l.toolNames=[],l.hasThinking=!1,l.pendingTextPreview="";continue}continue}if(h.type==="response_item"){let m=M(p.type);if(m==="function_call"||m==="custom_tool_call"){let b=M(p.name);b&&l.toolNames.push(b);continue}if(m==="reasoning"){l.hasThinking=!0;continue}if(m==="message"){if(M(p.role)==="assistant"){let k=bu(p);k&&!l.pendingTextPreview&&(l.pendingTextPreview=k.slice(0,Bu))}continue}continue}}return{assistant:n,user:D,parentLinks:r}}var De={"gpt-5":{input:1.25,output:10,cacheRead:.13,cacheCreation5m:0,cacheCreation1h:0},"gpt-5-mini":{input:.25,output:2,cacheRead:.025,cacheCreation5m:0,cacheCreation1h:0},"gpt-5-nano":{input:.05,output:.4,cacheRead:.005,cacheCreation5m:0,cacheCreation1h:0},"gpt-5.4":{input:1.25,output:10,cacheRead:.13,cacheCreation5m:0,cacheCreation1h:0},"gpt-5.5":{input:1.25,output:10,cacheRead:.13,cacheCreation5m:0,cacheCreation1h:0},"gpt-5.5-mini":{input:.25,output:2,cacheRead:.025,cacheCreation5m:0,cacheCreation1h:0},"gpt-5.5-nano":{input:.05,output:.4,cacheRead:.005,cacheCreation5m:0,cacheCreation1h:0},"gpt-4.1":{input:2,output:8,cacheRead:.5,cacheCreation5m:0,cacheCreation1h:0},"gpt-4.1-mini":{input:.4,output:1.6,cacheRead:.1,cacheCreation5m:0,cacheCreation1h:0},o3:{input:2,output:8,cacheRead:.5,cacheCreation5m:0,cacheCreation1h:0},"o4-mini":{input:1.1,output:4.4,cacheRead:.275,cacheCreation5m:0,cacheCreation1h:0}},_t={gpt:De["gpt-5"],o:De.o3},io=/-\d{8}$/,so=/^(openai)\//;function vt(e){if(!e)return{pricing:null,matchType:"none",matchedKey:null};if(De[e])return{pricing:De[e],matchType:"exact",matchedKey:e};let u=e.replace(io,"");if(De[u])return{pricing:De[u],matchType:"date-stripped",matchedKey:u};let t=u.replace(so,"");if(De[t])return{pricing:De[t],matchType:"prefix-stripped",matchedKey:t};let n=e.toLowerCase();return n.startsWith("gpt-")||n==="gpt"?{pricing:_t.gpt,matchType:"family-fallback",matchedKey:"gpt-(latest)"}:/^o\d/.test(n)?{pricing:_t.o,matchType:"family-fallback",matchedKey:"o-(latest)"}:{pricing:null,matchType:"none",matchedKey:null}}function ao(e){return e.replace(/\b\w/g,u=>u.toUpperCase())}var co={mini:"Mini",nano:"Nano",pro:"Pro",turbo:"Turbo",preview:"Preview"};function It(e){if(!e)return"(unknown)";let u=e.replace(/^openai\//,"");return u.toLowerCase().startsWith("gpt-")?"GPT-"+u.slice(4).split("-").map(D=>co[D.toLowerCase()]??D).join(" "):u.toLowerCase().startsWith("o")?u.toUpperCase():ao(u.replace(/-/g," "))}function Fo(){let e=lo.homedir(),u=[Ve.join(e,".codex","sessions"),Ve.join(e,".codex","archived_sessions")];return process.env.CCGAUGE_CODEX_DIR&&u.push(process.env.CCGAUGE_CODEX_DIR),process.env.CODEX_HOME&&(u.push(Ve.join(process.env.CODEX_HOME,"sessions")),u.push(Ve.join(process.env.CODEX_HOME,"archived_sessions"))),Array.from(new Set(u))}var Mt={id:"codex",displayName:{en:"Codex",zh:"Codex"},shortLabel:"X",color:{fg:"#047857",bg:"#d1fae5"},logoSrc:"/codex-logo.webp",parserVersion:"codex-v5-last-total-prev",capabilities:{hasCacheCreation:!1,hasReasoningTokens:!0,blockWindowMs:300*60*1e3},getDirs:Fo,shouldSkipDir:()=>!1,parseFile:Tt,resolvePricing:vt,shortenModel:It,costFromUsage:Be,costFootnoteKey:"cost.footnote.codex"};var Pt={claude:St,codex:Mt},Au=["claude","codex"];function re(e){return Pt[e]}function yu(){return Au.map(e=>Pt[e])}function Ot(e){return typeof e=="string"&&(e==="claude"||e==="codex")}import{promises as be,watch as Eo}from"node:fs";import qt from"node:path";function fo(e){let u=`${e.source}:`;return e.messageId&&e.requestId?`${u}${e.messageId}::${e.requestId}`:e.messageId?`${u}mid:${e.messageId}`:e.requestId?`${u}req:${e.requestId}`:`${u}uuid:${e.uuid}`}function Lt(e){let u=new Map;for(let t of e){let n=fo(t),D=u.get(n);if(!D){u.set(n,t);continue}t.timestamp<D.timestamp&&u.set(n,t)}return Array.from(u.values())}import{promises as ze}from"node:fs";import xu from"node:path";import po from"node:os";var Ke=2,Fe="default";function ho(){return process.env.CCGAUGE_STATE_DIR?process.env.CCGAUGE_STATE_DIR:xu.join(po.homedir(),".ccgauge")}function Nt(e){let u=e===Fe?`index-v${Ke}.json`:`index-${e}-v${Ke}.json`;return xu.join(ho(),"cache",u)}async function $t(e=Fe){let u=Nt(e);try{let t=await ze.readFile(u,"utf8"),n=JSON.parse(t);return n.schemaVersion!==Ke||!Array.isArray(n.files)?null:n}catch{return null}}async function Ut(e,u=Fe){let t=Nt(u),n=xu.dirname(t);await ze.mkdir(n,{recursive:!0});let D={schemaVersion:Ke,savedAt:e.savedAt,files:e.files},r=`${t}.tmp-${process.pid}`;await ze.writeFile(r,JSON.stringify(D)),await ze.rename(r,t)}var Co=/\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\/subagents\/agent-[^/]+\.jsonl$/i;function go(e){let u=Co.exec(e);return u?u[1]:null}function Wt({assistantRecords:e,userRecords:u,parentMap:t}){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 D=new Map;for(let o of u){if(!o.isSidechain)continue;let i=D.get(o.filePath);(!i||o.timestamp<i.timestamp)&&D.set(o.filePath,o)}let r={subagentFiles:0,relinked:0,orphans:0,alreadyLinked:0};for(let[o,i]of D){let s=go(o);if(!s)continue;r.subagentFiles+=1;let a=t[i.uuid];if(a!=null){r.alreadyLinked+=1;continue}let F=n.get(s);if(!F||F.length===0){r.orphans+=1;continue}let c=i.timestamp,f;for(let d=F.length-1;d>=0;d-=1)if(F[d].timestamp<=c){f=F[d];break}f||(f=F[0]),t[i.uuid]=f.uuid,r.relinked+=1}return r}import{homedir as mo}from"node:os";function jt(e){let u=mo();if(!u)return e;let t=new Set([u]);process.platform==="win32"&&(t.add(u.replace(/\\/g,"/")),t.add(u.replace(/\\/g,"\\\\")),t.add("\\\\?\\"+u),t.add("\\\\?\\"+u.replace(/\\/g,"/")));let n=e;for(let D of t){let r=D.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n=n.replace(new RegExp(r,"g"),"~")}return n}var Bo=200,bo=100,Ao=3e4,yo=2e3,xo=8,Ru=20,wu=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(u=Fe){this.cacheName=u}runExclusive(u){let t=this.mutationTail.then(u,u);return this.mutationTail=t.then(()=>{},()=>{}),t}init(){return this.initPromise||(this.initPromise=this.doInit()),this.initPromise}async doInit(){let u=Date.now();this.isIndexing=!0,this.lastWorkStart=u;try{await this.detectProviderDirs();let t=await $t(this.cacheName);this.loadedFromDisk=t!==null;let n=new Map;if(t)for(let D of t.files)n.set(D.filePath,D);await this.runExclusive(async()=>{await this.fullScan(n),this.rebuildSnapshotNow(),this.indexDurationMs=Date.now()-u,this.lastIndexedAt=new Date().toISOString(),this.schedulePersist()}),this.syncWatchersToDirs(),this.setupPolling()}finally{this.isIndexing=!1}}async detectProviderDirs(){let u=new Map,t=[];for(let r of yu())for(let o of r.getDirs())await Ro(o)&&(u.has(o)||(u.set(o,r),t.push(o)));let n=[],D=[];for(let r of u.keys())this.dirToProvider.has(r)||n.push(r);for(let r of this.dirToProvider.keys())u.has(r)||D.push(r);return this.dirToProvider=u,this.existingDirs=t,{added:n,removed:D}}async fullScan(u){let t=[];for(let[D,r]of this.dirToProvider){let o=await Gt(D,r);for(let i of o)t.push({file:i,provider:r})}let n=new Set(t.map(D=>D.file));await Promise.all(t.map(async({file:D,provider:r})=>{try{let o=await be.stat(D),i=u.get(D);if(i&&i.source===r.id&&i.parserVersion===r.parserVersion&&i.mtimeMs===o.mtimeMs&&i.size===o.size){this.files.set(D,{source:r.id,parserVersion:r.parserVersion,mtimeMs:o.mtimeMs,size:o.size,assistantRecords:i.assistantRecords,userRecords:i.userRecords,parentLinks:i.parentLinks});return}let s=await r.parseFile(D);this.files.set(D,{source:r.id,parserVersion:r.parserVersion,mtimeMs:o.mtimeMs,size:o.size,assistantRecords:s.assistant,userRecords:s.user,parentLinks:s.parentLinks})}catch(o){this.recordError(`parse ${D}: ${o.message}`)}}));for(let D of Array.from(this.files.keys()))n.has(D)||this.files.delete(D)}syncWatchersToDirs(){for(let[u,t]of this.watchers)if(!this.dirToProvider.has(u)){try{t.close()}catch{}this.watchers.delete(u)}for(let[u,t]of this.dirToProvider)if(!this.watchers.has(u))try{let n=Eo(u,{recursive:!0},(D,r)=>{if(!r||typeof r!="string"||!r.endsWith(".jsonl"))return;let o=qt.join(u,r);this.scheduleFileReconcile(o,t)});n.on("error",D=>{this.recordError(`watcher ${u}: ${D.message}`)}),this.watchers.set(u,n)}catch(n){this.recordError(`watch ${u}: ${n.message}`)}}setupPolling(){this.pollTimer&&clearInterval(this.pollTimer);let u=this.cacheName==="mcp",t=process.env.CCGAUGE_POLL_FALLBACK;(t==="1"||t!=="0"&&!u)&&(this.pollTimer=setInterval(()=>{this.pollOnce().catch(D=>this.recordError(`poll: ${D.message}`))},Ao),this.pollTimer.unref?.())}async pollOnce(){await this.runExclusive(async()=>{let u=Date.now(),t=await this.detectProviderDirs(),n=t.added.length>0||t.removed.length>0;n&&this.syncWatchersToDirs();let D=[];for(let[o,i]of this.dirToProvider){let s=await Gt(o,i);for(let a of s)D.push({file:a,provider:i})}let r=new Set(D.map(o=>o.file));await Promise.all(D.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()))r.has(o)||(this.files.delete(o),n=!0);n&&(this.lastWorkStart=u,this.scheduleSnapshotRebuild(),this.schedulePersist())})}scheduleFileReconcile(u,t){let n=this.fileDebouncers.get(u);n&&clearTimeout(n);let D=setTimeout(()=>{this.fileDebouncers.delete(u),this.reconcileFile(u,t).catch(r=>this.recordError(`reconcile ${u}: ${r.message}`))},Bo);D.unref?.(),this.fileDebouncers.set(u,D)}async reconcileFile(u,t){await this.runExclusive(async()=>{let n=Date.now(),D=null;try{D=await be.stat(u)}catch{}if(!D||!D.isFile()){this.files.has(u)&&(this.files.delete(u),this.lastWorkStart=n,this.scheduleSnapshotRebuild(),this.schedulePersist());return}let r=this.files.get(u);if(!(r&&r.mtimeMs===D.mtimeMs&&r.size===D.size))try{let o=await t.parseFile(u);this.files.set(u,{source:t.id,parserVersion:t.parserVersion,mtimeMs:D.mtimeMs,size:D.size,assistantRecords:o.assistant,userRecords:o.user,parentLinks:o.parentLinks}),this.lastWorkStart=n,this.scheduleSnapshotRebuild(),this.schedulePersist()}catch(o){this.recordError(`parse ${u}: ${o.message}`)}})}scheduleSnapshotRebuild(){this.snapshotRebuildTimer&&clearTimeout(this.snapshotRebuildTimer),this.snapshotRebuildTimer=setTimeout(()=>{this.snapshotRebuildTimer=null,this.rebuildSnapshotNow()},bo),this.snapshotRebuildTimer.unref?.()}rebuildSnapshotNow(){let u=Date.now(),t=this.lastWorkStart??u,n=[],D=[],r={},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,f]of this.dirToProvider)i[f.id].scannedDirs.push(c);for(let c of this.files.values()){n.push(...c.assistantRecords),D.push(...c.userRecords);for(let[f,d]of c.parentLinks)r[f]=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=Lt(n).sort((c,f)=>c.timestamp.localeCompare(f.timestamp)),a=wo(D).sort((c,f)=>c.timestamp.localeCompare(f.timestamp));Wt({assistantRecords:s,userRecords:a,parentMap:r});for(let c of s)i[c.source].assistantRecords+=1;let F={filesScanned:this.files.size,recordsParsed:o,assistantRecords:s.length,durationMs:Date.now()-t,scannedDirs:this.existingDirs};this.snapshot={records:s,userRecords:a,parentMap:r,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 u=!this.initPromise;if(await this.init(),u)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 u=Date.now();return this.lastWorkStart=u,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()-u,this.lastIndexedAt=new Date().toISOString(),this.syncWatchersToDirs(),this.schedulePersist(),this.snapshot})}finally{this.isIndexing=!1}}getStatus(){let u=this.snapshot;return{initialized:u!==null,isIndexing:this.isIndexing,lastIndexedAt:this.lastIndexedAt,indexDurationMs:this.indexDurationMs,filesIndexed:this.files.size,recordsIndexed:u?.stats.assistantRecords??0,bySource:u?.bySource??[],watchers:this.watchers.size,errors:this.errors.slice(-Ru),pendingReconciles:this.fileDebouncers.size,loadedFromDisk:this.loadedFromDisk}}schedulePersist(){this.persistTimer&&clearTimeout(this.persistTimer),this.persistTimer=setTimeout(()=>{this.persistTimer=null;let u=[];for(let[t,n]of this.files)u.push({filePath:t,source:n.source,parserVersion:n.parserVersion,mtimeMs:n.mtimeMs,size:n.size,assistantRecords:n.assistantRecords,userRecords:n.userRecords,parentLinks:n.parentLinks});Ut({savedAt:new Date().toISOString(),files:u},this.cacheName).catch(t=>this.recordError(`persist: ${t.message}`))},yo),this.persistTimer.unref?.()}recordError(u){let t=`${new Date().toISOString()} ${jt(u)}`;this.errors.push(t),this.errors.length>Ru*2&&this.errors.splice(0,this.errors.length-Ru),process.env.CCGAUGE_DEBUG&&console.error(`[ccgauge:indexer] ${new Date().toISOString()} ${u}`)}disposeWatchers(){for(let u of this.watchers.values())try{u.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 u of this.fileDebouncers.values())clearTimeout(u);this.fileDebouncers.clear()}};async function Ro(e){try{return(await be.stat(e)).isDirectory()}catch{return!1}}async function Gt(e,u){let t=[];async function n(D,r){if(r>xo)return;let o;try{o=await be.readdir(D,{withFileTypes:!0})}catch{return}for(let i of o){let s=qt.join(D,i.name);if(i.isDirectory()){if(u.shouldSkipDir(i.name))continue;await n(s,r+1)}else i.isFile()&&i.name.endsWith(".jsonl")&&t.push(s)}}return await n(e,0),t}function wo(e){let u=new Set;return e.filter(t=>{let n=t.uuid;return n?u.has(n)?!1:(u.add(n),!0):!0})}function ko(){return globalThis.__ccgaugeIndexers||(globalThis.__ccgaugeIndexers=new Map),globalThis.__ccgaugeIndexers}function Ht(e=Fe){let u=ko(),t=u.get(e);return t||(t=new wu(e),u.set(e,t)),t}async function Vt(e={}){let u=Ht();return e.force?u.forceRescan():(await u.init(),u.getSnapshot())}function oe(e){let u=re(e.source),{pricing:t}=u.resolvePricing(e.model);return u.costFromUsage(e.usage,t)}function zt(e,u){return new Intl.NumberFormat("en-US",{maximumFractionDigits:u?.maxFrac??0}).format(e)}function v(e,u="en"){return Number.isFinite(e)?u==="zh"?e>=1e8?(e/1e8).toFixed(2)+"\u4EBF":e>=1e4?(e/1e4).toFixed(1)+"\u4E07":zt(e):e>=1e9?(e/1e9).toFixed(2)+"B":e>=1e6?(e/1e6).toFixed(2)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":zt(e):"0"}function N(e,u){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:u?.minFrac??2,maximumFractionDigits:u?.maxFrac??2}).format(e)}function de(e,u=1){return Number.isFinite(e)?`${(e*100).toFixed(u)}%`:"0%"}function Kt(e){if(e<1e3)return`${e}ms`;let u=Math.floor(e/1e3);if(u<60)return`${u}s`;let t=Math.floor(u/60);if(t<60){let r=u%60;return r?`${t}m ${r}s`:`${t}m`}let n=Math.floor(t/60),D=t%60;return D?`${n}h ${D}m`:`${n}h`}function Ae(e){if(!e)return"(unknown)";let t=e.replace(/[/\\]+$/,"").split(/[/\\]+/);return t[t.length-1]||e}import{readFileSync as So,statSync as To}from"node:fs";import{basename as Yt}from"node:path";var Jt=new Map,_o=/^(.+?)[/\\]\.git[/\\]worktrees[/\\]([^/\\]+)[/\\]?$/,vo=/^(.+?)[/\\](?:\.git|\.claude)[/\\]worktrees[/\\]([^/\\]+)(?:[/\\].*)?$/;function Io(e){let u=Ae(e);if(!e)return{label:u,isWorktree:!1,mainName:u,worktreeName:"",canonicalCwd:e};let t=vo.exec(e);if(t){let n=t[1],D=t[2],r=Yt(n)||n;return{label:`${r} (${D})`,isWorktree:!0,mainName:r,worktreeName:D,canonicalCwd:n}}try{let n=`${e}/.git`;if(!To(n).isFile())return{label:u,isWorktree:!1,mainName:u,worktreeName:"",canonicalCwd:e};let o=So(n,"utf8").trim().split(/\r?\n/,1)[0]??"",i=/^gitdir:\s*(.+)$/.exec(o);if(!i)return{label:u,isWorktree:!1,mainName:u,worktreeName:"",canonicalCwd:e};let s=i[1].trim(),a=_o.exec(s);if(!a)return{label:u,isWorktree:!1,mainName:u,worktreeName:"",canonicalCwd:e};let F=a[1],c=a[2],f=Yt(F)||F;return{label:`${f} (${c})`,isWorktree:!0,mainName:f,worktreeName:c,canonicalCwd:F}}catch{return{label:u,isWorktree:!1,mainName:u,worktreeName:"",canonicalCwd:e}}}function Xt(e){let u=Jt.get(e);if(u)return u.label;let t=Io(e);return Jt.set(e,t),t.label}var Mo=["hour","day","week","month"];function Zt(e){return typeof e=="string"&&Mo.includes(e)}function ku(e,u){let t=new Date(e),n=t.getFullYear(),D=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0"),o=String(t.getHours()).padStart(2,"0");if(u==="hour")return{key:`${n}-${D}-${r}T${o}`,label:`${D}/${r} ${o}:00`};if(u==="day")return{key:`${n}-${D}-${r}`,label:`${D}/${r}`};if(u==="week"){let i=new Date(t),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}-${D}`,label:`${n}-${D}`}}function ye(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 xe(e,u){return!(e.source!==u.source||u.fromIso&&e.timestamp<u.fromIso||u.toIso&&e.timestamp>u.toIso||u.models&&!u.models.has(e.model)||u.projects&&!u.projects.has(e.cwd))}function Qt(e,u,t){let n=new Map,D=ye(t);for(let r of e){if(!xe(r,D))continue;let{key:o,label:i}=ku(r.timestamp,u),s=n.get(o);s||(s=Po(o,i),n.set(o,s)),Oo(s,r)}return Array.from(n.values()).sort((r,o)=>r.key.localeCompare(o.key))}function Po(e,u){return{key:e,label:u,inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,totalTokens:0,cost:0,saved:0,requests:0,models:{}}}function Oo(e,u){let t=oe(u);e.inputTokens+=u.usage.input_tokens,e.outputTokens+=u.usage.output_tokens,e.cacheReadTokens+=u.usage.cache_read_input_tokens,e.cacheCreationTokens+=u.usage.cache_creation_input_tokens,e.totalTokens=e.inputTokens+e.outputTokens+e.cacheReadTokens+e.cacheCreationTokens,e.cost+=t.total,e.saved+=t.saved,e.requests+=1;let n=e.models[u.model]??{tokens:0,cost:0,requests:0};n.tokens+=u.usage.input_tokens+u.usage.output_tokens+u.usage.cache_read_input_tokens+u.usage.cache_creation_input_tokens,n.cost+=t.total,n.requests+=1,e.models[u.model]=n}function en(e,u){let t=new Map,n=ye(u);for(let D of e){if(!xe(D,n))continue;let r=t.get(D.model);if(!r){let{pricing:i,matchType:s}=re(D.source).resolvePricing(D.model);r={model:D.model,source:D.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"},t.set(D.model,r)}let o=oe(D);r.requests+=1,r.inputTokens+=D.usage.input_tokens,r.outputTokens+=D.usage.output_tokens,r.cacheReadTokens+=D.usage.cache_read_input_tokens,r.cacheCreationTokens+=D.usage.cache_creation_input_tokens,r.totalTokens=r.inputTokens+r.outputTokens+r.cacheReadTokens+r.cacheCreationTokens,r.cost+=o.total,r.saved+=o.saved}return Array.from(t.values()).sort((D,r)=>r.cost-D.cost)}function un(e,u){let t=new Map,n=new Map,D=ye(u);for(let r of e){if(!xe(r,D))continue;let o=r.cwd||"(unknown)",i=t.get(o);i||(i={source:u.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:r.timestamp,lastActivity:r.timestamp,models:[]},t.set(o,i),n.set(o,new Set)),n.get(o).add(r.sessionId);let s=oe(r);i.requests+=1,i.inputTokens+=r.usage.input_tokens,i.outputTokens+=r.usage.output_tokens,i.cacheReadTokens+=r.usage.cache_read_input_tokens,i.cacheCreationTokens+=r.usage.cache_creation_input_tokens,i.totalTokens=i.inputTokens+i.outputTokens+i.cacheReadTokens+i.cacheCreationTokens,i.cost+=s.total,i.saved+=s.saved,r.timestamp<i.firstActivity&&(i.firstActivity=r.timestamp),r.timestamp>i.lastActivity&&(i.lastActivity=r.timestamp),i.models.includes(r.model)||i.models.push(r.model)}for(let[r,o]of n){let i=t.get(r);i.sessions=o.size}return Array.from(t.values()).sort((r,o)=>o.cost-r.cost)}function tn(e,u,t){let n=new Map,D=ye(t);for(let o of e){if(!xe(o,D))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:Xt(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 r=new Map;for(let o of u){let i=r.get(o.sessionId);(!i||o.timestamp<i.timestamp)&&r.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=r.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 nn(e,u){let t=0,n=0,D=0,r=0,o=0,i=0,s=0,a=ye(u);for(let F of e){if(!xe(F,a))continue;let c=oe(F);t+=F.usage.input_tokens,n+=F.usage.output_tokens,D+=F.usage.cache_read_input_tokens,r+=F.usage.cache_creation_input_tokens,o+=c.total,i+=c.saved,s+=1}return{inputTokens:t,outputTokens:n,cacheReadTokens:D,cacheCreationTokens:r,totalTokens:t+n+D+r,cost:o,saved:i,requests:s}}var Lo=["1d","7d","30d","90d","all","custom"];function Dn(e){return typeof e=="string"&&Lo.includes(e)}function rn(e){let u=new Date;if(e==="all"||e==="custom")return{};if(e==="1d")return{from:new Date(u.getFullYear(),u.getMonth(),u.getDate())};let t=e.match(/^(\d+)([dwm])$/);if(!t)return{};let n=parseInt(t[1],10),D=t[2],r=new Date(u);return D==="d"?r.setDate(r.getDate()-n):D==="w"?r.setDate(r.getDate()-n*7):D==="m"&&r.setMonth(r.getMonth()-n),{from:r}}function No(e,u,t){let n=new Map;for(let i of u)i.isSynthetic||i.textPreview&&i.textPreview.trim()&&n.set(i.uuid,i.textPreview);let D=new Map,r=new Map;function o(i){let s=[],a=i,F=null,c=0,f=new Set;for(;a&&c++<5e3&&!f.has(a);){f.add(a);let d=r.get(a);if(d){F=d;break}if(s.push(a),n.has(a)){F=a;break}a=t[a]??null}F||(F=i);for(let d of s)r.set(d,F);return F}for(let i of e)D.set(i.uuid,o(i.uuid));return D}function Re(e,u,t){let n=No(e,u,t),D=new Map;for(let r of e){let o=n.get(r.uuid)??r.uuid,i=D.get(o);(!i||r.timestamp<i.firstTimestamp)&&D.set(o,{turnId:o,firstTimestamp:r.timestamp,firstModel:r.model,cwd:r.cwd,sessionId:r.sessionId,source:r.source})}return D}import nu from"node:process";function Su({onlyFirst:e=!1}={}){let D="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(D,e?void 0:"g")}var $o=Su();function Y(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes("\x1B")&&!e.includes("\x9B")?e:e.replace($o,"")}var on=[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],sn=12288,an=65510,cn=[12288,12288,65281,65376,65504,65510];var ln=4352,Fn=262141,Tu=[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,u)=>{let t=0,n=Math.floor(e.length/2)-1;for(;t<=n;){let D=Math.floor((t+n)/2),r=D*2;if(u<e[r])n=D-1;else if(u>e[r+1])t=D+1;else return!0}return!1};var dn=19968,[jo,Go]=qo(Tu);function qo(e){let u=e[0],t=e[1];for(let n=0;n<e.length;n+=2){let D=e[n],r=e[n+1];if(dn>=D&&dn<=r)return[D,r];r-D>t-u&&(u=D,t=r)}return[u,t]}var fn=e=>e<161||e>1114109?!1:Ye(on,e),we=e=>e<sn||e>an?!1:Ye(cn,e);var ke=e=>e>=jo&&e<=Go?!0:e<ln||e>Fn?!1:Ye(Tu,e);function Ho(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function J(e,{ambiguousAsWide:u=!1}={}){return Ho(e),we(e)||ke(e)||u&&fn(e)?2:1}var Cn=le(hn(),1),Vo=new Intl.Segmenter,zo=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function P(e,u={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:t=!0,countAnsiEscapeCodes:n=!1}=u;if(n||(e=Y(e)),e.length===0)return 0;let D=0,r={ambiguousAsWide:!t};for(let{segment:o}of Vo.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)&&!zo.test(o)){if((0,Cn.default)().test(o)){D+=2;continue}D+=J(i,r)}}return D}var gn=(e=0)=>u=>`\x1B[${u+e}m`,mn=(e=0)=>u=>`\x1B[${38+e};5;${u}m`,En=(e=0)=>(u,t,n)=>`\x1B[${38+e};2;${u};${t};${n}m`,y={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]}},rF=Object.keys(y.modifier),Ko=Object.keys(y.color),Yo=Object.keys(y.bgColor),oF=[...Ko,...Yo];function Jo(){let e=new Map;for(let[u,t]of Object.entries(y)){for(let[n,D]of Object.entries(t))y[n]={open:`\x1B[${D[0]}m`,close:`\x1B[${D[1]}m`},t[n]=y[n],e.set(D[0],D[1]);Object.defineProperty(y,u,{value:t,enumerable:!1})}return Object.defineProperty(y,"codes",{value:e,enumerable:!1}),y.color.close="\x1B[39m",y.bgColor.close="\x1B[49m",y.color.ansi=gn(),y.color.ansi256=mn(),y.color.ansi16m=En(),y.bgColor.ansi=gn(10),y.bgColor.ansi256=mn(10),y.bgColor.ansi16m=En(10),Object.defineProperties(y,{rgbToAnsi256:{value(u,t,n){return u===t&&t===n?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(u){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(r=>r+r).join(""));let D=Number.parseInt(n,16);return[D>>16&255,D>>8&255,D&255]},enumerable:!1},hexToAnsi256:{value:u=>y.rgbToAnsi256(...y.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value(u){if(u<8)return 30+u;if(u<16)return 90+(u-8);let t,n,D;if(u>=232)t=((u-232)*10+8)/255,n=t,D=t;else{u-=16;let i=u%36;t=Math.floor(u/36)/5,n=Math.floor(i/6)/5,D=i%6/5}let r=Math.max(t,n,D)*2;if(r===0)return 30;let o=30+(Math.round(D)<<2|Math.round(n)<<1|Math.round(t));return r===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(u,t,n)=>y.ansi256ToAnsi(y.rgbToAnsi256(u,t,n)),enumerable:!1},hexToAnsi:{value:u=>y.ansi256ToAnsi(y.hexToAnsi256(u)),enumerable:!1}}),y}var Xo=Jo(),U=Xo;import _u from"node:process";import Zo from"node:os";import Bn from"node:tty";function $(e,u=globalThis.Deno?globalThis.Deno.args:_u.argv){let t=e.startsWith("-")?"":e.length===1?"-":"--",n=u.indexOf(t+e),D=u.indexOf("--");return n!==-1&&(D===-1||n<D)}var{env:x}=_u,Je;$("no-color")||$("no-colors")||$("color=false")||$("color=never")?Je=0:($("color")||$("colors")||$("color=true")||$("color=always"))&&(Je=1);function Qo(){if("FORCE_COLOR"in x)return x.FORCE_COLOR==="true"?1:x.FORCE_COLOR==="false"?0:x.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(x.FORCE_COLOR,10),3)}function ei(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function ui(e,{streamIsTTY:u,sniffFlags:t=!0}={}){let n=Qo();n!==void 0&&(Je=n);let D=t?Je:n;if(D===0)return 0;if(t){if($("color=16m")||$("color=full")||$("color=truecolor"))return 3;if($("color=256"))return 2}if("TF_BUILD"in x&&"AGENT_NAME"in x)return 1;if(e&&!u&&D===void 0)return 0;let r=D||0;if(x.TERM==="dumb")return r;if(_u.platform==="win32"){let o=Zo.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in x)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in x)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in x)||x.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in x)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(x.TEAMCITY_VERSION)?1:0;if(x.COLORTERM==="truecolor"||x.TERM==="xterm-kitty"||x.TERM==="xterm-ghostty"||x.TERM==="wezterm")return 3;if("TERM_PROGRAM"in x){let o=Number.parseInt((x.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(x.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(x.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(x.TERM)||"COLORTERM"in x?1:r}function bn(e,u={}){let t=ui(e,{streamIsTTY:e&&e.isTTY,...u});return ei(t)}var ti={stdout:bn({isTTY:Bn.isatty(1)}),stderr:bn({isTTY:Bn.isatty(2)})},An=ti;function yn(e,u,t){let n=e.indexOf(u);if(n===-1)return e;let D=u.length,r=0,o="";do o+=e.slice(r,n)+u+t,r=n+D,n=e.indexOf(u,r);while(n!==-1);return o+=e.slice(r),o}function xn(e,u,t,n){let D=0,r="";do{let o=e[n-1]==="\r";r+=e.slice(D,o?n-1:n)+u+(o?`\r
8
+ `)[0].length}};iu.reset=()=>Z.reset();function Dt(e,u,t){let n=[];e.forEach(function(r){n.push(r.draw(u))});let D=n.join("");D.length&&t.push(D)}er.exports=iu});var nr=A((f0,tr)=>{tr.exports=ur()});import He from"node:path";import eo from"node:os";import{createReadStream as Yr}from"node:fs";import Jr from"node:readline";var Eu=200;async function xt(e){let u=Yr(e,{encoding:"utf8"}),t=Jr.createInterface({input:u,crlfDelay:1/0}),n=[],D=[],r=[];for await(let o of t){if(!o.trim())continue;let i;try{i=JSON.parse(o)}catch{continue}if(!(!i||typeof i!="object")){if(i.uuid&&r.push([i.uuid,i.parentUuid??null]),i.type==="assistant"){let s=Xr(i,e);s&&n.push(s)}else if(i.type==="user"){let s=Zr(i,e);s&&D.push(s)}}}return{assistant:n,user:D,parentLinks:r}}function Xr(e,u){let t=e.message;if(!t)return null;let n=t.usage;if(!n)return null;let D=t.model??"";if(!D||D==="<synthetic>")return null;let r=t.id??e.uuid??"";if(!r&&!e.requestId)return null;let o=n.cache_creation,i=Array.isArray(t.content)?t.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,Eu));return{type:"assistant",source:"claude",uuid:e.uuid??r,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:D,messageId:r,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:u,isSidechain:e.isSidechain===!0?!0:void 0}}function Zr(e,u){if(!e.uuid)return null;let t=e.message,n="";if(t){let o=t.content;if(typeof o=="string")n=o.slice(0,Eu);else if(Array.isArray(o)){for(let i of o)if(i.type==="text"&&typeof i.text=="string"){n=i.text.slice(0,Eu);break}}}let D=e.isSidechain===!0,r=D||!!n&&Qr(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:r,isSidechain:D?!0:void 0,filePath:u}}function Qr(e){let u=e.trimStart();return!!(u.startsWith("Base directory for this skill:")||u.startsWith("<system-reminder>")||u.startsWith("Caveat: The messages below were generated by"))}var q={"claude-opus-4-8":{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-6":{input:5,output:25,cacheCreation5m:6.25,cacheCreation1h:10,cacheRead:.5},"claude-opus-4-5":{input:5,output:25,cacheCreation5m:6.25,cacheCreation1h:10,cacheRead:.5},"claude-sonnet-4-6":{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-haiku-4-5":{input:1,output:5,cacheCreation5m:1.25,cacheCreation1h:2,cacheRead:.1},"claude-haiku-3-5":{input:.8,output:4,cacheCreation5m:1,cacheCreation1h:1.6,cacheRead:.08},"claude-opus-4-1":{input:15,output:75,cacheCreation5m:18.75,cacheCreation1h:30,cacheRead:1.5},"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":{input:.25,output:1.25,cacheCreation5m:.3,cacheCreation1h:.5,cacheRead:.03}},Rt={opus:q["claude-opus-4-8"],sonnet:q["claude-sonnet-4-6"],haiku:q["claude-haiku-4-5"]};function Be(e,u){if(!u)return{input:0,output:0,cacheCreation5m:0,cacheCreation1h:0,cacheRead:0,total:0,saved:0};let t=e.input_tokens/1e6*u.input,n=e.output_tokens/1e6*u.output,D=e.cache_creation_5m/1e6*u.cacheCreation5m,r=e.cache_creation_1h/1e6*u.cacheCreation1h;D+r===0&&e.cache_creation_input_tokens>0&&(D=e.cache_creation_input_tokens/1e6*u.cacheCreation5m);let o=e.cache_read_input_tokens/1e6*u.cacheRead,i=t+n+D+r+o,s=e.cache_read_input_tokens/1e6*(u.input-u.cacheRead);return{input:t,output:n,cacheCreation5m:D,cacheCreation1h:r,cacheRead:o,total:i,saved:s}}function wt(e){return e.replace(/\b\w/g,u=>u.toUpperCase())}function kt(e){if(!e)return"(unknown)";let u=e.replace(/-(\d{8})$/,"").replace(/^(vertex_ai|bedrock|anthropic)\//,"");u=u.replace(/^claude-/,"");let t=u.split("-");if(t.length>=2){let n=t[0],D=t.slice(1).join(".");return wt(n)+" "+D}return wt(u.replace(/-/g," "))}var uo=/-\d{8}$/,to=/^(vertex_ai|bedrock|anthropic)\//;function no(e){if(!e)return{pricing:null,matchType:"none",matchedKey:null};if(q[e])return{pricing:q[e],matchType:"exact",matchedKey:e};let u=e.replace(uo,"");if(q[u])return{pricing:q[u],matchType:"date-stripped",matchedKey:u};let t=u.replace(to,"");if(q[t])return{pricing:q[t],matchType:"prefix-stripped",matchedKey:t};for(let n of["opus","sonnet","haiku"])if(e.toLowerCase().includes(n))return{pricing:Rt[n],matchType:"family-fallback",matchedKey:`claude-${n}-(latest)`};return{pricing:null,matchType:"none",matchedKey:null}}function Do(){let e=eo.homedir(),u=[He.join(e,".claude","projects"),He.join(e,".config","claude","projects")];return process.env.CCGAUGE_CONFIG_DIR&&u.push(He.join(process.env.CCGAUGE_CONFIG_DIR,"projects")),process.env.CLAUDE_CONFIG_DIR&&u.push(He.join(process.env.CLAUDE_CONFIG_DIR,"projects")),Array.from(new Set(u))}var St={id:"claude",displayName:{en:"Claude",zh:"Claude"},shortLabel:"C",color:{fg:"#b45309",bg:"#fef3c7"},logoSrc:"/claude-logo.webp",parserVersion:"claude-v4-sidechain-merge",capabilities:{hasCacheCreation:!0,hasReasoningTokens:!1,blockWindowMs:300*60*1e3},getDirs:Do,shouldSkipDir:e=>e==="tool-results"||e==="memory",parseFile:async e=>await xt(e),resolvePricing:no,shortenModel:kt,costFromUsage:Be,costFootnoteKey:null};import Ve from"node:path";import fo from"node:os";import{createReadStream as ro,promises as oo}from"node:fs";import io from"node:readline";var Bu=200;async function so(e){try{let u=await oo.stat(e);return new Date(u.mtimeMs).toISOString()}catch{return new Date().toISOString()}}function M(e){return typeof e=="string"?e:""}function ne(e){let u=Number(e);return Number.isFinite(u)?u:0}function bu(e){let u=e.message;if(typeof u=="string")return u;let t=e.content;if(typeof t=="string")return t;if(Array.isArray(t))for(let n of t){let D=n?.type;if((D==="input_text"||D==="output_text"||D==="text")&&typeof n.text=="string")return n.text}return""}async function Tt(e){let u=ro(e,{encoding:"utf8"}),t=io.createInterface({input:u,crlfDelay:1/0}),n=[],D=[],r=[],o="",i,s="",a=0,F=0,c=null,d=await so(e),l={turnId:null,cwd:"",model:"gpt-unknown",userUuid:null,toolNames:[],hasThinking:!1,pendingTextPreview:""};for await(let C of t){if(!C.trim())continue;let h;try{h=JSON.parse(C)}catch{continue}if(!h||typeof h!="object"||!h.type)continue;let p=h.payload??{},g=M(h.timestamp),B=g||d;if(g&&(d=g),h.type==="session_meta"){o=M(p.id),s=M(p.cwd),i=M(p.cli_version)||void 0;let m=M(p.timestamp);m&&(d=m),l.cwd||(l.cwd=s);continue}if(h.type==="turn_context"){l.turnId=M(p.turn_id)||l.turnId,l.cwd=M(p.cwd)||s;let m=M(p.model);m&&(l.model=m);let b=M(p.effort);b&&(l.effort=b),l.toolNames=[],l.hasThinking=!1,l.pendingTextPreview="";continue}if(h.type==="event_msg"){let m=M(p.type);if(m==="user_message"){let b=bu(p);if(!b)continue;let k=`${o}::u${a++}`;D.push({type:"user",source:"codex",uuid:k,parentUuid:null,timestamp:B,sessionId:o,cwd:l.cwd||s,textPreview:b.slice(0,Bu),filePath:e}),r.push([k,null]),l.userUuid=k;continue}if(m==="agent_message"){let b=bu(p);b&&!l.pendingTextPreview&&(l.pendingTextPreview=b.slice(0,Bu));continue}if(m==="agent_reasoning"){l.hasThinking=!0;continue}if(m==="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,ue,K,te,z;if(S){if(c===null?(ue=S.input,K=S.cached,te=S.output,z=S.reasoning):(ue=Math.max(0,S.input-c.input),K=Math.max(0,S.cached-c.cached),te=Math.max(0,S.output-c.output),z=Math.max(0,S.reasoning-c.reasoning)),ue===0&&K===0&&te===0&&z===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(ue=ne(se.input_tokens),K=ne(se.cached_input_tokens),te=ne(se.output_tokens),z=ne(se.reasoning_output_tokens),ue===0&&K===0&&te===0&&z===0)continue;c===null?c={input:ue,cached:K,output:te,reasoning:z}:c={input:c.input+ue,cached:c.cached+K,output:c.output+te,reasoning:c.reasoning+z}}else continue;let Bt=`${o}::a${F++}`,bt=l.turnId?`${l.turnId}::a${F}`:`${o}::a${F}`;n.push({type:"assistant",source:"codex",uuid:Bt,parentUuid:l.userUuid,timestamp:B,sessionId:o,requestId:bt,cwd:l.cwd||s,version:i,model:l.model||"gpt-unknown",messageId:bt,usage:{input_tokens:Math.max(0,ue-K),output_tokens:te+z,cache_creation_input_tokens:0,cache_read_input_tokens:K,cache_creation_5m:0,cache_creation_1h:0,reasoning_tokens:z},toolNames:[...l.toolNames],hasThinking:l.hasThinking,textPreview:l.pendingTextPreview,filePath:e,effort:l.effort}),r.push([Bt,l.userUuid]),l.toolNames=[],l.hasThinking=!1,l.pendingTextPreview="";continue}continue}if(h.type==="response_item"){let m=M(p.type);if(m==="function_call"||m==="custom_tool_call"){let b=M(p.name);b&&l.toolNames.push(b);continue}if(m==="reasoning"){l.hasThinking=!0;continue}if(m==="message"){if(M(p.role)==="assistant"){let k=bu(p);k&&!l.pendingTextPreview&&(l.pendingTextPreview=k.slice(0,Bu))}continue}continue}}return{assistant:n,user:D,parentLinks:r}}var De={"gpt-5":{input:1.25,output:10,cacheRead:.13,cacheCreation5m:0,cacheCreation1h:0},"gpt-5-mini":{input:.25,output:2,cacheRead:.025,cacheCreation5m:0,cacheCreation1h:0},"gpt-5-nano":{input:.05,output:.4,cacheRead:.005,cacheCreation5m:0,cacheCreation1h:0},"gpt-5.4":{input:1.25,output:10,cacheRead:.13,cacheCreation5m:0,cacheCreation1h:0},"gpt-5.5":{input:1.25,output:10,cacheRead:.13,cacheCreation5m:0,cacheCreation1h:0},"gpt-5.5-mini":{input:.25,output:2,cacheRead:.025,cacheCreation5m:0,cacheCreation1h:0},"gpt-5.5-nano":{input:.05,output:.4,cacheRead:.005,cacheCreation5m:0,cacheCreation1h:0},"gpt-4.1":{input:2,output:8,cacheRead:.5,cacheCreation5m:0,cacheCreation1h:0},"gpt-4.1-mini":{input:.4,output:1.6,cacheRead:.1,cacheCreation5m:0,cacheCreation1h:0},o3:{input:2,output:8,cacheRead:.5,cacheCreation5m:0,cacheCreation1h:0},"o4-mini":{input:1.1,output:4.4,cacheRead:.275,cacheCreation5m:0,cacheCreation1h:0}},_t={gpt:De["gpt-5"],o:De.o3},ao=/-\d{8}$/,co=/^(openai)\//;function vt(e){if(!e)return{pricing:null,matchType:"none",matchedKey:null};if(De[e])return{pricing:De[e],matchType:"exact",matchedKey:e};let u=e.replace(ao,"");if(De[u])return{pricing:De[u],matchType:"date-stripped",matchedKey:u};let t=u.replace(co,"");if(De[t])return{pricing:De[t],matchType:"prefix-stripped",matchedKey:t};let n=e.toLowerCase();return n.startsWith("gpt-")||n==="gpt"?{pricing:_t.gpt,matchType:"family-fallback",matchedKey:"gpt-(latest)"}:/^o\d/.test(n)?{pricing:_t.o,matchType:"family-fallback",matchedKey:"o-(latest)"}:{pricing:null,matchType:"none",matchedKey:null}}function lo(e){return e.replace(/\b\w/g,u=>u.toUpperCase())}var Fo={mini:"Mini",nano:"Nano",pro:"Pro",turbo:"Turbo",preview:"Preview"};function It(e){if(!e)return"(unknown)";let u=e.replace(/^openai\//,"");return u.toLowerCase().startsWith("gpt-")?"GPT-"+u.slice(4).split("-").map(D=>Fo[D.toLowerCase()]??D).join(" "):u.toLowerCase().startsWith("o")?u.toUpperCase():lo(u.replace(/-/g," "))}function po(){let e=fo.homedir(),u=[Ve.join(e,".codex","sessions"),Ve.join(e,".codex","archived_sessions")];return process.env.CCGAUGE_CODEX_DIR&&u.push(process.env.CCGAUGE_CODEX_DIR),process.env.CODEX_HOME&&(u.push(Ve.join(process.env.CODEX_HOME,"sessions")),u.push(Ve.join(process.env.CODEX_HOME,"archived_sessions"))),Array.from(new Set(u))}var Mt={id:"codex",displayName:{en:"Codex",zh:"Codex"},shortLabel:"X",color:{fg:"#047857",bg:"#d1fae5"},logoSrc:"/codex-logo.webp",parserVersion:"codex-v5-last-total-prev",capabilities:{hasCacheCreation:!1,hasReasoningTokens:!0,blockWindowMs:300*60*1e3},getDirs:po,shouldSkipDir:()=>!1,parseFile:Tt,resolvePricing:vt,shortenModel:It,costFromUsage:Be,costFootnoteKey:"cost.footnote.codex"};var Pt={claude:St,codex:Mt},Au=["claude","codex"];function re(e){return Pt[e]}function yu(){return Au.map(e=>Pt[e])}function Ot(e){return typeof e=="string"&&(e==="claude"||e==="codex")}import{promises as be,watch as bo}from"node:fs";import Vt from"node:path";function ho(e){let u=`${e.source}:`;return e.messageId&&e.requestId?`${u}${e.messageId}::${e.requestId}`:e.messageId?`${u}mid:${e.messageId}`:e.requestId?`${u}req:${e.requestId}`:`${u}uuid:${e.uuid}`}function Lt(e){let u=new Map;for(let t of e){let n=ho(t),D=u.get(n);if(!D){u.set(n,t);continue}t.timestamp<D.timestamp&&u.set(n,t)}return Array.from(u.values())}import{promises as Ke}from"node:fs";import xu from"node:path";import Co from"node:os";var ze=2,Fe="default";function go(){return process.env.CCGAUGE_STATE_DIR?process.env.CCGAUGE_STATE_DIR:xu.join(Co.homedir(),".ccgauge")}function Nt(e){let u=e===Fe?`index-v${ze}.json`:`index-${e}-v${ze}.json`;return xu.join(go(),"cache",u)}async function $t(e=Fe){let u=Nt(e);try{let t=await Ke.readFile(u,"utf8"),n=JSON.parse(t);return n.schemaVersion!==ze||!Array.isArray(n.files)?null:n}catch{return null}}async function Ut(e,u=Fe){let t=Nt(u),n=xu.dirname(t);await Ke.mkdir(n,{recursive:!0});let D={schemaVersion:ze,savedAt:e.savedAt,files:e.files},r=`${t}.tmp-${process.pid}`;await Ke.writeFile(r,JSON.stringify(D)),await Ke.rename(r,t)}var Wt=/[\\/]([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})[\\/]subagents[\\/](?:[^\\/]+[\\/])*agent-[^\\/]+\.jsonl$/i,mo=/[\\/]subagents[\\/]workflows[\\/]/i;function Eo(e){let u=Wt.exec(e);return u?u[1]:null}function jt(e){return Wt.test(e)?mo.test(e)?"workflow":"task":null}function Gt({assistantRecords:e,userRecords:u,parentMap:t}){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 D=new Map;for(let o of u){if(!o.isSidechain)continue;let i=D.get(o.filePath);(!i||o.timestamp<i.timestamp)&&D.set(o.filePath,o)}let r={subagentFiles:0,relinked:0,orphans:0,alreadyLinked:0};for(let[o,i]of D){let s=Eo(o);if(!s)continue;r.subagentFiles+=1;let a=t[i.uuid];if(a!=null){r.alreadyLinked+=1;continue}let F=n.get(s);if(!F||F.length===0){r.orphans+=1;continue}let c=i.timestamp,f;for(let d=F.length-1;d>=0;d-=1)if(F[d].timestamp<=c){f=F[d];break}f||(f=F[0]),t[i.uuid]=f.uuid,r.relinked+=1}return r}import{homedir as Bo}from"node:os";function qt(e){let u=Bo();if(!u)return e;let t=new Set([u]);process.platform==="win32"&&(t.add(u.replace(/\\/g,"/")),t.add(u.replace(/\\/g,"\\\\")),t.add("\\\\?\\"+u),t.add("\\\\?\\"+u.replace(/\\/g,"/")));let n=e;for(let D of t){let r=D.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n=n.replace(new RegExp(r,"g"),"~")}return n}var Ao=200,yo=100,xo=3e4,Ro=2e3,wo=8,Ru=20,wu=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(u=Fe){this.cacheName=u}runExclusive(u){let t=this.mutationTail.then(u,u);return this.mutationTail=t.then(()=>{},()=>{}),t}init(){return this.initPromise||(this.initPromise=this.doInit()),this.initPromise}async doInit(){let u=Date.now();this.isIndexing=!0,this.lastWorkStart=u;try{await this.detectProviderDirs();let t=await $t(this.cacheName);this.loadedFromDisk=t!==null;let n=new Map;if(t)for(let D of t.files)n.set(D.filePath,D);await this.runExclusive(async()=>{await this.fullScan(n),this.rebuildSnapshotNow(),this.indexDurationMs=Date.now()-u,this.lastIndexedAt=new Date().toISOString(),this.schedulePersist()}),this.syncWatchersToDirs(),this.setupPolling()}finally{this.isIndexing=!1}}async detectProviderDirs(){let u=new Map,t=[];for(let r of yu())for(let o of r.getDirs())await ko(o)&&(u.has(o)||(u.set(o,r),t.push(o)));let n=[],D=[];for(let r of u.keys())this.dirToProvider.has(r)||n.push(r);for(let r of this.dirToProvider.keys())u.has(r)||D.push(r);return this.dirToProvider=u,this.existingDirs=t,{added:n,removed:D}}async fullScan(u){let t=[];for(let[D,r]of this.dirToProvider){let o=await Ht(D,r);for(let i of o)t.push({file:i,provider:r})}let n=new Set(t.map(D=>D.file));await Promise.all(t.map(async({file:D,provider:r})=>{try{let o=await be.stat(D),i=u.get(D);if(i&&i.source===r.id&&i.parserVersion===r.parserVersion&&i.mtimeMs===o.mtimeMs&&i.size===o.size){this.files.set(D,{source:r.id,parserVersion:r.parserVersion,mtimeMs:o.mtimeMs,size:o.size,assistantRecords:i.assistantRecords,userRecords:i.userRecords,parentLinks:i.parentLinks});return}let s=await r.parseFile(D);this.files.set(D,{source:r.id,parserVersion:r.parserVersion,mtimeMs:o.mtimeMs,size:o.size,assistantRecords:s.assistant,userRecords:s.user,parentLinks:s.parentLinks})}catch(o){this.recordError(`parse ${D}: ${o.message}`)}}));for(let D of Array.from(this.files.keys()))n.has(D)||this.files.delete(D)}syncWatchersToDirs(){for(let[u,t]of this.watchers)if(!this.dirToProvider.has(u)){try{t.close()}catch{}this.watchers.delete(u)}for(let[u,t]of this.dirToProvider)if(!this.watchers.has(u))try{let n=bo(u,{recursive:!0},(D,r)=>{if(!r||typeof r!="string"||!r.endsWith(".jsonl"))return;let o=Vt.join(u,r);this.scheduleFileReconcile(o,t)});n.on("error",D=>{this.recordError(`watcher ${u}: ${D.message}`)}),this.watchers.set(u,n)}catch(n){this.recordError(`watch ${u}: ${n.message}`)}}setupPolling(){this.pollTimer&&clearInterval(this.pollTimer);let u=this.cacheName==="mcp",t=process.env.CCGAUGE_POLL_FALLBACK;(t==="1"||t!=="0"&&!u)&&(this.pollTimer=setInterval(()=>{this.pollOnce().catch(D=>this.recordError(`poll: ${D.message}`))},xo),this.pollTimer.unref?.())}async pollOnce(){await this.runExclusive(async()=>{let u=Date.now(),t=await this.detectProviderDirs(),n=t.added.length>0||t.removed.length>0;n&&this.syncWatchersToDirs();let D=[];for(let[o,i]of this.dirToProvider){let s=await Ht(o,i);for(let a of s)D.push({file:a,provider:i})}let r=new Set(D.map(o=>o.file));await Promise.all(D.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()))r.has(o)||(this.files.delete(o),n=!0);n&&(this.lastWorkStart=u,this.scheduleSnapshotRebuild(),this.schedulePersist())})}scheduleFileReconcile(u,t){let n=this.fileDebouncers.get(u);n&&clearTimeout(n);let D=setTimeout(()=>{this.fileDebouncers.delete(u),this.reconcileFile(u,t).catch(r=>this.recordError(`reconcile ${u}: ${r.message}`))},Ao);D.unref?.(),this.fileDebouncers.set(u,D)}async reconcileFile(u,t){await this.runExclusive(async()=>{let n=Date.now(),D=null;try{D=await be.stat(u)}catch{}if(!D||!D.isFile()){this.files.has(u)&&(this.files.delete(u),this.lastWorkStart=n,this.scheduleSnapshotRebuild(),this.schedulePersist());return}let r=this.files.get(u);if(!(r&&r.mtimeMs===D.mtimeMs&&r.size===D.size))try{let o=await t.parseFile(u);this.files.set(u,{source:t.id,parserVersion:t.parserVersion,mtimeMs:D.mtimeMs,size:D.size,assistantRecords:o.assistant,userRecords:o.user,parentLinks:o.parentLinks}),this.lastWorkStart=n,this.scheduleSnapshotRebuild(),this.schedulePersist()}catch(o){this.recordError(`parse ${u}: ${o.message}`)}})}scheduleSnapshotRebuild(){this.snapshotRebuildTimer&&clearTimeout(this.snapshotRebuildTimer),this.snapshotRebuildTimer=setTimeout(()=>{this.snapshotRebuildTimer=null,this.rebuildSnapshotNow()},yo),this.snapshotRebuildTimer.unref?.()}rebuildSnapshotNow(){let u=Date.now(),t=this.lastWorkStart??u,n=[],D=[],r={},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,f]of this.dirToProvider)i[f.id].scannedDirs.push(c);for(let c of this.files.values()){n.push(...c.assistantRecords),D.push(...c.userRecords);for(let[f,d]of c.parentLinks)r[f]=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=Lt(n).sort((c,f)=>c.timestamp.localeCompare(f.timestamp)),a=So(D).sort((c,f)=>c.timestamp.localeCompare(f.timestamp));Gt({assistantRecords:s,userRecords:a,parentMap:r});for(let c of s)c.isSidechain&&(c.isWorkflowSubagent=jt(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()-t,scannedDirs:this.existingDirs};this.snapshot={records:s,userRecords:a,parentMap:r,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 u=!this.initPromise;if(await this.init(),u)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 u=Date.now();return this.lastWorkStart=u,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()-u,this.lastIndexedAt=new Date().toISOString(),this.syncWatchersToDirs(),this.schedulePersist(),this.snapshot})}finally{this.isIndexing=!1}}getStatus(){let u=this.snapshot;return{initialized:u!==null,isIndexing:this.isIndexing,lastIndexedAt:this.lastIndexedAt,indexDurationMs:this.indexDurationMs,filesIndexed:this.files.size,recordsIndexed:u?.stats.assistantRecords??0,bySource:u?.bySource??[],watchers:this.watchers.size,errors:this.errors.slice(-Ru),pendingReconciles:this.fileDebouncers.size,loadedFromDisk:this.loadedFromDisk}}schedulePersist(){this.persistTimer&&clearTimeout(this.persistTimer),this.persistTimer=setTimeout(()=>{this.persistTimer=null;let u=[];for(let[t,n]of this.files)u.push({filePath:t,source:n.source,parserVersion:n.parserVersion,mtimeMs:n.mtimeMs,size:n.size,assistantRecords:n.assistantRecords,userRecords:n.userRecords,parentLinks:n.parentLinks});Ut({savedAt:new Date().toISOString(),files:u},this.cacheName).catch(t=>this.recordError(`persist: ${t.message}`))},Ro),this.persistTimer.unref?.()}recordError(u){let t=`${new Date().toISOString()} ${qt(u)}`;this.errors.push(t),this.errors.length>Ru*2&&this.errors.splice(0,this.errors.length-Ru),process.env.CCGAUGE_DEBUG&&console.error(`[ccgauge:indexer] ${new Date().toISOString()} ${u}`)}disposeWatchers(){for(let u of this.watchers.values())try{u.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 u of this.fileDebouncers.values())clearTimeout(u);this.fileDebouncers.clear()}};async function ko(e){try{return(await be.stat(e)).isDirectory()}catch{return!1}}async function Ht(e,u){let t=[];async function n(D,r){if(r>wo)return;let o;try{o=await be.readdir(D,{withFileTypes:!0})}catch{return}for(let i of o){let s=Vt.join(D,i.name);if(i.isDirectory()){if(u.shouldSkipDir(i.name))continue;await n(s,r+1)}else i.isFile()&&i.name.endsWith(".jsonl")&&t.push(s)}}return await n(e,0),t}function So(e){let u=new Set;return e.filter(t=>{let n=t.uuid;return n?u.has(n)?!1:(u.add(n),!0):!0})}function To(){return globalThis.__ccgaugeIndexers||(globalThis.__ccgaugeIndexers=new Map),globalThis.__ccgaugeIndexers}function Kt(e=Fe){let u=To(),t=u.get(e);return t||(t=new wu(e),u.set(e,t)),t}async function zt(e={}){let u=Kt();return e.force?u.forceRescan():(await u.init(),u.getSnapshot())}function oe(e){let u=re(e.source),{pricing:t}=u.resolvePricing(e.model);return u.costFromUsage(e.usage,t)}function Yt(e,u){return new Intl.NumberFormat("en-US",{maximumFractionDigits:u?.maxFrac??0}).format(e)}function v(e,u="en"){return Number.isFinite(e)?u==="zh"?e>=1e8?(e/1e8).toFixed(2)+"\u4EBF":e>=1e4?(e/1e4).toFixed(1)+"\u4E07":Yt(e):e>=1e9?(e/1e9).toFixed(2)+"B":e>=1e6?(e/1e6).toFixed(2)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":Yt(e):"0"}function N(e,u){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:u?.minFrac??2,maximumFractionDigits:u?.maxFrac??2}).format(e)}function de(e,u=1){return Number.isFinite(e)?`${(e*100).toFixed(u)}%`:"0%"}function Jt(e){if(e<1e3)return`${e}ms`;let u=Math.floor(e/1e3);if(u<60)return`${u}s`;let t=Math.floor(u/60);if(t<60){let r=u%60;return r?`${t}m ${r}s`:`${t}m`}let n=Math.floor(t/60),D=t%60;return D?`${n}h ${D}m`:`${n}h`}function Ae(e){if(!e)return"(unknown)";let t=e.replace(/[/\\]+$/,"").split(/[/\\]+/);return t[t.length-1]||e}import{readFileSync as _o,statSync as vo}from"node:fs";import{basename as Xt}from"node:path";var Zt=new Map,Io=/^(.+?)[/\\]\.git[/\\]worktrees[/\\]([^/\\]+)[/\\]?$/,Mo=/^(.+?)[/\\](?:\.git|\.claude)[/\\]worktrees[/\\]([^/\\]+)(?:[/\\].*)?$/;function Po(e){let u=Ae(e);if(!e)return{label:u,isWorktree:!1,mainName:u,worktreeName:"",canonicalCwd:e};let t=Mo.exec(e);if(t){let n=t[1],D=t[2],r=Xt(n)||n;return{label:`${r} (${D})`,isWorktree:!0,mainName:r,worktreeName:D,canonicalCwd:n}}try{let n=`${e}/.git`;if(!vo(n).isFile())return{label:u,isWorktree:!1,mainName:u,worktreeName:"",canonicalCwd:e};let o=_o(n,"utf8").trim().split(/\r?\n/,1)[0]??"",i=/^gitdir:\s*(.+)$/.exec(o);if(!i)return{label:u,isWorktree:!1,mainName:u,worktreeName:"",canonicalCwd:e};let s=i[1].trim(),a=Io.exec(s);if(!a)return{label:u,isWorktree:!1,mainName:u,worktreeName:"",canonicalCwd:e};let F=a[1],c=a[2],f=Xt(F)||F;return{label:`${f} (${c})`,isWorktree:!0,mainName:f,worktreeName:c,canonicalCwd:F}}catch{return{label:u,isWorktree:!1,mainName:u,worktreeName:"",canonicalCwd:e}}}function Qt(e){let u=Zt.get(e);if(u)return u.label;let t=Po(e);return Zt.set(e,t),t.label}var Oo=["hour","day","week","month"];function en(e){return typeof e=="string"&&Oo.includes(e)}function ku(e,u){let t=new Date(e),n=t.getFullYear(),D=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0"),o=String(t.getHours()).padStart(2,"0");if(u==="hour")return{key:`${n}-${D}-${r}T${o}`,label:`${D}/${r} ${o}:00`};if(u==="day")return{key:`${n}-${D}-${r}`,label:`${D}/${r}`};if(u==="week"){let i=new Date(t),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}-${D}`,label:`${n}-${D}`}}function ye(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 xe(e,u){return!(e.source!==u.source||u.fromIso&&e.timestamp<u.fromIso||u.toIso&&e.timestamp>u.toIso||u.models&&!u.models.has(e.model)||u.projects&&!u.projects.has(e.cwd))}function un(e,u,t){let n=new Map,D=ye(t);for(let r of e){if(!xe(r,D))continue;let{key:o,label:i}=ku(r.timestamp,u),s=n.get(o);s||(s=Lo(o,i),n.set(o,s)),No(s,r)}return Array.from(n.values()).sort((r,o)=>r.key.localeCompare(o.key))}function Lo(e,u){return{key:e,label:u,inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,totalTokens:0,cost:0,saved:0,requests:0,models:{}}}function No(e,u){let t=oe(u);e.inputTokens+=u.usage.input_tokens,e.outputTokens+=u.usage.output_tokens,e.cacheReadTokens+=u.usage.cache_read_input_tokens,e.cacheCreationTokens+=u.usage.cache_creation_input_tokens,e.totalTokens=e.inputTokens+e.outputTokens+e.cacheReadTokens+e.cacheCreationTokens,e.cost+=t.total,e.saved+=t.saved,e.requests+=1;let n=e.models[u.model]??{tokens:0,cost:0,requests:0};n.tokens+=u.usage.input_tokens+u.usage.output_tokens+u.usage.cache_read_input_tokens+u.usage.cache_creation_input_tokens,n.cost+=t.total,n.requests+=1,e.models[u.model]=n}function tn(e,u){let t=new Map,n=ye(u);for(let D of e){if(!xe(D,n))continue;let r=t.get(D.model);if(!r){let{pricing:i,matchType:s}=re(D.source).resolvePricing(D.model);r={model:D.model,source:D.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"},t.set(D.model,r)}let o=oe(D);r.requests+=1,r.inputTokens+=D.usage.input_tokens,r.outputTokens+=D.usage.output_tokens,r.cacheReadTokens+=D.usage.cache_read_input_tokens,r.cacheCreationTokens+=D.usage.cache_creation_input_tokens,r.totalTokens=r.inputTokens+r.outputTokens+r.cacheReadTokens+r.cacheCreationTokens,r.cost+=o.total,r.saved+=o.saved}return Array.from(t.values()).sort((D,r)=>r.cost-D.cost)}function nn(e,u){let t=new Map,n=new Map,D=ye(u);for(let r of e){if(!xe(r,D))continue;let o=r.cwd||"(unknown)",i=t.get(o);i||(i={source:u.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:r.timestamp,lastActivity:r.timestamp,models:[]},t.set(o,i),n.set(o,new Set)),n.get(o).add(r.sessionId);let s=oe(r);i.requests+=1,i.inputTokens+=r.usage.input_tokens,i.outputTokens+=r.usage.output_tokens,i.cacheReadTokens+=r.usage.cache_read_input_tokens,i.cacheCreationTokens+=r.usage.cache_creation_input_tokens,i.totalTokens=i.inputTokens+i.outputTokens+i.cacheReadTokens+i.cacheCreationTokens,i.cost+=s.total,i.saved+=s.saved,r.timestamp<i.firstActivity&&(i.firstActivity=r.timestamp),r.timestamp>i.lastActivity&&(i.lastActivity=r.timestamp),i.models.includes(r.model)||i.models.push(r.model)}for(let[r,o]of n){let i=t.get(r);i.sessions=o.size}return Array.from(t.values()).sort((r,o)=>o.cost-r.cost)}function Dn(e,u,t){let n=new Map,D=ye(t);for(let o of e){if(!xe(o,D))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:Qt(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 r=new Map;for(let o of u){let i=r.get(o.sessionId);(!i||o.timestamp<i.timestamp)&&r.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=r.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 rn(e,u){let t=0,n=0,D=0,r=0,o=0,i=0,s=0,a=ye(u);for(let F of e){if(!xe(F,a))continue;let c=oe(F);t+=F.usage.input_tokens,n+=F.usage.output_tokens,D+=F.usage.cache_read_input_tokens,r+=F.usage.cache_creation_input_tokens,o+=c.total,i+=c.saved,s+=1}return{inputTokens:t,outputTokens:n,cacheReadTokens:D,cacheCreationTokens:r,totalTokens:t+n+D+r,cost:o,saved:i,requests:s}}var $o=["1d","7d","30d","90d","all","custom"];function on(e){return typeof e=="string"&&$o.includes(e)}function sn(e){let u=new Date;if(e==="all"||e==="custom")return{};if(e==="1d")return{from:new Date(u.getFullYear(),u.getMonth(),u.getDate())};let t=e.match(/^(\d+)([dwm])$/);if(!t)return{};let n=parseInt(t[1],10),D=t[2],r=new Date(u);return D==="d"?r.setDate(r.getDate()-n):D==="w"?r.setDate(r.getDate()-n*7):D==="m"&&r.setMonth(r.getMonth()-n),{from:r}}function Uo(e,u,t){let n=new Map;for(let i of u)i.isSynthetic||i.textPreview&&i.textPreview.trim()&&n.set(i.uuid,i.textPreview);let D=new Map,r=new Map;function o(i){let s=[],a=i,F=null,c=0,f=new Set;for(;a&&c++<5e3&&!f.has(a);){f.add(a);let d=r.get(a);if(d){F=d;break}if(s.push(a),n.has(a)){F=a;break}a=t[a]??null}F||(F=i);for(let d of s)r.set(d,F);return F}for(let i of e)D.set(i.uuid,o(i.uuid));return D}function Re(e,u,t){let n=Uo(e,u,t),D=new Map;for(let r of e){let o=n.get(r.uuid)??r.uuid,i=D.get(o);(!i||r.timestamp<i.firstTimestamp)&&D.set(o,{turnId:o,firstTimestamp:r.timestamp,firstModel:r.model,cwd:r.cwd,sessionId:r.sessionId,source:r.source})}return D}import nu from"node:process";function Su({onlyFirst:e=!1}={}){let D="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(D,e?void 0:"g")}var Wo=Su();function Y(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes("\x1B")&&!e.includes("\x9B")?e:e.replace(Wo,"")}var an=[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],cn=12288,ln=65510,Fn=[12288,12288,65281,65376,65504,65510];var dn=4352,fn=262141,Tu=[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,u)=>{let t=0,n=Math.floor(e.length/2)-1;for(;t<=n;){let D=Math.floor((t+n)/2),r=D*2;if(u<e[r])n=D-1;else if(u>e[r+1])t=D+1;else return!0}return!1};var pn=19968,[qo,Ho]=Vo(Tu);function Vo(e){let u=e[0],t=e[1];for(let n=0;n<e.length;n+=2){let D=e[n],r=e[n+1];if(pn>=D&&pn<=r)return[D,r];r-D>t-u&&(u=D,t=r)}return[u,t]}var hn=e=>e<161||e>1114109?!1:Ye(an,e),we=e=>e<cn||e>ln?!1:Ye(Fn,e);var ke=e=>e>=qo&&e<=Ho?!0:e<dn||e>fn?!1:Ye(Tu,e);function Ko(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function J(e,{ambiguousAsWide:u=!1}={}){return Ko(e),we(e)||ke(e)||u&&hn(e)?2:1}var mn=le(gn(),1),zo=new Intl.Segmenter,Yo=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function P(e,u={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:t=!0,countAnsiEscapeCodes:n=!1}=u;if(n||(e=Y(e)),e.length===0)return 0;let D=0,r={ambiguousAsWide:!t};for(let{segment:o}of zo.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)&&!Yo.test(o)){if((0,mn.default)().test(o)){D+=2;continue}D+=J(i,r)}}return D}var En=(e=0)=>u=>`\x1B[${u+e}m`,Bn=(e=0)=>u=>`\x1B[${38+e};5;${u}m`,bn=(e=0)=>(u,t,n)=>`\x1B[${38+e};2;${u};${t};${n}m`,y={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]}},iF=Object.keys(y.modifier),Jo=Object.keys(y.color),Xo=Object.keys(y.bgColor),sF=[...Jo,...Xo];function Zo(){let e=new Map;for(let[u,t]of Object.entries(y)){for(let[n,D]of Object.entries(t))y[n]={open:`\x1B[${D[0]}m`,close:`\x1B[${D[1]}m`},t[n]=y[n],e.set(D[0],D[1]);Object.defineProperty(y,u,{value:t,enumerable:!1})}return Object.defineProperty(y,"codes",{value:e,enumerable:!1}),y.color.close="\x1B[39m",y.bgColor.close="\x1B[49m",y.color.ansi=En(),y.color.ansi256=Bn(),y.color.ansi16m=bn(),y.bgColor.ansi=En(10),y.bgColor.ansi256=Bn(10),y.bgColor.ansi16m=bn(10),Object.defineProperties(y,{rgbToAnsi256:{value(u,t,n){return u===t&&t===n?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(u){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(r=>r+r).join(""));let D=Number.parseInt(n,16);return[D>>16&255,D>>8&255,D&255]},enumerable:!1},hexToAnsi256:{value:u=>y.rgbToAnsi256(...y.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value(u){if(u<8)return 30+u;if(u<16)return 90+(u-8);let t,n,D;if(u>=232)t=((u-232)*10+8)/255,n=t,D=t;else{u-=16;let i=u%36;t=Math.floor(u/36)/5,n=Math.floor(i/6)/5,D=i%6/5}let r=Math.max(t,n,D)*2;if(r===0)return 30;let o=30+(Math.round(D)<<2|Math.round(n)<<1|Math.round(t));return r===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(u,t,n)=>y.ansi256ToAnsi(y.rgbToAnsi256(u,t,n)),enumerable:!1},hexToAnsi:{value:u=>y.ansi256ToAnsi(y.hexToAnsi256(u)),enumerable:!1}}),y}var Qo=Zo(),U=Qo;import _u from"node:process";import ei from"node:os";import An from"node:tty";function $(e,u=globalThis.Deno?globalThis.Deno.args:_u.argv){let t=e.startsWith("-")?"":e.length===1?"-":"--",n=u.indexOf(t+e),D=u.indexOf("--");return n!==-1&&(D===-1||n<D)}var{env:x}=_u,Je;$("no-color")||$("no-colors")||$("color=false")||$("color=never")?Je=0:($("color")||$("colors")||$("color=true")||$("color=always"))&&(Je=1);function ui(){if("FORCE_COLOR"in x)return x.FORCE_COLOR==="true"?1:x.FORCE_COLOR==="false"?0:x.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(x.FORCE_COLOR,10),3)}function ti(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function ni(e,{streamIsTTY:u,sniffFlags:t=!0}={}){let n=ui();n!==void 0&&(Je=n);let D=t?Je:n;if(D===0)return 0;if(t){if($("color=16m")||$("color=full")||$("color=truecolor"))return 3;if($("color=256"))return 2}if("TF_BUILD"in x&&"AGENT_NAME"in x)return 1;if(e&&!u&&D===void 0)return 0;let r=D||0;if(x.TERM==="dumb")return r;if(_u.platform==="win32"){let o=ei.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in x)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in x)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in x)||x.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in x)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(x.TEAMCITY_VERSION)?1:0;if(x.COLORTERM==="truecolor"||x.TERM==="xterm-kitty"||x.TERM==="xterm-ghostty"||x.TERM==="wezterm")return 3;if("TERM_PROGRAM"in x){let o=Number.parseInt((x.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(x.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(x.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(x.TERM)||"COLORTERM"in x?1:r}function yn(e,u={}){let t=ni(e,{streamIsTTY:e&&e.isTTY,...u});return ti(t)}var Di={stdout:yn({isTTY:An.isatty(1)}),stderr:yn({isTTY:An.isatty(2)})},xn=Di;function Rn(e,u,t){let n=e.indexOf(u);if(n===-1)return e;let D=u.length,r=0,o="";do o+=e.slice(r,n)+u+t,r=n+D,n=e.indexOf(u,r);while(n!==-1);return o+=e.slice(r),o}function wn(e,u,t,n){let D=0,r="";do{let o=e[n-1]==="\r";r+=e.slice(D,o?n-1:n)+u+(o?`\r
9
9
  `:`
10
10
  `)+t,D=n+1,n=e.indexOf(`
11
- `,D)}while(n!==-1);return r+=e.slice(D),r}var{stdout:Rn,stderr:wn}=An,vu=Symbol("GENERATOR"),fe=Symbol("STYLER"),Se=Symbol("IS_EMPTY"),kn=["ansi","ansi","ansi256","ansi16m"],pe=Object.create(null),ni=(e,u={})=>{if(u.level&&!(Number.isInteger(u.level)&&u.level>=0&&u.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let t=Rn?Rn.level:0;e.level=u.level===void 0?t:u.level},Xe=class{constructor(u){return Sn(u)}},Sn=e=>{let u=(...t)=>t.join(" ");return ni(u,e),Object.setPrototypeOf(u,Te.prototype),u};function Te(e){return Sn(e)}Object.setPrototypeOf(Te.prototype,Function.prototype);for(let[e,u]of Object.entries(U))pe[e]={get(){let t=Ze(this,Mu(u.open,u.close,this[fe]),this[Se]);return Object.defineProperty(this,e,{value:t}),t}};pe.visible={get(){let e=Ze(this,this[fe],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Iu=(e,u,t,...n)=>e==="rgb"?u==="ansi16m"?U[t].ansi16m(...n):u==="ansi256"?U[t].ansi256(U.rgbToAnsi256(...n)):U[t].ansi(U.rgbToAnsi(...n)):e==="hex"?Iu("rgb",u,t,...U.hexToRgb(...n)):U[t][e](...n),Di=["rgb","hex","ansi256"];for(let e of Di){pe[e]={get(){let{level:t}=this;return function(...n){let D=Mu(Iu(e,kn[t],"color",...n),U.color.close,this[fe]);return Ze(this,D,this[Se])}}};let u="bg"+e[0].toUpperCase()+e.slice(1);pe[u]={get(){let{level:t}=this;return function(...n){let D=Mu(Iu(e,kn[t],"bgColor",...n),U.bgColor.close,this[fe]);return Ze(this,D,this[Se])}}}}var ri=Object.defineProperties(()=>{},{...pe,level:{enumerable:!0,get(){return this[vu].level},set(e){this[vu].level=e}}}),Mu=(e,u,t)=>{let n,D;return t===void 0?(n=e,D=u):(n=t.openAll+e,D=u+t.closeAll),{open:e,close:u,openAll:n,closeAll:D,parent:t}},Ze=(e,u,t)=>{let n=(...D)=>oi(n,D.length===1?""+D[0]:D.join(" "));return Object.setPrototypeOf(n,ri),n[vu]=e,n[fe]=u,n[Se]=t,n},oi=(e,u)=>{if(e.level<=0||!u)return e[Se]?"":u;let t=e[fe];if(t===void 0)return u;let{openAll:n,closeAll:D}=t;if(u.includes("\x1B"))for(;t!==void 0;)u=yn(u,t.close,t.open),t=t.parent;let r=u.indexOf(`
12
- `);return r!==-1&&(u=xn(u,D,n,r)),n+u+D};Object.defineProperties(Te.prototype,pe);var ii=Te(),hF=Te({level:wn?wn.level:0});var X=ii;var vn=le(_n(),1),si=new Intl.Segmenter,ai=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function Pu(e,u={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:t=!0,countAnsiEscapeCodes:n=!1}=u;if(n||(e=Y(e)),e.length===0)return 0;let D=0,r={ambiguousAsWide:!t};for(let{segment:o}of si.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)&&!ai.test(o)){if((0,vn.default)().test(o)){D+=2;continue}D+=J(i,r)}}return D}function Qe(e){let u=0;for(let t of e.split(`
13
- `))u=Math.max(u,Pu(t));return u}var rD=le(Lu(),1);var li=/[\p{Lu}]/u,Fi=/[\p{Ll}]/u,Pn=/^[\p{Lu}](?![\p{Lu}])/gu,Nn=/([\p{Alpha}\p{N}_]|$)/u,Nu=/[_.\- ]+/,di=new RegExp("^"+Nu.source),On=new RegExp(Nu.source+Nn.source,"gu"),Ln=new RegExp("\\d+"+Nn.source,"gu"),fi=(e,u,t,n)=>{let D=!1,r=!1,o=!1,i=!1;for(let s=0;s<e.length;s++){let a=e[s];i=s>2?e[s-3]==="-":!0,D&&li.test(a)?(e=e.slice(0,s)+"-"+e.slice(s),D=!1,o=r,r=!0,s++):r&&o&&Fi.test(a)&&(!i||n)?(e=e.slice(0,s-1)+"-"+e.slice(s-1),o=r,r=!1,D=!0):(D=u(a)===a&&t(a)!==a,o=r,r=t(a)===a&&u(a)!==a)}return e},pi=(e,u)=>(Pn.lastIndex=0,e.replaceAll(Pn,t=>u(t))),hi=(e,u)=>(On.lastIndex=0,Ln.lastIndex=0,e.replaceAll(Ln,(t,n,D)=>["_","-"].includes(e.charAt(D+t.length))?t:u(t)).replaceAll(On,(t,n)=>u(n)));function $u(e,u){if(!(typeof e=="string"||Array.isArray(e)))throw new TypeError("Expected the input to be `string | string[]`");if(u={pascalCase:!1,preserveConsecutiveUppercase:!1,...u},Array.isArray(e)?e=e.map(r=>r.trim()).filter(r=>r.length).join("-"):e=e.trim(),e.length===0)return"";let t=u.locale===!1?r=>r.toLowerCase():r=>r.toLocaleLowerCase(u.locale),n=u.locale===!1?r=>r.toUpperCase():r=>r.toLocaleUpperCase(u.locale);return e.length===1?Nu.test(e)?"":u.pascalCase?n(e):t(e):(e!==t(e)&&(e=fi(e,t,n,u.preserveConsecutiveUppercase)),e=e.replace(di,""),e=u.preserveConsecutiveUppercase?pi(e,t):t(e),u.pascalCase&&(e=n(e.charAt(0))+e.slice(1)),hi(e,n))}var zu=le(zn(),1);var Kn=(e=0)=>u=>`\x1B[${u+e}m`,Yn=(e=0)=>u=>`\x1B[${38+e};5;${u}m`,Jn=(e=0)=>(u,t,n)=>`\x1B[${38+e};2;${u};${t};${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]}},IF=Object.keys(R.modifier),yi=Object.keys(R.color),xi=Object.keys(R.bgColor),MF=[...yi,...xi];function Ri(){let e=new Map;for(let[u,t]of Object.entries(R)){for(let[n,D]of Object.entries(t))R[n]={open:`\x1B[${D[0]}m`,close:`\x1B[${D[1]}m`},t[n]=R[n],e.set(D[0],D[1]);Object.defineProperty(R,u,{value:t,enumerable:!1})}return Object.defineProperty(R,"codes",{value:e,enumerable:!1}),R.color.close="\x1B[39m",R.bgColor.close="\x1B[49m",R.color.ansi=Kn(),R.color.ansi256=Yn(),R.color.ansi16m=Jn(),R.bgColor.ansi=Kn(10),R.bgColor.ansi256=Yn(10),R.bgColor.ansi16m=Jn(10),Object.defineProperties(R,{rgbToAnsi256:{value(u,t,n){return u===t&&t===n?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(u){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(r=>r+r).join(""));let D=Number.parseInt(n,16);return[D>>16&255,D>>8&255,D&255]},enumerable:!1},hexToAnsi256:{value:u=>R.rgbToAnsi256(...R.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value(u){if(u<8)return 30+u;if(u<16)return 90+(u-8);let t,n,D;if(u>=232)t=((u-232)*10+8)/255,n=t,D=t;else{u-=16;let i=u%36;t=Math.floor(u/36)/5,n=Math.floor(i/6)/5,D=i%6/5}let r=Math.max(t,n,D)*2;if(r===0)return 30;let o=30+(Math.round(D)<<2|Math.round(n)<<1|Math.round(t));return r===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(u,t,n)=>R.ansi256ToAnsi(R.rgbToAnsi256(u,t,n)),enumerable:!1},hexToAnsi:{value:u=>R.ansi256ToAnsi(R.hexToAnsi256(u)),enumerable:!1}}),R}var wi=Ri(),Xn=wi;var uu=new Set(["\x1B","\x9B"]),ki=39,Vu="\x07",eD="[",Si="]",uD="m",eu=`${Si}8;;`,Zn=e=>`${uu.values().next().value}${eD}${e}${uD}`,Qn=e=>`${uu.values().next().value}${eu}${e}${Vu}`,Ti=e=>e.split(" ").map(u=>P(u)),Hu=(e,u,t)=>{let n=[...u],D=!1,r=!1,o=P(Y(e.at(-1)));for(let[i,s]of n.entries()){let a=P(s);if(o+a<=t?e[e.length-1]+=s:(e.push(s),o=0),uu.has(s)&&(D=!0,r=n.slice(i+1,i+1+eu.length).join("")===eu),D){r?s===Vu&&(D=!1,r=!1):s===uD&&(D=!1);continue}o+=a,o===t&&i<n.length-1&&(e.push(""),o=0)}!o&&e.at(-1).length>0&&e.length>1&&(e[e.length-2]+=e.pop())},_i=e=>{let u=e.split(" "),t=u.length;for(;t>0&&!(P(u[t-1])>0);)t--;return t===u.length?e:u.slice(0,t).join(" ")+u.slice(t).join("")},vi=(e,u,t={})=>{if(t.trim!==!1&&e.trim()==="")return"";let n="",D,r,o=Ti(e),i=[""];for(let[c,f]of e.split(" ").entries()){t.trim!==!1&&(i[i.length-1]=i.at(-1).trimStart());let d=P(i.at(-1));if(c!==0&&(d>=u&&(t.wordWrap===!1||t.trim===!1)&&(i.push(""),d=0),(d>0||t.trim===!1)&&(i[i.length-1]+=" ",d++)),t.hard&&o[c]>u){let l=u-d,C=1+Math.floor((o[c]-l-1)/u);Math.floor((o[c]-1)/u)<C&&i.push(""),Hu(i,f,u);continue}if(d+o[c]>u&&d>0&&o[c]>0){if(t.wordWrap===!1&&d<u){Hu(i,f,u);continue}i.push("")}if(d+o[c]>u&&t.wordWrap===!1){Hu(i,f,u);continue}i[i.length-1]+=f}t.trim!==!1&&(i=i.map(c=>_i(c)));let s=i.join(`
14
- `),a=[...s],F=0;for(let[c,f]of a.entries()){if(n+=f,uu.has(f)){let{groups:l}=new RegExp(`(?:\\${eD}(?<code>\\d+)m|\\${eu}(?<uri>.*)${Vu})`).exec(s.slice(F))||{groups:{}};if(l.code!==void 0){let C=Number.parseFloat(l.code);D=C===ki?void 0:C}else l.uri!==void 0&&(r=l.uri.length===0?void 0:l.uri)}let d=Xn.codes.get(Number(D));a[c+1]===`
15
- `?(r&&(n+=Qn("")),D&&d&&(n+=Zn(d))):f===`
16
- `&&(D&&d&&(n+=Zn(D)),r&&(n+=Qn(r))),F+=f.length}return n};function tu(e,u,t){return String(e).normalize().replaceAll(`\r
11
+ `,D)}while(n!==-1);return r+=e.slice(D),r}var{stdout:kn,stderr:Sn}=xn,vu=Symbol("GENERATOR"),fe=Symbol("STYLER"),Se=Symbol("IS_EMPTY"),Tn=["ansi","ansi","ansi256","ansi16m"],pe=Object.create(null),ri=(e,u={})=>{if(u.level&&!(Number.isInteger(u.level)&&u.level>=0&&u.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let t=kn?kn.level:0;e.level=u.level===void 0?t:u.level},Xe=class{constructor(u){return _n(u)}},_n=e=>{let u=(...t)=>t.join(" ");return ri(u,e),Object.setPrototypeOf(u,Te.prototype),u};function Te(e){return _n(e)}Object.setPrototypeOf(Te.prototype,Function.prototype);for(let[e,u]of Object.entries(U))pe[e]={get(){let t=Ze(this,Mu(u.open,u.close,this[fe]),this[Se]);return Object.defineProperty(this,e,{value:t}),t}};pe.visible={get(){let e=Ze(this,this[fe],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Iu=(e,u,t,...n)=>e==="rgb"?u==="ansi16m"?U[t].ansi16m(...n):u==="ansi256"?U[t].ansi256(U.rgbToAnsi256(...n)):U[t].ansi(U.rgbToAnsi(...n)):e==="hex"?Iu("rgb",u,t,...U.hexToRgb(...n)):U[t][e](...n),oi=["rgb","hex","ansi256"];for(let e of oi){pe[e]={get(){let{level:t}=this;return function(...n){let D=Mu(Iu(e,Tn[t],"color",...n),U.color.close,this[fe]);return Ze(this,D,this[Se])}}};let u="bg"+e[0].toUpperCase()+e.slice(1);pe[u]={get(){let{level:t}=this;return function(...n){let D=Mu(Iu(e,Tn[t],"bgColor",...n),U.bgColor.close,this[fe]);return Ze(this,D,this[Se])}}}}var ii=Object.defineProperties(()=>{},{...pe,level:{enumerable:!0,get(){return this[vu].level},set(e){this[vu].level=e}}}),Mu=(e,u,t)=>{let n,D;return t===void 0?(n=e,D=u):(n=t.openAll+e,D=u+t.closeAll),{open:e,close:u,openAll:n,closeAll:D,parent:t}},Ze=(e,u,t)=>{let n=(...D)=>si(n,D.length===1?""+D[0]:D.join(" "));return Object.setPrototypeOf(n,ii),n[vu]=e,n[fe]=u,n[Se]=t,n},si=(e,u)=>{if(e.level<=0||!u)return e[Se]?"":u;let t=e[fe];if(t===void 0)return u;let{openAll:n,closeAll:D}=t;if(u.includes("\x1B"))for(;t!==void 0;)u=Rn(u,t.close,t.open),t=t.parent;let r=u.indexOf(`
12
+ `);return r!==-1&&(u=wn(u,D,n,r)),n+u+D};Object.defineProperties(Te.prototype,pe);var ai=Te(),gF=Te({level:Sn?Sn.level:0});var X=ai;var Mn=le(In(),1),ci=new Intl.Segmenter,li=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function Pu(e,u={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:t=!0,countAnsiEscapeCodes:n=!1}=u;if(n||(e=Y(e)),e.length===0)return 0;let D=0,r={ambiguousAsWide:!t};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,Mn.default)().test(o)){D+=2;continue}D+=J(i,r)}}return D}function Qe(e){let u=0;for(let t of e.split(`
13
+ `))u=Math.max(u,Pu(t));return u}var iD=le(Lu(),1);var di=/[\p{Lu}]/u,fi=/[\p{Ll}]/u,Ln=/^[\p{Lu}](?![\p{Lu}])/gu,Un=/([\p{Alpha}\p{N}_]|$)/u,Nu=/[_.\- ]+/,pi=new RegExp("^"+Nu.source),Nn=new RegExp(Nu.source+Un.source,"gu"),$n=new RegExp("\\d+"+Un.source,"gu"),hi=(e,u,t,n)=>{let D=!1,r=!1,o=!1,i=!1;for(let s=0;s<e.length;s++){let a=e[s];i=s>2?e[s-3]==="-":!0,D&&di.test(a)?(e=e.slice(0,s)+"-"+e.slice(s),D=!1,o=r,r=!0,s++):r&&o&&fi.test(a)&&(!i||n)?(e=e.slice(0,s-1)+"-"+e.slice(s-1),o=r,r=!1,D=!0):(D=u(a)===a&&t(a)!==a,o=r,r=t(a)===a&&u(a)!==a)}return e},Ci=(e,u)=>(Ln.lastIndex=0,e.replaceAll(Ln,t=>u(t))),gi=(e,u)=>(Nn.lastIndex=0,$n.lastIndex=0,e.replaceAll($n,(t,n,D)=>["_","-"].includes(e.charAt(D+t.length))?t:u(t)).replaceAll(Nn,(t,n)=>u(n)));function $u(e,u){if(!(typeof e=="string"||Array.isArray(e)))throw new TypeError("Expected the input to be `string | string[]`");if(u={pascalCase:!1,preserveConsecutiveUppercase:!1,...u},Array.isArray(e)?e=e.map(r=>r.trim()).filter(r=>r.length).join("-"):e=e.trim(),e.length===0)return"";let t=u.locale===!1?r=>r.toLowerCase():r=>r.toLocaleLowerCase(u.locale),n=u.locale===!1?r=>r.toUpperCase():r=>r.toLocaleUpperCase(u.locale);return e.length===1?Nu.test(e)?"":u.pascalCase?n(e):t(e):(e!==t(e)&&(e=hi(e,t,n,u.preserveConsecutiveUppercase)),e=e.replace(pi,""),e=u.preserveConsecutiveUppercase?Ci(e,t):t(e),u.pascalCase&&(e=n(e.charAt(0))+e.slice(1)),gi(e,n))}var Ku=le(Yn(),1);var Jn=(e=0)=>u=>`\x1B[${u+e}m`,Xn=(e=0)=>u=>`\x1B[${38+e};5;${u}m`,Zn=(e=0)=>(u,t,n)=>`\x1B[${38+e};2;${u};${t};${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]}},PF=Object.keys(R.modifier),Ri=Object.keys(R.color),wi=Object.keys(R.bgColor),OF=[...Ri,...wi];function ki(){let e=new Map;for(let[u,t]of Object.entries(R)){for(let[n,D]of Object.entries(t))R[n]={open:`\x1B[${D[0]}m`,close:`\x1B[${D[1]}m`},t[n]=R[n],e.set(D[0],D[1]);Object.defineProperty(R,u,{value:t,enumerable:!1})}return Object.defineProperty(R,"codes",{value:e,enumerable:!1}),R.color.close="\x1B[39m",R.bgColor.close="\x1B[49m",R.color.ansi=Jn(),R.color.ansi256=Xn(),R.color.ansi16m=Zn(),R.bgColor.ansi=Jn(10),R.bgColor.ansi256=Xn(10),R.bgColor.ansi16m=Zn(10),Object.defineProperties(R,{rgbToAnsi256:{value(u,t,n){return u===t&&t===n?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(u){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(r=>r+r).join(""));let D=Number.parseInt(n,16);return[D>>16&255,D>>8&255,D&255]},enumerable:!1},hexToAnsi256:{value:u=>R.rgbToAnsi256(...R.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value(u){if(u<8)return 30+u;if(u<16)return 90+(u-8);let t,n,D;if(u>=232)t=((u-232)*10+8)/255,n=t,D=t;else{u-=16;let i=u%36;t=Math.floor(u/36)/5,n=Math.floor(i/6)/5,D=i%6/5}let r=Math.max(t,n,D)*2;if(r===0)return 30;let o=30+(Math.round(D)<<2|Math.round(n)<<1|Math.round(t));return r===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(u,t,n)=>R.ansi256ToAnsi(R.rgbToAnsi256(u,t,n)),enumerable:!1},hexToAnsi:{value:u=>R.ansi256ToAnsi(R.hexToAnsi256(u)),enumerable:!1}}),R}var Si=ki(),Qn=Si;var uu=new Set(["\x1B","\x9B"]),Ti=39,Vu="\x07",tD="[",_i="]",nD="m",eu=`${_i}8;;`,eD=e=>`${uu.values().next().value}${tD}${e}${nD}`,uD=e=>`${uu.values().next().value}${eu}${e}${Vu}`,vi=e=>e.split(" ").map(u=>P(u)),Hu=(e,u,t)=>{let n=[...u],D=!1,r=!1,o=P(Y(e.at(-1)));for(let[i,s]of n.entries()){let a=P(s);if(o+a<=t?e[e.length-1]+=s:(e.push(s),o=0),uu.has(s)&&(D=!0,r=n.slice(i+1,i+1+eu.length).join("")===eu),D){r?s===Vu&&(D=!1,r=!1):s===nD&&(D=!1);continue}o+=a,o===t&&i<n.length-1&&(e.push(""),o=0)}!o&&e.at(-1).length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Ii=e=>{let u=e.split(" "),t=u.length;for(;t>0&&!(P(u[t-1])>0);)t--;return t===u.length?e:u.slice(0,t).join(" ")+u.slice(t).join("")},Mi=(e,u,t={})=>{if(t.trim!==!1&&e.trim()==="")return"";let n="",D,r,o=vi(e),i=[""];for(let[c,f]of e.split(" ").entries()){t.trim!==!1&&(i[i.length-1]=i.at(-1).trimStart());let d=P(i.at(-1));if(c!==0&&(d>=u&&(t.wordWrap===!1||t.trim===!1)&&(i.push(""),d=0),(d>0||t.trim===!1)&&(i[i.length-1]+=" ",d++)),t.hard&&o[c]>u){let l=u-d,C=1+Math.floor((o[c]-l-1)/u);Math.floor((o[c]-1)/u)<C&&i.push(""),Hu(i,f,u);continue}if(d+o[c]>u&&d>0&&o[c]>0){if(t.wordWrap===!1&&d<u){Hu(i,f,u);continue}i.push("")}if(d+o[c]>u&&t.wordWrap===!1){Hu(i,f,u);continue}i[i.length-1]+=f}t.trim!==!1&&(i=i.map(c=>Ii(c)));let s=i.join(`
14
+ `),a=[...s],F=0;for(let[c,f]of a.entries()){if(n+=f,uu.has(f)){let{groups:l}=new RegExp(`(?:\\${tD}(?<code>\\d+)m|\\${eu}(?<uri>.*)${Vu})`).exec(s.slice(F))||{groups:{}};if(l.code!==void 0){let C=Number.parseFloat(l.code);D=C===Ti?void 0:C}else l.uri!==void 0&&(r=l.uri.length===0?void 0:l.uri)}let d=Qn.codes.get(Number(D));a[c+1]===`
15
+ `?(r&&(n+=uD("")),D&&d&&(n+=eD(d))):f===`
16
+ `&&(D&&d&&(n+=eD(D)),r&&(n+=uD(r))),F+=f.length}return n};function tu(e,u,t){return String(e).normalize().replaceAll(`\r
17
17
  `,`
18
18
  `).split(`
19
- `).map(n=>vi(n,u,t)).join(`
20
- `)}var Wi=le(Lu(),1),ie=`
21
- `,O=" ",_e="none",oD=()=>{let{env:e,stdout:u,stderr:t}=nu;return u?.columns?u.columns:t?.columns?t.columns:e.COLUMNS?Number.parseInt(e.COLUMNS,10):80},tD=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,Ii=e=>{let u=["topLeft","topRight","bottomRight","bottomLeft","left","right","top","bottom"],t;if(e===_e){e={};for(let n of u)e[n]=""}if(typeof e=="string"){if(t=rD.default[e],!t)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 u)if(e[n]===null||typeof e[n]!="string")throw new TypeError(`Invalid border style: ${n}`);t=e}return t},Mi=(e,u,t)=>{let n="",D=P(e);switch(t){case"left":{n=e+u.slice(D);break}case"right":{n=u.slice(D)+e;break}default:{u=u.slice(D),u.length%2===1?(u=u.slice(Math.floor(u.length/2)),n=u.slice(1)+e+u):(u=u.slice(u.length/2),n=u+e+u);break}}return n},Pi=(e,{padding:u,width:t,textAlignment:n,height:D})=>{e=(0,zu.default)(e,{align:n});let r=e.split(ie),o=Qe(e),i=t-u.left-u.right;if(o>i){let F=[];for(let c of r){let f=tu(c,i,{hard:!0}),l=(0,zu.default)(f,{align:n}).split(`
22
- `),C=Math.max(...l.map(h=>P(h)));for(let h of l){let p;switch(n){case"center":{p=O.repeat((i-C)/2)+h;break}case"right":{p=O.repeat(i-C)+h;break}default:{p=h;break}}F.push(p)}}r=F}n==="center"&&o<i?r=r.map(F=>O.repeat((i-o)/2)+F):n==="right"&&o<i&&(r=r.map(F=>O.repeat(i-o)+F));let s=O.repeat(u.left),a=O.repeat(u.right);return r=r.map(F=>{let c=s+F+a;return c+O.repeat(t-P(c))}),u.top>0&&(r=[...Array.from({length:u.top}).fill(O.repeat(t)),...r]),u.bottom>0&&(r=[...r,...Array.from({length:u.bottom}).fill(O.repeat(t))]),D&&r.length>D?r=r.slice(0,D):D&&r.length<D&&(r=[...r,...Array.from({length:D-r.length}).fill(O.repeat(t))]),r.join(ie)},Oi=(e,u,t)=>{let n=F=>{let c=t.borderColor?$i(t.borderColor)(F):F;return t.dimBorder?X.dim(c):c},D=F=>t.backgroundColor?Ui(t.backgroundColor)(F):F,r=Ii(t.borderStyle),o=oD(),i=O.repeat(t.margin.left);if(t.float==="center"){let F=Math.max((o-u-ve(t.borderStyle))/2,0);i=O.repeat(F)}else if(t.float==="right"){let F=Math.max(o-u-t.margin.right-ve(t.borderStyle),0);i=O.repeat(F)}let s="";t.margin.top&&(s+=ie.repeat(t.margin.top)),(t.borderStyle!==_e||t.title)&&(s+=n(i+r.topLeft+(t.title?Mi(t.title,r.top.repeat(u),t.titleAlignment):r.top.repeat(u))+r.topRight)+ie);let a=e.split(ie);return s+=a.map(F=>i+n(r.left)+D(F)+n(r.right)).join(ie),t.borderStyle!==_e&&(s+=ie+n(i+r.bottomLeft+r.bottom.repeat(u)+r.bottomRight)),t.margin.bottom&&(s+=ie.repeat(t.margin.bottom)),s},Li=e=>{if(e.fullscreen&&nu?.stdout){let u=[nu.stdout.columns,nu.stdout.rows];typeof e.fullscreen=="function"&&(u=e.fullscreen(...u)),e.width||=u[0],e.height||=u[1]}return e.width&&=Math.max(1,e.width-ve(e.borderStyle)),e.height&&=Math.max(1,e.height-ve(e.borderStyle)),e},nD=(e,u)=>u===_e?e:` ${e} `,Ni=(e,u)=>{u=Li(u);let t=u.width!==void 0,n=oD(),D=ve(u.borderStyle),r=n-u.margin.left-u.margin.right-D,o=Qe(tu(e,n-D,{hard:!0,trim:!1}))+u.padding.left+u.padding.right;if(u.title&&t?(u.title=u.title.slice(0,Math.max(0,u.width-2)),u.title&&=nD(u.title,u.borderStyle)):u.title&&(u.title=u.title.slice(0,Math.max(0,r-2)),u.title&&(u.title=nD(u.title,u.borderStyle),P(u.title)>o&&(u.width=P(u.title)))),u.width||=o,!t){if(u.margin.left&&u.margin.right&&u.width>r){let s=(n-u.width-D)/(u.margin.left+u.margin.right);u.margin.left=Math.max(0,Math.floor(u.margin.left*s)),u.margin.right=Math.max(0,Math.floor(u.margin.right*s))}u.width=Math.min(u.width,n-D-u.margin.left-u.margin.right)}return u.width-(u.padding.left+u.padding.right)<=0&&(u.padding.left=0,u.padding.right=0),u.height&&u.height-(u.padding.top+u.padding.bottom)<=0&&(u.padding.top=0,u.padding.bottom=0),u},Ku=e=>e.match(/^#(?:[0-f]{3}){1,2}$/i),DD=e=>typeof e=="string"&&(X[e]??Ku(e)),$i=e=>Ku(e)?X.hex(e):X[e],Ui=e=>Ku(e)?X.bgHex(e):X[$u(["bg",e])];function Yu(e,u){if(u={padding:0,borderStyle:"single",dimBorder:!1,textAlignment:"left",float:"left",titleAlignment:"left",...u},u.align&&(u.textAlignment=u.align),u.borderColor&&!DD(u.borderColor))throw new Error(`${u.borderColor} is not a valid borderColor`);if(u.backgroundColor&&!DD(u.backgroundColor))throw new Error(`${u.backgroundColor} is not a valid backgroundColor`);return u.padding=tD(u.padding),u.margin=tD(u.margin),u=Ni(e,u),e=Pi(e,u),Oi(e,u.width,u)}var Pr=le(ur(),1);import tr from"node:process";function rt(){let{env:e}=tr,{TERM:u,TERM_PROGRAM:t}=e;return tr.platform!=="win32"?u!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||t==="Terminus-Sublime"||t==="vscode"||u==="xterm-256color"||u==="alacritty"||u==="rxvt-unicode"||u==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var nr={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"},Dr={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"},xs={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"},Rs={...nr,...Dr},ws={...nr,...xs},ks=rt(),Ss=ks?Rs:ws,I=Ss,h0=Object.entries(Dr);var rr=(e=0)=>u=>`\x1B[${u+e}m`,or=(e=0)=>u=>`\x1B[${38+e};5;${u}m`,ir=(e=0)=>(u,t,n)=>`\x1B[${38+e};2;${u};${t};${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]}},g0=Object.keys(w.modifier),Ts=Object.keys(w.color),_s=Object.keys(w.bgColor),m0=[...Ts,..._s];function vs(){let e=new Map;for(let[u,t]of Object.entries(w)){for(let[n,D]of Object.entries(t))w[n]={open:`\x1B[${D[0]}m`,close:`\x1B[${D[1]}m`},t[n]=w[n],e.set(D[0],D[1]);Object.defineProperty(w,u,{value:t,enumerable:!1})}return Object.defineProperty(w,"codes",{value:e,enumerable:!1}),w.color.close="\x1B[39m",w.bgColor.close="\x1B[49m",w.color.ansi=rr(),w.color.ansi256=or(),w.color.ansi16m=ir(),w.bgColor.ansi=rr(10),w.bgColor.ansi256=or(10),w.bgColor.ansi16m=ir(10),Object.defineProperties(w,{rgbToAnsi256:{value(u,t,n){return u===t&&t===n?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(u){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(r=>r+r).join(""));let D=Number.parseInt(n,16);return[D>>16&255,D>>8&255,D&255]},enumerable:!1},hexToAnsi256:{value:u=>w.rgbToAnsi256(...w.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value(u){if(u<8)return 30+u;if(u<16)return 90+(u-8);let t,n,D;if(u>=232)t=((u-232)*10+8)/255,n=t,D=t;else{u-=16;let i=u%36;t=Math.floor(u/36)/5,n=Math.floor(i/6)/5,D=i%6/5}let r=Math.max(t,n,D)*2;if(r===0)return 30;let o=30+(Math.round(D)<<2|Math.round(n)<<1|Math.round(t));return r===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(u,t,n)=>w.ansi256ToAnsi(w.rgbToAnsi256(u,t,n)),enumerable:!1},hexToAnsi:{value:u=>w.ansi256ToAnsi(w.hexToAnsi256(u)),enumerable:!1}}),w}var Is=vs(),Q=Is;function su(e){return Number.isInteger(e)?we(e)||ke(e):!1}var Ne=27,lr=144,Fr=152,dr=155,fr=156,Fu=157,pr=158,hr=159,$e=new Set([Ne,lr,Fr,dr,fr,Fu,pr,hr]),ge="\x1B",at="\x07",Ft="[",Cr="]",Ms="P",Ps="X",Os="^",Ls="_",gr="m",cu="\\",mr=`${ge}${cu}`,Ns="\x9D",lu="\x9C",ct=`${ge}${Cr}8;`,lt=`${Ns}8;`,$s=`${ct};`,Us=`${lt};`,Ws="0".codePointAt(0),js="9".codePointAt(0),Gs=";".codePointAt(0),qs=":".codePointAt(0),Hs="0".codePointAt(0),Vs="?".codePointAt(0),zs=" ".codePointAt(0),Ks="/".codePointAt(0),Ys="@".codePointAt(0),Js="~".codePointAt(0),Xs=127462,Zs=127487,sr=0,au=38,ot=39,Qs=48,it=49,ea=5,ua=2,ar=3,cr=5,ta=2,na=4,Da=65039,ra=8419,oa=new RegExp("\\p{Emoji_Presentation}","v"),dt=new Intl.Segmenter(void 0,{granularity:"grapheme"}),Er=new Set;for(let[,e]of Q.codes)Er.add(e);function ia(e){return e>=Ws&&e<=js||e===Gs||e===qs}function sa(e){return e>=Hs&&e<=Vs}function aa(e){return e>=zs&&e<=Ks}function ca(e){return e>=Ys&&e<=Js}function la(e){return e>=Xs&&e<=Zs}function j(e,u){return{token:{type:"control",code:e},endIndex:u}}function Fa(e){if(oa.test(e))return!0;for(let u of e){let t=u.codePointAt(0);if(t===Da||t===ra)return!0}return!1}function Br(e){let u=0;for(let t of e){let n=t.codePointAt(0);if(su(n))return 2;la(n)&&u++}return u>=1||Fa(e)?2:1}function da(e){return e.startsWith("\x9B")?"\x9B":`${ge}${Ft}`}function Le(e,u){return`${e}${u.join(";")}${gr}`}function fa(e){let u=[],t=da(e),n;if(e.startsWith(`${ge}${Ft}`))n=e.slice(2,-1);else if(e.startsWith("\x9B"))n=e.slice(1,-1);else return u;let D=n.length===0?[String(sr)]:n.split(";"),r=0;for(;r<D.length;){let o=Number.parseInt(D[r],10);if(Number.isNaN(o)){r++;continue}if(o===sr){u.push({type:"reset"}),r++;continue}if(o===au||o===Qs){let a=Number.parseInt(D[r+1],10);if(a===ea&&r+ta<D.length){let c=Le(t,D.slice(r,r+ar));u.push({type:"start",code:c,endCode:Q.color.ansi(o===au?ot:it)}),r+=ar;continue}if(a===ua&&r+na<D.length){let c=Le(t,D.slice(r,r+cr));u.push({type:"start",code:c,endCode:Q.color.ansi(o===au?ot:it)}),r+=cr;continue}let F=Le(t,[D[r]]);u.push({type:"start",code:F,endCode:Q.color.ansi(o===au?ot:it)}),r++;continue}if(Er.has(o)){u.push({type:"end",endCode:Q.color.ansi(o)}),r++;continue}let i=Q.codes.get(o);if(i!==void 0){let a=Le(t,[D[r]]);u.push({type:"start",code:a,endCode:Q.color.ansi(i)}),r++;continue}let s=Le(t,[D[r]]);u.push({type:"start",code:s,endCode:Q.reset.open}),r++}return u.length===0&&u.push({type:"reset"}),u}function pa(e,u){let t=e.codePointAt(u),n;if(t===Ne){if(e[u+1]!==Ft)return;n=u+2}else if(t===dr)n=u+1;else return;let D=!0;for(let r=n;r<e.length;r++){let o=e.codePointAt(r);if(ca(o)){let s=e.slice(u,r+1);return e[r]!==gr||!D?j(s,r+1):{token:{type:"sgr",code:s,fragments:fa(s)},endIndex:r+1}}if(sa(o)){ia(o)||(D=!1);continue}if(aa(o)){D=!1;continue}let i=r;return j(e.slice(u,i),i)}return j(e.slice(u),e.length)}function ha(e,u){let t,n,D=e.codePointAt(u);if(D===Ne&&e.startsWith(ct,u))t=ct,n=$s;else if(D===Fu&&e.startsWith(lt,u))t=lt,n=Us;else return;let r=e.indexOf(";",u+t.length);if(r===-1)return j(e.slice(u),e.length);for(let o=r+1;o<e.length;o++){let i=e[o];if(i===at){let s=e.slice(u,o+1),a=o===r+1?"close":"open";return{token:{type:"hyperlink",code:s,action:a,closePrefix:n,terminator:at},endIndex:o+1}}if(i===ge&&e[o+1]===cu){let s=e.slice(u,o+2),a=o===r+1?"close":"open";return{token:{type:"hyperlink",code:s,action:a,closePrefix:n,terminator:mr},endIndex:o+2}}if(i===lu){let s=e.slice(u,o+1),a=o===r+1?"close":"open";return{token:{type:"hyperlink",code:s,action:a,closePrefix:n,terminator:lu},endIndex:o+1}}}return j(e.slice(u),e.length)}function Ca(e,u){let t=e.codePointAt(u),n,D=!1;switch(t){case Ne:{switch(e[u+1]){case Cr:{n=u+2,D=!0;break}case Ms:case Ps:case Os:case Ls:{n=u+2;break}case cu:return j(mr,u+2);default:return}break}case Fu:{n=u+1,D=!0;break}case lr:case Fr:case pr:case hr:{n=u+1;break}case fr:return j(lu,u+1);default:return}for(let r=n;r<e.length;r++){if(D&&e[r]===at)return j(e.slice(u,r+1),r+1);if(e[r]===ge&&e[r+1]===cu)return j(e.slice(u,r+2),r+2);if(e[r]===lu)return j(e.slice(u,r+1),r+1)}return j(e.slice(u),e.length)}function Ue(e,u){let t=e.codePointAt(u);if(t===Ne||t===Fu){let D=ha(e,u);if(D)return D}let n=Ca(e,u);return n||pa(e,u)}function br(e,u,t){for(;u<e.length;){let n=e.codePointAt(u);if(!$e.has(n))break;let D=Ue(e,u);if(!D)break;t.push(D.token),u=D.endIndex}return u}function Ar(e,u,t){let n=t.containing(u);if(!(!n||n.index!==u))return{token:{type:"character",value:n.segment,visibleWidth:Br(n.segment),isGraphemeContinuation:!1},endIndex:u+n.segment.length}}function ga(e){let u=[],t=0;for(;t<e.length;){let n=e.codePointAt(t);if($e.has(n)){let r=Ue(e,t);if(r){t=r.endIndex;continue}}let D=String.fromCodePoint(n);u.push({value:D,visibleWidth:1,isGraphemeContinuation:!1}),t+=D.length}return u}function ma(e){if(e.length===0)return;let u=e.map(({value:r})=>r).join(""),t=[],n=0;for(let r of e)t.push(n),n+=r.value.length;let D=0;for(let r of dt.segment(u)){for(;D<e.length&&t[D]<r.index;)D++;let o=D,i=!0;for(;o<e.length&&t[o]<r.index+r.segment.length;)e[o].visibleWidth=i?Br(r.segment):0,e[o].isGraphemeContinuation=!i,i=!1,o++;D=o}}function st(e,{endCharacter:u=Number.POSITIVE_INFINITY}={}){let t=[],n=ga(e);ma(n);let D=0,r=0,o=0;for(;D<e.length;){let i=e.codePointAt(D);if($e.has(i)){let f=Ue(e,D);if(f){t.push(f.token),D=f.endIndex;continue}}let s=String.fromCodePoint(i),a=n[r],F=su(i)?2:s.length;a&&(F=a.visibleWidth);let c={type:"character",value:s,visibleWidth:F,isGraphemeContinuation:a?a.isGraphemeContinuation:!1};if(t.push(c),D+=s.length,r++,o+=c.visibleWidth,o>=u){let f=n[r];if(!f||!f.isGraphemeContinuation){D=br(e,D,t);break}}}return t}function yr(e,u){let t=`${e}${u}`,n=e.length;for(let D of dt.segment(t)){if(D.index===n)return!1;if(D.index>n)return!0}return!0}function Ea(e,u,t,n){if(!t)return!1;let D=u,r=!1;for(;D<e.length;){let o=e.codePointAt(D);if($e.has(o)){let s=Ue(e,D);if(s){r=!0,D=s.endIndex;continue}}if(!r)return!1;let i=Ar(e,D,n);return i?yr(t,i.token.value):!0}return!1}function ft(e,{endCharacter:u=Number.POSITIVE_INFINITY}={}){let t=[],n=dt.segment(e),D=0,r=0,o,i=!1;for(;D<e.length;){let s=e.codePointAt(D);if($e.has(s)){let F=Ue(e,D);if(F){t.push(F.token),D=F.endIndex,i=!0;continue}}let a=Ar(e,D,n);if(!a)return st(e,{endCharacter:u});if(i&&o&&yr(o,a.token.value))return st(e,{endCharacter:u});if(t.push(a.token),D=a.endIndex,r+=a.token.visibleWidth,i=!1,o=a.token.value,r>=u){if(Ea(e,D,o,n))return st(e,{endCharacter:u});D=br(e,D,t);break}}return t}function Ba(e,u){for(let t of u)switch(t.type){case"reset":{e.clear();break}case"end":{e.delete(t.endCode);break}case"start":{e.delete(t.endCode),e.set(t.endCode,t.code);break}default:break}return e}function ba(e){return[...e.keys()].toReversed().join("")}function Aa(e){return`${e.closePrefix}${e.terminator}`}function ya(e,u){let t=!1,n=!1;for(let D of e.fragments){if(D.type==="start"){t=!0;continue}if(D.type==="reset"&&u.size>0){n=!0;continue}D.type==="end"&&u.has(D.endCode)&&(n=!0)}return n&&!t}function xa(e){return e.fragments.some(u=>u.type==="start")}function xr(e){if(e.activeHyperlink&&!e.activeHyperlinkHasVisibleText&&e.activeHyperlinkOutputIndex!==void 0){let u=e.activeHyperlink.code.length;e.returnValue=e.returnValue.slice(0,e.activeHyperlinkOutputIndex)+e.returnValue.slice(e.activeHyperlinkOutputIndex+u),e.pendingSgrOutputIndex!==void 0&&e.pendingSgrOutputIndex>e.activeHyperlinkOutputIndex&&(e.pendingSgrOutputIndex-=u)}e.activeHyperlink=void 0,e.activeHyperlinkHasVisibleText=!1,e.activeHyperlinkOutputIndex=void 0}function Ra(e){return e.isPastEnd&&!ya(e.token,e.activeStyles)||(e.include&&xa(e.token)&&e.pendingSgrOutputIndex===void 0&&(e.pendingSgrOutputIndex=e.returnValue.length,e.pendingSgrActiveStyles=new Map(e.activeStyles)),e.activeStyles=Ba(e.activeStyles,e.token.fragments),e.include&&(e.returnValue+=e.token.code)),e}function wa(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 xr(e),e;e.activeHyperlink=void 0,e.activeHyperlinkHasVisibleText=!1,e.activeHyperlinkOutputIndex=void 0}return e.include&&(e.returnValue+=e.token.code),e}function ka(e){return!e.isPastEnd&&e.include&&(e.returnValue+=e.token.code),e}function Sa(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 Ta={sgr:Ra,hyperlink:wa,control:ka,character:Sa};function _a(e){let u=Ta[e.token.type];return u?u(e):e}function va(e){let u=Array.from({length:e.length},()=>!1),t=!1;for(let n=e.length-1;n>=0;n--){let D=e[n];u[n]=t,D.type==="character"&&(t=!!D.isGraphemeContinuation)}return u}function Ia(e,u,t){return t===void 0?!1:u>=t?!0:e.type==="character"&&!e.isGraphemeContinuation&&u+e.visibleWidth>t}function V(e,u,t){let n=ft(e,{endCharacter:t}),D=va(n),r=new Map,o,i=!1,s,a,F,c=0,f="",d=!1;for(let[l,C]of n.entries()){let h=Ia(C,c,t);if(h&&C.type!=="character"&&D[l]&&(h=!1),h&&C.type==="character"&&!C.isGraphemeContinuation){if(o&&!i){let p={activeHyperlink:o,activeHyperlinkHasVisibleText:i,activeHyperlinkOutputIndex:s,pendingSgrOutputIndex:a,returnValue:f};xr(p),{activeHyperlink:o,activeHyperlinkHasVisibleText:i,activeHyperlinkOutputIndex:s,pendingSgrOutputIndex:a,returnValue:f}=p}a!==void 0&&(f=f.slice(0,a),r=F,a=void 0,F=void 0);break}({activeStyles:r,activeHyperlink:o,activeHyperlinkHasVisibleText:i,activeHyperlinkOutputIndex:s,pendingSgrOutputIndex:a,pendingSgrActiveStyles:F,position:c,returnValue:f,include:d}=_a({token:C,isPastEnd:h,start:u,activeStyles:r,activeHyperlink:o,activeHyperlinkHasVisibleText:i,activeHyperlinkOutputIndex:s,pendingSgrOutputIndex:a,pendingSgrActiveStyles:F,position:c,returnValue:f,include:d}))}return d?(o&&(f+=Aa(o)),f+=ba(r),f):""}var Ma=new Intl.Segmenter,Rr=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Mark}|\\p{Surrogate})+$","v"),Pa=new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+","v"),Oa=new RegExp("^\\p{RGI_Emoji}$","v"),La=/^[\d#*]\u20E3$/,Na=new RegExp("\\p{Extended_Pictographic}","gu");function $a(e){if(e.length>50)return!1;if(La.test(e))return!0;if(e.includes("\u200D")){let u=e.match(Na);return u!==null&&u.length>=2}return!1}function Ua(e){return e.replace(Pa,"")}function Wa(e){return Rr.test(e)}function wr(e){return e>=4352&&e<=4447||e>=43360&&e<=43388}function kr(e){return e>=4448&&e<=4519||e>=55216&&e<=55238}function Sr(e){return e>=4520&&e<=4607||e>=55243&&e<=55291}function ja(e){return wr(e)||kr(e)||Sr(e)}function Ga(e,u){let t=[];for(let D of e)Rr.test(D)||t.push(D.codePointAt(0));if(t.length===0)return;let n=0;for(let D=0;D<t.length;D++){let r=t[D];if(!ja(r)){if(n===0)return;for(let o=D;o<t.length;o++)n+=J(t[o],u);return n}if(wr(r)&&kr(t[D+1])){n+=2,D+=Sr(t[D+2])?2:1;continue}n+=J(r,u)}return n}function qa(e,u){let t=0,n=!0;for(let D of e){if(n){n=!1;continue}D>="\uFF00"&&D<="\uFFEF"&&(t+=J(D.codePointAt(0),u))}return t}function G(e,u={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:t=!0,countAnsiEscapeCodes:n=!1}=u,D=e;if(!n&&(D.includes("\x1B")||D.includes("\x9B"))&&(D=Y(D)),D.length===0)return 0;if(/^[\u0020-\u007E]*$/.test(D))return D.length;let r=0,o={ambiguousAsWide:!t};for(let{segment:i}of Ma.segment(D)){if(Wa(i))continue;if(Oa.test(i)||$a(i)){r+=2;continue}let s=Ua(i),a=Ga(s,o);if(a!==void 0){r+=a;continue}let F=s.codePointAt(0);r+=J(F,o),r+=qa(s,o)}return r}function du(e,u,t){if(e.charAt(u)===" ")return u;let n=t?1:-1;for(let D=0;D<=3;D++){let r=u+D*n;if(e.charAt(r)===" ")return r}return u}function me(e,u,t={}){let{position:n="end",space:D=!1,preferTruncationOnSpace:r=!1}=t,{truncationCharacter:o="\u2026"}=t;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof e}`);if(typeof u!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof u}`);if(u<1)return"";let i=G(e);if(i<=u)return e;if(u===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 h=C+2;for(;h<l.length&&a(l.codePointAt(h));)h++;if(h<l.length&&l.codePointAt(h)===s.LETTER_M){C=h+1;continue}break}return C}function c(l){let C=l.length;for(;C>1&&l.codePointAt(C-1)===s.LETTER_M;){let h=C-2;for(;h>=0&&a(l.codePointAt(h));)h--;if(h>=1&&l.codePointAt(h-1)===s.ESC&&l.codePointAt(h)===s.LEFT_BRACKET){C=h-1;continue}break}return C}function f(l,C){let h=c(l);return h===l.length?l+C:l.slice(0,h)+C+l.slice(h)}function d(l,C){let h=F(C);return h===0?l+C:C.slice(0,h)+l+C.slice(h)}if(n==="start"){if(r){let C=du(e,i-u+1,!0),h=V(e,C,i).trim();return d(o,h)}D&&(o+=" ");let l=V(e,i-u+G(o),i);return d(o,l)}if(n==="middle"){D&&(o=` ${o} `);let l=Math.floor(u/2);if(r){let C=du(e,l),h=du(e,i-(u-l)+1,!0);return V(e,0,C)+o+V(e,h,i).trim()}return V(e,0,l)+o+V(e,i-(u-l)+G(o),i)}if(n==="end"){if(r){let C=du(e,u-1),h=V(e,0,C);return f(h,o)}D&&(o=` ${o}`);let l=V(e,0,u-G(o));return f(l,o)}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${n}`)}var pt=300*60*1e3;function Ha(e,u=pt){if(e.length===0)return[];let t=[...e].sort((i,s)=>i.timestamp.localeCompare(s.timestamp)),n=[],D=null,r=0,o=Date.now();for(let i of t){let s=new Date(i.timestamp).getTime();(!D||s-r>=u)&&(r=s,D={id:i.timestamp,startTime:i.timestamp,endTime:new Date(s+u).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(D));let a=oe(i);D.inputTokens+=i.usage.input_tokens,D.outputTokens+=i.usage.output_tokens,D.cacheReadTokens+=i.usage.cache_read_input_tokens,D.cacheCreationTokens+=i.usage.cache_creation_input_tokens,D.totalTokens=D.inputTokens+D.outputTokens+D.cacheReadTokens+D.cacheCreationTokens,D.cost+=a.total,D.saved+=a.saved,D.requests+=1,D.actualEndTime=i.timestamp,D.models.includes(i.model)||D.models.push(i.model)}for(let i of n){let s=new Date(i.endTime).getTime();i.isActive=o<s}return n}function Va(e,u=pt){return Ha(e,u).find(D=>D.isActive)??null}function Tr(e,u=pt){let t=Va(e,u);if(!t)return{block:null,windowMs:u,elapsedMs:0,remainingMs:0,progress:0,burnRatePerMin:0,costPerMin:0,projectedTotal:0,projectedCost:0};let n=Date.now(),D=new Date(t.startTime).getTime(),r=new Date(t.endTime).getTime(),o=n-D,i=Math.max(0,r-n),s=Math.min(1,o/u),a=o/6e4,F=a>0?t.totalTokens/a:0,c=a>0?t.cost/a:0,f=u/6e4;return{block:t,windowMs:u,elapsedMs:o,remainingMs:i,progress:s,burnRatePerMin:F,costPerMin:c,projectedTotal:F*f,projectedCost:c*f}}function _r(e,u){let t=u.source==="all"?e:e.filter(h=>h.source===u.source);if(t.length===0)return{sessions:0,messages:0,totalTokens:0,activeDays:0,currentStreak:0,longestStreak:0,peakHour:-1,favoriteModel:null,heatmap:fu(),heatmapMax:0,tokenHeatmap:fu(),tokensSummed:0};let n=new Set,D=new Set,r=new Array(24).fill(0),o=new Map,i=fu(),s=fu(),a=0,F=0;for(let h of t){h.sessionId&&n.add(h.sessionId);let p=new Date(h.timestamp);if(Number.isNaN(p.getTime()))continue;let g=za(p);D.add(g);let B=p.getDay(),m=p.getHours();r[m]+=1,i[B][m]+=1,o.set(h.model,(o.get(h.model)??0)+1);let b=h.usage,k=b.input_tokens+b.output_tokens+b.cache_read_input_tokens+b.cache_creation_input_tokens;s[B][m]+=k,a+=k,F+=1}let c=Ka(r),f=Ya(o),{current:d,longest:l}=Ja(D,u.streakWindowDays??365),C=0;for(let h of i)for(let p of h)p>C&&(C=p);return{sessions:n.size,messages:F,totalTokens:a,activeDays:D.size,currentStreak:d,longestStreak:l,peakHour:c,favoriteModel:f,heatmap:i,heatmapMax:C,tokenHeatmap:s,tokensSummed:a}}function fu(){return Array.from({length:7},()=>new Array(24).fill(0))}function za(e){let u=e.getFullYear(),t=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${u}-${t}-${n}`}function Ka(e){let u=-1,t=-1;for(let n=0;n<e.length;n+=1)e[n]>t&&(t=e[n],u=n);return u}function Ya(e){let u=null,t=-1;for(let[n,D]of e)D>t&&(u=n,t=D);return u}function Ja(e,u){if(e.size===0)return{current:0,longest:0};let t=Array.from(e).map(c=>new Date(c+"T00:00:00").getTime()).filter(c=>Number.isFinite(c)).sort((c,f)=>c-f),n=1,D=1;for(let c=1;c<t.length;c+=1)t[c]-t[c-1]===864e5?(D+=1,D>n&&(n=D)):D=1;let r=Xa(Date.now()),o=t[t.length-1];if(r-o>864e5)return{current:0,longest:n};let i=o,s=0,a=0,F=new Set(t);for(;a<u&&F.has(i);)s+=1,i-=864e5,a+=1;return{current:s,longest:n}}function Xa(e){let u=new Date(e);return u.setHours(0,0,0,0),u.getTime()}var ee={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 vr(e){let u=new Xe({level:e?3:0}),t=n=>e?D=>u.rgb(n[0],n[1],n[2])(D):D=>D;return{reset:e?"\x1B[0m":"",bold:n=>u.bold(n),dim:n=>u.dim(n),brand:t(ee.brand),green:t(ee.green),red:t(ee.red),yellow:t(ee.yellow),cyan:t(ee.cyan),input:t(ee.input),cacheWrite:t(ee.cacheWrite),cacheRead:t(ee.cacheRead),output:t(ee.output)}}function pu(e){return G(e)}function hu(e,u,t=" "){let n=u-G(e);return n>0?e+t.repeat(n):e}function Ee(e,u,t=" "){let n=u-G(e);return n>0?t.repeat(n)+e:e}function ht(e,u,t=" "){let n=u-G(e);if(n<=0)return e;let D=Math.floor(n/2),r=n-D;return t.repeat(D)+e+t.repeat(r)}var Za=["","\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u2588"];function Cu(e,u,t){if(u<=0||!Number.isFinite(e)||e<=0)return" ".repeat(Math.max(0,u));let D=Math.min(1,e)*u,r=Math.floor(D),o=D-r,i=Math.round(o*8),s="\u2588".repeat(r);i>0&&r<u&&(s+=Za[i]);let a=hu(s,u," ");return t?t(a):a}var Qa=["\u2581","\u2582","\u2583","\u2584","\u2585","\u2586","\u2587","\u2588"];function We(e,u,t){if(u<=0)return"";if(e.length===0)return t?t("\u2500".repeat(u)):"\u2500".repeat(u);let n=[];if(e.length===u)n.push(...e);else if(e.length>u){let o=e.length/u;for(let i=0;i<u;i+=1){let s=Math.floor(i*o),a=Math.floor((i+1)*o),F=0,c=0;for(let f=s;f<Math.min(a,e.length);f+=1)F+=e[f],c+=1;n.push(c>0?F/c:0)}}else{let o=u-e.length;for(let i=0;i<o;i+=1)n.push(0);n.push(...e)}let D=Math.max(...n,0);if(D<=0){let o="\u2500".repeat(u);return t?t(o):o}let r=n.map(o=>Qa[Math.min(7,Math.max(0,Math.round(o/D*7)))]).join("");return t?t(r):r}var ec=["","\u2581","\u2582","\u2583","\u2584","\u2585","\u2586","\u2587","\u2588"];function Ir(e,u,t){let n=new Array(u).fill(" ");if(u<=0||t<=0)return n;let D=e.reduce((F,c)=>F+Math.max(0,c.value),0);if(D<=0)return n;let r=D/t*u*8,o=u*8,i=Math.min(r,o),s=i,a=0;for(let F of e){if(F.value<=0||s<=0)continue;let c=Math.min(s,F.value/D*i),f=a,d=a+c,l=Math.floor(f/8),C=Math.min(u-1,Math.floor((d-1e-4)/8));for(let h=l;h<=C;h+=1){let p=h*8,g=Math.max(0,f-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=ec[Math.min(8,b)]||"\u2581"}else m="\u2588";n[u-1-h]=F.color?F.color(m):m}s-=c,a=d}return n}function Or(e,u,t,n){let D=t.width??process.stdout.columns??100,r=t.color!==!1;X.level=r?3:0;let o=vr(r);if(D<80)return[`[ccgauge] terminal width (${D}) is below the dashboard's 80-column floor.`,"Resize wider for the rich layout, or omit --dashboard for the standard report.","",...Ct(u,t).split(`
19
+ `).map(n=>Mi(n,u,t)).join(`
20
+ `)}var Gi=le(Lu(),1),ie=`
21
+ `,O=" ",_e="none",sD=()=>{let{env:e,stdout:u,stderr:t}=nu;return u?.columns?u.columns:t?.columns?t.columns:e.COLUMNS?Number.parseInt(e.COLUMNS,10):80},DD=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,Pi=e=>{let u=["topLeft","topRight","bottomRight","bottomLeft","left","right","top","bottom"],t;if(e===_e){e={};for(let n of u)e[n]=""}if(typeof e=="string"){if(t=iD.default[e],!t)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 u)if(e[n]===null||typeof e[n]!="string")throw new TypeError(`Invalid border style: ${n}`);t=e}return t},Oi=(e,u,t)=>{let n="",D=P(e);switch(t){case"left":{n=e+u.slice(D);break}case"right":{n=u.slice(D)+e;break}default:{u=u.slice(D),u.length%2===1?(u=u.slice(Math.floor(u.length/2)),n=u.slice(1)+e+u):(u=u.slice(u.length/2),n=u+e+u);break}}return n},Li=(e,{padding:u,width:t,textAlignment:n,height:D})=>{e=(0,Ku.default)(e,{align:n});let r=e.split(ie),o=Qe(e),i=t-u.left-u.right;if(o>i){let F=[];for(let c of r){let f=tu(c,i,{hard:!0}),l=(0,Ku.default)(f,{align:n}).split(`
22
+ `),C=Math.max(...l.map(h=>P(h)));for(let h of l){let p;switch(n){case"center":{p=O.repeat((i-C)/2)+h;break}case"right":{p=O.repeat(i-C)+h;break}default:{p=h;break}}F.push(p)}}r=F}n==="center"&&o<i?r=r.map(F=>O.repeat((i-o)/2)+F):n==="right"&&o<i&&(r=r.map(F=>O.repeat(i-o)+F));let s=O.repeat(u.left),a=O.repeat(u.right);return r=r.map(F=>{let c=s+F+a;return c+O.repeat(t-P(c))}),u.top>0&&(r=[...Array.from({length:u.top}).fill(O.repeat(t)),...r]),u.bottom>0&&(r=[...r,...Array.from({length:u.bottom}).fill(O.repeat(t))]),D&&r.length>D?r=r.slice(0,D):D&&r.length<D&&(r=[...r,...Array.from({length:D-r.length}).fill(O.repeat(t))]),r.join(ie)},Ni=(e,u,t)=>{let n=F=>{let c=t.borderColor?Wi(t.borderColor)(F):F;return t.dimBorder?X.dim(c):c},D=F=>t.backgroundColor?ji(t.backgroundColor)(F):F,r=Pi(t.borderStyle),o=sD(),i=O.repeat(t.margin.left);if(t.float==="center"){let F=Math.max((o-u-ve(t.borderStyle))/2,0);i=O.repeat(F)}else if(t.float==="right"){let F=Math.max(o-u-t.margin.right-ve(t.borderStyle),0);i=O.repeat(F)}let s="";t.margin.top&&(s+=ie.repeat(t.margin.top)),(t.borderStyle!==_e||t.title)&&(s+=n(i+r.topLeft+(t.title?Oi(t.title,r.top.repeat(u),t.titleAlignment):r.top.repeat(u))+r.topRight)+ie);let a=e.split(ie);return s+=a.map(F=>i+n(r.left)+D(F)+n(r.right)).join(ie),t.borderStyle!==_e&&(s+=ie+n(i+r.bottomLeft+r.bottom.repeat(u)+r.bottomRight)),t.margin.bottom&&(s+=ie.repeat(t.margin.bottom)),s},$i=e=>{if(e.fullscreen&&nu?.stdout){let u=[nu.stdout.columns,nu.stdout.rows];typeof e.fullscreen=="function"&&(u=e.fullscreen(...u)),e.width||=u[0],e.height||=u[1]}return e.width&&=Math.max(1,e.width-ve(e.borderStyle)),e.height&&=Math.max(1,e.height-ve(e.borderStyle)),e},rD=(e,u)=>u===_e?e:` ${e} `,Ui=(e,u)=>{u=$i(u);let t=u.width!==void 0,n=sD(),D=ve(u.borderStyle),r=n-u.margin.left-u.margin.right-D,o=Qe(tu(e,n-D,{hard:!0,trim:!1}))+u.padding.left+u.padding.right;if(u.title&&t?(u.title=u.title.slice(0,Math.max(0,u.width-2)),u.title&&=rD(u.title,u.borderStyle)):u.title&&(u.title=u.title.slice(0,Math.max(0,r-2)),u.title&&(u.title=rD(u.title,u.borderStyle),P(u.title)>o&&(u.width=P(u.title)))),u.width||=o,!t){if(u.margin.left&&u.margin.right&&u.width>r){let s=(n-u.width-D)/(u.margin.left+u.margin.right);u.margin.left=Math.max(0,Math.floor(u.margin.left*s)),u.margin.right=Math.max(0,Math.floor(u.margin.right*s))}u.width=Math.min(u.width,n-D-u.margin.left-u.margin.right)}return u.width-(u.padding.left+u.padding.right)<=0&&(u.padding.left=0,u.padding.right=0),u.height&&u.height-(u.padding.top+u.padding.bottom)<=0&&(u.padding.top=0,u.padding.bottom=0),u},zu=e=>e.match(/^#(?:[0-f]{3}){1,2}$/i),oD=e=>typeof e=="string"&&(X[e]??zu(e)),Wi=e=>zu(e)?X.hex(e):X[e],ji=e=>zu(e)?X.bgHex(e):X[$u(["bg",e])];function Yu(e,u){if(u={padding:0,borderStyle:"single",dimBorder:!1,textAlignment:"left",float:"left",titleAlignment:"left",...u},u.align&&(u.textAlignment=u.align),u.borderColor&&!oD(u.borderColor))throw new Error(`${u.borderColor} is not a valid borderColor`);if(u.backgroundColor&&!oD(u.backgroundColor))throw new Error(`${u.backgroundColor} is not a valid backgroundColor`);return u.padding=DD(u.padding),u.margin=DD(u.margin),u=Ui(e,u),e=Li(e,u),Ni(e,u.width,u)}var Lr=le(nr(),1);import Dr from"node:process";function rt(){let{env:e}=Dr,{TERM:u,TERM_PROGRAM:t}=e;return Dr.platform!=="win32"?u!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||t==="Terminus-Sublime"||t==="vscode"||u==="xterm-256color"||u==="alacritty"||u==="rxvt-unicode"||u==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var rr={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"},or={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"},ws={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"},ks={...rr,...or},Ss={...rr,...ws},Ts=rt(),_s=Ts?ks:Ss,I=_s,g0=Object.entries(or);var ir=(e=0)=>u=>`\x1B[${u+e}m`,sr=(e=0)=>u=>`\x1B[${38+e};5;${u}m`,ar=(e=0)=>(u,t,n)=>`\x1B[${38+e};2;${u};${t};${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]}},E0=Object.keys(w.modifier),vs=Object.keys(w.color),Is=Object.keys(w.bgColor),B0=[...vs,...Is];function Ms(){let e=new Map;for(let[u,t]of Object.entries(w)){for(let[n,D]of Object.entries(t))w[n]={open:`\x1B[${D[0]}m`,close:`\x1B[${D[1]}m`},t[n]=w[n],e.set(D[0],D[1]);Object.defineProperty(w,u,{value:t,enumerable:!1})}return Object.defineProperty(w,"codes",{value:e,enumerable:!1}),w.color.close="\x1B[39m",w.bgColor.close="\x1B[49m",w.color.ansi=ir(),w.color.ansi256=sr(),w.color.ansi16m=ar(),w.bgColor.ansi=ir(10),w.bgColor.ansi256=sr(10),w.bgColor.ansi16m=ar(10),Object.defineProperties(w,{rgbToAnsi256:{value(u,t,n){return u===t&&t===n?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(u){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(r=>r+r).join(""));let D=Number.parseInt(n,16);return[D>>16&255,D>>8&255,D&255]},enumerable:!1},hexToAnsi256:{value:u=>w.rgbToAnsi256(...w.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value(u){if(u<8)return 30+u;if(u<16)return 90+(u-8);let t,n,D;if(u>=232)t=((u-232)*10+8)/255,n=t,D=t;else{u-=16;let i=u%36;t=Math.floor(u/36)/5,n=Math.floor(i/6)/5,D=i%6/5}let r=Math.max(t,n,D)*2;if(r===0)return 30;let o=30+(Math.round(D)<<2|Math.round(n)<<1|Math.round(t));return r===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(u,t,n)=>w.ansi256ToAnsi(w.rgbToAnsi256(u,t,n)),enumerable:!1},hexToAnsi:{value:u=>w.ansi256ToAnsi(w.hexToAnsi256(u)),enumerable:!1}}),w}var Ps=Ms(),Q=Ps;function su(e){return Number.isInteger(e)?we(e)||ke(e):!1}var Ne=27,dr=144,fr=152,pr=155,hr=156,Fu=157,Cr=158,gr=159,$e=new Set([Ne,dr,fr,pr,hr,Fu,Cr,gr]),ge="\x1B",at="\x07",Ft="[",mr="]",Os="P",Ls="X",Ns="^",$s="_",Er="m",cu="\\",Br=`${ge}${cu}`,Us="\x9D",lu="\x9C",ct=`${ge}${mr}8;`,lt=`${Us}8;`,Ws=`${ct};`,js=`${lt};`,Gs="0".codePointAt(0),qs="9".codePointAt(0),Hs=";".codePointAt(0),Vs=":".codePointAt(0),Ks="0".codePointAt(0),zs="?".codePointAt(0),Ys=" ".codePointAt(0),Js="/".codePointAt(0),Xs="@".codePointAt(0),Zs="~".codePointAt(0),Qs=127462,ea=127487,cr=0,au=38,ot=39,ua=48,it=49,ta=5,na=2,lr=3,Fr=5,Da=2,ra=4,oa=65039,ia=8419,sa=new RegExp("\\p{Emoji_Presentation}","v"),dt=new Intl.Segmenter(void 0,{granularity:"grapheme"}),br=new Set;for(let[,e]of Q.codes)br.add(e);function aa(e){return e>=Gs&&e<=qs||e===Hs||e===Vs}function ca(e){return e>=Ks&&e<=zs}function la(e){return e>=Ys&&e<=Js}function Fa(e){return e>=Xs&&e<=Zs}function da(e){return e>=Qs&&e<=ea}function j(e,u){return{token:{type:"control",code:e},endIndex:u}}function fa(e){if(sa.test(e))return!0;for(let u of e){let t=u.codePointAt(0);if(t===oa||t===ia)return!0}return!1}function Ar(e){let u=0;for(let t of e){let n=t.codePointAt(0);if(su(n))return 2;da(n)&&u++}return u>=1||fa(e)?2:1}function pa(e){return e.startsWith("\x9B")?"\x9B":`${ge}${Ft}`}function Le(e,u){return`${e}${u.join(";")}${Er}`}function ha(e){let u=[],t=pa(e),n;if(e.startsWith(`${ge}${Ft}`))n=e.slice(2,-1);else if(e.startsWith("\x9B"))n=e.slice(1,-1);else return u;let D=n.length===0?[String(cr)]:n.split(";"),r=0;for(;r<D.length;){let o=Number.parseInt(D[r],10);if(Number.isNaN(o)){r++;continue}if(o===cr){u.push({type:"reset"}),r++;continue}if(o===au||o===ua){let a=Number.parseInt(D[r+1],10);if(a===ta&&r+Da<D.length){let c=Le(t,D.slice(r,r+lr));u.push({type:"start",code:c,endCode:Q.color.ansi(o===au?ot:it)}),r+=lr;continue}if(a===na&&r+ra<D.length){let c=Le(t,D.slice(r,r+Fr));u.push({type:"start",code:c,endCode:Q.color.ansi(o===au?ot:it)}),r+=Fr;continue}let F=Le(t,[D[r]]);u.push({type:"start",code:F,endCode:Q.color.ansi(o===au?ot:it)}),r++;continue}if(br.has(o)){u.push({type:"end",endCode:Q.color.ansi(o)}),r++;continue}let i=Q.codes.get(o);if(i!==void 0){let a=Le(t,[D[r]]);u.push({type:"start",code:a,endCode:Q.color.ansi(i)}),r++;continue}let s=Le(t,[D[r]]);u.push({type:"start",code:s,endCode:Q.reset.open}),r++}return u.length===0&&u.push({type:"reset"}),u}function Ca(e,u){let t=e.codePointAt(u),n;if(t===Ne){if(e[u+1]!==Ft)return;n=u+2}else if(t===pr)n=u+1;else return;let D=!0;for(let r=n;r<e.length;r++){let o=e.codePointAt(r);if(Fa(o)){let s=e.slice(u,r+1);return e[r]!==Er||!D?j(s,r+1):{token:{type:"sgr",code:s,fragments:ha(s)},endIndex:r+1}}if(ca(o)){aa(o)||(D=!1);continue}if(la(o)){D=!1;continue}let i=r;return j(e.slice(u,i),i)}return j(e.slice(u),e.length)}function ga(e,u){let t,n,D=e.codePointAt(u);if(D===Ne&&e.startsWith(ct,u))t=ct,n=Ws;else if(D===Fu&&e.startsWith(lt,u))t=lt,n=js;else return;let r=e.indexOf(";",u+t.length);if(r===-1)return j(e.slice(u),e.length);for(let o=r+1;o<e.length;o++){let i=e[o];if(i===at){let s=e.slice(u,o+1),a=o===r+1?"close":"open";return{token:{type:"hyperlink",code:s,action:a,closePrefix:n,terminator:at},endIndex:o+1}}if(i===ge&&e[o+1]===cu){let s=e.slice(u,o+2),a=o===r+1?"close":"open";return{token:{type:"hyperlink",code:s,action:a,closePrefix:n,terminator:Br},endIndex:o+2}}if(i===lu){let s=e.slice(u,o+1),a=o===r+1?"close":"open";return{token:{type:"hyperlink",code:s,action:a,closePrefix:n,terminator:lu},endIndex:o+1}}}return j(e.slice(u),e.length)}function ma(e,u){let t=e.codePointAt(u),n,D=!1;switch(t){case Ne:{switch(e[u+1]){case mr:{n=u+2,D=!0;break}case Os:case Ls:case Ns:case $s:{n=u+2;break}case cu:return j(Br,u+2);default:return}break}case Fu:{n=u+1,D=!0;break}case dr:case fr:case Cr:case gr:{n=u+1;break}case hr:return j(lu,u+1);default:return}for(let r=n;r<e.length;r++){if(D&&e[r]===at)return j(e.slice(u,r+1),r+1);if(e[r]===ge&&e[r+1]===cu)return j(e.slice(u,r+2),r+2);if(e[r]===lu)return j(e.slice(u,r+1),r+1)}return j(e.slice(u),e.length)}function Ue(e,u){let t=e.codePointAt(u);if(t===Ne||t===Fu){let D=ga(e,u);if(D)return D}let n=ma(e,u);return n||Ca(e,u)}function yr(e,u,t){for(;u<e.length;){let n=e.codePointAt(u);if(!$e.has(n))break;let D=Ue(e,u);if(!D)break;t.push(D.token),u=D.endIndex}return u}function xr(e,u,t){let n=t.containing(u);if(!(!n||n.index!==u))return{token:{type:"character",value:n.segment,visibleWidth:Ar(n.segment),isGraphemeContinuation:!1},endIndex:u+n.segment.length}}function Ea(e){let u=[],t=0;for(;t<e.length;){let n=e.codePointAt(t);if($e.has(n)){let r=Ue(e,t);if(r){t=r.endIndex;continue}}let D=String.fromCodePoint(n);u.push({value:D,visibleWidth:1,isGraphemeContinuation:!1}),t+=D.length}return u}function Ba(e){if(e.length===0)return;let u=e.map(({value:r})=>r).join(""),t=[],n=0;for(let r of e)t.push(n),n+=r.value.length;let D=0;for(let r of dt.segment(u)){for(;D<e.length&&t[D]<r.index;)D++;let o=D,i=!0;for(;o<e.length&&t[o]<r.index+r.segment.length;)e[o].visibleWidth=i?Ar(r.segment):0,e[o].isGraphemeContinuation=!i,i=!1,o++;D=o}}function st(e,{endCharacter:u=Number.POSITIVE_INFINITY}={}){let t=[],n=Ea(e);Ba(n);let D=0,r=0,o=0;for(;D<e.length;){let i=e.codePointAt(D);if($e.has(i)){let f=Ue(e,D);if(f){t.push(f.token),D=f.endIndex;continue}}let s=String.fromCodePoint(i),a=n[r],F=su(i)?2:s.length;a&&(F=a.visibleWidth);let c={type:"character",value:s,visibleWidth:F,isGraphemeContinuation:a?a.isGraphemeContinuation:!1};if(t.push(c),D+=s.length,r++,o+=c.visibleWidth,o>=u){let f=n[r];if(!f||!f.isGraphemeContinuation){D=yr(e,D,t);break}}}return t}function Rr(e,u){let t=`${e}${u}`,n=e.length;for(let D of dt.segment(t)){if(D.index===n)return!1;if(D.index>n)return!0}return!0}function ba(e,u,t,n){if(!t)return!1;let D=u,r=!1;for(;D<e.length;){let o=e.codePointAt(D);if($e.has(o)){let s=Ue(e,D);if(s){r=!0,D=s.endIndex;continue}}if(!r)return!1;let i=xr(e,D,n);return i?Rr(t,i.token.value):!0}return!1}function ft(e,{endCharacter:u=Number.POSITIVE_INFINITY}={}){let t=[],n=dt.segment(e),D=0,r=0,o,i=!1;for(;D<e.length;){let s=e.codePointAt(D);if($e.has(s)){let F=Ue(e,D);if(F){t.push(F.token),D=F.endIndex,i=!0;continue}}let a=xr(e,D,n);if(!a)return st(e,{endCharacter:u});if(i&&o&&Rr(o,a.token.value))return st(e,{endCharacter:u});if(t.push(a.token),D=a.endIndex,r+=a.token.visibleWidth,i=!1,o=a.token.value,r>=u){if(ba(e,D,o,n))return st(e,{endCharacter:u});D=yr(e,D,t);break}}return t}function Aa(e,u){for(let t of u)switch(t.type){case"reset":{e.clear();break}case"end":{e.delete(t.endCode);break}case"start":{e.delete(t.endCode),e.set(t.endCode,t.code);break}default:break}return e}function ya(e){return[...e.keys()].toReversed().join("")}function xa(e){return`${e.closePrefix}${e.terminator}`}function Ra(e,u){let t=!1,n=!1;for(let D of e.fragments){if(D.type==="start"){t=!0;continue}if(D.type==="reset"&&u.size>0){n=!0;continue}D.type==="end"&&u.has(D.endCode)&&(n=!0)}return n&&!t}function wa(e){return e.fragments.some(u=>u.type==="start")}function wr(e){if(e.activeHyperlink&&!e.activeHyperlinkHasVisibleText&&e.activeHyperlinkOutputIndex!==void 0){let u=e.activeHyperlink.code.length;e.returnValue=e.returnValue.slice(0,e.activeHyperlinkOutputIndex)+e.returnValue.slice(e.activeHyperlinkOutputIndex+u),e.pendingSgrOutputIndex!==void 0&&e.pendingSgrOutputIndex>e.activeHyperlinkOutputIndex&&(e.pendingSgrOutputIndex-=u)}e.activeHyperlink=void 0,e.activeHyperlinkHasVisibleText=!1,e.activeHyperlinkOutputIndex=void 0}function ka(e){return e.isPastEnd&&!Ra(e.token,e.activeStyles)||(e.include&&wa(e.token)&&e.pendingSgrOutputIndex===void 0&&(e.pendingSgrOutputIndex=e.returnValue.length,e.pendingSgrActiveStyles=new Map(e.activeStyles)),e.activeStyles=Aa(e.activeStyles,e.token.fragments),e.include&&(e.returnValue+=e.token.code)),e}function Sa(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 wr(e),e;e.activeHyperlink=void 0,e.activeHyperlinkHasVisibleText=!1,e.activeHyperlinkOutputIndex=void 0}return e.include&&(e.returnValue+=e.token.code),e}function Ta(e){return!e.isPastEnd&&e.include&&(e.returnValue+=e.token.code),e}function _a(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 va={sgr:ka,hyperlink:Sa,control:Ta,character:_a};function Ia(e){let u=va[e.token.type];return u?u(e):e}function Ma(e){let u=Array.from({length:e.length},()=>!1),t=!1;for(let n=e.length-1;n>=0;n--){let D=e[n];u[n]=t,D.type==="character"&&(t=!!D.isGraphemeContinuation)}return u}function Pa(e,u,t){return t===void 0?!1:u>=t?!0:e.type==="character"&&!e.isGraphemeContinuation&&u+e.visibleWidth>t}function V(e,u,t){let n=ft(e,{endCharacter:t}),D=Ma(n),r=new Map,o,i=!1,s,a,F,c=0,f="",d=!1;for(let[l,C]of n.entries()){let h=Pa(C,c,t);if(h&&C.type!=="character"&&D[l]&&(h=!1),h&&C.type==="character"&&!C.isGraphemeContinuation){if(o&&!i){let p={activeHyperlink:o,activeHyperlinkHasVisibleText:i,activeHyperlinkOutputIndex:s,pendingSgrOutputIndex:a,returnValue:f};wr(p),{activeHyperlink:o,activeHyperlinkHasVisibleText:i,activeHyperlinkOutputIndex:s,pendingSgrOutputIndex:a,returnValue:f}=p}a!==void 0&&(f=f.slice(0,a),r=F,a=void 0,F=void 0);break}({activeStyles:r,activeHyperlink:o,activeHyperlinkHasVisibleText:i,activeHyperlinkOutputIndex:s,pendingSgrOutputIndex:a,pendingSgrActiveStyles:F,position:c,returnValue:f,include:d}=Ia({token:C,isPastEnd:h,start:u,activeStyles:r,activeHyperlink:o,activeHyperlinkHasVisibleText:i,activeHyperlinkOutputIndex:s,pendingSgrOutputIndex:a,pendingSgrActiveStyles:F,position:c,returnValue:f,include:d}))}return d?(o&&(f+=xa(o)),f+=ya(r),f):""}var Oa=new Intl.Segmenter,kr=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Mark}|\\p{Surrogate})+$","v"),La=new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+","v"),Na=new RegExp("^\\p{RGI_Emoji}$","v"),$a=/^[\d#*]\u20E3$/,Ua=new RegExp("\\p{Extended_Pictographic}","gu");function Wa(e){if(e.length>50)return!1;if($a.test(e))return!0;if(e.includes("\u200D")){let u=e.match(Ua);return u!==null&&u.length>=2}return!1}function ja(e){return e.replace(La,"")}function Ga(e){return kr.test(e)}function Sr(e){return e>=4352&&e<=4447||e>=43360&&e<=43388}function Tr(e){return e>=4448&&e<=4519||e>=55216&&e<=55238}function _r(e){return e>=4520&&e<=4607||e>=55243&&e<=55291}function qa(e){return Sr(e)||Tr(e)||_r(e)}function Ha(e,u){let t=[];for(let D of e)kr.test(D)||t.push(D.codePointAt(0));if(t.length===0)return;let n=0;for(let D=0;D<t.length;D++){let r=t[D];if(!qa(r)){if(n===0)return;for(let o=D;o<t.length;o++)n+=J(t[o],u);return n}if(Sr(r)&&Tr(t[D+1])){n+=2,D+=_r(t[D+2])?2:1;continue}n+=J(r,u)}return n}function Va(e,u){let t=0,n=!0;for(let D of e){if(n){n=!1;continue}D>="\uFF00"&&D<="\uFFEF"&&(t+=J(D.codePointAt(0),u))}return t}function G(e,u={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:t=!0,countAnsiEscapeCodes:n=!1}=u,D=e;if(!n&&(D.includes("\x1B")||D.includes("\x9B"))&&(D=Y(D)),D.length===0)return 0;if(/^[\u0020-\u007E]*$/.test(D))return D.length;let r=0,o={ambiguousAsWide:!t};for(let{segment:i}of Oa.segment(D)){if(Ga(i))continue;if(Na.test(i)||Wa(i)){r+=2;continue}let s=ja(i),a=Ha(s,o);if(a!==void 0){r+=a;continue}let F=s.codePointAt(0);r+=J(F,o),r+=Va(s,o)}return r}function du(e,u,t){if(e.charAt(u)===" ")return u;let n=t?1:-1;for(let D=0;D<=3;D++){let r=u+D*n;if(e.charAt(r)===" ")return r}return u}function me(e,u,t={}){let{position:n="end",space:D=!1,preferTruncationOnSpace:r=!1}=t,{truncationCharacter:o="\u2026"}=t;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof e}`);if(typeof u!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof u}`);if(u<1)return"";let i=G(e);if(i<=u)return e;if(u===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 h=C+2;for(;h<l.length&&a(l.codePointAt(h));)h++;if(h<l.length&&l.codePointAt(h)===s.LETTER_M){C=h+1;continue}break}return C}function c(l){let C=l.length;for(;C>1&&l.codePointAt(C-1)===s.LETTER_M;){let h=C-2;for(;h>=0&&a(l.codePointAt(h));)h--;if(h>=1&&l.codePointAt(h-1)===s.ESC&&l.codePointAt(h)===s.LEFT_BRACKET){C=h-1;continue}break}return C}function f(l,C){let h=c(l);return h===l.length?l+C:l.slice(0,h)+C+l.slice(h)}function d(l,C){let h=F(C);return h===0?l+C:C.slice(0,h)+l+C.slice(h)}if(n==="start"){if(r){let C=du(e,i-u+1,!0),h=V(e,C,i).trim();return d(o,h)}D&&(o+=" ");let l=V(e,i-u+G(o),i);return d(o,l)}if(n==="middle"){D&&(o=` ${o} `);let l=Math.floor(u/2);if(r){let C=du(e,l),h=du(e,i-(u-l)+1,!0);return V(e,0,C)+o+V(e,h,i).trim()}return V(e,0,l)+o+V(e,i-(u-l)+G(o),i)}if(n==="end"){if(r){let C=du(e,u-1),h=V(e,0,C);return f(h,o)}D&&(o=` ${o}`);let l=V(e,0,u-G(o));return f(l,o)}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${n}`)}var pt=300*60*1e3;function Ka(e,u=pt){if(e.length===0)return[];let t=[...e].sort((i,s)=>i.timestamp.localeCompare(s.timestamp)),n=[],D=null,r=0,o=Date.now();for(let i of t){let s=new Date(i.timestamp).getTime();(!D||s-r>=u)&&(r=s,D={id:i.timestamp,startTime:i.timestamp,endTime:new Date(s+u).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(D));let a=oe(i);D.inputTokens+=i.usage.input_tokens,D.outputTokens+=i.usage.output_tokens,D.cacheReadTokens+=i.usage.cache_read_input_tokens,D.cacheCreationTokens+=i.usage.cache_creation_input_tokens,D.totalTokens=D.inputTokens+D.outputTokens+D.cacheReadTokens+D.cacheCreationTokens,D.cost+=a.total,D.saved+=a.saved,D.requests+=1,D.actualEndTime=i.timestamp,D.models.includes(i.model)||D.models.push(i.model)}for(let i of n){let s=new Date(i.endTime).getTime();i.isActive=o<s}return n}function za(e,u=pt){return Ka(e,u).find(D=>D.isActive)??null}function vr(e,u=pt){let t=za(e,u);if(!t)return{block:null,windowMs:u,elapsedMs:0,remainingMs:0,progress:0,burnRatePerMin:0,costPerMin:0,projectedTotal:0,projectedCost:0};let n=Date.now(),D=new Date(t.startTime).getTime(),r=new Date(t.endTime).getTime(),o=n-D,i=Math.max(0,r-n),s=Math.min(1,o/u),a=o/6e4,F=a>0?t.totalTokens/a:0,c=a>0?t.cost/a:0,f=u/6e4;return{block:t,windowMs:u,elapsedMs:o,remainingMs:i,progress:s,burnRatePerMin:F,costPerMin:c,projectedTotal:F*f,projectedCost:c*f}}function Ir(e,u){let t=u.source==="all"?e:e.filter(h=>h.source===u.source);if(t.length===0)return{sessions:0,messages:0,totalTokens:0,activeDays:0,currentStreak:0,longestStreak:0,peakHour:-1,favoriteModel:null,heatmap:fu(),heatmapMax:0,tokenHeatmap:fu(),tokensSummed:0};let n=new Set,D=new Set,r=new Array(24).fill(0),o=new Map,i=fu(),s=fu(),a=0,F=0;for(let h of t){h.sessionId&&n.add(h.sessionId);let p=new Date(h.timestamp);if(Number.isNaN(p.getTime()))continue;let g=Ya(p);D.add(g);let B=p.getDay(),m=p.getHours();r[m]+=1,i[B][m]+=1,o.set(h.model,(o.get(h.model)??0)+1);let b=h.usage,k=b.input_tokens+b.output_tokens+b.cache_read_input_tokens+b.cache_creation_input_tokens;s[B][m]+=k,a+=k,F+=1}let c=Ja(r),f=Xa(o),{current:d,longest:l}=Za(D,u.streakWindowDays??365),C=0;for(let h of i)for(let p of h)p>C&&(C=p);return{sessions:n.size,messages:F,totalTokens:a,activeDays:D.size,currentStreak:d,longestStreak:l,peakHour:c,favoriteModel:f,heatmap:i,heatmapMax:C,tokenHeatmap:s,tokensSummed:a}}function fu(){return Array.from({length:7},()=>new Array(24).fill(0))}function Ya(e){let u=e.getFullYear(),t=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${u}-${t}-${n}`}function Ja(e){let u=-1,t=-1;for(let n=0;n<e.length;n+=1)e[n]>t&&(t=e[n],u=n);return u}function Xa(e){let u=null,t=-1;for(let[n,D]of e)D>t&&(u=n,t=D);return u}function Za(e,u){if(e.size===0)return{current:0,longest:0};let t=Array.from(e).map(c=>new Date(c+"T00:00:00").getTime()).filter(c=>Number.isFinite(c)).sort((c,f)=>c-f),n=1,D=1;for(let c=1;c<t.length;c+=1)t[c]-t[c-1]===864e5?(D+=1,D>n&&(n=D)):D=1;let r=Qa(Date.now()),o=t[t.length-1];if(r-o>864e5)return{current:0,longest:n};let i=o,s=0,a=0,F=new Set(t);for(;a<u&&F.has(i);)s+=1,i-=864e5,a+=1;return{current:s,longest:n}}function Qa(e){let u=new Date(e);return u.setHours(0,0,0,0),u.getTime()}var ee={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 Mr(e){let u=new Xe({level:e?3:0}),t=n=>e?D=>u.rgb(n[0],n[1],n[2])(D):D=>D;return{reset:e?"\x1B[0m":"",bold:n=>u.bold(n),dim:n=>u.dim(n),brand:t(ee.brand),green:t(ee.green),red:t(ee.red),yellow:t(ee.yellow),cyan:t(ee.cyan),input:t(ee.input),cacheWrite:t(ee.cacheWrite),cacheRead:t(ee.cacheRead),output:t(ee.output)}}function pu(e){return G(e)}function hu(e,u,t=" "){let n=u-G(e);return n>0?e+t.repeat(n):e}function Ee(e,u,t=" "){let n=u-G(e);return n>0?t.repeat(n)+e:e}function ht(e,u,t=" "){let n=u-G(e);if(n<=0)return e;let D=Math.floor(n/2),r=n-D;return t.repeat(D)+e+t.repeat(r)}var ec=["","\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u2588"];function Cu(e,u,t){if(u<=0||!Number.isFinite(e)||e<=0)return" ".repeat(Math.max(0,u));let D=Math.min(1,e)*u,r=Math.floor(D),o=D-r,i=Math.round(o*8),s="\u2588".repeat(r);i>0&&r<u&&(s+=ec[i]);let a=hu(s,u," ");return t?t(a):a}var uc=["\u2581","\u2582","\u2583","\u2584","\u2585","\u2586","\u2587","\u2588"];function We(e,u,t){if(u<=0)return"";if(e.length===0)return t?t("\u2500".repeat(u)):"\u2500".repeat(u);let n=[];if(e.length===u)n.push(...e);else if(e.length>u){let o=e.length/u;for(let i=0;i<u;i+=1){let s=Math.floor(i*o),a=Math.floor((i+1)*o),F=0,c=0;for(let f=s;f<Math.min(a,e.length);f+=1)F+=e[f],c+=1;n.push(c>0?F/c:0)}}else{let o=u-e.length;for(let i=0;i<o;i+=1)n.push(0);n.push(...e)}let D=Math.max(...n,0);if(D<=0){let o="\u2500".repeat(u);return t?t(o):o}let r=n.map(o=>uc[Math.min(7,Math.max(0,Math.round(o/D*7)))]).join("");return t?t(r):r}var tc=["","\u2581","\u2582","\u2583","\u2584","\u2585","\u2586","\u2587","\u2588"];function Pr(e,u,t){let n=new Array(u).fill(" ");if(u<=0||t<=0)return n;let D=e.reduce((F,c)=>F+Math.max(0,c.value),0);if(D<=0)return n;let r=D/t*u*8,o=u*8,i=Math.min(r,o),s=i,a=0;for(let F of e){if(F.value<=0||s<=0)continue;let c=Math.min(s,F.value/D*i),f=a,d=a+c,l=Math.floor(f/8),C=Math.min(u-1,Math.floor((d-1e-4)/8));for(let h=l;h<=C;h+=1){let p=h*8,g=Math.max(0,f-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=tc[Math.min(8,b)]||"\u2581"}else m="\u2588";n[u-1-h]=F.color?F.color(m):m}s-=c,a=d}return n}function Nr(e,u,t,n){let D=t.width??process.stdout.columns??100,r=t.color!==!1;X.level=r?3:0;let o=Mr(r);if(D<80)return[`[ccgauge] terminal width (${D}) is below the dashboard's 80-column floor.`,"Resize wider for the rich layout, or omit --dashboard for the standard report.","",...Ct(u,t).split(`
23
23
  `)].join(`
24
- `);let i=D-4,s=[];return t.banner!==!1&&(s.push(...uc(o,i,u)),s.push("")),s.push(...nc(o,i,e,u)),s.push(""),t.compact!==!0&&u.trend.length>0&&(s.push(...oc(o,i,u)),s.push("")),s.push(...ic(o,i,u)),s.push(""),s.push(...sc(o,i,n)),s.push(""),s.push(...ac(o,n,u,t)),s.map(a=>" "+a).join(`
25
- `)}function uc(e,u,t){let n=`${e.brand(e.bold("ccgauge"))} ${e.dim(I.line)} ${e.bold("dashboard")}`,D=e.dim([`range: ${t.range}`,`source: ${t.source}`,`by: ${t.by}`,`generated ${new Date(t.generatedAt).toLocaleString()}`].join(` ${I.bullet} `)),r=pu(n),o=pu(D),i=Math.max(2,u-r-o);return[`${n}${" ".repeat(i)}${D}`]}function tc(e,u){function t(r){return Tr(e.filter(o=>o.source===r),re(r).capabilities.blockWindowMs)}if(u==="claude")return t("claude");if(u==="codex")return t("codex");let n=t("claude");if(n.block)return n;let D=t("codex");return D.block?D:n}function nc(e,u,t,n){let D=n.totals,r=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=D.input+D.cacheRead+D.cacheWrite,F=a>0?D.cacheRead/a:0,c=tc(t.records,n.source),f=[{label:"Total tokens",value:e.bold(v(D.total)),sub:`${D.requests.toLocaleString()} reqs \xB7 ${D.turns.toLocaleString()} convs`,spark:We(r,14,e.input)},{label:"Cost",value:e.bold(N(D.cost)),sub:D.cost>0?`${N(D.cost/Math.max(1,D.requests))} / req`:"\u2014",spark:We(o,14,e.output)},{label:"Cache saved",value:e.bold(e.green(N(D.saved))),sub:"vs full input pricing",spark:We(i,14,e.green)},{label:"Cache hit",value:e.bold(e.green(de(F,0))),spark:Cu(F,14,e.green),sub:`${v(D.cacheRead)} cached`},{label:"Conversations",value:e.bold(D.turns.toLocaleString()),sub:D.requests>0?`${(D.requests/Math.max(1,D.turns)).toFixed(1)} reqs/turn`:"\u2014",spark:We(s,14,e.cacheRead)},{label:"Active 5h block",value:c?.block?e.bold(Kt(c.remainingMs)):e.dim("idle"),spark:c?.block?Cu(c.progress,14,e.yellow):void 0,sub:c?.block?`${de(c.progress,0)} elapsed`:"no active window"}];return Dc(f,e,u)}function Dc(e,u,t){let o=Math.max(1,Math.floor((t+1)/27)),i=[];for(let s=0;s<e.length;s+=o){let F=e.slice(s,s+o).map(c=>rc(c,22,u));i.push(...Lr(F,1).split(`
26
- `)),s+o<e.length&&i.push("")}return i}function rc(e,u,t){let n=u,D=[t.dim(e.label.toUpperCase()),"",me(e.value,n),e.spark?me(e.spark,n):"",t.dim(me(e.sub,n))].join(`
27
- `);return Yu(D,{padding:{top:0,right:1,bottom:0,left:1},borderStyle:"round",borderColor:"#5a5a64",width:u+4,textAlignment:"left"})}function Lr(e,u){let t=e.map(i=>i.split(`
24
+ `);let i=D-4,s=[];return t.banner!==!1&&(s.push(...nc(o,i,u)),s.push("")),s.push(...rc(o,i,e,u)),s.push(""),t.compact!==!0&&u.trend.length>0&&(s.push(...sc(o,i,u)),s.push("")),s.push(...ac(o,i,u)),s.push(""),s.push(...cc(o,i,n)),s.push(""),s.push(...lc(o,n,u,t)),s.map(a=>" "+a).join(`
25
+ `)}function nc(e,u,t){let n=`${e.brand(e.bold("ccgauge"))} ${e.dim(I.line)} ${e.bold("dashboard")}`,D=e.dim([`range: ${t.range}`,`source: ${t.source}`,`by: ${t.by}`,`generated ${new Date(t.generatedAt).toLocaleString()}`].join(` ${I.bullet} `)),r=pu(n),o=pu(D),i=Math.max(2,u-r-o);return[`${n}${" ".repeat(i)}${D}`]}function Dc(e,u){function t(r){return vr(e.filter(o=>o.source===r),re(r).capabilities.blockWindowMs)}if(u==="claude")return t("claude");if(u==="codex")return t("codex");let n=t("claude");if(n.block)return n;let D=t("codex");return D.block?D:n}function rc(e,u,t,n){let D=n.totals,r=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=D.input+D.cacheRead+D.cacheWrite,F=a>0?D.cacheRead/a:0,c=Dc(t.records,n.source),f=[{label:"Total tokens",value:e.bold(v(D.total)),sub:`${D.requests.toLocaleString()} reqs \xB7 ${D.turns.toLocaleString()} convs`,spark:We(r,14,e.input)},{label:"Cost",value:e.bold(N(D.cost)),sub:D.cost>0?`${N(D.cost/Math.max(1,D.requests))} / req`:"\u2014",spark:We(o,14,e.output)},{label:"Cache saved",value:e.bold(e.green(N(D.saved))),sub:"vs full input pricing",spark:We(i,14,e.green)},{label:"Cache hit",value:e.bold(e.green(de(F,0))),spark:Cu(F,14,e.green),sub:`${v(D.cacheRead)} cached`},{label:"Conversations",value:e.bold(D.turns.toLocaleString()),sub:D.requests>0?`${(D.requests/Math.max(1,D.turns)).toFixed(1)} reqs/turn`:"\u2014",spark:We(s,14,e.cacheRead)},{label:"Active 5h block",value:c?.block?e.bold(Jt(c.remainingMs)):e.dim("idle"),spark:c?.block?Cu(c.progress,14,e.yellow):void 0,sub:c?.block?`${de(c.progress,0)} elapsed`:"no active window"}];return oc(f,e,u)}function oc(e,u,t){let o=Math.max(1,Math.floor((t+1)/27)),i=[];for(let s=0;s<e.length;s+=o){let F=e.slice(s,s+o).map(c=>ic(c,22,u));i.push(...$r(F,1).split(`
26
+ `)),s+o<e.length&&i.push("")}return i}function ic(e,u,t){let n=u,D=[t.dim(e.label.toUpperCase()),"",me(e.value,n),e.spark?me(e.spark,n):"",t.dim(me(e.sub,n))].join(`
27
+ `);return Yu(D,{padding:{top:0,right:1,bottom:0,left:1},borderStyle:"round",borderColor:"#5a5a64",width:u+4,textAlignment:"left"})}function $r(e,u){let t=e.map(i=>i.split(`
28
28
  `)),n=Math.max(...t.map(i=>i.length)),D=t.map(i=>Math.max(...i.map(pu))),r=" ".repeat(u),o=[];for(let i=0;i<n;i+=1){let s=t.map((a,F)=>hu(a[i]??"",D[F]));o.push(s.join(r))}return o.join(`
29
- `)}function oc(e,u,t){let n=t.trend,D=10,r=Math.max(4,Math.min(8,Math.floor((u-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(`(${t.gran} ${I.bullet} stacked: input / cache-w / cache-r / output)`)}`,s=n.map(p=>Ir([{value:p.input,color:e.input},{value:p.cacheWrite,color:e.cacheWrite},{value:p.cacheRead,color:e.cacheRead},{value:p.output,color:e.output}],D,o)),a=[Ee(v(o),7),Ee(v(o/2),7),Ee("0",7)],F=p=>p===0?a[0]:p===Math.floor((D-1)/2)?a[1]:p===D-1?a[2]:" ".repeat(7),c=[i,""];for(let p=0;p<D;p+=1){let g=s.map(B=>ht(B[p],r));c.push(`${e.dim(F(p))} ${e.dim("\u2502")} ${g.join("")}`)}let f="\u2500".repeat(Math.min(u-9,r*n.length));c.push(`${" ".repeat(7)} ${e.dim("\u2514")}${e.dim(f)}`);let d=n[0]?.label??"",l=Math.max(1,Math.ceil((d.length+1)/r)),C=n.map((p,g)=>{if(g%l!==0)return" ".repeat(r);let B=r*Math.min(l,n.length-g);return ht(p.label,B)}),h="";for(let p=0;p<C.length;p+=1)p%l===0&&(h+=C[p]);return c.push(`${" ".repeat(8)} ${e.dim(h)}`),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 ic(e,u,t){let n=t.breakdown.slice(0,8),D=Math.floor((u-2)/2),r=Mr(e,D,`Top ${t.by}s by cost`,n,"cost",t.totals.cost),o=Mr(e,D,`Top ${t.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 Lr([r,o],2).split(`
30
- `)}function Mr(e,u,t,n,D,r){let o=`${e.brand(I.pointerSmall)} ${e.bold(t)}`;if(n.length===0)return[o,e.dim(" (no data in this window)")].join(`
31
- `);let i=new Pr.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=me(s.label,Math.max(8,u-40)),c=D==="cost"?s.cost/Math.max(1e-9,r):s.turns/Math.max(1e-9,r),f=Math.max(8,Math.min(24,u-40)),d=Cu(c,f,e.brand);i.push([String(a+1),`${F}
29
+ `)}function sc(e,u,t){let n=t.trend,D=10,r=Math.max(4,Math.min(8,Math.floor((u-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(`(${t.gran} ${I.bullet} stacked: input / cache-w / cache-r / output)`)}`,s=n.map(p=>Pr([{value:p.input,color:e.input},{value:p.cacheWrite,color:e.cacheWrite},{value:p.cacheRead,color:e.cacheRead},{value:p.output,color:e.output}],D,o)),a=[Ee(v(o),7),Ee(v(o/2),7),Ee("0",7)],F=p=>p===0?a[0]:p===Math.floor((D-1)/2)?a[1]:p===D-1?a[2]:" ".repeat(7),c=[i,""];for(let p=0;p<D;p+=1){let g=s.map(B=>ht(B[p],r));c.push(`${e.dim(F(p))} ${e.dim("\u2502")} ${g.join("")}`)}let f="\u2500".repeat(Math.min(u-9,r*n.length));c.push(`${" ".repeat(7)} ${e.dim("\u2514")}${e.dim(f)}`);let d=n[0]?.label??"",l=Math.max(1,Math.ceil((d.length+1)/r)),C=n.map((p,g)=>{if(g%l!==0)return" ".repeat(r);let B=r*Math.min(l,n.length-g);return ht(p.label,B)}),h="";for(let p=0;p<C.length;p+=1)p%l===0&&(h+=C[p]);return c.push(`${" ".repeat(8)} ${e.dim(h)}`),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 ac(e,u,t){let n=t.breakdown.slice(0,8),D=Math.floor((u-2)/2),r=Or(e,D,`Top ${t.by}s by cost`,n,"cost",t.totals.cost),o=Or(e,D,`Top ${t.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 $r([r,o],2).split(`
30
+ `)}function Or(e,u,t,n,D,r){let o=`${e.brand(I.pointerSmall)} ${e.bold(t)}`;if(n.length===0)return[o,e.dim(" (no data in this window)")].join(`
31
+ `);let i=new Lr.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=me(s.label,Math.max(8,u-40)),c=D==="cost"?s.cost/Math.max(1e-9,r):s.turns/Math.max(1e-9,r),f=Math.max(8,Math.min(24,u-40)),d=Cu(c,f,e.brand);i.push([String(a+1),`${F}
32
32
  ${d}`,s.turns.toLocaleString(),s.requests.toLocaleString(),v(s.tokens),N(s.cost)])}),[o,"",i.toString()].join(`
33
- `)}function sc(e,u,t){let n=_r(t,{source:"all"}),D=n.heatmap,r=n.heatmapMax;if(r===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 f=c/r;return f<.2?e.input("\u2591"):f<.4?e.input("\u2592"):f<.6?e.cacheRead("\u2592"):f<.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,f)=>Ee(String(f),2)).join(" "),F=[s,"",e.dim(a)];for(let c=0;c<7;c+=1){let f=(c+1)%7,l=(D[f]??new Array(24).fill(0)).map(C=>Ee(i(C),2)).join(" ");F.push(`${e.dim(hu(o[c],4))} ${l}`)}return F}function ac(e,u,t,n){let D=[];if(n.model&&D.push(`model~${n.model}`),n.project&&D.push(`project~${n.project}`),t.fromIso||t.untilIso){let o=`${t.fromIso?.slice(0,10)??"\u2026"} \u2192 ${t.untilIso?.slice(0,10)??"\u2026"}`;D.push(o)}let r=[`range: ${t.range}`,`source: ${t.source}`,`scope: ${u.length.toLocaleString()} records \xB7 ${t.totals.turns.toLocaleString()} conversations`];return D.length>0&&r.push(`filters: ${D.join(", ")}`),[e.dim(r.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 mt=["today","1d","7d","30d","90d","all"],Ur=["model","project","session"],cc=/^(\d{4})-(\d{2})-(\d{2})$/,lc={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 rd(e){let u=dc(e),t=await Vt(),n=u.source==="all"?Au:[u.source],D=hc(t,n,u);if(u.json)return JSON.stringify(D,null,2);if(u.dashboard){let r=Fc(t,n,u);return Or(t,D,u,r)}return Ct(D,u)}function Fc(e,u,t){let n=Et(t),D=n.from?.toISOString(),r=n.until?.toISOString(),o=new Set(u),i=t.model?.toLowerCase(),s=t.project?.toLowerCase();return e.records.filter(a=>{if(!o.has(a.source)||D&&a.timestamp<D||r&&a.timestamp>r||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 dc(e){let u={...lc,...e};if(!fc(u.range))throw new Error(je("range",u.range,mt));if(u.source!=="all"&&!Ot(u.source))throw new Error(je("source",u.source,["claude","codex","all"]));if(!pc(u.by))throw new Error(je("by",u.by,Ur));if(!Zt(u.gran))throw new Error(je("gran",u.gran,["hour","day","week","month"]));u.since&&mu(u.since,"since"),u.until&&mu(u.until,"until");let t=Et(u);if(t.from&&t.until&&t.from.getTime()>t.until.getTime())throw new Error("invalid date range: --since must be before or equal to --until");return u}function fc(e){return typeof e=="string"&&mt.includes(e)}function pc(e){return typeof e=="string"&&Ur.includes(e)}function je(e,u,t){return`invalid ${e}: ${JSON.stringify(u)}. Expected one of: ${t.join(", ")}`}function hc(e,u,t){let n=e.records,D=Et(t),r={from:D.from??void 0,to:D.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 u){let c={...r,source:F},f=n.filter(p=>gu(p,c,t)),d=nn(f,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 f)o.reasoning+=p.usage.reasoning_tokens??0;let l=Re(f,e.userRecords,e.parentMap);o.turns+=l.size;let C=new Map;for(let p of l.values()){let{key:g}=ku(p.firstTimestamp,t.gran);C.set(g,(C.get(g)??0)+1)}let h=Qt(f,t.gran,c);for(let p of h){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(([F],[c])=>F.localeCompare(c)).map(([,F])=>F),a=Cc(e,u,r,t);return{generatedAt:new Date().toISOString(),range:t.range,source:t.source,by:t.by,gran:t.gran,fromIso:D.from?.toISOString()??null,untilIso:D.until?.toISOString()??null,totals:o,trend:s,breakdown:a}}function Cc(e,u,t,n){let D=e.records;if(n.by==="model"){let o=[];for(let i of u){let s={...t,source:i},a=D.filter(d=>gu(d,s,n)),F=en(a,s),c=re(i),f=new Map;for(let d of Re(a,e.userRecords,e.parentMap).values())f.set(d.firstModel,(f.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:f.get(d.model)??0,tokens:d.totalTokens,cost:d.cost,share:0,sub:d.model})}return gt(o,n.limit)}if(n.by==="project"){let o=[];for(let i of u){let s={...t,source:i},a=D.filter(f=>gu(f,s,n)),F=un(a,s),c=new Map;for(let f of Re(a,e.userRecords,e.parentMap).values()){let d=f.cwd||"(unknown)";c.set(d,(c.get(d)??0)+1)}for(let f of F)o.push({key:`${i}::${f.cwd}`,label:f.projectName,requests:f.requests,turns:c.get(f.cwd)??0,tokens:f.totalTokens,cost:f.cost,share:0,sub:f.cwd})}return gt(o,n.limit)}let r=[];for(let o of u){let i={...t,source:o},s=D.filter(c=>gu(c,i,n)),a=tn(s,[],i),F=new Map;for(let c of Re(s,e.userRecords,e.parentMap).values())F.set(c.sessionId,(F.get(c.sessionId)??0)+1);for(let c of a)r.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 gt(r,n.limit)}function gt(e,u){let t=e.reduce((D,r)=>D+r.cost,0);e.sort((D,r)=>r.cost-D.cost);let n=e.slice(0,Math.max(1,u));if(t>0)for(let D of n)D.share=D.cost/t;return n}function gu(e,u,t){if(e.source!==u.source||u.from&&e.timestamp<u.from.toISOString()||u.to&&e.timestamp>u.to.toISOString()||t.model&&!e.model.toLowerCase().includes(t.model.toLowerCase()))return!1;if(t.project){let n=t.project.toLowerCase(),D=(e.cwd||"").toLowerCase(),r=D.split(/[/\\]+/).pop()??"";if(!D.includes(n)&&!r.includes(n))return!1}return!0}function Et(e){if(e.since||e.until)return{from:e.since?mu(e.since,"since"):null,until:e.until?mu(e.until,"until"):null};let u=e.range==="today"?"1d":e.range;if(!Dn(u))throw new Error(je("range",e.range,mt));let t=rn(u);return{from:t.from??null,until:t.to??null}}function mu(e,u){let t=e.match(cc);if(t){let D=Number(t[1]),r=Number(t[2]),o=Number(t[3]),i=u==="since"?new Date(D,r-1,o,0,0,0,0):new Date(D,r-1,o,23,59,59,999);if(i.getFullYear()!==D||i.getMonth()!==r-1||i.getDate()!==o)throw new Error(`invalid ${u} date: ${e}`);return i}let n=new Date(e);if(Number.isNaN(n.getTime()))throw new Error(`invalid ${u} date: ${e}`);return n}function gc(e){let u=t=>n=>e?`\x1B[${t}m${n}\x1B[0m`:String(n);return{bold:u("1"),dim:u("2"),cyan:u("36"),green:u("32"),yellow:u("33"),red:u("31"),blue:u("34"),magenta:u("35"),brand:u("38;2;129;140;248")}}function Ct(e,u){let t=gc(u.color!==!1),n=[],D=new Date(e.generatedAt).toLocaleString();n.push(""),n.push(`${t.brand(t.bold("ccgauge"))} ${t.bold("report")}`),n.push(t.dim([`range: ${e.range}`,`source: ${e.source}`,`by: ${e.by}`,`gran: ${e.gran}`,`generated ${D}`].join(" \xB7 "))),n.push(""),n.push(t.brand("\u25B8")+" "+t.bold("Tokens"));let r=e.totals,o=[["Input",v(r.input),"Output",v(r.output)],["Cache R",t.green(v(r.cacheRead)),"Cache W",v(r.cacheWrite)]];r.reasoning>0&&o.push(["Reasoning",t.dim(v(r.reasoning)),"",""]),o.push(["Total",t.bold(v(r.total)),"",""]),o.push(["Convos",t.bold(r.turns.toLocaleString()),"Requests",r.requests.toLocaleString()]),n.push(Nr(o,t)),n.push(""),n.push(t.brand("\u25B8")+" "+t.bold("Cost"));let i=r.input+r.cacheRead+r.cacheWrite,s=i>0?r.cacheRead/i:0,a=r.requests>0?r.cost/r.requests:0,F=[["Total",t.bold(N(r.cost)),"Saved by cache",t.green(N(r.saved))],["Avg / request",a<.01?`$${a.toFixed(4)}`:N(a),"Cache hit",t.green(de(s,1))]];if(n.push(Nr(F,t)),n.push(""),u.showTrend!==!1&&e.trend.length>0){n.push(t.brand("\u25B8")+" "+t.bold("Trend")+" "+t.dim(`(${u.gran}, by cost)`));let c=Math.max(...e.trend.map(l=>l.cost),1e-9),f=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=Ec(l.cost/c,44),h=l.label.padEnd(f),p=N(l.cost).padStart(d);n.push(` ${t.dim(h)} ${p} ${t.brand(C)}`)}n.push("")}if(u.showBreakdown!==!1&&e.breakdown.length>0){let c=e.by[0].toUpperCase()+e.by.slice(1);n.push(t.brand("\u25B8")+" "+t.bold(`Top ${e.breakdown.length} ${c}s`)+" "+t.dim("(by cost)"));let f=["#",c,"Convos","Reqs","Tokens","Cost","Share"],d=e.breakdown.map((l,C)=>[String(C+1),Ac(l.label,28),l.turns.toLocaleString(),l.requests.toLocaleString(),v(l.tokens),N(l.cost),de(l.share,1)]);n.push(mc(f,d,t,[!1,!1,!0,!0,!0,!0,!0])),n.push("")}return n.join(`
34
- `)}function Nr(e,u){let t=[0,0,0,0];for(let D of e)for(let r=0;r<4;r+=1){let o=D[r];qe(o)>t[r]&&(t[r]=qe(o))}let n=[];for(let[D,r,o,i]of e){let s=`${u.dim(Ge(D,t[0]))} ${Ge(r,t[1])}`,a=o?`${u.dim(Ge(o,t[2]))} ${i}`:"";n.push(` ${s} ${a}`.replace(/\s+$/,""))}return n.join(`
35
- `)}function mc(e,u,t,n){let D=e.map((s,a)=>Math.max(s.length,...u.map(F=>qe(F[a]??"")))),r=" "+e.map((s,a)=>n[a]?$r(s,D[a]):Ge(s,D[a])).map(s=>t.dim(s)).join(" "),o=" "+D.map(s=>"\u2500".repeat(s)).map(s=>t.dim(s)).join(" "),i=u.map(s=>" "+s.map((a,F)=>n[F]?$r(a,D[F]):Ge(a,D[F])).join(" "));return[r,o,...i].join(`
36
- `)}function Ec(e,u){let t=Math.max(0,Math.min(1,e)),n=Math.round(t*u);return"\u2587".repeat(n)+"\u2500".repeat(u-n)}var Bc="\x1B",bc=new RegExp(Bc+"\\[[0-9;]*m","g");function qe(e){return e.replace(bc,"").length}function Ge(e,u){return e+" ".repeat(Math.max(0,u-qe(e)))}function $r(e,u){return" ".repeat(Math.max(0,u-qe(e)))+e}function Ac(e,u){return e.length<=u?e:e.slice(0,u-1)+"\u2026"}export{lc as DEFAULT_REPORT,Fc as filterRecordsForReport,Ct as renderText,rd as runReport};
33
+ `)}function cc(e,u,t){let n=Ir(t,{source:"all"}),D=n.heatmap,r=n.heatmapMax;if(r===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 f=c/r;return f<.2?e.input("\u2591"):f<.4?e.input("\u2592"):f<.6?e.cacheRead("\u2592"):f<.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,f)=>Ee(String(f),2)).join(" "),F=[s,"",e.dim(a)];for(let c=0;c<7;c+=1){let f=(c+1)%7,l=(D[f]??new Array(24).fill(0)).map(C=>Ee(i(C),2)).join(" ");F.push(`${e.dim(hu(o[c],4))} ${l}`)}return F}function lc(e,u,t,n){let D=[];if(n.model&&D.push(`model~${n.model}`),n.project&&D.push(`project~${n.project}`),t.fromIso||t.untilIso){let o=`${t.fromIso?.slice(0,10)??"\u2026"} \u2192 ${t.untilIso?.slice(0,10)??"\u2026"}`;D.push(o)}let r=[`range: ${t.range}`,`source: ${t.source}`,`scope: ${u.length.toLocaleString()} records \xB7 ${t.totals.turns.toLocaleString()} conversations`];return D.length>0&&r.push(`filters: ${D.join(", ")}`),[e.dim(r.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 mt=["today","1d","7d","30d","90d","all"],jr=["model","project","session"],Fc=/^(\d{4})-(\d{2})-(\d{2})$/,dc={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 id(e){let u=pc(e),t=await zt(),n=u.source==="all"?Au:[u.source],D=gc(t,n,u);if(u.json)return JSON.stringify(D,null,2);if(u.dashboard){let r=fc(t,n,u);return Nr(t,D,u,r)}return Ct(D,u)}function fc(e,u,t){let n=Et(t),D=n.from?.toISOString(),r=n.until?.toISOString(),o=new Set(u),i=t.model?.toLowerCase(),s=t.project?.toLowerCase();return e.records.filter(a=>{if(!o.has(a.source)||D&&a.timestamp<D||r&&a.timestamp>r||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 pc(e){let u={...dc,...e};if(!hc(u.range))throw new Error(je("range",u.range,mt));if(u.source!=="all"&&!Ot(u.source))throw new Error(je("source",u.source,["claude","codex","all"]));if(!Cc(u.by))throw new Error(je("by",u.by,jr));if(!en(u.gran))throw new Error(je("gran",u.gran,["hour","day","week","month"]));u.since&&mu(u.since,"since"),u.until&&mu(u.until,"until");let t=Et(u);if(t.from&&t.until&&t.from.getTime()>t.until.getTime())throw new Error("invalid date range: --since must be before or equal to --until");return u}function hc(e){return typeof e=="string"&&mt.includes(e)}function Cc(e){return typeof e=="string"&&jr.includes(e)}function je(e,u,t){return`invalid ${e}: ${JSON.stringify(u)}. Expected one of: ${t.join(", ")}`}function gc(e,u,t){let n=e.records,D=Et(t),r={from:D.from??void 0,to:D.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 u){let c={...r,source:F},f=n.filter(p=>gu(p,c,t)),d=rn(f,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 f)o.reasoning+=p.usage.reasoning_tokens??0;let l=Re(f,e.userRecords,e.parentMap);o.turns+=l.size;let C=new Map;for(let p of l.values()){let{key:g}=ku(p.firstTimestamp,t.gran);C.set(g,(C.get(g)??0)+1)}let h=un(f,t.gran,c);for(let p of h){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(([F],[c])=>F.localeCompare(c)).map(([,F])=>F),a=mc(e,u,r,t);return{generatedAt:new Date().toISOString(),range:t.range,source:t.source,by:t.by,gran:t.gran,fromIso:D.from?.toISOString()??null,untilIso:D.until?.toISOString()??null,totals:o,trend:s,breakdown:a}}function mc(e,u,t,n){let D=e.records;if(n.by==="model"){let o=[];for(let i of u){let s={...t,source:i},a=D.filter(d=>gu(d,s,n)),F=tn(a,s),c=re(i),f=new Map;for(let d of Re(a,e.userRecords,e.parentMap).values())f.set(d.firstModel,(f.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:f.get(d.model)??0,tokens:d.totalTokens,cost:d.cost,share:0,sub:d.model})}return gt(o,n.limit)}if(n.by==="project"){let o=[];for(let i of u){let s={...t,source:i},a=D.filter(f=>gu(f,s,n)),F=nn(a,s),c=new Map;for(let f of Re(a,e.userRecords,e.parentMap).values()){let d=f.cwd||"(unknown)";c.set(d,(c.get(d)??0)+1)}for(let f of F)o.push({key:`${i}::${f.cwd}`,label:f.projectName,requests:f.requests,turns:c.get(f.cwd)??0,tokens:f.totalTokens,cost:f.cost,share:0,sub:f.cwd})}return gt(o,n.limit)}let r=[];for(let o of u){let i={...t,source:o},s=D.filter(c=>gu(c,i,n)),a=Dn(s,[],i),F=new Map;for(let c of Re(s,e.userRecords,e.parentMap).values())F.set(c.sessionId,(F.get(c.sessionId)??0)+1);for(let c of a)r.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 gt(r,n.limit)}function gt(e,u){let t=e.reduce((D,r)=>D+r.cost,0);e.sort((D,r)=>r.cost-D.cost);let n=e.slice(0,Math.max(1,u));if(t>0)for(let D of n)D.share=D.cost/t;return n}function gu(e,u,t){if(e.source!==u.source||u.from&&e.timestamp<u.from.toISOString()||u.to&&e.timestamp>u.to.toISOString()||t.model&&!e.model.toLowerCase().includes(t.model.toLowerCase()))return!1;if(t.project){let n=t.project.toLowerCase(),D=(e.cwd||"").toLowerCase(),r=D.split(/[/\\]+/).pop()??"";if(!D.includes(n)&&!r.includes(n))return!1}return!0}function Et(e){if(e.since||e.until)return{from:e.since?mu(e.since,"since"):null,until:e.until?mu(e.until,"until"):null};let u=e.range==="today"?"1d":e.range;if(!on(u))throw new Error(je("range",e.range,mt));let t=sn(u);return{from:t.from??null,until:t.to??null}}function mu(e,u){let t=e.match(Fc);if(t){let D=Number(t[1]),r=Number(t[2]),o=Number(t[3]),i=u==="since"?new Date(D,r-1,o,0,0,0,0):new Date(D,r-1,o,23,59,59,999);if(i.getFullYear()!==D||i.getMonth()!==r-1||i.getDate()!==o)throw new Error(`invalid ${u} date: ${e}`);return i}let n=new Date(e);if(Number.isNaN(n.getTime()))throw new Error(`invalid ${u} date: ${e}`);return n}function Ec(e){let u=t=>n=>e?`\x1B[${t}m${n}\x1B[0m`:String(n);return{bold:u("1"),dim:u("2"),cyan:u("36"),green:u("32"),yellow:u("33"),red:u("31"),blue:u("34"),magenta:u("35"),brand:u("38;2;129;140;248")}}function Ct(e,u){let t=Ec(u.color!==!1),n=[],D=new Date(e.generatedAt).toLocaleString();n.push(""),n.push(`${t.brand(t.bold("ccgauge"))} ${t.bold("report")}`),n.push(t.dim([`range: ${e.range}`,`source: ${e.source}`,`by: ${e.by}`,`gran: ${e.gran}`,`generated ${D}`].join(" \xB7 "))),n.push(""),n.push(t.brand("\u25B8")+" "+t.bold("Tokens"));let r=e.totals,o=[["Input",v(r.input),"Output",v(r.output)],["Cache R",t.green(v(r.cacheRead)),"Cache W",v(r.cacheWrite)]];r.reasoning>0&&o.push(["Reasoning",t.dim(v(r.reasoning)),"",""]),o.push(["Total",t.bold(v(r.total)),"",""]),o.push(["Convos",t.bold(r.turns.toLocaleString()),"Requests",r.requests.toLocaleString()]),n.push(Ur(o,t)),n.push(""),n.push(t.brand("\u25B8")+" "+t.bold("Cost"));let i=r.input+r.cacheRead+r.cacheWrite,s=i>0?r.cacheRead/i:0,a=r.requests>0?r.cost/r.requests:0,F=[["Total",t.bold(N(r.cost)),"Saved by cache",t.green(N(r.saved))],["Avg / request",a<.01?`$${a.toFixed(4)}`:N(a),"Cache hit",t.green(de(s,1))]];if(n.push(Ur(F,t)),n.push(""),u.showTrend!==!1&&e.trend.length>0){n.push(t.brand("\u25B8")+" "+t.bold("Trend")+" "+t.dim(`(${u.gran}, by cost)`));let c=Math.max(...e.trend.map(l=>l.cost),1e-9),f=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=bc(l.cost/c,44),h=l.label.padEnd(f),p=N(l.cost).padStart(d);n.push(` ${t.dim(h)} ${p} ${t.brand(C)}`)}n.push("")}if(u.showBreakdown!==!1&&e.breakdown.length>0){let c=e.by[0].toUpperCase()+e.by.slice(1);n.push(t.brand("\u25B8")+" "+t.bold(`Top ${e.breakdown.length} ${c}s`)+" "+t.dim("(by cost)"));let f=["#",c,"Convos","Reqs","Tokens","Cost","Share"],d=e.breakdown.map((l,C)=>[String(C+1),xc(l.label,28),l.turns.toLocaleString(),l.requests.toLocaleString(),v(l.tokens),N(l.cost),de(l.share,1)]);n.push(Bc(f,d,t,[!1,!1,!0,!0,!0,!0,!0])),n.push("")}return n.join(`
34
+ `)}function Ur(e,u){let t=[0,0,0,0];for(let D of e)for(let r=0;r<4;r+=1){let o=D[r];qe(o)>t[r]&&(t[r]=qe(o))}let n=[];for(let[D,r,o,i]of e){let s=`${u.dim(Ge(D,t[0]))} ${Ge(r,t[1])}`,a=o?`${u.dim(Ge(o,t[2]))} ${i}`:"";n.push(` ${s} ${a}`.replace(/\s+$/,""))}return n.join(`
35
+ `)}function Bc(e,u,t,n){let D=e.map((s,a)=>Math.max(s.length,...u.map(F=>qe(F[a]??"")))),r=" "+e.map((s,a)=>n[a]?Wr(s,D[a]):Ge(s,D[a])).map(s=>t.dim(s)).join(" "),o=" "+D.map(s=>"\u2500".repeat(s)).map(s=>t.dim(s)).join(" "),i=u.map(s=>" "+s.map((a,F)=>n[F]?Wr(a,D[F]):Ge(a,D[F])).join(" "));return[r,o,...i].join(`
36
+ `)}function bc(e,u){let t=Math.max(0,Math.min(1,e)),n=Math.round(t*u);return"\u2587".repeat(n)+"\u2500".repeat(u-n)}var Ac="\x1B",yc=new RegExp(Ac+"\\[[0-9;]*m","g");function qe(e){return e.replace(yc,"").length}function Ge(e,u){return e+" ".repeat(Math.max(0,u-qe(e)))}function Wr(e,u){return" ".repeat(Math.max(0,u-qe(e)))+e}function xc(e,u){return e.length<=u?e:e.slice(0,u-1)+"\u2026"}export{dc as DEFAULT_REPORT,fc as filterRecordsForReport,Ct as renderText,id as runReport};