@inkeep/open-knowledge 0.58.0-beta.1 → 0.58.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/dist/{acp-harness-probe-1T3u8lIy.mjs → acp-harness-probe-B8cjyUwS.mjs} +2 -2
  2. package/dist/cli.mjs +22 -22
  3. package/dist/constants-XJleQvys.mjs +2 -0
  4. package/dist/{git-handle-Dk7GEAfH.mjs → git-handle-3stJTucC.mjs} +2 -2
  5. package/dist/git-handle-B0ZVs8y7.mjs +1 -0
  6. package/dist/index.d.mts +2612 -19
  7. package/dist/index.mjs +2 -2
  8. package/dist/init-B7IuLPDf.mjs +1 -0
  9. package/dist/{init-CgzZMWZN.mjs → init-DJX9zKiO.mjs} +5 -5
  10. package/dist/{launch-json-removal-CczI_AQw.mjs → launch-json-removal-BiK2fLSM.mjs} +2 -2
  11. package/dist/loader-BshElnYk.mjs +1 -0
  12. package/dist/{loader-DN88fSLk.mjs → loader-Db-3Tt5G.mjs} +2 -2
  13. package/dist/md-manager-Dz3nKJbO.mjs +2 -0
  14. package/dist/{open-browser-BXT69qcq.mjs → open-browser-BPu-89ta.mjs} +2 -2
  15. package/dist/parse-worker.mjs +1 -1
  16. package/dist/{preview-K8zvEnBc.mjs → preview-CtA0e_2y.mjs} +2 -2
  17. package/dist/preview-DDh7AoJO.mjs +1 -0
  18. package/dist/public/assets/ActivityModeContent-lal4lxDh.js +1 -0
  19. package/dist/public/assets/{AgentDiffPane-CxvPSRp5.js → AgentDiffPane-CuDH0-HN.js} +1 -1
  20. package/dist/public/assets/{AgentIconCluster-CjMEI-L4.js → AgentIconCluster-B26uigRz.js} +1 -1
  21. package/dist/public/assets/{AgentThreadClientBinder-CZt9gzGP.js → AgentThreadClientBinder-M_2EBFIT.js} +1 -1
  22. package/dist/public/assets/{AppMenubar-CiSfRgZz.js → AppMenubar-DNz-YQ-n.js} +1 -1
  23. package/dist/public/assets/{BugReportHistory-DAkLR0uT.js → BugReportHistory-3WmeKMdN.js} +1 -1
  24. package/dist/public/assets/{BugReportHistoryDialog-D3FmiOs-.js → BugReportHistoryDialog-B8G8dpLP.js} +1 -1
  25. package/dist/public/assets/{CodeMirrorPropInput-Bj9gYc9v.js → CodeMirrorPropInput-DN3nqPPS.js} +1 -1
  26. package/dist/public/assets/ConsentDialogBody-DIXTiaxR.js +2 -0
  27. package/dist/public/assets/{DiffView-BbCF3n86.js → DiffView-CjTilKZT.js} +1 -1
  28. package/dist/public/assets/{DocumentContext-CM98n-Wm.js → DocumentContext-CGXxK5Nq.js} +1 -1
  29. package/dist/public/assets/EditorModeToggle-CJjixYVK.js +1 -0
  30. package/dist/public/assets/EnableSyncConfirmDialog-Dh1Rcy3o.js +1 -0
  31. package/dist/public/assets/FeedbackForm-BKBlMB5r.js +1 -0
  32. package/dist/public/assets/{GraphPanel-Dbt6ehOx.js → GraphPanel-BDFyzdEz.js} +1 -1
  33. package/dist/public/assets/ImportSkillDialog-CIyqIGrG.js +1 -0
  34. package/dist/public/assets/{LintConfigEditor-DPAgvzQo.js → LintConfigEditor-Dfep8b0z.js} +1 -1
  35. package/dist/public/assets/ManagedArtifactProperties-Dhv2wo_H.js +1 -0
  36. package/dist/public/assets/ManagedArtifactProperties-UGfdHQU3.js +1 -0
  37. package/dist/public/assets/McpConsentDialogBody-GUHma1LV.js +1 -0
  38. package/dist/public/assets/{MermaidDocEditor-B-SpVE_4.js → MermaidDocEditor-BQi1FFtf.js} +1 -1
  39. package/dist/public/assets/{OpenInAgentMenuItem--c5Kl0UJ.js → OpenInAgentMenuItem-8Fp3GsHg.js} +1 -1
  40. package/dist/public/assets/{PropertyDisplayRow-JWrzMen3.js → PropertyDisplayRow-CgwKdqZo.js} +1 -1
  41. package/dist/public/assets/{ReportBugDialogBody-Bn7KSO7Z.js → ReportBugDialogBody-Ci98J5Bw.js} +1 -1
  42. package/dist/public/assets/SchemaConfigEditor-CT-3C9qT.js +1 -0
  43. package/dist/public/assets/SessionsHost-CBiFo-eV.js +2 -0
  44. package/dist/public/assets/{SettingsDialogBody-f_hQ7VPv.js → SettingsDialogBody-DJqUrkQv.js} +1 -1
  45. package/dist/public/assets/ShareBranchSwitchDialog-CpToxQMt.js +1 -0
  46. package/dist/public/assets/ShareReceiveDialog-LOwGCI-g.js +1 -0
  47. package/dist/public/assets/ShareReceiveMissDialog-FwMBNCVp.js +1 -0
  48. package/dist/public/assets/{SkillCostValue-XTEKNDJI.js → SkillCostValue-D_6C2Gog.js} +1 -1
  49. package/dist/public/assets/{SkillDestinationList-Dw1naFS2.js → SkillDestinationList-DpCf7aFO.js} +1 -1
  50. package/dist/public/assets/{SkillEditBanner-DFhrQ8xp.js → SkillEditBanner-COUIEuU_.js} +1 -1
  51. package/dist/public/assets/{SkillInstallMenu-B2HRT0pR.js → SkillInstallMenu-y2A7W0zZ.js} +1 -1
  52. package/dist/public/assets/{SkillOriginInline-Ba3UO-r0.js → SkillOriginInline-Dy9lf16Q.js} +1 -1
  53. package/dist/public/assets/{SkillToolbarControls-D_gVZcnp.js → SkillToolbarControls-BgGFORSX.js} +1 -1
  54. package/dist/public/assets/SlidesToolbarControls-DNkQ5Ng_.js +1 -0
  55. package/dist/public/assets/{SourceEditor-CZ1cWoNO.js → SourceEditor-XMsqlMIW.js} +1 -1
  56. package/dist/public/assets/{TerminalPanel-D15yQGLN.js → TerminalPanel-Ba-GkOb9.js} +1 -1
  57. package/dist/public/assets/{TerminalWindowApp-DoVS1306.js → TerminalWindowApp-uxpLRZph.js} +1 -1
  58. package/dist/public/assets/{TextDocEditor-gZsWz3eO.js → TextDocEditor-bfklV2Xk.js} +1 -1
  59. package/dist/public/assets/{ThreadView-BQHsrBEu.js → ThreadView-B7DWfAUa.js} +1 -1
  60. package/dist/public/assets/TimelineDiffPane-DO6QATC6.js +2 -0
  61. package/dist/public/assets/{auth-state-cache-BrvpmLJN.js → auth-state-cache-CI9zNqOf.js} +2 -2
  62. package/dist/public/assets/{client-version-vyi1QvTS.js → client-version-DvabycW5.js} +1 -1
  63. package/dist/public/assets/comment-chips-DQFCvweV.js +5 -0
  64. package/dist/public/assets/{config-provider-D1oa8ar_.js → config-provider-DbAEDIve.js} +3 -3
  65. package/dist/public/assets/{dist-BrL2bd3x.js → dist-Dih2A8fV.js} +1 -1
  66. package/dist/public/assets/{doc-paths-CeZpYfYr.js → doc-paths-DqJ_A_s7.js} +1 -1
  67. package/dist/public/assets/{documents-events-C6H3LrA9.js → documents-events-Ck8o2CoI.js} +1 -1
  68. package/dist/public/assets/{file-tree-adapter-DFyrX-92.js → file-tree-adapter-BaDVMyQN.js} +1 -1
  69. package/dist/public/assets/{file-tree-utils-C9zTW2_A.js → file-tree-utils-CEFaTYgx.js} +1 -1
  70. package/dist/public/assets/{folder-config-api-JwI3TW0L.js → folder-config-api-CRLsP3aa.js} +1 -1
  71. package/dist/public/assets/{follow-file-H_OOuojl.js → follow-file-ClytsNBG.js} +1 -1
  72. package/dist/public/assets/i18n-CxvtzbcF.js +1 -0
  73. package/dist/public/assets/{index-BXv4_oa9.js → index-CRykZfHv.js} +107 -107
  74. package/dist/public/assets/{lint-config-client-qKPmO3Qw.js → lint-config-client-Bpxmt15J.js} +1 -1
  75. package/dist/public/assets/markdownlint-rule-browser-B9wBZNA_.js +1 -0
  76. package/dist/public/assets/{mcp-consent-store-Bxq-u2M3.js → mcp-consent-store-lJGGM3y3.js} +1 -1
  77. package/dist/public/assets/{messages-DcmkySre.js → messages-08LuG7Yh.js} +1 -1
  78. package/dist/public/assets/{messages-C_U8ss6i.js → messages-8UNjn-wB.js} +1 -1
  79. package/dist/public/assets/{messages-Ce75_Ji3.js → messages-B1afcVKL.js} +1 -1
  80. package/dist/public/assets/{messages-C-9-pube.js → messages-B3B2uvAz.js} +1 -1
  81. package/dist/public/assets/{messages-BSrj3IKW.js → messages-B43p8sIM.js} +1 -1
  82. package/dist/public/assets/{messages-YKhV6ZL8.js → messages-BcNwTZn1.js} +1 -1
  83. package/dist/public/assets/{messages-D2dSy_ch.js → messages-Bry09IyM.js} +1 -1
  84. package/dist/public/assets/{messages-CyG8vSMs.js → messages-CKKI6mTk.js} +1 -1
  85. package/dist/public/assets/{messages-DavhhPbD.js → messages-CZ_qlZrG.js} +1 -1
  86. package/dist/public/assets/{messages-BsTQ5dHv.js → messages-CiQ4yQEj.js} +1 -1
  87. package/dist/public/assets/{messages-CH0H74g3.js → messages-DmnomFI2.js} +1 -1
  88. package/dist/public/assets/{messages-D7FYHWNu.js → messages-QLY9_S9X.js} +1 -1
  89. package/dist/public/assets/{navigation-targets-Du1yYMa3.js → navigation-targets-942ElqU6.js} +1 -1
  90. package/dist/public/assets/{open-managed-artifact-tab-DA0xFMQL.js → open-managed-artifact-tab-KzE_hPhn.js} +1 -1
  91. package/dist/public/assets/pending-receive-nav-store-CqtV9UvJ.js +1 -0
  92. package/dist/public/assets/{platform-labels-BW7YRK2j.js → platform-labels-C-SqHx4o.js} +1 -1
  93. package/dist/public/assets/{project-paths-xKaVJSAX.js → project-paths-BShAgBI2.js} +1 -1
  94. package/dist/public/assets/{prop-types-LyJPmVUN.js → prop-types-BxTZMSU2.js} +1 -1
  95. package/dist/public/assets/{receive-store-C7uwmgHL.js → receive-store-CcixohWp.js} +1 -1
  96. package/dist/public/assets/{selection-context-BJ7u_a2a.js → selection-context-Cwyx7sxG.js} +1 -1
  97. package/dist/public/assets/skill-actions-aU83p9hy.js +1 -0
  98. package/dist/public/assets/{skill-scope-41fjvVEv.js → skill-scope-BmcRzXKj.js} +1 -1
  99. package/dist/public/assets/{skills-api-BLsd0Xm0.js → skills-api-DYLAW1HV.js} +1 -1
  100. package/dist/public/assets/{src-TKA4AIQa.js → src-tib3hfpE.js} +1 -1
  101. package/dist/public/assets/{tag-pill-input-BBAkEv9f.js → tag-pill-input-BjL8aMcQ.js} +1 -1
  102. package/dist/public/assets/{target-navigation-intent-BxG_VSFm.js → target-navigation-intent-tYLsg509.js} +1 -1
  103. package/dist/public/assets/{terminal-cli-display-B3miHBqb.js → terminal-cli-display-CyCGNg1t.js} +1 -1
  104. package/dist/public/assets/{terminal-launch-events-D3Djrj2P.js → terminal-launch-events-B92DmpSo.js} +1 -1
  105. package/dist/public/assets/{terminal-telemetry-yDrCOyY3.js → terminal-telemetry-CPOwGHJS.js} +1 -1
  106. package/dist/public/assets/thread-client-rJFsjItr.js +1 -0
  107. package/dist/public/assets/{typing-burst-detector-BgFZQX05.js → typing-burst-detector-qsLXHCE-.js} +2 -2
  108. package/dist/public/assets/{uninstall-CFA5w-m5.js → uninstall-C4s7ZVBX.js} +1 -1
  109. package/dist/public/assets/{use-activity-panel-DPJJ75w9.js → use-activity-panel-DNBRkaVR.js} +1 -1
  110. package/dist/public/assets/{use-apply-config-color-theme-Eo0YlkiS.js → use-apply-config-color-theme-DonBpBNY.js} +1 -1
  111. package/dist/public/assets/{use-collab-url-DtfgRTLQ.js → use-collab-url-D_1xfAyN.js} +1 -1
  112. package/dist/public/assets/{use-live-xterm-theme-DSbS2g15.js → use-live-xterm-theme-Bq43Ad6a.js} +1 -1
  113. package/dist/public/assets/use-open-skill-BuExxEMB.js +1 -0
  114. package/dist/public/assets/{use-popular-skills-AdcFV1D_.js → use-popular-skills-PvU2WSqO.js} +1 -1
  115. package/dist/public/assets/{use-settings-route-B2jig6fs.js → use-settings-route-QaV_yXgj.js} +1 -1
  116. package/dist/public/assets/use-skill-origin-BwJcy3-O.js +1 -0
  117. package/dist/public/assets/{use-skills-Ct4t-6Ji.js → use-skills-2obCzXwU.js} +1 -1
  118. package/dist/public/assets/{use-terminal-enabled-DLCLwzPR.js → use-terminal-enabled-CnQiYBXk.js} +1 -1
  119. package/dist/public/assets/{use-timeline-entry-diff-B1RCXahh.js → use-timeline-entry-diff-DcgKaKLk.js} +1 -1
  120. package/dist/public/assets/{use-workspace-DXg_fDor.js → use-workspace-D9PQP2Ka.js} +1 -1
  121. package/dist/public/index.html +54 -54
  122. package/dist/public/uninstall.html +5 -5
  123. package/dist/{repair-launch-json-DjBHp3GO.mjs → repair-launch-json-BupFQtGx.mjs} +2 -2
  124. package/dist/{repair-mcp-configs-Buv3Zrg4.mjs → repair-mcp-configs-BZrsgW9o.mjs} +2 -2
  125. package/dist/repair-skills-BL2fDxUw.mjs +1 -0
  126. package/dist/{repair-skills-DC9YrDGX.mjs → repair-skills-CVxJr9ri.mjs} +2 -2
  127. package/dist/server-lock-Bii6_-R-.mjs +1 -0
  128. package/dist/{server-lock-xhUgHytn.mjs → server-lock-DyY8nPTr.mjs} +2 -2
  129. package/dist/{skill-teardown-DVWO087y.mjs → skill-teardown-DkXFhNS5.mjs} +2 -2
  130. package/dist/src-B4-XXkeg.mjs +1 -0
  131. package/dist/{src-BUjTbFVJ.mjs → src-Bh_IfeSA.mjs} +4 -4
  132. package/dist/{src-DT3BV-Jn.mjs → src-DXUB2UY6.mjs} +1 -1
  133. package/dist/src-ubDzLrbn.mjs +357 -0
  134. package/dist/{src-D5ZZydZi.mjs → src-vUi58oUc.mjs} +339 -339
  135. package/dist/start-CLOeqVCk.mjs +12 -0
  136. package/dist/start-D2rJg_FI.mjs +1 -0
  137. package/dist/{ui-D8O01OgQ.mjs → ui-CSG2PuL4.mjs} +3 -3
  138. package/dist/{write-project-skill-BufydPiH.mjs → write-project-skill-CQEMn_bx.mjs} +3 -3
  139. package/package.json +4 -4
  140. package/dist/constants-D2MyP7i6.mjs +0 -2
  141. package/dist/git-handle-CcWdc2o_.mjs +0 -1
  142. package/dist/init-2Ec6C4Ms.mjs +0 -1
  143. package/dist/loader-_4Bbb19n.mjs +0 -1
  144. package/dist/md-manager-30TBxbTV.mjs +0 -2
  145. package/dist/preview-BGDwyTxq.mjs +0 -1
  146. package/dist/public/assets/ActivityModeContent-Bh8PvwWR.js +0 -1
  147. package/dist/public/assets/ConsentDialogBody-ByUP5rlV.js +0 -2
  148. package/dist/public/assets/EditorModeToggle-BOtGsJ58.js +0 -1
  149. package/dist/public/assets/EnableSyncConfirmDialog-edPIQ6AO.js +0 -1
  150. package/dist/public/assets/FeedbackForm-B44dYSuT.js +0 -1
  151. package/dist/public/assets/ImportSkillDialog-BYZRPrHX.js +0 -1
  152. package/dist/public/assets/ManagedArtifactProperties-D35GmczH.js +0 -1
  153. package/dist/public/assets/ManagedArtifactProperties-N6SxoaQN.js +0 -1
  154. package/dist/public/assets/McpConsentDialogBody-Cdxs_Q-f.js +0 -1
  155. package/dist/public/assets/SchemaConfigEditor-4ELQUjOk.js +0 -1
  156. package/dist/public/assets/SessionsHost-CkCwV0Gg.js +0 -2
  157. package/dist/public/assets/ShareBranchSwitchDialog-BcO94wih.js +0 -1
  158. package/dist/public/assets/ShareReceiveDialog-tG5J08TH.js +0 -1
  159. package/dist/public/assets/ShareReceiveMissDialog-ClfobBlL.js +0 -1
  160. package/dist/public/assets/SlidesToolbarControls-Dtor0bv_.js +0 -1
  161. package/dist/public/assets/TimelineDiffPane-CT-ihYQ6.js +0 -2
  162. package/dist/public/assets/comment-chips-C9lD2NUl.js +0 -5
  163. package/dist/public/assets/i18n-BdQmUBxL.js +0 -1
  164. package/dist/public/assets/markdownlint-rule-browser-BNoonKhJ.js +0 -1
  165. package/dist/public/assets/pending-receive-nav-store-jTqdW3b0.js +0 -1
  166. package/dist/public/assets/skill-actions-CUghpMeW.js +0 -1
  167. package/dist/public/assets/thread-client-d5910s2I.js +0 -1
  168. package/dist/public/assets/use-open-skill-CmlgDEiD.js +0 -1
  169. package/dist/public/assets/use-skill-origin-DXe-gG8s.js +0 -1
  170. package/dist/repair-skills-BmR0xC0t.mjs +0 -1
  171. package/dist/server-lock-D-FV4bZf.mjs +0 -1
  172. package/dist/src-CCW4TQuz.mjs +0 -357
  173. package/dist/src-DhkOVDy0.mjs +0 -1
  174. package/dist/start-DYAQVmBt.mjs +0 -12
  175. package/dist/start-TwFD_icr.mjs +0 -1
  176. /package/dist/public/assets/{dist-CuH7ikCn.js → dist-CMZSEMCN2.js} +0 -0
  177. /package/dist/public/assets/{dist-DUfEoSbR.js → dist-CdT2fVlj.js} +0 -0
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{n as a}from"./dist-PQ5KMVDh.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./utils-CPqDy6Hr.js";import{t as c}from"./button-CA0dewJJ.js";import{i as l,n as u,t as d}from"./tooltip-DPvMEqsq.js";import{c as f}from"./select-D_Rn85CT.js";import{n as p,t as m}from"./toggle-group-BAqXXgCT.js";import{Ho as h,Ui as g,ds as _,gs as v}from"./dist-Dih2A8fV.js";import{n as y}from"./dist-CMZSEMCN2.js";import{h as b}from"./use-apply-config-color-theme-DonBpBNY.js";import{t as x}from"./file-tree-utils-CEFaTYgx.js";import"./config-provider-DbAEDIve.js";import{Z as S,kt as C}from"./dist-CXdEP5f6.js";import{t as w}from"./cm-theme-BrrFA0kJ.js";import{t as T}from"./asset-dispatch-CdZ_--jl.js";import{t as E}from"./dist-H0a1Kjgj.js";import{t as D}from"./text-viewer-languages-BS5OVIGh.js";var O=o(),k=e(n(),1),A=class extends Error{httpStatus;constructor(e,t){super(e),this.name=`ViewerTextLoadError`,this.httpStatus=t}};function j(e){let t=(0,O.c)(10),{_:n}=i(),r;t[0]===n?r=t[1]:(r=e=>n(e===413?{id:`C_WGy8`}:e===415?{id:`VM7H66`}:e===404?{id:`s0IDhW`}:e===400?{id:`N1mdmS`}:typeof e==`number`?{id:`96w9hU`,values:{status:e}}:{id:`ig5vUe`}),t[0]=n,t[1]=r);let a=r,{src:o,loadText:s}=e,c=(0,k.useRef)(s),l=(0,k.useRef)(a),u;t[2]!==s||t[3]!==a?(u=()=>{c.current=s,l.current=a},t[2]=s,t[3]=a,t[4]=u):u=t[4],(0,k.useEffect)(u);let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d={status:`loading`},t[5]=d):d=t[5];let[f,p]=(0,k.useState)(d),m,h;return t[6]!==n||t[7]!==o?(m=()=>{let e=!1,t=new AbortController;p({status:`loading`});let r=c.current;return r?(r(t.signal).then(t=>{if(!e){if(t.ok){p({status:`loaded`,content:t.text});return}p({status:`error`,message:t.message??l.current(t.status),httpStatus:t.status})}}).catch(t=>{e||t instanceof Error&&t.name===`AbortError`||p({status:`error`,message:n({id:`ig5vUe`})})}),()=>{e=!0,t.abort()}):(fetch(o??``,{credentials:`same-origin`,signal:t.signal}).then(async e=>{if(!e.ok)throw new A(l.current(e.status),e.status);return e.text()}).then(t=>{e||p({status:`loaded`,content:t})}).catch(t=>{e||t instanceof Error&&t.name===`AbortError`||p({status:`error`,message:t instanceof Error?t.message:n({id:`ig5vUe`}),httpStatus:t instanceof A?t.httpStatus:void 0})}),()=>{e=!0,t.abort()})},h=[o,n],t[6]=n,t[7]=o,t[8]=m,t[9]=h):(m=t[8],h=t[9]),(0,k.useEffect)(m,h),f}var M=t();function N(e){let t=(0,O.c)(10),{fileName:n,dataAttr:i,extraAttrs:a}=e,o=`${i}-state`,s;t[0]!==i||t[1]!==o?(s={[i]:``,[o]:`loading`},t[0]=i,t[1]=o,t[2]=s):s=t[2];let c;t[3]===n?c=t[4]:(c=(0,M.jsx)(`span`,{children:(0,M.jsx)(r,{id:`Md709y`,values:{fileName:n}})}),t[3]=n,t[4]=c);let l;return t[5]!==a||t[6]!==n||t[7]!==s||t[8]!==c?(l=(0,M.jsx)(`main`,{className:`flex h-full min-h-0 flex-col items-center justify-center bg-background text-muted-foreground text-sm`,"aria-label":n,...s,...a,children:c}),t[5]=a,t[6]=n,t[7]=s,t[8]=c,t[9]=l):l=t[9],l}function P(e){let t=(0,O.c)(16),{fileName:n,dataAttr:i,extraAttrs:a,message:o,openFile:s}=e,l=`${i}-state`,u;t[0]!==i||t[1]!==l?(u={[i]:``,[l]:`error`},t[0]=i,t[1]=l,t[2]=u):u=t[2];let d;t[3]===n?d=t[4]:(d=(0,M.jsx)(`div`,{className:`font-medium text-sm`,children:(0,M.jsx)(r,{id:`qdBUHP`,values:{fileName:n}})}),t[3]=n,t[4]=d);let f;t[5]===o?f=t[6]:(f=(0,M.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:o}),t[5]=o,t[6]=f);let p;t[7]===s?p=t[8]:(p=s?(0,M.jsx)(c,{variant:`outline`,size:`sm`,className:`mt-2`,"data-testid":`viewer-open-file`,onClick:()=>{T({url:s.url,projectRelPath:s.projectRelPath,ext:s.ext,title:s.title,forceOsDelegation:!0})},children:(0,M.jsx)(r,{id:`9npOH9`})}):null,t[7]=s,t[8]=p);let m;return t[9]!==a||t[10]!==n||t[11]!==u||t[12]!==d||t[13]!==f||t[14]!==p?(m=(0,M.jsxs)(`main`,{className:`flex h-full min-h-0 flex-col items-center justify-center gap-2 bg-background p-4 text-center`,"aria-label":n,...u,...a,children:[d,f,p]}),t[9]=a,t[10]=n,t[11]=u,t[12]=d,t[13]=f,t[14]=p,t[15]=m):m=t[15],m}function F({assetPath:e,fileName:t,extension:n,httpStatus:r}){if(!e||r===404)return;let i=n.toLowerCase();return{projectRelPath:e,ext:i,title:t,url:g(`${h.has(i)?`/api/asset`:`/api/asset-text`}?path=${encodeURIComponent(e)}`)}}var I=w({dark:!0,background:`var(--background)`,gutterBackground:`var(--muted)`}),L=w({dark:!1,background:`var(--background)`,gutterBackground:`var(--muted)`});function R(e){let t=(0,O.c)(28),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({fileName:r,extension:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let o=(0,k.useRef)(null),s=(0,k.useRef)(null),{resolvedTheme:c}=a(),l=j(i),u=l.status===`loaded`?l.content:null,d,f;t[4]!==n||t[5]!==u||t[6]!==c?(d=()=>{if(!o.current||u===null)return;let e=n.toLowerCase(),t=_(e),r=c===`dark`?I:L,i=!1,a=null;return D(e,t).then(e=>{if(i||!o.current)return;let t=[E,...e?[e]:[],S.editable.of(!0),C.readOnly.of(!0),S.lineWrapping,r];a=new S({state:C.create({doc:u,extensions:t}),parent:o.current}),s.current=a}),()=>{i=!0,a?.destroy(),s.current=null}},f=[u,n,c],t[4]=n,t[5]=u,t[6]=c,t[7]=d,t[8]=f):(d=t[7],f=t[8]),(0,k.useEffect)(d,f);let p;t[9]===n?p=t[10]:(p={"data-text-viewer-extension":n},t[9]=n,t[10]=p);let m=p;if(l.status===`loading`){let e;return t[11]!==m||t[12]!==r?(e=(0,M.jsx)(N,{fileName:r,dataAttr:`data-text-viewer`,extraAttrs:m}),t[11]=m,t[12]=r,t[13]=e):e=t[13],e}if(l.status===`error`){let e=l.message,a;t[14]!==n||t[15]!==l.httpStatus||t[16]!==r||t[17]!==i.assetPath?(a=F({assetPath:i.assetPath,fileName:r,extension:n,httpStatus:l.httpStatus}),t[14]=n,t[15]=l.httpStatus,t[16]=r,t[17]=i.assetPath,t[18]=a):a=t[18];let o;return t[19]!==m||t[20]!==l.message||t[21]!==r||t[22]!==a?(o=(0,M.jsx)(P,{fileName:r,dataAttr:`data-text-viewer`,extraAttrs:m,message:e,openFile:a}),t[19]=m,t[20]=l.message,t[21]=r,t[22]=a,t[23]=o):o=t[23],o}let h;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,M.jsx)(`div`,{ref:o,className:`min-h-0 flex-1 overflow-auto`}),t[24]=h):h=t[24];let g;return t[25]!==n||t[26]!==r?(g=(0,M.jsx)(`main`,{className:`flex h-full min-h-0 flex-col bg-background`,"aria-label":r,"data-text-viewer":``,"data-text-viewer-state":`loaded`,"data-text-viewer-extension":n,children:h}),t[25]=n,t[26]=r,t[27]=g):g=t[27],g}function z(e){let t=(0,O.c)(29),{entry:n,className:r}=e,{_:a}=i(),{projectLocalBinding:o,projectLocalSynced:l,merged:u}=b();if(u===null||!l)return null;let d=u?.appearance?.sidebar,p=d?.showHiddenFiles??!1,m=d?.showOnlyMarkdownFiles??!1,h;t[0]!==n||t[1]!==p||t[2]!==m?(h=x(n,{showHiddenFiles:p,showOnlyMarkdownFiles:m}),t[0]=n,t[1]=p,t[2]=m,t[3]=h):h=t[3];let g=h;if(!g.hiddenFiles&&!g.onlyMarkdownFiles)return null;let _;t[4]!==a||t[5]!==o?(_=e=>{if(o===null)return;let t=o.patch({appearance:{sidebar:e}});t.ok||(console.warn(`[NotInSidebarIndicator] sidebar visibility flip rejected:`,v(t.error)),y.error(a({id:`P47EWZ`}),{description:v(t.error)}))},t[4]=a,t[5]=o,t[6]=_):_=t[6];let S=_,C;t[7]===r?C=t[8]:(C=s(`flex items-center gap-1.5 text-muted-foreground/70 text-xs`,r),t[7]=r,t[8]=C);let w;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,M.jsx)(f,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),t[9]=w):w=t[9];let T;t[10]===a?T=t[11]:(T=a({id:`j9tqwO`}),t[10]=a,t[11]=T);let E;t[12]===T?E=t[13]:(E=(0,M.jsx)(`span`,{className:`whitespace-nowrap`,children:T}),t[12]=T,t[13]=E);let D;t[14]!==a||t[15]!==g.hiddenFiles||t[16]!==S||t[17]!==o?(D=g.hiddenFiles?(0,M.jsx)(c,{variant:`outline`,size:`sm`,className:`h-5 rounded-sm px-1.5 font-normal text-2xs text-muted-foreground hover:text-foreground`,disabled:o===null,onClick:()=>S({showHiddenFiles:!0}),"aria-label":a({id:`XcGbim`}),title:a({id:`XcGbim`}),"data-testid":`not-in-sidebar-flip-hidden-files`,children:a({id:`6KCH4m`})}):null,t[14]=a,t[15]=g.hiddenFiles,t[16]=S,t[17]=o,t[18]=D):D=t[18];let k;t[19]!==a||t[20]!==g.onlyMarkdownFiles||t[21]!==S||t[22]!==o?(k=g.onlyMarkdownFiles?(0,M.jsx)(c,{variant:`outline`,size:`sm`,className:`h-5 rounded-sm px-1.5 font-normal text-2xs text-muted-foreground hover:text-foreground`,disabled:o===null,onClick:()=>S({showOnlyMarkdownFiles:!1}),"aria-label":a({id:`10g8I_`}),title:a({id:`10g8I_`}),"data-testid":`not-in-sidebar-flip-only-markdown`,children:a({id:`5-o4kO`})}):null,t[19]=a,t[20]=g.onlyMarkdownFiles,t[21]=S,t[22]=o,t[23]=k):k=t[23];let A;return t[24]!==k||t[25]!==C||t[26]!==E||t[27]!==D?(A=(0,M.jsxs)(`div`,{"data-testid":`not-in-sidebar-indicator`,className:C,children:[w,E,D,k]}),t[24]=k,t[25]=C,t[26]=E,t[27]=D,t[28]=A):A=t[28],A}var B={fill:`none`,height:24,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,viewBox:`0 0 24 24`,width:24,xmlns:`http://www.w3.org/2000/svg`},V=e=>{let t=(0,O.c)(15),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({color:a,size:o,strokeWidth:s,absoluteStrokeWidth:n,className:c,children:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=a===void 0?`currentColor`:a,u=o===void 0?24:o,d=s===void 0?2:s,f=c===void 0?``:c,p=n?Number(d)*24/Number(u):d,m;return t[8]!==r||t[9]!==f||t[10]!==l||t[11]!==i||t[12]!==u||t[13]!==p?(m=(0,M.jsx)(`svg`,{"aria-hidden":`true`,...B,className:f,height:u,stroke:l,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:p,width:u,...i,children:r}),t[8]=r,t[9]=f,t[10]=l,t[11]=i,t[12]=u,t[13]=p,t[14]=m):m=t[14],m},H=e=>{let t=(0,O.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,M.jsx)(`title`,{children:`Markdown`}),r=(0,M.jsx)(`path`,{d:`M232,48H24A16,16,0,0,0,8,64V192a16,16,0,0,0,16,16H232a16,16,0,0,0,16-16V64A16,16,0,0,0,232,48Zm0,144H24V64H232V192ZM128,104v48a8,8,0,0,1-16,0V123.31L93.66,141.66a8,8,0,0,1-11.32,0L64,123.31V152a8,8,0,0,1-16,0V104a8,8,0,0,1,13.66-5.66L88,124.69l26.34-26.35A8,8,0,0,1,128,104Zm77.66,18.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L168,132.69V104a8,8,0,0,1,16,0v28.69l10.34-10.35A8,8,0,0,1,205.66,122.34Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,M.jsxs)(V,{...e,viewBox:`0 0 256 256`,fill:`currentColor`,children:[n,r]}),t[2]=e,t[3]=i),i},U=e=>{let t=(0,O.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,M.jsx)(`title`,{children:`Textbox`}),r=(0,M.jsx)(`path`,{d:`M112,40a8,8,0,0,0-8,8V64H24A16,16,0,0,0,8,80v96a16,16,0,0,0,16,16h80v16a8,8,0,0,0,16,0V48A8,8,0,0,0,112,40ZM24,176V80h80v96ZM248,80v96a16,16,0,0,1-16,16H144a8,8,0,0,1,0-16h88V80H144a8,8,0,0,1,0-16h88A16,16,0,0,1,248,80ZM88,112a8,8,0,0,1-8,8H72v24a8,8,0,0,1-16,0V120H48a8,8,0,0,1,0-16H80A8,8,0,0,1,88,112Z`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,M.jsxs)(V,{...e,viewBox:`0 0 256 256`,fill:`currentColor`,children:[n,r]}),t[2]=e,t[3]=i),i};function W(e){let t=(0,O.c)(48),{isSourceMode:n,onModeChange:a,sourceDisabled:o,wysiwygDisabled:s,wysiwygLabel:c,sourceLabel:f,wysiwygDisabledReason:h}=e,g=o===void 0?!1:o,_=s===void 0?!1:s,{_:v}=i(),y;t[0]!==v||t[1]!==c?(y=c??v({id:`ur2XSb`}),t[0]=v,t[1]=c,t[2]=y):y=t[2];let b=y,x;t[3]!==v||t[4]!==f?(x=f??v({id:`xbdtfY`}),t[3]=v,t[4]=f,t[5]=x):x=t[5];let S=x,C=(0,k.useId)(),w=_&&h?h:null,T=n?`source`:`wysiwyg`,E;t[6]===a?E=t[7]:(E=e=>{e&&a(e)},t[6]=a,t[7]=E);let D;t[8]===v?D=t[9]:(D=v({id:`n7aopT`}),t[8]=v,t[9]=D);let A=w?C:void 0,j;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,M.jsx)(U,{className:`size-4`}),t[10]=j):j=t[10];let N;t[11]!==A||t[12]!==_||t[13]!==b?(N=(0,M.jsx)(p,{value:`wysiwyg`,"aria-label":b,"aria-describedby":A,disabled:_,className:`size-7 px-0 dark:data-[state=on]:bg-foreground/15`,children:j}),t[11]=A,t[12]=_,t[13]=b,t[14]=N):N=t[14];let P;t[15]!==w||t[16]!==C?(P=w?(0,M.jsx)(`span`,{id:C,className:`sr-only`,children:w}):null,t[15]=w,t[16]=C,t[17]=P):P=t[17];let F;t[18]!==N||t[19]!==P?(F=(0,M.jsx)(l,{asChild:!0,children:(0,M.jsxs)(`div`,{children:[N,P]})}),t[18]=N,t[19]=P,t[20]=F):F=t[20];let I;t[21]!==_||t[22]!==h||t[23]!==c?(I=_&&h?h:c||(0,M.jsx)(r,{id:`Mb_20S`}),t[21]=_,t[22]=h,t[23]=c,t[24]=I):I=t[24];let L;t[25]===I?L=t[26]:(L=(0,M.jsx)(u,{side:`bottom`,children:I}),t[25]=I,t[26]=L);let R;t[27]!==F||t[28]!==L?(R=(0,M.jsxs)(d,{children:[F,L]}),t[27]=F,t[28]=L,t[29]=R):R=t[29];let z;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,M.jsx)(H,{className:`size-4`}),t[30]=z):z=t[30];let B;t[31]!==g||t[32]!==S?(B=(0,M.jsx)(l,{asChild:!0,children:(0,M.jsx)(`div`,{children:(0,M.jsx)(p,{value:`source`,"aria-label":S,disabled:g,className:`size-7 px-0 dark:data-[state=on]:bg-foreground/15`,children:z})})}),t[31]=g,t[32]=S,t[33]=B):B=t[33];let V;t[34]!==g||t[35]!==f?(V=g?(0,M.jsx)(r,{id:`G-JBA1`}):f||(0,M.jsx)(r,{id:`u6Hp4N`}),t[34]=g,t[35]=f,t[36]=V):V=t[36];let W;t[37]===V?W=t[38]:(W=(0,M.jsx)(u,{side:`bottom`,children:V}),t[37]=V,t[38]=W);let G;t[39]!==B||t[40]!==W?(G=(0,M.jsxs)(d,{children:[B,W]}),t[39]=B,t[40]=W,t[41]=G):G=t[41];let K;return t[42]!==R||t[43]!==G||t[44]!==T||t[45]!==E||t[46]!==D?(K=(0,M.jsxs)(m,{type:`single`,value:T,onValueChange:E,"aria-label":D,variant:`segmented`,size:`sm`,spacing:1,className:`shrink-0 bg-muted p-0.5 data-[size=sm]:rounded-[10px]`,children:[R,G]}),t[42]=R,t[43]=G,t[44]=T,t[45]=E,t[46]=D,t[47]=K):K=t[47],K}export{F as a,j as c,R as i,H as n,P as o,z as r,N as s,W as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./button-CA0dewJJ.js";import{a as s,c,i as l,n as u,o as d,r as f,s as p,t as m}from"./dialog-nnyEatfT.js";import{Cs as h,Ps as g,gs as _,hs as v,ps as y}from"./dist-Dih2A8fV.js";import{n as b}from"./dist-CMZSEMCN2.js";import{_ as x}from"./documents-events-Ck8o2CoI.js";import{h as S}from"./use-apply-config-color-theme-DonBpBNY.js";import{t as C}from"./createLucideIcon-NewzmgDg.js";import{t as w}from"./eye-CJwghMeG.js";import"./config-provider-DbAEDIve.js";var T=C(`arrow-down-to-line`,[[`path`,{d:`M12 17V3`,key:`1cwfxf`}],[`path`,{d:`m6 11 6 6 6-6`,key:`12ii2o`}],[`path`,{d:`M19 21H5`,key:`150jfl`}]]),E=C(`arrow-right-left`,[[`path`,{d:`m16 3 4 4-4 4`,key:`1x1c3m`}],[`path`,{d:`M20 7H4`,key:`zbl0bi`}],[`path`,{d:`m8 21-4-4 4-4`,key:`h9nckh`}],[`path`,{d:`M4 17h16`,key:`g4d7ey`}]]),D=C(`git-commit-vertical`,[[`path`,{d:`M12 3v6`,key:`1holv5`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`M12 15v6`,key:`a9ows0`}]]),O=C(`git-merge`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M6 21V9a9 9 0 0 0 9 9`,key:`7kw0sc`}]]),k=C(`laptop`,[[`path`,{d:`M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z`,key:`1pdavp`}],[`path`,{d:`M20.054 15.987H3.946`,key:`14rxg9`}]]),A=a(),j=e(n(),1);async function M(){try{let e=await fetch(`/api/sync/status`);return e.ok?{status:await e.json()}:{status:null,error:`server`}}catch{return{status:null,error:`network`}}}function N(){return P().status}function P(){let e=(0,A.c)(8),[t,n]=(0,j.useState)(null),[r,i]=(0,j.useState)(null),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=function(){M().then(e=>{let{status:t,error:r}=e;i(r??null),t&&n(t)})},e[0]=a):a=e[0];let o=a,s,c;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{o()},c=[],e[1]=s,e[2]=c):(s=e[1],c=e[2]),(0,j.useEffect)(s,c);let l,u;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>x(e=>{e.includes(`sync-status`)&&o()}),u=[],e[3]=l,e[4]=u):(l=e[3],u=e[4]),(0,j.useEffect)(l,u);let d;return e[5]!==r||e[6]!==t?(d={status:t,fetchError:r},e[5]=r,e[6]=t,e[7]=d):d=e[7],d}var F=t();function I(e){let t=(0,A.c)(3),{children:n}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,F.jsxs)(`p`,{className:`flex items-center gap-1.5 font-mono text-xs font-semibold tracking-wider uppercase`,children:[(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`mb-[3px] flex items-center justify-center`,children:`◇`}),(0,F.jsx)(r,{id:`6s7LXO`})]}),t[0]=i):i=t[0];let a;return t[1]===n?a=t[2]:(a=(0,F.jsxs)(`div`,{role:`note`,className:`flex flex-col gap-5 text-sm`,children:[i,(0,F.jsx)(`div`,{className:`flex flex-col gap-5`,children:n})]}),t[1]=n,t[2]=a),a}function L(e){let t=(0,A.c)(10),{icon:n,title:r,body:i}=e,a;t[0]===r?a=t[1]:(a=(0,F.jsx)(`p`,{className:`font-medium`,children:r}),t[0]=r,t[1]=a);let o;t[2]===i?o=t[3]:(o=(0,F.jsx)(`p`,{className:`text-muted-foreground`,children:i}),t[2]=i,t[3]=o);let s;t[4]!==a||t[5]!==o?(s=(0,F.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[a,o]}),t[4]=a,t[5]=o,t[6]=s):s=t[6];let c;return t[7]!==n||t[8]!==s?(c=(0,F.jsxs)(`div`,{className:`flex items-start gap-3`,children:[n,s]}),t[7]=n,t[8]=s,t[9]=c):c=t[9],c}function R(e){let t=(0,A.c)(4),{variant:n}=e;if((n===void 0?`full`:n)===`follow`){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,F.jsx)(c,{children:(0,F.jsx)(r,{id:`8sMErm`})}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsxs)(F.Fragment,{children:[e,(0,F.jsx)(s,{children:(0,F.jsx)(r,{id:`CVRM5N`})})]}),t[1]=n):n=t[1],n}let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,F.jsx)(c,{children:(0,F.jsx)(r,{id:`q_9EcE`})}),t[2]=i):i=t[2];let a;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,F.jsxs)(F.Fragment,{children:[i,(0,F.jsx)(s,{children:(0,F.jsx)(r,{id:`n6hXUm`})})]}),t[3]=a):a=t[3],a}function z(e){let t=(0,A.c)(2),{variant:n}=e,r=n===void 0?`full`:n,i;return t[0]===r?i=t[1]:(i=(0,F.jsx)(I,{children:r===`follow`?(0,F.jsx)(V,{}):(0,F.jsx)(B,{})}),t[0]=r,t[1]=i),i}function B(){let e=(0,A.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,F.jsx)(L,{icon:(0,F.jsx)(E,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),title:(0,F.jsx)(r,{id:`cdmk8A`}),body:(0,F.jsx)(r,{id:`YaeyFh`})}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(L,{icon:(0,F.jsx)(D,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),title:(0,F.jsx)(r,{id:`9i21pa`}),body:(0,F.jsx)(r,{id:`KIIamL`})}),e[1]=n):n=e[1];let i;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,F.jsxs)(F.Fragment,{children:[t,n,(0,F.jsx)(L,{icon:(0,F.jsx)(w,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),title:(0,F.jsx)(r,{id:`8cpeU3`}),body:(0,F.jsx)(r,{id:`DELNQk`})})]}),e[2]=i):i=e[2],i}function V(){let e=(0,A.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,F.jsx)(L,{icon:(0,F.jsx)(T,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),title:(0,F.jsx)(r,{id:`0xnQ_X`}),body:(0,F.jsx)(r,{id:`aCoQfY`})}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(L,{icon:(0,F.jsx)(k,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),title:(0,F.jsx)(r,{id:`5rnB76`}),body:(0,F.jsx)(r,{id:`evHlIg`})}),e[1]=n):n=e[1];let i;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,F.jsxs)(F.Fragment,{children:[t,n,(0,F.jsx)(L,{icon:(0,F.jsx)(O,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),title:(0,F.jsx)(r,{id:`oBK5fD`}),body:(0,F.jsx)(r,{id:`8Wav8y`})})]}),e[2]=i):i=e[2],i}function H(){let e=(0,A.c)(2),{projectLocalBinding:t}=S();if(t===null)return null;let n;return e[0]===t?n=e[1]:(n=e=>{let n=e?`full`:`off`,r=t.patch({autoSync:{mode:n,enabled:e}});return r.ok?{ok:!0}:{ok:!1,error:_(r.error)}},e[0]=t,e[1]=n),n}function U(){let e=(0,A.c)(2),{projectLocalBinding:t}=S();if(t===null)return null;let n;return e[0]===t?n=e[1]:(n=e=>{let n=t.patch({autoSync:{mode:e,enabled:null}});return n.ok?{ok:!0}:{ok:!1,error:_(n.error)}},e[0]=t,e[1]=n),n}function W(){let e=(0,A.c)(2),{projectBinding:t}=S();if(t===null)return null;let n;return e[0]===t?n=e[1]:(n=e=>{let n=t.patch({autoSync:{default:e}});return n.ok?{ok:!0}:{ok:!1,error:_(n.error)}},e[0]=t,e[1]=n),n}function G(e,t){let n=(0,A.c)(12),{_:r}=i(),[a,o]=(0,j.useState)(!1),s;n[0]!==r||n[1]!==e?(s=function(t){if(e===null)return b.error(r({id:`fiMNLl`})),!1;let n=e(t);if(!n.ok){console.error(`[sync] toggle failed:`,n.error);let e=n.error;return b.error(r(t?{id:`04RA0-`,values:{detail:e}}:{id:`qjHMHf`,values:{detail:e}})),!1}return!0},n[0]=r,n[1]=e,n[2]=s):s=n[2];let c=s,l;n[3]===c?l=n[4]:(l=function(e){if(e){o(!0);return}c(!1)},n[3]=c,n[4]=l);let u=l,d;n[5]!==c||n[6]!==t?(d=function(){c(!0)&&(o(!1),t?.onEnabled?.())},n[5]=c,n[6]=t,n[7]=d):d=n[7];let f=d,p;return n[8]!==a||n[9]!==f||n[10]!==u?(p={confirmOpen:a,setConfirmOpen:o,onToggleRequest:u,onConfirm:f},n[8]=a,n[9]=f,n[10]=u,n[11]=p):p=n[11],p}function K(e,t,n){let r=(0,A.c)(15),{_:a}=i(),[o,s]=(0,j.useState)(!1),[c,l]=(0,j.useState)(null),u;r[0]!==a||r[1]!==n||r[2]!==e?(u=function(t){if(e===null)return b.error(a({id:`fiMNLl`})),!1;let r=e(t);if(!r.ok){console.error(`[sync] mode change failed:`,r.error);let e=r.error;return b.error(a({id:`nOEDQs`,values:{detail:e}})),!1}return n?.onApplied?.(t),!0},r[0]=a,r[1]=n,r[2]=e,r[3]=u):u=r[3];let d=u,f;r[4]!==d||r[5]!==t?(f=function(e){if(e!==t){if(e===`off`){d(`off`);return}l(e),s(!0)}},r[4]=d,r[5]=t,r[6]=f):f=r[6];let p=f,m;r[7]!==d||r[8]!==c?(m=function(){c!==null&&d(c)&&s(!1)},r[7]=d,r[8]=c,r[9]=m):m=r[9];let h=m,g;return r[10]!==o||r[11]!==h||r[12]!==p||r[13]!==c?(g={confirmOpen:o,setConfirmOpen:s,pendingMode:c,onModeSelect:p,onConfirm:h},r[10]=o,r[11]=h,r[12]=p,r[13]=c,r[14]=g):g=r[14],g}function q(){let e=(0,A.c)(2),{projectLocalBinding:t}=S();if(t===null)return null;let n;return e[0]===t?n=e[1]:(n=e=>{let n=t.patch({autoSync:e});return n.ok?{ok:!0}:{ok:!1,error:_(n.error)}},e[0]=t,e[1]=n),n}function J(e,t){let n=(0,A.c)(34),{_:r}=i(),a=q(),[o,s]=(0,j.useState)(!1),[c,l]=(0,j.useState)(null),u;n[0]===e?u=n[1]:(u=g(e)??`off`,n[0]=e,n[1]=u);let d=u,f=d===`follow`||d===`full`,p;n[2]===e?p=n[3]:(p=h(e),n[2]=e,n[3]=p);let m=p,_;n[4]===e?_=n[5]:(_=v(e),n[4]=e,n[5]=_);let x=_,S;n[6]===e?S=n[7]:(S=y(e),n[6]=e,n[7]=S);let C=S,w;n[8]!==r||n[9]!==a?(w=function(e){if(a===null)return b.error(r({id:`fiMNLl`})),!1;let t=a(e);if(!t.ok){console.error(`[sync] badge control failed:`,t.error);let e=t.error;return b.error(r({id:`ZVOhXM`,values:{detail:e}})),!1}return!0},n[8]=r,n[9]=a,n[10]=w):w=n[10];let T=w,E;n[11]!==f||n[12]!==T||n[13]!==d||n[14]!==C?(E=function(e){if(e){if(C===`full`){l(`full`),s(!0);return}T({mode:`follow`,enabled:null,resumeMode:null});return}T({mode:`off`,enabled:null,resumeMode:f?d:C})},n[11]=f,n[12]=T,n[13]=d,n[14]=C,n[15]=E):E=n[15];let D=E,O;n[16]!==f||n[17]!==T||n[18]!==C?(O=function(e){if(e!==C){if(!f){T({resumeMode:e});return}l(e),s(!0)}},n[16]=f,n[17]=T,n[18]=C,n[19]=O):O=n[19];let k=O,M;n[20]!==T||n[21]!==c?(M=function(){c!==null&&T({mode:c,enabled:null,resumeMode:null})&&(s(!1),l(null))},n[20]=T,n[21]=c,n[22]=M):M=n[22];let N=M,P=c===`follow`?t:0,F;return n[23]!==f||n[24]!==o||n[25]!==x||n[26]!==N||n[27]!==k||n[28]!==D||n[29]!==m||n[30]!==c||n[31]!==P||n[32]!==C?(F={active:f,paused:m,everEnabled:x,toggleMode:C,confirmOpen:o,setConfirmOpen:s,pendingMode:c,strandedCommitCount:P,onToggleActive:D,onModeSelect:k,onConfirm:N},n[23]=f,n[24]=o,n[25]=x,n[26]=N,n[27]=k,n[28]=D,n[29]=m,n[30]=c,n[31]=P,n[32]=C,n[33]=F):F=n[33],F}async function Y(e){let t=await fetch(`/api/sync/trigger`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({op:e})});if(!t.ok)throw Error(`sync trigger failed: ${t.status}`)}function X(e){let t=(0,A.c)(24),{open:n,onOpenChange:i,onConfirm:a,variant:s,strandedCommitCount:c}=e,h=s===void 0?`full`:s,g=c===void 0?0:c,_=h===`follow`&&g>0,v;t[0]===h?v=t[1]:(v=(0,F.jsx)(p,{children:(0,F.jsx)(R,{variant:h})}),t[0]=h,t[1]=v);let y;t[2]===h?y=t[3]:(y=(0,F.jsx)(z,{variant:h}),t[2]=h,t[3]=y);let b;t[4]!==_||t[5]!==g?(b=_&&(0,F.jsx)(`p`,{className:`mt-4 text-sm text-muted-foreground`,children:(0,F.jsx)(r,{id:`caw8gO`,values:{strandedCommitCount:g}})}),t[4]=_,t[5]=g,t[6]=b):b=t[6];let x;t[7]!==y||t[8]!==b?(x=(0,F.jsxs)(u,{children:[y,b]}),t[7]=y,t[8]=b,t[9]=x):x=t[9];let S;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,F.jsx)(f,{asChild:!0,children:(0,F.jsx)(o,{variant:`outline`,children:(0,F.jsx)(r,{id:`dEgA5A`})})}),t[10]=S):S=t[10];let C;t[11]===h?C=t[12]:(C=h===`follow`?(0,F.jsx)(r,{id:`U4nTfu`}):(0,F.jsx)(r,{id:`XU0OXn`}),t[11]=h,t[12]=C);let w;t[13]!==a||t[14]!==C?(w=(0,F.jsxs)(d,{children:[S,(0,F.jsx)(o,{onClick:a,children:C})]}),t[13]=a,t[14]=C,t[15]=w):w=t[15];let T;t[16]!==v||t[17]!==x||t[18]!==w?(T=(0,F.jsxs)(l,{className:`sm:max-w-lg`,children:[v,x,w]}),t[16]=v,t[17]=x,t[18]=w,t[19]=T):T=t[19];let E;return t[20]!==i||t[21]!==n||t[22]!==T?(E=(0,F.jsx)(m,{open:n,onOpenChange:i,children:T}),t[20]=i,t[21]=n,t[22]=T,t[23]=E):E=t[23],E}export{W as a,U as c,I as d,L as f,T as g,O as h,G as i,R as l,P as m,Y as n,H as o,N as p,J as r,K as s,X as t,z as u};
@@ -0,0 +1 @@
1
+ import{t as e}from"./index-CRykZfHv.js";export{e as FeedbackForm};
@@ -1,4 +1,4 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./useQuery-ZeEDLtxh.js";import{n as s}from"./dist-PQ5KMVDh.js";import{t as c}from"./compiler-runtime-BfE3aGVn.js";import{t as l}from"./utils-CPqDy6Hr.js";import{t as u}from"./overlay-layers-Bj-TVfKw.js";import{t as d}from"./button-CA0dewJJ.js";import{i as f,n as p,t as m}from"./tooltip-DPvMEqsq.js";import{n as h,t as g}from"./toggle-group-BAqXXgCT.js";import{H as _,Kr as v,Oo as y,St as b,Z as x,jo as S,mt as C,pt as w}from"./dist-BrL2bd3x.js";import{t as T}from"./dist-DUfEoSbR.js";import{_ as E}from"./documents-events-C6H3LrA9.js";import{t as D}from"./createLucideIcon-NewzmgDg.js";import{t as ee}from"./arrow-up-right-B6g1TsCZ.js";import{i as te,o as ne,s as re,t as O}from"./prop-types-LyJPmVUN.js";import{n as k,t as ie}from"./target-navigation-intent-BxG_VSFm.js";import{t as ae}from"./triangle-alert-BggXGlON.js";import{f as oe}from"./doc-paths-CeZpYfYr.js";import{n as se}from"./external-link-B4qPZwve.js";import{a as ce,c as le,i as ue,n as de,r as fe,s as pe,t as me}from"./panel-CRIdNIdp.js";import{t as he}from"./ordinal-azP43YYV.js";import{n as ge,t as A}from"./min-BuisR8Ds.js";import{C as _e,S as ve,_ as ye,b as j,g as be,n as xe,r as Se,t as Ce,v as we,w as Te,x as Ee,y as De}from"./src-Cz0_Zht5.js";import{t as Oe}from"./colors-BXGeNhp8.js";import{t as ke}from"./isObject-DdQfH98s.js";import{n as M,t as N}from"./now-BxomExHG.js";var Ae=D(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),je=D(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]);function Me(e,n){let r=0;if(n===void 0)for(let n of e)(n=+n)&&(r+=n);else{let i=-1;for(let a of e)(a=+n(a,++i,e))&&(r+=a)}return r}var Ne=e=>()=>e;function Pe(e,{sourceEvent:n,subject:r,target:i,identifier:a,active:o,x:s,y:c,dx:l,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}Pe.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Fe(e){return!e.ctrlKey&&!e.button}function Ie(){return this.parentNode}function P(e,n){return n??{x:e.x,y:e.y}}function F(){return navigator.maxTouchPoints||`ontouchstart`in this}function Le(){var e=Fe,n=Ie,r=P,i=F,a={},o=Te(`start`,`drag`,`end`),s=0,c,l,u,d,f=0;function p(e){e.on(`mousedown.drag`,m).filter(i).on(`touchstart.drag`,_).on(`touchmove.drag`,v,De).on(`touchend.drag touchcancel.drag`,y).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function m(r,i){if(!(d||!e.call(this,r,i))){var a=b(this,n.call(this,r,i),r,i,`mouse`);a&&(_e(r.view).on(`mousemove.drag`,h,j).on(`mouseup.drag`,g,j),be(r.view),Ee(r),u=!1,c=r.clientX,l=r.clientY,a(`start`,r))}}function h(e){if(we(e),!u){var n=e.clientX-c,r=e.clientY-l;u=n*n+r*r>f}a.mouse(`drag`,e)}function g(e){_e(e.view).on(`mousemove.drag mouseup.drag`,null),ye(e.view,u),we(e),a.mouse(`end`,e)}function _(r,i){if(e.call(this,r,i)){var a=r.changedTouches,o=n.call(this,r,i),s=a.length,c,l;for(c=0;c<s;++c)(l=b(this,o,r,i,a[c].identifier,a[c]))&&(Ee(r),l(`start`,r,a[c]))}}function v(e){var n=e.changedTouches,r=n.length,i,o;for(i=0;i<r;++i)(o=a[n[i].identifier])&&(we(e),o(`drag`,e,n[i]))}function y(e){var n=e.changedTouches,r=n.length,i,o;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),i=0;i<r;++i)(o=a[n[i].identifier])&&(Ee(e),o(`end`,e,n[i]))}function b(e,n,i,c,l,u){var d=o.copy(),f=ve(u||i,n),m,h,g;if((g=r.call(e,new Pe(`beforestart`,{sourceEvent:i,target:p,identifier:l,active:s,x:f[0],y:f[1],dx:0,dy:0,dispatch:d}),c))!=null)return m=g.x-f[0]||0,h=g.y-f[1]||0,function r(i,o,u){var _=f,v;switch(i){case`start`:a[l]=r,v=s++;break;case`end`:delete a[l],--s;case`drag`:f=ve(u||o,n),v=s;break}d.call(i,e,new Pe(i,{sourceEvent:o,subject:g,target:p,identifier:l,active:v,x:f[0]+m,y:f[1]+h,dx:f[0]-_[0],dy:f[1]-_[1],dispatch:d}),c)}}return p.filter=function(n){return arguments.length?(e=typeof n==`function`?n:Ne(!!n),p):e},p.container=function(e){return arguments.length?(n=typeof e==`function`?e:Ne(e),p):n},p.subject=function(e){return arguments.length?(r=typeof e==`function`?e:Ne(e),p):r},p.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:Ne(!!e),p):i},p.on=function(){var e=o.on.apply(o,arguments);return e===o?p:e},p.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,p):Math.sqrt(f)},p}function Re(e){let n=+this._x.call(null,e),r=+this._y.call(null,e);return ze(this.cover(n,r),n,r,e)}function ze(e,n,r,i){if(isNaN(n)||isNaN(r))return e;var a,o=e._root,s={data:i},c=e._x0,l=e._y0,u=e._x1,d=e._y1,f,p,m,h,g,_,v,y;if(!o)return e._root=s,e;for(;o.length;)if((g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p,a=o,!(o=o[v=_<<1|g]))return a[v]=s,e;if(m=+e._x.call(null,o.data),h=+e._y.call(null,o.data),n===m&&r===h)return s.next=o,a?a[v]=s:e._root=s,e;do a=a?a[v]=[,,,,]:e._root=[,,,,],(g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p;while((v=_<<1|g)==(y=(h>=p)<<1|m>=f));return a[y]=o,a[v]=s,e}function I(e){var n,r,i=e.length,a,o,s=Array(i),c=Array(i),l=1/0,u=1/0,d=-1/0,f=-1/0;for(r=0;r<i;++r)isNaN(a=+this._x.call(null,n=e[r]))||isNaN(o=+this._y.call(null,n))||(s[r]=a,c[r]=o,a<l&&(l=a),a>d&&(d=a),o<u&&(u=o),o>f&&(f=o));if(l>d||u>f)return this;for(this.cover(l,u).cover(d,f),r=0;r<i;++r)ze(this,s[r],c[r],e[r]);return this}function Be(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,a=this._x1,o=this._y1;if(isNaN(r))a=(r=Math.floor(e))+1,o=(i=Math.floor(n))+1;else{for(var s=a-r||1,c=this._root,l,u;r>e||e>=a||i>n||n>=o;)switch(u=(n<i)<<1|e<r,l=[,,,,],l[u]=c,c=l,s*=2,u){case 0:a=r+s,o=i+s;break;case 1:r=a-s,o=i+s;break;case 2:a=r+s,i=o-s;break;case 3:r=a-s,i=o-s;break}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=i,this._x1=a,this._y1=o,this}function Ve(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function He(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function L(e,n,r,i,a){this.node=e,this.x0=n,this.y0=r,this.x1=i,this.y1=a}function Ue(e,n,r){var i,a=this._x0,o=this._y0,s,c,l,u,d=this._x1,f=this._y1,p=[],m=this._root,h,g;for(m&&p.push(new L(m,a,o,d,f)),r==null?r=1/0:(a=e-r,o=n-r,d=e+r,f=n+r,r*=r);h=p.pop();)if(!(!(m=h.node)||(s=h.x0)>d||(c=h.y0)>f||(l=h.x1)<a||(u=h.y1)<o))if(m.length){var _=(s+l)/2,v=(c+u)/2;p.push(new L(m[3],_,v,l,u),new L(m[2],s,v,_,u),new L(m[1],_,c,l,v),new L(m[0],s,c,_,v)),(g=(n>=v)<<1|e>=_)&&(h=p[p.length-1],p[p.length-1]=p[p.length-1-g],p[p.length-1-g]=h)}else{var y=e-+this._x.call(null,m.data),b=n-+this._y.call(null,m.data),x=y*y+b*b;if(x<r){var S=Math.sqrt(r=x);a=e-S,o=n-S,d=e+S,f=n+S,i=m.data}}return i}function We(e){if(isNaN(d=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var n,r=this._root,i,a,o,s=this._x0,c=this._y0,l=this._x1,u=this._y1,d,f,p,m,h,g,_,v;if(!r)return this;if(r.length)for(;;){if((h=d>=(p=(s+l)/2))?s=p:l=p,(g=f>=(m=(c+u)/2))?c=m:u=m,n=r,!(r=r[_=g<<1|h]))return this;if(!r.length)break;(n[_+1&3]||n[_+2&3]||n[_+3&3])&&(i=n,v=_)}for(;r.data!==e;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):n?(o?n[_]=o:delete n[_],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[v]=r:this._root=r),this):(this._root=o,this)}function Ge(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function Ke(){return this._root}function qe(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Je(e){var n=[],r,i=this._root,a,o,s,c,l;for(i&&n.push(new L(i,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(i=r.node,o=r.x0,s=r.y0,c=r.x1,l=r.y1)&&i.length){var u=(o+c)/2,d=(s+l)/2;(a=i[3])&&n.push(new L(a,u,d,c,l)),(a=i[2])&&n.push(new L(a,o,d,u,l)),(a=i[1])&&n.push(new L(a,u,s,c,d)),(a=i[0])&&n.push(new L(a,o,s,u,d))}return this}function Ye(e){var n=[],r=[],i;for(this._root&&n.push(new L(this._root,this._x0,this._y0,this._x1,this._y1));i=n.pop();){var a=i.node;if(a.length){var o,s=i.x0,c=i.y0,l=i.x1,u=i.y1,d=(s+l)/2,f=(c+u)/2;(o=a[0])&&n.push(new L(o,s,c,d,f)),(o=a[1])&&n.push(new L(o,d,c,l,f)),(o=a[2])&&n.push(new L(o,s,f,d,u)),(o=a[3])&&n.push(new L(o,d,f,l,u))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function Xe(e){return e[0]}function Ze(e){return arguments.length?(this._x=e,this):this._x}function Qe(e){return e[1]}function $e(e){return arguments.length?(this._y=e,this):this._y}function et(e,n,r){var i=new tt(n??Xe,r??Qe,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function tt(e,n,r,i,a,o){this._x=e,this._y=n,this._x0=r,this._y0=i,this._x1=a,this._y1=o,this._root=void 0}function nt(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var R=et.prototype=tt.prototype;R.copy=function(){var e=new tt(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=nt(n),e;for(r=[{source:n,target:e._root=[,,,,]}];n=r.pop();)for(var a=0;a<4;++a)(i=n.source[a])&&(i.length?r.push({source:i,target:n.target[a]=[,,,,]}):n.target[a]=nt(i));return e},R.add=Re,R.addAll=I,R.cover=Be,R.data=Ve,R.extent=He,R.find=Ue,R.remove=We,R.removeAll=Ge,R.root=Ke,R.size=qe,R.visit=Je,R.visitAfter=Ye,R.x=Ze,R.y=$e;var z=Oe(`a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928`),B=n(),V=e(r(),1),rt=c(),it=`Expected a function`,at=Math.max,ot=Math.min;function st(e,n,r){var i,a,o,s,c,l,u=0,d=!1,f=!1,p=!0;if(typeof e!=`function`)throw TypeError(it);n=M(n)||0,ke(r)&&(d=!!r.leading,f=`maxWait`in r,o=f?at(M(r.maxWait)||0,n):o,p=`trailing`in r?!!r.trailing:p);function m(n){var r=i,o=a;return i=a=void 0,u=n,s=e.apply(o,r),s}function h(e){return u=e,c=setTimeout(v,n),d?m(e):s}function g(e){var r=e-l,i=e-u,a=n-r;return f?ot(a,o-i):a}function _(e){var r=e-l,i=e-u;return l===void 0||r>=n||r<0||f&&i>=o}function v(){var e=N();if(_(e))return y(e);c=setTimeout(v,g(e))}function y(e){return c=void 0,p&&i?m(e):(i=a=void 0,s)}function b(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function x(){return c===void 0?s:y(N())}function S(){var e=N(),r=_(e);if(i=arguments,a=this,l=e,r){if(c===void 0)return h(l);if(f)return clearTimeout(c),c=setTimeout(v,n),m(l)}return c===void 0&&(c=setTimeout(v,n)),s}return S.cancel=b,S.flush=x,S}var H=`Expected a function`;function ct(e,n,r){var i=!0,a=!0;if(typeof e!=`function`)throw TypeError(H);return ke(r)&&(i=`leading`in r?!!r.leading:i,a=`trailing`in r?!!r.trailing:a),st(e,n,{leading:i,maxWait:n,trailing:a})}var lt=[`#60a5fa`,`#a78bfa`,`#34d399`,`#f472b6`,`#fb923c`,`#22d3ee`,`#c084fc`,`#4ade80`,`#f87171`,`#eab308`,`#ec4899`,`#06b67f`,`#8b5cf6`,`#f43f5e`,`#0ea5e9`,`#a855f7`],ut=[`#1e40af`,`#6b21a8`,`#166534`,`#9f1239`,`#9a3412`,`#164e63`,`#581c87`,`#166534`,`#991b1b`,`#854d0e`,`#831843`,`#0f766e`,`#312e81`,`#9f1239`,`#0c4a6e`,`#6b21a8`];function dt(e){let n=2;for(let r=0;r<e.length;r++)n=Math.imul(n^e.charCodeAt(r),1540483477),n^=n>>>13,n=Math.imul(n,1540483477),n^=n>>>15;return n>>>0}function ft(e,n){let r=n?lt:ut;return r[dt(e)%r.length]}var U={fullscreen:{maxEntries:10,containerClassName:`bottom-3 left-3 gap-1 rounded-lg px-3 py-2 text-xs`,titleClassName:`mb-1.5`,rowClassName:`gap-2`,swatchClassName:`size-2.5`,labelClassName:`max-w-[140px]`,overflowClassName:`pl-[18px]`},docked:{maxEntries:6,containerClassName:`bottom-2 left-2 gap-0.5 rounded-md px-2 py-1.5 text-[11px]`,titleClassName:`mb-1`,rowClassName:`gap-1.5`,swatchClassName:`size-2`,labelClassName:`max-w-[112px]`,overflowClassName:`pl-[14px]`}};function pt(e){return U[e]}function W(e){let n=(0,rt.c)(6),{clusters:r,variant:a}=e,o=a===void 0?`fullscreen`:a,{resolvedTheme:c}=s(),u=c===`dark`,d,f;if(n[0]!==r||n[1]!==u||n[2]!==o){f=Symbol.for(`react.early_return_sentinel`);bb0:{let e=pt(o);if(r.length===0){f=null;break bb0}let a=r.slice(0,e.maxEntries),s=r.length-a.length,c;n[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,B.jsx)(i,{id:`kmKqZg`}),n[5]=c):c=n[5],d=(0,B.jsxs)(`div`,{className:l(`pointer-events-none absolute z-10 flex flex-col backdrop-blur-sm`,e.containerClassName,u?`bg-black/70 text-gray-200`:`bg-white/80 text-gray-800 ring-1 ring-black/5`),children:[(0,B.jsx)(`div`,{className:l(`font-medium`,e.titleClassName,u?`text-slate-300`:`text-slate-700`),children:c}),a.map(n=>(0,B.jsxs)(`div`,{className:l(`flex items-center`,e.rowClassName),children:[(0,B.jsx)(`span`,{className:l(`inline-block shrink-0 rounded-full`,e.swatchClassName),style:{backgroundColor:ft(n,u)}}),(0,B.jsx)(`span`,{className:l(`truncate`,e.labelClassName),children:n})]},n)),s>0&&(0,B.jsx)(`div`,{className:l(`text-muted-foreground`,e.overflowClassName),children:(0,B.jsx)(i,{id:`lrhetp`,values:{overflow:s}})})]})}n[0]=r,n[1]=u,n[2]=o,n[3]=d,n[4]=f}else d=n[3],f=n[4];return f===Symbol.for(`react.early_return_sentinel`)?d:f}function mt(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function ht(e,n,r){return n=Et(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function gt(e,n){return yt(e)||mt(e,n)||xt(e,n)||wt()}function _t(e){return vt(e)||bt(e)||xt(e)||Ct()}function vt(e){if(Array.isArray(e))return St(e)}function yt(e){if(Array.isArray(e))return e}function bt(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function xt(e,n){if(e){if(typeof e==`string`)return St(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return Array.from(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return St(e,n)}}function St(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function Ct(){throw TypeError(`Invalid attempt to spread non-iterable instance.
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./useQuery-ZeEDLtxh.js";import{n as s}from"./dist-PQ5KMVDh.js";import{t as c}from"./compiler-runtime-BfE3aGVn.js";import{t as l}from"./utils-CPqDy6Hr.js";import{t as u}from"./overlay-layers-Bj-TVfKw.js";import{t as d}from"./button-CA0dewJJ.js";import{i as f,n as p,t as m}from"./tooltip-DPvMEqsq.js";import{n as h,t as g}from"./toggle-group-BAqXXgCT.js";import{H as _,Kr as v,Oo as y,St as b,Z as x,jo as S,mt as C,pt as w}from"./dist-Dih2A8fV.js";import{t as T}from"./dist-CdT2fVlj.js";import{_ as E}from"./documents-events-Ck8o2CoI.js";import{t as D}from"./createLucideIcon-NewzmgDg.js";import{t as ee}from"./arrow-up-right-B6g1TsCZ.js";import{i as te,o as ne,s as re,t as O}from"./prop-types-BxTZMSU2.js";import{n as k,t as ie}from"./target-navigation-intent-tYLsg509.js";import{t as ae}from"./triangle-alert-BggXGlON.js";import{f as oe}from"./doc-paths-DqJ_A_s7.js";import{n as se}from"./external-link-B4qPZwve.js";import{a as ce,c as le,i as ue,n as de,r as fe,s as pe,t as me}from"./panel-CRIdNIdp.js";import{t as he}from"./ordinal-azP43YYV.js";import{n as ge,t as A}from"./min-BuisR8Ds.js";import{C as _e,S as ve,_ as ye,b as j,g as be,n as xe,r as Se,t as Ce,v as we,w as Te,x as Ee,y as De}from"./src-Cz0_Zht5.js";import{t as Oe}from"./colors-BXGeNhp8.js";import{t as ke}from"./isObject-DdQfH98s.js";import{n as M,t as N}from"./now-BxomExHG.js";var Ae=D(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),je=D(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]);function Me(e,n){let r=0;if(n===void 0)for(let n of e)(n=+n)&&(r+=n);else{let i=-1;for(let a of e)(a=+n(a,++i,e))&&(r+=a)}return r}var Ne=e=>()=>e;function Pe(e,{sourceEvent:n,subject:r,target:i,identifier:a,active:o,x:s,y:c,dx:l,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}Pe.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Fe(e){return!e.ctrlKey&&!e.button}function Ie(){return this.parentNode}function P(e,n){return n??{x:e.x,y:e.y}}function F(){return navigator.maxTouchPoints||`ontouchstart`in this}function Le(){var e=Fe,n=Ie,r=P,i=F,a={},o=Te(`start`,`drag`,`end`),s=0,c,l,u,d,f=0;function p(e){e.on(`mousedown.drag`,m).filter(i).on(`touchstart.drag`,_).on(`touchmove.drag`,v,De).on(`touchend.drag touchcancel.drag`,y).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function m(r,i){if(!(d||!e.call(this,r,i))){var a=b(this,n.call(this,r,i),r,i,`mouse`);a&&(_e(r.view).on(`mousemove.drag`,h,j).on(`mouseup.drag`,g,j),be(r.view),Ee(r),u=!1,c=r.clientX,l=r.clientY,a(`start`,r))}}function h(e){if(we(e),!u){var n=e.clientX-c,r=e.clientY-l;u=n*n+r*r>f}a.mouse(`drag`,e)}function g(e){_e(e.view).on(`mousemove.drag mouseup.drag`,null),ye(e.view,u),we(e),a.mouse(`end`,e)}function _(r,i){if(e.call(this,r,i)){var a=r.changedTouches,o=n.call(this,r,i),s=a.length,c,l;for(c=0;c<s;++c)(l=b(this,o,r,i,a[c].identifier,a[c]))&&(Ee(r),l(`start`,r,a[c]))}}function v(e){var n=e.changedTouches,r=n.length,i,o;for(i=0;i<r;++i)(o=a[n[i].identifier])&&(we(e),o(`drag`,e,n[i]))}function y(e){var n=e.changedTouches,r=n.length,i,o;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),i=0;i<r;++i)(o=a[n[i].identifier])&&(Ee(e),o(`end`,e,n[i]))}function b(e,n,i,c,l,u){var d=o.copy(),f=ve(u||i,n),m,h,g;if((g=r.call(e,new Pe(`beforestart`,{sourceEvent:i,target:p,identifier:l,active:s,x:f[0],y:f[1],dx:0,dy:0,dispatch:d}),c))!=null)return m=g.x-f[0]||0,h=g.y-f[1]||0,function r(i,o,u){var _=f,v;switch(i){case`start`:a[l]=r,v=s++;break;case`end`:delete a[l],--s;case`drag`:f=ve(u||o,n),v=s;break}d.call(i,e,new Pe(i,{sourceEvent:o,subject:g,target:p,identifier:l,active:v,x:f[0]+m,y:f[1]+h,dx:f[0]-_[0],dy:f[1]-_[1],dispatch:d}),c)}}return p.filter=function(n){return arguments.length?(e=typeof n==`function`?n:Ne(!!n),p):e},p.container=function(e){return arguments.length?(n=typeof e==`function`?e:Ne(e),p):n},p.subject=function(e){return arguments.length?(r=typeof e==`function`?e:Ne(e),p):r},p.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:Ne(!!e),p):i},p.on=function(){var e=o.on.apply(o,arguments);return e===o?p:e},p.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,p):Math.sqrt(f)},p}function Re(e){let n=+this._x.call(null,e),r=+this._y.call(null,e);return ze(this.cover(n,r),n,r,e)}function ze(e,n,r,i){if(isNaN(n)||isNaN(r))return e;var a,o=e._root,s={data:i},c=e._x0,l=e._y0,u=e._x1,d=e._y1,f,p,m,h,g,_,v,y;if(!o)return e._root=s,e;for(;o.length;)if((g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p,a=o,!(o=o[v=_<<1|g]))return a[v]=s,e;if(m=+e._x.call(null,o.data),h=+e._y.call(null,o.data),n===m&&r===h)return s.next=o,a?a[v]=s:e._root=s,e;do a=a?a[v]=[,,,,]:e._root=[,,,,],(g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p;while((v=_<<1|g)==(y=(h>=p)<<1|m>=f));return a[y]=o,a[v]=s,e}function I(e){var n,r,i=e.length,a,o,s=Array(i),c=Array(i),l=1/0,u=1/0,d=-1/0,f=-1/0;for(r=0;r<i;++r)isNaN(a=+this._x.call(null,n=e[r]))||isNaN(o=+this._y.call(null,n))||(s[r]=a,c[r]=o,a<l&&(l=a),a>d&&(d=a),o<u&&(u=o),o>f&&(f=o));if(l>d||u>f)return this;for(this.cover(l,u).cover(d,f),r=0;r<i;++r)ze(this,s[r],c[r],e[r]);return this}function Be(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,a=this._x1,o=this._y1;if(isNaN(r))a=(r=Math.floor(e))+1,o=(i=Math.floor(n))+1;else{for(var s=a-r||1,c=this._root,l,u;r>e||e>=a||i>n||n>=o;)switch(u=(n<i)<<1|e<r,l=[,,,,],l[u]=c,c=l,s*=2,u){case 0:a=r+s,o=i+s;break;case 1:r=a-s,o=i+s;break;case 2:a=r+s,i=o-s;break;case 3:r=a-s,i=o-s;break}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=i,this._x1=a,this._y1=o,this}function Ve(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function He(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function L(e,n,r,i,a){this.node=e,this.x0=n,this.y0=r,this.x1=i,this.y1=a}function Ue(e,n,r){var i,a=this._x0,o=this._y0,s,c,l,u,d=this._x1,f=this._y1,p=[],m=this._root,h,g;for(m&&p.push(new L(m,a,o,d,f)),r==null?r=1/0:(a=e-r,o=n-r,d=e+r,f=n+r,r*=r);h=p.pop();)if(!(!(m=h.node)||(s=h.x0)>d||(c=h.y0)>f||(l=h.x1)<a||(u=h.y1)<o))if(m.length){var _=(s+l)/2,v=(c+u)/2;p.push(new L(m[3],_,v,l,u),new L(m[2],s,v,_,u),new L(m[1],_,c,l,v),new L(m[0],s,c,_,v)),(g=(n>=v)<<1|e>=_)&&(h=p[p.length-1],p[p.length-1]=p[p.length-1-g],p[p.length-1-g]=h)}else{var y=e-+this._x.call(null,m.data),b=n-+this._y.call(null,m.data),x=y*y+b*b;if(x<r){var S=Math.sqrt(r=x);a=e-S,o=n-S,d=e+S,f=n+S,i=m.data}}return i}function We(e){if(isNaN(d=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var n,r=this._root,i,a,o,s=this._x0,c=this._y0,l=this._x1,u=this._y1,d,f,p,m,h,g,_,v;if(!r)return this;if(r.length)for(;;){if((h=d>=(p=(s+l)/2))?s=p:l=p,(g=f>=(m=(c+u)/2))?c=m:u=m,n=r,!(r=r[_=g<<1|h]))return this;if(!r.length)break;(n[_+1&3]||n[_+2&3]||n[_+3&3])&&(i=n,v=_)}for(;r.data!==e;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):n?(o?n[_]=o:delete n[_],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[v]=r:this._root=r),this):(this._root=o,this)}function Ge(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function Ke(){return this._root}function qe(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Je(e){var n=[],r,i=this._root,a,o,s,c,l;for(i&&n.push(new L(i,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(i=r.node,o=r.x0,s=r.y0,c=r.x1,l=r.y1)&&i.length){var u=(o+c)/2,d=(s+l)/2;(a=i[3])&&n.push(new L(a,u,d,c,l)),(a=i[2])&&n.push(new L(a,o,d,u,l)),(a=i[1])&&n.push(new L(a,u,s,c,d)),(a=i[0])&&n.push(new L(a,o,s,u,d))}return this}function Ye(e){var n=[],r=[],i;for(this._root&&n.push(new L(this._root,this._x0,this._y0,this._x1,this._y1));i=n.pop();){var a=i.node;if(a.length){var o,s=i.x0,c=i.y0,l=i.x1,u=i.y1,d=(s+l)/2,f=(c+u)/2;(o=a[0])&&n.push(new L(o,s,c,d,f)),(o=a[1])&&n.push(new L(o,d,c,l,f)),(o=a[2])&&n.push(new L(o,s,f,d,u)),(o=a[3])&&n.push(new L(o,d,f,l,u))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function Xe(e){return e[0]}function Ze(e){return arguments.length?(this._x=e,this):this._x}function Qe(e){return e[1]}function $e(e){return arguments.length?(this._y=e,this):this._y}function et(e,n,r){var i=new tt(n??Xe,r??Qe,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function tt(e,n,r,i,a,o){this._x=e,this._y=n,this._x0=r,this._y0=i,this._x1=a,this._y1=o,this._root=void 0}function nt(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var R=et.prototype=tt.prototype;R.copy=function(){var e=new tt(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=nt(n),e;for(r=[{source:n,target:e._root=[,,,,]}];n=r.pop();)for(var a=0;a<4;++a)(i=n.source[a])&&(i.length?r.push({source:i,target:n.target[a]=[,,,,]}):n.target[a]=nt(i));return e},R.add=Re,R.addAll=I,R.cover=Be,R.data=Ve,R.extent=He,R.find=Ue,R.remove=We,R.removeAll=Ge,R.root=Ke,R.size=qe,R.visit=Je,R.visitAfter=Ye,R.x=Ze,R.y=$e;var z=Oe(`a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928`),B=n(),V=e(r(),1),rt=c(),it=`Expected a function`,at=Math.max,ot=Math.min;function st(e,n,r){var i,a,o,s,c,l,u=0,d=!1,f=!1,p=!0;if(typeof e!=`function`)throw TypeError(it);n=M(n)||0,ke(r)&&(d=!!r.leading,f=`maxWait`in r,o=f?at(M(r.maxWait)||0,n):o,p=`trailing`in r?!!r.trailing:p);function m(n){var r=i,o=a;return i=a=void 0,u=n,s=e.apply(o,r),s}function h(e){return u=e,c=setTimeout(v,n),d?m(e):s}function g(e){var r=e-l,i=e-u,a=n-r;return f?ot(a,o-i):a}function _(e){var r=e-l,i=e-u;return l===void 0||r>=n||r<0||f&&i>=o}function v(){var e=N();if(_(e))return y(e);c=setTimeout(v,g(e))}function y(e){return c=void 0,p&&i?m(e):(i=a=void 0,s)}function b(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function x(){return c===void 0?s:y(N())}function S(){var e=N(),r=_(e);if(i=arguments,a=this,l=e,r){if(c===void 0)return h(l);if(f)return clearTimeout(c),c=setTimeout(v,n),m(l)}return c===void 0&&(c=setTimeout(v,n)),s}return S.cancel=b,S.flush=x,S}var H=`Expected a function`;function ct(e,n,r){var i=!0,a=!0;if(typeof e!=`function`)throw TypeError(H);return ke(r)&&(i=`leading`in r?!!r.leading:i,a=`trailing`in r?!!r.trailing:a),st(e,n,{leading:i,maxWait:n,trailing:a})}var lt=[`#60a5fa`,`#a78bfa`,`#34d399`,`#f472b6`,`#fb923c`,`#22d3ee`,`#c084fc`,`#4ade80`,`#f87171`,`#eab308`,`#ec4899`,`#06b67f`,`#8b5cf6`,`#f43f5e`,`#0ea5e9`,`#a855f7`],ut=[`#1e40af`,`#6b21a8`,`#166534`,`#9f1239`,`#9a3412`,`#164e63`,`#581c87`,`#166534`,`#991b1b`,`#854d0e`,`#831843`,`#0f766e`,`#312e81`,`#9f1239`,`#0c4a6e`,`#6b21a8`];function dt(e){let n=2;for(let r=0;r<e.length;r++)n=Math.imul(n^e.charCodeAt(r),1540483477),n^=n>>>13,n=Math.imul(n,1540483477),n^=n>>>15;return n>>>0}function ft(e,n){let r=n?lt:ut;return r[dt(e)%r.length]}var U={fullscreen:{maxEntries:10,containerClassName:`bottom-3 left-3 gap-1 rounded-lg px-3 py-2 text-xs`,titleClassName:`mb-1.5`,rowClassName:`gap-2`,swatchClassName:`size-2.5`,labelClassName:`max-w-[140px]`,overflowClassName:`pl-[18px]`},docked:{maxEntries:6,containerClassName:`bottom-2 left-2 gap-0.5 rounded-md px-2 py-1.5 text-[11px]`,titleClassName:`mb-1`,rowClassName:`gap-1.5`,swatchClassName:`size-2`,labelClassName:`max-w-[112px]`,overflowClassName:`pl-[14px]`}};function pt(e){return U[e]}function W(e){let n=(0,rt.c)(6),{clusters:r,variant:a}=e,o=a===void 0?`fullscreen`:a,{resolvedTheme:c}=s(),u=c===`dark`,d,f;if(n[0]!==r||n[1]!==u||n[2]!==o){f=Symbol.for(`react.early_return_sentinel`);bb0:{let e=pt(o);if(r.length===0){f=null;break bb0}let a=r.slice(0,e.maxEntries),s=r.length-a.length,c;n[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,B.jsx)(i,{id:`kmKqZg`}),n[5]=c):c=n[5],d=(0,B.jsxs)(`div`,{className:l(`pointer-events-none absolute z-10 flex flex-col backdrop-blur-sm`,e.containerClassName,u?`bg-black/70 text-gray-200`:`bg-white/80 text-gray-800 ring-1 ring-black/5`),children:[(0,B.jsx)(`div`,{className:l(`font-medium`,e.titleClassName,u?`text-slate-300`:`text-slate-700`),children:c}),a.map(n=>(0,B.jsxs)(`div`,{className:l(`flex items-center`,e.rowClassName),children:[(0,B.jsx)(`span`,{className:l(`inline-block shrink-0 rounded-full`,e.swatchClassName),style:{backgroundColor:ft(n,u)}}),(0,B.jsx)(`span`,{className:l(`truncate`,e.labelClassName),children:n})]},n)),s>0&&(0,B.jsx)(`div`,{className:l(`text-muted-foreground`,e.overflowClassName),children:(0,B.jsx)(i,{id:`lrhetp`,values:{overflow:s}})})]})}n[0]=r,n[1]=u,n[2]=o,n[3]=d,n[4]=f}else d=n[3],f=n[4];return f===Symbol.for(`react.early_return_sentinel`)?d:f}function mt(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function ht(e,n,r){return n=Et(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function gt(e,n){return yt(e)||mt(e,n)||xt(e,n)||wt()}function _t(e){return vt(e)||bt(e)||xt(e)||Ct()}function vt(e){if(Array.isArray(e))return St(e)}function yt(e){if(Array.isArray(e))return e}function bt(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function xt(e,n){if(e){if(typeof e==`string`)return St(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return Array.from(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return St(e,n)}}function St(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function Ct(){throw TypeError(`Invalid attempt to spread non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wt(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tt(e,n){if(typeof e!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(typeof i!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function Et(e){var n=Tt(e,`string`);return typeof n==`symbol`?n:String(n)}var Dt=function(e,n){var r=new Set(n);return Object.assign.apply(Object,[{}].concat(_t(Object.entries(e).filter(function(e){var n=gt(e,1)[0];return!r.has(n)}).map(function(e){var n=gt(e,2),r=n[0],i=n[1];return ht({},r,i)}))))};function Ot(e,{wrapperElementType:n=`div`,nodeMapper:r=e=>e,methodNames:i=[],initPropNames:a=[]}={}){return(0,V.forwardRef)((o,s)=>{let c=(0,V.useRef)(),l=(0,V.useMemo)(()=>e(Object.fromEntries(a.filter(e=>o.hasOwnProperty(e)).map(e=>[e,o[e]]))),[]);kt(()=>{l(r(c.current))},V.useLayoutEffect),kt(()=>l._destructor instanceof Function?l._destructor:void 0);let u=(0,V.useCallback)((e,...n)=>l[e]instanceof Function?l[e](...n):void 0,[l]),d=(0,V.useRef)({});return Object.keys(Dt(o,[...i,...a])).filter(e=>d.current[e]!==o[e]).forEach(e=>u(e,o[e])),d.current=o,(0,V.useImperativeHandle)(s,()=>Object.fromEntries(i.map(e=>[e,(...n)=>u(e,...n)])),[u]),V.createElement(n,{ref:c})})}function kt(e,n=V.useEffect){let r=(0,V.useRef)(),i=(0,V.useRef)(!1),a=(0,V.useRef)(!1),[o,s]=(0,V.useState)(0);i.current&&(a.current=!0),n(()=>(i.current||=(r.current=e(),!0),s(e=>e+1),()=>{a.current&&=(r.current&&r.current(),r.current=void 0,i.current=!1,!1)}),[])}var At=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:1024**(e-1)},Out:function(e){return e===1?1:1-2**(-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-(2**(10*(e-1)))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:2**(-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*2**(10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*2**(-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var n=1.70158;return e===1?1:e*e*((n+1)*e-n)},Out:function(e){var n=1.70158;return e===0?0:--e*e*((n+1)*e+n)+1},InOut:function(e){var n=1.70158*1.525;return(e*=2)<1?.5*(e*e*((n+1)*e-n)):.5*((e-=2)*e*((n+1)*e+n)+2)}}),Bounce:Object.freeze({In:function(e){return 1-At.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?At.Bounce.In(e*2)*.5:At.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<2**-52?2**-52:e,e=e>1e4?1e4:e,{In:function(n){return n**+e},Out:function(n){return 1-(1-n)**e},InOut:function(n){return n<.5?(n*2)**e/2:(1-(2-n*2)**e)/2+.5}}}}),jt=function(){return performance.now()},Mt=function(){function e(){var e=[...arguments];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,e)}return e.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(n){return e._tweens[n]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i];(e=o._group)==null||e.remove(o),o._group=this,this._tweens[o.getId()]=o,this._tweensAddedDuringUpdate[o.getId()]=o}},e.prototype.remove=function(){for(var e=[...arguments],n=0,r=e;n<r.length;n++){var i=r[n];i._group=void 0,delete this._tweens[i.getId()],delete this._tweensAddedDuringUpdate[i.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(e){return!e.isPlaying()})},e.prototype.update=function(e,n){e===void 0&&(e=jt()),n===void 0&&(n=!0);var r=Object.keys(this._tweens);if(r.length!==0)for(;r.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<r.length;i++){var a=this._tweens[r[i]],o=!n;a&&a.update(e,o)===!1&&!n&&this.remove(a)}r=Object.keys(this._tweensAddedDuringUpdate)}},e}(),Nt={Linear:function(e,n){var r=e.length-1,i=r*n,a=Math.floor(i),o=Nt.Utils.Linear;return n<0?o(e[0],e[1],i):n>1?o(e[r],e[r-1],r-i):o(e[a],e[a+1>r?r:a+1],i-a)},Bezier:function(e,n){for(var r=0,i=e.length-1,a=Math.pow,o=Nt.Utils.Bernstein,s=0;s<=i;s++)r+=a(1-n,i-s)*a(n,s)*e[s]*o(i,s);return r},CatmullRom:function(e,n){var r=e.length-1,i=r*n,a=Math.floor(i),o=Nt.Utils.CatmullRom;return e[0]===e[r]?(n<0&&(a=Math.floor(i=r*(1+n))),o(e[(a-1+r)%r],e[a],e[(a+1)%r],e[(a+2)%r],i-a)):n<0?e[0]-(o(e[0],e[0],e[1],e[1],-i)-e[0]):n>1?e[r]-(o(e[r],e[r],e[r-1],e[r-1],i-r)-e[r]):o(e[a?a-1:0],e[a],e[r<a+1?r:a+1],e[r<a+2?r:a+2],i-a)},Utils:{Linear:function(e,n,r){return(n-e)*r+e},Bernstein:function(e,n){var r=Nt.Utils.Factorial;return r(e)/r(n)/r(e-n)},Factorial:(function(){var e=[1];return function(n){var r=1;if(e[n])return e[n];for(var i=n;i>1;i--)r*=i;return e[n]=r,r}})(),CatmullRom:function(e,n,r,i,a){var o=(r-e)*.5,s=(i-n)*.5,c=a*a,l=a*c;return(2*n-2*r+o+s)*l+(-3*n+3*r-2*o-s)*c+o*a+n}}},Pt=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),Ft=new Mt,It=function(){function e(e,n){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=At.Linear.None,this._interpolationFunction=Nt.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Pt.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=e,typeof n==`object`?(this._group=n,n.add(this)):n===!0&&(this._group=Ft,Ft.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(e,n){if(n===void 0&&(n=1e3),this._isPlaying)throw Error(`Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.`);return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=n<0?0:n,this},e.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},e.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},e.prototype.start=function(e,n){if(e===void 0&&(e=jt()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed)for(var r in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r];if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var i={};for(var a in this._valuesEnd)i[a]=this._valuesEnd[a];this._valuesEnd=i}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},e.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},e.prototype._setupProperties=function(e,n,r,i,a){for(var o in r){var s=e[o],c=Array.isArray(s),l=c?`array`:typeof s,u=!c&&Array.isArray(r[o]);if(!(l===`undefined`||l===`function`)){if(u){var d=r[o];if(d.length===0)continue;for(var f=[s],p=0,m=d.length;p<m;p+=1){var h=this._handleRelativeValue(s,d[p]);if(isNaN(h)){u=!1,console.warn(`Found invalid interpolation list. Skipping.`);break}f.push(h)}u&&(r[o]=f)}if((l===`object`||c)&&s&&!u){n[o]=c?[]:{};var g=s;for(var _ in g)n[o][_]=g[_];i[o]=c?[]:{};var d=r[o];if(!this._isDynamic){var v={};for(var _ in d)v[_]=d[_];r[o]=d=v}this._setupProperties(g,n[o],d,i[o],a)}else (n[o]===void 0||a)&&(n[o]=s),c||(n[o]*=1),u?i[o]=r[o].slice().reverse():i[o]=n[o]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(e){return e===void 0&&(e=jt()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this)},e.prototype.resume=function(e){return e===void 0&&(e=jt()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var e=0,n=this._chainedTweens.length;e<n;e++)this._chainedTweens[e].stop();return this},e.prototype.group=function(e){return e?(e.add(this),this):(console.warn(`tween.group() without args has been removed, use group.add(tween) instead.`),this)},e.prototype.remove=function(){var e;return(e=this._group)==null||e.remove(this),this},e.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},e.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},e.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},e.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},e.prototype.easing=function(e){return e===void 0&&(e=At.Linear.None),this._easingFunction=e,this},e.prototype.interpolation=function(e){return e===void 0&&(e=Nt.Linear),this._interpolationFunction=e,this},e.prototype.chain=function(){return this._chainedTweens=[...arguments],this},e.prototype.onStart=function(e){return this._onStartCallback=e,this},e.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},e.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},e.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},e.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},e.prototype.onStop=function(e){return this._onStopCallback=e,this},e.prototype.update=function(n,r){var i=this;if(n===void 0&&(n=jt()),r===void 0&&(r=e.autoStartOnUpdate),this._isPaused)return!0;var a;if(!this._goToEnd&&!this._isPlaying)if(r)this.start(n,!0);else return!1;if(this._goToEnd=!1,n<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var o=n-this._startTime,s=this._duration+(this._repeatDelayTime??this._delayTime),c=this._duration+this._repeat*s,l=function(){if(i._duration===0||o>c)return 1;var e=o-Math.trunc(o/s)*s,n=Math.min(e/i._duration,1);return n===0&&o===i._duration?1:n}(),u=this._easingFunction(l);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,u),this._onUpdateCallback&&this._onUpdateCallback(this._object,l),this._duration===0||o>=this._duration)if(this._repeat>0){var d=Math.min(Math.trunc((o-this._duration)/s)+1,this._repeat);for(a in isFinite(this._repeat)&&(this._repeat-=d),this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[a]==`string`&&(this._valuesStartRepeat[a]=this._valuesStartRepeat[a]+parseFloat(this._valuesEnd[a])),this._yoyo&&this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=s*d,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var f=0,p=this._chainedTweens.length;f<p;f++)this._chainedTweens[f].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(e,n,r,i){for(var a in r)if(n[a]!==void 0){var o=n[a]||0,s=r[a];!Array.isArray(e[a])&&Array.isArray(s)?e[a]=this._interpolationFunction(s,i):typeof s==`object`&&s?this._updateProperties(e[a],o,s,i):(s=this._handleRelativeValue(o,s),typeof s==`number`&&(e[a]=o+(s-o)*i))}},e.prototype._handleRelativeValue=function(e,n){return typeof n==`string`?n.charAt(0)===`+`||n.charAt(0)===`-`?e+parseFloat(n):parseFloat(n):n},e.prototype._swapEndStartRepeatValues=function(e){var n=this._valuesStartRepeat[e],r=this._valuesEnd[e];typeof r==`string`?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(r):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=n},e.autoStartOnUpdate=!1,e}();Pt.nextId;var Lt=Ft;Lt.getAll.bind(Lt),Lt.removeAll.bind(Lt),Lt.add.bind(Lt),Lt.remove.bind(Lt),Lt.update.bind(Lt);function Rt(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function zt(e){if(Array.isArray(e))return e}function Bt(e,n){if(!(e instanceof n))throw TypeError(`Cannot call a class as a function`)}function Vt(e,n,r){return Object.defineProperty(e,`prototype`,{writable:!1}),e}function Ht(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n!==0)for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function Ut(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
4
4
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wt(e,n){return zt(e)||Ht(e,n)||Gt(e,n)||Ut()}function Gt(e,n){if(e){if(typeof e==`string`)return Rt(e,n);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Rt(e,n):void 0}}var Kt=Vt(function e(n,r){var i=r.default,a=i===void 0?null:i,o=r.triggerUpdate,s=o===void 0?!0:o,c=r.onChange,l=c===void 0?function(e,n){}:c;Bt(this,e),this.name=n,this.defaultVal=a,this.triggerUpdate=s,this.onChange=l});function qt(e){var n=e.stateInit,r=n===void 0?function(){return{}}:n,i=e.props,a=i===void 0?{}:i,o=e.methods,s=o===void 0?{}:o,c=e.aliases,l=c===void 0?{}:c,u=e.init,d=u===void 0?function(){}:u,f=e.update,p=f===void 0?function(){}:f,m=Object.keys(a).map(function(e){return new Kt(e,a[e])});return function e(){var n=[...arguments],i=!!(this instanceof e&&this.constructor),a=i?n.shift():void 0,o=n[0],c=o===void 0?{}:o,u=Object.assign({},r instanceof Function?r(c):r,{initialised:!1}),f={};function h(e){return g(e,c),_(),h}var g=function(e,n){d.call(h,e,u,n),u.initialised=!0},_=st(function(){u.initialised&&(p.call(h,u,f),f={})},1);return m.forEach(function(e){h[e.name]=n(e);function n(e){var n=e.name,r=e.triggerUpdate,i=r===void 0?!1:r,a=e.onChange,o=a===void 0?function(e,n){}:a,s=e.defaultVal,c=s===void 0?null:s;return function(e){var r=u[n];if(!arguments.length)return r;var a=e===void 0?c:e;return u[n]=a,o.call(h,a,u,r),!f.hasOwnProperty(n)&&(f[n]=r),i&&_(),h}}}),Object.keys(s).forEach(function(e){h[e]=function(){var n,r=[...arguments];return(n=s[e]).call.apply(n,[h,u].concat(r))}}),Object.entries(l).forEach(function(e){var n=Wt(e,2),r=n[0];return h[r]=h[n[1]]}),h.resetProps=function(){return m.forEach(function(e){h[e.name](e.defaultVal)}),h},h.resetProps(),u._rerender=_,i&&a&&h(a),h}}var G=(function(e){return typeof e==`function`?e:typeof e==`string`?function(n){return n[e]}:function(n){return e}});function Jt(e){"@babel/helpers - typeof";return Jt=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Jt(e)}var Yt=/^\s+/,Xt=/\s+$/;function K(e,n){if(e||=``,n||={},e instanceof K)return e;if(!(this instanceof K))return new K(e,n);var r=Zt(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}K.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),n=e.r/255,r=e.g/255,i=e.b/255,a=n<=.03928?n/12.92:((n+.055)/1.055)**2.4,o=r<=.03928?r/12.92:((r+.055)/1.055)**2.4,s=i<=.03928?i/12.92:((i+.055)/1.055)**2.4;return .2126*a+.7152*o+.0722*s},setAlpha:function(e){return this._a=Sn(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=tn(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=tn(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.v*100);return this._a==1?`hsv(`+n+`, `+r+`%, `+i+`%)`:`hsva(`+n+`, `+r+`%, `+i+`%, `+this._roundA+`)`},toHsl:function(){var e=$t(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=$t(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.l*100);return this._a==1?`hsl(`+n+`, `+r+`%, `+i+`%)`:`hsla(`+n+`, `+r+`%, `+i+`%, `+this._roundA+`)`},toHex:function(e){return rn(this._r,this._g,this._b,e)},toHexString:function(e){return`#`+this.toHex(e)},toHex8:function(e){return an(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return`#`+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?`rgb(`+Math.round(this._r)+`, `+Math.round(this._g)+`, `+Math.round(this._b)+`)`:`rgba(`+Math.round(this._r)+`, `+Math.round(this._g)+`, `+Math.round(this._b)+`, `+this._roundA+`)`},toPercentageRgb:function(){return{r:Math.round(q(this._r,255)*100)+`%`,g:Math.round(q(this._g,255)*100)+`%`,b:Math.round(q(this._b,255)*100)+`%`,a:this._a}},toPercentageRgbString:function(){return this._a==1?`rgb(`+Math.round(q(this._r,255)*100)+`%, `+Math.round(q(this._g,255)*100)+`%, `+Math.round(q(this._b,255)*100)+`%)`:`rgba(`+Math.round(q(this._r,255)*100)+`%, `+Math.round(q(this._g,255)*100)+`%, `+Math.round(q(this._b,255)*100)+`%, `+this._roundA+`)`},toName:function(){return this._a===0?`transparent`:this._a<1?!1:bn[rn(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var n=`#`+on(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?`GradientType = 1, `:``;if(e){var a=K(e);r=`#`+on(a._r,a._g,a._b,a._a)}return`progid:DXImageTransform.Microsoft.gradient(`+i+`startColorstr=`+n+`,endColorstr=`+r+`)`},toString:function(e){var n=!!e;e||=this._format;var r=!1,i=this._a<1&&this._a>=0;return!n&&i&&(e===`hex`||e===`hex6`||e===`hex3`||e===`hex4`||e===`hex8`||e===`name`)?e===`name`&&this._a===0?this.toName():this.toRgbString():(e===`rgb`&&(r=this.toRgbString()),e===`prgb`&&(r=this.toPercentageRgbString()),(e===`hex`||e===`hex6`)&&(r=this.toHexString()),e===`hex3`&&(r=this.toHexString(!0)),e===`hex4`&&(r=this.toHex8String(!0)),e===`hex8`&&(r=this.toHex8String()),e===`name`&&(r=this.toName()),e===`hsl`&&(r=this.toHslString()),e===`hsv`&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return K(this.toString())},_applyModification:function(e,n){var r=e.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(un,arguments)},brighten:function(){return this._applyModification(dn,arguments)},darken:function(){return this._applyModification(fn,arguments)},desaturate:function(){return this._applyModification(sn,arguments)},saturate:function(){return this._applyModification(cn,arguments)},greyscale:function(){return this._applyModification(ln,arguments)},spin:function(){return this._applyModification(pn,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(_n,arguments)},complement:function(){return this._applyCombination(mn,arguments)},monochromatic:function(){return this._applyCombination(vn,arguments)},splitcomplement:function(){return this._applyCombination(gn,arguments)},triad:function(){return this._applyCombination(hn,[3])},tetrad:function(){return this._applyCombination(hn,[4])}},K.fromRatio=function(e,n){if(Jt(e)==`object`){var r={};for(var i in e)e.hasOwnProperty(i)&&(i===`a`?r[i]=e[i]:r[i]=On(e[i]));e=r}return K(e,n)};function Zt(e){var n={r:0,g:0,b:0},r=1,i=null,a=null,o=null,s=!1,c=!1;return typeof e==`string`&&(e=Nn(e)),Jt(e)==`object`&&(Mn(e.r)&&Mn(e.g)&&Mn(e.b)?(n=Qt(e.r,e.g,e.b),s=!0,c=String(e.r).substr(-1)===`%`?`prgb`:`rgb`):Mn(e.h)&&Mn(e.s)&&Mn(e.v)?(i=On(e.s),a=On(e.v),n=nn(e.h,i,a),s=!0,c=`hsv`):Mn(e.h)&&Mn(e.s)&&Mn(e.l)&&(i=On(e.s),o=On(e.l),n=en(e.h,i,o),s=!0,c=`hsl`),e.hasOwnProperty(`a`)&&(r=e.a)),r=Sn(r),{ok:s,format:e.format||c,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function Qt(e,n,r){return{r:q(e,255)*255,g:q(n,255)*255,b:q(r,255)*255}}function $t(e,n,r){e=q(e,255),n=q(n,255),r=q(r,255);var i=Math.max(e,n,r),a=Math.min(e,n,r),o,s,c=(i+a)/2;if(i==a)o=s=0;else{var l=i-a;switch(s=c>.5?l/(2-i-a):l/(i+a),i){case e:o=(n-r)/l+(n<r?6:0);break;case n:o=(r-e)/l+2;break;case r:o=(e-n)/l+4;break}o/=6}return{h:o,s,l:c}}function en(e,n,r){var i,a,o;e=q(e,360),n=q(n,100),r=q(r,100);function s(e,n,r){return r<0&&(r+=1),r>1&&--r,r<1/6?e+(n-e)*6*r:r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}if(n===0)i=a=o=r;else{var c=r<.5?r*(1+n):r+n-r*n,l=2*r-c;i=s(l,c,e+1/3),a=s(l,c,e),o=s(l,c,e-1/3)}return{r:i*255,g:a*255,b:o*255}}function tn(e,n,r){e=q(e,255),n=q(n,255),r=q(r,255);var i=Math.max(e,n,r),a=Math.min(e,n,r),o,s,c=i,l=i-a;if(s=i===0?0:l/i,i==a)o=0;else{switch(i){case e:o=(n-r)/l+(n<r?6:0);break;case n:o=(r-e)/l+2;break;case r:o=(e-n)/l+4;break}o/=6}return{h:o,s,v:c}}function nn(e,n,r){e=q(e,360)*6,n=q(n,100),r=q(r,100);var i=Math.floor(e),a=e-i,o=r*(1-n),s=r*(1-a*n),c=r*(1-(1-a)*n),l=i%6,u=[r,s,o,o,c,r][l],d=[c,r,r,s,o,o][l],f=[o,o,c,r,r,s][l];return{r:u*255,g:d*255,b:f*255}}function rn(e,n,r,i){var a=[Dn(Math.round(e).toString(16)),Dn(Math.round(n).toString(16)),Dn(Math.round(r).toString(16))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join(``)}function an(e,n,r,i,a){var o=[Dn(Math.round(e).toString(16)),Dn(Math.round(n).toString(16)),Dn(Math.round(r).toString(16)),Dn(kn(i))];return a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join(``)}function on(e,n,r,i){return[Dn(kn(i)),Dn(Math.round(e).toString(16)),Dn(Math.round(n).toString(16)),Dn(Math.round(r).toString(16))].join(``)}K.equals=function(e,n){return!e||!n?!1:K(e).toRgbString()==K(n).toRgbString()},K.random=function(){return K.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function sn(e,n){n=n===0?0:n||10;var r=K(e).toHsl();return r.s-=n/100,r.s=Cn(r.s),K(r)}function cn(e,n){n=n===0?0:n||10;var r=K(e).toHsl();return r.s+=n/100,r.s=Cn(r.s),K(r)}function ln(e){return K(e).desaturate(100)}function un(e,n){n=n===0?0:n||10;var r=K(e).toHsl();return r.l+=n/100,r.l=Cn(r.l),K(r)}function dn(e,n){n=n===0?0:n||10;var r=K(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(n/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(n/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(n/100)))),K(r)}function fn(e,n){n=n===0?0:n||10;var r=K(e).toHsl();return r.l-=n/100,r.l=Cn(r.l),K(r)}function pn(e,n){var r=K(e).toHsl(),i=(r.h+n)%360;return r.h=i<0?360+i:i,K(r)}function mn(e){var n=K(e).toHsl();return n.h=(n.h+180)%360,K(n)}function hn(e,n){if(isNaN(n)||n<=0)throw Error(`Argument to polyad must be a positive number`);for(var r=K(e).toHsl(),i=[K(e)],a=360/n,o=1;o<n;o++)i.push(K({h:(r.h+o*a)%360,s:r.s,l:r.l}));return i}function gn(e){var n=K(e).toHsl(),r=n.h;return[K(e),K({h:(r+72)%360,s:n.s,l:n.l}),K({h:(r+216)%360,s:n.s,l:n.l})]}function _n(e,n,r){n||=6,r||=30;var i=K(e).toHsl(),a=360/r,o=[K(e)];for(i.h=(i.h-(a*n>>1)+720)%360;--n;)i.h=(i.h+a)%360,o.push(K(i));return o}function vn(e,n){n||=6;for(var r=K(e).toHsv(),i=r.h,a=r.s,o=r.v,s=[],c=1/n;n--;)s.push(K({h:i,s:a,v:o})),o=(o+c)%1;return s}K.mix=function(e,n,r){r=r===0?0:r||50;var i=K(e).toRgb(),a=K(n).toRgb(),o=r/100;return K({r:(a.r-i.r)*o+i.r,g:(a.g-i.g)*o+i.g,b:(a.b-i.b)*o+i.b,a:(a.a-i.a)*o+i.a})},K.readability=function(e,n){var r=K(e),i=K(n);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)},K.isReadable=function(e,n,r){var i=K.readability(e,n),a,o=!1;switch(a=Pn(r),a.level+a.size){case`AAsmall`:case`AAAlarge`:o=i>=4.5;break;case`AAlarge`:o=i>=3;break;case`AAAsmall`:o=i>=7;break}return o},K.mostReadable=function(e,n,r){var i=null,a=0,o,s,c,l;r||={},s=r.includeFallbackColors,c=r.level,l=r.size;for(var u=0;u<n.length;u++)o=K.readability(e,n[u]),o>a&&(a=o,i=K(n[u]));return K.isReadable(e,i,{level:c,size:l})||!s?i:(r.includeFallbackColors=!1,K.mostReadable(e,[`#fff`,`#000`],r))};var yn=K.names={aliceblue:`f0f8ff`,antiquewhite:`faebd7`,aqua:`0ff`,aquamarine:`7fffd4`,azure:`f0ffff`,beige:`f5f5dc`,bisque:`ffe4c4`,black:`000`,blanchedalmond:`ffebcd`,blue:`00f`,blueviolet:`8a2be2`,brown:`a52a2a`,burlywood:`deb887`,burntsienna:`ea7e5d`,cadetblue:`5f9ea0`,chartreuse:`7fff00`,chocolate:`d2691e`,coral:`ff7f50`,cornflowerblue:`6495ed`,cornsilk:`fff8dc`,crimson:`dc143c`,cyan:`0ff`,darkblue:`00008b`,darkcyan:`008b8b`,darkgoldenrod:`b8860b`,darkgray:`a9a9a9`,darkgreen:`006400`,darkgrey:`a9a9a9`,darkkhaki:`bdb76b`,darkmagenta:`8b008b`,darkolivegreen:`556b2f`,darkorange:`ff8c00`,darkorchid:`9932cc`,darkred:`8b0000`,darksalmon:`e9967a`,darkseagreen:`8fbc8f`,darkslateblue:`483d8b`,darkslategray:`2f4f4f`,darkslategrey:`2f4f4f`,darkturquoise:`00ced1`,darkviolet:`9400d3`,deeppink:`ff1493`,deepskyblue:`00bfff`,dimgray:`696969`,dimgrey:`696969`,dodgerblue:`1e90ff`,firebrick:`b22222`,floralwhite:`fffaf0`,forestgreen:`228b22`,fuchsia:`f0f`,gainsboro:`dcdcdc`,ghostwhite:`f8f8ff`,gold:`ffd700`,goldenrod:`daa520`,gray:`808080`,green:`008000`,greenyellow:`adff2f`,grey:`808080`,honeydew:`f0fff0`,hotpink:`ff69b4`,indianred:`cd5c5c`,indigo:`4b0082`,ivory:`fffff0`,khaki:`f0e68c`,lavender:`e6e6fa`,lavenderblush:`fff0f5`,lawngreen:`7cfc00`,lemonchiffon:`fffacd`,lightblue:`add8e6`,lightcoral:`f08080`,lightcyan:`e0ffff`,lightgoldenrodyellow:`fafad2`,lightgray:`d3d3d3`,lightgreen:`90ee90`,lightgrey:`d3d3d3`,lightpink:`ffb6c1`,lightsalmon:`ffa07a`,lightseagreen:`20b2aa`,lightskyblue:`87cefa`,lightslategray:`789`,lightslategrey:`789`,lightsteelblue:`b0c4de`,lightyellow:`ffffe0`,lime:`0f0`,limegreen:`32cd32`,linen:`faf0e6`,magenta:`f0f`,maroon:`800000`,mediumaquamarine:`66cdaa`,mediumblue:`0000cd`,mediumorchid:`ba55d3`,mediumpurple:`9370db`,mediumseagreen:`3cb371`,mediumslateblue:`7b68ee`,mediumspringgreen:`00fa9a`,mediumturquoise:`48d1cc`,mediumvioletred:`c71585`,midnightblue:`191970`,mintcream:`f5fffa`,mistyrose:`ffe4e1`,moccasin:`ffe4b5`,navajowhite:`ffdead`,navy:`000080`,oldlace:`fdf5e6`,olive:`808000`,olivedrab:`6b8e23`,orange:`ffa500`,orangered:`ff4500`,orchid:`da70d6`,palegoldenrod:`eee8aa`,palegreen:`98fb98`,paleturquoise:`afeeee`,palevioletred:`db7093`,papayawhip:`ffefd5`,peachpuff:`ffdab9`,peru:`cd853f`,pink:`ffc0cb`,plum:`dda0dd`,powderblue:`b0e0e6`,purple:`800080`,rebeccapurple:`663399`,red:`f00`,rosybrown:`bc8f8f`,royalblue:`4169e1`,saddlebrown:`8b4513`,salmon:`fa8072`,sandybrown:`f4a460`,seagreen:`2e8b57`,seashell:`fff5ee`,sienna:`a0522d`,silver:`c0c0c0`,skyblue:`87ceeb`,slateblue:`6a5acd`,slategray:`708090`,slategrey:`708090`,snow:`fffafa`,springgreen:`00ff7f`,steelblue:`4682b4`,tan:`d2b48c`,teal:`008080`,thistle:`d8bfd8`,tomato:`ff6347`,turquoise:`40e0d0`,violet:`ee82ee`,wheat:`f5deb3`,white:`fff`,whitesmoke:`f5f5f5`,yellow:`ff0`,yellowgreen:`9acd32`},bn=K.hexNames=xn(yn);function xn(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function Sn(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function q(e,n){Tn(e)&&(e=`100%`);var r=En(e);return e=Math.min(n,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function Cn(e){return Math.min(1,Math.max(0,e))}function wn(e){return parseInt(e,16)}function Tn(e){return typeof e==`string`&&e.indexOf(`.`)!=-1&&parseFloat(e)===1}function En(e){return typeof e==`string`&&e.indexOf(`%`)!=-1}function Dn(e){return e.length==1?`0`+e:``+e}function On(e){return e<=1&&(e=e*100+`%`),e}function kn(e){return Math.round(parseFloat(e)*255).toString(16)}function An(e){return wn(e)/255}var jn=function(){var e=`(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)`,n=`[\\s|\\(]+(`+e+`)[,|\\s]+(`+e+`)[,|\\s]+(`+e+`)\\s*\\)?`,r=`[\\s|\\(]+(`+e+`)[,|\\s]+(`+e+`)[,|\\s]+(`+e+`)[,|\\s]+(`+e+`)\\s*\\)?`;return{CSS_UNIT:new RegExp(e),rgb:RegExp(`rgb`+n),rgba:RegExp(`rgba`+r),hsl:RegExp(`hsl`+n),hsla:RegExp(`hsla`+r),hsv:RegExp(`hsv`+n),hsva:RegExp(`hsva`+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Mn(e){return!!jn.CSS_UNIT.exec(e)}function Nn(e){e=e.replace(Yt,``).replace(Xt,``).toLowerCase();var n=!1;if(yn[e])e=yn[e],n=!0;else if(e==`transparent`)return{r:0,g:0,b:0,a:0,format:`name`};var r;return(r=jn.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=jn.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=jn.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=jn.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=jn.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=jn.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=jn.hex8.exec(e))?{r:wn(r[1]),g:wn(r[2]),b:wn(r[3]),a:An(r[4]),format:n?`name`:`hex8`}:(r=jn.hex6.exec(e))?{r:wn(r[1]),g:wn(r[2]),b:wn(r[3]),format:n?`name`:`hex`}:(r=jn.hex4.exec(e))?{r:wn(r[1]+``+r[1]),g:wn(r[2]+``+r[2]),b:wn(r[3]+``+r[3]),a:An(r[4]+``+r[4]),format:n?`name`:`hex8`}:(r=jn.hex3.exec(e))?{r:wn(r[1]+``+r[1]),g:wn(r[2]+``+r[2]),b:wn(r[3]+``+r[3]),format:n?`name`:`hex`}:!1}function Pn(e){var n,r;return e||={level:`AA`,size:`small`},n=(e.level||`AA`).toUpperCase(),r=(e.size||`small`).toLowerCase(),n!==`AA`&&n!==`AAA`&&(n=`AA`),r!==`small`&&r!==`large`&&(r=`small`),{level:n,size:r}}function Fn(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function In(e){if(Array.isArray(e))return Fn(e)}function Ln(e,n,r){if(typeof e==`function`?e===n:e.has(n))return arguments.length<3?n:r;throw TypeError(`Private element is not present on this object`)}function Rn(e,n){if(n.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function zn(e,n){if(!(e instanceof n))throw TypeError(`Cannot call a class as a function`)}function Bn(e,n){return e.get(Ln(e,n))}function Vn(e,n,r){Rn(e,n),n.set(e,r)}function Hn(e,n,r){return e.set(Ln(e,n),r),r}function Un(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,`value`in i&&(i.writable=!0),Object.defineProperty(e,Yn(i.key),i)}}function Wn(e,n,r){return n&&Un(e.prototype,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function Gn(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Kn(){throw TypeError(`Invalid attempt to spread non-iterable instance.
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{jn as n}from"./DocumentContext-CGXxK5Nq.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./useQuery-ZeEDLtxh.js";import{t as s}from"./compiler-runtime-BfE3aGVn.js";import{t as c}from"./utils-CPqDy6Hr.js";import{t as l}from"./button-CA0dewJJ.js";import{a as u,c as d,i as f,n as p,o as m,s as h,t as g}from"./dialog-nnyEatfT.js";import{t as _}from"./label-Bbz2bT-a.js";import{a as v,i as y,n as b,o as x,r as S,s as ee,t as te}from"./select-D_Rn85CT.js";import{n as C,t as ne}from"./radio-group-BDx1nLpz.js";import{i as w,n as T,r as re,t as E}from"./tabs-Jmx1E4Dy.js";import{fo as D}from"./dist-Dih2A8fV.js";import{n as O}from"./dist-CMZSEMCN2.js";import{t as k}from"./dist-CdT2fVlj.js";import{t as A}from"./createLucideIcon-NewzmgDg.js";import{t as ie}from"./git-branch-B39aVIqr.js";import{t as j}from"./folder-RQh89IbX.js";import{t as ae}from"./spinner-CbcfYaH_.js";import{n as M,t as oe}from"./use-popular-skills-PvU2WSqO.js";import{f as se,t as ce}from"./skill-scope-BmcRzXKj.js";import{t as N}from"./input-ugdhJ7_C.js";import{N as le,c as P,f as ue,i as F,k as de}from"./skills-api-DYLAW1HV.js";import{n as I,r as fe,t as pe}from"./input-group-Bn5HsYyf.js";var L=A(`file-archive`,[[`path`,{d:`M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5`,key:`4pqfef`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 12v-1`,key:`1ej8lb`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M8 7V6`,key:`1nbb54`}],[`circle`,{cx:`8`,cy:`20`,r:`2`,key:`ckkr5m`}]]),R=e(r(),1),me=s();function he(e){let t=(0,me.c)(9),n=e===void 0?!0:e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[`skills`,`openknowledge`],t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i={queryKey:r,enabled:n,staleTime:3e5,queryFn:z},t[1]=n,t[2]=i);let{data:a,isPending:s,isError:c}=o(i),l;t[3]===a?l=t[4]:(l=a??[],t[3]=a,t[4]=l);let u;return t[5]!==c||t[6]!==s||t[7]!==l?(u={skills:l,isPending:s,failed:c},t[5]=c,t[6]=s,t[7]=l,t[8]=u):u=t[8],u}async function z(){let[e,t]=await Promise.all([F(D),P(D)]);if(!e.ok)throw Error(e.error);let n=new Map((t.ok?t.results:[]).map(V));return(e.skills??[]).map(e=>({id:`${D}/${e.name}`,name:e.name,source:D,description:e.description??``,installs:n.get(e.name)??null,publisher:`inkeep/open-knowledge-skills`.split(`/`)[0]??null})).sort(B)}function B(e,t){return(t.installs??-1)-(e.installs??-1)}function V(e){return[e.name,e.installs]}var H=t(),ge=[{label:{id:`f8fH8W`},query:`design`},{label:{id:`-ySLQJ`},query:`git`},{label:{id:`qIJIrD`},query:`test`},{label:{id:`8Uv5e6`},query:`agent`},{label:{id:`UDb2YD`},query:`react`},{label:{id:`TbjyhA`},query:`docs`},{label:{id:`9wQrUU`},query:`refactor`},{label:{id:`HKH-W-`},query:`data`},{label:{id:`43qzxu`},query:`devops`},{label:{id:`a3LDKx`},query:`security`}];function U(e){let t=(0,me.c)(68),{scope:r,onNavigate:o}=e,{_:s}=a(),[c,u]=(0,R.useState)(``),d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=[],t[0]=d):d=t[0];let[f,p]=(0,R.useState)(d),[m,h]=(0,R.useState)(!1),[g,_]=(0,R.useState)(`idle`),[C,ne]=(0,R.useState)(`installs`),[w,T]=(0,R.useState)(!1),{skills:re}=oe(),{skills:E,isPending:D,failed:O}=he(w),k,A;t[1]===c?(k=t[2],A=t[3]):(k=()=>{let e=c.trim();if(e.length<2){p([]),_(`idle`);return}let t=!1;_(`searching`);let n=setTimeout(()=>{de(e).then(e=>{if(!t){if(!e.ok){_(`error`),p([]),h(!1);return}p(e.results),h(e.degraded),_(`idle`)}})},300);return()=>{t=!0,clearTimeout(n)}},A=[c],t[1]=c,t[2]=k,t[3]=A),(0,R.useEffect)(k,A);let ie;t[4]===c?ie=t[5]:(ie=c.trim(),t[4]=c,t[5]=ie);let j=ie,ae;t[6]!==f||t[7]!==C?(ae=C===`installs`?[...f].sort(W):f,t[6]=f,t[7]=C,t[8]=ae):ae=t[8];let se=ae,ce;t[9]!==o||t[10]!==r?(ce=e=>(0,H.jsx)(M,{scope:r,onNavigate:o,...e}),t[9]=o,t[10]=r,t[11]=ce):ce=t[11];let N=ce,le;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,H.jsx)(I,{align:`inline-start`,children:(0,H.jsx)(n,{"aria-hidden":`true`})}),t[12]=le):le=t[12];let P;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(P=e=>{u(e.target.value),T(!1)},t[13]=P):P=t[13];let ue;t[14]===s?ue=t[15]:(ue=s({id:`BlLxpG`}),t[14]=s,t[15]=ue);let F;t[16]===s?F=t[17]:(F=s({id:`BlLxpG`}),t[16]=s,t[17]=F);let L;t[18]!==c||t[19]!==F||t[20]!==ue?(L=(0,H.jsxs)(pe,{className:`h-9 flex-1`,children:[le,(0,H.jsx)(fe,{value:c,onChange:P,placeholder:ue,"aria-label":F})]}),t[18]=c,t[19]=F,t[20]=ue,t[21]=L):L=t[21];let z;t[22]!==s||t[23]!==j.length||t[24]!==f||t[25]!==C||t[26]!==g?(z=j.length>=2&&g===`idle`&&f.length>0?(0,H.jsxs)(te,{value:C,onValueChange:e=>ne(e),children:[(0,H.jsx)(x,{className:`h-9! w-40 shrink-0`,"aria-label":s({id:`eUFXS1`}),children:(0,H.jsx)(ee,{})}),(0,H.jsx)(b,{children:(0,H.jsxs)(S,{children:[(0,H.jsx)(v,{children:s({id:`_HgF9q`})}),(0,H.jsx)(y,{value:`relevance`,children:s({id:`7dZnmw`})}),(0,H.jsx)(y,{value:`installs`,children:s({id:`tc65fD`})})]})})]}):null,t[22]=s,t[23]=j.length,t[24]=f,t[25]=C,t[26]=g,t[27]=z):z=t[27];let B;t[28]!==L||t[29]!==z?(B=(0,H.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[L,z]}),t[28]=L,t[29]=z,t[30]=B):B=t[30];let V;t[31]===s?V=t[32]:(V=s({id:`LzM_ga`}),t[31]=s,t[32]=V);let U=w?`secondary`:`outline`,ve,G;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(ve=()=>{T(_e),u(``)},G=(0,H.jsx)(i,{id:`1ruosn`}),t[33]=ve,t[34]=G):(ve=t[33],G=t[34]);let K;t[35]!==w||t[36]!==U?(K=(0,H.jsx)(l,{variant:U,size:`sm`,"aria-pressed":w,className:`h-6 shrink-0 rounded-full data-[active=true]:border-foreground/30`,"data-active":w,onClick:ve,children:G}),t[35]=w,t[36]=U,t[37]=K):K=t[37];let q;t[38]!==s||t[39]!==c?(q=ge.map(e=>{let t=c.trim().split(/\s+/).filter(Boolean),n=t.includes(e.query);return(0,H.jsx)(l,{variant:n?`secondary`:`outline`,size:`sm`,"aria-pressed":n,className:`h-6 shrink-0 rounded-full data-[active=true]:border-foreground/30`,"data-active":n,onClick:()=>{T(!1),u((n?t.filter(t=>t!==e.query):[...t,e.query]).join(` `))},children:s(e.label)},e.query)}),t[38]=s,t[39]=c,t[40]=q):q=t[40];let J;t[41]!==V||t[42]!==K||t[43]!==q?(J=(0,H.jsxs)(`div`,{role:`group`,"aria-label":V,className:`flex shrink-0 gap-2 overflow-x-auto scroll-fade-mask-x [scrollbar-width:none]`,children:[K,q]}),t[41]=V,t[42]=K,t[43]=q,t[44]=J):J=t[44];let Y;t[45]!==m||t[46]!==j.length?(Y=m&&j.length>=2?(0,H.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:(0,H.jsx)(i,{id:`MBKkUy`})}):null,t[45]=m,t[46]=j.length,t[47]=Y):Y=t[47];let X;t[48]!==s||t[49]!==N||t[50]!==E||t[51]!==O||t[52]!==D||t[53]!==re||t[54]!==j.length||t[55]!==f||t[56]!==w||t[57]!==se||t[58]!==g?(X=w?O?(0,H.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,H.jsx)(i,{id:`SFEWV6`})}):N({results:E,pending:D,label:(0,H.jsx)(i,{id:`1ruosn`}),loadingLabel:s({id:`QGWzup`}),testId:`skills-openknowledge`}):j.length<2?re.length>0?N({results:re,label:(0,H.jsx)(i,{id:`gL_sdV`}),loadingLabel:s({id:`JDHcCM`})}):null:g===`error`?(0,H.jsx)(`p`,{className:`text-sm text-destructive`,children:(0,H.jsx)(i,{id:`yg_6wQ`})}):g===`idle`&&f.length===0?(0,H.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,H.jsx)(i,{id:`8t9T3-`})}):N({results:se,pending:g===`searching`,loadingLabel:s({id:`WRNXKp`})}),t[48]=s,t[49]=N,t[50]=E,t[51]=O,t[52]=D,t[53]=re,t[54]=j.length,t[55]=f,t[56]=w,t[57]=se,t[58]=g,t[59]=X):X=t[59];let Z;t[60]===X?Z=t[61]:(Z=(0,H.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto subtle-scrollbar scroll-fade-mask`,children:X}),t[60]=X,t[61]=Z);let Q;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(Q=(0,H.jsx)(`p`,{className:`-mb-3.5 shrink-0 text-center text-[11px] text-muted-foreground/80`,children:(0,H.jsx)(i,{id:`fg1U4e`,components:{0:(0,H.jsx)(`a`,{href:`https://skills.sh`,target:`_blank`,rel:`noreferrer`,className:`underline hover:text-foreground`})}})}),t[62]=Q):Q=t[62];let $;return t[63]!==B||t[64]!==J||t[65]!==Y||t[66]!==Z?($=(0,H.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-3`,children:[B,J,Y,Z,Q]}),t[63]=B,t[64]=J,t[65]=Y,t[66]=Z,t[67]=$):$=t[67],$}function _e(e){return!e}function W(e,t){return(t.installs??-1)-(e.installs??-1)}function ve(e,t){t.alreadyImported?O.success(e===`upload`?k._({id:`tA2-xC`,values:{0:t.name}}):k._({id:`8AjnFz`,values:{0:t.name}})):t.collisionRenamedFrom?O.success(e===`upload`?k._({id:`EPGePE`,values:{0:t.name,1:t.collisionRenamedFrom}}):k._({id:`C0Ciaj`,values:{0:t.name,1:t.collisionRenamedFrom}})):O.success(e===`upload`?k._({id:`Pg83C9`,values:{0:t.name}}):k._({id:`qFKsNl`,values:{0:t.name}}));for(let e of t.warnings??[])O.warning(e)}var G=`flex items-start justify-between gap-3 rounded-md border p-3 text-sm font-normal transition-colors cursor-pointer`;function K(e){let t=(0,me.c)(122),{defaultScope:n,onOpenChange:r,onImported:o}=e,{_:s}=a(),u=(0,R.useId)(),d=(0,R.useId)(),f=(0,R.useId)(),h=(0,R.useId)(),g=(0,R.useId)(),v=se(),[S,w]=(0,R.useState)(n),[T,re]=(0,R.useState)(`remote`),[E,D]=(0,R.useState)(``),[k,A]=(0,R.useState)(``),[M,oe]=(0,R.useState)(null),[P,de]=(0,R.useState)(!1),[I,fe]=(0,R.useState)(null),[pe,he]=(0,R.useState)(!1),[z,B]=(0,R.useState)(!1),V=(0,R.useRef)(null),ge,U;t[0]===T?(ge=t[1],U=t[2]):(ge=()=>{let e=V.current;e&&(T===`folder`?(e.setAttribute(`webkitdirectory`,``),e.setAttribute(`directory`,``)):(e.removeAttribute(`webkitdirectory`),e.removeAttribute(`directory`)))},U=[T],t[0]=T,t[1]=ge,t[2]=U),(0,R.useEffect)(ge,U);let _e;t[3]===E?_e=t[4]:(_e=E.trim(),t[3]=E,t[4]=_e);let W=_e,K=T===`zip`||T===`folder`,X=M?.[0]?.webkitRelativePath?.split(`/`)[0]??``,Z,Q;t[5]!==K||t[6]!==W?(Z=()=>{if(K||W===``){fe(null),he(!1),B(!1),A(``);return}let e=!1,t=new AbortController;he(!0),B(!1);let n=setTimeout(()=>{F(W,t.signal).then(t=>{if(!e){if(he(!1),!t.ok){fe(null),A(``),B(!0);return}B(!1),fe(t.skills),A(t.skills.length>1?t.skills[0].name:``)}})},500);return()=>{e=!0,t.abort(),clearTimeout(n)}},Q=[W,K],t[5]=K,t[6]=W,t[7]=Z,t[8]=Q):(Z=t[7],Q=t[8]),(0,R.useEffect)(Z,Q);let $=!P&&(K?M!==null&&M.length>0:W!==``),ye;t[9]!==s||t[10]!==$||t[11]!==M||t[12]!==K||t[13]!==o||t[14]!==r||t[15]!==S||t[16]!==k||t[17]!==T||t[18]!==W?(ye=async function(){if(!$)return;if(de(!0),K&&M!==null){let e=new FormData;if(T===`zip`)e.append(`file`,M[0]);else for(let t of Array.from(M))e.append(`files`,t,t.webkitRelativePath||t.name);let t=await le(e,S);if(de(!1),!t.ok){O.error(s({id:`Z8nach`,values:{0:t.error}}));return}ve(`upload`,t),o({scope:S,name:t.name}),r(!1);return}let e=await ue({source:W,...k.trim()===``?{}:{skill:k.trim()},scope:S});if(de(!1),!e.ok){if(e.skills&&e.skills.length>1){fe(e.skills.map(Y)),A(e.skills[0]),O.info(s({id:`iYUTsI`}));return}O.error(s({id:`kfL8BJ`,values:{0:e.error}}));return}ve(`import`,e),o({scope:S,name:e.name}),r(!1)},t[9]=s,t[10]=$,t[11]=M,t[12]=K,t[13]=o,t[14]=r,t[15]=S,t[16]=k,t[17]=T,t[18]=W,t[19]=ye):ye=t[19];let be=ye,xe=p,Se;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,H.jsx)(i,{id:`aBgwis`}),t[20]=Se):Se=t[20];let Ce;t[21]===h?Ce=t[22]:(Ce=(0,H.jsx)(_,{htmlFor:h,children:Se}),t[21]=h,t[22]=Ce);let we;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(we=e=>w(e),t[23]=we):we=t[23];let Te;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,H.jsx)(ee,{}),t[24]=Te):Te=t[24];let Ee;t[25]===h?Ee=t[26]:(Ee=(0,H.jsx)(x,{id:h,className:`w-full`,children:Te}),t[25]=h,t[26]=Ee);let De;t[27]===v?De=t[28]:(De=ce.map(e=>(0,H.jsx)(y,{value:e,children:v[e]},e)),t[27]=v,t[28]=De);let Oe;t[29]===De?Oe=t[30]:(Oe=(0,H.jsx)(b,{children:De}),t[29]=De,t[30]=Oe);let ke;t[31]!==S||t[32]!==Ee||t[33]!==Oe?(ke=(0,H.jsxs)(te,{value:S,onValueChange:we,children:[Ee,Oe]}),t[31]=S,t[32]=Ee,t[33]=Oe,t[34]=ke):ke=t[34];let Ae;t[35]!==ke||t[36]!==Ce?(Ae=(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Ce,ke]}),t[35]=ke,t[36]=Ce,t[37]=Ae):Ae=t[37];let je;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(je=(0,H.jsx)(i,{id:`wdxz7K`}),t[38]=je):je=t[38];let Me;t[39]===d?Me=t[40]:(Me=(0,H.jsx)(_,{id:d,children:je}),t[39]=d,t[40]=Me);let Ne;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=e=>{re(e),oe(null)},t[41]=Ne):Ne=t[41];let Pe=`${d}-remote`,Fe=T===`remote`?`border-primary bg-primary/5`:`border-border hover:bg-muted/40`,Ie;t[42]===Fe?Ie=t[43]:(Ie=c(G,Fe),t[42]=Fe,t[43]=Ie);let Le;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(Le=(0,H.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[(0,H.jsx)(ie,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,H.jsx)(i,{id:`qlAIQ1`})]}),t[44]=Le):Le=t[44];let Re;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(Re=(0,H.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[Le,(0,H.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,H.jsx)(i,{id:`9m4D_h`})})]}),t[45]=Re):Re=t[45];let ze=`${d}-remote`,Be;t[46]===ze?Be=t[47]:(Be=(0,H.jsx)(C,{id:ze,value:`remote`,className:`mt-0.5`}),t[46]=ze,t[47]=Be);let Ve;t[48]!==Pe||t[49]!==Ie||t[50]!==Be?(Ve=(0,H.jsxs)(_,{htmlFor:Pe,className:Ie,children:[Re,Be]}),t[48]=Pe,t[49]=Ie,t[50]=Be,t[51]=Ve):Ve=t[51];let He=`${d}-zip`,Ue=T===`zip`?`border-primary bg-primary/5`:`border-border hover:bg-muted/40`,We;t[52]===Ue?We=t[53]:(We=c(G,Ue),t[52]=Ue,t[53]=We);let Ge;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=(0,H.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[(0,H.jsx)(L,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,H.jsx)(i,{id:`Fr8JGg`})]}),t[54]=Ge):Ge=t[54];let Ke;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(Ke=(0,H.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[Ge,(0,H.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,H.jsx)(i,{id:`hQjvzi`})})]}),t[55]=Ke):Ke=t[55];let qe=`${d}-zip`,Je;t[56]===qe?Je=t[57]:(Je=(0,H.jsx)(C,{id:qe,value:`zip`,className:`mt-0.5`}),t[56]=qe,t[57]=Je);let Ye;t[58]!==He||t[59]!==We||t[60]!==Je?(Ye=(0,H.jsxs)(_,{htmlFor:He,className:We,children:[Ke,Je]}),t[58]=He,t[59]=We,t[60]=Je,t[61]=Ye):Ye=t[61];let Xe=`${d}-folder`,Ze=T===`folder`?`border-primary bg-primary/5`:`border-border hover:bg-muted/40`,Qe;t[62]===Ze?Qe=t[63]:(Qe=c(G,Ze),t[62]=Ze,t[63]=Qe);let $e;t[64]===Symbol.for(`react.memo_cache_sentinel`)?($e=(0,H.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[(0,H.jsx)(j,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,H.jsx)(i,{id:`kNqMMd`})]}),t[64]=$e):$e=t[64];let et;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(et=(0,H.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[$e,(0,H.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,H.jsx)(i,{id:`UPWItY`})})]}),t[65]=et):et=t[65];let tt=`${d}-folder`,nt;t[66]===tt?nt=t[67]:(nt=(0,H.jsx)(C,{id:tt,value:`folder`,className:`mt-0.5`}),t[66]=tt,t[67]=nt);let rt;t[68]!==Xe||t[69]!==Qe||t[70]!==nt?(rt=(0,H.jsxs)(_,{htmlFor:Xe,className:Qe,children:[et,nt]}),t[68]=Xe,t[69]=Qe,t[70]=nt,t[71]=rt):rt=t[71];let it;t[72]!==T||t[73]!==d||t[74]!==Ve||t[75]!==Ye||t[76]!==rt?(it=(0,H.jsxs)(ne,{value:T,onValueChange:Ne,"aria-labelledby":d,className:`grid-cols-1 gap-2 sm:grid-cols-3 mb-2`,children:[Ve,Ye,rt]}),t[72]=T,t[73]=d,t[74]=Ve,t[75]=Ye,t[76]=rt,t[77]=it):it=t[77];let at=K?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(N,{ref:V,id:g,"aria-label":s(T===`zip`?{id:`wErce0`}:{id:`VJaBca`}),type:`file`,"data-testid":`skill-upload-input`,accept:T===`zip`?`.zip,.skill`:void 0,onChange:e=>oe(e.target.files),className:`sr-only`},T),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(l,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>V.current?.click(),children:T===`zip`?(0,H.jsx)(i,{id:`-yPBXI`}):(0,H.jsx)(i,{id:`TgZOXj`})}),(0,H.jsx)(`span`,{className:`truncate text-sm text-muted-foreground`,"data-testid":`skill-upload-filename`,children:M&&M.length>0?T===`folder`?M.length===1?s({id:`BGtzlf`,values:{uploadFolderName:X}}):s({id:`K7NMEc`,values:{0:M.length,uploadFolderName:X}}):M[0].name:(0,H.jsx)(i,{id:`hqCwRf`})})]})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(N,{id:u,"aria-label":s({id:`cLP0Lf`}),"data-testid":`skill-import-source-input`,value:E,onChange:e=>D(e.target.value),onKeyDown:e=>{e.key===`Enter`&&be()},placeholder:s({id:`gv5w9J`}),className:`font-mono`}),pe||z||I&&I.length===1?(0,H.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:pe?(0,H.jsx)(i,{id:`K4G55s`}):z?(0,H.jsx)(i,{id:`XgqUOy`}):I&&I.length===1?(0,H.jsx)(i,{id:`WpE38V`,values:{0:I[0].name}}):null}):null]}),ot;t[78]!==Me||t[79]!==it||t[80]!==at?(ot=(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Me,it,at]}),t[78]=Me,t[79]=it,t[80]=at,t[81]=ot):ot=t[81];let st;t[82]!==I||t[83]!==K||t[84]!==k||t[85]!==f?(st=!K&&I&&I.length>1?(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,H.jsx)(_,{htmlFor:f,children:(0,H.jsx)(i,{id:`FCMaBz`})}),(0,H.jsxs)(te,{value:k,onValueChange:A,children:[(0,H.jsx)(x,{id:f,size:`sm`,className:`w-full`,"data-testid":`skill-import-pick`,children:(0,H.jsx)(ee,{})}),(0,H.jsx)(b,{children:I.map(J)})]}),(0,H.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,H.jsx)(i,{id:`xtJgSe`})})]}):null,t[82]=I,t[83]=K,t[84]=k,t[85]=f,t[86]=st):st=t[86];let ct;t[87]===Symbol.for(`react.memo_cache_sentinel`)?(ct=(0,H.jsx)(`p`,{className:`font-medium text-xs font-mono text-muted-foreground/80 uppercase tracking-wider`,children:(0,H.jsx)(i,{id:`DWJtEo`})}),t[87]=ct):ct=t[87];let lt;t[88]===S?lt=t[89]:(lt=(0,H.jsx)(`li`,{children:S===`project`?(0,H.jsx)(i,{id:`rucNcu`,components:{0:(0,H.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-[0.9em] text-foreground/80`})}}):(0,H.jsx)(i,{id:`vjW-SM`,components:{0:(0,H.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-[0.9em] text-foreground/80`})}})}),t[88]=S,t[89]=lt);let ut,dt;t[90]===Symbol.for(`react.memo_cache_sentinel`)?(ut=(0,H.jsx)(`li`,{children:(0,H.jsx)(i,{id:`tqQBwN`})}),dt=(0,H.jsx)(`li`,{children:(0,H.jsx)(i,{id:`QB-moX`})}),t[90]=ut,t[91]=dt):(ut=t[90],dt=t[91]);let ft;t[92]===lt?ft=t[93]:(ft=(0,H.jsxs)(`div`,{role:`note`,className:`space-y-3`,"data-testid":`skill-import-disclosure`,children:[ct,(0,H.jsxs)(`ul`,{className:`list-disc space-y-2.5 pl-4 text-sm text-muted-foreground marker:text-muted-foreground/50`,children:[lt,ut,dt]})]}),t[92]=lt,t[93]=ft);let pt;t[94]!==xe||t[95]!==Ae||t[96]!==ot||t[97]!==st||t[98]!==ft?(pt=(0,H.jsxs)(xe,{className:`flex flex-col gap-6`,children:[Ae,ot,st,ft]}),t[94]=xe,t[95]=Ae,t[96]=ot,t[97]=st,t[98]=ft,t[99]=pt):pt=t[99];let mt;t[100]===r?mt=t[101]:(mt=()=>r(!1),t[100]=r,t[101]=mt);let ht;t[102]===Symbol.for(`react.memo_cache_sentinel`)?(ht=(0,H.jsx)(i,{id:`dEgA5A`}),t[102]=ht):ht=t[102];let gt;t[103]!==P||t[104]!==mt?(gt=(0,H.jsx)(l,{variant:`outline`,className:`font-mono uppercase`,onMouseDown:q,onClick:mt,disabled:P,children:ht}),t[103]=P,t[104]=mt,t[105]=gt):gt=t[105];let _t=K?`skill-upload-button`:`skill-import-button`,vt;t[106]===be?vt=t[107]:(vt=()=>void be(),t[106]=be,t[107]=vt);let yt=!$,bt;t[108]!==P||t[109]!==K?(bt=P?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(ae,{"aria-hidden":`true`,className:`size-4`}),K?(0,H.jsx)(i,{id:`_eguJc`}):(0,H.jsx)(i,{id:`RqSvT0`})]}):K?(0,H.jsx)(i,{id:`ONWvwQ`}):(0,H.jsx)(i,{id:`l3s5ri`}),t[108]=P,t[109]=K,t[110]=bt):bt=t[110];let xt;t[111]!==_t||t[112]!==vt||t[113]!==yt||t[114]!==bt?(xt=(0,H.jsx)(l,{"data-testid":_t,onClick:vt,disabled:yt,children:bt}),t[111]=_t,t[112]=vt,t[113]=yt,t[114]=bt,t[115]=xt):xt=t[115];let St;t[116]!==gt||t[117]!==xt?(St=(0,H.jsxs)(m,{children:[gt,xt]}),t[116]=gt,t[117]=xt,t[118]=St):St=t[118];let Ct;return t[119]!==pt||t[120]!==St?(Ct=(0,H.jsxs)(H.Fragment,{children:[pt,St]}),t[119]=pt,t[120]=St,t[121]=Ct):Ct=t[121],Ct}function q(e){return e.preventDefault()}function J(e){return(0,H.jsx)(y,{value:e.name,children:e.name},e.name)}function Y(e){return{name:e,description:null}}function X(e){let t=(0,me.c)(21),{defaultScope:n,open:r,onOpenChange:a,defaultTab:o,onImported:s}=e,c=o===void 0?`skills-sh`:o,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,H.jsx)(d,{children:(0,H.jsx)(i,{id:`GBQjiV`})}),t[0]=l):l=t[0];let p;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,H.jsxs)(h,{children:[l,(0,H.jsx)(u,{className:`sr-only`,children:(0,H.jsx)(i,{id:`qTcVwj`})})]}),t[1]=p):p=t[1];let m;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,H.jsx)(w,{variant:`line`,value:`skills-sh`,children:(0,H.jsx)(i,{id:`8tjQCz`})}),t[2]=m):m=t[2];let _;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,H.jsxs)(re,{variant:`line`,className:`w-full justify-start gap-4 border-b p-0`,children:[m,(0,H.jsx)(w,{variant:`line`,value:`upload`,children:(0,H.jsx)(i,{id:`ONWvwQ`})})]}),t[3]=_):_=t[3];let v;t[4]===a?v=t[5]:(v=()=>a(!1),t[4]=a,t[5]=v);let y;t[6]!==n||t[7]!==v?(y=(0,H.jsx)(T,{value:`skills-sh`,className:`h-[62vh] min-h-0 flex-none`,children:(0,H.jsx)(U,{scope:n,onNavigate:v})}),t[6]=n,t[7]=v,t[8]=y):y=t[8];let b;t[9]!==n||t[10]!==s||t[11]!==a?(b=(0,H.jsx)(T,{value:`upload`,className:`mt-3 flex min-h-0 flex-1 flex-col gap-6`,children:(0,H.jsx)(K,{defaultScope:n,onOpenChange:a,onImported:s})}),t[9]=n,t[10]=s,t[11]=a,t[12]=b):b=t[12];let x;t[13]!==c||t[14]!==y||t[15]!==b?(x=(0,H.jsxs)(f,{className:`flex max-h-[85vh] flex-col gap-4 sm:max-w-4xl`,children:[p,(0,H.jsxs)(E,{defaultValue:c,className:`flex min-h-0 flex-1 flex-col gap-3`,children:[_,y,b]})]}),t[13]=c,t[14]=y,t[15]=b,t[16]=x):x=t[16];let S;return t[17]!==a||t[18]!==r||t[19]!==x?(S=(0,H.jsx)(g,{open:r,onOpenChange:a,children:x}),t[17]=a,t[18]=r,t[19]=x,t[20]=S):S=t[20],S}export{X as ImportSkillDialog};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-BUgB2tll.js";import{r as t}from"./dist-Nvb76hAm.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{d as r}from"./lint-config-client-qKPmO3Qw.js";import{i,r as a,t as o}from"./EditorModeToggle-BOtGsJ58.js";import{t as s}from"./markdownlint-rule-browser-BNoonKhJ.js";import{t as c}from"./useLintConfigViewMode-C11bTfbf.js";var l=n(),u=e();function d(e){return`/api/asset-text?path=${encodeURIComponent(e)}`}function f(e){let n=(0,l.c)(30),{assetPath:f}=e,{_:p}=t(),[m,h]=c(),{data:g}=r(),_=(g?.configFile??null)===f,v=!_||m===`source`,y;n[0]===f?y=n[1]:(y=f.split(`/`).pop()??f,n[0]=f,n[1]=y);let b=y,x;n[2]===b?x=n[3]:(x=b.includes(`.`)?(b.split(`.`).pop()??``).toLowerCase():``,n[2]=b,n[3]=x);let S=x,C;n[4]===f?C=n[5]:(C=(0,u.jsx)(a,{entry:{kind:`asset`,path:f},className:`shrink-0 border-b bg-background px-3 py-1.5`}),n[4]=f,n[5]=C);let w;n[6]===h?w=n[7]:(w=e=>h(e===`source`?`source`:`rules`),n[6]=h,n[7]=w);let T=!_,E;n[8]===p?E=n[9]:(E=p({id:`4EZrJN`}),n[8]=p,n[9]=E);let D;n[10]===p?D=n[11]:(D=p({id:`wdxz7K`}),n[10]=p,n[11]=D);let O;n[12]===p?O=n[13]:(O=p({id:`EeUucb`}),n[12]=p,n[13]=O);let k;n[14]!==v||n[15]!==w||n[16]!==T||n[17]!==E||n[18]!==D||n[19]!==O?(k=(0,u.jsx)(`div`,{className:`flex shrink-0 items-center justify-center border-b bg-background py-2`,children:(0,u.jsx)(o,{isSourceMode:v,onModeChange:w,wysiwygDisabled:T,wysiwygLabel:E,sourceLabel:D,wysiwygDisabledReason:O})}),n[14]=v,n[15]=w,n[16]=T,n[17]=E,n[18]=D,n[19]=O,n[20]=k):k=n[20];let A;n[21]!==f||n[22]!==S||n[23]!==b||n[24]!==v?(A=v?(0,u.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:(0,u.jsx)(i,{src:d(f),assetPath:f,fileName:b,extension:S},f)}):(0,u.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-4 py-4 sm:px-6`,children:(0,u.jsx)(`div`,{className:`mx-auto w-full max-w-3xl`,children:(0,u.jsx)(s,{hideConfigSourceNote:!0})})}),n[21]=f,n[22]=S,n[23]=b,n[24]=v,n[25]=A):A=n[25];let j;return n[26]!==A||n[27]!==C||n[28]!==k?(j=(0,u.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col bg-background`,"data-lint-config-editor":``,children:[C,k,A]}),n[26]=A,n[27]=C,n[28]=k,n[29]=j):j=n[29],j}export{f as LintConfigEditor};
1
+ import{t as e}from"./jsx-runtime-BUgB2tll.js";import{r as t}from"./dist-Nvb76hAm.js";import{t as n}from"./compiler-runtime-BfE3aGVn.js";import{d as r}from"./lint-config-client-Bpxmt15J.js";import{i,r as a,t as o}from"./EditorModeToggle-CJjixYVK.js";import{t as s}from"./markdownlint-rule-browser-B9wBZNA_.js";import{t as c}from"./useLintConfigViewMode-C11bTfbf.js";var l=n(),u=e();function d(e){return`/api/asset-text?path=${encodeURIComponent(e)}`}function f(e){let n=(0,l.c)(30),{assetPath:f}=e,{_:p}=t(),[m,h]=c(),{data:g}=r(),_=(g?.configFile??null)===f,v=!_||m===`source`,y;n[0]===f?y=n[1]:(y=f.split(`/`).pop()??f,n[0]=f,n[1]=y);let b=y,x;n[2]===b?x=n[3]:(x=b.includes(`.`)?(b.split(`.`).pop()??``).toLowerCase():``,n[2]=b,n[3]=x);let S=x,C;n[4]===f?C=n[5]:(C=(0,u.jsx)(a,{entry:{kind:`asset`,path:f},className:`shrink-0 border-b bg-background px-3 py-1.5`}),n[4]=f,n[5]=C);let w;n[6]===h?w=n[7]:(w=e=>h(e===`source`?`source`:`rules`),n[6]=h,n[7]=w);let T=!_,E;n[8]===p?E=n[9]:(E=p({id:`4EZrJN`}),n[8]=p,n[9]=E);let D;n[10]===p?D=n[11]:(D=p({id:`wdxz7K`}),n[10]=p,n[11]=D);let O;n[12]===p?O=n[13]:(O=p({id:`EeUucb`}),n[12]=p,n[13]=O);let k;n[14]!==v||n[15]!==w||n[16]!==T||n[17]!==E||n[18]!==D||n[19]!==O?(k=(0,u.jsx)(`div`,{className:`flex shrink-0 items-center justify-center border-b bg-background py-2`,children:(0,u.jsx)(o,{isSourceMode:v,onModeChange:w,wysiwygDisabled:T,wysiwygLabel:E,sourceLabel:D,wysiwygDisabledReason:O})}),n[14]=v,n[15]=w,n[16]=T,n[17]=E,n[18]=D,n[19]=O,n[20]=k):k=n[20];let A;n[21]!==f||n[22]!==S||n[23]!==b||n[24]!==v?(A=v?(0,u.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:(0,u.jsx)(i,{src:d(f),assetPath:f,fileName:b,extension:S},f)}):(0,u.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-4 py-4 sm:px-6`,children:(0,u.jsx)(`div`,{className:`mx-auto w-full max-w-3xl`,children:(0,u.jsx)(s,{hideConfigSourceNote:!0})})}),n[21]=f,n[22]=S,n[23]=b,n[24]=v,n[25]=A):A=n[25];let j;return n[26]!==A||n[27]!==C||n[28]!==k?(j=(0,u.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col bg-background`,"data-lint-config-editor":``,children:[C,k,A]}),n[26]=A,n[27]=C,n[28]=k,n[29]=j):j=n[29],j}export{f as LintConfigEditor};
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{$n as n,D as r,En as i,On as a,S as o,a as s,ar as c,cr as l,fr as u,it as d,ut as f,x as p}from"./DocumentContext-CGXxK5Nq.js";import{t as m}from"./react-f2sANaYj.js";import{n as h,r as g}from"./dist-Nvb76hAm.js";import{t as _}from"./compiler-runtime-BfE3aGVn.js";import{a as v,c as y,i as b,o as x,r as S}from"./local-menu-action-bus-CH7SBkE2.js";import{t as C}from"./utils-CPqDy6Hr.js";import{t as w}from"./button-CA0dewJJ.js";import{n as T,r as E,t as D}from"./collapsible-COrqeoHr.js";import{i as O,n as k,o as A,s as j,t as M}from"./select-D_Rn85CT.js";import{Ao as N,Ci as P,Co as F,Fi as I,Fo as L,Jt as R,Li as z,Mo as B,Si as V,So as H,Vo as ee,Y as U,fr as W,hn as G,jt as K,ti as q,wo as J,xo as Y,zo as X}from"./dist-Dih2A8fV.js";import{n as te}from"./dist-CMZSEMCN2.js";import{t as ne}from"./createLucideIcon-NewzmgDg.js";import{a as re,c as ie,d as ae,f as oe,h as se,i as ce,l as le,m as ue,n as de,o as fe,p as pe,r as me,s as he,t as ge,u as _e,v as ve}from"./PropertyDisplayRow-CgwKdqZo.js";import{t as ye}from"./chevron-right-DqiGllBX.js";import{o as be,r as xe}from"./folder-config-api-CRLsP3aa.js";import{h as Se,i as Ce}from"./comment-chips-DQFCvweV.js";import{t as we}from"./trash-2-WO7AZxJK.js";import{t as Te}from"./triangle-alert-BggXGlON.js";import{t as Ee}from"./x-TZrEJhql.js";import{S as De,f as Oe}from"./doc-paths-DqJ_A_s7.js";import{s as ke}from"./skill-scope-BmcRzXKj.js";import{t as Ae}from"./input-ugdhJ7_C.js";import{K as je,d as Me,v as Ne}from"./navigation-targets-942ElqU6.js";import{t as Pe}from"./badge-BG5JKjNK.js";import{y as Fe}from"./skills-api-DYLAW1HV.js";import{t as Ie}from"./use-skills-2obCzXwU.js";import{a as Le,l as Re,r as ze,t as Be}from"./selection-context-Cwyx7sxG.js";import{l as Ve}from"./lint-config-client-Bpxmt15J.js";import{_ as He,a as Ue,d as We,f as Ge,g as Ke,h as qe,i as Je,o as Ye,s as Xe,t as Ze,u as Qe}from"./sortable.esm-CDKWbJHf.js";import{t as $e}from"./textarea-DUUB26q7.js";import{t as et}from"./SkillCostValue-D_6C2Gog.js";var tt=ne(`folder-git-2`,[[`path`,{d:`M18 19a5 5 0 0 1-5-5v8`,key:`sz5oeg`}],[`path`,{d:`M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5`,key:`1w6njk`}],[`circle`,{cx:`13`,cy:`12`,r:`2`,key:`1j92g6`}],[`circle`,{cx:`20`,cy:`19`,r:`2`,key:`1obnsp`}]]),nt=ne(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),rt=ne(`image-plus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),it=ne(`message-square-plus`,[[`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`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]),Z=_(),Q=e(m(),1),$=t(),at=Object.defineProperty,ot=(e,t)=>{for(var n in t)at(e,n,{get:t[n],enumerable:!0})},st={};ot(st,{ActiveEmoji:()=>qn,Empty:()=>Kn,List:()=>Hn,Loading:()=>Wn,Root:()=>wn,Search:()=>Tn,SkinTone:()=>Jn,SkinToneSelector:()=>Un,Viewport:()=>Dn});var ct=`'Apple Color Emoji', 'Noto Color Emoji', 'Twemoji Mozilla', 'Android Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', EmojiSymbols, sans-serif`,lt=[`none`,`light`,`medium-light`,`medium`,`medium-dark`,`dark`];function ut(e){return e.charAt(0).toUpperCase()+e.slice(1)}var dt=2,ft=null;function pt(e){try{ft??=document.createElement(`canvas`).getContext(`2d`,{willReadFrequently:!0})}catch{}if(!ft||(queueMicrotask(()=>{ft&&=null}),ft.canvas.width=dt,ft.canvas.height=dt,ft.font=`2px ${ct}`,ft.textBaseline=`middle`,ft.measureText(e).width>=dt*2))return!1;ft.fillStyle=`#00f`,ft.fillText(e,0,0);let t=ft.getImageData(0,0,dt,dt).data;ft.clearRect(0,0,dt,dt),ft.fillStyle=`#f00`,ft.fillText(e,0,0);let n=ft.getImageData(0,0,dt,dt).data;for(let e=0;e<dt*dt*4;e+=4)if(t[e]!==n[e]||t[e+1]!==n[e+1]||t[e+2]!==n[e+2])return!1;return!0}function mt(e,t,n){try{let r=e.getItem(t);if(!r)throw Error(`No value found for "${t}".`);return n(JSON.parse(r))}catch{return null}}function ht(e,t,n){e.setItem(t,JSON.stringify(n))}function gt(e){return t=>t===void 0?void 0:e(t)}function _t(e){return t=>t===null?null:e(t)}function vt(e){if(typeof e!=`string`)throw Error();return e}function yt(e){if(typeof e!=`number`)throw Error();return e}function bt(e){if(typeof e!=`boolean`)throw Error();return e}function xt(e){return t=>{if(typeof t!=`object`||!t)throw Error();let n={};for(let r in e){let i=t[r];i===void 0&&e[r](void 0),n[r]=e[r](i)}return n}}function St(e){return t=>{if(!Array.isArray(t))throw Error();return t.length>0&&e(t[0]),t}}var Ct=(e,t)=>`${e}/${t}/data.json`,wt=(e,t)=>`${e}/${t}/messages.json`,Tt=`bn.da.de.en-gb.en.es-mx.es.et.fi.fr.hi.hu.it.ja.ko.lt.ms.nb.nl.pl.pt.ru.sv.th.uk.vi.zh-hant.zh`.split(`.`),Et=`en`,Dt=e=>`frimousse/data/${e}`,Ot=`frimousse/metadata`;async function kt(e,t){try{return(await fetch(e,{method:`HEAD`,signal:t})).headers.get(`etag`)}catch{return null}}async function At(e,t,n){let[{emojis:r,emojisEtag:i},{messages:a,messagesEtag:o}]=await Promise.all([fetch(Ct(e,t),{signal:n}).then(async e=>({emojis:await e.json(),emojisEtag:e.headers.get(`etag`)})),fetch(wt(e,t),{signal:n}).then(async e=>({messages:await e.json(),messagesEtag:e.headers.get(`etag`)}))]);return{emojis:r,messages:a,emojisEtag:i,messagesEtag:o}}async function jt(e,t,n){let[r,i]=await Promise.all([kt(Ct(e,t),n),kt(wt(e,t),n)]);return{emojisEtag:r,messagesEtag:i}}function Mt(e){return e.skins?e.skins.filter(e=>typeof e.tone==`number`).reduce((e,t)=>{let n=lt[t.tone];return e[n]=t.emoji,e},{}):void 0}async function Nt(e,t,n){let{emojis:r,emojisEtag:i,messages:a,messagesEtag:o}=await At(e,t,n),s=a.subgroups.find(e=>e.key===`country-flag`||e.key===`subdivision-flag`),c=a.groups.filter(e=>e.key!==`component`),l=r.filter(e=>`group`in e),u=c.map(e=>({index:e.order,label:ut(e.message)})),d=a.skinTones.reduce((e,t)=>(e[t.key]=ut(t.message),e),{}),f={locale:t,emojis:l.map(e=>({emoji:e.emoji,category:e.group,version:e.version,label:ut(e.label),tags:e.tags??[],countryFlag:s&&e.subgroup===s.order||void 0,skins:Mt(e)})),categories:u,skinTones:d};return ht(localStorage,Dt(t),{data:f,metadata:{emojisEtag:i,messagesEtag:o}}),f}function Pt(e,t){let n=new Map;for(let t of e)n.has(t.version)||n.set(t.version,t.emoji);let r=[...n.keys()].sort((e,t)=>t-e),i=r[0]??0,a=pt(`🇪🇺`);if(typeof t==`number`)return{emojiVersion:t,countryFlags:a};for(let e of r)if(pt(n.get(e)))return{emojiVersion:e,countryFlags:a};return{emojiVersion:i,countryFlags:a}}var Ft=xt({emojiVersion:yt,countryFlags:bt}),It=xt({data:xt({locale:vt,emojis:St(xt({emoji:vt,category:yt,label:vt,version:yt,tags:St(vt),countryFlag:gt(bt),skins:gt(xt({light:vt,"medium-light":vt,medium:vt,"medium-dark":vt,dark:vt}))})),categories:St(xt({index:yt,label:vt})),skinTones:xt({light:vt,"medium-light":vt,medium:vt,"medium-dark":vt,dark:vt})}),metadata:xt({emojisEtag:_t(vt),messagesEtag:_t(vt)})});async function Lt({locale:e,emojiVersion:t,emojibaseUrl:n,signal:r}){let i=typeof n==`string`?n:`https://cdn.jsdelivr.net/npm/emojibase-data@${typeof t==`number`?Math.floor(t):`latest`}`,a=mt(sessionStorage,Ot,Ft),o=mt(localStorage,Dt(e),It),s;if(!o)s=await Nt(i,e,r);else if(a)s=o.data;else try{let{emojisEtag:t,messagesEtag:n}=await jt(i,e,r);s=!t||!n||t!==o.metadata.emojisEtag||n!==o.metadata.messagesEtag?await Nt(i,e,r):o.data}catch{s=o.data}return a??=Pt(s.emojis,t),ht(sessionStorage,Ot,a),{locale:e,emojis:s.emojis.filter(e=>{let t=e.version<=a.emojiVersion;return e.countryFlag?t&&a.countryFlags:t}),categories:s.categories,skinTones:s.skinTones}}function Rt(e){return Tt.includes(e)?e:(console.warn(`Locale "${e}" is not supported, using "${Et}" instead.`),Et)}function zt(e){return lt.includes(e)?e:(console.warn(`Skin tone "${e}" is not valid, using "none" instead.`),`none`)}function Bt(e,t){let n=[];if(t<=0)return n;for(let r=0,i=e.length;r<i;r+=t)n.push(e.slice(r,r+t));return n}function Vt(e,t){if(!t)return e;let n=t.toLowerCase().trim(),r=new WeakMap;return e.filter(e=>{let t=0;e.label.toLowerCase().includes(n)&&(t+=10);for(let r of e.tags)r.toLowerCase().includes(n)&&(t+=1);return t>0?(r.set(e,t),!0):!1}).sort((e,t)=>(r.get(t)??0)-(r.get(e)??0))}function Ht(e,t,n,r){let i=Vt(e.emojis,r),a=[],o=[],s=[],c={},l=0,u=0;for(let e of i)c[e.category]||(c[e.category]=[]),c[e.category].push({emoji:n&&n!==`none`&&e.skins?e.skins[n]:e.emoji,label:e.label});for(let n of e.categories){let e=c[n.index];if(!e||e.length===0)continue;let r=Bt(Array.from(e),t).map(e=>({categoryIndex:l,emojis:e}));a.push(...r),o.push({label:n.label,rowsCount:r.length,startRowIndex:u}),s.push(u),l++,u+=r.length}return{count:i.length,categories:o,categoriesStartRowIndices:s,rows:a,skinTones:e.skinTones}}function Ut(e){let t={},n=null,r=null,i=new Set,a=()=>{if(n){t=n,n=null;for(let e of i)e(t)}r=null},o=()=>n??t,s=e=>{n??=t,Object.assign(n,typeof e==`function`?e(o()):e),r||=requestAnimationFrame(a)};return t=e(s,o),{get:o,set:s,subscribe:e=>(i.add(e),()=>i.delete(e))}}function Wt(e){let[t]=(0,Q.useState)(e);return t}function Gt(e){let t=(0,Q.createContext)(null);return{useStore:()=>{let n=(0,Q.useContext)(t);if(!n)throw Error(e);return n},Provider:({store:e,children:n})=>(0,$.jsx)(t.Provider,{value:e,children:n})}}function Kt(e,t,n=Object.is){let[r,i]=(0,Q.useState)(()=>t(e.get()));return(0,Q.useEffect)(()=>e.subscribe(()=>{let r=t(e.get());i(e=>n(e,r)?e:r)}),[e,t,n]),(0,Q.useDebugValue)(r),r}function qt(e,t,n){return Kt(e,(0,Q.useCallback)(e=>e[t],[t]),n)}var Jt=2;function Yt(e,t,n,r,i){let a=0;return Ut((o,s)=>({locale:t,columns:n,sticky:r,skinTone:i,onEmojiSelect:e,data:null,search:``,interaction:`none`,activeColumnIndex:0,activeRowIndex:0,rowHeight:null,categoryHeaderHeight:null,viewportWidth:null,viewportHeight:null,viewportCurrentCategoryIndex:null,viewportStartCategoryIndex:0,viewportStartRowIndex:0,viewportEndRowIndex:0,rootRef:null,searchRef:null,viewportRef:null,listRef:null,updateViewportState:e=>{let t=s(),n=e?.data??t.data,r=e?.categoryHeaderHeight??t.categoryHeaderHeight,i=e?.rowHeight??t.rowHeight,c=e?.viewportHeight??t.viewportHeight;if(!n||n.rows.length===0||!r||!i||!c)return o({...e,viewportStartCategoryIndex:0,viewportStartRowIndex:0,viewportEndRowIndex:0});let l=0,u=0;for(let e of n.categories)if(u++*r+e.startRowIndex*i<a)l+=r;else break;let d=n.categories.length*r+n.rows.length*i,f=Math.floor(Jt*i/2),p=Math.ceil(Jt*i/2),m=Math.min(a-l-f,d-c),h=m+c+p,g=Math.max(0,Math.floor(m/i)),_=Math.min(n.rows.length-1,Math.ceil(h/i)),v=n.rows[g]?.categoryIndex;return o(v===void 0&&e?e:{...e,viewportStartCategoryIndex:v,viewportStartRowIndex:g,viewportEndRowIndex:_})},onDataChange:e=>{s().updateViewportState({data:e,activeColumnIndex:0,activeRowIndex:0})},onSearchChange:e=>{o({search:e,interaction:e?`keyboard`:`none`})},onActiveEmojiChange:(e,t,n)=>{if(o({interaction:e,activeColumnIndex:t,activeRowIndex:n}),e!==`keyboard`)return;let{listRef:r,viewportRef:i,sticky:c,rowHeight:l,viewportHeight:u,categoryHeaderHeight:d}=s(),f=r?.current,p=i?.current;if(!f||!p||!l||!d||!u)return;let m=n;m===0&&p.scrollTo({top:0,behavior:`instant`});let h=f.querySelector(`[aria-rowindex="${m}"]`);if(!(h instanceof HTMLElement))return;let g=h.offsetTop,_=getComputedStyle(h),v=Number.parseFloat(_.scrollMarginTop),y=Number.parseFloat(_.scrollMarginBottom),b=a+v;c&&g<a+u/2&&(b+=d);let x=b+u-y;(g<b||g+l>x)&&p.scrollTo({top:Math.max(g<b+d?g-Math.max(c?d:0,v):g-u+l+y,0),behavior:`instant`})},onActiveEmojiReset:()=>{o({interaction:`none`,activeColumnIndex:0,activeRowIndex:0})},onRowHeightChange:e=>{s().updateViewportState({rowHeight:e})},onCategoryHeaderHeightChange:e=>{s().updateViewportState({categoryHeaderHeight:e})},onViewportSizeChange:(e,t)=>{s().updateViewportState({viewportWidth:e,viewportHeight:t})},onViewportScroll:e=>{a=e,s().updateViewportState()}}))}var{useStore:Xt,Provider:Zt}=Gt(`EmojiPicker.Root is missing.`);function Qt(e){return e.search}function $t(e){return e.interaction===`none`?void 0:e.data?.rows[e.activeRowIndex]?.emojis[e.activeColumnIndex]}function en(e){return e.data===void 0||typeof e.data?.count==`number`&&e.data.count===0}function tn(e){return e.data===null||e.viewportHeight===null||e.rowHeight===null||e.categoryHeaderHeight===null}function nn(e){return e.data?.rows.length}function rn(e){return e.data?.categories.length}function an(e){return e.data?.categoriesStartRowIndices}function on(e){return e.data?.skinTones}function sn(e,t){return e?.emoji===t?.emoji}function cn(e,t){return e?.categoryIndex!==t?.categoryIndex||e?.emojis.length!==t?.emojis.length?!1:!!e?.emojis.every((e,n)=>sn(e,t?.emojis[n]))}var ln=`‍`,un=/\p{Emoji_Modifier_Base}/u,dn=/\uFE0F$/,fn=/\u{1F3FB}|\u{1F3FC}|\u{1F3FD}|\u{1F3FE}|\u{1F3FF}/gu,pn={light:`🏻`,"medium-light":`🏼`,medium:`🏽`,"medium-dark":`🏾`,dark:`🏿`};function mn(e,t){if(!e.split(ln).some(e=>un.test(e)))return e;let n=e.split(ln).map(e=>e.replace(fn,``)).join(ln);return t===`none`?n:n.split(ln).map((e,n,r)=>{let i=r.length>1;return!un.test(e)||i&&e===`🤝`?e:e.replace(dn,``)+pn[t]}).join(ln)}function hn(e){return lt.map(t=>({skinTone:t,emoji:mn(e,t)}))}function gn(){return(0,Q.useDeferredValue)(Kt(Xt(),$t,sn))}function _n(e=`✋`){let t=Xt(),n=qt(t,`skinTone`),r=(0,Q.useMemo)(()=>hn(e),[e]);return[n,(0,Q.useCallback)(e=>{t.set({skinTone:e})},[]),r]}function vn(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||typeof t!=`object`||e===null||t===null||Array.isArray(e)!==Array.isArray(t))return!1;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length?n.every(n=>n in t&&e[n]===t[n]):!1}function yn(...e){}function bn(e,t){let n=null;if(typeof window.requestIdleCallback==`function`)n=window.requestIdleCallback(e,t);else{let r=Date.now();n=window.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,(t?.timeout??50)-(Date.now()-r))})},10)}return()=>{typeof window.cancelIdleCallback==`function`?window.cancelIdleCallback(n):window.clearTimeout(n)}}var xn=typeof window<`u`?Q.useLayoutEffect:Q.useEffect;function Sn(e){let t=(0,Q.useRef)(e);return xn(()=>{t.current=e}),(0,Q.useCallback)((...e)=>t.current(...e),[])}function Cn({emojiVersion:e,emojibaseUrl:t}){let[n,r]=(0,Q.useState)(void 0),i=Xt(),a=qt(i,`locale`),o=qt(i,`columns`),s=qt(i,`skinTone`),c=qt(i,`search`);return(0,Q.useEffect)(()=>{let n=new AbortController,i=n.signal;return Lt({locale:a,emojiVersion:e,emojibaseUrl:t,signal:i}).then(e=>{r(e)}).catch(e=>{i.aborted||console.error(e)}),()=>{n.abort()}},[e,t,a]),(0,Q.useEffect)(()=>{if(n)return bn(()=>{i.get().onDataChange(Ht(n,o,s,c))},{timeout:100})},[n,o,s,c]),null}var wn=(0,Q.forwardRef)(({locale:e=`en`,columns:t=9,skinTone:n=`none`,onEmojiSelect:r=yn,emojiVersion:i,emojibaseUrl:a,onFocusCapture:o,onBlurCapture:s,children:c,style:l,sticky:u=!0,...d},f)=>{let p=Sn(r),m=Wt(()=>Yt(p,Rt(e),t,u,zt(n))),[h,g]=(0,Q.useState)(!1),_=(0,Q.useRef)(null),v=(0,Q.useCallback)(e=>{e&&(_.current=e,m.set({rootRef:_}))},[]);xn(()=>{m.set({locale:Rt(e)})},[e]),xn(()=>{m.set({columns:t})},[t]),xn(()=>{m.set({sticky:u})},[u]),xn(()=>{m.set({skinTone:zt(n)})},[n]);let y=(0,Q.useCallback)(e=>{o?.(e);let{searchRef:t,viewportRef:n}=m.get(),r=e.target===t?.current||e.target.hasAttribute(`frimousse-search`),i=e.target===n?.current||e.target.hasAttribute(`frimousse-viewport`);e.isDefaultPrevented()||(g(r||i),e.isDefaultPrevented()||(g(r||i),i?m.get().onActiveEmojiChange(`keyboard`,0,0):r&&m.get().search===``&&m.set({interaction:`none`})))},[o]),b=(0,Q.useCallback)(e=>{s?.(e),!e.isDefaultPrevented()&&!e.currentTarget.contains(e.relatedTarget)&&g(!1)},[s]);return xn(()=>{h||m.get().onActiveEmojiReset()},[h]),(0,Q.useImperativeHandle)(f,()=>_.current),(0,Q.useEffect)(()=>{if(!h)return;function e(e){if(e.defaultPrevented||!e.key.startsWith(`Arrow`)&&e.key!==`Enter`)return;let{data:t,onEmojiSelect:n,onActiveEmojiChange:r,interaction:i,activeColumnIndex:a,activeRowIndex:o}=m.get();if(e.key===`Enter`){let t=$t(m.get());t&&(e.preventDefault(),n(t))}if(e.key.startsWith(`Arrow`)){let n=a,s=o;if(e.preventDefault(),i!==`none`){if(t?.rows&&t.rows.length>0)switch(e.key){case`ArrowLeft`:if(n===0){let e=s-1,r=t.rows[e];r&&(s=e,n=r.emojis.length-1)}else --n;break;case`ArrowRight`:if(n===t.rows[s].emojis.length-1){let e=s+1;t.rows[e]&&(s=e,n=0)}else n+=1;break;case`ArrowUp`:{let e=t.rows[s-1];e&&(--s,e.emojis[n]||(n=e.emojis.length-1));break}case`ArrowDown`:{let e=t.rows[s+1];e&&(s+=1,e.emojis[n]||(n=e.emojis.length-1));break}}r(`keyboard`,n,s)}else r(`keyboard`,0,0)}}return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[h]),xn(()=>{let e=null,t=null,n=null,r=null,i=m.subscribe(i=>{_.current&&(e!==i.viewportWidth&&(e=i.viewportWidth,_.current.style.setProperty(`--frimousse-viewport-width`,`${i.viewportWidth}px`)),t!==i.viewportHeight&&(t=i.viewportHeight,_.current.style.setProperty(`--frimousse-viewport-height`,`${i.viewportHeight}px`)),n!==i.rowHeight&&(n=i.rowHeight,_.current.style.setProperty(`--frimousse-row-height`,`${i.rowHeight}px`)),r!==i.categoryHeaderHeight&&(r=i.categoryHeaderHeight,_.current.style.setProperty(`--frimousse-category-header-height`,`${i.categoryHeaderHeight}px`)))}),{viewportWidth:a,viewportHeight:o,rowHeight:s,categoryHeaderHeight:c}=m.get();return a&&_.current.style.setProperty(`--frimousse-viewport-width`,`${a}px`),o&&_.current.style.setProperty(`--frimousse-viewport-height`,`${o}px`),s&&_.current.style.setProperty(`--frimousse-row-height`,`${s}px`),c&&_.current.style.setProperty(`--frimousse-category-header-height`,`${c}px`),i},[]),(0,$.jsx)(`div`,{"data-focused":h?``:void 0,"frimousse-root":``,onBlurCapture:b,onFocusCapture:y,...d,ref:v,style:{"--frimousse-emoji-font":ct,...l},children:(0,$.jsxs)(Zt,{store:m,children:[(0,$.jsx)(Cn,{emojiVersion:i,emojibaseUrl:a}),c]})})}),Tn=(0,Q.forwardRef)(({value:e,defaultValue:t,onChange:n,...r},i)=>{let a=Xt(),o=(0,Q.useRef)(null),s=(0,Q.useCallback)(e=>{e&&(o.current=e,a.set({searchRef:o}))},[]),c=typeof e==`string`,l=(0,Q.useRef)(c);(0,Q.useEffect)(()=>{l.current=c},[c]),xn(()=>{a.set({search:typeof e==`string`?e:typeof t==`string`?t:``})},[]),xn(()=>{typeof e==`string`&&a.get().onSearchChange(e)},[e]);let u=(0,Q.useCallback)(e=>{n?.(e),e.isDefaultPrevented()||a.get().onSearchChange(e.target.value)},[n]);return(0,Q.useImperativeHandle)(i,()=>o.current),(0,$.jsx)(`input`,{autoCapitalize:`off`,autoComplete:`off`,autoCorrect:`off`,enterKeyHint:`done`,"frimousse-search":``,placeholder:`Search…`,spellCheck:!1,type:`search`,...r,defaultValue:t,onChange:u,ref:s,value:e})}),En=(0,Q.memo)(()=>{let e=gn();return e?(0,$.jsx)(`div`,{"aria-live":`polite`,style:{border:0,clip:`rect(0, 0, 0, 0)`,height:1,margin:-1,overflow:`hidden`,padding:0,position:`absolute`,whiteSpace:`nowrap`,width:1,wordWrap:`normal`},children:e.label}):null}),Dn=(0,Q.forwardRef)(({children:e,onScroll:t,onKeyDown:n,style:r,...i},a)=>{let o=Xt(),s=(0,Q.useRef)(null),c=(0,Q.useCallback)(e=>{e&&(s.current=e,o.set({viewportRef:s}))},[]),l=Kt(o,nn),u=Kt(o,rn),d=(0,Q.useCallback)(e=>{t?.(e),o.get().onViewportScroll(e.currentTarget.scrollTop)},[t]);return xn(()=>{if(!s.current)return;let e=new ResizeObserver(([e])=>{let t=e?.borderBoxSize[0]?.inlineSize??0,n=e?.borderBoxSize[0]?.blockSize??0,{onViewportSizeChange:r,viewportHeight:i,viewportWidth:a}=o.get();(i!==n||a!==t)&&r(t,n)});return e.observe(s.current),o.get().onViewportSizeChange(s.current.offsetWidth,s.current.clientHeight),()=>{e.disconnect()}},[]),(0,Q.useImperativeHandle)(a,()=>s.current),(0,$.jsxs)(`div`,{"frimousse-viewport":``,...i,onScroll:d,ref:c,style:{position:`relative`,boxSizing:`border-box`,contain:`layout paint`,containIntrinsicSize:typeof l==`number`&&typeof u==`number`?`var(--frimousse-viewport-width, auto) calc(${l} * var(--frimousse-row-height) + ${u} * var(--frimousse-category-header-height))`:void 0,overflowY:`auto`,overscrollBehavior:`contain`,scrollbarGutter:`stable`,willChange:`scroll-position`,...r},children:[(0,$.jsx)(En,{}),e]})});function On(e,t,n){return{emoji:{...e,isActive:n},role:`gridcell`,"aria-colindex":t,"aria-selected":n||void 0,"aria-label":e.label,"data-active":n?``:void 0,"frimousse-emoji":``,style:{fontFamily:`var(--frimousse-emoji-font)`},tabIndex:-1}}function kn(e,t=!1){return{role:t?void 0:`row`,"aria-rowindex":t?void 0:e,"frimousse-row":``,style:{contain:t?void 0:`content`,height:t?void 0:`var(--frimousse-row-height)`,display:`flex`}}}function An(e,t){return{"frimousse-category":``,style:{contain:`content`,top:t?`calc(${e} * var(--frimousse-category-header-height) + ${t.startRowIndex} * var(--frimousse-row-height))`:void 0,height:t?`calc(var(--frimousse-category-header-height) + ${t.rowsCount} * var(--frimousse-row-height))`:void 0,width:`100%`,pointerEvents:`none`,position:`absolute`}}}function jn(e,t=!1,n=!0){return{category:e,"frimousse-category-header":``,style:{contain:t?void 0:`layout paint`,height:t?void 0:`var(--frimousse-category-header-height)`,pointerEvents:`auto`,position:n?`sticky`:void 0,top:0}}}function Mn(e,t,n,r){return{"frimousse-list-sizer":``,style:{position:`relative`,boxSizing:`border-box`,height:`calc(${e} * var(--frimousse-row-height) + ${t} * var(--frimousse-category-header-height))`,paddingTop:`calc(${n} * var(--frimousse-row-height) + ${r} * var(--frimousse-category-header-height))`}}}function Nn(e,t,n){return{"aria-colcount":e,"aria-rowcount":t,"frimousse-list":``,style:{"--frimousse-list-columns":e,...n},role:`grid`}}function Pn(e){e.preventDefault()}var Fn=(0,Q.memo)(({Emoji:e,emoji:t,columnIndex:n,rowIndex:r})=>{let i=Xt(),a=Kt(i,e=>$t(e)?.emoji===t.emoji),o=(0,Q.useCallback)(()=>{i.get().onEmojiSelect(t)},[t]),s=(0,Q.useCallback)(()=>{i.get().onActiveEmojiChange(`pointer`,n,r)},[n,r]),c=(0,Q.useCallback)(()=>{i.get().onActiveEmojiReset()},[]);return(0,$.jsx)(e,{...On(t,n,a),onClick:o,onPointerDown:Pn,onPointerEnter:s,onPointerLeave:c})}),In=(0,Q.memo)(({Row:e,Emoji:t,rowIndex:n})=>{let r=Kt(Xt(),e=>e.data?.rows[n],cn);return r?(0,$.jsx)(e,{...kn(n),children:r.emojis.map((e,r)=>(0,$.jsx)(Fn,{Emoji:t,columnIndex:r,emoji:e,rowIndex:n},e.label))}):null}),Ln=(0,Q.memo)(({CategoryHeader:e,categoryIndex:t})=>{let n=Xt(),r=Kt(n,e=>e.data?.categories[t],vn),i=qt(n,`sticky`);return r?(0,$.jsx)(`div`,{...An(t,r),children:(0,$.jsx)(e,{...jn({label:r.label},!1,i)})}):null}),Rn=(0,Q.memo)(({CategoryHeader:e,Row:t,Emoji:n})=>{let r=(0,Q.useRef)(null),i=Xt(),a=qt(i,`columns`),o=(0,Q.useMemo)(()=>Array(a).fill({emoji:`🙂`,label:``}),[a]),s=(0,Q.useMemo)(()=>({label:`Category`}),[]),c=(0,Q.useRef)(null),l=(0,Q.useRef)(null);return xn(()=>{let e=r.current?.parentElement?.parentElement;if(!e||!c.current||!l.current)return;let t=new ResizeObserver(e=>{for(let t of e){let e=t.contentRect.height,{onRowHeightChange:n,onCategoryHeaderHeightChange:r,rowHeight:a,categoryHeaderHeight:o}=i.get();t.target===c.current&&a!==e&&n(e),t.target===l.current&&o!==e&&r(e)}});t.observe(e),t.observe(c.current),t.observe(l.current);let{onRowHeightChange:n,onCategoryHeaderHeightChange:a}=i.get();return n(c.current.clientHeight),a(l.current.clientHeight),()=>{t.disconnect()}},[]),(0,$.jsxs)(`div`,{"aria-hidden":!0,ref:r,style:{height:0,visibility:`hidden`},children:[(0,$.jsx)(`div`,{"frimousse-row-sizer":``,ref:c,children:(0,$.jsx)(t,{...kn(-1,!0),children:o.map((e,t)=>(0,$.jsx)(n,{...On(e,t,!1)},t))})}),(0,$.jsx)(`div`,{...An(-1),children:(0,$.jsx)(`div`,{"frimousse-category-header-sizer":``,ref:l,children:(0,$.jsx)(e,{...jn(s,!0)})})})]})});function zn({category:e,...t}){return(0,$.jsx)(`div`,{...t,children:e.label})}function Bn({emoji:e,...t}){return(0,$.jsx)(`button`,{type:`button`,...t,children:e.emoji})}function Vn({...e}){return(0,$.jsx)(`div`,{...e})}var Hn=(0,Q.forwardRef)(({style:e,components:t,...n},r)=>{let i=Xt(),a=(0,Q.useRef)(null),o=(0,Q.useCallback)(e=>{e&&(a.current=e,i.set({listRef:a}))},[]),s=t?.CategoryHeader??zn,c=t?.Emoji??Bn,l=t?.Row??Vn,u=qt(i,`columns`),d=qt(i,`viewportStartRowIndex`),f=qt(i,`viewportEndRowIndex`),p=Kt(i,nn),m=Kt(i,an,vn),h=(0,Q.useMemo)(()=>m?.filter(e=>e<d).length??0,[m,d]),g=m?.length??0;return(0,Q.useImperativeHandle)(r,()=>a.current),!p||!m||g===0?(0,$.jsx)(`div`,{...Nn(u,0,e),...n,children:(0,$.jsx)(`div`,{...Mn(0,0,0,0),children:(0,$.jsx)(Rn,{CategoryHeader:s,Emoji:c,Row:l})})}):(0,$.jsx)(`div`,{...Nn(u,p,e),...n,ref:o,children:(0,$.jsxs)(`div`,{...Mn(p,g,d,h),children:[(0,$.jsx)(Rn,{CategoryHeader:s,Emoji:c,Row:l}),Array.from({length:f-d+1},(e,t)=>{let n=d+t;return(0,$.jsxs)(Q.Fragment,{children:[m.indexOf(n)>=0&&(0,$.jsx)(`div`,{style:{height:`var(--frimousse-category-header-height)`}}),(0,$.jsx)(In,{Emoji:c,Row:l,rowIndex:n})]},n)}),Array.from({length:g},(e,t)=>(0,$.jsx)(Ln,{CategoryHeader:s,categoryIndex:t},t))]})})}),Un=(0,Q.forwardRef)(({emoji:e,onClick:t,"aria-label":n=`Change skin tone`,...r},i)=>{let a=Kt(Xt(),on,vn),[o,s,c]=_n(e),l=(0,Q.useMemo)(()=>Math.max(0,c.findIndex(e=>e.skinTone===o)),[o,c]),u=c[l],d=c[(l+1)%c.length].skinTone,f=o===`none`?void 0:a?.[o],p=d===`none`?void 0:a?.[d],m=(0,Q.useCallback)(e=>{t?.(e),e.isDefaultPrevented()||s(d)},[t,s,d]);return(0,$.jsx)(`button`,{type:`button`,...r,"aria-label":n+(p?` (${p})`:``),"aria-live":`polite`,"aria-valuetext":f,"frimousse-skin-tone-selector":``,onClick:m,ref:i,children:u.emoji})});function Wn({children:e,...t}){return Kt(Xt(),tn)?(0,$.jsx)(`span`,{"frimousse-loading":``,...t,children:e}):null}function Gn({children:e}){return e({search:Kt(Xt(),Qt)})}function Kn({children:e,...t}){return Kt(Xt(),en)?(0,$.jsx)(`span`,{"frimousse-empty":``,...t,children:typeof e==`function`?(0,$.jsx)(Gn,{children:e}):e}):null}function qn({children:e}){return e({emoji:gn()})}function Jn({children:e,emoji:t}){let[n,r,i]=_n(t);return e({skinTone:n,setSkinTone:r,skinToneVariations:i})}wn.displayName=`EmojiPicker.Root`,Tn.displayName=`EmojiPicker.Search`,Dn.displayName=`EmojiPicker.Viewport`,Hn.displayName=`EmojiPicker.List`,Wn.displayName=`EmojiPicker.Loading`,Kn.displayName=`EmojiPicker.Empty`,Un.displayName=`EmojiPicker.SkinToneSelector`,qn.displayName=`EmojiPicker.ActiveEmoji`,Jn.displayName=`EmojiPicker.SkinTone`;var Yn={CategoryHeader:({category:e,...t})=>(0,$.jsx)(`div`,{...t,className:`bg-popover px-3 pt-3 pb-1.5 font-medium text-muted-foreground text-xs`,children:e.label}),Row:({children:e,...t})=>(0,$.jsx)(`div`,{...t,className:`scroll-my-1.5 px-1.5`,children:e}),Emoji:({emoji:e,...t})=>(0,$.jsx)(`button`,{type:`button`,...t,className:`flex size-8 items-center justify-center rounded-md text-lg data-[active]:bg-accent`,children:e.emoji})};function Xn(e){let t=(0,Z.c)(11),{onSelect:n}=e,{_:r}=g(),i;t[0]===n?i=t[1]:(i=e=>{let{emoji:t}=e;return n(t)},t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=r({id:`EarrCe`}),t[2]=r,t[3]=a);let o;t[4]===a?o=t[5]:(o=(0,$.jsx)(st.Search,{className:`z-10 mx-2 mt-2 rounded-md border bg-background px-2.5 py-2 text-sm outline-none focus-visible:ring-2 focus-visible:ring-ring`,placeholder:a,autoFocus:!0}),t[4]=a,t[5]=o);let s;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(st.Loading,{className:`absolute inset-0 flex items-center justify-center text-muted-foreground text-sm`,children:(0,$.jsx)(h,{id:`yQE2r9`})}),t[6]=s):s=t[6];let c;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsxs)(st.Viewport,{className:`relative flex-1 overscroll-contain outline-none`,children:[s,(0,$.jsx)(st.Empty,{className:`absolute inset-0 flex items-center justify-center text-muted-foreground text-sm`,children:(0,$.jsx)(h,{id:`z1uNN0`})}),(0,$.jsx)(st.List,{className:`select-none pb-1.5`,components:Yn})]}),t[7]=c):c=t[7];let l;return t[8]!==i||t[9]!==o?(l=(0,$.jsxs)(st.Root,{className:`isolate flex h-[326px] w-[320px] flex-col bg-popover text-popover-foreground`,onEmojiSelect:i,children:[o,c]}),t[8]=i,t[9]=o,t[10]=l):l=t[10],l}var Zn=300;function Qn(e,t){let n=(0,Z.c)(7),r;n[0]===t?r=n[1]:(r=t?.enabled?JSON.stringify(t):null,n[0]=t,n[1]=r);let i=r,a;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=[],n[2]=a):a=n[2];let[o,s]=(0,Q.useState)(a),c,l;return n[3]!==i||n[4]!==e?(c=()=>{if(!e||i===null){s($n);return}let t=JSON.parse(i),n=e.document.getText(`source`),r=null,a=!1,o=e.configuration.name,c=()=>void q(n.toString(),t,o).then(e=>{a||s(e)}).catch(e=>{a||console.warn(`[lint] lintDocument failed`,e)}),l=()=>{r&&clearTimeout(r),r=setTimeout(c,Zn)};return c(),n.observe(l),()=>{a=!0,r&&clearTimeout(r),n.unobserve(l)}},l=[e,i],n[3]=i,n[4]=e,n[5]=c,n[6]=l):(c=n[5],l=n[6]),(0,Q.useEffect)(c,l),o}function $n(e){return e.length===0?e:[]}function er(e,t){return t===``?!0:e.name.toLowerCase().includes(t.trim().toLowerCase())}var tr=-1;function nr(e){let t=(0,Z.c)(74),{rowId:n,value:r,suggestions:i,inputRef:a,autoFocus:o,error:s,errorId:c,onChange:l,onPick:u,onCommit:d,onCancel:f}=e,{_:p}=g(),m=`${(0,Q.useId)()}-fields`,_;t[0]!==o||t[1]!==i.length?(_=()=>o&&i.length>0,t[0]=o,t[1]=i.length,t[2]=_):_=t[2];let[y,x]=(0,Q.useState)(_),[C,w]=(0,Q.useState)(tr),T,E;if(t[3]!==i||t[4]!==r){let e;t[7]===r?e=t[8]:(e=e=>er(e,r),t[7]=r,t[8]=e),T=i.filter(e);let n;t[9]===r?n=t[10]:(n=e=>e.name===r.trim(),t[9]=r,t[10]=n),E=T.some(n),t[3]=i,t[4]=r,t[5]=T,t[6]=E}else T=t[5],E=t[6];let D=E,O=y&&T.length>0&&!D,[k,A]=(0,Q.useState)(r);r!==k&&(A(r),w(tr));let j=O&&C!==tr?T[Math.min(C,T.length-1)]:void 0,M;t[11]===u?M=t[12]:(M=function(e){u(e),x(!1)},t[11]=u,t[12]=M);let N=M,P;t[13]!==j||t[14]!==D||t[15]!==T||t[16]!==C||t[17]!==O||t[18]!==m||t[19]!==f||t[20]!==d||t[21]!==N?(P=function(e){if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(T.length===0||D)return;e.preventDefault();let t=e.key===`ArrowDown`?1:-1,n=t===1?0:T.length-1;if(!O){x(!0),w(n);return}let r=C===tr?n:(C+t+T.length)%T.length;w(r);let i=T[r];i&&document.getElementById(`${m}-${i.name}`)?.scrollIntoView?.({block:`nearest`});return}if(e.key===`Enter`){if(e.preventDefault(),j){N(j);return}x(!1),d();return}e.key===`Escape`&&(e.preventDefault(),O?x(!1):f())},t[13]=j,t[14]=D,t[15]=T,t[16]=C,t[17]=O,t[18]=m,t[19]=f,t[20]=d,t[21]=N,t[22]=P):P=t[22];let F=P,I;t[23]===p?I=t[24]:(I=p({id:`56xUL1`}),t[23]=p,t[24]=I);let L;t[25]===p?L=t[26]:(L=p({id:`CXj9C-`}),t[25]=p,t[26]=L);let R=s?!0:void 0,z=i.length>0?`combobox`:void 0,B=i.length>0?O:void 0,V=O?m:void 0,H=i.length>0?`list`:void 0,ee=j?`${m}-${j.name}`:void 0,U;t[27]!==l||t[28]!==i.length?(U=e=>{l(e.target.value),i.length>0&&x(!0)},t[27]=l,t[28]=i.length,t[29]=U):U=t[29];let W;t[30]===i.length?W=t[31]:(W=()=>{i.length>0&&x(!0)},t[30]=i.length,t[31]=W);let G;t[32]!==o||t[33]!==c||t[34]!==F||t[35]!==a||t[36]!==n||t[37]!==V||t[38]!==H||t[39]!==ee||t[40]!==U||t[41]!==W||t[42]!==I||t[43]!==L||t[44]!==R||t[45]!==z||t[46]!==B||t[47]!==r?(G=(0,$.jsx)(b,{asChild:!0,children:(0,$.jsx)(Ae,{ref:a,"data-testid":`add-property-name-input`,"data-key":n,type:`text`,value:r,autoFocus:o,placeholder:I,"aria-label":L,"aria-invalid":R,"aria-describedby":c,role:z,"aria-expanded":B,"aria-controls":V,"aria-autocomplete":H,"aria-activedescendant":ee,onChange:U,onFocus:W,onKeyDown:F,className:`h-7 w-32 border-transparent bg-transparent px-2 text-sm shadow-none placeholder:text-muted-foreground/60 focus-visible:border-transparent focus-visible:bg-muted focus-visible:ring-0 rounded-sm @max-[26rem]/prow:w-auto @max-[26rem]/prow:flex-1`})}),t[32]=o,t[33]=c,t[34]=F,t[35]=a,t[36]=n,t[37]=V,t[38]=H,t[39]=ee,t[40]=U,t[41]=W,t[42]=I,t[43]=L,t[44]=R,t[45]=z,t[46]=B,t[47]=r,t[48]=G):G=t[48];let K;t[49]===a?K=t[50]:(K=e=>{let t=e.detail.originalEvent.target;t instanceof Node&&a.current?.contains(t)&&e.preventDefault()},t[49]=a,t[50]=K);let q;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,$.jsx)(`div`,{"aria-hidden":!0,className:`px-2 py-1 text-[10px] font-medium text-muted-foreground uppercase tracking-wide`,children:(0,$.jsx)(h,{id:`bYUIzq`})}),t[51]=q):q=t[51];let J;t[52]===p?J=t[53]:(J=p({id:`bYUIzq`}),t[52]=p,t[53]=J);let Y;if(t[54]!==j?.name||t[55]!==T||t[56]!==m||t[57]!==N){let e;t[59]!==j?.name||t[60]!==m||t[61]!==N?(e=(e,t)=>{let n=le[e.type],r=e.name===j?.name;return(0,$.jsxs)(`div`,{id:`${m}-${e.name}`,role:`option`,"aria-selected":r,"data-testid":`add-property-field-suggestion`,"data-key":e.name,onMouseDown:t=>{t.preventDefault(),N(e)},onMouseEnter:()=>w(t),className:`flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm ${r?`bg-accent text-accent-foreground`:``}`,children:[(0,$.jsx)(n,{"aria-hidden":!0,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,$.jsx)(`span`,{className:`truncate`,children:e.name}),e.description?(0,$.jsx)(`span`,{className:`truncate text-[11px] text-muted-foreground`,children:e.description}):null]}),e.required?(0,$.jsx)(Pe,{variant:`gray`,className:`ms-auto shrink-0 text-2xs`,children:(0,$.jsx)(h,{id:`sW5OjU`})}):null]},e.name)},t[59]=j?.name,t[60]=m,t[61]=N,t[62]=e):e=t[62],Y=T.map(e),t[54]=j?.name,t[55]=T,t[56]=m,t[57]=N,t[58]=Y}else Y=t[58];let X;t[63]!==m||t[64]!==J||t[65]!==Y?(X=(0,$.jsx)(`div`,{id:m,role:`listbox`,"aria-label":J,children:Y}),t[63]=m,t[64]=J,t[65]=Y,t[66]=X):X=t[66];let te;t[67]!==K||t[68]!==X?(te=(0,$.jsxs)(v,{align:`start`,sideOffset:2,onOpenAutoFocus:ir,onCloseAutoFocus:rr,onInteractOutside:K,className:`w-64 max-h-64 overflow-y-auto p-1`,children:[q,X]}),t[67]=K,t[68]=X,t[69]=te):te=t[69];let ne;return t[70]!==O||t[71]!==G||t[72]!==te?(ne=(0,$.jsxs)(S,{open:O,onOpenChange:x,children:[G,te]}),t[70]=O,t[71]=G,t[72]=te,t[73]=ne):ne=t[73],ne}function rr(e){return e.preventDefault()}function ir(e){return e.preventDefault()}var ar=(0,Q.createContext)(null);function or(e){let t=(0,Z.c)(3),{binding:n,children:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,$.jsx)(ar,{value:n,children:r}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function sr(){return(0,Q.use)(ar)}function cr(e,t,n){if(e.code===`WRITE_ERROR`)return e.detail;let r=W(e);return r[t]?r[t]:e.issues[0]?.message??n}var lr=(0,Q.createContext)(null);function ur(e){let t=(0,Z.c)(3),{docName:n,children:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,$.jsx)(lr,{value:n,children:r}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}function dr(){return(0,Q.use)(lr)}var fr=/^(TEXTAREA|INPUT)$/;function pr(e){let t=document.activeElement;if(!(t instanceof HTMLElement)||!fr.test(t.tagName))return null;let n=e.closest(`[data-testid="property-row"]`);return n===null||!n.contains(t)?null:t}function mr(e){let t=pr(e);if(t===null)return null;let{selectionStart:n,selectionEnd:r}=t;if(n===null||r===null||n===r)return null;let i=t.value.slice(n,r).trim();return i===``?null:i}function hr(e){let t=(0,Z.c)(70),{propertyKey:r,propertyPath:i}=e,a;t[0]===i?a=t[1]:(a=i===void 0?[]:i,t[0]=i,t[1]=a);let o=a,{_:s}=g(),c=dr(),[l,u]=(0,Q.useState)(!1),[d,f]=(0,Q.useState)(``),[p,m]=(0,Q.useState)(null),_,y,b,C,T,E,D,O,k,A,j,M,N;if(t[2]!==s||t[3]!==c||t[4]!==d||t[5]!==l||t[6]!==r||t[7]!==o||t[8]!==p){E=Symbol.for(`react.early_return_sentinel`);bb0:{C=Ce(r,o);let e;if(t[22]!==c||t[23]!==d||t[24]!==r||t[25]!==o||t[26]!==p?(e=function(){let e=d.trim();e.length===0||c===null||(n({docName:c,propertyKey:r,propertyPath:[...o],quote:p??void 0,body:e}),f(``),u(!1))},t[22]=c,t[23]=d,t[24]=r,t[25]=o,t[26]=p,t[27]=e):e=t[27],T=e,c===null){E=null;break bb0}b=S,M=l,t[28]===Symbol.for(`react.memo_cache_sentinel`)?(N=e=>{u(e),e||(f(``),m(null))},t[28]=N):N=t[28],y=x,j=!0,_=w,D=`button`,O=`property-comment-button`,k=C,A=s({id:`CxVk-w`,values:{address:C}})}t[2]=s,t[3]=c,t[4]=d,t[5]=l,t[6]=r,t[7]=o,t[8]=p,t[9]=_,t[10]=y,t[11]=b,t[12]=C,t[13]=T,t[14]=E,t[15]=D,t[16]=O,t[17]=k,t[18]=A,t[19]=j,t[20]=M,t[21]=N}else _=t[9],y=t[10],b=t[11],C=t[12],T=t[13],E=t[14],D=t[15],O=t[16],k=t[17],A=t[18],j=t[19],M=t[20],N=t[21];if(E!==Symbol.for(`react.early_return_sentinel`))return E;let P;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(P=e=>m(mr(e.currentTarget)),t[29]=P):P=t[29];let F;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,$.jsx)(it,{className:`size-3.5`}),t[30]=F):F=t[30];let I;t[31]!==_||t[32]!==D||t[33]!==O||t[34]!==k||t[35]!==A?(I=(0,$.jsx)(_,{type:D,"data-testid":O,"data-key":k,"aria-label":A,onPointerDown:P,variant:`ghost`,size:`icon-sm`,className:`flex shrink-0 items-center justify-center rounded text-muted-foreground/0 hover:bg-muted hover:text-foreground focus-visible:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring group-hover:text-muted-foreground`,children:F}),t[31]=_,t[32]=D,t[33]=O,t[34]=k,t[35]=A,t[36]=I):I=t[36];let L;t[37]!==y||t[38]!==I||t[39]!==j?(L=(0,$.jsx)(y,{asChild:j,children:I}),t[37]=y,t[38]=I,t[39]=j,t[40]=L):L=t[40];let R;t[41]!==C||t[42]!==p?(R=p===null?(0,$.jsx)(`p`,{className:`truncate text-[11px] text-muted-foreground`,children:(0,$.jsx)(h,{id:`bwy8Y7`,values:{address:C},components:{0:(0,$.jsx)(`span`,{className:`font-mono`})}})}):(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,$.jsx)(`p`,{className:`truncate text-[11px] text-muted-foreground`,children:(0,$.jsx)(h,{id:`IgN3LY`,values:{address:C},components:{0:(0,$.jsx)(`span`,{className:`font-mono`})}})}),(0,$.jsx)(`p`,{className:`line-clamp-2 rounded border-l-2 border-muted-foreground/40 bg-muted/40 px-2 py-1 font-mono text-[11px] text-muted-foreground`,"data-testid":`property-comment-quote`,children:p})]}),t[41]=C,t[42]=p,t[43]=R):R=t[43];let z;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(z=e=>f(e.target.value),t[44]=z):z=t[44];let B;t[45]===T?B=t[46]:(B=e=>{if(e.key===`Escape`){u(!1);return}e.key!==`Enter`||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),T())},t[45]=T,t[46]=B);let V;t[47]===s?V=t[48]:(V=s({id:`vYOUOk`}),t[47]=s,t[48]=V);let H;t[49]!==d||t[50]!==B||t[51]!==V?(H=(0,$.jsx)($e,{autoFocus:!0,value:d,onChange:z,onKeyDown:B,placeholder:V,className:`min-h-16 resize-none text-sm`}),t[49]=d,t[50]=B,t[51]=V,t[52]=H):H=t[52];let ee;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,$.jsx)(w,{size:`sm`,variant:`ghost`,onClick:()=>u(!1),children:(0,$.jsx)(h,{id:`dEgA5A`})}),t[53]=ee):ee=t[53];let U;t[54]===d?U=t[55]:(U=d.trim(),t[54]=d,t[55]=U);let W=U.length===0,G;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,$.jsx)(h,{id:`hqVQbT`}),t[56]=G):G=t[56];let K;t[57]!==T||t[58]!==W?(K=(0,$.jsxs)(`div`,{className:`flex items-center justify-end gap-1.5`,children:[ee,(0,$.jsx)(w,{size:`sm`,onClick:T,disabled:W,children:G})]}),t[57]=T,t[58]=W,t[59]=K):K=t[59];let q;t[60]!==R||t[61]!==H||t[62]!==K?(q=(0,$.jsxs)(v,{align:`end`,className:`flex w-80 flex-col gap-2 p-3`,children:[R,H,K]}),t[60]=R,t[61]=H,t[62]=K,t[63]=q):q=t[63];let J;return t[64]!==b||t[65]!==L||t[66]!==q||t[67]!==M||t[68]!==N?(J=(0,$.jsxs)(b,{open:M,onOpenChange:N,children:[L,q]}),t[64]=b,t[65]=L,t[66]=q,t[67]=M,t[68]=N,t[69]=J):J=t[69],J}function gr(e){let t=(0,Z.c)(75),{keyName:n,value:r,path:i,depth:a}=e,o=a===void 0?0:a,{_:s}=g(),c=sr(),[l,u]=(0,Q.useState)(o===0),[d,f]=(0,Q.useState)(null),[p,m]=(0,Q.useState)(null),_;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(_={},t[0]=_):_=t[0];let[v,b]=(0,Q.useState)(_),x;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(x={},t[1]=x):x=t[1];let[S,C]=(0,Q.useState)(x),O=Object.entries(r),k;t[2]!==s||t[3]!==n||t[4]!==l?(k=s(l?{id:`J3HzPL`,values:{keyName:n}}:{id:`yUxR-Q`,values:{keyName:n}}),t[2]=s,t[3]=n,t[4]=l,t[5]=k):k=t[5];let A=k,j=c===null,M;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(M=function(e){b(t=>{if(!Object.hasOwn(t,e))return t;let n={...t};return delete n[e],n})},t[6]=M):M=t[6];let N=M,P;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(P=function(e,t){b(n=>({...n,[e]:t})),C(t=>({...t,[e]:(t[e]??0)+1}))},t[7]=P):P=t[7];let F=P,I;t[8]===i?I=t[9]:(I=function(e){return[...i,e]},t[8]=i,t[9]=I);let L=I,R=function(e,t){if(!c)return;N(e);let n=c.patchPath(L(e),t);n.ok||F(e,cr(n.error,e,s({id:`4g19V6`})))},z=function(e){if(!c)return;N(e);let t=c.deletePath(L(e));t.ok||F(e,cr(t.error,e,s({id:`gbHcbI`})))},B=function(e,t){if(!c)return;let n=r[e];if(n===void 0)return;let i=oe(n,t);Y(n,i)||R(e,i)},V=function(e){f({key:e,draft:e,error:null})},ee=function(e){f(t=>t&&{...t,draft:e,error:null})},U=function(){f(null)},W=function(){if(!d||!c)return;let e=d.draft.trim();if(!e){f(null);return}if(e===d.key){f(null);return}if(Object.hasOwn(r,e)){f({...d,error:s({id:`njU86j`,values:{trimmed:e}})});return}let t=c.renamePath(L(d.key),e);if(t.ok){N(d.key),f(null);return}let n=cr(t.error,e,s({id:`2ryd91`}));f({...d,error:n})},G;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(G=function(){m({name:``,type:`text`,value:``,error:null})},t[10]=G):G=t[10];let K=G,q;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(q=function(e){m(t=>t&&{...t,name:e,error:null})},t[11]=q):q=t[11];let J=q,X;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(X=function(e){m(t=>{if(!t)return t;let n=e===`date`?new Date().toISOString().slice(0,10):re[e];return{...t,type:e,value:n,error:null}})},t[12]=X):X=t[12];let te=X,ne;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(ne=function(e){m(t=>t&&{...t,value:e})},t[13]=ne):ne=t[13];let ie=ne,ae;t[14]!==s||t[15]!==p||t[16]!==c||t[17]!==i||t[18]!==L||t[19]!==r?(ae=function(){if(!p||!c)return;let e=p.name.trim();if(!e){m({...p,error:s({id:`8_brI5`})});return}if(e===`frontmatter`&&i.length===0){m({...p,error:s({id:`dURmlQ`})});return}if(Object.hasOwn(r,e)){m({...p,error:s({id:`njU86j`,values:{trimmed:e}})});return}let t=c.patchPath(L(e),p.value);if(t.ok){m(null);return}let n=cr(t.error,e,s({id:`OJeiSH`}));m({...p,error:n})},t[14]=s,t[15]=p,t[16]=c,t[17]=i,t[18]=L,t[19]=r,t[20]=ae):ae=t[20];let se=ae,ce;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(ce=function(){m(null)},t[21]=ce):ce=t[21];let le=ce,ue;t[22]===i?ue=t[23]:(ue=function(e,t){return`${i.join(`.`)}::${e}::${t}`},t[22]=i,t[23]=ue);let de=ue,fe=function(e){if(!c)return;let t=String(e.active.id),n=e.over?String(e.over.id):null;if(!n||t===n)return;let r=O.map(_r),a=r.map((e,t)=>de(e,t)),o=a.indexOf(t),l=a.indexOf(n);if(o<0||l<0)return;let u=r.slice(),[d]=u.splice(o,1);if(!d)return;u.splice(l,0,d);let f=c.reorderPath(i,u);if(f.ok){N(d);return}F(d,cr(f.error,d,s({id:`eKThTQ`})))},pe;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(pe={activationConstraint:{distance:4}},t[24]=pe):pe=t[24];let me;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(me={coordinateGetter:Je},t[25]=me):me=t[25];let he=Ke(qe(We,pe),qe(Qe,me)),ge=new Map;for(let[e]of O)ge.set(e,(ge.get(e)??0)+1);let _e=j||void 0,ve=D,be=l?`true`:`false`,xe;t[26]===l?xe=t[27]:(xe=(0,$.jsx)(ye,{"data-expanded":l,"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground transition-transform duration-150 ease-out data-[expanded=true]:rotate-90`}),t[26]=l,t[27]=xe);let Se=O.length===0?(0,$.jsx)(h,{id:`QOINDn`}):(0,$.jsx)(h,{id:`s0J_k9`,values:{0:O.length}}),Ce;t[28]===Se?Ce=t[29]:(Ce=(0,$.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:Se}),t[28]=Se,t[29]=Ce);let we;t[30]!==n||t[31]!==be||t[32]!==xe||t[33]!==Ce||t[34]!==A?(we=(0,$.jsx)(E,{asChild:!0,children:(0,$.jsxs)(w,{type:`button`,variant:`ghost`,size:`sm`,"data-testid":`object-widget-trigger`,"data-key":n,"data-state-open":be,"aria-label":A,className:`h-7 w-full justify-start gap-1 px-2 font-normal hover:bg-muted`,children:[xe,Ce]})}),t[30]=n,t[31]=be,t[32]=xe,t[33]=Ce,t[34]=A,t[35]=we):we=t[35];let Te=T,Ee=Xe,De=Ge,Oe=Ze,ke=O.map((e,t)=>{let[n]=e;return de(n,t)}),Ae=Ye,je=O.map((e,t)=>{let[n,r]=e,i=H(r),a=d?.key===n?d:null,o=(ge.get(n)??0)>1,s=L(n);return(0,$.jsx)(kr,{sortableId:j?void 0:de(n,t),keyName:n,value:r,declared:i,error:v[n]??null,resetCounter:S[n]??0,isDuplicate:o,path:s,rename:j?void 0:{state:a,onBegin:()=>V(n),onChangeDraft:ee,onCommit:W,onCancel:U},onCommit:e=>R(n,e),onChangeType:e=>B(n,e),onRemove:j?void 0:()=>z(n),actionSlot:(0,$.jsx)(hr,{propertyKey:String(s[0]),propertyPath:s.slice(1)})},`${n}-${t}`)}),Me;t[36]!==Oe||t[37]!==ke||t[38]!==Ae||t[39]!==je?(Me=(0,$.jsx)(Oe,{items:ke,strategy:Ae,children:je}),t[36]=Oe,t[37]=ke,t[38]=Ae,t[39]=je,t[40]=Me):Me=t[40];let Ne;t[41]!==Ee||t[42]!==fe||t[43]!==he||t[44]!==De||t[45]!==Me?(Ne=(0,$.jsx)(Ee,{sensors:he,collisionDetection:De,onDragEnd:fe,children:Me}),t[41]=Ee,t[42]=fe,t[43]=he,t[44]=De,t[45]=Me,t[46]=Ne):Ne=t[46];let Pe;t[47]!==s||t[48]!==p||t[49]!==K||t[50]!==le||t[51]!==J||t[52]!==te||t[53]!==ie||t[54]!==se||t[55]!==n||t[56]!==j?(Pe=j?null:p?(0,$.jsx)(Ir,{draft:p,onChangeName:J,onChangeType:te,onChangeValue:ie,onCommit:se,onCancel:le}):(0,$.jsxs)(`div`,{className:`mt-1 flex items-center gap-1`,children:[(0,$.jsx)(`span`,{"aria-hidden":!0,className:`h-7 w-4 shrink-0`}),(0,$.jsxs)(w,{type:`button`,variant:`ghost`,size:`sm`,"data-testid":`object-widget-add-trigger`,"data-key":n,onClick:K,"aria-label":s({id:`CmeH9S`,values:{keyName:n}}),className:`flex items-center gap-1.5 rounded px-2 py-1 text-xs font-medium hover:bg-muted/50 hover:text-foreground`,children:[(0,$.jsx)(y,{className:`size-3.5`}),(0,$.jsx)(`span`,{children:(0,$.jsx)(h,{id:`m16xKo`})})]})]}),t[47]=s,t[48]=p,t[49]=K,t[50]=le,t[51]=J,t[52]=te,t[53]=ie,t[54]=se,t[55]=n,t[56]=j,t[57]=Pe):Pe=t[57];let Fe;t[58]!==n||t[59]!==Ne||t[60]!==Pe?(Fe=(0,$.jsxs)(`div`,{"data-testid":`object-widget-children`,"data-key":n,className:`mt-0.5 ml-2 border-l border-border/60 pl-2`,children:[Ne,Pe]}),t[58]=n,t[59]=Ne,t[60]=Pe,t[61]=Fe):Fe=t[61];let Ie;t[62]!==Te||t[63]!==Fe?(Ie=(0,$.jsx)(Te,{className:`overflow-hidden data-[state=open]:animate-[collapsible-down_150ms_ease-out] data-[state=closed]:animate-[collapsible-up_150ms_ease-in]`,children:Fe}),t[62]=Te,t[63]=Fe,t[64]=Ie):Ie=t[64];let Le;t[65]!==ve||t[66]!==l||t[67]!==we||t[68]!==Ie?(Le=(0,$.jsxs)(ve,{open:l,onOpenChange:u,children:[we,Ie]}),t[65]=ve,t[66]=l,t[67]=we,t[68]=Ie,t[69]=Le):Le=t[69];let Re;return t[70]!==o||t[71]!==n||t[72]!==_e||t[73]!==Le?(Re=(0,$.jsx)(`div`,{"data-testid":`object-widget`,"data-key":n,"data-depth":o,"data-read-only":_e,className:`w-full min-w-0`,children:Le}),t[70]=o,t[71]=n,t[72]=_e,t[73]=Le,t[74]=Re):Re=t[74],Re}function _r(e){let[t]=e;return t}function vr(e){let t=(0,Z.c)(86),{keyName:n,value:r,path:i,depth:a}=e,o=a===void 0?0:a,{_:s}=g(),c=sr(),[l,u]=(0,Q.useState)(o===0),d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d={},t[0]=d):d=t[0];let[f,p]=(0,Q.useState)(d),[m,_]=(0,Q.useState)(null),v;t[1]!==s||t[2]!==n||t[3]!==l?(v=s(l?{id:`J3HzPL`,values:{keyName:n}}:{id:`yUxR-Q`,values:{keyName:n}}),t[1]=s,t[2]=n,t[3]=l,t[4]=v):v=t[4];let b=v,x=c===null,S;t[5]===i?S=t[6]:(S=function(e){return[...i,e]},t[5]=i,t[6]=S);let C=S,O;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(O=function(e){p(t=>{if(!Object.hasOwn(t,e))return t;let n={...t};return delete n[e],n})},t[7]=O):O=t[7];let k=O,A;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(A=function(e,t){p(n=>({...n,[e]:t}))},t[8]=A):A=t[8];let j=A,M;t[9]!==s||t[10]!==c||t[11]!==i||t[12]!==C||t[13]!==r.length?(M=function(e){if(!c)return;k(e);let t=r.length<=1?c.deletePath(i):c.deletePath(C(e));if(t.ok){p({});return}j(e,cr(t.error,String(e),s({id:`OdmsFg`})))},t[9]=s,t[10]=c,t[11]=i,t[12]=C,t[13]=r.length,t[14]=M):M=t[14];let N=M,P;t[15]!==s||t[16]!==c||t[17]!==C||t[18]!==r.length?(P=function(){if(!c)return;_(null);let e=c.patchPath(C(r.length),{});e.ok||_(cr(e.error,String(r.length),s({id:`ztKII6`})))},t[15]=s,t[16]=c,t[17]=C,t[18]=r.length,t[19]=P):P=t[19];let F=P,I;t[20]===i?I=t[21]:(I=function(e){return`${i.join(`.`)}::item::${e}`},t[20]=i,t[21]=I);let L=I,R;t[22]!==s||t[23]!==c||t[24]!==i||t[25]!==L||t[26]!==r?(R=function(e){if(!c)return;let t=String(e.active.id),n=e.over?String(e.over.id):null;if(!n||t===n)return;let a=r.map((e,t)=>L(t)),o=a.indexOf(t),l=a.indexOf(n);if(o<0||l<0)return;let u=r.map(yr),[d]=u.splice(o,1);if(d===void 0)return;u.splice(l,0,d);let f=c.reorderSeqPath(i,u);if(f.ok){p({});return}j(o,cr(f.error,String(o),s({id:`eKThTQ`})))},t[22]=s,t[23]=c,t[24]=i,t[25]=L,t[26]=r,t[27]=R):R=t[27];let z=R,B;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(B={activationConstraint:{distance:4}},t[28]=B):B=t[28];let V;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(V={coordinateGetter:Je},t[29]=V):V=t[29];let H=Ke(qe(We,B),qe(Qe,V)),ee=x||void 0,U=l?`true`:`false`,W;t[30]===l?W=t[31]:(W=(0,$.jsx)(ye,{"data-expanded":l,"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground transition-transform duration-150 ease-out data-[expanded=true]:rotate-90`}),t[30]=l,t[31]=W);let G;t[32]===r.length?G=t[33]:(G=(0,$.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:r.length===0?(0,$.jsx)(h,{id:`QOINDn`}):(0,$.jsx)(h,{id:`6ki7F2`,values:{0:r.length}})}),t[32]=r.length,t[33]=G);let K;t[34]!==n||t[35]!==U||t[36]!==W||t[37]!==G||t[38]!==b?(K=(0,$.jsx)(E,{asChild:!0,children:(0,$.jsxs)(w,{type:`button`,variant:`ghost`,size:`sm`,"data-testid":`array-of-objects-widget-trigger`,"data-key":n,"data-state-open":U,"aria-label":b,className:`h-7 w-full justify-start gap-1 px-2 font-normal hover:bg-muted`,children:[W,G]})}),t[34]=n,t[35]=U,t[36]=W,t[37]=G,t[38]=b,t[39]=K):K=t[39];let q;if(t[40]!==L||t[41]!==r){let e;t[43]===L?e=t[44]:(e=(e,t)=>L(t),t[43]=L,t[44]=e),q=r.map(e),t[40]=L,t[41]=r,t[42]=q}else q=t[42];let J;if(t[45]!==f||t[46]!==n||t[47]!==C||t[48]!==x||t[49]!==N||t[50]!==L||t[51]!==r){let e;t[53]!==f||t[54]!==n||t[55]!==C||t[56]!==x||t[57]!==N||t[58]!==L?(e=(e,t)=>(0,$.jsx)(br,{sortableId:x?void 0:L(t),arrayKey:n,index:t,value:e,path:C(t),error:f[t]??null,onRemove:x?void 0:()=>N(t)},t),t[53]=f,t[54]=n,t[55]=C,t[56]=x,t[57]=N,t[58]=L,t[59]=e):e=t[59],J=r.map(e),t[45]=f,t[46]=n,t[47]=C,t[48]=x,t[49]=N,t[50]=L,t[51]=r,t[52]=J}else J=t[52];let Y;t[60]!==q||t[61]!==J?(Y=(0,$.jsx)(Ze,{items:q,strategy:Ye,children:J}),t[60]=q,t[61]=J,t[62]=Y):Y=t[62];let X;t[63]!==z||t[64]!==H||t[65]!==Y?(X=(0,$.jsx)(Xe,{sensors:H,collisionDetection:Ge,onDragEnd:z,children:Y}),t[63]=z,t[64]=H,t[65]=Y,t[66]=X):X=t[66];let te;t[67]!==s||t[68]!==m||t[69]!==F||t[70]!==n||t[71]!==x?(te=x?null:(0,$.jsxs)(`div`,{className:`mt-1 flex items-center gap-1`,children:[(0,$.jsx)(`span`,{"aria-hidden":!0,className:`h-7 w-4 shrink-0`}),(0,$.jsxs)(w,{type:`button`,variant:`ghost`,size:`sm`,"data-testid":`array-of-objects-widget-add-trigger`,"data-key":n,onClick:F,"aria-label":s({id:`cEoyWz`,values:{keyName:n}}),className:`flex items-center gap-1.5 rounded px-2 py-1 text-xs font-medium hover:bg-muted/50 hover:text-foreground`,children:[(0,$.jsx)(y,{className:`size-3.5`}),(0,$.jsx)(`span`,{children:(0,$.jsx)(h,{id:`NQ8llq`})})]}),m?(0,$.jsx)(`span`,{role:`alert`,"data-testid":`array-of-objects-add-error`,"data-key":n,className:`text-[10px] text-destructive`,children:m}):null]}),t[67]=s,t[68]=m,t[69]=F,t[70]=n,t[71]=x,t[72]=te):te=t[72];let ne;t[73]!==n||t[74]!==X||t[75]!==te?(ne=(0,$.jsx)(T,{className:`overflow-hidden data-[state=open]:animate-[collapsible-down_150ms_ease-out] data-[state=closed]:animate-[collapsible-up_150ms_ease-in]`,children:(0,$.jsxs)(`div`,{"data-testid":`array-of-objects-widget-children`,"data-key":n,className:`mt-0.5 ml-2 border-l border-border/60 pl-2`,children:[X,te]})}),t[73]=n,t[74]=X,t[75]=te,t[76]=ne):ne=t[76];let re;t[77]!==l||t[78]!==K||t[79]!==ne?(re=(0,$.jsxs)(D,{open:l,onOpenChange:u,children:[K,ne]}),t[77]=l,t[78]=K,t[79]=ne,t[80]=re):re=t[80];let ie;return t[81]!==o||t[82]!==n||t[83]!==ee||t[84]!==re?(ie=(0,$.jsx)(`div`,{"data-testid":`array-of-objects-widget`,"data-key":n,"data-depth":o,"data-read-only":ee,className:`w-full min-w-0`,children:re}),t[81]=o,t[82]=n,t[83]=ee,t[84]=re,t[85]=ie):ie=t[85],ie}function yr(e,t){return t}function br(e){let t=(0,Z.c)(15),{sortableId:n,arrayKey:r,index:i,value:a,path:o,error:s,onRemove:c}=e;if(n){let e;return t[0]!==r||t[1]!==s||t[2]!==i||t[3]!==c||t[4]!==o||t[5]!==n||t[6]!==a?(e=(0,$.jsx)(xr,{sortableId:n,arrayKey:r,index:i,value:a,path:o,error:s,onRemove:c}),t[0]=r,t[1]=s,t[2]=i,t[3]=c,t[4]=o,t[5]=n,t[6]=a,t[7]=e):e=t[7],e}let l;return t[8]!==r||t[9]!==s||t[10]!==i||t[11]!==c||t[12]!==o||t[13]!==a?(l=(0,$.jsx)(Sr,{arrayKey:r,index:i,value:a,path:o,error:s,onRemove:c}),t[8]=r,t[9]=s,t[10]=i,t[11]=c,t[12]=o,t[13]=a,t[14]=l):l=t[14],l}function xr(e){let t=(0,Z.c)(35),{sortableId:n,arrayKey:r,index:i,value:a,path:o,error:s,onRemove:c}=e,{_:l}=g(),u;t[0]===n?u=t[1]:(u={id:n},t[0]=n,t[1]=u);let{attributes:d,listeners:f,setNodeRef:p,transform:m,transition:h,isDragging:_}=Ue(u),v;t[2]===m?v=t[3]:(v=He.Transform.toString(m),t[2]=m,t[3]=v);let y=_?.5:void 0,b=_?1:void 0,x;t[4]!==v||t[5]!==y||t[6]!==b||t[7]!==h?(x={transform:v,transition:h,opacity:y,zIndex:b},t[4]=v,t[5]=y,t[6]=b,t[7]=h,t[8]=x):x=t[8];let S=x,C=i+1,T;t[9]!==l||t[10]!==C?(T=l({id:`OLIKgw`,values:{0:C}}),t[9]=l,t[10]=C,t[11]=T):T=t[11];let E;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(be,{className:`size-3.5`}),t[12]=E):E=t[12];let D;t[13]!==r||t[14]!==d||t[15]!==i||t[16]!==f||t[17]!==T?(D=(0,$.jsx)(w,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-testid":`array-item-drag-handle`,"data-key":r,"data-index":i,"aria-label":T,...d,...f,className:`h-7 w-4 shrink-0 cursor-grab touch-none px-0 text-muted-foreground/0 hover:text-foreground focus-visible:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring active:cursor-grabbing group-hover:text-muted-foreground/60`,children:E}),t[13]=r,t[14]=d,t[15]=i,t[16]=f,t[17]=T,t[18]=D):D=t[18];let O=D,k=_||void 0,A=s??void 0,j;t[19]!==r||t[20]!==O||t[21]!==s||t[22]!==i||t[23]!==c||t[24]!==o||t[25]!==a?(j=(0,$.jsx)(Cr,{dragHandle:O,arrayKey:r,index:i,value:a,path:o,error:s,onRemove:c}),t[19]=r,t[20]=O,t[21]=s,t[22]=i,t[23]=c,t[24]=o,t[25]=a,t[26]=j):j=t[26];let M;return t[27]!==r||t[28]!==i||t[29]!==p||t[30]!==S||t[31]!==k||t[32]!==A||t[33]!==j?(M=(0,$.jsx)(`div`,{ref:p,style:S,className:`group mt-1 rounded border border-border/40 p-1`,"data-testid":`array-item`,"data-key":r,"data-index":i,"data-dragging":k,"data-error":A,children:j}),t[27]=r,t[28]=i,t[29]=p,t[30]=S,t[31]=k,t[32]=A,t[33]=j,t[34]=M):M=t[34],M}function Sr(e){let t=(0,Z.c)(12),{arrayKey:n,index:r,value:i,path:a,error:o,onRemove:s}=e,c=o??void 0,l;t[0]!==n||t[1]!==o||t[2]!==r||t[3]!==s||t[4]!==a||t[5]!==i?(l=(0,$.jsx)(Cr,{dragHandle:null,arrayKey:n,index:r,value:i,path:a,error:o,onRemove:s}),t[0]=n,t[1]=o,t[2]=r,t[3]=s,t[4]=a,t[5]=i,t[6]=l):l=t[6];let u;return t[7]!==n||t[8]!==r||t[9]!==c||t[10]!==l?(u=(0,$.jsx)(`div`,{className:`group mt-1 rounded border border-border/40 p-1`,"data-testid":`array-item`,"data-key":n,"data-index":r,"data-error":c,children:l}),t[7]=n,t[8]=r,t[9]=c,t[10]=l,t[11]=u):u=t[11],u}function Cr(e){let t=(0,Z.c)(28),{dragHandle:n,arrayKey:r,index:i,value:a,path:o,error:s,onRemove:c}=e,{_:l}=g(),u=i+1,d;t[0]!==l||t[1]!==u?(d=l({id:`y_5CE8`,values:{0:u}}),t[0]=l,t[1]=u,t[2]=d):d=t[2];let f=d,p;t[3]!==r||t[4]!==i||t[5]!==f?(p=(0,$.jsx)(`span`,{"data-testid":`array-item-label`,"data-key":r,"data-index":i,className:`flex-1 truncate text-xs font-medium text-muted-foreground`,children:f}),t[3]=r,t[4]=i,t[5]=f,t[6]=p):p=t[6];let m;t[7]!==l||t[8]!==r||t[9]!==i||t[10]!==c?(m=c?(0,$.jsx)(w,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-testid":`array-item-remove`,"data-key":r,"data-index":i,"aria-label":l({id:`mU3j1b`,values:{0:i+1}}),onClick:c,className:`shrink-0 rounded text-muted-foreground/0 hover:bg-muted hover:text-foreground focus-visible:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring group-hover:text-muted-foreground`,children:(0,$.jsx)(we,{className:`size-3.5`})}):null,t[7]=l,t[8]=r,t[9]=i,t[10]=c,t[11]=m):m=t[11];let h;t[12]!==n||t[13]!==p||t[14]!==m?(h=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[n,p,m]}),t[12]=n,t[13]=p,t[14]=m,t[15]=h):h=t[15];let _=`${r}[${i}]`,v;t[16]!==o||t[17]!==_||t[18]!==a?(v=(0,$.jsx)(`div`,{className:`mt-0.5`,children:(0,$.jsx)(gr,{keyName:_,value:a,path:o,depth:0})}),t[16]=o,t[17]=_,t[18]=a,t[19]=v):v=t[19];let y;t[20]!==r||t[21]!==s||t[22]!==i?(y=s?(0,$.jsx)(`div`,{role:`alert`,"data-testid":`array-item-error`,"data-key":r,"data-index":i,className:`pl-2 text-[10px] text-destructive`,children:s}):null,t[20]=r,t[21]=s,t[22]=i,t[23]=y):y=t[23];let b;return t[24]!==h||t[25]!==v||t[26]!==y?(b=(0,$.jsxs)($.Fragment,{children:[h,v,y]}),t[24]=h,t[25]=v,t[26]=y,t[27]=b):b=t[27],b}function wr(e){let t=(0,Z.c)(50),{keyName:n,value:r,onCommit:i}=e,{_:a}=g(),[s,c]=(0,Q.useState)(r),l=(0,Q.useRef)(!1),u=(0,Q.useRef)(!1),[d,f]=(0,Q.useState)(!1),p,m;t[0]===r?(p=t[1],m=t[2]):(p=()=>{l.current||c(r)},m=[r],t[0]=r,t[1]=p,t[2]=m),(0,Q.useEffect)(p,m);let h;t[3]===s?h=t[4]:(h=o(s),t[3]=s,t[4]=h);let _=h,y;t[5]===a?y=t[6]:(y=a({id:`We7h2I`}),t[5]=a,t[6]=y);let b;t[7]!==a||t[8]!==n?(b=a({id:`1EcCom`,values:{keyName:n}}),t[7]=a,t[8]=n,t[9]=b):b=t[9];let w,T;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>c(e.target.value),T=()=>{l.current=!0},t[10]=w,t[11]=T):(w=t[10],T=t[11]);let E,D;t[12]!==s||t[13]!==i||t[14]!==r?(E=()=>{if(l.current=!1,u.current){u.current=!1;return}s!==r&&i(s)},D=e=>{e.key===`Enter`&&!e.shiftKey&&!e.metaKey&&!e.ctrlKey?(e.preventDefault(),s!==r&&i(s),e.currentTarget.blur()):e.key===`Escape`&&(e.preventDefault(),u.current=!0,c(r),e.currentTarget.blur())},t[12]=s,t[13]=i,t[14]=r,t[15]=E,t[16]=D):(E=t[15],D=t[16]);let O;t[17]!==s||t[18]!==n||t[19]!==y||t[20]!==b||t[21]!==E||t[22]!==D?(O=(0,$.jsx)(`input`,{type:`text`,"data-testid":`page-icon-widget`,"data-key":n,value:s,placeholder:y,"aria-label":b,className:`flex-1 min-h-7 border-transparent bg-transparent px-2 py-1 text-sm leading-tight shadow-none outline-none placeholder:text-muted-foreground/60 focus-visible:border-transparent focus-visible:bg-muted focus-visible:outline-none focus-visible:ring-0 rounded-sm dark:bg-transparent dark:focus-visible:bg-muted`,onChange:w,onFocus:T,onBlur:E,onKeyDown:D}),t[17]=s,t[18]=n,t[19]=y,t[20]=b,t[21]=E,t[22]=D,t[23]=O):O=t[23];let k;t[24]!==a||t[25]!==n?(k=a({id:`bBcFK_`,values:{keyName:n}}),t[24]=a,t[25]=n,t[26]=k):k=t[26];let A=_.kind,j=_.kind===`unsupported`&&`text-muted-foreground/60`,M;t[27]===j?M=t[28]:(M=C(`flex h-7 w-7 flex-none items-center justify-center rounded-sm text-base transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,j),t[27]=j,t[28]=M);let N;t[29]===_?N=t[30]:(N=(0,$.jsx)(Er,{resolved:_}),t[29]=_,t[30]=N);let P;t[31]!==_.kind||t[32]!==k||t[33]!==M||t[34]!==N?(P=(0,$.jsx)(x,{asChild:!0,children:(0,$.jsx)(`button`,{type:`button`,"aria-label":k,"data-testid":`page-icon-preview`,"data-kind":A,className:M,children:N})}),t[31]=_.kind,t[32]=k,t[33]=M,t[34]=N,t[35]=P):P=t[35];let F;t[36]===a?F=t[37]:(F=a({id:`pFPzHA`}),t[36]=a,t[37]=F);let I;t[38]===i?I=t[39]:(I=(0,$.jsx)(Xn,{onSelect:e=>{c(e),i(e),f(!1)}}),t[38]=i,t[39]=I);let L;t[40]!==F||t[41]!==I?(L=(0,$.jsx)(v,{className:`w-auto p-0`,align:`end`,"aria-label":F,children:I}),t[40]=F,t[41]=I,t[42]=L):L=t[42];let R;t[43]!==d||t[44]!==P||t[45]!==L?(R=(0,$.jsxs)(S,{open:d,onOpenChange:f,children:[P,L]}),t[43]=d,t[44]=P,t[45]=L,t[46]=R):R=t[46];let z;return t[47]!==O||t[48]!==R?(z=(0,$.jsxs)(`div`,{className:`flex w-full items-center gap-2`,children:[O,R]}),t[47]=O,t[48]=R,t[49]=z):z=t[49],z}function Tr(e){let t=(0,Z.c)(74),{keyName:n,value:a,onCommit:o}=e,{_:s}=g(),[c,l]=(0,Q.useState)(a),[u,f]=(0,Q.useState)(null),[m,h]=(0,Q.useState)(!1),_=(0,Q.useRef)(null),v=(0,Q.useRef)(!1),y=(0,Q.useRef)(!1),b=(0,Q.useRef)(!0),x,S;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(x=()=>(b.current=!0,()=>{b.current=!1}),S=[],t[0]=x,t[1]=S):(x=t[0],S=t[1]),(0,Q.useEffect)(x,S);let T,E;t[2]===a?(T=t[3],E=t[4]):(T=()=>{v.current||l(a)},E=[a],t[2]=a,t[3]=T,t[4]=E),(0,Q.useEffect)(T,E);let D;t[5]===c?D=t[6]:(D=p(c),t[5]=c,t[6]=D);let O=D,k;t[7]!==s||t[8]!==o?(k=async function(e){f(null),h(!0);try{let t=await r(e,ee);if(!b.current)return;l(t.url),o(t.url),h(!1)}catch(e){let t=e;if(!b.current)return;f(t instanceof d?t.message:s({id:`vZVeFG`})),h(!1)}},t[7]=s,t[8]=o,t[9]=k):k=t[9];let A=k,j;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(j=function(){_.current?.click()},t[10]=j):j=t[10];let M=j,N;t[11]===o?N=t[12]:(N=function(){l(``),o(``),f(null)},t[11]=o,t[12]=N);let P=N,F;t[13]===s?F=t[14]:(F=s({id:`4zGlN_`}),t[13]=s,t[14]=F);let I;t[15]!==s||t[16]!==n?(I=s({id:`1EcCom`,values:{keyName:n}}),t[15]=s,t[16]=n,t[17]=I):I=t[17];let L,R;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(L=e=>l(e.target.value),R=()=>{v.current=!0},t[18]=L,t[19]=R):(L=t[18],R=t[19]);let z,B;t[20]!==c||t[21]!==o||t[22]!==a?(z=()=>{if(v.current=!1,y.current){y.current=!1;return}c!==a&&o(c)},B=e=>{e.key===`Enter`&&!e.shiftKey&&!e.metaKey&&!e.ctrlKey?(e.preventDefault(),c!==a&&o(c),e.currentTarget.blur()):e.key===`Escape`&&(e.preventDefault(),y.current=!0,l(a),e.currentTarget.blur())},t[20]=c,t[21]=o,t[22]=a,t[23]=z,t[24]=B):(z=t[23],B=t[24]);let V;t[25]!==c||t[26]!==n||t[27]!==I||t[28]!==z||t[29]!==B||t[30]!==F?(V=(0,$.jsx)(`input`,{type:`text`,"data-testid":`page-cover-widget`,"data-key":n,value:c,placeholder:F,"aria-label":I,className:`flex-1 min-h-7 border-transparent bg-transparent px-2 py-1 text-sm leading-tight shadow-none outline-none placeholder:text-muted-foreground/60 focus-visible:border-transparent focus-visible:bg-muted focus-visible:outline-none focus-visible:ring-0 rounded-sm dark:bg-transparent dark:focus-visible:bg-muted`,onChange:L,onFocus:R,onBlur:z,onKeyDown:B}),t[25]=c,t[26]=n,t[27]=I,t[28]=z,t[29]=B,t[30]=F,t[31]=V):V=t[31];let H;t[32]!==s||t[33]!==n||t[34]!==m?(H=s(m?{id:`rFw02Q`,values:{keyName:n}}:{id:`Yi0VMG`,values:{keyName:n}}),t[32]=s,t[33]=n,t[34]=m,t[35]=H):H=t[35];let U;t[36]===m?U=t[37]:(U=m?(0,$.jsx)(i,{className:`size-4 animate-pulse`}):(0,$.jsx)(rt,{className:`size-4`}),t[36]=m,t[37]=U);let W;t[38]!==H||t[39]!==U||t[40]!==m?(W=(0,$.jsx)(w,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":H,disabled:m,onClick:M,"data-testid":`page-cover-upload`,children:U}),t[38]=H,t[39]=U,t[40]=m,t[41]=W):W=t[41];let G;t[42]!==s||t[43]!==n?(G=s({id:`P6gXB-`,values:{keyName:n}}),t[42]=s,t[43]=n,t[44]=G):G=t[44];let K=O.kind,q=O.kind===`unsupported`&&`text-muted-foreground/60`,J;t[45]===q?J=t[46]:(J=C(`flex h-7 w-12 flex-none items-center justify-center overflow-hidden rounded-sm text-xs transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,q),t[45]=q,t[46]=J);let Y;t[47]===O?Y=t[48]:(Y=(0,$.jsx)(Dr,{resolved:O}),t[47]=O,t[48]=Y);let X;t[49]!==O.kind||t[50]!==G||t[51]!==J||t[52]!==Y?(X=(0,$.jsx)(`button`,{type:`button`,"aria-label":G,"data-testid":`page-cover-preview`,"data-kind":K,onClick:M,className:J,children:Y}),t[49]=O.kind,t[50]=G,t[51]=J,t[52]=Y,t[53]=X):X=t[53];let te;t[54]!==s||t[55]!==P||t[56]!==c||t[57]!==n||t[58]!==O.kind?(te=O.kind!==`unsupported`&&c!==``?(0,$.jsx)(w,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":s({id:`aaE55D`,values:{keyName:n}}),onClick:P,"data-testid":`page-cover-clear`,children:(0,$.jsx)(Ee,{className:`size-4`})}):null,t[54]=s,t[55]=P,t[56]=c,t[57]=n,t[58]=O.kind,t[59]=te):te=t[59];let ne;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(ne=ee.join(`,`),t[60]=ne):ne=t[60];let re;t[61]===A?re=t[62]:(re=(0,$.jsx)(`input`,{ref:_,type:`file`,accept:ne,className:`hidden`,"aria-hidden":!0,tabIndex:-1,onChange:e=>{let t=e.target.files?.[0];e.currentTarget.value=``,t&&A(t)}}),t[61]=A,t[62]=re);let ie;t[63]!==V||t[64]!==W||t[65]!==X||t[66]!==te||t[67]!==re?(ie=(0,$.jsxs)(`div`,{className:`flex w-full items-center gap-2`,children:[V,W,X,te,re]}),t[63]=V,t[64]=W,t[65]=X,t[66]=te,t[67]=re,t[68]=ie):ie=t[68];let ae;t[69]===u?ae=t[70]:(ae=u?(0,$.jsx)(`div`,{className:`text-destructive text-xs`,role:`alert`,children:u}):null,t[69]=u,t[70]=ae);let oe;return t[71]!==ie||t[72]!==ae?(oe=(0,$.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[ie,ae]}),t[71]=ie,t[72]=ae,t[73]=oe):oe=t[73],oe}function Er(e){let t=(0,Z.c)(5),{resolved:n}=e;if(n.kind===`emoji`){let e;return t[0]===n.value?e=t[1]:(e=(0,$.jsx)(`span`,{children:n.value}),t[0]=n.value,t[1]=e),e}if(n.kind===`url`||n.kind===`path`){let e;return t[2]===n.value?e=t[3]:(e=(0,$.jsx)(`img`,{src:n.value,alt:``,className:`h-full w-full rounded-md object-cover`,draggable:!1,referrerPolicy:`no-referrer`}),t[2]=n.value,t[3]=e),e}let r;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(a,{className:`size-4`,"aria-hidden":!0}),t[4]=r):r=t[4],r}function Dr(e){let t=(0,Z.c)(3),{resolved:n}=e;if(n.kind===`url`||n.kind===`path`){let e;return t[0]===n.value?e=t[1]:(e=(0,$.jsx)(`img`,{src:n.value,alt:``,className:`h-full w-full object-cover`,draggable:!1,referrerPolicy:`no-referrer`}),t[0]=n.value,t[1]=e),e}let r;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(rt,{className:`size-4`,"aria-hidden":!0}),t[2]=r):r=t[2],r}var Or=[`__add__`];function kr(e){let t=(0,Z.c)(32),{keyName:n,value:r,declared:i,enumConstraint:a,error:o,resetCounter:s,sortableId:c,rename:l,isDuplicate:u,badge:d,isPlaceholder:f,path:p,onCommit:m,onChangeType:h,onRemove:_,actionSlot:v}=e,y=s===void 0?0:s,b=u===void 0?!1:u,x=f===void 0?!1:f,{_:S}=g(),C;t[0]===r?C=t[1]:(C=ue(r),t[0]=r,t[1]=C);let T=C,E;t[2]!==n||t[3]!==p?(E=p??[n],t[2]=n,t[3]=p,t[4]=E):E=t[4];let D=E,O;t[5]!==S||t[6]!==v||t[7]!==d||t[8]!==i||t[9]!==a||t[10]!==o||t[11]!==T||t[12]!==b||t[13]!==x||t[14]!==n||t[15]!==h||t[16]!==m||t[17]!==_||t[18]!==l||t[19]!==y||t[20]!==D||t[21]!==r?(O=e=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{className:`flex items-start gap-1 @max-[26rem]/prow:flex-wrap`,children:[e,(0,$.jsx)(`div`,{className:`flex items-center gap-1`,"data-testid":`property-row-identity`,children:x?(0,$.jsx)(Fr,{keyName:n,type:i}):(0,$.jsxs)($.Fragment,{children:[T?(0,$.jsx)(Mr,{keyName:n,type:i}):(0,$.jsx)(ae,{keyName:n,type:i,onChangeType:h}),(0,$.jsx)(`div`,{className:`w-32 shrink-0 @max-[26rem]/prow:w-auto`,children:l?.state?(0,$.jsx)(Nr,{keyName:n,draft:l.state.draft,error:l.state.error,onChangeDraft:l.onChangeDraft,onCommit:l.onCommit,onCancel:l.onCancel}):(0,$.jsx)(Pr,{keyName:n,onBegin:l?.onBegin,disabled:!l})})]})}),b?(0,$.jsx)(`span`,{"data-testid":`property-duplicate-marker`,"data-key":n,title:S({id:`outYNy`,values:{keyName:n}}),className:`flex size-4 items-center justify-center text-amber-600`,children:(0,$.jsx)(Te,{className:`size-3.5`})}):null,(0,$.jsx)(`div`,{className:`min-w-0 flex-1 @max-[26rem]/prow:order-last @max-[26rem]/prow:mt-0.5 @max-[26rem]/prow:basis-full @max-[26rem]/prow:pl-[3.25rem]`,children:a&&!T&&!a.multi?(0,$.jsx)(Br,{keyName:n,value:r,values:a.values,onCommit:m},`widget-${y}`):a&&!T&&a.multi?(0,$.jsx)(Hr,{keyName:n,value:r,values:a.values,onCommit:m},`widget-${y}`):(0,$.jsx)(Lr,{keyName:n,value:r,widgetType:i,path:D,onCommit:m},`widget-${y}`)}),d?(0,$.jsx)(`div`,{className:`shrink-0 min-h-7 flex items-center`,children:d}):null,v,_?(0,$.jsx)(w,{type:`button`,"data-testid":`property-remove-button`,"data-key":n,"aria-label":S({id:`6VqW-1`,values:{keyName:n}}),onClick:_,variant:`ghost`,size:`icon-sm`,className:`flex shrink-0 items-center justify-center rounded text-muted-foreground/0 hover:bg-muted hover:text-foreground focus-visible:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring group-hover:text-muted-foreground`,children:(0,$.jsx)(we,{className:`size-3.5`})}):null]}),o?(0,$.jsx)(`div`,{role:`alert`,"data-testid":`property-error`,"data-key":n,className:`pl-9 text-[10px] text-destructive @max-[26rem]/prow:pl-[3.25rem]`,children:o}):null]}),t[5]=S,t[6]=v,t[7]=d,t[8]=i,t[9]=a,t[10]=o,t[11]=T,t[12]=b,t[13]=x,t[14]=n,t[15]=h,t[16]=m,t[17]=_,t[18]=l,t[19]=y,t[20]=D,t[21]=r,t[22]=O):O=t[22];let k;return t[23]!==i||t[24]!==o||t[25]!==T||t[26]!==b||t[27]!==x||t[28]!==n||t[29]!==c||t[30]!==O?(k=(0,$.jsx)(Ar,{sortableId:c,keyName:n,declared:i,error:o,isDuplicate:b,isPlaceholder:x,isComplex:T,children:O}),t[23]=i,t[24]=o,t[25]=T,t[26]=b,t[27]=x,t[28]=n,t[29]=c,t[30]=O,t[31]=k):k=t[31],k}function Ar(e){let t=(0,Z.c)(20),{sortableId:n,keyName:r,declared:i,error:a,isDuplicate:o,isPlaceholder:s,isComplex:c,children:l}=e;if(n){let e;return t[0]!==l||t[1]!==i||t[2]!==a||t[3]!==c||t[4]!==o||t[5]!==r||t[6]!==n?(e=(0,$.jsx)(jr,{sortableId:n,keyName:r,declared:i,error:a,isDuplicate:o,isComplex:c,children:l}),t[0]=l,t[1]=i,t[2]=a,t[3]=c,t[4]=o,t[5]=r,t[6]=n,t[7]=e):e=t[7],e}let u;t[8]===s?u=t[9]:(u=s?(0,$.jsx)(`span`,{"aria-hidden":!0,className:`h-7 w-4 shrink-0`}):null,t[8]=s,t[9]=u);let d=u,f=a??void 0,p=o||void 0,m=c||void 0,h;t[10]!==l||t[11]!==d?(h=l(d),t[10]=l,t[11]=d,t[12]=h):h=t[12];let g;return t[13]!==i||t[14]!==r||t[15]!==f||t[16]!==p||t[17]!==m||t[18]!==h?(g=(0,$.jsx)(`div`,{className:`group @container/prow py-0.5`,"data-testid":`property-row`,"data-key":r,"data-widget-type":i,"data-error":f,"data-duplicate":p,"data-complex-value":m,children:h}),t[13]=i,t[14]=r,t[15]=f,t[16]=p,t[17]=m,t[18]=h,t[19]=g):g=t[19],g}function jr(e){let t=(0,Z.c)(31),{sortableId:n,keyName:r,declared:i,error:a,isDuplicate:o,isComplex:s,children:c}=e,{_:l}=g(),u;t[0]===n?u=t[1]:(u={id:n},t[0]=n,t[1]=u);let{attributes:d,listeners:f,setNodeRef:p,transform:m,transition:h,isDragging:_}=Ue(u),v;t[2]===m?v=t[3]:(v=He.Transform.toString(m),t[2]=m,t[3]=v);let y=_?.5:void 0,b=_?1:void 0,x;t[4]!==v||t[5]!==y||t[6]!==b||t[7]!==h?(x={transform:v,transition:h,opacity:y,zIndex:b},t[4]=v,t[5]=y,t[6]=b,t[7]=h,t[8]=x):x=t[8];let S=x,C;t[9]!==l||t[10]!==r?(C=l({id:`Am78jY`,values:{keyName:r}}),t[9]=l,t[10]=r,t[11]=C):C=t[11];let T;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(be,{className:`size-3.5`}),t[12]=T):T=t[12];let E;t[13]!==d||t[14]!==r||t[15]!==f||t[16]!==C?(E=(0,$.jsx)(w,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-testid":`property-drag-handle`,"data-key":r,"aria-label":C,...d,...f,className:`h-7 w-4 shrink-0 cursor-grab touch-none px-0 text-muted-foreground/0 hover:text-foreground focus-visible:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring active:cursor-grabbing group-hover:text-muted-foreground/60`,children:T}),t[13]=d,t[14]=r,t[15]=f,t[16]=C,t[17]=E):E=t[17];let D=E,O=a??void 0,k=o||void 0,A=s||void 0,j=_||void 0,M;t[18]!==c||t[19]!==D?(M=c(D),t[18]=c,t[19]=D,t[20]=M):M=t[20];let N;return t[21]!==i||t[22]!==r||t[23]!==p||t[24]!==S||t[25]!==k||t[26]!==A||t[27]!==j||t[28]!==M||t[29]!==O?(N=(0,$.jsx)(`div`,{ref:p,style:S,className:`group @container/prow py-0.5`,"data-testid":`property-row`,"data-key":r,"data-widget-type":i,"data-error":O,"data-duplicate":k,"data-complex-value":A,"data-dragging":j,children:M}),t[21]=i,t[22]=r,t[23]=p,t[24]=S,t[25]=k,t[26]=A,t[27]=j,t[28]=M,t[29]=O,t[30]=N):N=t[30],N}function Mr(e){let t=(0,Z.c)(10),{keyName:n,type:r}=e,{_:i}=g(),a=le[r],o;t[0]!==i||t[1]!==n?(o=i({id:`STTOnz`,values:{keyName:n}}),t[0]=i,t[1]=n,t[2]=o):o=t[2];let s;t[3]===a?s=t[4]:(s=(0,$.jsx)(a,{className:`size-3.5`,"aria-hidden":`true`}),t[3]=a,t[4]=s);let c;return t[5]!==n||t[6]!==o||t[7]!==s||t[8]!==r?(c=(0,$.jsx)(`span`,{role:`img`,"data-testid":`type-icon-static`,"data-key":n,"data-type":r,"aria-label":o,className:`flex size-7 shrink-0 items-center justify-center rounded text-muted-foreground`,children:s}),t[5]=n,t[6]=o,t[7]=s,t[8]=r,t[9]=c):c=t[9],c}function Nr(e){let t=(0,Z.c)(23),{keyName:n,draft:r,error:i,onChangeDraft:a,onCommit:o,onCancel:s}=e,{_:c}=g(),l=i?`property-rename-error-${n}`:void 0,u;t[0]!==c||t[1]!==n?(u=c({id:`Rx5ReQ`,values:{keyName:n}}),t[0]=c,t[1]=n,t[2]=u):u=t[2];let d=i?!0:void 0,f;t[3]===a?f=t[4]:(f=e=>a(e.target.value),t[3]=a,t[4]=f);let p;t[5]!==s||t[6]!==o?(p=e=>{e.key===`Enter`?(e.preventDefault(),o()):e.key===`Escape`&&(e.preventDefault(),s())},t[5]=s,t[6]=o,t[7]=p):p=t[7];let m;t[8]!==r||t[9]!==l||t[10]!==n||t[11]!==o||t[12]!==u||t[13]!==d||t[14]!==f||t[15]!==p?(m=(0,$.jsx)(Ae,{"data-testid":`property-name-rename-input`,"data-key":n,type:`text`,value:r,autoFocus:!0,"aria-label":u,"aria-invalid":d,"aria-describedby":l,onChange:f,onBlur:o,onKeyDown:p,className:`h-7 border-transparent bg-transparent dark:bg-transparent px-2 text-sm shadow-none focus-visible:border-transparent focus-visible:bg-muted focus-visible:ring-0 rounded-sm dark:focus-visible:bg-muted`}),t[8]=r,t[9]=l,t[10]=n,t[11]=o,t[12]=u,t[13]=d,t[14]=f,t[15]=p,t[16]=m):m=t[16];let h;t[17]!==i||t[18]!==l?(h=i?(0,$.jsx)(`div`,{id:l,"data-testid":`property-name-rename-error`,className:`text-[10px] text-destructive`,children:i}):null,t[17]=i,t[18]=l,t[19]=h):h=t[19];let _;return t[20]!==m||t[21]!==h?(_=(0,$.jsxs)(`div`,{children:[m,h]}),t[20]=m,t[21]=h,t[22]=_):_=t[22],_}function Pr(e){let t=(0,Z.c)(4),{keyName:n,onBegin:r,disabled:i}=e,a;return t[0]!==i||t[1]!==n||t[2]!==r?(a=(0,$.jsx)(w,{type:`button`,variant:`ghost`,"data-testid":`property-name-button`,"data-key":n,onClick:r,disabled:i,className:`block h-7 w-full truncate px-2 py-0.5 text-left text-sm rounded-sm font-normal text-muted-foreground hover:bg-transparent hover:text-foreground disabled:opacity-100 disabled:cursor-default`,children:n}),t[0]=i,t[1]=n,t[2]=r,t[3]=a):a=t[3],a}function Fr(e){let t=(0,Z.c)(10),{keyName:n,type:r}=e,i=le[r],a;t[0]===i?a=t[1]:(a=(0,$.jsx)(i,{className:`size-3.5`}),t[0]=i,t[1]=a);let o;t[2]!==n||t[3]!==a?(o=(0,$.jsx)(`span`,{"aria-hidden":!0,"data-testid":`property-placeholder-icon`,"data-key":n,className:`flex h-7 w-7 shrink-0 items-center justify-center text-muted-foreground/60`,children:a}),t[2]=n,t[3]=a,t[4]=o):o=t[4];let s;t[5]===n?s=t[6]:(s=(0,$.jsx)(`div`,{className:`w-32 shrink-0 @max-[26rem]/prow:w-auto`,children:(0,$.jsx)(`span`,{"data-testid":`property-placeholder-name`,"data-key":n,className:`block h-7 truncate px-2 py-1.5 text-sm leading-tight text-muted-foreground/60`,children:n})}),t[5]=n,t[6]=s);let c;return t[7]!==o||t[8]!==s?(c=(0,$.jsxs)($.Fragment,{children:[o,s]}),t[7]=o,t[8]=s,t[9]=c):c=t[9],c}function Ir(e){let t=(0,Z.c)(58),{draft:n,onChangeName:r,onChangeType:i,onChangeValue:a,onCommit:o,onCancel:s,rowId:c,autoFocus:l,enumConstraint:u,fieldSuggestions:d,onPickField:f}=e,p=c===void 0?`__add__`:c,m=l===void 0?`name`:l,_;t[0]===d?_=t[1]:(_=d===void 0?[]:d,t[0]=d,t[1]=_);let v=_,{_:y}=g(),b=n.error?`add-property-error-${p}`:void 0,x=(0,Q.useRef)(null),S=(0,Q.useRef)(null),C=m===`value`,T=(0,Q.useRef)(!1),E,D;t[2]===C?(E=t[3],D=t[4]):(E=()=>{!C||T.current||(T.current=!0,(S.current?.querySelector(`input:not([type="hidden"]), select, textarea, button, [tabindex]:not([tabindex="-1"])`))?.focus())},D=[C],t[2]=C,t[3]=E,t[4]=D),(0,Q.useEffect)(E,D);let O;t[5]!==r||t[6]!==i||t[7]!==f?(O=function(e){if(f){f(e);return}r(e.name),i(e.type)},t[5]=r,t[6]=i,t[7]=f,t[8]=O):O=t[8];let k=O,A;t[9]!==n.name||t[10]!==n.value?(A=n.name.trim()===``||J(n.value),t[9]=n.name,t[10]=n.value,t[11]=A):A=t[11];let j=A,M;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(M=e=>{e.preventDefault(),x.current?.focus()},t[12]=M):M=t[12];let N;t[13]!==n.type||t[14]!==i?(N=(0,$.jsx)(ae,{keyName:`__add__`,type:n.type,onChangeType:i,onCloseAutoFocus:M}),t[13]=n.type,t[14]=i,t[15]=N):N=t[15];let P=m===`name`,F=n.error!==null,I;t[16]!==n.name||t[17]!==b||t[18]!==v||t[19]!==k||t[20]!==s||t[21]!==r||t[22]!==o||t[23]!==p||t[24]!==P||t[25]!==F?(I=(0,$.jsx)(nr,{rowId:p,value:n.name,suggestions:v,inputRef:x,autoFocus:P,error:F,errorId:b,onChange:r,onPick:k,onCommit:o,onCancel:s}),t[16]=n.name,t[17]=b,t[18]=v,t[19]=k,t[20]=s,t[21]=r,t[22]=o,t[23]=p,t[24]=P,t[25]=F,t[26]=I):I=t[26];let L;t[27]!==n.type||t[28]!==n.value||t[29]!==u||t[30]!==a||t[31]!==o?(L=(0,$.jsx)(`div`,{ref:S,className:`min-w-0 flex-1 @max-[26rem]/prow:order-last @max-[26rem]/prow:mt-0.5 @max-[26rem]/prow:basis-full @max-[26rem]/prow:pl-[2rem]`,children:u&&!u.multi?(0,$.jsx)(Br,{keyName:`__add__`,value:n.value,values:u.values,onCommit:a}):u?(0,$.jsx)(Hr,{keyName:`__add__`,value:n.value,values:u.values,onCommit:a}):(0,$.jsx)(Lr,{keyName:`__add__`,value:n.value,widgetType:n.type,path:Or,onCommit:a,onSubmit:o})}),t[27]=n.type,t[28]=n.value,t[29]=u,t[30]=a,t[31]=o,t[32]=L):L=t[32];let R;t[33]===o?R=t[34]:(R=()=>o(),t[33]=o,t[34]=R);let z;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,$.jsx)(h,{id:`m16xKo`}),t[35]=z):z=t[35];let B;t[36]!==j||t[37]!==R?(B=(0,$.jsx)(w,{type:`button`,"data-testid":`add-property-commit`,onClick:R,disabled:j,size:`sm`,className:`rounded bg-primary text-xs text-primary-foreground hover:bg-primary/90`,children:z}),t[36]=j,t[37]=R,t[38]=B):B=t[38];let V;t[39]===y?V=t[40]:(V=y({id:`dEgA5A`}),t[39]=y,t[40]=V);let H;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,$.jsx)(Ee,{className:`size-3.5`}),t[41]=H):H=t[41];let ee;t[42]!==s||t[43]!==V?(ee=(0,$.jsx)(w,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-testid":`add-property-cancel`,onClick:s,"aria-label":V,className:`rounded px-1 py-0.5 text-xs text-muted-foreground hover:text-foreground`,children:H}),t[42]=s,t[43]=V,t[44]=ee):ee=t[44];let U;t[45]!==N||t[46]!==I||t[47]!==L||t[48]!==B||t[49]!==ee?(U=(0,$.jsxs)(`div`,{className:`flex items-start gap-1 @max-[26rem]/prow:flex-wrap`,children:[N,I,L,B,ee]}),t[45]=N,t[46]=I,t[47]=L,t[48]=B,t[49]=ee,t[50]=U):U=t[50];let W;t[51]!==n.error||t[52]!==b?(W=n.error?(0,$.jsx)(`div`,{id:b,role:`alert`,"data-testid":`add-property-error`,className:`mt-0.5 pl-7 text-[10px] text-destructive`,children:n.error}):null,t[51]=n.error,t[52]=b,t[53]=W):W=t[53];let G;return t[54]!==p||t[55]!==U||t[56]!==W?(G=(0,$.jsxs)(`div`,{className:`mt-1 rounded border border-dashed bg-background/40 p-1 @container/prow`,"data-testid":`add-property-row`,"data-key":p,children:[U,W]}),t[54]=p,t[55]=U,t[56]=W,t[57]=G):G=t[57],G}function Lr(e){let t=(0,Z.c)(48),{keyName:n,value:r,widgetType:i,path:a,onCommit:o,onSubmit:s}=e;if(n===`icon`){let e=typeof r==`string`?r:``,i;return t[0]!==n||t[1]!==o||t[2]!==e?(i=(0,$.jsx)(wr,{keyName:n,value:e,onCommit:o}),t[0]=n,t[1]=o,t[2]=e,t[3]=i):i=t[3],i}if(n===`cover`||n===`banner`){let e=typeof r==`string`?r:``,i;return t[4]!==n||t[5]!==o||t[6]!==e?(i=(0,$.jsx)(Tr,{keyName:n,value:e,onCommit:o}),t[4]=n,t[5]=o,t[6]=e,t[7]=i):i=t[7],i}if(se(r)){let e=a.length-1,i;return t[8]!==n||t[9]!==a||t[10]!==e||t[11]!==r?(i=(0,$.jsx)(gr,{keyName:n,value:r,path:a,depth:e}),t[8]=n,t[9]=a,t[10]=e,t[11]=r,t[12]=i):i=t[12],i}if(pe(r)){let e=a.length-1,i;return t[13]!==n||t[14]!==a||t[15]!==e||t[16]!==r?(i=(0,$.jsx)(vr,{keyName:n,value:r,path:a,depth:e}),t[13]=n,t[14]=a,t[15]=e,t[16]=r,t[17]=i):i=t[17],i}if(ue(r)){let e;return t[18]!==n||t[19]!==r?(e=(0,$.jsx)(ce,{keyName:n,value:r}),t[18]=n,t[19]=r,t[20]=e):e=t[20],e}if(i===`list`){let e;t[21]===r?e=t[22]:(e=Array.isArray(r)?r.filter(Rr):[],t[21]=r,t[22]=e);let i=e,a;return t[23]!==i||t[24]!==n||t[25]!==o?(a=(0,$.jsx)(he,{keyName:n,value:i,onCommit:o}),t[23]=i,t[24]=n,t[25]=o,t[26]=a):a=t[26],a}if(i===`boolean`){let e=typeof r==`boolean`?r:!1,i;return t[27]!==e||t[28]!==n||t[29]!==o?(i=(0,$.jsx)(me,{keyName:n,value:e,onCommit:o}),t[27]=e,t[28]=n,t[29]=o,t[30]=i):i=t[30],i}if(i===`number`){let e=typeof r==`number`?r:0,i;return t[31]!==n||t[32]!==e||t[33]!==o||t[34]!==s?(i=(0,$.jsx)(ie,{keyName:n,value:e,onCommit:o,onSubmit:s}),t[31]=n,t[32]=e,t[33]=o,t[34]=s,t[35]=i):i=t[35],i}if(i===`date`){let e=typeof r==`string`?r:``,i;return t[36]!==n||t[37]!==o||t[38]!==s||t[39]!==e?(i=(0,$.jsx)(fe,{keyName:n,value:e,onCommit:o,onSubmit:s}),t[36]=n,t[37]=o,t[38]=s,t[39]=e,t[40]=i):i=t[40],i}let c;t[41]===r?c=t[42]:(c=typeof r==`string`?r:Array.isArray(r)?r.join(`, `):String(r),t[41]=r,t[42]=c);let l=c,u;return t[43]!==n||t[44]!==o||t[45]!==s||t[46]!==l?(u=(0,$.jsx)(_e,{keyName:n,value:l,onCommit:o,onSubmit:s}),t[43]=n,t[44]=o,t[45]=s,t[46]=l,t[47]=u):u=t[47],u}function Rr(e){return typeof e==`string`}function zr(e){let t=(0,Z.c)(6),{source:n,target:r}=e,i=r===void 0?`frontmatter.yml`:r,{_:a}=g(),o=n===``?`.ok/${i}`:`${n}/.ok/${i}`,s;t[0]!==a||t[1]!==o?(s=a({id:`4buZWd`,values:{path:o}}),t[0]=a,t[1]=o,t[2]=s):s=t[2];let c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(h,{id:`j9Vqvc`}),t[3]=c):c=t[3];let l;return t[4]===s?l=t[5]:(l=(0,$.jsx)(Pe,{variant:`gray`,"data-testid":`property-inherited-badge`,title:s,className:`text-2xs`,children:c}),t[4]=s,t[5]=l),l}function Br(e){let t=(0,Z.c)(25),{keyName:n,value:r,values:i,onCommit:a}=e,{_:o}=g(),s=typeof r==`string`?r:``,c;t[0]!==s||t[1]!==i?(c=s!==``&&!i.includes(s)?[s,...i]:i,t[0]=s,t[1]=i,t[2]=c):c=t[2];let l=c,u;t[3]===a?u=t[4]:(u=e=>a(e),t[3]=a,t[4]=u);let d;t[5]!==o||t[6]!==n?(d=o({id:`CwOXMT`,values:{keyName:n}}),t[5]=o,t[6]=n,t[7]=d):d=t[7];let f;t[8]===o?f=t[9]:(f=o({id:`jL3gox`}),t[8]=o,t[9]=f);let p;t[10]===f?p=t[11]:(p=(0,$.jsx)(j,{placeholder:f}),t[10]=f,t[11]=p);let m;t[12]!==n||t[13]!==d||t[14]!==p?(m=(0,$.jsx)(A,{className:`h-7 w-full`,"aria-label":d,"data-testid":`property-enum-select`,"data-key":n,children:p}),t[12]=n,t[13]=d,t[14]=p,t[15]=m):m=t[15];let h;t[16]===l?h=t[17]:(h=l.map(Vr),t[16]=l,t[17]=h);let _;t[18]===h?_=t[19]:(_=(0,$.jsx)(k,{children:h}),t[18]=h,t[19]=_);let v;return t[20]!==s||t[21]!==u||t[22]!==m||t[23]!==_?(v=(0,$.jsxs)(M,{value:s,onValueChange:u,children:[m,_]}),t[20]=s,t[21]=u,t[22]=m,t[23]=_,t[24]=v):v=t[24],v}function Vr(e){return(0,$.jsx)(O,{value:e,children:e},e)}function Hr(e){let t=(0,Z.c)(9),{keyName:n,value:r,values:i,onCommit:a}=e,{_:o}=g(),s;if(t[0]!==o||t[1]!==n||t[2]!==a||t[3]!==r||t[4]!==i){let e=Array.isArray(r)?r.filter(Ur):[],c=e.filter(e=>!i.includes(e)),l=t=>{a(e.includes(t)?e.filter(e=>e!==t):[...e,t])},u;t[6]!==o||t[7]!==n?(u=o({id:`idni-S`,values:{keyName:n}}),t[6]=o,t[7]=n,t[8]=u):u=t[8],s=(0,$.jsx)(`fieldset`,{className:`m-0 flex min-h-7 flex-wrap items-center gap-1 border-0 p-0`,"aria-label":u,"data-testid":`property-enum-multi`,"data-key":n,children:[...i,...c].map(t=>{let n=e.includes(t);return(0,$.jsx)(w,{type:`button`,size:`sm`,variant:n?`secondary`:`outline`,"aria-pressed":n,className:`h-6 px-2 text-xs`,onClick:()=>l(t),"data-testid":`property-enum-option-${t}`,children:t},t)})}),t[0]=o,t[1]=n,t[2]=a,t[3]=r,t[4]=i,t[5]=s}else s=t[5];return s}function Ur(e){return typeof e==`string`}var Wr=(0,Q.createContext)(null);function Gr(e){let t=(0,Z.c)(7),{children:n}=e,[r,i]=(0,Q.useState)(Kr),a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=e=>{i(t=>{let n=new Map(t);return n.set(e,(t.get(e)??0)+1),n})},t[0]=a):a=t[0];let o=a,s;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=e=>{i(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},t[1]=s):s=t[1];let c=s,l;t[2]===r?l=t[3]:(l={addPropertySignal:r,requestAddProperty:o,clearAddProperty:c},t[2]=r,t[3]=l);let u=l,d;return t[4]!==n||t[5]!==u?(d=(0,$.jsx)(Wr,{value:u,children:n}),t[4]=n,t[5]=u,t[6]=d):d=t[6],d}function Kr(){return new Map}function qr(){let e=(0,Q.use)(Wr);if(e===null)throw Error(`useProperties must be used within <PropertyProvider />`);return e}function Jr(e){let t=[],n=[];for(let r of e)r.source===`frontmatter`&&(r.frontmatterScope===`missing`?t.push(r):n.push(r));return{missing:t,invalid:n}}function Yr(e){let t=Object.fromEntries(U.map(({id:t})=>[t,t===`frontmatter`?e.plugins[t]:{...e.plugins[t],enabled:!1}]));return{...e,plugins:t}}function Xr(e,t){let n=(0,Z.c)(3),r=t?.enabled===!0&&t.plugins.frontmatter.enabled,i;return n[0]!==r||n[1]!==t?(i=r&&t?Yr(t):null,n[0]=r,n[1]=t,n[2]=i):i=n[2],Qn(e,i)}function Zr(e,t){let n=(0,Z.c)(3),r;return n[0]!==e||n[1]!==t?(r=()=>Be(e,t),n[0]=e,n[1]=t,n[2]=r):r=n[2],(0,Q.useSyncExternalStore)(Re,r)}function Qr(e){let t=document.activeElement;if(t&&e.contains(t)&&typeof t.value==`string`){let{selectionStart:e,selectionEnd:n,value:r}=t;if(e!=null&&n!=null&&n>e&&typeof r==`string`)return r.slice(e,n)}let n=typeof window<`u`?window.getSelection():null;if(!n||n.isCollapsed||n.rangeCount===0)return``;let r=n.getRangeAt(0),i=r.commonAncestorContainer.nodeType===Node.ELEMENT_NODE?r.commonAncestorContainer:r.commonAncestorContainer.parentElement;return!i||!e.contains(i)?``:n.toString()}function $r(e,t){let n=(0,Z.c)(4),r,i;n[0]!==e||n[1]!==t?(r=()=>{if(typeof document>`u`||t===``)return;let n=()=>{let n=e.current;if(!n)return;let r=Qr(n);ze(t,`frontmatter`,r===``?null:Le(r,t))};return document.addEventListener(`selectionchange`,n),()=>{document.removeEventListener(`selectionchange`,n),ze(t,`frontmatter`,null)}},i=[e,t],n[0]=e,n[1]=t,n[2]=r,n[3]=i):(r=n[2],i=n[3]),(0,Q.useEffect)(r,i)}var ei=`[data-testid="property-row"]`;function ti(e){if(e.target.kind!==`property`)return null;let{key:t,path:n}=e.target;return n.length===0?t:String(n[n.length-1])}function ni(e,t,n){let r=[];for(let i of e){if(i.status!==`open`||ti(i)!==t)continue;if(i.anchor===null){r.push({threadId:i.id,start:0,end:n.length});continue}let e=Se(n,i.anchor.quote,i.anchor.start,i.anchor.end);e!==null&&r.push({threadId:i.id,start:e.start,end:e.end})}return r}function ri(e,t,n,r){let i=null;for(let a of ni(e,t,n))r<a.start||r>a.end||(i===null||a.end-a.start<i.end-i.start)&&(i=a);return i?.threadId??null}function ii(e){return!(e instanceof HTMLElement)||!(e instanceof HTMLTextAreaElement)&&!(e instanceof HTMLInputElement)||e.closest(ei)===null?null:e}function ai(e){return e.closest(ei)?.getAttribute(`data-key`)??null}function oi(e){try{return e.selectionStart}catch{return null}}function si(e,t){let n=(0,Z.c)(4),r,i;n[0]!==e||n[1]!==t?(r=()=>{if(t===``)return;let n=e.current;if(n===null)return;let r=e=>{let n=ii(e.target);if(n===null)return;let r=ai(n);if(r===null)return;let i=oi(n);if(i===null)return;let a=ri(u(t),r,n.value,i);if(a!==null){c(a);return}l()!==null&&c(null)};return n.addEventListener(`click`,r),()=>{n.removeEventListener(`click`,r)}},i=[e,t],n[0]=e,n[1]=t,n[2]=r,n[3]=i):(r=n[2],i=n[3]),(0,Q.useEffect)(r,i)}var ci=`ok-properties-collapsed-v1`,li=!1;function ui(){if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}var di=null,fi=new Set;function pi(){let e=ui();if(!e)return li;try{let t=e.getItem(ci);return t===`true`?!0:t===`false`?!1:li}catch{return li}}function mi(){return di===null&&(di=pi()),di}function hi(e){let t=ui();if(t)try{t.setItem(ci,e?`true`:`false`)}catch{}}function gi(){for(let e of fi)e()}function _i(){return mi()}function vi(e){mi()!==e&&(di=e,hi(e),gi())}function yi(e){return fi.add(e),()=>{fi.delete(e)}}function bi(){let e=(0,Z.c)(2),t=(0,Q.useSyncExternalStore)(yi,_i,xi),n;return e[0]===t?n=e[1]:(n=[t,vi],e[0]=t,e[1]=n),n}function xi(){return li}function Si(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ci(e){return!Array.isArray(e)||e.length===0?null:e.every(e=>typeof e==`string`)?e:null}function wi(e){let t=Ci(e.enum);if(t)return{values:t,multi:!1};if(e.type===`array`&&Si(e.items)){let t=Ci(e.items.enum);if(t)return{values:t,multi:!0}}return null}function Ti(e,t){let n=new Map,r=new Set;if(!e?.enabled||t===void 0||t===``)return n;let i=e.plugins.frontmatter,a=e.plugins.okf,o=[...i?.enabled?I(i.schemas,t):[],...a?.enabled?z(a.rules,t):[]];for(let{schema:e}of o){let t=Si(e.properties)?e.properties:{};for(let[e,i]of Object.entries(t)){if(!Si(i))continue;let t=wi(i);if(!t||r.has(e))continue;let a=n.get(e);if(a===void 0){n.set(e,t);continue}if(a.multi!==t.multi){n.delete(e),r.add(e);continue}let o=a.values.filter(e=>t.values.includes(e));o.length===0?(n.delete(e),r.add(e)):n.set(e,{values:o,multi:a.multi})}}return n}function Ei(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Di(e){return Array.isArray(e.required)?e.required.filter(e=>typeof e==`string`):[]}function Oi(e){let t=e.type;if(typeof t!=`string`)return null;switch(t){case`string`:return e.format===`date`?`date`:`text`;case`number`:case`integer`:return`number`;case`boolean`:return`boolean`;case`array`:return`list`;case`object`:return`object`;default:return null}}function ki(e,t){let n=e?.plugins.frontmatter;if(!e?.enabled||!n?.enabled||t===void 0||t===``)return new Map;let r=new Map,i=I(n.schemas,t),a=new Set(i.flatMap(({schema:e})=>Di(e))),o=new Set;function s(e,t,n){let i=r.get(e);if(i===void 0){r.set(e,{type:t,required:a.has(e),...n===void 0?{}:{description:n}});return}let s={...i,...i.description===void 0&&n!==void 0?{description:n}:{}};t!==null&&!o.has(e)&&(i.type===null?s.type=t:t!==i.type&&(o.add(e),s.type=`text`)),r.set(e,s)}for(let{schema:e}of i){let t=Ei(e.properties)?e.properties:{};for(let[e,n]of Object.entries(t)){if(!Ei(n))continue;let t=typeof n.description==`string`&&n.description!==``?n.description:void 0;s(e,Oi(n),t)}}for(let e of a)s(e,null);return new Map([...r].map(([e,t])=>[e,{type:t.type??`text`,required:t.required,...t.description===void 0?{}:{description:t.description}}]))}function Ai(e){let t=e.document.getText(`source`).toString(),{map:n,parseError:r}=P(t);return{map:n,keys:V(t),parseError:r}}function ji(e){let t=(0,Z.c)(79),{provider:n,reservedKeys:r,identitySlot:i}=e,{_:a}=g(),o;t[0]===r?o=t[1]:(o=r??[],t[0]=r,t[1]=o);let s;t[2]===o?s=t[3]:(s=new Set(o),t[2]=o,t[3]=s);let c=s,[l,u]=(0,Q.useState)(null),d;t[4]===n?d=t[5]:(d=()=>Ai(n),t[4]=n,t[5]=d);let[p,m]=(0,Q.useState)(d),_,v;t[6]===n?(_=t[7],v=t[8]):(_=()=>{let e=f(G(n),n.configuration.name??``);u(e),m(e.current());let t=e.subscribe(e=>{m(e)});return()=>{t(),e.dispose(),u(t=>t===e?null:t)}},v=[n],t[6]=n,t[7]=_,t[8]=v),(0,Q.useEffect)(_,v);let b=p.map,x=p.keys,S=p.parseError,[C,T]=bi(),E;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(E={},t[9]=E):E=t[9];let[D,O]=(0,Q.useState)(E),k;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(k=[],t[10]=k):k=t[10];let[A,j]=(0,Q.useState)(k),[M,N]=(0,Q.useState)(null),P=(0,Q.useRef)(0),[F,I]=(0,Q.useState)(null),L;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(L={},t[11]=L):L=t[11];let[R,z]=(0,Q.useState)(L),B;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(B={},t[12]=B):B=t[12];let[V,ee]=(0,Q.useState)(B),U=n.configuration.name??``,{data:K}=Ve(U===``?null:U),q=Ti(K?.effective??null,U),{invalid:X,missing:te}=Jr(Xr(n,K?.effective??null)),ne=ki(K?.effective??null,U),ie=(0,Q.useRef)(null);$r(ie,U),si(ie,U);let ae;t[13]!==a||t[14]!==l?(ae=function(e){if(!l)return{ok:!1,error:a({id:`9zb2WA`})};let t=l.patch(e);if(t.ok)return{ok:!0};if(t.error.code===`WRITE_ERROR`)return console.warn(`[PropertyPanel] binding write error:`,t.error.detail),{ok:!1,error:t.error.detail};let n=W(t.error);return{ok:!1,error:t.error.issues[0]?.message??a({id:`8fRyLo`}),fieldErrors:Object.keys(n).length>0?n:void 0}},t[13]=a,t[14]=l,t[15]=ae):ae=t[15];let se=ae,ce;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(ce=function(e){z(t=>{if(!Object.hasOwn(t,e))return t;let n={...t};return delete n[e],n})},t[16]=ce):ce=t[16];let le=ce,ue;t[17]===a?ue=t[18]:(ue=function(e,t){if(e.ok)return;let n=e.error??a({id:`4g19V6`}),r=e.fieldErrors??{};z(e=>{let i={...e};for(let e of t)i[e]=r[e]??n;return i}),ee(e=>{let n={...e};for(let e of t)n[e]=(n[e]??0)+1;return n})},t[17]=a,t[18]=ue);let fe=ue,pe;t[19]!==se||t[20]!==fe?(pe=function(e,t){le(e),fe(se({[e]:t}),[e])},t[19]=se,t[20]=fe,t[21]=pe):pe=t[21];let me=pe,he;t[22]!==se||t[23]!==fe?(he=function(e){le(e),fe(se({[e]:null}),[e])},t[22]=se,t[23]=fe,t[24]=he):he=t[24];let ge=he,_e;t[25]!==a||t[26]!==l?(_e=function(e,t){if(!l)return{ok:!1,error:a({id:`9zb2WA`})};if(e===t)return{ok:!0};let n=l.rename(e,t);if(n.ok)return{ok:!0};if(n.error.code===`WRITE_ERROR`)return{ok:!1,error:n.error.detail};let r=W(n.error);return{ok:!1,error:n.error.issues[0]?.message??a({id:`I1gRhX`}),fieldErrors:Object.keys(r).length>0?r:void 0}},t[25]=a,t[26]=l,t[27]=_e):_e=t[27];let ve=_e,ye;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(ye=function(e,t){return`${e} ${t}`},t[28]=ye):ye=t[28];let be=ye,xe;t[29]!==l||t[30]!==x?(xe=function(e){if(!l)return;let t=String(e.active.id),n=e.over?String(e.over.id):null;if(!n||t===n)return;let r=x.map((e,t)=>be(e,t)),i=r.indexOf(t),a=r.indexOf(n);if(i<0||a<0)return;let o=x.slice(),[s]=o.splice(i,1);if(!s)return;o.splice(a,0,s);let c=l.reorder(o);c.ok||console.warn(`[PropertyPanel] reorder failed:`,c.error)},t[29]=l,t[30]=x,t[31]=xe):xe=t[31];let Se=xe,Ce;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(Ce={activationConstraint:{distance:4}},t[32]=Ce):Ce=t[32];let we;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(we={coordinateGetter:Je},t[33]=we):we=t[33];let Ee=Ke(qe(We,Ce),qe(Qe,we)),De;t[34]!==me||t[35]!==b?(De=function(e,t){let n=b[e];if(n===void 0)return;O(n=>({...n,[e]:t}));let r=oe(n,t);(!Object.hasOwn(b,e)||!Y(n,r))&&me(e,r)},t[34]=me,t[35]=b,t[36]=De):De=t[36];let Oe=De,ke;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(ke=function(e){return e===`date`?new Date().toISOString().slice(0,10):re[e]},t[37]=ke):ke=t[37];let Ae=ke,je=function(){return P.current+=1,{id:`blank-${P.current}`,name:``,type:`text`,value:``,error:null,focusField:`name`}},Me=function(){let e=[],t=new Set;for(let n of te){let r=n.frontmatterProperty;if(r===void 0||r===``||t.has(r)||Object.hasOwn(b,r)||c.has(r))continue;t.add(r);let i=`staged-${r}`,a=A.find(e=>e.id===i);if(a){e.push(a);continue}let o=ne.get(r)?.type??`text`;e.push({id:i,name:r,type:o,value:re[o],error:null,focusField:`value`})}return e},Ne;t[38]===T?Ne=t[39]:(Ne=function(e){j(e),N(e[0]?.id??null),T(!1)},t[38]=T,t[39]=Ne);let Pe=Ne,Fe=function(){Pe([je()])},Ie=function(){let e=Me();Pe(e.length>0?e:[je()])},{addPropertySignal:Le,clearAddProperty:Re}=qr(),ze;t[40]!==Le||t[41]!==U?(ze=Le.get(U)??0,t[40]=Le,t[41]=U,t[42]=ze):ze=t[42];let Be=ze,He;t[43]===Be?He=t[44]:(He=[Be],t[43]=Be,t[44]=He),(0,Q.useEffect)(()=>{Be>0&&Ie()},He);let Ue,$e;t[45]!==Re||t[46]!==U?(Ue=()=>()=>Re(U),$e=[U,Re],t[45]=Re,t[46]=U,t[47]=Ue,t[48]=$e):(Ue=t[47],$e=t[48]),(0,Q.useEffect)(Ue,$e);let et;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(et=function(e,t){j(n=>n.map(n=>n.id===e?t(n):n))},t[49]=et):et=t[49];let tt=et,nt;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(nt=function(e,t){tt(e,e=>({...e,type:t,value:Ae(t),error:null}))},t[50]=nt):nt=t[50];let rt=nt,it;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(it=function(e,t){tt(e,e=>({...e,value:t}))},t[51]=it):it=t[51];let at=it,ot;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(ot=function(e,t){tt(e,e=>({...e,name:t,error:null}))},t[52]=ot):ot=t[52];let st=ot,ct;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(ct=function(e,t){tt(e,e=>({...e,name:t.name,type:t.type,value:Ae(t.type),error:null}))},t[53]=ct):ct=t[53];let lt=ct,ut;t[54]!==a||t[55]!==A||t[56]!==se||t[57]!==b?(ut=function(e,t){let n=A.find(t=>t.id===e);if(!n)return;let r=t??n.value,i=t=>tt(e,e=>({...e,value:r,error:t})),o=n.name.trim();if(!o){i(a({id:`8_brI5`}));return}if(J(r)){i(a({id:`hXUWyd`}));return}if(o===`frontmatter`){i(a({id:`dURmlQ`}));return}if(Object.hasOwn(b,o)){i(a({id:`njU86j`,values:{trimmed:o}}));return}let s=se({[o]:r});if(s.ok){j(t=>t.filter(t=>t.id!==e));return}i(s.fieldErrors?.[o]??s.error??a({id:`OJeiSH`}))},t[54]=a,t[55]=A,t[56]=se,t[57]=b,t[58]=ut):ut=t[58];let dt=ut,ft;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(ft=function(e){j(t=>t.filter(t=>t.id!==e))},t[59]=ft):ft=t[59];let pt=ft,mt;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(mt=function(e){I({key:e,draft:e,error:null})},t[60]=mt):mt=t[60];let ht=mt,gt;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(gt=function(e){I(t=>t&&{...t,draft:e,error:null})},t[61]=gt):gt=t[61];let _t=gt,vt;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(vt=function(){I(null)},t[62]=vt):vt=t[62];let yt=vt,bt;t[63]!==a||t[64]!==b||t[65]!==ve||t[66]!==F?(bt=function(){if(!F)return;let e=F.draft.trim();if(!e){I(null);return}if(e===F.key){I(null);return}if(e===`frontmatter`){I({...F,error:a({id:`dURmlQ`})});return}if(Object.hasOwn(b,e)){I({...F,error:a({id:`njU86j`,values:{trimmed:e}})});return}let t=ve(F.key,e);if(t.ok){O(t=>{if(!Object.hasOwn(t,F.key))return t;let n={...t};return n[e]=n[F.key],delete n[F.key],n}),le(F.key),I(null);return}let n=t.fieldErrors?.[e]??t.fieldErrors?.[F.key]??t.error??a({id:`2ryd91`});I({...F,error:n})},t[63]=a,t[64]=b,t[65]=ve,t[66]=F,t[67]=bt):bt=t[67];let xt=bt,St;t[68]!==b||t[69]!==x?(St=x.length>0?x:Object.keys(b),t[68]=b,t[69]=x,t[70]=St):St=t[70];let Ct;t[71]===c?Ct=t[72]:(Ct=e=>!c.has(e),t[71]=c,t[72]=Ct);let wt=St.filter(Ct),Tt=new Map;for(let e of wt)Tt.set(e,(Tt.get(e)??0)+1);if(wt.length===0&&A.length===0&&!S&&!i&&X.length===0)return null;let Et=[...ne].filter(e=>{let[t]=e;return!Object.hasOwn(b,t)&&!c.has(t)}).map(Ii),Dt=function(e){let t=new Set(A.filter(t=>t.id!==e).map(Fi).filter(Pi));return t.size===0?Et:Et.filter(e=>!t.has(e.name))},Ot;t[73]===Symbol.for(`react.memo_cache_sentinel`)?(Ot=(0,$.jsx)(h,{id:`l_UFPv`}),t[73]=Ot):Ot=t[73];let kt;t[74]===T?kt=t[75]:(kt=e=>T(!e),t[74]=T,t[75]=kt);let At;t[76]===S?At=t[77]:(At=S?(0,$.jsxs)(`div`,{role:`alert`,"data-testid":`property-panel-yaml-error`,className:`mb-1 ml-(--prop-drag-gutter) flex items-start gap-1.5 rounded border border-destructive/30 bg-destructive/5 px-2 py-1.5 text-[11px] text-destructive`,children:[(0,$.jsx)(Te,{className:`size-3.5 shrink-0 mt-0.5`}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(h,{id:`zaXlhf`}),(0,$.jsx)(`span`,{className:`block text-[10px] opacity-80`,children:S})]})]}):null,t[76]=S,t[77]=At);let jt;return t[78]===Symbol.for(`react.memo_cache_sentinel`)?(jt=(e,t)=>be(e,t),t[78]=jt):jt=t[78],(0,$.jsx)(or,{binding:l,children:(0,$.jsx)(ur,{docName:U===``?null:U,children:(0,$.jsxs)(de,{ref:ie,title:Ot,count:wt.length,problemCount:X.length,problemMessages:X.map(Ni),testId:`property-panel`,className:`pt-4`,contentClassName:`[--prop-drag-gutter:1.375rem] -ml-(--prop-drag-gutter)`,open:!C,onOpenChange:kt,children:[At,i,(0,$.jsx)(Xe,{sensors:Ee,collisionDetection:Ge,onDragEnd:Se,children:(0,$.jsx)(Ze,{items:wt.map(jt),strategy:Ye,children:wt.map((e,t)=>{let n=b[e];if(n===void 0)return null;let r=D[e]??H(n),i=F?.key===e?F:null,a=(Tt.get(e)??0)>1;return(0,$.jsx)(kr,{sortableId:be(e,t),keyName:e,value:n,declared:r,enumConstraint:q.get(e),error:R[e]??null,resetCounter:V[e]??0,isDuplicate:a,rename:{state:i,onBegin:()=>ht(e),onChangeDraft:_t,onCommit:xt,onCancel:yt},onCommit:t=>me(e,t),onChangeType:t=>Oe(e,t),onRemove:()=>ge(e),actionSlot:(0,$.jsx)(hr,{propertyKey:e})},`${e}-${t}`)})})}),!c.has(`tags`)&&!Object.hasOwn(b,`tags`)?(0,$.jsx)(kr,{keyName:`tags`,value:[],declared:`list`,enumConstraint:q.get(`tags`),error:R.tags??null,resetCounter:V.tags??0,isPlaceholder:!0,onCommit:e=>me(`tags`,e),onChangeType:Mi},`virtual-tags`):null,A.length>0?(0,$.jsx)(`div`,{className:`ml-(--prop-drag-gutter)`,children:A.map(e=>(0,$.jsx)(Ir,{rowId:e.id,draft:e,autoFocus:e.id===M?e.focusField:`none`,enumConstraint:q.get(e.name.trim()),fieldSuggestions:Dt(e.id),onChangeName:t=>st(e.id,t),onChangeType:t=>rt(e.id,t),onChangeValue:t=>at(e.id,t),onPickField:t=>lt(e.id,t),onCommit:t=>dt(e.id,t),onCancel:()=>pt(e.id)},e.id))}):(0,$.jsxs)(`div`,{className:`mt-1 flex items-center gap-1`,children:[(0,$.jsx)(`span`,{"aria-hidden":!0,className:`h-7 w-4 shrink-0`}),(0,$.jsxs)(w,{type:`button`,variant:`ghost`,size:`sm`,"data-testid":`add-property-trigger`,onClick:Fe,"aria-label":a({id:`F-NRCj`}),className:`flex items-center gap-1.5 rounded px-2 py-1 font-medium text-sm hover:bg-muted/50 hover:text-foreground`,children:[(0,$.jsx)(y,{className:`size-3.5`}),(0,$.jsx)(`span`,{children:(0,$.jsx)(h,{id:`m16xKo`})})]})]})]})})})}function Mi(){}function Ni(e){return e.message}function Pi(e){return e!==``}function Fi(e){return e.name.trim()}function Ii(e){let[t,n]=e;return{name:t,...n}}var Li=[`name`],Ri=[];function zi(e,t){if(t.length===0)return e;let n=new Set(t);return e.filter(e=>e.frontmatterProperty===void 0||!n.has(e.frontmatterProperty))}function Bi(e){let t=(0,Z.c)(40),{provider:n,scope:r,name:i,onRename:a,nameError:o,onNameDraftChange:s,nameEditable:c}=e,l=c===void 0?!0:c,{_:u}=g(),d=(0,Q.useId)(),f=Ie(),p=f.status===`ready`?f.data.find(e=>e.scope===r&&e.name===i):void 0,[m,_]=(0,Q.useState)(i),v,y;t[0]===i?(v=t[1],y=t[2]):(v=()=>_(i),y=[i],t[0]=i,t[1]=v,t[2]=y),(0,Q.useEffect)(v,y);let b,x;t[3]===m?(b=t[4],x=t[5]):(x=m.trim(),b=x!==``&&!K.test(x),t[3]=m,t[4]=b,t[5]=x);let S=b,C;t[6]!==i||t[7]!==S||t[8]!==a||t[9]!==x?(C=function(){a&&(S||x===``||x===i||a(x))},t[6]=i,t[7]=S,t[8]=a,t[9]=x,t[10]=C):C=t[10];let w=C,T=S||!!o,E=ge,D;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(ve,{className:`size-3.5`}),t[11]=D):D=t[11];let O;t[12]===u?O=t[13]:(O=u({id:`XmJfZT`}),t[12]=u,t[13]=O);let k=!l,A;t[14]===s?A=t[15]:(A=e=>{let t=e.target.value;_(t),s?.(t)},t[14]=s,t[15]=A);let j=T?`${d}-error`:void 0,M;t[16]!==w||t[17]!==m||t[18]!==d||t[19]!==T||t[20]!==j||t[21]!==k||t[22]!==A?(M=(0,$.jsx)(Ae,{id:d,"data-testid":`skill-name-input`,value:m,readOnly:k,onChange:A,onBlur:w,onKeyDown:Hi,"aria-invalid":T,"aria-describedby":j,className:`h-7 rounded-sm border-transparent bg-transparent px-2 font-mono text-sm shadow-none focus-visible:border-transparent focus-visible:bg-muted focus-visible:ring-0 dark:bg-transparent`}),t[16]=w,t[17]=m,t[18]=d,t[19]=T,t[20]=j,t[21]=k,t[22]=A,t[23]=M):M=t[23];let N=T?(0,$.jsx)(`p`,{id:`${d}-error`,className:`px-1 pt-0.5 text-[11px] text-destructive`,children:o||(0,$.jsx)(h,{id:`A50vr3`,components:{0:(0,$.jsx)(`code`,{className:`font-mono`})}})}):x?(0,$.jsxs)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:[(0,$.jsx)(h,{id:`NErvOX`}),` `,p&&x===i?ke(p).map(Vi):p?(0,$.jsx)(`code`,{className:`font-mono`,children:`${p.path.replace(/\/SKILL\.mdx?$/i,``).split(`/`).slice(0,-1).join(`/`)}/${x}`}):(0,$.jsx)(h,{id:`tA0b9E`})]}):(0,$.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,$.jsx)(h,{id:`1hvhf0`})}),P;t[24]!==E||t[25]!==d||t[26]!==M||t[27]!==N||t[28]!==D||t[29]!==O?(P=(0,$.jsxs)(E,{icon:D,label:O,htmlFor:d,children:[M,N]}),t[24]=E,t[25]=d,t[26]=M,t[27]=N,t[28]=D,t[29]=O,t[30]=P):P=t[30];let F=P,I;t[31]!==u||t[32]!==p?(I=p?.size?(0,$.jsx)(ge,{icon:(0,$.jsx)(nt,{className:`size-3.5`}),label:u({id:`WOr-hW`}),children:(0,$.jsx)(et,{size:p.size})}):null,t[31]=u,t[32]=p,t[33]=I):I=t[33];let L=I,R;t[34]!==F||t[35]!==L?(R=(0,$.jsxs)($.Fragment,{children:[F,L]}),t[34]=F,t[35]=L,t[36]=R):R=t[36];let z;return t[37]!==n||t[38]!==R?(z=(0,$.jsx)(ji,{provider:n,reservedKeys:Li,identitySlot:R}),t[37]=n,t[38]=R,t[39]=z):z=t[39],z}function Vi(e,t){return(0,$.jsxs)(`span`,{children:[t>0?`, `:null,(0,$.jsx)(`code`,{className:`font-mono`,children:e.dir}),e.symlink?(0,$.jsxs)(`span`,{className:`italic`,children:[` `,(0,$.jsx)(h,{id:`VmXASo`})]}):null]},e.dir)}function Hi(e){e.key===`Enter`&&e.currentTarget.blur()}function Ui(e,t){let n=e.current().map[t];return typeof n==`string`?n:``}function Wi(e,t){let n=(0,Z.c)(15),[r,i]=(0,Q.useState)(null),a;n[0]!==t||n[1]!==e?(a=()=>{let n=G(e),r=Ui(n,t);return n.dispose(),r},n[0]=t,n[1]=e,n[2]=a):a=n[2];let[o,s]=(0,Q.useState)(a),c=(0,Q.useRef)(!1),l,u;n[3]!==t||n[4]!==e?(l=()=>{let n=f(G(e),e.configuration.name??``);i(n),s(Ui(n,t));let r=n.subscribe(()=>{c.current||s(Ui(n,t))});return()=>{r(),n.dispose(),i(e=>e===n?null:e)}},u=[e,t],n[3]=t,n[4]=e,n[5]=l,n[6]=u):(l=n[5],u=n[6]),(0,Q.useEffect)(l,u);let d;n[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{c.current=!0},n[7]=d):d=n[7];let p;n[8]!==r||n[9]!==t||n[10]!==o?(p=()=>{c.current=!1,r&&o!==Ui(r,t)&&r.patch({[t]:o})},n[8]=r,n[9]=t,n[10]=o,n[11]=p):p=n[11];let m;return n[12]!==p||n[13]!==o?(m={value:o,setValue:s,onFocus:d,onBlur:p},n[12]=p,n[13]=o,n[14]=m):m=n[14],m}function Gi(e){let t=(0,Z.c)(76),{provider:n,name:r,folder:i,onRename:a,nameError:o}=e,{_:s}=g(),c=(0,Q.useId)(),l=(0,Q.useId)(),u=(0,Q.useId)(),d=(0,Q.useId)(),f=Wi(n,`title`),p=Wi(n,`description`),[m,_]=(0,Q.useState)(r),v,y;t[0]===r?(v=t[1],y=t[2]):(v=()=>_(r),y=[r],t[0]=r,t[1]=v,t[2]=y),(0,Q.useEffect)(v,y);let b,x;t[3]===m?(b=t[4],x=t[5]):(x=m.trim(),b=x!==``&&!R.test(x),t[3]=m,t[4]=b,t[5]=x);let S=b,C;t[6]!==r||t[7]!==S||t[8]!==a||t[9]!==x?(C=function(){a&&(S||x===``||x===r||a(x))},t[6]=r,t[7]=S,t[8]=a,t[9]=x,t[10]=C):C=t[10];let w=C,T=S||!!o,E;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(h,{id:`l_UFPv`}),t[11]=E):E=t[11];let D;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(tt,{className:`size-3.5`}),t[12]=D):D=t[12];let O;t[13]===s?O=t[14]:(O=s({id:`ugoTXs`}),t[13]=s,t[14]=O);let k=i||`/`,A;t[15]!==d||t[16]!==k?(A=(0,$.jsx)(Ae,{id:d,value:k,readOnly:!0,className:`h-8 border-input bg-transparent px-2 font-mono text-muted-foreground shadow-none`}),t[15]=d,t[16]=k,t[17]=A):A=t[17];let j;t[18]!==d||t[19]!==O||t[20]!==A?(j=(0,$.jsx)(ge,{icon:D,label:O,htmlFor:d,children:A}),t[18]=d,t[19]=O,t[20]=A,t[21]=j):j=t[21];let M;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsx)(ve,{className:`size-3.5`}),t[22]=M):M=t[22];let N;t[23]===s?N=t[24]:(N=s({id:`XmJfZT`}),t[23]=s,t[24]=N);let P;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(P=e=>_(e.target.value),t[25]=P):P=t[25];let F;t[26]!==w||t[27]!==m||t[28]!==c||t[29]!==T?(F=(0,$.jsx)(Ae,{id:c,"data-testid":`template-name-input`,value:m,onChange:P,onBlur:w,onKeyDown:Ki,"aria-invalid":T,className:`h-8 border-input bg-transparent px-2 font-mono shadow-none focus-visible:bg-muted/30`}),t[26]=w,t[27]=m,t[28]=c,t[29]=T,t[30]=F):F=t[30];let I;t[31]!==o||t[32]!==T?(I=T?(0,$.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-destructive`,children:o||(0,$.jsx)(h,{id:`lI0Td2`,components:{0:(0,$.jsx)(`code`,{className:`font-mono`}),1:(0,$.jsx)(`code`,{className:`font-mono`})}})}):(0,$.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,$.jsx)(h,{id:`QfFBdJ`})}),t[31]=o,t[32]=T,t[33]=I):I=t[33];let L;t[34]!==c||t[35]!==N||t[36]!==F||t[37]!==I?(L=(0,$.jsxs)(ge,{icon:M,label:N,htmlFor:c,children:[F,I]}),t[34]=c,t[35]=N,t[36]=F,t[37]=I,t[38]=L):L=t[38];let z;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,$.jsx)(ve,{className:`size-3.5`}),t[39]=z):z=t[39];let B;t[40]===s?B=t[41]:(B=s({id:`q7F5am`}),t[40]=s,t[41]=B);let V;t[42]===f?V=t[43]:(V=e=>f.setValue(e.target.value),t[42]=f,t[43]=V);let H;t[44]!==V||t[45]!==f.onBlur||t[46]!==f.onFocus||t[47]!==f.value||t[48]!==l?(H=(0,$.jsx)(Ae,{id:l,"data-testid":`template-title-input`,value:f.value,onChange:V,onFocus:f.onFocus,onBlur:f.onBlur,className:`h-8 border-input bg-transparent px-2 shadow-none focus-visible:bg-muted/30`}),t[44]=V,t[45]=f.onBlur,t[46]=f.onFocus,t[47]=f.value,t[48]=l,t[49]=H):H=t[49];let ee;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,$.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,$.jsx)(h,{id:`5e1Dri`})}),t[50]=ee):ee=t[50];let U;t[51]!==B||t[52]!==H||t[53]!==l?(U=(0,$.jsxs)(ge,{icon:z,label:B,htmlFor:l,children:[H,ee]}),t[51]=B,t[52]=H,t[53]=l,t[54]=U):U=t[54];let W;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,$.jsx)(ve,{className:`size-3.5`}),t[55]=W):W=t[55];let G;t[56]===s?G=t[57]:(G=s({id:`eTsJYJ`}),t[56]=s,t[57]=G);let K;t[58]===p?K=t[59]:(K=e=>p.setValue(e.target.value),t[58]=p,t[59]=K);let q;t[60]!==p.onBlur||t[61]!==p.onFocus||t[62]!==p.value||t[63]!==u||t[64]!==K?(q=(0,$.jsx)($e,{id:u,"data-testid":`template-description-input`,value:p.value,onChange:K,onFocus:p.onFocus,onBlur:p.onBlur,className:`min-h-16 resize-none border-input bg-transparent px-2 py-1.5 shadow-none focus-visible:bg-muted/30`}),t[60]=p.onBlur,t[61]=p.onFocus,t[62]=p.value,t[63]=u,t[64]=K,t[65]=q):q=t[65];let J;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,$.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,$.jsx)(h,{id:`sFhaTJ`})}),t[66]=J):J=t[66];let Y;t[67]!==u||t[68]!==G||t[69]!==q?(Y=(0,$.jsxs)(ge,{icon:W,label:G,htmlFor:u,children:[q,J]}),t[67]=u,t[68]=G,t[69]=q,t[70]=Y):Y=t[70];let X;return t[71]!==j||t[72]!==L||t[73]!==U||t[74]!==Y?(X=(0,$.jsxs)(de,{title:E,className:`pt-4 pb-2`,children:[j,L,U,Y]}),t[71]=j,t[72]=L,t[73]=U,t[74]=Y,t[75]=X):X=t[75],X}function Ki(e){e.key===`Enter`&&e.currentTarget.blur()}function qi(e){let t=(0,Z.c)(22),{docName:n,provider:r}=e,i;t[0]===n?i=t[1]:(i=N(n),t[0]=n,t[1]=i);let a=i;if(a?.kind===`skill`){if(a.rel!==null){let e;return t[2]===r?e=t[3]:(e=(0,$.jsx)(ji,{provider:r}),t[2]=r,t[3]=e),e}let e;return t[4]!==a.name||t[5]!==a.scope||t[6]!==r?(e=(0,$.jsx)(Xi,{provider:r,scope:a.scope,name:a.name}),t[4]=a.name,t[5]=a.scope,t[6]=r,t[7]=e):e=t[7],e}let o;t[8]===n?o=t[9]:(o=je(n),t[8]=n,t[9]=o);let s=o;if(s){let e;return t[10]!==s||t[11]!==r?(e=(0,$.jsx)(Xi,{provider:r,scope:`project`,name:s}),t[10]=s,t[11]=r,t[12]=e):e=t[12],e}let c;t[13]===n?c=t[14]:(c=B(n),t[13]=n,t[14]=c);let l=c;if(l){let e;return t[15]!==n||t[16]!==l.folder||t[17]!==l.name||t[18]!==r?(e=(0,$.jsx)(Zi,{provider:r,docName:n,folder:l.folder,name:l.name}),t[15]=n,t[16]=l.folder,t[17]=l.name,t[18]=r,t[19]=e):e=t[19],e}if(F(n)){let e;return t[20]===r?e=t[21]:(e=(0,$.jsx)(ji,{provider:r}),t[20]=r,t[21]=e),e}return null}function Ji(){let e=(0,Z.c)(6),{openTarget:t,closeDocument:n,setSkillsSidebar:r,activeDocName:i,openTabs:a}=s(),o;return e[0]!==i||e[1]!==n||e[2]!==a||e[3]!==t||e[4]!==r?(o=(e,o)=>{if(e===o)return;Ne(o)&&r(!0);let s={kind:`doc`,target:o,docName:o};i===e?(t(s,{tabBehavior:`replace-active`}),De(Oe(o))):a.some(t=>Me(t)===e)&&(t(s),n(e))},e[0]=i,e[1]=n,e[2]=a,e[3]=t,e[4]=r,e[5]=o):o=e[5],o}function Yi(){let e=(0,Z.c)(3),{_:t}=g(),n=Ji(),r;return e[0]!==t||e[1]!==n?(r=async(e,r)=>{let i=await Fe({scope:e.scope,fromName:e.name,toName:r});if(!i.ok)return te.error(t({id:`zKxoPm`,values:{0:e.name,1:i.error}})),i;te.success(t({id:`B6NpZ7`,values:{next:r}}));let a=e.scope===`project`&&i.to!==void 0?`${i.to.replace(/\/+$/,``)}/SKILL`:L(e.scope,r);return n(e.scope===`project`&&i.to!==void 0?`${i.to.split(`/`).slice(0,-1).join(`/`)}/${e.name}/SKILL`:L(e.scope,e.name),a),i},e[0]=t,e[1]=n,e[2]=r):r=e[2],r}function Xi(e){let t=(0,Z.c)(10),{provider:n,scope:r,name:i}=e,a=Yi(),[o,s]=(0,Q.useState)(null),c;t[0]!==i||t[1]!==a||t[2]!==r?(c=async function(e){s(null);let t=await a({scope:r,name:i},e);t.ok||s(t.error)},t[0]=i,t[1]=a,t[2]=r,t[3]=c):c=t[3];let l=c,u;return t[4]!==l||t[5]!==i||t[6]!==n||t[7]!==o||t[8]!==r?(u=(0,$.jsx)(Bi,{provider:n,scope:r,name:i,onRename:l,nameError:o}),t[4]=l,t[5]=i,t[6]=n,t[7]=o,t[8]=r,t[9]=u):u=t[9],u}function Zi(e){let t=(0,Z.c)(12),{provider:n,docName:r,folder:i,name:a}=e,{_:o}=g(),s=Ji(),[c,l]=(0,Q.useState)(null),u;t[0]!==o||t[1]!==r||t[2]!==i||t[3]!==a||t[4]!==s?(u=async function(e){l(null);let t=await xe({fromFolder:i,fromName:a,toFolder:i,toName:e});if(!t.ok){l(t.error),te.error(o({id:`gk_-qj`,values:{0:t.error}}));return}te.success(o({id:`YKLP_-`})),s(r,X(i,e))},t[0]=o,t[1]=r,t[2]=i,t[3]=a,t[4]=s,t[5]=u):u=t[5];let d=u,f;return t[6]!==i||t[7]!==d||t[8]!==a||t[9]!==n||t[10]!==c?(f=(0,$.jsx)(Gi,{provider:n,name:a,folder:i,onRename:d,nameError:c}),t[6]=i,t[7]=d,t[8]=a,t[9]=n,t[10]=c,t[11]=f):f=t[11],f}export{Xn as _,Li as a,Zr as c,Gr as d,qr as f,Qn as g,zr as h,Ri as i,Jr as l,kr as m,Ji as n,zi as o,Ir as p,Yi as r,ji as s,qi as t,Xr as u,nt as v};
@@ -0,0 +1 @@
1
+ import{t as e}from"./ManagedArtifactProperties-Dhv2wo_H.js";export{e as ManagedArtifactProperties};