ryugi-artifacts 1.76.0 → 1.77.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/cli.cjs +355 -35
  2. package/dist/output-bootstrap.cjs +9 -2
  3. package/dist/server.cjs +289 -289
  4. package/dist/viewer/ArtboardLayout-C8odRO5-.js +13 -0
  5. package/dist/viewer/Canvas-Lvx_4l7N.js +1 -0
  6. package/dist/viewer/{DocumentLayout-BFuBCe1z.js → DocumentLayout-Bv6Ni6pv.js} +2 -2
  7. package/dist/viewer/{DocumentPage-BqBUftrx.js → DocumentPage-21BkHTw9.js} +1 -1
  8. package/dist/viewer/{PreviewLayout-Bx_Yf3rn.js → PreviewLayout-DxPulKHq.js} +2 -2
  9. package/dist/viewer/{SnapshotDocument-DXjajUyC.js → SnapshotDocument-Cv3OmLv4.js} +1 -1
  10. package/dist/viewer/channel-BtxKScqa.js +4 -0
  11. package/dist/viewer/index.js +2 -2
  12. package/dist/viewer/index4.css +48 -0
  13. package/dist/viewer/preview.html +2 -2
  14. package/dist/viewer/preview.js +1 -1
  15. package/dist/viewer/{printDocument-CHLL0WV9.js → printDocument-C4mixOCB.js} +1 -1
  16. package/dist/viewer/view-_lCPxrgM.js +2 -0
  17. package/dist/viewer-lib/{Canvas-BwBZAQOH.js → Canvas-B2u5Xu4Q.js} +186 -176
  18. package/dist/viewer-lib/{PhoneArtboardBar-CnuXdNK_.js → PhoneArtboardBar-DphUzdTc.js} +1 -1
  19. package/dist/viewer-lib/{PreviewView-DXGaELRD.js → PreviewView-Cmi8qyst.js} +176 -47
  20. package/dist/viewer-lib/{ReadOnlyWhiteboard-BIrh4itZ.js → ReadOnlyWhiteboard-0a1PF9WY.js} +59 -59
  21. package/dist/viewer-lib/{SnapshotDocument-DxFquEK9.js → SnapshotDocument-BSkLVGik.js} +15589 -15547
  22. package/dist/viewer-lib/{VirtualizedEditor-uWe43zaI-CkFFq0vg.js → VirtualizedEditor-uWe43zaI-BPwh1XeB.js} +2 -2
  23. package/dist/viewer-lib/{VirtualizedRenderer-C_d95FXi-Dsji27_T.js → VirtualizedRenderer-C_d95FXi-D_uVjc6A.js} +3 -3
  24. package/dist/viewer-lib/{ar-SA-G6X2FPQ2-BRnkqOuC.js → ar-SA-G6X2FPQ2-BxYqMSzi.js} +1 -1
  25. package/dist/viewer-lib/{az-AZ-76LH7QW2-ehow0VIq.js → az-AZ-76LH7QW2-Dq3nTGr-.js} +1 -1
  26. package/dist/viewer-lib/{bg-BG-XCXSNQG7-BI6qziGi.js → bg-BG-XCXSNQG7-DskJTtPp.js} +1 -1
  27. package/dist/viewer-lib/{bn-BD-2XOGV67Q-tpMGd2_B.js → bn-BD-2XOGV67Q-D96UFHku.js} +1 -1
  28. package/dist/viewer-lib/{ca-ES-6MX7JW3Y-BbUlsBJ3.js → ca-ES-6MX7JW3Y-CuoxBVI2.js} +1 -1
  29. package/dist/viewer-lib/{chunk-EIO257PC-Bv-n7kZ3.js → chunk-EIO257PC-DeMrLF_7.js} +1 -1
  30. package/dist/viewer-lib/core.js +3 -3
  31. package/dist/viewer-lib/{cs-CZ-2BRQDIVT-DSqbdlen.js → cs-CZ-2BRQDIVT-BEk-H_Vk.js} +1 -1
  32. package/dist/viewer-lib/{da-DK-5WZEPLOC-BjZ1R6o-.js → da-DK-5WZEPLOC-B-2tVr18.js} +1 -1
  33. package/dist/viewer-lib/{de-DE-XR44H4JA-BfGPalkL.js → de-DE-XR44H4JA-euPndqvM.js} +1 -1
  34. package/dist/viewer-lib/{dist-mZ0nbNzy.js → dist--CpqpZeP.js} +2 -2
  35. package/dist/viewer-lib/{dist-DnQNTkTe.js → dist-B-VcBVha.js} +4 -4
  36. package/dist/viewer-lib/{dist-qYdH7M_t.js → dist-BIRD6yJM.js} +4 -4
  37. package/dist/viewer-lib/{dist-B8Fcs3nk.js → dist-By5I7Okg.js} +1 -1
  38. package/dist/viewer-lib/{dist-wfYzTIrG.js → dist-C_4-r-SK.js} +3 -3
  39. package/dist/viewer-lib/{dist-DullpK1S.js → dist-C_TzQuVj.js} +2 -2
  40. package/dist/viewer-lib/{dist-_LP1pOLG.js → dist-CiDxjK87.js} +3 -3
  41. package/dist/viewer-lib/{dist-rgz6xpXM.js → dist-D-o6TefA.js} +3 -3
  42. package/dist/viewer-lib/{dist-yTJLUGcc.js → dist-D4p8lcBm.js} +3 -3
  43. package/dist/viewer-lib/{dist-B1gf6Fa6.js → dist-D7GVdiZ_.js} +3 -3
  44. package/dist/viewer-lib/{dist-DhIKmABp.js → dist-DUp1l9aw.js} +1 -1
  45. package/dist/viewer-lib/{dist-9o61dnhF.js → dist-DiIs4Wtf.js} +2 -2
  46. package/dist/viewer-lib/{dist-NA5mGdqC.js → dist-DkB9uL4b.js} +3 -3
  47. package/dist/viewer-lib/{dist-B20oz2cZ.js → dist-DkRPb1L4.js} +3 -3
  48. package/dist/viewer-lib/{dist-BkAQ5CG2.js → dist-Do5FbfPB.js} +2 -2
  49. package/dist/viewer-lib/{dist-Mo4r-8tk.js → dist-DwPZHID8.js} +2 -2
  50. package/dist/viewer-lib/{dist-DIGLcVme.js → dist-MF77ZiP3.js} +3 -3
  51. package/dist/viewer-lib/{dist-BfpTX5QK.js → dist-OysWJvrd.js} +2 -2
  52. package/dist/viewer-lib/{dist-BdKPWdwp.js → dist-SWpcpLKQ.js} +2 -2
  53. package/dist/viewer-lib/{dist-06BdfUMU.js → dist-T-NoxEoS.js} +4 -4
  54. package/dist/viewer-lib/{dist-5oASkt9-.js → dist-TTrYwc3n.js} +2 -2
  55. package/dist/viewer-lib/{dist-Cnmv9jOf.js → dist-nttHr497.js} +3 -3
  56. package/dist/viewer-lib/{dist-6StWP8sP.js → dist-z5xmIJm7.js} +3 -3
  57. package/dist/viewer-lib/document.js +3 -3
  58. package/dist/viewer-lib/{el-GR-BZB4AONW-BvUZSnTi.js → el-GR-BZB4AONW-BstNT5YB.js} +1 -1
  59. package/dist/viewer-lib/{en-B4ZKOASM-Dyp8KE8C.js → en-B4ZKOASM-CLuWsYJe.js} +1 -1
  60. package/dist/viewer-lib/{es-ES-U4NZUMDT-B1PZEwLb.js → es-ES-U4NZUMDT-CNH0TChZ.js} +1 -1
  61. package/dist/viewer-lib/{eu-ES-A7QVB2H4-BNk6M67A.js → eu-ES-A7QVB2H4-CNpCf9s7.js} +1 -1
  62. package/dist/viewer-lib/{fa-IR-HGAKTJCU-CEtlDVKb.js → fa-IR-HGAKTJCU-MD2DLnwr.js} +1 -1
  63. package/dist/viewer-lib/{fi-FI-Z5N7JZ37-CqXNLgJp.js → fi-FI-Z5N7JZ37-B0x5U-9a.js} +1 -1
  64. package/dist/viewer-lib/{fr-FR-RHASNOE6-D7dtIipP.js → fr-FR-RHASNOE6-CoVvXGyV.js} +1 -1
  65. package/dist/viewer-lib/{gl-ES-HMX3MZ6V-Cgo7fAtE.js → gl-ES-HMX3MZ6V-BEtAqRTV.js} +1 -1
  66. package/dist/viewer-lib/{he-IL-6SHJWFNN-Bm1-H99W.js → he-IL-6SHJWFNN-JnZeHe4y.js} +1 -1
  67. package/dist/viewer-lib/{hi-IN-IWLTKZ5I-yK8E_0J9.js → hi-IN-IWLTKZ5I-BYVAF-an.js} +1 -1
  68. package/dist/viewer-lib/{hu-HU-A5ZG7DT2-C98VrJxm.js → hu-HU-A5ZG7DT2-C1g6PvYO.js} +1 -1
  69. package/dist/viewer-lib/{id-ID-SAP4L64H-TIdVGjhY.js → id-ID-SAP4L64H-Dz8s_rEF.js} +1 -1
  70. package/dist/viewer-lib/{image-GAAHSSAO-Bi1NqWd6.js → image-GAAHSSAO-Cp_Oy4Lg.js} +1 -1
  71. package/dist/viewer-lib/index.js +3067 -3051
  72. package/dist/viewer-lib/{it-IT-JPQ66NNP-627ORc6z.js → it-IT-JPQ66NNP-B7NhscKF.js} +1 -1
  73. package/dist/viewer-lib/{ja-JP-DBVTYXUO-BMKJR86l.js → ja-JP-DBVTYXUO-CAiycqDW.js} +1 -1
  74. package/dist/viewer-lib/{kaa-6HZHGXH3-BpSB5geq.js → kaa-6HZHGXH3-CAnRls-6.js} +1 -1
  75. package/dist/viewer-lib/{kab-KAB-ZGHBKWFO-BfYd3nUy.js → kab-KAB-ZGHBKWFO-DYWHAmBp.js} +1 -1
  76. package/dist/viewer-lib/{kk-KZ-P5N5QNE5-B2w9l6j_.js → kk-KZ-P5N5QNE5-DPoDluwp.js} +1 -1
  77. package/dist/viewer-lib/{km-KH-HSX4SM5Z-DpRvnOD3.js → km-KH-HSX4SM5Z-CBiZCJLZ.js} +1 -1
  78. package/dist/viewer-lib/{ko-KR-MTYHY66A-CGrV1Spl.js → ko-KR-MTYHY66A-MocKQnzV.js} +1 -1
  79. package/dist/viewer-lib/{ku-TR-6OUDTVRD-DGfmXOnJ.js → ku-TR-6OUDTVRD-CZzY2yy7.js} +1 -1
  80. package/dist/viewer-lib/{lt-LT-XHIRWOB4-DW9cVrrY.js → lt-LT-XHIRWOB4-Dh-omlnu.js} +1 -1
  81. package/dist/viewer-lib/{lv-LV-5QDEKY6T-CDlwVi5d.js → lv-LV-5QDEKY6T-DVUeEmOB.js} +1 -1
  82. package/dist/viewer-lib/{mr-IN-CRQNXWMA-DZTsb8X7.js → mr-IN-CRQNXWMA-BC2TCxWI.js} +1 -1
  83. package/dist/viewer-lib/{my-MM-5M5IBNSE-eimCGnfV.js → my-MM-5M5IBNSE-D_UqzOnS.js} +1 -1
  84. package/dist/viewer-lib/{nb-NO-T6EIAALU-CA0qj8A_.js → nb-NO-T6EIAALU-DZz9rgcM.js} +1 -1
  85. package/dist/viewer-lib/{nl-NL-IS3SIHDZ-xjXdrqei.js → nl-NL-IS3SIHDZ-Cxx6IDq2.js} +1 -1
  86. package/dist/viewer-lib/{nn-NO-6E72VCQL-BFaVKUPb.js → nn-NO-6E72VCQL-DHOwMIp2.js} +1 -1
  87. package/dist/viewer-lib/{oc-FR-POXYY2M6-x-knw1UV.js → oc-FR-POXYY2M6-BUCg3oNi.js} +1 -1
  88. package/dist/viewer-lib/{pa-IN-N4M65BXN-BzuUR6mV.js → pa-IN-N4M65BXN-DlR0Cv0r.js} +1 -1
  89. package/dist/viewer-lib/{percentages-BXMCSKIN-DUBJl_II.js → percentages-BXMCSKIN-CNHarTCz.js} +1 -1
  90. package/dist/viewer-lib/{pl-PL-T2D74RX3-GB1o6A0p.js → pl-PL-T2D74RX3-DBCTNfwV.js} +1 -1
  91. package/dist/viewer-lib/{printDocument-DjfXK0VD.js → printDocument-Bw-KNCCN.js} +2 -2
  92. package/dist/viewer-lib/{pt-BR-5N22H2LF-CjKPG-dA.js → pt-BR-5N22H2LF-BViO6V5P.js} +1 -1
  93. package/dist/viewer-lib/{pt-PT-UZXXM6DQ-DXKwitID.js → pt-PT-UZXXM6DQ-_-hLEzme.js} +1 -1
  94. package/dist/viewer-lib/{ro-RO-JPDTUUEW-GXm0K0W-.js → ro-RO-JPDTUUEW-B0pUzZSi.js} +1 -1
  95. package/dist/viewer-lib/{ru-RU-B4JR7IUQ-C3aifH4r.js → ru-RU-B4JR7IUQ-D5E11KR4.js} +1 -1
  96. package/dist/viewer-lib/{si-LK-N5RQ5JYF-CbCU4-qM.js → si-LK-N5RQ5JYF-BFislBlI.js} +1 -1
  97. package/dist/viewer-lib/{sk-SK-C5VTKIMK-oq8tYd7x.js → sk-SK-C5VTKIMK-D-yT3OQf.js} +1 -1
  98. package/dist/viewer-lib/{sl-SI-NN7IZMDC-CqbGY6Ud.js → sl-SI-NN7IZMDC-BB9t_cfT.js} +1 -1
  99. package/dist/viewer-lib/{static-rqLqPT6F.js → static-BL_ltq0p.js} +2 -2
  100. package/dist/viewer-lib/{stylex-DKFn6mfl.css → stylex-DjVDawxG.css} +54 -0
  101. package/dist/viewer-lib/subset-shared.chunk-B_z_wg9E.js +2 -0
  102. package/dist/viewer-lib/{subset-worker.chunk-DPMoD5NG.js → subset-worker.chunk-CthWNHJ8.js} +2 -2
  103. package/dist/viewer-lib/{sv-SE-XGPEYMSR-Bsf1cby9.js → sv-SE-XGPEYMSR-BYTui5Bf.js} +1 -1
  104. package/dist/viewer-lib/{ta-IN-2NMHFXQM-eRp4M6qC.js → ta-IN-2NMHFXQM-gcIYx9DJ.js} +1 -1
  105. package/dist/viewer-lib/{th-TH-HPSO5L25-DW9SpgaC.js → th-TH-HPSO5L25-DPpIkMiS.js} +1 -1
  106. package/dist/viewer-lib/{tr-TR-DEFEU3FU-pOCJfq5E.js → tr-TR-DEFEU3FU-CdZ57PYq.js} +1 -1
  107. package/dist/viewer-lib/types/src/viewer/components/BoardPlaceholder.d.ts +1 -1
  108. package/dist/viewer-lib/types/src/viewer/components/BoardsOverview.d.ts +12 -0
  109. package/dist/viewer-lib/types/src/viewer/components/Canvas.d.ts +2 -1
  110. package/dist/viewer-lib/types/src/viewer/components/DebugHud.d.ts +2 -1
  111. package/dist/viewer-lib/types/src/viewer/components/Labels.d.ts +2 -1
  112. package/dist/viewer-lib/types/src/viewer/document/tocStyles.d.ts +24 -1
  113. package/dist/viewer-lib/types/src/viewer/hooks/useBoardLifecycle.d.ts +3 -2
  114. package/dist/viewer-lib/types/src/viewer/hooks/useCulledBoards.d.ts +1 -0
  115. package/dist/viewer-lib/types/src/viewer/lib/board-lifecycle.d.ts +13 -1
  116. package/dist/viewer-lib/types/src/viewer/lib/cull.d.ts +1 -0
  117. package/dist/viewer-lib/types/src/viewer/lib/overview.d.ts +15 -0
  118. package/dist/viewer-lib/{uk-UA-QMV73CPH-DkgFEjc5.js → uk-UA-QMV73CPH-jb3KN0s9.js} +1 -1
  119. package/dist/viewer-lib/{vi-VN-M7AON7JQ-DW2UXo4M.js → vi-VN-M7AON7JQ-DczXZH3K.js} +1 -1
  120. package/dist/viewer-lib/{viewport-CFJHn_Y6-d5wzsaWt.js → viewport-CFJHn_Y6-CcY0_b0z.js} +1 -1
  121. package/dist/viewer-lib/{zh-CN-LNUGB5OW-APfqTduX.js → zh-CN-LNUGB5OW-B7ikml4p.js} +1 -1
  122. package/dist/viewer-lib/{zh-HK-E62DVLB3-SgR07W8h.js → zh-HK-E62DVLB3-GXxZysCg.js} +1 -1
  123. package/dist/viewer-lib/{zh-TW-RAJ6MFWO-BByKMSmL.js → zh-TW-RAJ6MFWO-CLRCR8wM.js} +1 -1
  124. package/package.json +1 -1
  125. package/dist/viewer/ArtboardLayout-LjqEYnU4.js +0 -13
  126. package/dist/viewer/Canvas-DhxIof5j.js +0 -1
  127. package/dist/viewer/channel-ieJNPeHy.js +0 -4
  128. package/dist/viewer/view-DK0Yp3Y_.js +0 -2
  129. package/dist/viewer-lib/subset-shared.chunk-CCczPz6Y.js +0 -2
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./AgentStatusPill-DdylWGRv.js","./rolldown-runtime-COiEfhsA.js","./route-TTi4dCVS.js","./react-B8SKf8RM.js","./jsx-runtime-DePvh3-m.js","./clsx-DRUh9g2d.js","./types-CaERrcmq.js","./index2.css","./useTranslation-Z5NjlGZP.js","./agentLook-CEVQF2aK.js","./Center-3zaroQ67.js","./PhoneSheet-CLpIn7DT.js","./Avatar-Bwe0zr2l.js","./arrow-up-DCvct17l.js","./MotionConfigContext-ClRb4nZj.js","./motion-Cy65kd7X.js","./BottomSheet-C7DV0Jsl.js","./anchor-Byo3PL5Y.js","./useMedia-B_wouzHa.js","./AutoPublishPrompt-vxlYFZUC.js","./cloud-upload-D5VRxGMB.js","./useCloudStatus-xytr4u1h.js","./page-api-C-rs_9hw.js","./SettingsDialog-5Ijnmcks.js","./split-url-C9-EsUey.js","./useScrollLock-C0UBr8yH.js","./isObjectLike-DnuJWahO.js","./maximize-2-BIFXhjSM.js","./settings-dialog-DcUSfYHj.js","./Avatar-DyFRt4SZ.js","./Segmented-C4lwEicS.js","./CompositeItem-AtsFyrMV.js","./isElementDisabled-KSuuBj8D.js","./font-preference-CHZ9OnPd.js","./index4.css","./ArtboardLayout-LjqEYnU4.js","./GroupVerdict-CJZXlzi9.js","./useTriggerFocusGuards-CZm917os.js","./FieldControl-Db_L0_Ja.js","./artifact-list-DVqz_5eT.js","./Select-BCKm490e.js","./Popover-DXebLNrC.js","./SelectScrollUpArrow-DIuCqrNk.js","./chevron-up-BmcYlrhx.js","./chevron-left-Cedt0go5.js","./PhoneArtboardBar-snghzshu.js","./DropdownMenu-faucDG5a.js","./MenuTrigger-BbHkbqUO.js","./minus-DFwlVdXQ.js","./type-BaA1Wn-r.js","./PublishMenu-BdvBhGrR.js","./elements-C05FRxzL.js","./usePageQuery-BLapKgc-.js","./file-text-D_oZKRaU.js","./Input-gvOSf3mb.js","./verdicts-DsDoB0AI.js","./Canvas-DhxIof5j.js","./cssVar.stylex-CGbpAC1Y.js","./view-DK0Yp3Y_.js","./WritingCursor-BKNMlRGq.js","./ThreadView-DfXzZ6Ox.js","./useTypeFavicon-BewmIMVb.js","./type-icons-BlFfxMHh.js","./selection-BAxwrRDD.js","./useArtifactFeed-DLjgeJDX.js","./ArtboardLayout-DLyi-yDq.css","./ArtifactList-C4VguTYP.js","./arrow-up-right-DHjiOpFm.js","./search-B262MOpE.js","./WarningsBadge-CRtBthqV.js","./DocumentLayout-BFuBCe1z.js","./HtmlLayout-CylXOB7G.js","./useSandboxFrame-D8TinZsv.js","./VerifyLayout-CDNbksiX.js","./DocumentEditor-DzpX07qj.js","./pen-tool-BHe7XHmt.js","./lib-Bz2MLJKt.js","./linear-BRPZ2Cwd.js","./html-BYfTdFQ4.js","./defaultLocale-BFoDCU3G.js","./init-C-OQMol4.js","./band-D-Cum8PO.js","./ordinal-BDEzSJ7C.js","./year--3Z3GYyB.js","./arc-CNPCFOtd.js","./pie-wjo18AAU.js","./ref-CJWSIRE5.js","./index3.css","./split-fit-B5waCbwy.js","./VerifyLayout-4Rq82VT8.css","./WhiteboardLayout-FAO1qkk_.js","./diagram-font-D5bUXQyN.js","./shims-CqTWewbM.js","./WhiteboardLayout-D547-sem.css","./SplitShell-DDxrJzzq.js","./route-messages-DB3qcaq7.js","./SplitShell-C1umM5Fz.css","./local-split-host-DlzWe0xb.js","./PreviewLayout-Bx_Yf3rn.js"])))=>i.map(i=>d[i]);
2
- import{i as e,n as t}from"./rolldown-runtime-COiEfhsA.js";import{C as n,S as r,_ as i,a,d as o,g as s,h as c,n as l,t as u,u as d,v as f,w as p}from"./route-TTi4dCVS.js";/* empty css */import{t as m}from"./react-B8SKf8RM.js";import{$ as h,At as g,Bt as _,Ct as v,Dt as y,Et as ee,F as te,Ft as ne,G as re,Gt as ie,Hn as b,Ht as ae,I as oe,It as x,J as se,K as S,Kn as C,Kt as ce,Lt as w,Mt as le,Nt as T,Ot as ue,P as de,Pt as E,Q as fe,Qt as pe,Rt as me,Tt as D,Un as he,Ut as ge,Vn as O,Vt as k,W as _e,Wn as ve,Wt as ye,X as be,Xt as xe,Y as Se,Yt as A,Z as Ce,Zt as we,bn as Te,bt as Ee,ct as De,dn as Oe,dt as ke,f as Ae,it as je,jt as Me,kt as Ne,lt as Pe,mt as Fe,nn as Ie,p as Le,pt as Re,q as ze,qt as Be,r as Ve,s as He,st as Ue,un as We,ut as Ge,wt as j,xt as Ke,y as qe,zt as Je}from"./split-url-C9-EsUey.js";import{t as Ye}from"./jsx-runtime-DePvh3-m.js";import{A as Xe,Ci as M,Er as Ze,F as Qe,Hn as $e,Jn as et,Jt as tt,Qn as nt,Rn as rt,Si as it,Sn as N,Ti as at,Un as ot,Vn as st,Xn as ct,Yn as lt,Yt as ut,Zt as dt,ai as ft,bi as pt,bn as mt,ci as P,g as ht,h as gt,hi as _t,lr as vt,lt as yt,pi as bt,pt as xt,qn as St,rn as Ct,xn as wt,yi as Tt,yn as Et,yr as Dt}from"./useScrollLock-C0UBr8yH.js";import{n as Ot,r as kt,t as F}from"./clsx-DRUh9g2d.js";import{$ as At,B as jt,Dt as Mt,Et as Nt,F as Pt,G as Ft,J as It,M as Lt,N as Rt,St as zt,Tt as Bt,U as Vt,W as I,_t as Ht,a as Ut,c as Wt,d as Gt,dt as L,et as Kt,gt as qt,ht as Jt,j as Yt,l as Xt,m as Zt,mt as Qt,p as $t,s as en,st as tn,u as nn,ut as rn,wt as an,xt as on}from"./MotionConfigContext-ClRb4nZj.js";import{$ as sn,$n as cn,$t as ln,A as un,An as dn,At as fn,B as pn,Bn as mn,Bt as hn,C as gn,Cn as _n,Cr as vn,Ct as yn,D as bn,Dn as xn,Dt as Sn,E as Cn,En as wn,Et as Tn,F as En,Fn as Dn,Ft as On,G as kn,Gn as An,Gt as jn,H as Mn,Hn as Nn,Ht as Pn,I as Fn,In,It as Ln,J as Rn,Jn as zn,Jt as Bn,K as Vn,Kn as Hn,Kt as Un,L as Wn,Ln as Gn,Lt as Kn,M as qn,Mn as Jn,Mt as Yn,N as Xn,Nn as Zn,Nt as Qn,O as $n,On as er,Ot as tr,P as nr,Pn as rr,Pt as ir,Q as ar,Qn as or,Qt as sr,R as cr,Rn as lr,Rt as ur,S as dr,Sn as fr,Sr as pr,St as mr,T as hr,Tn as gr,Tr as _r,Tt as vr,U as yr,Un as br,Ut as xr,V as Sr,Vn as Cr,Vt as wr,W as Tr,Wn as Er,Wt as Dr,X as Or,Xn as kr,Xt as Ar,Y as jr,Yn as Mr,Yt as Nr,Z as Pr,Zn as Fr,Zt as Ir,_ as Lr,_n as Rr,_t as zr,a as Br,an as Vr,ar as Hr,at as Ur,b as Wr,bn as Gr,br as Kr,bt as qr,c as Jr,cn as Yr,cr as Xr,ct as Zr,d as Qr,dn as $r,dr as ei,dt as ti,en as ni,er as ri,et as ii,f as ai,fn as oi,fr as si,ft as ci,g as li,gn as ui,gt as di,h as fi,hn as pi,ht as mi,i as hi,in as gi,ir as _i,it as vi,j as yi,jn as bi,jt as xi,k as Si,kn as Ci,kt as wi,l as Ti,ln as Ei,lr as Di,lt as Oi,m as ki,mn as Ai,mr as ji,mt as Mi,n as Ni,nn as Pi,nr as Fi,nt as Ii,o as Li,on as Ri,or as zi,ot as Bi,p as Vi,pn as Hi,pr as Ui,pt as Wi,q as Gi,qn as Ki,qt as qi,r as Ji,rn as Yi,rr as Xi,rt as Zi,s as Qi,sn as $i,sr as ea,st as ta,t as na,tn as ra,tr as ia,tt as aa,u as oa,un as sa,ur as ca,ut as la,v as ua,vn as da,vr as fa,vt as pa,w as ma,wn as ha,wr as ga,wt as _a,x as va,xn as ya,xr as R,xt as ba,y as xa,yn as Sa,yr as Ca,yt as wa,z as Ta,zn as Ea,zt as Da}from"./elements-C05FRxzL.js";var Oa={name:`circle-check-big`,size:24,node:[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]],aliases:[`check-circle`]};Oa.node;var ka=Mt(Oa),Aa={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};Aa.node;var ja=Mt(Aa);function Ma(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}function z(e,t,n){return _r(e.getProps(),t,n,e)}var Na=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,Pa=e=>Array.isArray(e);function Fa(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,$t(n))}function Ia(e){return Pa(e)?e[e.length-1]||0:e}function La(e,t){let{transitionEnd:n={},transition:r={},...i}=z(e,t)||{};i={...i,...n};for(let t in i)Fa(e,t,Ia(i[t]))}function Ra(e){return!!(Gt(e)&&e.add)}function za(e,t){let n=e.getValue(`willChange`);if(Ra(n))return n.add(t);if(!n&&on.WillChange){let n=new on.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Ba(e){return e.props[ga]}var Va=typeof window<`u`;function Ha({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function Ua(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Be(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState?.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&Ha(f,t))continue;let o={delay:n,...ce(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){I.update(()=>r.set(i));continue}let p=!1;if(Va&&window.MotionHandoffAnimation){let n=Ba(e);if(n){let e=window.MotionHandoffAnimation(n,t,I);e!==null&&(o.startTime=e,p=!0)}}za(e,t);let m=l??e.shouldReduceMotion;r.start(ie(t,r,i,m&&ye.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>I.update(()=>{o&&La(e,o)});d.length?Promise.all(d).then(t):t()}return d}function Wa(e,t,n={}){let r=z(e,t,Na(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?Ua(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(Wa(e,t,{...n,delay:r+(typeof o==`function`?0:o)+Ma(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function Ga(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>Wa(e,t,n))):typeof t==`string`?Wa(e,t,n):Promise.all(Ua(e,z(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var Ka=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`],B={x:!1,y:!1};function qa(){return B.x||B.y}function Ja(e){return e===`x`||e===`y`?B[e]?null:(B[e]=!0,()=>{B[e]=!1}):B.x||B.y?null:(B.x=B.y=!0,()=>{B.x=B.y=!1})}function Ya(e,t){let n=_(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Xa(e){return!(e.pointerType===`touch`||qa())}function Za(e,t,n={}){let[r,i,a]=Ya(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{e.pointerType!==`touch`&&(n?r=!0:s(e))};e.addEventListener(`pointerenter`,n=>{if(!Xa(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var Qa=(e,t)=>t?e===t||Qa(e,t.parentElement):!1,$a=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,eo=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function to(e){return eo.has(e.tagName)||e.isContentEditable===!0}var no=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function ro(e){return no.has(e.tagName)||e.isContentEditable===!0}var io=new WeakSet;function ao(e){return t=>{t.key===`Enter`&&e(t)}}function oo(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var so=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=ao(()=>{if(io.has(n))return;oo(n,`down`);let e=ao(()=>{oo(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>oo(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function co(e){return $a(e)&&!qa()}var lo=new WeakSet;function uo(e,t,n={}){let[r,i,a]=Ya(e,n),o=e=>{let r=e.currentTarget;if(!co(e)||lo.has(e))return;io.add(r),n.stopPropagation&&lo.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),io.has(r)&&io.delete(r),co(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||Qa(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),ae(e)&&(e.addEventListener(`focus`,e=>so(e,i)),!to(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var fo=new WeakMap,po,mo=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:k(r)&&`getBBox`in r?r.getBBox()[t]:r[n],ho=mo(`inline`,`width`,`offsetWidth`),go=mo(`block`,`height`,`offsetHeight`);function _o({target:e,borderBoxSize:t}){fo.get(e)?.forEach(n=>{n(e,{get width(){return ho(e,t)},get height(){return go(e,t)}})})}function vo(e){e.forEach(_o)}function yo(){typeof ResizeObserver<`u`&&(po=new ResizeObserver(vo))}function bo(e,t){po||yo();let n=_(e);return n.forEach(e=>{let n=fo.get(e);n||(n=new Set,fo.set(e,n)),n.add(t),po?.observe(e)}),()=>{n.forEach(e=>{let n=fo.get(e);n?.delete(t),n?.size||po?.unobserve(e)})}}var xo=new Set,So;function Co(){So=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};xo.forEach(t=>t(e))},window.addEventListener(`resize`,So)}function wo(e){return xo.add(e),So||Co(),()=>{xo.delete(e),!xo.size&&typeof So==`function`&&(window.removeEventListener(`resize`,So),So=void 0)}}function To(e,t){return typeof e==`function`?wo(e):bo(e,t)}var Eo={value:null,addProjectionMetrics:null};function Do(e){return k(e)&&e.tagName===`svg`}var Oo=e=>typeof e==`number`?e:parseFloat(e),ko=class extends ji{constructor(){super(...arguments),this.KeyframeResolver=ge}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;Gt(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},V=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function Ao(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function jo(e){return window.getComputedStyle(e)}var Mo=class extends ko{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Ao}mount(e){zt(!!e.style,`motion.create() components must forward their ref to a HTML or SVG element`,`custom-component-ref`),super.mount(e)}readValueFromInstance(e,t){if(Yt.has(t))return this.projection?.isProjecting?Lt(t):Rt(e,t);{let n=jo(e),r=(tn(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Ne(e,t)}build(e,t,n){Xt(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return si(e,t,n)}},No=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`]);function Po(e,t,n,r){Ao(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(No.has(n)?n:nn(n),t.attrs[n])}var Fo=class extends ko{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=R}getBaseTargetFromProps(e,t){return Yt.has(t)?super.getBaseTargetFromProps(e,t)??Lt(t):e[t]}getDefaultValue(e){return Yt.has(e)?this.latestValues[e]??Lt(e):void 0}readValueFromInstance(e,t){if(Yt.has(t)){let e=Pt(t);return e&&e.default||0}if(Wt.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=No.has(t)?t:nn(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return ca(e,t,n)}build(e,t,n){en(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Po(e,t,n,r)}mount(e){this.isSVGTag=ei(e.tagName),super.mount(e)}};function Io(e,t){if(!Array.isArray(t))return!1;let 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}var Lo=[...fa].reverse();function Ro(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>Ga(e,t,n))),n=Bo(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,l=r||i,u=[],d=new Set,f={},p=1/0,m=e;do m=m.props.inherit!==!1&&m.parent;while(m&&!m.isControllingVariants);if(Lo.forEach((t,r)=>{let i=n[t],h=o[t],g=m&&m.props[t],_=h===void 0?Ca(g)||g===!1?g:void 0:h,v=Ca(_),y=t===a?i.isActive:null;y===!1&&(p=r);let ee=v&&h===void 0&&!(l&&c);if(i.protectedKeys={...f},!i.isActive&&y===null||!_&&!i.prevProp||Kr(_)||typeof _==`boolean`)return;if(t===`exit`&&i.isActive&&y!==!0){f={...f,...i.prevResolvedValues};return}let te=zo(i.prevProp,_),ne=te||v&&(y&&!ee||r>p),re=!1,ie=Array.isArray(_)?_:[_],b={};if(y!==!1)for(let n of ie){let{transition:r,transitionEnd:i,...a}=z(e,n,Na(e,t))||{};b={...b,...a,...i}}let{prevResolvedValues:ae}=i;for(let t in{...ae,...b}){if(t in f)continue;let n=b[t],r=ae[t],a=Array.isArray(n)&&Array.isArray(r)?!Io(n,r)||te:n!==r;if(a&&n==null)d.add(t);else if(a||n!==void 0&&d.has(t)){ne=!0,d.delete(t)&&(re=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0}if(i.prevProp=_,i.prevResolvedValues=b,i.isActive&&(f={...f,...b}),ne&&(!(ee&&te)||re))for(let n of ie){let r={type:t};if(typeof n==`string`&&l&&c&&s?.enteringChildren){let t=z(s,n)?.transition?.delayChildren;r.delay=Ma(s.enteringChildren,e,t)}u.push({animation:n,options:r})}}),d.size){let{initial:t}=o,n={},r=typeof t!=`boolean`&&z(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom);r&&r.transition&&(n.transition=r.transition),d.forEach(i=>{let a=e.getValue(i);a&&(a.liveStyle=!0);let s=r&&!Array.isArray(t)?r[i]:void 0,c=e.getBaseTargetFromProps(o,i);n[i]=(s===void 0?c!==void 0&&!Gt(c)?c:e.initialValues[i]===void 0?e.baseTarget[i]:void 0:s)??null}),u.push({animation:n})}let h=l&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!h&&u.length?t(u):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=Bo(),i=!0}}}function zo(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Io(t,e):!1}function Bo(){let e={};for(let t of fa)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return e}function Vo(e,t){e.min=t.min,e.max=t.max}function H(e,t){Vo(e.x,t.x),Vo(e.y,t.y)}function Ho(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Uo=.9999,Wo=1.0001,Go=-.01,Ko=.01;function U(e){return e.max-e.min}function qo(e,t,n){return Math.abs(e-t)<=n}function Jo(e,t,n,r=.5){e.origin=r,e.originPoint=A(t.min,t.max,e.origin),e.scale=U(n)/U(t),e.translate=A(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Uo&&e.scale<=Wo||isNaN(e.scale))&&(e.scale=1),(e.translate>=Go&&e.translate<=Ko||isNaN(e.translate))&&(e.translate=0)}function Yo(e,t,n,r){Jo(e.x,t.x,n.x,r?r.originX:void 0),Jo(e.y,t.y,n.y,r?r.originY:void 0)}function Xo(e,t,n,r=0){e.min=(r?A(n.min,n.max,r):n.min)+t.min,e.max=e.min+U(t)}function Zo(e,t,n,r){Xo(e.x,t.x,n.x,r?.x),Xo(e.y,t.y,n.y,r?.y)}function Qo(e,t,n,r=0){let i=r?A(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+U(t)}function $o(e,t,n,r){Qo(e.x,t.x,n.x,r?.x),Qo(e.y,t.y,n.y,r?.y)}function es(e,t,n,r,i){return e-=t,e=le(e,1/n,r),i!==void 0&&(e=le(e,1/i,r)),e}function ts(e,t=0,n=1,r=.5,i,a=e,o=e){if(At.test(t)&&(t=parseFloat(t),t=A(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=A(a.min,a.max,r);e===a&&(s-=t),e.min=es(e.min,t,n,s,i),e.max=es(e.max,t,n,s,i)}function ns(e,t,[n,r,i],a,o){ts(e,t[n],t[r],t[i],t.scale,a,o)}var rs=[`x`,`scaleX`,`originX`],is=[`y`,`scaleY`,`originY`];function as(e,t,n,r){ns(e.x,t,rs,n?n.x:void 0,r?r.x:void 0),ns(e.y,t,is,n?n.y:void 0,r?r.y:void 0)}function os(e){return e.translate===0&&e.scale===1}function ss(e){return os(e.x)&&os(e.y)}function cs(e,t){return e.min===t.min&&e.max===t.max}function ls(e,t){return cs(e.x,t.x)&&cs(e.y,t.y)}function us(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ds(e,t){return us(e.x,t.x)&&us(e.y,t.y)}function fs(e){return U(e.x)/U(e.y)}function ps(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function W(e){return[e(`x`),e(`y`)]}function ms(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var hs={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(Kt.test(e))e=parseFloat(e);else return e}return`${ms(e,t.target.x)}% ${ms(e,t.target.y)}%`}},gs={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=It.parse(e);if(i.length>5)return r;let a=It.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=A(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}};function _s(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var vs=Ka.length,ys=e=>typeof e==`number`||Kt.test(e);function bs(e,t,n,r,i,a){i?(e.opacity=A(0,n.opacity??1,Ss(r)),e.opacityExit=A(t.opacity??1,0,Cs(r))):a&&(e.opacity=A(t.opacity??1,n.opacity??1,r));for(let i=0;i<vs;i++){let a=Ka[i],o=xs(t,a),s=xs(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||ys(o)===ys(s)?(e[a]=Math.max(A(Oo(o),Oo(s),r),0),(At.test(s)||At.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=A(t.rotate||0,n.rotate||0,r))}function xs(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Ss=ws(0,.5,xe),Cs=ws(.5,.95,Ht);function ws(e,t,n){return r=>r<e?0:r>t?1:n(we(e,t,r))}function Ts(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var Es=(e,t)=>e.depth-t.depth,Ds=class{constructor(){this.children=[],this.isDirty=!1}add(e){Bt(this.children,e),this.isDirty=!0}remove(e){Nt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Es),this.isDirty=!1,this.children.forEach(e)}};function Os(e,t){let n=rn.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(Vt(r),e(a-t))};return I.setup(r,!0),()=>Vt(r)}var ks=class{constructor(){this.members=[]}add(e){Bt(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&r.isConnected!==!1||n.snapshot||(Nt(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(Nt(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},As={borderRadius:{...hs,applyTo:[...Ka]},borderTopLeftRadius:hs,borderTopRightRadius:hs,borderBottomLeftRadius:hs,borderBottomRightRadius:hs,boxShadow:gs},js={hasAnimatedSinceResize:!0,hasEverUpdated:!1};Object.assign(Ui,{...As,...Ui});var Ms={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Ns=[``,`X`,`Y`,`Z`],Ps=1e3,Fs=0;function Is(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}var Ls=({instance:e})=>e&&Zt.get(e)?.demote();function Rs(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Ba(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,I,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Rs(r)}function zs({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Fs++,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.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Eo.value&&(Ms.nodes=Ms.calculatedTargetDeltas=Ms.calculatedProjections=0),this.nodes.forEach(Hs),this.nodes.forEach($s),this.nodes.forEach(ec),this.nodes.forEach(Us),Eo.addProjectionMetrics&&Eo.addProjectionMetrics(Ms)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ds)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new qt),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=k(t)&&!Do(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;I.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Os(i,250),js.hasAnimatedSinceResize&&(js.hasAnimatedSinceResize=!1,this.nodes.forEach(Qs)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isAnimationBlocked){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||sc,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!ds(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...ce(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||Qs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Vt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(tc),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Rs(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;Ls(this),this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,Ls(t),(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1),t.isAnimationBlocked&&(t.dragSnapshot||=t.measure(),this.dragAncestor=t)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Ks),this.nodes.forEach(Gs);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(qs);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ys),this.nodes.forEach(Xs),this.nodes.forEach(Zs),this.nodes.forEach(Bs),this.nodes.forEach(Vs)):this.nodes.forEach(qs),this.clearAllSnapshots();let e=rn.now();L.delta=an(0,1e3/60,e-L.timestamp),L.timestamp=e,L.isProcessing=!0,Ft.update.process(L),Ft.preRender.process(L),Ft.render.process(L),L.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,vn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ws),this.sharedNodes.forEach(nc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,I.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){I.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!U(this.snapshot.measuredBox.x)&&!U(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 e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected||=R(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;e&&Ls(this);let t=this.projectionDelta&&!ss(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||w(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),dc(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return R();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(pc))){let{scroll:e}=this.root;e&&(E(t.x,e.offset.x),E(t.y,e.offset.y))}return t}removeElementScroll(e){let t=R();if(H(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&H(t,e),E(t.x,i.offset.x),E(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||R();H(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(E(r.x,-n.scroll.offset.x),E(r.y,-n.scroll.offset.y)),w(n.latestValues)&&T(r,n.latestValues,n.layout?.layoutBox)}return w(this.latestValues)&&T(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=R();H(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!w(n.latestValues))continue;let r;n.instance&&(x(n.latestValues)&&n.updateSnapshot(),r=R(),H(r,n.measurePageBox())),as(t,n.latestValues,n.snapshot?.layoutBox,r)}return w(this.latestValues)&&as(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade}}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!==L.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=L.timestamp;let a=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=R(),this.targetWithTransforms=R()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Zo(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):H(this.target,this.layout.layoutBox),g(this.target,this.targetDelta)):H(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),Eo.value&&Ms.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||x(this.parent.latestValues)||ne(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=R(),this.relativeTargetOrigin=R(),$o(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),H(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===L.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;H(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Me(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=R());let{target:s}=e;s?(!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ho(this.prevProjectionDelta.x,this.projectionDelta.x),Ho(this.prevProjectionDelta.y,this.projectionDelta.y)),Yo(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&ps(this.projectionDelta.x,this.prevProjectionDelta.x)&&ps(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Eo.value&&Ms.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=pr(),this.projectionDelta=pr(),this.projectionDeltaWithTransform=pr()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=pr();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=R(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(oc));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=A(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=A(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(rc(o.x,e.x,n),rc(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($o(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),ac(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&ls(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=R(),H(f,this.relativeTarget)),c&&(this.animationValues=a,bs(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(Vt(this.pendingAnimation),void 0),this.pendingAnimation=I.update(()=>{js.hasAnimatedSinceResize=!0,this.motionValue||=$t(0),this.motionValue.jump(0,!1),this.currentAnimation=y(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),jt(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ps),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&fc(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||R();let t=U(this.layout.layoutBox.x);i.x.min=e.target.x.min,i.x.max=i.x.min+t;let n=U(this.layout.layoutBox.y);i.y.min=e.target.y.min,i.y.max=i.y.min+n}H(t,i),T(t,r),Yo(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ks),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&Is(`z`,e,r,this.animationValues);for(let t=0;t<Ns.length;t++)Is(`rotate${Ns[t]}`,e,r,this.animationValues),Is(`skew${Ns[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Di(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Di(t?.pointerEvents)||``),this.hasProjected&&!w(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=_s(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=r.animationValues?r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Ui){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=Ui[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?Di(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Gs),this.root.sharedNodes.clear()}}}function Bs(e){e.updateLayout(),Js(e)}function Vs(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)W(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=U(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Vo(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else fc(i,t.layoutBox,n)&&W(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=U(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=pr();Yo(o,n,t.layoutBox);let s=pr();a?Yo(s,e.applyTransform(r,!0),t.measuredBox):Yo(s,n,t.layoutBox);let c=!ss(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=R();$o(s,t.layoutBox,i.layoutBox,o);let c=R();$o(c,n,a.layoutBox,o),ds(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Hs(e){Eo.value&&Ms.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Us(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ws(e){e.clearSnapshot()}function Gs(e){e.clearMeasurements()}function Ks(e){e.isLayoutDirty=!0,e.updateLayout()}function qs(e){e.isLayoutDirty=!1}function Js(e){let{snapshot:t,dragAncestor:n}=e,r=n?.layout;if(!t||!r||e.resumeFrom||e.isAnimationBlocked)return;let i=n.dragSnapshot;W(e=>E(t.layoutBox[e],r.layoutBox[e].min-i.layoutBox[e].min))}function Ys(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.dragSnapshot||e.layout,e.isLayoutDirty=!0)}function Xs(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function Zs(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Qs(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function $s(e){e.resolveTargetDelta()}function ec(e){e.calcProjection()}function tc(e){e.resetSkewAndRotation()}function nc(e){e.removeLeadSnapshot()}function rc(e,t,n){e.translate=A(t.translate,0,n),e.scale=A(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ic(e,t,n,r){e.min=A(t.min,n.min,r),e.max=A(t.max,n.max,r)}function ac(e,t,n,r){ic(e.x,t.x,n.x,r),ic(e.y,t.y,n.y,r)}function oc(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var sc={duration:.45,ease:[.4,0,.1,1]},cc=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),lc=cc(`applewebkit/`)&&!cc(`chrome/`)?Math.round:Ht;function uc(e){e.min=lc(e.min),e.max=lc(e.max)}function dc(e){uc(e.x),uc(e.y)}function fc(e,t,n){return e===`position`||e===`preserve-aspect`&&!qo(fs(t),fs(n),.2)}function pc(e){return e!==e.root&&e.scroll?.wasRoot}var mc=zs({attachResizeListener:(e,t)=>Ts(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),hc={current:void 0},gc=zs({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!hc.current){let e=new mc({});e.mount(window),e.setOptions({layoutScroll:!0}),hc.current=e}return hc.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),_c=(e,t)=>Math.abs(e-t);function vc(e,t){let n=_c(e.x,t.x),r=_c(e.y,t.y);return Math.sqrt(n**2+r**2)}var G=Ye(),K=e(m(),1);function yc({children:e,features:t,strict:n=!1}){let[,r]=(0,K.useState)(!bc(t)),i=(0,K.useRef)(void 0);if(!bc(t)){let{renderer:e,...n}=t;i.current=e,ea(n)}return(0,K.useEffect)(()=>{bc(t)&&t().then(({renderer:e,...t})=>{ea(t),i.current=e,r(!0)})},[]),(0,G.jsx)(Xr.Provider,{value:{renderer:i.current,strict:n},children:e})}function bc(e){return typeof e==`function`}var xc=(e,t)=>t.isSVG??zi(e)?new Fo(t):new Mo(t,{allowProjection:e!==K.Fragment}),Sc=class extends V{constructor(e){super(e),e.animationState||=Ro(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Kr(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Cc=0,wc={animation:{Feature:Sc},exit:{Feature:class extends V{constructor(){super(...arguments),this.id=Cc++}update(){let{presenceContext:e,prevPresenceContext:t,animationState:n}=this.node;if(!e||!n)return;let{isPresent:r,onExitComplete:i}=e,a=t?.isPresent;if(r===a)return;if(r&&a===!1){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=z(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,n.reset(),n.animateChanges()}else n.setActive(`exit`,!1);this.exit=void 0;return}let o=this.exit=n.setActive(`exit`,!r);i&&!r&&o.then(()=>{this.exit===o&&(this.exit=!0,i(this.id))})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Tc(e){return{point:{x:e.pageX,y:e.pageY}}}var Ec=e=>t=>$a(t)&&e(t,Tc(t));function Dc(e,t,n,r){return Ts(e,t,Ec(n),r)}var Oc=({current:e})=>e?e.ownerDocument.defaultView:null,kc=new Set([`auto`,`scroll`]),Ac=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=jc(this.lastRawMoveEventInfo,this.transformPagePoint));let e=Nc(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=vc(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:rn.now()});let{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=jc(t,this.transformPagePoint),this.hasPendingMove=!0,I.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=Nc(e.type===`pointercancel`?this.lastMoveEventInfo:jc(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!$a(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=jc(Tc(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=L;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,Nc(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=pe(Dc(this.contextWindow,`pointermove`,this.handlePointerMove,d),Dc(this.contextWindow,`pointerup`,this.handlePointerUp,d),Dc(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(kc.has(e.overflowX)||kc.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),I.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Vt(this.updatePoint)}};function jc(e,t){return t?{point:t(e.point)}:e}function Mc(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Nc({point:e},t){return{point:e,delta:Mc(e,Fc(t)),offset:Mc(e,Pc(t)),velocity:Ic(t,.1)}}function Pc(e){return e[0]}function Fc(e){return e[e.length-1]}function Ic(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Fc(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Jt(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Jt(t)*2&&(r=e[1]);let a=Qt(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Lc(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?A(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?A(n,e,r.max):Math.min(e,n)),e}function Rc(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function zc(e,{top:t,left:n,bottom:r,right:i}){return{x:Rc(e.x,n,i),y:Rc(e.y,t,r)}}function Bc(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 Vc(e,t){return{x:Bc(e.x,t.x),y:Bc(e.y,t.y)}}function Hc(e,t){let n=.5,r=U(e),i=U(t);return i>r?n=we(t.min,t.max-r,e.min):r>i&&(n=we(e.min,e.max-i,t.min)),an(0,1,n)}function Uc(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Wc=.35;function Gc(e=Wc){return e===!1?e=0:e===!0&&(e=Wc),{x:Kc(e,`left`,`right`),y:Kc(e,`top`,`bottom`)}}function Kc(e,t,n){return{min:qc(e,t),max:qc(e,n)}}function qc(e,t){return typeof e==`number`?e:e[t]||0}var Jc=new WeakMap,Yc=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=R(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(e),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ja(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),W(e=>{let t=this.getAxisMotionValue(e).get()||0;if(At.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=U(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&I.update(()=>i(e,t),!1,!0),za(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;r&&this.currentDirection===null?(this.currentDirection=$c(o),this.currentDirection!==null&&i&&i(this.currentDirection)):(this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&I.update(()=>a(e,t),!1,!0))},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new Ac(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:Oc(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&I.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Qc(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Lc(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&_i(e)?this.constraints||=this.resolveRefConstraints():this.constraints=e&&n?zc(n.layoutBox,e):!1,this.elastic=Gc(t),r!==this.constraints&&!_i(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&W(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Uc(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!_i(e))return!1;let n=e.current;zt(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.",`drag-constraints-ref`);let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=ue(n,r.root,this.visualElement.getTransformPagePoint()),a=Vc(r.layout.layoutBox,i);if(t){let e=t(Je(a));this.hasMutatedConstraints=!!e,e&&(a=me(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=W(o=>{if(!Qc(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return za(this.visualElement,e),n.start(ie(e,n,0,t,this.visualElement,!1))}stopAnimation(){W(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();W(e=>{if(!Qc(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-A(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!_i(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};W(e=>{let t=this.getAxisMotionValue(e).get();i[e]=Hc({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),W(t=>{let n=this.getAxisMotionValue(t);if(!Qc(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(A(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Jc.set(this.visualElement,this);let e=this.visualElement.current,t=Dc(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&ro(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();_i(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Zc(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),I.read(r);let o=Ts(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(W(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Wc,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Xc(e){let t=!0;return()=>{t?t=!1:e()}}function Zc(e,t,n){let r=To(e,Xc(n)),i=To(t,Xc(n));return()=>{r(),i()}}function Qc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function $c(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var el=class extends V{constructor(e){super(e),this.removeGroupControls=Ht,this.removeListeners=Ht,this.controls=new Yc(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ht}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},tl=e=>(t,n)=>{e&&I.update(()=>e(t,n),!1,!0)},nl=class extends V{constructor(){super(...arguments),this.removePointerDownListener=Ht}onPointerDown(e){this.session=new Ac(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Oc(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:tl(e),onStart:tl(t),onMove:tl(n),onEnd:(e,t)=>{delete this.session,r&&I.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Dc(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},rl=!1,il=class extends K.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),rl&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),js.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a&&(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),rl=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||I.postRender(()=>{let e=a.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),vn.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;rl=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function al(e){let[t,n]=oe(),r=(0,K.useContext)(Ut);return(0,G.jsx)(il,{...e,layoutGroup:r,switchLayoutGroup:(0,K.useContext)(Hr),isPresent:t,safeToRemove:n})}var ol={pan:{Feature:nl},drag:{Feature:el,ProjectionNode:gc,MeasureLayout:al}};function sl(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&I.postRender(()=>i(t,Tc(t)))}var cl=class extends V{mount(){let{current:e}=this.node;e&&(this.unmount=Za(e,(e,t)=>(sl(this.node,t,`Start`),e=>sl(this.node,e,`End`))))}unmount(){}},ll=class extends V{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&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=pe(Ts(this.node.current,`focus`,()=>this.onFocus()),Ts(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function ul(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&I.postRender(()=>i(t,Tc(t)))}var dl=class extends V{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=uo(e,(e,t)=>(ul(this.node,t,`Start`),(e,{success:t})=>ul(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},fl=new WeakMap,pl=new WeakMap,ml=e=>{let t=fl.get(e.target);t&&t(e)},hl=e=>{e.forEach(ml)};function gl({root:e,...t}){let n=e||document;pl.has(n)||pl.set(n,{});let r=pl.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(hl,{root:e,...t})),r[i]}function _l(e,t,n){let r=gl(t);return fl.set(e,n),r.observe(e),()=>{fl.delete(e),r.unobserve(e)}}var vl={some:0,all:1},yl=class extends V{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:vl[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=_l(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(bl(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function bl({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var xl={inView:{Feature:yl},tap:{Feature:dl},focus:{Feature:ll},hover:{Feature:cl}},Sl={layout:{ProjectionNode:gc,MeasureLayout:al}},Cl={renderer:xc,...wc,...xl,...ol,...Sl},wl=e=>{e.stopPropagation()},Tl=e=>{e.preventDefault(),e.stopPropagation(),e.preventBaseUIHandler?.()},El={anchor:null,iconSpaceMode:`global`,items:[],open:!1,triggerId:null},Dl=El,Ol=new Set,q={ready:!1,triggerId:null,x:0,y:0},kl=()=>{Ol.forEach(e=>e())},Al=e=>(Ol.add(e),()=>Ol.delete(e)),jl=()=>Dl,Ml=()=>El,Nl=e=>{q.x=e.clientX,q.y=e.clientY,q.ready=!0,q.triggerId=e.target instanceof Element?e.target.closest(`[data-contextmenu-trigger]`)?.dataset.contextmenuTrigger??null:null},Pl=e=>({contextElement:typeof document>`u`?void 0:document.body,getBoundingClientRect:()=>({bottom:e.y,height:0,left:e.x,right:e.x,toJSON:()=>void 0,top:e.y,width:0,x:e.x,y:e.y})}),Fl=e=>{Dl={...Dl,...e},kl()},Il=null,Ll=(e,t)=>{let n={x:window.innerWidth/2,y:window.innerHeight/2};Fl({anchor:Pl(q.ready?{x:q.x,y:q.y}:n),footer:t?.footer,header:t?.header,iconAlign:t?.iconAlign,iconSpaceMode:t?.iconSpaceMode??`global`,items:e,listItemHeight:t?.listItemHeight,open:!0,triggerId:q.triggerId??null,virtual:t?.virtual})},Rl=(e,t)=>{typeof window<`u`&&(Il?.show?Il.show(e,t,()=>Ll(e,t)):Ll(e,t))},zl=()=>{Fl({anchor:null,footer:void 0,header:void 0,iconSpaceMode:`global`,items:[],listItemHeight:void 0,open:!1,triggerId:null,virtual:void 0})},Bl=()=>{Il?.close?Il.close(zl):zl()},J=Ot({block:`context-menu`,elements:[`trigger`,`positioner`,`header`,`viewport`,`footer`,`item`,`item-content`,`icon`,`label-group`,`label`,`desc`,`extra`,`submenu-arrow`,`checkbox-indicator`,`switch`,`separator`,`group`,`group-label`]});function Vl(e){let[t,n]=K.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),r=K.useRef(null),i=K.useRef(null),a=K.useRef(null),o=K.useRef(null),s=K.useRef(!0),c=K.useRef(null),l=ft(),u=K.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:a,backdropRef:r,internalBackdropRef:i,positionerRef:o,allowMouseUpTriggerRef:s,initialCursorPointRef:c,rootId:l}),[t,l]);return(0,G.jsx)(Ee.Provider,{value:u,children:(0,G.jsx)(Ke.Provider,{value:void 0,children:(0,G.jsx)(h,{...e})})})}var Hl=je,Ul=(0,K.memo)(({collisionPadding:e,style:t,...n})=>{let r=typeof t!=`function`&&t?.zIndex!=null&&typeof t.zIndex==`number`?t.zIndex:void 0,{zIndex:i,ref:a}=gt(`floating`,r),o=typeof t==`function`?e=>({zIndex:i,...t(e)}):{zIndex:i,...t};return(0,G.jsx)(Hl,{...n,className:F(j.positioner,J(`positioner`)),collisionPadding:e??We(),ref:a,style:o})});Ul.displayName=`ContextMenuSubmenuPositioner`;var Wl=(0,K.memo)(()=>{let{t:e}=te(de);return(0,G.jsx)(Pe,{disabled:!0,className:F(p(D.item,D.empty).className,J(`item`)),children:(0,G.jsx)(`div`,{className:F(j.itemContent,J(`item-content`)),children:(0,G.jsx)(`span`,{className:F(j.label,J(`label`)),children:e(`common.empty`)})})})});Wl.displayName=`EmptyMenuItem`;var Gl=({checked:e,children:t,closeOnClick:n=!1,danger:r,defaultChecked:i,disabled:a,label:o,onCheckedChange:s})=>{let[c,l]=(0,K.useState)(i??!1),u=e!==void 0,d=u?e:c,f=(0,K.useCallback)(e=>{u||l(e),s?.(e)},[u,s]);return(0,G.jsxs)(Pe,{closeOnClick:n,disabled:a,label:o,className:F(p(D.item,r&&D.danger).className,J(`item`)),onClick:e=>{e.preventDefault(),a||f(!d)},children:[t,(0,G.jsx)(`span`,{className:F(j.switchWrap,J(`switch`)),onFocus:e=>e.stopPropagation(),children:(0,G.jsx)(ee,{checked:d,disabled:a,size:`small`,tabIndex:-1,onChange:f,onClick:(e,t)=>t.stopPropagation()})})]})},Kl=(e,t,n)=>{let r=S(e),i=`desc`in e?e.desc:void 0,a=`extra`in e?e.extra:void 0,o=t?.indicatorOnRight,s=!!i&&t?.iconAlign===`start`,c=n!==void 0&&!o,l=c?!!n:!!e.icon,u=c?!!(t?.reserveIconSpace||n):!!(l||t?.reserveIconSpace),d=i?(0,G.jsxs)(`div`,{className:F(j.labelGroup,J(`label-group`)),children:[(0,G.jsx)(`span`,{className:F(j.label,J(`label`)),children:r}),(0,G.jsx)(`span`,{className:F(j.desc,J(`desc`)),children:i})]}):(0,G.jsx)(`span`,{className:F(j.label,J(`label`)),children:r});return(0,G.jsxs)(`div`,{className:F(p(D.itemContent,s&&D.itemContentAlignStart).className,J(`item-content`)),children:[u?(0,G.jsx)(`span`,{"aria-hidden":!l,className:F(p(D.icon,s&&D.iconAlignStart).className,v.icon,J(`icon`)),children:c?n:l?Se(e.icon,`small`):null}):null,d,a?(0,G.jsx)(`span`,{className:F(j.extra,J(`extra`)),children:a}):null,o&&n?n:null,t?.submenu?(0,G.jsx)(`span`,{className:F(j.submenuArrow,J(`submenu-arrow`)),children:(0,G.jsx)(_e,{})}):null]})},ql=(e,t,n)=>{if(!e.onClick)return;let r=e.key??t.at(-1)??``,i={domEvent:n,item:n.currentTarget,key:String(r),keyPath:t};e.onClick(i)},Jl=(e,t=[],n)=>{let r=n?.iconAlign,i=n?.iconSpaceMode??`global`,a=n?.reserveIconSpace??ze(e,i===`global`),o=n?.indicatorOnRight??se(e);return e.map((e,n)=>{if(!e)return null;let s=`${t.join(`-`)||`root`}-${n}`,c=re(e,s),l=[...t,String(c)];if(e.type===`checkbox`){let t=e,n=S(t),i=typeof n==`string`?n:void 0,s=!!t.danger,l=(0,G.jsx)(Re,{className:J(`checkbox-indicator`),children:(0,G.jsx)(rt,{icon:ve,size:`small`})});return(0,G.jsx)(Fe,{checked:t.checked,closeOnClick:t.closeOnClick,defaultChecked:t.defaultChecked,disabled:t.disabled,label:i,className:F(p(D.item,s&&D.danger).className,J(`item`)),onCheckedChange:e=>t.onCheckedChange?.(e),children:Kl(t,{iconAlign:r,indicatorOnRight:o,reserveIconSpace:a},l)},c)}if(e.type===`switch`){let t=e,n=S(t),i=typeof n==`string`?n:void 0,o=!!t.danger;return(0,G.jsx)(Gl,{checked:t.checked,closeOnClick:t.closeOnClick,danger:o,defaultChecked:t.defaultChecked,disabled:t.disabled,label:i,onCheckedChange:t.onCheckedChange,children:Kl(t,{iconAlign:r,reserveIconSpace:a})},c)}if(e.type===`divider`)return(0,G.jsx)(Ce,{className:F(j.separator,J(`separator`))},c);if(e.type===`group`){let t=e,n=i===`group`?t.children?ze(t.children):!1:a,o=t.children?se(t.children):!1;return(0,G.jsxs)(ke,{className:J(`group`),children:[t.label?(0,G.jsx)(Ge,{className:F(j.groupLabel,J(`group-label`)),children:t.label}):null,t.children?Jl(t.children,l,{iconAlign:r,iconSpaceMode:i,indicatorOnRight:o,reserveIconSpace:n}):null]},c)}if(e.type===`submenu`||`children`in e&&e.children){let t=e,n=S(t),o=typeof n==`string`?n:void 0,s=`danger`in t&&!!t.danger,u=t.header!=null||t.footer!=null,d=t.children&&t.children.length>0?Jl(t.children,l,{iconAlign:r,iconSpaceMode:i}):(0,G.jsx)(Wl,{});return(0,G.jsxs)(fe,{defaultOpen:t.defaultOpen,open:t.open,onOpenChange:t.onOpenChange,children:[(0,G.jsx)(be,{...t.triggerProps,closeDelay:t.closeDelay,delay:t.delay,disabled:t.disabled,label:o,openOnHover:t.openOnHover,className:F(p(D.item,s&&D.danger).className,J(`item`)),onClick:t.onClick,children:Kl(t,{iconAlign:r,reserveIconSpace:a,submenu:!0})}),(0,G.jsx)(Ue,{children:(0,G.jsx)(Ul,{alignOffset:-4,"data-submenu":``,sideOffset:-1,onContextMenu:Tl,children:(0,G.jsxs)(De,{className:F(p(D.popup,u&&D.popupWithSlots).className,v.popup,J()),children:[t.header==null?null:(0,G.jsx)(`div`,{className:F(j.header,J(`header`)),children:t.header}),u?(0,G.jsx)(`div`,{className:F(j.slotViewport,J(`viewport`)),children:d}):d,t.footer==null?null:(0,G.jsx)(`div`,{className:F(j.footer,J(`footer`)),children:t.footer})]})})})]},c)}let u=e,d=S(u),f=typeof d==`string`?d:void 0,m=`danger`in u&&!!u.danger;return(0,G.jsx)(Pe,{closeOnClick:u.closeOnClick,disabled:u.disabled,label:f,className:F(p(D.item,m&&D.danger).className,J(`item`)),onClick:e=>ql(u,l,e),children:Kl(u,{iconAlign:r,reserveIconSpace:a})},c)})},Yl={"--lobe-dropdown-animation-duration":`0ms`},Xl=(0,K.memo)(()=>{let e=Oe(),t=at(),n=(0,K.useSyncExternalStore)(Al,jl,Ml);(0,K.useEffect)(()=>{},[e]),(0,K.useEffect)(()=>{let e=e=>Nl(e);return window.addEventListener(`pointerdown`,e,!0),window.addEventListener(`contextmenu`,e,!0),()=>{window.removeEventListener(`pointerdown`,e,!0),window.removeEventListener(`contextmenu`,e,!0)}},[]);let r=(0,K.useMemo)(()=>Jl(n.items,[],{iconAlign:n.iconAlign,iconSpaceMode:n.iconSpaceMode}),[n.items,n.iconAlign,n.iconSpaceMode]),{zIndex:i,ref:a}=gt(`floating`),o=n.header!=null||n.footer!=null;return!e||!n.open&&n.items.length===0?null:(0,G.jsx)(Vl,{open:n.open,onOpenChange:e=>{e?Fl({open:e}):Bl()},children:(0,G.jsx)(Ue,{container:t,children:(0,G.jsx)(Hl,{anchor:n.anchor??void 0,className:F(j.positioner,J(`positioner`)),collisionPadding:We(),ref:a,sideOffset:6,style:{...Yl,zIndex:i},children:(0,G.jsxs)(De,{"data-has-footer":n.footer==null?void 0:``,"data-has-header":n.header==null?void 0:``,className:F(p(D.popup,o&&D.popupWithSlots).className,v.popup,J()),onContextMenu:Tl,children:[n.header==null?null:(0,G.jsx)(`div`,{className:F(j.header,J(`header`)),children:n.header}),n.virtual?(0,G.jsx)(Ie,{className:J(`viewport`),itemSize:n.listItemHeight,children:r}):o?(0,G.jsx)(`div`,{className:F(j.slotViewport,J(`viewport`)),children:r}):r,n.footer==null?null:(0,G.jsx)(`div`,{className:F(j.footer,J(`footer`)),children:n.footer})]})})})})});Xl.displayName=`ContextMenuHost`;function Zl(e,t){let n=(t??vt(e).getComputedStyle(e)).transform,r=0,i=0,a=1;if(n&&n!==`none`){let e=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(r=t[4],i=t[5],a=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(r=t[12],i=t[13],a=t[0])}}return{x:r,y:i,scale:a}}var Ql=(0,K.createContext)({position:`bottom-right`,swipeDirection:[`down`,`right`]}),$l=()=>(0,K.useContext)(Ql),eu=[],tu=new Set,nu=()=>{for(let e of tu)e()},ru=e=>(eu.push(e),nu(),()=>{let t=eu.indexOf(e);t!==-1&&eu.splice(t,1),nu()}),iu=e=>eu[0]===e,au=e=>(tu.add(e),()=>{tu.delete(e)}),ou=20,su=5e3,cu=!1,lu=[],uu=e=>{cu?e():(lu.length>=ou&&lu.shift(),lu.push({queuedAt:Date.now(),run:e}))},du=()=>{cu=!0;let e=lu;lu=[];let t=Date.now();for(let n of e)t-n.queuedAt<=su&&n.run()},fu=()=>{cu=!1},Y=Ot({block:`toast`,dataAttributes:[`type`,`position`],elements:[`viewport`,`content`,`body`,`icon`,`main`,`title-row`,`title`,`close`,`description`,`actions`,`action`]}),X={action:{kVAM5u:`lb181nr7w`,kaIpWk:`lb1vihcfj`,ksu8eU:`lbng3xce`,kMzoRj:`lbfn42iu`,kg3NbH:`lbaope02`,kmkexE:`lb1cd9vmy`,kGNEyG:`lb6s0dn4`,kkrTdU:`lb1ypdohk`,k1xSpc:`lb3nfvp2`,kmuXW:`lb2lah0s`,kGuDYH:`lbfifm61`,k63SB2:`lbk50ysn`,kjj79g:`lbl56j7k`,kLWn49:`lbo5v014`,kZKoxP:`lb1fgtraw`,$$css:!0},actionDanger:{"--lobe-focus-ring-color":`lb2hswdp`,kWkggS:`lbixdnzb lb1ca5mm0 lb4c98my`,kMwMTN:`lb15g0kca`,kjBf7l:`lbiep9q5 lb1y5du2d`,$$css:!0},actionGhost:{kVAM5u:`lbqnr5ac lb1ahehej lbuhn3al`,ksu8eU:`lb1y0btm7`,kMzoRj:`lbmkeg23`,kWkggS:`lbjbqb8w`,kMwMTN:`lb66ogz0 lb1l4wxl8 lb1nelral`,$$css:!0},actionPrimary:{kWkggS:`lb1hsafae lblxzpop lb1gwghft`,kMwMTN:`lb15g0kca`,$$css:!0},actionSecondary:{kWkggS:`lbjjy28o lbswrfa9 lb147z954`,kMwMTN:`lb66ogz0`,$$css:!0},actionText:{kWkggS:`lbjbqb8w lbswrfa9 lb1cpyog9`,kMwMTN:`lb16owwnm`,$$css:!0},actions:{kOIVth:`lb167g77z`,kGNEyG:`lb6s0dn4`,kSGwAc:`lbpvyfi4`,k1xSpc:`lb78zum5`,kzQI83:`lb1iyjqo2`,kmuXW:`lb2lah0s`,kjj79g:`lb13a6bvl`,keoZOQ:`lb1xmf6yo`,$$css:!0},close:{kmVPX3:`lb1717udv`,kVAM5u:`lb181nr7w`,kaIpWk:`lb1vihcfj`,ksu8eU:`lbng3xce`,kMzoRj:`lbfn42iu`,kmkexE:`lb1ng1d19`,kGNEyG:`lb6s0dn4`,kWkggS:`lbjbqb8w lb1ri6zej`,kMwMTN:`lbc77et8 lb1bxu9lh`,kkrTdU:`lb1ypdohk`,k1xSpc:`lb78zum5`,kmuXW:`lb2lah0s`,kjj79g:`lbl56j7k`,keTefX:`lbvc5jky`,kZKoxP:`lb1qx5ct2`,kzqmXN:`lbw4jnvo`,$$css:!0},content:{kVQacm:`lbb3r6kr`,kmkexE:`lb1hzt7jf`,kSiTet:`lb1g256cz lbcbbmyo`,kfzvcC:`lbp78wxm lb1cicrrk`,$$css:!0},contentArea:{kUk6DE:`lb98rzlu`,k1xSpc:`lb78zum5`,kXwgrk:`lbdt5ytf`,k7Eaqz:`lbeuugli`,$$css:!0},description:{kogj98:`lb1ghz6dp`,kMwMTN:`lbc77et8`,kGuDYH:`lb4z9k3i`,kLWn49:`lb1evy7pa`,$$css:!0},descriptionWithTitle:{keoZOQ:`lb1gslohp`,$$css:!0},descriptionStandalone:{kMwMTN:`lb66ogz0`,$$css:!0},icon:{kGNEyG:`lb6s0dn4`,k1xSpc:`lb78zum5`,kmuXW:`lb2lah0s`,kjj79g:`lbl56j7k`,$$css:!0},root:{"--toast-collapsed-height":`lb1o8nl8n`,"--toast-gap":`lbr9sdi6`,"--toast-peek":`lb1wxzbih`,"--toast-scale":`lb1vhpo3u`,"--toast-shrink":`lb1c223hw`,kaIpWk:`lb159sbz3`,kkqhue:`lb17y0mx6`,k8WAf4:`lb10dr8xq`,kg3NbH:`lb1hr3lfm`,kHypHr:`lbx83zyx`,kWkggS:`lb1w937bt`,kGVxlE:`lbj07k4p`,kB7OPa:`lb9f619`,kMwMTN:`lb66ogz0`,kkrTdU:`lbt0e3qv`,kSiTet:`lb4ki41r`,kVAEAm:`lb10l6tqk`,kIyJzY:`lb1ssesjg lbm69ghq`,k1ekBW:`lb19ix5ol lbo3tt7b`,kAMwcw:`lb1477tyf lb7cr0y4`,kfSwDN:`lb87ps6o`,kY2c9j:`lb1l48cz2`,kZKoxP:`lb677f43 lbnbj6on`,kzqmXN:`lbh8yej3`,$$css:!0},rootBottom:{kYYq5F:`lb1fclj7r`,k3aq6I:`lb1qsqgls lbz09l4w lb1ce1yp4`,k3nNDw:`lb18ouj0k`,kcktkL:`lbb7ltuz`,k5JduY:`lb100rkj9`,k3foIR:`lb1srwf7z`,kwXMNM:`lb1j6awrg`,k4zj60:`lb1jflgyd`,$$css:!0},rootTop:{kYYq5F:`lbdwv5cp`,k3aq6I:`lb1jkqqlh lb7ly47h lbjeddtc`,k3nNDw:`lb1dp6rp6`,kcktkL:`lbb7ltuz`,k5JduY:`lb100rkj9`,k8Iv0R:`lb1wpe5ba`,kwXMNM:`lb1j6awrg`,k4zj60:`lb1jflgyd`,$$css:!0},title:{kogj98:`lb1ghz6dp`,kMwMTN:`lb66ogz0`,kGuDYH:`lbif65rj`,k63SB2:`lbk50ysn`,kLWn49:`lb1evy7pa`,$$css:!0},titleRow:{kOIVth:`lb167g77z`,kGNEyG:`lb1cy8zhl`,k1xSpc:`lb78zum5`,$$css:!0},toastBody:{kOIVth:`lb1v2ro7d`,kGNEyG:`lb1cy8zhl`,k1xSpc:`lb78zum5`,$$css:!0},viewport:{kI3sdo:`lb1b6ykf0`,kVAEAm:`lbixxii4`,kY2c9j:`lb979qle`,ks0D6T:`lbg5xlue`,kzqmXN:`lb1fzdfyu lbm1mc0`,$$css:!0},viewportBottom:{krVfgx:`lbo7r6ss`,kLqNvP:`lbbudbmw`,k3aq6I:`lbuuh30`,$$css:!0},viewportBottomLeft:{krVfgx:`lbo7r6ss`,kLqNvP:`lb10vz1dz`,$$css:!0},viewportBottomRight:{krVfgx:`lbo7r6ss`,kt4wiu:`lb1cj2eds`,k3aq6I:`lb18zyp77`,kIyJzY:`lb1x2t6jx lb12w9bfk`,k1ekBW:`lb11xpdln lb4wkmsb`,kAMwcw:`lbsygjwy lb7v8fk2`,$$css:!0},viewportTop:{k87sOh:`lb1kd19f1`,kLqNvP:`lbbudbmw`,k3aq6I:`lbuuh30`,$$css:!0},viewportTopLeft:{k87sOh:`lb1kd19f1`,kLqNvP:`lb10vz1dz`,$$css:!0},viewportTopRight:{k87sOh:`lb1kd19f1`,kt4wiu:`lb1cj2eds`,$$css:!0}},pu={bottom:X.viewportBottom,"bottom-left":X.viewportBottomLeft,"bottom-right":X.viewportBottomRight,top:X.viewportTop,"top-left":X.viewportTopLeft,"top-right":X.viewportTopRight},mu={bottom:X.rootBottom,"bottom-left":X.rootBottom,"bottom-right":X.rootBottom,top:X.rootTop,"top-left":X.rootTop,"top-right":X.rootTop},hu={danger:X.actionDanger,ghost:X.actionGhost,primary:X.actionPrimary,secondary:X.actionSecondary,text:X.actionText},gu=K.createContext(void 0);function _u(){let e=K.useContext(gu);if(!e)throw Error(bt(73));return e}var vu=0;function yu(e){return vu+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${vu}`}function bu(e,t){if(typeof e==`string`)return{description:e};if(typeof e==`function`){let n=e(t);return typeof n==`string`?{description:n}:n}return e}function xu(e){let t=new Map,n=0,r=0;return e.forEach((e,i)=>{let a=e.transitionStatus===`ending`;t.set(e.id,{value:e,domIndex:i,visibleIndex:a?-1:n,offsetY:r}),r+=e.height||0,a||(n+=1)}),t}function Su(e,t){let n=0;return e.map(e=>{if(e.transitionStatus===`ending`)return e;let r=n>=t;return n+=1,e.limited===r?e:{...e,limited:r}})}var Z={toasts:e=>e.toasts,isEmpty:e=>e.toasts.length===0,toast:(e,t)=>e.toastMetadata.get(t)?.value,toastIndex:(e,t)=>e.toastMetadata.get(t)?.domIndex??-1,toastOffsetY:(e,t)=>e.toastMetadata.get(t)?.offsetY??0,toastVisibleIndex:(e,t)=>e.toastMetadata.get(t)?.visibleIndex??-1,focused:e=>e.focused,expanded:e=>e.hovering||e.focused,expandedOrOutOfFocus:e=>e.hovering||e.focused||!e.isWindowFocused,prevFocusElement:e=>e.prevFocusElement},Cu=class extends Qe{timers=new Map;areTimersPaused=!1;constructor(e){super({...e,toastMetadata:xu(e.toasts)},{},Z)}setViewport=e=>{this.set(`viewport`,e)};syncProviderProps(e,t){let n=this.state.limit!==t;if(this.state.timeout===e&&!n)return;let r={timeout:e,limit:t};if(n){let e=Su(this.state.toasts,t);r.toasts=e,r.toastMetadata=xu(e)}this.update(r)}disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,t=!1){let n=Z.toastIndex(this.state,e);if(n===-1)return;let r=this.state.toasts[n];t||r?.onRemove?.();let i=[...this.state.toasts];i.splice(n,1),this.setToasts(i)}addToast=e=>{let{timeout:t,limit:n}=this.state,r=e.id||yu(`toast`);if(e.id){let t=Z.toast(this.state,e.id);if(t){if(t.transitionStatus===`ending`)this.removeToast(e.id,!0);else{let{id:t,transitionStatus:n,...r}=e;return this.updateToastInternal(e.id,r,!0,!0),e.id}}}let i={...e,id:r,updateKey:0,transitionStatus:`starting`},a=[i,...this.state.toasts];this.setToasts(Su(a,n));let o=i.timeout??t;return i.type!==`loading`&&o>0&&this.scheduleTimer(r,o,()=>this.closeToast(r)),Z.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),r};updateToast=(e,t)=>{let n=Z.toast(this.state,e);n&&n.transitionStatus!==`ending`&&this.updateToastInternal(e,typeof t==`function`?t(n):t,!1,!0)};updateToastInternal=(e,t,n=!1,r=!1)=>{let{timeout:i,toasts:a}=this.state,o=Z.toast(this.state,e);if(!o||o.transitionStatus===`ending`)return;let s={...o,...t,...r&&{updateKey:o.updateKey+1}};this.setToasts(a.map(t=>t.id===e?s:t));let c=s.timeout??i,l=o.timeout??i,u=Object.hasOwn(t,`timeout`),d=s.transitionStatus!==`ending`&&s.type!==`loading`&&c>0,f=this.timers.has(e),p=l!==c,m=o.type===`loading`;!d&&f?this.clearTimer(e):d&&(!f||p||u||m||n)&&(this.clearTimer(e),this.scheduleTimer(e,c,()=>this.closeToast(e)),Z.expandedOrOutOfFocus(this.state)&&this.pauseTimers())};closeToast=e=>{let t=e===void 0,{limit:n,toasts:r}=this.state,i;if(t)i=r,this.clearTimers();else{let t=Z.toast(this.state,e);if(!t)return;i=[t],this.clearTimer(e)}let a=Su(r.map(n=>t||n.id===e?{...n,transitionStatus:`ending`,height:0}:n),n);this.setToasts(a,!a.some(e=>e.transitionStatus!==`ending`)),i.forEach(e=>{e.transitionStatus!==`ending`&&e.onClose?.()}),this.handleFocusManagement(e)};promiseToast=(e,t)=>{let n=bu(t.loading),r=this.addToast({...n,type:`loading`}),i=e.then(e=>{let n=bu(t.success,e);return this.updateToast(r,{...n,type:`success`,timeout:n.timeout}),e}).catch(e=>{let n=bu(t.error,e);return this.updateToast(r,{...n,type:`error`,timeout:n.timeout}),Promise.reject(e)});return{}.hasOwnProperty.call(t,`setPromise`)&&t.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{e.timeout&&(e.timeout.clear(),e.remaining=Math.max(e.remaining-(Date.now()-e.start),0))}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,t)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=St.create(),e.timeout.start(e.remaining,()=>{this.handleTimerFired(t),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if(e.pointerType!==`touch`)return;let t=N(e);wt(this.state.viewport,t)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,t,n){let r=Date.now(),i=Z.expandedOrOutOfFocus(this.state)?void 0:St.create();i?.start(t,()=>{this.handleTimerFired(e),n()}),this.timers.set(e,{timeout:i,start:r,delay:t,remaining:t,callback:n})}clearTimers(){this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear(),this.areTimersPaused=!1}clearTimer(e){this.timers.get(e)?.timeout?.clear(),this.timers.delete(e),this.resetPausedStateIfNoTimersRemain()}handleTimerFired(e){this.timers.delete(e),this.resetPausedStateIfNoTimersRemain()}resetPausedStateIfNoTimersRemain(){this.timers.size===0&&(this.areTimersPaused=!1)}setToasts(e,t=e.length===0){let n={toasts:e,toastMetadata:xu(e)};t&&(n.hovering=!1,n.focused=!1),this.update(n)}handleFocusManagement(e){let t=Et(nt(this.state.viewport));if(!this.state.viewport||!wt(this.state.viewport,t)||!Ct(t))return;if(e===void 0){this.restoreFocusToPrevElement();return}let n=Z.toasts(this.state),r=Z.toastIndex(this.state,e),i=(e,t)=>{for(let r=e;r>=0&&r<n.length;r+=t)if(n[r].transitionStatus!==`ending`)return n[r];return null},a=i(r+1,1)??i(r-1,-1);a?a.ref?.current?.focus():this.restoreFocusToPrevElement()}},wu=function(e){let{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,a=pt(()=>new Cu({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return Ze(a.disposeEffect),K.useEffect(function(){if(i)return i[` subscribe`](({action:e,options:t})=>{let n=t.id;e===`promise`&&t.promise?a.promiseToast(t.promise,t):e===`update`&&n?a.updateToast(n,t.updates):e===`close`?a.closeToast(n):a.addToast(t)})},[a,i]),(0,G.jsxs)(gu.Provider,{value:a,children:[(0,G.jsx)(Tu,{store:a,timeout:n,limit:r}),t]})};function Tu(e){let{store:t,timeout:n,limit:r}=e;return _t(()=>{t.syncProviderProps(n,r)},[t,n,r]),null}var Eu=`--toast-frontmost-height`,Du=K.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=_u(),c=et(),l=K.useRef(!1),u=K.useRef(!1),d=K.useRef(!1),f=s.useState(`isEmpty`),p=s.useState(`toasts`),m=s.useState(`focused`),h=s.useState(`expanded`),g=s.useState(`prevFocusElement`),_=p[0]?.height,v=p.some(e=>e.transitionStatus===`ending`),y=p.filter(e=>e.priority===`high`);K.useEffect(()=>{let e=s.state.viewport;if(!e||f)return;let t=vt(e),n=nt(e);function r(t){t.key===`F6`&&N(t)!==e&&(t.preventDefault(),s.set(`prevFocusElement`,Et(n)),e?.focus({preventScroll:!0}),s.pauseTimers(),s.set(`focused`,!0))}function i(e){N(e)===t&&(s.set(`isWindowFocused`,!1),s.pauseTimers())}function a(n){if(n.relatedTarget)return;let r=N(n),i=Et(nt(e));r!==t&&wt(e,r)&&Ct(i)||s.resumeTimers(),c.start(0,()=>s.set(`isWindowFocused`,!0))}return dt(lt(t,`keydown`,r),lt(t,`blur`,i,!0),lt(t,`focus`,a,!0),lt(n,`pointerdown`,s.handleDocumentPointerDown,!0))},[s,c,f]);function ee(e){l.current=!0;let t=e.relatedTarget===s.state.viewport?p.find(e=>e.transitionStatus!==`ending`&&!e.limited):void 0;t?t.ref?.current?.focus():s.restoreFocusToPrevElement()}function te(e){e.key===`Tab`&&e.shiftKey&&N(e.nativeEvent)===s.state.viewport&&(e.preventDefault(),s.restoreFocusToPrevElement())}function ne(){s.state.toasts.some(e=>e.transitionStatus===`ending`)||d.current||!u.current||(s.set(`hovering`,!1),s.select(`expandedOrOutOfFocus`)||s.resumeTimers(),u.current=!1)}K.useEffect(ne,[v,s]);function re(){s.pauseTimers(),s.set(`hovering`,!0),u.current=!1}function ie(){u.current=!0,ne()}function b(e){e.pointerType===`touch`&&(d.current=!0)}function ae(e){e.pointerType===`touch`&&(d.current=!1,ne())}function oe(){l.current?l.current=!1:m||Ct(Et(nt(s.state.viewport)))&&(s.set(`focused`,!0),s.pauseTimers())}function x(e){m&&!wt(s.state.viewport,e.relatedTarget)&&(s.set(`focused`,!1),s.select(`expandedOrOutOfFocus`)||s.resumeTimers())}let se={tabIndex:-1,role:`region`,"aria-live":`polite`,"aria-atomic":!1,"aria-relevant":`additions text`,"aria-label":`Notifications`,onMouseEnter:re,onMouseMove:re,onMouseLeave:ie,onFocus:oe,onBlur:x,onKeyDown:te,onClick:oe,onPointerDown:b,onPointerUp:ae,onPointerCancel:ae,style:{[Eu]:_?`${_}px`:void 0}},S={expanded:h},C=!f&&g&&(0,G.jsx)(tt,{onFocus:ee}),ce=P(`div`,e,{ref:[t,s.setViewport],state:S,props:[se,o,{children:(0,G.jsxs)(K.Fragment,{children:[C,a,C]})}]});return(0,G.jsxs)(K.Fragment,{children:[C,ce,!m&&y.length>0&&(0,G.jsx)(`div`,{style:ut,children:y.map(e=>(0,G.jsxs)(`div`,{role:`alert`,"aria-atomic":!0,children:[(0,G.jsx)(`div`,{children:e.title}),(0,G.jsx)(`div`,{children:e.description})]},e.id))})]})}),Ou=K.createContext(void 0);function ku(){let e=K.useContext(Ou);if(!e)throw Error(bt(66));return e}function Au(e,t,n){switch(e){case`up`:return-n;case`down`:return n;case`left`:return-t;case`right`:return t;default:return 0}}var ju=`--toast-index`,Mu=`--toast-offset-y`,Nu=`--toast-height`,Pu=`--toast-swipe-movement-x`,Fu=`--toast-swipe-movement-y`,Iu=`data-swipe-direction`,Lu=e(n(),1),Ru={...Dt,swipeDirection(e){return e?{[Iu]:e}:null}},zu=40,Bu=10,Vu=.5,Hu=1,Uu=`${yt},${xt}`,Wu=K.forwardRef(function(e,t){let{toast:n,render:r,className:i,swipeDirection:a=[`down`,`right`],style:o,...s}=e,c=n.positionerProps?.anchor!==void 0,l=[];c||(l=Array.isArray(a)?a:[a]);let u=l.length>0,d=_u(),[f,p]=K.useState(void 0),[m,h]=K.useState(!1),[g,_]=K.useState(!1),[v,y]=K.useState({x:0,y:0}),[ee,te]=K.useState({x:0,y:0,scale:1}),[ne,re]=K.useState(),[ie,b]=K.useState(),[ae,oe]=K.useState(null),x=K.useRef(null),se=K.useRef(void 0),S=K.useRef({x:0,y:0}),C=K.useRef({x:0,y:0,scale:1}),ce=K.useRef(void 0),w=K.useRef(0),le=K.useRef(!1),T=K.useRef({x:0,y:0}),ue=K.useRef(!1),de=K.useRef({x:0,y:0}),E=K.useRef(null),fe=K.useRef(null),pe=d.useState(`toastIndex`,n.id),me=d.useState(`toastVisibleIndex`,n.id),D=d.useState(`toastOffsetY`,n.id),he=d.useState(`focused`),ge=d.useState(`expanded`);ot({open:n.transitionStatus!==`ending`,ref:x,onComplete(){n.transitionStatus===`ending`&&d.removeToast(n.id)}});let O=Tt((e=!1)=>{let t=x.current;if(!t)return;let r=t.style.height;t.style.height=`auto`;let i=t.offsetHeight;t.style.height=r;function a(){d.updateToastInternal(n.id,{ref:x,height:i,transitionStatus:void 0})}e?Lu.flushSync(a):a()});_t(()=>{let e=se.current;(n.transitionStatus===`starting`||e!==n.id)&&(e!==void 0&&(p(void 0),te({x:0,y:0,scale:1}),k({x:0,y:0})),se.current=n.id,O())},[O,n.id,n.transitionStatus]);function k(e){de.current=e,y(e)}_t(()=>()=>{fe.current?.abort()},[]);function _e(e,t){let n=e=>e>0?e**Vu:-(Math.abs(e)**Vu),r=e>0&&!l.includes(`right`)||e<0&&!l.includes(`left`),i=t>0&&!l.includes(`down`)||t<0&&!l.includes(`up`);return{x:r?n(e):e,y:i?n(t):t}}let ve=Tt(e=>{if(e.pointerId!==E.current)return;E.current=null,fe.current?.abort(),fe.current=null,h(!1),_(!1),oe(null);let t=C.current;if(e.type===`pointercancel`||le.current){k({x:t.x,y:t.y}),p(void 0);return}let r=de.current,i=r.x-t.x,a=r.y-t.y,o;for(let e of l)if(Au(e,i,a)>zu){o=e;break}o?(p(o),d.closeToast(n.id)):(k({x:t.x,y:t.y}),p(void 0))});function ye(e){if(e.button!==0)return;e.pointerType===`touch`&&d.pauseTimers();let t=N(e.nativeEvent);if(mt(t,`button,a,input,textarea,[role="button"],${Uu}`))return;le.current=!1,ce.current=void 0,w.current=0,E.current=e.pointerId,S.current={x:e.clientX,y:e.clientY},T.current=S.current;let n=e.currentTarget,r=Zl(n);C.current=r,te(r),k({x:r.x,y:r.y}),d.set(`hovering`,!0),h(!0),_(!1),oe(null),ue.current=!0,fe.current?.abort();let i=new AbortController;fe.current=i;let a=nt(n);a.addEventListener(`pointerup`,ve,{signal:i.signal}),a.addEventListener(`pointercancel`,ve,{signal:i.signal}),n.setPointerCapture?.(e.pointerId)}function be(e){if(e.pointerId!==E.current)return;e.preventDefault(),ue.current&&=(S.current={x:e.clientX,y:e.clientY},!1);let{clientY:t,clientX:n,movementX:r,movementY:i}=e;(i<0&&t>T.current.y||i>0&&t<T.current.y)&&(T.current={x:T.current.x,y:t}),(r<0&&n>T.current.x||r>0&&n<T.current.x)&&(T.current={x:n,y:T.current.y});let a=n-S.current.x,o=t-S.current.y,s=t-T.current.y,c=n-T.current.x,u=ae;if(!g&&Math.sqrt(a*a+o*o)>=Hu){_(!0);let e=l.includes(`left`)||l.includes(`right`),t=l.includes(`up`)||l.includes(`down`);e&&t&&(u=Math.abs(a)>Math.abs(o)?`horizontal`:`vertical`,oe(u))}let d;if(!ce.current)u===`vertical`?o>0?d=`down`:o<0&&(d=`up`):u===`horizontal`?a>0?d=`right`:a<0&&(d=`left`):d=Math.abs(a)>=Math.abs(o)?a>0?`right`:`left`:o>0?`down`:`up`,d&&l.includes(d)&&(ce.current=d,w.current=Au(d,a,o),p(d));else{let e=ce.current,t=Au(e,c,s);t>zu?(le.current=!1,p(e)):!(l.includes(`left`)&&l.includes(`right`))&&!(l.includes(`up`)&&l.includes(`down`))&&w.current-t>=Bu&&(le.current=!0)}let f=_e(a,o),m=C.current.x,h=C.current.y,v=l.includes(`left`)||l.includes(`right`),y=l.includes(`up`)||l.includes(`down`);u!==`vertical`&&v&&(m+=f.x),u!==`horizontal`&&y&&(h+=f.y),k({x:m,y:h})}function xe(e){if(e.key===`Escape`){if(!x.current||!wt(x.current,Et(nt(x.current))))return;d.closeToast(n.id)}}K.useEffect(()=>{let e=x.current;if(!u||!e)return;function t(t){E.current!==null&&wt(e,N(t))&&t.preventDefault()}return lt(e,`touchmove`,t,{passive:!1})},[u]);function Se(){let e=v.x-ee.x,t=v.y-ee.y;return{transition:m?`none`:void 0,transform:m?`translateX(${v.x}px) translateY(${v.y}px) scale(${ee.scale})`:void 0,[Pu]:`${e}px`,[Fu]:`${t}px`}}let A=n.priority===`high`,Ce={role:A?`alertdialog`:`dialog`,tabIndex:0,"aria-modal":!1,"aria-labelledby":ne,"aria-describedby":ie,"aria-hidden":A&&!he?!0:void 0,onPointerDown:u?ye:void 0,onPointerMove:u?be:void 0,onPointerUp:u?ve:void 0,onPointerCancel:u?ve:void 0,onKeyDown:xe,inert:Xe(n.limited),style:{...Se(),[ju]:n.transitionStatus===`ending`?pe:me,[Mu]:`${D}px`,[Nu]:n.height?`${n.height}px`:void 0}},we=K.useMemo(()=>({toast:n,setTitleId:re,setDescriptionId:b,recalculateHeight:O,visibleIndex:me,expanded:ge}),[n,re,b,O,me,ge]),Te={transitionStatus:n.transitionStatus,expanded:ge,limited:n.limited||!1,type:n.type,swiping:m,swipeDirection:f},Ee=P(`div`,e,{ref:[t,x],state:Te,stateAttributesMapping:Ru,props:[Ce,s]});return(0,G.jsx)(Ou.Provider,{value:we,children:Ee})}),Gu=K.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{visibleIndex:o,expanded:s,recalculateHeight:c}=ku(),l=K.useRef(null);return _t(()=>{c();let e=l.current;if(!e||typeof ResizeObserver!=`function`||typeof MutationObserver!=`function`)return;let t=new ResizeObserver(()=>c(!0)),n=new MutationObserver(()=>c(!0));return t.observe(e),n.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{t.disconnect(),n.disconnect()}},[c]),P(`div`,e,{ref:[t,l],state:{expanded:s,behind:o>0},props:a})});function Ku(e){return e==null||typeof e==`boolean`||e===``?!1:!Array.isArray(e)||e.some(Ku)}function qu(e){return K.isValidElement(e)&&Ku(e.props.children)}function Ju(e,t,n){let{toast:r,setTitleId:i,setDescriptionId:a}=ku(),o=n===`title`?i:a,s=t??(n===`title`?r.title:r.description);return{id:ft(e),children:s,type:r.type,setId:o}}function Yu(e,t,n){let r=qu(e);return _t(()=>{if(r)return n(t),()=>{n(e=>e===t?void 0:e)}},[r,t,n]),r?e:null}var Xu=K.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{id:c,children:l,type:u,setId:d}=Ju(a,o,`description`);return Yu(P(`p`,e,{ref:t,state:{type:u},props:{...s,id:c,children:l}}),c,d)}),Zu=K.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{id:c,children:l,type:u,setId:d}=Ju(a,o,`title`);return Yu(P(`h2`,e,{ref:t,state:{type:u},props:{...s,id:c,children:l}}),c,d)}),Qu=K.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,c=_u(),{toast:l,expanded:u}=ku(),[d,f]=K.useState(!1),{getButtonProps:p,buttonRef:m}=ct({disabled:a,native:o}),h={type:l.type};return P(`button`,e,{ref:[t,m],state:h,props:[{"aria-hidden":!u&&!d,onClick(){c.closeToast(l.id)},onFocus(){f(!0)},onBlur(){f(!1)}},s,p]})}),$u=K.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,{toast:c}=ku(),l=c.actionProps?.children??s.children,{getButtonProps:u,buttonRef:d}=ct({disabled:a,native:o}),f={type:c.type},p=P(`button`,e,{ref:[t,d],state:f,props:[s,c.actionProps,u,{children:l}]});return qu(p)?p:null}),ed=K.forwardRef(function(e,t){return(0,G.jsx)(Te,{ref:t,...e})});function td(){let e=_u(),t=e.useState(`toasts`);return K.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function nd(){let e=new Set;function t(t){e.forEach(e=>e(t))}return{" subscribe":function(t){return e.add(t),()=>{e.delete(t)}},add(e){let n=e.id||yu(`toast`);return t({action:`add`,options:{...e,id:n,transitionStatus:`starting`}}),n},close(e){t({action:`close`,options:{id:e}})},update(e,n){t({action:`update`,options:{id:e,updates:n}})},promise(e,n){let r=e;return t({action:`promise`,options:{...n,promise:e,setPromise(e){r=e}}}),r}}}var rd={default:he,error:ja,info:he,loading:$e,success:ka,warning:b},id={default:O.colorText,error:O.colorError,info:O.colorInfo,loading:O.colorPrimary,success:O.colorSuccess,warning:O.colorWarning},ad=(0,K.memo)(({toast:e,classNames:t,styles:n})=>{let{position:r,swipeDirection:i}=$l(),a=e.data,o=a?.type??`default`,s=a?.closable??!0,c=a?.hideCloseButton??!1,l=s&&!c,u=a?.icon,d=e.title??a?.title,f=e.description??a?.description,p=e.actionProps??a?.actionProps,m=a?.actions,h=id[o],g=u??rd[o],_=o===`loading`,v=()=>g?(0,G.jsx)(`div`,{...M(X.icon,F(Y(`icon`),t?.icon),n?.icon),children:(0,G.jsx)(rt,{color:h,icon:g,size:18,spin:_})}):null,y=()=>m&&m.length>0?(0,G.jsx)(`div`,{...M(X.actions,F(Y(`actions`),t?.actions),n?.actions),children:m.map((e,r)=>(0,G.jsx)($u,{...M([X.action,it.info,hu[e.variant??`primary`]],F(Y(`action`),t?.action),n?.action),onClick:e.onClick,...e.props,children:e.label},r))}):p?(0,G.jsx)($u,{...M([X.action,it.info,X.actionPrimary],F(Y(`action`),t?.action),n?.action),...p}):null;return(0,G.jsx)(Wu,{swipeDirection:i,toast:e,...kt({position:r,type:o}),...M([X.root,mu[r]],F(Y(),t?.root),{...n?.root,...a?.style}),children:(0,G.jsx)(Gu,{...M(X.content,F(Y(`content`),t?.content),n?.content),children:(0,G.jsxs)(`div`,{...M(X.toastBody,Y(`body`)),children:[v(),(0,G.jsxs)(`div`,{...M(X.contentArea,Y(`main`)),children:[d?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{...M(X.titleRow,Y(`title-row`)),children:[(0,G.jsx)(Zu,{...M(X.title,F(Y(`title`),t?.title),n?.title),children:d}),l&&(0,G.jsx)(Qu,{"aria-label":`Close`,...M(X.close,F(Y(`close`),t?.close),n?.close),children:(0,G.jsx)(st,{size:14})})]}),f&&(0,G.jsx)(Xu,{...M([X.description,X.descriptionWithTitle],F(Y(`description`),t?.description),n?.description),children:f})]}):f&&(0,G.jsxs)(`div`,{...M(X.titleRow,Y(`title-row`)),children:[(0,G.jsx)(Xu,{...M([X.description,X.descriptionStandalone],F(Y(`description`),t?.description),n?.description),children:f}),l&&(0,G.jsx)(Qu,{"aria-label":`Close`,...M(X.close,F(Y(`close`),t?.close),n?.close),children:(0,G.jsx)(st,{size:14})})]}),y()]})]})})})});ad.displayName=`ToastItem`;var od=[`top`,`top-left`,`top-right`,`bottom`,`bottom-left`,`bottom-right`],sd={duration:5e3,limit:5,position:`bottom-right`,swipeDirection:[`down`,`right`]},cd={bottom:nd(),"bottom-left":nd(),"bottom-right":nd(),top:nd(),"top-left":nd(),"top-right":nd()},Q={bottom:new Map,"bottom-left":new Map,"bottom-right":new Map,top:new Map,"top-left":new Map,"top-right":new Map},ld=e=>cd[e],ud=0,dd=()=>`toast-${Date.now().toString(36)}-${(ud++).toString(36)}`,fd=e=>od.find(t=>Q[t].has(e)),pd=(e,t)=>Array.from(Q[e].keys()).at(-1)===t,md=(e,t)=>typeof e==`string`?{description:e,type:t}:{...e,type:t},hd=(e,t)=>({close:()=>uu(()=>ld(t).close(e)),id:e,update:n=>{uu(()=>ld(t).update(e,{data:n,description:n.description,title:n.title}))}}),$=e=>{let t=e.placement??sd.position,n=ld(t),{id:r,onClose:i,onRemove:a}=e;if(r){let e=fd(r);e&&!(e===t&&pd(t,r))&&(Q[e].get(r).superseded=!0,Q[e].delete(r),uu(()=>ld(e).close(r)))}let o=r??dd(),s={superseded:!1};return Q[t].set(o,s),uu(()=>{n.add({id:o,data:e,description:e.description,onClose:()=>{s.superseded||i?.()},onRemove:()=>{s.superseded||(Q[t].delete(o),a?.())},timeout:e.duration??sd.duration,title:e.title})}),hd(o,t)},gd=e=>{if(e)for(let[t,n]of Object.entries(cd))Q[t].delete(e),uu(()=>n.close(e));else for(let[e,t]of Object.entries(cd)){let n=Array.from(Q[e].keys());Q[e].clear(),uu(()=>{for(let e of n)t.close(e)})}},_d=e=>$(md(e,`success`)),vd=e=>$(md(e,`error`)),yd=e=>$(md(e,`info`)),bd=e=>$(md(e,`warning`)),xd=e=>$({duration:0,...md(e,`loading`)});async function Sd(e,t){let n=$({closable:!1,duration:0,type:`loading`,...typeof t.loading==`string`?{description:t.loading}:t.loading});try{let r=await e;return n.close(),$({type:`success`,...typeof t.success==`string`?{description:t.success}:typeof t.success==`function`?{description:t.success(r)}:t.success}),r}catch(e){throw n.close(),$({type:`error`,...typeof t.error==`string`?{description:t.error}:typeof t.error==`function`?{description:t.error(e)}:t.error}),e}}var Cd=Object.assign(e=>$({type:`default`,...e}),{dismiss:gd,error:vd,info:yd,loading:xd,promise:Sd,success:_d,warning:bd}),wd=(0,K.memo)(()=>{let{toasts:e}=td();return e.map(e=>(0,G.jsx)(ad,{toast:e},e.id))});wd.displayName=`ToastList`;var Td=(0,K.memo)(({root:e,className:t,duration:n=5e3,limit:r=5,position:i=`bottom-right`,swipeDirection:a=[`down`,`right`]})=>{let o=Oe(),s=at(),[c,l]=(0,K.useState)(void 0),u=(0,K.useId)();(0,K.useEffect)(()=>ru(u),[u]);let d=(0,K.useSyncExternalStore)(au,()=>iu(u),()=>!1);if((0,K.useEffect)(()=>{d&&(sd={duration:n,limit:r,position:i,swipeDirection:a})},[n,r,i,a,d]),(0,K.useEffect)(()=>{d&&l(ht(`toast`))},[d]),(0,K.useEffect)(()=>{if(d&&o)return du(),()=>{fu()}},[d,o]),!o||!d)return null;let f=e??s??document.body;return od.map(e=>(0,G.jsx)(Ql,{value:{position:e,swipeDirection:a},children:(0,G.jsx)(wu,{limit:r,timeout:n,toastManager:ld(e),children:(0,G.jsx)(ed,{container:f,children:(0,G.jsx)(Du,{"data-position":e,...M([X.viewport,pu[e]],F(Y(`viewport`),t),c===void 0?void 0:{zIndex:c}),children:(0,G.jsx)(wd,{})})})})},e))});Td.displayName=`ToastHost`;var Ed=t({a:()=>na,abbr:()=>Ni,address:()=>Ji,animate:()=>hi,area:()=>Br,article:()=>Li,aside:()=>Qi,audio:()=>Jr,b:()=>Ti,base:()=>oa,bdi:()=>Qr,bdo:()=>ai,big:()=>Vi,blockquote:()=>ki,body:()=>fi,button:()=>li,canvas:()=>Lr,caption:()=>ua,circle:()=>xa,cite:()=>Wr,clipPath:()=>va,code:()=>dr,col:()=>gn,colgroup:()=>ma,create:()=>Xi,data:()=>hr,datalist:()=>Cn,dd:()=>bn,defs:()=>$n,del:()=>Si,desc:()=>un,details:()=>yi,dfn:()=>qn,dialog:()=>Xn,div:()=>nr,dl:()=>En,dt:()=>Fn,ellipse:()=>Wn,em:()=>cr,embed:()=>Ta,feBlend:()=>pn,feColorMatrix:()=>Sr,feComponentTransfer:()=>Mn,feComposite:()=>yr,feConvolveMatrix:()=>Tr,feDiffuseLighting:()=>kn,feDisplacementMap:()=>Vn,feDistantLight:()=>Gi,feDropShadow:()=>Rn,feFlood:()=>jr,feFuncA:()=>Or,feFuncB:()=>Pr,feFuncG:()=>ar,feFuncR:()=>sn,feGaussianBlur:()=>ii,feImage:()=>aa,feMerge:()=>Ii,feMergeNode:()=>Zi,feMorphology:()=>vi,feOffset:()=>Ur,fePointLight:()=>Bi,feSpecularLighting:()=>ta,feSpotLight:()=>Zr,feTile:()=>Oi,feTurbulence:()=>la,fieldset:()=>ti,figcaption:()=>ci,figure:()=>Wi,filter:()=>Mi,footer:()=>mi,foreignObject:()=>di,form:()=>zr,g:()=>pa,h1:()=>wa,h2:()=>qr,h3:()=>ba,h4:()=>mr,h5:()=>yn,h6:()=>_a,head:()=>vr,header:()=>Tn,hgroup:()=>Sn,hr:()=>tr,html:()=>wi,i:()=>fn,iframe:()=>xi,image:()=>Yn,img:()=>Qn,input:()=>ir,ins:()=>On,kbd:()=>Ln,keygen:()=>Kn,label:()=>ur,legend:()=>Da,li:()=>hn,line:()=>wr,linearGradient:()=>Pn,link:()=>xr,main:()=>Dr,map:()=>jn,mark:()=>Un,marker:()=>qi,mask:()=>Bn,menu:()=>Nr,menuitem:()=>Ar,metadata:()=>Ir,meter:()=>sr,nav:()=>ln,object:()=>ni,ol:()=>ra,optgroup:()=>Pi,option:()=>Yi,output:()=>gi,p:()=>Vr,param:()=>Ri,path:()=>$i,pattern:()=>Yr,picture:()=>Ei,polygon:()=>sa,polyline:()=>$r,pre:()=>oi,progress:()=>Hi,q:()=>Ai,radialGradient:()=>pi,rect:()=>ui,rp:()=>Rr,rt:()=>da,ruby:()=>Sa,s:()=>Gr,samp:()=>ya,script:()=>fr,section:()=>_n,select:()=>ha,small:()=>gr,source:()=>wn,span:()=>xn,stop:()=>er,strong:()=>Ci,style:()=>dn,sub:()=>bi,summary:()=>Jn,sup:()=>Zn,svg:()=>rr,symbol:()=>Dn,table:()=>In,tbody:()=>Gn,td:()=>lr,text:()=>Ea,textPath:()=>mn,textarea:()=>Cr,tfoot:()=>Nn,th:()=>br,thead:()=>Er,time:()=>An,title:()=>Hn,tr:()=>Ki,track:()=>zn,tspan:()=>Mr,u:()=>kr,ul:()=>Fr,use:()=>or,video:()=>cn,view:()=>ri,wbr:()=>ia,webview:()=>Fi}),Dd=i();function Od(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var n,r,i,a,o=[],s=``,c=e.split(`/`);for(c[0]||c.shift();i=c.shift();)n=i[0],n===`*`?(o.push(n),s+=i[1]===`?`?`(?:/(.*))?`:`/(.*)`):n===`:`?(r=i.indexOf(`?`,1),a=i.indexOf(`.`,1),o.push(i.substring(1,~r?r:~a?a:i.length)),s+=~r&&!~a?`(?:/([^/]+?))?`:`/([^/]+?)`,~a&&(s+=(~r?`?`:``)+`\\`+i.substring(a))):s+=`/`+i;return{keys:o,pattern:RegExp(`^`+s+(t?`(?=$|/)`:`/?$`),`i`)}}var kd=r(),Ad=K.useInsertionEffect,jd=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0?K.useLayoutEffect:K.useEffect,Md=Ad||jd,Nd=e=>{let t=K.useRef([e,(...e)=>t[0](...e)]).current;return Md(()=>{t[0]=e}),t[1]},Pd=[`popstate`,`pushState`,`replaceState`,`hashchange`],Fd=[],Id=()=>Fd.forEach(e=>e()),Ld=e=>(Fd.push(e)===1&&Pd.forEach(e=>addEventListener(e,Id)),()=>{Fd=Fd.filter(t=>t!==e),Fd.length||Pd.forEach(e=>removeEventListener(e,Id))}),Rd=(e,t)=>(0,kd.useSyncExternalStore)(Ld,e,t),zd=()=>location.search,Bd=({ssrSearch:e}={})=>Rd(zd,e==null?zd:()=>e),Vd=()=>location.pathname,Hd=({ssrPath:e}={})=>Rd(Vd,e==null?Vd:()=>e),Ud=(e,{replace:t=!1,state:n=null}={})=>history[t?`replaceState`:`pushState`](n,``,e),Wd=e=>[Hd(e),Ud],Gd=Symbol.for(`wouter_v3`);if(typeof history<`u`&&window[Gd]===void 0){for(let e of[`pushState`,`replaceState`]){let t=history[e];history[e]=function(){let n=t.apply(this,arguments),r=new Event(e);return r.arguments=arguments,dispatchEvent(r),n}}Object.defineProperty(window,Gd,{value:!0})}var Kd=(e=``)=>e===`/`?``:e,qd=(e,t)=>e[0]===`~`?e.slice(1):Kd(t)+e,Jd=(e,t)=>(e=Yd(Kd(e)),t=Yd(t),!e||(t.toLowerCase()+`/`).startsWith(e.toLowerCase()+`/`)?t.slice(e.length)||`/`:`~`+t),Yd=e=>{try{return e.includes(`%`)?decodeURI(e):e}catch{return e}},Xd={hook:Wd,searchHook:Bd,parser:Od,base:``,ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:e=>e,aroundNav:(e,t,n)=>e(t,n)},Zd=(0,K.createContext)(Xd),Qd=()=>(0,K.useContext)(Zd);(0,K.createContext)({});var $d=e=>{let[t,n]=e.hook(e);return[Jd(e.base,t),Nd((t,r)=>e.aroundNav(n,qd(t,e.base),r))]},ef=()=>$d(Qd());(0,K.forwardRef)((e,t)=>{let n=Qd(),[r,i]=$d(n),{to:a=``,href:o=a,onClick:s,asChild:c,children:l,className:u,replace:d,state:f,transition:p,...m}=e;return m.onClick=Nd(t=>{t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||t.button!==0||(s?.(t),t.defaultPrevented||(t.preventDefault(),i(o,e)))}),m.href=n.hrefs(o[0]===`~`?o.slice(1):n.base+o,n),u!==void 0&&(m.className=u?.call?u(r===o):u),t&&(m.ref=t),c&&(0,K.isValidElement)(l)?(0,K.cloneElement)(l,m):(0,K.createElement)(`a`,m,l)});var tf=new Set;function nf(e){return tf.add(e),()=>{tf.delete(e)}}function rf(e){for(let t of tf)t(e)}function af(e){return`${e.protocol===`https:`?`wss`:`ws`}://${e.host}/ws?at=${encodeURIComponent(e.pathname)}`}function of(e,t){let[n,r]=(0,K.useState)(!1),i=(0,K.useRef)({onMessage:e,onOpen:t}),a=(0,K.useRef)(null),o=(0,K.useRef)([]);return i.current={onMessage:e,onOpen:t},(0,K.useEffect)(()=>{let e=null,t,n=!1,s=()=>{e=new WebSocket(af(location)),a.current=e,e.onopen=()=>{r(!0);for(let t of o.current.splice(0))e?.send(t);i.current.onOpen?.()},e.onclose=()=>{r(!1),n||(t=setTimeout(s,1e3))},e.onmessage=e=>{let t=JSON.parse(String(e.data));i.current.onMessage(t),rf(t)}};return s(),()=>{n=!0,clearTimeout(t),e?.close()}},[]),{live:n,send:(0,K.useCallback)(e=>{let t=a.current,n=JSON.stringify(e);t?.readyState===WebSocket.OPEN?t.send(n):o.current.length<50&&o.current.push(n)},[])}}function sf(){let[e,t]=(0,K.useState)([]);return(0,K.useEffect)(()=>{let e=null,n,r=!1,i=()=>{e=new WebSocket(af(location)),e.onmessage=e=>{let n=JSON.parse(String(e.data));n.type===`agent-status`&&t(n.sessions)},e.onclose=()=>{t([]),r||(n=setTimeout(i,1e3))}};return i(),()=>{r=!0,clearTimeout(n),e?.close()}},[]),e}var cf=(0,K.lazy)(()=>f(async()=>{let{AgentStatusPill:e}=await import(`./AgentStatusPill-DdylWGRv.js`);return{AgentStatusPill:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]),import.meta.url).then(({AgentStatusPill:e})=>({default:e})));function lf({artifact:e}){let t=sf();return t.length===0?null:(0,G.jsx)(K.Suspense,{fallback:null,children:(0,G.jsx)(cf,{artifact:e,sessions:t})})}var uf=0,df=0,ff=new Set;function pf(){df||uf>0||ff.size===0||(df=requestAnimationFrame(()=>{if(df=0,uf>0)return;let e=[...ff];ff.clear();for(let t of e)t()}))}function mf(){return uf+=1,()=>{--uf,pf()}}function hf({label:e}){return(0,K.useEffect)(mf,[]),(0,G.jsx)(a,{stack:!0,label:e,size:32})}var gf=1e3,_f=`ryugi:embed:hello`,vf=`ryugi:embed:heartbeat`,yf=`ryugi:embed:painted`,bf=`ryugi:embed:position`,xf=`ryugi:embed:positioned`;function Sf({parentOrigin:e,onPosition:t,win:n=window}){let r=(t,r)=>n.parent.postMessage({type:t,...r},e),i=i=>{if(i.origin!==e||i.source!==n.parent)return;let a=i.data;a?.type===bf&&a.anchor&&t&&t(a.anchor).then(()=>r(xf))};n.addEventListener(`message`,i),r(_f,t?{position:!0}:void 0);let a=setInterval(()=>r(vf),gf),o=!1;return{painted(){o||(o=!0,r(yf))},close(){clearInterval(a),n.removeEventListener(`message`,i)}}}function Cf(e=document,t=window,n){let r=e.documentElement.dataset.ryugiEmbedParent;return r?Sf({parentOrigin:r,onPosition:n,win:t}):null}var wf=()=>new Promise(e=>requestAnimationFrame(()=>requestAnimationFrame(()=>e()))),Tf=e=>(Le(e),wf()),Ef=(0,K.createContext)(()=>{});function Df(){let e=(0,K.useRef)(null),t=(0,K.useRef)(!1);return(0,K.useEffect)(()=>{let n=Cf(document,window,Tf);return e.current=n,t.current&&n?.painted(),()=>{n?.close(),e.current=null}},[]),(0,K.useCallback)(()=>{t.current=!0,e.current?.painted()},[])}function Of(e){let t=(0,K.useContext)(Ef);(0,K.useEffect)(()=>{if(!e)return;let n=0,r=requestAnimationFrame(()=>{n=requestAnimationFrame(()=>{t(),He()&&Ae({kind:`painted`})})});return()=>{cancelAnimationFrame(r),cancelAnimationFrame(n)}},[e,t])}var kf=(0,K.lazy)(()=>f(async()=>{let{AutoPublishBar:e}=await import(`./AutoPublishPrompt-vxlYFZUC.js`);return{AutoPublishBar:e}},__vite__mapDeps([19,1,2,3,4,5,6,7,20,14,8,21,22]),import.meta.url).then(({AutoPublishBar:e})=>({default:e}))),Af=(0,K.lazy)(()=>f(async()=>{let{SettingsDialog:e}=await import(`./SettingsDialog-5Ijnmcks.js`);return{SettingsDialog:e}},__vite__mapDeps([23,1,2,3,4,5,6,7,24,25,14,26,27,28,29,10,30,31,32,8,21,22,33,34]),import.meta.url).then(({SettingsDialog:e})=>({default:e}))),jf=(0,K.lazy)(()=>f(async()=>{let{ArtboardLayout:e}=await import(`./ArtboardLayout-LjqEYnU4.js`);return{ArtboardLayout:e}},__vite__mapDeps([35,1,2,3,4,5,6,7,24,25,14,26,36,37,38,8,9,10,39,40,41,42,32,13,43,28,44,45,46,47,31,34,48,49,50,20,51,21,22,52,53,54,55,27,56,57,58,59,60,12,30,15,16,18,61,62,63,64,65]),import.meta.url).then(({ArtboardLayout:e})=>({default:e}))),Mf=(0,K.lazy)(()=>f(async()=>{let{ArtifactList:e}=await import(`./ArtifactList-C4VguTYP.js`);return{ArtifactList:e}},__vite__mapDeps([66,1,2,3,4,5,6,7,24,25,14,26,40,41,37,42,32,13,43,10,28,67,38,54,68,46,47,31,29,30,8,21,22,69,34,62,39]),import.meta.url).then(({ArtifactList:e})=>({default:e}))),Nf=(0,K.lazy)(()=>f(async()=>{let{DocumentLayout:e}=await import(`./DocumentLayout-BFuBCe1z.js`);return{DocumentLayout:e}},__vite__mapDeps([70,1,2,3,4,5,6,7]),import.meta.url).then(({DocumentLayout:e})=>({default:e}))),Pf=(0,K.lazy)(()=>f(async()=>{let{HtmlLayout:e}=await import(`./HtmlLayout-CylXOB7G.js`);return{HtmlLayout:e}},__vite__mapDeps([71,1,3,4,50,2,5,6,7,24,25,14,26,40,41,37,42,32,13,43,10,28,48,20,51,8,21,22,52,34,69,61,62,72,64]),import.meta.url).then(({HtmlLayout:e})=>({default:e}))),Ff=(0,K.lazy)(()=>f(async()=>{let{VerifyLayout:e}=await import(`./VerifyLayout-CDNbksiX.js`);return{VerifyLayout:e}},__vite__mapDeps([73,1,2,3,4,5,6,7,24,25,14,26,36,37,38,8,9,10,39,74,41,42,32,13,43,48,49,75,53,55,27,76,68,47,31,77,78,79,80,81,82,83,84,85,16,15,72,86,87,34,50,40,28,20,51,21,22,52,57,88,89]),import.meta.url).then(({VerifyLayout:e})=>({default:e}))),If=(0,K.lazy)(()=>f(async()=>{let{WhiteboardLayout:e}=await import(`./WhiteboardLayout-FAO1qkk_.js`);return{WhiteboardLayout:e}},__vite__mapDeps([90,1,2,3,4,5,6,7,24,25,14,26,41,37,13,45,46,47,31,34,49,76,60,8,9,10,12,22,18,59,33,52,91,92,93]),import.meta.url).then(({WhiteboardLayout:e})=>({default:e}))),Lf=(0,K.lazy)(()=>Promise.all([f(()=>import(`./SplitShell-DDxrJzzq.js`),__vite__mapDeps([94,1,2,3,4,5,6,7,24,25,14,26,37,44,43,75,53,95,46,47,31,86,34,8,15,18,62,88,96]),import.meta.url),f(()=>import(`./local-split-host-DlzWe0xb.js`),__vite__mapDeps([97,22,2,1,3,4,5,6,7,86,24,25,14,26]),import.meta.url)]).then(([{SplitShell:e},{localSplitHost:t}])=>({default:n=>(0,G.jsx)(e,{...n,host:t})}))),Rf=(0,K.lazy)(()=>f(async()=>{let{PreviewLayout:e}=await import(`./PreviewLayout-Bx_Yf3rn.js`).then(e=>e.n);return{PreviewLayout:e}},__vite__mapDeps([98,1,2,3,4,5,6,7,8,22,58]),import.meta.url).then(({PreviewLayout:e})=>({default:e}))),zf=(e,t)=>(0,G.jsxs)(G.Fragment,{children:[e,(0,G.jsx)(kf,{}),(0,G.jsx)(Af,{}),t&&(0,G.jsx)(lf,{artifact:t})]});function Bf({id:e,type:t}){let n=Df();return(0,G.jsx)(Ef,{value:n,children:t===`whiteboard`?(0,G.jsx)(If,{id:e}):t===`document`?(0,G.jsx)(Nf,{id:e}):t===`verify`?(0,G.jsx)(Ff,{id:e}):(0,G.jsx)(jf,{id:e})})}function Vf(){let[e]=ef(),t=l(e);if((0,K.useEffect)(()=>{if(!document.documentElement.dataset.ryugiArtifactId)return;let e=document.querySelector(`link[rel="canonical"]`);if(!e)return;let t=new URL(location.href);t.pathname=u(t.pathname,new URL(e.href).pathname),t.href!==location.href&&history.replaceState(history.state,``,t)},[]),(0,K.useEffect)(()=>{window.scrollTo(0,0)},[e]),t.kind===`list`)return zf((0,G.jsx)(Mf,{}));if(t.kind===`unknown`)return(0,G.jsx)(`div`,{className:`x78zum5 x6s0dn4 xl56j7k x5yr21d xggk2y7 x1bo0w0s xqfszdh xif65rj`,children:`No artifact lives at this address.`});let n=document.documentElement.dataset.ryugiArtifactId??t.id;return t.kind===`preview`?(0,G.jsx)(Rf,{id:n,type:t.type}):t.kind===`embed`?(0,G.jsx)(Bf,{id:n,type:t.type}):t.type===`html`?zf((0,G.jsx)(Pf,{id:n}),`html/${n}`):zf((0,G.jsx)(Lf,{id:n,split:Ve(t,location.search)?.split??null,type:t.type}),`${t.type}/${n}`)}function Hf(){return(0,G.jsx)(K.Suspense,{fallback:(0,G.jsx)(`div`,{className:`x78zum5 x6s0dn4 xl56j7k x5yr21d xggk2y7 x1bo0w0s xqfszdh xif65rj`,children:(0,G.jsx)(hf,{label:o(`common.loading`)})}),children:(0,G.jsx)(Vf,{})})}document.documentElement.lang=s[d.language];function Uf(){return c(),(0,G.jsx)(yc,{features:Cl,children:(0,G.jsxs)(C,{enableCustomFonts:!1,motion:Ed,children:[(0,G.jsx)(Hf,{}),(0,G.jsx)(qe,{}),(0,G.jsx)(Td,{}),(0,G.jsx)(Xl,{})]})})}(0,Dd.createRoot)(document.getElementById(`root`)).render((0,G.jsx)(K.StrictMode,{children:(0,G.jsx)(Uf,{})}));export{Cd as a,Ml as c,Al as d,wl as f,of as i,jl as l,hf as n,Zl as o,ja as p,nf as r,J as s,Of as t,Rl as u};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./AgentStatusPill-DdylWGRv.js","./rolldown-runtime-COiEfhsA.js","./route-TTi4dCVS.js","./react-B8SKf8RM.js","./jsx-runtime-DePvh3-m.js","./clsx-DRUh9g2d.js","./types-CaERrcmq.js","./index2.css","./useTranslation-Z5NjlGZP.js","./agentLook-CEVQF2aK.js","./Center-3zaroQ67.js","./PhoneSheet-CLpIn7DT.js","./Avatar-Bwe0zr2l.js","./arrow-up-DCvct17l.js","./MotionConfigContext-ClRb4nZj.js","./motion-Cy65kd7X.js","./BottomSheet-C7DV0Jsl.js","./anchor-Byo3PL5Y.js","./useMedia-B_wouzHa.js","./AutoPublishPrompt-vxlYFZUC.js","./cloud-upload-D5VRxGMB.js","./useCloudStatus-xytr4u1h.js","./page-api-C-rs_9hw.js","./SettingsDialog-5Ijnmcks.js","./split-url-C9-EsUey.js","./useScrollLock-C0UBr8yH.js","./isObjectLike-DnuJWahO.js","./maximize-2-BIFXhjSM.js","./settings-dialog-DcUSfYHj.js","./Avatar-DyFRt4SZ.js","./Segmented-C4lwEicS.js","./CompositeItem-AtsFyrMV.js","./isElementDisabled-KSuuBj8D.js","./font-preference-CHZ9OnPd.js","./index4.css","./ArtboardLayout-C8odRO5-.js","./GroupVerdict-CJZXlzi9.js","./useTriggerFocusGuards-CZm917os.js","./FieldControl-Db_L0_Ja.js","./artifact-list-DVqz_5eT.js","./Select-BCKm490e.js","./Popover-DXebLNrC.js","./SelectScrollUpArrow-DIuCqrNk.js","./chevron-up-BmcYlrhx.js","./chevron-left-Cedt0go5.js","./PhoneArtboardBar-snghzshu.js","./DropdownMenu-faucDG5a.js","./MenuTrigger-BbHkbqUO.js","./minus-DFwlVdXQ.js","./type-BaA1Wn-r.js","./PublishMenu-BdvBhGrR.js","./elements-C05FRxzL.js","./usePageQuery-BLapKgc-.js","./file-text-D_oZKRaU.js","./Input-gvOSf3mb.js","./verdicts-DsDoB0AI.js","./Canvas-Lvx_4l7N.js","./cssVar.stylex-CGbpAC1Y.js","./view-_lCPxrgM.js","./WritingCursor-BKNMlRGq.js","./ThreadView-DfXzZ6Ox.js","./useTypeFavicon-BewmIMVb.js","./type-icons-BlFfxMHh.js","./selection-BAxwrRDD.js","./useArtifactFeed-DLjgeJDX.js","./ArtboardLayout-DLyi-yDq.css","./ArtifactList-C4VguTYP.js","./arrow-up-right-DHjiOpFm.js","./search-B262MOpE.js","./WarningsBadge-CRtBthqV.js","./DocumentLayout-Bv6Ni6pv.js","./HtmlLayout-CylXOB7G.js","./useSandboxFrame-D8TinZsv.js","./VerifyLayout-CDNbksiX.js","./DocumentEditor-DzpX07qj.js","./pen-tool-BHe7XHmt.js","./lib-Bz2MLJKt.js","./linear-BRPZ2Cwd.js","./html-BYfTdFQ4.js","./defaultLocale-BFoDCU3G.js","./init-C-OQMol4.js","./band-D-Cum8PO.js","./ordinal-BDEzSJ7C.js","./year--3Z3GYyB.js","./arc-CNPCFOtd.js","./pie-wjo18AAU.js","./ref-CJWSIRE5.js","./index3.css","./split-fit-B5waCbwy.js","./VerifyLayout-4Rq82VT8.css","./WhiteboardLayout-FAO1qkk_.js","./diagram-font-D5bUXQyN.js","./shims-CqTWewbM.js","./WhiteboardLayout-D547-sem.css","./SplitShell-DDxrJzzq.js","./route-messages-DB3qcaq7.js","./SplitShell-C1umM5Fz.css","./local-split-host-DlzWe0xb.js","./PreviewLayout-DxPulKHq.js"])))=>i.map(i=>d[i]);
2
+ import{i as e,n as t}from"./rolldown-runtime-COiEfhsA.js";import{C as n,S as r,_ as i,a,d as o,g as s,h as c,n as l,t as u,u as d,v as f,w as p}from"./route-TTi4dCVS.js";/* empty css */import{t as m}from"./react-B8SKf8RM.js";import{$ as h,At as g,Bt as _,Ct as v,Dt as y,Et as ee,F as te,Ft as ne,G as re,Gt as ie,Hn as b,Ht as ae,I as oe,It as x,J as se,K as S,Kn as C,Kt as ce,Lt as w,Mt as le,Nt as T,Ot as ue,P as de,Pt as E,Q as fe,Qt as pe,Rt as me,Tt as D,Un as he,Ut as ge,Vn as O,Vt as k,W as _e,Wn as ve,Wt as ye,X as be,Xt as xe,Y as Se,Yt as A,Z as Ce,Zt as we,bn as Te,bt as Ee,ct as De,dn as Oe,dt as ke,f as Ae,it as je,jt as Me,kt as Ne,lt as Pe,mt as Fe,nn as Ie,p as Le,pt as Re,q as ze,qt as Be,r as Ve,s as He,st as Ue,un as We,ut as Ge,wt as j,xt as Ke,y as qe,zt as Je}from"./split-url-C9-EsUey.js";import{t as Ye}from"./jsx-runtime-DePvh3-m.js";import{A as Xe,Ci as M,Er as Ze,F as Qe,Hn as $e,Jn as et,Jt as tt,Qn as nt,Rn as rt,Si as it,Sn as N,Ti as at,Un as ot,Vn as st,Xn as ct,Yn as lt,Yt as ut,Zt as dt,ai as ft,bi as pt,bn as mt,ci as P,g as ht,h as gt,hi as _t,lr as vt,lt as yt,pi as bt,pt as xt,qn as St,rn as Ct,xn as wt,yi as Tt,yn as Et,yr as Dt}from"./useScrollLock-C0UBr8yH.js";import{n as Ot,r as kt,t as F}from"./clsx-DRUh9g2d.js";import{$ as At,B as jt,Dt as Mt,Et as Nt,F as Pt,G as Ft,J as It,M as Lt,N as Rt,St as zt,Tt as Bt,U as Vt,W as I,_t as Ht,a as Ut,c as Wt,d as Gt,dt as L,et as Kt,gt as qt,ht as Jt,j as Yt,l as Xt,m as Zt,mt as Qt,p as $t,s as en,st as tn,u as nn,ut as rn,wt as an,xt as on}from"./MotionConfigContext-ClRb4nZj.js";import{$ as sn,$n as cn,$t as ln,A as un,An as dn,At as fn,B as pn,Bn as mn,Bt as hn,C as gn,Cn as _n,Cr as vn,Ct as yn,D as bn,Dn as xn,Dt as Sn,E as Cn,En as wn,Et as Tn,F as En,Fn as Dn,Ft as On,G as kn,Gn as An,Gt as jn,H as Mn,Hn as Nn,Ht as Pn,I as Fn,In,It as Ln,J as Rn,Jn as zn,Jt as Bn,K as Vn,Kn as Hn,Kt as Un,L as Wn,Ln as Gn,Lt as Kn,M as qn,Mn as Jn,Mt as Yn,N as Xn,Nn as Zn,Nt as Qn,O as $n,On as er,Ot as tr,P as nr,Pn as rr,Pt as ir,Q as ar,Qn as or,Qt as sr,R as cr,Rn as lr,Rt as ur,S as dr,Sn as fr,Sr as pr,St as mr,T as hr,Tn as gr,Tr as _r,Tt as vr,U as yr,Un as br,Ut as xr,V as Sr,Vn as Cr,Vt as wr,W as Tr,Wn as Er,Wt as Dr,X as Or,Xn as kr,Xt as Ar,Y as jr,Yn as Mr,Yt as Nr,Z as Pr,Zn as Fr,Zt as Ir,_ as Lr,_n as Rr,_t as zr,a as Br,an as Vr,ar as Hr,at as Ur,b as Wr,bn as Gr,br as Kr,bt as qr,c as Jr,cn as Yr,cr as Xr,ct as Zr,d as Qr,dn as $r,dr as ei,dt as ti,en as ni,er as ri,et as ii,f as ai,fn as oi,fr as si,ft as ci,g as li,gn as ui,gt as di,h as fi,hn as pi,ht as mi,i as hi,in as gi,ir as _i,it as vi,j as yi,jn as bi,jt as xi,k as Si,kn as Ci,kt as wi,l as Ti,ln as Ei,lr as Di,lt as Oi,m as ki,mn as Ai,mr as ji,mt as Mi,n as Ni,nn as Pi,nr as Fi,nt as Ii,o as Li,on as Ri,or as zi,ot as Bi,p as Vi,pn as Hi,pr as Ui,pt as Wi,q as Gi,qn as Ki,qt as qi,r as Ji,rn as Yi,rr as Xi,rt as Zi,s as Qi,sn as $i,sr as ea,st as ta,t as na,tn as ra,tr as ia,tt as aa,u as oa,un as sa,ur as ca,ut as la,v as ua,vn as da,vr as fa,vt as pa,w as ma,wn as ha,wr as ga,wt as _a,x as va,xn as ya,xr as R,xt as ba,y as xa,yn as Sa,yr as Ca,yt as wa,z as Ta,zn as Ea,zt as Da}from"./elements-C05FRxzL.js";var Oa={name:`circle-check-big`,size:24,node:[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]],aliases:[`check-circle`]};Oa.node;var ka=Mt(Oa),Aa={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};Aa.node;var ja=Mt(Aa);function Ma(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}function z(e,t,n){return _r(e.getProps(),t,n,e)}var Na=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,Pa=e=>Array.isArray(e);function Fa(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,$t(n))}function Ia(e){return Pa(e)?e[e.length-1]||0:e}function La(e,t){let{transitionEnd:n={},transition:r={},...i}=z(e,t)||{};i={...i,...n};for(let t in i)Fa(e,t,Ia(i[t]))}function Ra(e){return!!(Gt(e)&&e.add)}function za(e,t){let n=e.getValue(`willChange`);if(Ra(n))return n.add(t);if(!n&&on.WillChange){let n=new on.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Ba(e){return e.props[ga]}var Va=typeof window<`u`;function Ha({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function Ua(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Be(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState?.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&Ha(f,t))continue;let o={delay:n,...ce(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){I.update(()=>r.set(i));continue}let p=!1;if(Va&&window.MotionHandoffAnimation){let n=Ba(e);if(n){let e=window.MotionHandoffAnimation(n,t,I);e!==null&&(o.startTime=e,p=!0)}}za(e,t);let m=l??e.shouldReduceMotion;r.start(ie(t,r,i,m&&ye.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>I.update(()=>{o&&La(e,o)});d.length?Promise.all(d).then(t):t()}return d}function Wa(e,t,n={}){let r=z(e,t,Na(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?Ua(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(Wa(e,t,{...n,delay:r+(typeof o==`function`?0:o)+Ma(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function Ga(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>Wa(e,t,n))):typeof t==`string`?Wa(e,t,n):Promise.all(Ua(e,z(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var Ka=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`],B={x:!1,y:!1};function qa(){return B.x||B.y}function Ja(e){return e===`x`||e===`y`?B[e]?null:(B[e]=!0,()=>{B[e]=!1}):B.x||B.y?null:(B.x=B.y=!0,()=>{B.x=B.y=!1})}function Ya(e,t){let n=_(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Xa(e){return!(e.pointerType===`touch`||qa())}function Za(e,t,n={}){let[r,i,a]=Ya(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{e.pointerType!==`touch`&&(n?r=!0:s(e))};e.addEventListener(`pointerenter`,n=>{if(!Xa(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var Qa=(e,t)=>t?e===t||Qa(e,t.parentElement):!1,$a=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,eo=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function to(e){return eo.has(e.tagName)||e.isContentEditable===!0}var no=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function ro(e){return no.has(e.tagName)||e.isContentEditable===!0}var io=new WeakSet;function ao(e){return t=>{t.key===`Enter`&&e(t)}}function oo(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var so=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=ao(()=>{if(io.has(n))return;oo(n,`down`);let e=ao(()=>{oo(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>oo(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function co(e){return $a(e)&&!qa()}var lo=new WeakSet;function uo(e,t,n={}){let[r,i,a]=Ya(e,n),o=e=>{let r=e.currentTarget;if(!co(e)||lo.has(e))return;io.add(r),n.stopPropagation&&lo.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),io.has(r)&&io.delete(r),co(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||Qa(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),ae(e)&&(e.addEventListener(`focus`,e=>so(e,i)),!to(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var fo=new WeakMap,po,mo=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:k(r)&&`getBBox`in r?r.getBBox()[t]:r[n],ho=mo(`inline`,`width`,`offsetWidth`),go=mo(`block`,`height`,`offsetHeight`);function _o({target:e,borderBoxSize:t}){fo.get(e)?.forEach(n=>{n(e,{get width(){return ho(e,t)},get height(){return go(e,t)}})})}function vo(e){e.forEach(_o)}function yo(){typeof ResizeObserver<`u`&&(po=new ResizeObserver(vo))}function bo(e,t){po||yo();let n=_(e);return n.forEach(e=>{let n=fo.get(e);n||(n=new Set,fo.set(e,n)),n.add(t),po?.observe(e)}),()=>{n.forEach(e=>{let n=fo.get(e);n?.delete(t),n?.size||po?.unobserve(e)})}}var xo=new Set,So;function Co(){So=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};xo.forEach(t=>t(e))},window.addEventListener(`resize`,So)}function wo(e){return xo.add(e),So||Co(),()=>{xo.delete(e),!xo.size&&typeof So==`function`&&(window.removeEventListener(`resize`,So),So=void 0)}}function To(e,t){return typeof e==`function`?wo(e):bo(e,t)}var Eo={value:null,addProjectionMetrics:null};function Do(e){return k(e)&&e.tagName===`svg`}var Oo=e=>typeof e==`number`?e:parseFloat(e),ko=class extends ji{constructor(){super(...arguments),this.KeyframeResolver=ge}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;Gt(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},V=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function Ao(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function jo(e){return window.getComputedStyle(e)}var Mo=class extends ko{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Ao}mount(e){zt(!!e.style,`motion.create() components must forward their ref to a HTML or SVG element`,`custom-component-ref`),super.mount(e)}readValueFromInstance(e,t){if(Yt.has(t))return this.projection?.isProjecting?Lt(t):Rt(e,t);{let n=jo(e),r=(tn(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Ne(e,t)}build(e,t,n){Xt(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return si(e,t,n)}},No=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`]);function Po(e,t,n,r){Ao(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(No.has(n)?n:nn(n),t.attrs[n])}var Fo=class extends ko{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=R}getBaseTargetFromProps(e,t){return Yt.has(t)?super.getBaseTargetFromProps(e,t)??Lt(t):e[t]}getDefaultValue(e){return Yt.has(e)?this.latestValues[e]??Lt(e):void 0}readValueFromInstance(e,t){if(Yt.has(t)){let e=Pt(t);return e&&e.default||0}if(Wt.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=No.has(t)?t:nn(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return ca(e,t,n)}build(e,t,n){en(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Po(e,t,n,r)}mount(e){this.isSVGTag=ei(e.tagName),super.mount(e)}};function Io(e,t){if(!Array.isArray(t))return!1;let 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}var Lo=[...fa].reverse();function Ro(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>Ga(e,t,n))),n=Bo(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,l=r||i,u=[],d=new Set,f={},p=1/0,m=e;do m=m.props.inherit!==!1&&m.parent;while(m&&!m.isControllingVariants);if(Lo.forEach((t,r)=>{let i=n[t],h=o[t],g=m&&m.props[t],_=h===void 0?Ca(g)||g===!1?g:void 0:h,v=Ca(_),y=t===a?i.isActive:null;y===!1&&(p=r);let ee=v&&h===void 0&&!(l&&c);if(i.protectedKeys={...f},!i.isActive&&y===null||!_&&!i.prevProp||Kr(_)||typeof _==`boolean`)return;if(t===`exit`&&i.isActive&&y!==!0){f={...f,...i.prevResolvedValues};return}let te=zo(i.prevProp,_),ne=te||v&&(y&&!ee||r>p),re=!1,ie=Array.isArray(_)?_:[_],b={};if(y!==!1)for(let n of ie){let{transition:r,transitionEnd:i,...a}=z(e,n,Na(e,t))||{};b={...b,...a,...i}}let{prevResolvedValues:ae}=i;for(let t in{...ae,...b}){if(t in f)continue;let n=b[t],r=ae[t],a=Array.isArray(n)&&Array.isArray(r)?!Io(n,r)||te:n!==r;if(a&&n==null)d.add(t);else if(a||n!==void 0&&d.has(t)){ne=!0,d.delete(t)&&(re=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0}if(i.prevProp=_,i.prevResolvedValues=b,i.isActive&&(f={...f,...b}),ne&&(!(ee&&te)||re))for(let n of ie){let r={type:t};if(typeof n==`string`&&l&&c&&s?.enteringChildren){let t=z(s,n)?.transition?.delayChildren;r.delay=Ma(s.enteringChildren,e,t)}u.push({animation:n,options:r})}}),d.size){let{initial:t}=o,n={},r=typeof t!=`boolean`&&z(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom);r&&r.transition&&(n.transition=r.transition),d.forEach(i=>{let a=e.getValue(i);a&&(a.liveStyle=!0);let s=r&&!Array.isArray(t)?r[i]:void 0,c=e.getBaseTargetFromProps(o,i);n[i]=(s===void 0?c!==void 0&&!Gt(c)?c:e.initialValues[i]===void 0?e.baseTarget[i]:void 0:s)??null}),u.push({animation:n})}let h=l&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!h&&u.length?t(u):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=Bo(),i=!0}}}function zo(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Io(t,e):!1}function Bo(){let e={};for(let t of fa)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return e}function Vo(e,t){e.min=t.min,e.max=t.max}function H(e,t){Vo(e.x,t.x),Vo(e.y,t.y)}function Ho(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Uo=.9999,Wo=1.0001,Go=-.01,Ko=.01;function U(e){return e.max-e.min}function qo(e,t,n){return Math.abs(e-t)<=n}function Jo(e,t,n,r=.5){e.origin=r,e.originPoint=A(t.min,t.max,e.origin),e.scale=U(n)/U(t),e.translate=A(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Uo&&e.scale<=Wo||isNaN(e.scale))&&(e.scale=1),(e.translate>=Go&&e.translate<=Ko||isNaN(e.translate))&&(e.translate=0)}function Yo(e,t,n,r){Jo(e.x,t.x,n.x,r?r.originX:void 0),Jo(e.y,t.y,n.y,r?r.originY:void 0)}function Xo(e,t,n,r=0){e.min=(r?A(n.min,n.max,r):n.min)+t.min,e.max=e.min+U(t)}function Zo(e,t,n,r){Xo(e.x,t.x,n.x,r?.x),Xo(e.y,t.y,n.y,r?.y)}function Qo(e,t,n,r=0){let i=r?A(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+U(t)}function $o(e,t,n,r){Qo(e.x,t.x,n.x,r?.x),Qo(e.y,t.y,n.y,r?.y)}function es(e,t,n,r,i){return e-=t,e=le(e,1/n,r),i!==void 0&&(e=le(e,1/i,r)),e}function ts(e,t=0,n=1,r=.5,i,a=e,o=e){if(At.test(t)&&(t=parseFloat(t),t=A(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=A(a.min,a.max,r);e===a&&(s-=t),e.min=es(e.min,t,n,s,i),e.max=es(e.max,t,n,s,i)}function ns(e,t,[n,r,i],a,o){ts(e,t[n],t[r],t[i],t.scale,a,o)}var rs=[`x`,`scaleX`,`originX`],is=[`y`,`scaleY`,`originY`];function as(e,t,n,r){ns(e.x,t,rs,n?n.x:void 0,r?r.x:void 0),ns(e.y,t,is,n?n.y:void 0,r?r.y:void 0)}function os(e){return e.translate===0&&e.scale===1}function ss(e){return os(e.x)&&os(e.y)}function cs(e,t){return e.min===t.min&&e.max===t.max}function ls(e,t){return cs(e.x,t.x)&&cs(e.y,t.y)}function us(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ds(e,t){return us(e.x,t.x)&&us(e.y,t.y)}function fs(e){return U(e.x)/U(e.y)}function ps(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function W(e){return[e(`x`),e(`y`)]}function ms(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var hs={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(Kt.test(e))e=parseFloat(e);else return e}return`${ms(e,t.target.x)}% ${ms(e,t.target.y)}%`}},gs={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=It.parse(e);if(i.length>5)return r;let a=It.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=A(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}};function _s(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var vs=Ka.length,ys=e=>typeof e==`number`||Kt.test(e);function bs(e,t,n,r,i,a){i?(e.opacity=A(0,n.opacity??1,Ss(r)),e.opacityExit=A(t.opacity??1,0,Cs(r))):a&&(e.opacity=A(t.opacity??1,n.opacity??1,r));for(let i=0;i<vs;i++){let a=Ka[i],o=xs(t,a),s=xs(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||ys(o)===ys(s)?(e[a]=Math.max(A(Oo(o),Oo(s),r),0),(At.test(s)||At.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=A(t.rotate||0,n.rotate||0,r))}function xs(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Ss=ws(0,.5,xe),Cs=ws(.5,.95,Ht);function ws(e,t,n){return r=>r<e?0:r>t?1:n(we(e,t,r))}function Ts(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var Es=(e,t)=>e.depth-t.depth,Ds=class{constructor(){this.children=[],this.isDirty=!1}add(e){Bt(this.children,e),this.isDirty=!0}remove(e){Nt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Es),this.isDirty=!1,this.children.forEach(e)}};function Os(e,t){let n=rn.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(Vt(r),e(a-t))};return I.setup(r,!0),()=>Vt(r)}var ks=class{constructor(){this.members=[]}add(e){Bt(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&r.isConnected!==!1||n.snapshot||(Nt(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(Nt(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},As={borderRadius:{...hs,applyTo:[...Ka]},borderTopLeftRadius:hs,borderTopRightRadius:hs,borderBottomLeftRadius:hs,borderBottomRightRadius:hs,boxShadow:gs},js={hasAnimatedSinceResize:!0,hasEverUpdated:!1};Object.assign(Ui,{...As,...Ui});var Ms={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Ns=[``,`X`,`Y`,`Z`],Ps=1e3,Fs=0;function Is(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}var Ls=({instance:e})=>e&&Zt.get(e)?.demote();function Rs(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Ba(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,I,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Rs(r)}function zs({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Fs++,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.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Eo.value&&(Ms.nodes=Ms.calculatedTargetDeltas=Ms.calculatedProjections=0),this.nodes.forEach(Hs),this.nodes.forEach($s),this.nodes.forEach(ec),this.nodes.forEach(Us),Eo.addProjectionMetrics&&Eo.addProjectionMetrics(Ms)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ds)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new qt),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=k(t)&&!Do(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;I.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Os(i,250),js.hasAnimatedSinceResize&&(js.hasAnimatedSinceResize=!1,this.nodes.forEach(Qs)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isAnimationBlocked){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||sc,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!ds(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...ce(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||Qs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Vt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(tc),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Rs(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;Ls(this),this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,Ls(t),(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1),t.isAnimationBlocked&&(t.dragSnapshot||=t.measure(),this.dragAncestor=t)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Ks),this.nodes.forEach(Gs);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(qs);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ys),this.nodes.forEach(Xs),this.nodes.forEach(Zs),this.nodes.forEach(Bs),this.nodes.forEach(Vs)):this.nodes.forEach(qs),this.clearAllSnapshots();let e=rn.now();L.delta=an(0,1e3/60,e-L.timestamp),L.timestamp=e,L.isProcessing=!0,Ft.update.process(L),Ft.preRender.process(L),Ft.render.process(L),L.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,vn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ws),this.sharedNodes.forEach(nc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,I.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){I.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!U(this.snapshot.measuredBox.x)&&!U(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 e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected||=R(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;e&&Ls(this);let t=this.projectionDelta&&!ss(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||w(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),dc(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return R();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(pc))){let{scroll:e}=this.root;e&&(E(t.x,e.offset.x),E(t.y,e.offset.y))}return t}removeElementScroll(e){let t=R();if(H(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&H(t,e),E(t.x,i.offset.x),E(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||R();H(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(E(r.x,-n.scroll.offset.x),E(r.y,-n.scroll.offset.y)),w(n.latestValues)&&T(r,n.latestValues,n.layout?.layoutBox)}return w(this.latestValues)&&T(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=R();H(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!w(n.latestValues))continue;let r;n.instance&&(x(n.latestValues)&&n.updateSnapshot(),r=R(),H(r,n.measurePageBox())),as(t,n.latestValues,n.snapshot?.layoutBox,r)}return w(this.latestValues)&&as(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade}}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!==L.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=L.timestamp;let a=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=R(),this.targetWithTransforms=R()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Zo(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):H(this.target,this.layout.layoutBox),g(this.target,this.targetDelta)):H(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),Eo.value&&Ms.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||x(this.parent.latestValues)||ne(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=R(),this.relativeTargetOrigin=R(),$o(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),H(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===L.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;H(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Me(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=R());let{target:s}=e;s?(!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ho(this.prevProjectionDelta.x,this.projectionDelta.x),Ho(this.prevProjectionDelta.y,this.projectionDelta.y)),Yo(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&ps(this.projectionDelta.x,this.prevProjectionDelta.x)&&ps(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Eo.value&&Ms.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=pr(),this.projectionDelta=pr(),this.projectionDeltaWithTransform=pr()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=pr();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=R(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(oc));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=A(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=A(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(rc(o.x,e.x,n),rc(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($o(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),ac(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&ls(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=R(),H(f,this.relativeTarget)),c&&(this.animationValues=a,bs(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(Vt(this.pendingAnimation),void 0),this.pendingAnimation=I.update(()=>{js.hasAnimatedSinceResize=!0,this.motionValue||=$t(0),this.motionValue.jump(0,!1),this.currentAnimation=y(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),jt(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ps),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&fc(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||R();let t=U(this.layout.layoutBox.x);i.x.min=e.target.x.min,i.x.max=i.x.min+t;let n=U(this.layout.layoutBox.y);i.y.min=e.target.y.min,i.y.max=i.y.min+n}H(t,i),T(t,r),Yo(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ks),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&Is(`z`,e,r,this.animationValues);for(let t=0;t<Ns.length;t++)Is(`rotate${Ns[t]}`,e,r,this.animationValues),Is(`skew${Ns[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Di(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Di(t?.pointerEvents)||``),this.hasProjected&&!w(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=_s(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=r.animationValues?r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Ui){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=Ui[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?Di(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Gs),this.root.sharedNodes.clear()}}}function Bs(e){e.updateLayout(),Js(e)}function Vs(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)W(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=U(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Vo(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else fc(i,t.layoutBox,n)&&W(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=U(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=pr();Yo(o,n,t.layoutBox);let s=pr();a?Yo(s,e.applyTransform(r,!0),t.measuredBox):Yo(s,n,t.layoutBox);let c=!ss(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=R();$o(s,t.layoutBox,i.layoutBox,o);let c=R();$o(c,n,a.layoutBox,o),ds(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Hs(e){Eo.value&&Ms.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Us(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ws(e){e.clearSnapshot()}function Gs(e){e.clearMeasurements()}function Ks(e){e.isLayoutDirty=!0,e.updateLayout()}function qs(e){e.isLayoutDirty=!1}function Js(e){let{snapshot:t,dragAncestor:n}=e,r=n?.layout;if(!t||!r||e.resumeFrom||e.isAnimationBlocked)return;let i=n.dragSnapshot;W(e=>E(t.layoutBox[e],r.layoutBox[e].min-i.layoutBox[e].min))}function Ys(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.dragSnapshot||e.layout,e.isLayoutDirty=!0)}function Xs(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function Zs(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Qs(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function $s(e){e.resolveTargetDelta()}function ec(e){e.calcProjection()}function tc(e){e.resetSkewAndRotation()}function nc(e){e.removeLeadSnapshot()}function rc(e,t,n){e.translate=A(t.translate,0,n),e.scale=A(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ic(e,t,n,r){e.min=A(t.min,n.min,r),e.max=A(t.max,n.max,r)}function ac(e,t,n,r){ic(e.x,t.x,n.x,r),ic(e.y,t.y,n.y,r)}function oc(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var sc={duration:.45,ease:[.4,0,.1,1]},cc=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),lc=cc(`applewebkit/`)&&!cc(`chrome/`)?Math.round:Ht;function uc(e){e.min=lc(e.min),e.max=lc(e.max)}function dc(e){uc(e.x),uc(e.y)}function fc(e,t,n){return e===`position`||e===`preserve-aspect`&&!qo(fs(t),fs(n),.2)}function pc(e){return e!==e.root&&e.scroll?.wasRoot}var mc=zs({attachResizeListener:(e,t)=>Ts(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),hc={current:void 0},gc=zs({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!hc.current){let e=new mc({});e.mount(window),e.setOptions({layoutScroll:!0}),hc.current=e}return hc.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),_c=(e,t)=>Math.abs(e-t);function vc(e,t){let n=_c(e.x,t.x),r=_c(e.y,t.y);return Math.sqrt(n**2+r**2)}var G=Ye(),K=e(m(),1);function yc({children:e,features:t,strict:n=!1}){let[,r]=(0,K.useState)(!bc(t)),i=(0,K.useRef)(void 0);if(!bc(t)){let{renderer:e,...n}=t;i.current=e,ea(n)}return(0,K.useEffect)(()=>{bc(t)&&t().then(({renderer:e,...t})=>{ea(t),i.current=e,r(!0)})},[]),(0,G.jsx)(Xr.Provider,{value:{renderer:i.current,strict:n},children:e})}function bc(e){return typeof e==`function`}var xc=(e,t)=>t.isSVG??zi(e)?new Fo(t):new Mo(t,{allowProjection:e!==K.Fragment}),Sc=class extends V{constructor(e){super(e),e.animationState||=Ro(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Kr(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Cc=0,wc={animation:{Feature:Sc},exit:{Feature:class extends V{constructor(){super(...arguments),this.id=Cc++}update(){let{presenceContext:e,prevPresenceContext:t,animationState:n}=this.node;if(!e||!n)return;let{isPresent:r,onExitComplete:i}=e,a=t?.isPresent;if(r===a)return;if(r&&a===!1){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=z(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,n.reset(),n.animateChanges()}else n.setActive(`exit`,!1);this.exit=void 0;return}let o=this.exit=n.setActive(`exit`,!r);i&&!r&&o.then(()=>{this.exit===o&&(this.exit=!0,i(this.id))})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Tc(e){return{point:{x:e.pageX,y:e.pageY}}}var Ec=e=>t=>$a(t)&&e(t,Tc(t));function Dc(e,t,n,r){return Ts(e,t,Ec(n),r)}var Oc=({current:e})=>e?e.ownerDocument.defaultView:null,kc=new Set([`auto`,`scroll`]),Ac=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=jc(this.lastRawMoveEventInfo,this.transformPagePoint));let e=Nc(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=vc(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:rn.now()});let{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=jc(t,this.transformPagePoint),this.hasPendingMove=!0,I.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=Nc(e.type===`pointercancel`?this.lastMoveEventInfo:jc(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!$a(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=jc(Tc(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=L;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,Nc(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=pe(Dc(this.contextWindow,`pointermove`,this.handlePointerMove,d),Dc(this.contextWindow,`pointerup`,this.handlePointerUp,d),Dc(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(kc.has(e.overflowX)||kc.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),I.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Vt(this.updatePoint)}};function jc(e,t){return t?{point:t(e.point)}:e}function Mc(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Nc({point:e},t){return{point:e,delta:Mc(e,Fc(t)),offset:Mc(e,Pc(t)),velocity:Ic(t,.1)}}function Pc(e){return e[0]}function Fc(e){return e[e.length-1]}function Ic(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Fc(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Jt(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Jt(t)*2&&(r=e[1]);let a=Qt(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Lc(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?A(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?A(n,e,r.max):Math.min(e,n)),e}function Rc(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function zc(e,{top:t,left:n,bottom:r,right:i}){return{x:Rc(e.x,n,i),y:Rc(e.y,t,r)}}function Bc(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 Vc(e,t){return{x:Bc(e.x,t.x),y:Bc(e.y,t.y)}}function Hc(e,t){let n=.5,r=U(e),i=U(t);return i>r?n=we(t.min,t.max-r,e.min):r>i&&(n=we(e.min,e.max-i,t.min)),an(0,1,n)}function Uc(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Wc=.35;function Gc(e=Wc){return e===!1?e=0:e===!0&&(e=Wc),{x:Kc(e,`left`,`right`),y:Kc(e,`top`,`bottom`)}}function Kc(e,t,n){return{min:qc(e,t),max:qc(e,n)}}function qc(e,t){return typeof e==`number`?e:e[t]||0}var Jc=new WeakMap,Yc=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=R(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(e),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ja(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),W(e=>{let t=this.getAxisMotionValue(e).get()||0;if(At.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=U(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&I.update(()=>i(e,t),!1,!0),za(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;r&&this.currentDirection===null?(this.currentDirection=$c(o),this.currentDirection!==null&&i&&i(this.currentDirection)):(this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&I.update(()=>a(e,t),!1,!0))},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new Ac(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:Oc(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&I.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Qc(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Lc(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&_i(e)?this.constraints||=this.resolveRefConstraints():this.constraints=e&&n?zc(n.layoutBox,e):!1,this.elastic=Gc(t),r!==this.constraints&&!_i(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&W(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Uc(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!_i(e))return!1;let n=e.current;zt(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.",`drag-constraints-ref`);let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=ue(n,r.root,this.visualElement.getTransformPagePoint()),a=Vc(r.layout.layoutBox,i);if(t){let e=t(Je(a));this.hasMutatedConstraints=!!e,e&&(a=me(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=W(o=>{if(!Qc(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return za(this.visualElement,e),n.start(ie(e,n,0,t,this.visualElement,!1))}stopAnimation(){W(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();W(e=>{if(!Qc(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-A(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!_i(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};W(e=>{let t=this.getAxisMotionValue(e).get();i[e]=Hc({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),W(t=>{let n=this.getAxisMotionValue(t);if(!Qc(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(A(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Jc.set(this.visualElement,this);let e=this.visualElement.current,t=Dc(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&ro(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();_i(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Zc(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),I.read(r);let o=Ts(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(W(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Wc,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Xc(e){let t=!0;return()=>{t?t=!1:e()}}function Zc(e,t,n){let r=To(e,Xc(n)),i=To(t,Xc(n));return()=>{r(),i()}}function Qc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function $c(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var el=class extends V{constructor(e){super(e),this.removeGroupControls=Ht,this.removeListeners=Ht,this.controls=new Yc(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ht}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},tl=e=>(t,n)=>{e&&I.update(()=>e(t,n),!1,!0)},nl=class extends V{constructor(){super(...arguments),this.removePointerDownListener=Ht}onPointerDown(e){this.session=new Ac(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Oc(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:tl(e),onStart:tl(t),onMove:tl(n),onEnd:(e,t)=>{delete this.session,r&&I.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Dc(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},rl=!1,il=class extends K.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),rl&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),js.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a&&(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),rl=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||I.postRender(()=>{let e=a.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),vn.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;rl=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function al(e){let[t,n]=oe(),r=(0,K.useContext)(Ut);return(0,G.jsx)(il,{...e,layoutGroup:r,switchLayoutGroup:(0,K.useContext)(Hr),isPresent:t,safeToRemove:n})}var ol={pan:{Feature:nl},drag:{Feature:el,ProjectionNode:gc,MeasureLayout:al}};function sl(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&I.postRender(()=>i(t,Tc(t)))}var cl=class extends V{mount(){let{current:e}=this.node;e&&(this.unmount=Za(e,(e,t)=>(sl(this.node,t,`Start`),e=>sl(this.node,e,`End`))))}unmount(){}},ll=class extends V{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&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=pe(Ts(this.node.current,`focus`,()=>this.onFocus()),Ts(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function ul(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&I.postRender(()=>i(t,Tc(t)))}var dl=class extends V{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=uo(e,(e,t)=>(ul(this.node,t,`Start`),(e,{success:t})=>ul(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},fl=new WeakMap,pl=new WeakMap,ml=e=>{let t=fl.get(e.target);t&&t(e)},hl=e=>{e.forEach(ml)};function gl({root:e,...t}){let n=e||document;pl.has(n)||pl.set(n,{});let r=pl.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(hl,{root:e,...t})),r[i]}function _l(e,t,n){let r=gl(t);return fl.set(e,n),r.observe(e),()=>{fl.delete(e),r.unobserve(e)}}var vl={some:0,all:1},yl=class extends V{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:vl[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=_l(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(bl(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function bl({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var xl={inView:{Feature:yl},tap:{Feature:dl},focus:{Feature:ll},hover:{Feature:cl}},Sl={layout:{ProjectionNode:gc,MeasureLayout:al}},Cl={renderer:xc,...wc,...xl,...ol,...Sl},wl=e=>{e.stopPropagation()},Tl=e=>{e.preventDefault(),e.stopPropagation(),e.preventBaseUIHandler?.()},El={anchor:null,iconSpaceMode:`global`,items:[],open:!1,triggerId:null},Dl=El,Ol=new Set,q={ready:!1,triggerId:null,x:0,y:0},kl=()=>{Ol.forEach(e=>e())},Al=e=>(Ol.add(e),()=>Ol.delete(e)),jl=()=>Dl,Ml=()=>El,Nl=e=>{q.x=e.clientX,q.y=e.clientY,q.ready=!0,q.triggerId=e.target instanceof Element?e.target.closest(`[data-contextmenu-trigger]`)?.dataset.contextmenuTrigger??null:null},Pl=e=>({contextElement:typeof document>`u`?void 0:document.body,getBoundingClientRect:()=>({bottom:e.y,height:0,left:e.x,right:e.x,toJSON:()=>void 0,top:e.y,width:0,x:e.x,y:e.y})}),Fl=e=>{Dl={...Dl,...e},kl()},Il=null,Ll=(e,t)=>{let n={x:window.innerWidth/2,y:window.innerHeight/2};Fl({anchor:Pl(q.ready?{x:q.x,y:q.y}:n),footer:t?.footer,header:t?.header,iconAlign:t?.iconAlign,iconSpaceMode:t?.iconSpaceMode??`global`,items:e,listItemHeight:t?.listItemHeight,open:!0,triggerId:q.triggerId??null,virtual:t?.virtual})},Rl=(e,t)=>{typeof window<`u`&&(Il?.show?Il.show(e,t,()=>Ll(e,t)):Ll(e,t))},zl=()=>{Fl({anchor:null,footer:void 0,header:void 0,iconSpaceMode:`global`,items:[],listItemHeight:void 0,open:!1,triggerId:null,virtual:void 0})},Bl=()=>{Il?.close?Il.close(zl):zl()},J=Ot({block:`context-menu`,elements:[`trigger`,`positioner`,`header`,`viewport`,`footer`,`item`,`item-content`,`icon`,`label-group`,`label`,`desc`,`extra`,`submenu-arrow`,`checkbox-indicator`,`switch`,`separator`,`group`,`group-label`]});function Vl(e){let[t,n]=K.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),r=K.useRef(null),i=K.useRef(null),a=K.useRef(null),o=K.useRef(null),s=K.useRef(!0),c=K.useRef(null),l=ft(),u=K.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:a,backdropRef:r,internalBackdropRef:i,positionerRef:o,allowMouseUpTriggerRef:s,initialCursorPointRef:c,rootId:l}),[t,l]);return(0,G.jsx)(Ee.Provider,{value:u,children:(0,G.jsx)(Ke.Provider,{value:void 0,children:(0,G.jsx)(h,{...e})})})}var Hl=je,Ul=(0,K.memo)(({collisionPadding:e,style:t,...n})=>{let r=typeof t!=`function`&&t?.zIndex!=null&&typeof t.zIndex==`number`?t.zIndex:void 0,{zIndex:i,ref:a}=gt(`floating`,r),o=typeof t==`function`?e=>({zIndex:i,...t(e)}):{zIndex:i,...t};return(0,G.jsx)(Hl,{...n,className:F(j.positioner,J(`positioner`)),collisionPadding:e??We(),ref:a,style:o})});Ul.displayName=`ContextMenuSubmenuPositioner`;var Wl=(0,K.memo)(()=>{let{t:e}=te(de);return(0,G.jsx)(Pe,{disabled:!0,className:F(p(D.item,D.empty).className,J(`item`)),children:(0,G.jsx)(`div`,{className:F(j.itemContent,J(`item-content`)),children:(0,G.jsx)(`span`,{className:F(j.label,J(`label`)),children:e(`common.empty`)})})})});Wl.displayName=`EmptyMenuItem`;var Gl=({checked:e,children:t,closeOnClick:n=!1,danger:r,defaultChecked:i,disabled:a,label:o,onCheckedChange:s})=>{let[c,l]=(0,K.useState)(i??!1),u=e!==void 0,d=u?e:c,f=(0,K.useCallback)(e=>{u||l(e),s?.(e)},[u,s]);return(0,G.jsxs)(Pe,{closeOnClick:n,disabled:a,label:o,className:F(p(D.item,r&&D.danger).className,J(`item`)),onClick:e=>{e.preventDefault(),a||f(!d)},children:[t,(0,G.jsx)(`span`,{className:F(j.switchWrap,J(`switch`)),onFocus:e=>e.stopPropagation(),children:(0,G.jsx)(ee,{checked:d,disabled:a,size:`small`,tabIndex:-1,onChange:f,onClick:(e,t)=>t.stopPropagation()})})]})},Kl=(e,t,n)=>{let r=S(e),i=`desc`in e?e.desc:void 0,a=`extra`in e?e.extra:void 0,o=t?.indicatorOnRight,s=!!i&&t?.iconAlign===`start`,c=n!==void 0&&!o,l=c?!!n:!!e.icon,u=c?!!(t?.reserveIconSpace||n):!!(l||t?.reserveIconSpace),d=i?(0,G.jsxs)(`div`,{className:F(j.labelGroup,J(`label-group`)),children:[(0,G.jsx)(`span`,{className:F(j.label,J(`label`)),children:r}),(0,G.jsx)(`span`,{className:F(j.desc,J(`desc`)),children:i})]}):(0,G.jsx)(`span`,{className:F(j.label,J(`label`)),children:r});return(0,G.jsxs)(`div`,{className:F(p(D.itemContent,s&&D.itemContentAlignStart).className,J(`item-content`)),children:[u?(0,G.jsx)(`span`,{"aria-hidden":!l,className:F(p(D.icon,s&&D.iconAlignStart).className,v.icon,J(`icon`)),children:c?n:l?Se(e.icon,`small`):null}):null,d,a?(0,G.jsx)(`span`,{className:F(j.extra,J(`extra`)),children:a}):null,o&&n?n:null,t?.submenu?(0,G.jsx)(`span`,{className:F(j.submenuArrow,J(`submenu-arrow`)),children:(0,G.jsx)(_e,{})}):null]})},ql=(e,t,n)=>{if(!e.onClick)return;let r=e.key??t.at(-1)??``,i={domEvent:n,item:n.currentTarget,key:String(r),keyPath:t};e.onClick(i)},Jl=(e,t=[],n)=>{let r=n?.iconAlign,i=n?.iconSpaceMode??`global`,a=n?.reserveIconSpace??ze(e,i===`global`),o=n?.indicatorOnRight??se(e);return e.map((e,n)=>{if(!e)return null;let s=`${t.join(`-`)||`root`}-${n}`,c=re(e,s),l=[...t,String(c)];if(e.type===`checkbox`){let t=e,n=S(t),i=typeof n==`string`?n:void 0,s=!!t.danger,l=(0,G.jsx)(Re,{className:J(`checkbox-indicator`),children:(0,G.jsx)(rt,{icon:ve,size:`small`})});return(0,G.jsx)(Fe,{checked:t.checked,closeOnClick:t.closeOnClick,defaultChecked:t.defaultChecked,disabled:t.disabled,label:i,className:F(p(D.item,s&&D.danger).className,J(`item`)),onCheckedChange:e=>t.onCheckedChange?.(e),children:Kl(t,{iconAlign:r,indicatorOnRight:o,reserveIconSpace:a},l)},c)}if(e.type===`switch`){let t=e,n=S(t),i=typeof n==`string`?n:void 0,o=!!t.danger;return(0,G.jsx)(Gl,{checked:t.checked,closeOnClick:t.closeOnClick,danger:o,defaultChecked:t.defaultChecked,disabled:t.disabled,label:i,onCheckedChange:t.onCheckedChange,children:Kl(t,{iconAlign:r,reserveIconSpace:a})},c)}if(e.type===`divider`)return(0,G.jsx)(Ce,{className:F(j.separator,J(`separator`))},c);if(e.type===`group`){let t=e,n=i===`group`?t.children?ze(t.children):!1:a,o=t.children?se(t.children):!1;return(0,G.jsxs)(ke,{className:J(`group`),children:[t.label?(0,G.jsx)(Ge,{className:F(j.groupLabel,J(`group-label`)),children:t.label}):null,t.children?Jl(t.children,l,{iconAlign:r,iconSpaceMode:i,indicatorOnRight:o,reserveIconSpace:n}):null]},c)}if(e.type===`submenu`||`children`in e&&e.children){let t=e,n=S(t),o=typeof n==`string`?n:void 0,s=`danger`in t&&!!t.danger,u=t.header!=null||t.footer!=null,d=t.children&&t.children.length>0?Jl(t.children,l,{iconAlign:r,iconSpaceMode:i}):(0,G.jsx)(Wl,{});return(0,G.jsxs)(fe,{defaultOpen:t.defaultOpen,open:t.open,onOpenChange:t.onOpenChange,children:[(0,G.jsx)(be,{...t.triggerProps,closeDelay:t.closeDelay,delay:t.delay,disabled:t.disabled,label:o,openOnHover:t.openOnHover,className:F(p(D.item,s&&D.danger).className,J(`item`)),onClick:t.onClick,children:Kl(t,{iconAlign:r,reserveIconSpace:a,submenu:!0})}),(0,G.jsx)(Ue,{children:(0,G.jsx)(Ul,{alignOffset:-4,"data-submenu":``,sideOffset:-1,onContextMenu:Tl,children:(0,G.jsxs)(De,{className:F(p(D.popup,u&&D.popupWithSlots).className,v.popup,J()),children:[t.header==null?null:(0,G.jsx)(`div`,{className:F(j.header,J(`header`)),children:t.header}),u?(0,G.jsx)(`div`,{className:F(j.slotViewport,J(`viewport`)),children:d}):d,t.footer==null?null:(0,G.jsx)(`div`,{className:F(j.footer,J(`footer`)),children:t.footer})]})})})]},c)}let u=e,d=S(u),f=typeof d==`string`?d:void 0,m=`danger`in u&&!!u.danger;return(0,G.jsx)(Pe,{closeOnClick:u.closeOnClick,disabled:u.disabled,label:f,className:F(p(D.item,m&&D.danger).className,J(`item`)),onClick:e=>ql(u,l,e),children:Kl(u,{iconAlign:r,reserveIconSpace:a})},c)})},Yl={"--lobe-dropdown-animation-duration":`0ms`},Xl=(0,K.memo)(()=>{let e=Oe(),t=at(),n=(0,K.useSyncExternalStore)(Al,jl,Ml);(0,K.useEffect)(()=>{},[e]),(0,K.useEffect)(()=>{let e=e=>Nl(e);return window.addEventListener(`pointerdown`,e,!0),window.addEventListener(`contextmenu`,e,!0),()=>{window.removeEventListener(`pointerdown`,e,!0),window.removeEventListener(`contextmenu`,e,!0)}},[]);let r=(0,K.useMemo)(()=>Jl(n.items,[],{iconAlign:n.iconAlign,iconSpaceMode:n.iconSpaceMode}),[n.items,n.iconAlign,n.iconSpaceMode]),{zIndex:i,ref:a}=gt(`floating`),o=n.header!=null||n.footer!=null;return!e||!n.open&&n.items.length===0?null:(0,G.jsx)(Vl,{open:n.open,onOpenChange:e=>{e?Fl({open:e}):Bl()},children:(0,G.jsx)(Ue,{container:t,children:(0,G.jsx)(Hl,{anchor:n.anchor??void 0,className:F(j.positioner,J(`positioner`)),collisionPadding:We(),ref:a,sideOffset:6,style:{...Yl,zIndex:i},children:(0,G.jsxs)(De,{"data-has-footer":n.footer==null?void 0:``,"data-has-header":n.header==null?void 0:``,className:F(p(D.popup,o&&D.popupWithSlots).className,v.popup,J()),onContextMenu:Tl,children:[n.header==null?null:(0,G.jsx)(`div`,{className:F(j.header,J(`header`)),children:n.header}),n.virtual?(0,G.jsx)(Ie,{className:J(`viewport`),itemSize:n.listItemHeight,children:r}):o?(0,G.jsx)(`div`,{className:F(j.slotViewport,J(`viewport`)),children:r}):r,n.footer==null?null:(0,G.jsx)(`div`,{className:F(j.footer,J(`footer`)),children:n.footer})]})})})})});Xl.displayName=`ContextMenuHost`;function Zl(e,t){let n=(t??vt(e).getComputedStyle(e)).transform,r=0,i=0,a=1;if(n&&n!==`none`){let e=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(r=t[4],i=t[5],a=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(r=t[12],i=t[13],a=t[0])}}return{x:r,y:i,scale:a}}var Ql=(0,K.createContext)({position:`bottom-right`,swipeDirection:[`down`,`right`]}),$l=()=>(0,K.useContext)(Ql),eu=[],tu=new Set,nu=()=>{for(let e of tu)e()},ru=e=>(eu.push(e),nu(),()=>{let t=eu.indexOf(e);t!==-1&&eu.splice(t,1),nu()}),iu=e=>eu[0]===e,au=e=>(tu.add(e),()=>{tu.delete(e)}),ou=20,su=5e3,cu=!1,lu=[],uu=e=>{cu?e():(lu.length>=ou&&lu.shift(),lu.push({queuedAt:Date.now(),run:e}))},du=()=>{cu=!0;let e=lu;lu=[];let t=Date.now();for(let n of e)t-n.queuedAt<=su&&n.run()},fu=()=>{cu=!1},Y=Ot({block:`toast`,dataAttributes:[`type`,`position`],elements:[`viewport`,`content`,`body`,`icon`,`main`,`title-row`,`title`,`close`,`description`,`actions`,`action`]}),X={action:{kVAM5u:`lb181nr7w`,kaIpWk:`lb1vihcfj`,ksu8eU:`lbng3xce`,kMzoRj:`lbfn42iu`,kg3NbH:`lbaope02`,kmkexE:`lb1cd9vmy`,kGNEyG:`lb6s0dn4`,kkrTdU:`lb1ypdohk`,k1xSpc:`lb3nfvp2`,kmuXW:`lb2lah0s`,kGuDYH:`lbfifm61`,k63SB2:`lbk50ysn`,kjj79g:`lbl56j7k`,kLWn49:`lbo5v014`,kZKoxP:`lb1fgtraw`,$$css:!0},actionDanger:{"--lobe-focus-ring-color":`lb2hswdp`,kWkggS:`lbixdnzb lb1ca5mm0 lb4c98my`,kMwMTN:`lb15g0kca`,kjBf7l:`lbiep9q5 lb1y5du2d`,$$css:!0},actionGhost:{kVAM5u:`lbqnr5ac lb1ahehej lbuhn3al`,ksu8eU:`lb1y0btm7`,kMzoRj:`lbmkeg23`,kWkggS:`lbjbqb8w`,kMwMTN:`lb66ogz0 lb1l4wxl8 lb1nelral`,$$css:!0},actionPrimary:{kWkggS:`lb1hsafae lblxzpop lb1gwghft`,kMwMTN:`lb15g0kca`,$$css:!0},actionSecondary:{kWkggS:`lbjjy28o lbswrfa9 lb147z954`,kMwMTN:`lb66ogz0`,$$css:!0},actionText:{kWkggS:`lbjbqb8w lbswrfa9 lb1cpyog9`,kMwMTN:`lb16owwnm`,$$css:!0},actions:{kOIVth:`lb167g77z`,kGNEyG:`lb6s0dn4`,kSGwAc:`lbpvyfi4`,k1xSpc:`lb78zum5`,kzQI83:`lb1iyjqo2`,kmuXW:`lb2lah0s`,kjj79g:`lb13a6bvl`,keoZOQ:`lb1xmf6yo`,$$css:!0},close:{kmVPX3:`lb1717udv`,kVAM5u:`lb181nr7w`,kaIpWk:`lb1vihcfj`,ksu8eU:`lbng3xce`,kMzoRj:`lbfn42iu`,kmkexE:`lb1ng1d19`,kGNEyG:`lb6s0dn4`,kWkggS:`lbjbqb8w lb1ri6zej`,kMwMTN:`lbc77et8 lb1bxu9lh`,kkrTdU:`lb1ypdohk`,k1xSpc:`lb78zum5`,kmuXW:`lb2lah0s`,kjj79g:`lbl56j7k`,keTefX:`lbvc5jky`,kZKoxP:`lb1qx5ct2`,kzqmXN:`lbw4jnvo`,$$css:!0},content:{kVQacm:`lbb3r6kr`,kmkexE:`lb1hzt7jf`,kSiTet:`lb1g256cz lbcbbmyo`,kfzvcC:`lbp78wxm lb1cicrrk`,$$css:!0},contentArea:{kUk6DE:`lb98rzlu`,k1xSpc:`lb78zum5`,kXwgrk:`lbdt5ytf`,k7Eaqz:`lbeuugli`,$$css:!0},description:{kogj98:`lb1ghz6dp`,kMwMTN:`lbc77et8`,kGuDYH:`lb4z9k3i`,kLWn49:`lb1evy7pa`,$$css:!0},descriptionWithTitle:{keoZOQ:`lb1gslohp`,$$css:!0},descriptionStandalone:{kMwMTN:`lb66ogz0`,$$css:!0},icon:{kGNEyG:`lb6s0dn4`,k1xSpc:`lb78zum5`,kmuXW:`lb2lah0s`,kjj79g:`lbl56j7k`,$$css:!0},root:{"--toast-collapsed-height":`lb1o8nl8n`,"--toast-gap":`lbr9sdi6`,"--toast-peek":`lb1wxzbih`,"--toast-scale":`lb1vhpo3u`,"--toast-shrink":`lb1c223hw`,kaIpWk:`lb159sbz3`,kkqhue:`lb17y0mx6`,k8WAf4:`lb10dr8xq`,kg3NbH:`lb1hr3lfm`,kHypHr:`lbx83zyx`,kWkggS:`lb1w937bt`,kGVxlE:`lbj07k4p`,kB7OPa:`lb9f619`,kMwMTN:`lb66ogz0`,kkrTdU:`lbt0e3qv`,kSiTet:`lb4ki41r`,kVAEAm:`lb10l6tqk`,kIyJzY:`lb1ssesjg lbm69ghq`,k1ekBW:`lb19ix5ol lbo3tt7b`,kAMwcw:`lb1477tyf lb7cr0y4`,kfSwDN:`lb87ps6o`,kY2c9j:`lb1l48cz2`,kZKoxP:`lb677f43 lbnbj6on`,kzqmXN:`lbh8yej3`,$$css:!0},rootBottom:{kYYq5F:`lb1fclj7r`,k3aq6I:`lb1qsqgls lbz09l4w lb1ce1yp4`,k3nNDw:`lb18ouj0k`,kcktkL:`lbb7ltuz`,k5JduY:`lb100rkj9`,k3foIR:`lb1srwf7z`,kwXMNM:`lb1j6awrg`,k4zj60:`lb1jflgyd`,$$css:!0},rootTop:{kYYq5F:`lbdwv5cp`,k3aq6I:`lb1jkqqlh lb7ly47h lbjeddtc`,k3nNDw:`lb1dp6rp6`,kcktkL:`lbb7ltuz`,k5JduY:`lb100rkj9`,k8Iv0R:`lb1wpe5ba`,kwXMNM:`lb1j6awrg`,k4zj60:`lb1jflgyd`,$$css:!0},title:{kogj98:`lb1ghz6dp`,kMwMTN:`lb66ogz0`,kGuDYH:`lbif65rj`,k63SB2:`lbk50ysn`,kLWn49:`lb1evy7pa`,$$css:!0},titleRow:{kOIVth:`lb167g77z`,kGNEyG:`lb1cy8zhl`,k1xSpc:`lb78zum5`,$$css:!0},toastBody:{kOIVth:`lb1v2ro7d`,kGNEyG:`lb1cy8zhl`,k1xSpc:`lb78zum5`,$$css:!0},viewport:{kI3sdo:`lb1b6ykf0`,kVAEAm:`lbixxii4`,kY2c9j:`lb979qle`,ks0D6T:`lbg5xlue`,kzqmXN:`lb1fzdfyu lbm1mc0`,$$css:!0},viewportBottom:{krVfgx:`lbo7r6ss`,kLqNvP:`lbbudbmw`,k3aq6I:`lbuuh30`,$$css:!0},viewportBottomLeft:{krVfgx:`lbo7r6ss`,kLqNvP:`lb10vz1dz`,$$css:!0},viewportBottomRight:{krVfgx:`lbo7r6ss`,kt4wiu:`lb1cj2eds`,k3aq6I:`lb18zyp77`,kIyJzY:`lb1x2t6jx lb12w9bfk`,k1ekBW:`lb11xpdln lb4wkmsb`,kAMwcw:`lbsygjwy lb7v8fk2`,$$css:!0},viewportTop:{k87sOh:`lb1kd19f1`,kLqNvP:`lbbudbmw`,k3aq6I:`lbuuh30`,$$css:!0},viewportTopLeft:{k87sOh:`lb1kd19f1`,kLqNvP:`lb10vz1dz`,$$css:!0},viewportTopRight:{k87sOh:`lb1kd19f1`,kt4wiu:`lb1cj2eds`,$$css:!0}},pu={bottom:X.viewportBottom,"bottom-left":X.viewportBottomLeft,"bottom-right":X.viewportBottomRight,top:X.viewportTop,"top-left":X.viewportTopLeft,"top-right":X.viewportTopRight},mu={bottom:X.rootBottom,"bottom-left":X.rootBottom,"bottom-right":X.rootBottom,top:X.rootTop,"top-left":X.rootTop,"top-right":X.rootTop},hu={danger:X.actionDanger,ghost:X.actionGhost,primary:X.actionPrimary,secondary:X.actionSecondary,text:X.actionText},gu=K.createContext(void 0);function _u(){let e=K.useContext(gu);if(!e)throw Error(bt(73));return e}var vu=0;function yu(e){return vu+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${vu}`}function bu(e,t){if(typeof e==`string`)return{description:e};if(typeof e==`function`){let n=e(t);return typeof n==`string`?{description:n}:n}return e}function xu(e){let t=new Map,n=0,r=0;return e.forEach((e,i)=>{let a=e.transitionStatus===`ending`;t.set(e.id,{value:e,domIndex:i,visibleIndex:a?-1:n,offsetY:r}),r+=e.height||0,a||(n+=1)}),t}function Su(e,t){let n=0;return e.map(e=>{if(e.transitionStatus===`ending`)return e;let r=n>=t;return n+=1,e.limited===r?e:{...e,limited:r}})}var Z={toasts:e=>e.toasts,isEmpty:e=>e.toasts.length===0,toast:(e,t)=>e.toastMetadata.get(t)?.value,toastIndex:(e,t)=>e.toastMetadata.get(t)?.domIndex??-1,toastOffsetY:(e,t)=>e.toastMetadata.get(t)?.offsetY??0,toastVisibleIndex:(e,t)=>e.toastMetadata.get(t)?.visibleIndex??-1,focused:e=>e.focused,expanded:e=>e.hovering||e.focused,expandedOrOutOfFocus:e=>e.hovering||e.focused||!e.isWindowFocused,prevFocusElement:e=>e.prevFocusElement},Cu=class extends Qe{timers=new Map;areTimersPaused=!1;constructor(e){super({...e,toastMetadata:xu(e.toasts)},{},Z)}setViewport=e=>{this.set(`viewport`,e)};syncProviderProps(e,t){let n=this.state.limit!==t;if(this.state.timeout===e&&!n)return;let r={timeout:e,limit:t};if(n){let e=Su(this.state.toasts,t);r.toasts=e,r.toastMetadata=xu(e)}this.update(r)}disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,t=!1){let n=Z.toastIndex(this.state,e);if(n===-1)return;let r=this.state.toasts[n];t||r?.onRemove?.();let i=[...this.state.toasts];i.splice(n,1),this.setToasts(i)}addToast=e=>{let{timeout:t,limit:n}=this.state,r=e.id||yu(`toast`);if(e.id){let t=Z.toast(this.state,e.id);if(t){if(t.transitionStatus===`ending`)this.removeToast(e.id,!0);else{let{id:t,transitionStatus:n,...r}=e;return this.updateToastInternal(e.id,r,!0,!0),e.id}}}let i={...e,id:r,updateKey:0,transitionStatus:`starting`},a=[i,...this.state.toasts];this.setToasts(Su(a,n));let o=i.timeout??t;return i.type!==`loading`&&o>0&&this.scheduleTimer(r,o,()=>this.closeToast(r)),Z.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),r};updateToast=(e,t)=>{let n=Z.toast(this.state,e);n&&n.transitionStatus!==`ending`&&this.updateToastInternal(e,typeof t==`function`?t(n):t,!1,!0)};updateToastInternal=(e,t,n=!1,r=!1)=>{let{timeout:i,toasts:a}=this.state,o=Z.toast(this.state,e);if(!o||o.transitionStatus===`ending`)return;let s={...o,...t,...r&&{updateKey:o.updateKey+1}};this.setToasts(a.map(t=>t.id===e?s:t));let c=s.timeout??i,l=o.timeout??i,u=Object.hasOwn(t,`timeout`),d=s.transitionStatus!==`ending`&&s.type!==`loading`&&c>0,f=this.timers.has(e),p=l!==c,m=o.type===`loading`;!d&&f?this.clearTimer(e):d&&(!f||p||u||m||n)&&(this.clearTimer(e),this.scheduleTimer(e,c,()=>this.closeToast(e)),Z.expandedOrOutOfFocus(this.state)&&this.pauseTimers())};closeToast=e=>{let t=e===void 0,{limit:n,toasts:r}=this.state,i;if(t)i=r,this.clearTimers();else{let t=Z.toast(this.state,e);if(!t)return;i=[t],this.clearTimer(e)}let a=Su(r.map(n=>t||n.id===e?{...n,transitionStatus:`ending`,height:0}:n),n);this.setToasts(a,!a.some(e=>e.transitionStatus!==`ending`)),i.forEach(e=>{e.transitionStatus!==`ending`&&e.onClose?.()}),this.handleFocusManagement(e)};promiseToast=(e,t)=>{let n=bu(t.loading),r=this.addToast({...n,type:`loading`}),i=e.then(e=>{let n=bu(t.success,e);return this.updateToast(r,{...n,type:`success`,timeout:n.timeout}),e}).catch(e=>{let n=bu(t.error,e);return this.updateToast(r,{...n,type:`error`,timeout:n.timeout}),Promise.reject(e)});return{}.hasOwnProperty.call(t,`setPromise`)&&t.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{e.timeout&&(e.timeout.clear(),e.remaining=Math.max(e.remaining-(Date.now()-e.start),0))}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,t)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=St.create(),e.timeout.start(e.remaining,()=>{this.handleTimerFired(t),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if(e.pointerType!==`touch`)return;let t=N(e);wt(this.state.viewport,t)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,t,n){let r=Date.now(),i=Z.expandedOrOutOfFocus(this.state)?void 0:St.create();i?.start(t,()=>{this.handleTimerFired(e),n()}),this.timers.set(e,{timeout:i,start:r,delay:t,remaining:t,callback:n})}clearTimers(){this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear(),this.areTimersPaused=!1}clearTimer(e){this.timers.get(e)?.timeout?.clear(),this.timers.delete(e),this.resetPausedStateIfNoTimersRemain()}handleTimerFired(e){this.timers.delete(e),this.resetPausedStateIfNoTimersRemain()}resetPausedStateIfNoTimersRemain(){this.timers.size===0&&(this.areTimersPaused=!1)}setToasts(e,t=e.length===0){let n={toasts:e,toastMetadata:xu(e)};t&&(n.hovering=!1,n.focused=!1),this.update(n)}handleFocusManagement(e){let t=Et(nt(this.state.viewport));if(!this.state.viewport||!wt(this.state.viewport,t)||!Ct(t))return;if(e===void 0){this.restoreFocusToPrevElement();return}let n=Z.toasts(this.state),r=Z.toastIndex(this.state,e),i=(e,t)=>{for(let r=e;r>=0&&r<n.length;r+=t)if(n[r].transitionStatus!==`ending`)return n[r];return null},a=i(r+1,1)??i(r-1,-1);a?a.ref?.current?.focus():this.restoreFocusToPrevElement()}},wu=function(e){let{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,a=pt(()=>new Cu({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return Ze(a.disposeEffect),K.useEffect(function(){if(i)return i[` subscribe`](({action:e,options:t})=>{let n=t.id;e===`promise`&&t.promise?a.promiseToast(t.promise,t):e===`update`&&n?a.updateToast(n,t.updates):e===`close`?a.closeToast(n):a.addToast(t)})},[a,i]),(0,G.jsxs)(gu.Provider,{value:a,children:[(0,G.jsx)(Tu,{store:a,timeout:n,limit:r}),t]})};function Tu(e){let{store:t,timeout:n,limit:r}=e;return _t(()=>{t.syncProviderProps(n,r)},[t,n,r]),null}var Eu=`--toast-frontmost-height`,Du=K.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=_u(),c=et(),l=K.useRef(!1),u=K.useRef(!1),d=K.useRef(!1),f=s.useState(`isEmpty`),p=s.useState(`toasts`),m=s.useState(`focused`),h=s.useState(`expanded`),g=s.useState(`prevFocusElement`),_=p[0]?.height,v=p.some(e=>e.transitionStatus===`ending`),y=p.filter(e=>e.priority===`high`);K.useEffect(()=>{let e=s.state.viewport;if(!e||f)return;let t=vt(e),n=nt(e);function r(t){t.key===`F6`&&N(t)!==e&&(t.preventDefault(),s.set(`prevFocusElement`,Et(n)),e?.focus({preventScroll:!0}),s.pauseTimers(),s.set(`focused`,!0))}function i(e){N(e)===t&&(s.set(`isWindowFocused`,!1),s.pauseTimers())}function a(n){if(n.relatedTarget)return;let r=N(n),i=Et(nt(e));r!==t&&wt(e,r)&&Ct(i)||s.resumeTimers(),c.start(0,()=>s.set(`isWindowFocused`,!0))}return dt(lt(t,`keydown`,r),lt(t,`blur`,i,!0),lt(t,`focus`,a,!0),lt(n,`pointerdown`,s.handleDocumentPointerDown,!0))},[s,c,f]);function ee(e){l.current=!0;let t=e.relatedTarget===s.state.viewport?p.find(e=>e.transitionStatus!==`ending`&&!e.limited):void 0;t?t.ref?.current?.focus():s.restoreFocusToPrevElement()}function te(e){e.key===`Tab`&&e.shiftKey&&N(e.nativeEvent)===s.state.viewport&&(e.preventDefault(),s.restoreFocusToPrevElement())}function ne(){s.state.toasts.some(e=>e.transitionStatus===`ending`)||d.current||!u.current||(s.set(`hovering`,!1),s.select(`expandedOrOutOfFocus`)||s.resumeTimers(),u.current=!1)}K.useEffect(ne,[v,s]);function re(){s.pauseTimers(),s.set(`hovering`,!0),u.current=!1}function ie(){u.current=!0,ne()}function b(e){e.pointerType===`touch`&&(d.current=!0)}function ae(e){e.pointerType===`touch`&&(d.current=!1,ne())}function oe(){l.current?l.current=!1:m||Ct(Et(nt(s.state.viewport)))&&(s.set(`focused`,!0),s.pauseTimers())}function x(e){m&&!wt(s.state.viewport,e.relatedTarget)&&(s.set(`focused`,!1),s.select(`expandedOrOutOfFocus`)||s.resumeTimers())}let se={tabIndex:-1,role:`region`,"aria-live":`polite`,"aria-atomic":!1,"aria-relevant":`additions text`,"aria-label":`Notifications`,onMouseEnter:re,onMouseMove:re,onMouseLeave:ie,onFocus:oe,onBlur:x,onKeyDown:te,onClick:oe,onPointerDown:b,onPointerUp:ae,onPointerCancel:ae,style:{[Eu]:_?`${_}px`:void 0}},S={expanded:h},C=!f&&g&&(0,G.jsx)(tt,{onFocus:ee}),ce=P(`div`,e,{ref:[t,s.setViewport],state:S,props:[se,o,{children:(0,G.jsxs)(K.Fragment,{children:[C,a,C]})}]});return(0,G.jsxs)(K.Fragment,{children:[C,ce,!m&&y.length>0&&(0,G.jsx)(`div`,{style:ut,children:y.map(e=>(0,G.jsxs)(`div`,{role:`alert`,"aria-atomic":!0,children:[(0,G.jsx)(`div`,{children:e.title}),(0,G.jsx)(`div`,{children:e.description})]},e.id))})]})}),Ou=K.createContext(void 0);function ku(){let e=K.useContext(Ou);if(!e)throw Error(bt(66));return e}function Au(e,t,n){switch(e){case`up`:return-n;case`down`:return n;case`left`:return-t;case`right`:return t;default:return 0}}var ju=`--toast-index`,Mu=`--toast-offset-y`,Nu=`--toast-height`,Pu=`--toast-swipe-movement-x`,Fu=`--toast-swipe-movement-y`,Iu=`data-swipe-direction`,Lu=e(n(),1),Ru={...Dt,swipeDirection(e){return e?{[Iu]:e}:null}},zu=40,Bu=10,Vu=.5,Hu=1,Uu=`${yt},${xt}`,Wu=K.forwardRef(function(e,t){let{toast:n,render:r,className:i,swipeDirection:a=[`down`,`right`],style:o,...s}=e,c=n.positionerProps?.anchor!==void 0,l=[];c||(l=Array.isArray(a)?a:[a]);let u=l.length>0,d=_u(),[f,p]=K.useState(void 0),[m,h]=K.useState(!1),[g,_]=K.useState(!1),[v,y]=K.useState({x:0,y:0}),[ee,te]=K.useState({x:0,y:0,scale:1}),[ne,re]=K.useState(),[ie,b]=K.useState(),[ae,oe]=K.useState(null),x=K.useRef(null),se=K.useRef(void 0),S=K.useRef({x:0,y:0}),C=K.useRef({x:0,y:0,scale:1}),ce=K.useRef(void 0),w=K.useRef(0),le=K.useRef(!1),T=K.useRef({x:0,y:0}),ue=K.useRef(!1),de=K.useRef({x:0,y:0}),E=K.useRef(null),fe=K.useRef(null),pe=d.useState(`toastIndex`,n.id),me=d.useState(`toastVisibleIndex`,n.id),D=d.useState(`toastOffsetY`,n.id),he=d.useState(`focused`),ge=d.useState(`expanded`);ot({open:n.transitionStatus!==`ending`,ref:x,onComplete(){n.transitionStatus===`ending`&&d.removeToast(n.id)}});let O=Tt((e=!1)=>{let t=x.current;if(!t)return;let r=t.style.height;t.style.height=`auto`;let i=t.offsetHeight;t.style.height=r;function a(){d.updateToastInternal(n.id,{ref:x,height:i,transitionStatus:void 0})}e?Lu.flushSync(a):a()});_t(()=>{let e=se.current;(n.transitionStatus===`starting`||e!==n.id)&&(e!==void 0&&(p(void 0),te({x:0,y:0,scale:1}),k({x:0,y:0})),se.current=n.id,O())},[O,n.id,n.transitionStatus]);function k(e){de.current=e,y(e)}_t(()=>()=>{fe.current?.abort()},[]);function _e(e,t){let n=e=>e>0?e**Vu:-(Math.abs(e)**Vu),r=e>0&&!l.includes(`right`)||e<0&&!l.includes(`left`),i=t>0&&!l.includes(`down`)||t<0&&!l.includes(`up`);return{x:r?n(e):e,y:i?n(t):t}}let ve=Tt(e=>{if(e.pointerId!==E.current)return;E.current=null,fe.current?.abort(),fe.current=null,h(!1),_(!1),oe(null);let t=C.current;if(e.type===`pointercancel`||le.current){k({x:t.x,y:t.y}),p(void 0);return}let r=de.current,i=r.x-t.x,a=r.y-t.y,o;for(let e of l)if(Au(e,i,a)>zu){o=e;break}o?(p(o),d.closeToast(n.id)):(k({x:t.x,y:t.y}),p(void 0))});function ye(e){if(e.button!==0)return;e.pointerType===`touch`&&d.pauseTimers();let t=N(e.nativeEvent);if(mt(t,`button,a,input,textarea,[role="button"],${Uu}`))return;le.current=!1,ce.current=void 0,w.current=0,E.current=e.pointerId,S.current={x:e.clientX,y:e.clientY},T.current=S.current;let n=e.currentTarget,r=Zl(n);C.current=r,te(r),k({x:r.x,y:r.y}),d.set(`hovering`,!0),h(!0),_(!1),oe(null),ue.current=!0,fe.current?.abort();let i=new AbortController;fe.current=i;let a=nt(n);a.addEventListener(`pointerup`,ve,{signal:i.signal}),a.addEventListener(`pointercancel`,ve,{signal:i.signal}),n.setPointerCapture?.(e.pointerId)}function be(e){if(e.pointerId!==E.current)return;e.preventDefault(),ue.current&&=(S.current={x:e.clientX,y:e.clientY},!1);let{clientY:t,clientX:n,movementX:r,movementY:i}=e;(i<0&&t>T.current.y||i>0&&t<T.current.y)&&(T.current={x:T.current.x,y:t}),(r<0&&n>T.current.x||r>0&&n<T.current.x)&&(T.current={x:n,y:T.current.y});let a=n-S.current.x,o=t-S.current.y,s=t-T.current.y,c=n-T.current.x,u=ae;if(!g&&Math.sqrt(a*a+o*o)>=Hu){_(!0);let e=l.includes(`left`)||l.includes(`right`),t=l.includes(`up`)||l.includes(`down`);e&&t&&(u=Math.abs(a)>Math.abs(o)?`horizontal`:`vertical`,oe(u))}let d;if(!ce.current)u===`vertical`?o>0?d=`down`:o<0&&(d=`up`):u===`horizontal`?a>0?d=`right`:a<0&&(d=`left`):d=Math.abs(a)>=Math.abs(o)?a>0?`right`:`left`:o>0?`down`:`up`,d&&l.includes(d)&&(ce.current=d,w.current=Au(d,a,o),p(d));else{let e=ce.current,t=Au(e,c,s);t>zu?(le.current=!1,p(e)):!(l.includes(`left`)&&l.includes(`right`))&&!(l.includes(`up`)&&l.includes(`down`))&&w.current-t>=Bu&&(le.current=!0)}let f=_e(a,o),m=C.current.x,h=C.current.y,v=l.includes(`left`)||l.includes(`right`),y=l.includes(`up`)||l.includes(`down`);u!==`vertical`&&v&&(m+=f.x),u!==`horizontal`&&y&&(h+=f.y),k({x:m,y:h})}function xe(e){if(e.key===`Escape`){if(!x.current||!wt(x.current,Et(nt(x.current))))return;d.closeToast(n.id)}}K.useEffect(()=>{let e=x.current;if(!u||!e)return;function t(t){E.current!==null&&wt(e,N(t))&&t.preventDefault()}return lt(e,`touchmove`,t,{passive:!1})},[u]);function Se(){let e=v.x-ee.x,t=v.y-ee.y;return{transition:m?`none`:void 0,transform:m?`translateX(${v.x}px) translateY(${v.y}px) scale(${ee.scale})`:void 0,[Pu]:`${e}px`,[Fu]:`${t}px`}}let A=n.priority===`high`,Ce={role:A?`alertdialog`:`dialog`,tabIndex:0,"aria-modal":!1,"aria-labelledby":ne,"aria-describedby":ie,"aria-hidden":A&&!he?!0:void 0,onPointerDown:u?ye:void 0,onPointerMove:u?be:void 0,onPointerUp:u?ve:void 0,onPointerCancel:u?ve:void 0,onKeyDown:xe,inert:Xe(n.limited),style:{...Se(),[ju]:n.transitionStatus===`ending`?pe:me,[Mu]:`${D}px`,[Nu]:n.height?`${n.height}px`:void 0}},we=K.useMemo(()=>({toast:n,setTitleId:re,setDescriptionId:b,recalculateHeight:O,visibleIndex:me,expanded:ge}),[n,re,b,O,me,ge]),Te={transitionStatus:n.transitionStatus,expanded:ge,limited:n.limited||!1,type:n.type,swiping:m,swipeDirection:f},Ee=P(`div`,e,{ref:[t,x],state:Te,stateAttributesMapping:Ru,props:[Ce,s]});return(0,G.jsx)(Ou.Provider,{value:we,children:Ee})}),Gu=K.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{visibleIndex:o,expanded:s,recalculateHeight:c}=ku(),l=K.useRef(null);return _t(()=>{c();let e=l.current;if(!e||typeof ResizeObserver!=`function`||typeof MutationObserver!=`function`)return;let t=new ResizeObserver(()=>c(!0)),n=new MutationObserver(()=>c(!0));return t.observe(e),n.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{t.disconnect(),n.disconnect()}},[c]),P(`div`,e,{ref:[t,l],state:{expanded:s,behind:o>0},props:a})});function Ku(e){return e==null||typeof e==`boolean`||e===``?!1:!Array.isArray(e)||e.some(Ku)}function qu(e){return K.isValidElement(e)&&Ku(e.props.children)}function Ju(e,t,n){let{toast:r,setTitleId:i,setDescriptionId:a}=ku(),o=n===`title`?i:a,s=t??(n===`title`?r.title:r.description);return{id:ft(e),children:s,type:r.type,setId:o}}function Yu(e,t,n){let r=qu(e);return _t(()=>{if(r)return n(t),()=>{n(e=>e===t?void 0:e)}},[r,t,n]),r?e:null}var Xu=K.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{id:c,children:l,type:u,setId:d}=Ju(a,o,`description`);return Yu(P(`p`,e,{ref:t,state:{type:u},props:{...s,id:c,children:l}}),c,d)}),Zu=K.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{id:c,children:l,type:u,setId:d}=Ju(a,o,`title`);return Yu(P(`h2`,e,{ref:t,state:{type:u},props:{...s,id:c,children:l}}),c,d)}),Qu=K.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,c=_u(),{toast:l,expanded:u}=ku(),[d,f]=K.useState(!1),{getButtonProps:p,buttonRef:m}=ct({disabled:a,native:o}),h={type:l.type};return P(`button`,e,{ref:[t,m],state:h,props:[{"aria-hidden":!u&&!d,onClick(){c.closeToast(l.id)},onFocus(){f(!0)},onBlur(){f(!1)}},s,p]})}),$u=K.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,{toast:c}=ku(),l=c.actionProps?.children??s.children,{getButtonProps:u,buttonRef:d}=ct({disabled:a,native:o}),f={type:c.type},p=P(`button`,e,{ref:[t,d],state:f,props:[s,c.actionProps,u,{children:l}]});return qu(p)?p:null}),ed=K.forwardRef(function(e,t){return(0,G.jsx)(Te,{ref:t,...e})});function td(){let e=_u(),t=e.useState(`toasts`);return K.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function nd(){let e=new Set;function t(t){e.forEach(e=>e(t))}return{" subscribe":function(t){return e.add(t),()=>{e.delete(t)}},add(e){let n=e.id||yu(`toast`);return t({action:`add`,options:{...e,id:n,transitionStatus:`starting`}}),n},close(e){t({action:`close`,options:{id:e}})},update(e,n){t({action:`update`,options:{id:e,updates:n}})},promise(e,n){let r=e;return t({action:`promise`,options:{...n,promise:e,setPromise(e){r=e}}}),r}}}var rd={default:he,error:ja,info:he,loading:$e,success:ka,warning:b},id={default:O.colorText,error:O.colorError,info:O.colorInfo,loading:O.colorPrimary,success:O.colorSuccess,warning:O.colorWarning},ad=(0,K.memo)(({toast:e,classNames:t,styles:n})=>{let{position:r,swipeDirection:i}=$l(),a=e.data,o=a?.type??`default`,s=a?.closable??!0,c=a?.hideCloseButton??!1,l=s&&!c,u=a?.icon,d=e.title??a?.title,f=e.description??a?.description,p=e.actionProps??a?.actionProps,m=a?.actions,h=id[o],g=u??rd[o],_=o===`loading`,v=()=>g?(0,G.jsx)(`div`,{...M(X.icon,F(Y(`icon`),t?.icon),n?.icon),children:(0,G.jsx)(rt,{color:h,icon:g,size:18,spin:_})}):null,y=()=>m&&m.length>0?(0,G.jsx)(`div`,{...M(X.actions,F(Y(`actions`),t?.actions),n?.actions),children:m.map((e,r)=>(0,G.jsx)($u,{...M([X.action,it.info,hu[e.variant??`primary`]],F(Y(`action`),t?.action),n?.action),onClick:e.onClick,...e.props,children:e.label},r))}):p?(0,G.jsx)($u,{...M([X.action,it.info,X.actionPrimary],F(Y(`action`),t?.action),n?.action),...p}):null;return(0,G.jsx)(Wu,{swipeDirection:i,toast:e,...kt({position:r,type:o}),...M([X.root,mu[r]],F(Y(),t?.root),{...n?.root,...a?.style}),children:(0,G.jsx)(Gu,{...M(X.content,F(Y(`content`),t?.content),n?.content),children:(0,G.jsxs)(`div`,{...M(X.toastBody,Y(`body`)),children:[v(),(0,G.jsxs)(`div`,{...M(X.contentArea,Y(`main`)),children:[d?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{...M(X.titleRow,Y(`title-row`)),children:[(0,G.jsx)(Zu,{...M(X.title,F(Y(`title`),t?.title),n?.title),children:d}),l&&(0,G.jsx)(Qu,{"aria-label":`Close`,...M(X.close,F(Y(`close`),t?.close),n?.close),children:(0,G.jsx)(st,{size:14})})]}),f&&(0,G.jsx)(Xu,{...M([X.description,X.descriptionWithTitle],F(Y(`description`),t?.description),n?.description),children:f})]}):f&&(0,G.jsxs)(`div`,{...M(X.titleRow,Y(`title-row`)),children:[(0,G.jsx)(Xu,{...M([X.description,X.descriptionStandalone],F(Y(`description`),t?.description),n?.description),children:f}),l&&(0,G.jsx)(Qu,{"aria-label":`Close`,...M(X.close,F(Y(`close`),t?.close),n?.close),children:(0,G.jsx)(st,{size:14})})]}),y()]})]})})})});ad.displayName=`ToastItem`;var od=[`top`,`top-left`,`top-right`,`bottom`,`bottom-left`,`bottom-right`],sd={duration:5e3,limit:5,position:`bottom-right`,swipeDirection:[`down`,`right`]},cd={bottom:nd(),"bottom-left":nd(),"bottom-right":nd(),top:nd(),"top-left":nd(),"top-right":nd()},Q={bottom:new Map,"bottom-left":new Map,"bottom-right":new Map,top:new Map,"top-left":new Map,"top-right":new Map},ld=e=>cd[e],ud=0,dd=()=>`toast-${Date.now().toString(36)}-${(ud++).toString(36)}`,fd=e=>od.find(t=>Q[t].has(e)),pd=(e,t)=>Array.from(Q[e].keys()).at(-1)===t,md=(e,t)=>typeof e==`string`?{description:e,type:t}:{...e,type:t},hd=(e,t)=>({close:()=>uu(()=>ld(t).close(e)),id:e,update:n=>{uu(()=>ld(t).update(e,{data:n,description:n.description,title:n.title}))}}),$=e=>{let t=e.placement??sd.position,n=ld(t),{id:r,onClose:i,onRemove:a}=e;if(r){let e=fd(r);e&&!(e===t&&pd(t,r))&&(Q[e].get(r).superseded=!0,Q[e].delete(r),uu(()=>ld(e).close(r)))}let o=r??dd(),s={superseded:!1};return Q[t].set(o,s),uu(()=>{n.add({id:o,data:e,description:e.description,onClose:()=>{s.superseded||i?.()},onRemove:()=>{s.superseded||(Q[t].delete(o),a?.())},timeout:e.duration??sd.duration,title:e.title})}),hd(o,t)},gd=e=>{if(e)for(let[t,n]of Object.entries(cd))Q[t].delete(e),uu(()=>n.close(e));else for(let[e,t]of Object.entries(cd)){let n=Array.from(Q[e].keys());Q[e].clear(),uu(()=>{for(let e of n)t.close(e)})}},_d=e=>$(md(e,`success`)),vd=e=>$(md(e,`error`)),yd=e=>$(md(e,`info`)),bd=e=>$(md(e,`warning`)),xd=e=>$({duration:0,...md(e,`loading`)});async function Sd(e,t){let n=$({closable:!1,duration:0,type:`loading`,...typeof t.loading==`string`?{description:t.loading}:t.loading});try{let r=await e;return n.close(),$({type:`success`,...typeof t.success==`string`?{description:t.success}:typeof t.success==`function`?{description:t.success(r)}:t.success}),r}catch(e){throw n.close(),$({type:`error`,...typeof t.error==`string`?{description:t.error}:typeof t.error==`function`?{description:t.error(e)}:t.error}),e}}var Cd=Object.assign(e=>$({type:`default`,...e}),{dismiss:gd,error:vd,info:yd,loading:xd,promise:Sd,success:_d,warning:bd}),wd=(0,K.memo)(()=>{let{toasts:e}=td();return e.map(e=>(0,G.jsx)(ad,{toast:e},e.id))});wd.displayName=`ToastList`;var Td=(0,K.memo)(({root:e,className:t,duration:n=5e3,limit:r=5,position:i=`bottom-right`,swipeDirection:a=[`down`,`right`]})=>{let o=Oe(),s=at(),[c,l]=(0,K.useState)(void 0),u=(0,K.useId)();(0,K.useEffect)(()=>ru(u),[u]);let d=(0,K.useSyncExternalStore)(au,()=>iu(u),()=>!1);if((0,K.useEffect)(()=>{d&&(sd={duration:n,limit:r,position:i,swipeDirection:a})},[n,r,i,a,d]),(0,K.useEffect)(()=>{d&&l(ht(`toast`))},[d]),(0,K.useEffect)(()=>{if(d&&o)return du(),()=>{fu()}},[d,o]),!o||!d)return null;let f=e??s??document.body;return od.map(e=>(0,G.jsx)(Ql,{value:{position:e,swipeDirection:a},children:(0,G.jsx)(wu,{limit:r,timeout:n,toastManager:ld(e),children:(0,G.jsx)(ed,{container:f,children:(0,G.jsx)(Du,{"data-position":e,...M([X.viewport,pu[e]],F(Y(`viewport`),t),c===void 0?void 0:{zIndex:c}),children:(0,G.jsx)(wd,{})})})})},e))});Td.displayName=`ToastHost`;var Ed=t({a:()=>na,abbr:()=>Ni,address:()=>Ji,animate:()=>hi,area:()=>Br,article:()=>Li,aside:()=>Qi,audio:()=>Jr,b:()=>Ti,base:()=>oa,bdi:()=>Qr,bdo:()=>ai,big:()=>Vi,blockquote:()=>ki,body:()=>fi,button:()=>li,canvas:()=>Lr,caption:()=>ua,circle:()=>xa,cite:()=>Wr,clipPath:()=>va,code:()=>dr,col:()=>gn,colgroup:()=>ma,create:()=>Xi,data:()=>hr,datalist:()=>Cn,dd:()=>bn,defs:()=>$n,del:()=>Si,desc:()=>un,details:()=>yi,dfn:()=>qn,dialog:()=>Xn,div:()=>nr,dl:()=>En,dt:()=>Fn,ellipse:()=>Wn,em:()=>cr,embed:()=>Ta,feBlend:()=>pn,feColorMatrix:()=>Sr,feComponentTransfer:()=>Mn,feComposite:()=>yr,feConvolveMatrix:()=>Tr,feDiffuseLighting:()=>kn,feDisplacementMap:()=>Vn,feDistantLight:()=>Gi,feDropShadow:()=>Rn,feFlood:()=>jr,feFuncA:()=>Or,feFuncB:()=>Pr,feFuncG:()=>ar,feFuncR:()=>sn,feGaussianBlur:()=>ii,feImage:()=>aa,feMerge:()=>Ii,feMergeNode:()=>Zi,feMorphology:()=>vi,feOffset:()=>Ur,fePointLight:()=>Bi,feSpecularLighting:()=>ta,feSpotLight:()=>Zr,feTile:()=>Oi,feTurbulence:()=>la,fieldset:()=>ti,figcaption:()=>ci,figure:()=>Wi,filter:()=>Mi,footer:()=>mi,foreignObject:()=>di,form:()=>zr,g:()=>pa,h1:()=>wa,h2:()=>qr,h3:()=>ba,h4:()=>mr,h5:()=>yn,h6:()=>_a,head:()=>vr,header:()=>Tn,hgroup:()=>Sn,hr:()=>tr,html:()=>wi,i:()=>fn,iframe:()=>xi,image:()=>Yn,img:()=>Qn,input:()=>ir,ins:()=>On,kbd:()=>Ln,keygen:()=>Kn,label:()=>ur,legend:()=>Da,li:()=>hn,line:()=>wr,linearGradient:()=>Pn,link:()=>xr,main:()=>Dr,map:()=>jn,mark:()=>Un,marker:()=>qi,mask:()=>Bn,menu:()=>Nr,menuitem:()=>Ar,metadata:()=>Ir,meter:()=>sr,nav:()=>ln,object:()=>ni,ol:()=>ra,optgroup:()=>Pi,option:()=>Yi,output:()=>gi,p:()=>Vr,param:()=>Ri,path:()=>$i,pattern:()=>Yr,picture:()=>Ei,polygon:()=>sa,polyline:()=>$r,pre:()=>oi,progress:()=>Hi,q:()=>Ai,radialGradient:()=>pi,rect:()=>ui,rp:()=>Rr,rt:()=>da,ruby:()=>Sa,s:()=>Gr,samp:()=>ya,script:()=>fr,section:()=>_n,select:()=>ha,small:()=>gr,source:()=>wn,span:()=>xn,stop:()=>er,strong:()=>Ci,style:()=>dn,sub:()=>bi,summary:()=>Jn,sup:()=>Zn,svg:()=>rr,symbol:()=>Dn,table:()=>In,tbody:()=>Gn,td:()=>lr,text:()=>Ea,textPath:()=>mn,textarea:()=>Cr,tfoot:()=>Nn,th:()=>br,thead:()=>Er,time:()=>An,title:()=>Hn,tr:()=>Ki,track:()=>zn,tspan:()=>Mr,u:()=>kr,ul:()=>Fr,use:()=>or,video:()=>cn,view:()=>ri,wbr:()=>ia,webview:()=>Fi}),Dd=i();function Od(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var n,r,i,a,o=[],s=``,c=e.split(`/`);for(c[0]||c.shift();i=c.shift();)n=i[0],n===`*`?(o.push(n),s+=i[1]===`?`?`(?:/(.*))?`:`/(.*)`):n===`:`?(r=i.indexOf(`?`,1),a=i.indexOf(`.`,1),o.push(i.substring(1,~r?r:~a?a:i.length)),s+=~r&&!~a?`(?:/([^/]+?))?`:`/([^/]+?)`,~a&&(s+=(~r?`?`:``)+`\\`+i.substring(a))):s+=`/`+i;return{keys:o,pattern:RegExp(`^`+s+(t?`(?=$|/)`:`/?$`),`i`)}}var kd=r(),Ad=K.useInsertionEffect,jd=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0?K.useLayoutEffect:K.useEffect,Md=Ad||jd,Nd=e=>{let t=K.useRef([e,(...e)=>t[0](...e)]).current;return Md(()=>{t[0]=e}),t[1]},Pd=[`popstate`,`pushState`,`replaceState`,`hashchange`],Fd=[],Id=()=>Fd.forEach(e=>e()),Ld=e=>(Fd.push(e)===1&&Pd.forEach(e=>addEventListener(e,Id)),()=>{Fd=Fd.filter(t=>t!==e),Fd.length||Pd.forEach(e=>removeEventListener(e,Id))}),Rd=(e,t)=>(0,kd.useSyncExternalStore)(Ld,e,t),zd=()=>location.search,Bd=({ssrSearch:e}={})=>Rd(zd,e==null?zd:()=>e),Vd=()=>location.pathname,Hd=({ssrPath:e}={})=>Rd(Vd,e==null?Vd:()=>e),Ud=(e,{replace:t=!1,state:n=null}={})=>history[t?`replaceState`:`pushState`](n,``,e),Wd=e=>[Hd(e),Ud],Gd=Symbol.for(`wouter_v3`);if(typeof history<`u`&&window[Gd]===void 0){for(let e of[`pushState`,`replaceState`]){let t=history[e];history[e]=function(){let n=t.apply(this,arguments),r=new Event(e);return r.arguments=arguments,dispatchEvent(r),n}}Object.defineProperty(window,Gd,{value:!0})}var Kd=(e=``)=>e===`/`?``:e,qd=(e,t)=>e[0]===`~`?e.slice(1):Kd(t)+e,Jd=(e,t)=>(e=Yd(Kd(e)),t=Yd(t),!e||(t.toLowerCase()+`/`).startsWith(e.toLowerCase()+`/`)?t.slice(e.length)||`/`:`~`+t),Yd=e=>{try{return e.includes(`%`)?decodeURI(e):e}catch{return e}},Xd={hook:Wd,searchHook:Bd,parser:Od,base:``,ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:e=>e,aroundNav:(e,t,n)=>e(t,n)},Zd=(0,K.createContext)(Xd),Qd=()=>(0,K.useContext)(Zd);(0,K.createContext)({});var $d=e=>{let[t,n]=e.hook(e);return[Jd(e.base,t),Nd((t,r)=>e.aroundNav(n,qd(t,e.base),r))]},ef=()=>$d(Qd());(0,K.forwardRef)((e,t)=>{let n=Qd(),[r,i]=$d(n),{to:a=``,href:o=a,onClick:s,asChild:c,children:l,className:u,replace:d,state:f,transition:p,...m}=e;return m.onClick=Nd(t=>{t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||t.button!==0||(s?.(t),t.defaultPrevented||(t.preventDefault(),i(o,e)))}),m.href=n.hrefs(o[0]===`~`?o.slice(1):n.base+o,n),u!==void 0&&(m.className=u?.call?u(r===o):u),t&&(m.ref=t),c&&(0,K.isValidElement)(l)?(0,K.cloneElement)(l,m):(0,K.createElement)(`a`,m,l)});var tf=new Set;function nf(e){return tf.add(e),()=>{tf.delete(e)}}function rf(e){for(let t of tf)t(e)}function af(e){return`${e.protocol===`https:`?`wss`:`ws`}://${e.host}/ws?at=${encodeURIComponent(e.pathname)}`}function of(e,t){let[n,r]=(0,K.useState)(!1),i=(0,K.useRef)({onMessage:e,onOpen:t}),a=(0,K.useRef)(null),o=(0,K.useRef)([]);return i.current={onMessage:e,onOpen:t},(0,K.useEffect)(()=>{let e=null,t,n=!1,s=()=>{e=new WebSocket(af(location)),a.current=e,e.onopen=()=>{r(!0);for(let t of o.current.splice(0))e?.send(t);i.current.onOpen?.()},e.onclose=()=>{r(!1),n||(t=setTimeout(s,1e3))},e.onmessage=e=>{let t=JSON.parse(String(e.data));i.current.onMessage(t),rf(t)}};return s(),()=>{n=!0,clearTimeout(t),e?.close()}},[]),{live:n,send:(0,K.useCallback)(e=>{let t=a.current,n=JSON.stringify(e);t?.readyState===WebSocket.OPEN?t.send(n):o.current.length<50&&o.current.push(n)},[])}}function sf(){let[e,t]=(0,K.useState)([]);return(0,K.useEffect)(()=>{let e=null,n,r=!1,i=()=>{e=new WebSocket(af(location)),e.onmessage=e=>{let n=JSON.parse(String(e.data));n.type===`agent-status`&&t(n.sessions)},e.onclose=()=>{t([]),r||(n=setTimeout(i,1e3))}};return i(),()=>{r=!0,clearTimeout(n),e?.close()}},[]),e}var cf=(0,K.lazy)(()=>f(async()=>{let{AgentStatusPill:e}=await import(`./AgentStatusPill-DdylWGRv.js`);return{AgentStatusPill:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]),import.meta.url).then(({AgentStatusPill:e})=>({default:e})));function lf({artifact:e}){let t=sf();return t.length===0?null:(0,G.jsx)(K.Suspense,{fallback:null,children:(0,G.jsx)(cf,{artifact:e,sessions:t})})}var uf=0,df=0,ff=new Set;function pf(){df||uf>0||ff.size===0||(df=requestAnimationFrame(()=>{if(df=0,uf>0)return;let e=[...ff];ff.clear();for(let t of e)t()}))}function mf(){return uf+=1,()=>{--uf,pf()}}function hf({label:e}){return(0,K.useEffect)(mf,[]),(0,G.jsx)(a,{stack:!0,label:e,size:32})}var gf=1e3,_f=`ryugi:embed:hello`,vf=`ryugi:embed:heartbeat`,yf=`ryugi:embed:painted`,bf=`ryugi:embed:position`,xf=`ryugi:embed:positioned`;function Sf({parentOrigin:e,onPosition:t,win:n=window}){let r=(t,r)=>n.parent.postMessage({type:t,...r},e),i=i=>{if(i.origin!==e||i.source!==n.parent)return;let a=i.data;a?.type===bf&&a.anchor&&t&&t(a.anchor).then(()=>r(xf))};n.addEventListener(`message`,i),r(_f,t?{position:!0}:void 0);let a=setInterval(()=>r(vf),gf),o=!1;return{painted(){o||(o=!0,r(yf))},close(){clearInterval(a),n.removeEventListener(`message`,i)}}}function Cf(e=document,t=window,n){let r=e.documentElement.dataset.ryugiEmbedParent;return r?Sf({parentOrigin:r,onPosition:n,win:t}):null}var wf=()=>new Promise(e=>requestAnimationFrame(()=>requestAnimationFrame(()=>e()))),Tf=e=>(Le(e),wf()),Ef=(0,K.createContext)(()=>{});function Df(){let e=(0,K.useRef)(null),t=(0,K.useRef)(!1);return(0,K.useEffect)(()=>{let n=Cf(document,window,Tf);return e.current=n,t.current&&n?.painted(),()=>{n?.close(),e.current=null}},[]),(0,K.useCallback)(()=>{t.current=!0,e.current?.painted()},[])}function Of(e){let t=(0,K.useContext)(Ef);(0,K.useEffect)(()=>{if(!e)return;let n=0,r=requestAnimationFrame(()=>{n=requestAnimationFrame(()=>{t(),He()&&Ae({kind:`painted`})})});return()=>{cancelAnimationFrame(r),cancelAnimationFrame(n)}},[e,t])}var kf=(0,K.lazy)(()=>f(async()=>{let{AutoPublishBar:e}=await import(`./AutoPublishPrompt-vxlYFZUC.js`);return{AutoPublishBar:e}},__vite__mapDeps([19,1,2,3,4,5,6,7,20,14,8,21,22]),import.meta.url).then(({AutoPublishBar:e})=>({default:e}))),Af=(0,K.lazy)(()=>f(async()=>{let{SettingsDialog:e}=await import(`./SettingsDialog-5Ijnmcks.js`);return{SettingsDialog:e}},__vite__mapDeps([23,1,2,3,4,5,6,7,24,25,14,26,27,28,29,10,30,31,32,8,21,22,33,34]),import.meta.url).then(({SettingsDialog:e})=>({default:e}))),jf=(0,K.lazy)(()=>f(async()=>{let{ArtboardLayout:e}=await import(`./ArtboardLayout-C8odRO5-.js`);return{ArtboardLayout:e}},__vite__mapDeps([35,1,2,3,4,5,6,7,24,25,14,26,36,37,38,8,9,10,39,40,41,42,32,13,43,28,44,45,46,47,31,34,48,49,50,20,51,21,22,52,53,54,55,27,56,57,58,59,60,12,30,15,16,18,61,62,63,64,65]),import.meta.url).then(({ArtboardLayout:e})=>({default:e}))),Mf=(0,K.lazy)(()=>f(async()=>{let{ArtifactList:e}=await import(`./ArtifactList-C4VguTYP.js`);return{ArtifactList:e}},__vite__mapDeps([66,1,2,3,4,5,6,7,24,25,14,26,40,41,37,42,32,13,43,10,28,67,38,54,68,46,47,31,29,30,8,21,22,69,34,62,39]),import.meta.url).then(({ArtifactList:e})=>({default:e}))),Nf=(0,K.lazy)(()=>f(async()=>{let{DocumentLayout:e}=await import(`./DocumentLayout-Bv6Ni6pv.js`);return{DocumentLayout:e}},__vite__mapDeps([70,1,2,3,4,5,6,7]),import.meta.url).then(({DocumentLayout:e})=>({default:e}))),Pf=(0,K.lazy)(()=>f(async()=>{let{HtmlLayout:e}=await import(`./HtmlLayout-CylXOB7G.js`);return{HtmlLayout:e}},__vite__mapDeps([71,1,3,4,50,2,5,6,7,24,25,14,26,40,41,37,42,32,13,43,10,28,48,20,51,8,21,22,52,34,69,61,62,72,64]),import.meta.url).then(({HtmlLayout:e})=>({default:e}))),Ff=(0,K.lazy)(()=>f(async()=>{let{VerifyLayout:e}=await import(`./VerifyLayout-CDNbksiX.js`);return{VerifyLayout:e}},__vite__mapDeps([73,1,2,3,4,5,6,7,24,25,14,26,36,37,38,8,9,10,39,74,41,42,32,13,43,48,49,75,53,55,27,76,68,47,31,77,78,79,80,81,82,83,84,85,16,15,72,86,87,34,50,40,28,20,51,21,22,52,57,88,89]),import.meta.url).then(({VerifyLayout:e})=>({default:e}))),If=(0,K.lazy)(()=>f(async()=>{let{WhiteboardLayout:e}=await import(`./WhiteboardLayout-FAO1qkk_.js`);return{WhiteboardLayout:e}},__vite__mapDeps([90,1,2,3,4,5,6,7,24,25,14,26,41,37,13,45,46,47,31,34,49,76,60,8,9,10,12,22,18,59,33,52,91,92,93]),import.meta.url).then(({WhiteboardLayout:e})=>({default:e}))),Lf=(0,K.lazy)(()=>Promise.all([f(()=>import(`./SplitShell-DDxrJzzq.js`),__vite__mapDeps([94,1,2,3,4,5,6,7,24,25,14,26,37,44,43,75,53,95,46,47,31,86,34,8,15,18,62,88,96]),import.meta.url),f(()=>import(`./local-split-host-DlzWe0xb.js`),__vite__mapDeps([97,22,2,1,3,4,5,6,7,86,24,25,14,26]),import.meta.url)]).then(([{SplitShell:e},{localSplitHost:t}])=>({default:n=>(0,G.jsx)(e,{...n,host:t})}))),Rf=(0,K.lazy)(()=>f(async()=>{let{PreviewLayout:e}=await import(`./PreviewLayout-DxPulKHq.js`).then(e=>e.n);return{PreviewLayout:e}},__vite__mapDeps([98,1,2,3,4,5,6,7,8,22,58]),import.meta.url).then(({PreviewLayout:e})=>({default:e}))),zf=(e,t)=>(0,G.jsxs)(G.Fragment,{children:[e,(0,G.jsx)(kf,{}),(0,G.jsx)(Af,{}),t&&(0,G.jsx)(lf,{artifact:t})]});function Bf({id:e,type:t}){let n=Df();return(0,G.jsx)(Ef,{value:n,children:t===`whiteboard`?(0,G.jsx)(If,{id:e}):t===`document`?(0,G.jsx)(Nf,{id:e}):t===`verify`?(0,G.jsx)(Ff,{id:e}):(0,G.jsx)(jf,{id:e})})}function Vf(){let[e]=ef(),t=l(e);if((0,K.useEffect)(()=>{if(!document.documentElement.dataset.ryugiArtifactId)return;let e=document.querySelector(`link[rel="canonical"]`);if(!e)return;let t=new URL(location.href);t.pathname=u(t.pathname,new URL(e.href).pathname),t.href!==location.href&&history.replaceState(history.state,``,t)},[]),(0,K.useEffect)(()=>{window.scrollTo(0,0)},[e]),t.kind===`list`)return zf((0,G.jsx)(Mf,{}));if(t.kind===`unknown`)return(0,G.jsx)(`div`,{className:`x78zum5 x6s0dn4 xl56j7k x5yr21d xggk2y7 x1bo0w0s xqfszdh xif65rj`,children:`No artifact lives at this address.`});let n=document.documentElement.dataset.ryugiArtifactId??t.id;return t.kind===`preview`?(0,G.jsx)(Rf,{id:n,type:t.type}):t.kind===`embed`?(0,G.jsx)(Bf,{id:n,type:t.type}):t.type===`html`?zf((0,G.jsx)(Pf,{id:n}),`html/${n}`):zf((0,G.jsx)(Lf,{id:n,split:Ve(t,location.search)?.split??null,type:t.type}),`${t.type}/${n}`)}function Hf(){return(0,G.jsx)(K.Suspense,{fallback:(0,G.jsx)(`div`,{className:`x78zum5 x6s0dn4 xl56j7k x5yr21d xggk2y7 x1bo0w0s xqfszdh xif65rj`,children:(0,G.jsx)(hf,{label:o(`common.loading`)})}),children:(0,G.jsx)(Vf,{})})}document.documentElement.lang=s[d.language];function Uf(){return c(),(0,G.jsx)(yc,{features:Cl,children:(0,G.jsxs)(C,{enableCustomFonts:!1,motion:Ed,children:[(0,G.jsx)(Hf,{}),(0,G.jsx)(qe,{}),(0,G.jsx)(Td,{}),(0,G.jsx)(Xl,{})]})})}(0,Dd.createRoot)(document.getElementById(`root`)).render((0,G.jsx)(K.StrictMode,{children:(0,G.jsx)(Uf,{})}));export{Cd as a,Ml as c,Al as d,wl as f,of as i,jl as l,hf as n,Zl as o,ja as p,nf as r,J as s,Of as t,Rl as u};