@kilocode/cli-darwin-arm64 7.5.16 → 7.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/bin/console/assets/AgentsRoute-CM6fw2cq.js +3 -0
  2. package/bin/console/assets/CliNotificationsRoute-BczmRSyg.js +1 -0
  3. package/bin/console/assets/CliUiRoute-CY-IjU1R.js +1 -0
  4. package/bin/console/assets/ConfigLayout-BnoOuJ0J.js +1 -0
  5. package/bin/console/assets/ConfigLayout-DjHPFaCq.css +1 -0
  6. package/bin/console/assets/ConfigPage-CF46-J2f.js +1 -0
  7. package/bin/console/assets/ConfirmDialog-BxeZcJR2.js +1 -0
  8. package/bin/console/assets/ConsoleUiRoute-BrZ2QFr6.js +1 -0
  9. package/bin/console/assets/CustomSelect-Bv8ga_sb.js +1 -0
  10. package/bin/console/assets/FormattersRoute-5K8HEXB2.css +1 -0
  11. package/bin/console/assets/FormattersRoute-CuG-ehXq.js +3 -0
  12. package/bin/console/assets/GhosttyTerminal-DOfViera.js +13 -0
  13. package/bin/console/assets/IndexingRoute-D0nIx9Pv.css +1 -0
  14. package/bin/console/assets/IndexingRoute-QzgacqGk.js +1 -0
  15. package/bin/console/assets/KeybindsRoute-BSo2-u5g.js +1 -0
  16. package/bin/console/assets/KeybindsRoute-DPP8xngh.css +1 -0
  17. package/bin/console/assets/LoginRoute-BvXKCbLf.js +1 -0
  18. package/bin/console/assets/McpRoute-D-Grz23A.js +138 -0
  19. package/bin/console/assets/McpRoute-D22Npdv0.css +1 -0
  20. package/bin/console/assets/ModelsRoute-Dk1uAzWQ.css +1 -0
  21. package/bin/console/assets/ModelsRoute-FzKm3GFg.js +1 -0
  22. package/bin/console/assets/OverviewRoute-DzMpRpg0.js +1 -0
  23. package/bin/console/assets/OverviewRoute-neFLWBjP.css +1 -0
  24. package/bin/console/assets/PermissionsRoute-BIjHuwFU.css +1 -0
  25. package/bin/console/assets/PermissionsRoute-D79Jf9T-.js +1 -0
  26. package/bin/console/assets/ProfileRoute-DY1DmDkk.js +1 -0
  27. package/bin/console/assets/ProjectConsoleRoute-B2CEEUWZ.js +4 -0
  28. package/bin/console/assets/ProjectConsoleRoute-Df0w2iOW.css +1 -0
  29. package/bin/console/assets/ProvidersRoute-jdHnKSmI.js +5 -0
  30. package/bin/console/assets/ServersRoute-BBRszzTY.css +1 -0
  31. package/bin/console/assets/ServersRoute-CLKvecV4.js +1 -0
  32. package/bin/console/assets/SourcesRoute-DIzmjUWT.js +1 -0
  33. package/bin/console/assets/SourcesRoute-DMunRt3T.css +1 -0
  34. package/bin/console/assets/ToolsRoute-Br8SrorE.js +1 -0
  35. package/bin/console/assets/agents-tools-DXx49OgX.css +1 -0
  36. package/bin/console/assets/button-DUESCiL9.js +1 -0
  37. package/bin/console/assets/cli-ui-DymkjzY0.css +1 -0
  38. package/bin/console/assets/config-rLoO0LDc.js +1 -0
  39. package/bin/console/assets/console-D_ICjwvI.js +1 -0
  40. package/bin/console/assets/dialogs-BCnEWnpn.css +1 -0
  41. package/bin/console/assets/file-PqLbqN2Z.js +649 -0
  42. package/bin/console/assets/index-5EVEMIHJ.css +1 -0
  43. package/bin/console/assets/index-aE_EEdSy.js +19 -0
  44. package/bin/console/assets/models-CkIsKFzm.css +1 -0
  45. package/bin/console/assets/models-wZrb2WKp.js +1 -0
  46. package/bin/console/assets/profile-Do_gK9qi.css +1 -0
  47. package/bin/console/assets/profile-tmBfOA4S.js +1 -0
  48. package/bin/console/assets/session-review-DUVNnuDV.js +30 -0
  49. package/bin/console/assets/tag-CWrSVrX3.js +1 -0
  50. package/bin/console/assets/ui-hTWDRfzG.js +1 -0
  51. package/bin/console/index.html +2 -2
  52. package/bin/kilo +0 -0
  53. package/package.json +1 -1
  54. package/bin/console/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  55. package/bin/console/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  56. package/bin/console/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  57. package/bin/console/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  58. package/bin/console/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  59. package/bin/console/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  60. package/bin/console/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  61. package/bin/console/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  62. package/bin/console/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  63. package/bin/console/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  64. package/bin/console/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  65. package/bin/console/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  66. package/bin/console/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  67. package/bin/console/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  68. package/bin/console/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  69. package/bin/console/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  70. package/bin/console/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  71. package/bin/console/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  72. package/bin/console/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  73. package/bin/console/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  74. package/bin/console/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  75. package/bin/console/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  76. package/bin/console/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  77. package/bin/console/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  78. package/bin/console/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  79. package/bin/console/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  80. package/bin/console/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  81. package/bin/console/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  82. package/bin/console/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  83. package/bin/console/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  84. package/bin/console/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  85. package/bin/console/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  86. package/bin/console/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  87. package/bin/console/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  88. package/bin/console/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  89. package/bin/console/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  90. package/bin/console/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  91. package/bin/console/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  92. package/bin/console/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  93. package/bin/console/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  94. package/bin/console/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  95. package/bin/console/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  96. package/bin/console/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  97. package/bin/console/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  98. package/bin/console/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  99. package/bin/console/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  100. package/bin/console/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  101. package/bin/console/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  102. package/bin/console/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  103. package/bin/console/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  104. package/bin/console/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  105. package/bin/console/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  106. package/bin/console/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  107. package/bin/console/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  108. package/bin/console/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  109. package/bin/console/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  110. package/bin/console/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  111. package/bin/console/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  112. package/bin/console/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  113. package/bin/console/assets/index-B2oknisZ.css +0 -1
  114. package/bin/console/assets/index-oVVWPmdA.js +0 -857
  115. package/bin/console/logo.lottie +0 -0
