@inkeep/open-knowledge 0.64.0-beta.0 → 0.64.0-beta.2
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.
- package/dist/{acp-harness-probe-Dfn4DdCk.mjs → acp-harness-probe-DapYSp7w.mjs} +2 -2
- package/dist/cli.mjs +51 -51
- package/dist/constants-Cj0FR_KM.mjs +2 -0
- package/dist/{git-handle-3QlrPfzF.mjs → git-handle-29BNYqgw.mjs} +2 -2
- package/dist/git-handle-DfQBBy3_.mjs +1 -0
- package/dist/index.mjs +105 -105
- package/dist/{init-BcrcnD3R.mjs → init-BCMkmiKf.mjs} +5 -5
- package/dist/init-C-493OBd.mjs +1 -0
- package/dist/{launch-json-removal-B3kM3m3f.mjs → launch-json-removal-OEAESJl0.mjs} +2 -2
- package/dist/{loader-BwwPkGMH.mjs → loader-BwvYADno.mjs} +2 -2
- package/dist/loader-DZcRiYxn.mjs +1 -0
- package/dist/md-manager-CZcRasmz.mjs +2 -0
- package/dist/{open-browser-W5CxYsJ4.mjs → open-browser-aU_PSdrG.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/preview-9wNQ396F.mjs +1 -0
- package/dist/{preview-JbKzJSop.mjs → preview-B3liLPDI.mjs} +2 -2
- package/dist/public/assets/{ActivityModeContent-BVDRGbN_.js → ActivityModeContent-rGNWFHTn.js} +1 -1
- package/dist/public/assets/{AddPropertiesButton-7dCoyBvE.js → AddPropertiesButton-2JRBAQEf.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-Fcqpkkvc.js → AgentDiffPane-DaORQqpS.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-ZfgVB5_1.js → AgentThreadClientBinder-CJYGMIr6.js} +1 -1
- package/dist/public/assets/{BugReportHistory-DihyFd3f.js → BugReportHistory-Cuh__mug.js} +1 -1
- package/dist/public/assets/{BugReportHistoryDialog-CSNrPEOi.js → BugReportHistoryDialog-C_9BqWro.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-CZg3NpYe.js → CodeMirrorPropInput-B8JfraRG.js} +1 -1
- package/dist/public/assets/{ConsentDialogBody-DQ8IUXhF.js → ConsentDialogBody-CK9RceLc.js} +1 -1
- package/dist/public/assets/{DocumentContext-CpeWitiW.js → DocumentContext-DyBKMWUQ.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-kVdR62fb.js → EditorModeToggle-CTMAAr-X.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-vDAKs3w2.js → EnableSyncConfirmDialog-D80Aucr3.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-Bt_Sc1ig.js → ExcalidrawDocEditor-CMeQn_u0.js} +1 -1
- package/dist/public/assets/FeedbackForm-SUXnCd9B.js +1 -0
- package/dist/public/assets/{GraphPanel-DHmyVvBK.js → GraphPanel-CnxzWV5D.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-CspiU9oF.js → ImportSkillDialog-DUdFUw6e.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-D4Lyz3en.js → LintConfigEditor-BC8TYjz-.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-DOw_G7X-.js → ManagedArtifactProperties-Cr21JXmD.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-DVT7r-wR.js +1 -0
- package/dist/public/assets/{MermaidDocEditor-C0wc8LzX.js → MermaidDocEditor-CCEt4Opw.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-wkm3Dp2m.js → PropertyDisplayRow-CTVCclTK.js} +2 -2
- package/dist/public/assets/{ReportBugDialogBody-C1oy3fl2.js → ReportBugDialogBody-VIeqRFre.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-D9rcrwmV.js → SchemaConfigEditor-UcCzcUIa.js} +1 -1
- package/dist/public/assets/SessionsHost-gxeaEpjc.js +2 -0
- package/dist/public/assets/{SettingsDialogBody-CteLfmRG.js → SettingsDialogBody-CxoXcrrW.js} +1 -1
- package/dist/public/assets/{ShareBranchSwitchDialog-BPCd6Quz.js → ShareBranchSwitchDialog-Cee3pwDa.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-CoAGSmZ4.js → ShareReceiveDialog-blTr_HPx.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-D1sjGAKG.js → ShareReceiveMissDialog-DJ9DvFJq.js} +1 -1
- package/dist/public/assets/{SkillCostValue-DgVDZJg4.js → SkillCostValue-DEly99Yk.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-lLVIBnoB.js → SkillEditBanner-bd1zvQfx.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-BYR9N4q6.js → SkillInstallMenu-sneUc7PA.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-TGIhdkZT.js → SkillOriginInline-BQIo2jSh.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-DJM37Tzc.js → SkillToolbarControls-A3BqTaVC.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-CaS6tQ5s.js → SlidesToolbarControls-DpcrHeKz.js} +1 -1
- package/dist/public/assets/{SourceEditor-DfCkS8Fs.js → SourceEditor-yCp7AOuC.js} +1 -1
- package/dist/public/assets/{TerminalPanel-B9EgBHqz.js → TerminalPanel-DitPHk-i.js} +37 -37
- package/dist/public/assets/TerminalStartingNotice-7XmsKQfW.js +1 -0
- package/dist/public/assets/{TerminalWindowApp-t4MYEnaS.js → TerminalWindowApp-CEMvQfmt.js} +1 -1
- package/dist/public/assets/{TextDocEditor-CWU6LK-8.js → TextDocEditor-Ckd918Mb.js} +1 -1
- package/dist/public/assets/{ThreadView-DvUL6MIe.js → ThreadView-DGR1KByM.js} +3 -3
- package/dist/public/assets/{TimelineDiffPane-CF5MGNaw.js → TimelineDiffPane-CpgSHJGN.js} +1 -1
- package/dist/public/assets/{agent-diff-store-DFJS7b5r.js → agent-diff-store-DzZwPUH2.js} +1 -1
- package/dist/public/assets/{auth-state-cache-CjWyvr0L.js → auth-state-cache-CEf8XB-q.js} +1 -1
- package/dist/public/assets/{bug-report-send-manager-Buxf0r5c.js → bug-report-send-manager-D19JO93p.js} +1 -1
- package/dist/public/assets/{chunk-BO2N2NFS-BVKS5mdX.js → chunk-BO2N2NFS-aa_rQr8f.js} +31 -31
- package/dist/public/assets/client-version-ow2B_U-6.js +1 -0
- package/dist/public/assets/{comment-chips-M-vXJPiy.js → comment-chips-C076-HNt.js} +1 -1
- package/dist/public/assets/{config-provider-Bavv18lD.js → config-provider-JYp7fF6x.js} +3 -3
- package/dist/public/assets/{dist-DSS3ixln2.js → dist-CWxNQtC52.js} +41 -41
- package/dist/public/assets/{doc-paths-oMq41Y7d.js → doc-paths-DgbGdxZ1.js} +1 -1
- package/dist/public/assets/{documents-events-DCcMe0wm.js → documents-events-DViu97ho.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-X5fV07Z_.js → file-tree-adapter-B2J82X4l.js} +1 -1
- package/dist/public/assets/{file-tree-utils-DL6Pvgvd.js → file-tree-utils-MiagXf7l.js} +1 -1
- package/dist/public/assets/{folder-config-api-Ca2OxXT-.js → folder-config-api-CNXuE5zD.js} +1 -1
- package/dist/public/assets/globals-DMaCiviB.css +1 -0
- package/dist/public/assets/{highlighted-body-OFNGDK62-R5erL3S3.js → highlighted-body-OFNGDK62-eLakIx_-.js} +1 -1
- package/dist/public/assets/i18n-CqDKlhNm.js +1 -0
- package/dist/public/assets/{index-B0xoBPyb.js → index-CVIfHBfN.js} +18 -18
- package/dist/public/assets/lib-DH_OjOEF.js +29 -0
- package/dist/public/assets/{lint-config-client-CumTSl-t.js → lint-config-client-RzlDcfLl.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-BYdFk19L.js → markdownlint-rule-browser-Bmk3lsoP.js} +1 -1
- package/dist/public/assets/mermaid-GHXKKRXX-ChsT7WMf.js +1 -0
- package/dist/public/assets/messages-10f1hPWP.js +1 -0
- package/dist/public/assets/messages-5TeeUeS0.js +1 -0
- package/dist/public/assets/messages-8WTqq3Mp.js +1 -0
- package/dist/public/assets/messages-BRgdD2wL.js +1 -0
- package/dist/public/assets/messages-Bbr1HKxw.js +1 -0
- package/dist/public/assets/messages-Bo2D8MSU.js +1 -0
- package/dist/public/assets/messages-BoTpi3Tc.js +1 -0
- package/dist/public/assets/messages-CCrzx-Sh.js +1 -0
- package/dist/public/assets/messages-CxY3xIzN.js +1 -0
- package/dist/public/assets/messages-DpV3A7jU.js +1 -0
- package/dist/public/assets/messages-DyWXi2qN.js +1 -0
- package/dist/public/assets/messages-ZkMy8GOy.js +1 -0
- package/dist/public/assets/{page-list-cache-NegxJAbd.js → page-list-cache-CEyxAohw.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-CqRn5nAG.js → pending-receive-nav-store-CTqjXsBl.js} +1 -1
- package/dist/public/assets/{progress-DANvCJmk.js → progress-OoUVKpXn.js} +1 -1
- package/dist/public/assets/{project-paths-C-SkuTbI.js → project-paths-BdGjLtxT.js} +1 -1
- package/dist/public/assets/{prop-types-nOgQFiCi.js → prop-types-CU7HQl68.js} +1 -1
- package/dist/public/assets/{receive-store-D9Px8yTN.js → receive-store-CJtiTNp3.js} +1 -1
- package/dist/public/assets/{selection-context-BVomF0mV.js → selection-context-DR7ab7yE.js} +1 -1
- package/dist/public/assets/{skill-scope-DWsJ838z.js → skill-scope-BAozv3yS.js} +1 -1
- package/dist/public/assets/{skills-api-BLXzXEC-.js → skills-api-DY2ILAVx.js} +1 -1
- package/dist/public/assets/{src-Dpmb3U7E.js → src-CGTpf8aj.js} +1 -1
- package/dist/public/assets/{tag-pill-input-DwIQ-TmP.js → tag-pill-input-llQtM5Z_.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-CJUCqJBv.js → target-navigation-intent-HQou_X-w.js} +1 -1
- package/dist/public/assets/{telemetry-impl-DLHtoY00.js → telemetry-impl-BIepj08G.js} +2 -2
- package/dist/public/assets/{telemetry-startup-D2bGuqRD.js → telemetry-startup-B7OSl-z5.js} +1 -1
- package/dist/public/assets/{terminal-cli-display-C-s_gqLX.js → terminal-cli-display-DTFiZBBc.js} +1 -1
- package/dist/public/assets/terminal-launch-events-Bfi4m2vK.js +1 -0
- package/dist/public/assets/{terminal-telemetry-B16z13Uq.js → terminal-telemetry-CboX_HNN.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-DlSk3HmB.js → typing-burst-detector-C4y2fKpb.js} +1 -1
- package/dist/public/assets/{uninstall-B_ye2J4j.js → uninstall-Bf9OgFpb.js} +1 -1
- package/dist/public/assets/{use-activity-panel-yR4XBbM0.js → use-activity-panel-D_OG3gXD.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-BEWFuTWv.js → use-apply-config-color-theme-H1zX9cBU.js} +1 -1
- package/dist/public/assets/{use-collab-url-CwkAA1lj.js → use-collab-url-Dk-3M_go.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-C2sLeh-e.js → use-live-xterm-theme-ChdQbgac.js} +1 -1
- package/dist/public/assets/{use-open-skill-BOlvJ9db.js → use-open-skill-BeZcrVWu.js} +1 -1
- package/dist/public/assets/{use-settings-route-DOVNFDSn.js → use-settings-route-CHUO6Vb3.js} +1 -1
- package/dist/public/assets/{use-skill-origin-Cyn5juIp.js → use-skill-origin-CLzO6XeG.js} +1 -1
- package/dist/public/assets/{use-skills-szHEgJLb.js → use-skills-B1r84pEp.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-DTcNcDac.js → use-terminal-enabled-BCESHfrF.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-D79rgyyp.js → use-timeline-entry-diff-Bs-prtib.js} +1 -1
- package/dist/public/assets/{use-workspace-DriKk3ci.js → use-workspace-DigIBtSV.js} +1 -1
- package/dist/public/index.html +50 -50
- package/dist/public/uninstall.html +7 -7
- package/dist/{repair-launch-json-COgJwsBT.mjs → repair-launch-json-I3IwXFMq.mjs} +2 -2
- package/dist/{repair-mcp-configs-DYDyOGXO.mjs → repair-mcp-configs-B127iF24.mjs} +2 -2
- package/dist/repair-skills-BABpOhB_.mjs +1 -0
- package/dist/{repair-skills-DquHsHSZ.mjs → repair-skills-CRG-r1Xh.mjs} +2 -2
- package/dist/{resolve-project-root-TgFFxl73.mjs → resolve-project-root-urAKqvDX.mjs} +4 -4
- package/dist/server-lock-C_5VGPQF.mjs +1 -0
- package/dist/{server-lock-DW446_ti.mjs → server-lock-_JWkU2Mh.mjs} +2 -2
- package/dist/{skill-teardown-DLbNuqvC.mjs → skill-teardown-CVMrfSeZ.mjs} +2 -2
- package/dist/{src-nJP2O0vw.mjs → src-BRlSw7bk.mjs} +1 -1
- package/dist/src-CVSYGTsF.mjs +1 -0
- package/dist/src-CjFV1e1Z.mjs +2039 -0
- package/dist/{src-Cjs2mjwW.mjs → src-DhKkOAcb.mjs} +128 -128
- package/dist/{src-D_KoKQ_4.mjs → src-NzbRogF8.mjs} +4 -4
- package/dist/{start-CDpy3ivM.mjs → start-BAzV9sqe.mjs} +3 -3
- package/dist/start-C47k5p1a.mjs +1 -0
- package/package.json +4 -4
- package/dist/constants-BU4eKKFx.mjs +0 -2
- package/dist/git-handle-ACPhpYTy.mjs +0 -1
- package/dist/init-DxGZlS0A.mjs +0 -1
- package/dist/loader-B4icgd7A.mjs +0 -1
- package/dist/md-manager-CTy1swXK.mjs +0 -2
- package/dist/preview-S3f8BiEi.mjs +0 -1
- package/dist/public/assets/FeedbackForm-DbHLRCGV.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-wSMmw4k7.js +0 -1
- package/dist/public/assets/SessionsHost-D8_fdp2Z.js +0 -2
- package/dist/public/assets/client-version-B9jWAX8Y.js +0 -1
- package/dist/public/assets/globals-Df7vQ3KZ.css +0 -1
- package/dist/public/assets/i18n-BAClLrqy.js +0 -1
- package/dist/public/assets/lib-CQqy20Z3.js +0 -29
- package/dist/public/assets/mermaid-GHXKKRXX-D2pBG5L4.js +0 -1
- package/dist/public/assets/messages-BCzdglIs.js +0 -1
- package/dist/public/assets/messages-BNXhZIvP.js +0 -1
- package/dist/public/assets/messages-BTOATtFo.js +0 -1
- package/dist/public/assets/messages-CEAIJ2vr.js +0 -1
- package/dist/public/assets/messages-CP6EucXo.js +0 -1
- package/dist/public/assets/messages-CZYMn827.js +0 -1
- package/dist/public/assets/messages-DSiLvtAQ.js +0 -1
- package/dist/public/assets/messages-DeCaehhs.js +0 -1
- package/dist/public/assets/messages-Ds6A6ql_.js +0 -1
- package/dist/public/assets/messages-LQQZNjF5.js +0 -1
- package/dist/public/assets/messages-hYFi4d1C.js +0 -1
- package/dist/public/assets/messages-natrutgz.js +0 -1
- package/dist/public/assets/terminal-launch-events-vGjuKPQL.js +0 -1
- package/dist/repair-skills-CiWDpMXb.mjs +0 -1
- package/dist/server-lock-CKYMJfzI.mjs +0 -1
- package/dist/src-2igu-66q.mjs +0 -2039
- package/dist/src-CbNsCrxc.mjs +0 -1
- package/dist/start-Baqd7RHG.mjs +0 -1
- /package/dist/public/assets/{__vite-browser-external-BpzCr_ou.js → __vite-browser-external-Ci1NQTFf.js} +0 -0
- /package/dist/public/assets/{calendar-Dl_OvZ6j.js → calendar-C9Zcn0Ol.js} +0 -0
- /package/dist/public/assets/{code-highlighter-impl-CqBvFNiv.js → code-highlighter-impl-Cd7bLu8y.js} +0 -0
- /package/dist/public/assets/{globals-CTP2Nuyu.js → globals-BFYzJ2RB.js} +0 -0
- /package/dist/public/assets/{share-metadata-rows-CSTN28dW.js → share-metadata-rows-JAHDqWDY.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Nn as e,Pn as t}from"./dist-CWxNQtC52.js";var n={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.63.9`}?.VITE_APP_VERSION??`0.0.0-unknown`;function r(){return e({kind:`web`,runtimeVersion:n})}function i(){return t({kind:`web`,runtimeVersion:n})}export{r as n,i as r,n as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-BUgB2tll.js";import{Ar as t,Kn as n,Lr as r,Tn as i,Wn as a,ei as o,jn as s,jr as c,ri as l,si as u}from"./DocumentContext-CpeWitiW.js";import{n as d,r as f}from"./dist-Nvb76hAm.js";import{t as p}from"./compiler-runtime-BfE3aGVn.js";import{i as m}from"./local-menu-action-bus-BuSRFm5g.js";import{t as h}from"./utils-CPqDy6Hr.js";import{t as g}from"./button-CA0dewJJ.js";import{i as _,n as ee,t as te}from"./tooltip-DPvMEqsq.js";import{xt as v}from"./CodeMirrorPropInput-CZg3NpYe.js";import{$n as y,Ln as b,Pi as x,Rn as S,_r as C,er as w}from"./dist-DSS3ixln2.js";import{n as T}from"./dist-CuH7ikCn.js";import{t as E}from"./dist-BIGNzOeF2.js";import{t as ne}from"./createLucideIcon-CAkY8Blx.js";import{t as re}from"./x-wQUDJS55.js";import{f as ie}from"./doc-paths-oMq41Y7d.js";var D=ne(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),O=p(),k=`var(--ok-comment-hue,37,99,235)`,ae=k,oe={fill:.22,line:.7},A={fill:.45,line:1},se=.45;function ce(e,t){let n=ae,{fill:r,line:i}=t?A:oe;return[`border-radius:2px`,`padding-bottom:1px`,...e.id===null?[]:[`cursor:pointer`],`background-color:rgba(${n},${r})`,`box-shadow:inset 0 -2px 0 rgba(${n},${i})`,``].join(`;`)}function j(e){return e.map(e=>e.id??`·`).join(`|`)}function le(e){let t=null;for(let n of e)n.id!==null&&(t===null||n.to-n.from<t.to-t.from)&&(t=n);return t?.id??null}function ue(e,t){return e.id===null||e.id===t}function de(e,t=null){let n=[...e].filter(e=>e.from<e.to).sort((e,t)=>e.from-t.from||e.to-t.to||(e.id??``).localeCompare(t.id??``));if(n.length===0)return[];let r=[...new Set(n.flatMap(e=>[e.from,e.to]))].sort((e,t)=>e-t),i=[],a=null,o=()=>{if(a===null)return;let e=a.covering.find(e=>ue(e,t));i.push({from:a.from,to:a.to,style:ce(e??a.covering[0],e!==void 0),threadId:le(a.covering)}),a=null};for(let e=0;e<r.length-1;e++){let t=r[e],i=r[e+1],s=n.filter(e=>e.from<=t&&e.to>=i);if(s.length===0){o();continue}if(a!==null&&a.to===t&&j(a.covering)===j(s)){a.to=i;continue}o(),a={from:t,to:i,covering:s}}return o(),i}var M=`data-comment-reveal`;function N(e){return typeof CSS<`u`&&CSS.escape?CSS.escape(e):e}function P(e){return e===``?null:document.querySelector(`[data-testid="property-row"][data-key="${N(e)}"]`)}function fe(e){let t=P(e);if(t===null)return null;let n=t.getBoundingClientRect();return n.height===0&&n.width===0?null:n}function pe(e){P(e)?.scrollIntoView({block:`center`,behavior:`smooth`})}function F(e){if(e.quote===``)return!1;let t=e.path.length===0?e.key:e.path[e.path.length-1],n=Array.from(document.querySelectorAll(`[data-testid="property-row"][data-key="${N(String(t))}"]`)),r=Array.from(document.querySelectorAll(`[data-testid="property-row"]`));for(let t of[...n,...r]){let n=t.querySelector(`textarea, input`);if(n===null)continue;let r=I(n.value,e.quote,e.start,e.end);if(r!==null)return t.scrollIntoView({block:`center`,behavior:`smooth`}),n.focus(),n.setSelectionRange(r.start,r.end),me(n),!0}return!1}function I(e,t,n,r){if(n!==void 0&&r!==void 0&&e.slice(n,r)===t)return{start:n,end:r};let i=e.indexOf(t);return i<0?null:{start:i,end:i+t.length}}function me(e){e.style.setProperty(`--comment-reveal-fill`,`rgba(${k},${se})`),e.setAttribute(M,`true`);let t=()=>{e.removeAttribute(M),e.style.removeProperty(`--comment-reveal-fill`)};e.addEventListener(`blur`,t,{once:!0}),e.addEventListener(`pointerdown`,t,{once:!0}),e.addEventListener(`keydown`,t,{once:!0})}function L(e,{includeBlockComponents:t=!1}={}){let n=``,r=[];return e.descendants((e,i)=>{if(e.isText&&e.text){for(let t=0;t<e.text.length;t++)n+=e.text[t],r.push(i+t);return!0}if(e.isBlock&&!t)return!0;let a=b(e);if(a.length>0){let t=i+e.nodeSize-1;for(let e=0;e<a.length;e++)n+=a[e],r.push(e===a.length-1?t:i)}return!0}),{text:n,positions:r}}function R(e,t){let n=[];if(t===``)return n;let r=e.indexOf(t);for(;r!==-1;)n.push(r),r=e.indexOf(t,r+1);return n}function z(e,t,n){let r=n?.prefix??``,i=n?.suffix??``;if(r===``&&i===``)return null;let a=r===``?[0]:C(e,r,{syntaxIn:`needle`}).map(e=>e.end),o=i===``?[e.length]:C(e,i,{syntaxIn:`needle`}).map(e=>e.start);if(a.length!==1||o.length!==1)return null;let s=a[0],c=o[0];for(;s<c&&/\s/.test(e[s]??``);)s+=1;for(;c>s&&/\s/.test(e[c-1]??``);)--c;if(c<=s)return null;let l=x(t.length);return c-s>l?null:{start:s,end:c}}function B(e,t){let n=e.positions[t.start],r=e.positions[t.end-1];return n==null||r==null?null:{from:n,to:r+1}}function V(e,t,n){if(t.length===0)return null;let r=R(e.text,t).map(e=>({start:e,end:e+t.length}));if(r.length===0&&(r=C(e.text,t,{syntaxIn:`needle`})),r.length===0){let r=z(e.text,t,n);return r===null?null:B(e,r)}let i=n?.prefix??``,a=n?.suffix??``,o=t=>e.text.includes(t)||C(e.text,t,{syntaxIn:`needle`}).length>0;if(i!==``&&a!==``&&!o(i+t+a)&&o(i+a))return null;let s=y({prefix:i,suffix:a},{syntaxInContext:!0}),c=t=>s===0||w(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0})>=s;if(r.length===1){if(!c(r[0])){let r=z(e.text,t,n);return r===null?null:B(e,r)}return B(e,r[0])}let l=[],u=-1;for(let t of r){let n=w(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0});n>u?(u=n,l=[t]):n===u&&l.push(t)}if(!c(l[0])){let r=z(e.text,t,n);return r===null?null:B(e,r)}return B(e,l[0])}var H=64;function he(e,t,n){return{prefix:S(e,Math.max(0,t-H),t),suffix:S(e,n,Math.min(e.content.size,n+H))}}function U(e,t,n){return W(e)(t,n)}function W(e){let t=L(e),n=null;return(r,i)=>{let a=V(t,r,i);return a===null?(n??=L(e,{includeBlockComponents:!0}),V(n,r,i)):a}}var ge=220,_e=24,ve=600;function G(e,t){return s(e,()=>{let n=i(e);t(),window.setTimeout(()=>n.release(),ve)})}function ye(e){let t=e.viewTop+e.insetTop,n=e.viewBottom-ge;return e.anchorTop>=t&&e.anchorBottom<=n?0:e.anchorTop-(t+_e)}function K(e){let t=e?.parentElement??null;for(;t;){let e=getComputedStyle(t).overflowY;if(e===`auto`||e===`scroll`)return t;t=t.parentElement}return null}function q(e){let t=Number.parseFloat(getComputedStyle(e).scrollPaddingTop);return Number.isFinite(t)?t:0}function J(e,t,n,r){let i=v(e);if(!i)return!1;let a=K(i.dom);if(!a)return G(n,()=>e.commands.scrollIntoView());let o,s;try{o=i.coordsAtPos(t.from),s=i.coordsAtPos(t.to)}catch{return!1}let c=a.getBoundingClientRect(),l=ye({anchorTop:o.top,anchorBottom:Math.max(o.bottom,s.bottom),viewTop:c.top,viewBottom:c.bottom,insetTop:q(a)});if(l===0)return!0;let u=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;return G(n,()=>a.scrollTo({top:a.scrollTop+l,behavior:r?.instant||u?`auto`:`smooth`}))}var be=1e4,xe=80,Se=1500,Y=[`wheel`,`touchstart`,`mousedown`,`keydown`];function Ce(e){let r=!1,i=null,o=null,s=-1,l=()=>{let n=a(e.docName);if(!n||n.isDestroyed)return!1;if(r||(r=!0,t(e.threadId)),e.quote===``)return i===null&&(i=Date.now(),c(e.threadId)),!0;let l=n.state.doc.content.size;return(o===null||l!==s)&&(o=U(n.state.doc,e.quote,e.context),s=l),!o||!J(n,o,e.docName,{instant:!0})?!1:(i===null&&(i=Date.now(),c(e.threadId)),!0)};u(`comments`),l(),a(e.docName)===null&&window.location.assign(ie(e.docName));let d=!1,f=()=>{if(!d){d=!0,h(),window.clearInterval(g),window.clearTimeout(_);for(let e of Y)window.removeEventListener(e,p,!0)}},p=()=>f(),m=()=>{l()&&i!==null&&Date.now()-i>=Se&&f()},h=n(m),g=window.setInterval(m,xe),_=window.setTimeout(()=>{i===null&&T.error(r?E._({id:`KeXgA-`}):E._({id:`JDQ5I5`})),f()},be);for(let e of Y)window.addEventListener(e,p,!0);m()}var X=e();function we(){return o().length}function Te(){let e=(0,O.c)(4),t=o(),n;if(e[0]!==t){n=new Map;for(let e of t){let t=r(e)?.docName;t!==void 0&&n.set(t,(n.get(t)??0)+1)}e[0]=t,e[1]=n}else n=e[1];let i;return e[2]===n?i=e[3]:(i=[...n].map(Ee),e[2]=n,e[3]=i),i}function Ee(e){let[t,n]=e;return{docName:t,count:n}}function De(e){let t=(0,O.c)(34),{count:n,docs:r,attached:i,onAttach:a,onDismiss:o}=e,s;t[0]===r?s=t[1]:(s=r===void 0?[]:r,t[0]=r,t[1]=s);let c=s,{_:l}=f();if(n===0)return null;if(!i){let e;t[2]===l?e=t[3]:(e=l({id:`UpOct_`}),t[2]=l,t[3]=e);let n,r,i;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=h(`h-auto min-h-0 gap-1 rounded-md border border-dashed bg-transparent px-1.5 py-0.5`,`text-xs font-normal text-muted-foreground hover:bg-muted/60 hover:text-foreground`),r=(0,X.jsx)(m,{className:`size-3`}),i=(0,X.jsx)(d,{id:`VbyRUy`}),t[4]=n,t[5]=r,t[6]=i):(n=t[4],r=t[5],i=t[6]);let o;return t[7]!==a||t[8]!==e?(o=(0,X.jsxs)(g,{type:`button`,size:`sm`,variant:`ghost`,"aria-pressed":!1,"aria-label":e,onClick:a,"data-testid":`composer-context-chip-comments`,className:n,children:[r,i]}),t[7]=a,t[8]=e,t[9]=o):o=t[9],o}let u;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(u=h(`inline-flex items-center gap-1 rounded-md border bg-muted/60 py-0.5 pr-0.5 pl-1.5`,`text-xs text-muted-foreground`),t[10]=u):u=t[10];let p;t[11]===l?p=t[12]:(p=l({id:`2zvUIK`}),t[11]=l,t[12]=p);let v;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,X.jsx)(D,{className:`size-3`}),t[13]=v):v=t[13];let y;t[14]!==n||t[15]!==c.length?(y=c.length>1?(0,X.jsx)(d,{id:`5TmrYN`,values:{0:c.length,count:n}}):(0,X.jsx)(d,{id:`eiUA4k`,values:{count:n}}),t[14]=n,t[15]=c.length,t[16]=y):y=t[16];let b;t[17]!==p||t[18]!==y?(b=(0,X.jsx)(_,{asChild:!0,children:(0,X.jsxs)(g,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":p,onClick:ke,"data-testid":`composer-comments-open-panel`,className:`h-auto min-h-0 gap-1 px-0.5 py-0 text-xs font-normal text-muted-foreground hover:text-foreground`,children:[v,y]})}),t[17]=p,t[18]=y,t[19]=b):b=t[19];let x;t[20]===c?x=t[21]:(x=(0,X.jsx)(ee,{className:`max-w-64`,children:c.length>1?(0,X.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:c.map(Oe)}):(0,X.jsx)(d,{id:`2zvUIK`})}),t[20]=c,t[21]=x);let S;t[22]!==b||t[23]!==x?(S=(0,X.jsxs)(te,{children:[b,x]}),t[22]=b,t[23]=x,t[24]=S):S=t[24];let C;t[25]===l?C=t[26]:(C=l({id:`pFRz_E`}),t[25]=l,t[26]=C);let w;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,X.jsx)(re,{className:`size-3`}),t[27]=w):w=t[27];let T;t[28]!==o||t[29]!==C?(T=(0,X.jsx)(g,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":C,onClick:o,className:`size-4 p-0 text-muted-foreground hover:text-foreground`,children:w}),t[28]=o,t[29]=C,t[30]=T):T=t[30];let E;return t[31]!==T||t[32]!==S?(E=(0,X.jsxs)(`span`,{"data-testid":`composer-context-chip-comments`,className:u,children:[S,T]}),t[31]=T,t[32]=S,t[33]=E):E=t[33],E}function Oe(e){return(0,X.jsxs)(`li`,{className:`flex items-baseline gap-1.5`,children:[(0,X.jsx)(`span`,{className:`tabular-nums`,children:e.count}),(0,X.jsx)(`span`,{className:`truncate`,children:Z(e.docName)})]},e.docName)}function ke(){return l()}function Z(e){let t=e.lastIndexOf(`/`);return t>=0?e.slice(t+1):e}function Ae(e,t){let n=e;for(let e of t)n+=typeof e==`number`?`[${e}]`:`.${e}`;return n}function je(e){Ce({docName:e.docName,quote:e.target.kind===`property`?``:e.anchor?.quote??``,threadId:e.id,context:e.anchor??void 0});let{target:t,anchor:n}=e;if(t.kind!==`property`||n===null)return;let r=0,i=()=>{F({key:t.key,path:t.path,quote:n.quote,start:n.start,end:n.end})||(r+=1,!(r>=Q)&&requestAnimationFrame(i))};requestAnimationFrame(i)}var Q=30;function Me(e){return{docName:e.docName,body:e.instruction,propertyKey:e.property,quote:e.passage?.exact??``,anchorLost:e.anchorLost,prefix:e.passage?.prefix??``,suffix:e.passage?.suffix??``,repeats:e.passageRepeats}}var $=48;function Ne(e){let t=e.replace(/\s+/g,` `).trimStart();return t.length>$?`…${t.slice(-$)}`:t}function Pe(e){let t=e.replace(/\s+/g,` `).trimEnd();return t.length>$?`${t.slice(0,$)}…`:t}function Fe(e){if(!e.repeats)return null;let t=Ne(e.prefix),n=Pe(e.suffix);return t===``&&n===``?null:`(This text appears more than once in the file. The one meant is ${t===``?`at the start of the file, followed by "${n}"`:n===``?`at the end of the file, preceded by "${t}"`:`between "${t}" and "${n}"`} — match that context rather than the first occurrence.)`}function Ie(e,t,n){let r=t.trim(),i=[];if(i.push(r.length>0?r:`Address the following review comments by editing the documents directly.`),i.push(``),i.push(e.length===1?`The comment:`:`The ${e.length} comments:`),e.forEach((e,t)=>{if(i.push(``),e.propertyKey){let n=e.quote.trim();if(n===``)i.push(`${t+1}. In \`${e.docName}\`, on the \`${e.propertyKey}\` property (frontmatter):`),i.push(``),i.push(` ${e.body.trim()}`);else{i.push(`${t+1}. In \`${e.docName}\`, on this text within the \`${e.propertyKey}\` property (frontmatter):`),i.push(``);for(let e of n.split(`
|
|
1
|
+
import{t as e}from"./jsx-runtime-BUgB2tll.js";import{Ar as t,Kn as n,Lr as r,Tn as i,Wn as a,ei as o,jn as s,jr as c,ri as l,si as u}from"./DocumentContext-DyBKMWUQ.js";import{n as d,r as f}from"./dist-Nvb76hAm.js";import{t as p}from"./compiler-runtime-BfE3aGVn.js";import{i as m}from"./local-menu-action-bus-BuSRFm5g.js";import{t as h}from"./utils-CPqDy6Hr.js";import{t as g}from"./button-CA0dewJJ.js";import{i as _,n as ee,t as te}from"./tooltip-DPvMEqsq.js";import{xt as v}from"./CodeMirrorPropInput-B8JfraRG.js";import{$n as y,Ln as b,Pi as x,Rn as S,_r as C,er as w}from"./dist-CWxNQtC52.js";import{n as T}from"./dist-CuH7ikCn.js";import{t as E}from"./dist-BIGNzOeF2.js";import{t as ne}from"./createLucideIcon-CAkY8Blx.js";import{t as re}from"./x-wQUDJS55.js";import{f as ie}from"./doc-paths-DgbGdxZ1.js";var D=ne(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),O=p(),k=`var(--ok-comment-hue,37,99,235)`,ae=k,oe={fill:.22,line:.7},A={fill:.45,line:1},se=.45;function ce(e,t){let n=ae,{fill:r,line:i}=t?A:oe;return[`border-radius:2px`,`padding-bottom:1px`,...e.id===null?[]:[`cursor:pointer`],`background-color:rgba(${n},${r})`,`box-shadow:inset 0 -2px 0 rgba(${n},${i})`,``].join(`;`)}function j(e){return e.map(e=>e.id??`·`).join(`|`)}function le(e){let t=null;for(let n of e)n.id!==null&&(t===null||n.to-n.from<t.to-t.from)&&(t=n);return t?.id??null}function ue(e,t){return e.id===null||e.id===t}function de(e,t=null){let n=[...e].filter(e=>e.from<e.to).sort((e,t)=>e.from-t.from||e.to-t.to||(e.id??``).localeCompare(t.id??``));if(n.length===0)return[];let r=[...new Set(n.flatMap(e=>[e.from,e.to]))].sort((e,t)=>e-t),i=[],a=null,o=()=>{if(a===null)return;let e=a.covering.find(e=>ue(e,t));i.push({from:a.from,to:a.to,style:ce(e??a.covering[0],e!==void 0),threadId:le(a.covering)}),a=null};for(let e=0;e<r.length-1;e++){let t=r[e],i=r[e+1],s=n.filter(e=>e.from<=t&&e.to>=i);if(s.length===0){o();continue}if(a!==null&&a.to===t&&j(a.covering)===j(s)){a.to=i;continue}o(),a={from:t,to:i,covering:s}}return o(),i}var M=`data-comment-reveal`;function N(e){return typeof CSS<`u`&&CSS.escape?CSS.escape(e):e}function P(e){return e===``?null:document.querySelector(`[data-testid="property-row"][data-key="${N(e)}"]`)}function fe(e){let t=P(e);if(t===null)return null;let n=t.getBoundingClientRect();return n.height===0&&n.width===0?null:n}function pe(e){P(e)?.scrollIntoView({block:`center`,behavior:`smooth`})}function F(e){if(e.quote===``)return!1;let t=e.path.length===0?e.key:e.path[e.path.length-1],n=Array.from(document.querySelectorAll(`[data-testid="property-row"][data-key="${N(String(t))}"]`)),r=Array.from(document.querySelectorAll(`[data-testid="property-row"]`));for(let t of[...n,...r]){let n=t.querySelector(`textarea, input`);if(n===null)continue;let r=I(n.value,e.quote,e.start,e.end);if(r!==null)return t.scrollIntoView({block:`center`,behavior:`smooth`}),n.focus(),n.setSelectionRange(r.start,r.end),me(n),!0}return!1}function I(e,t,n,r){if(n!==void 0&&r!==void 0&&e.slice(n,r)===t)return{start:n,end:r};let i=e.indexOf(t);return i<0?null:{start:i,end:i+t.length}}function me(e){e.style.setProperty(`--comment-reveal-fill`,`rgba(${k},${se})`),e.setAttribute(M,`true`);let t=()=>{e.removeAttribute(M),e.style.removeProperty(`--comment-reveal-fill`)};e.addEventListener(`blur`,t,{once:!0}),e.addEventListener(`pointerdown`,t,{once:!0}),e.addEventListener(`keydown`,t,{once:!0})}function L(e,{includeBlockComponents:t=!1}={}){let n=``,r=[];return e.descendants((e,i)=>{if(e.isText&&e.text){for(let t=0;t<e.text.length;t++)n+=e.text[t],r.push(i+t);return!0}if(e.isBlock&&!t)return!0;let a=b(e);if(a.length>0){let t=i+e.nodeSize-1;for(let e=0;e<a.length;e++)n+=a[e],r.push(e===a.length-1?t:i)}return!0}),{text:n,positions:r}}function R(e,t){let n=[];if(t===``)return n;let r=e.indexOf(t);for(;r!==-1;)n.push(r),r=e.indexOf(t,r+1);return n}function z(e,t,n){let r=n?.prefix??``,i=n?.suffix??``;if(r===``&&i===``)return null;let a=r===``?[0]:C(e,r,{syntaxIn:`needle`}).map(e=>e.end),o=i===``?[e.length]:C(e,i,{syntaxIn:`needle`}).map(e=>e.start);if(a.length!==1||o.length!==1)return null;let s=a[0],c=o[0];for(;s<c&&/\s/.test(e[s]??``);)s+=1;for(;c>s&&/\s/.test(e[c-1]??``);)--c;if(c<=s)return null;let l=x(t.length);return c-s>l?null:{start:s,end:c}}function B(e,t){let n=e.positions[t.start],r=e.positions[t.end-1];return n==null||r==null?null:{from:n,to:r+1}}function V(e,t,n){if(t.length===0)return null;let r=R(e.text,t).map(e=>({start:e,end:e+t.length}));if(r.length===0&&(r=C(e.text,t,{syntaxIn:`needle`})),r.length===0){let r=z(e.text,t,n);return r===null?null:B(e,r)}let i=n?.prefix??``,a=n?.suffix??``,o=t=>e.text.includes(t)||C(e.text,t,{syntaxIn:`needle`}).length>0;if(i!==``&&a!==``&&!o(i+t+a)&&o(i+a))return null;let s=y({prefix:i,suffix:a},{syntaxInContext:!0}),c=t=>s===0||w(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0})>=s;if(r.length===1){if(!c(r[0])){let r=z(e.text,t,n);return r===null?null:B(e,r)}return B(e,r[0])}let l=[],u=-1;for(let t of r){let n=w(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0});n>u?(u=n,l=[t]):n===u&&l.push(t)}if(!c(l[0])){let r=z(e.text,t,n);return r===null?null:B(e,r)}return B(e,l[0])}var H=64;function he(e,t,n){return{prefix:S(e,Math.max(0,t-H),t),suffix:S(e,n,Math.min(e.content.size,n+H))}}function U(e,t,n){return W(e)(t,n)}function W(e){let t=L(e),n=null;return(r,i)=>{let a=V(t,r,i);return a===null?(n??=L(e,{includeBlockComponents:!0}),V(n,r,i)):a}}var ge=220,_e=24,ve=600;function G(e,t){return s(e,()=>{let n=i(e);t(),window.setTimeout(()=>n.release(),ve)})}function ye(e){let t=e.viewTop+e.insetTop,n=e.viewBottom-ge;return e.anchorTop>=t&&e.anchorBottom<=n?0:e.anchorTop-(t+_e)}function K(e){let t=e?.parentElement??null;for(;t;){let e=getComputedStyle(t).overflowY;if(e===`auto`||e===`scroll`)return t;t=t.parentElement}return null}function q(e){let t=Number.parseFloat(getComputedStyle(e).scrollPaddingTop);return Number.isFinite(t)?t:0}function J(e,t,n,r){let i=v(e);if(!i)return!1;let a=K(i.dom);if(!a)return G(n,()=>e.commands.scrollIntoView());let o,s;try{o=i.coordsAtPos(t.from),s=i.coordsAtPos(t.to)}catch{return!1}let c=a.getBoundingClientRect(),l=ye({anchorTop:o.top,anchorBottom:Math.max(o.bottom,s.bottom),viewTop:c.top,viewBottom:c.bottom,insetTop:q(a)});if(l===0)return!0;let u=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;return G(n,()=>a.scrollTo({top:a.scrollTop+l,behavior:r?.instant||u?`auto`:`smooth`}))}var be=1e4,xe=80,Se=1500,Y=[`wheel`,`touchstart`,`mousedown`,`keydown`];function Ce(e){let r=!1,i=null,o=null,s=-1,l=()=>{let n=a(e.docName);if(!n||n.isDestroyed)return!1;if(r||(r=!0,t(e.threadId)),e.quote===``)return i===null&&(i=Date.now(),c(e.threadId)),!0;let l=n.state.doc.content.size;return(o===null||l!==s)&&(o=U(n.state.doc,e.quote,e.context),s=l),!o||!J(n,o,e.docName,{instant:!0})?!1:(i===null&&(i=Date.now(),c(e.threadId)),!0)};u(`comments`),l(),a(e.docName)===null&&window.location.assign(ie(e.docName));let d=!1,f=()=>{if(!d){d=!0,h(),window.clearInterval(g),window.clearTimeout(_);for(let e of Y)window.removeEventListener(e,p,!0)}},p=()=>f(),m=()=>{l()&&i!==null&&Date.now()-i>=Se&&f()},h=n(m),g=window.setInterval(m,xe),_=window.setTimeout(()=>{i===null&&T.error(r?E._({id:`KeXgA-`}):E._({id:`JDQ5I5`})),f()},be);for(let e of Y)window.addEventListener(e,p,!0);m()}var X=e();function we(){return o().length}function Te(){let e=(0,O.c)(4),t=o(),n;if(e[0]!==t){n=new Map;for(let e of t){let t=r(e)?.docName;t!==void 0&&n.set(t,(n.get(t)??0)+1)}e[0]=t,e[1]=n}else n=e[1];let i;return e[2]===n?i=e[3]:(i=[...n].map(Ee),e[2]=n,e[3]=i),i}function Ee(e){let[t,n]=e;return{docName:t,count:n}}function De(e){let t=(0,O.c)(34),{count:n,docs:r,attached:i,onAttach:a,onDismiss:o}=e,s;t[0]===r?s=t[1]:(s=r===void 0?[]:r,t[0]=r,t[1]=s);let c=s,{_:l}=f();if(n===0)return null;if(!i){let e;t[2]===l?e=t[3]:(e=l({id:`UpOct_`}),t[2]=l,t[3]=e);let n,r,i;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=h(`h-auto min-h-0 gap-1 rounded-md border border-dashed bg-transparent px-1.5 py-0.5`,`text-xs font-normal text-muted-foreground hover:bg-muted/60 hover:text-foreground`),r=(0,X.jsx)(m,{className:`size-3`}),i=(0,X.jsx)(d,{id:`VbyRUy`}),t[4]=n,t[5]=r,t[6]=i):(n=t[4],r=t[5],i=t[6]);let o;return t[7]!==a||t[8]!==e?(o=(0,X.jsxs)(g,{type:`button`,size:`sm`,variant:`ghost`,"aria-pressed":!1,"aria-label":e,onClick:a,"data-testid":`composer-context-chip-comments`,className:n,children:[r,i]}),t[7]=a,t[8]=e,t[9]=o):o=t[9],o}let u;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(u=h(`inline-flex items-center gap-1 rounded-md border bg-muted/60 py-0.5 pr-0.5 pl-1.5`,`text-xs text-muted-foreground`),t[10]=u):u=t[10];let p;t[11]===l?p=t[12]:(p=l({id:`2zvUIK`}),t[11]=l,t[12]=p);let v;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,X.jsx)(D,{className:`size-3`}),t[13]=v):v=t[13];let y;t[14]!==n||t[15]!==c.length?(y=c.length>1?(0,X.jsx)(d,{id:`5TmrYN`,values:{0:c.length,count:n}}):(0,X.jsx)(d,{id:`eiUA4k`,values:{count:n}}),t[14]=n,t[15]=c.length,t[16]=y):y=t[16];let b;t[17]!==p||t[18]!==y?(b=(0,X.jsx)(_,{asChild:!0,children:(0,X.jsxs)(g,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":p,onClick:ke,"data-testid":`composer-comments-open-panel`,className:`h-auto min-h-0 gap-1 px-0.5 py-0 text-xs font-normal text-muted-foreground hover:text-foreground`,children:[v,y]})}),t[17]=p,t[18]=y,t[19]=b):b=t[19];let x;t[20]===c?x=t[21]:(x=(0,X.jsx)(ee,{className:`max-w-64`,children:c.length>1?(0,X.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:c.map(Oe)}):(0,X.jsx)(d,{id:`2zvUIK`})}),t[20]=c,t[21]=x);let S;t[22]!==b||t[23]!==x?(S=(0,X.jsxs)(te,{children:[b,x]}),t[22]=b,t[23]=x,t[24]=S):S=t[24];let C;t[25]===l?C=t[26]:(C=l({id:`pFRz_E`}),t[25]=l,t[26]=C);let w;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,X.jsx)(re,{className:`size-3`}),t[27]=w):w=t[27];let T;t[28]!==o||t[29]!==C?(T=(0,X.jsx)(g,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":C,onClick:o,className:`size-4 p-0 text-muted-foreground hover:text-foreground`,children:w}),t[28]=o,t[29]=C,t[30]=T):T=t[30];let E;return t[31]!==T||t[32]!==S?(E=(0,X.jsxs)(`span`,{"data-testid":`composer-context-chip-comments`,className:u,children:[S,T]}),t[31]=T,t[32]=S,t[33]=E):E=t[33],E}function Oe(e){return(0,X.jsxs)(`li`,{className:`flex items-baseline gap-1.5`,children:[(0,X.jsx)(`span`,{className:`tabular-nums`,children:e.count}),(0,X.jsx)(`span`,{className:`truncate`,children:Z(e.docName)})]},e.docName)}function ke(){return l()}function Z(e){let t=e.lastIndexOf(`/`);return t>=0?e.slice(t+1):e}function Ae(e,t){let n=e;for(let e of t)n+=typeof e==`number`?`[${e}]`:`.${e}`;return n}function je(e){Ce({docName:e.docName,quote:e.target.kind===`property`?``:e.anchor?.quote??``,threadId:e.id,context:e.anchor??void 0});let{target:t,anchor:n}=e;if(t.kind!==`property`||n===null)return;let r=0,i=()=>{F({key:t.key,path:t.path,quote:n.quote,start:n.start,end:n.end})||(r+=1,!(r>=Q)&&requestAnimationFrame(i))};requestAnimationFrame(i)}var Q=30;function Me(e){return{docName:e.docName,body:e.instruction,propertyKey:e.property,quote:e.passage?.exact??``,anchorLost:e.anchorLost,prefix:e.passage?.prefix??``,suffix:e.passage?.suffix??``,repeats:e.passageRepeats}}var $=48;function Ne(e){let t=e.replace(/\s+/g,` `).trimStart();return t.length>$?`…${t.slice(-$)}`:t}function Pe(e){let t=e.replace(/\s+/g,` `).trimEnd();return t.length>$?`${t.slice(0,$)}…`:t}function Fe(e){if(!e.repeats)return null;let t=Ne(e.prefix),n=Pe(e.suffix);return t===``&&n===``?null:`(This text appears more than once in the file. The one meant is ${t===``?`at the start of the file, followed by "${n}"`:n===``?`at the end of the file, preceded by "${t}"`:`between "${t}" and "${n}"`} — match that context rather than the first occurrence.)`}function Ie(e,t,n){let r=t.trim(),i=[];if(i.push(r.length>0?r:`Address the following review comments by editing the documents directly.`),i.push(``),i.push(e.length===1?`The comment:`:`The ${e.length} comments:`),e.forEach((e,t)=>{if(i.push(``),e.propertyKey){let n=e.quote.trim();if(n===``)i.push(`${t+1}. In \`${e.docName}\`, on the \`${e.propertyKey}\` property (frontmatter):`),i.push(``),i.push(` ${e.body.trim()}`);else{i.push(`${t+1}. In \`${e.docName}\`, on this text within the \`${e.propertyKey}\` property (frontmatter):`),i.push(``);for(let e of n.split(`
|
|
2
2
|
`))i.push(` > ${e}`);i.push(``),i.push(` ${e.body.trim()}`)}e.anchorLost&&(i.push(``),i.push(n===``?` (Note: \`${e.propertyKey}\` is no longer in this document's frontmatter — it was renamed or removed since the comment was written. Do not apply this to a different property; if you cannot tell what it now refers to, say so instead of guessing.)`:` (Note: that text is no longer in \`${e.propertyKey}\` — the value was edited, reshaped, or removed since the comment was written. Do not apply this to a different property or a different part of the value; if you cannot tell what it now refers to, say so instead of guessing.)`));return}i.push(`${t+1}. In \`${e.docName}\`, on this passage:`),i.push(``);for(let t of e.quote.split(`
|
|
3
3
|
`))i.push(` > ${t}`);i.push(``),i.push(` ${e.body.trim()}`);let n=Fe(e);n!==null&&(i.push(``),i.push(` ${n}`)),e.anchorLost&&(i.push(``),i.push(` (Note: this passage is no longer in the document — it was edited or removed since the comment was written. Do not apply this to a different passage; if you cannot tell what it now refers to, say so instead of guessing.)`))}),n&&n.markdown.trim().length>0){i.push(``),i.push(`Also in scope, selected in \`${n.docName}\` (not a comment):`),i.push(``);for(let e of n.markdown.trim().split(`
|
|
4
4
|
`))i.push(`> ${e}`)}return i.join(`
|