@grindxp/cli 0.1.7 → 0.1.9

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 (57) hide show
  1. package/dist/index.js +766 -134
  2. package/dist/web/client/assets/Copy.es-Bs4NgJu-.js +1 -0
  3. package/dist/web/client/assets/Sword.es-2Xm7T3t2.js +1 -0
  4. package/dist/web/client/assets/geist-cyrillic-wght-normal-CHSlOQsW.woff2 +0 -0
  5. package/dist/web/client/assets/geist-latin-ext-wght-normal-DMtmJ5ZE.woff2 +0 -0
  6. package/dist/web/client/assets/geist-latin-wght-normal-Dm3htQBi.woff2 +0 -0
  7. package/dist/web/client/assets/index-6XDcqRbL.js +42 -0
  8. package/dist/web/client/assets/index-BXM1N6tm.js +1 -0
  9. package/dist/web/client/assets/index-B_KMiE38.js +1 -0
  10. package/dist/web/client/assets/index-CGj2rOLm.js +1 -0
  11. package/dist/web/client/assets/index-CS5BuFbt.js +1 -0
  12. package/dist/web/client/assets/index-CYsASiu-.js +1 -0
  13. package/dist/web/client/assets/index-DAvwM0SX.js +1 -0
  14. package/dist/web/client/assets/index-DCBFp5DJ.js +1 -0
  15. package/dist/web/client/assets/index-DjKt1qNz.js +1 -0
  16. package/dist/web/client/assets/index-PIcFs1vr.js +1 -0
  17. package/dist/web/client/assets/instrument-serif-latin-400-italic-DKMiL14s.woff2 +0 -0
  18. package/dist/web/client/assets/instrument-serif-latin-400-italic-u__WvvIK.woff +0 -0
  19. package/dist/web/client/assets/instrument-serif-latin-400-normal-BVbkICAY.woff +0 -0
  20. package/dist/web/client/assets/instrument-serif-latin-400-normal-DnYpCC2O.woff2 +0 -0
  21. package/dist/web/client/assets/instrument-serif-latin-ext-400-italic-C9HzH3YL.woff2 +0 -0
  22. package/dist/web/client/assets/instrument-serif-latin-ext-400-italic-D7-lnxEk.woff +0 -0
  23. package/dist/web/client/assets/instrument-serif-latin-ext-400-normal-C2je3j2s.woff2 +0 -0
  24. package/dist/web/client/assets/instrument-serif-latin-ext-400-normal-CFCUzsTy.woff +0 -0
  25. package/dist/web/client/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
  26. package/dist/web/client/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
  27. package/dist/web/client/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
  28. package/dist/web/client/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
  29. package/dist/web/client/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
  30. package/dist/web/client/assets/main-BI1EOhmt.js +18 -0
  31. package/dist/web/client/assets/styles-7TpWqjrh.css +1 -0
  32. package/dist/web/client/favicon.ico +0 -0
  33. package/dist/web/server/assets/_tanstack-start-manifest_v-B_rvI8DG.js +4 -0
  34. package/dist/web/server/assets/agent.functions-BL3upUNr.js +19541 -0
  35. package/dist/web/server/assets/data.functions-DZmdFOMQ.js +285 -0
  36. package/dist/web/server/assets/index-4SxmUYH6.js +14 -0
  37. package/dist/web/server/assets/index-B2ULpkv2.js +4587 -0
  38. package/dist/web/server/assets/index-BGBMycx-.js +2275 -0
  39. package/dist/web/server/assets/index-BL8u2X7w.js +14 -0
  40. package/dist/web/server/assets/index-BQUCDamI.js +5924 -0
  41. package/dist/web/server/assets/index-BRRsXrOi.js +14 -0
  42. package/dist/web/server/assets/index-BiD7uOOh.js +14 -0
  43. package/dist/web/server/assets/index-CB8UtTN8.js +66 -0
  44. package/dist/web/server/assets/index-D2yaimYL.js +14 -0
  45. package/dist/web/server/assets/index-D3RUqTdb.js +14 -0
  46. package/dist/web/server/assets/index-DTB2dYCz.js +1426 -0
  47. package/dist/web/server/assets/index-DfU25rnD.js +477 -0
  48. package/dist/web/server/assets/index-SHH7zSKt.js +66 -0
  49. package/dist/web/server/assets/router-CXyGzWDS.js +589 -0
  50. package/dist/web/server/assets/sessions-UCWtijHE.js +438 -0
  51. package/dist/web/server/assets/start-HYkvq4Ni.js +4 -0
  52. package/dist/web/server/assets/token-DGoahKjI.js +86 -0
  53. package/dist/web/server/assets/token-util-BopJPy-I.js +451 -0
  54. package/dist/web/server/assets/token-util-Bw35afYM.js +30 -0
  55. package/dist/web/server/assets/vault.server-CscY5Z8e.js +19357 -0
  56. package/dist/web/server/server.js +4889 -0
  57. package/package.json +53 -51