@@ -0,0 +1 @@
1
+ .kilo-console .models{display:grid;gap:.5rem}.kilo-console .models-filter-card{display:grid;gap:.75rem;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--card);padding:.75rem}.kilo-console .models-filter-row{display:grid;gap:.5rem;align-items:center}.kilo-console .models-filter-primary{grid-template-columns:minmax(14rem,1.6fr) repeat(3,minmax(8.75rem,1fr)) auto}.kilo-console .models-filter-field{position:relative;display:grid;min-width:0}.kilo-console .models-filter-field>span{position:absolute;overflow:hidden;width:1px;height:1px;clip:rect(0 0 0 0);white-space:nowrap}.kilo-console .models-filter-field input,.kilo-console .models-select summary,.kilo-console .models-favorite-filter,.kilo-console .models-privacy-filter,.kilo-console .models-capability-toggle{height:2rem;min-height:2rem;border-radius:var(--radius-md);font-size:.75rem;line-height:1.45}.kilo-console .models-filter-field input{padding:0 .75rem}.kilo-console .models-select{position:relative;min-width:0}.kilo-console .models-select summary{display:flex;gap:.5rem;align-items:center;justify-content:space-between;overflow:hidden;border:1px solid var(--border);background:color-mix(in oklab,var(--input) 35%,transparent);color:var(--foreground);cursor:pointer;list-style:none;padding:0 .75rem;white-space:nowrap}.kilo-console .models-select summary::-webkit-details-marker{display:none}.kilo-console .models-select summary::marker{content:""}.kilo-console .models-select summary:after{flex:0 0 auto;width:1rem;height:1rem;background-image:url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%23a1a1aa' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:1rem;content:""}.kilo-console .models-select[open] summary,.kilo-console .models-select summary:focus-visible{border-color:var(--primary);box-shadow:0 0 0 2px color-mix(in oklab,var(--primary) 25%,transparent);outline:0}.kilo-console .models-select.disabled summary{cursor:not-allowed;opacity:.65}.kilo-console .models-select.invalid summary{border-color:var(--status-error-base)}.kilo-console .models-select-menu{position:absolute;z-index:35;top:calc(100% + .25rem);left:0;display:grid;width:100%;max-height:14rem;overflow-y:auto;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--popover);box-shadow:0 1rem 2rem color-mix(in oklab,black 24%,transparent);padding:.25rem}.kilo-console .models-select-option{display:block;width:100%;min-height:1.75rem;border:0;border-radius:calc(var(--radius-md) - .125rem);background:transparent;color:var(--popover-foreground);cursor:pointer;font:inherit;font-size:.75rem;line-height:1.45;padding:.25rem .5rem;text-align:left}.kilo-console .models-select-option:hover,.kilo-console .models-select-option:focus-visible{background:color-mix(in oklab,var(--primary) 12%,transparent);color:var(--foreground);outline:0}.kilo-console .models-select-option.selected{background:color-mix(in oklab,var(--primary) 20%,transparent);color:var(--foreground)}.kilo-console .models-select-option.disabled{cursor:not-allowed;opacity:.55}.kilo-console .models-favorite-filter,.kilo-console .models-privacy-filter,.kilo-console .models-capability-toggle{display:inline-flex;gap:.375rem;align-items:center;justify-content:center;border:1px solid var(--border);background:color-mix(in oklab,var(--input) 35%,transparent);color:var(--muted-foreground);cursor:pointer;font:inherit;font-size:.75rem;font-weight:500;padding:0 .75rem}.kilo-console .models-favorite-filter:hover,.kilo-console .models-privacy-filter:hover,.kilo-console .models-capability-toggle:hover,.kilo-console .models-favorite-filter.selected,.kilo-console .models-privacy-filter.selected,.kilo-console .models-capability-toggle.selected{border-color:var(--primary);background:color-mix(in oklab,var(--primary) 10%,transparent);color:var(--foreground)}.kilo-console .models-favorite-filter .model-star{width:1rem;height:1rem;cursor:inherit;padding:0}.kilo-console .models-filter-secondary{display:flex;gap:1rem;align-items:center}.kilo-console .models-context-filter{flex:1 1 auto;display:flex;gap:.5rem;align-items:center;min-width:16rem}.kilo-console .models-context-filter>span,.kilo-console .models-privacy-filter-group>span,.kilo-console .models-capabilities-filter>span{flex:0 0 auto;color:var(--muted-foreground);font-size:.6875rem;line-height:1.45;white-space:nowrap}.kilo-console .models-context-filter .context-range{flex:1 1 auto;height:1rem;min-height:1rem;border:0;background:transparent;padding:0}.kilo-console .models-context-filter .context-track,.kilo-console .models-context-filter .context-fill{top:50%;right:0;left:0;height:.25rem;transform:translateY(-50%)}.kilo-console .models-context-filter .context-track{background:var(--border)}.kilo-console .models-context-filter .context-fill{right:calc(100% - var(--context-max));background:var(--primary)}.kilo-console .models-context-filter .context-max{top:50%;left:var(--context-max);width:.875rem;height:.875rem;min-height:.875rem;border:1px solid var(--border);background:var(--foreground);box-shadow:0 0 0 1px color-mix(in oklab,var(--background) 70%,transparent);transform:translate(-50%,-50%)}.kilo-console .models-context-value{flex:0 0 3.5rem;color:var(--foreground);font-size:.6875rem;font-weight:500;line-height:1.45;text-align:right}.kilo-console .models-privacy-filter-group,.kilo-console .models-capabilities-filter{flex:0 0 auto;display:flex;gap:.5rem;align-items:center}.kilo-console .models-capabilities-list{display:flex;gap:.375rem;align-items:center;flex-wrap:wrap}.kilo-console .models-capabilities-list button{text-transform:capitalize}.kilo-console .explore-models{grid-template-columns:repeat(auto-fill,minmax(22.5rem,1fr));gap:.625rem}.kilo-console .model{display:grid;gap:.65rem;border:1px solid var(--border-weak-base);border-radius:var(--radius-lg);padding:.65rem .75rem}.kilo-console .model strong,.kilo-console .model span:where(:not([data-component=tag])){display:block}.kilo-console .model span:where(:not([data-component=tag])){color:var(--text-weaker);font-size:var(--font-size-small)}.kilo-console .model-main{display:flex;gap:.75rem;align-items:center;justify-content:space-between;flex-wrap:wrap}.kilo-console .model-title{display:flex;gap:.55rem;align-items:flex-start;min-width:0}.kilo-console .model-star{flex:0 0 auto;display:block;width:1.4rem;height:1.4rem;border:0;background:transparent;color:var(--text-weaker);cursor:pointer;padding:.1rem}.kilo-console .model-star:before{display:block;width:100%;height:100%;background:currentColor;content:"";mask:url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' fill-rule='evenodd' d='M8 1.25L10.05 5.4L14.63 6.07L11.32 9.29L12.1 13.85L8 11.69L3.9 13.85L4.68 9.29L1.37 6.07L5.95 5.4L8 1.25ZM8 3.51L6.88 5.78L6.65 6.26L6.12 6.34L3.61 6.7L5.43 8.47L5.81 8.84L5.72 9.37L5.29 11.86L7.53 10.68L8 10.43L8.47 10.68L10.71 11.86L10.28 9.37L10.19 8.84L10.57 8.47L12.39 6.7L9.88 6.34L9.35 6.26L9.12 5.78L8 3.51Z'/%3E%3C/svg%3E") center / contain no-repeat}.kilo-console .model-star.active{color:var(--text-interactive-base)}.kilo-console .model-star.active:before{mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M8 1.25L10.05 5.4L14.63 6.07L11.32 9.29L12.1 13.85L8 11.69L3.9 13.85L4.68 9.29L1.37 6.07L5.95 5.4L8 1.25Z'/%3E%3C/svg%3E")}.kilo-console .model-star:disabled{cursor:not-allowed;opacity:.45}.kilo-console .model-star:focus-visible{border-radius:var(--radius-md);outline:2px solid color-mix(in srgb,var(--border-focus) 45%,transparent);outline-offset:2px}.kilo-console .model-option{grid-template-columns:auto minmax(0,1fr) auto}.kilo-console .model-option.selected,.kilo-console .tool-option.selected{border-color:var(--border-focus);background:color-mix(in srgb,var(--surface-brand-base) 16%,var(--surface-base))}.kilo-console .model-option .model-star{pointer-events:none}.kilo-console .tool-option{grid-template-columns:minmax(0,1fr);align-items:stretch}.kilo-console .tool-option .tool-capabilities{text-align:left}.kilo-console .model-controls{display:grid;grid-template-columns:minmax(12rem,1.4fr) repeat(3,minmax(9rem,1fr));gap:.75rem;margin-bottom:1rem}.kilo-console .model-controls label{display:grid;gap:.35rem;color:var(--text-weak);font-size:var(--font-size-small)}.kilo-console .model-description{margin:0;color:var(--text-weak);font-size:.75rem;line-height:1.45}.kilo-console .explore-model-card{gap:.625rem;border-color:var(--border);background:var(--card);padding:.875rem}.kilo-console .explore-model-card .model-main{align-items:flex-start;flex-wrap:nowrap}.kilo-console .explore-model-card .model-title{flex:1 1 auto}.kilo-console .explore-model-card .model-title strong{color:var(--foreground);font-size:.875rem;font-weight:500;line-height:1.25}.kilo-console .explore-model-card .model-title span{margin-top:.125rem;font-family:var(--font-family-mono);font-size:.6875rem;line-height:1.45}.kilo-console .explore-model-card .model-tags{flex:0 0 auto;flex-direction:column;align-items:flex-end;gap:.25rem}.kilo-console .model-capabilities{justify-content:flex-start;gap:.25rem}.kilo-console .model-info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:hidden;gap:1px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--border)}.kilo-console .model-stat{border:0;border-radius:0;background:var(--card);padding:.625rem}.kilo-console .model-stat span,.kilo-console .model-stat strong{display:block}.kilo-console .model-stat span{color:var(--text-weaker);font-size:.625rem;font-weight:500;letter-spacing:.08em;text-transform:uppercase}.kilo-console .model-stat strong{display:flex;gap:.25rem;align-items:baseline;margin-top:.25rem;color:var(--text-strong);font-size:.75rem;font-weight:400;line-height:1.2}.kilo-console .model-stat small{color:var(--muted-foreground);font-size:.625rem;font-weight:400}
@@ -0,0 +1 @@
1
+ import{d as o,c as s,_ as ie}from"./index-aE_EEdSy.js";import{u as re}from"./config-rLoO0LDc.js";function oe(t){return t.some(r=>r.id==="kilo")}function ne(t,r,a){return!a||t.id!=="kilo"||r.mayTrainOnYourPrompts!==!0}const ae=["toolcall","attachment","temperature","interleaved","input:audio","input:image","input:video","input:pdf","output:audio","output:image","output:video","output:pdf"],se=1e6;function le(t,r){return t.id==="kilo"?-1:r.id==="kilo"?1:t.name.localeCompare(r.name)}function ue(t,r){return r==="toolcall"?t.capabilities.toolcall:r==="attachment"?t.capabilities.attachment:r==="temperature"?t.capabilities.temperature:r==="interleaved"?!!t.capabilities.interleaved:r==="input:audio"?t.capabilities.input.audio:r==="input:image"?t.capabilities.input.image:r==="input:video"?t.capabilities.input.video:r==="input:pdf"?t.capabilities.input.pdf:r==="output:audio"?t.capabilities.output.audio:r==="output:image"?t.capabilities.output.image:r==="output:video"?t.capabilities.output.video:t.capabilities.output.pdf}function B(t,r){return t.provider.id===r.providerID&&t.model.id===r.modelID?!0:t.model.providerID===r.providerID&&t.model.id===r.modelID}function ce(t){if(!t)return[];const r=new Set([...Object.keys(t.effective.provider??{}),...t.providers.connected]);return t.providers.all.filter(a=>r.has(a.id)).filter(a=>Object.keys(a.models).length>0).sort(le)}function de(t,r,a){const p=t.trim().toLowerCase();return r.filter(n=>p?`${n.id} ${n.model.name} ${n.provider.name}`.toLowerCase().includes(p):!0).sort((n,u)=>{const c=Number(a(u))-Number(a(n));if(c!==0)return c;const v=n.model.name.localeCompare(u.model.name);if(v!==0)return v;const h=n.provider.name.localeCompare(u.provider.name);return h!==0?h:n.id.localeCompare(u.id)})}function pe(){const t=re(),r=()=>t.data(),[a,p]=o(""),[n,u]=o("all"),[c,v]=o("all"),[h,G]=o(0),[D,H]=o(0),[C,R]=o("all"),[I,T]=o(!1),[y,w]=o([]),[L,Y]=o(!1),[z,F]=o("closed"),[S,A]=o("model"),[N,O]=o(""),[P,j]=o(""),$=s(()=>ce(r())),g=s(()=>$().flatMap(i=>Object.values(i.models).map(e=>({id:`${i.id}/${e.id}`,provider:i,model:e})))),E=s(()=>oe($())),f=s(()=>{const i=g().map(e=>e.model.limit.context);return i.length?Math.min(Math.max(...i),se):0}),m=s(()=>Math.min(D()||f(),f())),b=s(()=>Math.min(h(),m())),q=s(()=>m()>=f()?void 0:m()),k=s(()=>r()?.modelState.favorite??[]),d=i=>k().some(e=>B(i,e)),J=s(()=>{const i=a().toLowerCase();return g().filter(e=>n()==="all"?!0:e.provider.id===n()).filter(e=>c()==="free"?e.model.isFree:!0).filter(e=>c()==="paid"?!e.model.isFree:!0).filter(e=>b()>0?e.model.limit.context>=b():!0).filter(e=>q()!==void 0?e.model.limit.context<=q():!0).filter(e=>C()==="reasoning"?e.model.capabilities.reasoning:!0).filter(e=>C()==="standard"?!e.model.capabilities.reasoning:!0).filter(e=>ne(e.provider,e.model,I())).filter(e=>L()?d(e):!0).filter(e=>y().every(l=>ue(e.model,l))).filter(e=>i?`${e.id} ${e.model.name} ${e.provider.name}`.toLowerCase().includes(i):!0).sort((e,l)=>{const M=Number(d(l))-Number(d(e));return M!==0?M:e.model.name.localeCompare(l.model.name)||e.provider.name.localeCompare(l.provider.name)})}),K=s(()=>de(N(),g(),d)),_=s(()=>S()==="model"?"Default model":"Small model");function Q(i){if(typeof i=="string")return g().find(e=>e.id===i||`${e.model.providerID}/${e.model.id}`===i)}function U(i){const e=new Set(y());if(e.has(i)){e.delete(i),w([...e]);return}e.add(i),w([...e])}function V(i){G(Math.max(0,Math.min(i,m())))}function W(i){H(Math.min(f(),Math.max(i,b())))}function X(i){const e=t.query();if(!e)return;const l=d(i)?k().filter(M=>!B(i,M)):[{providerID:i.provider.id,modelID:i.model.id},...k()];t.run("Saving favorite",()=>ie(e,l))}function Z(i){const e=r()?.overlay.fields[i]?.value;A(i),O(""),j(typeof e=="string"?e:""),F("select")}function x(){F("closed")}function ee(i){j(i.id)}function te(){const i=P();if(!i){t.fail(`Select a ${_().toLowerCase()} before saving.`);return}if(S()==="model"){t.save({model:i}),x();return}t.save({small_model:i}),x()}return{ctx:t,snap:r,search:a,setSearch:p,filter:n,setFilter:u,price:c,setPrice:v,low:b,high:D,top:m,setMin:V,setMax:W,reason:C,setReason:R,privacy:I,setPrivacy:T,caps:y,setCaps:w,starred:L,setStarred:Y,fav:d,favorite:X,max:f,gateway:E,providers:$,capabilities:ae,toggle:U,models:J,item:Q,mode:z,field:S,label:_,picker:N,setPicker:O,choice:P,options:K,edit:Z,close:x,select:ee,save:te}}export{ce as a,de as c,pe as u};
@@ -0,0 +1 @@
1
+ .kilo-console .profile-page,.kilo-console .profile-login-page{display:grid;gap:1rem;max-width:64rem;margin:0 auto}.kilo-console .profile-login-page{max-width:34rem}.kilo-console .profile-shell.disconnected{grid-template-columns:minmax(0,1fr)}.kilo-console .profile-header,.kilo-console .profile-login-header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:1rem;align-items:start;padding-bottom:.5rem}.kilo-console .profile-login-header{grid-template-columns:1fr;text-align:center}.kilo-console .profile-header h1,.kilo-console .profile-login-header h1{margin:0;color:var(--foreground);font-size:1.25rem;font-weight:600;letter-spacing:-.02em}.kilo-console .profile-header p:not(.eyebrow),.kilo-console .profile-login-header p:not(.eyebrow){max-width:42rem;margin:.625rem 0 0;color:var(--muted-foreground);font-size:.8125rem;line-height:1.45}.kilo-console .profile-actions,.kilo-console .profile-card-actions,.kilo-console .profile-login-actions{display:flex;gap:.5rem;align-items:center;justify-content:flex-end;flex-wrap:wrap}.kilo-console .profile-primary-link{text-decoration:none}.kilo-console .profile-primary-link[data-component=button][data-variant=primary] [data-slot=icon-svg]{color:var(--primary-foreground)}.kilo-console .profile-connect-card{display:grid;min-height:18rem;place-items:center;align-content:center;gap:1.25rem;text-align:center}.kilo-console .profile-connect-mark{display:grid;width:3.5rem;height:3.5rem;place-items:center;border:1px solid var(--border);border-radius:var(--radius-lg);background:linear-gradient(135deg,color-mix(in oklab,var(--primary) 32%,transparent),transparent),color-mix(in oklab,var(--muted) 70%,transparent);color:var(--foreground);font-size:1rem;font-weight:700;letter-spacing:.08em}.kilo-console .profile-connect-copy{display:grid;max-width:28rem;gap:.625rem}.kilo-console .profile-connect-copy h1,.kilo-console .profile-connect-copy p{margin:0}.kilo-console .profile-connect-copy h1{color:var(--foreground);font-size:1.125rem;font-weight:600;letter-spacing:-.02em}.kilo-console .profile-connect-copy p:not(.eyebrow){color:var(--muted-foreground);font-size:.8125rem;line-height:1.5}.kilo-console .profile-link-button{display:inline-flex;align-items:center;justify-content:center;min-height:1.75rem;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--input-base);color:var(--foreground);font-size:.75rem;font-weight:500;line-height:1.45;padding:.25rem .625rem;text-decoration:none;transition:background .12s ease,border-color .12s ease,color .12s ease}.kilo-console .profile-link-button:hover,.kilo-console .profile-link-button:focus-visible{border-color:var(--ring);background:var(--muted);color:var(--foreground);outline:0}.kilo-console .profile-banner{margin-bottom:0}.kilo-console .profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.kilo-console .profile-card{gap:.875rem}.kilo-console .profile-wide-card{grid-column:1 / -1}.kilo-console .profile-account-card,.kilo-console .profile-balance-card{min-height:10rem}.kilo-console .profile-account-head{display:flex;gap:.875rem;align-items:center;min-width:0}.kilo-console .profile-avatar,.kilo-console .profile-org-icon{display:grid;flex:0 0 auto;place-items:center;border:1px solid var(--border);background:linear-gradient(135deg,color-mix(in oklab,var(--primary) 28%,transparent),transparent),color-mix(in oklab,var(--muted) 70%,transparent);color:var(--foreground);font-weight:700;letter-spacing:.06em}.kilo-console .profile-avatar{width:3.25rem;height:3.25rem;border-radius:var(--radius-lg);font-size:1rem}.kilo-console .profile-org-icon{width:2rem;height:2rem;border-radius:var(--radius-sm);font-size:.6875rem}.kilo-console .profile-account-text{display:grid;min-width:0;gap:.125rem}.kilo-console .profile-account-text strong,.kilo-console .profile-card-head h2,.kilo-console .profile-login-state strong,.kilo-console .profile-login-step strong{margin:0;color:var(--foreground);font-size:.9375rem;font-weight:600;line-height:1.25}.kilo-console .profile-account-text span,.kilo-console .profile-login-state p,.kilo-console .profile-login-step>span,.kilo-console .profile-login-waiting{color:var(--muted-foreground);font-size:.75rem;line-height:1.45}.kilo-console .profile-account-text span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kilo-console .profile-meta-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.75rem;align-items:center;border:1px solid var(--border);border-radius:var(--radius-md);background:color-mix(in oklab,var(--muted) 35%,transparent);padding:.75rem}.kilo-console .profile-meta-row span,.kilo-console .profile-card-label{color:var(--muted-foreground);font-size:.6875rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase}.kilo-console .profile-meta-row strong{color:var(--foreground);font-size:.75rem;font-weight:600}.kilo-console .profile-balance-card strong{color:var(--foreground);font-size:clamp(2rem,6vw,3.25rem);font-weight:700;letter-spacing:-.05em;line-height:.95}.kilo-console .profile-balance-card p,.kilo-console .profile-login-state p{margin:0}.kilo-console .profile-card-head{display:flex;gap:1rem;align-items:flex-start;justify-content:space-between}.kilo-console .profile-pill{display:inline-flex;align-items:center;min-height:1.5rem;border:1px solid var(--border);border-radius:999px;color:var(--muted-foreground);font-size:.6875rem;font-weight:600;padding:0 .625rem;text-decoration:none;text-transform:uppercase}.kilo-console .profile-org-list{display:grid;gap:.5rem}.kilo-console .profile-org-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:.75rem;align-items:center;width:100%;min-height:3.5rem;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--card);color:var(--foreground);cursor:pointer;font:inherit;padding:.75rem;text-align:left;transition:background .12s ease,border-color .12s ease}.kilo-console .profile-org-row:hover,.kilo-console .profile-org-row:focus-visible,.kilo-console .profile-org-row.active{border-color:var(--ring);background:color-mix(in oklab,var(--muted) 45%,transparent);outline:0}.kilo-console .profile-org-row:disabled{cursor:not-allowed;opacity:.65}.kilo-console .profile-org-body{display:grid;min-width:0;gap:.125rem}.kilo-console .profile-org-body strong{overflow:hidden;color:var(--foreground);font-size:.8125rem;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.kilo-console .profile-org-body span,.kilo-console .profile-org-state{color:var(--muted-foreground);font-size:.6875rem}.kilo-console .profile-org-state{font-weight:600}.kilo-console .profile-login-card{min-height:18rem}.kilo-console .profile-login-state,.kilo-console .profile-login-flow,.kilo-console .profile-login-step{display:grid;gap:.875rem}.kilo-console .profile-login-state{place-items:center;min-height:14rem;text-align:center}.kilo-console .profile-login-state.error strong{color:var(--destructive)}.kilo-console .profile-login-state.success strong{color:var(--success, var(--primary))}.kilo-console .profile-login-step{border:1px solid var(--border);border-radius:var(--radius-lg);background:color-mix(in oklab,var(--muted) 25%,transparent);padding:1rem}.kilo-console .profile-login-url{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.5rem;align-items:center}.kilo-console .profile-login-url span{overflow:hidden;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--input-base);color:var(--foreground);font-family:var(--font-family-mono, monospace);font-size:.75rem;padding:.5rem .625rem;text-overflow:ellipsis;white-space:nowrap}.kilo-console .profile-login-code{display:grid;gap:.25rem;place-items:center;border:1px solid var(--ring);border-radius:var(--radius-lg);background:color-mix(in oklab,var(--primary) 12%,var(--input-base));color:var(--foreground);cursor:pointer;font-family:var(--font-family-mono, monospace);font-size:2rem;font-weight:700;letter-spacing:.16em;padding:1rem}.kilo-console .profile-login-code small{color:var(--muted-foreground);font-family:var(--font-family-sans);font-size:.6875rem;font-weight:600;letter-spacing:0}.kilo-console .profile-login-waiting{display:flex;align-items:center;justify-content:center;gap:.5rem}.kilo-console .profile-spinner{width:1rem;height:1rem;border:2px solid color-mix(in oklab,var(--muted-foreground) 30%,transparent);border-top-color:var(--primary);border-radius:999px;animation:profile-spin .9s linear infinite}@keyframes profile-spin{to{transform:rotate(360deg)}}@media(max-width:760px){.kilo-console .profile-header,.kilo-console .profile-grid{grid-template-columns:1fr}.kilo-console .profile-actions,.kilo-console .profile-card-actions,.kilo-console .profile-login-actions{justify-content:flex-start}.kilo-console .profile-login-url{grid-template-columns:1fr}}@media(max-width:520px){.kilo-console .profile-org-row{grid-template-columns:auto minmax(0,1fr)}.kilo-console .profile-org-state{grid-column:2}.kilo-console .profile-login-code{font-size:1.5rem}}
@@ -0,0 +1 @@
1
+ import{d as m,c as p,e as d,a5 as v,a6 as w,a7 as $,a8 as f,y as C,a9 as b}from"./index-aE_EEdSy.js";const k="personal";let g=!1;function x(e){g=e}function R(){return g}function y(e){return e instanceof Error?e.message:typeof e=="string"?e:e==null?"":JSON.stringify(e)}function D(e){if(!e)return;const r=e.match(/code:\s*([A-Z0-9-]+)/i)?.[1];return r?r.toUpperCase():e.match(/\b([A-Z0-9]{4}-[A-Z0-9]{4})\b/i)?.[1]?.toUpperCase()}function z(e){const r=y(e).toLowerCase();return r.includes("unauthorized")||r.includes("invalid token")||r.includes('status":401')}function A(e){return typeof e!="number"||!Number.isFinite(e)?"Unknown":`$${e.toFixed(2)}`}function E(e,r){return(e?.trim()||r).split(/[\s._@-]+/).filter(Boolean).slice(0,2).map(s=>s[0]??"").join("").toUpperCase()||"KG"}function L(e){if(!e||!e.startsWith("/")||e.startsWith("//"))return"/profile";try{const r=new URL(e,"http://localhost");return r.origin!=="http://localhost"?"/profile":`${r.pathname}${r.search}${r.hash}`}catch{return"/profile"}}function Z(e,r,n){const o=new URLSearchParams,s=e.get("server");s&&o.set("server",s);for(const[c,t]of Object.entries({}))t&&o.set(c,t);const a=o.toString();return`${r}${a?`?${a}`:""}`}function i(e="/profile"){return`https://app.kilo.ai${e}`}function j(e){return i(e?`/organizations/${encodeURIComponent(e)}/usage-details`:"/usage")}function q(e){return i(e?`/organizations/${encodeURIComponent(e)}`:"/profile")}const U=new Set(["3017","3018"]);function l(e){return e.get("server")?!1:U.has(window.location.port)}function h(e){const r=e.get("server");if(r)return r;const n=l(e)?v():"";return n||(l(e)?"":window.location.origin)}function F(e){const[r,n]=m(h(e())),o=()=>l(e()),s=p(()=>{const t=C(r())||h(e());if(t)return{url:t,dir:""}});d(()=>{const t=e().get("server");t&&t!==r()&&n(t)}),d(()=>{o()&&b().then(t=>{t&&(f(t),n(t))})});function a(){const t=s();!t||!o()||f(t.url)}function c(){if(!o())return;const t=v();!t||t!==r()||(w(),n(""),$().then(u=>{u&&(f(u),n(u))}))}return{query:s,discoverable:o,remember:a,recover:c}}export{j as a,z as b,q as c,i as d,x as e,k as f,D as g,E as i,A as m,Z as p,L as s,F as u,R as w};
@@ -0,0 +1,30 @@
1
+ import{c as L,aE as m,aF as ue,aG as jt,N as Q,d as k,a1 as Ce,o as O,O as ee,aH as Ee,aI as Vt,aJ as Ht,e as E,at as te,aK as we,aL as j,H as x,aM as Ye,aN as q,aO as Bt,aP as Nt,aQ as zt,G as M,f as h,m as oe,aR as Gt,z as re,aS as z,aT as J,S as N,aU as me,aV as Me,aW as Wt,aX as Ut,aY as Z,aZ as qt,J as Jt,i as T,p as Le,M as ne,F as Pe,s as W,g as X,a_ as Re,t as R,K as at,a$ as Yt,b0 as Zt,b1 as Xt,b2 as Qt,b3 as en,b4 as tn,b5 as nn,a2 as Fe,Z as on,B as Se,h as rn,b6 as sn,v as ie,b7 as ln,x as Ze,I as an}from"./index-aE_EEdSy.js";import{c as cn,f as dn,s as un,p as fn,a as gn,b as hn,F as mn,g as pn,d as vn,e as yn,u as ct,h as bn}from"./file-PqLbqN2Z.js";import{S as wn}from"./console-D_ICjwvI.js";import"./config-rLoO0LDc.js";const Fn=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function Xe(e){const t={};let n;for(;n=Fn.exec(e);)t[n[1]]=n[2];return t}function Ie(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=Xe(e)}else typeof t=="string"&&(t=Xe(t));return{...e,...t}}function dt(e){let t=e.startIndex??0;const n=e.startLevel??0,o=[],r=l=>{if(l==null)return"";const c=e.getKey??"key",u=ue(c)?l[c]:c(l);return u!=null?String(u):""},a=l=>{if(l==null)return"";const c=e.getTextValue??"textValue",u=ue(c)?l[c]:c(l);return u!=null?String(u):""},i=l=>{if(l==null)return!1;const c=e.getDisabled??"disabled";return(ue(c)?l[c]:c(l))??!1},s=l=>{if(l!=null)return ue(e.getSectionChildren)?l[e.getSectionChildren]:e.getSectionChildren?.(l)};for(const l of e.dataSource){if(ue(l)||jt(l)){o.push({type:"item",rawValue:l,key:String(l),textValue:String(l),disabled:i(l),level:n,index:t}),t++;continue}if(s(l)!=null){o.push({type:"section",rawValue:l,key:"",textValue:"",disabled:!1,level:n,index:t}),t++;const c=s(l)??[];if(c.length>0){const u=dt({dataSource:c,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});o.push(...u),t+=u.length}}else o.push({type:"item",rawValue:l,key:r(l),textValue:a(l),disabled:i(l),level:n,index:t}),t++}return o}function Sn(e,t=[]){return L(()=>{const n=dt({dataSource:m(e.dataSource),getKey:m(e.getKey),getTextValue:m(e.getTextValue),getDisabled:m(e.getDisabled),getSectionChildren:m(e.getSectionChildren)});for(let o=0;o<t.length;o++)t[o]();return e.factory(n)})}var Cn=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),In=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Kn(e){if(Intl.Locale){const n=new Intl.Locale(e).maximize().script??"";return Cn.has(n)}const t=e.split("-")[0];return In.has(t)}function xn(e){return Kn(e)?"rtl":"ltr"}function ut(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:xn(e)}}var Ae=ut(),ge=new Set;function Qe(){Ae=ut();for(const e of ge)e(Ae)}function Dn(){const[e,t]=k(Ae),n=L(()=>e());return Ce(()=>{ge.size===0&&window.addEventListener("languagechange",Qe),ge.add(t),O(()=>{ge.delete(t),ge.size===0&&window.removeEventListener("languagechange",Qe)})}),{locale:()=>n().locale,direction:()=>n().direction}}var kn=ee();function ft(){const e=Dn();return Q(kn)||e}var Te=new Map;function Tn(e){const{locale:t}=ft(),n=L(()=>t()+(e?Object.entries(e).sort((o,r)=>o[0]<r[0]?-1:1).join():""));return L(()=>{const o=n();let r;return Te.has(o)&&(r=Te.get(o)),r||(r=new Intl.Collator(t(),e),Te.set(o,r)),r})}function Ke(e){const[t,n]=k(e.defaultValue?.()),o=L(()=>e.value?.()!==void 0),r=L(()=>o()?e.value?.():t());return[r,i=>{Ee(()=>{const s=Vt(i,r());return Object.is(s,r())||(o()||n(s),e.onChange?.(s)),s})}]}function Ln(e){const[t,n]=Ke(e);return[()=>t()??!1,n]}function An(e){const[t,n]=Ke(e);return[()=>t()??[],n]}var Y=class gt extends Set{anchorKey;currentKey;constructor(t,n,o){super(t),t instanceof gt?(this.anchorKey=n||t.anchorKey,this.currentKey=o||t.currentKey):(this.anchorKey=n,this.currentKey=o)}};function En(e){const[t,n]=Ke(e);return[()=>t()??new Y,n]}function ht(e){return Nt()?e.altKey:e.ctrlKey}function ae(e){return zt()?e.metaKey:e.ctrlKey}function et(e){return new Y(e)}function Mn(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Pn(e){const t=j({selectionMode:"none",selectionBehavior:"toggle"},e),[n,o]=k(!1),[r,a]=k(),i=L(()=>{const b=m(t.selectedKeys);return b!=null?et(b):b}),s=L(()=>{const b=m(t.defaultSelectedKeys);return b!=null?et(b):new Y}),[l,c]=En({value:i,defaultValue:s,onChange:b=>t.onSelectionChange?.(b)}),[u,d]=k(m(t.selectionBehavior)),p=()=>m(t.selectionMode),F=()=>m(t.disallowEmptySelection)??!1,v=b=>{(m(t.allowDuplicateSelectionEvents)||!Mn(b,l()))&&c(b)};return E(()=>{const b=l();m(t.selectionBehavior)==="replace"&&u()==="toggle"&&typeof b=="object"&&b.size===0&&d("replace")}),E(()=>{d(m(t.selectionBehavior)??"toggle")}),{selectionMode:p,disallowEmptySelection:F,selectionBehavior:u,setSelectionBehavior:d,isFocused:n,setFocused:o,focusedKey:r,setFocusedKey:a,selectedKeys:l,setSelectedKeys:v}}function Rn(e){const[t,n]=k(""),[o,r]=k(-1);return{typeSelectHandlers:{onKeyDown:i=>{if(m(e.isDisabled))return;const s=m(e.keyboardDelegate),l=m(e.selectionManager);if(!s.getKeyForSearch)return;const c=On(i.key);if(!c||i.ctrlKey||i.metaKey)return;c===" "&&t().trim().length>0&&(i.preventDefault(),i.stopPropagation());let u=n(p=>p+c),d=s.getKeyForSearch(u,l.focusedKey())??s.getKeyForSearch(u);d==null&&_n(u)&&(u=u[0],d=s.getKeyForSearch(u,l.focusedKey())??s.getKeyForSearch(u)),d!=null&&(l.setFocusedKey(d),e.onTypeSelect?.(d)),clearTimeout(o()),r(window.setTimeout(()=>n(""),500))}}}}function On(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function _n(e){return e.split("").every(t=>t===e[0])}function $n(e,t,n){const r=x({selectOnFocus:()=>m(e.selectionManager).selectionBehavior()==="replace"},e),a=()=>t(),{direction:i}=ft();let s={top:0,left:0};cn(()=>m(r.isVirtualized)?void 0:a(),"scroll",()=>{const f=a();f&&(s={top:f.scrollTop,left:f.scrollLeft})});const{typeSelectHandlers:l}=Rn({isDisabled:()=>m(r.disallowTypeAhead),keyboardDelegate:()=>m(r.keyboardDelegate),selectionManager:()=>m(r.selectionManager)}),c=()=>m(r.orientation)??"vertical",u=f=>{q(f,l.onKeyDown),f.altKey&&f.key==="Tab"&&f.preventDefault();const C=t();if(!C?.contains(f.target))return;const g=m(r.selectionManager),D=m(r.selectOnFocus),K=S=>{S!=null&&(g.setFocusedKey(S),f.shiftKey&&g.selectionMode()==="multiple"?g.extendSelection(S):D&&!ht(f)&&g.replaceSelection(S))},y=m(r.keyboardDelegate),_=m(r.shouldFocusWrap),A=g.focusedKey();switch(f.key){case(c()==="vertical"?"ArrowDown":"ArrowRight"):{if(y.getKeyBelow){f.preventDefault();let S;A!=null?S=y.getKeyBelow(A):S=y.getFirstKey?.(),S==null&&_&&(S=y.getFirstKey?.(A)),K(S)}break}case(c()==="vertical"?"ArrowUp":"ArrowLeft"):{if(y.getKeyAbove){f.preventDefault();let S;A!=null?S=y.getKeyAbove(A):S=y.getLastKey?.(),S==null&&_&&(S=y.getLastKey?.(A)),K(S)}break}case(c()==="vertical"?"ArrowLeft":"ArrowUp"):{if(y.getKeyLeftOf){f.preventDefault();const S=i()==="rtl";let P;A!=null?P=y.getKeyLeftOf(A):P=S?y.getFirstKey?.():y.getLastKey?.(),K(P)}break}case(c()==="vertical"?"ArrowRight":"ArrowDown"):{if(y.getKeyRightOf){f.preventDefault();const S=i()==="rtl";let P;A!=null?P=y.getKeyRightOf(A):P=S?y.getLastKey?.():y.getFirstKey?.(),K(P)}break}case"Home":if(y.getFirstKey){f.preventDefault();const S=y.getFirstKey(A,ae(f));S!=null&&(g.setFocusedKey(S),ae(f)&&f.shiftKey&&g.selectionMode()==="multiple"?g.extendSelection(S):D&&g.replaceSelection(S))}break;case"End":if(y.getLastKey){f.preventDefault();const S=y.getLastKey(A,ae(f));S!=null&&(g.setFocusedKey(S),ae(f)&&f.shiftKey&&g.selectionMode()==="multiple"?g.extendSelection(S):D&&g.replaceSelection(S))}break;case"PageDown":if(y.getKeyPageBelow&&A!=null){f.preventDefault();const S=y.getKeyPageBelow(A);K(S)}break;case"PageUp":if(y.getKeyPageAbove&&A!=null){f.preventDefault();const S=y.getKeyPageAbove(A);K(S)}break;case"a":ae(f)&&g.selectionMode()==="multiple"&&m(r.disallowSelectAll)!==!0&&(f.preventDefault(),g.selectAll());break;case"Escape":f.defaultPrevented||(f.preventDefault(),m(r.disallowEmptySelection)||g.clearSelection());break;case"Tab":if(!m(r.allowsTabNavigation)){if(f.shiftKey)C.focus();else{const S=Bt(C,{tabbable:!0});let P,H;do H=S.lastChild(),H&&(P=H);while(H);P&&!P.contains(document.activeElement)&&we(P)}break}}},d=f=>{const C=m(r.selectionManager),g=m(r.keyboardDelegate),D=m(r.selectOnFocus);if(C.isFocused()){f.currentTarget.contains(f.target)||C.setFocused(!1);return}if(f.currentTarget.contains(f.target)){if(C.setFocused(!0),C.focusedKey()==null){const K=_=>{_!=null&&(C.setFocusedKey(_),D&&C.replaceSelection(_))},y=f.relatedTarget;y&&f.currentTarget.compareDocumentPosition(y)&Node.DOCUMENT_POSITION_FOLLOWING?K(C.lastSelectedKey()??g.getLastKey?.()):K(C.firstSelectedKey()??g.getFirstKey?.())}else if(!m(r.isVirtualized)){const K=a();if(K){K.scrollTop=s.top,K.scrollLeft=s.left;const y=K.querySelector(`[data-key="${C.focusedKey()}"]`);y&&(we(y),Ye(K,y))}}}},p=f=>{const C=m(r.selectionManager);f.currentTarget.contains(f.relatedTarget)||C.setFocused(!1)},F=f=>{a()===f.target&&f.preventDefault()},v=()=>{const f=m(r.autoFocus);if(!f)return;const C=m(r.selectionManager),g=m(r.keyboardDelegate);let D;f==="first"&&(D=g.getFirstKey?.()),f==="last"&&(D=g.getLastKey?.());const K=C.selectedKeys();K.size&&(D=K.values().next().value),C.setFocused(!0),C.setFocusedKey(D);const y=t();y&&D==null&&!m(r.shouldUseVirtualFocus)&&we(y)};return Ce(()=>{r.deferAutoFocus?setTimeout(v,0):v()}),E(te([a,()=>m(r.isVirtualized),()=>m(r.selectionManager).focusedKey()],f=>{const[C,g,D]=f;if(g)D&&r.scrollToKey?.(D);else if(D&&C){const K=C.querySelector(`[data-key="${D}"]`);K&&Ye(C,K)}})),{tabIndex:L(()=>{if(!m(r.shouldUseVirtualFocus))return m(r.selectionManager).focusedKey()==null?0:-1}),onKeyDown:u,onMouseDown:F,onFocusIn:d,onFocusOut:p}}function jn(e,t){const n=()=>m(e.selectionManager),o=()=>m(e.key),r=()=>m(e.shouldUseVirtualFocus),a=g=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(o())&&!n().disallowEmptySelection()?n().toggleSelection(o()):n().replaceSelection(o()):g?.shiftKey?n().extendSelection(o()):n().selectionBehavior()==="toggle"||ae(g)||"pointerType"in g&&g.pointerType==="touch"?n().toggleSelection(o()):n().replaceSelection(o()))},i=()=>n().isSelected(o()),s=()=>m(e.disabled)||n().isDisabled(o()),l=()=>!s()&&n().canSelectItem(o());let c=null;const u=g=>{l()&&(c=g.pointerType,g.pointerType==="mouse"&&g.button===0&&!m(e.shouldSelectOnPressUp)&&a(g))},d=g=>{l()&&g.pointerType==="mouse"&&g.button===0&&m(e.shouldSelectOnPressUp)&&m(e.allowsDifferentPressOrigin)&&a(g)},p=g=>{l()&&(m(e.shouldSelectOnPressUp)&&!m(e.allowsDifferentPressOrigin)||c!=="mouse")&&a(g)},F=g=>{!l()||!["Enter"," "].includes(g.key)||(ht(g)?n().toggleSelection(o()):a(g))},v=g=>{s()&&g.preventDefault()},b=g=>{const D=t();r()||s()||!D||g.target===D&&n().setFocusedKey(o())},f=L(()=>{if(!(r()||s()))return o()===n().focusedKey()?0:-1}),C=L(()=>m(e.virtualized)?void 0:o());return E(te([t,o,r,()=>n().focusedKey(),()=>n().isFocused()],([g,D,K,y,_])=>{g&&D===y&&_&&!K&&document.activeElement!==g&&(e.focus?e.focus():we(g))})),{isSelected:i,isDisabled:s,allowsSelection:l,tabIndex:f,dataKey:C,onPointerDown:u,onPointerUp:d,onClick:p,onKeyDown:F,onMouseDown:v,onFocus:b}}var Vn=class{collection;state;constructor(e,t){this.collection=e,this.state=t}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}isFocused(){return this.state.isFocused()}setFocused(e){this.state.setFocused(e)}focusedKey(){return this.state.focusedKey()}setFocusedKey(e){(e==null||this.collection().getItem(e))&&this.state.setFocusedKey(e)}selectedKeys(){return this.state.selectedKeys()}isSelected(e){if(this.state.selectionMode()==="none")return!1;const t=this.getKey(e);return t==null?!1:this.state.selectedKeys().has(t)}isEmpty(){return this.state.selectedKeys().size===0}isSelectAll(){if(this.isEmpty())return!1;const e=this.state.selectedKeys();return this.getAllSelectableKeys().every(t=>e.has(t))}firstSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),o=n?.index!=null&&e?.index!=null&&n.index<e.index;(!e||o)&&(e=n)}return e?.key}lastSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),o=n?.index!=null&&e?.index!=null&&n.index>e.index;(!e||o)&&(e=n)}return e?.key}extendSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=this.state.selectedKeys(),o=n.anchorKey||t,r=new Y(n,o,t);for(const a of this.getKeyRange(o,n.currentKey||t))r.delete(a);for(const a of this.getKeyRange(t,o))this.canSelectItem(a)&&r.add(a);this.state.setSelectedKeys(r)}getKeyRange(e,t){const n=this.collection().getItem(e),o=this.collection().getItem(t);return n&&o?n.index!=null&&o.index!=null&&n.index<=o.index?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){const n=[];let o=e;for(;o!=null;){const r=this.collection().getItem(o);if(r&&r.type==="item"&&n.push(o),o===t)return n;o=this.collection().getKeyAfter(o)}return[]}getKey(e){const t=this.collection().getItem(e);return t?!t||t.type!=="item"?null:t.key:e}toggleSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=new Y(this.state.selectedKeys());n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection()&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode()==="none")return;const t=this.getKey(e);if(t==null)return;const n=this.canSelectItem(t)?new Y([t],t,t):new Y;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new Y;for(const n of e){const o=this.getKey(n);if(o!=null&&(t.add(o),this.selectionMode()==="single"))break}this.state.setSelectedKeys(t)}selectAll(){this.selectionMode()==="multiple"&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){const e=this.state.selectedKeys();!this.disallowEmptySelection()&&e.size>0&&this.state.setSelectedKeys(new Y)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode()!=="none"&&(this.selectionMode()==="single"?this.isSelected(e)&&!this.disallowEmptySelection()?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior()==="toggle"||t&&t.pointerType==="touch"?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys())return!0;const t=this.selectedKeys();if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;for(const n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode()==="none")return!1;const t=this.collection().getItem(e);return t!=null&&!t.disabled}isDisabled(e){const t=this.collection().getItem(e);return!t||t.disabled}getAllSelectableKeys(){const e=[];return(n=>{for(;n!=null;){if(this.canSelectItem(n)){const o=this.collection().getItem(n);if(!o)continue;o.type==="item"&&e.push(n)}n=this.collection().getKeyAfter(n)}})(this.collection().getFirstKey()),e}},tt=class{keyMap=new Map;iterable;firstKey;lastKey;constructor(e){this.iterable=e;for(const o of e)this.keyMap.set(o.key,o);if(this.keyMap.size===0)return;let t,n=0;for(const[o,r]of this.keyMap)t?(t.nextKey=o,r.prevKey=t.key):(this.firstKey=o,r.prevKey=void 0),r.type==="item"&&(r.index=n++),t=r,t.nextKey=void 0;this.lastKey=t.key}*[Symbol.iterator](){yield*this.iterable}getSize(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){return this.keyMap.get(e)?.prevKey}getKeyAfter(e){return this.keyMap.get(e)?.nextKey}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}};function Hn(e){const t=Pn(e),o=Sn({dataSource:()=>m(e.dataSource),getKey:()=>m(e.getKey),getTextValue:()=>m(e.getTextValue),getDisabled:()=>m(e.getDisabled),getSectionChildren:()=>m(e.getSectionChildren),factory:a=>e.filter?new tt(e.filter(a)):new tt(a)},[()=>e.filter]),r=new Vn(o,t);return Ht(()=>{const a=t.focusedKey();a!=null&&!o().getItem(a)&&t.setFocusedKey(void 0)}),{collection:o,selectionManager:()=>r}}var Bn=class{collection;ref;collator;constructor(e,t,n){this.collection=e,this.ref=t,this.collator=n}getKeyBelow(e){let t=this.collection().getKeyAfter(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyAfter(t)}}getKeyAbove(e){let t=this.collection().getKeyBefore(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyBefore(t)}}getFirstKey(){let e=this.collection().getFirstKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyAfter(e)}}getLastKey(){let e=this.collection().getLastKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyBefore(e)}}getItem(e){return this.ref?.()?.querySelector(`[data-key="${e}"]`)??null}getKeyPageAbove(e){const t=this.ref?.();let n=this.getItem(e);if(!t||!n)return;const o=Math.max(0,n.offsetTop+n.offsetHeight-t.offsetHeight);let r=e;for(;r&&n&&n.offsetTop>o;)r=this.getKeyAbove(r),n=r!=null?this.getItem(r):null;return r}getKeyPageBelow(e){const t=this.ref?.();let n=this.getItem(e);if(!t||!n)return;const o=Math.min(t.scrollHeight,n.offsetTop-n.offsetHeight+t.offsetHeight);let r=e;for(;r&&n&&n.offsetTop<o;)r=this.getKeyBelow(r),n=r!=null?this.getItem(r):null;return r}getKeyForSearch(e,t){const n=this.collator?.();if(!n)return;let o=t!=null?this.getKeyBelow(t):this.getFirstKey();for(;o!=null;){const r=this.collection().getItem(o);if(r){const a=r.textValue.slice(0,e.length);if(r.textValue&&n.compare(a,e)===0)return o}o=this.getKeyBelow(o)}}};function Nn(e,t,n){const o=Tn({usage:"search",sensitivity:"base"}),r=L(()=>{const a=m(e.keyboardDelegate);return a||new Bn(e.collection,t,o)});return $n({selectionManager:()=>m(e.selectionManager),keyboardDelegate:r,autoFocus:()=>m(e.autoFocus),deferAutoFocus:()=>m(e.deferAutoFocus),shouldFocusWrap:()=>m(e.shouldFocusWrap),disallowEmptySelection:()=>m(e.disallowEmptySelection),selectOnFocus:()=>m(e.selectOnFocus),disallowTypeAhead:()=>m(e.disallowTypeAhead),shouldUseVirtualFocus:()=>m(e.shouldUseVirtualFocus),allowsTabNavigation:()=>m(e.allowsTabNavigation),isVirtualized:()=>m(e.isVirtualized),scrollToKey:a=>m(e.scrollToKey)?.(a),orientation:()=>m(e.orientation)},t)}function zn(e={}){const[t,n]=Ln({value:()=>m(e.open),defaultValue:()=>!!m(e.defaultOpen),onChange:i=>e.onOpenChange?.(i)}),o=()=>{n(!0)},r=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:o,close:r,toggle:()=>{t()?r():o()}}}function U(e){return t=>(e(t),()=>e(void 0))}var be=e=>typeof e=="function"?e():e,Gn=e=>{const t=L(()=>{const i=be(e.element);if(i)return getComputedStyle(i)}),n=()=>t()?.animationName??"none",[o,r]=k(be(e.show)?"present":"hidden");let a="none";return E(i=>{const s=be(e.show);return Ee(()=>{if(i===s)return s;const l=a,c=n();s?r("present"):c==="none"||t()?.display==="none"?r("hidden"):r(i===!0&&l!==c?"hiding":"hidden")}),s}),E(()=>{const i=be(e.element);if(!i)return;const s=c=>{c.target===i&&(a=n())},l=c=>{const d=n().includes(c.animationName);c.target===i&&d&&o()==="hiding"&&r("hidden")};i.addEventListener("animationstart",s),i.addEventListener("animationcancel",l),i.addEventListener("animationend",l),O(()=>{i.removeEventListener("animationstart",s),i.removeEventListener("animationcancel",l),i.removeEventListener("animationend",l)})}),{present:()=>o()==="present"||o()==="hiding",state:o,setState:r}},Wn=Gn,mt=Wn,Un={};Me(Un,{Collapsible:()=>qn,Content:()=>Oe,Root:()=>_e,Trigger:()=>$e,useCollapsibleContext:()=>pe});var pt=ee();function pe(){const e=Q(pt);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function Oe(e){const[t,n]=k(),o=pe(),r=j({id:o.generateId("content")},e),[a,i]=M(r,["ref","id","style"]),{present:s}=mt({show:o.shouldMount,element:()=>t()??null}),[l,c]=k(0),[u,d]=k(0);let F=o.isOpen()||s();return Ce(()=>{const v=requestAnimationFrame(()=>{F=!1});O(()=>{cancelAnimationFrame(v)})}),E(te(s,()=>{if(!t())return;t().style.transitionDuration="0s",t().style.animationName="none";const v=t().getBoundingClientRect();c(v.height),d(v.width),F||(t().style.transitionDuration="",t().style.animationName="")})),E(te(o.isOpen,v=>{!v&&t()&&(t().style.transitionDuration="",t().style.animationName="")},{defer:!0})),E(()=>O(o.registerContentId(a.id))),h(N,{get when(){return s()},get children(){return h(z,x({as:"div",ref(v){var b=J(n,a.ref);typeof b=="function"&&b(v)},get id(){return a.id},get style(){return Ie({"--kb-collapsible-content-height":l()?`${l()}px`:void 0,"--kb-collapsible-content-width":u()?`${u()}px`:void 0},a.style)}},()=>o.dataset(),i))}})}function _e(e){const t=`collapsible-${re()}`,n=j({id:t},e),[o,r]=M(n,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[a,i]=k(),s=zn({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:u=>o.onOpenChange?.(u)}),l=L(()=>({"data-expanded":s.isOpen()?"":void 0,"data-closed":s.isOpen()?void 0:"","data-disabled":o.disabled?"":void 0})),c={dataset:l,isOpen:s.isOpen,disabled:()=>o.disabled??!1,shouldMount:()=>o.forceMount||s.isOpen(),contentId:a,toggle:s.toggle,generateId:me(()=>r.id),registerContentId:U(i)};return h(pt.Provider,{value:c,get children(){return h(z,x({as:"div"},l,r))}})}function $e(e){const t=pe(),[n,o]=M(e,["onClick"]);return h(Gt,x({get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return oe(()=>!!t.isOpen())()?t.contentId():void 0},get disabled(){return t.disabled()},onClick:a=>{q(a,n.onClick),t.toggle()}},()=>t.dataset(),o))}var qn=Object.assign(_e,{Content:Oe,Trigger:$e}),vt=ee();function Jn(){return Q(vt)}function Yn(){const e=Jn();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function yt(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function Zn(e,t){const n=t.ref();if(!n)return-1;let o=e.length;if(!o)return-1;for(;o--;){const r=e[o]?.ref();if(r&&yt(r,n))return o+1}return 0}function Xn(e){const t=e.map((o,r)=>[r,o]);let n=!1;return t.sort(([o,r],[a,i])=>{const s=r.ref(),l=i.ref();return s===l||!s||!l?0:yt(s,l)?(o>a&&(n=!0),-1):(o<a&&(n=!0),1)}),n?t.map(([o,r])=>r):e}function bt(e,t){const n=Xn(e);e!==n&&t(n)}function Qn(e){const t=e[0],n=e[e.length-1]?.ref();let o=t?.ref()?.parentElement;for(;o;){if(n&&o.contains(n))return o;o=o.parentElement}return Wt(o).body}function eo(e,t){E(()=>{const n=setTimeout(()=>{bt(e(),t)});O(()=>clearTimeout(n))})}function to(e,t){if(typeof IntersectionObserver!="function"){eo(e,t);return}let n=[];E(()=>{const o=()=>{const i=!!n.length;n=e(),i&&bt(e(),t)},r=Qn(e()),a=new IntersectionObserver(o,{root:r});for(const i of e()){const s=i.ref();s&&a.observe(s)}O(()=>a.disconnect())})}function no(e={}){const[t,n]=An({value:()=>m(e.items),onChange:a=>e.onItemsChange?.(a)});to(t,n);const o=a=>(n(i=>{const s=Zn(i,a);return Ut(i,a,s)}),()=>{n(i=>{const s=i.filter(l=>l.ref()!==a.ref());return i.length===s.length?i:s})});return{DomCollectionProvider:a=>h(vt.Provider,{value:{registerItem:o},get children(){return a.children}})}}function oo(e){const t=Yn(),n=j({shouldRegisterItem:!0},e);E(()=>{if(!n.shouldRegisterItem)return;const o=t.registerItem(n.getItem());O(o)})}var ro={};Me(ro,{Accordion:()=>ce,Content:()=>St,Header:()=>Ct,Item:()=>Kt,Root:()=>xt,Trigger:()=>Dt,useAccordionContext:()=>je});var wt=ee();function Ft(){const e=Q(wt);if(e===void 0)throw new Error("[kobalte]: `useAccordionItemContext` must be used within a `Accordion.Item` component");return e}function St(e){const t=Ft(),n=t.generateId("content"),o=j({id:n},e),[r,a]=M(o,["id","style"]);return E(()=>O(t.registerContentId(r.id))),h(Oe,x({role:"region",get"aria-labelledby"(){return t.triggerId()},get style(){return Ie({"--kb-accordion-content-height":"var(--kb-collapsible-content-height)","--kb-accordion-content-width":"var(--kb-collapsible-content-width)"},r.style)}},a))}function Ct(e){const t=pe();return h(z,x({as:"h3"},()=>t.dataset(),e))}var It=ee();function je(){const e=Q(It);if(e===void 0)throw new Error("[kobalte]: `useAccordionContext` must be used within a `Accordion.Root` component");return e}function Kt(e){const t=je(),n=`${t.generateId("item")}-${re()}`,o=j({id:n},e),[r,a]=M(o,["value","disabled"]),[i,s]=k(),[l,c]=k(),u=()=>t.listState().selectionManager(),d=()=>u().isSelected(r.value),p={value:()=>r.value,triggerId:i,contentId:l,generateId:me(()=>a.id),registerTriggerId:U(s),registerContentId:U(c)};return h(wt.Provider,{value:p,get children(){return h(_e,x({get open(){return d()},get disabled(){return r.disabled}},a))}})}function xt(e){let t;const n=`accordion-${re()}`,o=j({id:n,multiple:!1,collapsible:!1,shouldFocusWrap:!0},e),[r,a]=M(o,["id","ref","value","defaultValue","onChange","multiple","collapsible","shouldFocusWrap","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),[i,s]=k([]),{DomCollectionProvider:l}=no({items:i,onItemsChange:s}),c=Hn({selectedKeys:()=>r.value,defaultSelectedKeys:()=>r.defaultValue,onSelectionChange:p=>r.onChange?.(Array.from(p)),disallowEmptySelection:()=>!r.multiple&&!r.collapsible,selectionMode:()=>r.multiple?"multiple":"single",dataSource:i});c.selectionManager().setFocusedKey("item-1");const u=Nn({selectionManager:()=>c.selectionManager(),collection:()=>c.collection(),disallowEmptySelection:()=>c.selectionManager().disallowEmptySelection(),shouldFocusWrap:()=>r.shouldFocusWrap,disallowTypeAhead:!0,allowsTabNavigation:!0},()=>t),d={listState:()=>c,generateId:me(()=>r.id)};return h(l,{get children(){return h(It.Provider,{value:d,get children(){return h(z,x({as:"div",get id(){return r.id},ref(p){var F=J(v=>t=v,r.ref);typeof F=="function"&&F(p)},get onKeyDown(){return Z([r.onKeyDown,u.onKeyDown])},get onMouseDown(){return Z([r.onMouseDown,u.onMouseDown])},get onFocusIn(){return Z([r.onFocusIn])},get onFocusOut(){return Z([r.onFocusOut,u.onFocusOut])}},a))}})}})}function Dt(e){let t;const n=je(),o=Ft(),r=pe(),a=o.generateId("trigger"),i=j({id:a},e),[s,l]=M(i,["ref","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);oo({getItem:()=>({ref:()=>t,type:"item",key:o.value(),textValue:"",disabled:r.disabled()})});const c=jn({key:()=>o.value(),selectionManager:()=>n.listState().selectionManager(),disabled:()=>r.disabled(),shouldSelectOnPressUp:!0},()=>t),u=d=>{["Enter"," "].includes(d.key)&&d.preventDefault(),q(d,s.onKeyDown),q(d,c.onKeyDown)};return E(()=>O(o.registerTriggerId(l.id))),h($e,x({ref(d){var p=J(F=>t=F,s.ref);typeof p=="function"&&p(d)},get"data-key"(){return c.dataKey()},get onPointerDown(){return Z([s.onPointerDown,c.onPointerDown])},get onPointerUp(){return Z([s.onPointerUp,c.onPointerUp])},get onClick(){return Z([s.onClick,c.onClick])},onKeyDown:u,get onMouseDown(){return Z([s.onMouseDown,c.onMouseDown])},get onFocus(){return Z([s.onFocus,c.onFocus])}},l))}var ce=Object.assign(xt,{Content:St,Header:Ct,Item:Kt,Trigger:Dt});function so(e){const[t,n]=M(e,["class","classList"]);return h(ce,x(n,{"data-component":"accordion",get classList(){return{...t.classList,[t.class??""]:!!t.class}}}))}function io(e){const[t,n]=M(e,["class","classList"]);return h(ce.Item,x(n,{"data-slot":"accordion-item",get classList(){return{...t.classList,[t.class??""]:!!t.class}}}))}function lo(e){const[t,n]=M(e,["class","classList","children"]);return h(ce.Header,x(n,{"data-slot":"accordion-header",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function ao(e){const[t,n]=M(e,["class","classList","children"]);return h(ce.Trigger,x(n,{"data-slot":"accordion-trigger",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}function co(e){const[t,n]=M(e,["class","classList","children"]);return h(ce.Content,x(n,{"data-slot":"accordion-content",get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return t.children}}))}const he=Object.assign(so,{Item:io,Header:lo,Trigger:ao,Content:co});function uo(e){const[t,n]=M(e,["variant","size","icon","class","classList"]);return h(Jt,x(n,{"data-component":"button",get"data-size"(){return t.size||"normal"},get"data-variant"(){return t.variant||"secondary"},get"data-icon"(){return t.icon},get classList(){return{...t.classList,[t.class??""]:!!t.class}},get children(){return[h(N,{get when(){return t.icon},get children(){return h(qt,{get name(){return t.icon},size:"small"})}}),oe(()=>e.children)]}}))}var fo=R('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 18 14"fill=none><g>'),go=R("<span data-slot=diff-changes-additions>"),ho=R("<span data-slot=diff-changes-deletions>"),mo=R("<div data-component=diff-changes>"),po=R("<svg><rect width=2 height=14 rx=1></svg>",!1,!0,!1);function nt(e){const t=()=>e.variant??"default",n=L(()=>Array.isArray(e.changes)?e.changes.reduce((u,d)=>u+(d.additions??0),0):e.changes.additions),o=L(()=>Array.isArray(e.changes)?e.changes.reduce((u,d)=>u+(d.deletions??0),0):e.changes.deletions),r=L(()=>(n()??0)+(o()??0)),a=L(()=>{const d=n()??0,p=o()??0;if(d===0&&p===0)return{added:0,deleted:0,neutral:5};const F=d+p;if(F<5){const S=d>0?1:0,P=p>0?1:0,H=5-S-P;return{added:S,deleted:P,neutral:H}}const v=d>p?d/p:p/d;let b=5;(F<20||v<4)&&(b=4);const f=d/F,C=p/F,g=f*b,D=C*b;let K=d>0?Math.max(1,Math.round(g)):0,y=p>0?Math.max(1,Math.round(D)):0;d>0&&d<=5&&(K=Math.min(K,1)),d>5&&d<=10&&(K=Math.min(K,2)),p>0&&p<=5&&(y=Math.min(y,1)),p>5&&p<=10&&(y=Math.min(y,2));let _=K+y;_>b&&(g>D?K=b-y:y=b-K,_=K+y);const A=Math.max(0,5-_);return{added:K,deleted:y,neutral:A}}),i="var(--icon-diff-add-base)",s="var(--icon-diff-delete-base)",l="var(--icon-weak-base)",c=L(()=>{const u=a();return[...Array(u.added).fill(i),...Array(u.deleted).fill(s),...Array(u.neutral).fill(l)].slice(0,5)});return h(N,{get when(){return oe(()=>t()==="default")()?r()>0:!0},get children(){var u=mo();return T(u,h(Le,{get children(){return[h(ne,{get when(){return t()==="bars"},get children(){var d=fo(),p=d.firstChild;return T(p,h(Pe,{get each(){return c()},children:(F,v)=>(()=>{var b=po();return W(b,"fill",F),X(()=>W(b,"x",v()*4)),b})()})),d}}),h(ne,{get when(){return t()==="default"},get children(){return[(()=>{var d=go();return T(d,()=>`+${n()}`),d})(),(()=>{var d=ho();return T(d,()=>`-${o()}`),d})()]}})]}})),X(d=>{var p=t(),F={[e.class??""]:!0};return p!==d.e&&W(u,"data-variant",d.e=p),d.t=Re(u,F,d.t),d},{e:void 0,t:void 0}),u}})}const ot="/console/assets/sprite-Fb-TFjRY.svg";var vo=R("<svg><defs><mask mask-type=alpha><use></svg>",!1,!0,!1),yo=R("<svg><rect width=100% height=100% fill=currentColor></svg>",!1,!0,!1),bo=R("<svg data-component=file-icon>"),wo=R("<svg><use></svg>",!1,!0,!1);const Fo=e=>{const[t,n]=M(e,["node","class","classList","expanded","mono"]),o=L(()=>xo(t.node.path,t.node.type,t.expanded||!1)),r=`file-icon-mono-${re()}`;return(()=>{var a=bo();return at(a,x(n,{get classList(){return{...t.classList,[t.class??""]:!!t.class}}}),!0,!0),T(a,h(N,{get when(){return t.mono},get fallback(){return(()=>{var i=wo();return X(()=>W(i,"href",`${ot}#${o()}`)),i})()},get children(){return[(()=>{var i=vo(),s=i.firstChild,l=s.firstChild;return W(s,"id",r),X(()=>W(l,"href",`${ot}#${o()}`)),i})(),(()=>{var i=yo();return W(i,"mask",`url(#${r})`),i})()]}})),a})()},le={fileNames:{"readme.md":"Readme","changelog.md":"Changelog","contributing.md":"Contributing","conduct.md":"Conduct",license:"Certificate",authors:"Authors",credits:"Credits",install:"Installation","package.json":"Nodejs","package-lock.json":"Nodejs","yarn.lock":"Yarn","pnpm-lock.yaml":"Pnpm","bun.lock":"Bun","bun.lockb":"Bun","bunfig.toml":"Bun",".nvmrc":"Nodejs",".node-version":"Nodejs",dockerfile:"Docker","docker-compose.yml":"Docker","docker-compose.yaml":"Docker",".dockerignore":"Docker","jest.config.js":"Jest","jest.config.ts":"Jest","jest.config.mjs":"Jest","vitest.config.js":"Vitest","vitest.config.ts":"Vitest","tailwind.config.js":"Tailwindcss","tailwind.config.ts":"Tailwindcss","turbo.json":"Turborepo","tsconfig.json":"Tsconfig","jsconfig.json":"Jsconfig",".eslintrc":"Eslint",".eslintrc.js":"Eslint",".eslintrc.json":"Eslint",".prettierrc":"Prettier",".prettierrc.js":"Prettier",".prettierrc.json":"Prettier","vite.config.js":"Vite","vite.config.ts":"Vite","webpack.config.js":"Webpack","rollup.config.js":"Rollup","astro.config.mjs":"AstroConfig","astro.config.js":"AstroConfig","next.config.js":"Next","next.config.mjs":"Next","nuxt.config.js":"Nuxt","nuxt.config.ts":"Nuxt","svelte.config.js":"Svelte","gatsby-config.js":"Gatsby","remix.config.js":"Remix","prisma.schema":"Prisma",".gitignore":"Git",".gitattributes":"Git",makefile:"Makefile",cmake:"Cmake","cargo.toml":"Rust","go.mod":"GoMod","go.sum":"GoMod","requirements.txt":"Python","pyproject.toml":"Python",pipfile:"Python","poetry.lock":"Poetry",gemfile:"Gemfile",rakefile:"Ruby","composer.json":"Php","build.gradle":"Gradle","pom.xml":"Maven","deno.json":"Deno","deno.jsonc":"Deno","vercel.json":"Vercel","netlify.toml":"Netlify",".env":"Tune",".env.local":"Tune",".env.development":"Tune",".env.production":"Tune",".env.example":"Tune",".editorconfig":"Editorconfig","robots.txt":"Robots","favicon.ico":"Favicon",browserlist:"Browserlist",".babelrc":"Babel","babel.config.js":"Babel","gulpfile.js":"Gulp","gruntfile.js":"Grunt","capacitor.config.json":"Capacitor","ionic.config.json":"Ionic","angular.json":"Angular",".storybook":"Storybook","storybook.config.js":"Storybook","cypress.config.js":"Cypress","playwright.config.js":"Playwright","puppeteer.config.js":"Puppeteer","wrangler.toml":"Wrangler","firebase.json":"Firebase",supabase:"Supabase",terraform:"Terraform",kubernetes:"Kubernetes",".gitpod.yml":"Gitpod",".devcontainer":"Vscode","travis.yml":"Travis","appveyor.yml":"Appveyor",".circleci":"Circleci","renovate.json":"Renovate","dependabot.yml":"Dependabot","lerna.json":"Lerna","nx.json":"Nx"},fileExtensions:{"spec.ts":"TestTs","test.ts":"TestTs","spec.tsx":"TestJsx","test.tsx":"TestJsx","spec.js":"TestJs","test.js":"TestJs","spec.jsx":"TestJsx","test.jsx":"TestJsx","js.map":"JavascriptMap","d.ts":"TypescriptDef",ts:"Typescript",tsx:"React_ts",js:"Javascript",jsx:"React",mjs:"Javascript",cjs:"Javascript",html:"Html",htm:"Html",css:"Css",scss:"Sass",sass:"Sass",less:"Less",styl:"Stylus",json:"Json",xml:"Xml",yml:"Yaml",yaml:"Yaml",toml:"Toml",hjson:"Hjson",md:"Markdown",mdx:"Mdx",tex:"Tex",py:"Python",pyx:"Python",pyw:"Python",rs:"Rust",go:"Go",java:"Java",kt:"Kotlin",scala:"Scala",php:"Php",rb:"Ruby",cs:"Csharp",vb:"Visualstudio",cpp:"Cpp",cc:"Cpp",cxx:"Cpp",c:"C",h:"H",hpp:"Hpp",swift:"Swift",m:"ObjectiveC",mm:"ObjectiveCpp",dart:"Dart",lua:"Lua",pl:"Perl",r:"R",jl:"Julia",hs:"Haskell",elm:"Elm",ml:"Ocaml",clj:"Clojure",cljs:"Clojure",erl:"Erlang",ex:"Elixir",exs:"Elixir",nim:"Nim",zig:"Zig",v:"Vlang",odin:"Odin",gleam:"Gleam",grain:"Grain",roc:"Rocket",fs:"Fsharp",sh:"Console",bash:"Console",zsh:"Console",fish:"Console",ps1:"Powershell",cfg:"Settings",ini:"Settings",conf:"Settings",properties:"Settings",svg:"Svg",png:"Image",jpg:"Image",jpeg:"Image",gif:"Image",webp:"Image",bmp:"Image",ico:"Favicon",mp4:"Video",mov:"Video",avi:"Video",webm:"Video",mp3:"Audio",wav:"Audio",flac:"Audio",zip:"Zip",tar:"Zip",gz:"Zip",rar:"Zip","7z":"Zip",pdf:"Pdf",doc:"Word",docx:"Word",ppt:"Powerpoint",pptx:"Powerpoint",xls:"Document",xlsx:"Document",sql:"Database",db:"Database",sqlite:"Database",env:"Tune",log:"Log",lock:"Lock",key:"Key",pem:"Certificate",crt:"Certificate",proto:"Proto",graphql:"Graphql",gql:"Graphql",wasm:"Webassembly",dockerfile:"Docker"},folderNames:{src:"FolderSrc",source:"FolderSrc",lib:"FolderLib",libs:"FolderLib",test:"FolderTest",tests:"FolderTest",testing:"FolderTest",spec:"FolderTest",specs:"FolderTest",__tests__:"FolderTest",e2e:"FolderTest",integration:"FolderTest",unit:"FolderTest",cypress:"FolderCypress",node_modules:"FolderNode",vendor:"FolderPackages",packages:"FolderPackages",deps:"FolderPackages",build:"FolderBuildkite",dist:"FolderDist",out:"FolderDist",output:"FolderDist",target:"FolderTarget",config:"FolderConfig",configs:"FolderConfig",configuration:"FolderConfig",settings:"FolderConfig",env:"FolderEnvironment",environments:"FolderEnvironment",docker:"FolderDocker",dockerfiles:"FolderDocker",containers:"FolderDocker",docs:"FolderDocs",doc:"FolderDocs",documentation:"FolderDocs",readme:"FolderDocs",public:"FolderPublic",static:"FolderPublic",assets:"FolderImages",images:"FolderImages",img:"FolderImages",icons:"FolderImages",media:"FolderImages",fonts:"FolderFont",styles:"FolderCss",stylesheets:"FolderCss",css:"FolderCss",sass:"FolderSass",scss:"FolderSass",less:"FolderLess",scripts:"FolderScripts",script:"FolderScripts",tools:"FolderTools",utils:"FolderUtils",utilities:"FolderUtils",helpers:"FolderHelper",components:"FolderComponents",component:"FolderComponents",views:"FolderViews",view:"FolderViews",layouts:"FolderLayout",layout:"FolderLayout",templates:"FolderTemplate",template:"FolderTemplate",hooks:"FolderHook",hook:"FolderHook",store:"FolderStore",stores:"FolderStore",state:"FolderNgrxStore",reducers:"FolderReduxReducer",reducer:"FolderReduxReducer",services:"FolderApi",service:"FolderApi",api:"FolderApi",apis:"FolderApi",routes:"FolderRoutes",route:"FolderRoutes",routing:"FolderRoutes",middleware:"FolderMiddleware",middlewares:"FolderMiddleware",controllers:"FolderController",controller:"FolderController",models:"FolderDatabase",model:"FolderDatabase",schemas:"FolderDatabase",schema:"FolderDatabase",migrations:"FolderDatabase",migration:"FolderDatabase",seeders:"FolderSeeders",seeder:"FolderSeeders",types:"FolderTypescript",typing:"FolderTypescript",typings:"FolderTypescript","@types":"FolderTypescript",interfaces:"FolderInterface",interface:"FolderInterface",android:"FolderAndroid",ios:"FolderIos",mobile:"FolderMobile",flutter:"FolderFlutter",kubernetes:"FolderKubernetes",k8s:"FolderKubernetes",terraform:"FolderTerraform",aws:"FolderAws",azure:"FolderAzurePipelines",firebase:"FolderFirebase",supabase:"FolderSupabase",vercel:"FolderVercel",netlify:"FolderNetlify",".github":"FolderGithub",".gitlab":"FolderGitlab",".circleci":"FolderCircleci",ci:"FolderCi",".ci":"FolderCi",workflows:"FolderGhWorkflows",".git":"FolderGit",".vscode":"FolderVscode",".idea":"FolderIntellij",".cursor":"FolderCursor",".devcontainer":"FolderContainer",".storybook":"FolderStorybook",i18n:"FolderI18n",locales:"FolderI18n",locale:"FolderI18n",lang:"FolderI18n",languages:"FolderI18n",temp:"FolderTemp",tmp:"FolderTemp",logs:"FolderLog",log:"FolderLog",backup:"FolderBackup",backups:"FolderBackup",examples:"FolderExamples",example:"FolderExamples",demo:"FolderExamples",demos:"FolderExamples",samples:"FolderExamples",sample:"FolderExamples",fixtures:"FolderTest",mocks:"FolderMock",mock:"FolderMock",data:"FolderDatabase",database:"FolderDatabase",db:"FolderDatabase",sql:"FolderDatabase",prisma:"FolderPrisma",drizzle:"FolderDrizzle",security:"FolderSecure",auth:"FolderSecure",authentication:"FolderSecure",authorization:"FolderSecure",keys:"FolderKeys",certs:"FolderKeys",certificates:"FolderKeys",content:"FolderContent",posts:"FolderContent",articles:"FolderContent",blog:"FolderContent",functions:"FolderFunctions",function:"FolderFunctions",lambda:"FolderFunctions",lambdas:"FolderFunctions",serverless:"FolderServerless",jobs:"FolderJob",job:"FolderJob",tasks:"FolderTasks",task:"FolderTasks",cron:"FolderTasks",queue:"FolderQueue",queues:"FolderQueue",desktop:"FolderDesktop",windows:"FolderWindows",macos:"FolderMacos",linux:"FolderLinux"},defaults:{file:"Document",folder:"Folder",folderOpen:"FolderOpen"}},So=e=>e.startsWith("Folder")?e.endsWith("_light")?e.replace("_light","Open_light"):e.endsWith("Open")?e:e+"Open":e,Co=e=>e.split("\\").join("/").split("/").filter(Boolean).pop()??"",Io=e=>{const t=e.toLowerCase();return[t,`.${t}`,`_${t}`,`__${t}__`]},Ko=e=>{const t=e.toLowerCase(),n=[];for(let r=0;r<t.length;r++)t[r]==="."&&n.push(r);const o=new Set;o.add(t);for(const r of n)r+1<t.length&&o.add(t.slice(r+1));return Array.from(o).sort((r,a)=>a.length-r.length)};function xo(e,t,n){const r=Co(e).toLowerCase();if(t==="directory"){for(const i of Io(r)){const s=le.folderNames[i];if(s)return n?So(s):s}return n?le.defaults.folderOpen:le.defaults.folder}const a=le.fileNames[r];if(a)return a;for(const i of Ko(r)){const s=le.fileExtensions[i];if(s)return s}return le.defaults.file}var Do=["id","name","validationState","required","disabled","readOnly"];function ko(e){const t=`form-control-${re()}`,n=j({id:t},e),[o,r]=k(),[a,i]=k(),[s,l]=k(),[c,u]=k(),d=(b,f,C)=>{const g=C!=null||o()!=null;return[C,o(),g&&f!=null?b:void 0].filter(Boolean).join(" ")||void 0},p=b=>[s(),c(),b].filter(Boolean).join(" ")||void 0,F=L(()=>({"data-valid":m(n.validationState)==="valid"?"":void 0,"data-invalid":m(n.validationState)==="invalid"?"":void 0,"data-required":m(n.required)?"":void 0,"data-disabled":m(n.disabled)?"":void 0,"data-readonly":m(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>m(n.name)??m(n.id),dataset:F,validationState:()=>m(n.validationState),isRequired:()=>m(n.required),isDisabled:()=>m(n.disabled),isReadOnly:()=>m(n.readOnly),labelId:o,fieldId:a,descriptionId:s,errorMessageId:c,getAriaLabelledBy:d,getAriaDescribedBy:p,generateId:me(()=>m(n.id)),registerLabel:U(r),registerField:U(i),registerDescription:U(l),registerErrorMessage:U(u)}}}var kt=ee();function ve(){const e=Q(kt);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function Ve(e){const t=ve(),n=j({id:t.generateId("description")},e);return E(()=>O(t.registerDescription(n.id))),h(z,x({as:"div"},()=>t.dataset(),n))}function To(e){let t;const n=ve(),o=j({id:n.generateId("label")},e),[r,a]=M(o,["ref"]),i=Yt(()=>t,()=>"label");return E(()=>O(n.registerLabel(a.id))),h(z,x({as:"label",ref(s){var l=J(c=>t=c,r.ref);typeof l=="function"&&l(s)},get for(){return oe(()=>i()==="label")()?n.fieldId():void 0}},()=>n.dataset(),a))}function Tt(e,t){E(te(e,n=>{if(n==null)return;const o=Lo(n);o!=null&&(o.addEventListener("reset",t,{passive:!0}),O(()=>{o.removeEventListener("reset",t)}))}))}function Lo(e){return Ao(e)?e.form:e.closest("form")}function Ao(e){return e.matches("textarea, input, select, button")}function He(e){const t=ve(),n=j({id:t.generateId("error-message")},e),[o,r]=M(n,["forceMount"]),a=()=>t.validationState()==="invalid";return E(()=>{a()&&O(t.registerErrorMessage(r.id))}),h(N,{get when(){return o.forceMount||a()},get children(){return h(z,x({as:"div"},()=>t.dataset(),r))}})}var Eo={};Me(Eo,{Description:()=>Ve,ErrorMessage:()=>He,Item:()=>Et,ItemControl:()=>Be,ItemDescription:()=>Ne,ItemIndicator:()=>ze,ItemInput:()=>Mt,ItemLabel:()=>Ge,Label:()=>We,RadioGroup:()=>De,Root:()=>Pt,useRadioGroupContext:()=>xe});var Lt=ee();function xe(){const e=Q(Lt);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var At=ee();function de(){const e=Q(At);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function Et(e){const t=ve(),n=xe(),o=`${t.generateId("item")}-${re()}`,r=j({id:o},e),[a,i]=M(r,["value","disabled","onPointerDown"]),[s,l]=k(),[c,u]=k(),[d,p]=k(),[F,v]=k(),[b,f]=k(!1),C=L(()=>n.isDefaultValue(a.value)),g=L(()=>n.isSelectedValue(a.value)),D=L(()=>a.disabled||t.isDisabled()||!1),K=A=>{q(A,a.onPointerDown),b()&&A.preventDefault()},y=L(()=>({...t.dataset(),"data-disabled":D()?"":void 0,"data-checked":g()?"":void 0})),_={value:()=>a.value,dataset:y,isDefault:C,isSelected:g,isDisabled:D,inputId:s,labelId:c,descriptionId:d,inputRef:F,select:()=>n.setSelectedValue(a.value),generateId:me(()=>i.id),registerInput:U(l),registerLabel:U(u),registerDescription:U(p),setIsFocused:f,setInputRef:v};return h(At.Provider,{value:_,get children(){return h(z,x({as:"div",role:"group",onPointerDown:K},y,i))}})}function Be(e){const t=de(),n=j({id:t.generateId("control")},e),[o,r]=M(n,["onClick","onKeyDown"]);return h(z,x({as:"div",onClick:s=>{q(s,o.onClick),t.select(),t.inputRef()?.focus()},onKeyDown:s=>{q(s,o.onKeyDown),s.key===Zt.Space&&(t.select(),t.inputRef()?.focus())}},()=>t.dataset(),r))}function Ne(e){const t=de(),n=j({id:t.generateId("description")},e);return E(()=>O(t.registerDescription(n.id))),h(z,x({as:"div"},()=>t.dataset(),n))}function ze(e){const t=de(),n=j({id:t.generateId("indicator")},e),[o,r]=M(n,["ref","forceMount"]),[a,i]=k(),{present:s}=mt({show:()=>o.forceMount||t.isSelected(),element:()=>a()??null});return h(N,{get when(){return s()},get children(){return h(z,x({as:"div",ref(l){var c=J(i,o.ref);typeof c=="function"&&c(l)}},()=>t.dataset(),r))}})}function Mt(e){const t=ve(),n=xe(),o=de(),r=j({id:o.generateId("input")},e),[a,i]=M(r,["ref","style","aria-labelledby","aria-describedby","onChange","onFocus","onBlur"]),s=()=>[a["aria-labelledby"],o.labelId(),a["aria-labelledby"]!=null&&i["aria-label"]!=null?i.id:void 0].filter(Boolean).join(" ")||void 0,l=()=>[a["aria-describedby"],o.descriptionId(),n.ariaDescribedBy()].filter(Boolean).join(" ")||void 0,[c,u]=k(!1),d=v=>{if(q(v,a.onChange),v.stopPropagation(),!c()){n.setSelectedValue(o.value());const b=v.target;b.checked=o.isSelected()}u(!1)},p=v=>{q(v,a.onFocus),o.setIsFocused(!0)},F=v=>{q(v,a.onBlur),o.setIsFocused(!1)};return E(te([()=>o.isSelected(),()=>o.value()],v=>{if(!v[0]&&v[1]===o.value())return;u(!0);const b=o.inputRef();b?.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),b?.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),E(()=>O(o.registerInput(i.id))),h(z,x({as:"input",ref(v){var b=J(o.setInputRef,a.ref);typeof b=="function"&&b(v)},type:"radio",get name(){return t.name()},get value(){return o.value()},get checked(){return o.isSelected()},get required(){return t.isRequired()},get disabled(){return o.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return Ie({...Xt},a.style)},get"aria-labelledby"(){return s()},get"aria-describedby"(){return l()},onChange:d,onFocus:p,onBlur:F},()=>o.dataset(),i))}function Ge(e){const t=de(),n=j({id:t.generateId("label")},e);return E(()=>O(t.registerLabel(n.id))),h(z,x({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function We(e){return h(To,x({as:"span"},e))}function Pt(e){let t;const n=`radiogroup-${re()}`,o=j({id:n,orientation:"vertical"},e),[r,a,i]=M(o,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],Do),[s,l]=Ke({value:()=>r.value,defaultValue:()=>r.defaultValue,onChange:f=>r.onChange?.(f)}),{formControlContext:c}=ko(a);Tt(()=>t,()=>l(r.defaultValue??""));const u=()=>c.getAriaLabelledBy(m(a.id),i["aria-label"],r["aria-labelledby"]),d=()=>c.getAriaDescribedBy(r["aria-describedby"]),p=f=>f===e.defaultValue,F=f=>f===s(),b={ariaDescribedBy:d,isDefaultValue:p,isSelectedValue:F,setSelectedValue:f=>{if(!(c.isReadOnly()||c.isDisabled())&&(l(f),t))for(const C of t.querySelectorAll("[type='radio']")){const g=C;g.checked=F(g.value)}}};return h(kt.Provider,{value:c,get children(){return h(Lt.Provider,{value:b,get children(){return h(z,x({as:"div",ref(f){var C=J(g=>t=g,r.ref);typeof C=="function"&&C(f)},role:"radiogroup",get id(){return m(a.id)},get"aria-invalid"(){return c.validationState()==="invalid"||void 0},get"aria-required"(){return c.isRequired()||void 0},get"aria-disabled"(){return c.isDisabled()||void 0},get"aria-readonly"(){return c.isReadOnly()||void 0},get"aria-orientation"(){return r.orientation},get"aria-labelledby"(){return u()},get"aria-describedby"(){return d()}},()=>c.dataset(),i))}})}})}var De=Object.assign(Pt,{Description:Ve,ErrorMessage:He,Item:Et,ItemControl:Be,ItemDescription:Ne,ItemIndicator:ze,ItemInput:Mt,ItemLabel:Ge,Label:We});function Mo(e,t){const n=new ResizeObserver(e);return O(n.disconnect.bind(n)),{observe:o=>n.observe(o,t),unobserve:n.unobserve.bind(n)}}function Po(e,t,n){const o=new WeakMap,{observe:r,unobserve:a}=Mo(i=>{for(const s of i){const{contentRect:l,target:c}=s,u=Math.round(l.width),d=Math.round(l.height),p=o.get(c);(!p||p.width!==u||p.height!==d)&&(t(l,c,s),o.set(c,{width:u,height:d}))}},n);E(i=>{const s=Qt(en(m(e)));return tn(s,i,r,a),s},[])}var Rt=ee();function Ot(){const e=Q(Rt);if(e===void 0)throw new Error("[kobalte]: `useSegmentedControlContext` must be used within a `SegmentedControl` component");return e}function Ro(e){const t=Ot(),[n,o]=M(e,["style"]),[r,a]=k(),[i,s]=k(!1),l=()=>{const u=t.selectedItem();if(!u){a(void 0);return}a({width:`${u.offsetWidth}px`,height:`${u.offsetHeight}px`,transform:c(u),"transition-duration":i()?"0ms":void 0})},c=u=>{const d=getComputedStyle(u.parentElement),p=u.offsetLeft-Number.parseFloat(d.paddingLeft),F=u.offsetTop-Number.parseFloat(d.paddingTop);return`translate(${p}px, ${F}px)`};return E(te(t.selectedItem,()=>{s(!r()),l(),s(!1)})),Po(t.root,()=>{nn(()=>{s(!0),l(),s(!1)})}),h(z,x({as:"div",role:"presentation",get style(){return Ie(r(),n.style)},get"data-resizing"(){return i()},get"data-orientation"(){return t.orientation()}},o))}var Oo=e=>{const t=xe(),n=Ot(),[o,r]=M(e,["ref"]),[a,i]=k();return E(()=>{const s=a();s&&t.isSelectedValue(e.value)&&n.setSelectedItem(s)}),h(De.Item,x({ref(s){var l=J(i,o.ref);typeof l=="function"&&l(s)}},r))},_o=e=>{const t=de(),[n,o]=M(e,["ref"]),[r,a]=k();return Tt(r,()=>{requestAnimationFrame(()=>{t.isDefault()&&t.select()})}),h(De.ItemInput,x({ref(i){var s=J(a,n.ref);typeof s=="function"&&s(i)}},o))},$o=e=>{const t=x({defaultValue:e.value,orientation:"horizontal"},e),[n,o]=M(t,["ref"]),[r,a]=k(),[i,s]=k(),l={value:()=>o.value,defaultValue:()=>o.defaultValue,orientation:()=>o.orientation,root:r,selectedItem:i,setSelectedItem:s};return E(()=>{l.value()||s(void 0)}),h(Rt.Provider,{value:l,get children(){return h(De,x({ref(c){var u=J(a,n.ref);typeof u=="function"&&u(c)}},o))}})},fe=Object.assign($o,{Description:Ve,ErrorMessage:He,Indicator:Ro,Item:Oo,ItemControl:Be,ItemDescription:Ne,ItemIndicator:ze,ItemInput:_o,ItemLabel:Ge,Label:We}),jo=R("<div role=presentation data-slot=radio-group-wrapper><div role=presentation data-slot=radio-group-items>"),Vo=R("<span data-slot=radio-group-item-control>");function Ho(e){const[t,n]=M(e,["class","classList","options","current","defaultValue","value","label","onSelect","size","fill","pad"]),o=i=>t.value?t.value(i):String(i),r=i=>t.label?t.label(i):String(i),a=i=>t.options.find(s=>o(s)===i);return h(fe,x(n,{"data-component":"radio-group",get"data-size"(){return t.size??"medium"},get"data-fill"(){return t.fill?"":void 0},get"data-pad"(){return t.pad??"normal"},get classList(){return{...t.classList,[t.class??""]:!!t.class}},get value(){return oe(()=>!!t.current)()?o(t.current):void 0},get defaultValue(){return oe(()=>!!t.defaultValue)()?o(t.defaultValue):void 0},onChange:i=>t.onSelect?.(a(i)),get children(){var i=jo(),s=i.firstChild;return T(i,h(fe.Indicator,{"data-slot":"radio-group-indicator"}),s),T(s,h(Pe,{get each(){return t.options},children:l=>h(fe.Item,{get value(){return o(l)},"data-slot":"radio-group-item",get"data-value"(){return o(l)},get children(){return[h(fe.ItemInput,{"data-slot":"radio-group-item-input"}),h(fe.ItemLabel,{"data-slot":"radio-group-item-label",get children(){var c=Vo();return T(c,()=>r(l)),c}})]}})})),i}}))}function Bo(e){return h(he.Header,{"data-component":"sticky-accordion-header",get classList(){return{...e.classList,[e.class??""]:!!e.class}},get children(){return e.children}})}function No(e){const t=e.split(/\n/),n=[];let o=0;function r(){const s={};for(n.push(s);o<t.length;){const l=t[o];if(/^(---|\+\+\+|@@)\s/.test(l))break;const c=/^(?:Index:|diff(?: -r \w+)+)\s+/.exec(l);c&&(s.index=l.substring(c[0].length).trim()),o++}for(a(s),a(s),s.hunks=[];o<t.length;){const l=t[o];if(/^(Index:\s|diff\s|---\s|\+\+\+\s|===================================================================)/.test(l))break;if(/^@@/.test(l))s.hunks.push(i());else{if(l)throw new Error("Unknown line "+(o+1)+" "+JSON.stringify(l));o++}}}function a(s){const l=/^(---|\+\+\+)\s+/.exec(t[o]);if(l){const c=l[1],u=t[o].substring(3).trim().split(" ",2),d=(u[1]||"").trim();let p=u[0].replace(/\\\\/g,"\\");p.startsWith('"')&&p.endsWith('"')&&(p=p.substr(1,p.length-2)),c==="---"?(s.oldFileName=p,s.oldHeader=d):(s.newFileName=p,s.newHeader=d),o++}}function i(){var s;const l=o,c=t[o++],u=c.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),d={oldStart:+u[1],oldLines:typeof u[2]>"u"?1:+u[2],newStart:+u[3],newLines:typeof u[4]>"u"?1:+u[4],lines:[]};d.oldLines===0&&(d.oldStart+=1),d.newLines===0&&(d.newStart+=1);let p=0,F=0;for(;o<t.length&&(F<d.oldLines||p<d.newLines||!((s=t[o])===null||s===void 0)&&s.startsWith("\\"));o++){const v=t[o].length==0&&o!=t.length-1?" ":t[o][0];if(v==="+"||v==="-"||v===" "||v==="\\")d.lines.push(t[o]),v==="+"?p++:v==="-"?F++:v===" "&&(p++,F++);else throw new Error(`Hunk at line ${l+1} contained invalid line ${t[o]}`)}if(!p&&d.newLines===1&&(d.newLines=0),!F&&d.oldLines===1&&(d.oldLines=0),p!==d.newLines)throw new Error("Added line count did not match for hunk at line "+(l+1));if(F!==d.oldLines)throw new Error("Removed line count did not match for hunk at line "+(l+1));return d}for(;o<t.length;)r();return n}const rt=new Map;function zo(e){const[t]=No(e),n=[],o=[];if(!t)return{before:"",after:""};for(const r of t.hunks)for(const a of r.lines)a.startsWith("-")?n.push(a.slice(1)):(a.startsWith("+")||n.push(a.slice(1)),o.push(a.slice(1)));return{before:n.join(`
2
+ `)+`
3
+ `,after:o.join(`
4
+ `)+`
5
+ `}}function Ue(e){return e.file??""}function Go(e){if(typeof e.patch=="string")return{...zo(e.patch),patch:e.patch};const t="before"in e&&typeof e.before=="string"?e.before:"",n="after"in e&&typeof e.after=="string"?e.after:"",o=Ue(e),r=dn(un(o,o,t,n,"","",{context:Number.MAX_SAFE_INTEGER}));return{before:t,after:n,patch:r}}function Wo(e,t){const n=rt.get(t.patch);if(n)return n;const o=typeof e.patch=="string"?fn(e.patch,{cacheKey:e.patch}):void 0,r=Ue(e),a=o??gn({name:r,contents:t.before},{name:r,contents:t.after});return rt.set(t.patch,a),a}function Uo(e){const t=Go(e);return{file:Ue(e),patch:t.patch,before:t.before,after:t.after,additions:e.additions,deletions:e.deletions,status:e.status,fileDiff:Wo(e,t)}}const qo="word-alt",Jo=`
6
+ :host {
7
+ --diffs-fg-number-deletion-override: var(--diffs-fg-number-override, var(--diffs-fg));
8
+ --diffs-bg-deletion-override: var(--surface-diff-delete-base, var(--diffs-deletion-base));
9
+ }
10
+ [data-indicators='bars'] [data-column-number][data-line-type='change-deletion'] {
11
+ --diffs-deletion-base: var(--surface-diff-delete-strong, #ff6762);
12
+ }
13
+ [data-diff][data-background] [data-line][data-line-type='change-addition'] {
14
+ --diffs-computed-diff-line-bg: var(--surface-diff-add-base, var(--diffs-bg-addition));
15
+ --diffs-computed-selected-line-bg: var(--surface-diff-add-base, var(--diffs-bg-addition));
16
+ }
17
+ [data-diff][data-background] [data-column-number][data-line-type='change-addition'] {
18
+ --diffs-computed-diff-line-bg: var(--surface-diff-add-weaker, var(--diffs-bg-addition-number));
19
+ --diffs-computed-selected-line-bg: var(--surface-diff-add-weaker, var(--diffs-bg-addition-number));
20
+ }
21
+ [data-diff][data-background] [data-line][data-line-type='change-deletion'] {
22
+ --diffs-computed-diff-line-bg: var(--surface-diff-delete-base, var(--diffs-bg-deletion));
23
+ --diffs-computed-selected-line-bg: var(--surface-diff-delete-base, var(--diffs-bg-deletion));
24
+ }
25
+ [data-diff][data-background] [data-column-number][data-line-type='change-deletion'] {
26
+ --diffs-computed-diff-line-bg: var(--surface-diff-delete-weaker, var(--diffs-bg-deletion-number));
27
+ --diffs-computed-selected-line-bg: var(--surface-diff-delete-weaker, var(--diffs-bg-deletion-number));
28
+ }
29
+ `;function Yo(e){const t=hn(e);return{...t,diffIndicators:"bars",lineDiffType:qo,unsafeCSS:`${t.unsafeCSS}
30
+ ${Jo}`}}var Zo=R("<div data-component=file data-mode=diff>");const Xo=mn;function st(e){return typeof e?.contents=="string"?e.contents:""}function Qo(e){const t=e.querySelector("diffs-container");if(!(t instanceof HTMLElement))return;const n=document.documentElement.dataset.colorScheme;if(n==="dark"||n==="light"){t.dataset.colorScheme=n;return}t.removeAttribute("data-color-scheme")}function er(e){let t,n;const[o,r]=M(e,["fileDiff","before","after","patch","diffStyle","class","classList","annotations","onRendered","virtualized"]),a=L(()=>({...Yo(o.diffStyle),...r}));return E(te(()=>{const i=o.before,s=o.after;return{opts:a(),style:o.diffStyle,diff:o.fileDiff,before:i,after:s,old:st(i),next:st(s),beforeName:i?.name,afterName:s?.name,notes:o.annotations??[]}},(i,s)=>{const l=i.notes;if(s&&s.opts===i.opts&&s.style===i.style&&s.diff===i.diff&&s.before===i.before&&s.after===i.after&&s.old===i.old&&s.next===i.next&&s.beforeName===i.beforeName&&s.afterName===i.afterName){if(!n)return;n.setLineAnnotations(l),n.rerender();return}n?.cleanUp();const u=pn(i.style);n=new vn(i.opts,u),t.innerHTML="",i.diff&&n.render({fileDiff:i.diff,lineAnnotations:l,containerWrapper:t}),!i.diff&&i.before&&i.after&&n.render({oldFile:{...i.before,contents:i.old},newFile:{...i.after,contents:i.next},lineAnnotations:l,containerWrapper:t}),Qo(t),Ee(()=>o.onRendered?.())})),O(()=>{n?.cleanUp(),n=void 0}),(()=>{var i=Zo(),s=t;return typeof s=="function"?Fe(s,i):t=i,X(l=>{var c=yn,u=o.class,d=o.classList;return l.e=on(i,c,l.e),u!==l.t&&Se(i,l.t=u),l.a=Re(i,d,l.a),l},{e:void 0,t:void 0,a:void 0}),i})()}function tr(e){return e.virtualized!==!1?h(Xo,x(e,{mode:"diff"})):h(er,e)}var nr=R("<div class=scroll-view__thumb style=z-index:100>"),or=R("<div><div class=scroll-view__viewport data-scrollable tabindex=0 role=region>");const rr=e=>{if(!(e.altKey||e.ctrlKey||e.metaKey)&&!(e.shiftKey&&e.key!==" "))switch(e.key){case"PageDown":return"page-down";case"PageUp":return"page-up";case"Home":return"home";case"End":return"end";case"ArrowUp":return"up";case"ArrowDown":return"down";case" ":return e.shiftKey?"page-up":"page-down"}};function sr(e,t){return t==="up"||t==="page-up"||t==="home"?e.scrollTop>0:e.scrollTop+e.clientHeight<e.scrollHeight}function ir(e,t,n){const r=(t instanceof Element?t:void 0)?.closest("[data-scrollable]");return!r||r===e?e:e.contains(r)?sr(r,n)?r:e:r}function lr(e,t){const n=e instanceof HTMLElement?e:void 0;return n?!(["INPUT","TEXTAREA","SELECT"].includes(n.tagName)||n.isContentEditable||(t==="page-up"||t==="page-down")&&n.closest('button, a[href], [role="button"]')):!0}function ar(e){const n=e.clientHeight-16-e.thumbHeight;return n<=0?0:Math.max(0,Math.min(e.pointer-e.viewportTop-8-e.grabOffset,n))/n*Math.max(0,e.scrollHeight-(e.scrollClientHeight??e.clientHeight))}function cr(e){const t=ct(),n=x({orientation:"vertical",thumbVisibility:"hover"},e),[o,r,a]=M(n,["class","children","viewportRef","orientation","thumbVisibility","thumbContainer","thumbHoverTarget","style"],["onScroll","onWheel","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel","onPointerDown","onClick","onKeyDown"]);let i,s,l;const c=w=>typeof w=="function"?w():w,u=L(()=>c(o.thumbContainer)),d=L(()=>c(o.thumbHoverTarget)),p=()=>!d(),[F,v]=sn({isHovered:!1,isDragging:!1,isScrolling:!1,thumbHeight:0,thumbTop:0,showThumb:!1}),b=()=>F.isHovered,f=()=>F.isDragging,C=()=>F.isScrolling,g=()=>F.thumbHeight,D=()=>F.thumbTop,K=()=>F.showThumb;let y;const _=()=>{v("isScrolling",!0),y!==void 0&&clearTimeout(y),y=setTimeout(()=>v("isScrolling",!1),800)},A=()=>f()||C()?!0:o.thumbVisibility==="hover"&&b();O(()=>{y!==void 0&&clearTimeout(y)});const S=()=>{if(!s)return;const{scrollTop:w,scrollHeight:I,clientHeight:$}=s;if(I<=$||I===0){v("showThumb",!1);return}v("showThumb",!0);const G=8,B=(u()?.clientHeight||$)-G*2,ke=32;let se=$/I*B;se=Math.max(se,ke);const qe=I-$,Je=B-se,_t=qe>0?w/qe*Je:0,$t=G+Math.max(0,Math.min(_t,Je));v("thumbHeight",se),v("thumbTop",$t)};Ce(()=>{o.viewportRef&&o.viewportRef(s),bn(()=>[s,s.firstElementChild,u()].filter(Boolean),S),S()}),E(()=>{u(),S()}),E(()=>{const w=d();if(!w)return;const I=()=>v("isHovered",!0),$=()=>v("isHovered",!1);w.addEventListener("pointerenter",I),w.addEventListener("pointerleave",$),O(()=>{w.removeEventListener("pointerenter",I),w.removeEventListener("pointerleave",$),v("isHovered",!1)})});const P=w=>{w.preventDefault(),w.stopPropagation(),v("isDragging",!0);const I=w.clientY-l.getBoundingClientRect().top,$=u()??s;l.setPointerCapture(w.pointerId);const G=B=>{const{scrollHeight:ke,clientHeight:se}=s;s.scrollTop=ar({pointer:B.clientY,viewportTop:$.getBoundingClientRect().top,grabOffset:I,clientHeight:$.clientHeight,scrollClientHeight:se,scrollHeight:ke,thumbHeight:g()})},V=B=>{v("isDragging",!1),l.releasePointerCapture(B.pointerId),l.removeEventListener("pointermove",G),l.removeEventListener("pointerup",V),l.removeEventListener("pointercancel",V)};l.addEventListener("pointermove",G),l.addEventListener("pointerup",V),l.addEventListener("pointercancel",V)},H=()=>(()=>{var w=nr();return w.$$pointerdown=P,Fe(I=>{l=I},w),X(I=>{var $=A(),G=f(),V=`${g()}px`,B=`translateY(${D()}px)`;return $!==I.e&&W(w,"data-visible",I.e=$),G!==I.t&&W(w,"data-dragging",I.t=G),V!==I.a&&Ze(w,"height",I.a=V),B!==I.o&&Ze(w,"transform",I.o=B),I},{e:void 0,t:void 0,a:void 0,o:void 0}),w})(),ye=w=>{if(document.activeElement&&["INPUT","TEXTAREA","SELECT"].includes(document.activeElement.tagName))return;const I=rr(w);if(!I||!lr(w.target,I)||ir(s,w.target,I)!==s)return;const $=s.clientHeight*.8,G=40;switch(I){case"page-down":w.preventDefault(),s.scrollBy({top:$,behavior:"smooth"});break;case"page-up":w.preventDefault(),s.scrollBy({top:-$,behavior:"smooth"});break;case"home":w.preventDefault(),s.scrollTo({top:0,behavior:"smooth"});break;case"end":w.preventDefault(),s.scrollTo({top:s.scrollHeight,behavior:"smooth"});break;case"up":w.preventDefault(),s.scrollBy({top:-G,behavior:"smooth"});break;case"down":w.preventDefault(),s.scrollBy({top:G,behavior:"smooth"});break}};return(()=>{var w=or(),I=w.firstChild;w.addEventListener("pointerleave",()=>{p()&&v("isHovered",!1)}),w.addEventListener("pointerenter",()=>{p()&&v("isHovered",!0)});var $=i;typeof $=="function"?Fe($,w):i=w,at(w,x({get class(){return`scroll-view ${o.class||""}`},get style(){return o.style}},a),!1,!0),I.$$keydown=V=>{ye(V),typeof r.onKeyDown=="function"&&r.onKeyDown(V)},ie(I,"click",r.onClick,!0),ie(I,"pointerdown",r.onPointerDown,!0),ie(I,"touchcancel",r.onTouchCancel),ie(I,"touchend",r.onTouchEnd,!0),ie(I,"touchmove",r.onTouchMove,!0),ie(I,"touchstart",r.onTouchStart,!0),I.addEventListener("wheel",V=>{_();const B=r.onWheel;typeof B=="function"&&B(V),Array.isArray(B)&&B[0](B[1],V)}),I.addEventListener("scroll",V=>{S(),_(),typeof r.onScroll=="function"&&r.onScroll(V)});var G=s;return typeof G=="function"?Fe(G,I):s=I,T(I,()=>o.children),T(w,h(N,{get when(){return K()},get children(){return h(N,{get when(){return u()},get fallback(){return H()},children:V=>h(ln,{get mount(){return V()},get children(){return H()}})})}}),null),X(()=>W(I,"aria-label",t.t("ui.scrollView.ariaLabel"))),w})()}rn(["pointerdown","touchstart","touchmove","touchend","click","keydown"]);var dr=R("<div class=pb-6>"),ur=R("<div data-slot=session-review-container>"),fr=R("<div data-component=session-review><div data-slot=session-review-header><div data-slot=session-review-title></div><div data-slot=session-review-actions>"),gr=R("<span data-slot=session-review-directory>"),hr=R("<div data-slot=session-review-change-group data-type=added><span data-slot=session-review-change data-type=added>"),mr=R("<span data-slot=session-review-change data-type=removed>"),pr=R("<span data-slot=session-review-diff-chevron>"),vr=R("<div data-slot=session-review-trigger-content><div data-slot=session-review-file-info><div data-slot=session-review-file-name-container><span data-slot=session-review-filename></span></div></div><div data-slot=session-review-trigger-actions>"),yr=R("<div data-slot=session-review-diff-wrapper>"),br=R("<div data-slot=session-review-large-diff><div data-slot=session-review-large-diff-title data-state=loading><span>");const wr=2e3;function Fr(e){return!(!e||typeof e!="object"||Array.isArray(e)||!("file"in e)||typeof e.file!="string"||!("additions"in e)||typeof e.additions!="number"||!("deletions"in e)||typeof e.deletions!="number")}function Sr(e){return e.filter(Fr)}function it(e){const t=e.lastIndexOf("/");return t<0?"":e.slice(0,t)}function Cr(e){const t=e.lastIndexOf("/");return t<0?e:e.slice(t+1)}function Ir(e){return e.summarized===!0?!1:typeof e.patch=="string"&&e.patch.length>0||lt(e,"before").length>0||lt(e,"after").length>0}function lt(e,t){const n=e[t];return typeof n=="string"?n:""}function Kr(e){return!e.patchBacked||e.additions+e.deletions>wr}function xr(e,t){if(e){if(Array.isArray(e)){const[n,o]=e;n(o,t);return}e(t)}}function Ar(e){const t=ct(),[n,o]=k([]),r=()=>e.open??n(),a=L(()=>Sr(e.diffs).map(p=>({...Uo(p),summarized:p.summarized===!0,tracked:p.tracked,generatedLike:p.generatedLike,ready:Ir(p),patchBacked:typeof p.patch=="string"&&p.patch.length>0}))),i=L(()=>a().map(p=>p.file)),s=()=>a().length>0,l=()=>e.diffStyle??(e.split?"split":"unified"),c=p=>{const F=new Set(i()),v=p.filter(b=>F.has(b));e.onOpenChange?.(v),e.open===void 0&&o(v)},u=()=>{const p=r().length>0?[]:i();c(p)},d=()=>e.title===void 0?t.t("ui.sessionReview.title"):e.title;return(()=>{var p=fr(),F=p.firstChild,v=F.firstChild,b=v.nextSibling;return T(v,d),T(b,h(N,{get when(){return oe(()=>!!s())()&&e.onDiffStyleChange},get children(){return h(Ho,{options:["unified","split"],get current(){return l()},size:"small",value:f=>f,label:f=>t.t(f==="unified"?"ui.sessionReview.diffStyle.unified":"ui.sessionReview.diffStyle.split"),onSelect:f=>f&&e.onDiffStyleChange?.(f)})}}),null),T(b,h(N,{get when(){return s()},get children(){return h(uo,{size:"small",variant:"secondary",icon:"chevron-grabber-vertical",onClick:u,get children(){return h(Le,{get children(){return[h(ne,{get when(){return r().length>0},get children(){return t.t("ui.sessionReview.collapseAll")}}),h(ne,{when:!0,get children(){return t.t("ui.sessionReview.expandAll")}})]}})}})}}),null),T(b,()=>e.actions,null),T(p,h(cr,{"data-slot":"session-review-scroll",get viewportRef(){return e.scrollRef},onScroll:f=>xr(e.onScroll,f),get classList(){return{[e.classes?.root??""]:!!e.classes?.root}},get children(){var f=ur();return T(f,h(N,{get when(){return s()},get fallback(){return e.empty},get children(){var C=dr();return T(C,h(he,{multiple:!0,get value(){return r()},onChange:c,get children(){return h(Pe,{get each(){return a()},children:g=>{const D=()=>r().includes(g.file),K=()=>g.additions!==0||g.deletions!==0,y=()=>g.status==="added"||g.before.length===0&&g.after.length>0,_=()=>g.status==="deleted"||g.after.length===0&&g.before.length>0;return h(he.Item,{get value(){return g.file},"data-slot":"session-review-accordion-item",get"data-file"(){return g.file},get"data-selected"(){return e.focusedFile===g.file?"":void 0},get children(){return[h(Bo,{get children(){return h(he.Trigger,{get disabled(){return!K()},class:"cursor-default",get children(){var A=vr(),S=A.firstChild,P=S.firstChild,H=P.firstChild,ye=S.nextSibling;return T(S,h(Fo,{get node(){return{path:g.file,type:"file"}}}),P),T(P,h(N,{get when(){return it(g.file)},get children(){var w=gr();return T(w,()=>`⁦${it(g.file)}⁩`),w}}),H),T(H,()=>Cr(g.file)),T(ye,h(Le,{get children(){return[h(ne,{get when(){return y()},get children(){var w=hr(),I=w.firstChild;return T(I,()=>t.t("ui.sessionReview.change.added")),T(w,h(nt,{changes:g}),null),w}}),h(ne,{get when(){return _()},get children(){var w=mr();return T(w,()=>t.t("ui.sessionReview.change.removed")),w}}),h(ne,{when:!0,get children(){return h(nt,{changes:g})}})]}}),null),T(ye,h(N,{get when(){return K()},get children(){var w=pr();return T(w,h(an,{name:"chevron-down",size:"small"})),w}}),null),A}})}}),h(he.Content,{"data-slot":"session-review-accordion-content",get children(){return h(N,{get when(){return D()},get children(){var A=yr();return T(A,h(N,{get when(){return g.ready},get fallback(){return(()=>{var S=br(),P=S.firstChild,H=P.firstChild;return T(P,h(wn,{}),H),T(H,()=>t.t("ui.sessionReview.image.loading")),S})()},get children(){return h(tr,{get fileDiff(){return g.fileDiff},get diffStyle(){return l()},get virtualized(){return Kr(g)},get onRendered(){return e.onDiffRendered}})}})),A}})}})]}})}})}})),C}})),X(()=>Se(f,e.classes?.container)),f}}),null),X(f=>{var C=e.class,g=e.classList,D=e.classes?.header;return C!==f.e&&Se(p,f.e=C),f.t=Re(p,g,f.t),D!==f.a&&Se(F,f.a=D),f},{e:void 0,t:void 0,a:void 0}),p})()}export{Ar as SessionReview};
@@ -0,0 +1 @@
1
+ import{G as r,K as n,H as l,i as o,t as i}from"./index-aE_EEdSy.js";var c=i("<span>");function u(a){const[s,e]=r(a,["size","tone","class","classList","children"]);return(()=>{var t=c();return n(t,l(e,{"data-component":"tag",get"data-size"(){return s.size??"normal"},get"data-tone"(){return s.tone??"neutral"},get classList(){return{...s.classList,[s.class??""]:!!s.class}}}),!1,!0),o(t,()=>s.children),t})()}export{u as T};
@@ -0,0 +1 @@
1
+ import{c as g,d as a,e as M,y as v}from"./index-aE_EEdSy.js";import{u as $}from"./config-rLoO0LDc.js";const q=["#0c0a09","#fafaf9","#f9f76f","#a6a09b","#3794ff","#44403b"],y=[{id:"aura",swatches:["#0f0f0f","#edecee","#a277ff","#f694ff","#a277ff","#2d2d2d"]},{id:"ayu",swatches:["#0B0E14","#BFBDB6","#59C2FF","#D2A6FF","#E6B450","#6C7380"]},{id:"carbonfox",swatches:["#161616","#f2f4f8","#33b1ff","#78a9ff","#ff7eb6","#303030"]},{id:"catppuccin",swatches:["#1e1e2e","#cdd6f4","#89b4fa","#cba6f7","#f5c2e7","#313244"]},{id:"catppuccin-frappe",swatches:["#303446","#c6d0f5","#8da4e2","#ca9ee6","#f4b8e4","#414559"]},{id:"catppuccin-macchiato",swatches:["#24273a","#cad3f5","#8aadf4","#c6a0f6","#f5bde6","#363a4f"]},{id:"cobalt2",swatches:["#193549","#ffffff","#0088ff","#9a5feb","#2affdf","#1f4662"]},{id:"colorblind",swatches:["#1A1A2E","#E8E8E8","#0077BB","#EE7733","#33BBEE","#1F4068"]},{id:"cursor",swatches:["#181818","#e4e4e4","#88c0d0","#81a1c1","#88c0d0","#e4e4e413"]},{id:"dracula",swatches:["#282a36","#f8f8f2","#bd93f9","#ff79c6","#8be9fd","#44475a"]},{id:"everforest",swatches:["#2d353b","#d3c6aa","#a7c080","#7fbbb3","#d699b6","#859289"]},{id:"flexoki",swatches:["#100F0F","#CECDC3","#DA702C","#4385BE","#8B7EC8","#575653"]},{id:"github",swatches:["#0d1117","#c9d1d9","#58a6ff","#bc8cff","#39c5cf","#30363d"]},{id:"gruvbox",swatches:["#282828","#ebdbb2","#83a598","#d3869b","#8ec07c","#665c54"]},{id:"kanagawa",swatches:["#1F1F28","#DCD7BA","#7E9CD8","#957FB8","#D27E99","#54546D"]},{id:"kilo",swatches:["#0c0a09","#fafaf9","#f9f76f","#a6a09b","#f9f76f","#44403b"]},{id:"kilo-v1",swatches:["#1e1e1e","#cccccc","#faf74f","#007acc","#007fd4","#3c3c3c"]},{id:"lucent-orng",swatches:["#000000","#eeeeee","#EC5B2B","#EE7948","#FFF7F1","#EC5B2B"]},{id:"material",swatches:["#263238","#eeffff","#82aaff","#c792ea","#89ddff","#37474f"]},{id:"matrix",swatches:["#0a0e0a","#62ff94","#2eff6a","#00efff","#c770ff","#1e2a1b"]},{id:"mercury",swatches:["#171721","#dddde5","#8da4f5","#a7b6f8","#8da4f5","#b4b7c81f"]},{id:"monokai",swatches:["#272822","#f8f8f2","#66d9ef","#ae81ff","#a6e22e","#3e3d32"]},{id:"nightowl",swatches:["#011627","#d6deeb","#82AAFF","#7fdbca","#c792ea","#5f7e97"]},{id:"nord",swatches:["#2E3440","#ECEFF4","#88C0D0","#81A1C1","#8FBCBB","#434C5E"]},{id:"one-dark",swatches:["#282c34","#abb2bf","#61afef","#c678dd","#56b6c2","#393f4a"]},{id:"opencode",swatches:["#0a0a0a","#eeeeee","#fab283","#5c9cf5","#9d7cd8","#484848"]},{id:"orng",swatches:["#0a0a0a","#eeeeee","#EC5B2B","#EE7948","#FFF7F1","#EC5B2B"]},{id:"osaka-jade",swatches:["#111c18","#C1C497","#2DD5B7","#D2689C","#549e6a","#3d4a44"]},{id:"palenight",swatches:["#292d3e","#a6accd","#82aaff","#c792ea","#89ddff","#32364a"]},{id:"rosepine",swatches:["#191724","#e0def4","#9ccfd8","#c4a7e7","#ebbcba","#403d52"]},{id:"solarized",swatches:["#002b36","#839496","#268bd2","#6c71c4","#2aa198","#073642"]},{id:"synthwave84",swatches:["#262335","#ffffff","#36f9f6","#ff7edb","#b084eb","#495495"]},{id:"tokyonight",swatches:["#1a1b26","#c8d3f5","#82aaff","#c099ff","#ff966c","#737aa2"]},{id:"vercel",swatches:["#000000","#EDEDED","#0070F3","#52A8FF","#8E4EC6","#1F1F1F"]},{id:"vesper",swatches:["#101010","#FFF","#FFC799","#99FFE4","#FFC799","#282828"]},{id:"zenburn",swatches:["#3f3f3f","#dcdccc","#8cd0d3","#dc8cc3","#93e0e3","#5f5f5f"]}];function G(c){return c.split("-").filter(Boolean).map(f=>`${f[0]?.toUpperCase()??""}${f.slice(1)}`).join(" ")}function T(c){return{id:c,swatches:q,custom:!0}}function H(c){return c==="stacked"?"stacked":"auto"}function E(c,f){return typeof c=="boolean"?c:f}function O(){const c=$(),f=g(()=>c.data()?.tui.theme??"kilo"),[i,u]=a(""),[p,l]=a("closed"),[d,b]=a(""),[r,h]=a(""),[w,F]=a("3"),[m,s]=a(!1),[C,t]=a("auto"),[n,A]=a(!0),[S,_]=a(!1),I=g(()=>{const e=v(d()).toLowerCase(),o=y.filter(D=>e?`${D.id} ${G(D.id)}`.toLowerCase().includes(e):!0),k=v(d());return!k||y.some(D=>D.id===k)||o.length?o:[T(k)]});function x(e){return y.find(o=>o.id===e)??T(e||"kilo")}const U=g(()=>x(i())),j=g(()=>x(r()||i()));M(()=>{const e=c.data()?.tui;u(f()),!S()&&(F(String(e?.scroll_speed??3)),s(E(e?.scroll_acceleration?.enabled,!1)),t(H(e?.diff_style)),A(E(e?.mouse,!0)))});function z(){h(i()),b(""),l("theme")}function N(){l("closed")}function L(e){h(e.id)}function B(e){_(!0),e()}function V(){const e=v(r());if(!e){c.fail("Select a TUI theme before saving.");return}c.tui({theme:e}),u(e),N()}function P(){const e=Number(w());if(!Number.isFinite(e)||e<.001){c.fail("Enter a scroll speed of at least 0.001.");return}const o={scroll_speed:e,scroll_acceleration:{enabled:m()},diff_style:C(),mouse:n()};c.tui(o),_(!1)}return{ctx:c,current:f,theme:i,active:U,selected:j,mode:p,picker:d,setPicker:b,choice:r,options:I,edit:z,close:N,select:L,saveTheme:V,speed:w,setSpeed:e=>B(()=>F(e)),accel:m,setAccel:e=>B(()=>s(e)),diff:C,setDiff:e=>B(()=>t(e)),mouse:n,setMouse:e=>B(()=>A(e)),dirty:S,save:P}}function Q(){const c=$(),[f,i]=a(!1),[u,p]=a(!0),[l,d]=a(!0),[b,r]=a("0.4"),[h,w]=a("none"),[F,m]=a(!1);M(()=>{if(F())return;const t=c.data()?.tui,n=t?.attention;i(E(n?.enabled,!1)),p(E(n?.notifications,!0)),d(E(n?.sound,!0)),r(String(n?.volume??.4)),w(t?.title_icon??"none")});function s(t){m(!0),t()}function C(){const t=Number(b());if(!Number.isFinite(t)||t<0||t>1){c.fail("Enter an attention volume between 0 and 1.");return}c.tui({title_icon:h(),attention:{enabled:f(),notifications:u(),sound:l(),volume:t}}),m(!1)}return{ctx:c,alert:f,setAlert:t=>s(()=>i(t)),notify:u,setNotify:t=>s(()=>p(t)),sound:l,setSound:t=>s(()=>d(t)),volume:b,setVolume:t=>s(()=>r(t)),icon:h,setIcon:t=>s(()=>w(t)),dirty:F,save:C}}export{O as a,G as t,Q as u};
@@ -6,8 +6,8 @@
6
6
  <link rel="icon" type="image/svg+xml" href="/console/favicon.svg" />
7
7
  <link rel="icon" type="image/x-icon" href="/console/favicon.ico" />
8
8
  <title>Kilo Console</title>
9
- <script type="module" crossorigin src="/console/assets/index-oVVWPmdA.js"></script>
10
- <link rel="stylesheet" crossorigin href="/console/assets/index-B2oknisZ.css">
9
+ <script type="module" crossorigin src="/console/assets/index-aE_EEdSy.js"></script>
10
+ <link rel="stylesheet" crossorigin href="/console/assets/index-5EVEMIHJ.css">
11
11
  </head>
12
12
  <body>
13
13
  <div id="root"></div>
package/bin/kilo CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kilocode/cli-darwin-arm64",
3
- "version": "7.5.16",
3
+ "version": "7.6.0",
4
4
  "license": "MIT",
5
5
  "preferUnplugged": true,
6
6
  "os": [