okengine 0.21.1 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/AGENTS.md +4 -4
  2. package/LICENSE +202 -0
  3. package/NOTICE +2 -0
  4. package/README.md +15 -9
  5. package/manifest.v1.schema.json +10 -0
  6. package/package.json +22 -20
  7. package/site/content/docs/ai/skills.mdx +1 -1
  8. package/site/content/docs/client/calling.mdx +27 -19
  9. package/site/content/docs/client/index.mdx +1 -1
  10. package/site/content/docs/elements/channel/email.mdx +1 -1
  11. package/site/content/docs/elements/channel/index.mdx +1 -1
  12. package/site/content/docs/elements/flow/http.mdx +4 -4
  13. package/site/content/docs/elements/flow/index.mdx +3 -3
  14. package/site/content/docs/elements/flow/meta.json +1 -1
  15. package/site/content/docs/elements/gate/tenancy.mdx +1 -1
  16. package/site/content/docs/elements/vault/rotation.mdx +15 -0
  17. package/site/content/docs/plugins/otp.mdx +31 -31
  18. package/site/content/docs/recipes/mailpit.mdx +1 -1
  19. package/site/content/docs/recipes/meilisearch.mdx +1 -1
  20. package/site/content/docs/recipes/pgdog.mdx +1 -1
  21. package/site/content/docs/reference/configuration.mdx +2 -2
  22. package/site/content/docs/reference/errors.mdx +12 -2
  23. package/site/content/docs/reference/fx.mdx +28 -15
  24. package/site/content/docs/reference/idempotency.mdx +192 -0
  25. package/site/content/docs/reference/index.mdx +6 -1
  26. package/site/content/docs/reference/meta.json +2 -1
  27. package/site/content/docs/understand/meta.json +1 -1
  28. package/site/content/docs/{elements/flow → understand}/routing.mdx +11 -10
  29. package/site/content/docs/understand/the-architecture.mdx +14 -12
  30. package/site/content/docs/understand/try-it.mdx +3 -3
  31. package/src/cli/competitor-mention-removal.test.ts +3 -3
  32. package/src/cli/docker-cli.test.ts +1 -1
  33. package/src/cli/index.ts +9 -1
  34. package/src/cli/load-config.images.test.ts +10 -10
  35. package/src/cli/load-config.ts +1 -1
  36. package/src/cli/vault-cmd.test.ts +23 -0
  37. package/src/cli/vault-cmd.ts +7 -0
  38. package/src/client/create.ts +18 -1
  39. package/src/client/transport.test.ts +225 -0
  40. package/src/client/transport.ts +132 -19
  41. package/src/client/types.ts +29 -3
  42. package/src/compiler/effects-infer.ts +726 -16
  43. package/src/compiler/extract.test.ts +37 -0
  44. package/src/compiler/extract.ts +113 -12
  45. package/src/compiler/fixtures/skyport.expected.json +24 -0
  46. package/src/compiler/fx-follow.test.ts +164 -0
  47. package/src/compiler/fx-index.ts +399 -0
  48. package/src/console/server/flows-invoke.test.ts +2 -2
  49. package/src/console/ui-next/dist/assets/{access-page-Bgt9bq2r.js → access-page-Ze6ckjdd.js} +2 -2
  50. package/src/console/ui-next/dist/assets/agent-disclosure-Bkohc_8X.js +1 -0
  51. package/src/console/ui-next/dist/assets/{cache-glyph-92uM5MO7.js → cache-glyph-rL0lHxat.js} +1 -1
  52. package/src/console/ui-next/dist/assets/{call-pii-button-DtGVPtcs.js → call-pii-button-Deo4PP18.js} +1 -1
  53. package/src/console/ui-next/dist/assets/{collapsible-DN7l6zmC.js → collapsible-CoJ6amHf.js} +1 -1
  54. package/src/console/ui-next/dist/assets/{copy-inline-button-CAYD18cr.js → copy-inline-button-CWG5_ZOh.js} +1 -1
  55. package/src/console/ui-next/dist/assets/{detail-header-DVWNjWjg.js → detail-header-b_ZzIsmU.js} +1 -1
  56. package/src/console/ui-next/dist/assets/{dropdown-menu-4h2LOVXM.js → dropdown-menu-nwXEO1Ac.js} +1 -1
  57. package/src/console/ui-next/dist/assets/duration-tone-BbQ_8z50.js +9 -0
  58. package/src/console/ui-next/dist/assets/element-icons-CwyLpVXz.js +1 -0
  59. package/src/console/ui-next/dist/assets/{explorer-empty-CJs5A-wm.js → explorer-empty-C8sSCqYT.js} +1 -1
  60. package/src/console/ui-next/dist/assets/{flows-page-BMHs-IzK.js → flows-page-D2E7BtKK.js} +1 -1
  61. package/src/console/ui-next/dist/assets/{highlighted-json-BlAEVgNW.js → highlighted-json-CPYBzDh0.js} +1 -1
  62. package/src/console/ui-next/dist/assets/{http-method-BDf7OAHv.js → http-method-DTPevKmM.js} +1 -1
  63. package/src/console/ui-next/dist/assets/index-vTuwmeQz.js +58 -0
  64. package/src/console/ui-next/dist/assets/observability-page-SJTSzHFJ.js +4 -0
  65. package/src/console/ui-next/dist/assets/{replica-lag-B3GLNVfF.js → replica-lag-BM27lXld.js} +3 -3
  66. package/src/console/ui-next/dist/assets/{request-meta-DMbnAe3f.js → request-meta-BjFT7DNl.js} +1 -1
  67. package/src/console/ui-next/dist/assets/shortcut-keys-CUNegEV4.js +1 -0
  68. package/src/console/ui-next/dist/assets/store-page-Qj9ThRE-.js +41 -0
  69. package/src/console/ui-next/dist/assets/{trace-detail-sheet-Htk8Cm9t.js → trace-detail-sheet-Cmitq3da.js} +2 -2
  70. package/src/console/ui-next/dist/assets/{tree-expand-toggle-CFMPWX4f.js → tree-expand-toggle-CbDIB-7x.js} +2 -2
  71. package/src/console/ui-next/dist/assets/units-page-_PuYqFty.js +1 -0
  72. package/src/console/ui-next/dist/assets/{use-vault-list-CT4-gajj.js → use-vault-list-Cs45Czkt.js} +1 -1
  73. package/src/console/ui-next/dist/assets/{vault-page-CBYl0LW_.js → vault-page-BOMr0go9.js} +2 -2
  74. package/src/console/ui-next/dist/index.html +2 -2
  75. package/src/console/ui-next/src/features/units/detail/flow-contract-panel.tsx +9 -0
  76. package/src/docker/docker.test.ts +13 -13
  77. package/src/docker/images-config.test.ts +12 -12
  78. package/src/docker/stack-id.test.ts +1 -1
  79. package/src/drivers/journal-postgres.ts +168 -3
  80. package/src/drivers/meilisearch.ts +2 -0
  81. package/src/drivers/vault-builtin.test.ts +10 -0
  82. package/src/drivers/vault-builtin.ts +13 -1
  83. package/src/drivers/vault-remote-bag.ts +5 -1
  84. package/src/drivers/vault-types.ts +6 -1
  85. package/src/elements/store/emit-drizzle.ts +2 -2
  86. package/src/elements/store/live-default.test.ts +2 -0
  87. package/src/elements/store/live-http.test.ts +1 -0
  88. package/src/elements/store/resource-list-docs.test.ts +2 -2
  89. package/src/elements/store/resource.test.ts +3 -3
  90. package/src/elements/store/schema-decl.test.ts +1 -0
  91. package/src/elements/store/sql-condition.ts +24 -7
  92. package/src/elements/store/upsert-app.test.ts +1 -1
  93. package/src/elements/vault/audit.test.ts +137 -0
  94. package/src/elements/vault/audit.ts +106 -13
  95. package/src/elements/vault/boot-chain.ts +9 -1
  96. package/src/elements/vault/builtin-adapter.ts +33 -3
  97. package/src/i18n/catalogs/ar.ts +4 -0
  98. package/src/i18n/catalogs/en.ts +4 -0
  99. package/src/kernel/abort-scope.ts +33 -2
  100. package/src/kernel/app.ts +191 -18
  101. package/src/kernel/auto-cache.test.ts +6 -6
  102. package/src/kernel/boot-bind/vault.ts +1 -0
  103. package/src/kernel/boot.ts +19 -1
  104. package/src/kernel/builtin-errors.ts +8 -0
  105. package/src/kernel/client-descriptor.ts +1 -0
  106. package/src/kernel/concurrency.test.ts +33 -0
  107. package/src/kernel/effects-stamping.test.ts +2 -2
  108. package/src/kernel/errors-compiler.ts +20 -0
  109. package/src/kernel/external-effects.test.ts +36 -0
  110. package/src/kernel/flow.ts +24 -0
  111. package/src/kernel/fx-fetch.ts +5 -1
  112. package/src/kernel/fx.ts +5 -1
  113. package/src/kernel/idempotency-store.ts +578 -0
  114. package/src/kernel/idempotency.test.ts +556 -0
  115. package/src/kernel/idempotency.ts +304 -0
  116. package/src/kernel/index.ts +1 -0
  117. package/src/kernel/journal.ts +56 -0
  118. package/src/manifest/types.ts +8 -0
  119. package/src/plugins/auth-delivery.mailpit.integration.test.ts +1 -1
  120. package/src/plugins/otp.test.ts +65 -1
  121. package/src/plugins/otp.ts +59 -7
  122. package/src/release/absolute-regression.test.ts +63 -0
  123. package/src/release/http-graph.test.ts +25 -0
  124. package/src/release/http-graph.ts +90 -0
  125. package/src/release/index.ts +3 -0
  126. package/src/release/limits.ts +17 -2
  127. package/src/release/measure.ts +105 -14
  128. package/src/test/create-test-app.test.ts +3 -1
  129. package/src/test/create-test-app.ts +40 -0
  130. package/src/test/live-signals.test.ts +1 -0
  131. package/src/test/provisions.integration.test.ts +1 -0
  132. package/src/test/tenant-isolation.test.ts +1 -0
  133. package/src/console/ui-next/dist/assets/agent-disclosure-B43CXZZR.js +0 -1
  134. package/src/console/ui-next/dist/assets/duration-tone-BmIR9FV8.js +0 -9
  135. package/src/console/ui-next/dist/assets/element-icons-BI8cJgdh.js +0 -1
  136. package/src/console/ui-next/dist/assets/index-BKpaes3n.js +0 -63
  137. package/src/console/ui-next/dist/assets/observability-page-WnVLI-0j.js +0 -4
  138. package/src/console/ui-next/dist/assets/shortcut-keys-3ILd8oGn.js +0 -1
  139. package/src/console/ui-next/dist/assets/store-page-KvFDingJ.js +0 -41
  140. package/src/console/ui-next/dist/assets/units-page-C4NdNuxP.js +0 -1
