kennel 0.2.18 → 0.2.20

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 (120) hide show
  1. package/dist/core/runtime.js +5 -5
  2. package/dist/package/preview.js +5 -5
  3. package/package.json +2 -2
  4. package/web/assets/{abnfDiagram-VRR7QNED-BHyQWgE7.js → abnfDiagram-VRR7QNED-1RdiIYIR.js} +1 -1
  5. package/web/assets/app-CEQAoxzL.js +2 -0
  6. package/web/assets/{app-options-CKc3uI_8.js → app-options-CIiczgaQ.js} +1 -1
  7. package/web/assets/app-view-header-CNImosi9.js +1 -0
  8. package/web/assets/{arc-iqMSyq0j.js → arc-DCuRiob1.js} +1 -1
  9. package/web/assets/{architectureDiagram-ZJ3FMSHR-icE1qR4S.js → architectureDiagram-ZJ3FMSHR-CAcGR7BC.js} +1 -1
  10. package/web/assets/{ask-tray-DYxvqV-2.js → ask-tray-DpWLca3e.js} +1 -1
  11. package/web/assets/{blockDiagram-677ZJIJ3-DvszZf5O.js → blockDiagram-677ZJIJ3-B404lYhT.js} +1 -1
  12. package/web/assets/{c4Diagram-LMCZKHZV-DKGTFJdP.js → c4Diagram-LMCZKHZV-m6CP9WKP.js} +1 -1
  13. package/web/assets/channel-CGNx58wi.js +1 -0
  14. package/web/assets/{check-Cfaum8KK.js → check-DjJ4znpk.js} +1 -1
  15. package/web/assets/{chevron-down-BX9NAmJK.js → chevron-down-CiyxliRS.js} +1 -1
  16. package/web/assets/{chevron-right-ztDuzaVJ.js → chevron-right-BaJja2sG.js} +1 -1
  17. package/web/assets/{chevron-up-DuJcPAvZ.js → chevron-up-Xv7ii00h.js} +1 -1
  18. package/web/assets/{chunk-2Q5K7J3B-DfHQU7-4.js → chunk-2Q5K7J3B-lofRULSz.js} +1 -1
  19. package/web/assets/{chunk-32BRIVSS-CGVIeMh2.js → chunk-32BRIVSS-BtdUGMBQ.js} +1 -1
  20. package/web/assets/{chunk-5VM5RSS4-YC-XnadT.js → chunk-5VM5RSS4-BBjGl_Dr.js} +1 -1
  21. package/web/assets/{chunk-EX3LRPZG-D9hAmjFx.js → chunk-EX3LRPZG-DM3Qu278.js} +1 -1
  22. package/web/assets/{chunk-JWPE2WC7-CZJ17mca.js → chunk-JWPE2WC7-Bp1ws-G7.js} +1 -1
  23. package/web/assets/{chunk-MOJQB5TN-6c2Jo2zi.js → chunk-MOJQB5TN-C7smXTrN.js} +1 -1
  24. package/web/assets/{chunk-RYQCIY6F-1Nn1hRKy.js → chunk-RYQCIY6F-DODJCmXB.js} +1 -1
  25. package/web/assets/{chunk-V7JOEXUC-D1yjMw1v.js → chunk-V7JOEXUC-C7fI1RPs.js} +1 -1
  26. package/web/assets/{chunk-VR4S4FIN-BEXJFqwW.js → chunk-VR4S4FIN-BkMRGbPv.js} +1 -1
  27. package/web/assets/{chunk-XXDRQBXY-B8VOyKvi.js → chunk-XXDRQBXY-DGKhiMOo.js} +1 -1
  28. package/web/assets/classDiagram-OUVF2IWQ-CepcbkQI.js +1 -0
  29. package/web/assets/classDiagram-v2-EOCWNBFH-CepcbkQI.js +1 -0
  30. package/web/assets/{client-BrGya3CX.js → client-Bs3Sdel1.js} +2 -2
  31. package/web/assets/{client-C7VkMvLG.js → client-Bz9gxOoP.js} +2 -2
  32. package/web/assets/{command-Y1kMd3Z_.js → command-B-4JoDzT.js} +1 -1
  33. package/web/assets/{copy-COuKJWiP.js → copy-DKl_cZLH.js} +1 -1
  34. package/web/assets/{copy-context-DGGuwV3t.js → copy-context-Bj8Sfpo7.js} +1 -1
  35. package/web/assets/{cose-bilkent-JH36ORCC-DPz8lvQv.js → cose-bilkent-JH36ORCC-rQPbqPgO.js} +1 -1
  36. package/web/assets/{cynefin-VYW2F7L2-BFTKvFOB.js → cynefin-VYW2F7L2-Co86WDlY.js} +1 -1
  37. package/web/assets/{cynefinDiagram-TSTJHNR4-DMEVtV_N.js → cynefinDiagram-TSTJHNR4-C9V3Tu3i.js} +1 -1
  38. package/web/assets/{dagre-VKFMJZFB-DBfLDvQQ.js → dagre-VKFMJZFB-2FzdH1tO.js} +1 -1
  39. package/web/assets/{diagram-FQU43EPY-Hg6dezar.js → diagram-FQU43EPY-D8oGdGs0.js} +1 -1
  40. package/web/assets/{diagram-G47NLZAW-B3By8CC3.js → diagram-G47NLZAW-Bav2L_9E.js} +1 -1
  41. package/web/assets/{diagram-NH7WQ7WH-VX-G6EM9.js → diagram-NH7WQ7WH-CxOSrenv.js} +1 -1
  42. package/web/assets/{diagram-OA4YK3LP-BDqJrmLH.js → diagram-OA4YK3LP-Dapxn_y5.js} +1 -1
  43. package/web/assets/{diagram-WEI45ONY-E_AxKlsP.js → diagram-WEI45ONY-CGAvJVWu.js} +1 -1
  44. package/web/assets/{document-CPUr6Ihg.js → document-C4ERzZZ-.js} +3 -3
  45. package/web/assets/{ebnfDiagram-CCIWWBDH-GqIG7eta.js → ebnfDiagram-CCIWWBDH-CmJpnBTF.js} +1 -1
  46. package/web/assets/{ellipsis-D2HGbhJm.js → ellipsis-DIDqkP8k.js} +1 -1
  47. package/web/assets/{entities-CKW3uiVH.js → entities-Ba9UFGWQ.js} +1 -1
  48. package/web/assets/{erDiagram-Q63AITRT-dYQlw4qh.js → erDiagram-Q63AITRT-BeWglGbe.js} +1 -1
  49. package/web/assets/{file-text-DcPqwYq5.js → file-text-C3hyr-Ql.js} +1 -1
  50. package/web/assets/{file-viewer-7SOU9CiS.js → file-viewer-CYCdL53W.js} +1 -1
  51. package/web/assets/{flowDiagram-23GEKE2U-Pc0YdspI.js → flowDiagram-23GEKE2U-DQSrCvnP.js} +1 -1
  52. package/web/assets/folder-filter-bar-Bl30Jv6B.js +4 -0
  53. package/web/assets/folder-image-Cy-8Vgmd.js +1 -0
  54. package/web/assets/folder-landing-BiswmWY0.js +55 -0
  55. package/web/assets/{folder-list-F-yrc7-p.js → folder-list-BPufqaem.js} +1 -1
  56. package/web/assets/folder-mobile-bar-Dxsu-jUM.js +1 -0
  57. package/web/assets/{folder-open-DOYzvzsN.js → folder-open-CqSoJtKT.js} +1 -1
  58. package/web/assets/folder-plugin-view-DiZbM5qv.js +2 -0
  59. package/web/assets/{ganttDiagram-NO4QXBWP-DZJOsUZz.js → ganttDiagram-NO4QXBWP-BHGXM83R.js} +1 -1
  60. package/web/assets/{gitGraphDiagram-IHSO6WYX-CgLODdVy.js → gitGraphDiagram-IHSO6WYX-DHoetr2P.js} +1 -1
  61. package/web/assets/index-B6ap1Jz7.js +1 -0
  62. package/web/assets/{index-D4WzK5IV.js → index-BSHr1oc9.js} +1 -1
  63. package/web/assets/{index-DnD4X7zc.js → index-CHgBEfsO.js} +1 -1
  64. package/web/assets/{index-BjrX8Pf-.js → index-CKJsEQtp.js} +1 -1
  65. package/web/assets/index-DbD-bwdm.js +2 -0
  66. package/web/assets/index-wmrfz8OS.css +1 -0
  67. package/web/assets/{infoDiagram-FWYZ7A6U-DX-ufAQe.js → infoDiagram-FWYZ7A6U-09XQL5OF.js} +1 -1
  68. package/web/assets/{ishikawaDiagram-FXEZZL3T-CuwECnGF.js → ishikawaDiagram-FXEZZL3T-zdZcsCSy.js} +1 -1
  69. package/web/assets/{journeyDiagram-5HDEW3XC-2zmihEh6.js → journeyDiagram-5HDEW3XC-Cyviy-mf.js} +1 -1
  70. package/web/assets/{kanban-definition-HUTT4EX6-BdQsyGLl.js → kanban-definition-HUTT4EX6-BEOdHBFJ.js} +1 -1
  71. package/web/assets/{linear-B-kLzgKS.js → linear-B0Elyctv.js} +1 -1
  72. package/web/assets/{mermaid.core-aYzB5any.js → mermaid.core-BEwF5fZo.js} +4 -4
  73. package/web/assets/{metadata-Clyy4qXZ.js → metadata-Dy1R-He2.js} +1 -1
  74. package/web/assets/{mindmap-definition-LN4V7U3C-BNBOyFsl.js → mindmap-definition-LN4V7U3C-DW5Nc3Z2.js} +1 -1
  75. package/web/assets/{pegDiagram-2B236MQR-BAvwpPbi.js → pegDiagram-2B236MQR-Cj3gTzwg.js} +1 -1
  76. package/web/assets/{pieDiagram-ENE6RG2P-BXCS7abV.js → pieDiagram-ENE6RG2P-DxF16ujD.js} +1 -1
  77. package/web/assets/plugin-host-modules-C_FG5LYc.js +10 -0
  78. package/web/assets/{plus-B3J-m78K.js → plus-TM7voyHO.js} +1 -1
  79. package/web/assets/popover-DvKy7gF6.js +9 -0
  80. package/web/assets/{project-search-dialog-B56ZSDPJ.js → project-search-dialog-Bm4cKotY.js} +1 -1
  81. package/web/assets/{quadrantDiagram-ABIIQ3AL-Coo6fFHf.js → quadrantDiagram-ABIIQ3AL-D6lKmduJ.js} +1 -1
  82. package/web/assets/{railroadDiagram-RFXS5EU6-BaNxlV1J.js → railroadDiagram-RFXS5EU6-CNMzdL0J.js} +1 -1
  83. package/web/assets/{requirementDiagram-TGXJPOKE-LMF4IfnZ.js → requirementDiagram-TGXJPOKE-DCWUvc_i.js} +1 -1
  84. package/web/assets/{sankeyDiagram-HTMAVEWB-C-yWLNPa.js → sankeyDiagram-HTMAVEWB-CQ4kDW3E.js} +1 -1
  85. package/web/assets/{search-DImG1V67.js → search-Cv1HqxUc.js} +1 -1
  86. package/web/assets/{search-BPF3ARQ9.js → search-Cx23EFPc.js} +1 -1
  87. package/web/assets/{selection-popup-B_zAXt8R.js → selection-popup-DPC2dc_s.js} +3 -3
  88. package/web/assets/{sequenceDiagram-DBY2YBRQ-DeHqYdg4.js → sequenceDiagram-DBY2YBRQ-C-ygrC5m.js} +1 -1
  89. package/web/assets/{sizeCapture-X5ZJPWSS-D2CDPOxg.js → sizeCapture-X5ZJPWSS-CWCSfdrg.js} +1 -1
  90. package/web/assets/{stateDiagram-2N3HPSRC-CNIYaeQH.js → stateDiagram-2N3HPSRC-BUJ8nxcE.js} +1 -1
  91. package/web/assets/stateDiagram-v2-6OUMAXLB-DgubHPLq.js +1 -0
  92. package/web/assets/{swimlanes-5IMT3BWC-CDsDmFBa.js → swimlanes-5IMT3BWC-rw0Loza_.js} +2 -2
  93. package/web/assets/swimlanesDiagram-G3AALYLV-CxNu_14L.js +8 -0
  94. package/web/assets/{timeline-definition-FHXFAJF6-C5ZIg5nr.js → timeline-definition-FHXFAJF6-D3kXwv5v.js} +1 -1
  95. package/web/assets/{vennDiagram-L72KCM5P-D6pkrFwZ.js → vennDiagram-L72KCM5P-DZhfR6LC.js} +1 -1
  96. package/web/assets/{view-context-DKIrg--H.js → view-context-DyuiMZAo.js} +3 -3
  97. package/web/assets/{viewer-capabilities-1a6IsY4l.js → viewer-capabilities-BkBR084B.js} +1 -1
  98. package/web/assets/{wardleyDiagram-EHGQE667-Yf1WJw-3.js → wardleyDiagram-EHGQE667-CzwAW4nO.js} +1 -1
  99. package/web/assets/{x-BZE9W34m.js → x-GGS-h4Nm.js} +1 -1
  100. package/web/assets/{xychartDiagram-FW5EYKEG-Ds8KCXv_.js → xychartDiagram-FW5EYKEG-CebaePFD.js} +1 -1
  101. package/web/index.html +2 -2
  102. package/web/assets/app-B0JvGgzJ.js +0 -2
  103. package/web/assets/app-view-header-O3qQjBZc.js +0 -1
  104. package/web/assets/channel-Dl1wIhHR.js +0 -1
  105. package/web/assets/classDiagram-OUVF2IWQ-B1y0va4e.js +0 -1
  106. package/web/assets/classDiagram-v2-EOCWNBFH-B1y0va4e.js +0 -1
  107. package/web/assets/folder-DTZcp2A6.js +0 -1
  108. package/web/assets/folder-filter-bar-B-i-4rbo.js +0 -4
  109. package/web/assets/folder-image-DU_poo8q.js +0 -1
  110. package/web/assets/folder-landing-UVkNL9G8.js +0 -55
  111. package/web/assets/folder-mobile-bar-DJPrKpxo.js +0 -1
  112. package/web/assets/folder-plugin-view-BT7to93n.js +0 -2
  113. package/web/assets/index-B9Ju-85a.js +0 -2
  114. package/web/assets/index-BFd02VlT.js +0 -1
  115. package/web/assets/index-BpMdYK6_.js +0 -1
  116. package/web/assets/index-uY9jLiL5.css +0 -1
  117. package/web/assets/plugin-host-modules-DEtx9Hq7.js +0 -10
  118. package/web/assets/popover-1LXR77r7.js +0 -9
  119. package/web/assets/stateDiagram-v2-6OUMAXLB-Kn8FnYqS.js +0 -1
  120. package/web/assets/swimlanesDiagram-G3AALYLV-FhTXuqD7.js +0 -8