@@ -0,0 +1,42 @@
1
+ import{r as p,p as ve,b as Dc,d as Ic,g as ba,j as b,t as Rc,c as pe,e as wa,f as cs,u as Fc,l as jc,h as Hc,i as Nc,C as Oc}from"./main-BI1EOhmt.js";const Bc=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),p.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]),zc=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM183,80H160V57ZM116,212V192h8a12,12,0,0,0,0-24h-8V152h8a12,12,0,0,0,0-24h-8V116a12,12,0,0,0-24,0v12H84a12,12,0,0,0,0,24h8v16H84a12,12,0,0,0,0,24h8v20H60V44h76V92a12,12,0,0,0,12,12h48V212Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),p.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H112V200h8a8,8,0,0,0,0-16h-8V168h8a8,8,0,0,0,0-16h-8V136h8a8,8,0,0,0,0-16h-8v-8a8,8,0,0,0-16,0v8H88a8,8,0,0,0,0,16h8v16H88a8,8,0,0,0,0,16h8v16H88a8,8,0,0,0,0,16h8v16H56V40h88V88a8,8,0,0,0,8,8h48V216Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H92a4,4,0,0,0,4-4V208H88.27A8.17,8.17,0,0,1,80,200.53,8,8,0,0,1,88,192h8V176H88.27A8.17,8.17,0,0,1,80,168.53,8,8,0,0,1,88,160h8V144H88.27A8.17,8.17,0,0,1,80,136.53,8,8,0,0,1,88,128h8v-7.73a8.18,8.18,0,0,1,7.47-8.25,8,8,0,0,1,8.53,8v8h7.73a8.17,8.17,0,0,1,8.25,7.47,8,8,0,0,1-8,8.53h-8v16h7.73a8.17,8.17,0,0,1,8.25,7.47,8,8,0,0,1-8,8.53h-8v16h7.73a8.17,8.17,0,0,1,8.25,7.47,8,8,0,0,1-8,8.53h-8v20a4,4,0,0,0,4,4h84a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H110V198h10a6,6,0,0,0,0-12H110V166h10a6,6,0,0,0,0-12H110V134h10a6,6,0,0,0,0-12H110V112a6,6,0,0,0-12,0v10H88a6,6,0,0,0,0,12H98v20H88a6,6,0,0,0,0,12H98v20H88a6,6,0,0,0,0,12H98v20H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H112V200h8a8,8,0,0,0,0-16h-8V168h8a8,8,0,0,0,0-16h-8V136h8a8,8,0,0,0,0-16h-8v-8a8,8,0,0,0-16,0v8H88a8,8,0,0,0,0,16h8v16H88a8,8,0,0,0,0,16h8v16H88a8,8,0,0,0,0,16h8v16H56V40h88V88a8,8,0,0,0,8,8h48V216Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H108V196h12a4,4,0,0,0,0-8H108V164h12a4,4,0,0,0,0-8H108V132h12a4,4,0,0,0,0-8H108V112a4,4,0,0,0-8,0v12H88a4,4,0,0,0,0,8h12v24H88a4,4,0,0,0,0,8h12v24H88a4,4,0,0,0,0,8h12v24H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Z"}))]]),_c=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),p.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Z"}))]]),Zc=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M180.49,143.51a12,12,0,0,1,0,17l-24,24a12,12,0,0,1-17-17L155,152l-15.52-15.51a12,12,0,1,1,17-17Zm-64-24a12,12,0,0,0-17,0l-24,24a12,12,0,0,0,0,17l24,24a12,12,0,0,0,17-17L101,152l15.52-15.51A12,12,0,0,0,116.49,119.51ZM220,88V216a20,20,0,0,1-20,20H56a20,20,0,0,1-20-20V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88ZM160,57V80h23Zm36,155V104H148a12,12,0,0,1-12-12V44H60V212Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),p.createElement("path",{d:"M181.66,146.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32Zm-72-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,0,11.32l24,24a8,8,0,0,0,11.32-11.32L91.31,152l18.35-18.34A8,8,0,0,0,109.66,122.34ZM216,88V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Zm40,136V96H152a8,8,0,0,1-8-8V40H56V216H200Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34Zm-104,88a8,8,0,0,1-11.32,11.32l-24-24a8,8,0,0,1,0-11.32l24-24a8,8,0,0,1,11.32,11.32L91.31,152Zm72-12.68-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32l24,24A8,8,0,0,1,181.66,157.66ZM152,88V44l44,44Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M180.24,147.76a6,6,0,0,1,0,8.48l-24,24a6,6,0,0,1-8.48-8.48L167.51,152l-19.75-19.76a6,6,0,1,1,8.48-8.48Zm-72-24a6,6,0,0,0-8.48,0l-24,24a6,6,0,0,0,0,8.48l24,24a6,6,0,1,0,8.48-8.48L88.49,152l19.75-19.76A6,6,0,0,0,108.24,123.76ZM214,88V216a14,14,0,0,1-14,14H56a14,14,0,0,1-14-14V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88Zm-56-6h35.52L158,46.48Zm44,134V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2V216a2,2,0,0,0,2,2H200A2,2,0,0,0,202,216Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M181.66,146.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32Zm-72-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,0,11.32l24,24a8,8,0,0,0,11.32-11.32L91.31,152l18.35-18.34A8,8,0,0,0,109.66,122.34ZM216,88V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Zm40,136V96H152a8,8,0,0,1-8-8V40H56V216H200Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M178.83,149.17a4,4,0,0,1,0,5.66l-24,24a4,4,0,0,1-5.66-5.66L170.34,152l-21.17-21.17a4,4,0,1,1,5.66-5.66Zm-72-24a4,4,0,0,0-5.66,0l-24,24a4,4,0,0,0,0,5.66l24,24a4,4,0,1,0,5.66-5.66L85.66,152l21.17-21.17A4,4,0,0,0,106.83,125.17ZM212,88V216a12,12,0,0,1-12,12H56a12,12,0,0,1-12-12V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88Zm-56-4h42.34L156,41.65Zm48,132V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H200A4,4,0,0,0,204,216Z"}))]]),Uc=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M200,164v8h12a12,12,0,0,1,0,24H200v12a12,12,0,0,1-24,0V152a12,12,0,0,1,12-12h32a12,12,0,0,1,0,24ZM92,172a32,32,0,0,1-32,32H56v4a12,12,0,0,1-24,0V152a12,12,0,0,1,12-12H60A32,32,0,0,1,92,172Zm-24,0a8,8,0,0,0-8-8H56v16h4A8,8,0,0,0,68,172Zm100,8a40,40,0,0,1-40,40H112a12,12,0,0,1-12-12V152a12,12,0,0,1,12-12h16A40,40,0,0,1,168,180Zm-24,0a16,16,0,0,0-16-16h-4v32h4A16,16,0,0,0,144,180ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88v20a12,12,0,0,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,0,1-24,0ZM160,57V80h23Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),p.createElement("path",{d:"M224,152a8,8,0,0,1-8,8H192v16h16a8,8,0,0,1,0,16H192v16a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8h32A8,8,0,0,1,224,152ZM92,172a28,28,0,0,1-28,28H56v8a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8H64A28,28,0,0,1,92,172Zm-16,0a12,12,0,0,0-12-12H56v24h8A12,12,0,0,0,76,172Zm88,8a36,36,0,0,1-36,36H112a8,8,0,0,1-8-8V152a8,8,0,0,1,8-8h16A36,36,0,0,1,164,180Zm-16,0a20,20,0,0,0-20-20h-8v40h8A20,20,0,0,0,148,180ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.69L160,51.31Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M44,120H212a4,4,0,0,0,4-4V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76A4,4,0,0,0,44,120ZM152,44l44,44H152Zm72,108.53a8.18,8.18,0,0,1-8.25,7.47H192v16h15.73a8.17,8.17,0,0,1,8.25,7.47,8,8,0,0,1-8,8.53H192v15.73a8.17,8.17,0,0,1-7.47,8.25,8,8,0,0,1-8.53-8V152a8,8,0,0,1,8-8h32A8,8,0,0,1,224,152.53ZM64,144H48a8,8,0,0,0-8,8v55.73A8.17,8.17,0,0,0,47.47,216,8,8,0,0,0,56,208v-8h7.4c15.24,0,28.14-11.92,28.59-27.15A28,28,0,0,0,64,144Zm-.35,40H56V160h8a12,12,0,0,1,12,13.16A12.25,12.25,0,0,1,63.65,184ZM128,144H112a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8h15.32c19.66,0,36.21-15.48,36.67-35.13A36,36,0,0,0,128,144Zm-.49,56H120V160h8a20,20,0,0,1,20,20.77C147.58,191.59,138.34,200,127.51,200Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M222,152a6,6,0,0,1-6,6H190v20h18a6,6,0,0,1,0,12H190v18a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6h32A6,6,0,0,1,222,152ZM90,172a26,26,0,0,1-26,26H54v10a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6H64A26,26,0,0,1,90,172Zm-12,0a14,14,0,0,0-14-14H54v28H64A14,14,0,0,0,78,172Zm84,8a34,34,0,0,1-34,34H112a6,6,0,0,1-6-6V152a6,6,0,0,1,6-6h16A34,34,0,0,1,162,180Zm-12,0a22,22,0,0,0-22-22H118v44h10A22,22,0,0,0,150,180ZM42,112V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88v24a6,6,0,0,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,0,1-12,0ZM158,82h35.52L158,46.48Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,152a8,8,0,0,1-8,8H192v16h16a8,8,0,0,1,0,16H192v16a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8h32A8,8,0,0,1,224,152ZM92,172a28,28,0,0,1-28,28H56v8a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8H64A28,28,0,0,1,92,172Zm-16,0a12,12,0,0,0-12-12H56v24h8A12,12,0,0,0,76,172Zm88,8a36,36,0,0,1-36,36H112a8,8,0,0,1-8-8V152a8,8,0,0,1,8-8h16A36,36,0,0,1,164,180Zm-16,0a20,20,0,0,0-20-20h-8v40h8A20,20,0,0,0,148,180ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.69L160,51.31Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M220,152a4,4,0,0,1-4,4H188v24h20a4,4,0,0,1,0,8H188v20a4,4,0,0,1-8,0V152a4,4,0,0,1,4-4h32A4,4,0,0,1,220,152ZM88,172a24,24,0,0,1-24,24H52v12a4,4,0,0,1-8,0V152a4,4,0,0,1,4-4H64A24,24,0,0,1,88,172Zm-8,0a16,16,0,0,0-16-16H52v32H64A16,16,0,0,0,80,172Zm80,8a32,32,0,0,1-32,32H112a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4h16A32,32,0,0,1,160,180Zm-8,0a24,24,0,0,0-24-24H116v48h12A24,24,0,0,0,152,180ZM44,112V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88v24a4,4,0,0,1-8,0V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0ZM156,84h42.34L156,41.65Z"}))]]),$c=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Zm112-80a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,132Zm0,40a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,172Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),p.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-32-80a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,168Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,176H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm-8-56V44l44,44Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Zm-34-82a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,136Zm0,32a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,168Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-32-80a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,168Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Zm-36-84a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,136Zm0,32a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,168Z"}))]]),Wc=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M204,75.64V40a20,20,0,0,0-20-20H72A20,20,0,0,0,52,40V76a20.1,20.1,0,0,0,8,16l48,36L60,164a20.1,20.1,0,0,0-8,16v36a20,20,0,0,0,20,20H184a20,20,0,0,0,20-20V180.36a20.13,20.13,0,0,0-7.94-16L147.9,128l48.16-36.4A20.13,20.13,0,0,0,204,75.64ZM180,212H76V182l52-39,52,39.33Zm0-138.35L128,113,76,74V44H180Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M188.82,82,128,128,67.2,82.4A8,8,0,0,1,64,76V40a8,8,0,0,1,8-8H184a8,8,0,0,1,8,8V75.64A8,8,0,0,1,188.82,82ZM64,180v36a8,8,0,0,0,8,8H184a8,8,0,0,0,8-8V180.36a8,8,0,0,0-3.18-6.38L128,128,67.2,173.6A8,8,0,0,0,64,180Z",opacity:"0.2"}),p.createElement("path",{d:"M200,75.64V40a16,16,0,0,0-16-16H72A16,16,0,0,0,56,40V76a16.07,16.07,0,0,0,6.4,12.8L114.67,128,62.4,167.2A16.07,16.07,0,0,0,56,180v36a16,16,0,0,0,16,16H184a16,16,0,0,0,16-16V180.36a16.09,16.09,0,0,0-6.35-12.77L141.27,128l52.38-39.59A16.09,16.09,0,0,0,200,75.64ZM184,216H72V180l56-42,56,42.35Zm0-140.36L128,118,72,76V40H184Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M200,75.64V40a16,16,0,0,0-16-16H72A16,16,0,0,0,56,40V76a16.08,16.08,0,0,0,6.41,12.8L114.67,128,62.4,167.2A16.07,16.07,0,0,0,56,180v36a16,16,0,0,0,16,16H184a16,16,0,0,0,16-16V180.36a16,16,0,0,0-6.36-12.77L141.26,128l52.38-39.59A16.05,16.05,0,0,0,200,75.64Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M198,75.64V40a14,14,0,0,0-14-14H72A14,14,0,0,0,58,40V76a14.06,14.06,0,0,0,5.6,11.2L118,128,63.6,168.8A14.06,14.06,0,0,0,58,180v36a14,14,0,0,0,14,14H184a14,14,0,0,0,14-14V180.36a14.08,14.08,0,0,0-5.56-11.17L138,128l54.49-41.19A14.08,14.08,0,0,0,198,75.64ZM186,180.36V216a2,2,0,0,1-2,2H72a2,2,0,0,1-2-2V180a2,2,0,0,1,.8-1.6L128,135.51l57.22,43.25A2,2,0,0,1,186,180.36Zm0-104.72a2,2,0,0,1-.79,1.6L128,120.49,70.8,77.6A2,2,0,0,1,70,76V40a2,2,0,0,1,2-2H184a2,2,0,0,1,2,2Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M200,75.64V40a16,16,0,0,0-16-16H72A16,16,0,0,0,56,40V76a16.07,16.07,0,0,0,6.4,12.8L114.67,128,62.4,167.2A16.07,16.07,0,0,0,56,180v36a16,16,0,0,0,16,16H184a16,16,0,0,0,16-16V180.36a16.09,16.09,0,0,0-6.35-12.77L141.27,128l52.38-39.6A16.05,16.05,0,0,0,200,75.64ZM184,216H72V180l56-42,56,42.35Zm0-140.36L128,118,72,76V40H184Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M196,75.64V40a12,12,0,0,0-12-12H72A12,12,0,0,0,60,40V76a12,12,0,0,0,4.8,9.6L121.33,128,64.8,170.4A12,12,0,0,0,60,180v36a12,12,0,0,0,12,12H184a12,12,0,0,0,12-12V180.36a12.05,12.05,0,0,0-4.76-9.57L134.63,128l56.61-42.79A12.05,12.05,0,0,0,196,75.64Zm-8,104.72V216a4,4,0,0,1-4,4H72a4,4,0,0,1-4-4V180a4,4,0,0,1,1.6-3.2L128,133l58.42,44.16A4,4,0,0,1,188,180.36Zm0-104.72a4,4,0,0,1-1.59,3.19L128,123,69.6,79.2A4,4,0,0,1,68,76V40a4,4,0,0,1,4-4H184a4,4,0,0,1,4,4Z"}))]]),qc=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M84,108A12,12,0,0,1,96,96h64a12,12,0,0,1,0,24H96A12,12,0,0,1,84,108Zm32,28H96a12,12,0,0,0,0,24h20a12,12,0,0,0,0-24ZM228,48V156.69a19.86,19.86,0,0,1-5.86,14.14l-51.31,51.31A19.86,19.86,0,0,1,156.69,228H48a20,20,0,0,1-20-20V48A20,20,0,0,1,48,28H208A20,20,0,0,1,228,48ZM52,204h92V156a12,12,0,0,1,12-12h48V52H52Zm139-36H168v23Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,160l-56,56V160Z",opacity:"0.2"}),p.createElement("path",{d:"M88,96a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,96Zm8,40h64a8,8,0,0,0,0-16H96a8,8,0,0,0,0,16Zm32,16H96a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16ZM224,48V156.69A15.86,15.86,0,0,1,219.31,168L168,219.31A15.86,15.86,0,0,1,156.69,224H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48ZM48,208H152V160a8,8,0,0,1,8-8h48V48H48Zm120-40v28.7L196.69,168Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H156.69A15.92,15.92,0,0,0,168,219.31L219.31,168A15.92,15.92,0,0,0,224,156.69V48A16,16,0,0,0,208,32ZM96,88h64a8,8,0,0,1,0,16H96a8,8,0,0,1,0-16Zm32,80H96a8,8,0,0,1,0-16h32a8,8,0,0,1,0,16ZM96,136a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm64,68.69V160h44.7Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M90,96a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H96A6,6,0,0,1,90,96Zm6,38h64a6,6,0,0,0,0-12H96a6,6,0,0,0,0,12Zm32,20H96a6,6,0,0,0,0,12h32a6,6,0,0,0,0-12ZM222,48V156.69a13.94,13.94,0,0,1-4.1,9.9L166.59,217.9a13.94,13.94,0,0,1-9.9,4.1H48a14,14,0,0,1-14-14V48A14,14,0,0,1,48,34H208A14,14,0,0,1,222,48ZM48,210H154V160a6,6,0,0,1,6-6h50V48a2,2,0,0,0-2-2H48a2,2,0,0,0-2,2V208A2,2,0,0,0,48,210Zm153.52-44H166v35.52Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M88,96a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,96Zm8,40h64a8,8,0,0,0,0-16H96a8,8,0,0,0,0,16Zm32,16H96a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16ZM224,48V156.69A15.86,15.86,0,0,1,219.31,168L168,219.31A15.86,15.86,0,0,1,156.69,224H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48ZM48,208H152V160a8,8,0,0,1,8-8h48V48H48Zm120-40v28.7L196.69,168Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M92,96a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H96A4,4,0,0,1,92,96Zm4,36h64a4,4,0,0,0,0-8H96a4,4,0,0,0,0,8Zm32,24H96a4,4,0,0,0,0,8h32a4,4,0,0,0,0-8ZM220,48V156.69a11.9,11.9,0,0,1-3.52,8.48l-51.31,51.32a11.93,11.93,0,0,1-8.48,3.51H48a12,12,0,0,1-12-12V48A12,12,0,0,1,48,36H208A12,12,0,0,1,220,48ZM48,212H156V160a4,4,0,0,1,4-4h52V48a4,4,0,0,0-4-4H48a4,4,0,0,0-4,4V208A4,4,0,0,0,48,212Zm158.35-48H164v42.35Z"}))]]),Kc=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M230.14,25.86a20,20,0,0,0-19.57-5.11l-.22.07L18.44,79a20,20,0,0,0-3.06,37.25L99,157l40.71,83.65a19.81,19.81,0,0,0,18,11.38c.57,0,1.15,0,1.73-.07A19.82,19.82,0,0,0,177,237.56L235.18,45.65a1.42,1.42,0,0,0,.07-.22A20,20,0,0,0,230.14,25.86ZM156.91,221.07l-34.37-70.64,46-45.95a12,12,0,0,0-17-17l-46,46L34.93,99.09,210,46Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M223.69,42.18l-58.22,192a8,8,0,0,1-14.92,1.25L108,148,20.58,105.45a8,8,0,0,1,1.25-14.92l192-58.22A8,8,0,0,1,223.69,42.18Z",opacity:"0.2"}),p.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M225.88,30.12a13.83,13.83,0,0,0-13.7-3.58l-.11,0L20.14,84.77A14,14,0,0,0,18,110.85l85.56,41.64L145.12,238a13.87,13.87,0,0,0,12.61,8c.4,0,.81,0,1.21-.05a13.9,13.9,0,0,0,12.29-10.09l58.2-191.93,0-.11A13.83,13.83,0,0,0,225.88,30.12Zm-8,10.4L159.73,232.43l0,.11a2,2,0,0,1-3.76.26l-40.68-83.58,49-49a6,6,0,1,0-8.49-8.49l-49,49L23.15,100a2,2,0,0,1,.31-3.74l.11,0L215.48,38.08a1.94,1.94,0,0,1,1.92.52A2,2,0,0,1,217.92,40.52Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224.47,31.52a11.87,11.87,0,0,0-11.82-3L20.74,86.67a12,12,0,0,0-1.91,22.38L105,151l41.92,86.15A11.88,11.88,0,0,0,157.74,244c.34,0,.69,0,1,0a11.89,11.89,0,0,0,10.52-8.63l58.21-192,0-.08A11.85,11.85,0,0,0,224.47,31.52Zm-4.62,9.54-58.23,192a4,4,0,0,1-7.48.59l-41.3-84.86,50-50a4,4,0,1,0-5.66-5.66l-50,50-84.9-41.31a3.88,3.88,0,0,1-2.27-4,3.93,3.93,0,0,1,3-3.54L214.9,36.16A3.93,3.93,0,0,1,216,36a4,4,0,0,1,2.79,1.19A3.93,3.93,0,0,1,219.85,41.06Z"}))]]),Gc=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M212.48,136.49l-82.06,82a60,60,0,0,1-84.85-84.88l98.16-97.89a40,40,0,0,1,56.56,56.59l-.17.16-95.8,92.22a12,12,0,1,1-16.64-17.3l95.71-92.12a16,16,0,0,0-22.7-22.56L62.53,150.57a36,36,0,0,0,50.93,50.91l82.06-82a12,12,0,0,1,17,17Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M180.75,104.75,204,128l-82.06,81.94a48,48,0,0,1-67.88-67.88L153.37,41.37a32,32,0,0,1,45.26,45.26Z",opacity:"0.2"}),p.createElement("path",{d:"M209.66,122.34a8,8,0,0,1,0,11.32l-82.05,82a56,56,0,0,1-79.2-79.21L147.67,35.73a40,40,0,1,1,56.61,56.55L105,193A24,24,0,1,1,71,159L154.3,74.38A8,8,0,1,1,165.7,85.6L82.39,170.31a8,8,0,1,0,11.27,11.36L192.93,81A24,24,0,1,0,159,47L59.76,147.68a40,40,0,1,0,56.53,56.62l82.06-82A8,8,0,0,1,209.66,122.34Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,50.34a8,8,0,0,0-11.32,0L87.09,143A24,24,0,1,0,121,177l49.32-50.32a8,8,0,1,1,11.42,11.2l-49.37,50.38a40,40,0,1,1-56.62-56.51L143,63.09A24,24,0,1,1,177,97L109.71,165.6a8,8,0,1,1-11.42-11.2L165.6,85.71a8,8,0,0,0,.06-11.37Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208.25,123.76a6,6,0,0,1,0,8.49l-82.06,82a54,54,0,0,1-76.36-76.39L149.1,37.14a38,38,0,1,1,53.77,53.72L103.59,191.54a22,22,0,1,1-31.15-31.09l83.28-84.67a6,6,0,0,1,8.56,8.42L81,168.91a10,10,0,1,0,14.11,14.18L194.35,82.4a26,26,0,1,0-36.74-36.8L58.33,146.28a42,42,0,1,0,59.37,59.44l82.06-82A6,6,0,0,1,208.25,123.76Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M209.66,122.34a8,8,0,0,1,0,11.32l-82.05,82a56,56,0,0,1-79.2-79.21L147.67,35.73a40,40,0,1,1,56.61,56.55L105,193A24,24,0,1,1,71,159L154.3,74.38A8,8,0,1,1,165.7,85.6L82.39,170.31a8,8,0,1,0,11.27,11.36L192.93,81A24,24,0,1,0,159,47L59.76,147.68a40,40,0,1,0,56.53,56.62l82.06-82A8,8,0,0,1,209.66,122.34Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M206.83,125.17a4,4,0,0,1,0,5.66l-82.06,82a52,52,0,0,1-73.54-73.55L150.52,38.55a36,36,0,1,1,50.94,50.9l-99.3,100.69a20,20,0,1,1-28.3-28.27l83.29-84.68a4,4,0,1,1,5.7,5.61L79.54,167.5a12,12,0,1,0,16.95,17L195.78,83.81A28,28,0,1,0,156.2,44.18L56.91,144.87a44,44,0,1,0,62.21,62.26l82-82A4,4,0,0,1,206.83,125.17Z"}))]]),Xc=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),p.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"}))]]),Yc=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,160H60V60H196Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z",opacity:"0.2"}),p.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,158a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2H200a2,2,0,0,1,2,2Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,156a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4H200a4,4,0,0,1,4,4Z"}))]]),Qc=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM188,204H68V72H188ZM76,20A12,12,0,0,1,88,8h80a12,12,0,0,1,0,24H88A12,12,0,0,1,76,20Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),p.createElement("path",{d:"M216,48H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM192,208H64V64H192ZM80,24a8,8,0,0,1,8-8h80a8,8,0,0,1,0,16H88A8,8,0,0,1,80,24Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,56a8,8,0,0,1-8,8h-8V208a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V64H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,56ZM88,32h80a8,8,0,0,0,0-16H88a8,8,0,0,0,0,16Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM82,24a6,6,0,0,1,6-6h80a6,6,0,0,1,0,12H88A6,6,0,0,1,82,24Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,48H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM192,208H64V64H192ZM80,24a8,8,0,0,1,8-8h80a8,8,0,0,1,0,16H88A8,8,0,0,1,80,24Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM84,24a4,4,0,0,1,4-4h80a4,4,0,0,1,0,8H88A4,4,0,0,1,84,24Z"}))]]),Jc=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),p.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),li=p.forwardRef((e,t)=>p.createElement(ve,{ref:t,...e,weights:Bc}));li.displayName="CaretDownIcon";const ka=p.forwardRef((e,t)=>p.createElement(ve,{ref:t,...e,weights:zc}));ka.displayName="FileArchiveIcon";const Sn=p.forwardRef((e,t)=>p.createElement(ve,{ref:t,...e,weights:_c}));Sn.displayName="FileIcon";const va=p.forwardRef((e,t)=>p.createElement(ve,{ref:t,...e,weights:Zc}));va.displayName="FileCodeIcon";const Aa=p.forwardRef((e,t)=>p.createElement(ve,{ref:t,...e,weights:Uc}));Aa.displayName="FilePdfIcon";const Sa=p.forwardRef((e,t)=>p.createElement(ve,{ref:t,...e,weights:$c}));Sa.displayName="FileTextIcon";const Ea=p.forwardRef((e,t)=>p.createElement(ve,{ref:t,...e,weights:Wc}));Ea.displayName="HourglassIcon";const Ca=p.forwardRef((e,t)=>p.createElement(ve,{ref:t,...e,weights:qc}));Ca.displayName="NoteIcon";const Ta=p.forwardRef((e,t)=>p.createElement(ve,{ref:t,...e,weights:Kc}));Ta.displayName="PaperPlaneTiltIcon";const Pa=p.forwardRef((e,t)=>p.createElement(ve,{ref:t,...e,weights:Gc}));Pa.displayName="PaperclipIcon";const Ma=p.forwardRef((e,t)=>p.createElement(ve,{ref:t,...e,weights:Xc}));Ma.displayName="PlusIcon";const Va=p.forwardRef((e,t)=>p.createElement(ve,{ref:t,...e,weights:Yc}));Va.displayName="StopIcon";const Cr=p.forwardRef((e,t)=>p.createElement(ve,{ref:t,...e,weights:Qc}));Cr.displayName="TrashSimpleIcon";const ui=p.forwardRef((e,t)=>p.createElement(ve,{ref:t,...e,weights:Jc}));ui.displayName="XIcon";const eh=Dc({method:"POST"}).handler(Ic("6856120823d177dc2bccc2b8c490fcf0742fdb07eb32f1567908fb7b7e9d60b8"));function th(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const nh=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rh=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ih={};function hs(e,t){return(ih.jsx?rh:nh).test(e)}const sh=/[ \t\n\f\r]/g;function oh(e){return typeof e=="object"?e.type==="text"?fs(e.value):!1:fs(e)}function fs(e){return e.replace(sh,"")===""}class Jt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Jt.prototype.normal={};Jt.prototype.property={};Jt.prototype.space=void 0;function La(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Jt(n,r,t)}function Tr(e){return e.toLowerCase()}class Ae{constructor(t,n){this.attribute=n,this.property=t}}Ae.prototype.attribute="";Ae.prototype.booleanish=!1;Ae.prototype.boolean=!1;Ae.prototype.commaOrSpaceSeparated=!1;Ae.prototype.commaSeparated=!1;Ae.prototype.defined=!1;Ae.prototype.mustUseProperty=!1;Ae.prototype.number=!1;Ae.prototype.overloadedBoolean=!1;Ae.prototype.property="";Ae.prototype.spaceSeparated=!1;Ae.prototype.space=void 0;let ah=0;const W=at(),ce=at(),Pr=at(),V=at(),ie=at(),bt=at(),Ce=at();function at(){return 2**++ah}const Mr=Object.freeze(Object.defineProperty({__proto__:null,boolean:W,booleanish:ce,commaOrSpaceSeparated:Ce,commaSeparated:bt,number:V,overloadedBoolean:Pr,spaceSeparated:ie},Symbol.toStringTag,{value:"Module"})),Wn=Object.keys(Mr);class ci extends Ae{constructor(t,n,r,i){let o=-1;if(super(t,n),ds(this,"space",i),typeof r=="number")for(;++o<Wn.length;){const s=Wn[o];ds(this,Wn[o],(r&Mr[s])===Mr[s])}}}ci.prototype.defined=!0;function ds(e,t,n){n&&(e[t]=n)}function At(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new ci(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Tr(r)]=r,n[Tr(o.attribute)]=r}return new Jt(t,n,e.space)}const Da=At({properties:{ariaActiveDescendant:null,ariaAtomic:ce,ariaAutoComplete:null,ariaBusy:ce,ariaChecked:ce,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:ie,ariaCurrent:null,ariaDescribedBy:ie,ariaDetails:null,ariaDisabled:ce,ariaDropEffect:ie,ariaErrorMessage:null,ariaExpanded:ce,ariaFlowTo:ie,ariaGrabbed:ce,ariaHasPopup:null,ariaHidden:ce,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ie,ariaLevel:V,ariaLive:null,ariaModal:ce,ariaMultiLine:ce,ariaMultiSelectable:ce,ariaOrientation:null,ariaOwns:ie,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:ce,ariaReadOnly:ce,ariaRelevant:null,ariaRequired:ce,ariaRoleDescription:ie,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:ce,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Ia(e,t){return t in e?e[t]:t}function Ra(e,t){return Ia(e,t.toLowerCase())}const lh=At({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:bt,acceptCharset:ie,accessKey:ie,action:null,allow:null,allowFullScreen:W,allowPaymentRequest:W,allowUserMedia:W,alt:null,as:null,async:W,autoCapitalize:null,autoComplete:ie,autoFocus:W,autoPlay:W,blocking:ie,capture:null,charSet:null,checked:W,cite:null,className:ie,cols:V,colSpan:null,content:null,contentEditable:ce,controls:W,controlsList:ie,coords:V|bt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:W,defer:W,dir:null,dirName:null,disabled:W,download:Pr,draggable:ce,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:W,formTarget:null,headers:ie,height:V,hidden:Pr,high:V,href:null,hrefLang:null,htmlFor:ie,httpEquiv:ie,id:null,imageSizes:null,imageSrcSet:null,inert:W,inputMode:null,integrity:null,is:null,isMap:W,itemId:null,itemProp:ie,itemRef:ie,itemScope:W,itemType:ie,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:W,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:W,muted:W,name:null,nonce:null,noModule:W,noValidate:W,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:W,optimum:V,pattern:null,ping:ie,placeholder:null,playsInline:W,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:W,referrerPolicy:null,rel:ie,required:W,reversed:W,rows:V,rowSpan:V,sandbox:ie,scope:null,scoped:W,seamless:W,selected:W,shadowRootClonable:W,shadowRootDelegatesFocus:W,shadowRootMode:null,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:ce,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:W,useMap:null,value:ce,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ie,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:W,declare:W,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:W,noHref:W,noShade:W,noWrap:W,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:ce,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:W,disableRemotePlayback:W,prefix:null,property:null,results:V,security:null,unselectable:null},space:"html",transform:Ra}),uh=At({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ce,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:ie,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:W,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:bt,g2:bt,glyphName:bt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:Ce,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:V,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ie,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ce,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ce,rev:Ce,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ce,requiredFeatures:Ce,requiredFonts:Ce,requiredFormats:Ce,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:Ce,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ce,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ce,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ia}),Fa=At({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),ja=At({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ra}),Ha=At({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ch={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},hh=/[A-Z]/g,ps=/-[a-z]/g,fh=/^data[-\w.:]+$/i;function dh(e,t){const n=Tr(t);let r=t,i=Ae;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&fh.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(ps,mh);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!ps.test(o)){let s=o.replace(hh,ph);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=ci}return new i(r,t)}function ph(e){return"-"+e.toLowerCase()}function mh(e){return e.charAt(1).toUpperCase()}const gh=La([Da,lh,Fa,ja,Ha],"html"),hi=La([Da,uh,Fa,ja,Ha],"svg");function yh(e){return e.join(" ").trim()}var ct={},qn,ms;function xh(){if(ms)return qn;ms=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,a=/^\s+|\s+$/g,l=`
2
+ `,u="/",c="*",h="",f="comment",d="declaration";function m(k,y){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];y=y||{};var E=1,v=1;function P(O){var I=O.match(t);I&&(E+=I.length);var ee=O.lastIndexOf(l);v=~ee?O.length-ee:v+O.length}function C(){var O={line:E,column:v};return function(I){return I.position=new S(O),F(),I}}function S(O){this.start=O,this.end={line:E,column:v},this.source=y.source}S.prototype.content=k;function N(O){var I=new Error(y.source+":"+E+":"+v+": "+O);if(I.reason=O,I.filename=y.source,I.line=E,I.column=v,I.source=k,!y.silent)throw I}function L(O){var I=O.exec(k);if(I){var ee=I[0];return P(ee),k=k.slice(ee.length),I}}function F(){L(n)}function A(O){var I;for(O=O||[];I=R();)I!==!1&&O.push(I);return O}function R(){var O=C();if(!(u!=k.charAt(0)||c!=k.charAt(1))){for(var I=2;h!=k.charAt(I)&&(c!=k.charAt(I)||u!=k.charAt(I+1));)++I;if(I+=2,h===k.charAt(I-1))return N("End of comment missing");var ee=k.slice(2,I-2);return v+=2,P(ee),k=k.slice(I),v+=2,O({type:f,comment:ee})}}function j(){var O=C(),I=L(r);if(I){if(R(),!L(i))return N("property missing ':'");var ee=L(o),$=O({type:d,property:w(I[0].replace(e,h)),value:ee?w(ee[0].replace(e,h)):h});return L(s),$}}function G(){var O=[];A(O);for(var I;I=j();)I!==!1&&(O.push(I),A(O));return O}return F(),G()}function w(k){return k?k.replace(a,h):h}return qn=m,qn}var gs;function bh(){if(gs)return ct;gs=1;var e=ct&&ct.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ct,"__esModule",{value:!0}),ct.default=n;const t=e(xh());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const s=(0,t.default)(r),a=typeof i=="function";return s.forEach(l=>{if(l.type!=="declaration")return;const{property:u,value:c}=l;a?i(u,c,l):c&&(o=o||{},o[u]=c)}),o}return ct}var Lt={},ys;function wh(){if(ys)return Lt;ys=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(u){return!u||n.test(u)||e.test(u)},s=function(u,c){return c.toUpperCase()},a=function(u,c){return"".concat(c,"-")},l=function(u,c){return c===void 0&&(c={}),o(u)?u:(u=u.toLowerCase(),c.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(t,s))};return Lt.camelCase=l,Lt}var Dt,xs;function kh(){if(xs)return Dt;xs=1;var e=Dt&&Dt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(bh()),n=wh();function r(i,o){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(a,l){a&&l&&(s[(0,n.camelCase)(a,o)]=l)}),s}return r.default=r,Dt=r,Dt}var vh=kh();const Ah=ba(vh),Na=Oa("end"),fi=Oa("start");function Oa(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Sh(e){const t=fi(e),n=Na(e);if(t&&n)return{start:t,end:n}}function Ht(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?bs(e.position):"start"in e||"end"in e?bs(e):"line"in e||"column"in e?Vr(e):""}function Vr(e){return ws(e&&e.line)+":"+ws(e&&e.column)}function bs(e){return Vr(e&&e.start)+"-"+Vr(e&&e.end)}function ws(e){return e&&typeof e=="number"?e:1}class ye extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=Ht(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ye.prototype.file="";ye.prototype.name="";ye.prototype.reason="";ye.prototype.message="";ye.prototype.stack="";ye.prototype.column=void 0;ye.prototype.line=void 0;ye.prototype.ancestors=void 0;ye.prototype.cause=void 0;ye.prototype.fatal=void 0;ye.prototype.place=void 0;ye.prototype.ruleId=void 0;ye.prototype.source=void 0;const di={}.hasOwnProperty,Eh=new Map,Ch=/[A-Z]/g,Th=new Set(["table","tbody","thead","tfoot","tr"]),Ph=new Set(["td","th"]),Ba="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Mh(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Hh(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=jh(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?hi:gh,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=za(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function za(e,t,n){if(t.type==="element")return Vh(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Lh(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Ih(e,t,n);if(t.type==="mdxjsEsm")return Dh(e,t);if(t.type==="root")return Rh(e,t,n);if(t.type==="text")return Fh(e,t)}function Vh(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=hi,e.schema=i),e.ancestors.push(t);const o=Za(e,t.tagName,!1),s=Nh(e,t);let a=mi(e,t);return Th.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!oh(l):!0})),_a(e,s,o,t),pi(s,a),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function Lh(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ut(e,t.position)}function Dh(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ut(e,t.position)}function Ih(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=hi,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Za(e,t.name,!0),s=Oh(e,t),a=mi(e,t);return _a(e,s,o,t),pi(s,a),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function Rh(e,t,n){const r={};return pi(r,mi(e,t)),e.create(t,e.Fragment,r,n)}function Fh(e,t){return t.value}function _a(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function pi(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function jh(e,t,n){return r;function r(i,o,s,a){const u=Array.isArray(s.children)?n:t;return a?u(o,s,a):u(o,s)}}function Hh(e,t){return n;function n(r,i,o,s){const a=Array.isArray(o.children),l=fi(r);return t(i,o,s,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Nh(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&di.call(t.properties,i)){const o=Bh(e,i,t.properties[i]);if(o){const[s,a]=o;e.tableCellAlignToStyle&&s==="align"&&typeof a=="string"&&Ph.has(t.tagName)?r=a:n[s]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Oh(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const a=s.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Ut(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else Ut(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function mi(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Eh;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const l=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(l){const u=i.get(l)||0;s=l+"-"+u,i.set(l,u+1)}}const a=za(e,o,s);a!==void 0&&n.push(a)}return n}function Bh(e,t,n){const r=dh(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?th(n):yh(n)),r.property==="style"){let i=typeof n=="object"?n:zh(e,String(n));return e.stylePropertyNameCase==="css"&&(i=_h(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?ch[r.property]||r.property:r.attribute,n]}}function zh(e,t){try{return Ah(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ye("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Ba+"#cannot-parse-style-attribute",i}}function Za(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,s;for(;++o<i.length;){const a=hs(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};s=s?{type:"MemberExpression",object:s,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=s}else r=hs(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return di.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ut(e)}function Ut(e,t){const n=new ye("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Ba+"#cannot-handle-mdx-estrees-without-createevaluater",n}function _h(e){const t={};let n;for(n in e)di.call(e,n)&&(t[Zh(n)]=e[n]);return t}function Zh(e){let t=e.replace(Ch,Uh);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Uh(e){return"-"+e.toLowerCase()}const Kn={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},$h={};function gi(e,t){const n=$h,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ua(e,r,i)}function Ua(e,t,n){if(Wh(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ks(e.children,t,n)}return Array.isArray(e)?ks(e,t,n):""}function ks(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ua(e[i],t,n);return r.join("")}function Wh(e){return!!(e&&typeof e=="object")}const vs=document.createElement("i");function yi(e){const t="&"+e+";";vs.innerHTML=t;const n=vs.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Te(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function Pe(e,t){return e.length>0?(Te(e,e.length,0,t),e):t}const As={}.hasOwnProperty;function $a(e){const t={};let n=-1;for(;++n<e.length;)qh(t,e[n]);return t}function qh(e,t){let n;for(n in t){const i=(As.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){As.call(i,s)||(i[s]=[]);const a=o[s];Kh(i[s],Array.isArray(a)?a:a?[a]:[])}}}function Kh(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Te(e,0,0,r)}function Wa(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Re(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const xe=Ye(/[A-Za-z]/),me=Ye(/[\dA-Za-z]/),Gh=Ye(/[#-'*+\--9=?A-Z^-~]/);function En(e){return e!==null&&(e<32||e===127)}const Lr=Ye(/\d/),Xh=Ye(/[\dA-Fa-f]/),Yh=Ye(/[!-/:-@[-`{-~]/);function _(e){return e!==null&&e<-2}function re(e){return e!==null&&(e<0||e===32)}function Y(e){return e===-2||e===-1||e===32}const Hn=Ye(new RegExp("\\p{P}|\\p{S}","u")),ot=Ye(/\s/);function Ye(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function St(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&me(e.charCodeAt(n+1))&&me(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function J(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(l){return Y(l)?(e.enter(n),a(l)):t(l)}function a(l){return Y(l)&&o++<i?(e.consume(l),a):(e.exit(n),t(l))}}const Qh={tokenize:Jh};function Jh(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),J(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,s(a)}function s(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return _(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),s)}}const ef={tokenize:tf},Ss={tokenize:nf};function tf(e){const t=this,n=[];let r=0,i,o,s;return a;function a(v){if(r<n.length){const P=n[r];return t.containerState=P[1],e.attempt(P[0].continuation,l,u)(v)}return u(v)}function l(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&E();const P=t.events.length;let C=P,S;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){S=t.events[C][1].end;break}y(r);let N=P;for(;N<t.events.length;)t.events[N][1].end={...S},N++;return Te(t.events,C+1,0,t.events.slice(P)),t.events.length=N,u(v)}return a(v)}function u(v){if(r===n.length){if(!i)return f(v);if(i.currentConstruct&&i.currentConstruct.concrete)return m(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ss,c,h)(v)}function c(v){return i&&E(),y(r),f(v)}function h(v){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,m(v)}function f(v){return t.containerState={},e.attempt(Ss,d,m)(v)}function d(v){return r++,n.push([t.currentConstruct,t.containerState]),f(v)}function m(v){if(v===null){i&&E(),y(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),w(v)}function w(v){if(v===null){k(e.exit("chunkFlow"),!0),y(0),e.consume(v);return}return _(v)?(e.consume(v),k(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),w)}function k(v,P){const C=t.sliceStream(v);if(P&&C.push(null),v.previous=o,o&&(o.next=v),o=v,i.defineSkip(v.start),i.write(C),t.parser.lazy[v.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<s&&(!i.events[S][1].end||i.events[S][1].end.offset>s))return;const N=t.events.length;let L=N,F,A;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){if(F){A=t.events[L][1].end;break}F=!0}for(y(r),S=N;S<t.events.length;)t.events[S][1].end={...A},S++;Te(t.events,L+1,0,t.events.slice(N)),t.events.length=S}}function y(v){let P=n.length;for(;P-- >v;){const C=n[P];t.containerState=C[1],C[0].exit.call(t,e)}n.length=v}function E(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function nf(e,t,n){return J(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function kt(e){if(e===null||re(e)||ot(e))return 1;if(Hn(e))return 2}function Nn(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Dr={name:"attention",resolveAll:rf,tokenize:sf};function rf(e,t){let n=-1,r,i,o,s,a,l,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},f={...e[n][1].start};Es(h,-l),Es(f,l),s={type:l>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},o={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},e[r][1].end={...s.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Pe(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Pe(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),u=Pe(u,Nn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Pe(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=Pe(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Te(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function sf(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=kt(r);let o;return s;function s(l){return o=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===o)return e.consume(l),a;const u=e.exit("attentionSequence"),c=kt(l),h=!c||c===2&&i||n.includes(l),f=!i||i===2&&c||n.includes(r);return u._open=!!(o===42?h:h&&(i||!f)),u._close=!!(o===42?f:f&&(c||!h)),t(l)}}function Es(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const of={name:"autolink",tokenize:af};function af(e,t,n){let r=0;return i;function i(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(d){return xe(d)?(e.consume(d),s):d===64?n(d):u(d)}function s(d){return d===43||d===45||d===46||me(d)?(r=1,a(d)):u(d)}function a(d){return d===58?(e.consume(d),r=0,l):(d===43||d===45||d===46||me(d))&&r++<32?(e.consume(d),a):(r=0,u(d))}function l(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||En(d)?n(d):(e.consume(d),l)}function u(d){return d===64?(e.consume(d),c):Gh(d)?(e.consume(d),u):n(d)}function c(d){return me(d)?h(d):n(d)}function h(d){return d===46?(e.consume(d),r=0,c):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):f(d)}function f(d){if((d===45||me(d))&&r++<63){const m=d===45?f:h;return e.consume(d),m}return n(d)}}const en={partial:!0,tokenize:lf};function lf(e,t,n){return r;function r(o){return Y(o)?J(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||_(o)?t(o):n(o)}}const qa={continuation:{tokenize:cf},exit:hf,name:"blockQuote",tokenize:uf};function uf(e,t,n){const r=this;return i;function i(s){if(s===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return Y(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function cf(e,t,n){const r=this;return i;function i(s){return Y(s)?J(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(qa,t,n)(s)}}function hf(e){e.exit("blockQuote")}const Ka={name:"characterEscape",tokenize:ff};function ff(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Yh(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Ga={name:"characterReference",tokenize:df};function df(e,t,n){const r=this;let i=0,o,s;return a;function a(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),l}function l(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,s=me,c(h))}function u(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=Xh,c):(e.enter("characterReferenceValue"),o=7,s=Lr,c(h))}function c(h){if(h===59&&i){const f=e.exit("characterReferenceValue");return s===me&&!yi(r.sliceSerialize(f))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(h)&&i++<o?(e.consume(h),c):n(h)}}const Cs={partial:!0,tokenize:mf},Ts={concrete:!0,name:"codeFenced",tokenize:pf};function pf(e,t,n){const r=this,i={partial:!0,tokenize:C};let o=0,s=0,a;return l;function l(S){return u(S)}function u(S){const N=r.events[r.events.length-1];return o=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,a=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(S)}function c(S){return S===a?(s++,e.consume(S),c):s<3?n(S):(e.exit("codeFencedFenceSequence"),Y(S)?J(e,h,"whitespace")(S):h(S))}function h(S){return S===null||_(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(Cs,w,P)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(S))}function f(S){return S===null||_(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(S)):Y(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),J(e,d,"whitespace")(S)):S===96&&S===a?n(S):(e.consume(S),f)}function d(S){return S===null||_(S)?h(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===null||_(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(S)):S===96&&S===a?n(S):(e.consume(S),m)}function w(S){return e.attempt(i,P,k)(S)}function k(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),y}function y(S){return o>0&&Y(S)?J(e,E,"linePrefix",o+1)(S):E(S)}function E(S){return S===null||_(S)?e.check(Cs,w,P)(S):(e.enter("codeFlowValue"),v(S))}function v(S){return S===null||_(S)?(e.exit("codeFlowValue"),E(S)):(e.consume(S),v)}function P(S){return e.exit("codeFenced"),t(S)}function C(S,N,L){let F=0;return A;function A(I){return S.enter("lineEnding"),S.consume(I),S.exit("lineEnding"),R}function R(I){return S.enter("codeFencedFence"),Y(I)?J(S,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):j(I)}function j(I){return I===a?(S.enter("codeFencedFenceSequence"),G(I)):L(I)}function G(I){return I===a?(F++,S.consume(I),G):F>=s?(S.exit("codeFencedFenceSequence"),Y(I)?J(S,O,"whitespace")(I):O(I)):L(I)}function O(I){return I===null||_(I)?(S.exit("codeFencedFence"),N(I)):L(I)}}}function mf(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Gn={name:"codeIndented",tokenize:yf},gf={partial:!0,tokenize:xf};function yf(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),J(e,o,"linePrefix",5)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?l(u):_(u)?e.attempt(gf,s,l)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||_(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),a)}function l(u){return e.exit("codeIndented"),t(u)}}function xf(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):_(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):J(e,o,"linePrefix",5)(s)}function o(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):_(s)?i(s):n(s)}}const bf={name:"codeText",previous:kf,resolve:wf,tokenize:vf};function wf(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function kf(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function vf(e,t,n){let r=0,i,o;return s;function s(h){return e.enter("codeText"),e.enter("codeTextSequence"),a(h)}function a(h){return h===96?(e.consume(h),r++,a):(e.exit("codeTextSequence"),l(h))}function l(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),l):h===96?(o=e.enter("codeTextSequence"),i=0,c(h)):_(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(h))}function u(h){return h===null||h===32||h===96||_(h)?(e.exit("codeTextData"),l(h)):(e.consume(h),u)}function c(h){return h===96?(e.consume(h),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(o.type="codeTextData",u(h))}}class Af{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&It(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),It(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),It(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);It(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);It(this.left,n.reverse())}}}function It(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Xa(e){const t={};let n=-1,r,i,o,s,a,l,u;const c=new Af(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Sf(c,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=c.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},a=c.slice(i,n),a.unshift(r),c.splice(i,n-i+1,a))}}return Te(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function Sf(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const a=s.events,l=[],u={};let c,h,f=-1,d=n,m=0,w=0;const k=[w];for(;d;){for(;e.get(++i)[1]!==d;);o.push(i),d._tokenizer||(c=r.sliceStream(d),d.next||c.push(null),h&&s.defineSkip(d.start),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),h=d,d=d.next}for(d=n;++f<a.length;)a[f][0]==="exit"&&a[f-1][0]==="enter"&&a[f][1].type===a[f-1][1].type&&a[f][1].start.line!==a[f][1].end.line&&(w=f+1,k.push(w),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(s.events=[],d?(d._tokenizer=void 0,d.previous=void 0):k.pop(),f=k.length;f--;){const y=a.slice(k[f],k[f+1]),E=o.pop();l.push([E,E+y.length-1]),e.splice(E,2,y)}for(l.reverse(),f=-1;++f<l.length;)u[m+l[f][0]]=m+l[f][1],m+=l[f][1]-l[f][0]-1;return u}const Ef={resolve:Tf,tokenize:Pf},Cf={partial:!0,tokenize:Mf};function Tf(e){return Xa(e),e}function Pf(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):_(a)?e.check(Cf,s,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function s(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Mf(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),J(e,o,"linePrefix")}function o(s){if(s===null||_(s))return n(s);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Ya(e,t,n,r,i,o,s,a,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return h;function h(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),f):y===null||y===32||y===41||En(y)?n(y):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),w(y))}function f(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),d(y))}function d(y){return y===62?(e.exit("chunkString"),e.exit(a),f(y)):y===null||y===60||_(y)?n(y):(e.consume(y),y===92?m:d)}function m(y){return y===60||y===62||y===92?(e.consume(y),d):d(y)}function w(y){return!c&&(y===null||y===41||re(y))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(y)):c<u&&y===40?(e.consume(y),c++,w):y===41?(e.consume(y),c--,w):y===null||y===32||y===40||En(y)?n(y):(e.consume(y),y===92?k:w)}function k(y){return y===40||y===41||y===92?(e.consume(y),w):w(y)}}function Qa(e,t,n,r,i,o){const s=this;let a=0,l;return u;function u(d){return e.enter(r),e.enter(i),e.consume(d),e.exit(i),e.enter(o),c}function c(d){return a>999||d===null||d===91||d===93&&!l||d===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(d):d===93?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):_(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),h(d))}function h(d){return d===null||d===91||d===93||_(d)||a++>999?(e.exit("chunkString"),c(d)):(e.consume(d),l||(l=!Y(d)),d===92?f:h)}function f(d){return d===91||d===92||d===93?(e.consume(d),a++,h):h(d)}}function Ja(e,t,n,r,i,o){let s;return a;function a(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),s=f===40?41:f,l):n(f)}function l(f){return f===s?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(o),u(f))}function u(f){return f===s?(e.exit(o),l(s)):f===null?n(f):_(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),J(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===s||f===null||_(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?h:c)}function h(f){return f===s||f===92?(e.consume(f),c):c(f)}}function Nt(e,t){let n;return r;function r(i){return _(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Y(i)?J(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Vf={name:"definition",tokenize:Df},Lf={partial:!0,tokenize:If};function Df(e,t,n){const r=this;let i;return o;function o(d){return e.enter("definition"),s(d)}function s(d){return Qa.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function a(d){return i=Re(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),l):n(d)}function l(d){return re(d)?Nt(e,u)(d):u(d)}function u(d){return Ya(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return e.attempt(Lf,h,h)(d)}function h(d){return Y(d)?J(e,f,"whitespace")(d):f(d)}function f(d){return d===null||_(d)?(e.exit("definition"),r.parser.defined.push(i),t(d)):n(d)}}function If(e,t,n){return r;function r(a){return re(a)?Nt(e,i)(a):n(a)}function i(a){return Ja(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return Y(a)?J(e,s,"whitespace")(a):s(a)}function s(a){return a===null||_(a)?t(a):n(a)}}const Rf={name:"hardBreakEscape",tokenize:Ff};function Ff(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return _(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const jf={name:"headingAtx",resolve:Hf,tokenize:Nf};function Hf(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Te(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Nf(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||re(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||_(c)?(e.exit("atxHeading"),t(c)):Y(c)?J(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||re(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}const Of=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ps=["pre","script","style","textarea"],Bf={concrete:!0,name:"htmlFlow",resolveTo:Zf,tokenize:Uf},zf={partial:!0,tokenize:Wf},_f={partial:!0,tokenize:$f};function Zf(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Uf(e,t,n){const r=this;let i,o,s,a,l;return u;function u(g){return c(g)}function c(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),h}function h(g){return g===33?(e.consume(g),f):g===47?(e.consume(g),o=!0,w):g===63?(e.consume(g),i=3,r.interrupt?t:x):xe(g)?(e.consume(g),s=String.fromCharCode(g),k):n(g)}function f(g){return g===45?(e.consume(g),i=2,d):g===91?(e.consume(g),i=5,a=0,m):xe(g)?(e.consume(g),i=4,r.interrupt?t:x):n(g)}function d(g){return g===45?(e.consume(g),r.interrupt?t:x):n(g)}function m(g){const X="CDATA[";return g===X.charCodeAt(a++)?(e.consume(g),a===X.length?r.interrupt?t:j:m):n(g)}function w(g){return xe(g)?(e.consume(g),s=String.fromCharCode(g),k):n(g)}function k(g){if(g===null||g===47||g===62||re(g)){const X=g===47,Z=s.toLowerCase();return!X&&!o&&Ps.includes(Z)?(i=1,r.interrupt?t(g):j(g)):Of.includes(s.toLowerCase())?(i=6,X?(e.consume(g),y):r.interrupt?t(g):j(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(g):o?E(g):v(g))}return g===45||me(g)?(e.consume(g),s+=String.fromCharCode(g),k):n(g)}function y(g){return g===62?(e.consume(g),r.interrupt?t:j):n(g)}function E(g){return Y(g)?(e.consume(g),E):A(g)}function v(g){return g===47?(e.consume(g),A):g===58||g===95||xe(g)?(e.consume(g),P):Y(g)?(e.consume(g),v):A(g)}function P(g){return g===45||g===46||g===58||g===95||me(g)?(e.consume(g),P):C(g)}function C(g){return g===61?(e.consume(g),S):Y(g)?(e.consume(g),C):v(g)}function S(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),l=g,N):Y(g)?(e.consume(g),S):L(g)}function N(g){return g===l?(e.consume(g),l=null,F):g===null||_(g)?n(g):(e.consume(g),N)}function L(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||re(g)?C(g):(e.consume(g),L)}function F(g){return g===47||g===62||Y(g)?v(g):n(g)}function A(g){return g===62?(e.consume(g),R):n(g)}function R(g){return g===null||_(g)?j(g):Y(g)?(e.consume(g),R):n(g)}function j(g){return g===45&&i===2?(e.consume(g),ee):g===60&&i===1?(e.consume(g),$):g===62&&i===4?(e.consume(g),M):g===63&&i===3?(e.consume(g),x):g===93&&i===5?(e.consume(g),z):_(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(zf,K,G)(g)):g===null||_(g)?(e.exit("htmlFlowData"),G(g)):(e.consume(g),j)}function G(g){return e.check(_f,O,K)(g)}function O(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),I}function I(g){return g===null||_(g)?G(g):(e.enter("htmlFlowData"),j(g))}function ee(g){return g===45?(e.consume(g),x):j(g)}function $(g){return g===47?(e.consume(g),s="",B):j(g)}function B(g){if(g===62){const X=s.toLowerCase();return Ps.includes(X)?(e.consume(g),M):j(g)}return xe(g)&&s.length<8?(e.consume(g),s+=String.fromCharCode(g),B):j(g)}function z(g){return g===93?(e.consume(g),x):j(g)}function x(g){return g===62?(e.consume(g),M):g===45&&i===2?(e.consume(g),x):j(g)}function M(g){return g===null||_(g)?(e.exit("htmlFlowData"),K(g)):(e.consume(g),M)}function K(g){return e.exit("htmlFlow"),t(g)}}function $f(e,t,n){const r=this;return i;function i(s){return _(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function Wf(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(en,t,n)}}const qf={name:"htmlText",tokenize:Kf};function Kf(e,t,n){const r=this;let i,o,s;return a;function a(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),l}function l(x){return x===33?(e.consume(x),u):x===47?(e.consume(x),C):x===63?(e.consume(x),v):xe(x)?(e.consume(x),L):n(x)}function u(x){return x===45?(e.consume(x),c):x===91?(e.consume(x),o=0,m):xe(x)?(e.consume(x),E):n(x)}function c(x){return x===45?(e.consume(x),d):n(x)}function h(x){return x===null?n(x):x===45?(e.consume(x),f):_(x)?(s=h,$(x)):(e.consume(x),h)}function f(x){return x===45?(e.consume(x),d):h(x)}function d(x){return x===62?ee(x):x===45?f(x):h(x)}function m(x){const M="CDATA[";return x===M.charCodeAt(o++)?(e.consume(x),o===M.length?w:m):n(x)}function w(x){return x===null?n(x):x===93?(e.consume(x),k):_(x)?(s=w,$(x)):(e.consume(x),w)}function k(x){return x===93?(e.consume(x),y):w(x)}function y(x){return x===62?ee(x):x===93?(e.consume(x),y):w(x)}function E(x){return x===null||x===62?ee(x):_(x)?(s=E,$(x)):(e.consume(x),E)}function v(x){return x===null?n(x):x===63?(e.consume(x),P):_(x)?(s=v,$(x)):(e.consume(x),v)}function P(x){return x===62?ee(x):v(x)}function C(x){return xe(x)?(e.consume(x),S):n(x)}function S(x){return x===45||me(x)?(e.consume(x),S):N(x)}function N(x){return _(x)?(s=N,$(x)):Y(x)?(e.consume(x),N):ee(x)}function L(x){return x===45||me(x)?(e.consume(x),L):x===47||x===62||re(x)?F(x):n(x)}function F(x){return x===47?(e.consume(x),ee):x===58||x===95||xe(x)?(e.consume(x),A):_(x)?(s=F,$(x)):Y(x)?(e.consume(x),F):ee(x)}function A(x){return x===45||x===46||x===58||x===95||me(x)?(e.consume(x),A):R(x)}function R(x){return x===61?(e.consume(x),j):_(x)?(s=R,$(x)):Y(x)?(e.consume(x),R):F(x)}function j(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,G):_(x)?(s=j,$(x)):Y(x)?(e.consume(x),j):(e.consume(x),O)}function G(x){return x===i?(e.consume(x),i=void 0,I):x===null?n(x):_(x)?(s=G,$(x)):(e.consume(x),G)}function O(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||re(x)?F(x):(e.consume(x),O)}function I(x){return x===47||x===62||re(x)?F(x):n(x)}function ee(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function $(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),B}function B(x){return Y(x)?J(e,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):z(x)}function z(x){return e.enter("htmlTextData"),s(x)}}const xi={name:"labelEnd",resolveAll:Qf,resolveTo:Jf,tokenize:ed},Gf={tokenize:td},Xf={tokenize:nd},Yf={tokenize:rd};function Qf(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Te(e,0,e.length,n),e}function Jf(e,t){let n=e.length,r=0,i,o,s,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const l={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},c={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return a=[["enter",l,t],["enter",u,t]],a=Pe(a,e.slice(o+1,o+r+3)),a=Pe(a,[["enter",c,t]]),a=Pe(a,Nn(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),a=Pe(a,[["exit",c,t],e[s-2],e[s-1],["exit",u,t]]),a=Pe(a,e.slice(s+1)),a=Pe(a,[["exit",l,t]]),Te(e,o,e.length,a),e}function ed(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(f){return o?o._inactive?h(f):(s=r.parser.defined.includes(Re(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):n(f)}function l(f){return f===40?e.attempt(Gf,c,s?c:h)(f):f===91?e.attempt(Xf,c,s?u:h)(f):s?c(f):h(f)}function u(f){return e.attempt(Yf,c,h)(f)}function c(f){return t(f)}function h(f){return o._balanced=!0,n(f)}}function td(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return re(h)?Nt(e,o)(h):o(h)}function o(h){return h===41?c(h):Ya(e,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function s(h){return re(h)?Nt(e,l)(h):c(h)}function a(h){return n(h)}function l(h){return h===34||h===39||h===40?Ja(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):c(h)}function u(h){return re(h)?Nt(e,c)(h):c(h)}function c(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function nd(e,t,n){const r=this;return i;function i(a){return Qa.call(r,e,o,s,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(Re(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function s(a){return n(a)}}function rd(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const id={name:"labelStartImage",resolveAll:xi.resolveAll,tokenize:sd};function sd(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),s):n(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const od={name:"labelStartLink",resolveAll:xi.resolveAll,tokenize:ad};function ad(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Xn={name:"lineEnding",tokenize:ld};function ld(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),J(e,t,"linePrefix")}}const gn={name:"thematicBreak",tokenize:ud};function ud(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||_(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),Y(u)?J(e,a,"whitespace")(u):a(u))}}const ke={continuation:{tokenize:dd},exit:md,name:"list",tokenize:fd},cd={partial:!0,tokenize:gd},hd={partial:!0,tokenize:pd};function fd(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(d){const m=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:Lr(d)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(gn,n,u)(d):u(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(d)}return n(d)}function l(d){return Lr(d)&&++s<10?(e.consume(d),l):(!r.interrupt||s<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),u(d)):n(d)}function u(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(en,r.interrupt?n:c,e.attempt(cd,f,h))}function c(d){return r.containerState.initialBlankLine=!0,o++,f(d)}function h(d){return Y(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),f):n(d)}function f(d){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function dd(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(en,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,J(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!Y(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(hd,t,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,J(e,e.attempt(ke,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function pd(e,t,n){const r=this;return J(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function md(e){e.exit(this.containerState.type)}function gd(e,t,n){const r=this;return J(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!Y(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Ms={name:"setextUnderline",resolveTo:yd,tokenize:xd};function yd(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function xd(e,t,n){const r=this;let i;return o;function o(u){let c=r.events.length,h;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){h=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),Y(u)?J(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||_(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const bd={tokenize:wd};function wd(e){const t=this,n=e.attempt(en,r,e.attempt(this.parser.constructs.flowInitial,i,J(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ef,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const kd={resolveAll:tl()},vd=el("string"),Ad=el("text");function el(e){return{resolveAll:tl(e==="text"?Sd:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,a);return s;function s(c){return u(c)?o(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const h=i[c];let f=-1;if(h)for(;++f<h.length;){const d=h[f];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function tl(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Sd(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,s=-1,a=0,l;for(;o--;){const u=i[o];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(u===-2)l=!0,a++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const Ed={42:ke,43:ke,45:ke,48:ke,49:ke,50:ke,51:ke,52:ke,53:ke,54:ke,55:ke,56:ke,57:ke,62:qa},Cd={91:Vf},Td={[-2]:Gn,[-1]:Gn,32:Gn},Pd={35:jf,42:gn,45:[Ms,gn],60:Bf,61:Ms,95:gn,96:Ts,126:Ts},Md={38:Ga,92:Ka},Vd={[-5]:Xn,[-4]:Xn,[-3]:Xn,33:id,38:Ga,42:Dr,60:[of,qf],91:od,92:[Rf,Ka],93:xi,95:Dr,96:bf},Ld={null:[Dr,kd]},Dd={null:[42,95]},Id={null:[]},Rd=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Dd,contentInitial:Cd,disable:Id,document:Ed,flow:Pd,flowInitial:Td,insideSpan:Ld,string:Md,text:Vd},Symbol.toStringTag,{value:"Module"}));function Fd(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],a=[];const l={attempt:N(C),check:N(S),consume:E,enter:v,exit:P,interrupt:N(S,{interrupt:!0})},u={code:null,containerState:{},defineSkip:w,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:d,write:h};let c=t.tokenize.call(u,l);return t.resolveAll&&o.push(t),u;function h(R){return s=Pe(s,R),k(),s[s.length-1]!==null?[]:(L(t,0),u.events=Nn(o,u.events,u),u.events)}function f(R,j){return Hd(d(R),j)}function d(R){return jd(s,R)}function m(){const{_bufferIndex:R,_index:j,line:G,column:O,offset:I}=r;return{_bufferIndex:R,_index:j,line:G,column:O,offset:I}}function w(R){i[R.line]=R.column,A()}function k(){let R;for(;r._index<s.length;){const j=s[r._index];if(typeof j=="string")for(R=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===R&&r._bufferIndex<j.length;)y(j.charCodeAt(r._bufferIndex));else y(j)}}function y(R){c=c(R)}function E(R){_(R)?(r.line++,r.column=1,r.offset+=R===-3?2:1,A()):R!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=R}function v(R,j){const G=j||{};return G.type=R,G.start=m(),u.events.push(["enter",G,u]),a.push(G),G}function P(R){const j=a.pop();return j.end=m(),u.events.push(["exit",j,u]),j}function C(R,j){L(R,j.from)}function S(R,j){j.restore()}function N(R,j){return G;function G(O,I,ee){let $,B,z,x;return Array.isArray(O)?K(O):"tokenize"in O?K([O]):M(O);function M(q){return te;function te(le){const ue=le!==null&&q[le],Se=le!==null&&q.null,_e=[...Array.isArray(ue)?ue:ue?[ue]:[],...Array.isArray(Se)?Se:Se?[Se]:[]];return K(_e)(le)}}function K(q){return $=q,B=0,q.length===0?ee:g(q[B])}function g(q){return te;function te(le){return x=F(),z=q,q.partial||(u.currentConstruct=q),q.name&&u.parser.constructs.disable.null.includes(q.name)?Z():q.tokenize.call(j?Object.assign(Object.create(u),j):u,l,X,Z)(le)}}function X(q){return R(z,x),I}function Z(q){return x.restore(),++B<$.length?g($[B]):ee}}}function L(R,j){R.resolveAll&&!o.includes(R)&&o.push(R),R.resolve&&Te(u.events,j,u.events.length-j,R.resolve(u.events.slice(j),u)),R.resolveTo&&(u.events=R.resolveTo(u.events,u))}function F(){const R=m(),j=u.previous,G=u.currentConstruct,O=u.events.length,I=Array.from(a);return{from:O,restore:ee};function ee(){r=R,u.previous=j,u.currentConstruct=G,u.events.length=O,a=I,A()}}function A(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function jd(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function Hd(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
3
+ `;break}case-3:{s=`\r
4
+ `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function Nd(e){const r={constructs:$a([Rd,...(e||{}).extensions||[]]),content:i(Qh),defined:[],document:i(ef),flow:i(bd),lazy:{},string:i(vd),text:i(Ad)};return r;function i(o){return s;function s(a){return Fd(r,o,a)}}}function Od(e){for(;!Xa(e););return e}const Vs=/[\0\t\n\r]/g;function Bd(){let e=1,t="",n=!0,r;return i;function i(o,s,a){const l=[];let u,c,h,f,d;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),h=0,t="",n&&(o.charCodeAt(0)===65279&&h++,n=void 0);h<o.length;){if(Vs.lastIndex=h,u=Vs.exec(o),f=u&&u.index!==void 0?u.index:o.length,d=o.charCodeAt(f),!u){t=o.slice(h);break}if(d===10&&h===f&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),h<f&&(l.push(o.slice(h,f)),e+=f-h),d){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}h=f+1}return a&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const zd=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _d(e){return e.replace(zd,Zd)}function Zd(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Wa(n.slice(o?2:1),o?16:10)}return yi(n)||e}const nl={}.hasOwnProperty;function Ud(e,t,n){return typeof t!="string"&&(n=t,t=void 0),$d(n)(Od(Nd(n).document().write(Bd()(e,t,!0))))}function $d(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ls),autolinkProtocol:F,autolinkEmail:F,atxHeading:o(ss),blockQuote:o(Se),characterEscape:F,characterReference:F,codeFenced:o(_e),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(_e,s),codeText:o(an,s),codeTextData:F,data:F,codeFlowValue:F,definition:o(lt),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(Pt),hardBreakEscape:o(os),hardBreakTrailing:o(os),htmlFlow:o(as,s),htmlFlowData:F,htmlText:o(as,s),htmlTextData:F,image:o(Cc),label:s,link:o(ls),listItem:o(Tc),listItemValue:f,listOrdered:o(us,h),listUnordered:o(us),paragraph:o(Pc),reference:g,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(ss),strong:o(Mc),thematicBreak:o(Lc)},exit:{atxHeading:l(),atxHeadingSequence:C,autolink:l(),autolinkEmail:ue,autolinkProtocol:le,blockQuote:l(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:Z,characterReferenceMarkerNumeric:Z,characterReferenceValue:q,characterReference:te,codeFenced:l(k),codeFencedFence:w,codeFencedFenceInfo:d,codeFencedFenceMeta:m,codeFlowValue:A,codeIndented:l(y),codeText:l(I),codeTextData:A,data:A,definition:l(),definitionDestinationString:P,definitionLabelString:E,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(j),hardBreakTrailing:l(j),htmlFlow:l(G),htmlFlowData:A,htmlText:l(O),htmlTextData:A,image:l($),label:z,labelText:B,lineEnding:R,link:l(ee),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:X,resourceDestinationString:x,resourceTitleString:M,resource:K,setextHeading:l(L),setextHeadingLineSequence:N,setextHeadingText:S,strong:l(),thematicBreak:l()}};rl(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(T){let D={type:"root",children:[]};const U={stack:[D],tokenStack:[],config:t,enter:a,exit:u,buffer:s,resume:c,data:n},Q=[];let ne=-1;for(;++ne<T.length;)if(T[ne][1].type==="listOrdered"||T[ne][1].type==="listUnordered")if(T[ne][0]==="enter")Q.push(ne);else{const Le=Q.pop();ne=i(T,Le,ne)}for(ne=-1;++ne<T.length;){const Le=t[T[ne][0]];nl.call(Le,T[ne][1].type)&&Le[T[ne][1].type].call(Object.assign({sliceSerialize:T[ne][2].sliceSerialize},U),T[ne][1])}if(U.tokenStack.length>0){const Le=U.tokenStack[U.tokenStack.length-1];(Le[1]||Ls).call(U,void 0,Le[0])}for(D.position={start:qe(T.length>0?T[0][1].start:{line:1,column:1,offset:0}),end:qe(T.length>0?T[T.length-2][1].end:{line:1,column:1,offset:0})},ne=-1;++ne<t.transforms.length;)D=t.transforms[ne](D)||D;return D}function i(T,D,U){let Q=D-1,ne=-1,Le=!1,Je,Ze,Mt,Vt;for(;++Q<=U;){const Ee=T[Q];switch(Ee[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ee[0]==="enter"?ne++:ne--,Vt=void 0;break}case"lineEndingBlank":{Ee[0]==="enter"&&(Je&&!Vt&&!ne&&!Mt&&(Mt=Q),Vt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Vt=void 0}if(!ne&&Ee[0]==="enter"&&Ee[1].type==="listItemPrefix"||ne===-1&&Ee[0]==="exit"&&(Ee[1].type==="listUnordered"||Ee[1].type==="listOrdered")){if(Je){let ut=Q;for(Ze=void 0;ut--;){const Ue=T[ut];if(Ue[1].type==="lineEnding"||Ue[1].type==="lineEndingBlank"){if(Ue[0]==="exit")continue;Ze&&(T[Ze][1].type="lineEndingBlank",Le=!0),Ue[1].type="lineEnding",Ze=ut}else if(!(Ue[1].type==="linePrefix"||Ue[1].type==="blockQuotePrefix"||Ue[1].type==="blockQuotePrefixWhitespace"||Ue[1].type==="blockQuoteMarker"||Ue[1].type==="listItemIndent"))break}Mt&&(!Ze||Mt<Ze)&&(Je._spread=!0),Je.end=Object.assign({},Ze?T[Ze][1].start:Ee[1].end),T.splice(Ze||Q,0,["exit",Je,Ee[2]]),Q++,U++}if(Ee[1].type==="listItemPrefix"){const ut={type:"listItem",_spread:!1,start:Object.assign({},Ee[1].start),end:void 0};Je=ut,T.splice(Q,0,["enter",ut,Ee[2]]),Q++,U++,Mt=void 0,Vt=!0}}}return T[D][1]._spread=Le,U}function o(T,D){return U;function U(Q){a.call(this,T(Q),Q),D&&D.call(this,Q)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(T,D,U){this.stack[this.stack.length-1].children.push(T),this.stack.push(T),this.tokenStack.push([D,U||void 0]),T.position={start:qe(D.start),end:void 0}}function l(T){return D;function D(U){T&&T.call(this,U),u.call(this,U)}}function u(T,D){const U=this.stack.pop(),Q=this.tokenStack.pop();if(Q)Q[0].type!==T.type&&(D?D.call(this,T,Q[0]):(Q[1]||Ls).call(this,T,Q[0]));else throw new Error("Cannot close `"+T.type+"` ("+Ht({start:T.start,end:T.end})+"): it’s not open");U.position.end=qe(T.end)}function c(){return gi(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function f(T){if(this.data.expectingFirstListItemValue){const D=this.stack[this.stack.length-2];D.start=Number.parseInt(this.sliceSerialize(T),10),this.data.expectingFirstListItemValue=void 0}}function d(){const T=this.resume(),D=this.stack[this.stack.length-1];D.lang=T}function m(){const T=this.resume(),D=this.stack[this.stack.length-1];D.meta=T}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const T=this.resume(),D=this.stack[this.stack.length-1];D.value=T.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const T=this.resume(),D=this.stack[this.stack.length-1];D.value=T.replace(/(\r?\n|\r)$/g,"")}function E(T){const D=this.resume(),U=this.stack[this.stack.length-1];U.label=D,U.identifier=Re(this.sliceSerialize(T)).toLowerCase()}function v(){const T=this.resume(),D=this.stack[this.stack.length-1];D.title=T}function P(){const T=this.resume(),D=this.stack[this.stack.length-1];D.url=T}function C(T){const D=this.stack[this.stack.length-1];if(!D.depth){const U=this.sliceSerialize(T).length;D.depth=U}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function N(T){const D=this.stack[this.stack.length-1];D.depth=this.sliceSerialize(T).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function F(T){const U=this.stack[this.stack.length-1].children;let Q=U[U.length-1];(!Q||Q.type!=="text")&&(Q=Vc(),Q.position={start:qe(T.start),end:void 0},U.push(Q)),this.stack.push(Q)}function A(T){const D=this.stack.pop();D.value+=this.sliceSerialize(T),D.position.end=qe(T.end)}function R(T){const D=this.stack[this.stack.length-1];if(this.data.atHardBreak){const U=D.children[D.children.length-1];U.position.end=qe(T.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(D.type)&&(F.call(this,T),A.call(this,T))}function j(){this.data.atHardBreak=!0}function G(){const T=this.resume(),D=this.stack[this.stack.length-1];D.value=T}function O(){const T=this.resume(),D=this.stack[this.stack.length-1];D.value=T}function I(){const T=this.resume(),D=this.stack[this.stack.length-1];D.value=T}function ee(){const T=this.stack[this.stack.length-1];if(this.data.inReference){const D=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=D,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function $(){const T=this.stack[this.stack.length-1];if(this.data.inReference){const D=this.data.referenceType||"shortcut";T.type+="Reference",T.referenceType=D,delete T.url,delete T.title}else delete T.identifier,delete T.label;this.data.referenceType=void 0}function B(T){const D=this.sliceSerialize(T),U=this.stack[this.stack.length-2];U.label=_d(D),U.identifier=Re(D).toLowerCase()}function z(){const T=this.stack[this.stack.length-1],D=this.resume(),U=this.stack[this.stack.length-1];if(this.data.inReference=!0,U.type==="link"){const Q=T.children;U.children=Q}else U.alt=D}function x(){const T=this.resume(),D=this.stack[this.stack.length-1];D.url=T}function M(){const T=this.resume(),D=this.stack[this.stack.length-1];D.title=T}function K(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function X(T){const D=this.resume(),U=this.stack[this.stack.length-1];U.label=D,U.identifier=Re(this.sliceSerialize(T)).toLowerCase(),this.data.referenceType="full"}function Z(T){this.data.characterReferenceType=T.type}function q(T){const D=this.sliceSerialize(T),U=this.data.characterReferenceType;let Q;U?(Q=Wa(D,U==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Q=yi(D);const ne=this.stack[this.stack.length-1];ne.value+=Q}function te(T){const D=this.stack.pop();D.position.end=qe(T.end)}function le(T){A.call(this,T);const D=this.stack[this.stack.length-1];D.url=this.sliceSerialize(T)}function ue(T){A.call(this,T);const D=this.stack[this.stack.length-1];D.url="mailto:"+this.sliceSerialize(T)}function Se(){return{type:"blockquote",children:[]}}function _e(){return{type:"code",lang:null,meta:null,value:""}}function an(){return{type:"inlineCode",value:""}}function lt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pt(){return{type:"emphasis",children:[]}}function ss(){return{type:"heading",depth:0,children:[]}}function os(){return{type:"break"}}function as(){return{type:"html",value:""}}function Cc(){return{type:"image",title:null,url:"",alt:null}}function ls(){return{type:"link",title:null,url:"",children:[]}}function us(T){return{type:"list",ordered:T.type==="listOrdered",start:null,spread:T._spread,children:[]}}function Tc(T){return{type:"listItem",spread:T._spread,checked:null,children:[]}}function Pc(){return{type:"paragraph",children:[]}}function Mc(){return{type:"strong",children:[]}}function Vc(){return{type:"text",value:""}}function Lc(){return{type:"thematicBreak"}}}function qe(e){return{line:e.line,column:e.column,offset:e.offset}}function rl(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?rl(e,r):Wd(e,r)}}function Wd(e,t){let n;for(n in t)if(nl.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Ls(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ht({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ht({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ht({start:t.start,end:t.end})+") is still open")}function qd(e){const t=this;t.parser=n;function n(r){return Ud(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Kd(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Gd(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
5
+ `}]}function Xd(e,t){const n=t.value?t.value+`
6
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function Yd(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Qd(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Jd(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=St(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let s,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=o+1,a+=1,e.footnoteCounts.set(r,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function ep(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tp(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function il(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function np(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return il(e,t);const i={src:St(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function rp(e,t){const n={src:St(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function ip(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function sp(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return il(e,t);const i={href:St(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function op(e,t){const n={href:St(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ap(e,t,n){const r=e.all(t),i=n?lp(n):sl(t),o={},s=[];if(typeof t.checked=="boolean"){const c=r[0];let h;c&&c.type==="element"&&c.tagName==="p"?h=c:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const c=r[a];(i||a!==0||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
7
+ `}),c.type==="element"&&c.tagName==="p"&&!i?s.push(...c.children):s.push(c)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&s.push({type:"text",value:`
8
+ `});const u={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,u),e.applyData(t,u)}function lp(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=sl(n[r])}return t}function sl(e){const t=e.spread;return t??e.children.length>1}function up(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function cp(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hp(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function fp(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dp(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=fi(t.children[1]),l=Na(t.children[t.children.length-1]);a&&l&&(s.position={start:a,end:l}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function pp(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,a=s?s.length:t.children.length;let l=-1;const u=[];for(;++l<a;){const h=t.children[l],f={},d=s?s[l]:void 0;d&&(f.align=d);let m={type:"element",tagName:o,properties:f,children:[]};h&&(m.children=e.all(h),e.patch(h,m),m=e.applyData(h,m)),u.push(m)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function mp(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Ds=9,Is=32;function gp(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Rs(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Rs(t.slice(i),i>0,!1)),o.join("")}function Rs(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Ds||o===Is;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Ds||o===Is;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function yp(e,t){const n={type:"text",value:gp(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function xp(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const bp={blockquote:Kd,break:Gd,code:Xd,delete:Yd,emphasis:Qd,footnoteReference:Jd,heading:ep,html:tp,imageReference:np,image:rp,inlineCode:ip,linkReference:sp,link:op,listItem:ap,list:up,paragraph:cp,root:hp,strong:fp,table:dp,tableCell:mp,tableRow:pp,text:yp,thematicBreak:xp,toml:ln,yaml:ln,definition:ln,footnoteDefinition:ln};function ln(){}const ol=-1,On=0,Ot=1,Cn=2,bi=3,wi=4,ki=5,vi=6,al=7,ll=8,Fs=typeof self=="object"?self:globalThis,wp=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case On:case ol:return n(s,i);case Ot:{const a=n([],i);for(const l of s)a.push(r(l));return a}case Cn:{const a=n({},i);for(const[l,u]of s)a[r(l)]=r(u);return a}case bi:return n(new Date(s),i);case wi:{const{source:a,flags:l}=s;return n(new RegExp(a,l),i)}case ki:{const a=n(new Map,i);for(const[l,u]of s)a.set(r(l),r(u));return a}case vi:{const a=n(new Set,i);for(const l of s)a.add(r(l));return a}case al:{const{name:a,message:l}=s;return n(new Fs[a](l),i)}case ll:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:a}=new Uint8Array(s);return n(new DataView(a),s)}}return n(new Fs[o](s),i)};return r},js=e=>wp(new Map,e)(0),ht="",{toString:kp}={},{keys:vp}=Object,Rt=e=>{const t=typeof e;if(t!=="object"||!e)return[On,t];const n=kp.call(e).slice(8,-1);switch(n){case"Array":return[Ot,ht];case"Object":return[Cn,ht];case"Date":return[bi,ht];case"RegExp":return[wi,ht];case"Map":return[ki,ht];case"Set":return[vi,ht];case"DataView":return[Ot,n]}return n.includes("Array")?[Ot,n]:n.includes("Error")?[al,n]:[Cn,n]},un=([e,t])=>e===On&&(t==="function"||t==="symbol"),Ap=(e,t,n,r)=>{const i=(s,a)=>{const l=r.push(s)-1;return n.set(a,l),l},o=s=>{if(n.has(s))return n.get(s);let[a,l]=Rt(s);switch(a){case On:{let c=s;switch(l){case"bigint":a=ll,c=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([ol],s)}return i([a,c],s)}case Ot:{if(l){let f=s;return l==="DataView"?f=new Uint8Array(s.buffer):l==="ArrayBuffer"&&(f=new Uint8Array(s)),i([l,[...f]],s)}const c=[],h=i([a,c],s);for(const f of s)c.push(o(f));return h}case Cn:{if(l)switch(l){case"BigInt":return i([l,s.toString()],s);case"Boolean":case"Number":case"String":return i([l,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const c=[],h=i([a,c],s);for(const f of vp(s))(e||!un(Rt(s[f])))&&c.push([o(f),o(s[f])]);return h}case bi:return i([a,s.toISOString()],s);case wi:{const{source:c,flags:h}=s;return i([a,{source:c,flags:h}],s)}case ki:{const c=[],h=i([a,c],s);for(const[f,d]of s)(e||!(un(Rt(f))||un(Rt(d))))&&c.push([o(f),o(d)]);return h}case vi:{const c=[],h=i([a,c],s);for(const f of s)(e||!un(Rt(f)))&&c.push(o(f));return h}}const{message:u}=s;return i([a,{name:l,message:u}],s)};return o},Hs=(e,{json:t,lossy:n}={})=>{const r=[];return Ap(!(t||n),!!t,new Map,r)(e),r},Tn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?js(Hs(e,t)):structuredClone(e):(e,t)=>js(Hs(e,t));function Sp(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Ep(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Cp(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Sp,r=e.options.footnoteBackLabel||Ep,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const c=e.all(u),h=String(u.identifier).toUpperCase(),f=St(h.toLowerCase());let d=0;const m=[],w=e.footnoteCounts.get(h);for(;w!==void 0&&++d<=w;){m.length>0&&m.push({type:"text",value:" "});let E=typeof n=="string"?n:n(l,d);typeof E=="string"&&(E={type:"text",value:E}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,d),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}const k=c[c.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const E=k.children[k.children.length-1];E&&E.type==="text"?E.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...m)}else c.push(...m);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(c,!0)};e.patch(u,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Tn(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
9
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
10
+ `}]}}const Bn=(function(e){if(e==null)return Vp;if(typeof e=="function")return zn(e);if(typeof e=="object")return Array.isArray(e)?Tp(e):Pp(e);if(typeof e=="string")return Mp(e);throw new Error("Expected function, string, or object as test")});function Tp(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Bn(e[n]);return zn(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function Pp(e){const t=e;return zn(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function Mp(e){return zn(t);function t(n){return n&&n.type===e}}function zn(e){return t;function t(n,r,i){return!!(Lp(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Vp(){return!0}function Lp(e){return e!==null&&typeof e=="object"&&"type"in e}const ul=[],Dp=!0,Ir=!1,Ip="skip";function cl(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=Bn(i),s=r?-1:1;a(e,void 0,[])();function a(l,u,c){const h=l&&typeof l=="object"?l:{};if(typeof h.type=="string"){const d=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(l.type+(d?"<"+d+">":""))+")"})}return f;function f(){let d=ul,m,w,k;if((!t||o(l,u,c[c.length-1]||void 0))&&(d=Rp(n(l,c)),d[0]===Ir))return d;if("children"in l&&l.children){const y=l;if(y.children&&d[0]!==Ip)for(w=(r?y.children.length:-1)+s,k=c.concat(y);w>-1&&w<y.children.length;){const E=y.children[w];if(m=a(E,w,k)(),m[0]===Ir)return m;w=typeof m[1]=="number"?m[1]:w+s}}return d}}}function Rp(e){return Array.isArray(e)?e:typeof e=="number"?[Dp,e]:e==null?ul:[e]}function Ai(e,t,n,r){let i,o,s;typeof t=="function"&&typeof n!="function"?(o=void 0,s=t,i=n):(o=t,s=n,i=r),cl(e,o,a,i);function a(l,u){const c=u[u.length-1],h=c?c.children.indexOf(l):void 0;return s(l,h,c)}}const Rr={}.hasOwnProperty,Fp={};function jp(e,t){const n=t||Fp,r=new Map,i=new Map,o=new Map,s={...bp,...n.handlers},a={all:u,applyData:Np,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:l,options:n,patch:Hp,wrap:Bp};return Ai(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const h=c.type==="definition"?r:i,f=String(c.identifier).toUpperCase();h.has(f)||h.set(f,c)}}),a;function l(c,h){const f=c.type,d=a.handlers[f];if(Rr.call(a.handlers,f)&&d)return d(a,c,h);if(a.options.passThrough&&a.options.passThrough.includes(f)){if("children"in c){const{children:w,...k}=c,y=Tn(k);return y.children=a.all(c),y}return Tn(c)}return(a.options.unknownHandler||Op)(a,c,h)}function u(c){const h=[];if("children"in c){const f=c.children;let d=-1;for(;++d<f.length;){const m=a.one(f[d],c);if(m){if(d&&f[d-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=Ns(m.value)),!Array.isArray(m)&&m.type==="element")){const w=m.children[0];w&&w.type==="text"&&(w.value=Ns(w.value))}Array.isArray(m)?h.push(...m):h.push(m)}}}return h}}function Hp(e,t){e.position&&(t.position=Sh(e))}function Np(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&o&&Object.assign(n.properties,Tn(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Op(e,t){const n=t.data||{},r="value"in t&&!(Rr.call(n,"hProperties")||Rr.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Bp(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
11
+ `});++r<e.length;)r&&n.push({type:"text",value:`
12
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
13
+ `}),n}function Ns(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Os(e,t){const n=jp(e,t),r=n.one(e,void 0),i=Cp(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
14
+ `},i),o}function zp(e,t){return e&&"run"in e?async function(n,r){const i=Os(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Os(n,{file:r,...e||t})}}function Bs(e){if(e)throw e}var Yn,zs;function _p(){if(zs)return Yn;zs=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},o=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var c=e.call(u,"constructor"),h=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!c&&!h)return!1;var f;for(f in u);return typeof f>"u"||e.call(u,f)},s=function(u,c){n&&c.name==="__proto__"?n(u,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):u[c.name]=c.newValue},a=function(u,c){if(c==="__proto__")if(e.call(u,c)){if(r)return r(u,c).value}else return;return u[c]};return Yn=function l(){var u,c,h,f,d,m,w=arguments[0],k=1,y=arguments.length,E=!1;for(typeof w=="boolean"&&(E=w,w=arguments[1]||{},k=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});k<y;++k)if(u=arguments[k],u!=null)for(c in u)h=a(w,c),f=a(u,c),w!==f&&(E&&f&&(o(f)||(d=i(f)))?(d?(d=!1,m=h&&i(h)?h:[]):m=h&&o(h)?h:{},s(w,{name:c,newValue:l(E,m,f)})):typeof f<"u"&&s(w,{name:c,newValue:f}));return w},Yn}var Zp=_p();const Qn=ba(Zp);function Fr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Up(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...i);function a(l,...u){const c=e[++o];let h=-1;if(l){s(l);return}for(;++h<i.length;)(u[h]===null||u[h]===void 0)&&(u[h]=i[h]);i=u,c?$p(c,a)(...u):s(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function $p(e,t){let n;return r;function r(...s){const a=e.length>s.length;let l;a&&s.push(i);try{l=e.apply(this,s)}catch(u){const c=u;if(a&&n)throw c;return i(c)}a||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(s,...a){n||(n=!0,t(s,...a))}function o(s){i(null,s)}}const He={basename:Wp,dirname:qp,extname:Kp,join:Gp,sep:"/"};function Wp(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');tn(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function qp(e){if(tn(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Kp(e){tn(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const a=e.codePointAt(t);if(a===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Gp(...e){let t=-1,n;for(;++t<e.length;)tn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Xp(n)}function Xp(e){tn(e);const t=e.codePointAt(0)===47;let n=Yp(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Yp(e,t){let n="",r=0,i=-1,o=0,s=-1,a,l;for(;++s<=e.length;){if(s<e.length)a=e.codePointAt(s);else{if(a===47)break;a=47}if(a===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else a===46&&o>-1?o++:o=-1}return n}function tn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Qp={cwd:Jp};function Jp(){return"/"}function jr(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function e0(e){if(typeof e=="string")e=new URL(e);else if(!jr(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return t0(e)}function t0(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Jn=["history","path","basename","stem","extname","dirname"];class hl{constructor(t){let n;t?jr(t)?n={path:t}:typeof t=="string"||n0(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Qp.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Jn.length;){const o=Jn[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Jn.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?He.basename(this.path):void 0}set basename(t){tr(t,"basename"),er(t,"basename"),this.path=He.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?He.dirname(this.path):void 0}set dirname(t){_s(this.basename,"dirname"),this.path=He.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?He.extname(this.path):void 0}set extname(t){if(er(t,"extname"),_s(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=He.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){jr(t)&&(t=e0(t)),tr(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?He.basename(this.path,this.extname):void 0}set stem(t){tr(t,"stem"),er(t,"stem"),this.path=He.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new ye(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function er(e,t){if(e&&e.includes(He.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+He.sep+"`")}function tr(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function _s(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function n0(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const r0=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),i0={}.hasOwnProperty;class Si extends r0{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Up()}copy(){const t=new Si;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Qn(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ir("data",this.frozen),this.namespace[t]=n,this):i0.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ir("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=cn(t),r=this.parser||this.Parser;return nr("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),nr("process",this.parser||this.Parser),rr("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const a=cn(t),l=r.parse(a);r.run(l,a,function(c,h,f){if(c||!h||!f)return u(c);const d=h,m=r.stringify(d,f);a0(m)?f.value=m:f.result=m,u(c,f)});function u(c,h){c||!h?s(c):o?o(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),nr("processSync",this.parser||this.Parser),rr("processSync",this.compiler||this.Compiler),this.process(t,i),Us("processSync","process",n),r;function i(o,s){n=!0,Bs(o),r=s}}run(t,n,r){Zs(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(s,a){const l=cn(n);i.run(t,l,u);function u(c,h,f){const d=h||t;c?a(c):s?s(d):r(void 0,d,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),Us("runSync","run",r),i;function o(s,a){Bs(s),i=a,r=!0}}stringify(t,n){this.freeze();const r=cn(n),i=this.compiler||this.Compiler;return rr("stringify",i),Zs(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(ir("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...h]=u;l(c,h)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(u.plugins),u.settings&&(i.settings=Qn(!0,i.settings,u.settings))}function a(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const h=u[c];o(h)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let h=-1,f=-1;for(;++h<r.length;)if(r[h][0]===u){f=h;break}if(f===-1)r.push([u,...c]);else if(c.length>0){let[d,...m]=c;const w=r[f][1];Fr(w)&&Fr(d)&&(d=Qn(!0,w,d)),r[f]=[u,d,...m]}}}}const s0=new Si().freeze();function nr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function rr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ir(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Zs(e){if(!Fr(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Us(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function cn(e){return o0(e)?e:new hl(e)}function o0(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function a0(e){return typeof e=="string"||l0(e)}function l0(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const u0="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",$s=[],Ws={allowDangerousHtml:!0},c0=/^(https?|ircs?|mailto|xmpp)$/i,h0=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function f0(e){const t=d0(e),n=p0(e);return m0(t.runSync(t.parse(n),n),e)}function d0(e){const t=e.rehypePlugins||$s,n=e.remarkPlugins||$s,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ws}:Ws;return s0().use(qd).use(n).use(zp,r).use(t)}function p0(e){const t=e.children||"",n=new hl;return typeof t=="string"&&(n.value=t),n}function m0(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,a=t.unwrapDisallowed,l=t.urlTransform||g0;for(const c of h0)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+u0+c.id,void 0);return Ai(e,u),Mh(e,{Fragment:b.Fragment,components:i,ignoreInvalidStyle:!0,jsx:b.jsx,jsxs:b.jsxs,passKeys:!0,passNode:!0});function u(c,h,f){if(c.type==="raw"&&f&&typeof h=="number")return s?f.children.splice(h,1):f.children[h]={type:"text",value:c.value},h;if(c.type==="element"){let d;for(d in Kn)if(Object.hasOwn(Kn,d)&&Object.hasOwn(c.properties,d)){const m=c.properties[d],w=Kn[d];(w===null||w.includes(c.tagName))&&(c.properties[d]=l(String(m||""),d,c))}}if(c.type==="element"){let d=n?!n.includes(c.tagName):o?o.includes(c.tagName):!1;if(!d&&r&&typeof h=="number"&&(d=!r(c,h,f)),d&&f&&typeof h=="number")return a&&c.children?f.children.splice(h,1,...c.children):f.children.splice(h,1),h}}}function g0(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||c0.test(e.slice(0,t))?e:""}function qs(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function y0(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function x0(e,t,n){const i=Bn((n||{}).ignore||[]),o=b0(t);let s=-1;for(;++s<o.length;)cl(e,"text",a);function a(u,c){let h=-1,f;for(;++h<c.length;){const d=c[h],m=f?f.children:void 0;if(i(d,m?m.indexOf(d):void 0,f))return;f=d}if(f)return l(u,c)}function l(u,c){const h=c[c.length-1],f=o[s][0],d=o[s][1];let m=0;const k=h.children.indexOf(u);let y=!1,E=[];f.lastIndex=0;let v=f.exec(u.value);for(;v;){const P=v.index,C={index:v.index,input:v.input,stack:[...c,u]};let S=d(...v,C);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?f.lastIndex=P+1:(m!==P&&E.push({type:"text",value:u.value.slice(m,P)}),Array.isArray(S)?E.push(...S):S&&E.push(S),m=P+v[0].length,y=!0),!f.global)break;v=f.exec(u.value)}return y?(m<u.value.length&&E.push({type:"text",value:u.value.slice(m)}),h.children.splice(k,1,...E)):E=[u],k+E.length}}function b0(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([w0(i[0]),k0(i[1])])}return t}function w0(e){return typeof e=="string"?new RegExp(y0(e),"g"):e}function k0(e){return typeof e=="function"?e:function(){return e}}const sr="phrasing",or=["autolink","link","image","label"];function v0(){return{transforms:[M0],enter:{literalAutolink:S0,literalAutolinkEmail:ar,literalAutolinkHttp:ar,literalAutolinkWww:ar},exit:{literalAutolink:P0,literalAutolinkEmail:T0,literalAutolinkHttp:E0,literalAutolinkWww:C0}}}function A0(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:sr,notInConstruct:or},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:sr,notInConstruct:or},{character:":",before:"[ps]",after:"\\/",inConstruct:sr,notInConstruct:or}]}}function S0(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ar(e){this.config.enter.autolinkProtocol.call(this,e)}function E0(e){this.config.exit.autolinkProtocol.call(this,e)}function C0(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function T0(e){this.config.exit.autolinkEmail.call(this,e)}function P0(e){this.exit(e)}function M0(e){x0(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,V0],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),L0]],{ignore:["link","linkReference"]})}function V0(e,t,n,r,i){let o="";if(!fl(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!D0(n)))return!1;const s=I0(n+r);if(!s[0])return!1;const a={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function L0(e,t,n,r){return!fl(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function D0(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function I0(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=qs(e,"(");let o=qs(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function fl(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ot(n)||Hn(n))&&(!t||n!==47)}dl.peek=_0;function R0(){this.buffer()}function F0(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function j0(){this.buffer()}function H0(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function N0(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Re(this.sliceSerialize(e)).toLowerCase(),n.label=t}function O0(e){this.exit(e)}function B0(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Re(this.sliceSerialize(e)).toLowerCase(),n.label=t}function z0(e){this.exit(e)}function _0(){return"["}function dl(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),a(),s(),o+=i.move("]"),o}function Z0(){return{enter:{gfmFootnoteCallString:R0,gfmFootnoteCall:F0,gfmFootnoteDefinitionLabelString:j0,gfmFootnoteDefinition:H0},exit:{gfmFootnoteCallString:N0,gfmFootnoteCall:O0,gfmFootnoteDefinitionLabelString:B0,gfmFootnoteDefinition:z0}}}function U0(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:dl},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,s){const a=o.createTracker(s);let l=a.move("[^");const u=o.enter("footnoteDefinition"),c=o.enter("label");return l+=a.move(o.safe(o.associationId(r),{before:l,after:"]"})),c(),l+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),l+=a.move((t?`
15
+ `:" ")+o.indentLines(o.containerFlow(r,a.current()),t?pl:$0))),u(),l}}function $0(e,t,n){return t===0?e:pl(e,t,n)}function pl(e,t,n){return(n?"":" ")+e}const W0=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ml.peek=Y0;function q0(){return{canContainEols:["delete"],enter:{strikethrough:G0},exit:{strikethrough:X0}}}function K0(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:W0}],handlers:{delete:ml}}}function G0(e){this.enter({type:"delete",children:[]},e)}function X0(e){this.exit(e)}function ml(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function Y0(){return"~"}function Q0(e){return e.length}function J0(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Q0,o=[],s=[],a=[],l=[];let u=0,c=-1;for(;++c<e.length;){const w=[],k=[];let y=-1;for(e[c].length>u&&(u=e[c].length);++y<e[c].length;){const E=em(e[c][y]);if(n.alignDelimiters!==!1){const v=i(E);k[y]=v,(l[y]===void 0||v>l[y])&&(l[y]=v)}w.push(E)}s[c]=w,a[c]=k}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<u;)o[h]=Ks(r[h]);else{const w=Ks(r);for(;++h<u;)o[h]=w}h=-1;const f=[],d=[];for(;++h<u;){const w=o[h];let k="",y="";w===99?(k=":",y=":"):w===108?k=":":w===114&&(y=":");let E=n.alignDelimiters===!1?1:Math.max(1,l[h]-k.length-y.length);const v=k+"-".repeat(E)+y;n.alignDelimiters!==!1&&(E=k.length+E+y.length,E>l[h]&&(l[h]=E),d[h]=E),f[h]=v}s.splice(1,0,f),a.splice(1,0,d),c=-1;const m=[];for(;++c<s.length;){const w=s[c],k=a[c];h=-1;const y=[];for(;++h<u;){const E=w[h]||"";let v="",P="";if(n.alignDelimiters!==!1){const C=l[h]-(k[h]||0),S=o[h];S===114?v=" ".repeat(C):S===99?C%2?(v=" ".repeat(C/2+.5),P=" ".repeat(C/2-.5)):(v=" ".repeat(C/2),P=v):P=" ".repeat(C)}n.delimiterStart!==!1&&!h&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&E==="")&&(n.delimiterStart!==!1||h)&&y.push(" "),n.alignDelimiters!==!1&&y.push(v),y.push(E),n.alignDelimiters!==!1&&y.push(P),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||h!==u-1)&&y.push("|")}m.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return m.join(`
16
+ `)}function em(e){return e==null?"":String(e)}function Ks(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function tm(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),nm);return i(),s}function nm(e,t,n){return">"+(n?"":" ")+e}function rm(e,t){return Gs(e,t.inConstruct,!0)&&!Gs(e,t.notInConstruct,!1)}function Gs(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Xs(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
17
+ `&&rm(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
18
+ `}function im(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function sm(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function om(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function am(e,t,n,r){const i=om(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(sm(e,n)){const h=n.enter("codeIndented"),f=n.indentLines(o,lm);return h(),f}const a=n.createTracker(r),l=i.repeat(Math.max(im(o,i)+1,3)),u=n.enter("codeFenced");let c=a.move(l);if(e.lang){const h=n.enter(`codeFencedLang${s}`);c+=a.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...a.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${s}`);c+=a.move(" "),c+=a.move(n.safe(e.meta,{before:c,after:`
19
+ `,encode:["`"],...a.current()})),h()}return c+=a.move(`
20
+ `),o&&(c+=a.move(o+`
21
+ `)),c+=a.move(l),u(),c}function lm(e,t,n){return(n?"":" ")+e}function Ei(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function um(e,t,n,r){const i=Ei(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let a=n.enter("label");const l=n.createTracker(r);let u=l.move("[");return u+=l.move(n.safe(n.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(a=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":`
22
+ `,...l.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),a()),s(),u}function cm(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function $t(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Pn(e,t,n){const r=kt(e),i=kt(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}gl.peek=hm;function gl(e,t,n,r){const i=cm(n),o=n.enter("emphasis"),s=n.createTracker(r),a=s.move(i);let l=s.move(n.containerPhrasing(e,{after:i,before:a,...s.current()}));const u=l.charCodeAt(0),c=Pn(r.before.charCodeAt(r.before.length-1),u,i);c.inside&&(l=$t(u)+l.slice(1));const h=l.charCodeAt(l.length-1),f=Pn(r.after.charCodeAt(0),h,i);f.inside&&(l=l.slice(0,-1)+$t(h));const d=s.move(i);return o(),n.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},a+l+d}function hm(e,t,n){return n.options.emphasis||"*"}function fm(e,t){let n=!1;return Ai(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ir}),!!((!e.depth||e.depth<3)&&gi(e)&&(t.options.setext||n))}function dm(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(fm(e,n)){const c=n.enter("headingSetext"),h=n.enter("phrasing"),f=n.containerPhrasing(e,{...o.current(),before:`
23
+ `,after:`
24
+ `});return h(),c(),f+`
25
+ `+(i===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
26
+ `))+1))}const s="#".repeat(i),a=n.enter("headingAtx"),l=n.enter("phrasing");o.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
27
+ `,...o.current()});return/^[\t ]/.test(u)&&(u=$t(u.charCodeAt(0))+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),l(),a(),u}yl.peek=pm;function yl(e){return e.value||""}function pm(){return"<"}xl.peek=mm;function xl(e,t,n,r){const i=Ei(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let a=n.enter("label");const l=n.createTracker(r);let u=l.move("![");return u+=l.move(n.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(a=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),a()),u+=l.move(")"),s(),u}function mm(){return"!"}bl.peek=gm;function bl(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const a=n.createTracker(r);let l=a.move("![");const u=n.safe(e.alt,{before:l,after:"]",...a.current()});l+=a.move(u+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const h=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==h?l+=a.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function gm(){return"!"}wl.peek=ym;function wl(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const s=n.unsafe[o],a=n.compilePattern(s);let l;if(s.atBreak)for(;l=a.exec(r);){let u=l.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(l.index+1)}}return i+r+i}function ym(){return"`"}function kl(e,t){const n=gi(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}vl.peek=xm;function vl(e,t,n,r){const i=Ei(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let a,l;if(kl(e,n)){const c=n.stack;n.stack=[],a=n.enter("autolink");let h=s.move("<");return h+=s.move(n.containerPhrasing(e,{before:h,after:">",...s.current()})),h+=s.move(">"),a(),n.stack=c,h}a=n.enter("link"),l=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(l=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),l()),u+=s.move(")"),a(),u}function xm(e,t,n){return kl(e,n)?"<":"["}Al.peek=bm;function Al(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const a=n.createTracker(r);let l=a.move("[");const u=n.containerPhrasing(e,{before:l,after:"]",...a.current()});l+=a.move(u+"]["),s();const c=n.stack;n.stack=[],s=n.enter("reference");const h=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==h?l+=a.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function bm(){return"["}function Ci(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function wm(e){const t=Ci(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function km(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Sl(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function vm(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?km(n):Ci(n);const a=e.ordered?s==="."?")":".":wm(n);let l=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),Sl(n)===s&&c){let h=-1;for(;++h<e.children.length;){const f=e.children[h];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(s=a),n.bulletCurrent=s;const u=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),u}function Am(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Sm(e,t,n,r){const i=Am(n);let o=n.bulletCurrent||Ci(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(s-o.length)),a.shift(s);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),c);return l(),u;function c(h,f,d){return f?(d?"":" ".repeat(s))+h:(d?o:o+" ".repeat(s-o.length))+h}}function Em(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}const Cm=Bn(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Tm(e,t,n,r){return(e.children.some(function(s){return Cm(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Pm(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}El.peek=Mm;function El(e,t,n,r){const i=Pm(n),o=n.enter("strong"),s=n.createTracker(r),a=s.move(i+i);let l=s.move(n.containerPhrasing(e,{after:i,before:a,...s.current()}));const u=l.charCodeAt(0),c=Pn(r.before.charCodeAt(r.before.length-1),u,i);c.inside&&(l=$t(u)+l.slice(1));const h=l.charCodeAt(l.length-1),f=Pn(r.after.charCodeAt(0),h,i);f.inside&&(l=l.slice(0,-1)+$t(h));const d=s.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},a+l+d}function Mm(e,t,n){return n.options.strong||"*"}function Vm(e,t,n,r){return n.safe(e.value,r)}function Lm(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Dm(e,t,n){const r=(Sl(n)+(n.options.ruleSpaces?" ":"")).repeat(Lm(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Cl={blockquote:tm,break:Xs,code:am,definition:um,emphasis:gl,hardBreak:Xs,heading:dm,html:yl,image:xl,imageReference:bl,inlineCode:wl,link:vl,linkReference:Al,list:vm,listItem:Sm,paragraph:Em,root:Tm,strong:El,text:Vm,thematicBreak:Dm};function Im(){return{enter:{table:Rm,tableData:Ys,tableHeader:Ys,tableRow:jm},exit:{codeText:Hm,table:Fm,tableData:lr,tableHeader:lr,tableRow:lr}}}function Rm(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Fm(e){this.exit(e),this.data.inTable=void 0}function jm(e){this.enter({type:"tableRow",children:[]},e)}function lr(e){this.exit(e)}function Ys(e){this.enter({type:"tableCell",children:[]},e)}function Hm(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Nm));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Nm(e,t){return t==="|"?t:e}function Om(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
28
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:s,tableCell:l,tableRow:a}};function s(d,m,w,k){return u(c(d,w,k),d.align)}function a(d,m,w,k){const y=h(d,w,k),E=u([y]);return E.slice(0,E.indexOf(`
29
+ `))}function l(d,m,w,k){const y=w.enter("tableCell"),E=w.enter("phrasing"),v=w.containerPhrasing(d,{...k,before:o,after:o});return E(),y(),v}function u(d,m){return J0(d,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function c(d,m,w){const k=d.children;let y=-1;const E=[],v=m.enter("table");for(;++y<k.length;)E[y]=h(k[y],m,w);return v(),E}function h(d,m,w){const k=d.children;let y=-1;const E=[],v=m.enter("tableRow");for(;++y<k.length;)E[y]=l(k[y],d,m,w);return v(),E}function f(d,m,w){let k=Cl.inlineCode(d,m,w);return w.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function Bm(){return{exit:{taskListCheckValueChecked:Qs,taskListCheckValueUnchecked:Qs,paragraph:_m}}}function zm(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Zm}}}function Qs(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function _m(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,s;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){s=a;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Zm(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(s);let l=Cl.listItem(e,t,n,{...r,...a.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(c){return c+s}}function Um(){return[v0(),Z0(),q0(),Im(),Bm()]}function $m(e){return{extensions:[A0(),U0(e),K0(),Om(e),zm()]}}const Wm={tokenize:Qm,partial:!0},Tl={tokenize:Jm,partial:!0},Pl={tokenize:e1,partial:!0},Ml={tokenize:t1,partial:!0},qm={tokenize:n1,partial:!0},Vl={name:"wwwAutolink",tokenize:Xm,previous:Dl},Ll={name:"protocolAutolink",tokenize:Ym,previous:Il},We={name:"emailAutolink",tokenize:Gm,previous:Rl},ze={};function Km(){return{text:ze}}let et=48;for(;et<123;)ze[et]=We,et++,et===58?et=65:et===91&&(et=97);ze[43]=We;ze[45]=We;ze[46]=We;ze[95]=We;ze[72]=[We,Ll];ze[104]=[We,Ll];ze[87]=[We,Vl];ze[119]=[We,Vl];function Gm(e,t,n){const r=this;let i,o;return s;function s(h){return!Hr(h)||!Rl.call(r,r.previous)||Ti(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(h))}function a(h){return Hr(h)?(e.consume(h),a):h===64?(e.consume(h),l):n(h)}function l(h){return h===46?e.check(qm,c,u)(h):h===45||h===95||me(h)?(o=!0,e.consume(h),l):c(h)}function u(h){return e.consume(h),i=!0,l}function c(h){return o&&i&&xe(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function Xm(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Dl.call(r,r.previous)||Ti(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Wm,e.attempt(Tl,e.attempt(Pl,o),n),n)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function Ym(e,t,n){const r=this;let i="",o=!1;return s;function s(h){return(h===72||h===104)&&Il.call(r,r.previous)&&!Ti(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),a):n(h)}function a(h){if(xe(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),a;if(h===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(h),l}return n(h)}function l(h){return h===47?(e.consume(h),o?u:(o=!0,l)):n(h)}function u(h){return h===null||En(h)||re(h)||ot(h)||Hn(h)?n(h):e.attempt(Tl,e.attempt(Pl,c),n)(h)}function c(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function Qm(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),o):n(s)}function o(s){return s===null?n(s):t(s)}}function Jm(e,t,n){let r,i,o;return s;function s(u){return u===46||u===95?e.check(Ml,l,a)(u):u===null||re(u)||ot(u)||u!==45&&Hn(u)?l(u):(o=!0,e.consume(u),s)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),s}function l(u){return i||r||!o?n(u):t(u)}}function e1(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Ml,t,o)(s):s===null||re(s)||ot(s)?t(s):(e.consume(s),i)}function o(s){return s===41&&r++,e.consume(s),i}}function t1(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||re(a)||ot(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||re(a)||ot(a)?t(a):r(a)}function o(a){return xe(a)?s(a):n(a)}function s(a){return a===59?(e.consume(a),r):xe(a)?(e.consume(a),s):n(a)}}function n1(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return me(o)?n(o):t(o)}}function Dl(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||re(e)}function Il(e){return!xe(e)}function Rl(e){return!(e===47||Hr(e))}function Hr(e){return e===43||e===45||e===46||e===95||me(e)}function Ti(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const r1={tokenize:h1,partial:!0};function i1(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:l1,continuation:{tokenize:u1},exit:c1}},text:{91:{name:"gfmFootnoteCall",tokenize:a1},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:s1,resolveTo:o1}}}}function s1(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!s||!s._balanced)return n(l);const u=Re(r.sliceSerialize({start:s.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function o1(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function a1(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,s;return a;function a(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(h){if(o>999||h===93&&!s||h===null||h===91||re(h))return n(h);if(h===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(Re(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return re(h)||(s=!0),o++,e.consume(h),h===92?c:u}function c(h){return h===91||h===92||h===93?(e.consume(h),o++,u):u(h)}}function l1(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,a;return l;function l(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(m)}function c(m){if(s>999||m===93&&!a||m===null||m===91||re(m))return n(m);if(m===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return o=Re(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return re(m)||(a=!0),s++,e.consume(m),m===92?h:c}function h(m){return m===91||m===92||m===93?(e.consume(m),s++,c):c(m)}function f(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(o)||i.push(o),J(e,d,"gfmFootnoteDefinitionWhitespace")):n(m)}function d(m){return t(m)}}function u1(e,t,n){return e.check(en,t,e.attempt(r1,t,n))}function c1(e){e.exit("gfmFootnoteDefinition")}function h1(e,t,n){const r=this;return J(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(o):n(o)}}function f1(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,a){let l=-1;for(;++l<s.length;)if(s[l][0]==="enter"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._close){let u=l;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[l][1].end.offset-s[l][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[l][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[l][1].end)},h={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[l][1].start)},f=[["enter",c,a],["enter",s[u][1],a],["exit",s[u][1],a],["enter",h,a]],d=a.parser.constructs.insideSpan.null;d&&Te(f,f.length,0,Nn(d,s.slice(u+1,l),a)),Te(f,f.length,0,[["exit",h,a],["enter",s[l][1],a],["exit",s[l][1],a],["exit",c,a]]),Te(s,u-1,l-u+3,f),l=u+f.length-2;break}}for(l=-1;++l<s.length;)s[l][1].type==="strikethroughSequenceTemporary"&&(s[l][1].type="data");return s}function o(s,a,l){const u=this.previous,c=this.events;let h=0;return f;function f(m){return u===126&&c[c.length-1][1].type!=="characterEscape"?l(m):(s.enter("strikethroughSequenceTemporary"),d(m))}function d(m){const w=kt(u);if(m===126)return h>1?l(m):(s.consume(m),h++,d);if(h<2&&!n)return l(m);const k=s.exit("strikethroughSequenceTemporary"),y=kt(m);return k._open=!y||y===2&&!!w,k._close=!w||w===2&&!!y,a(m)}}}class d1{constructor(){this.map=[]}add(t,n,r){p1(this,t,n,r)}consume(t){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function p1(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function m1(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function g1(){return{flow:{null:{name:"table",tokenize:y1,resolveAll:x1}}}}function y1(e,t,n){const r=this;let i=0,o=0,s;return a;function a(A){let R=r.events.length-1;for(;R>-1;){const O=r.events[R][1].type;if(O==="lineEnding"||O==="linePrefix")R--;else break}const j=R>-1?r.events[R][1].type:null,G=j==="tableHead"||j==="tableRow"?S:l;return G===S&&r.parser.lazy[r.now().line]?n(A):G(A)}function l(A){return e.enter("tableHead"),e.enter("tableRow"),u(A)}function u(A){return A===124||(s=!0,o+=1),c(A)}function c(A){return A===null?n(A):_(A)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),d):n(A):Y(A)?J(e,c,"whitespace")(A):(o+=1,s&&(s=!1,i+=1),A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),s=!0,c):(e.enter("data"),h(A)))}function h(A){return A===null||A===124||re(A)?(e.exit("data"),c(A)):(e.consume(A),A===92?f:h)}function f(A){return A===92||A===124?(e.consume(A),h):h(A)}function d(A){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(A):(e.enter("tableDelimiterRow"),s=!1,Y(A)?J(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):m(A))}function m(A){return A===45||A===58?k(A):A===124?(s=!0,e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),w):C(A)}function w(A){return Y(A)?J(e,k,"whitespace")(A):k(A)}function k(A){return A===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),y):A===45?(o+=1,y(A)):A===null||_(A)?P(A):C(A)}function y(A){return A===45?(e.enter("tableDelimiterFiller"),E(A)):C(A)}function E(A){return A===45?(e.consume(A),E):A===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(A))}function v(A){return Y(A)?J(e,P,"whitespace")(A):P(A)}function P(A){return A===124?m(A):A===null||_(A)?!s||i!==o?C(A):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(A)):C(A)}function C(A){return n(A)}function S(A){return e.enter("tableRow"),N(A)}function N(A){return A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),N):A===null||_(A)?(e.exit("tableRow"),t(A)):Y(A)?J(e,N,"whitespace")(A):(e.enter("data"),L(A))}function L(A){return A===null||A===124||re(A)?(e.exit("data"),N(A)):(e.consume(A),A===92?F:L)}function F(A){return A===92||A===124?(e.consume(A),L):L(A)}}function x1(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,l=0,u,c,h;const f=new d1;for(;++n<e.length;){const d=e[n],m=d[1];d[0]==="enter"?m.type==="tableHead"?(a=!1,l!==0&&(Js(f,t,l,u,c),c=void 0,l=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,h=void 0,o=[0,0,0,0],s=[0,n+1,0,0],a&&(a=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",c,t]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],h=hn(f,t,o,i,void 0,h),o=[0,0,0,0]),s[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],h=hn(f,t,o,i,void 0,h)),o=s,s=[o[1],n,0,0])):m.type==="tableHead"?(a=!0,l=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=n,o[1]!==0?(s[0]=s[1],h=hn(f,t,o,i,n,h)):s[1]!==0&&(h=hn(f,t,s,i,n,h)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=n)}for(l!==0&&Js(f,t,l,u,c),f.consume(t.events),n=-1;++n<t.events.length;){const d=t.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=m1(t.events,n))}return e}function hn(e,t,n,r,i,o){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},ft(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const l=ft(t.events,n[1]);if(o={type:s,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=ft(t.events,n[2]),c=ft(t.events,n[3]),h={type:a,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const f=t.events[n[2]],d=t.events[n[3]];if(f[1].end=Object.assign({},d[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,w=n[3]-n[2]-1;e.add(m,w,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return i!==void 0&&(o.end=Object.assign({},ft(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Js(e,t,n,r,i){const o=[],s=ft(t.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,t])),r.end=Object.assign({},s),o.push(["exit",r,t]),e.add(n+1,0,o)}function ft(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const b1={name:"tasklistCheck",tokenize:k1};function w1(){return{text:{91:b1}}}function k1(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),o)}function o(l){return re(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),s):n(l)}function s(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(l)}function a(l){return _(l)?t(l):Y(l)?e.check({tokenize:v1},t,n)(l):n(l)}}function v1(e,t,n){return J(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function A1(e){return $a([Km(),i1(),f1(e),g1(),w1()])}const S1={};function E1(e){const t=this,n=e||S1,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(A1(n)),o.push(Um()),s.push($m(n))}const C1={get_status:"Get status",list_quests:"List quests",create_quest:"Create quest",complete_quest:"Complete quest",abandon_quest:"Abandon quest",start_timer:"Start timer",stop_timer:"Stop timer",get_timer:"Get timer",analyze_patterns:"Analyze patterns",suggest_quest:"Suggest quest",list_forge_rules:"List forge rules",list_forge_runs:"List forge runs",create_forge_rule:"Create forge rule",update_forge_rule:"Update forge rule",run_forge_rule:"Run forge rule",delete_forge_rule:"Delete forge rule",fetch_url:"Fetch URL",web_search:"Web search",read_file:"Read file",write_file:"Write file",edit_file:"Edit file",glob:"Glob",grep:"Search",bash:"Run command",send_telegram_message:"Send Telegram",get_integrations_status:"Check integrations",get_calendar_events:"Get calendar events",create_calendar_event:"Create calendar event",update_calendar_event:"Update calendar event",delete_calendar_event:"Delete calendar event",get_emails:"Get emails",send_email:"Send email"};function eo(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function T1(e){return e.start.date?e.start.date:e.start.dateTime?new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit"}).format(new Date(e.start.dateTime)):""}function P1(e){const t=e.split("-"),n=new Date(Number(t[0]),Number(t[1])-1,Number(t[2]));return new Intl.DateTimeFormat("en-US",{weekday:"short",month:"short",day:"numeric"}).format(n).replace(",","")}function M1(e){return e.dateTime?new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}).format(new Date(e.dateTime)):"All day"}function V1(e,t){if(!e.dateTime||!t.dateTime)return"";const n=new Date(t.dateTime).getTime()-new Date(e.dateTime).getTime(),r=Math.round(n/6e4);if(r<=0)return"";const i=Math.floor(r/60),o=r%60;return i===0?`${o}m`:o===0?`${i}h`:`${i}h ${o}m`}function L1(e){const t=new Map;for(const n of e){const r=T1(n);if(!r)continue;const i=t.get(r);i?i.push(n):t.set(r,[n])}return Array.from(t.entries()).sort(([n],[r])=>n.localeCompare(r)).map(([n,r])=>{const i=[...r].sort((o,s)=>{const a=!!o.start.date,l=!!s.start.date;return a&&!l?-1:!a&&l?1:o.start.dateTime&&s.start.dateTime?new Date(o.start.dateTime).getTime()-new Date(s.start.dateTime).getTime():0});return{dateKey:n,label:P1(n),events:i.map(o=>({id:o.id,time:M1(o.start),title:o.summary??"(no title)",duration:o.start.date?"":V1(o.start,o.end),isAllDay:!!o.start.date}))}})}function D1({resultJson:e}){let t;try{t=JSON.parse(e)}catch{return null}if(!t.ok||!Array.isArray(t.events))return null;if(t.events.length===0)return b.jsx("p",{className:"py-2 text-xs text-muted-foreground italic",children:"No events in this period."});const n=L1(t.events);return b.jsx("div",{className:"space-y-3 py-1",children:n.map(r=>b.jsxs("div",{children:[b.jsx("p",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:r.label}),b.jsx("div",{className:"space-y-0.5",children:r.events.map(i=>b.jsxs("div",{className:"flex items-baseline gap-3 text-xs",children:[b.jsx("span",{className:pe("w-16 shrink-0 text-right font-mono tabular-nums",i.isAllDay?"text-muted-foreground/60 italic":"text-muted-foreground"),children:i.time}),b.jsxs("span",{className:"min-w-0 flex-1 text-foreground/90",children:[i.title,i.duration&&b.jsxs("span",{className:"ml-1.5 text-muted-foreground",children:["· ",i.duration]})]})]},i.id))})]},r.dateKey))})}function I1({toolName:e,toolArgsJson:t,toolResultJson:n,status:r}){const[i,o]=p.useState(!1),s=C1[e]??e,a=r==="pending",l=eo(t),u=n!=null?eo(n):null,c=e==="get_calendar_events";return b.jsxs("div",{className:pe("my-1 overflow-hidden rounded-r-lg border-l-2 bg-secondary/30",a?"border-grind-orange/60":"border-grind-xp/40"),children:[b.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors duration-100 hover:bg-secondary/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",onClick:()=>o(h=>!h),"aria-expanded":i,"aria-controls":`tool-call-${e}-body`,children:[b.jsx(Rc,{size:12,weight:"fill","aria-hidden":"true",className:pe("shrink-0 transition-colors duration-150",a?"text-grind-orange animate-pulse":"text-muted-foreground/60")}),b.jsx("span",{className:pe("flex-1 font-mono text-xs",a?"text-foreground/70":"text-muted-foreground"),children:s}),a&&b.jsx("span",{className:"text-[10px] text-muted-foreground/60 tabular-nums","aria-live":"polite",children:"running…"}),!a&&b.jsx("span",{className:"text-[10px] text-grind-xp/80",children:"done"}),b.jsx(li,{size:11,"aria-hidden":"true",className:pe("shrink-0 text-muted-foreground/50 transition-transform duration-150",i?"rotate-180":"")})]}),i&&b.jsxs("div",{id:`tool-call-${e}-body`,className:"border-t border-border/30 px-3 py-2 space-y-2",children:[b.jsxs("div",{children:[b.jsx("p",{className:"mb-1 text-[10px] font-medium uppercase tracking-wider text-muted-foreground/60",children:"Input"}),b.jsx("pre",{className:"overflow-x-auto rounded bg-background/60 p-2 font-mono text-[11px] text-foreground/70 leading-relaxed",children:l})]}),u!=null&&b.jsxs("div",{children:[b.jsx("p",{className:"mb-1 text-[10px] font-medium uppercase tracking-wider text-muted-foreground/60",children:"Output"}),c?b.jsx("div",{className:"rounded bg-background/60 px-3 py-2",children:b.jsx(D1,{resultJson:n})}):b.jsx("pre",{className:"max-h-48 overflow-auto rounded bg-background/60 p-2 font-mono text-[11px] text-foreground/70 leading-relaxed",children:u})]})]})]})}const Pi=p.createContext({});function Mi(e){const t=p.useRef(null);return t.current===null&&(t.current=e()),t.current}const Fl=typeof window<"u",jl=Fl?p.useLayoutEffect:p.useEffect,_n=p.createContext(null);function Vi(e,t){e.indexOf(t)===-1&&e.push(t)}function Mn(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Be=(e,t,n)=>n>t?t:n<e?e:n;let Li=()=>{};const $e={},Hl=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Nl(e){return typeof e=="object"&&e!==null}const Ol=e=>/^0[^.\s]+$/u.test(e);function Bl(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ve=e=>e,R1=(e,t)=>n=>t(e(n)),nn=(...e)=>e.reduce(R1),Wt=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Di{constructor(){this.subscriptions=[]}add(t){return Vi(this.subscriptions,t),()=>Mn(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Fe=e=>e*1e3,Me=e=>e/1e3;function zl(e,t){return t?e*(1e3/t):0}const _l=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,F1=1e-7,j1=12;function H1(e,t,n,r,i){let o,s,a=0;do s=t+(n-t)/2,o=_l(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>F1&&++a<j1);return s}function rn(e,t,n,r){if(e===t&&n===r)return Ve;const i=o=>H1(o,0,1,e,n);return o=>o===0||o===1?o:_l(i(o),t,r)}const Zl=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ul=e=>t=>1-e(1-t),$l=rn(.33,1.53,.69,.99),Ii=Ul($l),Wl=Zl(Ii),ql=e=>(e*=2)<1?.5*Ii(e):.5*(2-Math.pow(2,-10*(e-1))),Ri=e=>1-Math.sin(Math.acos(e)),Kl=Ul(Ri),Gl=Zl(Ri),N1=rn(.42,0,1,1),O1=rn(0,0,.58,1),Xl=rn(.42,0,.58,1),B1=e=>Array.isArray(e)&&typeof e[0]!="number",Yl=e=>Array.isArray(e)&&typeof e[0]=="number",z1={linear:Ve,easeIn:N1,easeInOut:Xl,easeOut:O1,circIn:Ri,circInOut:Gl,circOut:Kl,backIn:Ii,backInOut:Wl,backOut:$l,anticipate:ql},_1=e=>typeof e=="string",to=e=>{if(Yl(e)){Li(e.length===4);const[t,n,r,i]=e;return rn(t,n,r,i)}else if(_1(e))return z1[e];return e},fn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Z1(e,t){let n=new Set,r=new Set,i=!1,o=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){s.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,h=!1,f=!1)=>{const m=f&&i?n:r;return h&&s.add(c),m.has(c)||m.add(c),c},cancel:c=>{r.delete(c),s.delete(c)},process:c=>{if(a=c,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(l),n.clear(),i=!1,o&&(o=!1,u.process(c))}};return u}const U1=40;function Ql(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=fn.reduce((v,P)=>(v[P]=Z1(o),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:f,render:d,postRender:m}=s,w=()=>{const v=$e.useManualTiming?i.timestamp:performance.now();n=!1,$e.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(v-i.timestamp,U1),1)),i.timestamp=v,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),d.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(w))},k=()=>{n=!0,r=!0,i.isProcessing||e(w)};return{schedule:fn.reduce((v,P)=>{const C=s[P];return v[P]=(S,N=!1,L=!1)=>(n||k(),C.schedule(S,N,L)),v},{}),cancel:v=>{for(let P=0;P<fn.length;P++)s[fn[P]].cancel(v)},state:i,steps:s}}const{schedule:se,cancel:Xe,state:de,steps:ur}=Ql(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ve,!0);let yn;function $1(){yn=void 0}const be={now:()=>(yn===void 0&&be.set(de.isProcessing||$e.useManualTiming?de.timestamp:performance.now()),yn),set:e=>{yn=e,queueMicrotask($1)}},Jl=e=>t=>typeof t=="string"&&t.startsWith(e),eu=Jl("--"),W1=Jl("var(--"),Fi=e=>W1(e)?q1.test(e.split("/*")[0].trim()):!1,q1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function no(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Et={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},qt={...Et,transform:e=>Be(0,1,e)},dn={...Et,default:1},Bt=e=>Math.round(e*1e5)/1e5,ji=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function K1(e){return e==null}const G1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Hi=(e,t)=>n=>!!(typeof n=="string"&&G1.test(n)&&n.startsWith(e)||t&&!K1(n)&&Object.prototype.hasOwnProperty.call(n,t)),tu=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,s,a]=r.match(ji);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},X1=e=>Be(0,255,e),cr={...Et,transform:e=>Math.round(X1(e))},rt={test:Hi("rgb","red"),parse:tu("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+cr.transform(e)+", "+cr.transform(t)+", "+cr.transform(n)+", "+Bt(qt.transform(r))+")"};function Y1(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Nr={test:Hi("#"),parse:Y1,transform:rt.transform},sn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ke=sn("deg"),Oe=sn("%"),H=sn("px"),Q1=sn("vh"),J1=sn("vw"),ro={...Oe,parse:e=>Oe.parse(e)/100,transform:e=>Oe.transform(e*100)},pt={test:Hi("hsl","hue"),parse:tu("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Oe.transform(Bt(t))+", "+Oe.transform(Bt(n))+", "+Bt(qt.transform(r))+")"},he={test:e=>rt.test(e)||Nr.test(e)||pt.test(e),parse:e=>rt.test(e)?rt.parse(e):pt.test(e)?pt.parse(e):Nr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?rt.transform(e):pt.transform(e),getAnimatableNone:e=>{const t=he.parse(e);return t.alpha=0,he.transform(t)}},eg=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function tg(e){return isNaN(e)&&typeof e=="string"&&(e.match(ji)?.length||0)+(e.match(eg)?.length||0)>0}const nu="number",ru="color",ng="var",rg="var(",io="${}",ig=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Kt(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const a=t.replace(ig,l=>(he.test(l)?(r.color.push(o),i.push(ru),n.push(he.parse(l))):l.startsWith(rg)?(r.var.push(o),i.push(ng),n.push(l)):(r.number.push(o),i.push(nu),n.push(parseFloat(l))),++o,io)).split(io);return{values:n,split:a,indexes:r,types:i}}function iu(e){return Kt(e).values}function su(e){const{split:t,types:n}=Kt(e),r=t.length;return i=>{let o="";for(let s=0;s<r;s++)if(o+=t[s],i[s]!==void 0){const a=n[s];a===nu?o+=Bt(i[s]):a===ru?o+=he.transform(i[s]):o+=i[s]}return o}}const sg=e=>typeof e=="number"?0:he.test(e)?he.getAnimatableNone(e):e;function og(e){const t=iu(e);return su(e)(t.map(sg))}const je={test:tg,parse:iu,createTransformer:su,getAnimatableNone:og};function hr(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ag({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=hr(l,a,e+1/3),o=hr(l,a,e),s=hr(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}function Vn(e,t){return n=>n>0?t:e}const oe=(e,t,n)=>e+(t-e)*n,fr=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},lg=[Nr,rt,pt],ug=e=>lg.find(t=>t.test(e));function so(e){const t=ug(e);if(!t)return!1;let n=t.parse(e);return t===pt&&(n=ag(n)),n}const oo=(e,t)=>{const n=so(e),r=so(t);if(!n||!r)return Vn(e,t);const i={...n};return o=>(i.red=fr(n.red,r.red,o),i.green=fr(n.green,r.green,o),i.blue=fr(n.blue,r.blue,o),i.alpha=oe(n.alpha,r.alpha,o),rt.transform(i))},Or=new Set(["none","hidden"]);function cg(e,t){return Or.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function hg(e,t){return n=>oe(e,t,n)}function Ni(e){return typeof e=="number"?hg:typeof e=="string"?Fi(e)?Vn:he.test(e)?oo:pg:Array.isArray(e)?ou:typeof e=="object"?he.test(e)?oo:fg:Vn}function ou(e,t){const n=[...e],r=n.length,i=e.map((o,s)=>Ni(o)(o,t[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}}function fg(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Ni(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function dg(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],s=e.indexes[o][r[o]],a=e.values[s]??0;n[i]=a,r[o]++}return n}const pg=(e,t)=>{const n=je.createTransformer(t),r=Kt(e),i=Kt(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Or.has(e)&&!i.values.length||Or.has(t)&&!r.values.length?cg(e,t):nn(ou(dg(r,i),i.values),n):Vn(e,t)};function au(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?oe(e,t,n):Ni(e)(e,t)}const mg=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>se.update(t,n),stop:()=>Xe(t),now:()=>de.isProcessing?de.timestamp:be.now()}},lu=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)r+=Math.round(e(o/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Ln=2e4;function Oi(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ln;)t+=n,r=e.next(t);return t>=Ln?1/0:t}function gg(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Oi(r),Ln);return{type:"keyframes",ease:o=>r.next(i*o).value/t,duration:Me(i)}}const yg=5;function uu(e,t,n){const r=Math.max(t-yg,0);return zl(n-e(r),t-r)}const ae={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},dr=.001;function xg({duration:e=ae.duration,bounce:t=ae.bounce,velocity:n=ae.velocity,mass:r=ae.mass}){let i,o,s=1-t;s=Be(ae.minDamping,ae.maxDamping,s),e=Be(ae.minDuration,ae.maxDuration,Me(e)),s<1?(i=u=>{const c=u*s,h=c*e,f=c-n,d=Br(u,s),m=Math.exp(-h);return dr-f/d*m},o=u=>{const h=u*s*e,f=h*n+n,d=Math.pow(s,2)*Math.pow(u,2)*e,m=Math.exp(-h),w=Br(Math.pow(u,2),s);return(-i(u)+dr>0?-1:1)*((f-d)*m)/w}):(i=u=>{const c=Math.exp(-u*e),h=(u-n)*e+1;return-dr+c*h},o=u=>{const c=Math.exp(-u*e),h=(n-u)*(e*e);return c*h});const a=5/e,l=wg(i,o,a);if(e=Fe(e),isNaN(l))return{stiffness:ae.stiffness,damping:ae.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const bg=12;function wg(e,t,n){let r=n;for(let i=1;i<bg;i++)r=r-e(r)/t(r);return r}function Br(e,t){return e*Math.sqrt(1-t*t)}const kg=["duration","bounce"],vg=["stiffness","damping","mass"];function ao(e,t){return t.some(n=>e[n]!==void 0)}function Ag(e){let t={velocity:ae.velocity,stiffness:ae.stiffness,damping:ae.damping,mass:ae.mass,isResolvedFromDuration:!1,...e};if(!ao(e,vg)&&ao(e,kg))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*Be(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:ae.mass,stiffness:i,damping:o}}else{const n=xg(e);t={...t,...n,mass:ae.mass},t.isResolvedFromDuration=!0}return t}function Dn(e=ae.visualDuration,t=ae.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=Ag({...n,velocity:-Me(n.velocity||0)}),m=f||0,w=u/(2*Math.sqrt(l*c)),k=s-o,y=Me(Math.sqrt(l/c)),E=Math.abs(k)<5;r||(r=E?ae.restSpeed.granular:ae.restSpeed.default),i||(i=E?ae.restDelta.granular:ae.restDelta.default);let v;if(w<1){const C=Br(y,w);v=S=>{const N=Math.exp(-w*y*S);return s-N*((m+w*y*k)/C*Math.sin(C*S)+k*Math.cos(C*S))}}else if(w===1)v=C=>s-Math.exp(-y*C)*(k+(m+y*k)*C);else{const C=y*Math.sqrt(w*w-1);v=S=>{const N=Math.exp(-w*y*S),L=Math.min(C*S,300);return s-N*((m+w*y*k)*Math.sinh(L)+C*k*Math.cosh(L))/C}}const P={calculatedDuration:d&&h||null,next:C=>{const S=v(C);if(d)a.done=C>=h;else{let N=C===0?m:0;w<1&&(N=C===0?Fe(m):uu(v,C,S));const L=Math.abs(N)<=r,F=Math.abs(s-S)<=i;a.done=L&&F}return a.value=a.done?s:S,a},toString:()=>{const C=Math.min(Oi(P),Ln),S=lu(N=>P.next(C*N).value,C,30);return C+"ms "+S},toTransition:()=>{}};return P}Dn.applyToOptions=e=>{const t=gg(e,100,Dn);return e.ease=t.ease,e.duration=Fe(t.duration),e.type="keyframes",e};function zr({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=e[0],f={done:!1,value:h},d=L=>a!==void 0&&L<a||l!==void 0&&L>l,m=L=>a===void 0?l:l===void 0||Math.abs(a-L)<Math.abs(l-L)?a:l;let w=n*t;const k=h+w,y=s===void 0?k:s(k);y!==k&&(w=y-h);const E=L=>-w*Math.exp(-L/r),v=L=>y+E(L),P=L=>{const F=E(L),A=v(L);f.done=Math.abs(F)<=u,f.value=f.done?y:A};let C,S;const N=L=>{d(f.value)&&(C=L,S=Dn({keyframes:[f.value,m(f.value)],velocity:uu(v,L,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return N(0),{calculatedDuration:null,next:L=>{let F=!1;return!S&&C===void 0&&(F=!0,P(L),N(L)),C!==void 0&&L>=C?S.next(L-C):(!F&&P(L),f)}}}function Sg(e,t,n){const r=[],i=n||$e.mix||au,o=e.length-1;for(let s=0;s<o;s++){let a=i(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||Ve:t;a=nn(l,a)}r.push(a)}return r}function Eg(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Li(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Sg(t,r,i),l=a.length,u=c=>{if(s&&c<e[0])return t[0];let h=0;if(l>1)for(;h<e.length-2&&!(c<e[h+1]);h++);const f=Wt(e[h],e[h+1],c);return a[h](f)};return n?c=>u(Be(e[0],e[o-1],c)):u}function Cg(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Wt(0,t,r);e.push(oe(n,1,i))}}function Tg(e){const t=[0];return Cg(t,e.length-1),t}function Pg(e,t){return e.map(n=>n*t)}function Mg(e,t){return e.map(()=>t||Xl).splice(0,e.length-1)}function zt({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=B1(r)?r.map(to):to(r),o={done:!1,value:t[0]},s=Pg(n&&n.length===t.length?n:Tg(t),e),a=Eg(s,t,{ease:Array.isArray(i)?i:Mg(t,i)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const Vg=e=>e!==null;function Bi(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(Vg),a=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||r===void 0?o[a]:r}const Lg={decay:zr,inertia:zr,tween:zt,keyframes:zt,spring:Dn};function cu(e){typeof e.type=="string"&&(e.type=Lg[e.type])}class zi{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Dg=e=>e/100;class _i extends zi{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==be.now()&&this.tick(be.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;cu(t);const{type:n=zt,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=t;let{keyframes:a}=t;const l=n||zt;l!==zt&&typeof a[0]!="number"&&(this.mixKeyframes=nn(Dg,au(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=Oi(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:d,type:m,onUpdate:w,finalKeyframe:k}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),E=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,P=r;if(h){const L=Math.min(this.currentTime,i)/a;let F=Math.floor(L),A=L%1;!A&&L>=1&&(A=1),A===1&&F--,F=Math.min(F,h+1),F%2&&(f==="reverse"?(A=1-A,d&&(A-=d/a)):f==="mirror"&&(P=s)),v=Be(0,1,A)*a}const C=E?{done:!1,value:c[0]}:P.next(v);o&&(C.value=o(C.value));let{done:S}=C;!E&&l!==null&&(S=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return N&&m!==zr&&(C.value=Bi(c,this.options,k,this.speed)),w&&w(C.value),N&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return Me(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Me(t)}get time(){return Me(this.currentTime)}set time(t){t=Fe(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(be.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Me(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=mg,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(be.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Ig(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const it=e=>e*180/Math.PI,_r=e=>{const t=it(Math.atan2(e[1],e[0]));return Zr(t)},Rg={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:_r,rotateZ:_r,skewX:e=>it(Math.atan(e[1])),skewY:e=>it(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Zr=e=>(e=e%360,e<0&&(e+=360),e),lo=_r,uo=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),co=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Fg={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:uo,scaleY:co,scale:e=>(uo(e)+co(e))/2,rotateX:e=>Zr(it(Math.atan2(e[6],e[5]))),rotateY:e=>Zr(it(Math.atan2(-e[2],e[0]))),rotateZ:lo,rotate:lo,skewX:e=>it(Math.atan(e[4])),skewY:e=>it(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ur(e){return e.includes("scale")?1:0}function $r(e,t){if(!e||e==="none")return Ur(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Fg,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Rg,i=a}if(!i)return Ur(t);const o=r[t],s=i[1].split(",").map(Hg);return typeof o=="function"?o(s):s[o]}const jg=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return $r(n,t)};function Hg(e){return parseFloat(e.trim())}const Ct=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Tt=new Set(Ct),ho=e=>e===Et||e===H,Ng=new Set(["x","y","z"]),Og=Ct.filter(e=>!Ng.has(e));function Bg(e){const t=[];return Og.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Ge={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>$r(t,"x"),y:(e,{transform:t})=>$r(t,"y")};Ge.translateX=Ge.x;Ge.translateY=Ge.y;const st=new Set;let Wr=!1,qr=!1,Kr=!1;function hu(){if(qr){const e=Array.from(st).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=Bg(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,s])=>{r.getValue(o)?.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}qr=!1,Wr=!1,st.forEach(e=>e.complete(Kr)),st.clear()}function fu(){st.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(qr=!0)})}function zg(){Kr=!0,fu(),hu(),Kr=!1}class Zi{constructor(t,n,r,i,o,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(st.add(this),Wr||(Wr=!0,se.read(fu),se.resolveKeyframes(hu))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const o=i?.get(),s=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const a=r.readValue(n,s);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=s),i&&o===void 0&&i.set(t[0])}Ig(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),st.delete(this)}cancel(){this.state==="scheduled"&&(st.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const _g=e=>e.startsWith("--");function Zg(e,t,n){_g(t)?e.style.setProperty(t,n):e.style[t]=n}const Ug={};function du(e,t){const n=Bl(e);return()=>Ug[t]??n()}const $g=du(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),pu=du(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),jt=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,fo={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:jt([0,.65,.55,1]),circOut:jt([.55,0,1,.45]),backIn:jt([.31,.01,.66,-.59]),backOut:jt([.33,1.53,.69,.99])};function mu(e,t){if(e)return typeof e=="function"?pu()?lu(e,t):"ease-out":Yl(e)?jt(e):Array.isArray(e)?e.map(n=>mu(n,t)||fo.easeOut):fo[e]}function Wg(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const h=mu(a,i);Array.isArray(h)&&(c.easing=h);const f={delay:r,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(c,f)}function gu(e){return typeof e=="function"&&"applyToOptions"in e}function qg({type:e,...t}){return gu(e)&&pu()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class yu extends zi{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:s=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=s,this.options=t,Li(typeof t.type!="string");const u=qg(t);this.animation=Wg(n,r,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Bi(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Zg(n,r,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Me(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Me(t)}get time(){return Me(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Fe(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&$g()?(this.animation.timeline=t,Ve):n(this)}}const xu={anticipate:ql,backInOut:Wl,circInOut:Gl};function Kg(e){return e in xu}function Gg(e){typeof e.ease=="string"&&Kg(e.ease)&&(e.ease=xu[e.ease])}const pr=10;class Xg extends yu{constructor(t){Gg(t),cu(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new _i({...s,autoplay:!1}),l=Math.max(pr,be.now()-this.startTime),u=Be(0,pr,l-pr);n.setWithVelocity(a.sample(Math.max(0,l-u)).value,a.sample(l).value,u),a.stop()}}const po=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(je.test(e)||e==="0")&&!e.startsWith("url("));function Yg(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Qg(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],s=po(i,t),a=po(o,t);return!s||!a?!1:Yg(e)||(n==="spring"||gu(n))&&r}function Gr(e){e.duration=0,e.type="keyframes"}const Jg=new Set(["opacity","clipPath","filter","transform"]),e2=Bl(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function t2(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return e2()&&n&&Jg.has(n)&&(n!=="transform"||!u)&&!l&&!r&&i!=="mirror"&&o!==0&&s!=="inertia"}const n2=40;class r2 extends zi{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s="loop",keyframes:a,name:l,motionValue:u,element:c,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=be.now();const f={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:s,name:l,motionValue:u,element:c,...h},d=c?.KeyframeResolver||Zi;this.keyframeResolver=new d(a,(m,w,k)=>this.onKeyframesResolved(m,w,f,!k),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:o,type:s,velocity:a,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=be.now(),Qg(t,o,s,a)||(($e.instantAnimations||!l)&&c?.(Bi(t,r,n)),t[0]=t[t.length-1],Gr(r),r.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>n2?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},d=!u&&t2(f),m=f.motionValue?.owner?.current,w=d?new Xg({...f,element:m}):new _i(f);w.finished.then(()=>{this.notifyFinished()}).catch(Ve),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),zg()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function bu(e,t,n,r=0,i=1){const o=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),s=e.size,a=(s-1)*r;return typeof n=="function"?n(o,s):i===1?o*r:a-o*r}const i2=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function s2(e){const t=i2.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function wu(e,t,n=1){const[r,i]=s2(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return Hl(s)?parseFloat(s):s}return Fi(i)?wu(i,t,n+1):i}const o2={type:"spring",stiffness:500,damping:25,restSpeed:10},a2=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),l2={type:"keyframes",duration:.8},u2={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},c2=(e,{keyframes:t})=>t.length>2?l2:Tt.has(e)?e.startsWith("scale")?a2(t[1]):o2:u2,h2=e=>e!==null;function f2(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(h2),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[o]}function ku(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Ui(e,t){const n=e?.[t]??e?.default??e;return n!==e?ku(n,e):n}function d2({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const $i=(e,t,n,r={},i,o)=>s=>{const a=Ui(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Fe(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:i};d2(a)||Object.assign(c,c2(e,c)),c.duration&&(c.duration=Fe(c.duration)),c.repeatDelay&&(c.repeatDelay=Fe(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Gr(c),c.delay===0&&(h=!0)),($e.instantAnimations||$e.skipAnimations||i?.shouldSkipAnimations)&&(h=!0,Gr(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!o&&t.get()!==void 0){const f=f2(c.keyframes,a);if(f!==void 0){se.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new _i(c):new r2(c)};function mo(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Wi(e,t,n,r){if(typeof t=="function"){const[i,o]=mo(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=mo(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function wt(e,t,n){const r=e.getProps();return Wi(r,t,n!==void 0?n:r.custom,e)}const vu=new Set(["width","height","top","left","right","bottom",...Ct]),go=30,p2=e=>!isNaN(parseFloat(e));class m2{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const i=be.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=be.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=p2(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Di);const r=this.events[t].add(n);return t==="change"?()=>{r(),se.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=be.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>go)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,go);return zl(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function vt(e,t){return new m2(e,t)}const Xr=e=>Array.isArray(e);function g2(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,vt(n))}function y2(e){return Xr(e)?e[e.length-1]||0:e}function x2(e,t){const n=wt(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const a=y2(o[s]);g2(e,s,a)}}const ge=e=>!!(e&&e.getVelocity);function b2(e){return!!(ge(e)&&e.add)}function Yr(e,t){const n=e.getValue("willChange");if(b2(n))return n.add(t);if(!n&&$e.WillChange){const r=new $e.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function qi(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const w2="framerAppearId",Au="data-"+qi(w2);function Su(e){return e.props[Au]}function k2({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Eu(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o,transitionEnd:s,...a}=t;const l=e.getDefaultTransition();o=o?ku(o,l):l;const u=o?.reduceMotion;r&&(o=r);const c=[],h=i&&e.animationState&&e.animationState.getState()[i];for(const f in a){const d=e.getValue(f,e.latestValues[f]??null),m=a[f];if(m===void 0||h&&k2(h,f))continue;const w={delay:n,...Ui(o||{},f)},k=d.get();if(k!==void 0&&!d.isAnimating&&!Array.isArray(m)&&m===k&&!w.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const P=Su(e);if(P){const C=window.MotionHandoffAnimation(P,f,se);C!==null&&(w.startTime=C,y=!0)}}Yr(e,f);const E=u??e.shouldReduceMotion;d.start($i(f,d,m,E&&vu.has(f)?{type:!1}:w,e,y));const v=d.animation;v&&c.push(v)}if(s){const f=()=>se.update(()=>{s&&x2(e,s)});c.length?Promise.all(c).then(f):f()}return c}function Qr(e,t,n={}){const r=wt(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Eu(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:h}=i;return v2(e,t,l,u,c,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,s]:[s,o];return l().then(()=>u())}else return Promise.all([o(),s(n.delay)])}function v2(e,t,n=0,r=0,i=0,o=1,s){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Qr(l,t,{...s,delay:n+(typeof r=="function"?0:r)+bu(e.variantChildren,l,r,i,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function A2(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Qr(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Qr(e,t,n);else{const i=typeof t=="function"?wt(e,t,n.custom):t;r=Promise.all(Eu(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const S2={test:e=>e==="auto",parse:e=>e},Cu=e=>t=>t.test(e),Tu=[Et,H,Oe,Ke,J1,Q1,S2],yo=e=>Tu.find(Cu(e));function E2(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ol(e):!0}const C2=new Set(["brightness","contrast","saturate","opacity"]);function T2(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ji)||[];if(!r)return e;const i=n.replace(r,"");let o=C2.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const P2=/\b([a-z-]*)\(.*?\)/gu,Jr={...je,getAnimatableNone:e=>{const t=e.match(P2);return t?t.map(T2).join(" "):e}},ei={...je,getAnimatableNone:e=>{const t=je.parse(e);return je.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},xo={...Et,transform:Math.round},M2={rotate:Ke,rotateX:Ke,rotateY:Ke,rotateZ:Ke,scale:dn,scaleX:dn,scaleY:dn,scaleZ:dn,skew:Ke,skewX:Ke,skewY:Ke,distance:H,translateX:H,translateY:H,translateZ:H,x:H,y:H,z:H,perspective:H,transformPerspective:H,opacity:qt,originX:ro,originY:ro,originZ:H},Ki={borderWidth:H,borderTopWidth:H,borderRightWidth:H,borderBottomWidth:H,borderLeftWidth:H,borderRadius:H,borderTopLeftRadius:H,borderTopRightRadius:H,borderBottomRightRadius:H,borderBottomLeftRadius:H,width:H,maxWidth:H,height:H,maxHeight:H,top:H,right:H,bottom:H,left:H,inset:H,insetBlock:H,insetBlockStart:H,insetBlockEnd:H,insetInline:H,insetInlineStart:H,insetInlineEnd:H,padding:H,paddingTop:H,paddingRight:H,paddingBottom:H,paddingLeft:H,paddingBlock:H,paddingBlockStart:H,paddingBlockEnd:H,paddingInline:H,paddingInlineStart:H,paddingInlineEnd:H,margin:H,marginTop:H,marginRight:H,marginBottom:H,marginLeft:H,marginBlock:H,marginBlockStart:H,marginBlockEnd:H,marginInline:H,marginInlineStart:H,marginInlineEnd:H,fontSize:H,backgroundPositionX:H,backgroundPositionY:H,...M2,zIndex:xo,fillOpacity:qt,strokeOpacity:qt,numOctaves:xo},V2={...Ki,color:he,backgroundColor:he,outlineColor:he,fill:he,stroke:he,borderColor:he,borderTopColor:he,borderRightColor:he,borderBottomColor:he,borderLeftColor:he,filter:Jr,WebkitFilter:Jr,mask:ei,WebkitMask:ei},Pu=e=>V2[e],L2=new Set([Jr,ei]);function Mu(e,t){let n=Pu(e);return L2.has(n)||(n=je),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const D2=new Set(["auto","none","0"]);function I2(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!D2.has(o)&&Kt(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=Mu(n,i)}class R2 extends Zi{constructor(t,n,r,i,o){super(t,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let h=t[c];if(typeof h=="string"&&(h=h.trim(),Fi(h))){const f=wu(h,n.current);f!==void 0&&(t[c]=f),c===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!vu.has(r)||t.length!==2)return;const[i,o]=t,s=yo(i),a=yo(o),l=no(i),u=no(o);if(l!==u&&Ge[r]){this.needsMeasurement=!0;return}if(s!==a)if(ho(s)&&ho(a))for(let c=0;c<t.length;c++){const h=t[c];typeof h=="string"&&(t[c]=parseFloat(h))}else Ge[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||E2(t[i]))&&r.push(i);r.length&&I2(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ge[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,s=r[o];r[o]=Ge[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}const F2=new Set(["opacity","clipPath","filter","transform"]);function Vu(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(r=>r!=null)}const Lu=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ti(e){return Nl(e)&&"offsetHeight"in e}const{schedule:Gi}=Ql(queueMicrotask,!1),Ie={x:!1,y:!1};function Du(){return Ie.x||Ie.y}function j2(e){return e==="x"||e==="y"?Ie[e]?null:(Ie[e]=!0,()=>{Ie[e]=!1}):Ie.x||Ie.y?null:(Ie.x=Ie.y=!0,()=>{Ie.x=Ie.y=!1})}function Iu(e,t){const n=Vu(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function H2(e){return!(e.pointerType==="touch"||Du())}function N2(e,t,n={}){const[r,i,o]=Iu(e,n);return r.forEach(s=>{let a=!1,l=!1,u;const c=()=>{s.removeEventListener("pointerleave",m)},h=k=>{u&&(u(k),u=void 0),c()},f=k=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,h(k))},d=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},m=k=>{if(k.pointerType!=="touch"){if(a){l=!0;return}h(k)}},w=k=>{if(!H2(k))return;l=!1;const y=t(s,k);typeof y=="function"&&(u=y,s.addEventListener("pointerleave",m,i))};s.addEventListener("pointerenter",w,i),s.addEventListener("pointerdown",d,i)}),o}const Ru=(e,t)=>t?e===t?!0:Ru(e,t.parentElement):!1,Xi=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,O2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function B2(e){return O2.has(e.tagName)||e.isContentEditable===!0}const z2=new Set(["INPUT","SELECT","TEXTAREA"]);function _2(e){return z2.has(e.tagName)||e.isContentEditable===!0}const xn=new WeakSet;function bo(e){return t=>{t.key==="Enter"&&e(t)}}function mr(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Z2=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=bo(()=>{if(xn.has(n))return;mr(n,"down");const i=bo(()=>{mr(n,"up")}),o=()=>mr(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function wo(e){return Xi(e)&&!Du()}const ko=new WeakSet;function U2(e,t,n={}){const[r,i,o]=Iu(e,n),s=a=>{const l=a.currentTarget;if(!wo(a)||ko.has(a))return;xn.add(l),n.stopPropagation&&ko.add(a);const u=t(l,a),c=(d,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),xn.has(l)&&xn.delete(l),wo(d)&&typeof u=="function"&&u(d,{success:m})},h=d=>{c(d,l===window||l===document||n.useGlobalTarget||Ru(l,d.target))},f=d=>{c(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,i),ti(a)&&(a.addEventListener("focus",u=>Z2(u,i)),!B2(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Yi(e){return Nl(e)&&"ownerSVGElement"in e}const bn=new WeakMap;let wn;const Fu=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:Yi(r)&&"getBBox"in r?r.getBBox()[t]:r[n],$2=Fu("inline","width","offsetWidth"),W2=Fu("block","height","offsetHeight");function q2({target:e,borderBoxSize:t}){bn.get(e)?.forEach(n=>{n(e,{get width(){return $2(e,t)},get height(){return W2(e,t)}})})}function K2(e){e.forEach(q2)}function G2(){typeof ResizeObserver>"u"||(wn=new ResizeObserver(K2))}function X2(e,t){wn||G2();const n=Vu(e);return n.forEach(r=>{let i=bn.get(r);i||(i=new Set,bn.set(r,i)),i.add(t),wn?.observe(r)}),()=>{n.forEach(r=>{const i=bn.get(r);i?.delete(t),i?.size||wn?.unobserve(r)})}}const kn=new Set;let mt;function Y2(){mt=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};kn.forEach(t=>t(e))},window.addEventListener("resize",mt)}function Q2(e){return kn.add(e),mt||Y2(),()=>{kn.delete(e),!kn.size&&typeof mt=="function"&&(window.removeEventListener("resize",mt),mt=void 0)}}function vo(e,t){return typeof e=="function"?Q2(e):X2(e,t)}function J2(e){return Yi(e)&&e.tagName==="svg"}const ey=[...Tu,he,je],ty=e=>ey.find(Cu(e)),Ao=()=>({translate:0,scale:1,origin:0,originPoint:0}),gt=()=>({x:Ao(),y:Ao()}),So=()=>({min:0,max:0}),fe=()=>({x:So(),y:So()}),ny=new WeakMap;function Zn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Gt(e){return typeof e=="string"||Array.isArray(e)}const Qi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ji=["initial",...Qi];function Un(e){return Zn(e.animate)||Ji.some(t=>Gt(e[t]))}function ju(e){return!!(Un(e)||e.variants)}function ry(e,t,n){for(const r in t){const i=t[r],o=n[r];if(ge(i))e.addValue(r,i);else if(ge(o))e.addValue(r,vt(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=e.getStaticValue(r);e.addValue(r,vt(s!==void 0?s:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ni={current:null},Hu={current:!1},iy=typeof window<"u";function sy(){if(Hu.current=!0,!!iy)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ni.current=e.matches;e.addEventListener("change",t),t()}else ni.current=!1}const Eo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let In={};function Nu(e){In=e}function oy(){return In}class ay{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,skipAnimations:o,blockInitialAnimation:s,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Zi,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=be.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,se.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=o,this.options=l,this.blockInitialAnimation=!!s,this.isControllingVariants=Un(n),this.isVariantNode=ju(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const m=f[d];u[d]!==void 0&&ge(m)&&m.set(u[d])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,ny.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Hu.current||sy(),this.shouldReduceMotion=ni.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Xe(this.notifyUpdate),Xe(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&F2.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,h=new yu({element:this.current,name:t,keyframes:a,times:l,ease:u,duration:Fe(c)}),f=s(h);this.valueSubscriptions.set(t,()=>{f(),h.cancel()});return}const r=Tt.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&se.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in In){const n=In[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):fe()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Eo.length;r++){const i=Eo[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,s=t[o];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=ry(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=vt(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Hl(r)||Ol(r))?r=parseFloat(r):!ty(r)&&je.test(n)&&(r=Mu(t,n)),this.setBaseTarget(t,ge(r)?r.get():r)),ge(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=Wi(this.props,n,this.presenceContext?.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!ge(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Di),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Gi.render(this.render)}}class Ou extends ay{constructor(){super(...arguments),this.KeyframeResolver=R2}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ge(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Qe{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Bu({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ly({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function uy(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function gr(e){return e===void 0||e===1}function ri({scale:e,scaleX:t,scaleY:n}){return!gr(e)||!gr(t)||!gr(n)}function nt(e){return ri(e)||zu(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function zu(e){return Co(e.x)||Co(e.y)}function Co(e){return e&&e!=="0%"}function Rn(e,t,n){const r=e-n,i=t*r;return n+i}function To(e,t,n,r,i){return i!==void 0&&(e=Rn(e,i,r)),Rn(e,n,r)+t}function ii(e,t=0,n=1,r,i){e.min=To(e.min,t,n,r,i),e.max=To(e.max,t,n,r,i)}function _u(e,{x:t,y:n}){ii(e.x,t.translate,t.scale,t.originPoint),ii(e.y,n.translate,n.scale,n.originPoint)}const Po=.999999999999,Mo=1.0000000000001;function cy(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,s;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&xt(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,_u(e,s)),r&&nt(o.latestValues)&&xt(e,o.latestValues))}t.x<Mo&&t.x>Po&&(t.x=1),t.y<Mo&&t.y>Po&&(t.y=1)}function yt(e,t){e.min=e.min+t,e.max=e.max+t}function Vo(e,t,n,r,i=.5){const o=oe(e.min,e.max,i);ii(e,t,n,o,r)}function xt(e,t){Vo(e.x,t.x,t.scaleX,t.scale,t.originX),Vo(e.y,t.y,t.scaleY,t.scale,t.originY)}function Zu(e,t){return Bu(uy(e.getBoundingClientRect(),t))}function hy(e,t,n){const r=Zu(e,n),{scroll:i}=t;return i&&(yt(r.x,i.offset.x),yt(r.y,i.offset.y)),r}const fy={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},dy=Ct.length;function py(e,t,n){let r="",i=!0;for(let o=0;o<dy;o++){const s=Ct[o],a=e[s];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(s.startsWith("scale")?1:0);else{const u=parseFloat(a);l=s.startsWith("scale")?u===1:u===0}if(!l||n){const u=Lu(a,Ki[s]);if(!l){i=!1;const c=fy[s]||s;r+=`${c}(${u}) `}n&&(t[s]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function es(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let s=!1,a=!1;for(const l in t){const u=t[l];if(Tt.has(l)){s=!0;continue}else if(eu(l)){i[l]=u;continue}else{const c=Lu(u,Ki[l]);l.startsWith("origin")?(a=!0,o[l]=c):r[l]=c}}if(t.transform||(s||n?r.transform=py(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;r.transformOrigin=`${l} ${u} ${c}`}}function Uu(e,{style:t,vars:n},r,i){const o=e.style;let s;for(s in t)o[s]=t[s];i?.applyProjectionStyles(o,r);for(s in n)o.setProperty(s,n[s])}function Lo(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ft={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(H.test(e))e=parseFloat(e);else return e;const n=Lo(e,t.target.x),r=Lo(e,t.target.y);return`${n}% ${r}%`}},my={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=je.parse(e);if(i.length>5)return r;const o=je.createTransformer(e),s=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+s]/=a,i[1+s]/=l;const u=oe(a,l,.5);return typeof i[2+s]=="number"&&(i[2+s]/=u),typeof i[3+s]=="number"&&(i[3+s]/=u),o(i)}},si={borderRadius:{...Ft,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ft,borderTopRightRadius:Ft,borderBottomLeftRadius:Ft,borderBottomRightRadius:Ft,boxShadow:my};function $u(e,{layout:t,layoutId:n}){return Tt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!si[e]||e==="opacity")}function ts(e,t,n){const r=e.style,i=t?.style,o={};if(!r)return o;for(const s in r)(ge(r[s])||i&&ge(i[s])||$u(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(o[s]=r[s]);return o}function gy(e){return window.getComputedStyle(e)}class yy extends Ou{constructor(){super(...arguments),this.type="html",this.renderInstance=Uu}readValueFromInstance(t,n){if(Tt.has(n))return this.projection?.isProjecting?Ur(n):jg(t,n);{const r=gy(t),i=(eu(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Zu(t,n)}build(t,n,r){es(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return ts(t,n,r)}}const xy={offset:"stroke-dashoffset",array:"stroke-dasharray"},by={offset:"strokeDashoffset",array:"strokeDasharray"};function wy(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?xy:by;e[o.offset]=`${-r}`,e[o.array]=`${t} ${n}`}const ky=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Wu(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...a},l,u,c){if(es(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:f}=e;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=c?.transformBox??"fill-box",delete h.transformBox);for(const d of ky)h[d]!==void 0&&(f[d]=h[d],delete h[d]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),i!==void 0&&wy(h,i,o,s,!1)}const qu=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Ku=e=>typeof e=="string"&&e.toLowerCase()==="svg";function vy(e,t,n,r){Uu(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(qu.has(i)?i:qi(i),t.attrs[i])}function Gu(e,t,n){const r=ts(e,t,n);for(const i in e)if(ge(e[i])||ge(t[i])){const o=Ct.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}class Ay extends Ou{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=fe}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Tt.has(n)){const r=Pu(n);return r&&r.default||0}return n=qu.has(n)?n:qi(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Gu(t,n,r)}build(t,n,r){Wu(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){vy(t,n,r,i)}mount(t){this.isSVGTag=Ku(t.tagName),super.mount(t)}}const Sy=Ji.length;function Xu(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Xu(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Sy;n++){const r=Ji[n],i=e.props[r];(Gt(i)||i===!1)&&(t[r]=i)}return t}function Yu(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Ey=[...Qi].reverse(),Cy=Qi.length;function Ty(e){return t=>Promise.all(t.map(({animation:n,options:r})=>A2(e,n,r)))}function Py(e){let t=Ty(e),n=Do(),r=!0;const i=l=>(u,c)=>{const h=wt(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(h){const{transition:f,transitionEnd:d,...m}=h;u={...u,...m,...d}}return u};function o(l){t=l(e)}function s(l){const{props:u}=e,c=Xu(e.parent)||{},h=[],f=new Set;let d={},m=1/0;for(let k=0;k<Cy;k++){const y=Ey[k],E=n[y],v=u[y]!==void 0?u[y]:c[y],P=Gt(v),C=y===l?E.isActive:null;C===!1&&(m=k);let S=v===c[y]&&v!==u[y]&&P;if(S&&r&&e.manuallyAnimateOnMount&&(S=!1),E.protectedKeys={...d},!E.isActive&&C===null||!v&&!E.prevProp||Zn(v)||typeof v=="boolean")continue;if(y==="exit"&&E.isActive&&C!==!0){E.prevResolvedValues&&(d={...d,...E.prevResolvedValues});continue}const N=My(E.prevProp,v);let L=N||y===l&&E.isActive&&!S&&P||k>m&&P,F=!1;const A=Array.isArray(v)?v:[v];let R=A.reduce(i(y),{});C===!1&&(R={});const{prevResolvedValues:j={}}=E,G={...j,...R},O=$=>{L=!0,f.has($)&&(F=!0,f.delete($)),E.needsAnimating[$]=!0;const B=e.getValue($);B&&(B.liveStyle=!1)};for(const $ in G){const B=R[$],z=j[$];if(d.hasOwnProperty($))continue;let x=!1;Xr(B)&&Xr(z)?x=!Yu(B,z):x=B!==z,x?B!=null?O($):f.add($):B!==void 0&&f.has($)?O($):E.protectedKeys[$]=!0}E.prevProp=v,E.prevResolvedValues=R,E.isActive&&(d={...d,...R}),r&&e.blockInitialAnimation&&(L=!1);const I=S&&N;L&&(!I||F)&&h.push(...A.map($=>{const B={type:y};if(typeof $=="string"&&r&&!I&&e.manuallyAnimateOnMount&&e.parent){const{parent:z}=e,x=wt(z,$);if(z.enteringChildren&&x){const{delayChildren:M}=x.transition||{};B.delay=bu(z.enteringChildren,e,M)}}return{animation:$,options:B}}))}if(f.size){const k={};if(typeof u.initial!="boolean"){const y=wt(e,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(k.transition=y.transition)}f.forEach(y=>{const E=e.getBaseTarget(y),v=e.getValue(y);v&&(v.liveStyle=!0),k[y]=E??null}),h.push({animation:k})}let w=!!h.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,w?t(h):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();e.variantChildren?.forEach(h=>h.animationState?.setActive(l,u)),n[l].isActive=u;const c=s(l);for(const h in n)n[h].protectedKeys={};return c}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Do()}}}function My(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Yu(t,e):!1}function tt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Do(){return{animate:tt(!0),whileInView:tt(),whileHover:tt(),whileTap:tt(),whileDrag:tt(),whileFocus:tt(),exit:tt()}}function Io(e,t){e.min=t.min,e.max=t.max}function De(e,t){Io(e.x,t.x),Io(e.y,t.y)}function Ro(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Qu=1e-4,Vy=1-Qu,Ly=1+Qu,Ju=.01,Dy=0-Ju,Iy=0+Ju;function we(e){return e.max-e.min}function Ry(e,t,n){return Math.abs(e-t)<=n}function Fo(e,t,n,r=.5){e.origin=r,e.originPoint=oe(t.min,t.max,e.origin),e.scale=we(n)/we(t),e.translate=oe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Vy&&e.scale<=Ly||isNaN(e.scale))&&(e.scale=1),(e.translate>=Dy&&e.translate<=Iy||isNaN(e.translate))&&(e.translate=0)}function _t(e,t,n,r){Fo(e.x,t.x,n.x,r?r.originX:void 0),Fo(e.y,t.y,n.y,r?r.originY:void 0)}function jo(e,t,n){e.min=n.min+t.min,e.max=e.min+we(t)}function Fy(e,t,n){jo(e.x,t.x,n.x),jo(e.y,t.y,n.y)}function Ho(e,t,n){e.min=t.min-n.min,e.max=e.min+we(t)}function Fn(e,t,n){Ho(e.x,t.x,n.x),Ho(e.y,t.y,n.y)}function No(e,t,n,r,i){return e-=t,e=Rn(e,1/n,r),i!==void 0&&(e=Rn(e,1/i,r)),e}function jy(e,t=0,n=1,r=.5,i,o=e,s=e){if(Oe.test(t)&&(t=parseFloat(t),t=oe(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=oe(o.min,o.max,r);e===o&&(a-=t),e.min=No(e.min,t,n,a,i),e.max=No(e.max,t,n,a,i)}function Oo(e,t,[n,r,i],o,s){jy(e,t[n],t[r],t[i],t.scale,o,s)}const Hy=["x","scaleX","originX"],Ny=["y","scaleY","originY"];function Bo(e,t,n,r){Oo(e.x,t,Hy,n?n.x:void 0,r?r.x:void 0),Oo(e.y,t,Ny,n?n.y:void 0,r?r.y:void 0)}function zo(e){return e.translate===0&&e.scale===1}function ec(e){return zo(e.x)&&zo(e.y)}function _o(e,t){return e.min===t.min&&e.max===t.max}function Oy(e,t){return _o(e.x,t.x)&&_o(e.y,t.y)}function Zo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function tc(e,t){return Zo(e.x,t.x)&&Zo(e.y,t.y)}function Uo(e){return we(e.x)/we(e.y)}function $o(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ne(e){return[e("x"),e("y")]}function By(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,s=n?.z||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),h&&(r+=`rotateX(${h}deg) `),f&&(r+=`rotateY(${f}deg) `),d&&(r+=`skewX(${d}deg) `),m&&(r+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const nc=["TopLeft","TopRight","BottomLeft","BottomRight"],zy=nc.length,Wo=e=>typeof e=="string"?parseFloat(e):e,qo=e=>typeof e=="number"||H.test(e);function _y(e,t,n,r,i,o){i?(e.opacity=oe(0,n.opacity??1,Zy(r)),e.opacityExit=oe(t.opacity??1,0,Uy(r))):o&&(e.opacity=oe(t.opacity??1,n.opacity??1,r));for(let s=0;s<zy;s++){const a=`border${nc[s]}Radius`;let l=Ko(t,a),u=Ko(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||qo(l)===qo(u)?(e[a]=Math.max(oe(Wo(l),Wo(u),r),0),(Oe.test(u)||Oe.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=oe(t.rotate||0,n.rotate||0,r))}function Ko(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Zy=rc(0,.5,Kl),Uy=rc(.5,.95,Ve);function rc(e,t,n){return r=>r<e?0:r>t?1:n(Wt(e,t,r))}function $y(e,t,n){const r=ge(e)?e:vt(e);return r.start($i("",r,t,n)),r.animation}function Xt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Wy=(e,t)=>e.depth-t.depth;class qy{constructor(){this.children=[],this.isDirty=!1}add(t){Vi(this.children,t),this.isDirty=!0}remove(t){Mn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Wy),this.isDirty=!1,this.children.forEach(t)}}function Ky(e,t){const n=be.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Xe(r),e(o-t))};return se.setup(r,!0),()=>Xe(r)}function vn(e){return ge(e)?e.get():e}class Gy{constructor(){this.members=[]}add(t){Vi(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const i=r.instance;i&&i.isConnected===!1&&r.isPresent!==!1&&!r.snapshot&&Mn(this.members,r)}t.scheduleRender()}remove(t){if(Mn(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i],s=o.instance;if(o.isPresent!==!1&&(!s||s.isConnected!==!1)){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const i=r.options.layoutDependency,o=t.options.layoutDependency;if(!(i!==void 0&&o!==void 0&&i===o)){const l=r.instance;l&&l.isConnected===!1&&!r.snapshot||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0))}const{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const An={hasAnimatedSinceResize:!0,hasEverUpdated:!1},yr=["","X","Y","Z"],Xy=1e3;let Yy=0;function xr(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ic(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Su(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",se,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ic(r)}function sc({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=t?.()){this.id=Yy++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(ex),this.nodes.forEach(ix),this.nodes.forEach(sx),this.nodes.forEach(tx)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new qy)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Di),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Yi(s)&&!J2(s),this.instance=s;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c,h=0;const f=()=>this.root.updateBlockedByResize=!1;se.read(()=>{h=window.innerWidth}),e(s,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,c&&c(),c=Ky(f,250),An.hasAnimatedSinceResize&&(An.hasAnimatedSinceResize=!1,this.nodes.forEach(Yo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||cx,{onLayoutAnimationStart:w,onLayoutAnimationComplete:k}=u.getProps(),y=!this.targetLayout||!tc(this.targetLayout,d),E=!h&&f;if(this.options.layoutRoot||this.resumeFrom||E||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Ui(m,"layout"),onPlay:w,onComplete:k};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,E)}else h||Yo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Xe(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ox),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ic(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Go);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Xo);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(rx),this.nodes.forEach(Qy),this.nodes.forEach(Jy)):this.nodes.forEach(Xo),this.clearAllSnapshots();const a=be.now();de.delta=Be(0,1e3/60,a-de.timestamp),de.timestamp=a,de.isProcessing=!0,ur.update.process(de),ur.preRender.process(de),ur.render.process(de),de.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Gi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(nx),this.sharedNodes.forEach(ax)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,se.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){se.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!we(this.snapshot.measuredBox.x)&&!we(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=fe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ec(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;s&&this.instance&&(a||nt(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),hx(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return fe();const a=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(fx))){const{scroll:u}=this.root;u&&(yt(a.x,u.offset.x),yt(a.y,u.offset.y))}return a}removeElementScroll(s){const a=fe();if(De(a,s),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:h}=u;u!==this.root&&c&&h.layoutScroll&&(c.wasRoot&&De(a,s),yt(a.x,c.offset.x),yt(a.y,c.offset.y))}return a}applyTransform(s,a=!1){const l=fe();De(l,s);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&xt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),nt(c.latestValues)&&xt(l,c.latestValues)}return nt(this.latestValues)&&xt(l,this.latestValues),l}removeTransform(s){const a=fe();De(a,s);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!nt(u.latestValues))continue;ri(u.latestValues)&&u.updateSnapshot();const c=fe(),h=u.measurePageBox();De(c,h),Bo(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return nt(this.latestValues)&&Bo(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==de.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!this.layout||!(c||h))return;this.resolvedRelativeTargetAt=de.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=fe(),this.targetWithTransforms=fe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Fy(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):De(this.target,this.layout.layoutBox),_u(this.target,this.targetDelta)):De(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||ri(this.parent.latestValues)||zu(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,a,l){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=fe(),this.relativeTargetOrigin=fe(),Fn(this.relativeTargetOrigin,a,l),De(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const s=this.getLead(),a=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===de.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;De(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;cy(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=fe());const{target:d}=s;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ro(this.prevProjectionDelta.x,this.projectionDelta.x),Ro(this.prevProjectionDelta.y,this.projectionDelta.y)),_t(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!$o(this.projectionDelta.x,this.prevProjectionDelta.x)||!$o(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=gt(),this.projectionDelta=gt(),this.projectionDeltaWithTransform=gt()}setAnimationOrigin(s,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=gt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=fe(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,w=d!==m,k=this.getStack(),y=!k||k.members.length<=1,E=!!(w&&!y&&this.options.crossfade===!0&&!this.path.some(ux));this.animationProgress=0;let v;this.mixTargetDelta=P=>{const C=P/1e3;Qo(h.x,s.x,C),Qo(h.y,s.y,C),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Fn(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),lx(this.relativeTarget,this.relativeTargetOrigin,f,C),v&&Oy(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=fe()),De(v,this.relativeTarget)),w&&(this.animationValues=c,_y(c,u,this.latestValues,C,E,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Xe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=se.update(()=>{An.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=vt(0)),this.motionValue.jump(0,!1),this.currentAnimation=$y(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Xy),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=s;if(!(!a||!l||!u)){if(this!==s&&this.layout&&u&&oc(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||fe();const h=we(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+h;const f=we(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}De(a,l),xt(a,c),_t(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Gy),this.sharedNodes.get(s).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){const{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&xr("z",s,u,this.animationValues);for(let c=0;c<yr.length;c++)xr(`rotate${yr[c]}`,s,u,this.animationValues),xr(`skew${yr[c]}`,s,u,this.animationValues);s.render();for(const c in u)s.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=vn(a?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=vn(a?.pointerEvents)||""),this.hasProjected&&!nt(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=By(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,h)),s.transform=h;const{x:f,y:d}=this.projectionDelta;s.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,u.animationValues?s.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:s.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const m in si){if(c[m]===void 0)continue;const{correct:w,applyTo:k,isCSSVariable:y}=si[m],E=h==="none"?c[m]:w(c[m],u);if(k){const v=k.length;for(let P=0;P<v;P++)s[k[P]]=E}else y?this.options.visualElement.renderState.vars[m]=E:s[m]=E}this.options.layoutId&&(s.pointerEvents=u===this?vn(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(Go),this.root.sharedNodes.clear()}}}function Qy(e){e.updateLayout()}function Jy(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?Ne(c=>{const h=o?t.measuredBox[c]:t.layoutBox[c],f=we(h);h.min=n[c].min,h.max=h.min+f}):oc(i,t.layoutBox,n)&&Ne(c=>{const h=o?t.measuredBox[c]:t.layoutBox[c],f=we(n[c]);h.max=h.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+f)});const s=gt();_t(s,n,t.layoutBox);const a=gt();o?_t(a,e.applyTransform(r,!0),t.measuredBox):_t(a,n,t.layoutBox);const l=!ec(s);let u=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:h,layout:f}=c;if(h&&f){const d=fe();Fn(d,t.layoutBox,h.layoutBox);const m=fe();Fn(m,n,f.layoutBox),tc(d,m)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=d,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function ex(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function tx(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function nx(e){e.clearSnapshot()}function Go(e){e.clearMeasurements()}function Xo(e){e.isLayoutDirty=!1}function rx(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Yo(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ix(e){e.resolveTargetDelta()}function sx(e){e.calcProjection()}function ox(e){e.resetSkewAndRotation()}function ax(e){e.removeLeadSnapshot()}function Qo(e,t,n){e.translate=oe(t.translate,0,n),e.scale=oe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Jo(e,t,n,r){e.min=oe(t.min,n.min,r),e.max=oe(t.max,n.max,r)}function lx(e,t,n,r){Jo(e.x,t.x,n.x,r),Jo(e.y,t.y,n.y,r)}function ux(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const cx={duration:.45,ease:[.4,0,.1,1]},ea=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ta=ea("applewebkit/")&&!ea("chrome/")?Math.round:Ve;function na(e){e.min=ta(e.min),e.max=ta(e.max)}function hx(e){na(e.x),na(e.y)}function oc(e,t,n){return e==="position"||e==="preserve-aspect"&&!Ry(Uo(t),Uo(n),.2)}function fx(e){return e!==e.root&&e.scroll?.wasRoot}const dx=sc({attachResizeListener:(e,t)=>Xt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),br={current:void 0},ac=sc({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!br.current){const e=new dx({});e.mount(window),e.setOptions({layoutScroll:!0}),br.current=e}return br.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ns=p.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function ra(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function px(...e){return t=>{let n=!1;const r=e.map(i=>{const o=ra(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():ra(e[i],null)}}}}function mx(...e){return p.useCallback(px(...e),e)}class gx extends p.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=ti(r)&&r.offsetWidth||0,o=ti(r)&&r.offsetHeight||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=i-s.width-s.left,s.bottom=o-s.height-s.top}return null}componentDidUpdate(){}render(){return this.props.children}}function yx({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:o}){const s=p.useId(),a=p.useRef(null),l=p.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=p.useContext(ns),c=e.props?.ref??e?.ref,h=mx(a,c);return p.useInsertionEffect(()=>{const{width:f,height:d,top:m,left:w,right:k,bottom:y}=l.current;if(t||o===!1||!a.current||!f||!d)return;const E=n==="left"?`left: ${w}`:`right: ${k}`,v=r==="bottom"?`bottom: ${y}`:`top: ${m}`;a.current.dataset.motionPopId=s;const P=document.createElement("style");u&&(P.nonce=u);const C=i??document.head;return C.appendChild(P),P.sheet&&P.sheet.insertRule(`
30
+ [data-motion-pop-id="${s}"] {
31
+ position: absolute !important;
32
+ width: ${f}px !important;
33
+ height: ${d}px !important;
34
+ ${E}px !important;
35
+ ${v}px !important;
36
+ }
37
+ `),()=>{C.contains(P)&&C.removeChild(P)}},[t]),b.jsx(gx,{isPresent:t,childRef:a,sizeRef:l,pop:o,children:o===!1?e:p.cloneElement(e,{ref:h})})}const xx=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s,anchorX:a,anchorY:l,root:u})=>{const c=Mi(bx),h=p.useId();let f=!0,d=p.useMemo(()=>(f=!1,{id:h,initial:t,isPresent:n,custom:i,onExitComplete:m=>{c.set(m,!0);for(const w of c.values())if(!w)return;r&&r()},register:m=>(c.set(m,!1),()=>c.delete(m))}),[n,c,r]);return o&&f&&(d={...d}),p.useMemo(()=>{c.forEach((m,w)=>c.set(w,!1))},[n]),p.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),e=b.jsx(yx,{pop:s==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:u,children:e}),b.jsx(_n.Provider,{value:d,children:e})};function bx(){return new Map}function lc(e=!0){const t=p.useContext(_n);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=p.useId();p.useEffect(()=>{if(e)return i(o)},[e]);const s=p.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,s]:[!0]}const pn=e=>e.key||"";function ia(e){const t=[];return p.Children.forEach(e,n=>{p.isValidElement(n)&&t.push(n)}),t}const uc=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:s=!1,anchorX:a="left",anchorY:l="top",root:u})=>{const[c,h]=lc(s),f=p.useMemo(()=>ia(e),[e]),d=s&&!c?[]:f.map(pn),m=p.useRef(!0),w=p.useRef(f),k=Mi(()=>new Map),y=p.useRef(new Set),[E,v]=p.useState(f),[P,C]=p.useState(f);jl(()=>{m.current=!1,w.current=f;for(let L=0;L<P.length;L++){const F=pn(P[L]);d.includes(F)?(k.delete(F),y.current.delete(F)):k.get(F)!==!0&&k.set(F,!1)}},[P,d.length,d.join("-")]);const S=[];if(f!==E){let L=[...f];for(let F=0;F<P.length;F++){const A=P[F],R=pn(A);d.includes(R)||(L.splice(F,0,A),S.push(A))}return o==="wait"&&S.length&&(L=S),C(ia(L)),v(f),null}const{forceRender:N}=p.useContext(Pi);return b.jsx(b.Fragment,{children:P.map(L=>{const F=pn(L),A=s&&!c?!1:f===P||d.includes(F),R=()=>{if(y.current.has(F))return;if(y.current.add(F),k.has(F))k.set(F,!0);else return;let j=!0;k.forEach(G=>{G||(j=!1)}),j&&(N?.(),C(w.current),s&&h?.(),r&&r())};return b.jsx(xx,{isPresent:A,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,root:u,onExitComplete:A?void 0:R,anchorX:a,anchorY:l,children:L},F)})})},cc=p.createContext({strict:!1}),sa={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let oa=!1;function wx(){if(oa)return;const e={};for(const t in sa)e[t]={isEnabled:n=>sa[t].some(r=>!!n[r])};Nu(e),oa=!0}function hc(){return wx(),oy()}function kx(e){const t=hc();for(const n in e)t[n]={...t[n],...e[n]};Nu(t)}const vx=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function jn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||vx.has(e)}let fc=e=>!jn(e);function Ax(e){typeof e=="function"&&(fc=t=>t.startsWith("on")?!jn(t):e(t))}try{Ax(require("@emotion/is-prop-valid").default)}catch{}function Sx(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(fc(i)||n===!0&&jn(i)||!t&&!jn(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const $n=p.createContext({});function Ex(e,t){if(Un(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Gt(n)?n:void 0,animate:Gt(r)?r:void 0}}return e.inherit!==!1?t:{}}function Cx(e){const{initial:t,animate:n}=Ex(e,p.useContext($n));return p.useMemo(()=>({initial:t,animate:n}),[aa(t),aa(n)])}function aa(e){return Array.isArray(e)?e.join(" "):e}const rs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function dc(e,t,n){for(const r in t)!ge(t[r])&&!$u(r,n)&&(e[r]=t[r])}function Tx({transformTemplate:e},t){return p.useMemo(()=>{const n=rs();return es(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Px(e,t){const n=e.style||{},r={};return dc(r,n,e),Object.assign(r,Tx(e,t)),r}function Mx(e,t){const n={},r=Px(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const pc=()=>({...rs(),attrs:{}});function Vx(e,t,n,r){const i=p.useMemo(()=>{const o=pc();return Wu(o,t,Ku(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};dc(o,e.style,e),i.style={...o,...i.style}}return i}const Lx=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function is(e){return typeof e!="string"||e.includes("-")?!1:!!(Lx.indexOf(e)>-1||/[A-Z]/u.test(e))}function Dx(e,t,n,{latestValues:r},i,o=!1,s){const l=(s??is(e)?Vx:Mx)(t,r,i,e),u=Sx(t,typeof e=="string",o),c=e!==p.Fragment?{...u,...l,ref:n}:{},{children:h}=t,f=p.useMemo(()=>ge(h)?h.get():h,[h]);return p.createElement(e,{...c,children:f})}function Ix({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Rx(n,r,i,e),renderState:t()}}function Rx(e,t,n,r){const i={},o=r(e,{});for(const f in o)i[f]=vn(o[f]);let{initial:s,animate:a}=e;const l=Un(e),u=ju(e);t&&u&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||s===!1;const h=c?a:s;if(h&&typeof h!="boolean"&&!Zn(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const m=Wi(e,f[d]);if(m){const{transitionEnd:w,transition:k,...y}=m;for(const E in y){let v=y[E];if(Array.isArray(v)){const P=c?v.length-1:0;v=v[P]}v!==null&&(i[E]=v)}for(const E in w)i[E]=w[E]}}}return i}const mc=e=>(t,n)=>{const r=p.useContext($n),i=p.useContext(_n),o=()=>Ix(e,t,r,i);return n?o():Mi(o)},Fx=mc({scrapeMotionValuesFromProps:ts,createRenderState:rs}),jx=mc({scrapeMotionValuesFromProps:Gu,createRenderState:pc}),Hx=Symbol.for("motionComponentSymbol");function Nx(e,t,n){const r=p.useRef(n);p.useInsertionEffect(()=>{r.current=n});const i=p.useRef(null);return p.useCallback(o=>{o&&e.onMount?.(o),t&&(o?t.mount(o):t.unmount());const s=r.current;if(typeof s=="function")if(o){const a=s(o);typeof a=="function"&&(i.current=a)}else i.current?(i.current(),i.current=null):s(o);else s&&(s.current=o)},[t])}const gc=p.createContext({});function dt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Ox(e,t,n,r,i,o){const{visualElement:s}=p.useContext($n),a=p.useContext(cc),l=p.useContext(_n),u=p.useContext(ns),c=u.reducedMotion,h=u.skipAnimations,f=p.useRef(null),d=p.useRef(!1);r=r||a.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:h,isSVG:o}),d.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const m=f.current,w=p.useContext(gc);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&Bx(f.current,n,i,w);const k=p.useRef(!1);p.useInsertionEffect(()=>{m&&k.current&&m.update(n,l)});const y=n[Au],E=p.useRef(!!y&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return jl(()=>{d.current=!0,m&&(k.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),E.current&&m.animationState&&m.animationState.animateChanges())}),p.useEffect(()=>{m&&(!E.current&&m.animationState&&m.animationState.animateChanges(),E.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),E.current=!1),m.enteringChildren=void 0)}),m}function Bx(e,t,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:yc(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&dt(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}function yc(e){if(e)return e.options.allowProjection!==!1?e.projection:yc(e.parent)}function wr(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&kx(r);const o=n?n==="svg":is(e),s=o?jx:Fx;function a(u,c){let h;const f={...p.useContext(ns),...u,layoutId:zx(u)},{isStatic:d}=f,m=Cx(u),w=s(u,d);if(!d&&Fl){_x();const k=Zx(f);h=k.MeasureLayout,m.visualElement=Ox(e,w,f,i,k.ProjectionNode,o)}return b.jsxs($n.Provider,{value:m,children:[h&&m.visualElement?b.jsx(h,{visualElement:m.visualElement,...f}):null,Dx(e,u,Nx(w,m.visualElement,c),w,d,t,o)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=p.forwardRef(a);return l[Hx]=e,l}function zx({layoutId:e}){const t=p.useContext(Pi).id;return t&&e!==void 0?t+"-"+e:e}function _x(e,t){p.useContext(cc).strict}function Zx(e){const t=hc(),{drag:n,layout:r}=t;if(!n&&!r)return{};const i={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Ux(e,t){if(typeof Proxy>"u")return wr;const n=new Map,r=(o,s)=>wr(o,s,e,t),i=(o,s)=>r(o,s);return new Proxy(i,{get:(o,s)=>s==="create"?r:(n.has(s)||n.set(s,wr(s,void 0,e,t)),n.get(s))})}const $x=(e,t)=>t.isSVG??is(e)?new Ay(t):new yy(t,{allowProjection:e!==p.Fragment});class Wx extends Qe{constructor(t){super(t),t.animationState||(t.animationState=Py(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Zn(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let qx=0;class Kx extends Qe{constructor(){super(...arguments),this.id=qx++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Gx={animation:{Feature:Wx},exit:{Feature:Kx}};function on(e){return{point:{x:e.pageX,y:e.pageY}}}const Xx=e=>t=>Xi(t)&&e(t,on(t));function Zt(e,t,n,r){return Xt(e,t,Xx(n),r)}const xc=({current:e})=>e?e.ownerDocument.defaultView:null,la=(e,t)=>Math.abs(e-t);function Yx(e,t){const n=la(e.x,t.x),r=la(e.y,t.y);return Math.sqrt(n**2+r**2)}const ua=new Set(["auto","scroll"]);class bc{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:s=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=d=>{this.handleScroll(d.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=vr(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,w=Yx(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!w)return;const{point:k}=d,{timestamp:y}=de;this.history.push({...k,timestamp:y});const{onStart:E,onMove:v}=this.handlers;m||(E&&E(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=kr(m,this.transformPagePoint),se.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:w,onSessionEnd:k,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=vr(d.type==="pointercancel"?this.lastMoveEventInfo:kr(m,this.transformPagePoint),this.history);this.startEvent&&w&&w(d,E),k&&k(d,E)},!Xi(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=i||window;const l=on(t),u=kr(l,this.transformPagePoint),{point:c}=u,{timestamp:h}=de;this.history=[{...c,timestamp:h}];const{onSessionStart:f}=n;f&&f(t,vr(u,this.history)),this.removeListeners=nn(Zt(this.contextWindow,"pointermove",this.handlePointerMove),Zt(this.contextWindow,"pointerup",this.handlePointerUp),Zt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(ua.has(r.overflowX)||ua.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,i=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:i.x-n.x,y:i.y-n.y};o.x===0&&o.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,i),se.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Xe(this.updatePoint)}}function kr(e,t){return t?{point:t(e.point)}:e}function ca(e,t){return{x:e.x-t.x,y:e.y-t.y}}function vr({point:e},t){return{point:e,delta:ca(e,wc(t)),offset:ca(e,Qx(t)),velocity:Jx(t,.1)}}function Qx(e){return e[0]}function wc(e){return e[e.length-1]}function Jx(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=wc(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Fe(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Fe(t)*2&&(r=e[1]);const o=Me(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function e6(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?oe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?oe(n,e,r.max):Math.min(e,n)),e}function ha(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function t6(e,{top:t,left:n,bottom:r,right:i}){return{x:ha(e.x,n,i),y:ha(e.y,t,r)}}function fa(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function n6(e,t){return{x:fa(e.x,t.x),y:fa(e.y,t.y)}}function r6(e,t){let n=.5;const r=we(e),i=we(t);return i>r?n=Wt(t.min,t.max-r,e.min):r>i&&(n=Wt(e.min,e.max-i,t.min)),Be(0,1,n)}function i6(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const oi=.35;function s6(e=oi){return e===!1?e=0:e===!0&&(e=oi),{x:da(e,"left","right"),y:da(e,"top","bottom")}}function da(e,t,n){return{min:pa(e,t),max:pa(e,n)}}function pa(e,t){return typeof e=="number"?e:e[t]||0}const o6=new WeakMap;class a6{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=fe(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=h=>{n&&this.snapToCursor(on(h).point),this.stopAnimation()},s=(h,f)=>{const{drag:d,dragPropagation:m,onDragStart:w}=this.getProps();if(d&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=j2(d),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ne(y=>{let E=this.getAxisMotionValue(y).get()||0;if(Oe.test(E)){const{projection:v}=this.visualElement;if(v&&v.layout){const P=v.layout.layoutBox[y];P&&(E=we(P)*(parseFloat(E)/100))}}this.originPoint[y]=E}),w&&se.update(()=>w(h,f),!1,!0),Yr(this.visualElement,"transform");const{animationState:k}=this.visualElement;k&&k.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:m,onDirectionLock:w,onDrag:k}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:y}=f;if(m&&this.currentDirection===null){this.currentDirection=u6(y),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),k&&se.update(()=>k(h,f),!1,!0)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new bc(t,{onSessionStart:o,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:xc(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&se.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!mn(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=e6(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&dt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=t6(r.layoutBox,t):this.constraints=!1,this.elastic=s6(n),i!==this.constraints&&!dt(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Ne(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=i6(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!dt(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=hy(r,i.root,this.visualElement.getTransformPagePoint());let s=n6(i.layout.layoutBox,o);if(n){const a=n(ly(s));this.hasMutatedConstraints=!!a,a&&(s=Bu(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Ne(c=>{if(!mn(c,n,this.currentDirection))return;let h=l&&l[c]||{};s&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Yr(this.visualElement,t),r.start($i(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ne(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ne(n=>{const{drag:r}=this.getProps();if(!mn(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n],l=o.get()||0;o.set(t[n]-oe(s,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!dt(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ne(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();i[s]=r6({min:l,max:l},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ne(s=>{if(!mn(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];a.set(oe(l,u,i[s]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;o6.set(this.visualElement,this);const t=this.visualElement.current,n=Zt(t,"pointerdown",u=>{const{drag:c,dragListener:h=!0}=this.getProps(),f=u.target,d=f!==t&&_2(f);c&&h&&!d&&this.start(u)});let r;const i=()=>{const{dragConstraints:u}=this.getProps();dt(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),r||(r=l6(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,s=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),se.read(i);const a=Xt(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(Ne(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=u[h].translate,f.set(f.get()+u[h].translate))}),this.visualElement.render())}));return()=>{a(),n(),s(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=oi,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function ma(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function l6(e,t,n){const r=vo(e,ma(n)),i=vo(t,ma(n));return()=>{r(),i()}}function mn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function u6(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class c6 extends Qe{constructor(t){super(t),this.removeGroupControls=Ve,this.removeListeners=Ve,this.controls=new a6(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ve}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Ar=e=>(t,n)=>{e&&se.update(()=>e(t,n),!1,!0)};class h6 extends Qe{constructor(){super(...arguments),this.removePointerDownListener=Ve}onPointerDown(t){this.session=new bc(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:xc(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Ar(t),onStart:Ar(n),onMove:Ar(r),onEnd:(o,s)=>{delete this.session,i&&se.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=Zt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Sr=!1;class f6 extends p.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),Sr&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),An.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:s}=r;return s&&(s.isPresent=o,t.layoutDependency!==n&&s.setOptions({...s.options,layoutDependency:n}),Sr=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||se.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Gi.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Sr=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function kc(e){const[t,n]=lc(),r=p.useContext(Pi);return b.jsx(f6,{...e,layoutGroup:r,switchLayoutGroup:p.useContext(gc),isPresent:t,safeToRemove:n})}const d6={pan:{Feature:h6},drag:{Feature:c6,ProjectionNode:ac,MeasureLayout:kc}};function ga(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&se.postRender(()=>o(t,on(t)))}class p6 extends Qe{mount(){const{current:t}=this.node;t&&(this.unmount=N2(t,(n,r)=>(ga(this.node,r,"Start"),i=>ga(this.node,i,"End"))))}unmount(){}}class m6 extends Qe{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=nn(Xt(this.node.current,"focus",()=>this.onFocus()),Xt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ya(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&se.postRender(()=>o(t,on(t)))}class g6 extends Qe{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=U2(t,(i,o)=>(ya(this.node,o,"Start"),(s,{success:a})=>ya(this.node,s,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}}const ai=new WeakMap,Er=new WeakMap,y6=e=>{const t=ai.get(e.target);t&&t(e)},x6=e=>{e.forEach(y6)};function b6({root:e,...t}){const n=e||document;Er.has(n)||Er.set(n,{});const r=Er.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(x6,{root:e,...t})),r[i]}function w6(e,t,n){const r=b6(t);return ai.set(e,n),r.observe(e),()=>{ai.delete(e),r.unobserve(e)}}const k6={some:0,all:1};class v6 extends Qe{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:k6[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return w6(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(A6(t,n))&&this.startObserver()}unmount(){}}function A6({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const S6={inView:{Feature:v6},tap:{Feature:g6},focus:{Feature:m6},hover:{Feature:p6}},E6={layout:{ProjectionNode:ac,MeasureLayout:kc}},C6={...Gx,...S6,...d6,...E6},Yt=Ux(C6,$x),T6=[.22,1,.36,1],Qt={duration:.32,ease:T6};function P6({src:e,alt:t,layoutId:n,onClose:r}){return p.useEffect(()=>{const i=o=>{o.key==="Escape"&&r()};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[r]),wa.createPortal(b.jsx(Yt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:Qt,className:"fixed inset-0 z-50 flex cursor-zoom-out items-center justify-center overscroll-contain p-4 sm:p-8 bg-background/80",onClick:r,role:"dialog","aria-modal":"true","aria-label":`Fullscreen view of ${t}`,children:b.jsx(Yt.span,{layoutId:n,transition:Qt,className:"relative block max-h-full max-w-full overflow-hidden rounded-xl border border-border shadow-2xl",children:b.jsx("img",{src:e,alt:t,className:"max-h-[85vh] max-w-[90vw] w-auto object-contain block"})})}),document.body)}function vc({src:e,alt:t,children:n,triggerClassName:r}){const[i,o]=p.useState(!1),s=p.useRef(null),a=p.useId(),l=()=>{o(!1),s.current?.focus()};return b.jsxs(b.Fragment,{children:[b.jsx(Yt.span,{ref:s,layoutId:a,transition:Qt,role:"button",tabIndex:0,"aria-label":`View ${t} fullscreen`,onClick:()=>o(!0),onKeyDown:u=>(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),o(!0)),className:pe("relative block cursor-zoom-in overflow-hidden","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",i&&"invisible",r),children:n}),b.jsx(uc,{onExitComplete:()=>s.current?.focus(),children:i&&b.jsx(P6,{src:e,alt:t,layoutId:a,onClose:l})})]})}function M6({content:e,filename:t,onClose:n}){return p.useEffect(()=>{const r=i=>{i.key==="Escape"&&n()};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[n]),wa.createPortal(b.jsx(Yt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:Qt,className:"fixed inset-0 z-50 flex items-center justify-center overscroll-contain p-4 sm:p-8 bg-background/80",onClick:n,role:"dialog","aria-modal":"true","aria-label":`File viewer: ${t}`,children:b.jsxs(Yt.div,{initial:{opacity:0,scale:.96,y:8},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.96,y:8},transition:Qt,className:"flex w-full max-w-3xl max-h-[85vh] flex-col overflow-hidden rounded-xl border border-border bg-card shadow-2xl",onClick:r=>r.stopPropagation(),children:[b.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-border px-4 py-3 shrink-0",children:[b.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",children:t}),b.jsx("button",{type:"button","aria-label":"Close file viewer",onClick:n,className:"flex shrink-0 items-center justify-center rounded-md p-1 text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:b.jsx(ui,{size:14,"aria-hidden":"true"})})]}),b.jsx("pre",{className:"flex-1 overflow-auto px-4 py-3 font-mono text-xs text-foreground leading-relaxed whitespace-pre break-words",children:e})]})}),document.body)}function Ac({base64:e,filename:t,children:n,triggerClassName:r}){const[i,o]=p.useState(!1),s=p.useRef(null);let a="";try{a=atob(e)}catch{a="[Could not decode file content]"}const l=()=>{o(!1),s.current?.focus()};return b.jsxs(b.Fragment,{children:[b.jsx("button",{ref:s,type:"button","aria-label":`View ${t}`,onClick:()=>o(!0),className:r,children:n}),b.jsx(uc,{onExitComplete:()=>s.current?.focus(),children:i&&b.jsx(M6,{content:a,filename:t,onClose:l})})]})}function Sc(e){const t=document.createElement("a");t.href=`data:${e.mime};base64,${e.base64}`,t.download=e.filename??"attachment",t.click()}function Ec(e){return e.startsWith("image/")?"image":e.startsWith("text/")||e==="application/json"||e==="application/xml"||e==="application/javascript"||e==="application/x-javascript"||e==="application/typescript"||e.includes("+json")||e.includes("+xml")?"text":"download"}function xa({mime:e,size:t=14}){return e==="application/pdf"?b.jsx(Aa,{size:t,"aria-hidden":"true"}):e.startsWith("text/")||e.includes("json")||e.includes("xml")||e.includes("javascript")?b.jsx(va,{size:t,"aria-hidden":"true"}):e.includes("zip")||e.includes("tar")||e.includes("archive")||e.includes("compressed")?b.jsx(ka,{size:t,"aria-hidden":"true"}):e.startsWith("text/")?b.jsx(Sa,{size:t,"aria-hidden":"true"}):b.jsx(Sn,{size:t,"aria-hidden":"true"})}function V6({attachment:e}){const t=e.filename??"attachment",n=Ec(e.mime),r=`data:${e.mime};base64,${e.base64}`;if(n==="image")return b.jsx(vc,{src:r,alt:t,triggerClassName:"h-16 w-16 flex-shrink-0 rounded-lg border border-border",children:b.jsx("img",{src:r,alt:t,className:"h-full w-full object-cover"})});const i=pe("flex items-center gap-1.5 rounded-lg border border-border bg-secondary/60 px-2.5 py-1.5 text-xs text-muted-foreground","transition-colors duration-150 hover:bg-secondary hover:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring");return n==="text"?b.jsxs(Ac,{base64:e.base64,filename:t,triggerClassName:i,children:[b.jsx(xa,{mime:e.mime}),b.jsx("span",{className:"max-w-[120px] truncate",children:t})]}):b.jsxs("button",{type:"button","aria-label":`Download ${t}`,onClick:()=>Sc(e),className:i,children:[b.jsx(xa,{mime:e.mime}),b.jsx("span",{className:"max-w-[120px] truncate",children:t})]})}function L6({message:e}){const t=e.attachments&&e.attachments.length>0;return b.jsx("div",{className:"flex justify-end",children:b.jsxs("div",{className:pe("max-w-[75%]",e.queued&&"opacity-50"),children:[t&&b.jsx("div",{className:"mb-1.5 flex flex-wrap justify-end gap-1.5",children:e.attachments.map((n,r)=>b.jsx(V6,{attachment:n},r))}),e.content&&b.jsx("div",{className:"rounded-2xl rounded-tr-sm bg-grind-elevated px-4 py-2.5 text-sm text-foreground leading-relaxed whitespace-pre-wrap break-words",children:e.content}),e.queued&&b.jsxs("div",{className:"mt-1 flex items-center justify-end gap-1 pr-1",children:[b.jsx(Ea,{size:10,"aria-hidden":"true",className:"text-muted-foreground"}),b.jsx("span",{className:"text-[10px] text-muted-foreground",children:"queued"})]})]})})}function D6({message:e}){const t=e.content.trim().length>0,n=e.toolCalls.length>0;return b.jsx("div",{className:"flex justify-start",children:b.jsxs("div",{className:"max-w-[85%] w-full space-y-1",children:[n&&b.jsx("div",{className:"space-y-1",children:e.toolCalls.map(r=>b.jsx(I1,{toolName:r.toolName,toolArgsJson:r.toolArgsJson,status:r.status,...r.toolResultJson!==void 0?{toolResultJson:r.toolResultJson}:{}},r.id))}),(t||e.isStreaming)&&b.jsxs("div",{className:"rounded-2xl rounded-tl-sm bg-card px-4 py-2.5 text-sm text-foreground leading-relaxed border border-border/50",children:[b.jsx(I6,{content:e.content}),e.isStreaming&&b.jsx("span",{"aria-label":"AI is typing",className:"ml-0.5 inline-block h-[1em] w-[2px] bg-grind-orange motion-safe:animate-blink align-middle"})]}),!t&&!n&&e.isStreaming&&b.jsx("div",{className:"rounded-2xl rounded-tl-sm bg-card px-4 py-2.5 border border-border/50",children:b.jsx("span",{"aria-label":"AI is thinking",className:"flex gap-1",children:[0,1,2].map(r=>b.jsx("span",{"aria-hidden":"true",className:"h-1.5 w-1.5 rounded-full bg-muted-foreground motion-safe:animate-pulse",style:{animationDelay:`${r*150}ms`}},r))})})]})})}function I6({content:e}){return b.jsx(f0,{remarkPlugins:[E1],components:{p:({children:t})=>b.jsx("p",{className:"mb-3 last:mb-0 leading-relaxed",children:t}),h1:({children:t})=>b.jsx("h1",{className:"text-base font-bold mt-4 mb-2 first:mt-0",children:t}),h2:({children:t})=>b.jsx("h2",{className:"text-sm font-bold mt-3 mb-1.5 first:mt-0",children:t}),h3:({children:t})=>b.jsx("h3",{className:"text-sm font-semibold mt-2 mb-1 first:mt-0",children:t}),strong:({children:t})=>b.jsx("strong",{className:"font-semibold",children:t}),em:({children:t})=>b.jsx("em",{className:"italic",children:t}),del:({children:t})=>b.jsx("del",{className:"line-through text-muted-foreground",children:t}),ul:({children:t})=>b.jsx("ul",{className:"mb-3 last:mb-0 space-y-0.5 pl-4 list-disc",children:t}),ol:({children:t})=>b.jsx("ol",{className:"mb-3 last:mb-0 space-y-0.5 pl-4 list-decimal",children:t}),li:({children:t})=>b.jsx("li",{className:"leading-relaxed",children:t}),blockquote:({children:t})=>b.jsx("blockquote",{className:"border-l-2 border-border pl-3 my-2 text-muted-foreground italic",children:t}),hr:()=>b.jsx("hr",{className:"my-3 border-border"}),a:({href:t,children:n})=>b.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"rounded-sm text-primary underline underline-offset-2 hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[n,b.jsx("span",{className:"sr-only",children:" (opens in new tab)"})]}),code:({className:t,children:n,...r})=>"data-language"in r||t?.startsWith("language-")?b.jsx("code",{className:pe("block",t),children:n}):b.jsx("code",{className:"rounded px-1 py-0.5 bg-muted font-mono text-[0.8em]",children:n}),pre:({children:t})=>b.jsx("pre",{className:"my-2 overflow-x-auto rounded-lg bg-muted px-3 py-2.5 text-xs font-mono leading-relaxed",children:t}),table:({children:t})=>b.jsx("div",{className:"my-2 overflow-x-auto",children:b.jsx("table",{className:"w-full border-collapse text-xs",children:t})}),thead:({children:t})=>b.jsx("thead",{className:"border-b border-border",children:t}),tbody:({children:t})=>b.jsx("tbody",{children:t}),tr:({children:t})=>b.jsx("tr",{className:"border-b border-border/50 last:border-0",children:t}),th:({children:t})=>b.jsx("th",{className:"px-2 py-1.5 text-left font-semibold text-foreground",children:t}),td:({children:t})=>b.jsx("td",{className:"px-2 py-1.5 text-muted-foreground",children:t})},children:e})}function R6({message:e}){return e.role==="user"?b.jsx(L6,{message:e}):b.jsx(D6,{message:e})}const F6=5;function j6({value:e,onChange:t,onSubmit:n,onStop:r,onCancelQueue:i,isStreaming:o,hasPendingMessage:s=!1,pendingMessagePreview:a,disabled:l,placeholder:u="Message the Companion…",initialHistory:c}){const h=p.useRef(null),f=p.useRef(null),[d,m]=p.useState([]),[w,k]=p.useState(null),[y,E]=p.useState([]),v=p.useRef(c??[]),P=p.useRef(""),[C,S]=p.useState(null);p.useEffect(()=>{const M=h.current;M&&(M.style.height="auto",M.style.height=`${Math.min(M.scrollHeight,144)}px`)},[e]);const N=e.trim().length>0||d.length>0||y.length>0,L=o&&!s&&N,F=(l??!1)||o&&s,A=!o&&N&&!F,R=o&&!L;function j(M){const K=v.current;if(M==="up"){if(K.length===0)return;const g=C!==null?C.i-1:-1,X=g===-1?K.length-1:Math.max(0,g-1);if(X===g)return;g===-1&&(P.current=e),S({i:X+1,n:K.length}),t(K[X])}else{if(C===null)return;const g=C.i;g>=K.length?(S(null),t(P.current)):(S({i:g+1,n:K.length}),t(K[g]))}}function G(M){if(M.key==="Enter"&&(M.metaKey||M.ctrlKey)){M.preventDefault(),(A||L)&&I();return}if(M.key==="ArrowUp"){const K=h.current;if(!K)return;!e.slice(0,K.selectionStart).includes(`
38
+ `)&&v.current.length>0&&(M.preventDefault(),j("up"));return}M.key==="ArrowDown"&&C!==null&&(M.preventDefault(),j("down"))}function O(M){C!==null&&(P.current="",S(null)),t(M.target.value)}function I(){const M=e.trim();if(!M&&d.length===0&&y.length===0)return;const g=[...d.map(Z=>Z.content),...M?[M]:[]].join(`
39
+
40
+ `);if(M){const Z=v.current;Z[Z.length-1]!==M&&(v.current=[...Z,M].slice(-100))}P.current="",S(null),m([]),k(null);const X=y;E([]),t(""),n(g,X)}const ee=p.useCallback(async M=>{const g=Array.from(M.clipboardData.items).find(q=>q.type.startsWith("image/"));if(g){M.preventDefault();const q=g.getAsFile();if(!q)return;const te=new FileReader;te.onload=()=>{const le=te.result,ue=le.indexOf(","),Se=ue!==-1?le.slice(ue+1):le;E(_e=>[..._e,{id:crypto.randomUUID(),filename:q.name||"clipboard",mime:q.type,base64:Se}])},te.readAsDataURL(q);return}const X=M.clipboardData.getData("text");if(!X)return;const Z=X.split(`
41
+ `);Z.length<F6||(M.preventDefault(),m(q=>[...q,{id:crypto.randomUUID(),content:X,lineCount:Z.length}]))},[]),$=p.useCallback(M=>{!M||M.length===0||Array.from(M).forEach(K=>{const g=new FileReader;g.onload=()=>{const X=g.result,Z=X.indexOf(","),q=Z!==-1?X.slice(Z+1):X;E(te=>[...te,{id:crypto.randomUUID(),filename:K.name,mime:K.type||"application/octet-stream",base64:q}])},g.readAsDataURL(K)})},[]);function B(M){M.preventDefault(),R?r?.():I()}const z=C?`↑↓ history ${C.i}/${C.n} · ↓ newer · ⌘ Return to send`:v.current.length>0?"↑ history · ⌘ Return to send · Enter for newline":"⌘ Return to send · Enter for newline",x=d.length>0||y.length>0;return b.jsxs("div",{className:"flex flex-col gap-1.5",children:[s&&a&&b.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-card px-3 py-1.5",children:[b.jsx("span",{className:"text-[10px] text-muted-foreground shrink-0",children:"queued"}),b.jsx("span",{className:"flex-1 min-w-0 truncate text-xs text-foreground/70",children:a}),b.jsx("button",{type:"button",onClick:i,"aria-label":"Cancel queued message",className:"shrink-0 rounded p-0.5 text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:b.jsx(ui,{size:12,"aria-hidden":"true"})})]}),b.jsxs("form",{onSubmit:B,className:"flex flex-col rounded-xl border border-border bg-card has-[textarea:focus-visible]:border-ring",children:[x&&b.jsxs("div",{className:"px-3 pt-4 pb-1 flex flex-col gap-1.5",children:[b.jsxs("div",{className:"flex flex-wrap gap-4 overflow-visible",children:[y.map(M=>{const K=Ec(M.mime),g=`data:${M.mime};base64,${M.base64}`,X=b.jsx("button",{type:"button","aria-label":`Remove attachment ${M.filename}`,onClick:()=>E(q=>q.filter(te=>te.id!==M.id)),className:"absolute -top-2 -right-2 flex items-center justify-center w-7 h-7 rounded-md bg-background border border-border text-foreground/70 hover:text-foreground transition-colors [touch-action:manipulation] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:b.jsx(Cr,{size:13,"aria-hidden":"true"})});if(K==="image")return b.jsxs("div",{className:"relative flex-shrink-0 overflow-visible",children:[b.jsx(vc,{src:g,alt:M.filename,triggerClassName:"block w-14 h-14 rounded-lg border border-border overflow-hidden",children:b.jsx("img",{src:g,alt:M.filename,className:"w-full h-full object-cover"})}),X]},M.id);const Z="w-14 h-14 flex flex-col items-center justify-center gap-1 px-1 rounded-lg border border-border bg-secondary/60";return K==="text"?b.jsxs("div",{className:"relative flex-shrink-0 overflow-visible",children:[b.jsxs(Ac,{base64:M.base64,filename:M.filename,triggerClassName:pe(Z,"transition-colors hover:bg-secondary cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:[b.jsx(Sn,{size:20,className:"text-muted-foreground","aria-hidden":"true"}),b.jsx("span",{className:"text-[9px] text-muted-foreground text-center leading-tight line-clamp-2 break-all",children:M.filename})]}),X]},M.id):b.jsxs("div",{className:"relative flex-shrink-0 overflow-visible",children:[b.jsxs("button",{type:"button","aria-label":`Download ${M.filename}`,onClick:()=>Sc(M),className:pe(Z,"transition-colors hover:bg-secondary cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:[b.jsx(Sn,{size:20,className:"text-muted-foreground","aria-hidden":"true"}),b.jsx("span",{className:"text-[9px] text-muted-foreground text-center leading-tight line-clamp-2 break-all",children:M.filename})]}),X]},M.id)}),d.map(M=>{const K=w===M.id,g=M.content.split(`
42
+ `).find(X=>X.trim())??"";return b.jsxs("div",{className:"relative flex-shrink-0 self-start min-w-[120px] max-w-[200px] overflow-visible",children:[b.jsxs("button",{type:"button","aria-label":K?"Collapse preview":"Expand preview","aria-expanded":K,onClick:()=>k(K?null:M.id),className:"flex w-full flex-col gap-0.5 rounded-lg border border-border bg-secondary/60 py-1.5 pl-2 pr-5 text-left transition-colors hover:bg-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[b.jsxs("div",{className:"flex w-full items-center gap-1 text-xs text-muted-foreground",children:[b.jsx(Ca,{size:11,"aria-hidden":"true",className:"shrink-0"}),b.jsxs("span",{className:"shrink-0",children:[M.lineCount," lines"]}),b.jsx(li,{size:10,"aria-hidden":"true",className:pe("shrink-0 transition-transform duration-150",K&&"rotate-180")})]}),g&&b.jsx("span",{className:"truncate text-[10px] leading-tight text-muted-foreground/70",children:g})]}),b.jsx("button",{type:"button","aria-label":"Remove pasted text",onClick:()=>{w===M.id&&k(null),m(X=>X.filter(Z=>Z.id!==M.id))},className:"absolute -top-2 -right-2 flex h-7 w-7 items-center justify-center rounded-md bg-background border border-border text-foreground/70 hover:text-foreground transition-colors [touch-action:manipulation] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:b.jsx(Cr,{size:13,"aria-hidden":"true"})})]},M.id)})]}),w&&(()=>{const M=d.find(K=>K.id===w);return M?b.jsx("pre",{className:"max-h-48 overflow-y-auto rounded-md border border-border bg-background/60 px-3 py-2 font-mono text-xs text-foreground whitespace-pre-wrap break-words",children:M.content}):null})()]}),b.jsxs("div",{className:"flex items-center gap-1 p-2",children:[b.jsx("input",{ref:f,type:"file",multiple:!0,className:"sr-only",tabIndex:-1,"aria-hidden":"true",onChange:M=>{$(M.target.files),M.target.value=""}}),b.jsx("button",{type:"button","aria-label":"Attach files",disabled:F,onClick:()=>f.current?.click(),className:pe("flex h-8 w-8 shrink-0 items-center justify-center rounded-lg transition-[background-color,color] duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","text-muted-foreground hover:bg-secondary hover:text-foreground","disabled:cursor-not-allowed disabled:opacity-40"),children:b.jsx(Pa,{size:15,"aria-hidden":"true"})}),b.jsx("label",{htmlFor:"chat-message-input",className:"sr-only",children:"Message the Companion"}),b.jsx("textarea",{id:"chat-message-input",ref:h,name:"message",rows:1,value:e,onChange:O,onKeyDown:G,onPaste:ee,disabled:F,placeholder:u,autoComplete:"off",spellCheck:!0,"aria-label":"Message the Companion","aria-multiline":"true",className:pe("min-h-[36px] flex-1 resize-none bg-transparent px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground","focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50"),style:{maxHeight:"144px",overflowY:"auto"}}),b.jsx("button",{type:"submit","aria-label":R?"Stop generating":L?"Queue message":"Send message",disabled:!R&&!A&&!L,className:pe("flex h-8 w-8 shrink-0 items-center justify-center rounded-lg transition-[background-color,transform] duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",R?"bg-destructive/80 text-white hover:bg-destructive":A||L?"bg-grind-orange text-white hover:bg-grind-orange/90 active:scale-95":"cursor-not-allowed bg-secondary text-muted-foreground"),children:R?b.jsx(Va,{size:14,weight:"fill","aria-hidden":"true"}):b.jsx(Ta,{size:14,weight:"fill","aria-hidden":"true"})})]})]}),b.jsx("p",{"aria-hidden":"true",className:"text-center text-[10px] text-muted-foreground",children:z}),C!==null&&b.jsxs("span",{className:"sr-only","aria-live":"polite","aria-atomic":"true",children:["History entry ",C.i," of ",C.n]})]})}function H6(e){const n=Date.now()-e,r=Math.floor(n/864e5);return r===0?"Today":r===1?"Yesterday":r<7?`${r}d ago`:new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format(new Date(e))}function N6(e){return e.title?e.title:`Chat ${new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(e.createdAt))}`}function O6({conversations:e,activeId:t,onSelect:n,onNew:r}){return b.jsxs("aside",{className:"flex w-52 shrink-0 flex-col border-r border-border bg-sidebar","aria-label":"Conversations",children:[b.jsx("div",{className:"flex h-14 items-center justify-end px-3",children:b.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-2 rounded-md px-3 py-2 text-sm text-sidebar-foreground/80 hover:bg-sidebar-accent hover:text-sidebar-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-ring","aria-label":"Start new conversation",children:[b.jsx(Ma,{size:15,"aria-hidden":"true"}),"New Chat"]})}),b.jsx("nav",{className:"flex-1 overflow-y-auto px-2 pt-2 pb-3","aria-label":"Conversation history",children:e.length===0?b.jsx("p",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:"No conversations yet"}):b.jsx("ul",{role:"list",className:"space-y-0.5",children:e.map(i=>{const o=i.id===t,s=N6(i),a=H6(i.updatedAt);return b.jsx("li",{children:b.jsxs("button",{type:"button",onClick:()=>n(i.id),className:pe("flex w-full flex-col gap-0.5 rounded-md px-3 py-2 text-left",o?"bg-sidebar-accent text-sidebar-primary [&]:hover:bg-sidebar-accent [&]:hover:text-sidebar-primary":"text-sidebar-foreground/70 hover:bg-sidebar-accent/60 hover:text-sidebar-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-ring"),"aria-current":o?"page":void 0,"aria-label":`${s}, ${a}`,children:[b.jsx("span",{className:"truncate text-xs font-medium leading-tight",children:s}),b.jsx("span",{className:"text-[10px] text-muted-foreground",children:a})]})},i.id)})})})]})}const B6=["What quests do I have active right now?","Log a 45-minute chest workout","What should I focus on today?","Create a new daily quest for morning reading"];function z6({onPrompt:e,companion:t}){const n=t.name??"Companion",r=t.emoji??"⚡";return b.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-6 p-8 text-center",children:[b.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full border border-border bg-card",children:b.jsx("span",{"aria-hidden":"true",className:"text-2xl",children:r})}),b.jsxs("div",{children:[b.jsx("h2",{className:"text-lg font-semibold text-foreground",children:n}),b.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Your AI grind partner. Ask anything about your quests, skills, or goals."})]}),b.jsx("ul",{className:"flex flex-col gap-2 w-full max-w-sm","aria-label":"Suggested prompts",children:B6.map(i=>b.jsx("li",{children:b.jsx("button",{type:"button",onClick:()=>e(i),className:"w-full rounded-lg border border-border bg-card px-4 py-2.5 text-left text-sm text-foreground/80 [touch-action:manipulation] transition-colors duration-150 hover:border-ring/40 hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:i})},i))})]})}function U6(){const{conversations:e,companion:t,promptHistory:n}=cs.useLoaderData(),r=cs.useSearch(),i=Fc({from:"/app/chat/"}),[o,s]=p.useState(e),[a,l]=p.useState(r.c),[u,c]=p.useState([]),[h,f]=p.useState(""),[d,m]=p.useState(!1),[w,k]=p.useState(()=>!!r.c),[y,E]=p.useState(null),v=p.useRef(null),P=p.useRef(!1),C=p.useRef(!1),S=p.useCallback(B=>{const z=v.current;if(!z)return;const x=B??(window.matchMedia("(prefers-reduced-motion: reduce)").matches?"instant":"smooth");z.scrollTo({top:z.scrollHeight,behavior:x})},[]),N=p.useEffectEvent(B=>{if(!B){c([]),l(void 0);return}d||(l(B),k(!0),c([]),jc({data:{conversationId:B}}).then(z=>{const x=z.map(M=>M.role==="user"?{role:"user",id:M.id,content:M.content,...M.attachments&&M.attachments.length>0?{attachments:M.attachments}:{}}:{role:"assistant",id:M.id,content:M.content,toolCalls:[],isStreaming:!1});c(x),requestAnimationFrame(()=>S("instant"))}).catch(()=>{c([])}).finally(()=>{k(!1)}))});p.useEffect(()=>{N(r.c)},[r.c]);const L=p.useCallback(B=>{i({search:{c:B}})},[i]),F=p.useCallback(()=>{i({search:{c:void 0}})},[i]),A=p.useCallback(async(B,z=[])=>{P.current=!1;const x=crypto.randomUUID(),M=crypto.randomUUID(),K=z.length>0?z.map(g=>({mime:g.mime,base64:g.base64,filename:g.filename})):void 0;c(g=>[...g,{role:"user",id:x,content:B,...K?{attachments:K}:{}},{role:"assistant",id:M,content:"",toolCalls:[],isStreaming:!0}]),requestAnimationFrame(()=>S()),m(!0);try{const g={message:B};a&&(g.conversationId=a),z.length>0&&(g.attachments=z.map(Z=>({mime:Z.mime,base64:Z.base64})));const X=await eh({data:g});for await(const Z of X){if(P.current)break;if(Z.type==="conversation-id")l(Z.conversationId),i({search:{c:Z.conversationId},replace:!0});else if(Z.type==="text-delta")c(q=>q.map(te=>te.id===M&&te.role==="assistant"?{...te,content:te.content+Z.text}:te));else if(Z.type==="tool-call"){const q={id:crypto.randomUUID(),toolName:Z.toolName,toolArgsJson:Z.toolArgsJson,status:"pending"};c(te=>te.map(le=>le.id===M&&le.role==="assistant"?{...le,toolCalls:[...le.toolCalls,q]}:le))}else if(Z.type==="tool-result"){const q=Z.toolName,te=Z.toolResultJson;c(le=>le.map(ue=>{if(ue.id!==M||ue.role!=="assistant")return ue;let Se=-1;for(let lt=ue.toolCalls.length-1;lt>=0;lt--){const Pt=ue.toolCalls[lt];if(Pt&&Pt.toolName===q&&Pt.status==="pending"){Se=lt;break}}if(Se===-1)return ue;const _e=ue.toolCalls[Se];if(!_e)return ue;const an=[...ue.toolCalls];return an[Se]={..._e,toolResultJson:te,status:"complete"},{...ue,toolCalls:an}}))}else if(Z.type==="error"){c(q=>q.map(te=>te.id===M&&te.role==="assistant"?{...te,content:`⚠️ ${Z.error}`,isStreaming:!1}:te)),m(!1);return}else Z.type==="done"&&(c(q=>q.map(te=>te.id===M&&te.role==="assistant"?{...te,isStreaming:!1}:te)),m(!1))}}catch(g){c(X=>X.map(Z=>Z.role==="assistant"&&Z.isStreaming?{...Z,content:`⚠️ ${String(g)}`,isStreaming:!1}:Z)),m(!1)}try{const g=await Hc();s(g)}catch{}},[a,i,S]),R=p.useEffectEvent(B=>{A(B,[])});p.useEffect(()=>{if(!d&&y){if(C.current){C.current=!1;return}C.current=!0,E(null),c(B=>B.filter(z=>!(z.role==="user"&&z.queued))),R(y)}},[d,y]);const j=p.useCallback((B,z=[])=>{if(!(!B.trim()&&z.length===0)){if(d){if(y!==null)return;E(B);const x=z.length>0?z.map(M=>({mime:M.mime,base64:M.base64,filename:M.filename})):void 0;c(M=>[...M,{role:"user",id:crypto.randomUUID(),content:B,queued:!0,...x?{attachments:x}:{}}]),requestAnimationFrame(()=>S());return}A(B,z)}},[d,y,A,S]),G=p.useCallback((B,z=[])=>{const x=B.trim();!x&&z.length===0||(x&&Nc({data:{content:x}}).catch(()=>{}),j(x,z))},[j]),O=p.useCallback(()=>{P.current=!0,m(!1),E(null),C.current=!1,c(B=>B.map(z=>z.role==="assistant"&&z.isStreaming?{...z,isStreaming:!1}:z).filter(z=>!(z.role==="user"&&z.queued)))},[]),I=p.useCallback(()=>{E(null),C.current=!1,c(B=>B.filter(z=>!(z.role==="user"&&z.queued)))},[]),ee=p.useCallback(B=>{j(B)},[j]),$=u.length===0&&!w;return b.jsxs("div",{className:"flex h-full overflow-hidden",children:[b.jsx("div",{className:"hidden md:flex",children:b.jsx(O6,{conversations:o,activeId:a,onSelect:L,onNew:F})}),b.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[b.jsxs("header",{"aria-label":"Chat header",className:"flex h-14 shrink-0 items-center gap-3 border-b border-border px-5",children:[b.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-full bg-grind-orange/10 border border-grind-orange/20",children:b.jsx("span",{"aria-hidden":"true",className:"text-base",children:t.emoji??"⚡"})}),b.jsxs("div",{className:"flex min-w-0 flex-col",children:[b.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:t.name??"Companion"}),b.jsx("span",{className:"text-[10px] text-muted-foreground",children:"AI-powered grind partner"})]})]}),b.jsxs("div",{ref:v,className:"flex-1 overflow-y-auto px-4 py-4 space-y-3",role:"log","aria-label":"Chat messages","aria-live":"polite","aria-atomic":"false",children:[w&&b.jsx(Oc,{}),$&&!w&&b.jsx(z6,{onPrompt:ee,companion:t}),u.map(B=>b.jsx(R6,{message:B},B.id)),b.jsx("div",{"aria-hidden":"true"})]}),b.jsx("div",{className:"shrink-0 border-t border-border p-3",children:b.jsx(j6,{value:h,onChange:f,onSubmit:G,onStop:O,onCancelQueue:I,isStreaming:d,hasPendingMessage:y!==null,initialHistory:n,...y?{pendingMessagePreview:y}:{}})})]})]})}export{U6 as component};