@commentkit/comment-kit 1.6.0 → 2.0.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 (136) hide show
  1. package/CHANGELOG.md +281 -597
  2. package/README.md +334 -154
  3. package/SECURITY.md +47 -46
  4. package/dist/node/THIRD_PARTY_NOTICES.txt +56 -0
  5. package/dist/node/browser.js +17 -0
  6. package/dist/node/cli/api.js +226 -0
  7. package/dist/node/cli/bin.js +18 -0
  8. package/dist/node/cli/credentials.js +268 -0
  9. package/dist/node/cli/doctor.js +725 -0
  10. package/dist/node/cli/format.js +54 -0
  11. package/dist/node/cli/init.js +372 -0
  12. package/dist/node/cli/main.js +519 -0
  13. package/dist/node/cli/mcp.js +114 -0
  14. package/dist/node/cli/open.js +20 -0
  15. package/dist/node/plugins/astro-B5y1Gtbf.js +31 -0
  16. package/dist/node/plugins/astro.js +26 -0
  17. package/dist/node/plugins/git-BIXLbL3f.js +92 -0
  18. package/dist/node/plugins/jsx-Bg4BdSph.js +7958 -0
  19. package/dist/node/plugins/next.js +48 -0
  20. package/dist/node/plugins/options-THop1K92.js +71 -0
  21. package/dist/node/plugins/transform-CKiAuSbk.js +1155 -0
  22. package/dist/node/plugins/vite-BdAYUW10.js +74 -0
  23. package/dist/node/plugins/vite.js +1 -0
  24. package/dist/node/plugins/webpack-R2U2DLlY.js +35 -0
  25. package/dist/node/plugins/webpack-loader.cjs +21 -0
  26. package/dist/node/plugins/webpack-loader.js +18 -0
  27. package/dist/node/plugins/webpack.js +1 -0
  28. package/dist/node/shared/endpoint.js +26 -0
  29. package/dist/node/shared/format.js +63 -0
  30. package/dist/node/types/astro.d.ts +11 -0
  31. package/dist/node/types/next.d.ts +34 -0
  32. package/dist/node/types/options.d.ts +59 -0
  33. package/dist/node/types/vite.d.ts +11 -0
  34. package/dist/node/types/webpack-loader.d.ts +22 -0
  35. package/dist/node/types/webpack.d.ts +27 -0
  36. package/dist/npm/THIRD_PARTY_NOTICES.txt +6 -6
  37. package/dist/npm/chunks/AgentSend-DxRJIYiz.js +68 -0
  38. package/dist/npm/chunks/Checklist-CnlfeSbc.js +282 -0
  39. package/dist/npm/chunks/Composer-B1bBVszY.js +725 -0
  40. package/dist/npm/chunks/Guest-vvNPz8h-.js +267 -0
  41. package/dist/npm/chunks/MarkupEditor-VCOXh9d2.js +338 -0
  42. package/dist/npm/chunks/Panel-F37vIL1K.js +1206 -0
  43. package/dist/npm/chunks/Settings-BGoZS2iV.js +231 -0
  44. package/dist/npm/chunks/Shortcuts-B2OMvczr.js +62 -0
  45. package/dist/npm/chunks/StyleEditor-CJ_d8Huf.js +46 -0
  46. package/dist/npm/chunks/StylePanel-yQzHHlY7.js +199 -0
  47. package/dist/npm/chunks/TaskFields-fmy6_HtK.js +289 -0
  48. package/dist/npm/chunks/ThreadCard-D51slKST.js +1113 -0
  49. package/dist/npm/chunks/Viewer-BOBadqmC.js +111 -0
  50. package/dist/npm/chunks/{agent-BDMQtOzH.js → agent-C1OQzBAm.js} +9 -9
  51. package/dist/npm/chunks/{anchor-BsradQhn.js → anchor-BsQNVkHj.js} +108 -85
  52. package/dist/npm/chunks/{ar-8tPch6W4.js → ar-CAJ3XT8e.js} +69 -19
  53. package/dist/npm/chunks/card-bits-CAnzrqx3.js +53 -0
  54. package/dist/npm/chunks/{client-EFTWxHbJ.js → client-kNAo2TTG.js} +282 -290
  55. package/dist/npm/chunks/confetti-CkBdSu19.js +49 -0
  56. package/dist/npm/chunks/context-B8UAzve0.js +20 -0
  57. package/dist/npm/chunks/context-BuMl7A07.js +48 -0
  58. package/dist/npm/chunks/{de-C63897uD.js → de-Dl18G48t.js} +60 -18
  59. package/dist/npm/chunks/dialog-GO04oC3D.js +3 -0
  60. package/dist/npm/chunks/dpop-U48QIQd7.js +96 -0
  61. package/dist/npm/chunks/drafts-B0ctr1g9.js +21 -0
  62. package/dist/npm/chunks/{es-CI2bSpvB.js → es-Dxk79lS9.js} +60 -18
  63. package/dist/npm/chunks/extension-CKFpPWmi.js +62 -0
  64. package/dist/npm/chunks/{extension-BST6LH1q.js → extension-E81hWyiT.js} +20 -12
  65. package/dist/npm/chunks/files-DyD5BZgp.js +114 -0
  66. package/dist/npm/chunks/{fr-rsVe-Lqk.js → fr-8BebGKYD.js} +118 -76
  67. package/dist/npm/chunks/{hi-cvwbSaWP.js → hi-BIN6Yy_p.js} +61 -19
  68. package/dist/npm/chunks/{i18n-C4v0M-6z.js → i18n-DOBt8e9U.js} +91 -56
  69. package/dist/npm/chunks/identify-CN-3xzqL.js +106 -0
  70. package/dist/npm/chunks/{it-C8tnV0BF.js → it-Cr6EwpPQ.js} +79 -37
  71. package/dist/npm/chunks/{ja-BWxDfC2f.js → ja-Iy3s5aur.js} +58 -16
  72. package/dist/npm/chunks/late-words-B2bmZceJ.js +12 -0
  73. package/dist/npm/chunks/live-CelVeZfP.js +85 -0
  74. package/dist/npm/chunks/locale-D8Q4Q2Nt.js +26 -0
  75. package/dist/npm/chunks/{nl-DNQ6eCht.js → nl-B84WHqqe.js} +61 -19
  76. package/dist/npm/chunks/page-key-DepmJzC1.js +62 -0
  77. package/dist/npm/chunks/{pick-CLyOdjnD.js → pick-yTyqtxN0.js} +45 -44
  78. package/dist/npm/chunks/pkce-ChKGSW_4.js +8 -0
  79. package/dist/npm/chunks/placement-BF_HOUDD.js +74 -0
  80. package/dist/npm/chunks/privacy-BWUGlHw5.js +57 -0
  81. package/dist/npm/chunks/{pt-BR-CkG7vpU2.js → pt-BR-DOkdlfoe.js} +60 -18
  82. package/dist/npm/chunks/{realtime-DIo-Wth4.js → realtime-C79zF50C.js} +14 -12
  83. package/dist/npm/chunks/report-CrIqQZDI.js +44 -0
  84. package/dist/npm/chunks/show-BgVC8gWY.js +97 -0
  85. package/dist/npm/chunks/signin-Dd1rb2BP.js +75 -0
  86. package/dist/npm/chunks/{source-CS7C6wJA.js → source-pXVve2Cx.js} +1 -1
  87. package/dist/npm/chunks/src-BTMy4Gyc.js +208 -0
  88. package/dist/npm/chunks/start-DtVlpt7p.js +1878 -0
  89. package/dist/npm/chunks/states-sfTbjZz8.js +3 -0
  90. package/dist/npm/chunks/upload-MgPYqPyE.js +42 -0
  91. package/dist/npm/chunks/uploads-D49mywwz.js +1146 -0
  92. package/dist/npm/chunks/wrap-Bl0gbnFa.js +69 -0
  93. package/dist/npm/chunks/{zh-CN-BKuZOLBE.js → zh-CN-Z5fQCb7G.js} +59 -17
  94. package/dist/npm/element.js +58 -21
  95. package/dist/npm/headless.js +7 -3
  96. package/dist/npm/index.js +3 -3
  97. package/dist/npm/react.js +18 -11
  98. package/dist/npm/svelte.js +28 -12
  99. package/dist/npm/types/adapters/react.d.ts +4 -1
  100. package/dist/npm/types/adapters/svelte.d.ts +4 -1
  101. package/dist/npm/types/adapters/vue.d.ts +35 -2
  102. package/dist/npm/types/anchor/index.d.ts +19 -0
  103. package/dist/npm/types/capture/privacy.d.ts +14 -0
  104. package/dist/npm/types/core/api.d.ts +20 -1
  105. package/dist/npm/types/core/auth.d.ts +40 -21
  106. package/dist/npm/types/core/client.d.ts +60 -4
  107. package/dist/npm/types/core/page-key.d.ts +42 -0
  108. package/dist/npm/types/core/types.d.ts +87 -4
  109. package/dist/npm/types/element.d.ts +17 -7
  110. package/dist/npm/types/headless.d.ts +2 -1
  111. package/dist/npm/types/index.d.ts +16 -6
  112. package/dist/npm/vue.js +44 -9
  113. package/package.json +88 -14
  114. package/dist/npm/chunks/AgentSend-2JPDseOo.js +0 -63
  115. package/dist/npm/chunks/Checklist-BpDXQebo.js +0 -257
  116. package/dist/npm/chunks/Composer-CAyj-c8e.js +0 -677
  117. package/dist/npm/chunks/Guest-ZdFmTcXI.js +0 -187
  118. package/dist/npm/chunks/MarkupEditor-BFplZwFy.js +0 -332
  119. package/dist/npm/chunks/Panel-BhZ4XRDR.js +0 -861
  120. package/dist/npm/chunks/Settings-SPG9EHUZ.js +0 -204
  121. package/dist/npm/chunks/Shortcuts-C28HVDw6.js +0 -58
  122. package/dist/npm/chunks/StyleEditor-ByZMtq10.js +0 -43
  123. package/dist/npm/chunks/StylePanel-Iwhce2tE.js +0 -197
  124. package/dist/npm/chunks/TaskFields-BsP_fVJg.js +0 -273
  125. package/dist/npm/chunks/ThreadCard-BzVZdDCb.js +0 -1030
  126. package/dist/npm/chunks/Viewer-CqtGrdD8.js +0 -108
  127. package/dist/npm/chunks/card-bits-Bna-g3Py.js +0 -124
  128. package/dist/npm/chunks/confetti-DTKpwF3O.js +0 -40
  129. package/dist/npm/chunks/drafts-akdBsOd0.js +0 -50
  130. package/dist/npm/chunks/extension-D-V3utTm.js +0 -53
  131. package/dist/npm/chunks/live-BCpJVBeN.js +0 -33
  132. package/dist/npm/chunks/report-BBrT3r89.js +0 -27
  133. package/dist/npm/chunks/src-C4FsVoUp.js +0 -148
  134. package/dist/npm/chunks/start-i9M-r3aH.js +0 -1800
  135. package/dist/npm/chunks/upload-DSv7EyBD.js +0 -41
  136. package/dist/npm/chunks/uploads-I01kdqQF.js +0 -1103
