@miravo/cli-linux-arm64-musl 0.10.0 → 0.12.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 (137) hide show
  1. package/console-dist/assets/{AnimatePresence-BZCmb1bq.js → AnimatePresence-BSSlw02V.js} +3 -3
  2. package/console-dist/assets/{activity-Cn48I9qe.js → activity-Cy_niK56.js} +1 -1
  3. package/console-dist/assets/api-Dw9ti2cu.js +1 -0
  4. package/console-dist/assets/{api-kPM52mb-.js → api-tM5PSXjr.js} +1 -1
  5. package/console-dist/assets/arrow-up-right-CwPw_2U1.js +1 -0
  6. package/console-dist/assets/asset-detail-C4zF_8rm.js +1 -0
  7. package/console-dist/assets/asset-detail-actions-Dv9g2Z9t.js +1 -0
  8. package/console-dist/assets/{auth-screen-backdrop-hcEYy3K4.js → auth-screen-backdrop-CEykEbfF.js} +1 -1
  9. package/console-dist/assets/backup-power-CAc85zvh.js +1 -0
  10. package/console-dist/assets/badge-Bk1DaL6C.js +1 -0
  11. package/console-dist/assets/boiler-BQwqgoVY.js +1 -0
  12. package/console-dist/assets/by-path-DmADo_qX.js +1 -0
  13. package/console-dist/assets/catalog-BMLSbdye.js +1 -0
  14. package/console-dist/assets/catalog-Ccubt-hm.js +1 -0
  15. package/console-dist/assets/{catalog-source-2aT9qob-.js → catalog-source-B4L5N-a1.js} +1 -1
  16. package/console-dist/assets/catalog-template-icons-DGyxSm-F.js +1 -0
  17. package/console-dist/assets/check-B-yvIfMj.js +1 -0
  18. package/console-dist/assets/checkbox-DEAkDfFr.js +1 -0
  19. package/console-dist/assets/chevron-down-x70Pto6j.js +1 -0
  20. package/console-dist/assets/chevron-right-CrNKVFcI.js +1 -0
  21. package/console-dist/assets/chiller-Jug0vRg-.js +1 -0
  22. package/console-dist/assets/{circle-x-CGcRflg7.js → circle-x-6JtFdy1_.js} +1 -1
  23. package/console-dist/assets/combobox-B8h0-NHs.js +1 -0
  24. package/console-dist/assets/commercial-building-CINKWcQV.js +1 -0
  25. package/console-dist/assets/compressor-BkWNdwvy.js +1 -0
  26. package/console-dist/assets/console-panel-Cg2sBJcN.js +1 -0
  27. package/console-dist/assets/control-B-TcWj5c.js +1 -0
  28. package/console-dist/assets/control-DXA-_1Gu.js +1 -0
  29. package/console-dist/assets/copy-button-CSUP1VjU.js +1 -0
  30. package/console-dist/assets/{dialog-Di9Bs0FH.js → dialog-B5PqrKVw.js} +1 -1
  31. package/console-dist/assets/district-heating-DqGtrEKq.js +1 -0
  32. package/console-dist/assets/dom-CQuChC3G.js +1 -0
  33. package/console-dist/assets/{download-B9e1wNK4.js → download-i8CTJ7oi.js} +1 -1
  34. package/console-dist/assets/{local-flag-CPAqDO-L.js → dropdown-menu-B_MMNbTy.js} +1 -1
  35. package/console-dist/assets/events-Dz_zsLGE.js +1 -0
  36. package/console-dist/assets/events-format-C5HTkIsC.js +1 -0
  37. package/console-dist/assets/events-iYGC0JpW.js +1 -0
  38. package/console-dist/assets/export-tab-BS4GlLBV.js +1 -0
  39. package/console-dist/assets/factory-BCPLmUx4.js +1 -0
  40. package/console-dist/assets/factory-CBXx3oBo.js +1 -0
  41. package/console-dist/assets/floor-page-BOlkyLaW.js +1 -0
  42. package/console-dist/assets/floor-page-E-0txA4z.css +1 -0
  43. package/console-dist/assets/format-Bx7DF-TB.js +1 -0
  44. package/console-dist/assets/genset-DBpkUT9p.js +1 -0
  45. package/console-dist/assets/{get-error-message-eGdenTLv.js → get-error-message-CEvauOXv.js} +1 -1
  46. package/console-dist/assets/index-B7ZG1VO6.js +12 -0
  47. package/console-dist/assets/index-CrLa65Ur.css +2 -0
  48. package/console-dist/assets/{integration-api-Bg7D1eQc.js → integration-api-iM6SWQ6d.js} +1 -1
  49. package/console-dist/assets/integrations-Bw0jY-xH.js +1 -0
  50. package/console-dist/assets/integrations-NcPRP3je.js +1 -0
  51. package/console-dist/assets/{label-DWyy9MeT.js → label-2sIXTEUK.js} +1 -1
  52. package/console-dist/assets/loader-circle-DjgHgHHl.js +1 -0
  53. package/console-dist/assets/{login-BZKYK0yZ.js → login-snbitj6V.js} +1 -1
  54. package/console-dist/assets/minus-CaT9UaQx.js +1 -0
  55. package/console-dist/assets/models-CsdLFBfC.js +1 -0
  56. package/console-dist/assets/models-Dy_JFNac.js +1 -0
  57. package/console-dist/assets/not-found-Cc35S-lZ.js +1 -0
  58. package/console-dist/assets/pause-CqW7v5Dc.js +1 -0
  59. package/console-dist/assets/pharma-cleanroom-CBgNUnIv.js +1 -0
  60. package/console-dist/assets/plus-Cl4Ay5Ry.js +1 -0
  61. package/console-dist/assets/protocol-card-Cp8O59cX.js +1 -0
  62. package/console-dist/assets/proxy-CWZabK8f.js +1 -0
  63. package/console-dist/assets/query-fetch-error-CWLZA2L5.js +1 -0
  64. package/console-dist/assets/{radio-DRkzblxj.js → radio-BxpVYiyS.js} +1 -1
  65. package/console-dist/assets/registry-Kj-oMlVm.js +2 -0
  66. package/console-dist/assets/{rocket-807Pf7C1.js → rocket-KZ5oHK1G.js} +1 -1
  67. package/console-dist/assets/rtu-BR4DhLbE.js +1 -0
  68. package/console-dist/assets/select-BWlrSYlA.js +1 -0
  69. package/console-dist/assets/{select-display-items-D-L3PesO.js → select-display-items-DN2G8DNG.js} +1 -1
  70. package/console-dist/assets/{server-CS2Tw__K.js → server-BVem_egD.js} +1 -1
  71. package/console-dist/assets/shallow-Cin0mLuv.js +1 -0
  72. package/console-dist/assets/sliders-horizontal-BNKmYQgd.js +1 -0
  73. package/console-dist/assets/smart-factory-DozakG3N.js +1 -0
  74. package/console-dist/assets/{source-host-miravo-D_AecPVc.js → source-host-miravo-B8eM2IHw.js} +1 -1
  75. package/console-dist/assets/stages-C0cErwSQ.js +1 -0
  76. package/console-dist/assets/status-DNfdEhTs.js +1 -0
  77. package/console-dist/assets/status-kit-BLG7OeIE.js +1 -0
  78. package/console-dist/assets/tabs-Ch_VG8_S.js +1 -0
  79. package/console-dist/assets/tags-BRYVC9vb.js +1 -0
  80. package/console-dist/assets/tags-bloWH2Qa.js +4 -0
  81. package/console-dist/assets/tank-xgQfMS2d.js +1 -0
  82. package/console-dist/assets/tooltip-B3vOB1Vu.js +1 -0
  83. package/console-dist/assets/{transition-nav-link-cn4KZD6W.js → transition-nav-link-CBN2nulP.js} +1 -1
  84. package/console-dist/assets/{trash-2-BJ-1df0F.js → trash-2-BH9HDsZv.js} +1 -1
  85. package/console-dist/assets/{triangle-alert-D1AraFcP.js → triangle-alert-DoAwrRgk.js} +1 -1
  86. package/console-dist/assets/use-engine-command-mutation-oLQW2r4F.js +1 -0
  87. package/console-dist/assets/use-transition-navigate-BDkvJJsk.js +2 -0
  88. package/console-dist/assets/useQuery-smgfSdOx.js +1 -0
  89. package/console-dist/assets/validation-BOdAwXQ_.js +1 -0
  90. package/console-dist/assets/water-treatment-BJXMtYlP.js +1 -0
  91. package/console-dist/index.html +68 -54
  92. package/miravo +2 -2
  93. package/package.json +1 -1
  94. package/console-dist/assets/api-DybIIqOe.js +0 -1
  95. package/console-dist/assets/asset-detail-tmOrYE8x.js +0 -1
  96. package/console-dist/assets/badge-D4jktT8T.js +0 -1
  97. package/console-dist/assets/catalog-DN-klsod.js +0 -1
  98. package/console-dist/assets/catalog-M-k7Y9Sp.js +0 -1
  99. package/console-dist/assets/catalog-template-icons-C7KJdJJX.js +0 -1
  100. package/console-dist/assets/checkbox-AaJhjtZk.js +0 -1
  101. package/console-dist/assets/chevron-down-CAk5w9Wt.js +0 -1
  102. package/console-dist/assets/chevron-right-BfZjrUWh.js +0 -1
  103. package/console-dist/assets/combobox-BFEY6lgO.js +0 -1
  104. package/console-dist/assets/control-CD9UoTvu.js +0 -1
  105. package/console-dist/assets/control-DHa2-a2v.js +0 -1
  106. package/console-dist/assets/copy-button-DHm7RGJ5.js +0 -1
  107. package/console-dist/assets/events-D19CzgoQ.js +0 -1
  108. package/console-dist/assets/events-DmftG8n5.js +0 -1
  109. package/console-dist/assets/export-tab-ouFgYEU_.js +0 -1
  110. package/console-dist/assets/factory-CT2VYi0n.js +0 -1
  111. package/console-dist/assets/factory-DSrBtcG2.js +0 -1
  112. package/console-dist/assets/format-OUFL_tef.js +0 -1
  113. package/console-dist/assets/index-DuJJSpJp.js +0 -12
  114. package/console-dist/assets/index-iEV9hU2I.css +0 -2
  115. package/console-dist/assets/integrations-DWW9HjH0.js +0 -1
  116. package/console-dist/assets/integrations-DoXNrzD5.js +0 -1
  117. package/console-dist/assets/models-CrDBHBV5.js +0 -1
  118. package/console-dist/assets/models-jBVcY8Xd.js +0 -1
  119. package/console-dist/assets/not-found-BqVny4Md.js +0 -1
  120. package/console-dist/assets/play-TTg_EXSa.js +0 -1
  121. package/console-dist/assets/plus-BbVbvFTe.js +0 -1
  122. package/console-dist/assets/protocol-card-B2SpAJKe.js +0 -1
  123. package/console-dist/assets/query-fetch-error-C2Ec4RQS.js +0 -1
  124. package/console-dist/assets/select-Bg6PPro0.js +0 -1
  125. package/console-dist/assets/tabs-bI9sskHy.js +0 -1
  126. package/console-dist/assets/tags-B7e7VYVW.js +0 -1
  127. package/console-dist/assets/tags-DJJKQRZZ.js +0 -4
  128. package/console-dist/assets/use-engine-command-mutation-DMkQxmt9.js +0 -1
  129. package/console-dist/assets/use-transition-navigate-BiV2QCcA.js +0 -2
  130. package/console-dist/assets/validation-q38DYDwu.js +0 -1
  131. /package/console-dist/assets/{chunk-OE4NN4TA-Q4iNR9l9.js → chunk-OE4NN4TA-DBWZidbW.js} +0 -0
  132. /package/console-dist/assets/{dist-CtuJWBnP.js → dist-xY0pK9Wy.js} +0 -0
  133. /package/console-dist/assets/{integration-targets-BehiqWyT.js → integration-targets-Byvdd3Or.js} +0 -0
  134. /package/console-dist/assets/{runtime-link-ChF8TM68.js → runtime-link-BRnaEnOm.js} +0 -0
  135. /package/console-dist/assets/{transition-types-049V0Kr0.js → transition-types-BKZuWApE.js} +0 -0
  136. /package/console-dist/assets/{utils-BO2u-wC_.js → utils-XFKvwlFT.js} +0 -0
  137. /package/console-dist/assets/{vendor-table-Br-cHaxY.js → vendor-table-BQAIXM34.js} +0 -0
@@ -21,63 +21,77 @@
21
21
  }
22
22
  </style>
23
23
  <title>Miravo</title>
24
- <script type="module" crossorigin src="/assets/index-DuJJSpJp.js"></script>
24
+ <script type="module" crossorigin src="/assets/index-B7ZG1VO6.js"></script>
25
25
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-COnpUsM8.js">
26
26
  <link rel="modulepreload" crossorigin href="/assets/vendor-charts-95ykyDlI.js">
27
- <link rel="modulepreload" crossorigin href="/assets/chunk-OE4NN4TA-Q4iNR9l9.js">
28
- <link rel="modulepreload" crossorigin href="/assets/api-kPM52mb-.js">
27
+ <link rel="modulepreload" crossorigin href="/assets/chunk-OE4NN4TA-DBWZidbW.js">
28
+ <link rel="modulepreload" crossorigin href="/assets/api-tM5PSXjr.js">
29
29
  <link rel="modulepreload" crossorigin href="/assets/vendor-ui-D8j69UH4.js">