@@ -1 +1 @@
1
- import{A as e}from"./xyflow-yApv7D4e.js";import{Dr as t,Er as n,x as r}from"./shortcut-keys-3ILd8oGn.js";import{h as i,s as a}from"./element-icons-BI8cJgdh.js";import{nt as o,ot as s,tt as c}from"./index-BKpaes3n.js";var l=[[`path`,{d:`M4.31802 19.682C3 18.364 3 16.2426 3 12C3 7.75736 3 5.63604 4.31802 4.31802C5.63604 3 7.75736 3 12 3C16.2426 3 18.364 3 19.682 4.31802C21 5.63604 21 7.75736 21 12C21 16.2426 21 18.364 19.682 19.682C18.364 21 16.2426 21 12 21C7.75736 21 5.63604 21 4.31802 19.682Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M6 12H8.5L10.5 8L13.5 16L15.5 12H18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],u=[[`path`,{d:`M5.92089 5.92089C8.15836 3.68342 9.2771 2.56468 10.5857 2.19562C11.5105 1.93479 12.4895 1.93479 13.4143 2.19562C14.7229 2.56468 15.8416 3.68342 18.0791 5.92089C20.3166 8.15836 21.4353 9.2771 21.8044 10.5857C22.0652 11.5105 22.0652 12.4895 21.8044 13.4143C21.4353 14.7229 20.3166 15.8416 18.0791 18.0791C15.8416 20.3166 14.7229 21.4353 13.4143 21.8044C12.4895 22.0652 11.5105 22.0652 10.5857 21.8044C9.2771 21.4353 8.15836 20.3166 5.92089 18.0791C3.68342 15.8416 2.56468 14.7229 2.19562 13.4143C1.93479 12.4895 1.93479 11.5105 2.19562 10.5857C2.56468 9.2771 3.68342 8.15836 5.92089 5.92089Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],d=[[`path`,{d:`M14.9961 17H16.9961C19.7575 17 21.9961 14.7614 21.9961 12C21.9961 9.23858 19.7575 7 16.9961 7H14.9961M8.99609 17H6.99609C4.23467 17 1.99609 14.7614 1.99609 12C1.99609 9.23858 4.23467 7 6.99609 7H8.99609`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8.49609 12H15.4961`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],f=[[`path`,{d:`M18.8906 12.846C18.5371 14.189 16.8667 15.138 13.5257 17.0361C10.296 18.8709 8.6812 19.7884 7.37983 19.4196C6.8418 19.2671 6.35159 18.9776 5.95624 18.5787C5 17.6139 5 15.7426 5 12C5 8.2574 5 6.3861 5.95624 5.42132C6.35159 5.02245 6.8418 4.73288 7.37983 4.58042C8.6812 4.21165 10.296 5.12907 13.5257 6.96393C16.8667 8.86197 18.5371 9.811 18.8906 11.154C19.0365 11.7084 19.0365 12.2916 18.8906 12.846Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],p=e();function m({kind:e,className:r,hex:a,inferred:o}){return e===`pk`?(0,p.jsx)(t,{icon:i,className:n(`size-3 shrink-0 text-amber-500`,r),"aria-label":`Primary key`}):e===`unique`?(0,p.jsx)(t,{icon:u,className:n(`size-3 shrink-0 text-violet-500`,r),"aria-label":`Unique`}):e===`none`?(0,p.jsx)(t,{icon:s,className:n(`size-3 shrink-0 text-muted-foreground/35`,r),"aria-label":`No key`}):(0,p.jsx)(t,{icon:d,className:n(`size-3 shrink-0`,!a&&`text-sky-500`,r),style:a?{color:a}:void 0,"aria-label":o?`Inferred foreign key`:`Foreign key`})}function h({primaryKey:e,foreignKey:t,unique:n,inferred:r,hex:i,empty:a=`spacer`}){let o=n===!0&&e!==!0;return!e&&!t&&!o?a===`none`?(0,p.jsx)(`span`,{className:`inline-flex shrink-0 items-center`,title:`None`,children:(0,p.jsx)(m,{kind:`none`})}):(0,p.jsx)(`span`,{className:`inline-flex w-3 shrink-0`,"aria-hidden":!0}):(0,p.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-px`,children:[e?(0,p.jsx)(m,{kind:`pk`}):null,t?(0,p.jsx)(m,{kind:`fk`,hex:i,inferred:r}):null,o?(0,p.jsx)(m,{kind:`unique`}):null]})}var g=`[redacted]`;function _(e){let t=[e],n=x(e),r=S(e);return n!==e&&t.push(n),r!==e&&t.push(r),t}function v(e,t){for(let n of _(t))e.add(n)}function y(e){let t=new Set;for(let n of e)v(t,n);return t}function b(e){let t=new Set;for(let n of e)t.add(x(n));return t.size}function x(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1_$2`).replace(/([A-Z])([A-Z][a-z])/g,`$1_$2`).toLowerCase()}function S(e){return e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())}function C({piiMasked:e,disabled:i,onToggle:s}){return(0,p.jsx)(a,{label:e?`PII hidden. Click to include cleartext (audited).`:`PII included. Click to remask.`,className:`flex self-stretch`,children:(0,p.jsxs)(r,{type:`button`,variant:`ghost`,size:`sm`,disabled:i,className:n(`h-full rounded-none px-2 text-[11px]`,!e&&`text-amber-800 dark:text-amber-300`),"aria-pressed":!e,"aria-label":e?`Include PII: disabled`:`Include PII: enabled`,onClick:s,"data-slot":`call-api-pii`,children:[(0,p.jsx)(t,{icon:e?o:c,"data-icon":`inline-start`,className:`size-3.5`}),`PII`]})})}export{b as a,f as c,y as i,l,g as n,h as o,v as r,m as s,C as t};
1
+ import{A as e}from"./xyflow-yApv7D4e.js";import{Dr as t,Er as n,x as r}from"./shortcut-keys-CUNegEV4.js";import{h as i,s as a}from"./element-icons-CwyLpVXz.js";import{_t as o,ft as s,pt as c}from"./index-vTuwmeQz.js";var l=[[`path`,{d:`M4.31802 19.682C3 18.364 3 16.2426 3 12C3 7.75736 3 5.63604 4.31802 4.31802C5.63604 3 7.75736 3 12 3C16.2426 3 18.364 3 19.682 4.31802C21 5.63604 21 7.75736 21 12C21 16.2426 21 18.364 19.682 19.682C18.364 21 16.2426 21 12 21C7.75736 21 5.63604 21 4.31802 19.682Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M6 12H8.5L10.5 8L13.5 16L15.5 12H18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],u=[[`path`,{d:`M5.92089 5.92089C8.15836 3.68342 9.2771 2.56468 10.5857 2.19562C11.5105 1.93479 12.4895 1.93479 13.4143 2.19562C14.7229 2.56468 15.8416 3.68342 18.0791 5.92089C20.3166 8.15836 21.4353 9.2771 21.8044 10.5857C22.0652 11.5105 22.0652 12.4895 21.8044 13.4143C21.4353 14.7229 20.3166 15.8416 18.0791 18.0791C15.8416 20.3166 14.7229 21.4353 13.4143 21.8044C12.4895 22.0652 11.5105 22.0652 10.5857 21.8044C9.2771 21.4353 8.15836 20.3166 5.92089 18.0791C3.68342 15.8416 2.56468 14.7229 2.19562 13.4143C1.93479 12.4895 1.93479 11.5105 2.19562 10.5857C2.56468 9.2771 3.68342 8.15836 5.92089 5.92089Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],d=[[`path`,{d:`M14.9961 17H16.9961C19.7575 17 21.9961 14.7614 21.9961 12C21.9961 9.23858 19.7575 7 16.9961 7H14.9961M8.99609 17H6.99609C4.23467 17 1.99609 14.7614 1.99609 12C1.99609 9.23858 4.23467 7 6.99609 7H8.99609`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8.49609 12H15.4961`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],f=[[`path`,{d:`M18.8906 12.846C18.5371 14.189 16.8667 15.138 13.5257 17.0361C10.296 18.8709 8.6812 19.7884 7.37983 19.4196C6.8418 19.2671 6.35159 18.9776 5.95624 18.5787C5 17.6139 5 15.7426 5 12C5 8.2574 5 6.3861 5.95624 5.42132C6.35159 5.02245 6.8418 4.73288 7.37983 4.58042C8.6812 4.21165 10.296 5.12907 13.5257 6.96393C16.8667 8.86197 18.5371 9.811 18.8906 11.154C19.0365 11.7084 19.0365 12.2916 18.8906 12.846Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],p=e();function m({kind:e,className:r,hex:a,inferred:s}){return e===`pk`?(0,p.jsx)(t,{icon:i,className:n(`size-3 shrink-0 text-amber-500`,r),"aria-label":`Primary key`}):e===`unique`?(0,p.jsx)(t,{icon:u,className:n(`size-3 shrink-0 text-violet-500`,r),"aria-label":`Unique`}):e===`none`?(0,p.jsx)(t,{icon:o,className:n(`size-3 shrink-0 text-muted-foreground/35`,r),"aria-label":`No key`}):(0,p.jsx)(t,{icon:d,className:n(`size-3 shrink-0`,!a&&`text-sky-500`,r),style:a?{color:a}:void 0,"aria-label":s?`Inferred foreign key`:`Foreign key`})}function h({primaryKey:e,foreignKey:t,unique:n,inferred:r,hex:i,empty:a=`spacer`}){let o=n===!0&&e!==!0;return!e&&!t&&!o?a===`none`?(0,p.jsx)(`span`,{className:`inline-flex shrink-0 items-center`,title:`None`,children:(0,p.jsx)(m,{kind:`none`})}):(0,p.jsx)(`span`,{className:`inline-flex w-3 shrink-0`,"aria-hidden":!0}):(0,p.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-px`,children:[e?(0,p.jsx)(m,{kind:`pk`}):null,t?(0,p.jsx)(m,{kind:`fk`,hex:i,inferred:r}):null,o?(0,p.jsx)(m,{kind:`unique`}):null]})}var g=`[redacted]`;function _(e){let t=[e],n=x(e),r=S(e);return n!==e&&t.push(n),r!==e&&t.push(r),t}function v(e,t){for(let n of _(t))e.add(n)}function y(e){let t=new Set;for(let n of e)v(t,n);return t}function b(e){let t=new Set;for(let n of e)t.add(x(n));return t.size}function x(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1_$2`).replace(/([A-Z])([A-Z][a-z])/g,`$1_$2`).toLowerCase()}function S(e){return e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())}function C({piiMasked:e,disabled:i,onToggle:o}){return(0,p.jsx)(a,{label:e?`PII hidden. Click to include cleartext (audited).`:`PII included. Click to remask.`,className:`flex self-stretch`,children:(0,p.jsxs)(r,{type:`button`,variant:`ghost`,size:`sm`,disabled:i,className:n(`h-full rounded-none px-2 text-[11px]`,!e&&`text-amber-800 dark:text-amber-300`),"aria-pressed":!e,"aria-label":e?`Include PII: disabled`:`Include PII: enabled`,onClick:o,"data-slot":`call-api-pii`,children:[(0,p.jsx)(t,{icon:e?c:s,"data-icon":`inline-start`,className:`size-3.5`}),`PII`]})})}export{b as a,f as c,y as i,l,g as n,h as o,v as r,m as s,C as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{r as t}from"./react-dom-Ddte4I-Q.js";import{A as n}from"./xyflow-yApv7D4e.js";import{Dt as r,Er as i,Et as a,Gn as o,Gt as s,Jt as c,S as l,Sn as u,T as d,Tt as f,W as p,Wn as m,Xt as h,Yt as g,Zt as _,bn as v,ct as y,in as b,jn as x,k as S,ln as C,lt as w,qt as T,st as E}from"./shortcut-keys-3ILd8oGn.js";import{i as D}from"./index-BKpaes3n.js";var O=[[`path`,{d:`M13.9248 21H10.0752C5.44476 21 3.12955 21 2.27636 19.4939C1.42317 17.9879 2.60736 15.9914 4.97574 11.9985L6.90057 8.75333C9.17559 4.91778 10.3131 3 12 3C13.6869 3 14.8244 4.91777 17.0994 8.75332L19.0243 11.9985C21.3926 15.9914 22.5768 17.9879 21.7236 19.4939C20.8704 21 18.5552 21 13.9248 21Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 9V13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.125 16.75H12M12.25 16.75C12.25 16.8881 12.1381 17 12 17C11.8619 17 11.75 16.8881 11.75 16.75C11.75 16.6119 11.8619 16.5 12 16.5C12.1381 16.5 12.25 16.6119 12.25 16.75Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],k=[[`path`,{d:`M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],A=[[`path`,{d:`M17 8L18.8398 9.85008C19.6133 10.6279 20 11.0168 20 11.5C20 11.9832 19.6133 12.3721 18.8398 13.1499L17 15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7 8L5.16019 9.85008C4.38673 10.6279 4 11.0168 4 11.5C4 11.9832 4.38673 12.3721 5.16019 13.1499L7 15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M14.5 4L9.5 20`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],j=d(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function M({className:e,variant:t=`default`,render:n,...r}){return D({defaultTagName:`span`,props:a({className:i(j({variant:t}),e)},r),render:n,state:{slot:`badge`,variant:t}})}var N=e(t(),1);function P(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:i}=e,[a,o]=S({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:s,setMounted:c,transitionStatus:l}=w(a,!0,!0),u=p(),[d,f]=N.useState(),m=d===null?void 0:d??u,h=T(e=>{let t=!a,n=_(C,e.nativeEvent);r(t,n),!n.isCanceled&&o(t)});return N.useMemo(()=>({defaultPanelId:u,disabled:i,handleTrigger:h,mounted:s,open:a,panelId:m,setMounted:c,setOpen:o,setPanelIdState:f,transitionStatus:l}),[u,i,h,s,a,m,c,o,f,l])}var F=N.createContext(void 0);function I(){let e=N.useContext(F);if(e===void 0)throw Error(m(15));return e}var L=`data-open`,R=`data-closed`,z=u,B=`data-panel-open`,V={[L]:``},H={[R]:``},U={open(e){return e?{[B]:``}:null}},W={open(e){return e?V:H},...v},G=n(),K=N.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:o,open:s,style:c,...l}=e,u=T(o),d=P({open:s,defaultOpen:i,onOpenChange:u,disabled:a}),p=N.useMemo(()=>({open:d.open,disabled:d.disabled,transitionStatus:d.transitionStatus}),[d.open,d.disabled,d.transitionStatus]),m=N.useMemo(()=>({...d,onOpenChange:u,state:p}),[d,u,p]),h=f(`div`,e,{state:p,ref:t,props:l,stateAttributesMapping:W});return(0,G.jsx)(F.Provider,{value:m,children:h})}),q={...U,...v},J=N.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=I(),{className:s,disabled:c=o,render:u,nativeButton:d=!0,style:p,...m}=e,{getButtonProps:h,buttonRef:g}=l({disabled:c,focusableWhenDisabled:!0,native:d});return f(`button`,e,{state:a,ref:[t,g],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},m,h],stateAttributesMapping:q})}),Y={height:void 0,width:void 0};function X(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:i,mounted:a,onOpenChange:l,open:u,setMounted:d,setOpen:f,transitionStatus:p}=e,m=N.useRef(null),v=N.useRef(null),[x,S]=N.useState(Y),C=N.useRef(Y),w=N.useRef(!1),D=N.useRef(u),O=N.useRef(!1),[k,A]=N.useState(!1),j=N.useRef(null),M=g(t,m),P=c(u),F=y(m),I=!u&&!a,L=k?`idle`:p,R=u&&(D.current||O.current),B=!u&&a&&v.current===`css-animation`&&x.height===void 0&&x.width===void 0?C.current:x,V=n&&I&&v.current!==`css-animation`,H=T((e,t=!0)=>{t&&(C.current=e),S(e)}),U=T(()=>{j.current?.(),j.current=null}),W=T(e=>{U(),j.current=()=>{j.current=null,e()}}),G=T(()=>{u&&a&&v.current===`css-animation`&&(O.current=!0)});o(()=>{k&&p!==`starting`&&A(!1)},[k,p]),N.useEffect(()=>()=>{G(),U()},[G,U]),o(()=>{let e=m.current;if(!e)return;!u&&j.current&&U();let t=ee(e,R);if(v.current=t,u&&p===`idle`&&D.current&&t===`css-animation`){C.current=Z(e);return}if(u&&p===`starting`){let n=w.current;if(w.current=!1,t===`none`){H(Z(e)),A(!0);return}if(t===`css-transition`){let t=te(e);if(H(Z(e)),!n)return t;let r=$(e,`transition-duration`,`0s`);return W(r),A(!0),t}H(Z(e));let r=$(e,`animation-name`,`none`);if(!n){r();return}let i=$(e,`animation-duration`,`0s`);r(),W(i),A(!0);return}if(!u&&a&&(p===`idle`||p===`starting`)){if(D.current=!1,O.current=!1,t===`none`){H(Y,!1),d(!1);return}H(Z(e));return}if(p!==`ending`)return;if(t===`none`){d(!1);return}let n=Z(e);if(!(n.height>0||n.width>0)){d(!1);return}H(n),t===`css-animation`&&$(e,`animation-name`,`none`)()},[a,u,U,H,d,W,R,p]),E({enabled:u&&a&&L===`idle`,open:!0,ref:m,onComplete(){u&&H(Y,!1)}}),N.useEffect(()=>{if(u||!a||L!==`ending`||!m.current)return;let e=new AbortController,t=-1;function n(){P.current||(d(!1),H(Y,!1))}return t=s.request(()=>{F(n,e.signal)}),()=>{s.cancel(t),e.abort()}},[P,a,u,L,F,H,d]),o(()=>{let e=m.current;e&&n&&I&&e.setAttribute(`hidden`,`until-found`)},[I,n]),N.useEffect(function(){let e=m.current;if(!e)return;function t(e){let t=_(b,e);l(!0,t),!t.isCanceled&&(w.current=!0,f(!0))}return h(e,`beforematch`,t)},[l,f]);let K=i||n||a||u;return{height:B.height,props:{...V?{[z]:``}:void 0,hidden:I,id:r},ref:M,shouldPreventOpenAnimation:R,shouldRender:K,transitionStatus:L,width:B.width}}function Z(e){return{height:e.scrollHeight,width:e.scrollWidth}}function ee(e,t){let n=x(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&Q(n.animationDuration),i=Q(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function Q(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function $(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===``){e.style.removeProperty(t);return}e.style.setProperty(t,r,i)}}function te(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{if(n===``){e.style.removeProperty(t);return}e.style.setProperty(t,n)})}let r=s.request(n);return()=>{s.cancel(r),n()}}var ne=`--collapsible-panel-height`,re=`--collapsible-panel-width`,ie=N.forwardRef(function(e,t){let{className:n,hiddenUntilFound:i,keepMounted:a,render:s,id:c,style:l,...u}=e,{defaultPanelId:d,mounted:p,onOpenChange:m,open:h,setMounted:g,setPanelIdState:_,setOpen:v,state:y,transitionStatus:b}=I(),x=i??!1,S=a??!1,C=c||void 0,w=C??d;o(()=>(_(e=>C??(e===null?void 0:e)),()=>{_(e=>e===C?null:e)}),[C,_]);let{height:T,props:E,ref:D,shouldPreventOpenAnimation:O,shouldRender:k,transitionStatus:A,width:j}=X({externalRef:t,hiddenUntilFound:x,id:w,keepMounted:S,mounted:p,onOpenChange:m,open:h,setMounted:g,setOpen:v,transitionStatus:b}),M={...y,transitionStatus:A},N=r(l,M),P=f(`div`,{...e,style:void 0},{state:M,ref:D,props:[E,{style:{[ne]:T===void 0?`auto`:`${T}px`,[re]:j===void 0?`auto`:`${j}px`}},u,N?{style:N}:void 0,O?{style:{animationName:`none`}}:void 0],stateAttributesMapping:W});return k?P:null});function ae({...e}){return(0,G.jsx)(K,{"data-slot":`collapsible`,...e})}function oe({...e}){return(0,G.jsx)(J,{"data-slot":`collapsible-trigger`,...e})}function se({...e}){return(0,G.jsx)(ie,{"data-slot":`collapsible-content`,...e})}export{A as a,M as i,se as n,k as o,oe as r,O as s,ae as t};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{r as t}from"./react-dom-Ddte4I-Q.js";import{A as n}from"./xyflow-yApv7D4e.js";import{Dt as r,Er as i,Et as a,Gn as o,Gt as s,Jt as c,S as l,Sn as u,T as d,Tt as f,W as p,Wn as m,Xt as h,Yt as g,Zt as _,bn as v,ct as y,in as b,jn as x,k as S,ln as C,lt as w,qt as T,st as E}from"./shortcut-keys-CUNegEV4.js";import{i as D}from"./index-vTuwmeQz.js";var O=[[`path`,{d:`M13.9248 21H10.0752C5.44476 21 3.12955 21 2.27636 19.4939C1.42317 17.9879 2.60736 15.9914 4.97574 11.9985L6.90057 8.75333C9.17559 4.91778 10.3131 3 12 3C13.6869 3 14.8244 4.91777 17.0994 8.75332L19.0243 11.9985C21.3926 15.9914 22.5768 17.9879 21.7236 19.4939C20.8704 21 18.5552 21 13.9248 21Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 9V13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12.125 16.75H12M12.25 16.75C12.25 16.8881 12.1381 17 12 17C11.8619 17 11.75 16.8881 11.75 16.75C11.75 16.6119 11.8619 16.5 12 16.5C12.1381 16.5 12.25 16.6119 12.25 16.75Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],k=[[`path`,{d:`M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],A=[[`path`,{d:`M17 8L18.8398 9.85008C19.6133 10.6279 20 11.0168 20 11.5C20 11.9832 19.6133 12.3721 18.8398 13.1499L17 15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7 8L5.16019 9.85008C4.38673 10.6279 4 11.0168 4 11.5C4 11.9832 4.38673 12.3721 5.16019 13.1499L7 15`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M14.5 4L9.5 20`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],j=d(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function M({className:e,variant:t=`default`,render:n,...r}){return D({defaultTagName:`span`,props:a({className:i(j({variant:t}),e)},r),render:n,state:{slot:`badge`,variant:t}})}var N=e(t(),1);function P(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:i}=e,[a,o]=S({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:s,setMounted:c,transitionStatus:l}=w(a,!0,!0),u=p(),[d,f]=N.useState(),m=d===null?void 0:d??u,h=T(e=>{let t=!a,n=_(C,e.nativeEvent);r(t,n),!n.isCanceled&&o(t)});return N.useMemo(()=>({defaultPanelId:u,disabled:i,handleTrigger:h,mounted:s,open:a,panelId:m,setMounted:c,setOpen:o,setPanelIdState:f,transitionStatus:l}),[u,i,h,s,a,m,c,o,f,l])}var F=N.createContext(void 0);function I(){let e=N.useContext(F);if(e===void 0)throw Error(m(15));return e}var L=`data-open`,R=`data-closed`,z=u,B=`data-panel-open`,V={[L]:``},H={[R]:``},U={open(e){return e?{[B]:``}:null}},W={open(e){return e?V:H},...v},G=n(),K=N.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:o,open:s,style:c,...l}=e,u=T(o),d=P({open:s,defaultOpen:i,onOpenChange:u,disabled:a}),p=N.useMemo(()=>({open:d.open,disabled:d.disabled,transitionStatus:d.transitionStatus}),[d.open,d.disabled,d.transitionStatus]),m=N.useMemo(()=>({...d,onOpenChange:u,state:p}),[d,u,p]),h=f(`div`,e,{state:p,ref:t,props:l,stateAttributesMapping:W});return(0,G.jsx)(F.Provider,{value:m,children:h})}),q={...U,...v},J=N.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=I(),{className:s,disabled:c=o,render:u,nativeButton:d=!0,style:p,...m}=e,{getButtonProps:h,buttonRef:g}=l({disabled:c,focusableWhenDisabled:!0,native:d});return f(`button`,e,{state:a,ref:[t,g],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},m,h],stateAttributesMapping:q})}),Y={height:void 0,width:void 0};function X(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:i,mounted:a,onOpenChange:l,open:u,setMounted:d,setOpen:f,transitionStatus:p}=e,m=N.useRef(null),v=N.useRef(null),[x,S]=N.useState(Y),C=N.useRef(Y),w=N.useRef(!1),D=N.useRef(u),O=N.useRef(!1),[k,A]=N.useState(!1),j=N.useRef(null),M=g(t,m),P=c(u),F=y(m),I=!u&&!a,L=k?`idle`:p,R=u&&(D.current||O.current),B=!u&&a&&v.current===`css-animation`&&x.height===void 0&&x.width===void 0?C.current:x,V=n&&I&&v.current!==`css-animation`,H=T((e,t=!0)=>{t&&(C.current=e),S(e)}),U=T(()=>{j.current?.(),j.current=null}),W=T(e=>{U(),j.current=()=>{j.current=null,e()}}),G=T(()=>{u&&a&&v.current===`css-animation`&&(O.current=!0)});o(()=>{k&&p!==`starting`&&A(!1)},[k,p]),N.useEffect(()=>()=>{G(),U()},[G,U]),o(()=>{let e=m.current;if(!e)return;!u&&j.current&&U();let t=ee(e,R);if(v.current=t,u&&p===`idle`&&D.current&&t===`css-animation`){C.current=Z(e);return}if(u&&p===`starting`){let n=w.current;if(w.current=!1,t===`none`){H(Z(e)),A(!0);return}if(t===`css-transition`){let t=te(e);if(H(Z(e)),!n)return t;let r=$(e,`transition-duration`,`0s`);return W(r),A(!0),t}H(Z(e));let r=$(e,`animation-name`,`none`);if(!n){r();return}let i=$(e,`animation-duration`,`0s`);r(),W(i),A(!0);return}if(!u&&a&&(p===`idle`||p===`starting`)){if(D.current=!1,O.current=!1,t===`none`){H(Y,!1),d(!1);return}H(Z(e));return}if(p!==`ending`)return;if(t===`none`){d(!1);return}let n=Z(e);if(!(n.height>0||n.width>0)){d(!1);return}H(n),t===`css-animation`&&$(e,`animation-name`,`none`)()},[a,u,U,H,d,W,R,p]),E({enabled:u&&a&&L===`idle`,open:!0,ref:m,onComplete(){u&&H(Y,!1)}}),N.useEffect(()=>{if(u||!a||L!==`ending`||!m.current)return;let e=new AbortController,t=-1;function n(){P.current||(d(!1),H(Y,!1))}return t=s.request(()=>{F(n,e.signal)}),()=>{s.cancel(t),e.abort()}},[P,a,u,L,F,H,d]),o(()=>{let e=m.current;e&&n&&I&&e.setAttribute(`hidden`,`until-found`)},[I,n]),N.useEffect(function(){let e=m.current;if(!e)return;function t(e){let t=_(b,e);l(!0,t),!t.isCanceled&&(w.current=!0,f(!0))}return h(e,`beforematch`,t)},[l,f]);let K=i||n||a||u;return{height:B.height,props:{...V?{[z]:``}:void 0,hidden:I,id:r},ref:M,shouldPreventOpenAnimation:R,shouldRender:K,transitionStatus:L,width:B.width}}function Z(e){return{height:e.scrollHeight,width:e.scrollWidth}}function ee(e,t){let n=x(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&Q(n.animationDuration),i=Q(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function Q(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function $(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===``){e.style.removeProperty(t);return}e.style.setProperty(t,r,i)}}function te(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{if(n===``){e.style.removeProperty(t);return}e.style.setProperty(t,n)})}let r=s.request(n);return()=>{s.cancel(r),n()}}var ne=`--collapsible-panel-height`,re=`--collapsible-panel-width`,ie=N.forwardRef(function(e,t){let{className:n,hiddenUntilFound:i,keepMounted:a,render:s,id:c,style:l,...u}=e,{defaultPanelId:d,mounted:p,onOpenChange:m,open:h,setMounted:g,setPanelIdState:_,setOpen:v,state:y,transitionStatus:b}=I(),x=i??!1,S=a??!1,C=c||void 0,w=C??d;o(()=>(_(e=>C??(e===null?void 0:e)),()=>{_(e=>e===C?null:e)}),[C,_]);let{height:T,props:E,ref:D,shouldPreventOpenAnimation:O,shouldRender:k,transitionStatus:A,width:j}=X({externalRef:t,hiddenUntilFound:x,id:w,keepMounted:S,mounted:p,onOpenChange:m,open:h,setMounted:g,setOpen:v,transitionStatus:b}),M={...y,transitionStatus:A},N=r(l,M),P=f(`div`,{...e,style:void 0},{state:M,ref:D,props:[E,{style:{[ne]:T===void 0?`auto`:`${T}px`,[re]:j===void 0?`auto`:`${j}px`}},u,N?{style:N}:void 0,O?{style:{animationName:`none`}}:void 0],stateAttributesMapping:W});return k?P:null});function ae({...e}){return(0,G.jsx)(K,{"data-slot":`collapsible`,...e})}function oe({...e}){return(0,G.jsx)(J,{"data-slot":`collapsible-trigger`,...e})}function se({...e}){return(0,G.jsx)(ie,{"data-slot":`collapsible-content`,...e})}export{A as a,M as i,se as n,k as o,oe as r,O as s,ae as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{r as t}from"./react-dom-Ddte4I-Q.js";import{A as n}from"./xyflow-yApv7D4e.js";import{Dr as r,E as i,Er as a,Or as o,c as s,i as c,l,o as u,s as d,sr as f,u as p}from"./shortcut-keys-3ILd8oGn.js";import{b as m,s as h}from"./element-icons-BI8cJgdh.js";import{c as g,l as _,n as v,s as y}from"./detail-header-DVWNjWjg.js";var b=e(t(),1);function x(e){let t={};return e.typed.trim()!==e.phrase&&(t.typed=`Type ${e.phrase} to confirm`),e.reason.trim().length<3&&(t.reason=`Reason is required (min 3 characters)`),Object.keys(t).length>0?t:null}var S=n();function C({open:e,onOpenChange:t,phrase:n,title:r,description:o,children:f,pending:m=!1,error:h,confirmLabel:C,confirmVariant:w=`destructive`,slot:T=`confirm-sheet`,onConfirm:E}){let[D,O]=(0,b.useState)(``),[k,A]=(0,b.useState)(``),[j,M]=(0,b.useState)(!1);(0,b.useEffect)(()=>{e||(O(``),A(``),M(!1))},[e]);let N=j?x({typed:D,reason:k,phrase:n}):null,P=x({typed:D,reason:k,phrase:n})===null;return(0,S.jsx)(c,{open:e,onOpenChange:t,children:(0,S.jsxs)(u,{side:`right`,showOverlay:!1,className:`sm:max-w-md`,"data-slot":T,children:[(0,S.jsxs)(l,{children:[(0,S.jsx)(p,{children:r}),(0,S.jsx)(d,{children:o})]}),(0,S.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto`,children:[f,(0,S.jsxs)(g,{label:`Type ${n} to confirm`,children:[(0,S.jsx)(i,{value:D,onChange:e=>O(e.target.value),onBlur:()=>M(!0),placeholder:n,"aria-label":`Type ${n} to confirm`,"aria-invalid":N?.typed?!0:void 0,flat:!0,className:a(v,`font-mono`),autoComplete:`off`}),N?.typed?(0,S.jsx)(`span`,{className:`block px-4 pb-2 text-[10px] text-destructive`,role:`alert`,children:N.typed}):null]}),(0,S.jsxs)(g,{label:`Reason`,children:[(0,S.jsx)(i,{value:k,onChange:e=>A(e.target.value),onBlur:()=>M(!0),placeholder:`Why is this change needed?`,"aria-label":`Reason`,"aria-invalid":N?.reason?!0:void 0,flat:!0,className:v}),N?.reason?(0,S.jsx)(`span`,{className:`block px-4 pb-2 text-[10px] text-destructive`,role:`alert`,children:N.reason}):null]}),h?(0,S.jsx)(y,{children:h}):null]}),(0,S.jsxs)(s,{children:[(0,S.jsx)(_,{split:!0,onClick:()=>t(!1),disabled:m,children:`Cancel`}),(0,S.jsx)(_,{variant:w,disabled:!P||m,onClick:()=>{M(!0),P&&E({confirmation:D.trim(),reason:k.trim()})},"data-slot":`confirm-action`,children:m?`Working…`:C??`Confirm ${n.toLowerCase()}`})]})]})})}function w({value:e,label:t}){let[n,i]=(0,b.useState)(!1),s=(0,b.useRef)(null);return(0,b.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]),(0,S.jsx)(h,{label:n?`Copied`:t,children:(0,S.jsx)(`button`,{type:`button`,"aria-label":t,className:a(f,`size-4`),onClick:()=>{navigator.clipboard&&navigator.clipboard.writeText(e).then(()=>{i(!0),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>i(!1),1200)})},children:(0,S.jsx)(r,{icon:n?o:m,className:n?`size-3 text-emerald-600 dark:text-emerald-400`:`size-3`,"aria-hidden":!0})})})}export{C as n,w as t};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{r as t}from"./react-dom-Ddte4I-Q.js";import{A as n}from"./xyflow-yApv7D4e.js";import{Dr as r,E as i,Er as a,Or as o,c as s,i as c,l,o as u,s as d,sr as f,u as p}from"./shortcut-keys-CUNegEV4.js";import{b as m,s as h}from"./element-icons-CwyLpVXz.js";import{c as g,l as _,n as v,s as y}from"./detail-header-b_ZzIsmU.js";var b=e(t(),1);function x(e){let t={};return e.typed.trim()!==e.phrase&&(t.typed=`Type ${e.phrase} to confirm`),e.reason.trim().length<3&&(t.reason=`Reason is required (min 3 characters)`),Object.keys(t).length>0?t:null}var S=n();function C({open:e,onOpenChange:t,phrase:n,title:r,description:o,children:f,pending:m=!1,error:h,confirmLabel:C,confirmVariant:w=`destructive`,slot:T=`confirm-sheet`,onConfirm:E}){let[D,O]=(0,b.useState)(``),[k,A]=(0,b.useState)(``),[j,M]=(0,b.useState)(!1);(0,b.useEffect)(()=>{e||(O(``),A(``),M(!1))},[e]);let N=j?x({typed:D,reason:k,phrase:n}):null,P=x({typed:D,reason:k,phrase:n})===null;return(0,S.jsx)(c,{open:e,onOpenChange:t,children:(0,S.jsxs)(u,{side:`right`,showOverlay:!1,className:`sm:max-w-md`,"data-slot":T,children:[(0,S.jsxs)(l,{children:[(0,S.jsx)(p,{children:r}),(0,S.jsx)(d,{children:o})]}),(0,S.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto`,children:[f,(0,S.jsxs)(g,{label:`Type ${n} to confirm`,children:[(0,S.jsx)(i,{value:D,onChange:e=>O(e.target.value),onBlur:()=>M(!0),placeholder:n,"aria-label":`Type ${n} to confirm`,"aria-invalid":N?.typed?!0:void 0,flat:!0,className:a(v,`font-mono`),autoComplete:`off`}),N?.typed?(0,S.jsx)(`span`,{className:`block px-4 pb-2 text-[10px] text-destructive`,role:`alert`,children:N.typed}):null]}),(0,S.jsxs)(g,{label:`Reason`,children:[(0,S.jsx)(i,{value:k,onChange:e=>A(e.target.value),onBlur:()=>M(!0),placeholder:`Why is this change needed?`,"aria-label":`Reason`,"aria-invalid":N?.reason?!0:void 0,flat:!0,className:v}),N?.reason?(0,S.jsx)(`span`,{className:`block px-4 pb-2 text-[10px] text-destructive`,role:`alert`,children:N.reason}):null]}),h?(0,S.jsx)(y,{children:h}):null]}),(0,S.jsxs)(s,{children:[(0,S.jsx)(_,{split:!0,onClick:()=>t(!1),disabled:m,children:`Cancel`}),(0,S.jsx)(_,{variant:w,disabled:!P||m,onClick:()=>{M(!0),P&&E({confirmation:D.trim(),reason:k.trim()})},"data-slot":`confirm-action`,children:m?`Working…`:C??`Confirm ${n.toLowerCase()}`})]})]})})}function w({value:e,label:t}){let[n,i]=(0,b.useState)(!1),s=(0,b.useRef)(null);return(0,b.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]),(0,S.jsx)(h,{label:n?`Copied`:t,children:(0,S.jsx)(`button`,{type:`button`,"aria-label":t,className:a(f,`size-4`),onClick:()=>{navigator.clipboard&&navigator.clipboard.writeText(e).then(()=>{i(!0),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>i(!1),1200)})},children:(0,S.jsx)(r,{icon:n?o:m,className:n?`size-3 text-emerald-600 dark:text-emerald-400`:`size-3`,"aria-hidden":!0})})})}export{C as n,w as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{r as t}from"./react-dom-Ddte4I-Q.js";import{A as n}from"./xyflow-yApv7D4e.js";import{$n as r,Dr as i,Er as a,Qn as o,Tr as s,lr as c,x as l}from"./shortcut-keys-3ILd8oGn.js";var u=e(t(),1),d=n(),f=`h-8 rounded-none border-0 bg-transparent px-4 text-[12px] shadow-none focus-visible:border-0 focus-visible:ring-0 dark:bg-transparent`,p=`h-8 rounded-none border-0 bg-transparent pr-4 pl-9 text-[12px] shadow-none focus-visible:border-0 focus-visible:ring-0 dark:bg-transparent`,m=`h-11 flex-1 rounded-none border-0 shadow-none focus-visible:ring-0`;function h({label:e,hint:t,className:n,split:r,dense:i=!1,children:o}){return(0,d.jsxs)(`label`,{className:a(`block min-w-0 border-b border-border/50`,r===`start`&&`border-r border-b-0`,r===`end`&&`border-b-0`,n),children:[i?(0,d.jsxs)(`span`,{className:`flex items-baseline justify-between gap-2 px-2 pt-1`,children:[(0,d.jsx)(`span`,{className:`min-w-0 truncate text-[10px] font-semibold tracking-[0.12em] text-muted-foreground uppercase`,children:e}),t?(0,d.jsx)(`span`,{className:`min-w-0 truncate font-mono text-[9px] text-muted-foreground/70`,children:t}):null]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`span`,{className:`block truncate px-3 pt-1.5 text-[10px] font-semibold tracking-[0.12em] text-muted-foreground uppercase`,children:e}),t?(0,d.jsx)(`span`,{className:`block truncate px-3 font-mono text-[10px] text-muted-foreground/70`,children:t}):null]}),o]})}function g({label:e,className:t,children:n}){return(0,d.jsxs)(`label`,{className:a(`flex items-center justify-between gap-3 border-b border-border/50 px-4 py-3`,t),children:[(0,d.jsx)(`span`,{className:`text-[12px] text-foreground`,children:e}),n]})}function _({active:e,extraCount:t=0,className:n,children:r,type:i=`button`,...o}){return(0,d.jsxs)(`button`,{type:i,className:a(`inline-flex items-center gap-1 rounded-none border-0 bg-transparent px-2 py-1 text-[10px] font-semibold tracking-[0.08em] uppercase shadow-none transition-colors hover:bg-muted/50`,e?`text-foreground`:`text-muted-foreground hover:text-foreground`,n),...o,children:[r,t>0?(0,d.jsx)(`span`,{className:`flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-foreground/10 px-1 text-[9px] font-semibold tabular-nums`,children:t}):null]})}function v({label:e,hint:t,className:n,children:r}){return(0,d.jsxs)(`div`,{className:a(`border-b border-border/50`,n),children:[(0,d.jsxs)(`div`,{className:`flex items-center gap-3 px-4`,children:[(0,d.jsx)(`p`,{className:`shrink-0 text-[10px] font-semibold tracking-[0.12em] text-muted-foreground uppercase`,children:e}),(0,d.jsx)(`div`,{className:`flex min-w-0 flex-1 items-stretch`,role:`group`,"aria-label":e,children:r})]}),t?(0,d.jsx)(`p`,{className:`px-4 pb-2 text-[10px] text-muted-foreground`,children:t}):null]})}function y({active:e,onClick:t,icon:n,children:r}){return(0,d.jsxs)(`button`,{type:`button`,"aria-pressed":e,onClick:t,className:a(`inline-flex h-8 min-w-0 flex-1 items-center justify-center gap-1.5 px-2 font-mono text-[10px] font-semibold outline-none select-none`,`focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-inset`,e?`bg-muted text-foreground`:`text-muted-foreground hover:text-foreground`),children:[n?(0,d.jsx)(i,{icon:n,className:`size-3 shrink-0`,"aria-hidden":!0}):null,r]})}function b({split:e=!1,className:t,variant:n=`ghost`,...r}){return(0,d.jsx)(l,{variant:n,className:a(m,e&&`border-r border-border/50`,t),...r})}function x({children:e,slot:t}){return(0,d.jsx)(`p`,{className:`border-b border-border/50 px-4 py-3 text-[11px] text-destructive`,role:`alert`,"data-slot":t,children:e})}function S({label:e,hint:t,children:n}){return(0,d.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-border/50 bg-muted/25 px-4 py-1.5`,children:[(0,d.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-3`,children:[(0,d.jsx)(`p`,{className:`text-[10px] font-semibold tracking-[0.12em] text-foreground uppercase`,children:e}),t?(0,d.jsx)(`p`,{className:`truncate text-[10px] text-muted-foreground`,children:t}):null]}),n]})}function C({children:e}){return(0,d.jsx)(`div`,{className:`grid grid-cols-2 border-b border-border/50`,children:e})}function w({columns:e=4,children:t}){let n=u.Children.count(t),r=Math.min(e,n);return(0,d.jsx)(`div`,{className:`@container w-full min-w-0 max-w-full`,children:(0,d.jsx)(`div`,{className:a(`grid w-full min-w-0 grid-cols-1`,r>=2&&`@min-[18rem]:grid-cols-2`,r>=3&&`@min-[26rem]:grid-cols-3`,r>=4&&`@min-[34rem]:grid-cols-4`,`[&>*]:min-w-0 [&>*]:border-r [&>*]:border-border/50`,r>=2&&`@min-[18rem]:[&>*:nth-child(2n)]:border-r-0`,r>=3&&`@min-[26rem]:[&>*:nth-child(2n)]:border-r @min-[26rem]:[&>*:nth-child(3n)]:border-r-0`,r>=4&&`@min-[34rem]:[&>*:nth-child(2n)]:border-r @min-[34rem]:[&>*:nth-child(3n)]:border-r @min-[34rem]:[&>*:nth-child(4n)]:border-r-0`,r<2&&`[&>*]:border-r-0`,`[&>*:last-child]:border-r-0`),children:t})})}function T({icon:e,wellClassName:t,wellStyle:n,title:i,badge:l,subtitle:u,leading:f,actions:p,sticky:m=!1,className:h,dataSlot:g=`detail-header`}){return(0,d.jsxs)(`header`,{className:a(o,m&&`sticky top-0 z-10`,h),"data-slot":g,children:[f?(0,d.jsxs)(`div`,{className:`-ml-2 flex h-full shrink-0 items-stretch`,children:[f,(0,d.jsx)(`span`,{className:`w-px shrink-0 self-stretch bg-border/60`,"aria-hidden":!0})]}):null,(0,d.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2`,children:[(0,d.jsx)(`span`,{className:a(c,`flex shrink-0 items-center justify-center`,s(t??`text-muted-foreground`)),style:n?.color?{color:n.color}:void 0,"aria-hidden":!0,children:e}),(0,d.jsx)(`h2`,{className:a(r,`leading-none`),children:i}),l?(0,d.jsx)(`div`,{className:`flex min-w-0 shrink-0 items-center gap-2 leading-none`,children:l}):null,u?(0,d.jsx)(`div`,{className:`flex min-w-0 items-center gap-1.5 leading-none`,children:u}):null]}),p?(0,d.jsx)(`div`,{className:`flex h-full shrink-0 items-stretch`,children:p}):null]})}export{y as a,h as c,C as d,g as f,S as i,b as l,f as n,v as o,_ as p,p as r,x as s,T as t,w as u};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{r as t}from"./react-dom-Ddte4I-Q.js";import{A as n}from"./xyflow-yApv7D4e.js";import{$n as r,Dr as i,Er as a,Qn as o,Tr as s,lr as c,x as l}from"./shortcut-keys-CUNegEV4.js";var u=e(t(),1),d=n(),f=`h-8 rounded-none border-0 bg-transparent px-4 text-[12px] shadow-none focus-visible:border-0 focus-visible:ring-0 dark:bg-transparent`,p=`h-8 rounded-none border-0 bg-transparent pr-4 pl-9 text-[12px] shadow-none focus-visible:border-0 focus-visible:ring-0 dark:bg-transparent`,m=`h-11 flex-1 rounded-none border-0 shadow-none focus-visible:ring-0`;function h({label:e,hint:t,className:n,split:r,dense:i=!1,children:o}){return(0,d.jsxs)(`label`,{className:a(`block min-w-0 border-b border-border/50`,r===`start`&&`border-r border-b-0`,r===`end`&&`border-b-0`,n),children:[i?(0,d.jsxs)(`span`,{className:`flex items-baseline justify-between gap-2 px-2 pt-1`,children:[(0,d.jsx)(`span`,{className:`min-w-0 truncate text-[10px] font-semibold tracking-[0.12em] text-muted-foreground uppercase`,children:e}),t?(0,d.jsx)(`span`,{className:`min-w-0 truncate font-mono text-[9px] text-muted-foreground/70`,children:t}):null]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`span`,{className:`block truncate px-3 pt-1.5 text-[10px] font-semibold tracking-[0.12em] text-muted-foreground uppercase`,children:e}),t?(0,d.jsx)(`span`,{className:`block truncate px-3 font-mono text-[10px] text-muted-foreground/70`,children:t}):null]}),o]})}function g({label:e,className:t,children:n}){return(0,d.jsxs)(`label`,{className:a(`flex items-center justify-between gap-3 border-b border-border/50 px-4 py-3`,t),children:[(0,d.jsx)(`span`,{className:`text-[12px] text-foreground`,children:e}),n]})}function _({active:e,extraCount:t=0,className:n,children:r,type:i=`button`,...o}){return(0,d.jsxs)(`button`,{type:i,className:a(`inline-flex items-center gap-1 rounded-none border-0 bg-transparent px-2 py-1 text-[10px] font-semibold tracking-[0.08em] uppercase shadow-none transition-colors hover:bg-muted/50`,e?`text-foreground`:`text-muted-foreground hover:text-foreground`,n),...o,children:[r,t>0?(0,d.jsx)(`span`,{className:`flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-foreground/10 px-1 text-[9px] font-semibold tabular-nums`,children:t}):null]})}function v({label:e,hint:t,className:n,children:r}){return(0,d.jsxs)(`div`,{className:a(`border-b border-border/50`,n),children:[(0,d.jsxs)(`div`,{className:`flex items-center gap-3 px-4`,children:[(0,d.jsx)(`p`,{className:`shrink-0 text-[10px] font-semibold tracking-[0.12em] text-muted-foreground uppercase`,children:e}),(0,d.jsx)(`div`,{className:`flex min-w-0 flex-1 items-stretch`,role:`group`,"aria-label":e,children:r})]}),t?(0,d.jsx)(`p`,{className:`px-4 pb-2 text-[10px] text-muted-foreground`,children:t}):null]})}function y({active:e,onClick:t,icon:n,children:r}){return(0,d.jsxs)(`button`,{type:`button`,"aria-pressed":e,onClick:t,className:a(`inline-flex h-8 min-w-0 flex-1 items-center justify-center gap-1.5 px-2 font-mono text-[10px] font-semibold outline-none select-none`,`focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-inset`,e?`bg-muted text-foreground`:`text-muted-foreground hover:text-foreground`),children:[n?(0,d.jsx)(i,{icon:n,className:`size-3 shrink-0`,"aria-hidden":!0}):null,r]})}function b({split:e=!1,className:t,variant:n=`ghost`,...r}){return(0,d.jsx)(l,{variant:n,className:a(m,e&&`border-r border-border/50`,t),...r})}function x({children:e,slot:t}){return(0,d.jsx)(`p`,{className:`border-b border-border/50 px-4 py-3 text-[11px] text-destructive`,role:`alert`,"data-slot":t,children:e})}function S({label:e,hint:t,children:n}){return(0,d.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-border/50 bg-muted/25 px-4 py-1.5`,children:[(0,d.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-3`,children:[(0,d.jsx)(`p`,{className:`text-[10px] font-semibold tracking-[0.12em] text-foreground uppercase`,children:e}),t?(0,d.jsx)(`p`,{className:`truncate text-[10px] text-muted-foreground`,children:t}):null]}),n]})}function C({children:e}){return(0,d.jsx)(`div`,{className:`grid grid-cols-2 border-b border-border/50`,children:e})}function w({columns:e=4,children:t}){let n=u.Children.count(t),r=Math.min(e,n);return(0,d.jsx)(`div`,{className:`@container w-full min-w-0 max-w-full`,children:(0,d.jsx)(`div`,{className:a(`grid w-full min-w-0 grid-cols-1`,r>=2&&`@min-[18rem]:grid-cols-2`,r>=3&&`@min-[26rem]:grid-cols-3`,r>=4&&`@min-[34rem]:grid-cols-4`,`[&>*]:min-w-0 [&>*]:border-r [&>*]:border-border/50`,r>=2&&`@min-[18rem]:[&>*:nth-child(2n)]:border-r-0`,r>=3&&`@min-[26rem]:[&>*:nth-child(2n)]:border-r @min-[26rem]:[&>*:nth-child(3n)]:border-r-0`,r>=4&&`@min-[34rem]:[&>*:nth-child(2n)]:border-r @min-[34rem]:[&>*:nth-child(3n)]:border-r @min-[34rem]:[&>*:nth-child(4n)]:border-r-0`,r<2&&`[&>*]:border-r-0`,`[&>*:last-child]:border-r-0`),children:t})})}function T({icon:e,wellClassName:t,wellStyle:n,title:i,badge:l,subtitle:u,leading:f,actions:p,sticky:m=!1,className:h,dataSlot:g=`detail-header`}){return(0,d.jsxs)(`header`,{className:a(o,m&&`sticky top-0 z-10`,h),"data-slot":g,children:[f?(0,d.jsxs)(`div`,{className:`-ml-2 flex h-full shrink-0 items-stretch`,children:[f,(0,d.jsx)(`span`,{className:`w-px shrink-0 self-stretch bg-border/60`,"aria-hidden":!0})]}):null,(0,d.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2`,children:[(0,d.jsx)(`span`,{className:a(c,`flex shrink-0 items-center justify-center`,s(t??`text-muted-foreground`)),style:n?.color?{color:n.color}:void 0,"aria-hidden":!0,children:e}),(0,d.jsx)(`h2`,{className:a(r,`leading-none`),children:i}),l?(0,d.jsx)(`div`,{className:`flex min-w-0 shrink-0 items-center gap-2 leading-none`,children:l}):null,u?(0,d.jsx)(`div`,{className:`flex min-w-0 items-center gap-1.5 leading-none`,children:u}):null]}),p?(0,d.jsx)(`div`,{className:`flex h-full shrink-0 items-stretch`,children:p}):null]})}export{y as a,h as c,C as d,g as f,S as i,b as l,f as n,v as o,_ as p,p as r,x as s,T as t,w as u};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,r as n}from"./react-dom-Ddte4I-Q.js";import{A as r}from"./xyflow-yApv7D4e.js";import{$ as i,An as a,At as o,B as s,Bn as c,C as l,Cn as u,Ct as d,D as f,Dn as p,Dr as m,En as h,Er as g,Et as _,Fn as v,Ft as y,G as b,Gn as x,H as S,Hn as C,In as w,It as T,J as E,Jn as D,Jt as O,K as k,Kn as A,Kt as j,Ln as M,Lt as N,Mt as P,Nn as ee,Nt as te,On as F,Or as I,Ot as ne,Pn as L,Pt as R,Q as z,Qt as re,Rn as B,Rt as ie,S as V,St as H,Tn as U,Tt as W,U as G,Un as K,V as ae,Vn as q,Vt as oe,W as se,Wn as J,Wt as ce,X as Y,Xn as le,Y as ue,Yn as de,Yt as fe,Z as pe,Zn as me,Zt as X,_t as he,at as ge,bn as _e,bt as ve,ct as ye,dn as be,en as xe,et as Se,fn as Ce,ft as we,g as Te,gn as Ee,gt as De,hn as Oe,ht as ke,it as Ae,jn as je,jt as Me,k as Ne,kn as Pe,kt as Fe,ln as Ie,lt as Le,m as Re,mt as ze,nn as Be,nt as Ve,on as He,ot as Ue,pn as We,q as Ge,qn as Ke,qt as Z,rn as qe,rt as Je,st as Ye,tn as Xe,tt as Ze,ut as Qe,v as $e,vt as et,w as tt,wn as nt,wt as rt,xt as it,yt as at,z as ot,zn as st,zt as ct}from"./shortcut-keys-3ILd8oGn.js";var Q=e(n(),1);function lt(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=Ie}=t,l=`rootStore`in e?e.rootStore:e,u=l.context.dataRef,d=Q.useRef(void 0),f=j(),p=K(),m=Q.useMemo(()=>{function e(e,t,n,r){let i=X(c,t,n);e&&r===`touch`&&s>0?p.start(s,()=>{l.setOpen(!0,i)}):l.setOpen(e,i)}function t(e,t,n){let r=u.current.openEvent,a=l.select(`domReferenceElement`)!==t;return e&&a||!e||!i?!0:r&&o?!n(r.type):!1}return{onPointerDown(e){d.current=v(e.pointerType,!0)&&M(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(n){let i=d.current,o=n.nativeEvent,s=l.select(`open`);if(n.button!==0||r===`click`||v(i,!0)&&a)return;let c=t(s,n.currentTarget,e=>e===`click`||e===`mousedown`),u=Pe(o);if(We(u)){e(c,o,u,i);return}let p=n.currentTarget;f.request(()=>{e(c,o,p,i)})},onClick(n){if(r===`mousedown-only`)return;let i=d.current;if(r===`mousedown`&&i){d.current=void 0;return}v(i,!0)&&a||e(t(l.select(`open`),n.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),n.nativeEvent,n.currentTarget,i)},onKeyDown(){d.current=void 0}}},[u,r,a,c,l,o,i,f,p,s]);return Q.useMemo(()=>n?{reference:m}:Ke,[n,m])}var ut=`Escape`;function dt(e){return c&&e.movementX===0&&e.movementY===0}function ft(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function pt(e,t){return ft(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function mt(e,t,n){return ft(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function ht(e,t,n){return ft(t,n?e===nt:e===U,e===u)}function gt(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===ut:ft(t,n?e===U:e===nt,e===h)}function _t(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:m=!0,openOnArrowKeyDown:h=!0,disabledIndices:g=void 0,orientation:_=`vertical`,parentOrientation:v,id:b,resetOnPointerLeave:S=!0,externalTree:C,grid:E}=t,D=E!=null,k=`rootStore`in e?e.rootStore:e,A=k.useState(`open`),N=k.useState(`floatingElement`),P=k.useState(`domReferenceElement`),te=k.context.dataRef,I=be(N),ne=Ce(P),L=O(I),z=at(),re=ve(C),V=Q.useRef(f),H=Q.useRef(o??-1),U=Q.useRef(null),W=Q.useRef(!0),G=Z(e=>{i(H.current===-1?null:H.current,e)}),K=Q.useRef(!!N),ae=Q.useRef(A),q=Q.useRef(!1),oe=Q.useRef(!1),se=Q.useRef(null),J=O(g),Y=O(A),le=O(o),ue=O(S),de=j(),fe=j(),pe=Z(()=>{function e(e){d?re?.events.emit(`virtualfocus`,e):se.current=Fe(e,{sync:q.current,preventScroll:!0})}let t=n.current[H.current],r=oe.current;t&&e(t),(q.current?e=>e():e=>de.request(e))(()=>{let i=n.current[H.current]||t;i&&(t||e(i),Se&&(r||!W.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});x(()=>{te.current.orientation=_},[te,_]),x(()=>{a&&(A&&N?(H.current=o??-1,V.current&&o!=null&&(oe.current=!0,G())):K.current&&(H.current=-1,G()))},[a,A,N,o,G]),x(()=>{if(a){if(!A){q.current=!1;return}if(N){if(r==null){if(q.current=!1,le.current!=null)return;if(K.current&&(H.current=-1,pe()),(!ae.current||!K.current)&&V.current&&(U.current!=null||V.current===!0&&U.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>fe.request(e):queueMicrotask)(t),e+=1):(H.current=U.current==null||mt(U.current,_,u)||l?T(n):y(n),U.current=null,G())};t()}}else ie(n.current,r)||(H.current=r,pe(),oe.current=!1)}}},[a,A,N,r,le,l,n,_,u,G,pe,fe]),x(()=>{if(!a||N||!re||d||!K.current)return;let e=re.nodesRef.current,t=e.find(e=>e.id===z)?.context?.elements.floating,n=p(ce(P??t??null)),r=e.some(e=>e.context&&F(e.context.elements.floating,n));t&&!r&&W.current&&t.focus({preventScroll:!0})},[a,N,P,re,z,d]),x(()=>{ae.current=A,K.current=!!N}),x(()=>{A||(U.current=null,V.current=f)},[A,f]);let me=r!=null,he=Z(e=>{if(!Y.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(H.current!==t||r!==t)&&(H.current=t,G(e))}),ge=Z(()=>v??re?.nodesRef.current.find(e=>e.id===z)?.context?.dataRef?.current.orientation),_e=Z(()=>T(n,J.current)),ye=Z(e=>{if(W.current=!1,q.current=!0,e.which===229||!Y.current&&e.currentTarget===L.current)return;if(l&&gt(e.key,_,u,D)){pt(e.key,ge())||B(e),k.setOpen(!1,X(qe,e.nativeEvent)),ee(P)&&(d?re?.events.emit(`virtualfocus`,P):P.focus());return}let t=H.current,r=T(n,g),i=y(n,g);if(ne||(e.key===`Home`&&(B(e),H.current=r,G(e)),e.key===`End`&&(B(e),H.current=i,G(e))),E!=null){let t=E(e,H.current,n,_,c,u,g,r,i);if(t!=null&&(H.current=t,G(e)),_===`both`)return}if(pt(e.key,_)){if(B(e),A&&!d&&p(e.currentTarget.ownerDocument)===e.currentTarget){H.current=mt(e.key,_,u)?r:i,G(e);return}mt(e.key,_,u)?c?t>=i?s&&t!==n.current.length?H.current=-1:(q.current=!1,H.current=r):H.current=R(n.current,{startingIndex:t,disabledIndices:g}):H.current=Math.min(i,R(n.current,{startingIndex:t,disabledIndices:g})):c?t<=r?s&&t!==-1?H.current=n.current.length:(q.current=!1,H.current=i):H.current=R(n.current,{startingIndex:t,decrement:!0,disabledIndices:g}):H.current=Math.max(r,R(n.current,{startingIndex:t,decrement:!0,disabledIndices:g})),ie(n.current,H.current)&&(H.current=-1),G(e)}}),Se=Q.useMemo(()=>({onFocus(e){q.current=!0,he(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){dt(e)||(q.current=!0,oe.current=!1,m&&he(e))},onPointerLeave(e){if(!Y.current||!W.current||e.pointerType===`touch`)return;q.current=!0;let t=e.relatedTarget;if(m&&!n.current.includes(t)&&ue.current&&(se.current?.(),se.current=null,H.current=-1,G(e),!d)){let e=L.current,t=p(ce(e));e&&F(e,t)&&e.focus({preventScroll:!0})}}}),[he,Y,L,m,n,G,ue,d]),we=Q.useMemo(()=>d&&A&&me&&{"aria-activedescendant":`${b}-${r}`},[d,A,me,b,r]),Te=Q.useMemo(()=>({...ne?{}:we,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&A&&!d){let t=Pe(e.nativeEvent);if(t&&!F(L.current,t))return;B(e),k.setOpen(!1,X(xe,e.nativeEvent)),ee(P)&&P.focus();return}ye(e)},onPointerMove(e){dt(e)||(W.current=!0)}}),[we,ye,L,ne,k,A,d,P]),Ee=Q.useMemo(()=>{function e(e){k.setOpen(!0,X(qe,e.nativeEvent,e.currentTarget))}function t(e){f===`auto`&&w(e.nativeEvent)&&(V.current=!d)}function n(e){V.current=f,f===`auto`&&M(e.nativeEvent)&&(V.current=!0)}return{onKeyDown(t){let n=k.select(`open`);W.current=!1;let r=t.key.startsWith(`Arrow`),i=ht(t.key,ge(),u),a=pt(t.key,_),o=(l?i:a)||t.key===`Enter`||t.key.trim()===``;if(d&&n)return ye(t);if(n||h||!r){if(o){let e=pt(t.key,ge());U.current=l&&e?null:t.key}if(l){i&&(B(t),n?(H.current=_e(),G(t)):e(t));return}a&&(le.current!=null&&(H.current=le.current),B(t),!n&&h?e(t):ye(t),n&&G(t))}},onFocus(e){k.select(`open`)&&!d&&(H.current=-1,G(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[ye,f,_e,l,G,k,h,_,ge,u,le,d]),De=Q.useMemo(()=>({...we,...Ee}),[we,Ee]);return Q.useMemo(()=>a?{reference:De,floating:Te,item:Se,trigger:Ee}:{},[a,De,Te,Ee,Se])}function vt(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=`rootStore`in e?e.rootStore:e,f=d.useState(`open`),p=K(),m=Q.useRef(``),h=Q.useRef(u??i??-1),g=Q.useRef(null),_=Z(e=>{function t(e){return r?.current[e]}function c(e){let n=t(e);return n&&!N(n)||n?.matches(`:disabled`)?!1:o==null||!ct(A,e,o)}function d(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&c(n))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(B(e),s?.(!0)),m.current.length>0&&m.current[0]!==` `&&d(_,m.current)===-1&&e.key!==` `&&s?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(B(e),s?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&c(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,s?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=d(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,s?.(!1)):(a?.(b),g.current=b)}),v=Z(e=>{let t=e.relatedTarget,n=d.select(`domReferenceElement`),r=d.select(`floatingElement`);F(n,t)||F(r,t)||(p.clear(),m.current=``,h.current=g.current,s?.(!1))});x(()=>{(f||u===null)&&(p.clear(),g.current=null,m.current!==``&&(m.current=``))},[f,u,p]);let y=Q.useMemo(()=>({onKeyDown:_,onBlur:v}),[_,v]);return Q.useMemo(()=>c?{reference:y,floating:y}:{},[c,y])}var yt=Q.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return W(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})}),$=r();function bt(e){let t=Q.useRef(``),n=Q.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:Q.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function xt(e,t){let{onClick:n,onPointerDown:r}=bt(Z((n,r)=>{(typeof e==`function`?e():e)||t(r||(q?`touch`:``))}));return Q.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function St(e){let[t,n]=Q.useState(null),r=xt(e,n);return f(e,t=>{t&&!e&&n(null)}),Q.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}var Ct=Q.createContext(void 0);function wt(e){let t=Q.useContext(Ct);if(t===void 0&&!e)throw Error(J(33));return t}var Tt=Q.createContext(void 0);function Et(e){let t=Q.useContext(Tt);if(t===void 0&&!e)throw Error(J(36));return t}var Dt=Q.createContext(void 0);function Ot(e=!0){let t=Q.useContext(Dt);if(t===void 0&&!e)throw Error(J(25));return t}var kt=Q.createContext(void 0);function At(){let e=Q.useContext(kt);if(e===void 0)throw Error(J(30));return e}function jt(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,{events:u}=a.useState(`floatingTreeRoot`),d=a.useState(`open`),f=Ot(!0),p=f!==void 0;return Q.useMemo(()=>({id:r,role:`menuitem`,tabIndex:d&&n?0:-1,onKeyDown(e){e.key===` `&&o?.current&&e.preventDefault()},onMouseMove(e){i&&u.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&u.emit(`close`,{domEvent:e,reason:Be})},onMouseUp(e){if(f){let t=f.initialCursorPointRef.current;if(f.initialCursorPointRef.current=null,p&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||p&&!C&&e.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!p||e.button===2)&&c.type===`regular-item`&&l(s.current,e,{detail:1})}}),[t,n,r,u,i,d,a,o,s,f,p,c])}var Mt={type:`regular-item`};function Nt(e){let{closeOnClick:t,disabled:n,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:s,itemMetadata:c,nodeId:l}=e,u=Q.useRef(null),{getButtonProps:d,buttonRef:f}=V({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),p=jt({closeOnClick:t,highlighted:r,id:i,nodeId:l,store:a,typingRef:o,itemRef:u,itemMetadata:c}),m=Q.useCallback(e=>_(p,{onMouseEnter(){c.type===`submenu-trigger`&&c.setActive()}},e,d),[p,d,c]),h=fe(u,f);return Q.useMemo(()=>({getItemProps:m,itemRef:h}),[m,h])}var Pt=Q.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Ft(){return Q.useContext(Pt)}function It(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=Ft(),u=Q.useRef(-1),[d,f]=Q.useState(a==null&&t?()=>{if(u.current===-1){let e=l.current;l.current+=1,u.current=e}return u.current}:-1),p=a??d,m=Q.useRef(null),h=Q.useCallback(e=>{let t=m.current;t&&s(t),m.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return x(()=>{if(a==null)return c(e=>{let t=m.current?e.get(m.current)?.index:null;t!=null&&f(t)})},[a,c]),{ref:h,index:p}}var Lt=`data-checked`,Rt=`data-unchecked`,zt={checked(e){return e?{[Lt]:``}:{[Rt]:``}},..._e},Bt=Q.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!1,checked:l,defaultChecked:u,onCheckedChange:d,style:f,...p}=e,m=It({guess:!0,label:a}),h=wt(!0),g=se(i),{store:_}=Et(),v=_.useState(`disabled`),y=s||v,b=_.useState(`isActive`,m.index),x=_.useState(`itemProps`),[S,C]=Ne({controlled:l,default:u??!1,name:`MenuCheckboxItem`,state:`checked`}),{getItemProps:w,itemRef:T}=Nt({closeOnClick:c,disabled:y,highlighted:b,id:g,store:_,nativeButton:o,nodeId:h?.context.nodeId,itemMetadata:Mt}),E=Q.useMemo(()=>({disabled:y,highlighted:b,checked:S}),[y,b,S]);function O(e){let t=X(Be,e.nativeEvent,void 0,{preventUnmountOnClose:D});d?.(!S,t),!t.isCanceled&&C(e=>!e)}let k=W(`div`,e,{state:E,stateAttributesMapping:zt,props:[x,{role:`menuitemcheckbox`,"aria-checked":S,onClick:O},p,w],ref:[T,t,m.ref]});return(0,$.jsx)(kt.Provider,{value:E,children:k})}),Vt=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=At(),c=Q.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=Le(s.checked);Ye({batch:!0,enabled:!s.checked,open:s.checked,ref:c,onComplete(){s.checked||d(!1)}});let f={checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l};return W(`span`,e,{state:f,ref:[t,c],stateAttributesMapping:zt,props:{"aria-hidden":!0,...o},enabled:a||u})}),Ht=Q.createContext(void 0);function Ut(){let e=Q.useContext(Ht);if(e===void 0)throw Error(J(31));return e}var Wt=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=Q.useState(void 0),c=W(`div`,e,{ref:t,props:{role:`group`,"aria-labelledby":o,...a}});return(0,$.jsx)(Ht.Provider,{value:s,children:c})}),Gt=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=se(a),c=Ut();return x(()=>(c(s),()=>{c(e=>e===s?void 0:e)}),[c,s]),W(`div`,e,{ref:t,props:{id:s,"aria-hidden":!0,...o}})}),Kt=Q.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,style:l,...u}=e,d=It({guess:!0,label:a}),f=wt(!0),p=se(i),{store:m}=Et(),h=m.useState(`disabled`),g=s||h,_=m.useState(`isActive`,d.index),v=m.useState(`itemProps`),{getItemProps:y,itemRef:b}=Nt({closeOnClick:c,disabled:g,highlighted:_,id:p,store:m,nativeButton:o,nodeId:f?.context.nodeId,itemMetadata:Mt});return W(`div`,e,{state:{disabled:g,highlighted:_},props:[v,u,y],ref:[b,t,d.ref]})}),qt=Q.createContext(void 0);function Jt(e){let t=Q.useContext(qt);if(t===void 0&&!e)throw Error(J(69));return t}var Yt=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:s}=Et(),{side:c,align:l}=wt(),u=Jt(!0)!=null,d=s.useState(`open`),f=s.useState(`transitionStatus`),p=s.useState(`popupProps`),m=s.useState(`mounted`),h=s.useState(`instantType`),g=s.useState(`activeTriggerElement`),_=s.useState(`parent`),v=s.useState(`lastOpenChangeReason`),y=s.useState(`rootId`),b=s.useState(`floatingRootContext`),x=s.useState(`floatingTreeRoot`),S=s.useState(`closeDelay`),C=s.useState(`hoverEnabled`),w=s.useState(`disabled`),T=s.useState(`openMethod`),E=_.type===`context-menu`;Ye({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}}),Q.useEffect(()=>{function e(e){s.setOpen(!1,X(e.reason,e.domEvent))}return x.events.on(`close`,e),()=>{x.events.off(`close`,e)}},[x.events,s]),Ge(b,{enabled:C&&!w&&!E&&_.type!==`menubar`,closeDelay:S});let D=s.useStateSetter(`popupElement`),O={transitionStatus:f,side:c,align:l,open:d,nested:_.type===`menu`,instant:h},k=W(`div`,e,{state:O,ref:[t,s.context.popupRef,D],stateAttributesMapping:Oe,props:[p,{onKeyDown(e){u&&$e.has(e.key)&&e.stopPropagation()}},ae(f),o,{"data-rootownerid":y}]}),A=_.type===void 0||E;return(g||_.type===`menubar`&&v!==`outside-press`)&&(A=!0),(0,$.jsx)(ke,{context:b,openInteractionType:T,modal:E,disabled:!m,returnFocus:a===void 0?A:a,initialFocus:_.type!==`menu`,restoreFocus:!0,externalTree:_.type===`menubar`?void 0:x,previousFocusableElement:g,nextFocusableElement:_.type===void 0?s.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:_.type===void 0?s.context.beforeContentFocusGuardRef:void 0,children:k})}),Xt=Q.createContext(void 0);function Zt(){let e=Q.useContext(Xt);if(e===void 0)throw Error(J(32));return e}var Qt=Q.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i,parent:a}=Et();if(!(i.useState(`mounted`)||n))return null;let o=a.type===`menu`||a.type===`menubar`?`group`:void 0;return(0,$.jsx)(Xt.Provider,{value:n,children:(0,$.jsx)(H,{ref:t,...r,portalOwnerRole:o})})});function $t(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=Z(i),[,o]=Q.useState(!1),s=me(tn).current,c=me(en).current,l=Q.useRef(0),u=Q.useRef(!0),d=Q.useRef(null),f=Q.useRef(null),p=Z(()=>{u.current||(u.current=!0,o(e=>!e))}),m=Z((e,t)=>{c.set(e,t),p()}),h=Z(e=>{c.delete(e),p()}),g=Z(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),l.current=n.current.length,t});function _(e){if(f.current?.disconnect(),f.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!an(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&on(r,n)>0){t.disconnect(),p();return}r=n}});f.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=rn(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let v=Z(()=>{let[e,t]=nn(c),n=g(e),r=d.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});_(t),d.current=e,u.current=!1,i&&(s.forEach(e=>e(n)),a(n))});x(()=>(!u.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),x(()=>{u.current&&v()}),x(()=>()=>{f.current?.disconnect(),u.current=!0},[]);let y=Z(e=>(s.add(e),()=>{s.delete(e)})),b=Q.useMemo(()=>({register:m,unregister:h,subscribeMapChange:y,nextIndexRef:l}),[m,h,y,l]);return(0,$.jsx)(Pt.Provider,{value:b,children:t})}function en(){return new Map}function tn(){return new Set}function nn(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>on(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function rn(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function an(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function on(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}var sn=20;function cn(e,t,n,r){let[i,a]=Q.useState(!1);x(()=>{if(!e||!t||n==null){a(!1);return}let r=ce(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-sn)},[e,t,n]),Re(e&&(!t||i),r)}var ln=Q.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:c,sideOffset:l=0,alignOffset:u=0,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p=5,arrowPadding:m=5,sticky:h=!1,disableAnchorTracking:g=!1,collisionAvoidance:_=d,style:v,...y}=e,{store:b}=Et(),C=Zt(),w=Ot(!0),T=b.useState(`parent`),E=b.useState(`floatingRootContext`),D=b.useState(`floatingTreeRoot`),O=b.useState(`mounted`),k=b.useState(`open`),A=b.useState(`modal`),j=b.useState(`openMethod`),M=b.useState(`activeTriggerElement`),N=b.useState(`transitionStatus`),P=b.useState(`positionerElement`),ee=b.useState(`instantType`),te=b.useState(`adaptiveOrigin`),F=b.useState(`lastOpenChangeReason`),I=b.useState(`floatingNodeId`),ne=b.useState(`floatingParentNodeId`),L=E.useState(`domReferenceElement`),R=Q.useRef(null),z=ye(P),re=n,B=l,ie=u,V=c,H=_;T.type===`context-menu`&&(re=n??T.context?.anchor,V??=`start`,!o&&V!==`center`&&(ie=e.alignOffset??2,B=e.sideOffset??-5));let U=o,W=V;T.type===`menu`?(U??=`inline-end`,W??=`start`,H=e.collisionAvoidance??rt):T.type===`menubar`&&(U??=T.context.orientation===`vertical`?`inline-end`:`bottom`,W??=`start`);let G=T.type===`context-menu`,ae=S({anchor:re,floatingRootContext:E,positionMethod:w?`fixed`:r,mounted:O,side:U,sideOffset:B,align:W,alignOffset:ie,arrowPadding:G?0:m,collisionBoundary:f,collisionPadding:p,sticky:h,nodeId:I,keepMounted:C,disableAnchorTracking:g,collisionAvoidance:H,shift:G?{crossAxis:!(`side`in H&&H.side===`flip`),rootBoundary:`layoutViewport`}:void 0,externalTree:D,adaptiveOrigin:te});Q.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===I&&b.set(`hoverEnabled`,!1),e.nodeId!==I&&e.parentNodeId===b.select(`floatingParentNodeId`)&&b.setOpen(!1,X(He)))}return D.events.on(`menuopenchange`,e),()=>{D.events.off(`menuopenchange`,e)}},[b,D.events,I]),Q.useEffect(()=>{if(b.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==b.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;b.setOpen(!1,X(t))}return D.events.on(`menuopenchange`,e),()=>{D.events.off(`menuopenchange`,e)}},[D.events,b]);let q=K();Q.useEffect(()=>{k||q.clear()},[k,q]),Q.useEffect(()=>{function e(e){if(k&&e.nodeId===b.select(`floatingParentNodeId`)){if(e.target&&M&&M!==e.target){let e=b.select(`closeDelay`);e>0?q.isStarted()||q.start(e,()=>{b.setOpen(!1,X(He))}):b.setOpen(!1,X(He))}else q.clear()}}return D.events.on(`itemhover`,e),()=>{D.events.off(`itemhover`,e)}},[D.events,k,M,b,q]),Q.useEffect(()=>{let e={open:k,nodeId:I,parentNodeId:ne,reason:b.select(`lastOpenChangeReason`)};D.events.emit(`menuopenchange`,e)},[D.events,k,b,I,ne]),x(()=>{let e=L,t=R.current;if(e&&(R.current=e),t&&e&&e!==t){b.set(`instantType`,void 0);let e=new AbortController;return z(()=>{b.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[L,z,b]);let oe={open:k,side:ae.side,align:ae.align,anchorHidden:ae.anchorHidden,nested:T.type===`menu`,instant:ee},se=T.type===`menubar`&&T.context.modal;cn(k&&(se||A&&F!==`trigger-hover`),j===`touch`,P,M);let J=s(e,oe,{styles:ae.positionerStyles,transitionStatus:N,props:y,refs:[t,b.useStateSetter(`positionerElement`)],hidden:!O,inert:!k}),ce=O&&T.type!==`menu`&&(T.type!==`menubar`&&A&&F!==`trigger-hover`||T.type===`menubar`&&T.context.modal),Y=null;return T.type===`menubar`?Y=T.context.contentElement:T.type===void 0&&(Y=M),(0,$.jsxs)(Ct.Provider,{value:ae,children:[ce&&(0,$.jsx)(Te,{ref:T.type===`context-menu`||T.type===`nested-context-menu`?T.context.internalBackdropRef:null,inert:ot(!k),cutout:Y}),(0,$.jsx)(De,{id:I,children:(0,$.jsx)($t,{elementsRef:b.context.itemDomElements,labelsRef:b.context.itemLabels,children:J})})]})}),un=Q.createContext(void 0);function dn(){let e=Q.useContext(un);if(e===void 0)throw Error(J(34));return e}var fn=Q.memo(Q.forwardRef(function(e,t){let{render:n,className:r,value:i,defaultValue:a,onValueChange:o,disabled:s=!1,style:c,"aria-labelledby":l,...u}=e,[d,f]=Q.useState(void 0),[p,m]=Ne({controlled:i,default:a,name:`MenuRadioGroup`}),h=Z((e,t)=>{o?.(e,t),!t.isCanceled&&m(e)}),g=W(`div`,e,{state:{disabled:s},ref:t,props:{role:`group`,"aria-labelledby":l??d,"aria-disabled":s||void 0,...u}}),_=Q.useMemo(()=>({value:p,setValue:h,disabled:s}),[p,h,s]);return(0,$.jsx)(Ht.Provider,{value:f,children:(0,$.jsx)(un.Provider,{value:_,children:g})})})),pn=Q.createContext(void 0);function mn(){let e=Q.useContext(pn);if(e===void 0)throw Error(J(35));return e}var hn=Q.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!1,value:l,style:u,...d}=e,f=It({guess:!0,label:a}),p=wt(!0),m=se(i),{store:h}=Et(),g=h.useState(`isActive`,f.index),_=h.useState(`itemProps`),{value:v,setValue:y,disabled:b}=dn(),x=h.useState(`disabled`),S=s||b||x,C=v===l,{getItemProps:w,itemRef:T}=Nt({closeOnClick:c,disabled:S,highlighted:g,id:m,store:h,nativeButton:o,nodeId:p?.context.nodeId,itemMetadata:Mt}),E=Q.useMemo(()=>({disabled:S,highlighted:g,checked:C}),[S,g,C]);function O(e){let t=X(Be,e.nativeEvent,void 0,{preventUnmountOnClose:D});y(l,t)}let k=W(`div`,e,{state:E,stateAttributesMapping:zt,props:[_,{role:`menuitemradio`,"aria-checked":C,onClick:O},d,w],ref:[T,t,f.ref]});return(0,$.jsx)(pn.Provider,{value:E,children:k})}),gn=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=mn(),c=Q.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=Le(s.checked);Ye({batch:!0,enabled:!s.checked,open:s.checked,ref:c,onComplete(){s.checked||d(!1)}});let f={checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l};return W(`span`,e,{state:f,stateAttributesMapping:zt,ref:[t,c],props:{"aria-hidden":!0,...o},enabled:a||u})}),_n=Q.createContext(null);function vn(e){let t=Q.useContext(_n);if(t===null&&!e)throw Error(J(5));return t}var yn={...pe,disabled:e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0),openMethod:e=>e.openMethod,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId,activeIndex:e=>e.activeIndex,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)}},bn=class extends we{constructor(e,t,n=!1){let r=new z,i=Sn(r,t,n,e);super(i,xn(r),yn),this.unsubscribeParentListener=this.observe(`parent`,e=>{if(this.unsubscribeParentListener?.(),e.type===`menu`){let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);this.unsubscribeParentListener=e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);(t!==i||n!==a||r!==o)&&(t=i,n=a,r=o,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}unsubscribeParentListener=null};function xn(e){return{positionerRef:Q.createRef(),popupRef:Q.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:Q.createRef(),beforeContentFocusGuardRef:Q.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function Sn(e,t,n=!1,r){return{...Y(e,t,n),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new it,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Ke,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}var Cn=Q.createContext(void 0);function wn(){return Q.useContext(Cn)}var Tn=de(function(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:a,defaultOpen:o=!1,disabled:s=!1,modal:c,loopFocus:l=!0,orientation:u=`vertical`,actionsRef:d,closeParentOnEsc:f=!1,handle:p,triggerId:m,defaultTriggerId:h=null,highlightItemOnHover:g=!0}=e,v=Ot(!0),y=Et(!0),b=vn(!0),S=wn(),C=Q.useMemo(()=>S&&y?{type:`menu`,store:y.store}:b?{type:`menubar`,context:b}:v&&!y?{type:`context-menu`,context:v}:{type:void 0},[v,y,b,S]),w=ne(),T=ne(),E=at(),D=C.type===`menu`?C.store:void 0,O=(n??o)&&D?.state.transitionStatus===`starting`,k=me(()=>O?D?.state.instantType:void 0).current,j=En({open:o,openProp:n,activeTriggerId:h,triggerIdProp:m,parent:C,disabled:s,highlightItemOnHover:g,modal:C.type===void 0?c:void 0,rootId:w,instantType:k},T,E!=null);j.useControlledProp(`openProp`,n),j.useControlledProp(`triggerIdProp`,m),j.useContextCallback(`onOpenChangeComplete`,a);let M=j.useState(`floatingTreeRoot`),N=et(M),P=j.useState(`open`),ee=j.useState(`activeTriggerElement`),te=j.useState(`positionerElement`),F=j.useState(`hoverEnabled`),I=j.useState(`disabled`),L=j.useState(`lastOpenChangeReason`),R=j.useState(`parent`),z=j.useState(`activeIndex`),re=j.useState(`payload`),B=j.useState(`floatingParentNodeId`),ie=Q.useRef(null),V=Q.useRef(R.type!==`context-menu`),H=K(),U=Q.useRef(!0),W=K(),ae=B!=null,{openMethod:q,triggerProps:oe}=St(P);j.useSyncedValues({disabled:s,highlightItemOnHover:g,modal:R.type===void 0?c:void 0,openMethod:q,rootId:w}),Je(j);let{forceUnmount:se,transitionStatus:J}=Ae(P,j,()=>{j.set(`allowMouseEnter`,!1)},O),ce=ye(j.context.popupRef);Q.useEffect(()=>{if(k===void 0)return;let e=()=>{j.state.instantType===k&&j.set(`instantType`,void 0)};if(!P){e();return}if(J!==void 0)return;if(j.context.popupRef.current==null){e();return}let t=new AbortController;return ce(e,t.signal),()=>{t.abort()}},[k,P,J,ce,j]),x(()=>{v&&!y?j.update({parent:{type:`context-menu`,context:v},floatingNodeId:N,floatingParentNodeId:E}):y&&j.update({floatingNodeId:N,floatingParentNodeId:E})},[v,y,N,E,j]),Q.useEffect(()=>{if(P||(ie.current=null),R.type===`context-menu`){if(!P){H.clear(),V.current=!1;return}H.start(500,()=>{V.current=!0})}},[H,P,R.type]),x(()=>{!P&&!F&&j.set(`hoverEnabled`,!0)},[P,F,j]);let Y=Z((e,t)=>{let n=t.reason;if(!e&&!j.select(`open`)||P===e&&t.trigger===ee&&L===n)return;let i=Ze(t);if(!e&&t.trigger==null&&(t.trigger=ee??void 0),r?.(e,t),t.isCanceled)return;j.state.floatingRootContext.dispatchOpenChange(e,t);let a=t.event;if(e===!1&&a?.type===`click`&&a.pointerType===`touch`&&!U.current)return;e&&n===`trigger-focus`?(U.current=!1,W.start(300,()=>{U.current=!0})):(U.current=!0,W.clear());let o=(n===`trigger-press`||n===`item-press`)&&a.detail===0,s=!e&&(n===`escape-key`||n==null);ie.current=t.event;let c=Ve(j.state,e,t.trigger,i());c.openChangeReason=n,c.instantType=R.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?`group`:o||s?o?`click`:`dismiss`:void 0,j.update(c)}),le=Qe({popupStore:j,floatingRootContext:j.state.floatingRootContext,floatingId:T,nested:E!=null,onOpenChange:Y}),ue=le.context.events;x(()=>{let e=({open:e,eventDetails:t})=>Y(e,t);return ue.on(`setOpen`,e),()=>{ue?.off(`setOpen`,e)}},[ue,Y]);let de=Q.useCallback(()=>{j.setOpen(!1,X(Xe))},[j]);Q.useImperativeHandle(d,()=>({unmount:se,close:de}),[se,de]);let fe;R.type===`context-menu`&&(fe=R.context),Q.useImperativeHandle(fe?.positionerRef,()=>te,[te]),Q.useImperativeHandle(fe?.actionsRef,()=>({setOpen:Y}),[Y]);let pe=ze(le,{enabled:!I,bubbles:{escapeKey:f&&R.type===`menu`},outsidePress(){return R.type!==`context-menu`||ie.current?.type===`contextmenu`||V.current},externalTree:ae?M:void 0}),_e=G(),ve=Q.useCallback(e=>{j.select(`activeIndex`)!==e&&j.set(`activeIndex`,e)},[j]),be=_t(le,{enabled:!I,listRef:j.context.itemDomElements,activeIndex:z,nested:R.type!==void 0,loopFocus:l,orientation:u,parentOrientation:R.type===`menubar`?R.context.orientation:void 0,rtl:_e===`rtl`,disabledIndices:A,onNavigate:ve,openOnArrowKeyDown:R.type!==`context-menu`,externalTree:ae?M:void 0,focusItemOnHover:g}),xe=Q.useCallback(e=>{j.context.typingRef.current=e},[j]),Ce=vt(le,{enabled:!I,listRef:j.context.itemLabels,elementsRef:j.context.itemDomElements,activeIndex:z,resetMs:500,onMatch:e=>{P&&e!==z&&j.set(`activeIndex`,e)},onTyping:xe}),we=Q.useMemo(()=>{let e=_(Ce.reference,be.reference,pe.reference,{onMouseMove(){j.set(`allowMouseEnter`,!0)}},oe);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=P,e},[j,Ce.reference,be.reference,pe.reference,oe,P]),Te=Q.useMemo(()=>{let e=_(be.trigger,pe.trigger,oe);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[be.trigger,pe.trigger,oe]);me(()=>(j.update({inactiveTriggerProps:Te}),null));let Ee=Q.useMemo(()=>_(i,{id:T,role:`menu`,"aria-orientation":u===`horizontal`?`horizontal`:void 0,"aria-labelledby":ee?.id,onMouseMove(){j.set(`allowMouseEnter`,!0),R.type===`menu`&&j.set(`hoverEnabled`,!1)},onClick(){j.select(`hoverEnabled`)&&j.set(`hoverEnabled`,!1)},onKeyDown(e){let t=j.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},Ce.floating,be.floating,pe.floating),[ee,T,u,R.type,j,Ce.floating,be.floating,pe.floating]),De=be.item??Ke;ge(j,{floatingRootContext:le,activeTriggerProps:we,inactiveTriggerProps:Te,popupProps:Ee,itemProps:De});let Oe=Q.useMemo(()=>({store:j,parent:C}),[j,C]),ke=(0,$.jsxs)(Tt.Provider,{value:Oe,children:[p&&(0,$.jsx)(Se,{handle:p,store:j}),typeof t==`function`?t({payload:re}):t]});return R.type===void 0||R.type===`context-menu`?(0,$.jsx)(he,{externalTree:M,children:ke}):ke});function En(e,t,n){return me(()=>new bn(e,t,n)).current}var Dn=5;function On(e,t){let n=kn(t);return e.clientX>=n.left-Dn&&e.clientX<=n.right+Dn&&e.clientY>=n.top-Dn&&e.clientY<=n.bottom+Dn}function kn(e){let t=e.getBoundingClientRect(),n=je(e);if(st)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}function An(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=tt(),{ref:i,index:a}=It(e),o=n===a,s=Q.useRef(null),c=fe(i,s);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}},compositeRef:c,index:a}}function jn(e){let{render:t,className:n,style:r,state:i=Ke,props:a=A,refs:o=A,metadata:s,stateAttributesMapping:c,tag:l=`div`,...u}=e,{compositeProps:d,compositeRef:f}=An({metadata:s});return W(l,e,{state:i,ref:[f,...o],props:[d,...a,u],stateAttributesMapping:c})}function Mn(e){if(ee(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`);if(!L(e))return Mn(a(e))}var Nn=e(t(),1);function Pn(e,t){let n=Q.useRef(null);function r(t){Nn.flushSync(()=>{e.setOpen(!1,X(xe,t.nativeEvent,t.currentTarget))}),P(n.current)?.focus()}function i(n){let r=e.select(`positionerElement`);if(r&&te(n,r))e.context.beforeContentFocusGuardRef.current?.focus();else{Nn.flushSync(()=>{e.setOpen(!1,X(xe,n.nativeEvent,n.currentTarget))});let i=Me(e.context.triggerFocusTargetRef.current||t.current);for(;i!==null&&F(r,i);){let e=i;if(i=o(i),i===e)break}i?.focus()}}return{preFocusGuardRef:n,handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function Fn(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=Q.useRef(!1);return Q.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,ce(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:Ke,[t,n,r])}var In=le(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,openOnHover:c,delay:l=100,closeDelay:u=0,handle:d,payload:f,...p}=e,m=Et(!0),h=ue(d)??m?.store;if(!h)throw Error(J(85));let g=se(s),v=h.useState(`isTriggerActive`,g),y=h.useState(`floatingRootContext`),x=h.useState(`isOpenedByTrigger`,g),S=h.useState(`triggerPopupId`,g),C=Q.useRef(null),w=Rn(),T=tt(!0),D=ve(),O=Q.useMemo(()=>D??new it,[D]),A=et(O),j=at(),{registerTrigger:M,isMountedByThisTrigger:N}=Ue(g,C,h,{payload:f,closeDelay:u,parent:w,floatingTreeRoot:O,floatingNodeId:A,floatingParentNodeId:j,keyboardEventRelay:T?.relayKeyboardEvent}),P=w.type===`menubar`,ee=h.useState(`disabled`),te=a||ee||P&&w.context.disabled,{getButtonProps:I,buttonRef:ne}=V({disabled:te,native:o});Q.useEffect(()=>{!x&&w.type===void 0&&(h.context.allowMouseUpTriggerRef.current=!1)},[h,x,w.type]);let L=Q.useRef(null),R=K(),z=Z(e=>{if(!L.current)return;R.clear(),h.context.allowMouseUpTriggerRef.current=!1;let t=e.target;F(L.current,t)||F(h.select(`positionerElement`),t)||t===L.current||(t==null||Mn(t)!==h.select(`rootId`))&&(On(e,L.current)||O.events.emit(`close`,{domEvent:e,reason:re}))});Q.useEffect(()=>{x&&h.select(`lastOpenChangeReason`)===`trigger-hover`&&ce(L.current).addEventListener(`mouseup`,z,{once:!0})},[x,z,h]);let B=P&&w.context.hasSubmenuOpen,ie=k(y,{enabled:(c??B)&&!te&&(!P||B&&!N),handleClose:b({blockPointerEvents:!P}),mouseOnly:!0,move:!1,restMs:w.type===void 0?l:void 0,delay:{close:u},triggerElementRef:C,externalTree:O,isActiveTrigger:v,isClosing:()=>h.select(`transitionStatus`)===`ending`}),H=Ln(x,h.select(`lastOpenChangeReason`)),U=lt(y,{enabled:!te,event:x&&P?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:w.type===void 0&&H}),G=E(y,{enabled:!te&&B}),ae=Fn({open:x,enabled:P,mouseDownAction:`open`}),q=Q.useMemo(()=>_(G.reference,U.reference),[G.reference,U.reference]),Y=h.useState(`triggerProps`,N),{preFocusGuardRef:le,handlePreFocusGuardFocus:de,handleFocusTargetFocus:fe}=Pn(h,C),pe={disabled:te,open:x},me=[L,t,ne,M,C],X=[q,ie??Ke,Y,{"aria-haspopup":`menu`,"aria-controls":S,id:g,onMouseDown:e=>{h.select(`open`)||(R.start(200,()=>{h.context.allowMouseUpTriggerRef.current=!0}),ce(e.currentTarget).addEventListener(`mouseup`,z,{once:!0}))}},P?{role:`menuitem`}:{},ae,p,I],he=W(`button`,e,{enabled:!P,stateAttributesMapping:Ee,state:pe,ref:me,props:X});return P?(0,$.jsx)(jn,{tag:`button`,render:n,className:r,style:i,state:pe,refs:me,props:X,stateAttributesMapping:Ee}):x?(0,$.jsxs)(Q.Fragment,{children:[(0,$.jsx)(oe,{ref:le,onFocus:de},`${g}-pre-focus-guard`),(0,$.jsx)(Q.Fragment,{children:he},g),(0,$.jsx)(oe,{ref:h.context.triggerFocusTargetRef,onFocus:fe},`${g}-post-focus-guard`)]}):(0,$.jsx)(Q.Fragment,{children:he},g)});function Ln(e,t){let n=K(),[r,i]=Q.useState(!1);return x(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function Rn(){let e=vn(!0);return Q.useMemo(()=>e?{type:`menubar`,context:e}:{type:void 0},[e])}function zn({...e}){return(0,$.jsx)(Tn,{"data-slot":`dropdown-menu`,...e})}function Bn({...e}){return(0,$.jsx)(In,{"data-slot":`dropdown-menu-trigger`,...e})}function Vn({align:e=`start`,alignOffset:t=0,side:n=`bottom`,sideOffset:r=4,className:i,...a}){return(0,$.jsx)(Qt,{children:(0,$.jsx)(ln,{className:`isolate z-50 outline-none`,align:e,alignOffset:t,side:n,sideOffset:r,children:(0,$.jsx)(Yt,{"data-slot":`dropdown-menu-content`,className:g(`cn-menu-target cn-menu-translucent z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95`,i),...a})})})}function Hn({...e}){return(0,$.jsx)(Wt,{"data-slot":`dropdown-menu-group`,...e})}function Un({className:e,inset:t,...n}){return(0,$.jsx)(Gt,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:g(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7`,e),...n})}function Wn({className:e,inset:t,variant:n=`default`,...r}){return(0,$.jsx)(Kt,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:g(`group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive`,e),...r})}function Gn({className:e,children:t,checked:n,inset:r,...i}){return(0,$.jsxs)(Bt,{"data-slot":`dropdown-menu-checkbox-item`,"data-inset":r,className:g(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),checked:n,...i,children:[(0,$.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`,"data-slot":`dropdown-menu-checkbox-item-indicator`,children:(0,$.jsx)(Vt,{children:(0,$.jsx)(m,{icon:I,size:16,color:`currentColor`,strokeWidth:1.5})})}),t]})}function Kn({...e}){return(0,$.jsx)(fn,{"data-slot":`dropdown-menu-radio-group`,...e})}function qn({className:e,children:t,inset:n,...r}){return(0,$.jsxs)(hn,{"data-slot":`dropdown-menu-radio-item`,"data-inset":n,className:g(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[(0,$.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`,"data-slot":`dropdown-menu-radio-item-indicator`,children:(0,$.jsx)(gn,{children:(0,$.jsx)(m,{icon:I,size:16,color:`currentColor`,strokeWidth:1.5})})}),t]})}function Jn({className:e,...t}){return(0,$.jsx)(yt,{"data-slot":`dropdown-menu-separator`,className:g(`-mx-1 my-1 h-px bg-border`,e),...t})}function Yn({className:e,...t}){return(0,$.jsx)(`span`,{"data-slot":`dropdown-menu-shortcut`,className:g(`ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground`,e),...t})}export{St as _,Wn as a,_t as b,qn as c,Bn as d,On as f,It as g,Jt as h,Hn as i,Jn as l,$t as m,Gn as n,Un as o,cn as p,Vn as r,Kn as s,zn as t,Yn as u,yt as v,lt as x,vt as y};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,r as n}from"./react-dom-Ddte4I-Q.js";import{A as r}from"./xyflow-yApv7D4e.js";import{$ as i,An as a,At as o,B as s,Bn as c,C as l,Cn as u,Ct as d,D as f,Dn as p,Dr as m,En as h,Er as g,Et as _,Fn as v,Ft as y,G as b,Gn as x,H as S,Hn as C,In as w,It as T,J as E,Jn as D,Jt as O,K as k,Kn as A,Kt as j,Ln as M,Lt as N,Mt as P,Nn as ee,Nt as te,On as F,Or as I,Ot as ne,Pn as L,Pt as R,Q as z,Qt as re,Rn as B,Rt as ie,S as V,St as H,Tn as U,Tt as W,U as G,Un as K,V as ae,Vn as q,Vt as oe,W as se,Wn as J,Wt as ce,X as Y,Xn as le,Y as ue,Yn as de,Yt as fe,Z as pe,Zn as me,Zt as X,_t as he,at as ge,bn as _e,bt as ve,ct as ye,dn as be,en as xe,et as Se,fn as Ce,ft as we,g as Te,gn as Ee,gt as De,hn as Oe,ht as ke,it as Ae,jn as je,jt as Me,k as Ne,kn as Pe,kt as Fe,ln as Ie,lt as Le,m as Re,mt as ze,nn as Be,nt as Ve,on as He,ot as Ue,pn as We,q as Ge,qn as Ke,qt as Z,rn as qe,rt as Je,st as Ye,tn as Xe,tt as Ze,ut as Qe,v as $e,vt as et,w as tt,wn as nt,wt as rt,xt as it,yt as at,z as ot,zn as st,zt as ct}from"./shortcut-keys-CUNegEV4.js";var Q=e(n(),1);function lt(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=Ie}=t,l=`rootStore`in e?e.rootStore:e,u=l.context.dataRef,d=Q.useRef(void 0),f=j(),p=K(),m=Q.useMemo(()=>{function e(e,t,n,r){let i=X(c,t,n);e&&r===`touch`&&s>0?p.start(s,()=>{l.setOpen(!0,i)}):l.setOpen(e,i)}function t(e,t,n){let r=u.current.openEvent,a=l.select(`domReferenceElement`)!==t;return e&&a||!e||!i?!0:r&&o?!n(r.type):!1}return{onPointerDown(e){d.current=v(e.pointerType,!0)&&M(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(n){let i=d.current,o=n.nativeEvent,s=l.select(`open`);if(n.button!==0||r===`click`||v(i,!0)&&a)return;let c=t(s,n.currentTarget,e=>e===`click`||e===`mousedown`),u=Pe(o);if(We(u)){e(c,o,u,i);return}let p=n.currentTarget;f.request(()=>{e(c,o,p,i)})},onClick(n){if(r===`mousedown-only`)return;let i=d.current;if(r===`mousedown`&&i){d.current=void 0;return}v(i,!0)&&a||e(t(l.select(`open`),n.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),n.nativeEvent,n.currentTarget,i)},onKeyDown(){d.current=void 0}}},[u,r,a,c,l,o,i,f,p,s]);return Q.useMemo(()=>n?{reference:m}:Ke,[n,m])}var ut=`Escape`;function dt(e){return c&&e.movementX===0&&e.movementY===0}function ft(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function pt(e,t){return ft(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function mt(e,t,n){return ft(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function ht(e,t,n){return ft(t,n?e===nt:e===U,e===u)}function gt(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===ut:ft(t,n?e===U:e===nt,e===h)}function _t(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:m=!0,openOnArrowKeyDown:h=!0,disabledIndices:g=void 0,orientation:_=`vertical`,parentOrientation:v,id:b,resetOnPointerLeave:S=!0,externalTree:C,grid:E}=t,D=E!=null,k=`rootStore`in e?e.rootStore:e,A=k.useState(`open`),N=k.useState(`floatingElement`),P=k.useState(`domReferenceElement`),te=k.context.dataRef,I=be(N),ne=Ce(P),L=O(I),z=at(),re=ve(C),V=Q.useRef(f),H=Q.useRef(o??-1),U=Q.useRef(null),W=Q.useRef(!0),G=Z(e=>{i(H.current===-1?null:H.current,e)}),K=Q.useRef(!!N),ae=Q.useRef(A),q=Q.useRef(!1),oe=Q.useRef(!1),se=Q.useRef(null),J=O(g),Y=O(A),le=O(o),ue=O(S),de=j(),fe=j(),pe=Z(()=>{function e(e){d?re?.events.emit(`virtualfocus`,e):se.current=Fe(e,{sync:q.current,preventScroll:!0})}let t=n.current[H.current],r=oe.current;t&&e(t),(q.current?e=>e():e=>de.request(e))(()=>{let i=n.current[H.current]||t;i&&(t||e(i),Se&&(r||!W.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});x(()=>{te.current.orientation=_},[te,_]),x(()=>{a&&(A&&N?(H.current=o??-1,V.current&&o!=null&&(oe.current=!0,G())):K.current&&(H.current=-1,G()))},[a,A,N,o,G]),x(()=>{if(a){if(!A){q.current=!1;return}if(N){if(r==null){if(q.current=!1,le.current!=null)return;if(K.current&&(H.current=-1,pe()),(!ae.current||!K.current)&&V.current&&(U.current!=null||V.current===!0&&U.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>fe.request(e):queueMicrotask)(t),e+=1):(H.current=U.current==null||mt(U.current,_,u)||l?T(n):y(n),U.current=null,G())};t()}}else ie(n.current,r)||(H.current=r,pe(),oe.current=!1)}}},[a,A,N,r,le,l,n,_,u,G,pe,fe]),x(()=>{if(!a||N||!re||d||!K.current)return;let e=re.nodesRef.current,t=e.find(e=>e.id===z)?.context?.elements.floating,n=p(ce(P??t??null)),r=e.some(e=>e.context&&F(e.context.elements.floating,n));t&&!r&&W.current&&t.focus({preventScroll:!0})},[a,N,P,re,z,d]),x(()=>{ae.current=A,K.current=!!N}),x(()=>{A||(U.current=null,V.current=f)},[A,f]);let me=r!=null,he=Z(e=>{if(!Y.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(H.current!==t||r!==t)&&(H.current=t,G(e))}),ge=Z(()=>v??re?.nodesRef.current.find(e=>e.id===z)?.context?.dataRef?.current.orientation),_e=Z(()=>T(n,J.current)),ye=Z(e=>{if(W.current=!1,q.current=!0,e.which===229||!Y.current&&e.currentTarget===L.current)return;if(l&&gt(e.key,_,u,D)){pt(e.key,ge())||B(e),k.setOpen(!1,X(qe,e.nativeEvent)),ee(P)&&(d?re?.events.emit(`virtualfocus`,P):P.focus());return}let t=H.current,r=T(n,g),i=y(n,g);if(ne||(e.key===`Home`&&(B(e),H.current=r,G(e)),e.key===`End`&&(B(e),H.current=i,G(e))),E!=null){let t=E(e,H.current,n,_,c,u,g,r,i);if(t!=null&&(H.current=t,G(e)),_===`both`)return}if(pt(e.key,_)){if(B(e),A&&!d&&p(e.currentTarget.ownerDocument)===e.currentTarget){H.current=mt(e.key,_,u)?r:i,G(e);return}mt(e.key,_,u)?c?t>=i?s&&t!==n.current.length?H.current=-1:(q.current=!1,H.current=r):H.current=R(n.current,{startingIndex:t,disabledIndices:g}):H.current=Math.min(i,R(n.current,{startingIndex:t,disabledIndices:g})):c?t<=r?s&&t!==-1?H.current=n.current.length:(q.current=!1,H.current=i):H.current=R(n.current,{startingIndex:t,decrement:!0,disabledIndices:g}):H.current=Math.max(r,R(n.current,{startingIndex:t,decrement:!0,disabledIndices:g})),ie(n.current,H.current)&&(H.current=-1),G(e)}}),Se=Q.useMemo(()=>({onFocus(e){q.current=!0,he(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){dt(e)||(q.current=!0,oe.current=!1,m&&he(e))},onPointerLeave(e){if(!Y.current||!W.current||e.pointerType===`touch`)return;q.current=!0;let t=e.relatedTarget;if(m&&!n.current.includes(t)&&ue.current&&(se.current?.(),se.current=null,H.current=-1,G(e),!d)){let e=L.current,t=p(ce(e));e&&F(e,t)&&e.focus({preventScroll:!0})}}}),[he,Y,L,m,n,G,ue,d]),we=Q.useMemo(()=>d&&A&&me&&{"aria-activedescendant":`${b}-${r}`},[d,A,me,b,r]),Te=Q.useMemo(()=>({...ne?{}:we,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&A&&!d){let t=Pe(e.nativeEvent);if(t&&!F(L.current,t))return;B(e),k.setOpen(!1,X(xe,e.nativeEvent)),ee(P)&&P.focus();return}ye(e)},onPointerMove(e){dt(e)||(W.current=!0)}}),[we,ye,L,ne,k,A,d,P]),Ee=Q.useMemo(()=>{function e(e){k.setOpen(!0,X(qe,e.nativeEvent,e.currentTarget))}function t(e){f===`auto`&&w(e.nativeEvent)&&(V.current=!d)}function n(e){V.current=f,f===`auto`&&M(e.nativeEvent)&&(V.current=!0)}return{onKeyDown(t){let n=k.select(`open`);W.current=!1;let r=t.key.startsWith(`Arrow`),i=ht(t.key,ge(),u),a=pt(t.key,_),o=(l?i:a)||t.key===`Enter`||t.key.trim()===``;if(d&&n)return ye(t);if(n||h||!r){if(o){let e=pt(t.key,ge());U.current=l&&e?null:t.key}if(l){i&&(B(t),n?(H.current=_e(),G(t)):e(t));return}a&&(le.current!=null&&(H.current=le.current),B(t),!n&&h?e(t):ye(t),n&&G(t))}},onFocus(e){k.select(`open`)&&!d&&(H.current=-1,G(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[ye,f,_e,l,G,k,h,_,ge,u,le,d]),De=Q.useMemo(()=>({...we,...Ee}),[we,Ee]);return Q.useMemo(()=>a?{reference:De,floating:Te,item:Se,trigger:Ee}:{},[a,De,Te,Ee,Se])}function vt(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=`rootStore`in e?e.rootStore:e,f=d.useState(`open`),p=K(),m=Q.useRef(``),h=Q.useRef(u??i??-1),g=Q.useRef(null),_=Z(e=>{function t(e){return r?.current[e]}function c(e){let n=t(e);return n&&!N(n)||n?.matches(`:disabled`)?!1:o==null||!ct(A,e,o)}function d(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&c(n))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(B(e),s?.(!0)),m.current.length>0&&m.current[0]!==` `&&d(_,m.current)===-1&&e.key!==` `&&s?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(B(e),s?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&c(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,s?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=d(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,s?.(!1)):(a?.(b),g.current=b)}),v=Z(e=>{let t=e.relatedTarget,n=d.select(`domReferenceElement`),r=d.select(`floatingElement`);F(n,t)||F(r,t)||(p.clear(),m.current=``,h.current=g.current,s?.(!1))});x(()=>{(f||u===null)&&(p.clear(),g.current=null,m.current!==``&&(m.current=``))},[f,u,p]);let y=Q.useMemo(()=>({onKeyDown:_,onBlur:v}),[_,v]);return Q.useMemo(()=>c?{reference:y,floating:y}:{},[c,y])}var yt=Q.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return W(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})}),$=r();function bt(e){let t=Q.useRef(``),n=Q.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:Q.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function xt(e,t){let{onClick:n,onPointerDown:r}=bt(Z((n,r)=>{(typeof e==`function`?e():e)||t(r||(q?`touch`:``))}));return Q.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function St(e){let[t,n]=Q.useState(null),r=xt(e,n);return f(e,t=>{t&&!e&&n(null)}),Q.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}var Ct=Q.createContext(void 0);function wt(e){let t=Q.useContext(Ct);if(t===void 0&&!e)throw Error(J(33));return t}var Tt=Q.createContext(void 0);function Et(e){let t=Q.useContext(Tt);if(t===void 0&&!e)throw Error(J(36));return t}var Dt=Q.createContext(void 0);function Ot(e=!0){let t=Q.useContext(Dt);if(t===void 0&&!e)throw Error(J(25));return t}var kt=Q.createContext(void 0);function At(){let e=Q.useContext(kt);if(e===void 0)throw Error(J(30));return e}function jt(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,{events:u}=a.useState(`floatingTreeRoot`),d=a.useState(`open`),f=Ot(!0),p=f!==void 0;return Q.useMemo(()=>({id:r,role:`menuitem`,tabIndex:d&&n?0:-1,onKeyDown(e){e.key===` `&&o?.current&&e.preventDefault()},onMouseMove(e){i&&u.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&u.emit(`close`,{domEvent:e,reason:Be})},onMouseUp(e){if(f){let t=f.initialCursorPointRef.current;if(f.initialCursorPointRef.current=null,p&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||p&&!C&&e.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!p||e.button===2)&&c.type===`regular-item`&&l(s.current,e,{detail:1})}}),[t,n,r,u,i,d,a,o,s,f,p,c])}var Mt={type:`regular-item`};function Nt(e){let{closeOnClick:t,disabled:n,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:s,itemMetadata:c,nodeId:l}=e,u=Q.useRef(null),{getButtonProps:d,buttonRef:f}=V({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),p=jt({closeOnClick:t,highlighted:r,id:i,nodeId:l,store:a,typingRef:o,itemRef:u,itemMetadata:c}),m=Q.useCallback(e=>_(p,{onMouseEnter(){c.type===`submenu-trigger`&&c.setActive()}},e,d),[p,d,c]),h=fe(u,f);return Q.useMemo(()=>({getItemProps:m,itemRef:h}),[m,h])}var Pt=Q.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Ft(){return Q.useContext(Pt)}function It(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=Ft(),u=Q.useRef(-1),[d,f]=Q.useState(a==null&&t?()=>{if(u.current===-1){let e=l.current;l.current+=1,u.current=e}return u.current}:-1),p=a??d,m=Q.useRef(null),h=Q.useCallback(e=>{let t=m.current;t&&s(t),m.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return x(()=>{if(a==null)return c(e=>{let t=m.current?e.get(m.current)?.index:null;t!=null&&f(t)})},[a,c]),{ref:h,index:p}}var Lt=`data-checked`,Rt=`data-unchecked`,zt={checked(e){return e?{[Lt]:``}:{[Rt]:``}},..._e},Bt=Q.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!1,checked:l,defaultChecked:u,onCheckedChange:d,style:f,...p}=e,m=It({guess:!0,label:a}),h=wt(!0),g=se(i),{store:_}=Et(),v=_.useState(`disabled`),y=s||v,b=_.useState(`isActive`,m.index),x=_.useState(`itemProps`),[S,C]=Ne({controlled:l,default:u??!1,name:`MenuCheckboxItem`,state:`checked`}),{getItemProps:w,itemRef:T}=Nt({closeOnClick:c,disabled:y,highlighted:b,id:g,store:_,nativeButton:o,nodeId:h?.context.nodeId,itemMetadata:Mt}),E=Q.useMemo(()=>({disabled:y,highlighted:b,checked:S}),[y,b,S]);function O(e){let t=X(Be,e.nativeEvent,void 0,{preventUnmountOnClose:D});d?.(!S,t),!t.isCanceled&&C(e=>!e)}let k=W(`div`,e,{state:E,stateAttributesMapping:zt,props:[x,{role:`menuitemcheckbox`,"aria-checked":S,onClick:O},p,w],ref:[T,t,m.ref]});return(0,$.jsx)(kt.Provider,{value:E,children:k})}),Vt=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=At(),c=Q.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=Le(s.checked);Ye({batch:!0,enabled:!s.checked,open:s.checked,ref:c,onComplete(){s.checked||d(!1)}});let f={checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l};return W(`span`,e,{state:f,ref:[t,c],stateAttributesMapping:zt,props:{"aria-hidden":!0,...o},enabled:a||u})}),Ht=Q.createContext(void 0);function Ut(){let e=Q.useContext(Ht);if(e===void 0)throw Error(J(31));return e}var Wt=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=Q.useState(void 0),c=W(`div`,e,{ref:t,props:{role:`group`,"aria-labelledby":o,...a}});return(0,$.jsx)(Ht.Provider,{value:s,children:c})}),Gt=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=se(a),c=Ut();return x(()=>(c(s),()=>{c(e=>e===s?void 0:e)}),[c,s]),W(`div`,e,{ref:t,props:{id:s,"aria-hidden":!0,...o}})}),Kt=Q.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,style:l,...u}=e,d=It({guess:!0,label:a}),f=wt(!0),p=se(i),{store:m}=Et(),h=m.useState(`disabled`),g=s||h,_=m.useState(`isActive`,d.index),v=m.useState(`itemProps`),{getItemProps:y,itemRef:b}=Nt({closeOnClick:c,disabled:g,highlighted:_,id:p,store:m,nativeButton:o,nodeId:f?.context.nodeId,itemMetadata:Mt});return W(`div`,e,{state:{disabled:g,highlighted:_},props:[v,u,y],ref:[b,t,d.ref]})}),qt=Q.createContext(void 0);function Jt(e){let t=Q.useContext(qt);if(t===void 0&&!e)throw Error(J(69));return t}var Yt=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:s}=Et(),{side:c,align:l}=wt(),u=Jt(!0)!=null,d=s.useState(`open`),f=s.useState(`transitionStatus`),p=s.useState(`popupProps`),m=s.useState(`mounted`),h=s.useState(`instantType`),g=s.useState(`activeTriggerElement`),_=s.useState(`parent`),v=s.useState(`lastOpenChangeReason`),y=s.useState(`rootId`),b=s.useState(`floatingRootContext`),x=s.useState(`floatingTreeRoot`),S=s.useState(`closeDelay`),C=s.useState(`hoverEnabled`),w=s.useState(`disabled`),T=s.useState(`openMethod`),E=_.type===`context-menu`;Ye({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}}),Q.useEffect(()=>{function e(e){s.setOpen(!1,X(e.reason,e.domEvent))}return x.events.on(`close`,e),()=>{x.events.off(`close`,e)}},[x.events,s]),Ge(b,{enabled:C&&!w&&!E&&_.type!==`menubar`,closeDelay:S});let D=s.useStateSetter(`popupElement`),O={transitionStatus:f,side:c,align:l,open:d,nested:_.type===`menu`,instant:h},k=W(`div`,e,{state:O,ref:[t,s.context.popupRef,D],stateAttributesMapping:Oe,props:[p,{onKeyDown(e){u&&$e.has(e.key)&&e.stopPropagation()}},ae(f),o,{"data-rootownerid":y}]}),A=_.type===void 0||E;return(g||_.type===`menubar`&&v!==`outside-press`)&&(A=!0),(0,$.jsx)(ke,{context:b,openInteractionType:T,modal:E,disabled:!m,returnFocus:a===void 0?A:a,initialFocus:_.type!==`menu`,restoreFocus:!0,externalTree:_.type===`menubar`?void 0:x,previousFocusableElement:g,nextFocusableElement:_.type===void 0?s.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:_.type===void 0?s.context.beforeContentFocusGuardRef:void 0,children:k})}),Xt=Q.createContext(void 0);function Zt(){let e=Q.useContext(Xt);if(e===void 0)throw Error(J(32));return e}var Qt=Q.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i,parent:a}=Et();if(!(i.useState(`mounted`)||n))return null;let o=a.type===`menu`||a.type===`menubar`?`group`:void 0;return(0,$.jsx)(Xt.Provider,{value:n,children:(0,$.jsx)(H,{ref:t,...r,portalOwnerRole:o})})});function $t(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=Z(i),[,o]=Q.useState(!1),s=me(tn).current,c=me(en).current,l=Q.useRef(0),u=Q.useRef(!0),d=Q.useRef(null),f=Q.useRef(null),p=Z(()=>{u.current||(u.current=!0,o(e=>!e))}),m=Z((e,t)=>{c.set(e,t),p()}),h=Z(e=>{c.delete(e),p()}),g=Z(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),l.current=n.current.length,t});function _(e){if(f.current?.disconnect(),f.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!an(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&on(r,n)>0){t.disconnect(),p();return}r=n}});f.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=rn(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let v=Z(()=>{let[e,t]=nn(c),n=g(e),r=d.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});_(t),d.current=e,u.current=!1,i&&(s.forEach(e=>e(n)),a(n))});x(()=>(!u.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),x(()=>{u.current&&v()}),x(()=>()=>{f.current?.disconnect(),u.current=!0},[]);let y=Z(e=>(s.add(e),()=>{s.delete(e)})),b=Q.useMemo(()=>({register:m,unregister:h,subscribeMapChange:y,nextIndexRef:l}),[m,h,y,l]);return(0,$.jsx)(Pt.Provider,{value:b,children:t})}function en(){return new Map}function tn(){return new Set}function nn(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>on(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function rn(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function an(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function on(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}var sn=20;function cn(e,t,n,r){let[i,a]=Q.useState(!1);x(()=>{if(!e||!t||n==null){a(!1);return}let r=ce(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-sn)},[e,t,n]),Re(e&&(!t||i),r)}var ln=Q.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:c,sideOffset:l=0,alignOffset:u=0,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p=5,arrowPadding:m=5,sticky:h=!1,disableAnchorTracking:g=!1,collisionAvoidance:_=d,style:v,...y}=e,{store:b}=Et(),C=Zt(),w=Ot(!0),T=b.useState(`parent`),E=b.useState(`floatingRootContext`),D=b.useState(`floatingTreeRoot`),O=b.useState(`mounted`),k=b.useState(`open`),A=b.useState(`modal`),j=b.useState(`openMethod`),M=b.useState(`activeTriggerElement`),N=b.useState(`transitionStatus`),P=b.useState(`positionerElement`),ee=b.useState(`instantType`),te=b.useState(`adaptiveOrigin`),F=b.useState(`lastOpenChangeReason`),I=b.useState(`floatingNodeId`),ne=b.useState(`floatingParentNodeId`),L=E.useState(`domReferenceElement`),R=Q.useRef(null),z=ye(P),re=n,B=l,ie=u,V=c,H=_;T.type===`context-menu`&&(re=n??T.context?.anchor,V??=`start`,!o&&V!==`center`&&(ie=e.alignOffset??2,B=e.sideOffset??-5));let U=o,W=V;T.type===`menu`?(U??=`inline-end`,W??=`start`,H=e.collisionAvoidance??rt):T.type===`menubar`&&(U??=T.context.orientation===`vertical`?`inline-end`:`bottom`,W??=`start`);let G=T.type===`context-menu`,ae=S({anchor:re,floatingRootContext:E,positionMethod:w?`fixed`:r,mounted:O,side:U,sideOffset:B,align:W,alignOffset:ie,arrowPadding:G?0:m,collisionBoundary:f,collisionPadding:p,sticky:h,nodeId:I,keepMounted:C,disableAnchorTracking:g,collisionAvoidance:H,shift:G?{crossAxis:!(`side`in H&&H.side===`flip`),rootBoundary:`layoutViewport`}:void 0,externalTree:D,adaptiveOrigin:te});Q.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===I&&b.set(`hoverEnabled`,!1),e.nodeId!==I&&e.parentNodeId===b.select(`floatingParentNodeId`)&&b.setOpen(!1,X(He)))}return D.events.on(`menuopenchange`,e),()=>{D.events.off(`menuopenchange`,e)}},[b,D.events,I]),Q.useEffect(()=>{if(b.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==b.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;b.setOpen(!1,X(t))}return D.events.on(`menuopenchange`,e),()=>{D.events.off(`menuopenchange`,e)}},[D.events,b]);let q=K();Q.useEffect(()=>{k||q.clear()},[k,q]),Q.useEffect(()=>{function e(e){if(k&&e.nodeId===b.select(`floatingParentNodeId`)){if(e.target&&M&&M!==e.target){let e=b.select(`closeDelay`);e>0?q.isStarted()||q.start(e,()=>{b.setOpen(!1,X(He))}):b.setOpen(!1,X(He))}else q.clear()}}return D.events.on(`itemhover`,e),()=>{D.events.off(`itemhover`,e)}},[D.events,k,M,b,q]),Q.useEffect(()=>{let e={open:k,nodeId:I,parentNodeId:ne,reason:b.select(`lastOpenChangeReason`)};D.events.emit(`menuopenchange`,e)},[D.events,k,b,I,ne]),x(()=>{let e=L,t=R.current;if(e&&(R.current=e),t&&e&&e!==t){b.set(`instantType`,void 0);let e=new AbortController;return z(()=>{b.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[L,z,b]);let oe={open:k,side:ae.side,align:ae.align,anchorHidden:ae.anchorHidden,nested:T.type===`menu`,instant:ee},se=T.type===`menubar`&&T.context.modal;cn(k&&(se||A&&F!==`trigger-hover`),j===`touch`,P,M);let J=s(e,oe,{styles:ae.positionerStyles,transitionStatus:N,props:y,refs:[t,b.useStateSetter(`positionerElement`)],hidden:!O,inert:!k}),ce=O&&T.type!==`menu`&&(T.type!==`menubar`&&A&&F!==`trigger-hover`||T.type===`menubar`&&T.context.modal),Y=null;return T.type===`menubar`?Y=T.context.contentElement:T.type===void 0&&(Y=M),(0,$.jsxs)(Ct.Provider,{value:ae,children:[ce&&(0,$.jsx)(Te,{ref:T.type===`context-menu`||T.type===`nested-context-menu`?T.context.internalBackdropRef:null,inert:ot(!k),cutout:Y}),(0,$.jsx)(De,{id:I,children:(0,$.jsx)($t,{elementsRef:b.context.itemDomElements,labelsRef:b.context.itemLabels,children:J})})]})}),un=Q.createContext(void 0);function dn(){let e=Q.useContext(un);if(e===void 0)throw Error(J(34));return e}var fn=Q.memo(Q.forwardRef(function(e,t){let{render:n,className:r,value:i,defaultValue:a,onValueChange:o,disabled:s=!1,style:c,"aria-labelledby":l,...u}=e,[d,f]=Q.useState(void 0),[p,m]=Ne({controlled:i,default:a,name:`MenuRadioGroup`}),h=Z((e,t)=>{o?.(e,t),!t.isCanceled&&m(e)}),g=W(`div`,e,{state:{disabled:s},ref:t,props:{role:`group`,"aria-labelledby":l??d,"aria-disabled":s||void 0,...u}}),_=Q.useMemo(()=>({value:p,setValue:h,disabled:s}),[p,h,s]);return(0,$.jsx)(Ht.Provider,{value:f,children:(0,$.jsx)(un.Provider,{value:_,children:g})})})),pn=Q.createContext(void 0);function mn(){let e=Q.useContext(pn);if(e===void 0)throw Error(J(35));return e}var hn=Q.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!1,value:l,style:u,...d}=e,f=It({guess:!0,label:a}),p=wt(!0),m=se(i),{store:h}=Et(),g=h.useState(`isActive`,f.index),_=h.useState(`itemProps`),{value:v,setValue:y,disabled:b}=dn(),x=h.useState(`disabled`),S=s||b||x,C=v===l,{getItemProps:w,itemRef:T}=Nt({closeOnClick:c,disabled:S,highlighted:g,id:m,store:h,nativeButton:o,nodeId:p?.context.nodeId,itemMetadata:Mt}),E=Q.useMemo(()=>({disabled:S,highlighted:g,checked:C}),[S,g,C]);function O(e){let t=X(Be,e.nativeEvent,void 0,{preventUnmountOnClose:D});y(l,t)}let k=W(`div`,e,{state:E,stateAttributesMapping:zt,props:[_,{role:`menuitemradio`,"aria-checked":C,onClick:O},d,w],ref:[T,t,f.ref]});return(0,$.jsx)(pn.Provider,{value:E,children:k})}),gn=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=mn(),c=Q.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=Le(s.checked);Ye({batch:!0,enabled:!s.checked,open:s.checked,ref:c,onComplete(){s.checked||d(!1)}});let f={checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l};return W(`span`,e,{state:f,stateAttributesMapping:zt,ref:[t,c],props:{"aria-hidden":!0,...o},enabled:a||u})}),_n=Q.createContext(null);function vn(e){let t=Q.useContext(_n);if(t===null&&!e)throw Error(J(5));return t}var yn={...pe,disabled:e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0),openMethod:e=>e.openMethod,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId,activeIndex:e=>e.activeIndex,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)}},bn=class extends we{constructor(e,t,n=!1){let r=new z,i=Sn(r,t,n,e);super(i,xn(r),yn),this.unsubscribeParentListener=this.observe(`parent`,e=>{if(this.unsubscribeParentListener?.(),e.type===`menu`){let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);this.unsubscribeParentListener=e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);(t!==i||n!==a||r!==o)&&(t=i,n=a,r=o,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}unsubscribeParentListener=null};function xn(e){return{positionerRef:Q.createRef(),popupRef:Q.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:Q.createRef(),beforeContentFocusGuardRef:Q.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function Sn(e,t,n=!1,r){return{...Y(e,t,n),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new it,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Ke,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}var Cn=Q.createContext(void 0);function wn(){return Q.useContext(Cn)}var Tn=de(function(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:a,defaultOpen:o=!1,disabled:s=!1,modal:c,loopFocus:l=!0,orientation:u=`vertical`,actionsRef:d,closeParentOnEsc:f=!1,handle:p,triggerId:m,defaultTriggerId:h=null,highlightItemOnHover:g=!0}=e,v=Ot(!0),y=Et(!0),b=vn(!0),S=wn(),C=Q.useMemo(()=>S&&y?{type:`menu`,store:y.store}:b?{type:`menubar`,context:b}:v&&!y?{type:`context-menu`,context:v}:{type:void 0},[v,y,b,S]),w=ne(),T=ne(),E=at(),D=C.type===`menu`?C.store:void 0,O=(n??o)&&D?.state.transitionStatus===`starting`,k=me(()=>O?D?.state.instantType:void 0).current,j=En({open:o,openProp:n,activeTriggerId:h,triggerIdProp:m,parent:C,disabled:s,highlightItemOnHover:g,modal:C.type===void 0?c:void 0,rootId:w,instantType:k},T,E!=null);j.useControlledProp(`openProp`,n),j.useControlledProp(`triggerIdProp`,m),j.useContextCallback(`onOpenChangeComplete`,a);let M=j.useState(`floatingTreeRoot`),N=et(M),P=j.useState(`open`),ee=j.useState(`activeTriggerElement`),te=j.useState(`positionerElement`),F=j.useState(`hoverEnabled`),I=j.useState(`disabled`),L=j.useState(`lastOpenChangeReason`),R=j.useState(`parent`),z=j.useState(`activeIndex`),re=j.useState(`payload`),B=j.useState(`floatingParentNodeId`),ie=Q.useRef(null),V=Q.useRef(R.type!==`context-menu`),H=K(),U=Q.useRef(!0),W=K(),ae=B!=null,{openMethod:q,triggerProps:oe}=St(P);j.useSyncedValues({disabled:s,highlightItemOnHover:g,modal:R.type===void 0?c:void 0,openMethod:q,rootId:w}),Je(j);let{forceUnmount:se,transitionStatus:J}=Ae(P,j,()=>{j.set(`allowMouseEnter`,!1)},O),ce=ye(j.context.popupRef);Q.useEffect(()=>{if(k===void 0)return;let e=()=>{j.state.instantType===k&&j.set(`instantType`,void 0)};if(!P){e();return}if(J!==void 0)return;if(j.context.popupRef.current==null){e();return}let t=new AbortController;return ce(e,t.signal),()=>{t.abort()}},[k,P,J,ce,j]),x(()=>{v&&!y?j.update({parent:{type:`context-menu`,context:v},floatingNodeId:N,floatingParentNodeId:E}):y&&j.update({floatingNodeId:N,floatingParentNodeId:E})},[v,y,N,E,j]),Q.useEffect(()=>{if(P||(ie.current=null),R.type===`context-menu`){if(!P){H.clear(),V.current=!1;return}H.start(500,()=>{V.current=!0})}},[H,P,R.type]),x(()=>{!P&&!F&&j.set(`hoverEnabled`,!0)},[P,F,j]);let Y=Z((e,t)=>{let n=t.reason;if(!e&&!j.select(`open`)||P===e&&t.trigger===ee&&L===n)return;let i=Ze(t);if(!e&&t.trigger==null&&(t.trigger=ee??void 0),r?.(e,t),t.isCanceled)return;j.state.floatingRootContext.dispatchOpenChange(e,t);let a=t.event;if(e===!1&&a?.type===`click`&&a.pointerType===`touch`&&!U.current)return;e&&n===`trigger-focus`?(U.current=!1,W.start(300,()=>{U.current=!0})):(U.current=!0,W.clear());let o=(n===`trigger-press`||n===`item-press`)&&a.detail===0,s=!e&&(n===`escape-key`||n==null);ie.current=t.event;let c=Ve(j.state,e,t.trigger,i());c.openChangeReason=n,c.instantType=R.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?`group`:o||s?o?`click`:`dismiss`:void 0,j.update(c)}),le=Qe({popupStore:j,floatingRootContext:j.state.floatingRootContext,floatingId:T,nested:E!=null,onOpenChange:Y}),ue=le.context.events;x(()=>{let e=({open:e,eventDetails:t})=>Y(e,t);return ue.on(`setOpen`,e),()=>{ue?.off(`setOpen`,e)}},[ue,Y]);let de=Q.useCallback(()=>{j.setOpen(!1,X(Xe))},[j]);Q.useImperativeHandle(d,()=>({unmount:se,close:de}),[se,de]);let fe;R.type===`context-menu`&&(fe=R.context),Q.useImperativeHandle(fe?.positionerRef,()=>te,[te]),Q.useImperativeHandle(fe?.actionsRef,()=>({setOpen:Y}),[Y]);let pe=ze(le,{enabled:!I,bubbles:{escapeKey:f&&R.type===`menu`},outsidePress(){return R.type!==`context-menu`||ie.current?.type===`contextmenu`||V.current},externalTree:ae?M:void 0}),_e=G(),ve=Q.useCallback(e=>{j.select(`activeIndex`)!==e&&j.set(`activeIndex`,e)},[j]),be=_t(le,{enabled:!I,listRef:j.context.itemDomElements,activeIndex:z,nested:R.type!==void 0,loopFocus:l,orientation:u,parentOrientation:R.type===`menubar`?R.context.orientation:void 0,rtl:_e===`rtl`,disabledIndices:A,onNavigate:ve,openOnArrowKeyDown:R.type!==`context-menu`,externalTree:ae?M:void 0,focusItemOnHover:g}),xe=Q.useCallback(e=>{j.context.typingRef.current=e},[j]),Ce=vt(le,{enabled:!I,listRef:j.context.itemLabels,elementsRef:j.context.itemDomElements,activeIndex:z,resetMs:500,onMatch:e=>{P&&e!==z&&j.set(`activeIndex`,e)},onTyping:xe}),we=Q.useMemo(()=>{let e=_(Ce.reference,be.reference,pe.reference,{onMouseMove(){j.set(`allowMouseEnter`,!0)}},oe);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=P,e},[j,Ce.reference,be.reference,pe.reference,oe,P]),Te=Q.useMemo(()=>{let e=_(be.trigger,pe.trigger,oe);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[be.trigger,pe.trigger,oe]);me(()=>(j.update({inactiveTriggerProps:Te}),null));let Ee=Q.useMemo(()=>_(i,{id:T,role:`menu`,"aria-orientation":u===`horizontal`?`horizontal`:void 0,"aria-labelledby":ee?.id,onMouseMove(){j.set(`allowMouseEnter`,!0),R.type===`menu`&&j.set(`hoverEnabled`,!1)},onClick(){j.select(`hoverEnabled`)&&j.set(`hoverEnabled`,!1)},onKeyDown(e){let t=j.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},Ce.floating,be.floating,pe.floating),[ee,T,u,R.type,j,Ce.floating,be.floating,pe.floating]),De=be.item??Ke;ge(j,{floatingRootContext:le,activeTriggerProps:we,inactiveTriggerProps:Te,popupProps:Ee,itemProps:De});let Oe=Q.useMemo(()=>({store:j,parent:C}),[j,C]),ke=(0,$.jsxs)(Tt.Provider,{value:Oe,children:[p&&(0,$.jsx)(Se,{handle:p,store:j}),typeof t==`function`?t({payload:re}):t]});return R.type===void 0||R.type===`context-menu`?(0,$.jsx)(he,{externalTree:M,children:ke}):ke});function En(e,t,n){return me(()=>new bn(e,t,n)).current}var Dn=5;function On(e,t){let n=kn(t);return e.clientX>=n.left-Dn&&e.clientX<=n.right+Dn&&e.clientY>=n.top-Dn&&e.clientY<=n.bottom+Dn}function kn(e){let t=e.getBoundingClientRect(),n=je(e);if(st)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}function An(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=tt(),{ref:i,index:a}=It(e),o=n===a,s=Q.useRef(null),c=fe(i,s);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}},compositeRef:c,index:a}}function jn(e){let{render:t,className:n,style:r,state:i=Ke,props:a=A,refs:o=A,metadata:s,stateAttributesMapping:c,tag:l=`div`,...u}=e,{compositeProps:d,compositeRef:f}=An({metadata:s});return W(l,e,{state:i,ref:[f,...o],props:[d,...a,u],stateAttributesMapping:c})}function Mn(e){if(ee(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`);if(!L(e))return Mn(a(e))}var Nn=e(t(),1);function Pn(e,t){let n=Q.useRef(null);function r(t){Nn.flushSync(()=>{e.setOpen(!1,X(xe,t.nativeEvent,t.currentTarget))}),P(n.current)?.focus()}function i(n){let r=e.select(`positionerElement`);if(r&&te(n,r))e.context.beforeContentFocusGuardRef.current?.focus();else{Nn.flushSync(()=>{e.setOpen(!1,X(xe,n.nativeEvent,n.currentTarget))});let i=Me(e.context.triggerFocusTargetRef.current||t.current);for(;i!==null&&F(r,i);){let e=i;if(i=o(i),i===e)break}i?.focus()}}return{preFocusGuardRef:n,handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function Fn(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=Q.useRef(!1);return Q.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,ce(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:Ke,[t,n,r])}var In=le(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,openOnHover:c,delay:l=100,closeDelay:u=0,handle:d,payload:f,...p}=e,m=Et(!0),h=ue(d)??m?.store;if(!h)throw Error(J(85));let g=se(s),v=h.useState(`isTriggerActive`,g),y=h.useState(`floatingRootContext`),x=h.useState(`isOpenedByTrigger`,g),S=h.useState(`triggerPopupId`,g),C=Q.useRef(null),w=Rn(),T=tt(!0),D=ve(),O=Q.useMemo(()=>D??new it,[D]),A=et(O),j=at(),{registerTrigger:M,isMountedByThisTrigger:N}=Ue(g,C,h,{payload:f,closeDelay:u,parent:w,floatingTreeRoot:O,floatingNodeId:A,floatingParentNodeId:j,keyboardEventRelay:T?.relayKeyboardEvent}),P=w.type===`menubar`,ee=h.useState(`disabled`),te=a||ee||P&&w.context.disabled,{getButtonProps:I,buttonRef:ne}=V({disabled:te,native:o});Q.useEffect(()=>{!x&&w.type===void 0&&(h.context.allowMouseUpTriggerRef.current=!1)},[h,x,w.type]);let L=Q.useRef(null),R=K(),z=Z(e=>{if(!L.current)return;R.clear(),h.context.allowMouseUpTriggerRef.current=!1;let t=e.target;F(L.current,t)||F(h.select(`positionerElement`),t)||t===L.current||(t==null||Mn(t)!==h.select(`rootId`))&&(On(e,L.current)||O.events.emit(`close`,{domEvent:e,reason:re}))});Q.useEffect(()=>{x&&h.select(`lastOpenChangeReason`)===`trigger-hover`&&ce(L.current).addEventListener(`mouseup`,z,{once:!0})},[x,z,h]);let B=P&&w.context.hasSubmenuOpen,ie=k(y,{enabled:(c??B)&&!te&&(!P||B&&!N),handleClose:b({blockPointerEvents:!P}),mouseOnly:!0,move:!1,restMs:w.type===void 0?l:void 0,delay:{close:u},triggerElementRef:C,externalTree:O,isActiveTrigger:v,isClosing:()=>h.select(`transitionStatus`)===`ending`}),H=Ln(x,h.select(`lastOpenChangeReason`)),U=lt(y,{enabled:!te,event:x&&P?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:w.type===void 0&&H}),G=E(y,{enabled:!te&&B}),ae=Fn({open:x,enabled:P,mouseDownAction:`open`}),q=Q.useMemo(()=>_(G.reference,U.reference),[G.reference,U.reference]),Y=h.useState(`triggerProps`,N),{preFocusGuardRef:le,handlePreFocusGuardFocus:de,handleFocusTargetFocus:fe}=Pn(h,C),pe={disabled:te,open:x},me=[L,t,ne,M,C],X=[q,ie??Ke,Y,{"aria-haspopup":`menu`,"aria-controls":S,id:g,onMouseDown:e=>{h.select(`open`)||(R.start(200,()=>{h.context.allowMouseUpTriggerRef.current=!0}),ce(e.currentTarget).addEventListener(`mouseup`,z,{once:!0}))}},P?{role:`menuitem`}:{},ae,p,I],he=W(`button`,e,{enabled:!P,stateAttributesMapping:Ee,state:pe,ref:me,props:X});return P?(0,$.jsx)(jn,{tag:`button`,render:n,className:r,style:i,state:pe,refs:me,props:X,stateAttributesMapping:Ee}):x?(0,$.jsxs)(Q.Fragment,{children:[(0,$.jsx)(oe,{ref:le,onFocus:de},`${g}-pre-focus-guard`),(0,$.jsx)(Q.Fragment,{children:he},g),(0,$.jsx)(oe,{ref:h.context.triggerFocusTargetRef,onFocus:fe},`${g}-post-focus-guard`)]}):(0,$.jsx)(Q.Fragment,{children:he},g)});function Ln(e,t){let n=K(),[r,i]=Q.useState(!1);return x(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function Rn(){let e=vn(!0);return Q.useMemo(()=>e?{type:`menubar`,context:e}:{type:void 0},[e])}function zn({...e}){return(0,$.jsx)(Tn,{"data-slot":`dropdown-menu`,...e})}function Bn({...e}){return(0,$.jsx)(In,{"data-slot":`dropdown-menu-trigger`,...e})}function Vn({align:e=`start`,alignOffset:t=0,side:n=`bottom`,sideOffset:r=4,className:i,...a}){return(0,$.jsx)(Qt,{children:(0,$.jsx)(ln,{className:`isolate z-50 outline-none`,align:e,alignOffset:t,side:n,sideOffset:r,children:(0,$.jsx)(Yt,{"data-slot":`dropdown-menu-content`,className:g(`cn-menu-target cn-menu-translucent z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95`,i),...a})})})}function Hn({...e}){return(0,$.jsx)(Wt,{"data-slot":`dropdown-menu-group`,...e})}function Un({className:e,inset:t,...n}){return(0,$.jsx)(Gt,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:g(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7`,e),...n})}function Wn({className:e,inset:t,variant:n=`default`,...r}){return(0,$.jsx)(Kt,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:g(`group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive`,e),...r})}function Gn({className:e,children:t,checked:n,inset:r,...i}){return(0,$.jsxs)(Bt,{"data-slot":`dropdown-menu-checkbox-item`,"data-inset":r,className:g(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),checked:n,...i,children:[(0,$.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`,"data-slot":`dropdown-menu-checkbox-item-indicator`,children:(0,$.jsx)(Vt,{children:(0,$.jsx)(m,{icon:I,size:16,color:`currentColor`,strokeWidth:1.5})})}),t]})}function Kn({...e}){return(0,$.jsx)(fn,{"data-slot":`dropdown-menu-radio-group`,...e})}function qn({className:e,children:t,inset:n,...r}){return(0,$.jsxs)(hn,{"data-slot":`dropdown-menu-radio-item`,"data-inset":n,className:g(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[(0,$.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`,"data-slot":`dropdown-menu-radio-item-indicator`,children:(0,$.jsx)(gn,{children:(0,$.jsx)(m,{icon:I,size:16,color:`currentColor`,strokeWidth:1.5})})}),t]})}function Jn({className:e,...t}){return(0,$.jsx)(yt,{"data-slot":`dropdown-menu-separator`,className:g(`-mx-1 my-1 h-px bg-border`,e),...t})}function Yn({className:e,...t}){return(0,$.jsx)(`span`,{"data-slot":`dropdown-menu-shortcut`,className:g(`ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground`,e),...t})}export{St as _,Wn as a,_t as b,qn as c,Bn as d,On as f,It as g,Jt as h,Hn as i,Jn as l,$t as m,Gn as n,Un as o,cn as p,Vn as r,Kn as s,zn as t,Yn as u,yt as v,lt as x,vt as y};
@@ -0,0 +1,9 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{r as t}from"./react-dom-Ddte4I-Q.js";import{A as n}from"./xyflow-yApv7D4e.js";import{$ as r,A as i,B as a,C as o,E as s,F as c,G as l,J as u,M as d,N as f,O as p,P as m,Q as h,S as g,U as _,V as v,W as y,X as b,Y as x,Z as S,_ as C,at as w,b as T,d as E,et as D,f as O,g as k,h as A,it as j,j as ee,k as te,m as ne,nt as M,ot as re,p as ie,rt as ae,tt as oe,u as se,v as N,w as ce,x as P,y as F}from"./index-vTuwmeQz.js";var le=[[`path`,{d:`M15 6C15 6 9.00001 10.4189 9 12C8.99999 13.5812 15 18 15 18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],ue=[[`path`,{d:`M9.00005 6C9.00005 6 15 10.4189 15 12C15 13.5812 9 18 9 18`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}]],de=[[`path`,{d:`M8 5.5L20 5.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8 12.5L20 12.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M8 19.5L20 19.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M4.375 5.5H4.25M4.5 5.5C4.5 5.63807 4.38807 5.75 4.25 5.75C4.11193 5.75 4 5.63807 4 5.5C4 5.36193 4.11193 5.25 4.25 5.25C4.38807 5.25 4.5 5.36193 4.5 5.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M4.375 12.5H4.25M4.5 12.5C4.5 12.6381 4.38807 12.75 4.25 12.75C4.11193 12.75 4 12.6381 4 12.5C4 12.3619 4.11193 12.25 4.25 12.25C4.38807 12.25 4.5 12.3619 4.5 12.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M4.375 19.5H4.25M4.5 19.5C4.5 19.6381 4.38807 19.75 4.25 19.75C4.11193 19.75 4 19.6381 4 19.5C4 19.3619 4.11193 19.25 4.25 19.25C4.38807 19.25 4.5 19.3619 4.5 19.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`5`}]],fe=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e};function pe(e,t){return x(e)?e[fe(0,e.length,t)]:e}var me=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return I(this.animations,`duration`)}get iterationDuration(){return I(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}};function I(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var he=class extends me{then(e,t){return this.finished.finally(e).then(()=>{})}},L=[];function ge(e){D(typeof e.test==`function`&&typeof e.read==`function`,`Effects passed to animate.addEffect() need test() and read().`,`effect-missing-test`),R(e),L.unshift(e)}function R(e){M(L,e)}function _e(e){return L.find(t=>t.test(e))}function z(e,t,n={},r){let i=[],{velocity:a}=n,s=n.reduceMotion??r?.shouldReduceMotion;for(let c in t){if(c===`transition`||c===`transitionEnd`)continue;let l=t[c];if(l===void 0)continue;let d=e(c),f=d.get();if(f!==void 0&&!d.isAnimating()&&!Array.isArray(l)&&l===f&&!a){u.update(()=>d.set(l));continue}d.start(ce(c,d,l,s&&o.has(c)?{type:!1}:n,r)),d.animation&&i.push(d.animation)}let{transitionEnd:c}=t;if(c){let t=()=>u.update(()=>{for(let t in c)e(t).set(c[t])});i.length?Promise.all(i).then(t):t()}return i}function ve(e,t,n,r,i){return z(r=>{let a=e.get(t,r);if(!a){let o;if(!i){let i=n[r];o=ye(i)??e.read(t,r,i),D(o!==void 0,`"${r}" can't be read from the animated subject. Provide [from, to] keyframes.`,`effect-unreadable-value`)}a=p(o,{owner:i}),e(t,{[r]:a})}return a},n,r,i)}function ye(e){let t=Array.isArray(e)?e[0]:void 0;return t===null?void 0:t}var be=class{constructor(e=u.render){this.step=e,this.values=new Map,this.pending=[],this.numPending=0,this.flush=()=>{let{pending:e,numPending:t}=this;this.numPending=0;for(let n=0;n<t;n++)e[n]()}}set(e,t,n,r){if(this.values.get(e)?.onRemove(),r)for(let e of this.values.values())e.value===r&&(n=e.render);let i=()=>n&&this.schedule(n);t.get()!==void 0&&i();let a=t.on(`change`,i),o=()=>{a(),n&&!r&&this.cancel(n),this.values.delete(e)};return this.values.set(e,{value:t,render:r?void 0:n,onRemove:o}),o}get(e){return this.values.get(e)?.value}release(){let e=new Map;return this.values.forEach((t,n)=>{e.set(n,t.value),t.onRemove()}),this.transformKeys=this.transformValues=void 0,e}schedule(e){let{pending:t,numPending:n}=this;for(let r=0;r<n;r++)if(t[r]===e)return;n||this.step(this.flush),t[this.numPending++]=e}cancel(e){let{pending:t}=this;for(let n=0;n<this.numPending;n++)if(t[n]===e){t[n]=t[--this.numPending];return}}};function B(e,{step:t,...n}={}){let r=new WeakMap;return Object.assign((n,i)=>{let a=r.get(n)??new be(t);r.set(n,a);let o=[];for(let t in i){let r=i[t],s=e(n,a,t,r);o.push(s)}return()=>{for(let e of o)e()}},n,{get:(e,t)=>r.get(e)?.get(t),flush:e=>r.get(e)?.flush(),state:e=>r.get(e)})}var xe={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Se={};function Ce(e){let t=``,{transformKeys:n=[],transformValues:r={}}=e;for(let e=0;e<n.length;e++){let i=n[e],a=r[i].get();a!==void 0&&(typeof a==`number`?a:parseFloat(a))!==+!!i.startsWith(`scale`)&&(t+=(t&&` `)+(Se[i]||(Se[i]=(xe[i]||i)+`(`))+C(a,c[i])+`)`)}let i=e.get(`pathRotation`)?.get();return i&&(t+=(t&&` `)+`rotate(`+C(i,c.pathRotation)+`)`),t||`none`}var we=new Set([`originX`,`originY`,`originZ`]),V=(e,t)=>C(e.get(t)?.get(),m[t]),H=(e,t,n,r)=>{let a,o;if(d.has(n)){if(n!==`pathRotation`){let e=t.transformKeys??=[];(t.transformValues??={})[n]=r,e.includes(n)||(e.push(n),e.sort((e,t)=>ee.indexOf(e)-ee.indexOf(t)))}t.get(`transform`)||(!F(e)&&!t.get(`transformBox`)&&H(e,t,`transformBox`,new s(`fill-box`)),t.set(`transform`,new s(`none`),()=>{e.style.transform=Ce(t)})),o=t.get(`transform`)}else we.has(n)?(t.get(`transformOrigin`)||t.set(`transformOrigin`,new s(``),()=>{let n=V(t,`originX`)??`50%`,r=V(t,`originY`)??`50%`,i=V(t,`originZ`)??0;e.style.transformOrigin=`${n} ${r} ${i}`}),o=t.get(`transformOrigin`)):a=i(n)?()=>{e.style.setProperty(n,r.get())}:()=>{e.style[n]=C(r.get(),m[n])};return t.set(n,r,a,o)},Te=e=>F(e)||N(e),U=(e,t)=>{if(d.has(t))return f(e,t);let n=getComputedStyle(e),r=i(t)?n.getPropertyValue(t):n[t];return typeof r==`string`&&r.trim()||0},Ee=B(H,{test:Te,read:U});function De(e,t){if(!(t in e))return!1;let n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),t)||Object.getOwnPropertyDescriptor(e,t);return n&&typeof n.set==`function`}var W=(e,t,n,r,i=n)=>{let a=De(e,i);!a&&(i.startsWith(`data`)||i.startsWith(`aria`))&&(i=P(i));let o=m[n]||m[i],s=a?()=>{e[i]=C(r.get(),m[n])}:()=>{let t=C(r.get(),o);t==null?e.removeAttribute(i):e.setAttribute(i,String(t))};return t.set(n,r,s)};function Oe(e,t,n,r){return u.render(()=>e.setAttribute(`pathLength`,`1`)),n===`pathOffset`?t.set(n,r,()=>{let t=r.get();e.setAttribute(`stroke-dashoffset`,`${-t}`)}):(t.get(`stroke-dasharray`)||t.set(`stroke-dasharray`,new s(`1 1`),()=>{let n=t.get(`pathLength`)?.get()??1,r=t.get(`pathSpacing`)?.get();e.setAttribute(`stroke-dasharray`,`${n} ${r??1-Number(n)}`)}),t.set(n,r,void 0,t.get(`stroke-dasharray`)))}var ke=B((e,t,n,r)=>n.startsWith(`path`)?Oe(e,t,n,r):n.startsWith(`attr`)?W(e,t,n,r,G(n)):(i(n)||n in e.style?H:W)(e,t,n,r),{test:N,read:(e,t)=>d.has(t)?m[t]?.default||0:i(t)||A.includes(t)?U(e,t):(t=G(t),e.getAttribute(P(t))??e.getAttribute(t)??void 0)});function G(e){return e.replace(/^attr([A-Z])/,(e,t)=>t.toLowerCase())}var Ae={},je=e=>N(e)?ke:Ee,Me=class{constructor(e,t){this.effect=e,this.current=t,this.KeyframeResolver=T}getValue(e){return this.effect.get(this.current,e)}readValue(e,t){return this.effect.read(this.current,e,t)}render(){this.effect.flush(this.current)}measureViewportBox(){return ne(this.current)}getProps(){return Ae}};function Ne(e,t,n,r){if(r)return z(e=>r.getValue(e,null),t,n,r);let i=je(e);return ve(i,e,t,n,new Me(i,e))}var Pe=B((e,t,n,r)=>t.set(n,r,()=>{e[n]=r.get()}),{test:e=>r(e),read:(e,t)=>{let n=e[t];return typeof n==`string`||typeof n==`number`?n:void 0}}),K=n(),q=e(t(),1);function J(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Fe(...e){return t=>{let n=!1,r=e.map(e=>{let r=J(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():J(e[t],null)}}}}function Ie(...e){return q.useCallback(Fe(...e),e)}var Le=class extends q.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(F(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=F(e)&&e.offsetWidth||0,r=F(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function Re({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,q.useId)(),s=(0,q.useRef)(null),c=(0,q.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:l}=(0,q.useContext)(E),u=Ie(s,a===!1?void 0:e.props?.ref??e?.ref);return(0,q.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!u)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);l&&(y.nonce=l);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
2
+ [data-motion-pop-id="${o}"] {
3
+ position: absolute !important;
4
+ width: ${e}px !important;
5
+ height: ${u}px !important;
6
+ ${_}px !important;
7
+ ${v}px !important;
8
+ }
9
+ `),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,K.jsx)(Le,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:q.cloneElement(e,{ref:u})})}var ze=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=w(Be),d=(0,q.useId)(),f=(0,q.useRef)(n),p=(0,q.useRef)(r);j(()=>{f.current=n,p.current=r});let m=!0,h=(0,q.useMemo)(()=>(m=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>{u.delete(e),!f.current&&!u.size&&p.current?.()})}),[n,u,r]);return a&&m&&(h={...h}),(0,q.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),q.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,K.jsx)(Re,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,K.jsx)(ae.Provider,{value:h,children:e})};function Be(){return new Map}var Y=e=>e.key||``;function X(e){let t=[];return q.Children.forEach(e,e=>{(0,q.isValidElement)(e)&&t.push(e)}),t}var Ve=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=se(o),f=(0,q.useMemo)(()=>X(e),[e]),p=o&&!u?[]:f.map(Y),m=(0,q.useRef)(!0),h=(0,q.useRef)(f),g=w(()=>new Map),_=(0,q.useRef)(new Set),[v,y]=(0,q.useState)(f),[b,x]=(0,q.useState)(f);j(()=>{o&&!u&&!b.length&&d?.()},[u,o,b.length,d]),j(()=>{m.current=!1,h.current=f;for(let e=0;e<b.length;e++){let t=Y(b[e]);p.includes(t)?(g.delete(t),_.current.delete(t)):g.get(t)!==!0&&g.set(t,!1)}},[b,p.length,p.join(`-`)]);let S=[];if(f!==v){let e=[...f],t=0;for(let n of b){let r=p.indexOf(Y(n));r===-1?(e.splice(t++,0,n),S.push(n)):t=r+S.length+1}return a===`wait`&&S.length&&(e=S),x(X(e)),y(f),null}let{forceRender:C}=(0,q.useContext)(re);return(0,K.jsx)(K.Fragment,{children:b.map(e=>{let v=Y(e),y=o&&!u?!1:f===b||p.includes(v);return(0,K.jsx)(ze,{isPresent:y,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:y?void 0:()=>{if(_.current.has(v))return;if(g.has(v))_.current.add(v),g.set(v,!0);else return;let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(C?.(),x(h.current),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},v)})})};function Z(e){return typeof e==`object`&&!Array.isArray(e)}function He(e,t,n,r){return e==null?[]:typeof e==`string`&&Z(t)?k(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function Ue(e,t,n){return e*(t+1)+n*t}function We(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function Ge(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(M(e,i),r--)}}function Ke(e,t,n,r,i,a){Ge(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:l(i,a,r[o]),easing:pe(n,o)})}function qe(e,t,n=0){let r=t+1+t*n;for(let t=0;t<e.length;t++)e[t]=e[t]/r}function Je(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var Ye=`easeInOut`,Q=20;function Xe(e,{defaultTransition:t={},...n}={},r,i){let o=t.duration||.3,s=new Map,c=new Map,l={},u=new Map,d=0,f=0,p=0;for(let n=0;n<e.length;n++){let s=e[n];if(typeof s==`string`){u.set(s,f);continue}if(!Array.isArray(s)){u.set(s.name,We(f,s.at,d,u));continue}let[m,h,_={}]=s;_.at!==void 0&&(f=We(f,_.at,d,u));let x=0,C=(e,n,r,s=0,c=0)=>{let l=$e(e),{delay:u=0,times:d=a(l),type:m=t.type||`keyframes`,repeat:h,repeatType:g,repeatDelay:_=0,...C}=n,{ease:w=t.ease||`easeOut`,duration:T}=n,E=typeof u==`function`?u(s,c):u,D=l.length,O=te(m)?m:i?.[m||`keyframes`];if(D<=2&&O){let e=100;if(D===2&&nt(l)){let t=l[1]-l[0];e=Math.abs(t)}let n={...t,...C};T!==void 0&&(n.duration=S(T));let r=y(n,e,O);w=r.ease,T=r.duration}T??=o;let k=f+E;d.length===1&&d[0]===0&&(d[1]=1);let A=d.length-l.length;if(A>0&&v(d,A),l.length===1&&l.unshift(null),h&&oe(h<Q,`Sequence segments can't repeat ${h} times — ignoring repeat option. Use a value below ${Q} or apply repeat at the sequence level instead.`),h&&h<Q){let e=T>0?_/T:0;T=Ue(T,h,_);let t=[...l],n=[...d];w=Array.isArray(w)?[...w]:[w];let r=[...w],i=g===`reverse`||g===`mirror`,a=t,o=r;i&&(a=[...t].reverse(),g===`reverse`&&(o=[...r].reverse().map(e=>typeof e==`function`?b(e):e)));for(let s=0;s<h;s++){let c=i&&s%2==0,u=c?a:t,f=c?o:r,p=(s+1)*(1+e);e>0&&(l.push(l[l.length-1]),d.push(p),w.push(`linear`)),l.push(...u);for(let e=0;e<u.length;e++)d.push(n[e]+p),w.push(e===0?`linear`:pe(f,e-1))}qe(d,h,e)}let j=k+T;Ke(r,l,w,d,k,j),x=Math.max(E+T,x),p=Math.max(j,p)};if(g(m)){let e=Ze(m,c);C(h,_,Qe(`default`,e))}else{let e=He(m,h,r,l),t=e.length;for(let n=0;n<t;n++){h=h,_=_;let r=e[n],i=Ze(r,c);for(let e in h)C(h[e],et(_,e),Qe(e,i),n,t)}}d=f,f+=x}return c.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(Je);let o=[],c=[],l=[];for(let e=0;e<a.length;e++){let{at:t,value:n,easing:r}=a[e];o.push(n),c.push(h(0,p,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),o.unshift(o[0]),l.unshift(Ye)),c[c.length-1]!==1&&(c.push(1),o.push(null)),s.has(r)||s.set(r,{keyframes:{},transition:{}});let u=s.get(r);u.keyframes[i]=o;let{type:d,...f}=t;u.transition[i]={...f,duration:p,ease:l,times:c,...n}}}),s}function Ze(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Qe(e,t){return t[e]||(t[e]=[]),t[e]}function $e(e){return Array.isArray(e)?e:[e]}function et(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var tt=e=>typeof e==`number`,nt=e=>e.every(tt);function rt(e,t){return g(e)||typeof e==`number`||typeof e==`string`&&!Z(t)}function $(e,t,n,r){let i=[];if(rt(e,t))i.push(O(e,Z(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=He(e,t,r),o=a.length;D(!!o,`No valid elements provided.`,`no-valid-elements`);for(let e=0;e<o;e++){let r=a[e],s={...n};`delay`in s&&typeof s.delay==`function`&&(s.delay=s.delay(e,o)),r instanceof Element?i.push(...Ne(r,t,s,ie.get(r))):i.push(...ve(_e(r)??Pe,r,t,s))}}return i}function it(e,t,n){let r=[];return Xe(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=p(0);return n.on(`change`,t),e.length===1?[n,[0,1]]:e.length===2?[n,[0,1],e[1]]:[n,e[1],e[2]]}return e}),t,n,{spring:_}).forEach(({keyframes:e,transition:t},n)=>{r.push(...$(n,e,t))}),r}function at(e){return Array.isArray(e)&&e.some(Array.isArray)}function ot(e={}){let{scope:t,reduceMotion:n,skipAnimations:r}=e;function i(e,i,a){let o=[],s,c={};if(n!==void 0&&(c.reduceMotion=n),r!==void 0&&(c.skipAnimations=r),at(e)){let{onComplete:n,...r}=i||{};typeof n==`function`&&(s=n),o=it(e,{...c,...r},t)}else{let{onComplete:n,...r}=a||{};typeof n==`function`&&(s=n),o=$(e,i,{...c,...r},t)}let l=new he(o);return s&&l.finished.then(s),t&&(t.animations.push(l),l.finished.then(()=>{M(t.animations,l)})),l}return i}var st=Object.assign(ot(),{addEffect:ge,removeEffect:R}),ct=[{tone:`fast`,belowMs:10},{tone:`good`,belowMs:50},{tone:`ok`,belowMs:100},{tone:`elevated`,belowMs:250},{tone:`warn`,belowMs:500},{tone:`slow`,belowMs:1e3},{tone:`bad`,belowMs:5e3}];function lt(e){if(!Number.isFinite(e)||e<0)return`fast`;for(let t of ct)if(e<t.belowMs)return t.tone;return`critical`}function ut(e){switch(e){case`fast`:return`text-emerald-500 dark:text-emerald-400`;case`good`:return`text-emerald-600 dark:text-emerald-300`;case`ok`:return`text-lime-600 dark:text-lime-400`;case`elevated`:return`text-yellow-600 dark:text-yellow-400`;case`warn`:return`text-amber-600 dark:text-amber-400`;case`slow`:return`text-orange-600 dark:text-orange-400`;case`bad`:return`text-destructive`;case`critical`:return`text-rose-700 dark:text-rose-400`}}function dt(e){return ut(lt(e))}export{Ve as a,le as c,st as i,lt as n,de as o,ut as r,ue as s,dt as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{r as t}from"./react-dom-Ddte4I-Q.js";import{A as n}from"./xyflow-yApv7D4e.js";import{Dr as r,E as i,Er as a,F as o,I as s,R as c,T as l,cr as u,gr as d,t as f}from"./shortcut-keys-CUNegEV4.js";var p=[[`path`,{d:`M13.427 8.08396C12.8007 5.84272 12.3226 4 11.0004 4C9.67824 4 9.19964 5.84274 8.5731 8.08399C8.31853 8.99465 8.19125 9.44998 7.82042 9.82077C7.4496 10.1916 6.99434 10.3188 6.08381 10.5732C3.84273 11.1995 2 11.6775 2 13C2 14.3225 3.84273 14.8005 6.08381 15.4268C6.99434 15.6812 7.4496 15.8084 7.82042 16.1792C8.19125 16.55 8.31853 17.0054 8.5731 17.916C9.19964 20.1573 9.67824 22 11.0004 22C12.3226 22 12.8007 20.1573 13.427 17.916C13.6815 17.0054 13.8087 16.5501 14.1795 16.1793C14.5504 15.8085 15.0056 15.6812 15.9162 15.4268C18.1573 14.8005 20 14.3225 20 13C20 11.6775 18.1573 11.1995 15.9162 10.5732C15.0056 10.3188 14.5504 10.1915 14.1795 9.8207C13.8087 9.44986 13.6815 8.99456 13.427 8.08396Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M19.5 2.9375V4.5M19.5 4.5V6.0625M19.5 4.5H18.25M19.5 4.5H20.75M22 4.5L21.548 4.34934C20.8497 4.11658 20.5006 4.00019 20.2502 3.74981C19.9998 3.49942 19.8834 3.15027 19.6507 2.45198L19.5 2L19.3493 2.45198C19.1166 3.15027 19.0002 3.49942 18.7498 3.74981C18.4994 4.00019 18.1503 4.11658 17.452 4.34934L17 4.5L17.452 4.65066C18.1503 4.88342 18.4994 4.99981 18.7498 5.25019C19.0002 5.50058 19.1166 5.84973 19.3493 6.54802L19.5 7L19.6507 6.54802C19.8834 5.84973 19.9998 5.50058 20.2502 5.25019C20.5006 4.99981 20.8497 4.88342 21.548 4.65066L22 4.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],m=[[`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M12 8V12L14 14`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],h=[[`path`,{d:`M7.5 14.5C7.5 11.2002 7.5 9.55025 8.52513 8.52513C9.55025 7.5 11.2002 7.5 14.5 7.5C17.7998 7.5 19.4497 7.5 20.4749 8.52513C21.5 9.55025 21.5 11.2002 21.5 14.5C21.5 17.7998 21.5 19.4497 20.4749 20.4749C19.4497 21.5 17.7998 21.5 14.5 21.5C11.2002 21.5 9.55025 21.5 8.52513 20.4749C7.5 19.4497 7.5 17.7998 7.5 14.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7.5 16.5C6.10355 16.5 5.40533 16.5 4.84402 16.3036C3.83866 15.9518 3.0482 15.1613 2.69641 14.156C2.5 13.5947 2.5 12.8964 2.5 11.5V9.5C2.5 6.20017 2.5 4.55025 3.52513 3.52513C4.55025 2.5 6.20017 2.5 9.5 2.5H11.5C12.8964 2.5 13.5947 2.5 14.156 2.69641C15.1613 3.0482 15.9518 3.83866 16.3036 4.84402C16.5 5.40533 16.5 6.10355 16.5 7.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],g=[[`path`,{d:`M3 12C3 7.75736 3 5.63604 4.31802 4.31802C5.63604 3 7.75736 3 12 3C16.2426 3 18.364 3 19.682 4.31802C21 5.63604 21 7.75736 21 12C21 16.2426 21 18.364 19.682 19.682C18.364 21 16.2426 21 12 21C7.75736 21 5.63604 21 4.31802 19.682C3 18.364 3 16.2426 3 12Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M3 12H21`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M11 7.5L17 7.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M7.125 7.5H7M7.25 7.5C7.25 7.63807 7.13807 7.75 7 7.75C6.86193 7.75 6.75 7.63807 6.75 7.5C6.75 7.36193 6.86193 7.25 7 7.25C7.13807 7.25 7.25 7.36193 7.25 7.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M11 16.5L17 16.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M7.125 16.5H7M7.25 16.5C7.25 16.6381 7.13807 16.75 7 16.75C6.86193 16.75 6.75 16.6381 6.75 16.5C6.75 16.3619 6.86193 16.25 7 16.25C7.13807 16.25 7.25 16.3619 7.25 16.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`5`}]],_=[[`path`,{d:`M8 7L16 7`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8 11L12 11`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M13 21.5V21C13 18.1716 13 16.7574 13.8787 15.8787C14.7574 15 16.1716 15 19 15H19.5M20 13.3431V10C20 6.22876 20 4.34315 18.8284 3.17157C17.6569 2 15.7712 2 12 2C8.22877 2 6.34315 2 5.17157 3.17157C4 4.34314 4 6.22876 4 10L4 14.5442C4 17.7892 4 19.4117 4.88607 20.5107C5.06508 20.7327 5.26731 20.9349 5.48933 21.1139C6.58831 22 8.21082 22 11.4558 22C12.1614 22 12.5141 22 12.8372 21.886C12.9044 21.8623 12.9702 21.835 13.0345 21.8043C13.3436 21.6564 13.593 21.407 14.0919 20.9081L18.8284 16.1716C19.4065 15.5935 19.6955 15.3045 19.8478 14.9369C20 14.5694 20 14.1606 20 13.3431Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}]],v=[[`path`,{d:`M18 4.5C18 5.88071 16.8807 7 15.5 7C14.1193 7 13 5.88071 13 4.5C13 3.11929 14.1193 2 15.5 2C16.8807 2 18 3.11929 18 4.5Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M18 19.5C18 20.8807 16.8807 22 15.5 22C14.1193 22 13 20.8807 13 19.5C13 18.1193 14.1193 17 15.5 17C16.8807 17 18 18.1193 18 19.5Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M10 12C10 14.2091 8.20914 16 6 16C3.79086 16 2 14.2091 2 12C2 9.79086 3.79086 8 6 8C8.20914 8 10 9.79086 10 12Z`,stroke:`currentColor`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M22 4.50006L18 4.49997M6 7.99988C6 6.59542 6 5.89319 6.33706 5.38874C6.48298 5.17036 6.67048 4.98286 6.88886 4.83694C7.39331 4.49988 8.09554 4.49988 9.5 4.49988H13M22 19.5002L18 19.5001M6 16.0002C6 17.4046 6 18.1069 6.33706 18.6113C6.48298 18.8297 6.67048 19.0172 6.88886 19.1631C7.39331 19.5002 8.09554 19.5002 9.5 19.5002H13`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}]],y=[[`path`,{d:`M8.5 19.5V20M9.5 20C9.5 20.5523 9.05228 21 8.5 21C7.94772 21 7.5 20.5523 7.5 20C7.5 19.4477 7.94772 19 8.5 19C9.05228 19 9.5 19.4477 9.5 20Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M15.5 19.5V20M16.5 20C16.5 20.5523 16.0523 21 15.5 21C14.9477 21 14.5 20.5523 14.5 20C14.5 19.4477 14.9477 19 15.5 19C16.0523 19 16.5 19.4477 16.5 20Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M8.5 3.5V4M9.5 4C9.5 4.55228 9.05228 5 8.5 5C7.94772 5 7.5 4.55228 7.5 4C7.5 3.44772 7.94772 3 8.5 3C9.05228 3 9.5 3.44772 9.5 4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`2`}],[`path`,{d:`M8.5 11.5V12M9.5 12C9.5 12.5523 9.05228 13 8.5 13C7.94772 13 7.5 12.5523 7.5 12C7.5 11.4477 7.94772 11 8.5 11C9.05228 11 9.5 11.4477 9.5 12Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`3`}],[`path`,{d:`M15.5 3.5V4M16.5 4C16.5 4.55228 16.0523 5 15.5 5C14.9477 5 14.5 4.55228 14.5 4C14.5 3.44772 14.9477 3 15.5 3C16.0523 3 16.5 3.44772 16.5 4Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`4`}],[`path`,{d:`M15.5 11.5V12M16.5 12C16.5 12.5523 16.0523 13 15.5 13C14.9477 13 14.5 12.5523 14.5 12C14.5 11.4477 14.9477 11 15.5 11C16.0523 11 16.5 11.4477 16.5 12Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`5`}]],b=[[`path`,{d:`M4 18.001C2.74418 16.3295 2 14.2516 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 14.2516 21.2558 16.3295 20 18.001`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M7.52779 16C6.57771 14.9385 6 13.5367 6 12C6 8.68629 8.68629 6 12 6C15.3137 6 18 8.68629 18 12C18 13.5367 17.4223 14.9385 16.4722 16`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`1`}],[`path`,{d:`M12 12V22M9 22H15`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`2`}]],x=[[`path`,{d:`M15.5 14.5C18.8137 14.5 21.5 11.8137 21.5 8.5C21.5 5.18629 18.8137 2.5 15.5 2.5C12.1863 2.5 9.5 5.18629 9.5 8.5C9.5 9.38041 9.68962 10.2165 10.0303 10.9697L2.5 18.5V21.5H5.5V19.5H7.5V17.5H9.5L13.0303 13.9697C13.7835 14.3104 14.6196 14.5 15.5 14.5Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M17.5 6.5L16.5 7.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],S=[[`path`,{d:`M11 3H13C16.7712 3 18.6569 3 19.8284 4.17157C21 5.34315 21 7.22876 21 11V13C21 16.7712 21 18.6569 19.8284 19.8284C18.6569 21 16.7712 21 13 21H11C7.22876 21 5.34315 21 4.17157 19.8284C3 18.6569 3 16.7712 3 13V11C3 7.22876 3 5.34315 4.17157 4.17157C5.34315 3 7.22876 3 11 3Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M8.00488 16.0049L8.00488 8.00488`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],C=[[`path`,{d:`M11 3H13C16.7712 3 18.6569 3 19.8284 4.17157C21 5.34315 21 7.22876 21 11V13C21 16.7712 21 18.6569 19.8284 19.8284C18.6569 21 16.7712 21 13 21H11C7.22876 21 5.34315 21 4.17157 19.8284C3 18.6569 3 16.7712 3 13V11C3 7.22876 3 5.34315 4.17157 4.17157C5.34315 3 7.22876 3 11 3Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M16 8L16 16`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],w=[[`path`,{d:`M2 6L8.91302 9.91697C11.4616 11.361 12.5384 11.361 15.087 9.91697L22 6`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M2.01577 13.4756C2.08114 16.5412 2.11383 18.0739 3.24496 19.2094C4.37608 20.3448 5.95033 20.3843 9.09883 20.4634C11.0393 20.5122 12.9607 20.5122 14.9012 20.4634C18.0497 20.3843 19.6239 20.3448 20.7551 19.2094C21.8862 18.0739 21.9189 16.5412 21.9842 13.4756C22.0053 12.4899 22.0053 11.5101 21.9842 10.5244C21.9189 7.45886 21.8862 5.92609 20.7551 4.79066C19.6239 3.65523 18.0497 3.61568 14.9012 3.53657C12.9607 3.48781 11.0393 3.48781 9.09882 3.53656C5.95033 3.61566 4.37608 3.65521 3.24495 4.79065C2.11382 5.92608 2.08114 7.45885 2.01576 10.5244C1.99474 11.5101 1.99475 12.4899 2.01577 13.4756Z`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],T=[[`path`,{d:`M18.7088 3.49534C16.8165 2.55382 14.5009 2 12 2C9.4991 2 7.1835 2.55382 5.29116 3.49534C4.36318 3.95706 3.89919 4.18792 3.4496 4.91378C3 5.63965 3 6.34248 3 7.74814V11.2371C3 16.9205 7.54236 20.0804 10.173 21.4338C10.9067 21.8113 11.2735 22 12 22C12.7265 22 13.0933 21.8113 13.8269 21.4338C16.4576 20.0804 21 16.9205 21 11.2371L21 7.74814C21 6.34249 21 5.63966 20.5504 4.91378C20.1008 4.18791 19.6368 3.95706 18.7088 3.49534Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M9 11.5C9 11.5 10.4079 11.7519 11 13.5C11 13.5 12.5 10.5 15 9.5`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]],E=n();function D({className:e,...t}){return(0,E.jsx)(`div`,{"data-slot":`empty`,className:a(`flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance`,e),...t})}function O({className:e,...t}){return(0,E.jsx)(`div`,{"data-slot":`empty-header`,className:a(`flex max-w-sm flex-col items-center gap-2`,e),...t})}var k=l(`mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4`}},defaultVariants:{variant:`default`}});function ee({className:e,variant:t=`default`,...n}){return(0,E.jsx)(`div`,{"data-slot":`empty-icon`,"data-variant":t,className:a(k({variant:t,className:e})),...n})}function A({className:e,...t}){return(0,E.jsx)(`div`,{"data-slot":`empty-title`,className:a(`cn-font-heading text-sm font-medium tracking-tight`,e),...t})}function te({className:e,...t}){return(0,E.jsx)(`div`,{"data-slot":`empty-description`,className:a(`text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function ne({className:e,...t}){return(0,E.jsx)(i,{flat:!0,className:a(d,e),...t})}function re({label:e,keys:t,className:n,children:r}){return(0,E.jsxs)(o,{children:[(0,E.jsx)(c,{render:e=>(0,E.jsx)(`span`,{...e,className:a(`inline-flex items-center`,n),tabIndex:-1,children:r})}),(0,E.jsxs)(s,{side:`bottom`,className:`text-[11px]`,children:[e,t&&t.length>0?(0,E.jsx)(f,{keys:t}):null]})]})}function ie({open:e,onToggle:t,noun:n,controlsId:i,dataSlot:a}){let o=e?`Collapse ${n}`:`Expand ${n}`;return(0,E.jsx)(re,{label:o,className:`flex self-stretch`,children:(0,E.jsx)(`button`,{type:`button`,"aria-expanded":e,"aria-controls":i,"aria-label":o,"data-slot":a,onClick:t,className:u,children:(0,E.jsx)(r,{icon:e?S:C,className:`size-3.5`})})})}var j=e(t(),1);function ae(e,t){let n=getComputedStyle(e);return t*parseFloat(n.fontSize)}function oe(e,t){let n=getComputedStyle(e.ownerDocument.documentElement);return t*parseFloat(n.fontSize)}function se(e){return e/100*window.innerHeight}function ce(e){return e/100*window.innerWidth}function le(e){switch(typeof e){case`number`:return[e,`px`];case`string`:{let t=parseFloat(e);return e.endsWith(`%`)?[t,`%`]:e.endsWith(`px`)?[t,`px`]:e.endsWith(`rem`)?[t,`rem`]:e.endsWith(`em`)?[t,`em`]:e.endsWith(`vh`)?[t,`vh`]:e.endsWith(`vw`)?[t,`vw`]:[t,`%`]}}}function M({groupSize:e,panelElement:t,styleProp:n}){let r,[i,a]=le(n);switch(a){case`%`:r=i/100*e;break;case`px`:r=i;break;case`rem`:r=oe(t,i);break;case`em`:r=ae(t,i);break;case`vh`:r=se(i);break;case`vw`:r=ce(i)}return r}function N(e){return parseFloat(e.toFixed(3))}function P({group:e}){let{orientation:t,panels:n}=e;return n.reduce((e,n)=>(e+=t===`horizontal`?n.element.offsetWidth:n.element.offsetHeight,e),0)}function ue(e){let{panels:t}=e,n=P({group:e});return n===0?t.map(e=>({groupResizeBehavior:e.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:e.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:e.panelConstraints.disabled,minSize:0,maxSize:100,panelId:e.id})):t.map(e=>{let{element:t,panelConstraints:r}=e,i=0;r.collapsedSize!==void 0&&(i=N(M({groupSize:n,panelElement:t,styleProp:r.collapsedSize})/n*100));let a;r.collapsedThreshold!==void 0&&(a=N(M({groupSize:n,panelElement:t,styleProp:r.collapsedThreshold})/n*100));let o;r.defaultSize!==void 0&&(o=N(M({groupSize:n,panelElement:t,styleProp:r.defaultSize})/n*100));let s=0;r.minSize!==void 0&&(s=N(M({groupSize:n,panelElement:t,styleProp:r.minSize})/n*100));let c=100;return r.maxSize!==void 0&&(c=N(M({groupSize:n,panelElement:t,styleProp:r.maxSize})/n*100)),{groupResizeBehavior:r.groupResizeBehavior,collapsedSize:i,collapsedThreshold:a,collapsible:r.collapsible===!0,defaultSize:o,disabled:r.disabled,minSize:s,maxSize:c,panelId:e.id}})}var de=class{#e={};addListener(e,t){let n=this.#e[e];return n===void 0?this.#e[e]=[t]:n.includes(t)||n.push(t),()=>{this.removeListener(e,t)}}emit(e,t){let n=this.#e[e];if(n!==void 0){if(n.length===1)n[0].call(null,t);else{let e=!1,r=null,i=Array.from(n);for(let n=0;n<i.length;n++){let a=i[n];try{a.call(null,t)}catch(t){r===null&&(e=!0,r=t)}}if(e)throw r}}}removeAllListeners(){this.#e={}}removeListener(e,t){let n=this.#e[e];if(n!==void 0){let e=n.indexOf(t);e>=0&&n.splice(e,1)}}},F={cursorFlags:0,state:`inactive`},fe=new de;function I(){return F}function pe(e){return fe.addListener(`change`,e)}function me(e,t=[],n,r=!1){let i=F,a={...F};a.cursorFlags=e,a.state===`active`&&(a.didPointerMove||=r,a.previews=t,n&&(a.previewLayoutMap=n)),F=a,fe.emit(`change`,{prev:i,next:a})}function L(e){let t=F;F=e,t.state===`active`&&e.state!==`active`&&t.didPointerMove&&t.hitRegions.forEach(({separator:e})=>{e&&e.element.ownerDocument.activeElement===e.element&&e.element.blur()}),fe.emit(`change`,{prev:t,next:e})}function he(e){F.state!==`active`||!F.previews.some(t=>t.separator===e)||L({...F,previews:F.previews.map(t=>t.separator===e?{...t}:t)})}function ge(e){if(F.state===`inactive`)return!1;let t=F.hitRegions.filter(t=>t.group!==e),n=F.state===`active`&&F.previews.some(t=>t.group===e);if(t.length===F.hitRegions.length&&!n)return!1;if(t.length===0)L({cursorFlags:0,state:`inactive`});else if(F.state===`active`){let n=new Map(F.initialLayoutMap),r=new Map(F.previewLayoutMap);n.delete(e),r.delete(e),L({...F,cursorFlags:0,hitRegions:t,initialLayoutMap:n,previewLayoutMap:r,previews:F.previews.filter(t=>t.group!==e)})}else L({...F,hitRegions:t});return!0}var _e=e=>e,ve=()=>{},ye=1,be=2,xe=4,Se=8,Ce=3,we=12,Te;function Ee(){return Te===void 0&&(Te=!1,typeof window<`u`&&(window.navigator.userAgent.includes(`Chrome`)||window.navigator.userAgent.includes(`Firefox`))&&(Te=!0)),Te}function De({cursorFlags:e,groups:t,state:n}){let r=0,i=0;switch(n){case`active`:case`hover`:t.forEach(e=>{if(!e.mutableState.disableCursor)switch(e.orientation){case`horizontal`:r++;break;case`vertical`:i++}})}if(r!==0||i!==0){if(n===`active`&&e&&Ee()){let t=(e&ye)!==0,n=(e&be)!==0,r=(e&xe)!==0,i=(e&Se)!==0;if(t)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}return Ee()?r>0&&i>0?`move`:r>0?`ew-resize`:`ns-resize`:r>0&&i>0?`grab`:r>0?`col-resize`:`row-resize`}}var Oe=new WeakMap;function R(e){if(!e.defaultView||!e.adoptedStyleSheets)return;let{prevStyle:t,styleSheet:n}=Oe.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&(Object.isExtensible(e.adoptedStyleSheets)?e.adoptedStyleSheets.push(n):e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]));let r=I();switch(r.state){case`active`:case`hover`:{let e=De({cursorFlags:r.cursorFlags,groups:r.hitRegions.map(e=>e.group),state:r.state}),i=`*, *:hover {cursor: ${e} !important; }`;if(t===i)return;t=i,e?n.cssRules.length===0?n.insertRule(i):n.replaceSync(i):n.cssRules.length===1&&n.deleteRule(0);break}case`inactive`:t=void 0,n.cssRules.length===1&&n.deleteRule(0)}Oe.set(e,{prevStyle:t,styleSheet:n})}function z(e,t=`Assertion error`){if(!e)throw Error(t)}function ke(e,t){return Array.from(t).sort((t,n)=>{let r=e===`horizontal`?Ae(t,n):je(t,n);if(r!==0)return r;let i=t.element.compareDocumentPosition(n.element);return i&Node.DOCUMENT_POSITION_DISCONNECTED?0:i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Ae(e,t){let n=e.element.offsetLeft-t.element.offsetLeft;return n===0?e.element.offsetWidth-t.element.offsetWidth:n}function je(e,t){let n=e.element.offsetTop-t.element.offsetTop;return n===0?e.element.offsetHeight-t.element.offsetHeight:n}function Me(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE}function Ne(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function Pe({orientation:e,rects:t,targetRect:n}){let r={x:n.x+n.width/2,y:n.y+n.height/2},i,a=Number.MAX_VALUE;for(let n of t){let{x:t,y:o}=Ne(r,n),s=e===`horizontal`?t:o;s<a&&(a=s,i=n)}return z(i,`No rect found`),i}var Fe;function Ie(){return Fe===void 0&&(Fe=typeof matchMedia==`function`&&!!matchMedia(`(pointer:coarse)`).matches),Fe}function Le({expandHitTargets:e=!0,group:t,includeDisabled:n=!1}){let{element:r,orientation:i,panels:a,separators:o}=t,s=ke(i,Array.from(r.children).filter(Me).filter(e=>!e.hasAttribute(`data-resize-preview`)).map(e=>({element:e}))).map(({element:e})=>e),c=[],l=!1,u=!1,d=-1,f,p=-1,m=0,h,g=[];{let e=-1;for(let t of s)t.hasAttribute(`data-panel`)&&(e++,t.hasAttribute(`data-disabled`)||(m++,d===-1&&(d=e),p=e))}if(n||m>1){let r=-1;for(let m of s)if(m.hasAttribute(`data-panel`)){r++;let o=a.find(e=>e.element===m);if(o){if(h){let a=h.element.getBoundingClientRect(),s=m.getBoundingClientRect(),_;if(u){let e=i===`horizontal`?new DOMRect(a.right,a.top,0,a.height):new DOMRect(a.left,a.bottom,a.width,0),t=i===`horizontal`?new DOMRect(s.left,s.top,0,s.height):new DOMRect(s.left,s.top,s.width,0);switch(g.length){case 0:_=[e,t];break;case 1:{let n=g[0];_=[n,Pe({orientation:i,rects:[a,s],targetRect:n.element.getBoundingClientRect()})===a?t:e];break}default:_=g}}else _=g.length?g:[i===`horizontal`?new DOMRect(a.right,s.top,s.left-a.right,s.height):new DOMRect(s.left,a.bottom,s.width,s.top-a.bottom)];for(let i of _){let a=`width`in i?i:i.element.getBoundingClientRect(),s=e?Ie()?t.resizeTargetMinimumSize.coarse:t.resizeTargetMinimumSize.fine:0;if(a.width<s){let e=s-a.width;a=new DOMRect(a.x-e/2,a.y,a.width+e,a.height)}if(a.height<s){let e=s-a.height;a=new DOMRect(a.x,a.y-e/2,a.width,a.height+e)}(n||!l&&!(r<=d||r>p))&&(f??=P({group:t}),c.push({group:t,groupSize:f,panels:[h,o],separator:`width`in i?void 0:i,rect:a})),l=!1}}u=!1,h=o,g=[]}}else if(m.hasAttribute(`data-separator`)){m.ariaDisabled!==null&&(l=!0);let e=o.find(e=>e.element===m);e?g.push(e):(h=void 0,g=[])}else u=!0}return c}var B=new Map,Re=new de;function ze(e){B=new Map(B),B.delete(e)}function Be(e,t){for(let[t]of B)if(t.id===e)return t}function V(e,t){for(let[t,n]of B)if(t.id===e)return n;if(t)throw Error(`Could not find data for Group with id ${e}`)}function H(){return B}function Ve(e,t){return Re.addListener(`groupChange`,n=>{n.group.id===e&&t(n)})}function U(e,t,n){let r=B.get(e);B=new Map(B),B.set(e,t),Re.emit(`groupChange`,{group:e,isUserInteraction:n?.isUserInteraction===!0,prev:r,next:t})}function He(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function W(e,t,n=0){return Math.abs(N(e)-N(t))<=n}function G(e,t){return W(e,t)?0:e>t?1:-1}function K({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:r}){let{collapsedSize:i=0,collapsedThreshold:a,collapsible:o,disabled:s,maxSize:c=100,minSize:l=0}=t;if(s&&!e)return n;if(G(r,l)<0){if(o){let e=a??(l-i)/2,t=G(n,i)<=0,o=t?i+e:l-e,s=G(r,o);r=G(r,i)<=0||s<0||a!==void 0&&t&&s===0?i:l}else r=l}return r=Math.min(c,r),r=N(r),r}function q({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(W(e,0))return t;let o=a===`imperative-api`,s=n.map(({panelId:e})=>t[e]),c=n.map(({panelId:e})=>i[e]),l=[...s],[u,d]=r;z(u!=null,`Invalid first pivot index`),z(d!=null,`Invalid second pivot index`);let f=0;switch(a){case`keyboard`:{let t=e<0?d:u,r=n[t];z(r,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(z(n!=null,`Previous layout not found for panel index ${t}`),W(n,i)){let t=o-n;G(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let t=e<0?u:d,r=n[t];z(r,`No panel constraints found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(z(n!=null,`Previous layout not found for panel index ${t}`),W(n,o)){let t=n-i;G(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}break;default:{let t=e<0?d:u,r=n[t];z(r,`Panel constraints not found for index ${t}`);let i=s[t],{collapsedSize:a,collapsedThreshold:o,collapsible:c,minSize:l}=r;if(c&&G(i,l)<0){let t=l-a,n=o??t/2;if(G(i+Math.abs(e),l)<0){let r=G(Math.abs(e),n);e=r>0||r===0&&o===void 0&&e<0?e<0?-t:t:0}}break}}{let t=e<0?1:-1,r=e<0?d:u,i=0;for(;;){let e=s[r];z(e!=null,`Previous layout not found for panel index ${r}`);let a=K({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:e,size:100})-e;if(i+=a,r+=t,r<0||r>=n.length)break}let a=Math.min(Math.abs(e),Math.abs(i));e=e<0?0-a:a}{let t=e<0?u:d;for(;t>=0&&t<n.length;){let r=Math.abs(e)-Math.abs(f),i=s[t];z(i!=null,`Previous layout not found for panel index ${t}`);let a=i-r,c=K({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:i,size:a});if(!W(i,c)&&(f+=i-c,l[t]=c,f.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?t--:t++}}if(He(c,l))return i;{let t=e<0?d:u,r=s[t];z(r!=null,`Previous layout not found for panel index ${t}`);let i=r+f,a=K({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:r,size:i});if(l[t]=a,!W(a,i)){let t=i-a,r=e<0?d:u;for(;r>=0&&r<n.length;){let i=l[r];z(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=K({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:i,size:a});if(W(i,s)||(t-=s-i,l[r]=s),W(t,0))break;e>0?r--:r++}}}return W(Object.values(l).reduce((e,t)=>t+e,0),100,.1)?l.reduce((e,t,r)=>(e[n[r].panelId]=t,e),{}):i}function J(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(t[n]===void 0||G(e[n],t[n])!==0)return!1;return!0}function Ue({commit:e,document:t,event:n,hitRegions:r,initialLayoutMap:i,mountedGroups:a,pointerDownAtPoint:o,prevCursorFlags:s}){let c=0,l=I(),u=l.state===`active`?l.previews:[],d=new Map(l.state===`active`?l.previewLayoutMap:void 0);r.forEach(t=>{let{group:r,groupSize:s}=t,{orientation:l,panels:f}=r;if(e&&r.resizePreviewMode!==`separator`)return;let{disableCursor:p}=r.mutableState,m=0;m=o?l===`horizontal`?(n.clientX-o.x)/s*100:(n.clientY-o.y)/s*100:l===`horizontal`?n.clientX<0?-100:100:n.clientY<0?-100:100;let h=i.get(r),g=a.get(r);if(!h||!g)return;let{defaultLayoutDeferred:_,derivedPanelConstraints:v,groupSize:y,layout:b,separatorToPanels:x}=g;if(v&&b&&x){let n=r.resizePreviewMode===`separator`?d.get(r)??b:b,i=q({delta:m,initialLayout:h,panelConstraints:v,pivotIndices:t.panels.map(e=>f.indexOf(e)),prevLayout:n,trigger:`mouse-or-touch`});if(r.resizePreviewMode===`separator`&&!e&&!J(i,n)){d.set(r,i);let e=0,t=f.map(t=>(e+=i[t.id]-h[t.id],s/100*e));u=u.map(e=>{if(e.group!==r)return e;let n=t[e.panelIndex];return n===e.offset?e:{...e,offset:n}})}if(J(i,n)&&m!==0&&!p)switch(l){case`horizontal`:c|=m<0?ye:be;break;case`vertical`:c|=m<0?xe:Se}(r.resizePreviewMode!==`separator`||e)&&!J(i,b)&&U(t.group,{defaultLayoutDeferred:_,derivedPanelConstraints:v,groupSize:y,layout:i,separatorToPanels:x})}});let f=0;n.movementX===0?f|=s&Ce:f|=c&Ce,n.movementY===0?f|=s&we:f|=c&we;let p=l.state===`active`&&(n.clientX!==l.pointerDownAtPoint.x||n.clientY!==l.pointerDownAtPoint.y);me(f,u,d,p),R(t)}function We(e,t){let n=I(),r=H(),i=!1;return n.state===`active`&&(Ue({commit:!0,document:e,event:t,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:r,pointerDownAtPoint:n.pointerDownAtPoint,prevCursorFlags:n.cursorFlags}),L({cursorFlags:0,state:`inactive`}),n.hitRegions.length>0&&(R(e),i=!0,n.hitRegions.forEach(e=>{if(!r.has(e.group))return;let t=V(e.group.id,!0);U(e.group,t,{isUserInteraction:!0})}))),i}function Ge(e){e.defaultPrevented||We(e.currentTarget,e)}function Ke(e,t,n){let r,i={x:1/0,y:1/0};for(let a of t){let t=Ne(n,a.rect);switch(e){case`horizontal`:t.x<=i.x&&(r=a,i=t);break;case`vertical`:t.y<=i.y&&(r=a,i=t)}}return r?{distance:i,hitRegion:r}:void 0}function qe(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function Je(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:et(e),b:et(t)},r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();z(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:$e(Qe(n.a)),b:$e(Qe(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var Ye=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Xe(e){let t=getComputedStyle(tt(e)??e).display;return t===`flex`||t===`inline-flex`}function Ze(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||Xe(e))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||Ye.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function Qe(e){let t=e.length;for(;t--;){let n=e[t];if(z(n,`Missing node`),Ze(n))return n}return null}function $e(e){return e&&Number(getComputedStyle(e).zIndex)||0}function et(e){let t=[];for(;e;)t.push(e),e=tt(e);return t}function tt(e){let{parentNode:t}=e;return qe(t)?t.host:t}function nt(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function rt(e){try{return e.matches(`:modal`)}catch{return!1}}function it({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(Me(n)){let t=n.closest(`dialog`);if(t&&!t.contains(e)&&rt(t))return!1}if(!Me(n)||n.contains(e)||e.contains(n))return!0;if(Je(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(nt(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function at(e,t){let n=[];return t.forEach((t,r)=>{if(r.disabled)return;let i=Le({group:r}),a=Ke(r.orientation,i,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&it({groupElement:r.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function Y({layout:e,panelConstraints:t}){let n=t.map(({panelId:t})=>e[t]),r=[...n],i=r.reduce((e,t)=>e+t,0);if(Object.keys(e).length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${Object.values(e).map(e=>`${e}%`).join(`, `)}`);if(!W(i,100)&&r.length>0)for(let e=0;e<t.length;e++){let t=r[e];z(t!=null,`No layout data found for index ${e}`);let n=100/i*t;r[e]=n}let a=0;for(let e=0;e<t.length;e++){let i=n[e];z(i!=null,`No layout data found for index ${e}`);let o=r[e];z(o!=null,`No layout data found for index ${e}`);let s=K({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:i,size:o});o!=s&&(a+=o-s,r[e]=s)}if(!W(a,0))for(let e=0;e<t.length;e++){let n=r[e];z(n!=null,`No layout data found for index ${e}`);let i=n+a,o=K({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:n,size:i});if(n!==o&&(a-=o-n,r[e]=o,W(a,0)))break}return r.reduce((e,n,r)=>(e[t[r].panelId]=n,e),{})}function ot({groupId:e,panelId:t}){let n=()=>{let t=H();for(let[n,{defaultLayoutDeferred:r,derivedPanelConstraints:i,layout:a,groupSize:o,separatorToPanels:s}]of t)if(n.id===e)return{defaultLayoutDeferred:r,derivedPanelConstraints:i,group:n,groupSize:o,layout:a,separatorToPanels:s};throw Error(`Group ${e} not found`)},r=()=>{let e=n().derivedPanelConstraints.find(e=>e.panelId===t);if(e!==void 0)return e;throw Error(`Panel constraints not found for Panel ${t}`)},i=()=>{let e=n().group.panels.find(e=>e.id===t);if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},a=()=>{let e=n().layout[t];if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},o=({nextSize:e,panels:n,prevLayout:r,derivedPanelConstraints:i})=>{let o=a(),s=n.findIndex(e=>e.id===t),c=s===0,l=s===n.length-1;if(l&&e<o&&(c||n.slice(0,s).every((e,t)=>{let n=i[t];return n?.collapsible&&W(n.collapsedSize,r[n.panelId])}))){let e=n.slice(0,s).reduce((e,t)=>e+r[t.id],0);return{...r,[t]:N(100-e)}}return q({delta:l?o-e:e-o,initialLayout:r,panelConstraints:i,pivotIndices:l?[s-1,s]:[s,s+1],prevLayout:r,trigger:`imperative-api`})},s=e=>{if(e===a())return;let{defaultLayoutDeferred:t,derivedPanelConstraints:r,group:i,groupSize:s,layout:c,separatorToPanels:l}=n(),u=Y({layout:o({nextSize:e,panels:i.panels,prevLayout:c,derivedPanelConstraints:r}),panelConstraints:r});J(c,u)||U(i,{defaultLayoutDeferred:t,derivedPanelConstraints:r,groupSize:s,layout:u,separatorToPanels:l})};return{collapse:()=>{let{collapsible:e,collapsedSize:t}=r(),{mutableValues:n}=i(),o=a();e&&o!==t&&(n.expandToSize=o,s(t))},expand:()=>{let{collapsible:e,collapsedSize:t,minSize:n}=r(),{mutableValues:o}=i(),c=a();if(e&&c===t){let e=o.expandToSize??n;e===0&&(e=1),s(e)}},getSize:()=>{let{group:e}=n(),t=a(),{element:r}=i();return{asPercentage:t,inPixels:e.orientation===`horizontal`?r.offsetWidth:r.offsetHeight}},isCollapsed:()=>{let{collapsible:e,collapsedSize:t}=r(),n=a();return e&&W(t,n)},resize:e=>{let{group:t}=n(),{element:r}=i(),a=P({group:t}),o=N(M({groupSize:a,panelElement:r,styleProp:e})/a*100);s(o)}}}function st(e){e.defaultPrevented||at(e,H()).forEach(t=>{if(t.separator&&!t.separator.disableDoubleClick){let n=t.panels.find(e=>e.panelConstraints.defaultSize!==void 0);if(n){let r=n.panelConstraints.defaultSize,i=ot({groupId:t.group.id,panelId:n.id});i&&r!==void 0&&(i.resize(r),e.preventDefault())}}})}function ct(e){let t=H();for(let[n]of t)if(n.separators.some(t=>t.element===e))return n;throw Error(`Could not find parent Group for separator element`)}function lt({groupId:e}){let t=()=>{let t=H();for(let[n,r]of t)if(n.id===e)return{group:n,...r};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){let{defaultLayoutDeferred:e,layout:n}=t();return e?{}:n},setLayout(e){let{defaultLayoutDeferred:n,derivedPanelConstraints:r,group:i,groupSize:a,layout:o,separatorToPanels:s}=t(),c=Y({layout:e,panelConstraints:r});return n?o:(J(o,c)||U(i,{defaultLayoutDeferred:n,derivedPanelConstraints:r,groupSize:a,layout:c,separatorToPanels:s}),c)}}}function X(e,t){let n=ct(e),r=V(n.id,!0),i=n.separators.find(t=>t.element===e);z(i,`Matching separator not found`);let a=r.separatorToPanels.get(i);z(a,`Matching panels not found`);let o=a.map(e=>n.panels.indexOf(e)),s=lt({groupId:n.id}).getLayout(),c=Y({layout:q({delta:t,initialLayout:s,panelConstraints:r.derivedPanelConstraints,pivotIndices:o,prevLayout:s,trigger:`keyboard`}),panelConstraints:r.derivedPanelConstraints});J(s,c)||U(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,groupSize:r.groupSize,layout:c,separatorToPanels:r.separatorToPanels},{isUserInteraction:!0})}function ut(e){if(e.defaultPrevented)return;let t=e.currentTarget,n=ct(t);if(!(n.disabled||n.separators.find(e=>e.element===t)?.disabled))switch(e.key){case`ArrowDown`:e.preventDefault(),n.orientation===`vertical`&&X(t,5);break;case`ArrowLeft`:e.preventDefault(),n.orientation===`horizontal`&&X(t,-5);break;case`ArrowRight`:e.preventDefault(),n.orientation===`horizontal`&&X(t,5);break;case`ArrowUp`:e.preventDefault(),n.orientation===`vertical`&&X(t,-5);break;case`End`:e.preventDefault(),X(t,100);break;case`Enter`:{e.preventDefault();let n=ct(t),{derivedPanelConstraints:r,layout:i,separatorToPanels:a}=V(n.id,!0),o=n.separators.find(e=>e.element===t);z(o,`Matching separator not found`);let s=a.get(o);z(s,`Matching panels not found`);let c=s[0],l=r.find(e=>e.panelId===c.id);if(z(l,`Panel metadata not found`),l.collapsible){let e=i[c.id];X(t,(l.collapsedSize===e?n.mutableState.expandedPanelSizes[c.id]??l.minSize:l.collapsedSize)-e)}break}case`F6`:{e.preventDefault();let n=ct(t).separators.map(e=>e.element),r=Array.from(n).findIndex(t=>t===e.currentTarget);z(r!==null,`Index not found`),n[e.shiftKey?r>0?r-1:n.length-1:r+1<n.length?r+1:0].focus({preventScroll:!0});break}case`Home`:e.preventDefault(),X(t,-100)}}function dt(e,t){let{element:n,orientation:r,panels:i}=e,a=n.getBoundingClientRect(),o=r===`horizontal`;return Le({expandHitTargets:!1,group:e,includeDisabled:!0}).map(({panels:r,rect:s,separator:c},l)=>{let u=i.indexOf(r[0]),d=o?s.left+s.width/2:s.top+s.height/2;return{active:t.some(t=>{if(t.group!==e||t.panels[0]!==r[0])return!1;if(c||t.separator)return t.separator===c;let n=o?t.rect.left+t.rect.width/2:t.rect.top+t.rect.height/2;return W(d,n)}),group:e,key:c?`separator-${c.id}`:`panel-${r[0].id}-${l}`,offset:0,panelIndex:u,rect:new DOMRect((o&&!c?d:s.left)-a.left-n.clientLeft+n.scrollLeft,(!o&&!c?d:s.top)-a.top-n.clientTop+n.scrollTop,o&&!c?0:s.width,!o&&!c?0:s.height),separator:c}})}function ft(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=H(),n=at(e,t);if(n.length===0)return;let r=new Map,i=!1;n.forEach(e=>{e.separator&&(i||(i=!0,e.separator.element.focus({focusVisible:!1,preventScroll:!0})));let n=t.get(e.group);n&&r.set(e.group,n.layout)});let a=Array.from(r.keys()).flatMap(e=>e.resizePreviewMode===`separator`?dt(e,n):[]);L({cursorFlags:0,didPointerMove:!1,hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},previewLayoutMap:new Map(r),previews:a,state:`active`}),e.preventDefault()}function pt(e){let t=H(),n=I();n.state===`active`&&Ue({commit:!1,document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}function mt(e){if(e.defaultPrevented)return;let t=I(),n=H();switch(t.state){case`active`:if(e.buttons===0){t.previewLayoutMap.forEach((e,t)=>{let r=n.get(t);t.resizePreviewMode===`separator`&&r&&!J(e,r.layout)&&U(t,{...r,layout:e})}),L({cursorFlags:0,state:`inactive`}),t.hitRegions.forEach(e=>{if(!n.has(e.group))return;let t=V(e.group.id,!0);U(e.group,t,{isUserInteraction:!0})}),R(e.currentTarget);return}for(let n of t.hitRegions)if(n.separator){let{element:t}=n.separator;t.isConnected&&!t.hasPointerCapture?.(e.pointerId)&&t.setPointerCapture?.(e.pointerId)}Ue({commit:!1,document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break;default:{let r=at(e,n);r.length===0?t.state!==`inactive`&&L({cursorFlags:0,state:`inactive`}):L({cursorFlags:0,hitRegions:r,state:`hover`}),R(e.currentTarget);break}}}function ht(e){if(e.relatedTarget instanceof HTMLIFrameElement)switch(I().state){case`hover`:L({cursorFlags:0,state:`inactive`})}}function gt(e){e.defaultPrevented||e.pointerType===`mouse`&&e.button>0||We(e.currentTarget,e)&&e.preventDefault()}function _t(e){let t=0,n=0,r={};for(let i of e)if(i.defaultSize!==void 0){t++;let e=N(i.defaultSize);n+=e,r[i.panelId]=e}else r[i.panelId]=void 0;let i=e.length-t;if(i!==0){let t=N((100-n)/i);for(let n of e)n.defaultSize===void 0&&(r[n.panelId]=t)}return r}function vt(e,t){let n=e.map(e=>e.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(let e of n)if(!r.includes(e))return!1;return!0}function yt({group:e,panelConstraints:t}){let n=e.panels.map(({id:e})=>e).join(`,`),r=e.mutableState.defaultLayout;return e.mutableState.layouts[n]??(r&&vt(e.panels,r)?r:_t(t))}function bt(e,t,n){if(!n[0])return;let r=e.panels.find(e=>e.element===t);if(!r||!r.onResize)return;let i=P({group:e}),a=e.orientation===`horizontal`?r.element.offsetWidth:r.element.offsetHeight,o=r.mutableValues.prevSize,s={asPercentage:N(a/i*100),inPixels:a};r.mutableValues.prevSize=s,r.onResize(s,r.id,o)}function xt(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function St(e,t){return e.length===t.length&&e.every((e,n)=>xt(e,t[n]))}function Ct({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:r}){if(n<=0||t<=0||n===t)return r;let i=0,a=0,o=!1,s=new Map,c=[];for(let l of e.panels){let e=r[l.id]??0;switch(l.panelConstraints.groupResizeBehavior){case`preserve-pixel-size`:{o=!0;let r=N(e/100*n/t*100);s.set(l.id,r),i+=r;break}default:c.push(l.id),a+=e}}if(!o||c.length===0)return r;let l=100-i,u={...r};if(s.forEach((e,t)=>{u[t]=e}),a>0)for(let e of c)u[e]=N((r[e]??0)/a*l);else{let e=N(l/c.length);for(let t of c)u[t]=e}return u}var Z=new Map;function wt(e){let t=!0;z(e.element.ownerDocument.defaultView,`Cannot register an unmounted Group`);let n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,i=new Set,a=new n(n=>{for(let r of n){let{borderBoxSize:n,target:i}=r;if(i===e.element){if(t){let t=P({group:e});if(t===0)return;let n=V(e.id);if(!n)return;let r=ue(e),i=n.defaultLayoutDeferred?yt({group:e,panelConstraints:r}):n.layout,a=Y({layout:Ct({group:e,nextGroupSize:t,prevGroupSize:n.groupSize,prevLayout:i}),panelConstraints:r});if(!n.defaultLayoutDeferred&&J(n.layout,a)&&St(n.derivedPanelConstraints,r)&&n.groupSize===t)continue;U(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:r,groupSize:t,layout:a,separatorToPanels:n.separatorToPanels})}}else bt(e,i,n)}});a.observe(e.element),e.panels.forEach(e=>{z(!r.has(e.id),`Panel ids must be unique; id "${e.id}" was used more than once`),r.add(e.id),e.onResize&&a.observe(e.element)});let o=P({group:e}),s=ue(e),c=Y({layout:yt({group:e,panelConstraints:s}),panelConstraints:s}),l=e.element.ownerDocument;Z.set(l,(Z.get(l)??0)+1);let u=new Map;return Le({group:e,includeDisabled:!0}).forEach(e=>{e.separator&&u.set(e.separator,e.panels)}),U(e,{defaultLayoutDeferred:o===0,derivedPanelConstraints:s,groupSize:o,layout:c,separatorToPanels:u}),e.separators.forEach(e=>{z(!i.has(e.id),`Separator ids must be unique; id "${e.id}" was used more than once`),i.add(e.id),e.element.addEventListener(`keydown`,ut)}),Z.get(l)===1&&(l.addEventListener(`contextmenu`,Ge,!0),l.addEventListener(`dblclick`,st,!0),l.addEventListener(`pointerdown`,ft,!0),l.addEventListener(`pointerleave`,pt),l.addEventListener(`pointermove`,mt),l.addEventListener(`pointerout`,ht),l.addEventListener(`pointerup`,gt,!0)),function(){t=!1,Z.set(l,Math.max(0,(Z.get(l)??0)-1)),ze(e),ge(e)&&R(l),e.separators.forEach(e=>{e.element.removeEventListener(`keydown`,ut)}),Z.get(l)||(l.removeEventListener(`contextmenu`,Ge,!0),l.removeEventListener(`dblclick`,st,!0),l.removeEventListener(`pointerdown`,ft,!0),l.removeEventListener(`pointerleave`,pt),l.removeEventListener(`pointermove`,mt),l.removeEventListener(`pointerout`,ht),l.removeEventListener(`pointerup`,gt,!0)),a.disconnect()}}function Tt(){let[e,t]=(0,j.useState)({});return[e,(0,j.useCallback)(()=>t({}),[])]}function Et(e){let t=(0,j.useId)();return`${e??t}`}var Q=typeof window<`u`?j.useLayoutEffect:j.useEffect;function $(e){let t=(0,j.useRef)(e);return Q(()=>{t.current=e},[e]),(0,j.useCallback)((...e)=>t.current?.(...e),[t])}function Dt(...e){return $(t=>{e.forEach(e=>{if(e)switch(typeof e){case`function`:e(t);break;case`object`:e.current=t}})})}function Ot(e){let t=(0,j.useRef)({...e});return Q(()=>{for(let n in e)t.current[n]=e[n]},[e]),t.current}var kt=(0,j.createContext)(null);function At({separator:e}){let{element:t}=e,n=(0,j.useRef)(null);return Q(()=>{let e=t.cloneNode(!0),r=[t,...t.querySelectorAll(`*`)],i=[e,...e.querySelectorAll(`*`)],a=t.ownerDocument.defaultView;return r.forEach((e,t)=>{let n=i[t];if(n instanceof a.HTMLElement||n instanceof a.SVGElement){let t=a.getComputedStyle(e);for(let e=0;e<t.length;e++){let r=t.item(e);n.style.setProperty(r,t.getPropertyValue(r))}}n.removeAttribute(`data-testid`),n.removeAttribute(`id`)}),Object.assign(e.style,{boxSizing:`border-box`,height:`100%`,margin:`0`,position:`static`,transform:`none`,width:`100%`}),n.current.appendChild(e),()=>e.remove()},[t]),(0,E.jsx)(`div`,{ref:n,style:{height:`100%`,opacity:.65,pointerEvents:`none`,width:`100%`}})}function jt(){let e=(0,j.useContext)(kt);return z(e,`Group Context not found; did you render a Panel or Separator outside of a Group?`),e}function Mt(e){let{registerOverlay:t}=jt(),n=(0,j.useRef)(e);xt(n.current,e)||(n.current=e);let r=n.current;return Q(()=>t(r),[t,r]),null}Mt.displayName=`SeparatorOverlay`;function Nt({active:e,orientation:t,style:n,...r}){let i;switch(t){case`horizontal`:i={height:`100%`,minWidth:`1px`};break;case`vertical`:i={minHeight:`1px`,width:`100%`}}return(0,E.jsx)(`div`,{...r,"data-separator-overlay":e?`active`:`inactive`,style:{...i,...n,flexShrink:0,pointerEvents:`none`}})}function Pt({overlay:e,preview:t}){let{group:n,offset:r,rect:i,separator:a}=t,o=n.orientation===`horizontal`,s=a?.preview,c=e;return(0,j.isValidElement)(s)&&s.type===Mt&&(c=s.props,s=void 0),s??(c?s=(0,E.jsx)(Nt,{...c,active:t.active,orientation:n.orientation}):a&&(s=(0,E.jsx)(At,{separator:a}))),(0,E.jsx)(`div`,{"aria-hidden":`true`,"data-resize-preview":!0,inert:!0,style:{height:i.height,left:i.left,pointerEvents:`none`,position:`absolute`,top:i.top,transform:o?`translateX(${r}px)`:`translateY(${r}px)`,width:i.width},children:s})}function Ft(e,t){let n=(0,j.useRef)({getLayout:()=>({}),setLayout:_e});(0,j.useImperativeHandle)(t,()=>n.current,[]),Q(()=>{Object.assign(n.current,lt({groupId:e}))})}function It({groupId:e,resizePreviewMode:t}){let[n,r]=(0,j.useState)([]),i=(0,j.useRef)(n);return Q(()=>{let n=n=>{let a=Be(e),o=t===`separator`&&n.state===`active`?n.previews.filter(e=>e.group===a&&(e.active||!W(e.offset,0))):[],s=i.current;s.length===o.length&&o.every((e,t)=>e===s[t])||(i.current=o,r(o))};if(t!==`separator`){n(I());return}let a=pe(({next:e})=>n(e));return n(I()),a},[e,t]),n}function Lt({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:i,elementRef:a,groupRef:o,id:s,onLayoutChange:c,onLayoutChanged:l,orientation:u=`horizontal`,resizePreviewMode:d=`panel`,resizeTargetMinimumSize:f={coarse:20,fine:10},style:p,...m}){let h=(0,j.useRef)({onLayoutChange:{},onLayoutChanged:{}}),g=$(e=>{J(h.current.onLayoutChange,e)||(h.current.onLayoutChange=e,c?.(e))}),_=$((e,t)=>{J(h.current.onLayoutChanged,e)||(h.current.onLayoutChanged=e,l?.(e,{isUserInteraction:t}))}),v=Et(s),[y,b]=(0,j.useState)(),x=It({groupId:v,resizePreviewMode:d}),S=(0,j.useRef)(null),[C,w]=Tt(),T=(0,j.useRef)({lastExpandedPanelSizes:{},layouts:{},panels:[],separators:[]}),D=Dt(S,a);Ft(v,o);let O=$((e,t)=>{let r=V(e);if(r)return{flexGrow:r.layout[t]??1};if(n?.[t])return{flexGrow:n?.[t]}}),k=Ot({defaultLayout:n,disableCursor:r,resizeTargetMinimumSize:f}),ee=(0,j.useMemo)(()=>({get disableCursor(){return!!k.disableCursor},getPanelStyles:O,id:v,orientation:u,registerPanel:e=>{let t=T.current;return t.panels=ke(u,[...t.panels,e]),w(),()=>{t.panels=t.panels.filter(t=>t!==e),w()}},registerOverlay:e=>(b(e),()=>{b(void 0)}),registerSeparator:e=>{let t=T.current;return t.separators=ke(u,[...t.separators,e]),w(),()=>{t.separators=t.separators.filter(t=>t!==e),w()}},updatePanelProps:(e,{disabled:t})=>{let n=T.current.panels.find(t=>t.id===e);n&&(n.panelConstraints.disabled=t);let r=Be(v),i=V(v);r&&i&&U(r,{...i,derivedPanelConstraints:ue(r)})},updateSeparatorProps:(e,{disabled:t,disableDoubleClick:n})=>{let r=T.current.separators.find(t=>t.id===e);r&&(r.disabled=t,r.disableDoubleClick=n)}}),[O,v,w,u,k]),A=(0,j.useRef)(null);return Q(()=>{let e=S.current;if(e===null)return;let t=T.current,n;if(k.defaultLayout!==void 0&&Object.keys(k.defaultLayout).length===t.panels.length){n={};for(let e of t.panels){let t=k.defaultLayout[e.id];t!==void 0&&(n[e.id]=t)}}let r={disabled:!!i,element:e,id:v,mutableState:{defaultLayout:n,disableCursor:!!k.disableCursor,expandedPanelSizes:T.current.lastExpandedPanelSizes,layouts:T.current.layouts},orientation:u,panels:t.panels,resizePreviewMode:d,get resizeTargetMinimumSize(){return k.resizeTargetMinimumSize},separators:t.separators};A.current=r;let a=wt(r),{defaultLayoutDeferred:o,derivedPanelConstraints:s,layout:c}=V(r.id,!0);!o&&s.length>0&&(g(c),_(c,!1));let l=Ve(v,e=>{let{defaultLayoutDeferred:t,derivedPanelConstraints:n,layout:i}=e.next;if(t||n.length===0)return;let a=r.panels.map(({id:e})=>e).join(`,`);r.mutableState.layouts[a]=i,n.forEach(t=>{if(t.collapsible){let{layout:n}=e.prev??{};if(n){let e=W(t.collapsedSize,i[t.panelId]),a=W(t.collapsedSize,n[t.panelId]);e&&!a&&(r.mutableState.expandedPanelSizes[t.panelId]=n[t.panelId])}}});let o=I(),s=o.state!==`active`||!o.hitRegions.some(e=>e.group===r);g(i),s&&_(i,e.isUserInteraction)});return()=>{A.current=null,a(),l()}},[i,v,_,g,u,C,d,k]),(0,j.useEffect)(()=>{let e=A.current;e&&(e.mutableState.defaultLayout=n,e.mutableState.disableCursor=!!r)}),(0,E.jsx)(kt.Provider,{value:ee,children:(0,E.jsxs)(`div`,{...m,className:t,"data-group":!0,"data-testid":v,id:v,ref:D,style:{height:`100%`,width:`100%`,overflow:`hidden`,position:d===`separator`?`relative`:void 0,...p,display:`flex`,flexDirection:u===`horizontal`?`row`:`column`,flexWrap:`nowrap`,touchAction:u===`horizontal`?`pan-y`:`pan-x`},children:[e,x.map(e=>(0,E.jsx)(Pt,{overlay:y,preview:e},e.key))]})})}Lt.displayName=`Group`;function Rt(e,t){let{id:n}=jt(),r=(0,j.useRef)({collapse:ve,expand:ve,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:ve});(0,j.useImperativeHandle)(t,()=>r.current,[]),Q(()=>{Object.assign(r.current,ot({groupId:n,panelId:e}))})}function zt({children:e,className:t,collapsedSize:n=`0%`,collapsedThreshold:r,collapsible:i=!1,defaultSize:a,disabled:o,elementRef:s,groupResizeBehavior:c=`preserve-relative-size`,id:l,maxSize:u=`100%`,minSize:d=`0%`,onResize:f,panelRef:p,style:m,...h}){let g=!!l,_=Et(l),v=Ot({disabled:o}),y=(0,j.useRef)(null),b=Dt(y,s),{getPanelStyles:x,id:S,orientation:C,registerPanel:w,updatePanelProps:T}=jt(),D=f!==null,O=$((e,t,n)=>{f?.(e,l,n)});Q(()=>{let e=y.current;if(e!==null){let t={element:e,id:_,idIsStable:g,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:D?O:void 0,panelConstraints:{groupResizeBehavior:c,collapsedSize:n,collapsedThreshold:r,collapsible:i,defaultSize:a,disabled:v.disabled,maxSize:u,minSize:d}};return w(t)}},[c,n,r,i,a,D,_,g,u,d,O,w,v]),(0,j.useEffect)(()=>{T(_,{disabled:o})},[o,_,T]),Rt(_,p);let k=()=>{let e=x(S,_);if(e)return JSON.stringify(e)},ee=(0,j.useSyncExternalStore)(e=>Ve(S,e),k,k),A;return A=ee?JSON.parse(ee):a===void 0?{flexGrow:1}:{flexGrow:void 0,flexShrink:void 0,flexBasis:a},(0,E.jsx)(`div`,{...h,"data-disabled":o||void 0,"data-panel":!0,"data-testid":_,id:_,ref:b,style:{...Bt,display:`flex`,flexBasis:0,flexShrink:1,overflow:`visible`,...A},children:(0,E.jsx)(`div`,{className:t,style:{maxHeight:`100%`,maxWidth:`100%`,flexGrow:1,overflow:`auto`,...m,touchAction:C===`horizontal`?`pan-y`:`pan-x`},children:e})})}zt.displayName=`Panel`;var Bt={minHeight:0,maxHeight:`100%`,height:`auto`,minWidth:0,maxWidth:`100%`,width:`auto`,border:`none`,borderWidth:0,padding:0,margin:0};function Vt(){return(0,j.useRef)(null)}function Ht({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let i,a,o=e[n],s=t.find(e=>e.panelId===n);if(s){let c=s.maxSize,l=s.collapsible?s.collapsedSize:s.minSize,u=[r,r+1];a=Y({layout:q({delta:l-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n],i=Y({layout:q({delta:c-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:a,valueNow:o}}function Ut({children:e,className:t,disabled:n,disableDoubleClick:r,elementRef:i,id:a,preview:o,style:s,...c}){let l=Et(a),u=Ot({disabled:n,disableDoubleClick:r,children:e,className:t,preview:o,style:s}),[d,f]=(0,j.useState)({}),[p,m]=(0,j.useState)(`inactive`),[h,g]=(0,j.useState)(!1),_=(0,j.useRef)(null),v=(0,j.useRef)(null),y=Dt(_,i),{disableCursor:b,id:x,orientation:S,registerSeparator:C,updateSeparatorProps:w}=jt(),T=S===`horizontal`?`vertical`:`horizontal`;Q(()=>{let e=_.current;if(e!==null){let t={disabled:u.disabled,disableDoubleClick:u.disableDoubleClick,element:e,id:l,get children(){return u.children},get className(){return u.className},get preview(){return u.preview},get style(){return u.style}};v.current=t;let n=C(t),r=pe(e=>{m(e.next.state!==`inactive`&&e.next.hitRegions.some(e=>e.separator===t)?e.next.state:`inactive`)}),i=Ve(x,e=>{let{derivedPanelConstraints:n,layout:r,separatorToPanels:i}=e.next,a=i.get(t);if(a){let e=a[0],t=n.findIndex(t=>t.panelId===e.id);f(Ht({layout:r,panelConstraints:n,panelId:e.id,panelIndex:t}))}});return()=>{v.current=null,r(),i(),n()}}},[x,l,C,u]),Q(()=>{let e=v.current;e&&he(e)},[o]),(0,j.useEffect)(()=>{w(l,{disabled:n,disableDoubleClick:r})},[n,r,l,w]);let D;n&&!b&&(D=`not-allowed`);let O;if(n)O=`disabled`;else switch(p){case`active`:O=`active`;break;default:O=h?`focus`:p}return(0,E.jsx)(`div`,{...c,"aria-controls":d.valueControls,"aria-disabled":n||void 0,"aria-orientation":T,"aria-valuemax":d.valueMax,"aria-valuemin":d.valueMin,"aria-valuenow":d.valueNow,children:e,className:t,"data-separator":O,"data-testid":l,id:l,onBlur:()=>g(!1),onFocus:()=>g(!0),ref:y,role:`separator`,style:{flexBasis:`auto`,cursor:D,...s,flexGrow:0,flexShrink:0,touchAction:`none`},tabIndex:n?void 0:0})}Ut.displayName=`Separator`;function Wt({className:e,...t}){return(0,E.jsx)(Lt,{className:a(`flex h-full w-full data-[orientation=vertical]:flex-col`,e),...t})}var Gt=zt;function Kt({withHandle:e,className:t,...n}){return(0,E.jsx)(Ut,{className:a(`relative flex items-center justify-center bg-border`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1`,`aria-[orientation=vertical]:w-px`,`aria-[orientation=vertical]:after:absolute aria-[orientation=vertical]:after:inset-y-0 aria-[orientation=vertical]:after:left-1/2 aria-[orientation=vertical]:after:w-1 aria-[orientation=vertical]:after:-translate-x-1/2`,`aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full`,`aria-[orientation=horizontal]:after:absolute aria-[orientation=horizontal]:after:inset-x-0 aria-[orientation=horizontal]:after:top-1/2 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:-translate-y-1/2`,`aria-[orientation=horizontal]:[&>div]:rotate-90`,t),...n,children:e?(0,E.jsx)(`div`,{className:`z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border`,children:(0,E.jsx)(r,{icon:y,className:`size-2.5`})}):null})}function qt(){let e=Vt(),[t,n]=(0,j.useState)(!0);return{panelRef:e,open:t,toggle:()=>{let t=e.current;t&&(t.isCollapsed()?(t.expand(),n(!0)):(t.collapse(),n(!1)))},onResize:()=>{n(!(e.current?.isCollapsed()??!1))}}}var Jt={flow:{icon:v,label:`Flow`,symbol:`Fl`},signal:{icon:b,label:`Signal`,symbol:`Sg`},store:{icon:g,label:`Store`,symbol:`St`},clock:{icon:m,label:`Clock`,symbol:`Ck`},gate:{icon:T,label:`Gate`,symbol:`Gt`},vault:{icon:x,label:`Vault`,symbol:`Vt`},channel:{icon:w,label:`Channel`,symbol:`Ch`},ai:{icon:p,label:`AI`,symbol:`Ai`}};export{y as _,Wt as a,h as b,ne as c,O as d,ee as f,b as g,x as h,Gt as i,D as l,T as m,qt as n,ie as o,A as p,Kt as r,re as s,Jt as t,te as u,_ as v,m as x,g as y};
@@ -1 +1 @@
1
- import{A as e}from"./xyflow-yApv7D4e.js";import{Dr as t,Qn as n}from"./shortcut-keys-3ILd8oGn.js";import{d as r,f as i,l as a,p as o,u as s}from"./element-icons-BI8cJgdh.js";var c=e();function l({icon:e,iconClassName:l,title:u,description:d,children:f,leading:p}){return(0,c.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[p?(0,c.jsx)(`header`,{className:n,children:(0,c.jsxs)(`div`,{className:`-ml-2 flex h-full shrink-0 items-stretch`,children:[p,(0,c.jsx)(`span`,{className:`w-px shrink-0 self-stretch bg-border/60`,"aria-hidden":!0})]})}):null,(0,c.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center p-6`,children:(0,c.jsxs)(a,{className:`border-0`,children:[(0,c.jsxs)(r,{children:[e?(0,c.jsx)(i,{variant:`icon`,className:l,children:(0,c.jsx)(t,{icon:e})}):null,(0,c.jsx)(o,{children:u}),d?(0,c.jsx)(s,{children:d}):null]}),f]})})]})}export{l as t};
1
+ import{A as e}from"./xyflow-yApv7D4e.js";import{Dr as t,Qn as n}from"./shortcut-keys-CUNegEV4.js";import{d as r,f as i,l as a,p as o,u as s}from"./element-icons-CwyLpVXz.js";var c=e();function l({icon:e,iconClassName:l,title:u,description:d,children:f,leading:p}){return(0,c.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[p?(0,c.jsx)(`header`,{className:n,children:(0,c.jsxs)(`div`,{className:`-ml-2 flex h-full shrink-0 items-stretch`,children:[p,(0,c.jsx)(`span`,{className:`w-px shrink-0 self-stretch bg-border/60`,"aria-hidden":!0})]})}):null,(0,c.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center p-6`,children:(0,c.jsxs)(a,{className:`border-0`,children:[(0,c.jsxs)(r,{children:[e?(0,c.jsx)(i,{variant:`icon`,className:l,children:(0,c.jsx)(t,{icon:e})}):null,(0,c.jsx)(o,{children:u}),d?(0,c.jsx)(s,{children:d}):null]}),f]})})]})}export{l as t};