@@ -1,861 +0,0 @@
1
- import { i as e } from "./client-EFTWxHbJ.js";
2
- import { a as t } from "./anchor-BsradQhn.js";
3
- import { _ as n, a as r, f as i, i as a, l as o, m as s, r as c, s as l, t as u, u as d } from "./i18n-C4v0M-6z.js";
4
- import { i as f } from "./card-bits-Bna-g3Py.js";
5
- import { n as p, r as m } from "./Checklist-BpDXQebo.js";
6
- import { C as ee, S as te, a as h, f as g, g as ne, i as re, l as ie, n as ae, r as oe, u as se, w as ce } from "./start-i9M-r3aH.js";
7
- // src/ui/Panel.tsx
8
- ae(".ck-count{background:var(--ck-bg-hover);color:var(--ck-text-muted);font-variant-numeric:tabular-nums;border-radius:999px;padding:1px 7px;font-size:11.5px;font-weight:700}.ck-item-thumb{outline:1px solid var(--ck-img-outline);outline-offset:-1px}.ck-tabs{border-radius:var(--ck-radius-md);background:var(--ck-bg-muted);gap:2px;margin:8px 10px 0;padding:3px;display:flex}.ck-tab{color:var(--ck-text-muted);white-space:nowrap;background:0 0;border:0;border-radius:7px;flex:1;justify-content:center;align-items:center;gap:6px;padding:5px 8px;font-size:13px;font-weight:600;transition:background-color .12s,color .12s;display:inline-flex}.ck-tab[aria-selected=true]{color:var(--ck-text);background:var(--ck-bg);box-shadow:var(--ck-shadow-sm)}.ck-list{margin:0;padding:4px 6px;list-style:none}.ck-item{text-align:start;border-radius:var(--ck-radius-md);background:0 0;border:0;width:100%;padding:9px 10px;transition:background-color .12s;display:block}.ck-list>li+li,.ck-list>.ck-item+.ck-item{border-top:1px solid var(--ck-hairline)}.ck-item[data-unread=true]{background:var(--ck-accent-soft)}.ck-item[data-shot]{grid-template-columns:minmax(0,1fr) 64px;align-items:start;gap:12px;display:grid}.ck-item-main{min-width:0}.ck-item-top{color:var(--ck-text-muted);align-items:flex-start;gap:8px;font-size:12px;display:flex}.ck-item-tags{flex-wrap:wrap;flex:1;align-items:center;gap:4px 6px;min-width:0;display:flex}.ck-item-tags>strong{color:var(--ck-text);font-variant-numeric:tabular-nums;white-space:nowrap;margin-inline-end:2px;font-weight:650}.ck-item-meta{text-overflow:ellipsis;white-space:nowrap;margin-top:4px;overflow:hidden}.ck-item-thumb{object-fit:cover;object-position:top;background:var(--ck-bg-muted);width:64px;height:44px;box-shadow:0 0 0 1px var(--ck-hairline);border-radius:6px;margin-top:2px}.ck-item-text{-webkit-line-clamp:2;-webkit-box-orient:vertical;margin-top:4px;line-height:1.45;display:-webkit-box;overflow:hidden}.ck-filters{gap:6px;padding:8px 10px;display:flex}.ck-filters+.ck-filters{padding-top:0}#ck-more-filters{flex-wrap:wrap}.ck-filters .ck-choose,.ck-filters .ck-people-pick{flex:none}#ck-more-filters .ck-choose-btn{height:32px;padding-block-start:0;padding-block-end:0;font-size:13px}.ck-pad{padding:8px 10px}.ck-branchbar{flex-wrap:wrap;gap:6px;padding:8px 10px 0;display:flex}.ck-tag{background:var(--ck-bg-hover);color:var(--ck-text-muted);white-space:nowrap;border-radius:999px;padding:1px 7px;font-size:11px;font-weight:600}.ck-badge-soft{white-space:nowrap;background:color-mix(in srgb, var(--ck-warning) 14%, transparent);color:var(--ck-warning);border-radius:999px;padding:1px 7px;font-size:11px;font-weight:600}.ck-loading{padding:4px 16px}.ck-loading-row{padding:12px 0}.ck-loading-row+.ck-loading-row{border-top:1px solid var(--ck-hairline)}.ck-here{color:var(--ck-text-muted);white-space:nowrap;align-items:center;gap:6px;font-size:12px;display:inline-flex}.ck-dot{background:var(--ck-success);width:8px;height:8px;box-shadow:0 0 0 3px color-mix(in srgb, var(--ck-success) 20%, transparent);border-radius:50%}.ck-pad-x{margin:8px 12px 0}@media (pointer:coarse){.ck-tab{min-width:36px;min-height:36px}.ck-item{min-height:48px}}@media (hover:hover){.ck-tab:hover{color:var(--ck-text)}.ck-item:hover{background:var(--ck-bg-muted)}}.ck-count{font-variant-numeric:tabular-nums}.ck-search{flex:1;align-items:center;display:flex;position:relative}.ck-search>svg{color:var(--ck-text-muted);pointer-events:none;position:absolute}.ck-search>svg:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:10px}.ck-search>svg:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:10px}.ck-search>svg:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:10px}.ck-search>svg:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:10px}.ck-chip-quiet{background:0 0;border-color:#0000}.ck-result-count{font-variant-numeric:tabular-nums;white-space:nowrap;margin-inline-start:auto;font-size:12px}.ck-item-meta{align-items:center;gap:4px;display:flex}.ck-live-note{align-items:center;gap:8px;margin:8px 10px 0;display:flex}.ck-faces{display:inline-flex}.ck-faces .ck-avatar{width:22px;height:22px;box-shadow:0 0 0 2px var(--ck-bg);margin-inline-start:-6px;font-size:9px}.ck-faces .ck-avatar:first-child{margin-inline-start:0}.ck-faces-more{color:var(--ck-text-muted);font-variant-numeric:tabular-nums;margin-inline-start:4px;font-size:12px}.ck-people-pick{position:relative}.ck-people-btn{max-width:170px}.ck-people-menu[data-end]:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:auto;right:0}.ck-people-menu[data-end]:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:auto;right:0}.ck-people-menu[data-end]:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:0;right:auto}.ck-people-menu[data-end]:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:0;right:auto}.ck-people-menu{z-index:3;top:calc(100% + 4px);overscroll-behavior:contain;background:var(--ck-bg);min-width:200px;max-height:240px;box-shadow:var(--ck-shadow);animation:ck-pop .12s var(--ck-ease);border:1px solid #0000;border-radius:12px;gap:2px;padding:6px;display:grid;position:absolute;overflow:auto}.ck-people-menu:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:0}.ck-people-menu:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:0}.ck-people-menu:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:0}.ck-people-menu:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:0}.ck-people-menu .ck-check{border-radius:6px;margin:0;padding:4px 6px;font-size:13px}@media (hover:hover){.ck-people-menu .ck-check:hover{background:var(--ck-bg-hover)}}.ck-panel-list,.ck-panel-detail{flex-direction:column;flex:1;min-height:0;display:flex}.ck-panel-list{animation:ck-slide-back .2s var(--ck-ease)}@keyframes ck-slide-back{0%{opacity:.4;translate:-16px}}.ck-list>li{animation:ck-rise .22s var(--ck-ease) backwards;animation-delay:calc(var(--i,0) * 30ms);position:relative}@keyframes ck-rise{0%{opacity:0;translate:0 6px}}.ck-list>li[data-done] .ck-item-main{opacity:.6}.ck-kind{color:var(--ck-text-muted);place-items:center;margin-inline-end:2px;display:inline-grid}.ck-flag{color:var(--ck-text-muted);place-items:center;display:inline-grid}.ck-flag[data-priority=urgent]{color:var(--ck-danger)}.ck-flag[data-priority=high]{color:#e06a00}.ck-flag[data-priority=medium]{color:var(--ck-review)}.ck-item-check{font-variant-numeric:tabular-nums;align-items:center;gap:2px;display:inline-flex}.ck-item-reactions{font-variant-numeric:tabular-nums;gap:6px;margin-inline-start:6px;display:inline-flex}.ck-item-reactions>span{align-items:center;gap:2px;display:inline-flex}.ck-item-reactions .ck-emoji{width:12px;height:12px}.ck-item-faces{margin-inline-start:auto}.ck-item-faces .ck-avatar{width:18px;height:18px;margin-inline-end:0;font-size:8px}.ck-item-actions{top:8px;background:var(--ck-bg);box-shadow:var(--ck-shadow-sm);opacity:0;pointer-events:none;border-radius:8px;gap:2px;padding:2px;transition:opacity .12s;display:flex;position:absolute}.ck-item-actions:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){right:10px}.ck-item-actions:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){right:10px}.ck-item-actions:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:10px}.ck-item-actions:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:10px}.ck-list>li:hover .ck-item-actions,.ck-list>li:focus-within .ck-item-actions{opacity:1;pointer-events:auto}.ck-item-actions .ck-ghost{place-items:center;width:26px;height:26px;padding:0;display:grid}.ck-choose{position:relative}.ck-choose-btn{text-align:start;white-space:nowrap;cursor:pointer;align-items:center;gap:6px;width:auto;max-width:180px;padding-inline-end:8px;display:inline-flex}.ck-choose-btn bdi{text-overflow:ellipsis;min-width:0;overflow:hidden}.ck-choose-btn svg{color:var(--ck-text-muted);transition:rotate .15s var(--ck-ease);flex:none;rotate:90deg}.ck-choose-btn[aria-expanded=true] svg{rotate:-90deg}.ck-choose[data-compact] .ck-choose-btn{border-radius:999px;height:26px;padding-block-start:0;padding-block-end:0;font-size:12px}.ck-choose-menu{z-index:4;top:calc(100% + 4px);overscroll-behavior:contain;background:var(--ck-bg);min-width:180px;max-height:260px;box-shadow:var(--ck-shadow);animation:ck-pop .12s var(--ck-ease);border:1px solid #0000;border-radius:12px;padding:4px;display:grid;position:absolute;overflow:auto}.ck-choose-menu:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:0}.ck-choose-menu:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:0}.ck-choose-menu:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:0}.ck-choose-menu:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:0}.ck-choose-menu[data-end]:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:auto;right:0}.ck-choose-menu[data-end]:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:auto;right:0}.ck-choose-menu[data-end]:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:0;right:auto}.ck-choose-menu[data-end]:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:0;right:auto}.ck-choose-menu button{border-radius:var(--ck-radius-sm);text-align:start;white-space:nowrap;text-overflow:ellipsis;background:0 0;border:0;width:100%;padding:7px 10px;font-size:13px;display:block;overflow:hidden}.ck-choose-menu button[aria-selected=true]{background:var(--ck-accent-soft);font-weight:600}@media (hover:hover){.ck-choose-menu button:hover{background:var(--ck-bg-hover)}}@media (pointer:coarse){.ck-choose-menu button{min-height:40px}.ck-choose-btn{min-height:36px}.ck-item-actions{display:none}}.ck-agent-chip{gap:5px}.ck-agent-chip svg{flex:none}.ck-list>li[data-picking] .ck-item{padding-inline-start:40px}.ck-list>li[data-picking] .ck-item[aria-pressed=true]{background:color-mix(in srgb, var(--ck-accent) 7%, transparent)}.ck-pick{z-index:1;width:16px;height:16px;accent-color:var(--ck-accent);cursor:pointer;margin:0;position:absolute;top:14px}.ck-pick:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:14px}.ck-pick:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:14px}.ck-pick:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:14px}.ck-pick:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:14px}.ck-pickbar{border-top:1px solid var(--ck-hairline);background:var(--ck-bg);align-items:center;gap:8px;padding:10px 12px;display:flex;position:relative}.ck-pickbar>.ck-muted{flex:1;font-size:13px}.ck-pickbar .ck-primary{align-items:center;gap:6px;display:inline-flex}.ck-agent-menu{top:auto;right:auto;bottom:calc(100% + 6px)}.ck-agent-menu:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){right:12px}.ck-agent-menu:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){right:12px}.ck-agent-menu:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:12px}.ck-agent-menu:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:12px}.ck-agent-menu button:disabled{opacity:.5;cursor:default}.ck-agent-note{margin:4px 10px 2px;font-size:12px}@media (pointer:coarse){.ck-pick{width:20px;height:20px;top:16px}}");
9
- var le = {
10
- element: "pin",
11
- region: "area",
12
- text: "quote",
13
- page: "page"
14
- }, ue = {
15
- urgent: 4,
16
- high: 3,
17
- medium: 2,
18
- low: 1,
19
- none: 0
20
- };
21
- function _({ client: u, side: m, dock: ae = "bottom", onClose: _, onOpen: pe, onError: y, detail: ve, notify: b }) {
22
- let x = h(u.state, (e) => e.threads), S = h(u.state, (e) => e.unread), C = h(u.state, (e) => e.allBranches), ye = h(u.state, (e) => e.here), w = h(u.state, (e) => e.session), be = h(u.state, (e) => e.config?.read_only ?? !1), T = u.options.branch, xe = re(), [E, Se] = s(S > 0 ? "inbox" : "page"), [Ce, D] = s({ state: "loading" }), [we, Te] = s(null), [O, k] = s(!1), A = i(0), [Ee, De] = s({ state: "loading" }), [Oe, ke] = s(null), j = i(0), [M, N] = s(""), [P, Ae] = s("active"), [je, Me] = s(0), [F, Ne] = s([]), [I, Pe] = s(""), [L, Fe] = s(!1), [R, z] = s(null), [Ie, Le] = s([]), [B, Re] = s(!1), [ze, Be] = s(!1), V = h(u.state, (e) => e.team), Ve = !!w?.capabilities.export_for_agents, [H, He] = s(null), [Ue, U] = s(!1), [We, Ge] = s(null), Ke = (e) => He((t) => {
23
- let n = new Set(t);
24
- return n.delete(e) || n.add(e), n;
25
- }), W = () => (He(null), U(!1));
26
- d(W, [E]);
27
- let qe = () => {
28
- U(!0), We || import("./AgentSend-2JPDseOo.js").then((e) => Ge(() => e.AgentSend), (e) => (y(e), U(!1)));
29
- };
30
- d(() => {
31
- if (!B) return;
32
- let e = (e) => {
33
- e.composedPath().some((e) => e instanceof HTMLElement && e.classList.contains("ck-people-pick")) || Re(!1);
34
- };
35
- return addEventListener("pointerdown", e, !0), () => removeEventListener("pointerdown", e, !0);
36
- }, [B]);
37
- let [G, Je] = s(null), [K, Ye] = s(!1), [q, Xe] = s("recent"), Ze = h(u.state, (e) => e.live), [Qe, $e] = s(!1);
38
- d(() => {
39
- if (Ze !== "lost") return $e(!1);
40
- let e = setTimeout(() => $e(!0), 4e3);
41
- return () => clearTimeout(e);
42
- }, [Ze]);
43
- let J = i(null), [Y, et] = s({
44
- people: [],
45
- labels: []
46
- }), tt = i(null), nt = i(null);
47
- d(() => {
48
- matchMedia("(pointer: fine)").matches && J.current ? J.current.focus({ preventScroll: !0 }) : nt.current?.querySelector("[aria-selected=true]")?.focus({ preventScroll: !0 });
49
- }, []);
50
- let X = !!(M || F.length || G || I || L || P !== "active" || R), Z = X, rt = () => {
51
- N(""), Ae("active"), Ne([]), Je(null), Xe("recent"), Pe(""), Fe(!1), z(null);
52
- }, it = [
53
- F.length > 0,
54
- G !== null,
55
- P !== "active",
56
- q !== "recent",
57
- !!I,
58
- L,
59
- !!R
60
- ].filter(Boolean).length, at = F.includes("none") ? "none" : F.join(","), ot = !!w && w.role !== "guest", st = () => ({
61
- q: M || void 0,
62
- status: P,
63
- branch: R ?? u.branchFilter(),
64
- page_url: E === "page" ? e() : void 0,
65
- assignee: at || void 0,
66
- label: G ?? void 0,
67
- priority: I || void 0,
68
- author: L ? "me" : void 0,
69
- sort: q
70
- }), ct = (e) => e.filter((e) => ge(e, F, G, w));
71
- d(() => {
72
- if (E === "inbox" || E === "page" && !X) return;
73
- let e = ++A.current;
74
- D({ state: "loading" }), Te(null);
75
- let t = setTimeout(() => {
76
- u.listThreads(st()).then((t) => {
77
- e === A.current && (D({
78
- state: "ready",
79
- data: ct(t.data)
80
- }), Te(t.next_cursor ?? null));
81
- }, () => e === A.current && D({ state: "error" }));
82
- }, M ? 250 : 0);
83
- return () => clearTimeout(t);
84
- }, [
85
- E,
86
- M,
87
- P,
88
- je,
89
- C,
90
- at,
91
- G,
92
- X,
93
- q,
94
- I,
95
- L,
96
- R
97
- ]);
98
- let lt = () => {
99
- if (!we || O) return;
100
- let e = A.current;
101
- k(!0), u.listThreads({
102
- ...st(),
103
- cursor: we
104
- }).then((t) => {
105
- e === A.current && (D((e) => e.state === "ready" ? {
106
- state: "ready",
107
- data: [...e.data, ...ct(t.data).filter((t) => !e.data.some((e) => e.id === t.id))]
108
- } : e), Te(t.next_cursor ?? null));
109
- }, y).finally(() => k(!1));
110
- };
111
- d(() => {
112
- T && u.branches().then(Le);
113
- }, []), d(() => {
114
- !K || Y.people.length || Y.labels.length || Promise.all([u.people().catch(() => []), u.labels().catch(() => [])]).then(([e, t]) => et({
115
- people: e.filter((e) => e.assignable && e.id !== null),
116
- labels: t
117
- }));
118
- }, [K]), d(() => {
119
- if (E !== "inbox") return;
120
- let e = ++j.current;
121
- u.inboxPage().then((t) => e === j.current && (De({
122
- state: "ready",
123
- data: t.data
124
- }), ke(t.next_cursor)), () => e === j.current && De({ state: "error" }));
125
- }, [
126
- E,
127
- S,
128
- je
129
- ]);
130
- let ut = () => {
131
- if (!Oe || O) return;
132
- let e = j.current;
133
- k(!0), u.inboxPage(Oe).then((t) => {
134
- e === j.current && (De((e) => e.state === "ready" ? {
135
- state: "ready",
136
- data: [...e.data, ...t.data.filter((t) => !e.data.some((e) => e.id === t.id))]
137
- } : e), ke(t.next_cursor));
138
- }, y).finally(() => k(!1));
139
- }, dt = (e, t) => pe("page" in e ? e : e.thread_id, t), ft = (e) => oe(e, ".ck-item", !0), pt = () => Me((e) => e + 1), mt = (e) => e && D((t) => t.state === "ready" ? {
140
- ...t,
141
- data: t.data.map((t) => t.id === e.id ? e : t)
142
- } : t), ht = async (e) => {
143
- try {
144
- mt(await u.updateThread(e.id, { status: "resolved" })), b?.({
145
- text: l("resolvedToast", { ref: e.reference }),
146
- tone: "success",
147
- action: {
148
- label: l("undo"),
149
- run: () => void f(u, e, b, y).then(mt)
150
- }
151
- });
152
- } catch (e) {
153
- y(e);
154
- }
155
- }, gt = async (e) => {
156
- let t = ee(e.page.url);
157
- if (!t) return;
158
- let n = new URL(t);
159
- n.searchParams.set("ck_thread", e.id);
160
- try {
161
- await navigator.clipboard.writeText(n.toString()), b?.({ text: l("copied") });
162
- } catch {
163
- y(Error(l("errorGeneric")));
164
- }
165
- }, _t = q === "recent" ? x : [...x].sort((e, t) => q === "oldest" ? e.created_at.localeCompare(t.created_at) : (ue[t.priority] ?? 0) - (ue[e.priority] ?? 0) || t.last_activity_at.localeCompare(e.last_activity_at)), Q = E === "page" && !X ? {
166
- state: "ready",
167
- data: _t
168
- } : Ce, $ = Q.state === "ready" ? Q.data.length : null, vt = Q === Ce ? we : null, yt = $ === null || E === "inbox" ? null : vt ? l("resultsMore", { n: $ }) : E === "page" && X ? l("countOf", {
169
- n: $,
170
- total: x.length
171
- }) : Z || E === "all" ? a("results", $) : null, bt = [
172
- [
173
- "page",
174
- "thisPage",
175
- x.length
176
- ],
177
- [
178
- "all",
179
- "allPages",
180
- null
181
- ],
182
- [
183
- "inbox",
184
- "notifications",
185
- S || null
186
- ]
187
- ];
188
- return /* @__PURE__ */ o("aside", {
189
- class: "ck-panel",
190
- "data-side": m,
191
- "data-dock": ae,
192
- "aria-label": l("inbox"),
193
- "data-commentkit-ui": !0,
194
- onKeyDown: (e) => {
195
- if (!(e.key !== "Escape" || ve)) {
196
- if (H) return void (e.stopPropagation(), W());
197
- _();
198
- }
199
- },
200
- children: ve ? /* @__PURE__ */ o("div", {
201
- class: "ck-panel-detail",
202
- children: ve
203
- }) : /* @__PURE__ */ o("div", {
204
- class: "ck-panel-list",
205
- children: [
206
- /* @__PURE__ */ o("div", {
207
- class: "ck-card-head",
208
- children: [
209
- /* @__PURE__ */ o("span", {
210
- class: "ck-card-title",
211
- children: l("inbox")
212
- }),
213
- V.length > 1 ? /* @__PURE__ */ o("span", {
214
- class: "ck-here",
215
- role: "status",
216
- "aria-label": l("teamHere", { names: V.map((e) => e.name).join(", ") }),
217
- title: V.map((e) => e.name).join(", "),
218
- children: [/* @__PURE__ */ o("span", {
219
- class: "ck-faces",
220
- "aria-hidden": "true",
221
- children: V.slice(0, 4).map((e) => /* @__PURE__ */ o(ie, { person: e }))
222
- }), V.length > 4 ? /* @__PURE__ */ o("span", {
223
- class: "ck-faces-more",
224
- children: ["+", V.length - 4]
225
- }) : null]
226
- }) : ye > 1 ? /* @__PURE__ */ o("span", {
227
- class: "ck-here",
228
- role: "status",
229
- children: [/* @__PURE__ */ o("span", {
230
- "aria-hidden": "true",
231
- class: "ck-dot"
232
- }), a("peopleHere", ye)]
233
- }) : null,
234
- Ve && E !== "inbox" && $ && !H ? /* @__PURE__ */ o("button", {
235
- class: "ck-chip ck-agent-chip",
236
- onClick: () => Q.state === "ready" && He(new Set(Q.data.map((e) => e.id))),
237
- children: [/* @__PURE__ */ o(g, {
238
- name: "agent",
239
- size: 13
240
- }), l("sendToAgent")]
241
- }) : null,
242
- /* @__PURE__ */ o("button", {
243
- class: "ck-ghost",
244
- onClick: _,
245
- "aria-label": l("close"),
246
- children: /* @__PURE__ */ o(g, { name: "close" })
247
- })
248
- ]
249
- }),
250
- /* @__PURE__ */ o("div", {
251
- class: "ck-tabs",
252
- role: "tablist",
253
- ref: nt,
254
- onKeyDown: (e) => oe(e, "[role=tab]"),
255
- children: bt.map(([e, t, n]) => /* @__PURE__ */ o("button", {
256
- role: "tab",
257
- id: `ck-tab-${e}`,
258
- "aria-controls": "ck-tabpanel",
259
- class: "ck-tab",
260
- "aria-selected": E === e,
261
- tabIndex: E === e ? 0 : -1,
262
- onClick: () => Se(e),
263
- onFocus: () => Se(e),
264
- children: [
265
- l(t),
266
- " ",
267
- n ? /* @__PURE__ */ o("span", {
268
- class: "ck-count",
269
- children: n
270
- }) : null
271
- ]
272
- }))
273
- }),
274
- xe ? Qe ? /* @__PURE__ */ o("div", {
275
- class: "ck-note ck-live-note",
276
- role: "status",
277
- children: [
278
- l("livePaused"),
279
- " ",
280
- /* @__PURE__ */ o("button", {
281
- class: "ck-btn",
282
- onClick: () => u.reconnectRealtime(),
283
- children: l("retry")
284
- })
285
- ]
286
- }) : null : /* @__PURE__ */ o("div", {
287
- class: "ck-note",
288
- "data-tone": "warning",
289
- role: "status",
290
- children: l("offline")
291
- }),
292
- be ? /* @__PURE__ */ o("div", {
293
- class: "ck-note ck-pad-x",
294
- role: "status",
295
- children: l("readOnlyShort")
296
- }) : null,
297
- T && E !== "inbox" ? /* @__PURE__ */ o("div", {
298
- class: "ck-branchbar",
299
- role: "group",
300
- "aria-label": l("branchFilter"),
301
- children: [
302
- /* @__PURE__ */ o("button", {
303
- class: "ck-chip",
304
- "aria-pressed": !C && !R,
305
- onClick: () => (z(null), void u.setAllBranches(!1).catch(() => void 0)),
306
- title: T,
307
- children: l("thisBranch", { branch: he(T) })
308
- }),
309
- /* @__PURE__ */ o("button", {
310
- class: "ck-chip",
311
- "aria-pressed": C && !R,
312
- onClick: () => (z(null), void u.setAllBranches(!0).catch(() => void 0)),
313
- children: l("allBranches")
314
- }),
315
- Ie.some((e) => e.name !== T) ? /* @__PURE__ */ o(v, {
316
- label: l("otherBranch"),
317
- value: R ?? "",
318
- onChange: (e) => z(e || null),
319
- compact: !0,
320
- options: [["", l("otherBranch")], ...Ie.filter((e) => e.name !== T).map((e) => [e.name, `${he(e.name)} (${e.open})`])]
321
- }) : null
322
- ]
323
- }) : null,
324
- E === "inbox" ? null : /* @__PURE__ */ o(n, { children: [
325
- /* @__PURE__ */ o("div", {
326
- class: "ck-filters",
327
- children: [/* @__PURE__ */ o("div", {
328
- class: "ck-search",
329
- children: [
330
- /* @__PURE__ */ o(g, {
331
- name: "search",
332
- size: 15
333
- }),
334
- /* @__PURE__ */ o("input", {
335
- ref: J,
336
- class: "ck-input",
337
- type: "text",
338
- role: "searchbox",
339
- "aria-label": l("search"),
340
- placeholder: l("search"),
341
- value: M,
342
- onInput: (e) => N(e.target.value),
343
- onKeyDown: (e) => {
344
- e.stopPropagation(), e.key === "Escape" && M ? (e.preventDefault(), N("")) : e.key === "Escape" && _();
345
- }
346
- }),
347
- M ? /* @__PURE__ */ o("button", {
348
- class: "ck-ghost ck-ghost-sm",
349
- "aria-label": l("clearSearch"),
350
- onClick: () => (N(""), J.current?.focus()),
351
- children: /* @__PURE__ */ o(g, {
352
- name: "close",
353
- size: 14
354
- })
355
- }) : null
356
- ]
357
- }), /* @__PURE__ */ o(v, {
358
- label: l("statusFilter"),
359
- value: P,
360
- onChange: Ae,
361
- options: [
362
- ["active", l("status_open")],
363
- ["in_review", l("status_in_review")],
364
- ["resolved,closed", l("status_resolved")],
365
- ["all", l("allStatuses")]
366
- ]
367
- })]
368
- }),
369
- /* @__PURE__ */ o("div", {
370
- class: "ck-branchbar",
371
- children: [
372
- ot ? /* @__PURE__ */ o("button", {
373
- class: "ck-chip",
374
- "aria-pressed": F.length === 1 && F[0] === "me",
375
- onClick: () => Ne(F.length === 1 && F[0] === "me" ? [] : ["me"]),
376
- children: l("assignedToMe")
377
- }) : null,
378
- w ? /* @__PURE__ */ o("button", {
379
- class: "ck-chip",
380
- "aria-pressed": L,
381
- onClick: () => Fe(!L),
382
- children: l("createdByMe")
383
- }) : null,
384
- /* @__PURE__ */ o("button", {
385
- class: "ck-chip",
386
- "aria-expanded": K,
387
- "aria-controls": "ck-more-filters",
388
- onClick: () => Ye(!K),
389
- children: [l("filters"), it ? /* @__PURE__ */ o("span", {
390
- class: "ck-count",
391
- "aria-label": a("filtersOn", it),
392
- children: it
393
- }) : null]
394
- }),
395
- Z || q !== "recent" ? /* @__PURE__ */ o("button", {
396
- class: "ck-chip ck-chip-quiet",
397
- onClick: rt,
398
- children: l("resetFilters")
399
- }) : null,
400
- yt ? /* @__PURE__ */ o("span", {
401
- class: "ck-muted ck-result-count",
402
- role: "status",
403
- children: yt
404
- }) : null
405
- ]
406
- }),
407
- K ? /* @__PURE__ */ o("div", {
408
- class: "ck-filters",
409
- id: "ck-more-filters",
410
- children: [
411
- /* @__PURE__ */ o(v, {
412
- label: l("sortBy"),
413
- value: q,
414
- onChange: (e) => Xe(e),
415
- options: [
416
- ["recent", l("sortRecent")],
417
- ["oldest", l("sortOldest")],
418
- ["priority", l("sortPriority")]
419
- ]
420
- }),
421
- /* @__PURE__ */ o(v, {
422
- label: l("priority"),
423
- value: I,
424
- onChange: Pe,
425
- options: [
426
- ["", l("anyPriority")],
427
- ["urgent,high", l("priorityImportant")],
428
- ...[
429
- "urgent",
430
- "high",
431
- "medium",
432
- "low"
433
- ].map((e) => [e, l(`priority_${e}`)])
434
- ]
435
- }),
436
- ot ? /* @__PURE__ */ o("div", {
437
- class: "ck-people-pick",
438
- children: [/* @__PURE__ */ o("button", {
439
- class: "ck-input ck-choose-btn ck-people-btn",
440
- "aria-expanded": B,
441
- "aria-haspopup": "true",
442
- onClick: (e) => {
443
- let t = e.currentTarget.getBoundingClientRect(), n = e.currentTarget.closest(".ck-panel")?.getBoundingClientRect(), r = !!n && t.left + t.width / 2 > n.left + n.width / 2;
444
- Be(getComputedStyle(e.currentTarget).direction === "rtl" ? !r : r), Re(!B);
445
- },
446
- children: [/* @__PURE__ */ o("bdi", { children: F.length ? _e(F, Y.people) : l("anyone") }), /* @__PURE__ */ o(g, {
447
- name: "chevron",
448
- size: 12
449
- })]
450
- }), B ? /* @__PURE__ */ o("div", {
451
- class: "ck-people-menu",
452
- "data-end": ze || void 0,
453
- role: "group",
454
- "aria-label": l("assigneeFilter"),
455
- onKeyDown: (e) => e.key === "Escape" && (e.stopPropagation(), Re(!1)),
456
- children: [
457
- ["me", l("assignedToMe")],
458
- ["none", l("unassigned")],
459
- ...Y.people.map((e) => [String(e.id), e.name])
460
- ].map(([e, t]) => /* @__PURE__ */ o("label", {
461
- class: "ck-check",
462
- children: [/* @__PURE__ */ o("input", {
463
- type: "checkbox",
464
- checked: F.includes(e),
465
- onChange: (t) => {
466
- let n = t.target.checked;
467
- Ne(n ? e === "none" ? ["none"] : [...F.filter((e) => e !== "none"), e] : F.filter((t) => t !== e));
468
- }
469
- }), /* @__PURE__ */ o("bdi", { children: t })]
470
- }))
471
- }) : null]
472
- }) : null,
473
- /* @__PURE__ */ o(v, {
474
- label: l("labelFilter"),
475
- value: G === null ? "" : String(G),
476
- onChange: (e) => Je(e ? Number(e) : null),
477
- options: [["", l("anyLabel")], ...Y.labels.map((e) => [String(e.id), e.name])]
478
- })
479
- ]
480
- }) : null
481
- ] }),
482
- /* @__PURE__ */ o("div", {
483
- class: "ck-card-body",
484
- id: "ck-tabpanel",
485
- role: "tabpanel",
486
- "aria-labelledby": `ck-tab-${E}`,
487
- style: { padding: 0 },
488
- "aria-busy": (E === "inbox" ? Ee : Q).state === "loading",
489
- children: E === "inbox" ? /* @__PURE__ */ o(de, {
490
- load: Ee,
491
- onRetry: pt,
492
- art: "caughtUp",
493
- empty: /* @__PURE__ */ o("strong", { children: l("allCaughtUp") }),
494
- children: (e) => /* @__PURE__ */ o(n, { children: [
495
- /* @__PURE__ */ o("ul", {
496
- class: "ck-list",
497
- ref: tt,
498
- onKeyDown: ft,
499
- children: e.map((t) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o("button", {
500
- class: "ck-item",
501
- "data-unread": !t.read,
502
- onClick: () => dt(t, e.map((e) => e.thread_id)),
503
- children: [/* @__PURE__ */ o("div", {
504
- class: "ck-item-top",
505
- children: [/* @__PURE__ */ o("span", {
506
- class: "ck-item-tags",
507
- children: [/* @__PURE__ */ o(fe, { item: t }), t.reference ? ` · ${t.reference}` : ""]
508
- }), /* @__PURE__ */ o("time", {
509
- class: "ck-time",
510
- dateTime: t.created_at,
511
- title: c(t.created_at),
512
- children: r(t.created_at)
513
- })]
514
- }), t.excerpt ? /* @__PURE__ */ o("div", {
515
- class: "ck-item-text",
516
- dir: "auto",
517
- children: t.excerpt
518
- }) : null]
519
- }) }))
520
- }),
521
- Oe ? /* @__PURE__ */ o("div", {
522
- class: "ck-pad",
523
- children: /* @__PURE__ */ o("button", {
524
- class: "ck-btn",
525
- disabled: O,
526
- "aria-busy": O,
527
- onClick: ut,
528
- children: l("showMore")
529
- })
530
- }) : null,
531
- S ? /* @__PURE__ */ o("div", {
532
- class: "ck-pad",
533
- children: /* @__PURE__ */ o("button", {
534
- class: "ck-btn",
535
- onClick: () => void u.markRead({ all: !0 }).catch(y),
536
- children: l("markAllRead")
537
- })
538
- }) : null
539
- ] })
540
- }) : /* @__PURE__ */ o(de, {
541
- load: Q,
542
- onRetry: pt,
543
- art: Z ? "noMatch" : "noFeedback",
544
- empty: Z ? /* @__PURE__ */ o(n, { children: [/* @__PURE__ */ o("strong", { children: l("noMatch") }), /* @__PURE__ */ o("button", {
545
- class: "ck-btn",
546
- onClick: rt,
547
- children: l("clearFilters")
548
- })] }) : /* @__PURE__ */ o(n, { children: [/* @__PURE__ */ o("strong", { children: l(E === "all" ? "nothingAnywhere" : "nothingHere") }), /* @__PURE__ */ o("span", {
549
- class: "ck-hint",
550
- children: l("nothingHereHint")
551
- })] }),
552
- children: (e) => /* @__PURE__ */ o(n, { children: [/* @__PURE__ */ o("ul", {
553
- class: "ck-list",
554
- ref: tt,
555
- onKeyDown: ft,
556
- children: e.map((i, s) => {
557
- let u = E === "page" && t(i.anchor).state === "detached", d = u ? ee(i.capture?.screenshot?.thumbnail_url, "image") : null, f = i.assignees ?? (i.assignee ? [i.assignee] : []), m = (i.first_message?.reactions ?? []).slice().sort((e, t) => t.count - e.count).slice(0, 3), h = p(i), re = i.status === "resolved" || i.status === "closed";
558
- return /* @__PURE__ */ o("li", {
559
- style: { "--i": Math.min(s, 12) },
560
- "data-done": re || void 0,
561
- "data-picking": H ? !0 : void 0,
562
- children: [
563
- H ? /* @__PURE__ */ o("input", {
564
- type: "checkbox",
565
- class: "ck-pick",
566
- checked: H.has(i.id),
567
- "aria-label": l("selectThread", { ref: i.reference }),
568
- onChange: () => Ke(i.id)
569
- }) : null,
570
- /* @__PURE__ */ o("button", {
571
- class: "ck-item",
572
- "data-shot": d ? "true" : void 0,
573
- "aria-pressed": H ? H.has(i.id) : void 0,
574
- onClick: () => H ? Ke(i.id) : dt(i, e.map((e) => e.id)),
575
- children: [/* @__PURE__ */ o("div", {
576
- class: "ck-item-main",
577
- children: [
578
- /* @__PURE__ */ o("div", {
579
- class: "ck-item-top",
580
- children: [/* @__PURE__ */ o("span", {
581
- class: "ck-item-tags",
582
- children: [
583
- /* @__PURE__ */ o("span", {
584
- class: "ck-kind",
585
- title: l(`spot_${i.anchor.type}`),
586
- "aria-label": l(`spot_${i.anchor.type}`),
587
- children: /* @__PURE__ */ o(g, {
588
- name: le[i.anchor.type] ?? "comment",
589
- size: 12
590
- })
591
- }),
592
- /* @__PURE__ */ o("strong", { children: ot ? i.reference : l("feedbackRef", { ref: i.reference }) }),
593
- /* @__PURE__ */ o(ne, { status: i.status }),
594
- i.priority === "none" ? null : /* @__PURE__ */ o("span", {
595
- class: "ck-flag",
596
- "data-priority": i.priority,
597
- title: `${l("priority")}: ${l(`priority_${i.priority}`)}`,
598
- "aria-label": `${l("priority")}: ${l(`priority_${i.priority}`)}`,
599
- children: /* @__PURE__ */ o(g, {
600
- name: "flag",
601
- size: 11
602
- })
603
- }),
604
- te(i) ? /* @__PURE__ */ o("span", {
605
- class: "ck-tag",
606
- title: `${l(`screen_${ce(i.breakpoint)}`)} (${i.breakpoint}px)`,
607
- children: l(`size_${ce(i.breakpoint)}`)
608
- }) : null,
609
- u ? /* @__PURE__ */ o("span", {
610
- class: "ck-badge-soft",
611
- title: l("detached"),
612
- children: l("notOnPage")
613
- }) : null
614
- ]
615
- }), /* @__PURE__ */ o("time", {
616
- class: "ck-time",
617
- dateTime: i.last_activity_at,
618
- title: c(i.last_activity_at),
619
- children: r(i.last_activity_at)
620
- })]
621
- }),
622
- /* @__PURE__ */ o("div", {
623
- class: "ck-item-text",
624
- dir: "auto",
625
- children: i.first_message?.body
626
- }),
627
- /* @__PURE__ */ o("div", {
628
- class: "ck-muted ck-item-meta",
629
- children: [
630
- /* @__PURE__ */ o(ie, { person: i.author }),
631
- /* @__PURE__ */ o("bdi", { children: me(i.author.name) }),
632
- E === "all" ? /* @__PURE__ */ o(n, { children: [" · ", /* @__PURE__ */ o("bdi", { children: i.page.title || i.page.path })] }) : "",
633
- " · ",
634
- a("messageCount", i.message_count),
635
- C && i.page.branch && i.page.branch !== T ? ` · ${l("onBranch", { branch: he(i.page.branch) })}` : "",
636
- h ? /* @__PURE__ */ o("span", {
637
- class: "ck-item-check",
638
- children: [
639
- " · ",
640
- /* @__PURE__ */ o(g, {
641
- name: "check",
642
- size: 11
643
- }),
644
- h
645
- ]
646
- }) : null,
647
- m.length ? /* @__PURE__ */ o("span", {
648
- class: "ck-item-reactions",
649
- "aria-label": m.map((e) => a("reactionLabel", e.count, { emoji: e.emoji })).join(", "),
650
- children: m.map((e) => /* @__PURE__ */ o("span", { children: [/* @__PURE__ */ o(se, { char: e.emoji }), e.count] }))
651
- }) : null,
652
- f.length ? /* @__PURE__ */ o("span", {
653
- class: "ck-faces ck-item-faces",
654
- title: `${l("assigneeFilter")}: ${f.map((e) => e.name).join(", ")}`,
655
- children: f.slice(0, 3).map((e) => /* @__PURE__ */ o(ie, { person: e }))
656
- }) : null
657
- ]
658
- })
659
- ]
660
- }), d ? /* @__PURE__ */ o("img", {
661
- class: "ck-item-thumb",
662
- src: d,
663
- alt: l("screenshot"),
664
- loading: "lazy"
665
- }) : null]
666
- }),
667
- H ? null : /* @__PURE__ */ o("span", {
668
- class: "ck-item-actions",
669
- children: [!re && w?.capabilities.comment && !be ? /* @__PURE__ */ o("button", {
670
- class: "ck-ghost ck-ghost-sm",
671
- "aria-label": l("resolveRef", { ref: i.reference }),
672
- title: l("resolve"),
673
- onClick: () => void ht(i),
674
- children: /* @__PURE__ */ o(g, {
675
- name: "check",
676
- size: 14
677
- })
678
- }) : null, /* @__PURE__ */ o("button", {
679
- class: "ck-ghost ck-ghost-sm",
680
- "aria-label": l("copyLinkRef", { ref: i.reference }),
681
- title: l("copyLink"),
682
- onClick: () => void gt(i),
683
- children: /* @__PURE__ */ o(g, {
684
- name: "link",
685
- size: 14
686
- })
687
- })]
688
- })
689
- ]
690
- });
691
- })
692
- }), vt ? /* @__PURE__ */ o("div", {
693
- class: "ck-pad",
694
- children: /* @__PURE__ */ o("button", {
695
- class: "ck-btn",
696
- disabled: O,
697
- "aria-busy": O,
698
- onClick: lt,
699
- children: l("showMore")
700
- })
701
- }) : null] })
702
- })
703
- }),
704
- H ? /* @__PURE__ */ o("div", {
705
- class: "ck-pickbar",
706
- role: "group",
707
- "aria-label": l("sendToAgent"),
708
- children: [
709
- Ue && We && Q.state === "ready" ? /* @__PURE__ */ o(We, {
710
- client: u,
711
- threads: Q.data.filter((e) => H.has(e.id)),
712
- onError: y,
713
- onClose: () => U(!1),
714
- onDone: (e) => (b?.({
715
- text: e,
716
- tone: "success"
717
- }), W())
718
- }) : null,
719
- /* @__PURE__ */ o("span", {
720
- class: "ck-muted",
721
- role: "status",
722
- children: a("selectedCount", H.size)
723
- }),
724
- /* @__PURE__ */ o("button", {
725
- class: "ck-btn",
726
- onClick: W,
727
- children: l("cancel")
728
- }),
729
- /* @__PURE__ */ o("button", {
730
- class: "ck-btn ck-primary",
731
- disabled: !H.size,
732
- "aria-expanded": Ue,
733
- onClick: () => Ue ? U(!1) : qe(),
734
- children: [/* @__PURE__ */ o(g, {
735
- name: "agent",
736
- size: 14
737
- }), l("sendToAgent")]
738
- })
739
- ]
740
- }) : null
741
- ]
742
- })
743
- });
744
- }
745
- function v({ label: e, value: t, options: n, onChange: r, compact: a = !1 }) {
746
- let [c, l] = s(!1), [u, f] = s(!1), p = i(null), m = n.find(([e]) => e === t)?.[1] ?? n[0]?.[1] ?? "";
747
- return d(() => {
748
- if (!c) return;
749
- p.current?.querySelector("[aria-selected=true]")?.focus();
750
- let e = (e) => !e.composedPath().includes(p.current) && l(!1);
751
- return addEventListener("pointerdown", e, !0), () => removeEventListener("pointerdown", e, !0);
752
- }, [c]), /* @__PURE__ */ o("div", {
753
- class: "ck-choose",
754
- ref: p,
755
- "data-compact": a || void 0,
756
- children: [/* @__PURE__ */ o("button", {
757
- class: "ck-input ck-choose-btn",
758
- "aria-haspopup": "listbox",
759
- "aria-expanded": c,
760
- "aria-label": `${e}: ${m}`,
761
- onClick: () => {
762
- let e = p.current?.getBoundingClientRect(), t = p.current?.closest(".ck-panel")?.getBoundingClientRect();
763
- if (e && t && p.current) {
764
- let n = e.left + e.width / 2 > t.left + t.width / 2;
765
- f(getComputedStyle(p.current).direction === "rtl" ? !n : n);
766
- }
767
- l(!c);
768
- },
769
- children: [/* @__PURE__ */ o("bdi", { children: m }), /* @__PURE__ */ o(g, {
770
- name: "chevron",
771
- size: 12
772
- })]
773
- }), c ? /* @__PURE__ */ o("div", {
774
- class: "ck-choose-menu",
775
- role: "listbox",
776
- "aria-label": e,
777
- "data-end": u || void 0,
778
- onKeyDown: (e) => {
779
- e.key === "Escape" ? (e.stopPropagation(), l(!1), (p.current?.querySelector(".ck-choose-btn"))?.focus()) : oe(e, "[role=option]", !0);
780
- },
781
- children: n.map(([e, n]) => /* @__PURE__ */ o("button", {
782
- role: "option",
783
- "aria-selected": e === t,
784
- onClick: () => {
785
- r(e), l(!1);
786
- },
787
- children: /* @__PURE__ */ o("bdi", { children: n })
788
- }))
789
- }) : null]
790
- });
791
- }
792
- function de({ load: e, onRetry: t, art: r, empty: i, children: a }) {
793
- return e.state === "loading" ? /* @__PURE__ */ o("div", {
794
- class: "ck-loading",
795
- role: "status",
796
- "aria-label": l("loadingEarlier"),
797
- children: [
798
- 0,
799
- 1,
800
- 2
801
- ].map(() => /* @__PURE__ */ o("div", {
802
- class: "ck-loading-row",
803
- children: [
804
- /* @__PURE__ */ o("div", { class: "ck-skeleton" }),
805
- /* @__PURE__ */ o("div", { class: "ck-skeleton" }),
806
- /* @__PURE__ */ o("div", { class: "ck-skeleton" })
807
- ]
808
- }))
809
- }) : e.state === "error" ? /* @__PURE__ */ o("div", {
810
- class: "ck-empty",
811
- role: "alert",
812
- children: [
813
- /* @__PURE__ */ o(m, { name: "error" }),
814
- l("loadFailed"),
815
- /* @__PURE__ */ o("button", {
816
- class: "ck-btn",
817
- onClick: t,
818
- children: l("retry")
819
- })
820
- ]
821
- }) : e.data.length ? /* @__PURE__ */ o(n, { children: a(e.data) }) : /* @__PURE__ */ o("div", {
822
- class: "ck-empty",
823
- children: [/* @__PURE__ */ o(m, { name: r }), i]
824
- });
825
- }
826
- function fe({ item: e }) {
827
- let t = `kind_${e.kind}`, [r, i] = /^kind_[a-z_]+$/.test(t) && t in pe ? u(t, "actor") : ["", ` ${e.kind.replace(/_/g, " ")}`], { type: a, name: s } = e.actor;
828
- return /* @__PURE__ */ o(n, { children: [
829
- r,
830
- /* @__PURE__ */ o("strong", { children: /* @__PURE__ */ o("bdi", { children: a === "agent" || a === "integration" || a === "system" ? s : l("personName", { name: s }) }) }),
831
- i
832
- ] });
833
- }
834
- var pe = {
835
- kind_mention: !0,
836
- kind_reply: !0,
837
- kind_assigned: !0,
838
- kind_ready_for_review: !0,
839
- kind_reopened: !0,
840
- kind_resolved: !0,
841
- kind_closed: !0,
842
- kind_new_feedback: !0,
843
- kind_due_soon: !0,
844
- kind_overdue: !0,
845
- kind_agent_request: !0
846
- };
847
- function me(e) {
848
- return e.trim().split(/\s+/)[0] || e;
849
- }
850
- function he(e) {
851
- return e.length > 28 ? `${e.slice(0, 27)}…` : e;
852
- }
853
- function ge(e, t, n, r) {
854
- let i = e.assignees ?? (e.assignee ? [e.assignee] : []);
855
- return n !== null && e.labels && !e.labels.some((e) => e.id === n) ? !1 : t.length ? t.includes("none") ? !i.length : t.some((e) => e === "me" ? i.some((e) => !!r && e.id === r.person.id && e.type === r.person.type) : i.some((t) => t.id === e)) : !0;
856
- }
857
- function _e(e, t) {
858
- let n = e.map((e) => e === "me" ? l("assignedToMe") : e === "none" ? l("unassigned") : t.find((t) => String(t.id) === e)?.name ?? "").filter(Boolean);
859
- return n.length > 1 ? `${n[0]} +${n.length - 1}` : n[0] ?? l("anyone");
860
- }
861
- export { _ as Panel };