30
- <link rel="modulepreload" crossorigin href="/assets/utils-BO2u-wC_.js">
31
- <link rel="modulepreload" crossorigin href="/assets/format-OUFL_tef.js">
32
- <link rel="modulepreload" crossorigin href="/assets/query-fetch-error-C2Ec4RQS.js">
33
- <link rel="modulepreload" crossorigin href="/assets/badge-D4jktT8T.js">
34
- <link rel="modulepreload" crossorigin href="/assets/AnimatePresence-BZCmb1bq.js">
35
- <link rel="modulepreload" crossorigin href="/assets/activity-Cn48I9qe.js">
36
- <link rel="modulepreload" crossorigin href="/assets/server-CS2Tw__K.js">
37
- <link rel="modulepreload" crossorigin href="/assets/chevron-down-CAk5w9Wt.js">
38
- <link rel="modulepreload" crossorigin href="/assets/circle-x-CGcRflg7.js">
39
- <link rel="modulepreload" crossorigin href="/assets/integration-api-Bg7D1eQc.js">
40
- <link rel="modulepreload" crossorigin href="/assets/dialog-Di9Bs0FH.js">
41
- <link rel="modulepreload" crossorigin href="/assets/copy-button-DHm7RGJ5.js">
42
- <link rel="modulepreload" crossorigin href="/assets/source-host-miravo-D_AecPVc.js">
43
- <link rel="modulepreload" crossorigin href="/assets/tabs-bI9sskHy.js">
44
- <link rel="modulepreload" crossorigin href="/assets/plus-BbVbvFTe.js">
45
- <link rel="modulepreload" crossorigin href="/assets/trash-2-BJ-1df0F.js">
46
- <link rel="modulepreload" crossorigin href="/assets/triangle-alert-D1AraFcP.js">
47
- <link rel="modulepreload" crossorigin href="/assets/dist-CtuJWBnP.js">
48
- <link rel="modulepreload" crossorigin href="/assets/label-DWyy9MeT.js">
49
- <link rel="modulepreload" crossorigin href="/assets/select-Bg6PPro0.js">
50
- <link rel="modulepreload" crossorigin href="/assets/get-error-message-eGdenTLv.js">
51
- <link rel="modulepreload" crossorigin href="/assets/integration-targets-BehiqWyT.js">
52
- <link rel="modulepreload" crossorigin href="/assets/integrations-DoXNrzD5.js">
53
- <link rel="modulepreload" crossorigin href="/assets/local-flag-CPAqDO-L.js">
54
- <link rel="modulepreload" crossorigin href="/assets/chevron-right-BfZjrUWh.js">
55
- <link rel="modulepreload" crossorigin href="/assets/download-B9e1wNK4.js">
56
- <link rel="modulepreload" crossorigin href="/assets/runtime-link-ChF8TM68.js">
57
- <link rel="modulepreload" crossorigin href="/assets/use-engine-command-mutation-DMkQxmt9.js">
58
- <link rel="modulepreload" crossorigin href="/assets/export-tab-ouFgYEU_.js">
59
- <link rel="modulepreload" crossorigin href="/assets/catalog-template-icons-C7KJdJJX.js">
60
- <link rel="modulepreload" crossorigin href="/assets/radio-DRkzblxj.js">
61
- <link rel="modulepreload" crossorigin href="/assets/use-transition-navigate-BiV2QCcA.js">
62
- <link rel="modulepreload" crossorigin href="/assets/transition-nav-link-cn4KZD6W.js">
63
- <link rel="modulepreload" crossorigin href="/assets/protocol-card-B2SpAJKe.js">
64
- <link rel="modulepreload" crossorigin href="/assets/rocket-807Pf7C1.js">
65
- <link rel="modulepreload" crossorigin href="/assets/combobox-BFEY6lgO.js">
66
- <link rel="modulepreload" crossorigin href="/assets/checkbox-AaJhjtZk.js">
67
- <link rel="modulepreload" crossorigin href="/assets/select-display-items-D-L3PesO.js">
68
- <link rel="modulepreload" crossorigin href="/assets/transition-types-049V0Kr0.js">
69
- <link rel="modulepreload" crossorigin href="/assets/factory-DSrBtcG2.js">
70
- <link rel="modulepreload" crossorigin href="/assets/vendor-table-Br-cHaxY.js">
71
- <link rel="modulepreload" crossorigin href="/assets/auth-screen-backdrop-hcEYy3K4.js">
72
- <link rel="modulepreload" crossorigin href="/assets/tags-DJJKQRZZ.js">
73
- <link rel="modulepreload" crossorigin href="/assets/play-TTg_EXSa.js">
74
- <link rel="modulepreload" crossorigin href="/assets/catalog-source-2aT9qob-.js">
75
- <link rel="modulepreload" crossorigin href="/assets/models-jBVcY8Xd.js">
76
- <link rel="modulepreload" crossorigin href="/assets/validation-q38DYDwu.js">
77
- <link rel="modulepreload" crossorigin href="/assets/catalog-M-k7Y9Sp.js">
78
- <link rel="modulepreload" crossorigin href="/assets/control-CD9UoTvu.js">
79
- <link rel="modulepreload" crossorigin href="/assets/events-D19CzgoQ.js">
80
- <link rel="stylesheet" crossorigin href="/assets/index-iEV9hU2I.css">
30
+ <link rel="modulepreload" crossorigin href="/assets/useQuery-smgfSdOx.js">
31
+ <link rel="modulepreload" crossorigin href="/assets/utils-XFKvwlFT.js">
32
+ <link rel="modulepreload" crossorigin href="/assets/format-Bx7DF-TB.js">
33
+ <link rel="modulepreload" crossorigin href="/assets/proxy-CWZabK8f.js">
34
+ <link rel="modulepreload" crossorigin href="/assets/AnimatePresence-BSSlw02V.js">
35
+ <link rel="modulepreload" crossorigin href="/assets/activity-Cy_niK56.js">
36
+ <link rel="modulepreload" crossorigin href="/assets/server-BVem_egD.js">
37
+ <link rel="modulepreload" crossorigin href="/assets/chevron-down-x70Pto6j.js">
38
+ <link rel="modulepreload" crossorigin href="/assets/circle-x-6JtFdy1_.js">
39
+ <link rel="modulepreload" crossorigin href="/assets/integration-api-iM6SWQ6d.js">
40
+ <link rel="modulepreload" crossorigin href="/assets/check-B-yvIfMj.js">
41
+ <link rel="modulepreload" crossorigin href="/assets/dialog-B5PqrKVw.js">
42
+ <link rel="modulepreload" crossorigin href="/assets/tooltip-B3vOB1Vu.js">
43
+ <link rel="modulepreload" crossorigin href="/assets/copy-button-CSUP1VjU.js">
44
+ <link rel="modulepreload" crossorigin href="/assets/source-host-miravo-B8eM2IHw.js">
45
+ <link rel="modulepreload" crossorigin href="/assets/loader-circle-DjgHgHHl.js">
46
+ <link rel="modulepreload" crossorigin href="/assets/plus-Cl4Ay5Ry.js">
47
+ <link rel="modulepreload" crossorigin href="/assets/query-fetch-error-CWLZA2L5.js">
48
+ <link rel="modulepreload" crossorigin href="/assets/trash-2-BH9HDsZv.js">
49
+ <link rel="modulepreload" crossorigin href="/assets/triangle-alert-DoAwrRgk.js">
50
+ <link rel="modulepreload" crossorigin href="/assets/dist-xY0pK9Wy.js">
51
+ <link rel="modulepreload" crossorigin href="/assets/badge-Bk1DaL6C.js">
52
+ <link rel="modulepreload" crossorigin href="/assets/label-2sIXTEUK.js">
53
+ <link rel="modulepreload" crossorigin href="/assets/select-BWlrSYlA.js">
54
+ <link rel="modulepreload" crossorigin href="/assets/tabs-Ch_VG8_S.js">
55
+ <link rel="modulepreload" crossorigin href="/assets/get-error-message-CEvauOXv.js">
56
+ <link rel="modulepreload" crossorigin href="/assets/integration-targets-Byvdd3Or.js">
57
+ <link rel="modulepreload" crossorigin href="/assets/integrations-NcPRP3je.js">
58
+ <link rel="modulepreload" crossorigin href="/assets/vendor-table-BQAIXM34.js">
59
+ <link rel="modulepreload" crossorigin href="/assets/dropdown-menu-B_MMNbTy.js">
60
+ <link rel="modulepreload" crossorigin href="/assets/chevron-right-CrNKVFcI.js">
61
+ <link rel="modulepreload" crossorigin href="/assets/download-i8CTJ7oi.js">
62
+ <link rel="modulepreload" crossorigin href="/assets/auth-screen-backdrop-CEykEbfF.js">
63
+ <link rel="modulepreload" crossorigin href="/assets/combobox-B8h0-NHs.js">
64
+ <link rel="modulepreload" crossorigin href="/assets/tags-bloWH2Qa.js">
65
+ <link rel="modulepreload" crossorigin href="/assets/registry-Kj-oMlVm.js">
66
+ <link rel="modulepreload" crossorigin href="/assets/runtime-link-BRnaEnOm.js">
67
+ <link rel="modulepreload" crossorigin href="/assets/use-engine-command-mutation-oLQW2r4F.js">
68
+ <link rel="modulepreload" crossorigin href="/assets/export-tab-BS4GlLBV.js">
69
+ <link rel="modulepreload" crossorigin href="/assets/shallow-Cin0mLuv.js">
70
+ <link rel="modulepreload" crossorigin href="/assets/arrow-up-right-CwPw_2U1.js">
71
+ <link rel="modulepreload" crossorigin href="/assets/console-panel-Cg2sBJcN.js">
72
+ <link rel="modulepreload" crossorigin href="/assets/validation-BOdAwXQ_.js">
73
+ <link rel="modulepreload" crossorigin href="/assets/asset-detail-actions-Dv9g2Z9t.js">
74
+ <link rel="modulepreload" crossorigin href="/assets/status-kit-BLG7OeIE.js">
75
+ <link rel="modulepreload" crossorigin href="/assets/catalog-template-icons-DGyxSm-F.js">
76
+ <link rel="modulepreload" crossorigin href="/assets/radio-BxpVYiyS.js">
77
+ <link rel="modulepreload" crossorigin href="/assets/use-transition-navigate-BDkvJJsk.js">
78
+ <link rel="modulepreload" crossorigin href="/assets/transition-nav-link-CBN2nulP.js">
79
+ <link rel="modulepreload" crossorigin href="/assets/protocol-card-Cp8O59cX.js">
80
+ <link rel="modulepreload" crossorigin href="/assets/rocket-KZ5oHK1G.js">
81
+ <link rel="modulepreload" crossorigin href="/assets/checkbox-DEAkDfFr.js">
82
+ <link rel="modulepreload" crossorigin href="/assets/select-display-items-DN2G8DNG.js">
83
+ <link rel="modulepreload" crossorigin href="/assets/transition-types-BKZuWApE.js">
84
+ <link rel="modulepreload" crossorigin href="/assets/factory-CBXx3oBo.js">
85
+ <link rel="modulepreload" crossorigin href="/assets/minus-CaT9UaQx.js">
86
+ <link rel="modulepreload" crossorigin href="/assets/catalog-source-B4L5N-a1.js">
87
+ <link rel="modulepreload" crossorigin href="/assets/models-Dy_JFNac.js">
88
+ <link rel="modulepreload" crossorigin href="/assets/sliders-horizontal-BNKmYQgd.js">
89
+ <link rel="modulepreload" crossorigin href="/assets/catalog-BMLSbdye.js">
90
+ <link rel="modulepreload" crossorigin href="/assets/pause-CqW7v5Dc.js">
91
+ <link rel="modulepreload" crossorigin href="/assets/control-B-TcWj5c.js">
92
+ <link rel="modulepreload" crossorigin href="/assets/events-format-C5HTkIsC.js">
93
+ <link rel="modulepreload" crossorigin href="/assets/events-Dz_zsLGE.js">
94
+ <link rel="stylesheet" crossorigin href="/assets/index-CrLa65Ur.css">
81
95
  </head>
82
96
  <body>
83
97
  <div id="root"></div>