@@ -1 +1 @@
1
- import{g as m,r as l,d as n}from"./chunk-MOJQB5TN-6c2Jo2zi.js";import{p}from"./chunk-JWPE2WC7-CZJ17mca.js";import{_ as t,l as o}from"./mermaid.core-aYzB5any.js";import{a as u,M as f}from"./cynefin-VYW2F7L2-BFTKvFOB.js";import"./index-B9Ju-85a.js";import"./react-Dh7j6h1K.js";import"./markdown-BvBsne3X.js";var c=u().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new f(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},$={parser:g,db:n,renderer:l,styles:m};export{$ as diagram};
1
+ import{g as m,r as l,d as n}from"./chunk-MOJQB5TN-C7smXTrN.js";import{p}from"./chunk-JWPE2WC7-Bp1ws-G7.js";import{_ as t,l as o}from"./mermaid.core-BEwF5fZo.js";import{a as u,M as f}from"./cynefin-VYW2F7L2-Co86WDlY.js";import"./index-DbD-bwdm.js";import"./react-Dh7j6h1K.js";import"./markdown-BvBsne3X.js";var c=u().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new f(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},$={parser:g,db:n,renderer:l,styles:m};export{$ as diagram};
@@ -1 +1 @@
1
- import{c}from"./index-BjrX8Pf-.js";const e=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],r=c("ellipsis",e);export{r as E};
1
+ import{c}from"./index-CKJsEQtp.js";const e=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],r=c("ellipsis",e);export{r as E};
@@ -1,4 +1,4 @@
1
- import{r as m,j as e}from"./react-Dh7j6h1K.js";import{a as b,b as g,u as f,L as j}from"./tanstack-CirxkzEx.js";import{a as N}from"./index-BjrX8Pf-.js";import"./markdown-BvBsne3X.js";import"./index-B9Ju-85a.js";function v(t){return{entity:t.get("entity")??void 0,q:t.get("q")??void 0,root:t.get("root")??void 0}}function L(){const t=b(),a=g(),n=new URLSearchParams(t.search),o=f({queryFn:({signal:s})=>N.entities(v(n),{signal:s}),queryKey:["entities",n.toString()]}),[l,p]=m.useState(n.get("q")??""),[d,h]=m.useState(n.get("root")??""),r=o.data,x=r?.rootPath==="";function u(s){s.preventDefault();const i=new URLSearchParams;l&&i.set("q",l),d&&i.set("root",d),a({to:`/entities?${i}`})}return e.jsx("main",{className:"min-h-screen bg-[#f4efe5] text-stone-900",children:e.jsxs("div",{className:`mx-auto grid w-full max-w-[1500px] gap-6 px-4 py-6 sm:px-6
1
+ import{r as m,j as e}from"./react-Dh7j6h1K.js";import{a as b,b as g,u as f,L as j}from"./tanstack-CirxkzEx.js";import{a as N}from"./index-CKJsEQtp.js";import"./markdown-BvBsne3X.js";import"./index-DbD-bwdm.js";function v(t){return{entity:t.get("entity")??void 0,q:t.get("q")??void 0,root:t.get("root")??void 0}}function L(){const t=b(),a=g(),n=new URLSearchParams(t.search),o=f({queryFn:({signal:s})=>N.entities(v(n),{signal:s}),queryKey:["entities",n.toString()]}),[l,p]=m.useState(n.get("q")??""),[d,h]=m.useState(n.get("root")??""),r=o.data,x=r?.rootPath==="";function u(s){s.preventDefault();const i=new URLSearchParams;l&&i.set("q",l),d&&i.set("root",d),a({to:`/entities?${i}`})}return e.jsx("main",{className:"min-h-screen bg-[#f4efe5] text-stone-900",children:e.jsxs("div",{className:`mx-auto grid w-full max-w-[1500px] gap-6 px-4 py-6 sm:px-6
2
2
  lg:grid-cols-[360px_minmax(0,1fr)] lg:px-10`,children:[e.jsxs("aside",{className:"space-y-5 lg:sticky lg:top-6 lg:self-start",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(j,{className:"font-serif text-2xl tracking-tight",to:"/",search:{path:void 0},children:"Kennel"}),e.jsx("span",{className:`rounded-full bg-emerald-800 px-3 py-1 text-[10px]
3
3
  font-bold tracking-[0.18em] text-white uppercase`,children:"Entities"})]}),e.jsxs("form",{className:`space-y-3 rounded-3xl border border-stone-300 bg-white/80
4
4
  p-4`,onSubmit:u,children:[e.jsxs("label",{className:`block text-xs font-bold tracking-[0.14em]
@@ -1,4 +1,4 @@
1
- import{g as Bt}from"./chunk-XXDRQBXY-B8VOyKvi.js";import{s as Ft}from"./chunk-VR4S4FIN-BEXJFqwW.js";import{_ as d,b as Yt,a as Pt,s as zt,g as Gt,n as Kt,o as Ut,c as rt,l as V,p as Zt,q as jt,r as Wt,t as qt,u as Qt,v as Xt,d as Ht,x as Jt}from"./mermaid.core-aYzB5any.js";import{c as $t}from"./channel-Dl1wIhHR.js";import"./index-B9Ju-85a.js";import"./react-Dh7j6h1K.js";import"./markdown-BvBsne3X.js";var gt=(function(){var s=d(function(I,n,a,o){for(a=a||{},o=I.length;o--;a[I[o]]=n);return a},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],c=[1,10],h=[1,11],l=[1,12],p=[1,13],y=[1,23],u=[1,24],m=[1,25],W=[1,26],q=[1,27],S=[1,19],Q=[1,28],B=[1,29],D=[1,20],R=[1,18],T=[1,21],C=[1,22],at=[1,36],ct=[1,37],ot=[1,38],lt=[1,39],ht=[1,40],F=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,66,67,68,69,70],O=[1,45],N=[1,46],Y=[1,55],P=[40,48,50,51,52,71,72],z=[1,66],G=[1,64],A=[1,61],K=[1,65],U=[1,67],X=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],bt=[66,67,68,69,70],kt=[1,85],mt=[1,84],Et=[1,82],St=[1,83],Tt=[6,10,42,47],L=[6,10,13,41,42,47,48,49],H=[1,93],J=[1,92],$=[1,91],Z=[19,58],Ot=[1,102],Nt=[1,101],ut=[19,58,61,63],dt={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType:65,ZERO_OR_ONE:66,ZERO_OR_MORE:67,ONE_OR_MORE:68,ONLY_ONE:69,MD_PARENT:70,NON_IDENTIFYING:71,IDENTIFYING:72,WORD:73,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",59:"?",61:",",62:"ATTRIBUTE_KEY",63:"COMMENT",66:"ZERO_OR_ONE",67:"ZERO_OR_MORE",68:"ONE_OR_MORE",69:"ONLY_ONE",70:"MD_PARENT",71:"NON_IDENTIFYING",72:"IDENTIFYING",73:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[14,1],[14,1],[14,1]],performAction:d(function(n,a,o,r,f,t,j){var e=t.length-1;switch(f){case 1:break;case 2:this.$=[];break;case 3:t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 5:this.$=t[e];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[e-4]),r.addEntity(t[e-2]),r.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:r.addEntity(t[e-8]),r.addEntity(t[e-4]),r.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),r.setClass([t[e-8]],t[e-6]),r.setClass([t[e-4]],t[e-2]);break;case 10:r.addEntity(t[e-6]),r.addEntity(t[e-2]),r.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),r.setClass([t[e-6]],t[e-4]);break;case 11:r.addEntity(t[e-6]),r.addEntity(t[e-4]),r.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),r.setClass([t[e-4]],t[e-2]);break;case 12:r.addEntity(t[e-3]),r.addAttributes(t[e-3],t[e-1]);break;case 13:r.addEntity(t[e-5]),r.addAttributes(t[e-5],t[e-1]),r.setClass([t[e-5]],t[e-3]);break;case 14:r.addEntity(t[e-2]);break;case 15:r.addEntity(t[e-4]),r.setClass([t[e-4]],t[e-2]);break;case 16:r.addEntity(t[e]);break;case 17:r.addEntity(t[e-2]),r.setClass([t[e-2]],t[e]);break;case 18:r.addEntity(t[e-6],t[e-4]),r.addAttributes(t[e-6],t[e-1]);break;case 19:r.addEntity(t[e-8],t[e-6]),r.addAttributes(t[e-8],t[e-1]),r.setClass([t[e-8]],t[e-3]);break;case 20:r.addEntity(t[e-5],t[e-3]);break;case 21:r.addEntity(t[e-7],t[e-5]),r.setClass([t[e-7]],t[e-2]);break;case 22:r.addEntity(t[e-3],t[e-1]);break;case 23:r.addEntity(t[e-5],t[e-3]),r.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[e-3],r.addClass(t[e-2],t[e-1]);break;case 37:case 38:case 59:case 68:this.$=[t[e]];break;case 39:case 40:this.$=t[e-2].concat([t[e]]);break;case 41:this.$=t[e-2],r.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],r.addCssStyles(t[e-2],t[e-1]);break;case 43:this.$=[t[e]];break;case 44:t[e-2].push(t[e]),this.$=t[e-2];break;case 46:this.$=t[e-1]+t[e];break;case 54:case 80:case 81:this.$=t[e].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 82:this.$=t[e];break;case 60:t[e].push(t[e-1]),this.$=t[e];break;case 61:this.$={type:t[e-1],name:t[e]};break;case 62:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 63:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 64:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 65:case 67:case 70:this.$=t[e];break;case 66:this.$=t[e-1]+t[e];break;case 69:t[e-2].push(t[e]),this.$=t[e-2];break;case 71:this.$=t[e].replace(/"/g,"");break;case 72:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 73:this.$=r.Cardinality.ZERO_OR_ONE;break;case 74:this.$=r.Cardinality.ZERO_OR_MORE;break;case 75:this.$=r.Cardinality.ONE_OR_MORE;break;case 76:this.$=r.Cardinality.ONLY_ONE;break;case 77:this.$=r.Cardinality.MD_PARENT;break;case 78:this.$=r.Identification.NON_IDENTIFYING;break;case 79:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:c,24:h,26:l,28:p,29:14,30:15,31:16,32:17,33:y,34:u,35:m,36:W,37:q,40:S,43:Q,44:B,48:D,50:R,51:T,52:C},s(i,[2,7],{1:[2,1]}),s(i,[2,3]),{9:30,11:9,22:c,24:h,26:l,28:p,29:14,30:15,31:16,32:17,33:y,34:u,35:m,36:W,37:q,40:S,43:Q,44:B,48:D,50:R,51:T,52:C},s(i,[2,5]),s(i,[2,6]),s(i,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:at,67:ct,68:ot,69:lt,70:ht}),{23:[1,41]},{25:[1,42]},{27:[1,43]},s(i,[2,27]),s(i,[2,28]),s(i,[2,29]),s(i,[2,30]),s(i,[2,31]),s(F,[2,54]),s(F,[2,55]),s(F,[2,56]),s(F,[2,57]),s(F,[2,58]),s(i,[2,32]),s(i,[2,33]),s(i,[2,34]),s(i,[2,35]),{16:44,40:O,41:N},{16:47,40:O,41:N},{16:48,40:O,41:N},s(i,[2,4]),{11:49,40:S,48:D,50:R,51:T,52:C},{16:50,40:O,41:N},{18:51,19:[1,52],53:53,54:54,58:Y},{11:56,40:S,48:D,50:R,51:T,52:C},{65:57,71:[1,58],72:[1,59]},s(P,[2,73]),s(P,[2,74]),s(P,[2,75]),s(P,[2,76]),s(P,[2,77]),s(i,[2,24]),s(i,[2,25]),s(i,[2,26]),{13:z,38:60,41:G,42:A,45:62,46:63,48:K,49:U},s(X,[2,37]),s(X,[2,38]),{16:68,40:O,41:N,42:A},{13:z,38:69,41:G,42:A,45:62,46:63,48:K,49:U},{13:[1,70],15:[1,71]},s(i,[2,17],{64:35,12:72,17:[1,73],42:A,66:at,67:ct,68:ot,69:lt,70:ht}),{19:[1,74]},s(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:Y},{55:76,58:[1,77]},{58:[2,65],59:[1,78]},{21:[1,79]},{64:80,66:at,67:ct,68:ot,69:lt,70:ht},s(bt,[2,78]),s(bt,[2,79]),{6:kt,10:mt,39:81,42:Et,47:St},{40:[1,86],41:[1,87]},s(Tt,[2,43],{46:88,13:z,41:G,48:K,49:U}),s(L,[2,45]),s(L,[2,50]),s(L,[2,51]),s(L,[2,52]),s(L,[2,53]),s(i,[2,41],{42:A}),{6:kt,10:mt,39:89,42:Et,47:St},{14:90,40:H,50:J,73:$},{16:94,40:O,41:N},{11:95,40:S,48:D,50:R,51:T,52:C},{18:96,19:[1,97],53:53,54:54,58:Y},s(i,[2,12]),{19:[2,60]},s(Z,[2,61],{56:98,57:99,60:100,62:Ot,63:Nt}),s([19,58,62,63],[2,67]),{58:[2,66]},s(i,[2,22],{15:[1,104],17:[1,103]}),s([40,48,50,51,52],[2,72]),s(i,[2,36]),{13:z,41:G,45:105,46:63,48:K,49:U},s(i,[2,47]),s(i,[2,48]),s(i,[2,49]),s(X,[2,39]),s(X,[2,40]),s(L,[2,46]),s(i,[2,42]),s(i,[2,8]),s(i,[2,80]),s(i,[2,81]),s(i,[2,82]),{13:[1,106],42:A},{13:[1,108],15:[1,107]},{19:[1,109]},s(i,[2,15]),s(Z,[2,62],{57:110,61:[1,111],63:Nt}),s(Z,[2,63]),s(ut,[2,68]),s(Z,[2,71]),s(ut,[2,70]),{18:112,19:[1,113],53:53,54:54,58:Y},{16:114,40:O,41:N},s(Tt,[2,44],{46:88,13:z,41:G,48:K,49:U}),{14:115,40:H,50:J,73:$},{16:116,40:O,41:N},{14:117,40:H,50:J,73:$},s(i,[2,13]),s(Z,[2,64]),{60:118,62:Ot},{19:[1,119]},s(i,[2,20]),s(i,[2,23],{17:[1,120],42:A}),s(i,[2,11]),{13:[1,121],42:A},s(i,[2,10]),s(ut,[2,69]),s(i,[2,18]),{18:122,19:[1,123],53:53,54:54,58:Y},{14:124,40:H,50:J,73:$},{19:[1,125]},s(i,[2,21]),s(i,[2,9]),s(i,[2,19])],defaultActions:{75:[2,60],78:[2,66]},parseError:d(function(n,a){if(a.recoverable)this.trace(n);else{var o=new Error(n);throw o.hash=a,o}},"parseError"),parse:d(function(n){var a=this,o=[0],r=[],f=[null],t=[],j=this.table,e="",et=0,At=0,Lt=2,It=1,wt=t.slice.call(arguments,1),_=Object.create(this.lexer),x={yy:{}};for(var pt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,pt)&&(x.yy[pt]=this.yy[pt]);_.setInput(n,x.yy),x.yy.lexer=_,x.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var ft=_.yylloc;t.push(ft);var Vt=_.options&&_.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Mt(b){o.length=o.length-2*b,f.length=f.length-b,t.length=t.length-b}d(Mt,"popStack");function Rt(){var b;return b=r.pop()||_.lex()||It,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=a.symbols_[b]||b),b}d(Rt,"lex");for(var g,v,k,yt,w={},st,E,Ct,it;;){if(v=o[o.length-1],this.defaultActions[v]?k=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=Rt()),k=j[v]&&j[v][g]),typeof k>"u"||!k.length||!k[0]){var _t="";it=[];for(st in j[v])this.terminals_[st]&&st>Lt&&it.push("'"+this.terminals_[st]+"'");_.showPosition?_t="Parse error on line "+(et+1)+`:
1
+ import{g as Bt}from"./chunk-XXDRQBXY-DGKhiMOo.js";import{s as Ft}from"./chunk-VR4S4FIN-BkMRGbPv.js";import{_ as d,b as Yt,a as Pt,s as zt,g as Gt,n as Kt,o as Ut,c as rt,l as V,p as Zt,q as jt,r as Wt,t as qt,u as Qt,v as Xt,d as Ht,x as Jt}from"./mermaid.core-BEwF5fZo.js";import{c as $t}from"./channel-CGNx58wi.js";import"./index-DbD-bwdm.js";import"./react-Dh7j6h1K.js";import"./markdown-BvBsne3X.js";var gt=(function(){var s=d(function(I,n,a,o){for(a=a||{},o=I.length;o--;a[I[o]]=n);return a},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],c=[1,10],h=[1,11],l=[1,12],p=[1,13],y=[1,23],u=[1,24],m=[1,25],W=[1,26],q=[1,27],S=[1,19],Q=[1,28],B=[1,29],D=[1,20],R=[1,18],T=[1,21],C=[1,22],at=[1,36],ct=[1,37],ot=[1,38],lt=[1,39],ht=[1,40],F=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,66,67,68,69,70],O=[1,45],N=[1,46],Y=[1,55],P=[40,48,50,51,52,71,72],z=[1,66],G=[1,64],A=[1,61],K=[1,65],U=[1,67],X=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],bt=[66,67,68,69,70],kt=[1,85],mt=[1,84],Et=[1,82],St=[1,83],Tt=[6,10,42,47],L=[6,10,13,41,42,47,48,49],H=[1,93],J=[1,92],$=[1,91],Z=[19,58],Ot=[1,102],Nt=[1,101],ut=[19,58,61,63],dt={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType:65,ZERO_OR_ONE:66,ZERO_OR_MORE:67,ONE_OR_MORE:68,ONLY_ONE:69,MD_PARENT:70,NON_IDENTIFYING:71,IDENTIFYING:72,WORD:73,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",59:"?",61:",",62:"ATTRIBUTE_KEY",63:"COMMENT",66:"ZERO_OR_ONE",67:"ZERO_OR_MORE",68:"ONE_OR_MORE",69:"ONLY_ONE",70:"MD_PARENT",71:"NON_IDENTIFYING",72:"IDENTIFYING",73:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[14,1],[14,1],[14,1]],performAction:d(function(n,a,o,r,f,t,j){var e=t.length-1;switch(f){case 1:break;case 2:this.$=[];break;case 3:t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 5:this.$=t[e];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[e-4]),r.addEntity(t[e-2]),r.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:r.addEntity(t[e-8]),r.addEntity(t[e-4]),r.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),r.setClass([t[e-8]],t[e-6]),r.setClass([t[e-4]],t[e-2]);break;case 10:r.addEntity(t[e-6]),r.addEntity(t[e-2]),r.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),r.setClass([t[e-6]],t[e-4]);break;case 11:r.addEntity(t[e-6]),r.addEntity(t[e-4]),r.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),r.setClass([t[e-4]],t[e-2]);break;case 12:r.addEntity(t[e-3]),r.addAttributes(t[e-3],t[e-1]);break;case 13:r.addEntity(t[e-5]),r.addAttributes(t[e-5],t[e-1]),r.setClass([t[e-5]],t[e-3]);break;case 14:r.addEntity(t[e-2]);break;case 15:r.addEntity(t[e-4]),r.setClass([t[e-4]],t[e-2]);break;case 16:r.addEntity(t[e]);break;case 17:r.addEntity(t[e-2]),r.setClass([t[e-2]],t[e]);break;case 18:r.addEntity(t[e-6],t[e-4]),r.addAttributes(t[e-6],t[e-1]);break;case 19:r.addEntity(t[e-8],t[e-6]),r.addAttributes(t[e-8],t[e-1]),r.setClass([t[e-8]],t[e-3]);break;case 20:r.addEntity(t[e-5],t[e-3]);break;case 21:r.addEntity(t[e-7],t[e-5]),r.setClass([t[e-7]],t[e-2]);break;case 22:r.addEntity(t[e-3],t[e-1]);break;case 23:r.addEntity(t[e-5],t[e-3]),r.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[e-3],r.addClass(t[e-2],t[e-1]);break;case 37:case 38:case 59:case 68:this.$=[t[e]];break;case 39:case 40:this.$=t[e-2].concat([t[e]]);break;case 41:this.$=t[e-2],r.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],r.addCssStyles(t[e-2],t[e-1]);break;case 43:this.$=[t[e]];break;case 44:t[e-2].push(t[e]),this.$=t[e-2];break;case 46:this.$=t[e-1]+t[e];break;case 54:case 80:case 81:this.$=t[e].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 82:this.$=t[e];break;case 60:t[e].push(t[e-1]),this.$=t[e];break;case 61:this.$={type:t[e-1],name:t[e]};break;case 62:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 63:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 64:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 65:case 67:case 70:this.$=t[e];break;case 66:this.$=t[e-1]+t[e];break;case 69:t[e-2].push(t[e]),this.$=t[e-2];break;case 71:this.$=t[e].replace(/"/g,"");break;case 72:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 73:this.$=r.Cardinality.ZERO_OR_ONE;break;case 74:this.$=r.Cardinality.ZERO_OR_MORE;break;case 75:this.$=r.Cardinality.ONE_OR_MORE;break;case 76:this.$=r.Cardinality.ONLY_ONE;break;case 77:this.$=r.Cardinality.MD_PARENT;break;case 78:this.$=r.Identification.NON_IDENTIFYING;break;case 79:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:c,24:h,26:l,28:p,29:14,30:15,31:16,32:17,33:y,34:u,35:m,36:W,37:q,40:S,43:Q,44:B,48:D,50:R,51:T,52:C},s(i,[2,7],{1:[2,1]}),s(i,[2,3]),{9:30,11:9,22:c,24:h,26:l,28:p,29:14,30:15,31:16,32:17,33:y,34:u,35:m,36:W,37:q,40:S,43:Q,44:B,48:D,50:R,51:T,52:C},s(i,[2,5]),s(i,[2,6]),s(i,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:at,67:ct,68:ot,69:lt,70:ht}),{23:[1,41]},{25:[1,42]},{27:[1,43]},s(i,[2,27]),s(i,[2,28]),s(i,[2,29]),s(i,[2,30]),s(i,[2,31]),s(F,[2,54]),s(F,[2,55]),s(F,[2,56]),s(F,[2,57]),s(F,[2,58]),s(i,[2,32]),s(i,[2,33]),s(i,[2,34]),s(i,[2,35]),{16:44,40:O,41:N},{16:47,40:O,41:N},{16:48,40:O,41:N},s(i,[2,4]),{11:49,40:S,48:D,50:R,51:T,52:C},{16:50,40:O,41:N},{18:51,19:[1,52],53:53,54:54,58:Y},{11:56,40:S,48:D,50:R,51:T,52:C},{65:57,71:[1,58],72:[1,59]},s(P,[2,73]),s(P,[2,74]),s(P,[2,75]),s(P,[2,76]),s(P,[2,77]),s(i,[2,24]),s(i,[2,25]),s(i,[2,26]),{13:z,38:60,41:G,42:A,45:62,46:63,48:K,49:U},s(X,[2,37]),s(X,[2,38]),{16:68,40:O,41:N,42:A},{13:z,38:69,41:G,42:A,45:62,46:63,48:K,49:U},{13:[1,70],15:[1,71]},s(i,[2,17],{64:35,12:72,17:[1,73],42:A,66:at,67:ct,68:ot,69:lt,70:ht}),{19:[1,74]},s(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:Y},{55:76,58:[1,77]},{58:[2,65],59:[1,78]},{21:[1,79]},{64:80,66:at,67:ct,68:ot,69:lt,70:ht},s(bt,[2,78]),s(bt,[2,79]),{6:kt,10:mt,39:81,42:Et,47:St},{40:[1,86],41:[1,87]},s(Tt,[2,43],{46:88,13:z,41:G,48:K,49:U}),s(L,[2,45]),s(L,[2,50]),s(L,[2,51]),s(L,[2,52]),s(L,[2,53]),s(i,[2,41],{42:A}),{6:kt,10:mt,39:89,42:Et,47:St},{14:90,40:H,50:J,73:$},{16:94,40:O,41:N},{11:95,40:S,48:D,50:R,51:T,52:C},{18:96,19:[1,97],53:53,54:54,58:Y},s(i,[2,12]),{19:[2,60]},s(Z,[2,61],{56:98,57:99,60:100,62:Ot,63:Nt}),s([19,58,62,63],[2,67]),{58:[2,66]},s(i,[2,22],{15:[1,104],17:[1,103]}),s([40,48,50,51,52],[2,72]),s(i,[2,36]),{13:z,41:G,45:105,46:63,48:K,49:U},s(i,[2,47]),s(i,[2,48]),s(i,[2,49]),s(X,[2,39]),s(X,[2,40]),s(L,[2,46]),s(i,[2,42]),s(i,[2,8]),s(i,[2,80]),s(i,[2,81]),s(i,[2,82]),{13:[1,106],42:A},{13:[1,108],15:[1,107]},{19:[1,109]},s(i,[2,15]),s(Z,[2,62],{57:110,61:[1,111],63:Nt}),s(Z,[2,63]),s(ut,[2,68]),s(Z,[2,71]),s(ut,[2,70]),{18:112,19:[1,113],53:53,54:54,58:Y},{16:114,40:O,41:N},s(Tt,[2,44],{46:88,13:z,41:G,48:K,49:U}),{14:115,40:H,50:J,73:$},{16:116,40:O,41:N},{14:117,40:H,50:J,73:$},s(i,[2,13]),s(Z,[2,64]),{60:118,62:Ot},{19:[1,119]},s(i,[2,20]),s(i,[2,23],{17:[1,120],42:A}),s(i,[2,11]),{13:[1,121],42:A},s(i,[2,10]),s(ut,[2,69]),s(i,[2,18]),{18:122,19:[1,123],53:53,54:54,58:Y},{14:124,40:H,50:J,73:$},{19:[1,125]},s(i,[2,21]),s(i,[2,9]),s(i,[2,19])],defaultActions:{75:[2,60],78:[2,66]},parseError:d(function(n,a){if(a.recoverable)this.trace(n);else{var o=new Error(n);throw o.hash=a,o}},"parseError"),parse:d(function(n){var a=this,o=[0],r=[],f=[null],t=[],j=this.table,e="",et=0,At=0,Lt=2,It=1,wt=t.slice.call(arguments,1),_=Object.create(this.lexer),x={yy:{}};for(var pt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,pt)&&(x.yy[pt]=this.yy[pt]);_.setInput(n,x.yy),x.yy.lexer=_,x.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var ft=_.yylloc;t.push(ft);var Vt=_.options&&_.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Mt(b){o.length=o.length-2*b,f.length=f.length-b,t.length=t.length-b}d(Mt,"popStack");function Rt(){var b;return b=r.pop()||_.lex()||It,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=a.symbols_[b]||b),b}d(Rt,"lex");for(var g,v,k,yt,w={},st,E,Ct,it;;){if(v=o[o.length-1],this.defaultActions[v]?k=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=Rt()),k=j[v]&&j[v][g]),typeof k>"u"||!k.length||!k[0]){var _t="";it=[];for(st in j[v])this.terminals_[st]&&st>Lt&&it.push("'"+this.terminals_[st]+"'");_.showPosition?_t="Parse error on line "+(et+1)+`:
2
2
  `+_.showPosition()+`
3
3
  Expecting `+it.join(", ")+", got '"+(this.terminals_[g]||g)+"'":_t="Parse error on line "+(et+1)+": Unexpected "+(g==It?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(_t,{text:_.match,token:this.terminals_[g]||g,line:_.yylineno,loc:ft,expected:it})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+g);switch(k[0]){case 1:o.push(g),f.push(_.yytext),t.push(_.yylloc),o.push(k[1]),g=null,At=_.yyleng,e=_.yytext,et=_.yylineno,ft=_.yylloc;break;case 2:if(E=this.productions_[k[1]][1],w.$=f[f.length-E],w._$={first_line:t[t.length-(E||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(E||1)].first_column,last_column:t[t.length-1].last_column},Vt&&(w._$.range=[t[t.length-(E||1)].range[0],t[t.length-1].range[1]]),yt=this.performAction.apply(w,[e,At,et,x.yy,k[1],f,t].concat(wt)),typeof yt<"u")return yt;E&&(o=o.slice(0,-1*E*2),f=f.slice(0,-1*E),t=t.slice(0,-1*E)),o.push(this.productions_[k[1]][0]),f.push(w.$),t.push(w._$),Ct=j[o[o.length-2]][o[o.length-1]],o.push(Ct);break;case 3:return!0}}return!0},"parse")},Dt=(function(){var I={EOF:1,parseError:d(function(a,o){if(this.yy.parser)this.yy.parser.parseError(a,o);else throw new Error(a)},"parseError"),setInput:d(function(n,a){return this.yy=a||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var a=n.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:d(function(n){var a=n.length,o=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1);var f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===r.length?this.yylloc.first_column:0)+r[r.length-o.length].length-o[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(n){this.unput(this.match.slice(n))},"less"),pastInput:d(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var n=this.pastInput(),a=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
@@ -1 +1 @@
1
- var Ue=r=>{throw TypeError(r)};var ze=(r,e,n)=>e.has(r)||Ue("Cannot "+n);var A=(r,e,n)=>(ze(r,e,"read from private field"),n?n.call(r):e.get(r)),$e=(r,e,n)=>e.has(r)?Ue("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,n),xe=(r,e,n,t)=>(ze(r,e,"write to private field"),t?t.call(r,n):e.set(r,n),n);import{r as c,j as u,i as Ht}from"./react-Dh7j6h1K.js";import{c as ue,f as De,j as pe,P as H,d as I,g as re,u as Yt,a as he,i as Xt,R as Wt,F as qt,D as Zt,b as Jt,k as Qt,h as en}from"./index-4-yQR2Lz.js";import{u as G,c as se}from"./utils-CvINCDjn.js";import{c as He,R as Ye,A as tn,C as nn,a as on}from"./index-BpMdYK6_.js";import{c as rn}from"./index-BjrX8Pf-.js";var sn=Object.defineProperty,T=(r,e)=>sn(r,"name",{value:e,configurable:!0});function Ee(r){const e=r+"CollectionProvider",[n,t]=ue(e),[o,s]=n(e,{collectionRef:{current:null},itemMap:new Map}),i=T(g=>{const{scope:R,children:y}=g,x=c.useRef(null),w=c.useRef(new Map).current;return u.jsx(o,{scope:R,itemMap:w,collectionRef:x,children:y})},"CollectionProvider");i.displayName=e;const a=r+"CollectionSlot",p=se(a),l=c.forwardRef((g,R)=>{const{scope:y,children:x}=g,w=s(a,y),_=G(R,w.collectionRef);return u.jsx(p,{ref:_,children:x})});l.displayName=a;const v=r+"CollectionItemSlot",d="data-radix-collection-item",f=se(v),h=c.forwardRef((g,R)=>{const{scope:y,children:x,...w}=g,_=c.useRef(null),P=G(R,_),b=s(v,y);return c.useEffect(()=>(b.itemMap.set(_,{ref:_,...w}),()=>{b.itemMap.delete(_)})),u.jsx(f,{[d]:"",ref:P,children:x})});h.displayName=v;function m(g){const R=s(r+"CollectionConsumer",g);return c.useCallback(()=>{const x=R.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(R.itemMap.values()).sort((b,F)=>w.indexOf(b.ref.current)-w.indexOf(F.ref.current))},[R.collectionRef,R.itemMap])}return T(m,"useCollection"),[{Provider:i,Slot:l,ItemSlot:h},m,t]}T(Ee,"createCollection");var Ve=new WeakMap,E,N,Ie=(N=class extends Map{constructor(n){super(n);$e(this,E);xe(this,E,[...super.keys()]),Ve.set(this,!0)}set(n,t){return Ve.get(this)&&(this.has(n)?A(this,E)[A(this,E).indexOf(n)]=n:A(this,E).push(n)),super.set(n,t),this}insert(n,t,o){const s=this.has(t),i=A(this,E).length,a=Te(n);let p=a>=0?a:i+a;const l=p<0||p>=i?-1:p;if(l===this.size||s&&l===this.size-1||l===-1)return this.set(t,o),this;const v=this.size+(s?0:1);a<0&&p++;const d=[...A(this,E)];let f,h=!1;for(let m=p;m<v;m++)if(p===m){let g=d[m];d[m]===t&&(g=d[m+1]),s&&this.delete(t),f=this.get(g),this.set(t,o)}else{!h&&d[m-1]===t&&(h=!0);const g=d[h?m:m-1],R=f;f=this.get(g),this.delete(g),this.set(g,R)}return this}with(n,t,o){const s=new N(this);return s.insert(n,t,o),s}before(n){const t=A(this,E).indexOf(n)-1;if(!(t<0))return this.entryAt(t)}setBefore(n,t,o){const s=A(this,E).indexOf(n);return s===-1?this:this.insert(s,t,o)}after(n){let t=A(this,E).indexOf(n);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(n,t,o){const s=A(this,E).indexOf(n);return s===-1?this:this.insert(s+1,t,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return xe(this,E,[]),super.clear()}delete(n){const t=super.delete(n);return t&&A(this,E).splice(A(this,E).indexOf(n),1),t}deleteAt(n){const t=this.keyAt(n);return t!==void 0?this.delete(t):!1}at(n){const t=fe(A(this,E),n);if(t!==void 0)return this.get(t)}entryAt(n){const t=fe(A(this,E),n);if(t!==void 0)return[t,this.get(t)]}indexOf(n){return A(this,E).indexOf(n)}keyAt(n){return fe(A(this,E),n)}from(n,t){const o=this.indexOf(n);if(o===-1)return;let s=o+t;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.at(s)}keyFrom(n,t){const o=this.indexOf(n);if(o===-1)return;let s=o+t;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(n,t){let o=0;for(const s of this){if(Reflect.apply(n,t,[s,o,this]))return s;o++}}findIndex(n,t){let o=0;for(const s of this){if(Reflect.apply(n,t,[s,o,this]))return o;o++}return-1}filter(n,t){const o=[];let s=0;for(const i of this)Reflect.apply(n,t,[i,s,this])&&o.push(i),s++;return new N(o)}map(n,t){const o=[];let s=0;for(const i of this)o.push([i[0],Reflect.apply(n,t,[i,s,this])]),s++;return new N(o)}reduce(...n){const[t,o]=n;let s=0,i=o??this.at(0);for(const a of this)s===0&&n.length===1?i=a:i=Reflect.apply(t,this,[i,a,s,this]),s++;return i}reduceRight(...n){const[t,o]=n;let s=o??this.at(-1);for(let i=this.size-1;i>=0;i--){const a=this.at(i);i===this.size-1&&n.length===1?s=a:s=Reflect.apply(t,this,[s,a,i,this])}return s}toSorted(n){const t=[...this.entries()].sort(n);return new N(t)}toReversed(){const n=new N;for(let t=this.size-1;t>=0;t--){const o=this.keyAt(t),s=this.get(o);n.set(o,s)}return n}toSpliced(...n){const t=[...this.entries()];return t.splice(...n),new N(t)}slice(n,t){const o=new N;let s=this.size-1;if(n===void 0)return o;n<0&&(n=n+this.size),t!==void 0&&t>0&&(s=t-1);for(let i=n;i<=s;i++){const a=this.keyAt(i),p=this.get(a);o.set(a,p)}return o}every(n,t){let o=0;for(const s of this){if(!Reflect.apply(n,t,[s,o,this]))return!1;o++}return!0}some(n,t){let o=0;for(const s of this){if(Reflect.apply(n,t,[s,o,this]))return!0;o++}return!1}},E=new WeakMap,T(N,"OrderedDict"),N);function fe(r,e){if("at"in Array.prototype)return Array.prototype.at.call(r,e);const n=Xe(r,e);return n===-1?void 0:r[n]}T(fe,"at");function Xe(r,e){const n=r.length,t=Te(e),o=t>=0?t:n+t;return o<0||o>=n?-1:o}T(Xe,"toSafeIndex");function Te(r){return r!==r||r===0?0:Math.trunc(r)}T(Te,"toSafeInteger");function cn(r){const e=r+"CollectionProvider",[n,t]=ue(e),[o,s]=n(e,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Ie,setItemMap:T(()=>{},"setItemMap")}),i=T(({state:w,..._})=>w?u.jsx(p,{..._,state:w}):u.jsx(a,{..._}),"CollectionProvider");i.displayName=e;const a=T(w=>{const _=R();return u.jsx(p,{...w,state:_})},"CollectionInit");a.displayName=e+"Init";const p=T(w=>{const{scope:_,children:P,state:b}=w,F=c.useRef(null),[O,S]=c.useState(null),$=G(F,S),[U,V]=b;return c.useEffect(()=>{if(!O)return;const K=Ze(()=>{});return K.observe(O,{childList:!0,subtree:!0}),()=>{K.disconnect()}},[O]),u.jsx(o,{scope:_,itemMap:U,setItemMap:V,collectionRef:$,collectionRefObject:F,collectionElement:O,children:P})},"CollectionProviderImpl");p.displayName=e+"Impl";const l=r+"CollectionSlot",v=se(l),d=c.forwardRef((w,_)=>{const{scope:P,children:b}=w,F=s(l,P),O=G(_,F.collectionRef);return u.jsx(v,{ref:O,children:b})});d.displayName=l;const f=r+"CollectionItemSlot",h="data-radix-collection-item",m=se(f),g=c.forwardRef((w,_)=>{const{scope:P,children:b,...F}=w,O=c.useRef(null),[S,$]=c.useState(null),U=G(_,O,$),V=s(f,P),{setItemMap:K}=V,B=c.useRef(F);We(B.current,F)||(B.current=F);const X=B.current;return c.useEffect(()=>{const J=X;return K(D=>S?D.has(S)?D.set(S,{...J,element:S}).toSorted(_e):(D.set(S,{...J,element:S}),D.toSorted(_e)):D),()=>{K(D=>!S||!D.has(S)?D:(D.delete(S),new Ie(D)))}},[S,X,K]),u.jsx(m,{[h]:"",ref:U,children:b})});g.displayName=f;function R(){return c.useState(new Ie)}T(R,"useInitCollection");function y(w){const{itemMap:_}=s(r+"CollectionConsumer",w);return _}return T(y,"useCollection"),[{Provider:i,Slot:d,ItemSlot:g},{createCollectionScope:t,useCollection:y,useInitCollection:R}]}T(cn,"createCollection");function We(r,e){if(r===e)return!0;if(typeof r!="object"||typeof e!="object"||r==null||e==null)return!1;const n=Object.keys(r),t=Object.keys(e);if(n.length!==t.length)return!1;for(const o of n)if(!Object.prototype.hasOwnProperty.call(e,o)||r[o]!==e[o])return!1;return!0}T(We,"shallowEqual");function qe(r,e){return!!(e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_PRECEDING)}T(qe,"isElementPreceding");function _e(r,e){return!r[1].element||!e[1].element?0:qe(r[1].element,e[1].element)?-1:1}T(_e,"sortByDocumentPosition");function Ze(r){return new MutationObserver(n=>{for(const t of n)if(t.type==="childList"){r();return}})}T(Ze,"getChildListObserver");var un=Object.defineProperty,Je=(r,e)=>un(r,"name",{value:e,configurable:!0}),Qe=c.createContext(void 0),et=Je(r=>{const{dir:e,children:n}=r;return u.jsx(Qe.Provider,{value:e,children:n})},"DirectionProvider");function me(r){const e=c.useContext(Qe);return r||e||"ltr"}Je(me,"useDirection");var an=et;const qo=Object.freeze(Object.defineProperty({__proto__:null,DirectionProvider:et,Provider:an,useDirection:me},Symbol.toStringTag,{value:"Module"}));var ln=Object.defineProperty,Oe=(r,e)=>ln(r,"name",{value:e,configurable:!0}),Re=!1;function tt(){const[r,e]=c.useState(Re);return c.useEffect(()=>{Re||(Re=!0,e(!0))},[]),r}Oe(tt,"useIsHydrated");var nt=Ht[" useSyncExternalStore ".trim().toString()];function ot(){return()=>{}}Oe(ot,"subscribe");function rt(){return nt(ot,()=>!0,()=>!1)}Oe(rt,"useIsHydratedModern");var dn=typeof nt=="function"?rt:tt,fn=Object.defineProperty,q=(r,e)=>fn(r,"name",{value:e,configurable:!0}),Se="rovingFocusGroup.onEntryFocus",pn={bubbles:!1,cancelable:!0},ve="RovingFocusGroup",[be,st,hn]=Ee(ve),[mn,ct]=ue(ve,[hn]),[vn,gn]=mn(ve),Mn=c.forwardRef(q(function(e,n){return u.jsx(be.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(be.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(Cn,{...e,ref:n})})})},"RovingFocusGroup")),Cn=c.forwardRef(q(function(e,n){const{__scopeRovingFocusGroup:t,orientation:o,loop:s=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:p,onCurrentTabStopIdChange:l,onEntryFocus:v,preventScrollOnEntryFocus:d=!1,...f}=e,h=c.useRef(null),m=G(n,h),g=me(i),[R,y]=De({prop:a,defaultProp:p??null,onChange:l,caller:ve}),[x,w]=c.useState(!1),_=pe(v),P=st(t),b=c.useRef(!1),[F,O]=c.useState(0);return c.useEffect(()=>{const S=h.current;if(S)return S.addEventListener(Se,_),()=>S.removeEventListener(Se,_)},[_]),u.jsx(vn,{scope:t,orientation:o,dir:g,loop:s,currentTabStopId:R,onItemFocus:c.useCallback(S=>y(S),[y]),onItemShiftTab:c.useCallback(()=>w(!0),[]),onFocusableItemAdd:c.useCallback(()=>O(S=>S+1),[]),onFocusableItemRemove:c.useCallback(()=>O(S=>S-1),[]),children:u.jsx(H.div,{tabIndex:x||F===0?-1:0,"data-orientation":o,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:I(e.onMouseDown,()=>{b.current=!0}),onFocus:I(e.onFocus,S=>{const $=!b.current;if(S.target===S.currentTarget&&$&&!x){const U=new CustomEvent(Se,pn);if(S.currentTarget.dispatchEvent(U),!U.defaultPrevented){const V=P().filter(D=>D.focusable),K=V.find(D=>D.active),B=V.find(D=>D.id===R),J=[K,B,...V].filter(Boolean).map(D=>D.ref.current);Ae(J,d)}}b.current=!1}),onBlur:I(e.onBlur,()=>w(!1))})})},"RovingFocusGroupImpl")),wn="RovingFocusGroupItem",xn=c.forwardRef(q(function(e,n){const{__scopeRovingFocusGroup:t,focusable:o=!0,active:s=!1,tabStopId:i,children:a,...p}=e,l=re(),v=i||l,d=gn(wn,t),f=d.currentTabStopId===v,h=st(t),{onFocusableItemAdd:m,onFocusableItemRemove:g,currentTabStopId:R}=d,y=dn();return Yt(()=>{if(!(!y||!o))return m(),()=>g()},[y,o,m,g]),c.useEffect(()=>{if(!(y||!o))return m(),()=>g()},[y,o,m,g]),u.jsx(be.ItemSlot,{scope:t,id:v,focusable:o,active:s,children:u.jsx(H.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...p,ref:n,onMouseDown:I(e.onMouseDown,x=>{o?d.onItemFocus(v):x.preventDefault()}),onFocus:I(e.onFocus,()=>d.onItemFocus(v)),onKeyDown:I(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){d.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const w=ut(x,d.orientation,d.dir);if(w!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let P=h().filter(b=>b.focusable).map(b=>b.ref.current);if(w==="last")P.reverse();else if(w==="prev"||w==="next"){w==="prev"&&P.reverse();const b=P.indexOf(x.currentTarget);P=d.loop?at(P,b+1):P.slice(b+1)}setTimeout(()=>Ae(P))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:R!=null}):a})})},"RovingFocusGroupItem")),In={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function it(r,e){return e!=="rtl"?r:r==="ArrowLeft"?"ArrowRight":r==="ArrowRight"?"ArrowLeft":r}q(it,"getDirectionAwareKey");function ut(r,e,n){const t=it(r.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(t))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(t)))return In[t]}q(ut,"getFocusIntent");function Ae(r,e=!1){const n=document.activeElement;for(const t of r)if(t===n||(t.focus({preventScroll:e}),document.activeElement!==n))return}q(Ae,"focusFirst");function at(r,e){return r.map((n,t)=>r[(e+t)%r.length])}q(at,"wrapArray");var Rn=Mn,Sn=xn,_n=Object.defineProperty,C=(r,e)=>_n(r,"name",{value:e,configurable:!0}),ye=["Enter"," "],bn=["ArrowDown","PageUp","Home"],lt=["ArrowUp","PageDown","End"],yn=[...bn,...lt],Pn={ltr:[...ye,"ArrowRight"],rtl:[...ye,"ArrowLeft"]},Dn={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ge="Menu",[ce,En,Tn]=Ee(ge),[Z,dt]=ue(ge,[Tn,He,ct]),ae=He(),ft=ct(),[pt,Y]=Z(ge),[On,le]=Z(ge),An=C(r=>{const{__scopeMenu:e,open:n=!1,children:t,dir:o,onOpenChange:s,modal:i=!0}=r,a=ae(e),[p,l]=c.useState(null),v=c.useRef(!1),d=pe(s),f=me(o);return c.useEffect(()=>{const h=C(()=>{v.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},"handleKeyDown"),m=C(()=>v.current=!1,"handlePointer");return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),c.useEffect(()=>{if(!n)return;const h=C(()=>d(!1),"handleBlur");return window.addEventListener("blur",h),()=>window.removeEventListener("blur",h)},[n,d]),u.jsx(Ye,{...a,children:u.jsx(pt,{scope:e,open:n,onOpenChange:d,content:p,onContentChange:l,children:u.jsx(On,{scope:e,onClose:c.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:v,dir:f,modal:i,children:t})})})},"Menu"),ht=c.forwardRef(C(function(e,n){const{__scopeMenu:t,...o}=e,s=ae(t);return u.jsx(tn,{...s,...o,ref:n})},"MenuAnchor")),mt="MenuPortal",[jn,vt]=Z(mt,{forceMount:void 0}),kn=C(r=>{const{__scopeMenu:e,forceMount:n,children:t,container:o}=r,s=Y(mt,e);return u.jsx(jn,{scope:e,forceMount:n,children:u.jsx(he,{present:n||s.open,children:u.jsx(Jt,{asChild:!0,container:o,children:t})})})},"MenuPortal"),z="MenuContent",[Fn,je]=Z(z),Ln=c.forwardRef(C(function(e,n){const t=vt(z,e.__scopeMenu),{forceMount:o=t.forceMount,...s}=e,i=Y(z,e.__scopeMenu),a=le(z,e.__scopeMenu);return u.jsx(ce.Provider,{scope:e.__scopeMenu,children:u.jsx(he,{present:o||i.open,children:u.jsx(ce.Slot,{scope:e.__scopeMenu,children:a.modal?u.jsx(Nn,{...s,ref:n}):u.jsx(Gn,{...s,ref:n})})})})},"MenuContent")),Nn=c.forwardRef(C(function(e,n){const t=Y(z,e.__scopeMenu),o=c.useRef(null),s=G(n,o);return c.useEffect(()=>{const i=o.current;if(i)return en(i)},[]),u.jsx(ke,{...e,ref:s,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:I(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)})},"MenuRootContentModal")),Gn=c.forwardRef(C(function(e,n){const t=Y(z,e.__scopeMenu);return u.jsx(ke,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)})},"MenuRootContentNonModal")),Kn=se("MenuContent.ScrollLock"),ke=c.forwardRef(C(function(e,n){const{__scopeMenu:t,loop:o=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:p,onEntryFocus:l,onEscapeKeyDown:v,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,disableOutsideScroll:g,...R}=e,y=Y(z,t),x=le(z,t),w=ae(t),_=ft(t),P=En(t),[b,F]=c.useState(null),O=c.useRef(null),S=G(n,O,y.onContentChange),$=c.useRef(0),U=c.useRef(""),V=c.useRef(0),K=c.useRef(null),B=c.useRef("right"),X=c.useRef(0),J=g?Wt:c.Fragment,D=g?{as:Kn,allowPinchZoom:!0}:void 0,Bt=C(M=>{const ee=U.current+M,W=P().filter(L=>!L.disabled),ne=document.activeElement,Ce=W.find(L=>L.ref.current===ne)?.textValue,we=W.map(L=>L.textValue),Ge=_t(we,ee,Ce),oe=W.find(L=>L.textValue===Ge)?.ref.current;C((function L(Ke){U.current=Ke,window.clearTimeout($.current),Ke!==""&&($.current=window.setTimeout(()=>L(""),1e3))}),"updateSearch")(ee),oe&&setTimeout(()=>oe.focus())},"handleTypeaheadSearch");c.useEffect(()=>()=>window.clearTimeout($.current),[]),Xt();const Q=c.useCallback(M=>B.current===K.current?.side&&yt(M,K.current?.area),[]);return u.jsx(Fn,{scope:t,searchRef:U,onItemEnter:c.useCallback(M=>{Q(M)&&M.preventDefault()},[Q]),onItemLeave:c.useCallback(M=>{Q(M)||(O.current?.focus(),F(null))},[Q]),onTriggerLeave:c.useCallback(M=>{Q(M)&&M.preventDefault()},[Q]),pointerGraceTimerRef:V,onPointerGraceIntentChange:c.useCallback(M=>{K.current=M},[]),children:u.jsx(J,{...D,children:u.jsx(qt,{asChild:!0,trapped:s,onMountAutoFocus:I(i,M=>{M.preventDefault(),O.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:u.jsx(Zt,{asChild:!0,disableOutsidePointerEvents:p,onEscapeKeyDown:v,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,children:u.jsx(Rn,{asChild:!0,..._,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:b,onCurrentTabStopIdChange:F,onEntryFocus:I(l,M=>{x.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsx(nn,{role:"menu","aria-orientation":"vertical","data-state":Le(y.open),"data-radix-menu-content":"",dir:x.dir,...w,...R,ref:S,style:{outline:"none",...R.style},onKeyDown:I(R.onKeyDown,M=>{const W=M.target.closest("[data-radix-menu-content]")===M.currentTarget,ne=M.ctrlKey||M.altKey||M.metaKey,Ce=M.key.length===1;W&&(M.key==="Tab"&&M.preventDefault(),!ne&&Ce&&Bt(M.key));const we=O.current;if(M.target!==we||!yn.includes(M.key))return;M.preventDefault();const oe=P().filter(L=>!L.disabled).map(L=>L.ref.current);lt.includes(M.key)&&oe.reverse(),Rt(oe)}),onBlur:I(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout($.current),U.current="")}),onPointerMove:I(e.onPointerMove,te(M=>{const ee=M.target,W=X.current!==M.clientX;if(M.currentTarget.contains(ee)&&W){const ne=M.clientX>X.current?"right":"left";B.current=ne,X.current=M.clientX}}))})})})})})})},"MenuContentImpl")),gt=c.forwardRef(C(function(e,n){const{__scopeMenu:t,...o}=e;return u.jsx(H.div,{role:"group",...o,ref:n})},"MenuGroup")),Un=c.forwardRef(C(function(e,n){const{__scopeMenu:t,...o}=e;return u.jsx(H.div,{...o,ref:n})},"MenuLabel")),Pe="MenuItem",Be="menu.itemSelect",Fe=c.forwardRef(C(function(e,n){const{disabled:t=!1,onSelect:o,...s}=e,i=c.useRef(null),a=le(Pe,e.__scopeMenu),p=je(Pe,e.__scopeMenu),l=G(n,i),v=c.useRef(!1),d=C(()=>{const f=i.current;if(!t&&f){const h=new CustomEvent(Be,{bubbles:!0,cancelable:!0});f.addEventListener(Be,m=>o?.(m),{once:!0}),Qt(f,h),h.defaultPrevented?v.current=!1:a.onClose()}},"handleSelect");return u.jsx(Mt,{...s,ref:l,disabled:t,onClick:I(e.onClick,d),onPointerDown:f=>{e.onPointerDown?.(f),v.current=!0},onPointerUp:I(e.onPointerUp,f=>{v.current||f.currentTarget?.click()}),onKeyDown:I(e.onKeyDown,f=>{t||f.target!==f.currentTarget||p.searchRef.current!==""&&f.key===" "||ye.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})},"MenuItem")),Mt=c.forwardRef(C(function(e,n){const{__scopeMenu:t,disabled:o=!1,textValue:s,...i}=e,a=je(Pe,t),p=ft(t),l=c.useRef(null),v=G(n,l),[d,f]=c.useState(!1),[h,m]=c.useState("");return c.useEffect(()=>{const g=l.current;g&&m((g.textContent??"").trim())},[i.children]),u.jsx(ce.ItemSlot,{scope:t,disabled:o,textValue:s??h,children:u.jsx(Sn,{asChild:!0,...p,focusable:!o,children:u.jsx(H.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...i,ref:v,onPointerMove:I(e.onPointerMove,te(g=>{o?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:I(e.onPointerLeave,te(g=>a.onItemLeave(g))),onFocus:I(e.onFocus,()=>f(!0)),onBlur:I(e.onBlur,()=>f(!1))})})})},"MenuItemImpl")),zn=c.forwardRef(C(function(e,n){const{checked:t=!1,onCheckedChange:o,...s}=e;return u.jsx(wt,{scope:e.__scopeMenu,checked:t,children:u.jsx(Fe,{role:"menuitemcheckbox","aria-checked":ie(t)?"mixed":t,...s,ref:n,"data-state":Me(t),onSelect:I(s.onSelect,()=>o?.(ie(t)?!0:!t),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem")),$n="MenuRadioGroup",[Vn,Bn]=Z($n,{value:void 0,onValueChange:C(()=>{},"onValueChange")}),Hn=c.forwardRef(C(function(e,n){const{value:t,onValueChange:o,...s}=e,i=pe(o);return u.jsx(Vn,{scope:e.__scopeMenu,value:t,onValueChange:i,children:u.jsx(gt,{...s,ref:n})})},"MenuRadioGroup")),Yn="MenuRadioItem",Xn=c.forwardRef(C(function(e,n){const{value:t,...o}=e,s=Bn(Yn,e.__scopeMenu),i=t===s.value;return u.jsx(wt,{scope:e.__scopeMenu,checked:i,children:u.jsx(Fe,{role:"menuitemradio","aria-checked":i,...o,ref:n,"data-state":Me(i),onSelect:I(o.onSelect,()=>s.onValueChange?.(t),{checkForDefaultPrevented:!1})})})},"MenuRadioItem")),Ct="MenuItemIndicator",[wt,Wn]=Z(Ct,{checked:!1}),qn=c.forwardRef(C(function(e,n){const{__scopeMenu:t,forceMount:o,...s}=e,i=Wn(Ct,t);return u.jsx(he,{present:o||ie(i.checked)||i.checked===!0,children:u.jsx(H.span,{...s,ref:n,"data-state":Me(i.checked)})})},"MenuItemIndicator")),Zn=c.forwardRef(C(function(e,n){const{__scopeMenu:t,...o}=e;return u.jsx(H.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})},"MenuSeparator")),Jn=c.forwardRef(C(function(e,n){const{__scopeMenu:t,...o}=e,s=ae(t);return u.jsx(on,{...s,...o,ref:n})},"MenuArrow")),xt="MenuSub",[Qn,It]=Z(xt),eo=C(r=>{const{__scopeMenu:e,children:n,open:t=!1,onOpenChange:o}=r,s=Y(xt,e),i=ae(e),[a,p]=c.useState(null),[l,v]=c.useState(null),d=pe(o);return c.useEffect(()=>(s.open===!1&&d(!1),()=>d(!1)),[s.open,d]),u.jsx(Ye,{...i,children:u.jsx(pt,{scope:e,open:t,onOpenChange:d,content:l,onContentChange:v,children:u.jsx(Qn,{scope:e,contentId:re(),triggerId:re(),trigger:a,onTriggerChange:p,children:n})})})},"MenuSub"),de="MenuSubTrigger",to=c.forwardRef(C(function(e,n){const t=Y(de,e.__scopeMenu),o=le(de,e.__scopeMenu),s=It(de,e.__scopeMenu),i=je(de,e.__scopeMenu),a=c.useRef(null),{pointerGraceTimerRef:p,onPointerGraceIntentChange:l}=i,v={__scopeMenu:e.__scopeMenu},d=c.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);c.useEffect(()=>d,[d]),c.useEffect(()=>{const h=p.current;return()=>{window.clearTimeout(h),l(null)}},[p,l]);const f=G(n,s.onTriggerChange);return u.jsx(ht,{asChild:!0,...v,children:u.jsx(Mt,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":t.open?s.contentId:void 0,"data-state":Le(t.open),...e,ref:f,onClick:h=>{e.onClick?.(h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),t.open||t.onOpenChange(!0))},onPointerMove:I(e.onPointerMove,te(h=>{i.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!t.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{t.onOpenChange(!0),d()},100))})),onPointerLeave:I(e.onPointerLeave,te(h=>{d();const m=t.content?.getBoundingClientRect();if(m){const g=t.content?.dataset.side,R=g==="right",y=R?-5:5,x=m[R?"left":"right"],w=m[R?"right":"left"];i.onPointerGraceIntentChange({area:[{x:h.clientX+y,y:h.clientY},{x,y:m.top},{x:w,y:m.top},{x:w,y:m.bottom},{x,y:m.bottom}],side:g}),window.clearTimeout(p.current),p.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(h),h.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:I(e.onKeyDown,h=>{e.disabled||h.target!==h.currentTarget||i.searchRef.current!==""&&h.key===" "||Pn[o.dir].includes(h.key)&&(t.onOpenChange(!0),t.content?.focus(),h.preventDefault())})})})},"MenuSubTrigger")),no="MenuSubContent",oo=c.forwardRef(C(function(e,n){const t=vt(z,e.__scopeMenu),{forceMount:o=t.forceMount,align:s="start",...i}=e,a=Y(z,e.__scopeMenu),p=le(z,e.__scopeMenu),l=It(no,e.__scopeMenu),v=c.useRef(null),d=G(n,v);return u.jsx(ce.Provider,{scope:e.__scopeMenu,children:u.jsx(he,{present:o||a.open,children:u.jsx(ce.Slot,{scope:e.__scopeMenu,children:u.jsx(ke,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:d,align:s,side:p.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{p.isUsingKeyboardRef.current&&v.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:I(e.onFocusOutside,f=>{f.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:I(e.onEscapeKeyDown,f=>{p.onClose(),f.preventDefault()}),onKeyDown:I(e.onKeyDown,f=>{const h=f.currentTarget.contains(f.target),m=Dn[p.dir].includes(f.key);h&&m&&(a.onOpenChange(!1),l.trigger?.focus(),f.preventDefault())})})})})})},"MenuSubContent"));function Le(r){return r?"open":"closed"}C(Le,"getOpenState");function ie(r){return r==="indeterminate"}C(ie,"isIndeterminate");function Me(r){return ie(r)?"indeterminate":r?"checked":"unchecked"}C(Me,"getCheckedState");function Rt(r){const e=document.activeElement;for(const n of r)if(n===e||(n.focus(),document.activeElement!==e))return}C(Rt,"focusFirst");function St(r,e){return r.map((n,t)=>r[(e+t)%r.length])}C(St,"wrapArray");function _t(r,e,n){const o=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,s=n?r.indexOf(n):-1;let i=St(r,Math.max(s,0));o.length===1&&(i=i.filter(l=>l!==n));const p=i.find(l=>l.toLowerCase().startsWith(o.toLowerCase()));return p!==n?p:void 0}C(_t,"getNextMatch");function bt(r,e){const{x:n,y:t}=r;let o=!1;for(let s=0,i=e.length-1;s<e.length;i=s++){const a=e[s],p=e[i],l=a.x,v=a.y,d=p.x,f=p.y;v>t!=f>t&&n<(d-l)*(t-v)/(f-v)+l&&(o=!o)}return o}C(bt,"isPointInPolygon");function yt(r,e){if(!e)return!1;const n={x:r.clientX,y:r.clientY};return bt(n,e)}C(yt,"isPointerInGraceArea");function te(r){return e=>e.pointerType==="mouse"?r(e):void 0}C(te,"whenMouse");var ro=An,so=ht,co=kn,io=Ln,uo=gt,ao=Un,lo=Fe,fo=zn,po=Hn,ho=Xn,mo=qn,vo=Zn,go=Jn,Mo=eo,Co=to,wo=oo,xo=Object.defineProperty,j=(r,e)=>xo(r,"name",{value:e,configurable:!0}),Ne="DropdownMenu",[Io,Ro]=ue(Ne,[dt]),k=dt(),[So,Pt]=Io(Ne),Dt=j(r=>{const{__scopeDropdownMenu:e,children:n,dir:t,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=r,p=k(e),l=c.useRef(null),[v,d]=De({prop:o,defaultProp:s??!1,onChange:i,caller:Ne});return u.jsx(So,{scope:e,triggerId:re(),triggerRef:l,contentId:re(),open:v,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(f=>!f),[d]),modal:a,children:u.jsx(ro,{...p,open:v,onOpenChange:d,dir:t,modal:a,children:n})})},"DropdownMenu"),_o="DropdownMenuTrigger",Et=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,disabled:o=!1,...s}=e,i=Pt(_o,t),a=k(t),p=G(n,i.triggerRef);return u.jsx(so,{asChild:!0,...a,children:u.jsx(H.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...s,ref:p,onPointerDown:I(e.onPointerDown,l=>{!o&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:I(e.onKeyDown,l=>{o||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})},"DropdownMenuTrigger")),Tt=j(r=>{const{__scopeDropdownMenu:e,...n}=r,t=k(e);return u.jsx(co,{...t,...n})},"DropdownMenuPortal"),bo="DropdownMenuContent",Ot=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=Pt(bo,t),i=k(t),a=c.useRef(!1);return u.jsx(io,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...o,ref:n,onCloseAutoFocus:I(e.onCloseAutoFocus,p=>{a.current||s.triggerRef.current?.focus(),a.current=!1,p.preventDefault()}),onInteractOutside:I(e.onInteractOutside,p=>{const l=p.detail.originalEvent,v=l.button===0&&l.ctrlKey===!0,d=l.button===2||v;(!s.modal||d)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),At=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=k(t);return u.jsx(uo,{...s,...o,ref:n})},"DropdownMenuGroup")),jt=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=k(t);return u.jsx(ao,{...s,...o,ref:n})},"DropdownMenuLabel")),kt=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=k(t);return u.jsx(lo,{...s,...o,ref:n})},"DropdownMenuItem")),Ft=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=k(t);return u.jsx(fo,{...s,...o,ref:n})},"DropdownMenuCheckboxItem")),Lt=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=k(t);return u.jsx(po,{...s,...o,ref:n})},"DropdownMenuRadioGroup")),Nt=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=k(t);return u.jsx(ho,{...s,...o,ref:n})},"DropdownMenuRadioItem")),Gt=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=k(t);return u.jsx(mo,{...s,...o,ref:n})},"DropdownMenuItemIndicator")),Kt=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=k(t);return u.jsx(vo,{...s,...o,ref:n})},"DropdownMenuSeparator")),Ut=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=k(t);return u.jsx(go,{...s,...o,ref:n})},"DropdownMenuArrow")),zt=j(r=>{const{__scopeDropdownMenu:e,children:n,open:t,onOpenChange:o,defaultOpen:s}=r,i=k(e),[a,p]=De({prop:t,defaultProp:s??!1,onChange:o,caller:"DropdownMenuSub"});return u.jsx(Mo,{...i,open:a,onOpenChange:p,children:n})},"DropdownMenuSub"),$t=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=k(t);return u.jsx(Co,{...s,...o,ref:n})},"DropdownMenuSubTrigger")),Vt=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=k(t);return u.jsx(wo,{...s,...o,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuSubContent")),yo=Dt,Po=Et,Do=Tt,Eo=Ot,To=At,Oo=jt,Ao=kt,jo=Ft,ko=Lt,Fo=Nt,Lo=Gt,No=Kt,Go=Ut,Ko=zt,Uo=$t,zo=Vt;const Zo=Object.freeze(Object.defineProperty({__proto__:null,Arrow:Go,CheckboxItem:jo,Content:Eo,DropdownMenu:Dt,DropdownMenuArrow:Ut,DropdownMenuCheckboxItem:Ft,DropdownMenuContent:Ot,DropdownMenuGroup:At,DropdownMenuItem:kt,DropdownMenuItemIndicator:Gt,DropdownMenuLabel:jt,DropdownMenuPortal:Tt,DropdownMenuRadioGroup:Lt,DropdownMenuRadioItem:Nt,DropdownMenuSeparator:Kt,DropdownMenuSub:zt,DropdownMenuSubContent:Vt,DropdownMenuSubTrigger:$t,DropdownMenuTrigger:Et,Group:To,Item:Ao,ItemIndicator:Lo,Label:Oo,Portal:Do,RadioGroup:ko,RadioItem:Fo,Root:yo,Separator:No,Sub:Ko,SubContent:zo,SubTrigger:Uo,Trigger:Po,createDropdownMenuScope:Ro},Symbol.toStringTag,{value:"Module"}));const $o=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Jo=rn("file-text",$o);export{so as A,Eo as C,Jo as F,uo as G,Lo as I,Oo as L,Do as P,yo as R,No as S,Po as T,jo as a,Ao as b,Ee as c,dt as d,lo as e,mo as f,ao as g,co as h,po as i,ho as j,vo as k,Mo as l,wo as m,Co as n,ro as o,io as p,fo as q,go as r,ct as s,Rn as t,me as u,Sn as v,cn as w,dn as x,qo as y,Zo as z};
1
+ var Ue=r=>{throw TypeError(r)};var ze=(r,e,n)=>e.has(r)||Ue("Cannot "+n);var A=(r,e,n)=>(ze(r,e,"read from private field"),n?n.call(r):e.get(r)),$e=(r,e,n)=>e.has(r)?Ue("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,n),xe=(r,e,n,t)=>(ze(r,e,"write to private field"),t?t.call(r,n):e.set(r,n),n);import{r as c,j as u,i as Ht}from"./react-Dh7j6h1K.js";import{c as ue,f as De,j as pe,P as H,d as I,g as re,u as Yt,a as he,i as Xt,R as Wt,F as qt,D as Zt,b as Jt,k as Qt,h as en}from"./index-4-yQR2Lz.js";import{u as G,c as se}from"./utils-CvINCDjn.js";import{c as He,R as Ye,A as tn,C as nn,a as on}from"./index-B6ap1Jz7.js";import{c as rn}from"./index-CKJsEQtp.js";var sn=Object.defineProperty,T=(r,e)=>sn(r,"name",{value:e,configurable:!0});function Ee(r){const e=r+"CollectionProvider",[n,t]=ue(e),[o,s]=n(e,{collectionRef:{current:null},itemMap:new Map}),i=T(g=>{const{scope:R,children:y}=g,x=c.useRef(null),w=c.useRef(new Map).current;return u.jsx(o,{scope:R,itemMap:w,collectionRef:x,children:y})},"CollectionProvider");i.displayName=e;const a=r+"CollectionSlot",p=se(a),l=c.forwardRef((g,R)=>{const{scope:y,children:x}=g,w=s(a,y),_=G(R,w.collectionRef);return u.jsx(p,{ref:_,children:x})});l.displayName=a;const v=r+"CollectionItemSlot",d="data-radix-collection-item",f=se(v),h=c.forwardRef((g,R)=>{const{scope:y,children:x,...w}=g,_=c.useRef(null),P=G(R,_),b=s(v,y);return c.useEffect(()=>(b.itemMap.set(_,{ref:_,...w}),()=>{b.itemMap.delete(_)})),u.jsx(f,{[d]:"",ref:P,children:x})});h.displayName=v;function m(g){const R=s(r+"CollectionConsumer",g);return c.useCallback(()=>{const x=R.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(R.itemMap.values()).sort((b,F)=>w.indexOf(b.ref.current)-w.indexOf(F.ref.current))},[R.collectionRef,R.itemMap])}return T(m,"useCollection"),[{Provider:i,Slot:l,ItemSlot:h},m,t]}T(Ee,"createCollection");var Ve=new WeakMap,E,N,Ie=(N=class extends Map{constructor(n){super(n);$e(this,E);xe(this,E,[...super.keys()]),Ve.set(this,!0)}set(n,t){return Ve.get(this)&&(this.has(n)?A(this,E)[A(this,E).indexOf(n)]=n:A(this,E).push(n)),super.set(n,t),this}insert(n,t,o){const s=this.has(t),i=A(this,E).length,a=Te(n);let p=a>=0?a:i+a;const l=p<0||p>=i?-1:p;if(l===this.size||s&&l===this.size-1||l===-1)return this.set(t,o),this;const v=this.size+(s?0:1);a<0&&p++;const d=[...A(this,E)];let f,h=!1;for(let m=p;m<v;m++)if(p===m){let g=d[m];d[m]===t&&(g=d[m+1]),s&&this.delete(t),f=this.get(g),this.set(t,o)}else{!h&&d[m-1]===t&&(h=!0);const g=d[h?m:m-1],R=f;f=this.get(g),this.delete(g),this.set(g,R)}return this}with(n,t,o){const s=new N(this);return s.insert(n,t,o),s}before(n){const t=A(this,E).indexOf(n)-1;if(!(t<0))return this.entryAt(t)}setBefore(n,t,o){const s=A(this,E).indexOf(n);return s===-1?this:this.insert(s,t,o)}after(n){let t=A(this,E).indexOf(n);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(n,t,o){const s=A(this,E).indexOf(n);return s===-1?this:this.insert(s+1,t,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return xe(this,E,[]),super.clear()}delete(n){const t=super.delete(n);return t&&A(this,E).splice(A(this,E).indexOf(n),1),t}deleteAt(n){const t=this.keyAt(n);return t!==void 0?this.delete(t):!1}at(n){const t=fe(A(this,E),n);if(t!==void 0)return this.get(t)}entryAt(n){const t=fe(A(this,E),n);if(t!==void 0)return[t,this.get(t)]}indexOf(n){return A(this,E).indexOf(n)}keyAt(n){return fe(A(this,E),n)}from(n,t){const o=this.indexOf(n);if(o===-1)return;let s=o+t;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.at(s)}keyFrom(n,t){const o=this.indexOf(n);if(o===-1)return;let s=o+t;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(n,t){let o=0;for(const s of this){if(Reflect.apply(n,t,[s,o,this]))return s;o++}}findIndex(n,t){let o=0;for(const s of this){if(Reflect.apply(n,t,[s,o,this]))return o;o++}return-1}filter(n,t){const o=[];let s=0;for(const i of this)Reflect.apply(n,t,[i,s,this])&&o.push(i),s++;return new N(o)}map(n,t){const o=[];let s=0;for(const i of this)o.push([i[0],Reflect.apply(n,t,[i,s,this])]),s++;return new N(o)}reduce(...n){const[t,o]=n;let s=0,i=o??this.at(0);for(const a of this)s===0&&n.length===1?i=a:i=Reflect.apply(t,this,[i,a,s,this]),s++;return i}reduceRight(...n){const[t,o]=n;let s=o??this.at(-1);for(let i=this.size-1;i>=0;i--){const a=this.at(i);i===this.size-1&&n.length===1?s=a:s=Reflect.apply(t,this,[s,a,i,this])}return s}toSorted(n){const t=[...this.entries()].sort(n);return new N(t)}toReversed(){const n=new N;for(let t=this.size-1;t>=0;t--){const o=this.keyAt(t),s=this.get(o);n.set(o,s)}return n}toSpliced(...n){const t=[...this.entries()];return t.splice(...n),new N(t)}slice(n,t){const o=new N;let s=this.size-1;if(n===void 0)return o;n<0&&(n=n+this.size),t!==void 0&&t>0&&(s=t-1);for(let i=n;i<=s;i++){const a=this.keyAt(i),p=this.get(a);o.set(a,p)}return o}every(n,t){let o=0;for(const s of this){if(!Reflect.apply(n,t,[s,o,this]))return!1;o++}return!0}some(n,t){let o=0;for(const s of this){if(Reflect.apply(n,t,[s,o,this]))return!0;o++}return!1}},E=new WeakMap,T(N,"OrderedDict"),N);function fe(r,e){if("at"in Array.prototype)return Array.prototype.at.call(r,e);const n=Xe(r,e);return n===-1?void 0:r[n]}T(fe,"at");function Xe(r,e){const n=r.length,t=Te(e),o=t>=0?t:n+t;return o<0||o>=n?-1:o}T(Xe,"toSafeIndex");function Te(r){return r!==r||r===0?0:Math.trunc(r)}T(Te,"toSafeInteger");function cn(r){const e=r+"CollectionProvider",[n,t]=ue(e),[o,s]=n(e,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Ie,setItemMap:T(()=>{},"setItemMap")}),i=T(({state:w,..._})=>w?u.jsx(p,{..._,state:w}):u.jsx(a,{..._}),"CollectionProvider");i.displayName=e;const a=T(w=>{const _=R();return u.jsx(p,{...w,state:_})},"CollectionInit");a.displayName=e+"Init";const p=T(w=>{const{scope:_,children:P,state:b}=w,F=c.useRef(null),[O,S]=c.useState(null),$=G(F,S),[U,V]=b;return c.useEffect(()=>{if(!O)return;const K=Ze(()=>{});return K.observe(O,{childList:!0,subtree:!0}),()=>{K.disconnect()}},[O]),u.jsx(o,{scope:_,itemMap:U,setItemMap:V,collectionRef:$,collectionRefObject:F,collectionElement:O,children:P})},"CollectionProviderImpl");p.displayName=e+"Impl";const l=r+"CollectionSlot",v=se(l),d=c.forwardRef((w,_)=>{const{scope:P,children:b}=w,F=s(l,P),O=G(_,F.collectionRef);return u.jsx(v,{ref:O,children:b})});d.displayName=l;const f=r+"CollectionItemSlot",h="data-radix-collection-item",m=se(f),g=c.forwardRef((w,_)=>{const{scope:P,children:b,...F}=w,O=c.useRef(null),[S,$]=c.useState(null),U=G(_,O,$),V=s(f,P),{setItemMap:K}=V,B=c.useRef(F);We(B.current,F)||(B.current=F);const X=B.current;return c.useEffect(()=>{const J=X;return K(D=>S?D.has(S)?D.set(S,{...J,element:S}).toSorted(_e):(D.set(S,{...J,element:S}),D.toSorted(_e)):D),()=>{K(D=>!S||!D.has(S)?D:(D.delete(S),new Ie(D)))}},[S,X,K]),u.jsx(m,{[h]:"",ref:U,children:b})});g.displayName=f;function R(){return c.useState(new Ie)}T(R,"useInitCollection");function y(w){const{itemMap:_}=s(r+"CollectionConsumer",w);return _}return T(y,"useCollection"),[{Provider:i,Slot:d,ItemSlot:g},{createCollectionScope:t,useCollection:y,useInitCollection:R}]}T(cn,"createCollection");function We(r,e){if(r===e)return!0;if(typeof r!="object"||typeof e!="object"||r==null||e==null)return!1;const n=Object.keys(r),t=Object.keys(e);if(n.length!==t.length)return!1;for(const o of n)if(!Object.prototype.hasOwnProperty.call(e,o)||r[o]!==e[o])return!1;return!0}T(We,"shallowEqual");function qe(r,e){return!!(e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_PRECEDING)}T(qe,"isElementPreceding");function _e(r,e){return!r[1].element||!e[1].element?0:qe(r[1].element,e[1].element)?-1:1}T(_e,"sortByDocumentPosition");function Ze(r){return new MutationObserver(n=>{for(const t of n)if(t.type==="childList"){r();return}})}T(Ze,"getChildListObserver");var un=Object.defineProperty,Je=(r,e)=>un(r,"name",{value:e,configurable:!0}),Qe=c.createContext(void 0),et=Je(r=>{const{dir:e,children:n}=r;return u.jsx(Qe.Provider,{value:e,children:n})},"DirectionProvider");function me(r){const e=c.useContext(Qe);return r||e||"ltr"}Je(me,"useDirection");var an=et;const qo=Object.freeze(Object.defineProperty({__proto__:null,DirectionProvider:et,Provider:an,useDirection:me},Symbol.toStringTag,{value:"Module"}));var ln=Object.defineProperty,Oe=(r,e)=>ln(r,"name",{value:e,configurable:!0}),Re=!1;function tt(){const[r,e]=c.useState(Re);return c.useEffect(()=>{Re||(Re=!0,e(!0))},[]),r}Oe(tt,"useIsHydrated");var nt=Ht[" useSyncExternalStore ".trim().toString()];function ot(){return()=>{}}Oe(ot,"subscribe");function rt(){return nt(ot,()=>!0,()=>!1)}Oe(rt,"useIsHydratedModern");var dn=typeof nt=="function"?rt:tt,fn=Object.defineProperty,q=(r,e)=>fn(r,"name",{value:e,configurable:!0}),Se="rovingFocusGroup.onEntryFocus",pn={bubbles:!1,cancelable:!0},ve="RovingFocusGroup",[be,st,hn]=Ee(ve),[mn,ct]=ue(ve,[hn]),[vn,gn]=mn(ve),Mn=c.forwardRef(q(function(e,n){return u.jsx(be.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(be.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(Cn,{...e,ref:n})})})},"RovingFocusGroup")),Cn=c.forwardRef(q(function(e,n){const{__scopeRovingFocusGroup:t,orientation:o,loop:s=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:p,onCurrentTabStopIdChange:l,onEntryFocus:v,preventScrollOnEntryFocus:d=!1,...f}=e,h=c.useRef(null),m=G(n,h),g=me(i),[R,y]=De({prop:a,defaultProp:p??null,onChange:l,caller:ve}),[x,w]=c.useState(!1),_=pe(v),P=st(t),b=c.useRef(!1),[F,O]=c.useState(0);return c.useEffect(()=>{const S=h.current;if(S)return S.addEventListener(Se,_),()=>S.removeEventListener(Se,_)},[_]),u.jsx(vn,{scope:t,orientation:o,dir:g,loop:s,currentTabStopId:R,onItemFocus:c.useCallback(S=>y(S),[y]),onItemShiftTab:c.useCallback(()=>w(!0),[]),onFocusableItemAdd:c.useCallback(()=>O(S=>S+1),[]),onFocusableItemRemove:c.useCallback(()=>O(S=>S-1),[]),children:u.jsx(H.div,{tabIndex:x||F===0?-1:0,"data-orientation":o,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:I(e.onMouseDown,()=>{b.current=!0}),onFocus:I(e.onFocus,S=>{const $=!b.current;if(S.target===S.currentTarget&&$&&!x){const U=new CustomEvent(Se,pn);if(S.currentTarget.dispatchEvent(U),!U.defaultPrevented){const V=P().filter(D=>D.focusable),K=V.find(D=>D.active),B=V.find(D=>D.id===R),J=[K,B,...V].filter(Boolean).map(D=>D.ref.current);Ae(J,d)}}b.current=!1}),onBlur:I(e.onBlur,()=>w(!1))})})},"RovingFocusGroupImpl")),wn="RovingFocusGroupItem",xn=c.forwardRef(q(function(e,n){const{__scopeRovingFocusGroup:t,focusable:o=!0,active:s=!1,tabStopId:i,children:a,...p}=e,l=re(),v=i||l,d=gn(wn,t),f=d.currentTabStopId===v,h=st(t),{onFocusableItemAdd:m,onFocusableItemRemove:g,currentTabStopId:R}=d,y=dn();return Yt(()=>{if(!(!y||!o))return m(),()=>g()},[y,o,m,g]),c.useEffect(()=>{if(!(y||!o))return m(),()=>g()},[y,o,m,g]),u.jsx(be.ItemSlot,{scope:t,id:v,focusable:o,active:s,children:u.jsx(H.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...p,ref:n,onMouseDown:I(e.onMouseDown,x=>{o?d.onItemFocus(v):x.preventDefault()}),onFocus:I(e.onFocus,()=>d.onItemFocus(v)),onKeyDown:I(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){d.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const w=ut(x,d.orientation,d.dir);if(w!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let P=h().filter(b=>b.focusable).map(b=>b.ref.current);if(w==="last")P.reverse();else if(w==="prev"||w==="next"){w==="prev"&&P.reverse();const b=P.indexOf(x.currentTarget);P=d.loop?at(P,b+1):P.slice(b+1)}setTimeout(()=>Ae(P))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:R!=null}):a})})},"RovingFocusGroupItem")),In={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function it(r,e){return e!=="rtl"?r:r==="ArrowLeft"?"ArrowRight":r==="ArrowRight"?"ArrowLeft":r}q(it,"getDirectionAwareKey");function ut(r,e,n){const t=it(r.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(t))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(t)))return In[t]}q(ut,"getFocusIntent");function Ae(r,e=!1){const n=document.activeElement;for(const t of r)if(t===n||(t.focus({preventScroll:e}),document.activeElement!==n))return}q(Ae,"focusFirst");function at(r,e){return r.map((n,t)=>r[(e+t)%r.length])}q(at,"wrapArray");var Rn=Mn,Sn=xn,_n=Object.defineProperty,C=(r,e)=>_n(r,"name",{value:e,configurable:!0}),ye=["Enter"," "],bn=["ArrowDown","PageUp","Home"],lt=["ArrowUp","PageDown","End"],yn=[...bn,...lt],Pn={ltr:[...ye,"ArrowRight"],rtl:[...ye,"ArrowLeft"]},Dn={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ge="Menu",[ce,En,Tn]=Ee(ge),[Z,dt]=ue(ge,[Tn,He,ct]),ae=He(),ft=ct(),[pt,Y]=Z(ge),[On,le]=Z(ge),An=C(r=>{const{__scopeMenu:e,open:n=!1,children:t,dir:o,onOpenChange:s,modal:i=!0}=r,a=ae(e),[p,l]=c.useState(null),v=c.useRef(!1),d=pe(s),f=me(o);return c.useEffect(()=>{const h=C(()=>{v.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},"handleKeyDown"),m=C(()=>v.current=!1,"handlePointer");return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),c.useEffect(()=>{if(!n)return;const h=C(()=>d(!1),"handleBlur");return window.addEventListener("blur",h),()=>window.removeEventListener("blur",h)},[n,d]),u.jsx(Ye,{...a,children:u.jsx(pt,{scope:e,open:n,onOpenChange:d,content:p,onContentChange:l,children:u.jsx(On,{scope:e,onClose:c.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:v,dir:f,modal:i,children:t})})})},"Menu"),ht=c.forwardRef(C(function(e,n){const{__scopeMenu:t,...o}=e,s=ae(t);return u.jsx(tn,{...s,...o,ref:n})},"MenuAnchor")),mt="MenuPortal",[jn,vt]=Z(mt,{forceMount:void 0}),kn=C(r=>{const{__scopeMenu:e,forceMount:n,children:t,container:o}=r,s=Y(mt,e);return u.jsx(jn,{scope:e,forceMount:n,children:u.jsx(he,{present:n||s.open,children:u.jsx(Jt,{asChild:!0,container:o,children:t})})})},"MenuPortal"),z="MenuContent",[Fn,je]=Z(z),Ln=c.forwardRef(C(function(e,n){const t=vt(z,e.__scopeMenu),{forceMount:o=t.forceMount,...s}=e,i=Y(z,e.__scopeMenu),a=le(z,e.__scopeMenu);return u.jsx(ce.Provider,{scope:e.__scopeMenu,children:u.jsx(he,{present:o||i.open,children:u.jsx(ce.Slot,{scope:e.__scopeMenu,children:a.modal?u.jsx(Nn,{...s,ref:n}):u.jsx(Gn,{...s,ref:n})})})})},"MenuContent")),Nn=c.forwardRef(C(function(e,n){const t=Y(z,e.__scopeMenu),o=c.useRef(null),s=G(n,o);return c.useEffect(()=>{const i=o.current;if(i)return en(i)},[]),u.jsx(ke,{...e,ref:s,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:I(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)})},"MenuRootContentModal")),Gn=c.forwardRef(C(function(e,n){const t=Y(z,e.__scopeMenu);return u.jsx(ke,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)})},"MenuRootContentNonModal")),Kn=se("MenuContent.ScrollLock"),ke=c.forwardRef(C(function(e,n){const{__scopeMenu:t,loop:o=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:p,onEntryFocus:l,onEscapeKeyDown:v,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,disableOutsideScroll:g,...R}=e,y=Y(z,t),x=le(z,t),w=ae(t),_=ft(t),P=En(t),[b,F]=c.useState(null),O=c.useRef(null),S=G(n,O,y.onContentChange),$=c.useRef(0),U=c.useRef(""),V=c.useRef(0),K=c.useRef(null),B=c.useRef("right"),X=c.useRef(0),J=g?Wt:c.Fragment,D=g?{as:Kn,allowPinchZoom:!0}:void 0,Bt=C(M=>{const ee=U.current+M,W=P().filter(L=>!L.disabled),ne=document.activeElement,Ce=W.find(L=>L.ref.current===ne)?.textValue,we=W.map(L=>L.textValue),Ge=_t(we,ee,Ce),oe=W.find(L=>L.textValue===Ge)?.ref.current;C((function L(Ke){U.current=Ke,window.clearTimeout($.current),Ke!==""&&($.current=window.setTimeout(()=>L(""),1e3))}),"updateSearch")(ee),oe&&setTimeout(()=>oe.focus())},"handleTypeaheadSearch");c.useEffect(()=>()=>window.clearTimeout($.current),[]),Xt();const Q=c.useCallback(M=>B.current===K.current?.side&&yt(M,K.current?.area),[]);return u.jsx(Fn,{scope:t,searchRef:U,onItemEnter:c.useCallback(M=>{Q(M)&&M.preventDefault()},[Q]),onItemLeave:c.useCallback(M=>{Q(M)||(O.current?.focus(),F(null))},[Q]),onTriggerLeave:c.useCallback(M=>{Q(M)&&M.preventDefault()},[Q]),pointerGraceTimerRef:V,onPointerGraceIntentChange:c.useCallback(M=>{K.current=M},[]),children:u.jsx(J,{...D,children:u.jsx(qt,{asChild:!0,trapped:s,onMountAutoFocus:I(i,M=>{M.preventDefault(),O.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:u.jsx(Zt,{asChild:!0,disableOutsidePointerEvents:p,onEscapeKeyDown:v,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,children:u.jsx(Rn,{asChild:!0,..._,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:b,onCurrentTabStopIdChange:F,onEntryFocus:I(l,M=>{x.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsx(nn,{role:"menu","aria-orientation":"vertical","data-state":Le(y.open),"data-radix-menu-content":"",dir:x.dir,...w,...R,ref:S,style:{outline:"none",...R.style},onKeyDown:I(R.onKeyDown,M=>{const W=M.target.closest("[data-radix-menu-content]")===M.currentTarget,ne=M.ctrlKey||M.altKey||M.metaKey,Ce=M.key.length===1;W&&(M.key==="Tab"&&M.preventDefault(),!ne&&Ce&&Bt(M.key));const we=O.current;if(M.target!==we||!yn.includes(M.key))return;M.preventDefault();const oe=P().filter(L=>!L.disabled).map(L=>L.ref.current);lt.includes(M.key)&&oe.reverse(),Rt(oe)}),onBlur:I(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout($.current),U.current="")}),onPointerMove:I(e.onPointerMove,te(M=>{const ee=M.target,W=X.current!==M.clientX;if(M.currentTarget.contains(ee)&&W){const ne=M.clientX>X.current?"right":"left";B.current=ne,X.current=M.clientX}}))})})})})})})},"MenuContentImpl")),gt=c.forwardRef(C(function(e,n){const{__scopeMenu:t,...o}=e;return u.jsx(H.div,{role:"group",...o,ref:n})},"MenuGroup")),Un=c.forwardRef(C(function(e,n){const{__scopeMenu:t,...o}=e;return u.jsx(H.div,{...o,ref:n})},"MenuLabel")),Pe="MenuItem",Be="menu.itemSelect",Fe=c.forwardRef(C(function(e,n){const{disabled:t=!1,onSelect:o,...s}=e,i=c.useRef(null),a=le(Pe,e.__scopeMenu),p=je(Pe,e.__scopeMenu),l=G(n,i),v=c.useRef(!1),d=C(()=>{const f=i.current;if(!t&&f){const h=new CustomEvent(Be,{bubbles:!0,cancelable:!0});f.addEventListener(Be,m=>o?.(m),{once:!0}),Qt(f,h),h.defaultPrevented?v.current=!1:a.onClose()}},"handleSelect");return u.jsx(Mt,{...s,ref:l,disabled:t,onClick:I(e.onClick,d),onPointerDown:f=>{e.onPointerDown?.(f),v.current=!0},onPointerUp:I(e.onPointerUp,f=>{v.current||f.currentTarget?.click()}),onKeyDown:I(e.onKeyDown,f=>{t||f.target!==f.currentTarget||p.searchRef.current!==""&&f.key===" "||ye.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})},"MenuItem")),Mt=c.forwardRef(C(function(e,n){const{__scopeMenu:t,disabled:o=!1,textValue:s,...i}=e,a=je(Pe,t),p=ft(t),l=c.useRef(null),v=G(n,l),[d,f]=c.useState(!1),[h,m]=c.useState("");return c.useEffect(()=>{const g=l.current;g&&m((g.textContent??"").trim())},[i.children]),u.jsx(ce.ItemSlot,{scope:t,disabled:o,textValue:s??h,children:u.jsx(Sn,{asChild:!0,...p,focusable:!o,children:u.jsx(H.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...i,ref:v,onPointerMove:I(e.onPointerMove,te(g=>{o?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:I(e.onPointerLeave,te(g=>a.onItemLeave(g))),onFocus:I(e.onFocus,()=>f(!0)),onBlur:I(e.onBlur,()=>f(!1))})})})},"MenuItemImpl")),zn=c.forwardRef(C(function(e,n){const{checked:t=!1,onCheckedChange:o,...s}=e;return u.jsx(wt,{scope:e.__scopeMenu,checked:t,children:u.jsx(Fe,{role:"menuitemcheckbox","aria-checked":ie(t)?"mixed":t,...s,ref:n,"data-state":Me(t),onSelect:I(s.onSelect,()=>o?.(ie(t)?!0:!t),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem")),$n="MenuRadioGroup",[Vn,Bn]=Z($n,{value:void 0,onValueChange:C(()=>{},"onValueChange")}),Hn=c.forwardRef(C(function(e,n){const{value:t,onValueChange:o,...s}=e,i=pe(o);return u.jsx(Vn,{scope:e.__scopeMenu,value:t,onValueChange:i,children:u.jsx(gt,{...s,ref:n})})},"MenuRadioGroup")),Yn="MenuRadioItem",Xn=c.forwardRef(C(function(e,n){const{value:t,...o}=e,s=Bn(Yn,e.__scopeMenu),i=t===s.value;return u.jsx(wt,{scope:e.__scopeMenu,checked:i,children:u.jsx(Fe,{role:"menuitemradio","aria-checked":i,...o,ref:n,"data-state":Me(i),onSelect:I(o.onSelect,()=>s.onValueChange?.(t),{checkForDefaultPrevented:!1})})})},"MenuRadioItem")),Ct="MenuItemIndicator",[wt,Wn]=Z(Ct,{checked:!1}),qn=c.forwardRef(C(function(e,n){const{__scopeMenu:t,forceMount:o,...s}=e,i=Wn(Ct,t);return u.jsx(he,{present:o||ie(i.checked)||i.checked===!0,children:u.jsx(H.span,{...s,ref:n,"data-state":Me(i.checked)})})},"MenuItemIndicator")),Zn=c.forwardRef(C(function(e,n){const{__scopeMenu:t,...o}=e;return u.jsx(H.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})},"MenuSeparator")),Jn=c.forwardRef(C(function(e,n){const{__scopeMenu:t,...o}=e,s=ae(t);return u.jsx(on,{...s,...o,ref:n})},"MenuArrow")),xt="MenuSub",[Qn,It]=Z(xt),eo=C(r=>{const{__scopeMenu:e,children:n,open:t=!1,onOpenChange:o}=r,s=Y(xt,e),i=ae(e),[a,p]=c.useState(null),[l,v]=c.useState(null),d=pe(o);return c.useEffect(()=>(s.open===!1&&d(!1),()=>d(!1)),[s.open,d]),u.jsx(Ye,{...i,children:u.jsx(pt,{scope:e,open:t,onOpenChange:d,content:l,onContentChange:v,children:u.jsx(Qn,{scope:e,contentId:re(),triggerId:re(),trigger:a,onTriggerChange:p,children:n})})})},"MenuSub"),de="MenuSubTrigger",to=c.forwardRef(C(function(e,n){const t=Y(de,e.__scopeMenu),o=le(de,e.__scopeMenu),s=It(de,e.__scopeMenu),i=je(de,e.__scopeMenu),a=c.useRef(null),{pointerGraceTimerRef:p,onPointerGraceIntentChange:l}=i,v={__scopeMenu:e.__scopeMenu},d=c.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);c.useEffect(()=>d,[d]),c.useEffect(()=>{const h=p.current;return()=>{window.clearTimeout(h),l(null)}},[p,l]);const f=G(n,s.onTriggerChange);return u.jsx(ht,{asChild:!0,...v,children:u.jsx(Mt,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":t.open?s.contentId:void 0,"data-state":Le(t.open),...e,ref:f,onClick:h=>{e.onClick?.(h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),t.open||t.onOpenChange(!0))},onPointerMove:I(e.onPointerMove,te(h=>{i.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!t.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{t.onOpenChange(!0),d()},100))})),onPointerLeave:I(e.onPointerLeave,te(h=>{d();const m=t.content?.getBoundingClientRect();if(m){const g=t.content?.dataset.side,R=g==="right",y=R?-5:5,x=m[R?"left":"right"],w=m[R?"right":"left"];i.onPointerGraceIntentChange({area:[{x:h.clientX+y,y:h.clientY},{x,y:m.top},{x:w,y:m.top},{x:w,y:m.bottom},{x,y:m.bottom}],side:g}),window.clearTimeout(p.current),p.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(h),h.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:I(e.onKeyDown,h=>{e.disabled||h.target!==h.currentTarget||i.searchRef.current!==""&&h.key===" "||Pn[o.dir].includes(h.key)&&(t.onOpenChange(!0),t.content?.focus(),h.preventDefault())})})})},"MenuSubTrigger")),no="MenuSubContent",oo=c.forwardRef(C(function(e,n){const t=vt(z,e.__scopeMenu),{forceMount:o=t.forceMount,align:s="start",...i}=e,a=Y(z,e.__scopeMenu),p=le(z,e.__scopeMenu),l=It(no,e.__scopeMenu),v=c.useRef(null),d=G(n,v);return u.jsx(ce.Provider,{scope:e.__scopeMenu,children:u.jsx(he,{present:o||a.open,children:u.jsx(ce.Slot,{scope:e.__scopeMenu,children:u.jsx(ke,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:d,align:s,side:p.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{p.isUsingKeyboardRef.current&&v.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:I(e.onFocusOutside,f=>{f.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:I(e.onEscapeKeyDown,f=>{p.onClose(),f.preventDefault()}),onKeyDown:I(e.onKeyDown,f=>{const h=f.currentTarget.contains(f.target),m=Dn[p.dir].includes(f.key);h&&m&&(a.onOpenChange(!1),l.trigger?.focus(),f.preventDefault())})})})})})},"MenuSubContent"));function Le(r){return r?"open":"closed"}C(Le,"getOpenState");function ie(r){return r==="indeterminate"}C(ie,"isIndeterminate");function Me(r){return ie(r)?"indeterminate":r?"checked":"unchecked"}C(Me,"getCheckedState");function Rt(r){const e=document.activeElement;for(const n of r)if(n===e||(n.focus(),document.activeElement!==e))return}C(Rt,"focusFirst");function St(r,e){return r.map((n,t)=>r[(e+t)%r.length])}C(St,"wrapArray");function _t(r,e,n){const o=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,s=n?r.indexOf(n):-1;let i=St(r,Math.max(s,0));o.length===1&&(i=i.filter(l=>l!==n));const p=i.find(l=>l.toLowerCase().startsWith(o.toLowerCase()));return p!==n?p:void 0}C(_t,"getNextMatch");function bt(r,e){const{x:n,y:t}=r;let o=!1;for(let s=0,i=e.length-1;s<e.length;i=s++){const a=e[s],p=e[i],l=a.x,v=a.y,d=p.x,f=p.y;v>t!=f>t&&n<(d-l)*(t-v)/(f-v)+l&&(o=!o)}return o}C(bt,"isPointInPolygon");function yt(r,e){if(!e)return!1;const n={x:r.clientX,y:r.clientY};return bt(n,e)}C(yt,"isPointerInGraceArea");function te(r){return e=>e.pointerType==="mouse"?r(e):void 0}C(te,"whenMouse");var ro=An,so=ht,co=kn,io=Ln,uo=gt,ao=Un,lo=Fe,fo=zn,po=Hn,ho=Xn,mo=qn,vo=Zn,go=Jn,Mo=eo,Co=to,wo=oo,xo=Object.defineProperty,j=(r,e)=>xo(r,"name",{value:e,configurable:!0}),Ne="DropdownMenu",[Io,Ro]=ue(Ne,[dt]),k=dt(),[So,Pt]=Io(Ne),Dt=j(r=>{const{__scopeDropdownMenu:e,children:n,dir:t,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=r,p=k(e),l=c.useRef(null),[v,d]=De({prop:o,defaultProp:s??!1,onChange:i,caller:Ne});return u.jsx(So,{scope:e,triggerId:re(),triggerRef:l,contentId:re(),open:v,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(f=>!f),[d]),modal:a,children:u.jsx(ro,{...p,open:v,onOpenChange:d,dir:t,modal:a,children:n})})},"DropdownMenu"),_o="DropdownMenuTrigger",Et=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,disabled:o=!1,...s}=e,i=Pt(_o,t),a=k(t),p=G(n,i.triggerRef);return u.jsx(so,{asChild:!0,...a,children:u.jsx(H.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...s,ref:p,onPointerDown:I(e.onPointerDown,l=>{!o&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:I(e.onKeyDown,l=>{o||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})},"DropdownMenuTrigger")),Tt=j(r=>{const{__scopeDropdownMenu:e,...n}=r,t=k(e);return u.jsx(co,{...t,...n})},"DropdownMenuPortal"),bo="DropdownMenuContent",Ot=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=Pt(bo,t),i=k(t),a=c.useRef(!1);return u.jsx(io,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...o,ref:n,onCloseAutoFocus:I(e.onCloseAutoFocus,p=>{a.current||s.triggerRef.current?.focus(),a.current=!1,p.preventDefault()}),onInteractOutside:I(e.onInteractOutside,p=>{const l=p.detail.originalEvent,v=l.button===0&&l.ctrlKey===!0,d=l.button===2||v;(!s.modal||d)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),At=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=k(t);return u.jsx(uo,{...s,...o,ref:n})},"DropdownMenuGroup")),jt=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=k(t);return u.jsx(ao,{...s,...o,ref:n})},"DropdownMenuLabel")),kt=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=k(t);return u.jsx(lo,{...s,...o,ref:n})},"DropdownMenuItem")),Ft=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=k(t);return u.jsx(fo,{...s,...o,ref:n})},"DropdownMenuCheckboxItem")),Lt=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=k(t);return u.jsx(po,{...s,...o,ref:n})},"DropdownMenuRadioGroup")),Nt=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=k(t);return u.jsx(ho,{...s,...o,ref:n})},"DropdownMenuRadioItem")),Gt=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=k(t);return u.jsx(mo,{...s,...o,ref:n})},"DropdownMenuItemIndicator")),Kt=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=k(t);return u.jsx(vo,{...s,...o,ref:n})},"DropdownMenuSeparator")),Ut=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=k(t);return u.jsx(go,{...s,...o,ref:n})},"DropdownMenuArrow")),zt=j(r=>{const{__scopeDropdownMenu:e,children:n,open:t,onOpenChange:o,defaultOpen:s}=r,i=k(e),[a,p]=De({prop:t,defaultProp:s??!1,onChange:o,caller:"DropdownMenuSub"});return u.jsx(Mo,{...i,open:a,onOpenChange:p,children:n})},"DropdownMenuSub"),$t=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=k(t);return u.jsx(Co,{...s,...o,ref:n})},"DropdownMenuSubTrigger")),Vt=c.forwardRef(j(function(e,n){const{__scopeDropdownMenu:t,...o}=e,s=k(t);return u.jsx(wo,{...s,...o,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuSubContent")),yo=Dt,Po=Et,Do=Tt,Eo=Ot,To=At,Oo=jt,Ao=kt,jo=Ft,ko=Lt,Fo=Nt,Lo=Gt,No=Kt,Go=Ut,Ko=zt,Uo=$t,zo=Vt;const Zo=Object.freeze(Object.defineProperty({__proto__:null,Arrow:Go,CheckboxItem:jo,Content:Eo,DropdownMenu:Dt,DropdownMenuArrow:Ut,DropdownMenuCheckboxItem:Ft,DropdownMenuContent:Ot,DropdownMenuGroup:At,DropdownMenuItem:kt,DropdownMenuItemIndicator:Gt,DropdownMenuLabel:jt,DropdownMenuPortal:Tt,DropdownMenuRadioGroup:Lt,DropdownMenuRadioItem:Nt,DropdownMenuSeparator:Kt,DropdownMenuSub:zt,DropdownMenuSubContent:Vt,DropdownMenuSubTrigger:$t,DropdownMenuTrigger:Et,Group:To,Item:Ao,ItemIndicator:Lo,Label:Oo,Portal:Do,RadioGroup:ko,RadioItem:Fo,Root:yo,Separator:No,Sub:Ko,SubContent:zo,SubTrigger:Uo,Trigger:Po,createDropdownMenuScope:Ro},Symbol.toStringTag,{value:"Module"}));const $o=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Jo=rn("file-text",$o);export{so as A,Eo as C,Jo as F,uo as G,Lo as I,Oo as L,Do as P,yo as R,No as S,Po as T,jo as a,Ao as b,Ee as c,dt as d,lo as e,mo as f,ao as g,co as h,po as i,ho as j,vo as k,Mo as l,wo as m,Co as n,ro as o,io as p,fo as q,go as r,ct as s,Rn as t,me as u,Sn as v,cn as w,dn as x,qo as y,Zo as z};
@@ -1 +1 @@
1
- import{r as c,j as t}from"./react-Dh7j6h1K.js";import{B as l}from"./view-context-DKIrg--H.js";import{m}from"./metadata-Clyy4qXZ.js";import{C as p}from"./chevron-down-BX9NAmJK.js";import"./markdown-BvBsne3X.js";import"./index-BjrX8Pf-.js";import"./index-B9Ju-85a.js";import"./tanstack-CirxkzEx.js";const u=e=>{const r=e.split("/").at(-1).replace(/\.(?:html?|markdown|md|text|txt)$/i,"").replaceAll(/[-_]/g," ").replace(/^\d{4} \d{2} \d{2} /,"");return`${r.charAt(0).toUpperCase()}${r.slice(1)}`},h=(e,r)=>{const n=e.split("/").slice(0,-1).join("/"),s=`https://barkdown.local/${n?`${n}/`:""}`;return new URL(r,s).pathname.slice(1)};function x({value:e}){return Array.isArray(e)?t.jsx("span",{className:"flex flex-wrap gap-1.5",children:e.map((r,n)=>t.jsx("span",{children:String(r)},`${n}-${String(r)}`))}):typeof e=="boolean"?e?"Yes":"No":typeof e=="object"&&e?JSON.stringify(e):String(e??"")}function f({entries:e}){return t.jsxs("details",{className:"frontmatter",children:[t.jsxs("summary",{children:[t.jsx("span",{children:"Document details"}),t.jsxs("small",{children:[e.length," fields"]}),t.jsx(p,{"aria-hidden":"true"})]}),t.jsx("dl",{children:e.map(([r,n])=>t.jsxs("div",{children:[t.jsx("dt",{children:r.replaceAll(/[-_]/g," ")}),t.jsx("dd",{children:t.jsx(x,{value:n})})]},r))})]})}function j({dataset:e,path:r}){const n=c.useMemo(()=>r?e.documents.find(o=>o.path===r):e.documents.find(o=>o.path.toLowerCase()==="readme.md")??e.documents[0],[e,r]);if(!n)return t.jsx("p",{className:"barkdown-document-empty",children:"No document found."});const s=n.kind==="markdown"?m(n.content):{body:n.content,entries:[]};return t.jsxs("article",{className:n.kind==="html"?"document is-html":"document",tabIndex:-1,children:[s.entries.length?t.jsx(f,{entries:s.entries}):null,n.kind==="html"?t.jsx("iframe",{className:"html-document",sandbox:"",srcDoc:n.content,title:u(n.path)}):n.kind==="markdown"?t.jsx(l,{headingCopyPath:e.root?`${e.root.replace(/\/+$/,"")}/${n.path}`:void 0,mode:"markdown",value:s.body,htmlEmbed:o=>{const a=h(n.path,o);return e.documents.find(d=>d.kind==="html"&&d.path===a)?.content}}):t.jsx("pre",{className:"text-document",children:n.content})]})}function E({path:e,source:r}){const[n,s]=c.useState(),[o,a]=c.useState("");return c.useEffect(()=>{let i=!0;return r.read().then(d=>{i&&(s(d),a(""))}).catch(d=>{i&&a(d instanceof Error?d.message:"Could not load file.")}),()=>{i=!1}},[r]),t.jsx("div",{className:"fixed inset-0 z-30 overflow-auto bg-white","data-file-viewer":"",children:t.jsx("div",{className:"mx-auto max-w-[900px] px-6 py-8",children:o?t.jsx("p",{className:"barkdown-document-error",children:o}):n?t.jsx(j,{dataset:n,path:e}):t.jsx("p",{className:"barkdown-document-loading",children:"Loading file…"})})})}export{E as FileViewer};
1
+ import{r as c,j as t}from"./react-Dh7j6h1K.js";import{B as l}from"./view-context-DyuiMZAo.js";import{m}from"./metadata-Dy1R-He2.js";import{C as p}from"./chevron-down-CiyxliRS.js";import"./markdown-BvBsne3X.js";import"./index-CKJsEQtp.js";import"./index-DbD-bwdm.js";import"./tanstack-CirxkzEx.js";const u=e=>{const r=e.split("/").at(-1).replace(/\.(?:html?|markdown|md|text|txt)$/i,"").replaceAll(/[-_]/g," ").replace(/^\d{4} \d{2} \d{2} /,"");return`${r.charAt(0).toUpperCase()}${r.slice(1)}`},h=(e,r)=>{const n=e.split("/").slice(0,-1).join("/"),s=`https://barkdown.local/${n?`${n}/`:""}`;return new URL(r,s).pathname.slice(1)};function x({value:e}){return Array.isArray(e)?t.jsx("span",{className:"flex flex-wrap gap-1.5",children:e.map((r,n)=>t.jsx("span",{children:String(r)},`${n}-${String(r)}`))}):typeof e=="boolean"?e?"Yes":"No":typeof e=="object"&&e?JSON.stringify(e):String(e??"")}function f({entries:e}){return t.jsxs("details",{className:"frontmatter",children:[t.jsxs("summary",{children:[t.jsx("span",{children:"Document details"}),t.jsxs("small",{children:[e.length," fields"]}),t.jsx(p,{"aria-hidden":"true"})]}),t.jsx("dl",{children:e.map(([r,n])=>t.jsxs("div",{children:[t.jsx("dt",{children:r.replaceAll(/[-_]/g," ")}),t.jsx("dd",{children:t.jsx(x,{value:n})})]},r))})]})}function j({dataset:e,path:r}){const n=c.useMemo(()=>r?e.documents.find(o=>o.path===r):e.documents.find(o=>o.path.toLowerCase()==="readme.md")??e.documents[0],[e,r]);if(!n)return t.jsx("p",{className:"barkdown-document-empty",children:"No document found."});const s=n.kind==="markdown"?m(n.content):{body:n.content,entries:[]};return t.jsxs("article",{className:n.kind==="html"?"document is-html":"document",tabIndex:-1,children:[s.entries.length?t.jsx(f,{entries:s.entries}):null,n.kind==="html"?t.jsx("iframe",{className:"html-document",sandbox:"",srcDoc:n.content,title:u(n.path)}):n.kind==="markdown"?t.jsx(l,{headingCopyPath:e.root?`${e.root.replace(/\/+$/,"")}/${n.path}`:void 0,mode:"markdown",value:s.body,htmlEmbed:o=>{const a=h(n.path,o);return e.documents.find(d=>d.kind==="html"&&d.path===a)?.content}}):t.jsx("pre",{className:"text-document",children:n.content})]})}function E({path:e,source:r}){const[n,s]=c.useState(),[o,a]=c.useState("");return c.useEffect(()=>{let i=!0;return r.read().then(d=>{i&&(s(d),a(""))}).catch(d=>{i&&a(d instanceof Error?d.message:"Could not load file.")}),()=>{i=!1}},[r]),t.jsx("div",{className:"fixed inset-0 z-30 overflow-auto bg-white","data-file-viewer":"",children:t.jsx("div",{className:"mx-auto max-w-[900px] px-6 py-8",children:o?t.jsx("p",{className:"barkdown-document-error",children:o}):n?t.jsx(j,{dataset:n,path:e}):t.jsx("p",{className:"barkdown-document-loading",children:"Loading file…"})})})}export{E as FileViewer};
@@ -1,4 +1,4 @@
1
- import{g as Xe}from"./chunk-5VM5RSS4-YC-XnadT.js";import{g as Qe}from"./chunk-XXDRQBXY-B8VOyKvi.js";import{s as Je}from"./chunk-VR4S4FIN-BEXJFqwW.js";import{_ as k,b6 as Ze,F as Me,l as J,c as g1,u as $e,v as et,x as re,b as tt,s as st,n as it,a as rt,g as at,o as nt,k as ut,G as ot,J as lt,bo as ct,q as se,d as ie,N as ht,p as dt,b8 as pt,r as ft}from"./mermaid.core-aYzB5any.js";import{f as gt}from"./chunk-32BRIVSS-CGVIeMh2.js";import{c as bt}from"./channel-Dl1wIhHR.js";var At="flowchart-",G1,kt=(G1=class{constructor(){this.vertexCounter=0,this.config=g1(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=tt,this.setAccDescription=st,this.setDiagramTitle=it,this.getAccTitle=rt,this.getAccDescription=at,this.getDiagramTitle=nt,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return ut.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const r of this.vertices.values())if(r.id===i)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,r,a,n,l,p,c={},g){if(!i||i.trim().length===0)return;let u;if(g!==void 0){let m;g.includes(`
1
+ import{g as Xe}from"./chunk-5VM5RSS4-BBjGl_Dr.js";import{g as Qe}from"./chunk-XXDRQBXY-DGKhiMOo.js";import{s as Je}from"./chunk-VR4S4FIN-BkMRGbPv.js";import{_ as k,b6 as Ze,F as Me,l as J,c as g1,u as $e,v as et,x as re,b as tt,s as st,n as it,a as rt,g as at,o as nt,k as ut,G as ot,J as lt,bo as ct,q as se,d as ie,N as ht,p as dt,b8 as pt,r as ft}from"./mermaid.core-BEwF5fZo.js";import{f as gt}from"./chunk-32BRIVSS-BtdUGMBQ.js";import{c as bt}from"./channel-CGNx58wi.js";var At="flowchart-",G1,kt=(G1=class{constructor(){this.vertexCounter=0,this.config=g1(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=tt,this.setAccDescription=st,this.setDiagramTitle=it,this.getAccTitle=rt,this.getAccDescription=at,this.getDiagramTitle=nt,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return ut.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const r of this.vertices.values())if(r.id===i)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,r,a,n,l,p,c={},g){if(!i||i.trim().length===0)return;let u;if(g!==void 0){let m;g.includes(`
2
2
  `)?m=g+`
3
3
  `:m=`{
4
4
  `+g+`
@@ -0,0 +1,4 @@
1
+ import{j as e,r as h}from"./react-Dh7j6h1K.js";import{c as b,B as j,C as m}from"./check-DjJ4znpk.js";import{S as y,a as d}from"./utils-CvINCDjn.js";import{C,a as N,b as F,c as k,d as u,e as f}from"./command-B-4JoDzT.js";import{P as w,a as z,b as I,F as P}from"./popover-DvKy7gF6.js";import{c as _}from"./index-CKJsEQtp.js";const S=[["path",{d:"M10.7 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 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]],x=_("folder-search",S),B=b("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function E({className:t,variant:s,asChild:o=!1,...n}){const a=o?y:"span";return e.jsx(a,{"data-slot":"badge",className:d(B({variant:s}),t),...n})}const v=h.createContext(()=>e.jsx(P,{"aria-hidden":"true"}));function O({children:t,renderIcon:s}){return e.jsx(v.Provider,{value:s,children:t})}function V(t,s){return e.jsx("span",{"aria-hidden":"true",className:`inline-flex size-4 shrink-0 items-center justify-center
2
+ [&>img]:size-full [&>img]:rounded-sm [&>img]:object-contain
3
+ [&>svg]:size-full`,children:t(s)})}function R({allLabel:t="All folders",ariaLabel:s="Filter by folder",choices:o,onSelect:n,selected:a,total:l}){const g=h.useContext(v),c=r=>a.includes(r),p=r=>c(r)?n(a.filter(i=>i!==r)):n([...a,r]);return e.jsxs(w,{children:[e.jsx(z,{asChild:!0,children:e.jsxs(j,{"aria-label":s,className:`gap-1.5 border-[#dde1dc] bg-white text-[0.82rem]
4
+ font-medium text-[#4a554b] hover:bg-[#f3f5f2]`,size:"sm",type:"button",variant:"outline",children:[e.jsx(x,{"aria-hidden":"true",className:"size-4 text-[#6c7a6d]"}),"Folder",e.jsx(E,{className:"ml-0.5 bg-[#dce8de] px-1.5 text-[#3f6048]",variant:"secondary",children:a.length>0?a.length:l})]})}),e.jsx(I,{align:"start",className:"w-72 overflow-hidden p-0",sideOffset:6,children:e.jsxs(C,{children:[e.jsx(N,{placeholder:"Search folders…"}),e.jsxs(F,{children:[e.jsx(k,{children:"No folders match"}),e.jsx(u,{children:e.jsxs(f,{onSelect:()=>n([]),value:"__all__",children:[e.jsx(x,{"aria-hidden":"true",className:"size-4 text-[#6c7a6d]"}),e.jsx("span",{children:t}),e.jsx("span",{className:d("ml-auto text-[0.75rem] font-medium",a.length===0?"text-[#3f6048]":"text-[#6c7a6d]"),children:l}),a.length===0?e.jsx(m,{"aria-hidden":"true",className:"size-4 text-[#3f6048]"}):null]})}),e.jsx(u,{heading:"Folders",children:o.map(r=>{const i=c(r.folder);return e.jsxs(f,{onSelect:()=>p(r.folder),title:r.folder,value:r.folder,children:[V(g,r.folder),e.jsx("span",{className:"truncate",children:r.relativePath===""?"This folder":r.label}),e.jsx("span",{className:d("ml-auto text-[0.75rem] font-medium",i?"text-[#3f6048]":"text-[#6c7a6d]"),children:r.count}),i?e.jsx(m,{"aria-hidden":"true",className:"size-4 shrink-0 text-[#3f6048]"}):null]},r.folder)})})]})]})})]})}export{O as F,R as a};
@@ -0,0 +1 @@
1
+ import{r as d,j as e}from"./react-Dh7j6h1K.js";import{F as o}from"./popover-DvKy7gF6.js";function u({icon:r}){const[a,s]=d.useState(),t=typeof r=="string"?r:r?r.url??`data:${r.mediaType};base64,${r.data}`:void 0;return!t||a===t?e.jsx(o,{"aria-hidden":"true"}):e.jsx("img",{alt:"","aria-hidden":"true",onError:()=>s(t),src:t})}export{u as F};
@@ -0,0 +1,55 @@
1
+ import{r as v,j as e,T as re,t as ie,v as le,w as oe,S as de,x as ce,y as ue,z as he,A as xe}from"./react-Dh7j6h1K.js";import{C as pe,c as fe,B as k}from"./check-DjJ4znpk.js";import{c as be}from"./copy-context-Bj8Sfpo7.js";import{a as d,S as L}from"./utils-CvINCDjn.js";import{F as B,P as me,a as ge,b as je}from"./popover-DvKy7gF6.js";import{R as ve,P as Ne,a as we,T as ye,b as Se,C as ke,A as Ce}from"./index-BSHr1oc9.js";import{X as Te}from"./x-GGS-h4Nm.js";import{D as Ae,a as _e,b as Ie,c as Fe,d as Me,e as ze,f as De}from"./index-4JQ747xt.js";import{c as P}from"./index-CKJsEQtp.js";import{F as I}from"./folder-open-CqSoJtKT.js";import{S as Ee}from"./search-Cx23EFPc.js";import{C as Le,A as O,f as $}from"./app-options-CIiczgaQ.js";import{F as Be,o as Pe}from"./folder-list-BPufqaem.js";import{r as Oe}from"./folder-activity-Cv1X2ezj.js";import{F as y}from"./file-text-C3hyr-Ql.js";import{F as R}from"./folder-image-Cy-8Vgmd.js";import{C as K}from"./chevron-right-BaJja2sG.js";import{C as $e,a as Re,b as Ke,c as Ve,d as We,e as He}from"./command-B-4JoDzT.js";import"./markdown-BvBsne3X.js";import"./copy-DKl_cZLH.js";import"./index-B6ap1Jz7.js";import"./index-4-yQR2Lz.js";import"./index-uo3lipQl.js";import"./index-DbD-bwdm.js";import"./ellipsis-DIDqkP8k.js";import"./view-context-DyuiMZAo.js";import"./tanstack-CirxkzEx.js";const Ge=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],qe=P("list-filter",Ge);const Ue=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],Xe=P("panel-left",Ue);function Ye(a){return a?.replace(/[\\/]+$/,"").split(/[\\/]/).at(-1)??"Folder"}function Je({className:a,href:t,icon:n,path:s,name:r=Ye(s),showPath:u=!1,size:l="default",subtitle:o}){const[h,c]=v.useState(!1),b=async()=>{if(s)try{await be(s),c(!0),window.setTimeout(()=>c(!1),1500)}catch{}},g=e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":"true",className:"folder-metadata-icon",children:n??e.jsx(B,{className:"size-3.5"})}),e.jsx("span",{className:"folder-metadata-name",children:r}),o?e.jsx("small",{className:"folder-metadata-path",title:o,children:o}):null,s&&u?e.jsx("small",{className:"folder-metadata-path",title:s,children:s}):null,h?e.jsx(pe,{"aria-hidden":"true",className:"folder-metadata-copied"}):null]}),p=d(`folder-metadata inline-flex max-w-full min-w-0 items-center gap-1.5
2
+ text-left font-normal`,l==="large"?"folder-metadata--large":void 0,s&&!t?"cursor-pointer bg-transparent p-0":void 0,a);return t?e.jsx("a",{className:p,href:t,title:s,children:g}):s?e.jsx("button",{"aria-label":`Copy ${r} folder path to the clipboard`,className:p,title:s,type:"button",onClick:()=>{b()},children:g}):e.jsx("div",{className:p,children:g})}function Qe({className:a,...t}){return e.jsx("kbd",{"data-slot":"kbd",className:d(`bg-muted text-muted-foreground pointer-events-none inline-flex h-5
3
+ w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1
4
+ font-sans text-xs font-medium select-none`,"[&_svg:not([class*='size-'])]:size-3",`[[data-slot=tooltip-content]_&]:bg-background/20
5
+ [[data-slot=tooltip-content]_&]:text-background
6
+ dark:[[data-slot=tooltip-content]_&]:bg-background/10`,a),...t})}function Ze({className:a,orientation:t="horizontal",decorative:n=!0,...s}){return e.jsx(ve,{"data-slot":"separator",decorative:n,orientation:t,className:d(`bg-border shrink-0 data-[orientation=horizontal]:h-px
7
+ data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full
8
+ data-[orientation=vertical]:w-px`,a),...s})}function ea({...a}){return e.jsx(Ae,{"data-slot":"sheet",...a})}function aa({...a}){return e.jsx(ze,{"data-slot":"sheet-portal",...a})}function ta({className:a,...t}){return e.jsx(De,{"data-slot":"sheet-overlay",className:d(`data-[state=open]:animate-in data-[state=closed]:animate-out
9
+ data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0
10
+ z-50 bg-black/50`,a),...t})}function sa({className:a,children:t,side:n="right",...s}){return e.jsxs(aa,{children:[e.jsx(ta,{}),e.jsxs(_e,{"data-slot":"sheet-content",className:d(`bg-background data-[state=open]:animate-in
11
+ data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4
12
+ shadow-lg transition ease-in-out data-[state=closed]:duration-300
13
+ data-[state=open]:duration-500`,n==="right"&&`data-[state=closed]:slide-out-to-right
14
+ data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4
15
+ border-l sm:max-w-sm`,n==="left"&&`data-[state=closed]:slide-out-to-left
16
+ data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4
17
+ border-r sm:max-w-sm`,n==="top"&&`data-[state=closed]:slide-out-to-top
18
+ data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b`,n==="bottom"&&`data-[state=closed]:slide-out-to-bottom
19
+ data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto
20
+ border-t`,a),...s,children:[t,e.jsxs(Ie,{className:`ring-offset-background focus:ring-ring
21
+ data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs
22
+ opacity-70 transition-opacity hover:opacity-100 focus:ring-2
23
+ focus:ring-offset-2 focus:outline-hidden
24
+ disabled:pointer-events-none`,children:[e.jsx(Te,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function na({className:a,...t}){return e.jsx("div",{"data-slot":"sheet-header",className:d("flex flex-col gap-1.5 p-4",a),...t})}function ra({className:a,...t}){return e.jsx(Fe,{"data-slot":"sheet-title",className:d("text-foreground font-semibold",a),...t})}function ia({className:a,...t}){return e.jsx(Me,{"data-slot":"sheet-description",className:d("text-muted-foreground text-sm",a),...t})}function w({className:a,...t}){return e.jsx("div",{"data-slot":"skeleton",className:d("bg-accent animate-pulse rounded-md",a),...t})}function V({delayDuration:a=0,...t}){return e.jsx(Ne,{"data-slot":"tooltip-provider",delayDuration:a,...t})}function la({...a}){return e.jsx(V,{children:e.jsx(we,{"data-slot":"tooltip",...a})})}function oa({...a}){return e.jsx(ye,{"data-slot":"tooltip-trigger",...a})}function da({className:a,sideOffset:t=0,children:n,...s}){return e.jsx(Se,{children:e.jsxs(ke,{"data-slot":"tooltip-content",sideOffset:t,className:d(`bg-foreground text-background animate-in fade-in-0 zoom-in-95
25
+ data-[state=closed]:animate-out data-[state=closed]:fade-out-0
26
+ data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2
27
+ data-[side=left]:slide-in-from-right-2
28
+ data-[side=right]:slide-in-from-left-2
29
+ data-[side=top]:slide-in-from-bottom-2 z-50 w-fit
30
+ origin-(--radix-tooltip-content-transform-origin) rounded-md px-3
31
+ py-1.5 text-xs text-balance`,a),...s,children:[n,e.jsx(Ce,{className:`bg-foreground fill-foreground z-50 size-2.5
32
+ translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]`})]})})}const _=768;function W(){const[a,t]=v.useState(void 0);return v.useEffect(()=>{const n=window.matchMedia(`(max-width: ${_-1}px)`),s=()=>{t(window.innerWidth<_)};return n.addEventListener("change",s),t(window.innerWidth<_),()=>n.removeEventListener("change",s)},[]),!!a}const ca="sidebar_state",ua=3600*24*7,ha="16rem",xa="18rem",pa="3rem",fa="b",H=v.createContext(null);function F(){const a=v.useContext(H);if(!a)throw new Error("useSidebar must be used within a SidebarProvider.");return a}function G({defaultOpen:a=!0,open:t,onOpenChange:n,className:s,style:r,children:u,...l}){const o=W(),[h,c]=v.useState(!1),[b,g]=v.useState(a),p=t??b,j=v.useCallback(m=>{const N=typeof m=="function"?m(p):m;n?n(N):g(N),document.cookie=`${ca}=${N}; path=/; max-age=${ua}`},[n,p]),f=v.useCallback(()=>o?c(m=>!m):j(m=>!m),[o,j,c]);v.useEffect(()=>{const m=N=>{N.key===fa&&(N.metaKey||N.ctrlKey)&&(N.preventDefault(),f())};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[f]);const x=p?"expanded":"collapsed",C=v.useMemo(()=>({state:x,open:p,setOpen:j,isMobile:o,openMobile:h,setOpenMobile:c,toggleSidebar:f}),[x,p,j,o,h,c,f]);return e.jsx(H.Provider,{value:C,children:e.jsx(V,{delayDuration:0,children:e.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":ha,"--sidebar-width-icon":pa,...r},className:d(`group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex
33
+ min-h-svh w-full`,s),...l,children:u})})})}function ba({side:a="left",variant:t="sidebar",collapsible:n="offcanvas",className:s,children:r,...u}){const{isMobile:l,state:o,openMobile:h,setOpenMobile:c}=F();return n==="none"?e.jsx("div",{"data-slot":"sidebar",className:d(`bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width)
34
+ flex-col`,s),...u,children:r}):l?e.jsx(ea,{open:h,onOpenChange:c,...u,children:e.jsxs(sa,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:`bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0
35
+ [&>button]:hidden`,style:{"--sidebar-width":xa},side:a,children:[e.jsxs(na,{className:"sr-only",children:[e.jsx(ra,{children:"Sidebar"}),e.jsx(ia,{children:"Displays the mobile sidebar."})]}),e.jsx("div",{className:"flex h-full w-full flex-col",children:r})]})}):e.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":o,"data-collapsible":o==="collapsed"?n:"","data-variant":t,"data-side":a,"data-slot":"sidebar",children:[e.jsx("div",{"data-slot":"sidebar-gap",className:d(`relative w-(--sidebar-width) bg-transparent transition-[width]
36
+ duration-200 ease-linear`,"group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e.jsx("div",{"data-slot":"sidebar-container",className:d(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width)
37
+ transition-[left,right,width] duration-200 ease-linear md:flex`,a==="left"?`left-0
38
+ group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`:`right-0
39
+ group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,t==="floating"||t==="inset"?`p-2
40
+ group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)
41
+ group-data-[side=left]:border-r group-data-[side=right]:border-l`,s),...u,children:e.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:`bg-sidebar
42
+ group-data-[variant=floating]:border-sidebar-border flex h-full
43
+ w-full flex-col group-data-[variant=floating]:rounded-lg
44
+ group-data-[variant=floating]:border
45
+ group-data-[variant=floating]:shadow-sm`,children:r})})]})}function q({className:a,onClick:t,...n}){const{toggleSidebar:s,open:r,openMobile:u,isMobile:l}=F(),o=l?u:r,h=o?"Hide sidebar":"Show sidebar";return e.jsxs(k,{"data-sidebar":"trigger","aria-expanded":o,"aria-label":h,title:h,"data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d("size-7",a),onClick:c=>{t?.(c),s()},...n,children:[e.jsx(Xe,{}),e.jsx("span",{className:"sr-only",children:h})]})}function U({className:a,asChild:t=!1,...n}){const s=t?L:"main";return e.jsx(s,{"data-slot":"sidebar-inset",className:d("bg-background relative flex w-full flex-1 flex-col",`md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0
46
+ md:peer-data-[variant=inset]:rounded-xl
47
+ md:peer-data-[variant=inset]:shadow-sm
48
+ md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2`,a),...n})}function ma({className:a,...t}){return e.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:d("flex flex-col gap-2 p-2",a),...t})}function ga({className:a,...t}){return e.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:d("flex flex-col gap-2 p-2",a),...t})}function ja({className:a,...t}){return e.jsx(Ze,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:d("bg-sidebar-border mx-2 w-auto",a),...t})}function va({className:a,...t}){return e.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:d(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto
49
+ group-data-[collapsible=icon]:overflow-hidden`,a),...t})}function Na({className:a,...t}){return e.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:d("relative flex w-full min-w-0 flex-col p-2",a),...t})}function wa({className:a,...t}){return e.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:d("w-full text-sm",a),...t})}function ya({className:a,...t}){return e.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:d("flex w-full min-w-0 flex-col gap-1",a),...t})}function S({className:a,...t}){return e.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:d("group/menu-item relative",a),...t})}const Sa=fe("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function X({asChild:a=!1,isActive:t=!1,variant:n="default",size:s="default",tooltip:r,className:u,...l}){const o=a?L:"button",{isMobile:h,state:c}=F(),b=e.jsx(o,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":s,"data-active":t,className:d(Sa({variant:n,size:s}),u),...l});return r?(typeof r=="string"&&(r={children:r}),e.jsxs(la,{children:[e.jsx(oa,{asChild:!0,children:b}),e.jsx(da,{side:"right",align:"center",hidden:c!=="collapsed"||h,...r})]})):b}function ka({onFindProject:a}){return a?e.jsxs("button",{className:"landing-sidebar-search",type:"button",onClick:a,children:[e.jsx(Ee,{"aria-hidden":"true"}),e.jsx("span",{children:"Find"}),e.jsx(Qe,{children:"K"})]}):null}function Ca({folder:a,folderHref:t,workspace:n}){if(!n||n.breadcrumbs.length<=1)return null;const s=[...n.breadcrumbs].reverse();return e.jsx("nav",{"aria-label":"Folder breadcrumbs",className:"landing-breadcrumbs",children:s.map((r,u)=>e.jsxs("span",{children:[u>0?e.jsx("span",{"aria-hidden":"true",children:" / "}):null,r.path===a?e.jsx("span",{"aria-current":"page",children:r.title}):e.jsx("a",{href:t(r.path),children:r.title})]},r.path))})}function Y({children:a,folder:t,folderHref:n,icon:s,onFindProject:r,onOpenFolder:u,subtitle:l,workspace:o}){return e.jsxs(ba,{className:"landing-schema-sidebar",collapsible:"offcanvas",variant:"floating",children:[e.jsxs(ma,{className:"landing-sidebar-header",children:[e.jsxs("p",{className:"landing-sidebar-eyebrow",children:["Folder ",e.jsx("span",{children:"Local"})]}),e.jsx(Je,{icon:s,path:t,showPath:!0,subtitle:l}),o&&n?e.jsx(Ca,{folder:t??"",folderHref:n,workspace:o}):null,e.jsx(ka,{onFindProject:r})]}),e.jsx(va,{children:e.jsx(Na,{children:e.jsx(wa,{children:e.jsx(ya,{children:a})})})}),e.jsx(ja,{}),e.jsx(ga,{className:"landing-sidebar-footer",children:e.jsxs(k,{type:"button",onClick:u,children:[e.jsx(I,{"aria-hidden":"true"}),"Open folder"]})})]})}function Ta({documentHref:a,files:t,onOpenPath:n}){return e.jsx(Be,{className:"landing-files",empty:e.jsx("p",{className:"landing-empty",children:"No Markdown files were found."}),getHref:s=>a(s.relativePath),getKey:s=>s.relativePath,getOpenAction:n?s=>{const r=s.openHref?Pe(s.openHref):void 0;r&&n(r)}:void 0,getOpenHref:s=>s.openHref,getOpenLabel:s=>`Open ${s.name}`,items:t,renderItem:s=>e.jsxs(e.Fragment,{children:[e.jsx(y,{"aria-hidden":"true"}),e.jsxs("span",{children:[e.jsx("strong",{children:s.name}),e.jsxs("small",{children:[e.jsx("time",{dateTime:new Date(s.activityAt).toISOString(),children:Oe(s.activityAt)}),e.jsx("span",{children:" | "}),e.jsx("span",{children:s.relativePath})]})]})]})})}function J(a){return[...a.values()].sort((t,n)=>t.name.localeCompare(n.name))}function Aa(a){const t={children:new Map};for(const n of a){if(!n.relativePath)continue;const s=n.relativePath.split(/[\\/]/).filter(Boolean);let r=t;for(const[u,l]of s.entries()){const o=s.slice(0,u+1).join("/"),h=r.children.get(l)??{children:new Map,name:l,path:o};r.children.set(l,h),r=h}r.project=n}return J(t.children)}function Q({assets:a,depth:t,folderHref:n,node:s}){const r=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"landing-project-icon",children:e.jsx(R,{icon:s.project?.iconAssetKey?a[s.project.iconAssetKey]:void 0})}),e.jsx("span",{children:s.project?.name??s.name}),s.project?e.jsx(K,{"aria-hidden":"true"}):null]});return e.jsxs("li",{children:[s.project?e.jsx("a",{className:"landing-project-row is-project",href:n(s.project.worktree),style:{paddingLeft:`${t*24+10}px`},children:r}):e.jsx("div",{className:"landing-project-row",style:{paddingLeft:`${t*24+10}px`},children:r}),s.children.size?e.jsx("ul",{children:J(s.children).map(u=>e.jsx(Q,{assets:a,depth:t+1,folderHref:n,node:u},u.path))}):null]})}function _a({assets:a,folderHref:t,projects:n}){return e.jsx("ul",{className:"landing-projects",children:Aa(n).map(s=>e.jsx(Q,{assets:a,depth:0,folderHref:t,node:s},s.path))})}function Ia({className:a,...t}){return e.jsx(re,{"data-slot":"tabs",className:d("flex flex-col",a),...t})}function Fa({className:a,...t}){return e.jsx(ie,{"data-slot":"tabs-list",className:d("inline-flex w-fit items-center",a),...t})}function Ma({className:a,...t}){return e.jsx(le,{"data-slot":"tabs-tab",className:d("inline-flex items-center justify-center gap-1.5 whitespace-nowrap",a),...t})}function za({className:a,...t}){return e.jsx(oe,{"data-slot":"tabs-indicator",className:d("bg-foreground",a),...t})}function Da({className:a,children:t,...n}){return e.jsxs(de,{"data-slot":"scroll-area",className:d("relative",a),...n,children:[e.jsx(ce,{"data-slot":"scroll-area-viewport",className:`focus-visible:ring-ring/50 size-full rounded-[inherit]
50
+ transition-[color,box-shadow] outline-none focus-visible:ring-[3px]
51
+ focus-visible:outline-1`,children:t}),e.jsx(Z,{}),e.jsx(ue,{})]})}function Z({className:a,orientation:t="vertical",...n}){return e.jsx(he,{"data-slot":"scroll-area-scrollbar","data-orientation":t,orientation:t,className:d(`flex touch-none p-px transition-colors select-none
52
+ data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t
53
+ data-horizontal:border-t-transparent data-vertical:h-full
54
+ data-vertical:w-2.5 data-vertical:border-l
55
+ data-vertical:border-l-transparent`,a),...n,children:e.jsx(xe,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}const Ea=6;function La({items:a,selectedItem:t,visibleItemLimit:n}){if(a.length<=n)return a;const s=a.slice(0,n);return!t||s.some(r=>r.key===t.key)?s:[...s.slice(0,Math.max(1,n-1)),t]}function Ba({item:a}){return e.jsxs(e.Fragment,{children:[a.icon,e.jsx("span",{className:"landing-template-label",children:a.label}),a.error?e.jsx("small",{"aria-label":a.error,className:"text-[#9c3a3a]",title:a.error,children:"!"}):null]})}function Pa({items:a,selectedKey:t}){const[n,s]=v.useState(!1);return e.jsxs(me,{open:n,onOpenChange:s,children:[e.jsx(ge,{asChild:!0,children:e.jsxs(k,{"aria-label":`Show all ${a.length} views`,className:"landing-tabnav-all",size:"sm",type:"button",variant:"ghost",children:[e.jsx(qe,{"aria-hidden":"true"}),e.jsx("span",{children:"All views"}),e.jsx("span",{className:"landing-tabnav-count",children:a.length})]})}),e.jsx(je,{align:"end",className:"landing-tabnav-popover p-0",children:e.jsxs($e,{children:[e.jsx(Re,{placeholder:"Search views…"}),e.jsxs(Ke,{children:[e.jsx(Ve,{children:"No views match"}),e.jsx(We,{heading:"Views",children:a.map(r=>e.jsx(He,{className:"landing-tabnav-command-item p-0",onSelect:()=>{window.location.href=r.href},value:`${r.label} ${r.key}`,children:e.jsxs("a",{"aria-current":r.key===t?"page":void 0,className:"landing-tabnav-command-link",href:r.href,onClick:()=>s(!1),title:r.error??r.label,children:[r.icon,e.jsx("span",{className:"landing-tabnav-command-label",children:r.label}),typeof r.count=="number"?e.jsx("span",{className:"landing-tabnav-count",children:r.count}):null,r.error?e.jsx("small",{"aria-label":r.error,title:r.error,children:"!"}):null]})},r.key))})]})]})})]})}function Oa({ariaLabel:a,isSelected:t,items:n,visibleItemLimit:s}){const r=W(),u=n.find(c=>t?.(c)??!1),l=u?.key??null,o=r?La({items:n,selectedItem:u,visibleItemLimit:s}):n,h=r&&n.length>s;return e.jsxs("div",{className:"landing-tabnav-shell",children:[e.jsx(Ia,{className:"landing-tabnav",value:l,children:e.jsxs(Fa,{"aria-label":a,activateOnFocus:!1,className:"landing-tabnav-list",children:[o.map(c=>e.jsx(Ma,{className:"landing-tabnav-tab",nativeButton:!1,render:e.jsx("a",{"aria-label":`Show ${c.label}`,href:c.href,title:c.label}),value:c.key,children:e.jsx(Ba,{item:c})},c.key)),e.jsx(za,{className:"landing-tabnav-indicator"})]})}),h?e.jsx(Pa,{items:n,selectedKey:l}):null]})}function $a({ariaLabel:a,isSelected:t,items:n}){return e.jsxs(Da,{className:"landing-template-tabs-scroll",children:[e.jsx("div",{"aria-label":a,className:"landing-template-tabs",role:"tablist",children:n.map(s=>e.jsx(k,{asChild:!0,className:"landing-template-tab",variant:t?.(s)?"secondary":"ghost",children:e.jsxs("a",{"aria-label":`Show ${s.label}`,"aria-selected":t?.(s)??!1,href:s.href,role:"tab",title:s.label,children:[e.jsx("span",{className:"landing-template-story-icon",children:s.icon}),e.jsx("span",{className:"landing-template-label",children:s.label}),s.error?e.jsx("small",{"aria-label":s.error,className:"text-[#9c3a3a]",title:s.error,children:"!"}):null]})},s.key))}),e.jsx(Z,{className:"landing-template-tabs-scrollbar",orientation:"horizontal"})]})}function ee({ariaLabel:a="Schema views",renderer:t="tabs",className:n,visibleItemLimit:s=Ea,...r}){return e.jsx("div",{className:d("folder-tabs",n),"data-renderer":t,children:t==="story"?e.jsx($a,{ariaLabel:a,...r}):e.jsx(Oa,{ariaLabel:a,visibleItemLimit:s,...r})})}function ae({icon:a}){return a?e.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:a.paths.map((t,n)=>e.jsx("path",{d:t},n))}):null}function E({children:a,count:t,href:n,icon:s,title:r}){return e.jsxs("section",{className:"landing-section",children:[e.jsxs("header",{children:[e.jsx("h2",{children:n?e.jsxs("a",{href:n,children:[s,r,e.jsx(K,{"aria-hidden":"true"})]}):e.jsxs(e.Fragment,{children:[s,r]})}),e.jsx("span",{children:t})]}),a]})}function Ra({active:a,children:t,href:n,icon:s}){return e.jsx(S,{children:e.jsx(X,{asChild:!0,"aria-current":a?"page":void 0,isActive:a,children:e.jsxs("a",{href:n,children:[s,e.jsx("span",{children:t})]})})})}function Ka({error:a}){return e.jsx("div",{className:"folder-discovery-error",role:"alert",children:e.jsx("p",{children:a})})}function Va(){return e.jsx("ul",{className:"landing-list landing-skeleton-list","aria-hidden":"true",children:Array.from({length:8},(a,t)=>e.jsx("li",{children:e.jsxs("div",{children:[e.jsx(w,{className:"landing-skeleton-icon"}),e.jsxs("span",{children:[e.jsx(w,{className:"landing-skeleton-line is-title"}),e.jsx(w,{className:"landing-skeleton-line is-meta"})]}),e.jsx(w,{className:"landing-skeleton-line is-time"}),e.jsx(w,{className:"landing-skeleton-chevron"})]})},t))})}function Wa({children:a,error:t,folder:n,onFindProject:s,onOpenFolder:r,pluginHref:u,view:l,viewNavigation:o,tab:h,tabHref:c}){const b=h??"files",g=!!l,p="Notes",j=[{href:c("files"),icon:e.jsx(y,{"aria-hidden":"true"}),key:"files",label:"Notes"}];l&&j.push({href:u(l.pluginId),icon:e.jsx(ae,{icon:o?.icon}),key:`plugin:${l.pluginId}`,label:o?.label??l.pluginId});const f=a?e.jsxs("div",{className:"landing-sections",children:[t?e.jsx(Ka,{error:t}):null,a]}):t?e.jsxs("section",{className:"landing-section landing-loading-section",children:[e.jsx("header",{children:e.jsxs("h2",{children:[e.jsx(I,{"aria-hidden":"true"}),"Folder"]})}),e.jsxs("div",{className:"landing-loading-error",children:[e.jsx("h1",{children:"Folder activity is unavailable"}),e.jsx("p",{children:t})]})]}):e.jsxs("section",{className:"landing-section landing-loading-section",children:[e.jsxs("header",{children:[e.jsxs("h2",{children:[e.jsx(y,{"aria-hidden":"true"}),p]}),e.jsx(w,{className:"landing-skeleton-count"})]}),e.jsx(Va,{})]});return e.jsxs("main",{className:"folder-landing","aria-busy":!t&&!g,children:[e.jsx(ee,{ariaLabel:"Loading folder sections",isSelected:l?x=>x.key===`plugin:${l.pluginId}`:x=>b===x.key,items:j}),e.jsxs(G,{className:"landing-sidebar-shell",defaultOpen:!1,style:{"--sidebar-width":"17rem"},children:[e.jsxs(Y,{folder:n,icon:e.jsx(I,{"aria-hidden":"true"}),onFindProject:s,...r?{onOpenFolder:r}:{},children:[j.map(x=>e.jsx(Ra,{active:l?x.key===`plugin:${l.pluginId}`:b===x.key,href:x.href,icon:x.icon,children:x.label},x.key)),e.jsx(S,{className:"landing-sidebar-skeleton-item",children:e.jsx(w,{className:"landing-skeleton-menu"})}),e.jsx(S,{className:"landing-sidebar-skeleton-item",children:e.jsx(w,{className:"landing-skeleton-menu is-short"})})]}),e.jsx(U,{asChild:!0,className:"landing-sidebar-inset",children:e.jsxs("div",{children:[e.jsxs("div",{className:"landing-inset-toolbar",children:[e.jsx(q,{className:"landing-sidebar-toggle"}),e.jsx(O,{actions:$({folderPath:n,onOpenFolder:r})})]}),f]})})]})]})}function Ha({children:a,collectionHref:t,collectionId:n,data:s,documentHref:r,error:u,folder:l,folderHref:o,onFindProject:h,onOpenFolder:c,onOpenPath:b,pluginHref:g,view:p,viewNavigation:j,tab:f,tabHref:x}){const C=s?.plugins?.items??[],m=s?.plugins?.configWarnings??s?.configWarnings??[],N=s?.workspace?.schemas??[];if(!s)return e.jsx(Wa,{children:a,error:u,folder:l,onFindProject:h,onOpenFolder:c,tab:f,tabHref:x,pluginHref:g,view:p,viewNavigation:j});const M=s.projects.items.filter(i=>i.relativePath),te=s.files.items.filter(i=>!i.folder).slice(0,5),se=!!p,z=!f&&!p&&!n,T=[{count:s.files.items.length,href:x("files"),icon:e.jsx(y,{"aria-hidden":"true"}),key:"files",label:"Notes"},...N.map(i=>({count:i.count??0,error:i.diagnostics?.length?i.diagnostics.map(ne=>ne.message).join("; "):void 0,href:t&&i.id?t(i.id):o(i.folder),icon:e.jsx(Le,{name:i.icon}),key:`folder:${i.folder}`,label:i.navLabel??i.title,view:{type:"folder",id:i.id}})),...C.filter(i=>i.id!=="notes").map(i=>({count:i.count??0,error:i.error,href:g(i.id),icon:e.jsx(ae,{icon:i.icon}),key:`plugin:${i.id}`,label:i.label,view:{id:i.id,type:"plugin"}}))],D=a??e.jsxs("div",{className:"landing-sections",children:[m.length?e.jsx("div",{className:"folder-discovery-error",role:"alert",children:m.map(i=>e.jsx("p",{children:i},i))}):null,f==="projects"&&M.length?e.jsx(E,{count:M.length,href:f?void 0:x("projects"),icon:e.jsx(B,{"aria-hidden":"true"}),title:"Projects",children:e.jsx(_a,{assets:s.assets,folderHref:o,projects:s.projects.items})}):null,z?e.jsx(E,{count:s.files.items.length,href:x("files"),icon:e.jsx(y,{"aria-hidden":"true"}),title:"Notes",children:e.jsx(Ta,{documentHref:r,files:te,onOpenPath:b})}):null]}),A=i=>i.view?.type==="folder"?!!(n&&i.view.id===n):i.view?.type==="plugin"?se&&i.view.id===p?.pluginId:f==="files"||z;return e.jsx("main",{className:"folder-landing",children:T.length>1?e.jsxs(e.Fragment,{children:[e.jsx(ee,{items:T,isSelected:A}),e.jsxs(G,{className:"landing-sidebar-shell",defaultOpen:!1,style:{"--sidebar-width":"17rem"},children:[e.jsx(Y,{folder:s.folder,folderHref:o,icon:e.jsx(R,{icon:s.identity?.icon}),subtitle:s.identity?.subtitle,onFindProject:h,workspace:s.workspace,...c?{onOpenFolder:c}:{},children:T.map(i=>e.jsx(S,{children:e.jsx(X,{asChild:!0,"aria-current":A(i)?"page":void 0,isActive:A(i),children:e.jsxs("a",{href:i.href,title:i.error??void 0,children:[i.icon,e.jsx("span",{children:i.label}),i.error?e.jsx("span",{className:"text-[#9c3a3a]",children:"!"}):null]})})},i.key))}),e.jsx(U,{asChild:!0,className:"landing-sidebar-inset",children:e.jsxs("div",{children:[e.jsxs("div",{className:"landing-inset-toolbar",children:[e.jsx(q,{className:"landing-sidebar-toggle"}),e.jsx(O,{actions:$({folderPath:s.folder,onOpenFolder:c})})]}),D]})})]})]}):D})}function jt({children:a,collectionHref:t,collectionId:n,data:s,documentHref:r,error:u,folder:l,folderHref:o,onFindProject:h,onOpenFolder:c,onOpenPath:b,pluginHref:g,tab:p,tabHref:j,view:f,viewNavigation:x}){return e.jsx(Ha,{children:a,collectionHref:t,collectionId:n,data:s,documentHref:r,error:u,folder:l,folderHref:o,onFindProject:h,onOpenFolder:c,onOpenPath:b,pluginHref:g,tab:p,tabHref:j,view:f,viewNavigation:x})}export{jt as FolderLanding};
@@ -1 +1 @@
1
- import{r as F,j as n}from"./react-Dh7j6h1K.js";import{u as w}from"./view-context-DKIrg--H.js";import{c as q}from"./index-BjrX8Pf-.js";const C=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],x=q("external-link",C);function R(t){try{return new URL(t,"http://127.0.0.1").searchParams.get("path")??void 0}catch{return}}function P({className:t,empty:r,filteredEmpty:j=r,filters:s=[],getClassName:k,getHref:g,getKey:f,getOpenAction:c,getOpenHref:b,getOpenLabel:y,items:l,renderActions:v,renderItem:N}){const[o,L]=F.useState("all"),m=w(),i=s.find(e=>e.key===o),d=i?l.filter(i.predicate):l;return l.length?n.jsxs(n.Fragment,{children:[s.length?n.jsx("div",{className:"landing-list-filters",children:[{count:l.length,key:"all",label:"All"},...s.map(e=>({count:l.filter(e.predicate).length,key:e.key,label:e.label}))].map(e=>n.jsxs("button",{"aria-pressed":o===e.key,onClick:()=>L(e.key),type:"button",children:[e.label,n.jsx("small",{children:e.count})]},e.key))}):null,d.length?n.jsx("ul",{className:`landing-list ${t}`,children:d.map(e=>{const h=g?.(e),u=b?.(e),p=N(e),a=y?.(e)??"Open item";return n.jsxs("li",{className:k?.(e),children:[h?n.jsx(m,{className:"landing-list-row",href:h,children:p}):n.jsx("div",{className:"landing-list-row",children:p}),u?c?n.jsx("button",{className:"landing-list-open",type:"button","aria-label":a,title:a,onClick:()=>c(e),children:n.jsx(x,{"aria-hidden":"true"})}):n.jsx("a",{className:"landing-list-open",href:u,"aria-label":a,title:a,children:n.jsx(x,{"aria-hidden":"true"})}):null,v?.(e)]},f(e))})}):n.jsx(n.Fragment,{children:j})]}):n.jsx(n.Fragment,{children:r})}export{P as F,R as o};
1
+ import{r as F,j as n}from"./react-Dh7j6h1K.js";import{u as w}from"./view-context-DyuiMZAo.js";import{c as q}from"./index-CKJsEQtp.js";const C=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],x=q("external-link",C);function R(t){try{return new URL(t,"http://127.0.0.1").searchParams.get("path")??void 0}catch{return}}function P({className:t,empty:r,filteredEmpty:j=r,filters:s=[],getClassName:k,getHref:g,getKey:f,getOpenAction:c,getOpenHref:b,getOpenLabel:y,items:l,renderActions:v,renderItem:N}){const[o,L]=F.useState("all"),m=w(),i=s.find(e=>e.key===o),d=i?l.filter(i.predicate):l;return l.length?n.jsxs(n.Fragment,{children:[s.length?n.jsx("div",{className:"landing-list-filters",children:[{count:l.length,key:"all",label:"All"},...s.map(e=>({count:l.filter(e.predicate).length,key:e.key,label:e.label}))].map(e=>n.jsxs("button",{"aria-pressed":o===e.key,onClick:()=>L(e.key),type:"button",children:[e.label,n.jsx("small",{children:e.count})]},e.key))}):null,d.length?n.jsx("ul",{className:`landing-list ${t}`,children:d.map(e=>{const h=g?.(e),u=b?.(e),p=N(e),a=y?.(e)??"Open item";return n.jsxs("li",{className:k?.(e),children:[h?n.jsx(m,{className:"landing-list-row",href:h,children:p}):n.jsx("div",{className:"landing-list-row",children:p}),u?c?n.jsx("button",{className:"landing-list-open",type:"button","aria-label":a,title:a,onClick:()=>c(e),children:n.jsx(x,{"aria-hidden":"true"})}):n.jsx("a",{className:"landing-list-open",href:u,"aria-label":a,title:a,children:n.jsx(x,{"aria-hidden":"true"})}):null,v?.(e)]},f(e))})}):n.jsx(n.Fragment,{children:j})]}):n.jsx(n.Fragment,{children:r})}export{P as F,R as o};
@@ -0,0 +1 @@
1
+ import{j as r}from"./react-Dh7j6h1K.js";import{f as l}from"./app-options-CIiczgaQ.js";import{A as d}from"./app-view-header-CNImosi9.js";import{F as x}from"./folder-image-Cy-8Vgmd.js";import"./markdown-BvBsne3X.js";import"./index-CKJsEQtp.js";import"./index-DbD-bwdm.js";import"./file-text-C3hyr-Ql.js";import"./index-4-yQR2Lz.js";import"./utils-CvINCDjn.js";import"./index-B6ap1Jz7.js";import"./popover-DvKy7gF6.js";import"./copy-context-Bj8Sfpo7.js";import"./check-DjJ4znpk.js";import"./copy-DKl_cZLH.js";import"./ellipsis-DIDqkP8k.js";import"./chevron-down-CiyxliRS.js";function R({backHref:i,backLabel:m="Back",canOpen:t,folder:o,homeHref:p,icon:e,name:a,onOpen:s,onOpenFolder:n,rightAction:c,...f}){return r.jsxs(r.Fragment,{children:[r.jsx(d,{...f,className:"mobile-view-header",folder:o,homeHref:p,name:a,icon:r.jsx(x,{icon:e}),actions:l({backHref:i,backLabel:m,canBrowse:t,folderPath:o,onBrowse:s,onOpenFolder:n})}),c]})}export{R as FolderMobileBar};
@@ -1 +1 @@
1
- import{c as a}from"./index-BjrX8Pf-.js";const o=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 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.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],c=a("folder-open",o);export{c as F};
1
+ import{c as a}from"./index-CKJsEQtp.js";const o=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 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.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],c=a("folder-open",o);export{c as F};
@@ -0,0 +1,2 @@
1
+ import{j as t}from"./react-Dh7j6h1K.js";import{u,c as g}from"./tanstack-CirxkzEx.js";import{a as s}from"./index-CKJsEQtp.js";import{F as h}from"./hooks-wZOJYSkv.js";import{f as x}from"./view-context-DyuiMZAo.js";import{f as F,g as I,d as P,a as c,b as j,c as b}from"./index-DbD-bwdm.js";import{F as w}from"./folder-filter-bar-Bl30Jv6B.js";import{F as y}from"./folder-image-Cy-8Vgmd.js";import{u as H}from"./viewer-capabilities-BkBR084B.js";import"./markdown-BvBsne3X.js";import"./check-DjJ4znpk.js";import"./utils-CvINCDjn.js";import"./command-B-4JoDzT.js";import"./index-4-yQR2Lz.js";import"./x-GGS-h4Nm.js";import"./index-4JQ747xt.js";import"./search-Cx23EFPc.js";import"./popover-DvKy7gF6.js";import"./index-B6ap1Jz7.js";function v({folder:e}){const{data:n}=u({queryKey:["folder",F(e),"identity"],queryFn:({signal:r})=>x({origin:window.location.origin,path:e,signal:r}),staleTime:Number.POSITIVE_INFINITY,retry:!1});return t.jsx(y,{icon:n?.icon?.src})}function N(e){return t.jsx(v,{folder:e},e)}function k({children:e}){return t.jsx(w,{renderIcon:N,children:e})}function q(e,n,r,o){return s.plugin(e,n,r,o)}const l={backHref:"/",message:"That view is not registered."};function L(){const e=g({strict:!1}),n=H(),r=I(e.pluginId);if(!r||!e.folderId)return t.jsxs("div",{className:"mx-auto grid w-full max-w-3xl gap-4 px-4 py-5",children:[t.jsx("p",{className:"text-muted-foreground m-0 text-sm",children:l.message}),t.jsx("a",{className:`bg-background inline-flex w-fit items-center justify-center
2
+ rounded-md border px-3 py-1.5 text-sm no-underline`,href:l.backHref,children:"Back to folder"})]});const o=P(e.folderId),d=e.folderId,m=n.data?.hostActions==="local"?{openPath:i=>s.openPath(i),createAgentFile:async i=>{const a=await s.createAgentFile(i);return await s.openPath(a.path),a}}:void 0,f={documentHref:b,folder:o,folderId:d,homeHref:j(o,"notes"),hostActions:m,href:i=>c(o,r.id,i),listHref:c(o,r.id),request:(i,a)=>q(r.id,o,i,a),subpath:e.subpath??""},p=r.component;return t.jsx(h,{folder:o,children:t.jsx(k,{children:t.jsx(p,{...f})})},`${d}:${r.id}`)}export{L as FolderPluginPage};