package/miravo CHANGED
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/miravo
3
- size: 99528568 bytes
4
- sha256: dad85538fd39a10c16e91b44646244b1ded546ed37af873e8c01115ae4d45b0c
3
+ size: 100315000 bytes
4
+ sha256: 717bb45fc0cc01d8ea6be53c196a6601df91e8665c992d0c81ead4cc285c2a4a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miravo/cli-linux-arm64-musl",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "description": "Miravo platform binary for linux-arm64-musl.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -1 +0,0 @@
1
- import{r as e}from"./api-kPM52mb-.js";export{e as changePassword};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{a as t,c as n,i as r,n as i,o as a,r as o,t as s}from"./vendor-charts-95ykyDlI.js";import{ot as c}from"./vendor-ui-D8j69UH4.js";import{S as l,o as u,ot as d,v as f}from"./api-kPM52mb-.js";import{i as p,n as m,t as ee}from"./query-fetch-error-C2Ec4RQS.js";import{n as h,t as g}from"./badge-D4jktT8T.js";import{i as te,r as ne}from"./dist-CtuJWBnP.js";import{c as re,l as ie}from"./chunk-OE4NN4TA-Q4iNR9l9.js";import{i as _,n as v,o as y,r as b,t as x}from"./dialog-Di9Bs0FH.js";import{C as S,S as C,_ as w,a as T,b as E,c as D,f as O,g as k,i as A,n as j,p as M,r as N,s as ae,u as P}from"./format-OUFL_tef.js";import{n as F,t as I}from"./utils-BO2u-wC_.js";import{t as oe}from"./activity-Cn48I9qe.js";import{n as se,t as ce}from"./circle-x-CGcRflg7.js";import{a as L,n as R,r as z,t as B}from"./copy-button-DHm7RGJ5.js";import{a as V,i as le,o as ue,s as de}from"./validation-q38DYDwu.js";import{a as H,i as fe,n as pe,r as me,t as he}from"./tabs-bI9sskHy.js";import{t as U}from"./play-TTg_EXSa.js";import{t as ge}from"./radio-DRkzblxj.js";import{t as W}from"./trash-2-BJ-1df0F.js";import{t as G}from"./triangle-alert-D1AraFcP.js";import{t as _e}from"./transition-types-049V0Kr0.js";import{n as ve}from"./auth-screen-backdrop-hcEYy3K4.js";import{n as ye}from"./get-error-message-eGdenTLv.js";import{n as be,r as xe,t as Se}from"./use-engine-command-mutation-DMkQxmt9.js";var Ce=F(`layers-2`,[[`path`,{d:`M13 13.74a2 2 0 0 1-2 0L2.5 8.87a1 1 0 0 1 0-1.74L11 2.26a2 2 0 0 1 2 0l8.5 4.87a1 1 0 0 1 0 1.74z`,key:`15q6uc`}],[`path`,{d:`m20 14.285 1.5.845a1 1 0 0 1 0 1.74L13 21.74a2 2 0 0 1-2 0l-8.5-4.87a1 1 0 0 1 0-1.74l1.5-.845`,key:`byia6g`}]]),we=F(`signal`,[[`path`,{d:`M2 20h.01`,key:`4haj6o`}],[`path`,{d:`M7 20v-4`,key:`j294jx`}],[`path`,{d:`M12 20v-8`,key:`i3yub9`}],[`path`,{d:`M17 20V8`,key:`1tkaf5`}],[`path`,{d:`M22 4v16`,key:`sih9yq`}]]),Te=F(`timer`,[[`line`,{x1:`10`,x2:`14`,y1:`2`,y2:`2`,key:`14vaq8`}],[`line`,{x1:`12`,x2:`15`,y1:`14`,y2:`11`,key:`17fdiu`}],[`circle`,{cx:`12`,cy:`14`,r:`8`,key:`1e1u0o`}]]),K=e(n(),1),q=c(),J=`bg-transparent bg-transparent`,Y=`blueprint-title text-foreground`;function Ee(e,t){return t.includes(`rpm`)||t.includes(`speed`)?`e.g. 2500`:t.includes(`temp`)?`e.g. 70.0`:t.includes(`pressure`)?`e.g. 4.5`:e===`Boolean`?`true / false`:e===`String`?`value`:`e.g. 100`}function De({detail:e,methodArgs:t,setMethodArgs:n,onInvoke:r,isPending:i=!1,pendingMethod:a=null}){let o=Object.entries(e.methods);if(o.length===0)return null;let s=o.filter(([,e])=>e.inputArguments.length===0),c=o.filter(([,e])=>e.inputArguments.length>0);return(0,q.jsxs)(`div`,{id:`commands`,className:`flex min-w-0 flex-col gap-3 p-4`,children:[(0,q.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,q.jsx)(`h2`,{className:Y,children:`Commands`}),(0,q.jsx)(`p`,{className:`text-[10px] text-muted-foreground/75`,children:`Executable methods on this asset`})]}),s.length>0&&(0,q.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:s.map(([e,t])=>{let n=a===e&&i,o=n?H:U;return t.description?(0,q.jsxs)(R,{children:[(0,q.jsx)(L,{render:(0,q.jsxs)(S,{size:`sm`,variant:`outline`,disabled:i,title:e,className:I(`h-8 gap-1.5 font-mono text-xs`,J),onClick:()=>r(e),children:[(0,q.jsx)(o,{className:I(`size-3`,n&&`animate-spin`),"aria-hidden":!0}),D(e)]})}),(0,q.jsx)(z,{side:`bottom`,className:`max-w-xs`,children:t.description})]},e):(0,q.jsxs)(S,{size:`sm`,variant:`outline`,disabled:i,title:e,className:I(`h-8 gap-1.5 font-mono text-xs`,J),onClick:()=>r(e),children:[(0,q.jsx)(o,{className:I(`size-3`,n&&`animate-spin`),"aria-hidden":!0}),D(e)]},e)})}),c.length>0&&s.length>0&&(0,q.jsx)(V,{className:`bg-border/60`}),c.map(([e,o])=>{let s=a===e&&i;return(0,q.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,q.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between`,children:[(0,q.jsxs)(`div`,{className:`min-w-0`,children:[(0,q.jsx)(`p`,{title:e,className:`font-mono text-sm font-medium`,children:D(e)}),o.description&&(0,q.jsx)(`p`,{className:`mt-0.5 text-[10px] text-muted-foreground`,children:o.description})]}),(0,q.jsxs)(S,{size:`sm`,variant:`default`,disabled:i,className:`shrink-0`,onClick:()=>r(e),children:[s?(0,q.jsx)(H,{className:`mr-1 size-3 animate-spin`,"aria-hidden":!0}):(0,q.jsx)(U,{className:`mr-1 size-3`,"aria-hidden":!0}),`Execute`]})]}),(0,q.jsx)(`div`,{className:`mt-3 flex flex-col gap-1.5 border-t border-border/50 pt-3`,children:o.inputArguments.map(r=>(0,q.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,q.jsx)(`span`,{title:r.name,className:`w-28 shrink-0 truncate pt-1.5 font-mono text-[10px] leading-tight text-muted-foreground`,children:D(r.name)}),(0,q.jsx)(C,{className:`h-7 flex-1 font-mono text-xs`,placeholder:Ee(r.dataType,r.name),value:t[e]?.[r.name]??``,onChange:t=>n(n=>({...n,[e]:{...n[e],[r.name]:t.target.value}}))})]},r.name))})]},e)})]})}function Oe({activeFaults:e,availableFaults:t,onTriggerFault:n,onClearFault:r}){let i=e.length>0,[a,o]=(0,K.useState)(null);return(0,q.jsxs)(`div`,{id:`faults`,className:`flex min-w-0 flex-col gap-3 p-4`,children:[(0,q.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,q.jsx)(`h2`,{className:Y,children:`Alarms`}),(0,q.jsx)(`p`,{className:`text-[10px] text-muted-foreground/75`,children:`Active faults and injectable failure modes (factory)`})]}),i?(0,q.jsx)(`div`,{className:`flex flex-col gap-2`,children:e.map(e=>(0,q.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-[var(--miravo-radius-tight)] border border-destructive/30 bg-transparent py-2.5 pl-3 pr-2 sm:flex-row sm:items-center sm:justify-between`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,q.jsx)(G,{className:`size-4 shrink-0 text-destructive`}),(0,q.jsx)(`span`,{title:e,className:`font-mono text-sm font-medium text-destructive`,children:D(e)})]}),(0,q.jsxs)(S,{size:`sm`,variant:`outline`,className:I(`h-8 shrink-0 gap-1 border-destructive/30 px-2.5 font-mono text-[0.75rem] text-destructive shadow-none`,`hover:border-destructive/45 hover:bg-destructive/5 hover:text-destructive`,`focus-visible:border-destructive/40 focus-visible:ring-destructive/20`,J),onClick:()=>r(e),children:[(0,q.jsx)(ce,{className:`size-3.5`,"aria-hidden":!0}),`Clear`]})]},e))}):(0,q.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,q.jsx)(se,{className:`size-4 text-success`}),`All clear — no active faults`]}),t.length>0&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(V,{className:`bg-border/60`}),(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`p`,{className:I(Y,`mb-2`),children:[`Inject fault`,(0,q.jsxs)(g,{variant:`secondary`,className:`ml-2 text-[10px]`,children:[t.filter(t=>!e.includes(t)).length,` available`]})]}),(0,q.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:t.filter(t=>!e.includes(t)).map(e=>(0,q.jsx)(S,{size:`sm`,variant:`outline`,title:e,className:I(`h-7 font-mono text-[10px]`,J),onClick:()=>o(e),children:D(e)},e))})]})]}),(0,q.jsx)(x,{open:a!==null,onOpenChange:e=>{e||o(null)},children:(0,q.jsxs)(v,{children:[(0,q.jsx)(y,{className:`font-heading text-lg font-semibold tracking-tight`,children:`Inject fault?`}),(0,q.jsxs)(b,{className:`text-sm text-muted-foreground`,children:[`This asserts`,` `,(0,q.jsx)(`span`,{title:a??void 0,className:`font-mono text-foreground`,children:a?D(a):``}),` `,`on the running factory. Downstream consumers will see the fault immediately. Clear it from the active list when you're done.`]}),(0,q.jsxs)(_,{children:[(0,q.jsx)(S,{variant:`outline`,onClick:()=>o(null),children:`Cancel`}),(0,q.jsxs)(S,{variant:`destructive`,onClick:()=>{a&&n(a),o(null)},children:[(0,q.jsx)(G,{className:`mr-1 size-3.5`,"aria-hidden":!0}),`Inject fault`]})]})]})})]})}function ke({assetId:e,onRemoved:t}){let[n,r]=(0,K.useState)(!1),[i,a]=(0,K.useState)(!1),o=Se(),s=d(t=>t.templates.find(t=>t.assetIds.includes(e))),c=d(t=>t.lines.find(t=>t.stations.some(t=>t.id===e))?.line);return c?(0,q.jsxs)(`div`,{className:`rounded-[var(--miravo-radius-stadium-sm)] border border-dashed border-border p-4`,children:[(0,q.jsx)(`h2`,{className:Y,children:`Remove asset`}),(0,q.jsxs)(`p`,{className:`text-[10px] text-muted-foreground/75`,children:[`This asset is a station on line `,c,`. Unload`,` `,s?.templateName??`its template`,` to remove the line.`]})]}):(0,q.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-[var(--miravo-radius-stadium-sm)] border border-dashed border-border p-4 sm:flex-row sm:items-center sm:justify-between`,children:[(0,q.jsxs)(`div`,{className:`min-w-0`,children:[(0,q.jsx)(`h2`,{className:Y,children:`Remove asset`}),(0,q.jsx)(`p`,{className:`text-[10px] text-muted-foreground/75`,children:s?`Removes this asset from the running factory. ${s.templateName} stays loaded without it.`:`Removes this standalone asset from the running factory.`})]}),(0,q.jsxs)(S,{size:`sm`,variant:`destructive`,className:`shrink-0`,onClick:()=>r(!0),children:[(0,q.jsx)(W,{className:`mr-1 size-3.5`,"aria-hidden":!0}),`Remove`]}),(0,q.jsx)(x,{open:n,onOpenChange:r,children:(0,q.jsxs)(v,{children:[(0,q.jsxs)(y,{className:`font-heading text-lg font-semibold tracking-tight`,children:[`Remove `,e,`?`]}),(0,q.jsx)(b,{className:`text-sm text-muted-foreground`,children:`The asset and its live values are removed from the factory. With persistence on, the change is saved.`}),(0,q.jsxs)(_,{children:[(0,q.jsx)(S,{variant:`outline`,onClick:()=>r(!1),disabled:i,children:`Cancel`}),(0,q.jsx)(S,{variant:`destructive`,onClick:async()=>{a(!0);try{await o.mutateAsync({type:`removeAsset`,assetId:e}),r(!1),t()}catch{}finally{a(!1)}},disabled:i,children:`Remove asset`})]})]})})]})}function Ae({detail:e,tick:t,activeFaults:n,memberValues:r,onBack:i}){let a=n.length,o=e.isQuarantined,s=`OK`,c=`ok`;a>0?(s=`FAULT`,c=`bad`):o&&(s=`QRTN`,c=`warn`);let l=0;if(r)for(let e of r.values())e.quality!==`good`&&l++;let u=Object.keys(e.members).length,d=r?.get(`availability_state`)?.value,f=e.members.availability_state?.value,p=typeof d==`string`?d:typeof f==`string`?f:`unknown`,m=p===`running`?{dot:`bg-success`,pulse:`bg-success/60`,animate:!0}:p===`faulted`?{dot:`bg-destructive`,pulse:`bg-destructive/60`,animate:!0}:p===`stopped`?{dot:`bg-warning`,pulse:`bg-warning/60`,animate:!0}:{dot:`bg-muted-foreground/60`,pulse:`bg-muted-foreground/50`,animate:!1},ee=p===`running`?`Availability state is running — the asset is available and in service.`:p===`faulted`?`Availability state is faulted — the asset is unavailable because a fault is active.`:p===`stopped`?`Availability state is stopped — the asset is available but not running.`:`Availability state is not available for this asset yet.`;return(0,q.jsxs)(`header`,{className:I(xe,`flex w-full min-w-0 flex-col`),children:[(0,q.jsxs)(`div`,{className:`flex flex-col gap-3 px-5 py-4 sm:flex-row sm:items-start sm:justify-between sm:gap-4`,children:[(0,q.jsxs)(`div`,{className:`min-w-0`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-1 text-[10px] font-medium uppercase tracking-wider text-muted-foreground`,children:[(0,q.jsx)(`button`,{type:`button`,onClick:i,className:`transition-colors hover:text-foreground`,children:`Assets`}),(0,q.jsx)(`span`,{"aria-hidden":!0,children:`/`}),(0,q.jsx)(`span`,{className:`truncate`,children:P(e.assetType)})]}),(0,q.jsx)(K.ViewTransition,{name:`asset-${e.id}`,default:`none`,children:(0,q.jsx)(`h1`,{className:`font-heading mt-1 text-2xl font-semibold uppercase leading-tight tracking-wide`,children:ae(e.id)})}),(0,q.jsxs)(`div`,{className:`mt-1.5 flex min-w-0 items-center gap-1.5`,children:[(0,q.jsx)(`p`,{className:`m-0 min-w-0 flex-1 font-mono text-[10px] leading-tight tracking-tight text-muted-foreground`,children:(0,q.jsx)(`span`,{className:`break-all`,children:e.browsePath.join(` / `)})}),(0,q.jsx)(`span`,{className:`inline-flex shrink-0`,children:(0,q.jsx)(B,{value:T(e.browsePath),label:`Copy Topic / UNS path`})})]})]}),(0,q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 self-end font-mono text-xs sm:self-start`,children:[(0,q.jsx)(ge,{className:`size-3.5 animate-pulse text-primary`,"aria-hidden":!0}),(0,q.jsx)(`span`,{className:`font-medium text-primary`,children:`LIVE`}),(0,q.jsxs)(`span`,{className:`tabular-nums text-muted-foreground`,children:[`t=`,t]}),(0,q.jsxs)(R,{children:[(0,q.jsx)(L,{render:(0,q.jsx)(`span`,{className:`inline-flex size-3.5 items-center justify-center outline-none focus-visible:ring-2 focus-visible:ring-ring`}),children:(0,q.jsxs)(`span`,{"aria-hidden":!0,className:`relative flex size-1.5 shrink-0 items-center justify-center`,children:[(0,q.jsx)(`span`,{className:I(`relative inline-flex size-1.5 rounded-full`,m.dot)}),m.animate&&(0,q.jsx)(`span`,{className:I(`absolute inline-flex size-2.5 animate-ping rounded-full opacity-75`,m.pulse)})]})}),(0,q.jsx)(z,{side:`top`,align:`end`,children:(0,q.jsxs)(`span`,{className:`block max-w-[16rem] text-[11px] leading-snug`,children:[(0,q.jsx)(`span`,{className:`font-medium uppercase tracking-[0.08em]`,children:`Availability`}),` `,(0,q.jsxs)(`span`,{className:`text-muted-foreground`,children:[`— `,ee]})]})})]})]})]}),(0,q.jsxs)(`fieldset`,{"aria-label":`Asset status`,className:`m-0 flex flex-col border-0 border-t border-border/50 p-0`,children:[(0,q.jsxs)(`div`,{className:`grid grid-cols-2 gap-px bg-transparent`,children:[(0,q.jsx)(X,{variant:`primary`,icon:oe,label:`Health`,value:s,tone:c,tooltip:`Rolls up active faults and quarantine into a single status — OK when nothing is asserted, FAULT when any fault is active, QRTN when the asset is excluded from the running factory.`}),(0,q.jsx)(X,{variant:`primary`,icon:G,label:`Active faults`,labelCompact:`Faults`,value:String(a),tone:a>0?`bad`:`neutral`,tooltip:`Fault codes currently asserted on this asset. Clear or inject faults from the Alarms section below.`})]}),(0,q.jsxs)(`div`,{className:`grid grid-cols-2 gap-px border-t border-border/50 bg-transparent sm:grid-cols-4`,children:[(0,q.jsx)(X,{variant:`compact`,icon:Ce,label:`Lifecycle`,labelCompact:`Life`,value:D(e.lifecycleStage),tone:E(e.lifecycleStage),tooltip:`Where this asset sits in its operational lifecycle (e.g. commissioning, operating, maintenance, retired).`}),(0,q.jsx)(X,{variant:`compact`,icon:de,label:`Tags`,value:String(u),tone:`neutral`,tooltip:`Total members exposed by this asset — process variables, state flags, counters, commands, and reference fields combined.`}),(0,q.jsx)(X,{variant:`compact`,icon:we,label:`Bad quality`,value:String(l),tone:l>0?`warn`:`neutral`,tooltip:`Members whose quality stamp is anything other than good (uncertain or bad). A healthy asset reads 0.`}),(0,q.jsx)(X,{variant:`compact`,icon:Te,label:`Operating age`,value:M(e.operatingHours),tone:`neutral`,tooltip:`Total operating age on this asset, including any factory-seeded starting hours plus simulated runtime elapsed in this session.`})]})]})]})}function X({icon:e,label:t,labelCompact:n,value:r,suffix:i,tone:a,variant:o=`compact`,tooltip:s}){let c=o===`primary`;return(0,q.jsxs)(`div`,{className:I(`relative flex min-w-0 flex-col justify-center`,c?`min-h-20 gap-1.5 px-4 py-4 sm:min-h-24 sm:px-6 sm:py-5 lg:min-h-28 lg:px-8`:`min-h-12 gap-1 px-3 py-2.5 sm:min-h-13 sm:px-4 lg:min-h-14 lg:px-5`),children:[(0,q.jsx)(`div`,{className:`flex min-h-0 min-w-0 items-center gap-2`,children:(0,q.jsxs)(R,{children:[(0,q.jsxs)(L,{className:`flex min-h-0 min-w-0 flex-1 cursor-default items-center gap-2 text-left`,render:(0,q.jsx)(`div`,{}),children:[(0,q.jsx)(e,{className:I(`shrink-0 text-muted-foreground`,c?`size-4`:`size-3.5`),"aria-hidden":!0}),(0,q.jsxs)(`span`,{className:I(`min-w-0 flex-1 font-medium tracking-wide text-muted-foreground uppercase 2xl:tracking-wider`,c?`text-[11px] leading-snug sm:text-[12px]`:`text-[9px] leading-snug sm:text-[10px]`),children:[(0,q.jsx)(`span`,{className:`block wrap-break-word 2xl:hidden`,children:n??t}),(0,q.jsx)(`span`,{className:`hidden wrap-break-word 2xl:block`,children:t})]})]}),(0,q.jsx)(z,{side:`top`,align:`start`,sideOffset:6,className:`max-w-xs`,children:(0,q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,q.jsx)(`span`,{className:`font-medium text-foreground`,children:t}),(0,q.jsx)(`span`,{className:`text-muted-foreground`,children:s??t})]})})]})}),(0,q.jsxs)(`p`,{className:I(`min-w-0 wrap-break-word font-mono font-semibold leading-tight tracking-tight tabular-nums`,c?`text-2xl sm:text-3xl lg:text-4xl`:`text-base lg:text-lg`,a===`ok`&&`text-success`,a===`warn`&&`text-warning`,a===`bad`&&`text-destructive`,a===`neutral`&&`text-foreground`),children:[r,i?(0,q.jsx)(`span`,{className:I(`ml-0.5 font-medium text-muted-foreground`,c?`text-base lg:text-lg`:`text-xs lg:text-sm`),children:i}):null]})]})}function Z({title:e,subtitle:t,children:n,className:r,id:i}){return(0,q.jsxs)(`section`,{id:i,className:I(be,r),children:[(0,q.jsxs)(`div`,{className:`border-b border-border/60 px-4 py-3`,children:[(0,q.jsx)(`h2`,{className:`blueprint-title text-foreground`,children:e}),t?(0,q.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:t}):null]}),(0,q.jsx)(`div`,{className:`overflow-hidden p-0`,children:n})]})}var je=new Set([`pu`,`h`]),Me=[`_reference`,`_baseline`,`_setpoint`,`_command`],Q=`var(--color-primary)`,Ne=`var(--color-background)`,Pe=60,Fe=1e-4;function $(e,t,n){let r=e?.get(t);return{value:r?.value??n.value,quality:r?.quality??n.quality}}function Ie(e){return Object.entries(e.members).filter(([e,t])=>t.meta.kind===`variable`&&t.meta.access===`read`&&t.meta.dataType===`Double`&&t.meta.euRange!==null&&!je.has(t.meta.unit??``)&&!Me.some(t=>e.endsWith(t)))}function Le(e,t){if(e.length<2)return!1;let n=t-Pe,r;for(let t of e)if(!(t.tick<n)){if(r===void 0){r=t.value;continue}if(Math.abs(t.value-r)>Fe)return!0}return!1}function Re({data:e,chartHeight:n=34,live:c=!1}){let l=(0,K.useId)(),[u,d]=(0,K.useState)(null),f=1/0,p=-1/0;for(let t of e)t.value<f&&(f=t.value),t.value>p&&(p=t.value);let m=e[e.length-1];return(0,q.jsxs)(`div`,{className:`flex min-h-0 w-full flex-col overflow-hidden`,style:{height:n+14},children:[(0,q.jsx)(`div`,{style:{height:n,width:`100%`},children:(0,q.jsx)(t,{width:`100%`,height:n,children:(0,q.jsxs)(s,{data:e,margin:{top:3,right:4,bottom:2,left:0},onMouseMove:e=>{let t=e?.activePayload?.[0]?.value;typeof t==`number`&&d(t)},onMouseLeave:()=>d(null),children:[(0,q.jsx)(`defs`,{children:(0,q.jsxs)(`linearGradient`,{id:l,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,q.jsx)(`stop`,{offset:`0%`,stopColor:Q,stopOpacity:.32}),(0,q.jsx)(`stop`,{offset:`100%`,stopColor:Q,stopOpacity:0})]})}),(0,q.jsx)(i,{domain:[`auto`,`auto`],hide:!0}),(0,q.jsx)(a,{content:()=>null,cursor:!1}),(0,q.jsx)(o,{type:`monotone`,dataKey:`value`,stroke:Q,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`,fill:`url(#${l})`,isAnimationActive:!1,dot:!1,activeDot:{r:3,fill:Q,stroke:Ne,strokeWidth:1}}),m?(0,q.jsx)(r,{x:m.tick,y:m.value,r:2.25,fill:Q,stroke:Ne,strokeWidth:1.25,isFront:!0,ifOverflow:`extendDomain`}):null]})})}),(0,q.jsxs)(`span`,{className:`flex items-center gap-1.5 text-[10px] leading-none tabular-nums text-muted-foreground`,children:[c?(0,q.jsxs)(`span`,{"aria-hidden":!0,className:`relative inline-flex size-1.5 shrink-0 items-center justify-center`,children:[(0,q.jsx)(`span`,{className:`absolute inline-flex size-2 animate-ping rounded-full bg-primary/50`}),(0,q.jsx)(`span`,{className:`relative inline-flex size-1.5 rounded-full bg-primary`})]}):null,u===null?(0,q.jsxs)(`span`,{children:[O(f),`–`,O(p)]}):(0,q.jsx)(`span`,{className:`font-medium text-primary`,children:O(u)})]})]})}function ze({detail:e,processVariables:t,memberValues:n,historyRef:r,tick:i,showQuality:a}){let{liveMap:o,orderedVariables:s}=(0,K.useMemo)(()=>{let e=new Map,n=[],a=[];for(let o of t){let t=Le(r.current.get(o[0])??[],i);e.set(o[0],t),(t?n:a).push(o)}return{liveMap:e,orderedVariables:[...n,...a]}},[t,n,i,r]);return t.length===0?(0,q.jsx)(Z,{title:`Process`,subtitle:`No continuous analog readings defined for this asset`,className:`opacity-90`,children:(0,q.jsx)(`p`,{className:`px-4 py-6 text-center text-sm text-muted-foreground`,children:`This asset exposes no continuous process variables. Discrete states, flags, and commands are available in the Tags section below.`})}):(0,q.jsx)(Z,{title:`Process`,subtitle:`Live tag readings — trend is ~2 min at 1 Hz`,children:(0,q.jsx)(`ul`,{className:`divide-y divide-border/40`,children:s.map(([t,i])=>{let{value:s,quality:c}=$(n,t,i),l=r.current.get(t)??[],u=A(e.browsePath,t),d=o.get(t)??!1,f=l.length>=2,p=w(i.meta.unit),m=k(t);return(0,q.jsxs)(h.li,{layout:`position`,transition:{duration:.36,ease:[.22,1,.36,1]},className:`flex flex-col gap-2.5 bg-background px-4 py-3 sm:flex-row sm:items-center sm:gap-5 sm:py-3.5`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1 sm:w-44 sm:shrink-0`,children:[(0,q.jsxs)(R,{children:[(0,q.jsx)(L,{className:`min-w-0 flex-1 cursor-default truncate text-left text-[11px] font-medium uppercase tracking-[var(--miravo-tracking-eyebrow)] text-muted-foreground`,render:(0,q.jsx)(`span`,{}),children:m}),(0,q.jsx)(z,{side:`top`,align:`start`,className:`max-w-xs`,children:m})]}),(0,q.jsx)(B,{value:u,label:`Copy Topic / UNS path`})]}),(0,q.jsxs)(`div`,{className:`relative h-[56px] min-w-0 flex-1`,children:[(0,q.jsx)(`div`,{"aria-hidden":!0,className:`absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-border/30`}),f?(0,q.jsx)(Re,{data:l,chartHeight:42,live:d}):(0,q.jsx)(`p`,{className:`flex h-full items-center text-[10px] uppercase tracking-widest text-muted-foreground`,children:`Collecting trend…`})]}),(0,q.jsxs)(`div`,{className:`flex items-baseline gap-2 sm:min-w-36 sm:shrink-0 sm:justify-end`,children:[(0,q.jsx)(`span`,{className:`blueprint-stat text-2xl font-semibold leading-none tabular-nums text-foreground`,children:typeof s==`number`?O(s):String(s)}),p&&(0,q.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:p}),a&&c!==`good`&&(0,q.jsx)(g,{variant:c===`uncertain`?`secondary`:`destructive`,className:`shrink-0 text-[10px]`,children:c})]})]},t)})})})}function Be({name:e,value:t,dataType:n,unit:r,access:i}){let a=k(e),o=i===`readwrite`;if(n===`Boolean`||typeof t==`boolean`||r===`pu`&&(t===0||t===1)){let n=t===!0||t===`true`||t===1,r=e.includes(`fault`);return(0,q.jsxs)(`div`,{className:`flex min-h-9 min-w-0 items-center justify-between gap-2 rounded-[var(--miravo-radius-tight)] border px-2 py-1 ${r&&n?`border-destructive/30 bg-transparent`:``}`,children:[(0,q.jsxs)(`span`,{className:`min-w-0 flex-1 truncate text-left text-[10px] leading-snug text-muted-foreground`,children:[a,o&&(0,q.jsx)(`span`,{className:`ml-1 text-[8px] text-primary`,children:`CMD`})]}),(0,q.jsx)(`span`,{className:`shrink-0 font-mono text-xs font-medium tabular-nums ${r&&n?`text-destructive`:n?`text-success`:`text-muted-foreground`}`,children:n?`ON`:`OFF`})]})}if(n===`String`){let n=String(t),r=n===`none`||n===``,i=j.has(n)||e.includes(`fault_code`)&&!r,o=!i&&N.has(n);return(0,q.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-col justify-center gap-1 rounded-[var(--miravo-radius-tight)] border px-2 py-2 ${i?`border-destructive/30 bg-transparent`:o?`border-warning/30 bg-warning/5`:``}`,children:[(0,q.jsx)(`span`,{className:`wrap-break-word text-[10px] leading-tight text-muted-foreground`,children:a}),r?(0,q.jsx)(`span`,{className:`wrap-break-word font-mono text-sm font-medium leading-snug text-muted-foreground`,children:`—`}):(0,q.jsx)(`span`,{title:n,className:`wrap-break-word font-mono text-sm font-medium leading-snug ${i?`text-destructive`:o?`text-warning`:`text-foreground`}`,children:D(n)})]})}return(0,q.jsxs)(`div`,{className:`flex min-h-9 min-w-0 items-center justify-between gap-2 rounded-[var(--miravo-radius-tight)] border px-2 py-1`,children:[(0,q.jsxs)(`span`,{className:`min-w-0 flex-1 truncate text-left text-[10px] leading-snug text-muted-foreground`,children:[a,o&&(0,q.jsx)(`span`,{className:`ml-1 text-[8px] text-primary`,children:`CMD`})]}),(0,q.jsxs)(`span`,{className:`shrink-0 text-right font-mono text-xs font-medium tabular-nums`,children:[typeof t==`number`?O(t):String(t),r&&(0,q.jsx)(`span`,{className:`ml-1 text-[10px] text-muted-foreground`,children:w(r)})]})]})}function Ve(e){return[...e].sort((e,t)=>{let n=e[1].meta.access===`readwrite`;return n===(t[1].meta.access===`readwrite`)?e[0].localeCompare(t[0]):n?-1:1})}function He({stringEnumMembers:e,nonStringOperationalMembers:t,memberValues:n,className:r}){let i=(0,K.useMemo)(()=>Ve(e),[e]),a=(0,K.useMemo)(()=>Ve(t),[t]),o=`grid min-w-0 gap-2 [grid-template-columns:repeat(auto-fill,minmax(min(100%,12.5rem),1fr))]`;return(0,q.jsx)(Z,{title:`Tags`,subtitle:`Mode, status flags, and control tags`,className:r,children:(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-5 p-4`,children:[i.length>0&&(0,q.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[a.length>0&&(0,q.jsx)(`h3`,{className:`blueprint-title text-muted-foreground`,children:`States`}),(0,q.jsx)(`div`,{className:o,children:i.map(([e,t])=>{let{value:r}=$(n,e,t);return(0,q.jsx)(Be,{name:e,value:r,dataType:t.meta.dataType,unit:t.meta.unit,access:t.meta.access},e)})})]}),a.length>0&&(0,q.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[i.length>0&&(0,q.jsx)(`h3`,{className:`blueprint-title text-muted-foreground`,children:`Flags & commands`}),(0,q.jsx)(`div`,{className:o,children:a.map(([e,t])=>{let{value:r}=$(n,e,t);return(0,q.jsx)(Be,{name:e,value:r,dataType:t.meta.dataType,unit:t.meta.unit,access:t.meta.access},e)})})]})]})})}function Ue({className:e,counters:t,memberValues:n}){return(0,q.jsx)(Z,{title:`Counters`,subtitle:`Totals, hours, and accumulators`,className:e,children:(0,q.jsx)(`div`,{className:`flex flex-col gap-2 p-4`,children:t.map(([e,t])=>{let{value:r}=$(n,e,t);return(0,q.jsxs)(`div`,{className:`flex items-center justify-between rounded-[var(--miravo-radius-tight)] border border-border/60 bg-transparent px-3 py-2`,children:[(0,q.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:k(e)}),(0,q.jsxs)(`span`,{className:`blueprint-stat text-sm font-medium`,children:[typeof r==`number`?O(r):String(r),t.meta.unit&&(0,q.jsx)(`span`,{className:`ml-1 text-[10px] text-muted-foreground`,children:w(t.meta.unit)})]})]},e)})})})}function We({className:e,detail:t,referenceMembers:n,memberValues:r}){let i=Object.keys(t.parameters).length>0,a=n.length>0;return!i&&!a?null:(0,q.jsx)(Z,{title:`Nameplate & configuration`,subtitle:`Design parameters, identity, and reference values`,className:e,children:(0,q.jsxs)(`div`,{className:`flex flex-col gap-4 p-4`,children:[i&&(0,q.jsx)(`div`,{className:`grid grid-cols-2 gap-2 sm:grid-cols-3`,children:Object.entries(t.parameters).map(([e,t])=>(0,q.jsxs)(`div`,{className:`flex flex-col gap-0.5 py-1.5`,children:[(0,q.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:k(e)}),(0,q.jsxs)(`span`,{className:`font-mono text-sm font-medium`,children:[typeof t.value==`number`?O(t.value):String(t.value),t.unit&&(0,q.jsx)(`span`,{className:`ml-1 text-[10px] text-muted-foreground`,children:w(t.unit)})]})]},e))}),a&&(0,q.jsx)(`div`,{className:`grid grid-cols-2 gap-2 sm:grid-cols-3`,children:n.map(([e,t])=>{let{value:n}=$(r,e,t);return(0,q.jsxs)(`div`,{className:`flex flex-col gap-0.5 rounded-[var(--miravo-radius-tight)] border border-border/60 bg-transparent p-2`,children:[(0,q.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:k(e)}),(0,q.jsxs)(`span`,{className:`font-mono text-sm font-medium`,children:[typeof n==`number`?O(n):String(n),t.meta.unit&&(0,q.jsx)(`span`,{className:`ml-1 text-[10px] text-muted-foreground`,children:w(t.meta.unit)})]})]},e)})})]})})}function Ge({detail:e,memberValues:t}){if(!e.members.state_label)return null;let n=n=>t?.get(n)?.value??e.members[n]?.value;return(0,q.jsxs)(`section`,{className:`flex flex-wrap items-center gap-3 text-sm`,"aria-label":`Station production`,children:[(0,q.jsx)(g,{variant:`secondary`,children:String(n(`state_label`)??`idle`)}),(0,q.jsxs)(`span`,{children:[`Good: `,O(Number(n(`good_count`)??0))]}),(0,q.jsxs)(`span`,{children:[`Scrap: `,O(Number(n(`scrap_count`)??0))]}),n(`stop_reason`)&&(0,q.jsx)(`span`,{className:`text-muted-foreground`,children:String(n(`stop_reason`))})]})}var Ke=120,qe=`gap-4 sm:gap-5 lg:gap-x-6 lg:gap-y-5 xl:gap-x-8`,Je=`asset-detail-page relative isolate mx-auto flex min-h-full w-full max-w-screen-2xl flex-col gap-6 p-4 sm:gap-8 sm:p-6`;function Ye(e){return e instanceof Error&&`code`in e&&e.code===`NOT_FOUND`?!0:e instanceof Error&&/^404\b/.test(e.message.trim())}function Xe(){let{id:e}=ie(),t=re(),n=(0,K.useCallback)(()=>{(0,K.startTransition)(()=>{(0,K.addTransitionType)(_e),t(`/?tab=assets`)})},[t]),[r,i]=(0,K.useState)({}),[a,o]=(0,K.useState)(null),[s,c]=(0,K.useState)(!1),[g,_]=te(`tab`,ne([`hmi`,`operate`,`data`,`operations`]).withDefault(`hmi`)),v=g===`data`||g===`operations`?`operate`:g,y=Se();(0,K.useEffect)(()=>{y.isPending||o(null)},[y.isPending]),(0,K.useEffect)(()=>{(g===`data`||g===`operations`)&&_(`operate`)},[g,_]);let b=(0,K.useCallback)(e=>{_(`operate`),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.getElementById(e)?.scrollIntoView({behavior:`smooth`,block:`start`})})})},[_]);(0,K.useEffect)(()=>{let e=null,t=!1,r=()=>{t=!1,e&&=(clearTimeout(e),null)},i=i=>{if(i.metaKey||i.ctrlKey||i.altKey)return;let a=i.target;if(a){let e=a.tagName;if(e===`INPUT`||e===`TEXTAREA`||e===`SELECT`||a.isContentEditable)return}if(t){i.key===`f`?(b(`faults`),i.preventDefault()):i.key===`c`&&(b(`commands`),i.preventDefault()),r();return}if(i.key===`g`){t=!0,e=setTimeout(r,1200);return}i.key===`b`&&!i.shiftKey?(n(),i.preventDefault()):i.key===`?`&&(c(!0),i.preventDefault())};return window.addEventListener(`keydown`,i),()=>{window.removeEventListener(`keydown`,i),r()}},[n,b]);let x=p({queryKey:f.assets.detail(e??``),queryFn:()=>u(`/assets/${e}`,l.assetDetail),enabled:e!==void 0}),C=(0,K.useDeferredValue)(x.data??null),w=x.isError,T=d(t=>e?t.memberValues.get(e):void 0),E=d(e=>e.models),D=d(e=>e.assets),O=(0,K.useMemo)(()=>D.find(t=>t.id===e),[D,e]),k=O?.activeFaults,A=(0,K.useRef)(new Map),j=d(e=>e.tick);(0,K.useEffect)(()=>{if(!T||!e)return;let t=A.current;for(let[e,n]of T){if(typeof n.value!=`number`)continue;let r=t.get(e)??[];if(r[r.length-1]?.tick===j)continue;let i=r.length>=Ke?r.slice(r.length-Ke+1):r;t.set(e,[...i,{value:n.value,tick:j}])}},[T,j,e]);let M=(0,K.useMemo)(()=>C?Ie(C):[],[C]),N=(0,K.useMemo)(()=>{if(!C)return{operational:[],counters:[],reference:[]};let e=new Set(M.map(([e])=>e)),t=Object.entries(C.members).filter(([t])=>!e.has(t)),n=[],r=[],i=[];for(let e of t){let[,t]=e,a=t.meta.dataType,o=t.meta.kind,s=t.meta.unit,c=s===`pu`&&t.meta.euRange?.[0]===0&&t.meta.euRange?.[1]===1;o===`property`?i.push(e):a===`Boolean`||a===`String`||c?n.push(e):s===`count`||a===`UInt16`||a===`UInt32`?r.push(e):t.meta.access===`readwrite`||Me.some(t=>e[0].endsWith(t))?n.push(e):s===`pu`||s===`h`?r.push(e):i.push(e)}return{operational:n,counters:r,reference:i}},[C,M]),ae=(0,K.useMemo)(()=>C?E.find(e=>e.name===C.assetType)?.faultNames??[]:[],[C,E]),P=k??C?.activeFaults??[],F=(0,K.useMemo)(()=>{if(!T)return P.length>0;for(let[,e]of T)if(e.quality!==`good`)return!0;return!1},[T,P.length]),oe=(0,K.useMemo)(()=>N.operational.filter(([,e])=>e.meta.dataType===`String`),[N.operational]),se=(0,K.useMemo)(()=>N.operational.filter(([,e])=>e.meta.dataType!==`String`),[N.operational]),ce=t=>{if(!e)return;let n={},i=C?.methods[t];if(i)for(let e of i.inputArguments){let i=r[t]?.[e.name]??``,a=le(e.name,i,e.dataType);if(!a)return;n[e.name]=a.value}o(t),y.mutateAsync({type:`invokeMethod`,assetId:e,method:t,arguments:n}).then(async()=>{await x.refetch()}).catch(()=>{})},L=t=>{e&&y.mutateAsync({type:`triggerFault`,assetId:e,fault:t}).then(async()=>{await x.refetch()}).catch(()=>{})},R=t=>{e&&y.mutateAsync({type:`clearFault`,assetId:e,fault:t}).then(async()=>{await x.refetch()}).catch(()=>{})};if(!C)return w?Ye(x.error)?(0,q.jsx)(ve,{className:`min-h-full`,children:(0,q.jsx)(`div`,{className:`flex min-h-[40vh] items-center justify-center p-6 sm:p-12`,children:(0,q.jsx)(`div`,{className:`w-full max-w-md`,children:(0,q.jsxs)(m,{eyebrow:`Asset lookup`,stamp:`404`,title:`Asset not found`,detail:e??`Unknown asset id`,detailLabel:`Requested asset`,primaryLabel:`Back to Assets`,onPrimary:n,children:[(0,q.jsx)(`p`,{children:`The requested asset is no longer in the running factory or the URL is wrong.`}),(0,q.jsx)(`p`,{children:`Return to Assets and pick a live asset from the current factory.`})]})})})}):(0,q.jsx)(ve,{className:`min-h-full`,children:(0,q.jsxs)(`div`,{className:`flex min-h-[40vh] flex-col items-center justify-center gap-4 p-6 sm:p-12`,children:[(0,q.jsx)(`div`,{className:`w-full max-w-md`,children:(0,q.jsx)(ee,{message:ye(x.error,`Could not load asset.`),onRetry:()=>void x.refetch(),isRetrying:x.isFetching})}),(0,q.jsx)(S,{variant:`outline`,size:`sm`,onClick:n,children:`Back to Assets`})]})}):O?(0,q.jsx)(`div`,{className:Je,children:(0,q.jsx)(Ae,{detail:{id:O.id,assetType:O.model,browsePath:O.browsePath,lifecycleStage:O.lifecycleStage,operatingHours:O.operatingHours,activeFaults:O.activeFaults,isQuarantined:O.isQuarantined,parameters:{},inputs:{},members:{},methods:{}},tick:j,activeFaults:P,memberValues:T,onBack:n})}):null;let z=N.operational.length>0,B=N.counters.length>0,V=N.reference.length>0||Object.keys(C.parameters).length>0,H=z||B||V,U=Object.keys(C.methods).length>0,ge=z&&!B&&!V,W=z&&B&&V;return(0,q.jsxs)(`div`,{className:Je,children:[(0,q.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 -z-10 hidden select-none overflow-hidden md:block`,children:(0,q.jsx)(`span`,{className:`absolute -top-2 left-0 whitespace-nowrap uppercase leading-none opacity-35 blur-[2px]`,style:{fontFamily:`var(--miravo-font-heading)`,fontSize:`clamp(5rem, 14vw, 12rem)`,fontWeight:`var(--miravo-weight-medium)`,letterSpacing:`var(--miravo-tracking-heading)`,color:`var(--miravo-ghost)`},children:C.assetType.replace(/_/g,` `)})}),(0,q.jsx)(Ae,{detail:C,tick:j,activeFaults:P,memberValues:T,onBack:n}),(0,q.jsx)(Ge,{detail:C,memberValues:T}),(0,q.jsx)(K.ViewTransition,{enter:`fade-in`,default:`none`,children:(0,q.jsxs)(he,{value:v,onValueChange:e=>{_(e)},className:`min-h-0 flex-1`,children:[(0,q.jsx)(`div`,{className:`shrink-0 overflow-x-auto`,children:(0,q.jsxs)(me,{variant:`line`,className:`h-10! min-w-max gap-0.5`,children:[(0,q.jsxs)(fe,{value:`hmi`,className:`gap-1.5 px-3 text-sm`,children:[(0,q.jsx)(de,{className:`size-3.5 shrink-0`}),`HMI`]}),(0,q.jsxs)(fe,{value:`operate`,className:`gap-1.5 px-3 text-sm`,children:[(0,q.jsx)(ue,{className:`size-3.5 shrink-0`}),`Operate`]})]})}),(0,q.jsx)(pe,{value:`hmi`,className:`flex-1 py-2`,children:(0,q.jsx)(h.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.15,ease:`easeOut`},children:(0,q.jsx)(ze,{detail:C,processVariables:M,memberValues:T,historyRef:A,tick:j,showQuality:F})},`hmi`)}),(0,q.jsx)(pe,{value:`operate`,className:`flex-1 py-2`,children:(0,q.jsxs)(h.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.15,ease:`easeOut`},className:`flex min-w-0 flex-col gap-4`,children:[H&&(0,q.jsxs)(`section`,{"aria-label":`Data`,className:I(`grid min-w-0 grid-cols-1`,qe,W&&`lg:grid-cols-2 lg:grid-rows-[auto_auto] lg:items-start`,!W&&z&&(B||V)&&`lg:grid-cols-2 lg:items-start`),children:[z&&(0,q.jsx)(He,{stringEnumMembers:oe,nonStringOperationalMembers:se,memberValues:T,className:I(`min-h-0 min-w-0 self-stretch`,ge&&`lg:col-span-2`,W&&`lg:row-span-2`)}),!z&&B&&V&&(0,q.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-col gap-6 lg:col-span-2`,children:[(0,q.jsx)(Ue,{counters:N.counters,memberValues:T}),(0,q.jsx)(We,{detail:C,referenceMembers:N.reference,memberValues:T})]}),!z&&B&&!V&&(0,q.jsx)(Ue,{className:`lg:col-span-2`,counters:N.counters,memberValues:T}),!z&&!B&&V&&(0,q.jsx)(We,{className:`lg:col-span-2`,detail:C,referenceMembers:N.reference,memberValues:T}),z&&B&&(0,q.jsx)(Ue,{className:`min-h-0 min-w-0 self-stretch lg:col-start-2 lg:row-start-1`,counters:N.counters,memberValues:T}),z&&V&&(0,q.jsx)(We,{className:I(`min-h-0 min-w-0 self-stretch lg:col-start-2`,W?`lg:row-start-2`:`lg:row-start-1`),detail:C,referenceMembers:N.reference,memberValues:T})]}),(0,q.jsxs)(`section`,{"aria-label":`Operations`,className:I(be,`grid grid-cols-1`,U&&`lg:grid-cols-2`),children:[(0,q.jsx)(Oe,{activeFaults:P,availableFaults:ae,onTriggerFault:L,onClearFault:R}),U&&(0,q.jsx)(`div`,{className:`border-t border-border/50 lg:border-l lg:border-t-0`,children:(0,q.jsx)(De,{detail:C,methodArgs:r,setMethodArgs:i,onInvoke:ce,isPending:y.isPending,pendingMethod:a})})]}),(0,q.jsx)(ke,{assetId:C.id,onRemoved:n})]},`operate`)})]})}),(0,q.jsx)(Ze,{open:s,onOpenChange:c})]})}function Ze({open:e,onOpenChange:t}){return(0,q.jsx)(x,{open:e,onOpenChange:t,children:(0,q.jsxs)(v,{children:[(0,q.jsx)(y,{className:`font-heading text-lg font-semibold tracking-tight`,children:`Keyboard shortcuts`}),(0,q.jsx)(b,{className:`text-sm text-muted-foreground`,children:`Navigate this asset without leaving the keyboard.`}),(0,q.jsx)(`ul`,{className:`flex flex-col gap-2 pt-1`,children:[{keys:[`g`,`f`],label:`Jump to Alarms`},{keys:[`g`,`c`],label:`Jump to Commands`},{keys:[`b`],label:`Back to Assets`},{keys:[`?`],label:`Show this sheet`}].map(e=>(0,q.jsxs)(`li`,{className:`flex items-center justify-between gap-4`,children:[(0,q.jsx)(`span`,{className:`text-sm text-foreground`,children:e.label}),(0,q.jsx)(`span`,{className:`flex items-center gap-1`,children:e.keys.map((t,n)=>(0,q.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,q.jsx)(`kbd`,{className:`rounded-[var(--miravo-radius-tight)] border border-border bg-muted/40 px-1.5 py-0.5 font-mono text-[11px] font-medium text-foreground`,children:t}),n<e.keys.length-1&&(0,q.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:`then`})]},`${e.label}-${t}`))})]},e.label))})]})})}export{Xe as AssetDetailPage};
@@ -1 +0,0 @@
1
- import{a as e,i as t,n,r}from"./rolldown-runtime-COnpUsM8.js";import{c as i}from"./vendor-charts-95ykyDlI.js";import{at as a,it as o,ot as s}from"./vendor-ui-D8j69UH4.js";import{D as c}from"./format-OUFL_tef.js";import{t as l}from"./utils-BO2u-wC_.js";var u=s(),d=e(i(),1),f=(0,d.createContext)({});function p(e){let t=(0,d.useRef)(null);return t.current===null&&(t.current=e()),t.current}var m=typeof window<`u`?d.useLayoutEffect:d.useEffect,h=(0,d.createContext)(null);function g(e,t){e.indexOf(t)===-1&&e.push(t)}function _(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var v=(e,t,n)=>n>t?t:n<e?e:n,y={},b=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function x(e){return typeof e==`object`&&!!e}var S=e=>/^0[^.\s]+$/u.test(e);function C(e){let t;return()=>(t===void 0&&(t=e()),t)}var w=e=>e,ee=(e,t)=>n=>t(e(n)),T=(...e)=>e.reduce(ee),E=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},te=class{constructor(){this.subscriptions=[]}add(e){return g(this.subscriptions,e),()=>_(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},D=e=>e*1e3,O=e=>e/1e3;function ne(e,t){return t?1e3/t*e:0}var re=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,ie=1e-7,ae=12;function oe(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=re(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>ie&&++s<ae);return o}function se(e,t,n,r){if(e===t&&n===r)return w;let i=t=>oe(t,0,1,e,n);return e=>e===0||e===1?e:re(i(e),t,r)}var ce=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,le=e=>t=>1-e(1-t),ue=se(.33,1.53,.69,.99),de=le(ue),fe=ce(de),pe=e=>e>=1?1:(e*=2)<1?.5*de(e):.5*(2-2**(-10*(e-1))),me=e=>1-Math.sin(Math.acos(e)),he=le(me),ge=ce(me),_e=se(.42,0,1,1),ve=se(0,0,.58,1),ye=se(.42,0,.58,1),be=e=>Array.isArray(e)&&typeof e[0]!=`number`,xe=e=>Array.isArray(e)&&typeof e[0]==`number`,Se={linear:w,easeIn:_e,easeInOut:ye,easeOut:ve,circIn:me,circInOut:ge,circOut:he,backIn:de,backInOut:fe,backOut:ue,anticipate:pe},Ce=e=>typeof e==`string`,we=e=>{if(xe(e)){e.length;let[t,n,r,i]=e;return se(t,n,r,i)}else if(Ce(e))return Se[e],`${e}`,Se[e];return e},Te=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],k={value:null,addProjectionMetrics:null};function Ee(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&k.value&&k.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var De=40;function Oe(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Te.reduce((e,n)=>(e[n]=Ee(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=y.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,De),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Te.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Te.length;t++)o[Te[t]].cancel(e)},state:i,steps:o}}var{schedule:A,cancel:j,state:M,steps:ke}=Oe(typeof requestAnimationFrame<`u`?requestAnimationFrame:w,!0),Ae;function je(){Ae=void 0}var N={now:()=>(Ae===void 0&&N.set(M.isProcessing||y.useManualTiming?M.timestamp:performance.now()),Ae),set:e=>{Ae=e,queueMicrotask(je)}},P={layout:0,mainThread:0,waapi:0},Me=e=>t=>typeof t==`string`&&t.startsWith(e),Ne=Me(`--`),Pe=Me(`var(--`),Fe=e=>Pe(e)?Ie.test(e.split(`/*`)[0].trim()):!1,Ie=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Le(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var Re={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},ze={...Re,transform:e=>v(0,1,e)},Be={...Re,default:1},Ve=e=>Math.round(e*1e5)/1e5,He=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ue(e){return e==null}var We=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ge=(e,t)=>n=>!!(typeof n==`string`&&We.test(n)&&n.startsWith(e)||t&&!Ue(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ke=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(He);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},qe=e=>v(0,255,e),Je={...Re,transform:e=>Math.round(qe(e))},Ye={test:Ge(`rgb`,`red`),parse:Ke(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Je.transform(e)+`, `+Je.transform(t)+`, `+Je.transform(n)+`, `+Ve(ze.transform(r))+`)`};function Xe(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Ze={test:Ge(`#`),parse:Xe,transform:Ye.transform},Qe=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),F=Qe(`deg`),I=Qe(`%`),L=Qe(`px`),$e=Qe(`vh`),et=Qe(`vw`),tt={...I,parse:e=>I.parse(e)/100,transform:e=>I.transform(e*100)},nt={test:Ge(`hsl`,`hue`),parse:Ke(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+I.transform(Ve(t))+`, `+I.transform(Ve(n))+`, `+Ve(ze.transform(r))+`)`},R={test:e=>Ye.test(e)||Ze.test(e)||nt.test(e),parse:e=>Ye.test(e)?Ye.parse(e):nt.test(e)?nt.parse(e):Ze.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Ye.transform(e):nt.transform(e),getAnimatableNone:e=>{let t=R.parse(e);return t.alpha=0,R.transform(t)}},rt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function it(e){return isNaN(e)&&typeof e==`string`&&(e.match(He)?.length||0)+(e.match(rt)?.length||0)>0}var at=`number`,ot=`color`,st=`var`,ct=`var(`,lt="${}",ut=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function dt(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(ut,e=>(R.test(e)?(r.color.push(a),i.push(ot),n.push(R.parse(e))):e.startsWith(ct)?(r.var.push(a),i.push(st),n.push(e)):(r.number.push(a),i.push(at),n.push(parseFloat(e))),++a,lt)).split(lt),indexes:r,types:i}}function ft(e){return dt(e).values}function pt({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===at?i+=Ve(r[a]):e===ot?i+=R.transform(r[a]):i+=r[a]}return i}}function mt(e){return pt(dt(e))}var ht=e=>typeof e==`number`?0:R.test(e)?R.getAnimatableNone(e):e,gt=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:ht(e);function _t(e){let t=dt(e);return pt(t)(t.values.map((e,n)=>gt(e,t.split[n])))}var z={test:it,parse:ft,createTransformer:mt,getAnimatableNone:_t};function vt(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function yt({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=vt(s,r,e+1/3),a=vt(s,r,e),o=vt(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function bt(e,t){return n=>n>0?t:e}var B=(e,t,n)=>e+(t-e)*n,xt=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},St=[Ze,Ye,nt],Ct=e=>St.find(t=>t.test(e));function wt(e){let t=Ct(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===nt&&(n=yt(n)),n}var Tt=(e,t)=>{let n=wt(e),r=wt(t);if(!n||!r)return bt(e,t);let i={...n};return e=>(i.red=xt(n.red,r.red,e),i.green=xt(n.green,r.green,e),i.blue=xt(n.blue,r.blue,e),i.alpha=B(n.alpha,r.alpha,e),Ye.transform(i))},Et=new Set([`none`,`hidden`]);function Dt(e,t){return Et.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Ot(e,t){return n=>B(e,t,n)}function kt(e){return typeof e==`number`?Ot:typeof e==`string`?Fe(e)?bt:R.test(e)?Tt:Nt:Array.isArray(e)?At:typeof e==`object`?R.test(e)?Tt:jt:bt}function At(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>kt(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function jt(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=kt(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Mt(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var Nt=(e,t)=>{let n=z.createTransformer(t),r=dt(e),i=dt(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Et.has(e)&&!i.values.length||Et.has(t)&&!r.values.length?Dt(e,t):T(At(Mt(r,i),i.values),n):(`${e}${t}`,bt(e,t))};function Pt(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?B(e,t,n):kt(e)(e,t)}var Ft=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>A.update(t,e),stop:()=>j(t),now:()=>M.isProcessing?M.timestamp:N.now()}},It=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},Lt=2e4;function Rt(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function zt(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(Rt(r),Lt);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:O(i)}}var V={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Bt(e,t){return e*Math.sqrt(1-t*t)}var Vt=12;function Ht(e,t,n){let r=n;for(let n=1;n<Vt;n++)r-=e(r)/t(r);return r}var Ut=.001;function Wt({duration:e=V.duration,bounce:t=V.bounce,velocity:n=V.velocity,mass:r=V.mass}){let i,a;V.maxDuration;let o=1-t;o=v(V.minDamping,V.maxDamping,o),e=v(V.minDuration,V.maxDuration,O(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Bt(t,o),c=Math.exp(-i);return Ut-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=Bt(t**2,o);return(-i(t)+Ut>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-Ut+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Ht(i,a,s);if(e=D(e),isNaN(c))return{stiffness:V.stiffness,damping:V.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var Gt=[`duration`,`bounce`],Kt=[`stiffness`,`damping`,`mass`];function qt(e,t){return t.some(t=>e[t]!==void 0)}function Jt(e){let t={velocity:V.velocity,stiffness:V.stiffness,damping:V.damping,mass:V.mass,isResolvedFromDuration:!1,...e};if(!qt(e,Kt)&&qt(e,Gt))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*v(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:V.mass,stiffness:i,damping:a}}else{let n=Wt({...e,velocity:0});t={...t,...n,mass:V.mass},t.isResolvedFromDuration=!0}return t}function Yt(e=V.visualDuration,t=V.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Jt({...n,velocity:-O(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=O(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?V.restSpeed.granular:V.restSpeed.default,i||=v?V.restDelta.granular:V.restDelta.default;let y,b,x,S,C,w;if(h<1)x=Bt(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let ee={calculatedDuration:p&&d||null,velocity:e=>D(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=D(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=D(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(Rt(ee),Lt),t=It(t=>ee.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return ee}Yt.applyToOptions=e=>{let t=zt(e,100,Yt);return e.ease=t.ease,e.duration=D(t.duration),e.type=`keyframes`,e};var Xt=5;function Zt(e,t,n){let r=Math.max(t-Xt,0);return ne(n-e(r),t-r)}function Qt({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=Yt({keyframes:[f.value,m(f.value)],velocity:Zt(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function $t(e,t,n){let r=[],i=n||y.mix||Pt,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=T(Array.isArray(t)?t[n]||w:t,a)),r.push(a)}return r}function en(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=$t(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=E(e[r],e[r+1],n);return s[r](i)};return n?t=>l(v(e[0],e[a-1],t)):l}function tn(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=E(0,t,r);e.push(B(n,1,i))}}function nn(e){let t=[0];return tn(t,e.length-1),t}function rn(e,t){return e.map(e=>e*t)}function an(e,t){return e.map(()=>t||ye).splice(0,e.length-1)}function on({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=be(r)?r.map(we):we(r),a={done:!1,value:t[0]},o=en(rn(n&&n.length===t.length?n:nn(t),e),t,{ease:Array.isArray(i)?i:an(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var sn=e=>e!==null;function cn(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(sn),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var ln={decay:Qt,inertia:Qt,tween:on,keyframes:on,spring:Yt};function un(e){typeof e.type==`string`&&(e.type=ln[e.type])}var dn=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},fn=e=>e/100,pn=class extends dn{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==N.now()&&this.tick(N.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},P.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;un(e);let{type:t=on,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||on;s!==on&&typeof o[0]!=`number`&&(this.mixKeyframes=T(fn,Pt(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Rt(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let y=this.currentTime,b=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(b=a)),y=v(0,1,n)*o}let x;_?(this.delayState.value=l[0],x=this.delayState):x=b.next(y),i&&!_&&(x.value=i(x.value));let{done:S}=x;!_&&s!==null&&(S=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let C=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&S);return C&&p!==Qt&&(x.value=cn(l,this.options,h,this.speed)),m&&m(x.value),C&&this.finish(),x}then(e,t){return this.finished.then(e,t)}get duration(){return O(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+O(e)}get time(){return O(this.currentTime)}set time(e){e=D(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return Zt(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(N.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=O(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Ft,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(N.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,P.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function mn(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var H=e=>e*180/Math.PI,hn=e=>_n(H(Math.atan2(e[1],e[0]))),gn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:hn,rotateZ:hn,skewX:e=>H(Math.atan(e[1])),skewY:e=>H(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},_n=e=>(e%=360,e<0&&(e+=360),e),vn=hn,yn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),bn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),xn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:yn,scaleY:bn,scale:e=>(yn(e)+bn(e))/2,rotateX:e=>_n(H(Math.atan2(e[6],e[5]))),rotateY:e=>_n(H(Math.atan2(-e[2],e[0]))),rotateZ:vn,rotate:vn,skewX:e=>H(Math.atan(e[4])),skewY:e=>H(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Sn(e){return+!!e.includes(`scale`)}function Cn(e,t){if(!e||e===`none`)return Sn(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=xn,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=gn,i=t}if(!i)return Sn(t);let a=r[t],o=i[1].split(`,`).map(Tn);return typeof a==`function`?a(o):o[a]}var wn=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Cn(n,t)};function Tn(e){return parseFloat(e.trim())}var En=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Dn=new Set(En),On=e=>e===Re||e===L,kn=new Set([`x`,`y`,`z`]),An=En.filter(e=>!kn.has(e));function jn(e){let t=[];return An.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var U={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Cn(t,`x`),y:(e,{transform:t})=>Cn(t,`y`)};U.translateX=U.x,U.translateY=U.y;var W=new Set,Mn=!1,Nn=!1,Pn=!1;function Fn(){if(Nn){let e=Array.from(W).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=jn(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Nn=!1,Mn=!1,W.forEach(e=>e.complete(Pn)),W.clear()}function In(){W.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Nn=!0)})}function Ln(){Pn=!0,In(),Fn(),Pn=!1}var Rn=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(W.add(this),Mn||(Mn=!0,A.read(In),A.resolveKeyframes(Fn))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}mn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),W.delete(this)}cancel(){this.state===`scheduled`&&(W.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},zn=e=>e.startsWith(`--`);function Bn(e,t,n){zn(t)?e.style.setProperty(t,n):e.style[t]=n}var Vn={};function Hn(e,t){let n=C(e);return()=>Vn[t]??n()}var Un=Hn(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Wn=Hn(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Gn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Kn={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Gn([0,.65,.55,1]),circOut:Gn([.55,0,1,.45]),backIn:Gn([.31,.01,.66,-.59]),backOut:Gn([.33,1.53,.69,.99])};function qn(e,t){if(e)return typeof e==`function`?Wn()?It(e,t):`ease-out`:xe(e)?Gn(e):Array.isArray(e)?e.map(e=>qn(e,t)||Kn.easeOut):Kn[e]}function Jn(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=qn(s,i);Array.isArray(d)&&(u.easing=d),k.value&&P.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return k.value&&p.finished.finally(()=>{P.waapi--}),p}function Yn(e){return typeof e==`function`&&`applyToOptions`in e}function Xn({type:e,...t}){return Yn(e)&&Wn()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Zn=class extends dn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Xn(e);this.animation=Jn(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=cn(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Bn(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return O(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+O(e)}get time(){return O(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=D(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Un()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),w):r(this)}},Qn={anticipate:pe,backInOut:fe,circInOut:ge};function $n(e){return e in Qn}function er(e){typeof e.ease==`string`&&$n(e.ease)&&(e.ease=Qn[e.ease])}var tr=10,nr=class extends Zn{constructor(e){er(e),un(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new pn({...a,autoplay:!1}),s=Math.max(tr,N.now()-this.startTime),c=v(0,tr,s-tr),l=o.sample(s).value,{name:u}=this.options;i&&u&&Bn(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},rr=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(z.test(e)||e===`0`)&&!e.startsWith(`url(`));function ir(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function ar(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=rr(i,t),s=rr(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:ir(e)||(n===`spring`||Yn(n))&&r}function or(e){e.duration=0,e.type=`keyframes`}var sr=new Set([`opacity`,`clipPath`,`filter`,`transform`]),cr=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function lr(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&cr.test(e[t]))return!0;return!1}var ur=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),dr=C(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function fr(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return dr()&&n&&(sr.has(n)||ur.has(n)&&lr(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var pr=40,mr=class extends dn{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=N.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u};this.keyframeResolver=new(l?.KeyframeResolver||Rn)(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=N.now();let u=!0;ar(e,i,a,o)||(u=!1,(y.instantAnimations||!s)&&l?.(cn(e,n,t)),e[0]=e[e.length-1],or(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>pr?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&fr(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new nr({...d,element:p})}catch{m=new pn(d)}else m=new pn(d);m.finished.then(()=>{this.notifyFinished()}).catch(w),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ln()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function hr(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}var gr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function _r(e){let t=gr.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function vr(e,t,n=1){`${e}`;let[r,i]=_r(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return b(e)?parseFloat(e):e}return Fe(i)?vr(i,t,n+1):i}var yr={type:`spring`,stiffness:500,damping:25,restSpeed:10},br=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),xr={type:`keyframes`,duration:.8},Sr={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Cr=(e,{keyframes:t})=>t.length>2?xr:Dn.has(e)?e.startsWith(`scale`)?br(t[1]):yr:Sr;function wr(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Tr(e,t){let n=e?.[t]??e?.default??e;return n===e?n:wr(n,e)}var Er=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function Dr(e){for(let t in e)if(!Er.has(t))return!0;return!1}var Or=(e,t,n,r={},i,a)=>o=>{let s=Tr(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=D(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Dr(s)||Object.assign(u,Cr(e,u)),u.duration&&=D(u.duration),u.repeatDelay&&=D(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(or(u),u.delay===0&&(d=!0)),(y.instantAnimations||y.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,or(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=cn(u.keyframes,s);if(e!==void 0){A.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new pn(u):new mr(u)};function kr(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Ar(e,t,n,r){if(typeof t==`function`){let[i,a]=kr(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=kr(r);t=t(n===void 0?e.custom:n,i,a)}return t}function G(e,t,n){let r=e.getProps();return Ar(r,t,n===void 0?r.custom:n,e)}var jr=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...En]),Mr=30,Nr=e=>!isNaN(parseFloat(e)),Pr={current:void 0},Fr=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=N.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=N.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Nr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new te);let n=this.events[e].add(t);return e===`change`?()=>{n(),A.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Pr.current&&Pr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=N.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Mr)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Mr);return ne(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Ir(e,t){return new Fr(e,t)}var Lr=e=>Array.isArray(e);function Rr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ir(n))}function zr(e){return Lr(e)?e[e.length-1]||0:e}function Br(e,t){let{transitionEnd:n={},transition:r={},...i}=G(e,t)||{};i={...i,...n};for(let t in i)Rr(e,t,zr(i[t]))}var K=e=>!!(e&&e.getVelocity);function Vr(e){return!!(K(e)&&e.add)}function Hr(e,t){let n=e.getValue(`willChange`);if(Vr(n))return n.add(t);if(!n&&y.WillChange){let n=new y.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Ur(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Wr=`data-`+Ur(`framerAppearId`);function Gr(e){return e.props[Wr]}function Kr({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function qr(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?wr(a,c):c;let l=a?.reduceMotion;r&&(a=r);let u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||d&&Kr(d,t))continue;let o={delay:n,...Tr(a||{},t)},c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){A.update(()=>r.set(i));continue}let f=!1;if(window.MotionHandoffAnimation){let n=Gr(e);if(n){let e=window.MotionHandoffAnimation(n,t,A);e!==null&&(o.startTime=e,f=!0)}}Hr(e,t);let p=l??e.shouldReduceMotion;r.start(Or(t,r,i,p&&jr.has(t)?{type:!1}:o,e,f));let m=r.animation;m&&u.push(m)}if(o){let t=()=>A.update(()=>{o&&Br(e,o)});u.length?Promise.all(u).then(t):t()}return u}function Jr(e,t,n={}){let r=G(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(qr(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Yr(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function Yr(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(Jr(c,t,{...o,delay:n+(typeof r==`function`?0:r)+hr(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Xr(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Jr(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Jr(e,t,n);else{let i=typeof t==`function`?G(e,t,n.custom):t;r=Promise.all(qr(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Zr={test:e=>e===`auto`,parse:e=>e},Qr=e=>t=>t.test(e),$r=[Re,L,I,F,et,$e,Zr],ei=e=>$r.find(Qr(e));function ti(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||S(e)}var ni=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function ri(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(He)||[];if(!r)return e;let i=n.replace(r,``),a=+!!ni.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var ii=/\b([a-z-]*)\(.*?\)/gu,ai={...z,getAnimatableNone:e=>{let t=e.match(ii);return t?t.map(ri).join(` `):e}},oi={...z,getAnimatableNone:e=>{let t=z.parse(e);return z.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},si={...Re,transform:Math.round},ci={borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,top:L,right:L,bottom:L,left:L,inset:L,insetBlock:L,insetBlockStart:L,insetBlockEnd:L,insetInline:L,insetInlineStart:L,insetInlineEnd:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,paddingBlock:L,paddingBlockStart:L,paddingBlockEnd:L,paddingInline:L,paddingInlineStart:L,paddingInlineEnd:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,marginBlock:L,marginBlockStart:L,marginBlockEnd:L,marginInline:L,marginInlineStart:L,marginInlineEnd:L,fontSize:L,backgroundPositionX:L,backgroundPositionY:L,rotate:F,rotateX:F,rotateY:F,rotateZ:F,scale:Be,scaleX:Be,scaleY:Be,scaleZ:Be,skew:F,skewX:F,skewY:F,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,transformPerspective:L,opacity:ze,originX:tt,originY:tt,originZ:L,zIndex:si,fillOpacity:ze,strokeOpacity:ze,numOctaves:si},li={...ci,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:ai,WebkitFilter:ai,mask:oi,WebkitMask:oi},ui=e=>li[e],di=new Set([ai,oi]);function fi(e,t){let n=ui(e);return di.has(n)||(n=z),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var pi=new Set([`auto`,`none`,`0`]);function mi(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!pi.has(t)&&dt(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=fi(n,i)}var hi=class extends Rn{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Fe(r))){let i=vr(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!jr.has(n)||e.length!==2)return;let[r,i]=e,a=ei(r),o=ei(i);if(Le(r)!==Le(i)&&U[n]){this.needsMeasurement=!0;return}if(a!==o)if(On(a)&&On(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else U[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||ti(e[t]))&&n.push(t);n.length&&mi(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=U[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=U[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function gi(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var _i=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function vi(e){return x(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:yi,cancel:bi}=Oe(queueMicrotask,!1),q={x:!1,y:!1};function xi(){return q.x||q.y}function Si(e){return e===`x`||e===`y`?q[e]?null:(q[e]=!0,()=>{q[e]=!1}):q.x||q.y?null:(q.x=q.y=!0,()=>{q.x=q.y=!1})}function Ci(e,t){let n=gi(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function wi(e){return!(e.pointerType===`touch`||xi())}function Ti(e,t,n={}){let[r,i,a]=Ci(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=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!wi(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 Ei=(e,t)=>t?e===t?!0:Ei(e,t.parentElement):!1,Di=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Oi=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function ki(e){return Oi.has(e.tagName)||e.isContentEditable===!0}var Ai=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function ji(e){return Ai.has(e.tagName)||e.isContentEditable===!0}var Mi=new WeakSet;function Ni(e){return t=>{t.key===`Enter`&&e(t)}}function Pi(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Fi=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Ni(()=>{if(Mi.has(n))return;Pi(n,`down`);let e=Ni(()=>{Pi(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Pi(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function Ii(e){return Di(e)&&!xi()}var Li=new WeakSet;function Ri(e,t,n={}){let[r,i,a]=Ci(e,n),o=e=>{let r=e.currentTarget;if(!Ii(e)||Li.has(e))return;Mi.add(r),n.stopPropagation&&Li.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),Mi.has(r)&&Mi.delete(r),Ii(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||Ei(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),vi(e)&&(e.addEventListener(`focus`,e=>Fi(e,i)),!ki(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function zi(e){return x(e)&&`ownerSVGElement`in e}var Bi=new WeakMap,Vi,Hi=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:zi(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Ui=Hi(`inline`,`width`,`offsetWidth`),Wi=Hi(`block`,`height`,`offsetHeight`);function Gi({target:e,borderBoxSize:t}){Bi.get(e)?.forEach(n=>{n(e,{get width(){return Ui(e,t)},get height(){return Wi(e,t)}})})}function Ki(e){e.forEach(Gi)}function qi(){typeof ResizeObserver>`u`||(Vi=new ResizeObserver(Ki))}function Ji(e,t){Vi||qi();let n=gi(e);return n.forEach(e=>{let n=Bi.get(e);n||(n=new Set,Bi.set(e,n)),n.add(t),Vi?.observe(e)}),()=>{n.forEach(e=>{let n=Bi.get(e);n?.delete(t),n?.size||Vi?.unobserve(e)})}}var Yi=new Set,Xi;function Zi(){Xi=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Yi.forEach(t=>t(e))},window.addEventListener(`resize`,Xi)}function Qi(e){return Yi.add(e),Xi||Zi(),()=>{Yi.delete(e),!Yi.size&&typeof Xi==`function`&&(window.removeEventListener(`resize`,Xi),Xi=void 0)}}function $i(e,t){return typeof e==`function`?Qi(e):Ji(e,t)}function ea(e){return zi(e)&&e.tagName===`svg`}var ta=[...$r,R,z],na=e=>ta.find(Qr(e)),ra=()=>({translate:0,scale:1,origin:0,originPoint:0}),ia=()=>({x:ra(),y:ra()}),aa=()=>({min:0,max:0}),J=()=>({x:aa(),y:aa()}),oa=new WeakMap;function sa(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function ca(e){return typeof e==`string`||Array.isArray(e)}var la=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],ua=[`initial`,...la];function da(e){return sa(e.animate)||ua.some(t=>ca(e[t]))}function fa(e){return!!(da(e)||e.variants)}function pa(e,t,n){for(let r in t){let i=t[r],a=n[r];if(K(i))e.addValue(r,i);else if(K(a))e.addValue(r,Ir(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Ir(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var ma={current:null},ha={current:!1},ga=typeof window<`u`;function _a(){if(ha.current=!0,ga)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>ma.current=e.matches;e.addEventListener(`change`,t),t()}else ma.current=!1}var va=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],ya={};function ba(e){ya=e}function xa(){return ya}var Sa=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Rn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=N.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,A.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=da(t),this.isVariantNode=fa(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&K(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,oa.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(ha.current||_a(),this.shouldReduceMotion=ma.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),j(this.notifyUpdate),j(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&sr.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Zn({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:D(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=Dn.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&A.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in ya){let t=ya[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):J()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<va.length;t++){let n=va[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=pa(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Ir(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(b(n)||S(n))?n=parseFloat(n):!na(n)&&z.test(t)&&(n=fi(e,t)),this.setBaseTarget(e,K(n)?n.get():n)),K(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=Ar(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!K(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new te),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){yi.render(this.render)}},Ca=class extends Sa{constructor(){super(...arguments),this.KeyframeResolver=hi}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;K(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},Y=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function wa({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ta({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ea(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Da(e){return e===void 0||e===1}function Oa({scale:e,scaleX:t,scaleY:n}){return!Da(e)||!Da(t)||!Da(n)}function ka(e){return Oa(e)||Aa(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Aa(e){return ja(e.x)||ja(e.y)}function ja(e){return e&&e!==`0%`}function Ma(e,t,n){return n+t*(e-n)}function Na(e,t,n,r,i){return i!==void 0&&(e=Ma(e,i,r)),Ma(e,n,r)+t}function Pa(e,t=0,n=1,r,i){e.min=Na(e.min,t,n,r,i),e.max=Na(e.max,t,n,r,i)}function Fa(e,{x:t,y:n}){Pa(e.x,t.translate,t.scale,t.originPoint),Pa(e.y,n.translate,n.scale,n.originPoint)}var Ia=.999999999999,La=1.0000000000001;function Ra(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(X(e.x,-a.scroll.offset.x),X(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Fa(e,o)),r&&ka(a.latestValues)&&Va(e,a.latestValues,a.layout?.layoutBox))}t.x<La&&t.x>Ia&&(t.x=1),t.y<La&&t.y>Ia&&(t.y=1)}function X(e,t){e.min+=t,e.max+=t}function za(e,t,n,r,i=.5){Pa(e,t,n,B(e.min,e.max,i),r)}function Ba(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function Va(e,t,n){let r=n??e;za(e.x,Ba(t.x,r.x),t.scaleX,t.scale,t.originX),za(e.y,Ba(t.y,r.y),t.scaleY,t.scale,t.originY)}function Ha(e,t){return wa(Ea(e.getBoundingClientRect(),t))}function Ua(e,t,n){let r=Ha(e,n),{scroll:i}=t;return i&&(X(r.x,i.offset.x),X(r.y,i.offset.y)),r}var Wa={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Ga=En.length;function Ka(e,t,n){let r=``,i=!0;for(let a=0;a<Ga;a++){let o=En[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=_i(s,ci[o]);if(!c){i=!1;let t=Wa[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function qa(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(Dn.has(e)){o=!0;continue}else if(Ne(e)){i[e]=n;continue}else{let t=_i(n,ci[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Ka(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function Ja(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 Ya(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Xa={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(L.test(e))e=parseFloat(e);else return e;return`${Ya(e,t.target.x)}% ${Ya(e,t.target.y)}%`}},Za={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=z.parse(e);if(i.length>5)return r;let a=z.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=B(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},Qa={borderRadius:{...Xa,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:Xa,borderTopRightRadius:Xa,borderBottomLeftRadius:Xa,borderBottomRightRadius:Xa,boxShadow:Za};function $a(e,{layout:t,layoutId:n}){return Dn.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Qa[e]||e===`opacity`)}function eo(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(K(r[t])||i&&K(i[t])||$a(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function to(e){return window.getComputedStyle(e)}var no=class extends Ca{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Ja}readValueFromInstance(e,t){if(Dn.has(t))return this.projection?.isProjecting?Sn(t):wn(e,t);{let n=to(e),r=(Ne(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Ha(e,t)}build(e,t,n){qa(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return eo(e,t,n)}},ro={offset:`stroke-dashoffset`,array:`stroke-dasharray`},io={offset:`strokeDashoffset`,array:`strokeDasharray`};function ao(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?ro:io;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var oo=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function so(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(qa(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of oo)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&ao(d,i,a,o,!1)}var co=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`]),lo=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function uo(e,t,n,r){Ja(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(co.has(n)?n:Ur(n),t.attrs[n])}function fo(e,t,n){let r=eo(e,t,n);for(let n in e)if(K(e[n])||K(t[n])){let t=En.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var po=class extends Ca{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=J}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Dn.has(t)){let e=ui(t);return e&&e.default||0}return t=co.has(t)?t:Ur(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return fo(e,t,n)}build(e,t,n){so(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){uo(e,t,n,r)}mount(e){this.isSVGTag=lo(e.tagName),super.mount(e)}},mo=ua.length;function ho(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&ho(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<mo;n++){let r=ua[n],i=e.props[r];(ca(i)||i===!1)&&(t[r]=i)}return t}function go(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 _o=[...la].reverse(),vo=la.length;function yo(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Xr(e,t,n)))}function bo(e){let t=yo(e),n=Co(),r=!0,i=!1,a=t=>(n,r)=>{let i=G(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=ho(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<vo;t++){let p=_o[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=ca(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||sa(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=xo(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,ee={...w,...C},T=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in ee){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Lr(t)&&Lr(n)?!go(t,n):t!==n,r?t==null?u.add(e):T(e):t!==void 0&&u.has(e)?T(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let E=v&&y;b&&(!E||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!E&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=G(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=hr(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=G(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(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=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Co(),i=!0}}}function xo(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!go(t,e):!1}function So(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Co(){return{animate:So(!0),whileInView:So(),whileHover:So(),whileTap:So(),whileDrag:So(),whileFocus:So(),exit:So()}}function wo(e,t){e.min=t.min,e.max=t.max}function Z(e,t){wo(e.x,t.x),wo(e.y,t.y)}function To(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Eo=1e-4,Do=1-Eo,Oo=1+Eo,ko=.01,Ao=0-ko,jo=0+ko;function Q(e){return e.max-e.min}function Mo(e,t,n){return Math.abs(e-t)<=n}function No(e,t,n,r=.5){e.origin=r,e.originPoint=B(t.min,t.max,e.origin),e.scale=Q(n)/Q(t),e.translate=B(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Do&&e.scale<=Oo||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ao&&e.translate<=jo||isNaN(e.translate))&&(e.translate=0)}function Po(e,t,n,r){No(e.x,t.x,n.x,r?r.originX:void 0),No(e.y,t.y,n.y,r?r.originY:void 0)}function Fo(e,t,n,r=0){e.min=(r?B(n.min,n.max,r):n.min)+t.min,e.max=e.min+Q(t)}function Io(e,t,n,r){Fo(e.x,t.x,n.x,r?.x),Fo(e.y,t.y,n.y,r?.y)}function Lo(e,t,n,r=0){let i=r?B(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Q(t)}function Ro(e,t,n,r){Lo(e.x,t.x,n.x,r?.x),Lo(e.y,t.y,n.y,r?.y)}function zo(e,t,n,r,i){return e-=t,e=Ma(e,1/n,r),i!==void 0&&(e=Ma(e,1/i,r)),e}function Bo(e,t=0,n=1,r=.5,i,a=e,o=e){if(I.test(t)&&(t=parseFloat(t),t=B(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=B(a.min,a.max,r);e===a&&(s-=t),e.min=zo(e.min,t,n,s,i),e.max=zo(e.max,t,n,s,i)}function Vo(e,t,[n,r,i],a,o){Bo(e,t[n],t[r],t[i],t.scale,a,o)}var Ho=[`x`,`scaleX`,`originX`],Uo=[`y`,`scaleY`,`originY`];function Wo(e,t,n,r){Vo(e.x,t,Ho,n?n.x:void 0,r?r.x:void 0),Vo(e.y,t,Uo,n?n.y:void 0,r?r.y:void 0)}function Go(e){return e.translate===0&&e.scale===1}function Ko(e){return Go(e.x)&&Go(e.y)}function qo(e,t){return e.min===t.min&&e.max===t.max}function Jo(e,t){return qo(e.x,t.x)&&qo(e.y,t.y)}function Yo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Xo(e,t){return Yo(e.x,t.x)&&Yo(e.y,t.y)}function Zo(e){return Q(e.x)/Q(e.y)}function Qo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function $(e){return[e(`x`),e(`y`)]}function $o(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,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}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 es=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],ts=es.length,ns=e=>typeof e==`string`?parseFloat(e):e,rs=e=>typeof e==`number`||L.test(e);function is(e,t,n,r,i,a){i?(e.opacity=B(0,n.opacity??1,os(r)),e.opacityExit=B(t.opacity??1,0,ss(r))):a&&(e.opacity=B(t.opacity??1,n.opacity??1,r));for(let i=0;i<ts;i++){let a=es[i],o=as(t,a),s=as(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||rs(o)===rs(s)?(e[a]=Math.max(B(ns(o),ns(s),r),0),(I.test(s)||I.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=B(t.rotate||0,n.rotate||0,r))}function as(e,t){return e[t]===void 0?e.borderRadius:e[t]}var os=cs(0,.5,he),ss=cs(.5,.95,w);function cs(e,t,n){return r=>r<e?0:r>t?1:n(E(e,t,r))}function ls(e,t,n){let r=K(e)?e:Ir(e);return r.start(Or(``,r,t,n)),r.animation}function us(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var ds=(e,t)=>e.depth-t.depth,fs=class{constructor(){this.children=[],this.isDirty=!1}add(e){g(this.children,e),this.isDirty=!0}remove(e){_(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ds),this.isDirty=!1,this.children.forEach(e)}};function ps(e,t){let n=N.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(j(r),e(a-t))};return A.setup(r,!0),()=>j(r)}function ms(e){return K(e)?e.get():e}var hs=class{constructor(){this.members=[]}add(e){g(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&&(_(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(_(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)}},gs={hasAnimatedSinceResize:!0,hasEverUpdated:!1},_s={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},vs=[``,`X`,`Y`,`Z`],ys=1e3,bs=0;function xs(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ss(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Gr(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,A,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ss(r)}function Cs({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=bs++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,k.value&&(_s.nodes=_s.calculatedTargetDeltas=_s.calculatedProjections=0),this.nodes.forEach(Es),this.nodes.forEach(Fs),this.nodes.forEach(Is),this.nodes.forEach(Ds),k.addProjectionMetrics&&k.addProjectionMetrics(_s)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=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 fs)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new te),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=zi(t)&&!ea(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;A.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=ps(i,250),gs.hasAnimatedSinceResize&&(gs.hasAnimatedSinceResize=!1,this.nodes.forEach(Ps)))})}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.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||Us,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Xo(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={...Tr(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||Ps(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(),j(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ls),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&&Ss(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}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(As),this.nodes.forEach(ks);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(js);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ms),this.nodes.forEach(Ns),this.nodes.forEach(ws),this.nodes.forEach(Ts)):this.nodes.forEach(js),this.clearAllSnapshots();let e=N.now();M.delta=v(0,1e3/60,e-M.timestamp),M.timestamp=e,M.isProcessing=!0,ke.update.process(M),ke.preRender.process(M),ke.render.process(M),M.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Os),this.sharedNodes.forEach(Rs)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,A.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){A.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Q(this.snapshot.measuredBox.x)&&!Q(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.layoutVersion++,this.layoutCorrected||=J(),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,t=this.projectionDelta&&!Ko(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||ka(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)),qs(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return J();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ys))){let{scroll:e}=this.root;e&&(X(t.x,e.offset.x),X(t.y,e.offset.y))}return t}removeElementScroll(e){let t=J();if(Z(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&&Z(t,e),X(t.x,i.offset.x),X(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||J();Z(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&&(X(r.x,-n.scroll.offset.x),X(r.y,-n.scroll.offset.y)),ka(n.latestValues)&&Va(r,n.latestValues,n.layout?.layoutBox)}return ka(this.latestValues)&&Va(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=J();Z(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!ka(n.latestValues))continue;let r;n.instance&&(Oa(n.latestValues)&&n.updateSnapshot(),r=J(),Z(r,n.measurePageBox())),Wo(t,n.latestValues,n.snapshot?.layoutBox,r)}return ka(this.latestValues)&&Wo(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?!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!==M.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=M.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!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=J(),this.targetWithTransforms=J()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Io(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Z(this.target,this.layout.layoutBox),Fa(this.target,this.targetDelta)):Z(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),k.value&&_s.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Oa(this.parent.latestValues)||Aa(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.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=J(),this.relativeTargetOrigin=J(),Ro(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Z(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===M.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;Z(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Ra(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=J());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(To(this.prevProjectionDelta.x,this.projectionDelta.x),To(this.prevProjectionDelta.y,this.projectionDelta.y)),Po(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!Qo(this.projectionDelta.x,this.prevProjectionDelta.x)||!Qo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),k.value&&_s.calculatedProjections++}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=ia(),this.projectionDelta=ia(),this.projectionDeltaWithTransform=ia()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=ia();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=J(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(Hs));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;zs(a.x,e.x,n),zs(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ro(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Vs(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&Jo(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=J(),Z(d,this.relativeTarget)),s&&(this.animationValues=i,is(i,r,this.latestValues,n,u,l)),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&&=(j(this.pendingAnimation),void 0),this.pendingAnimation=A.update(()=>{gs.hasAnimatedSinceResize=!0,P.layout++,this.motionValue||=Ir(0),this.motionValue.jump(0,!1),this.currentAnimation=ls(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{P.layout--},onComplete:()=>{P.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);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(ys),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&Js(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||J();let t=Q(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=Q(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Z(t,n),Va(t,i),Po(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new hs),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:!0}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&&xs(`z`,e,r,this.animationValues);for(let t=0;t<vs.length;t++)xs(`rotate${vs[t]}`,e,r,this.animationValues),xs(`skew${vs[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=ms(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=ms(t?.pointerEvents)||``),this.hasProjected&&!ka(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=$o(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`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Qa){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=Qa[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?ms(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(ks),this.root.sharedNodes.clear()}}}function ws(e){e.updateLayout()}function Ts(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`)$(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Q(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;wo(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else Js(i,t.layoutBox,n)&&$(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Q(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=ia();Po(o,n,t.layoutBox);let s=ia();a?Po(s,e.applyTransform(r,!0),t.measuredBox):Po(s,n,t.layoutBox);let c=!Ko(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=J();Ro(s,t.layoutBox,i.layoutBox,o);let c=J();Ro(c,n,a.layoutBox,o),Xo(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 Es(e){k.value&&_s.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 Ds(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Os(e){e.clearSnapshot()}function ks(e){e.clearMeasurements()}function As(e){e.isLayoutDirty=!0,e.updateLayout()}function js(e){e.isLayoutDirty=!1}function Ms(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Ns(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Ps(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Fs(e){e.resolveTargetDelta()}function Is(e){e.calcProjection()}function Ls(e){e.resetSkewAndRotation()}function Rs(e){e.removeLeadSnapshot()}function zs(e,t,n){e.translate=B(t.translate,0,n),e.scale=B(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Bs(e,t,n,r){e.min=B(t.min,n.min,r),e.max=B(t.max,n.max,r)}function Vs(e,t,n,r){Bs(e.x,t.x,n.x,r),Bs(e.y,t.y,n.y,r)}function Hs(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Us={duration:.45,ease:[.4,0,.1,1]},Ws=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Gs=Ws(`applewebkit/`)&&!Ws(`chrome/`)?Math.round:w;function Ks(e){e.min=Gs(e.min),e.max=Gs(e.max)}function qs(e){Ks(e.x),Ks(e.y)}function Js(e,t,n){return e===`position`||e===`preserve-aspect`&&!Mo(Zo(t),Zo(n),.2)}function Ys(e){return e!==e.root&&e.scroll?.wasRoot}var Xs=Cs({attachResizeListener:(e,t)=>us(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Zs={current:void 0},Qs=Cs({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Zs.current){let e=new Xs({});e.mount(window),e.setOptions({layoutScroll:!0}),Zs.current=e}return Zs.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),$s=(0,d.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function ec(e=!0){let t=(0,d.useContext)(h);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,d.useId)();(0,d.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,d.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var tc=(0,d.createContext)({strict:!1}),nc={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},rc=!1;function ic(){if(rc)return;let e={};for(let t in nc)e[t]={isEnabled:e=>nc[t].some(t=>!!e[t])};ba(e),rc=!0}function ac(){return ic(),xa()}function oc(e){let t=ac();for(let n in e)t[n]={...t[n],...e[n]};ba(t)}var sc=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function cc(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||sc.has(e)}var lc=r({default:()=>uc}),uc,dc=n((()=>{throw uc={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),fc=e=>!cc(e);function pc(e){typeof e==`function`&&(fc=t=>t.startsWith(`on`)?!cc(t):e(t))}try{pc((dc(),t(lc)).default)}catch{}function mc(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||K(e[i])||(fc(i)||n===!0&&cc(i)||!t&&!cc(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var hc=(0,d.createContext)({});function gc(e,t){if(da(e)){let{initial:t,animate:n}=e;return{initial:t===!1||ca(t)?t:void 0,animate:ca(n)?n:void 0}}return e.inherit===!1?{}:t}function _c(e){let{initial:t,animate:n}=gc(e,(0,d.useContext)(hc));return(0,d.useMemo)(()=>({initial:t,animate:n}),[vc(t),vc(n)])}function vc(e){return Array.isArray(e)?e.join(` `):e}var yc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function bc(e,t,n){for(let r in t)!K(t[r])&&!$a(r,n)&&(e[r]=t[r])}function xc({transformTemplate:e},t){return(0,d.useMemo)(()=>{let n=yc();return qa(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Sc(e,t){let n=e.style||{},r={};return bc(r,n,e),Object.assign(r,xc(e,t)),r}function Cc(e,t){let n={},r=Sc(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var wc=()=>({...yc(),attrs:{}});function Tc(e,t,n,r){let i=(0,d.useMemo)(()=>{let n=wc();return so(n,t,lo(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};bc(t,e.style,e),i.style={...t,...i.style}}return i}var Ec=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function Dc(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Ec.indexOf(e)>-1||/[A-Z]/u.test(e))}function Oc(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??Dc(e)?Tc:Cc)(t,r,i,e),c=mc(t,typeof e==`string`,a),l=e===d.Fragment?{}:{...c,...s,ref:n},{children:u}=t,f=(0,d.useMemo)(()=>K(u)?u.get():u,[u]);return(0,d.createElement)(e,{...l,children:f})}function kc({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Ac(n,r,i,e),renderState:t()}}function Ac(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=ms(a[e]);let{initial:o,animate:s}=e,c=da(e),l=fa(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!sa(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Ar(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var jc=e=>(t,n)=>{let r=(0,d.useContext)(hc),i=(0,d.useContext)(h),a=()=>kc(e,t,r,i);return n?a():p(a)},Mc=jc({scrapeMotionValuesFromProps:eo,createRenderState:yc}),Nc=jc({scrapeMotionValuesFromProps:fo,createRenderState:wc}),Pc=Symbol.for(`motionComponentSymbol`);function Fc(e,t,n){let r=(0,d.useRef)(n);(0,d.useInsertionEffect)(()=>{r.current=n});let i=(0,d.useRef)(null);return(0,d.useCallback)(n=>{n&&e.onMount?.(n);let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n);t&&(n?t.mount(n):t.unmount())},[t])}var Ic=(0,d.createContext)({});function Lc(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Rc(e,t,n,r,i,a){let{visualElement:o}=(0,d.useContext)(hc),s=(0,d.useContext)(tc),c=(0,d.useContext)(h),l=(0,d.useContext)($s),u=l.reducedMotion,f=l.skipAnimations,p=(0,d.useRef)(null),g=(0,d.useRef)(!1);r||=s.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:f,isSVG:a}),g.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));let _=p.current,v=(0,d.useContext)(Ic);_&&!_.projection&&i&&(_.type===`html`||_.type===`svg`)&&zc(p.current,n,i,v);let y=(0,d.useRef)(!1);(0,d.useInsertionEffect)(()=>{_&&y.current&&_.update(n,c)});let b=n[Wr],x=(0,d.useRef)(!!b&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(b)&&window.MotionHasOptimisedAnimation?.(b));return m(()=>{g.current=!0,_&&(y.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),_.scheduleRenderMicrotask(),x.current&&_.animationState&&_.animationState.animateChanges())}),(0,d.useEffect)(()=>{_&&(!x.current&&_.animationState&&_.animationState.animateChanges(),x.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(b)}),!1),_.enteringChildren=void 0)}),_}function zc(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Bc(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Lc(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Bc(e){if(e)return e.options.allowProjection===!1?Bc(e.parent):e.projection}function Vc(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&oc(r);let a=n?n===`svg`:Dc(e),o=a?Nc:Mc;function s(n,s){let c,l={...(0,d.useContext)($s),...n,layoutId:Hc(n)},{isStatic:f}=l,p=_c(n),m=o(n,f);if(!f&&typeof window<`u`){Uc(l,r);let t=Wc(l);c=t.MeasureLayout,p.visualElement=Rc(e,m,l,i,t.ProjectionNode,a)}return(0,u.jsxs)(hc.Provider,{value:p,children:[c&&p.visualElement?(0,u.jsx)(c,{visualElement:p.visualElement,...l}):null,Oc(e,n,Fc(m,p.visualElement,s),m,f,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,d.forwardRef)(s);return c[Pc]=e,c}function Hc({layoutId:e}){let t=(0,d.useContext)(f).id;return t&&e!==void 0?t+`-`+e:e}function Uc(e,t){(0,d.useContext)(tc).strict}function Wc(e){let{drag:t,layout:n}=ac();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Gc(e,t){if(typeof Proxy>`u`)return Vc;let n=new Map,r=(n,r)=>Vc(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Vc(a,void 0,e,t)),n.get(a))})}var Kc=(e,t)=>t.isSVG??Dc(e)?new po(t):new no(t,{allowProjection:e!==d.Fragment}),qc=class extends Y{constructor(e){super(e),e.animationState||=bo(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();sa(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?.()}},Jc=0,Yc={animation:{Feature:qc},exit:{Feature:class extends Y{constructor(){super(...arguments),this.id=Jc++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`){let n=G(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Xc(e){return{point:{x:e.pageX,y:e.pageY}}}var Zc=e=>t=>Di(t)&&e(t,Xc(t));function Qc(e,t,n,r){return us(e,t,Zc(n),r)}var $c=({current:e})=>e?e.ownerDocument.defaultView:null,el=(e,t)=>Math.abs(e-t);function tl(e,t){let n=el(e.x,t.x),r=el(e.y,t.y);return Math.sqrt(n**2+r**2)}var nl=new Set([`auto`,`scroll`]),rl=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.lastRawMoveEventInfo&&(this.lastMoveEventInfo=il(this.lastRawMoveEventInfo,this.transformPagePoint));let e=ol(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=tl(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=M;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=il(t,this.transformPagePoint),A.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{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=ol(e.type===`pointercancel`?this.lastMoveEventInfo:il(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Di(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=il(Xc(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=M;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,ol(s,this.history)),this.removeListeners=T(Qc(this.contextWindow,`pointermove`,this.handlePointerMove),Qc(this.contextWindow,`pointerup`,this.handlePointerUp),Qc(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(nl.has(e.overflowX)||nl.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),A.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),j(this.updatePoint)}};function il(e,t){return t?{point:t(e.point)}:e}function al(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ol({point:e},t){return{point:e,delta:al(e,cl(t)),offset:al(e,sl(t)),velocity:ll(t,.1)}}function sl(e){return e[0]}function cl(e){return e[e.length-1]}function ll(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=cl(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>D(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>D(t)*2&&(r=e[1]);let a=O(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 ul(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?B(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?B(n,e,r.max):Math.min(e,n)),e}function dl(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 fl(e,{top:t,left:n,bottom:r,right:i}){return{x:dl(e.x,n,i),y:dl(e.y,t,r)}}function pl(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 ml(e,t){return{x:pl(e.x,t.x),y:pl(e.y,t.y)}}function hl(e,t){let n=.5,r=Q(e),i=Q(t);return i>r?n=E(t.min,t.max-r,e.min):r>i&&(n=E(e.min,e.max-i,t.min)),v(0,1,n)}function gl(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 _l=.35;function vl(e=_l){return e===!1?e=0:e===!0&&(e=_l),{x:yl(e,`left`,`right`),y:yl(e,`top`,`bottom`)}}function yl(e,t,n){return{min:bl(e,t),max:bl(e,n)}}function bl(e,t){return typeof e==`number`?e:e[t]||0}var xl=new WeakMap,Sl=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=J(),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(Xc(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Si(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),$(e=>{let t=this.getAxisMotionValue(e).get()||0;if(I.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Q(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&A.update(()=>i(e,t),!1,!0),Hr(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;if(r&&this.currentDirection===null){this.currentDirection=El(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&A.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 rl(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:$c(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&&A.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||!Tl(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=ul(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&&Lc(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=fl(n.layoutBox,e):this.constraints=!1,this.elastic=vl(t),r!==this.constraints&&!Lc(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&$(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=gl(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Lc(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=Ua(n,r.root,this.visualElement.getTransformPagePoint()),a=ml(r.layout.layoutBox,i);if(t){let e=t(Ta(a));this.hasMutatedConstraints=!!e,e&&(a=wa(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=$(o=>{if(!Tl(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 Hr(this.visualElement,e),n.start(Or(e,n,0,t,this.visualElement,!1))}stopAnimation(){$(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){$(t=>{let{drag:n}=this.getProps();if(!Tl(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-B(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Lc(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};$(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=hl({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),$(t=>{if(!Tl(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(B(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;xl.set(this.visualElement,this);let e=this.visualElement.current,t=Qc(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&ji(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Lc(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=wl(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),A.read(r);let o=us(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&($(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=_l,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Cl(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function wl(e,t,n){let r=$i(e,Cl(n)),i=$i(t,Cl(n));return()=>{r(),i()}}function Tl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function El(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Dl=class extends Y{constructor(e){super(e),this.removeGroupControls=w,this.removeListeners=w,this.controls=new Sl(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||w}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()}},Ol=e=>(t,n)=>{e&&A.update(()=>e(t,n),!1,!0)},kl=class extends Y{constructor(){super(...arguments),this.removePointerDownListener=w}onPointerDown(e){this.session=new rl(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$c(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ol(e),onStart:Ol(t),onMove:Ol(n),onEnd:(e,t)=>{delete this.session,r&&A.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Qc(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Al=!1,jl=class extends d.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),Al&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),gs.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}),Al=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||A.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),yi.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Al=!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 Ml(e){let[t,n]=ec(),r=(0,d.useContext)(f);return(0,u.jsx)(jl,{...e,layoutGroup:r,switchLayoutGroup:(0,d.useContext)(Ic),isPresent:t,safeToRemove:n})}var Nl={pan:{Feature:kl},drag:{Feature:Dl,ProjectionNode:Qs,MeasureLayout:Ml}};function Pl(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&A.postRender(()=>i(t,Xc(t)))}var Fl=class extends Y{mount(){let{current:e}=this.node;e&&(this.unmount=Ti(e,(e,t)=>(Pl(this.node,t,`Start`),e=>Pl(this.node,e,`End`))))}unmount(){}},Il=class extends Y{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=T(us(this.node.current,`focus`,()=>this.onFocus()),us(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Ll(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&&A.postRender(()=>i(t,Xc(t)))}var Rl=class extends Y{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Ri(e,(e,t)=>(Ll(this.node,t,`Start`),(e,{success:t})=>Ll(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},zl=new WeakMap,Bl=new WeakMap,Vl=e=>{let t=zl.get(e.target);t&&t(e)},Hl=e=>{e.forEach(Vl)};function Ul({root:e,...t}){let n=e||document;Bl.has(n)||Bl.set(n,{});let r=Bl.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Hl,{root:e,...t})),r[i]}function Wl(e,t,n){let r=Ul(t);return zl.set(e,n),r.observe(e),()=>{zl.delete(e),r.unobserve(e)}}var Gl={some:0,all:1},Kl=class extends Y{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:Gl[r]};this.stopObserver=Wl(this.node.current,a,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)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(ql(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function ql({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Jl={inView:{Feature:Kl},tap:{Feature:Rl},focus:{Feature:Il},hover:{Feature:Fl}},Yl={layout:{ProjectionNode:Qs,MeasureLayout:Ml}},Xl=Gc({...Yc,...Jl,...Nl,...Yl},Kc),Zl=c(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-[var(--miravo-radius-pill)] border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[background-color,border-color,color] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 bg-destructive/20 focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function Ql({className:e,variant:t=`default`,render:n,...r}){return o({defaultTagName:`span`,props:a({className:l(Zl({variant:t}),e)},r),render:n,state:{slot:`badge`,variant:t}})}export{$s as a,ma as c,h as d,m as f,ec as i,vi as l,f as m,Xl as n,_a as o,p,pc as r,ha as s,Ql as t,wr as u};
@@ -1 +0,0 @@
1
- import{t as e}from"./catalog-M-k7Y9Sp.js";export{e as CatalogPage};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{c as t}from"./vendor-charts-95ykyDlI.js";import{ot as n}from"./vendor-ui-D8j69UH4.js";import{S as r,o as i,ot as a,v as o}from"./api-kPM52mb-.js";import{i as s,t as c}from"./query-fetch-error-C2Ec4RQS.js";import{n as l,t as u}from"./badge-D4jktT8T.js";import{t as ee}from"./AnimatePresence-BZCmb1bq.js";import{c as d,n as f}from"./chunk-OE4NN4TA-Q4iNR9l9.js";import{a as p,c as m,i as h,n as g,o as _,r as v,t as te}from"./dialog-Di9Bs0FH.js";import{C as y,S as b,u as x,w as S}from"./format-OUFL_tef.js";import{n as C,t as w}from"./utils-BO2u-wC_.js";import{n as T,t as E}from"./catalog-template-icons-C7KJdJJX.js";import{r as D}from"./source-host-miravo-D_AecPVc.js";import{t as O}from"./play-TTg_EXSa.js";import{t as k}from"./rocket-807Pf7C1.js";import{i as A,n as j,r as M,t as N}from"./catalog-source-2aT9qob-.js";import{n as ne}from"./get-error-message-eGdenTLv.js";import{a as P,i as F,o as I,t as L}from"./use-engine-command-mutation-DMkQxmt9.js";var R=C(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),z=e(t(),1),B=n(),V=[`builtin`,`personal`];function H(){let[e,t]=(0,z.useState)(``),[n,f]=(0,z.useState)(`all`),[S,C]=(0,z.useState)(null),[E,D]=(0,z.useState)(null),[O,j]=(0,z.useState)(null),N=(0,z.useRef)(null),F=L(),I=d(),R=a(e=>e.templates),H=(0,z.useMemo)(()=>new Set(R.map(e=>e.templateId)),[R]);(0,z.useEffect)(()=>{let e=e=>{if(e.key!==`/`||e.metaKey||e.ctrlKey||e.altKey)return;let t=e.target.tagName;t===`INPUT`||t===`TEXTAREA`||t===`SELECT`||(e.preventDefault(),N.current?.focus())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let W=s({queryKey:o.catalog.templates(),queryFn:()=>i(`/catalog/templates`,r.catalogTemplates)}),K=W.data??[],q=E===null?null:K.find(e=>e.id===E)??null,J=W.isPending&&!W.data,Y=W.isError&&!W.data,X=W.isError&&!!W.data,Z=ne(W.error,`Failed to load templates.`),re=(0,z.useCallback)(e=>{j(e)},[]),ie=(0,z.useCallback)(e=>{D(e)},[]),ae=async e=>{C(e);try{return await F.mutateAsync({type:`loadTemplate`,templatePath:e}),m(`Next: connect a client`),I(`/?highlight=${encodeURIComponent(e)}`),!0}catch{return!1}finally{C(null)}},oe=(0,z.useMemo)(()=>{let e={all:K.length};for(let t of V)e[t]=0;for(let t of K){let n=M(t.source);e[n]=(e[n]??0)+1}return e},[K]),Q=e.toLowerCase(),$=K.filter(e=>n===`all`||M(e.source)===n).filter(e=>Q?e.name.toLowerCase().includes(Q)||e.id.toLowerCase().includes(Q)||(e.description?.toLowerCase().includes(Q)??!1):!0);return(0,B.jsxs)(`div`,{className:`@container/templates mx-auto flex w-full max-w-screen-2xl flex-col gap-5 p-4 sm:gap-6 sm:p-6`,children:[(0,B.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,B.jsx)(`h1`,{className:`font-heading text-2xl font-semibold tracking-tight`,children:`Template Catalog`}),(0,B.jsx)(u,{variant:`outline`,className:`text-xs`,children:Y?(0,B.jsx)(`span`,{className:`text-destructive`,children:`Unavailable`}):J&&K.length===0?(0,B.jsx)(B.Fragment,{children:`Loading...`}):(0,B.jsxs)(B.Fragment,{children:[new Set(K.map(e=>e.id)).size,` templates`]})})]}),(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Choose a template to launch a realistic industrial system. Each template includes pre-configured asset models with realistic physics, lifecycle degradation, and fault modes.`})]}),Y&&(0,B.jsx)(c,{message:Z,onRetry:()=>void W.refetch(),isRetrying:W.isFetching}),X&&(0,B.jsx)(c,{message:`${Z} Showing cached templates.`,onRetry:()=>void W.refetch(),isRetrying:W.isFetching}),!Y&&(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,B.jsxs)(`div`,{className:`relative max-w-xs flex-1 min-w-[14rem]`,children:[(0,B.jsx)(A,{className:`absolute left-2.5 top-2.5 size-4 text-muted-foreground`}),(0,B.jsx)(b,{ref:N,placeholder:`Filter templates...`,value:e,onChange:e=>t(e.target.value),className:`pl-9 pr-7`}),!e&&(0,B.jsx)(`kbd`,{className:`pointer-events-none absolute top-1/2 right-2 -translate-y-1/2 rounded-[var(--miravo-radius-tight)] border border-border bg-muted px-1 font-mono text-[10px] text-muted-foreground`,children:`/`})]}),(0,B.jsx)(G,{value:n,counts:oe,onChange:f})]}),(0,B.jsx)(`div`,{className:`grid grid-cols-1 gap-4 @[720px]/templates:grid-cols-2`,"aria-busy":J&&!Y,children:Y?null:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(ee,{children:$.map((e,t)=>(0,B.jsx)(l.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,scale:.96,transition:{duration:.15}},transition:{type:`spring`,stiffness:380,damping:30,delay:t*.04},className:`grid`,children:(0,B.jsx)(U,{template:e,launching:S===e.id,loaded:H.has(e.id),onInspect:re,onLaunch:ie})},`${e.source}:${e.id}`))}),$.length===0&&K.length>0&&(0,B.jsx)(`p`,{className:`col-span-full py-8 text-center text-sm text-muted-foreground`,children:`No templates match the current filters.`})]})}),K.length>0&&(0,B.jsx)(`div`,{className:w(P,`p-0`),children:(0,B.jsx)(`div`,{className:`community-teaser relative overflow-hidden rounded-[inherit]`,children:(0,B.jsx)(`div`,{className:`relative z-10 mx-auto max-w-3xl px-5 py-10 sm:px-10 sm:py-12`,children:(0,B.jsxs)(`div`,{className:`grid items-center gap-10 lg:grid-cols-[minmax(0,1fr)_minmax(0,17rem)]`,children:[(0,B.jsxs)(`div`,{className:`order-2 flex min-w-0 flex-col gap-4 lg:order-1`,children:[(0,B.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-3 gap-y-1`,children:[(0,B.jsx)(`p`,{className:`blueprint-title text-primary`,children:`Future channel`}),(0,B.jsx)(`span`,{className:`blueprint-stat text-[10px] text-muted-foreground`,children:`MIRAVO_REGISTRY · NOT_CONNECTED`})]}),(0,B.jsx)(`h2`,{className:`font-heading text-xl font-semibold tracking-tight sm:text-2xl`,children:`Community Templates`}),(0,B.jsx)(`p`,{className:`max-w-xl text-sm leading-relaxed text-muted-foreground`,children:`Share your industrial templates with the Miravo community. Publish custom templates, discover configurations from other engineers, and fork them as your starting point.`}),(0,B.jsx)(`div`,{children:(0,B.jsx)(u,{variant:`outline`,className:`community-teaser-soon border-primary/35 bg-primary/5 text-[10px] text-primary`,children:`Coming Soon`})})]}),(0,B.jsx)(`div`,{className:`order-1 flex justify-center lg:order-2 lg:justify-end`,children:(0,B.jsxs)(`div`,{className:`community-teaser-module relative flex w-full max-w-[14rem] flex-col items-center justify-center gap-3 border border-primary/15 bg-muted/15 py-8 sm:max-w-[15.5rem] sm:py-10`,"aria-hidden":!0,children:[(0,B.jsx)(`div`,{className:`community-teaser-icon-ring relative z-[1] flex size-[4.25rem] items-center justify-center rounded-[var(--miravo-radius-tight)] border border-primary/35 bg-gradient-to-br from-primary/18 to-primary/5`,children:(0,B.jsx)(k,{className:`size-9 text-primary`,"aria-hidden":!0})}),(0,B.jsx)(`span`,{className:`blueprint-stat relative z-[1] text-[9px] tracking-[0.18em] text-muted-foreground`,children:`AWAITING SIGNAL`}),(0,B.jsx)(`span`,{className:`blueprint-stat relative z-[1] text-[9px] text-muted-foreground`,children:`Uplink idle`})]})})]})})})}),(0,B.jsx)(te,{open:E!==null,onOpenChange:e=>{e||D(null)},children:(0,B.jsxs)(g,{className:`min-w-0 sm:max-w-md`,children:[(0,B.jsxs)(p,{children:[(0,B.jsx)(_,{children:`Launch template?`}),(0,B.jsx)(v,{children:q!==null&&(0,B.jsxs)(B.Fragment,{children:[`This loads`,` `,(0,B.jsx)(`span`,{className:`font-medium text-foreground`,children:x(q.name)}),` `,`into the running factory.`]})})]}),(0,B.jsxs)(h,{children:[(0,B.jsx)(y,{variant:`outline`,disabled:S!==null,onClick:()=>D(null),children:`Cancel`}),(0,B.jsx)(y,{disabled:S!==null||q===null,onClick:async()=>{q!==null&&await ae(q.id)&&D(null)},children:S===q?.id?`Launching...`:`Launch`})]})]})}),(0,B.jsx)(T,{templateId:O?.id??null,onClose:()=>j(null)})]})}var U=(0,z.memo)(function({template:e,launching:t,loaded:n,onInspect:r,onLaunch:i}){return(0,B.jsxs)(`div`,{className:w(I,`flex flex-col gap-4 p-5`),children:[(0,B.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,B.jsx)(`div`,{className:`flex size-10 shrink-0 items-center justify-center rounded-[var(--miravo-radius-stadium-sm)] bg-primary/10 text-primary`,children:(0,B.jsx)(E,{id:e.id,className:`size-5`})}),(0,B.jsxs)(`div`,{className:`min-w-0 flex flex-col gap-1`,children:[(0,B.jsx)(`span`,{className:`font-heading text-sm font-semibold uppercase tracking-wide`,children:x(e.name)}),(0,B.jsx)(`p`,{className:`line-clamp-3 text-xs leading-relaxed text-foreground/75`,children:e.description??`Industrial template.`}),(0,B.jsx)(`span`,{className:`font-mono text-[10px] text-muted-foreground`,children:e.id})]})]}),(0,B.jsx)(`div`,{className:`px-3 py-2`,children:(0,B.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.models.map(e=>(0,B.jsx)(u,{variant:`outline`,className:`h-auto min-h-5 rounded-[var(--miravo-radius-tight)] px-1.5 py-0 font-mono text-[10px] font-normal text-primary`,children:e},e))})}),(0,B.jsxs)(`div`,{className:`mt-auto flex flex-wrap items-center gap-4 font-mono text-[11px] text-muted-foreground`,children:[(0,B.jsxs)(`span`,{children:[(0,B.jsx)(`span`,{className:`text-foreground`,children:e.assetCount}),` assets`]}),(0,B.jsxs)(`span`,{children:[(0,B.jsx)(`span`,{className:`text-foreground`,children:e.models.length}),` models`]}),e.memberCount>0&&(0,B.jsxs)(`span`,{children:[`~`,(0,B.jsx)(`span`,{className:`text-foreground`,children:W(e.memberCount)}),` tags/cycle`]}),n&&(0,B.jsx)(u,{variant:`outline`,className:`ml-auto shrink-0 border-success/40 bg-success/10 font-sans text-[10px] font-medium uppercase tracking-wide text-success`,children:`Loaded`}),(0,B.jsx)(u,{variant:`outline`,className:w(`shrink-0 font-sans text-[10px] font-medium uppercase tracking-wide`,!n&&`ml-auto`,N(e.source)),children:j(e.source)})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-2 border-t border-border/30 pt-3`,children:[(0,B.jsxs)(y,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>r(e),className:F,children:[(0,B.jsx)(D,{className:`size-3.5`,"aria-hidden":!0}),`Inspect`]}),n?(0,B.jsxs)(f,{to:`/`,className:w(S({size:`sm`}),`ml-auto`),children:[(0,B.jsx)(R,{className:`mr-1 size-3`,"aria-hidden":!0}),`Open`]}):(0,B.jsxs)(y,{size:`sm`,className:`ml-auto`,disabled:t,onClick:()=>i(e.id),children:[(0,B.jsx)(O,{className:`mr-1 size-3`}),t?`...`:`Launch`]})]})]})});function W(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function G({value:e,counts:t,onChange:n}){return(0,B.jsx)(`div`,{className:`flex flex-wrap items-center gap-1.5`,role:`radiogroup`,"aria-label":`Filter by source`,children:[{id:`all`,label:`All`},...V.map(e=>({id:e,label:j(e)}))].map(r=>{let i=e===r.id,a=t[r.id]??0,o=r.id!==`all`&&a===0;return(0,B.jsxs)(`label`,{className:w(`inline-flex h-7 items-center gap-1.5 rounded-[var(--miravo-radius-pill)] border px-3 text-xs font-medium transition-colors`,i?`border-primary/60 bg-primary/15 text-primary`:`border-border/60 bg-card/30 text-muted-foreground hover:border-border hover:bg-muted/40 hover:text-foreground`,o?`cursor-not-allowed opacity-40 hover:border-border/60 hover:bg-card/30 hover:text-muted-foreground`:`cursor-pointer`),children:[(0,B.jsx)(`input`,{type:`radio`,name:`catalog-source-filter`,value:r.id,checked:i,disabled:o,onChange:()=>n(r.id),className:`sr-only`}),(0,B.jsx)(`span`,{children:r.label}),(0,B.jsx)(`span`,{className:`font-mono text-[10px] opacity-70`,children:a})]},r.id)})})}export{R as n,H as t};