ciris-agent 1.7.7__py3-none-any.whl

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 (986) hide show
  1. ciris_adapters/README.md +113 -0
  2. ciris_adapters/__init__.py +30 -0
  3. ciris_adapters/ciris_covenant_metrics/README.md +144 -0
  4. ciris_adapters/ciris_covenant_metrics/__init__.py +36 -0
  5. ciris_adapters/ciris_covenant_metrics/adapter.py +249 -0
  6. ciris_adapters/ciris_covenant_metrics/manifest.json +152 -0
  7. ciris_adapters/ciris_covenant_metrics/services.py +403 -0
  8. ciris_adapters/ciris_hosted_tools/__init__.py +24 -0
  9. ciris_adapters/ciris_hosted_tools/adapter.py +169 -0
  10. ciris_adapters/ciris_hosted_tools/manifest.json +94 -0
  11. ciris_adapters/ciris_hosted_tools/services.py +744 -0
  12. ciris_adapters/external_data_sql/README.md +559 -0
  13. ciris_adapters/external_data_sql/__init__.py +43 -0
  14. ciris_adapters/external_data_sql/adapter.py +144 -0
  15. ciris_adapters/external_data_sql/configurable.py +315 -0
  16. ciris_adapters/external_data_sql/dialects/__init__.py +37 -0
  17. ciris_adapters/external_data_sql/dialects/base.py +133 -0
  18. ciris_adapters/external_data_sql/dialects/mysql.py +63 -0
  19. ciris_adapters/external_data_sql/dialects/postgresql.py +59 -0
  20. ciris_adapters/external_data_sql/dialects/sqlite.py +62 -0
  21. ciris_adapters/external_data_sql/example_config.json +88 -0
  22. ciris_adapters/external_data_sql/example_privacy_schema.yaml +127 -0
  23. ciris_adapters/external_data_sql/manifest.json +195 -0
  24. ciris_adapters/external_data_sql/privacy_schema_loader.py +189 -0
  25. ciris_adapters/external_data_sql/protocol.py +101 -0
  26. ciris_adapters/external_data_sql/schemas.py +146 -0
  27. ciris_adapters/external_data_sql/service.py +1547 -0
  28. ciris_adapters/external_data_sql/service_old.py +492 -0
  29. ciris_adapters/home_assistant/__init__.py +63 -0
  30. ciris_adapters/home_assistant/adapter.py +201 -0
  31. ciris_adapters/home_assistant/communication_service.py +347 -0
  32. ciris_adapters/home_assistant/configurable.py +667 -0
  33. ciris_adapters/home_assistant/manifest.json +203 -0
  34. ciris_adapters/home_assistant/schemas.py +129 -0
  35. ciris_adapters/home_assistant/service.py +751 -0
  36. ciris_adapters/home_assistant/tool_service.py +441 -0
  37. ciris_adapters/mcp_client/__init__.py +82 -0
  38. ciris_adapters/mcp_client/adapter.py +847 -0
  39. ciris_adapters/mcp_client/config.py +280 -0
  40. ciris_adapters/mcp_client/configurable.py +422 -0
  41. ciris_adapters/mcp_client/manifest.json +185 -0
  42. ciris_adapters/mcp_client/mcp_communication_service.py +393 -0
  43. ciris_adapters/mcp_client/mcp_tool_service.py +463 -0
  44. ciris_adapters/mcp_client/mcp_wise_service.py +394 -0
  45. ciris_adapters/mcp_client/schemas.py +149 -0
  46. ciris_adapters/mcp_client/security.py +592 -0
  47. ciris_adapters/mcp_common/__init__.py +44 -0
  48. ciris_adapters/mcp_common/manifest.json +25 -0
  49. ciris_adapters/mcp_common/protocol.py +315 -0
  50. ciris_adapters/mcp_common/schemas.py +225 -0
  51. ciris_adapters/mcp_server/__init__.py +47 -0
  52. ciris_adapters/mcp_server/adapter.py +581 -0
  53. ciris_adapters/mcp_server/config.py +260 -0
  54. ciris_adapters/mcp_server/configurable.py +393 -0
  55. ciris_adapters/mcp_server/handlers.py +663 -0
  56. ciris_adapters/mcp_server/manifest.json +211 -0
  57. ciris_adapters/mcp_server/security.py +500 -0
  58. ciris_adapters/mock_llm/README.md +117 -0
  59. ciris_adapters/mock_llm/__init__.py +21 -0
  60. ciris_adapters/mock_llm/adapter.py +131 -0
  61. ciris_adapters/mock_llm/configurable.py +237 -0
  62. ciris_adapters/mock_llm/manifest.json +106 -0
  63. ciris_adapters/mock_llm/protocol.py +37 -0
  64. ciris_adapters/mock_llm/responses.py +520 -0
  65. ciris_adapters/mock_llm/responses_action_selection.py +1041 -0
  66. ciris_adapters/mock_llm/responses_epistemic.py +17 -0
  67. ciris_adapters/mock_llm/responses_feedback.py +27 -0
  68. ciris_adapters/mock_llm/schemas.py +35 -0
  69. ciris_adapters/mock_llm/service.py +294 -0
  70. ciris_adapters/navigation/__init__.py +21 -0
  71. ciris_adapters/navigation/adapter.py +129 -0
  72. ciris_adapters/navigation/configurable.py +239 -0
  73. ciris_adapters/navigation/manifest.json +104 -0
  74. ciris_adapters/navigation/service.py +487 -0
  75. ciris_adapters/reddit/README.md +132 -0
  76. ciris_adapters/reddit/REDDIT_ADAPTER_ANALYSIS.md +715 -0
  77. ciris_adapters/reddit/REDDIT_ADAPTER_SUMMARY.txt +278 -0
  78. ciris_adapters/reddit/REDDIT_ANALYSIS_INDEX.md +307 -0
  79. ciris_adapters/reddit/REDDIT_PRODUCTION_READINESS_PLAN.md +518 -0
  80. ciris_adapters/reddit/__init__.py +15 -0
  81. ciris_adapters/reddit/adapter.py +189 -0
  82. ciris_adapters/reddit/configurable.py +274 -0
  83. ciris_adapters/reddit/error_handler.py +307 -0
  84. ciris_adapters/reddit/manifest.json +218 -0
  85. ciris_adapters/reddit/observer.py +532 -0
  86. ciris_adapters/reddit/protocol.py +34 -0
  87. ciris_adapters/reddit/schemas.py +433 -0
  88. ciris_adapters/reddit/service.py +1471 -0
  89. ciris_adapters/sample_adapter/README.md +474 -0
  90. ciris_adapters/sample_adapter/__init__.py +45 -0
  91. ciris_adapters/sample_adapter/adapter.py +208 -0
  92. ciris_adapters/sample_adapter/configurable.py +469 -0
  93. ciris_adapters/sample_adapter/manifest.json +247 -0
  94. ciris_adapters/sample_adapter/services.py +486 -0
  95. ciris_adapters/weather/__init__.py +16 -0
  96. ciris_adapters/weather/adapter.py +130 -0
  97. ciris_adapters/weather/configurable.py +240 -0
  98. ciris_adapters/weather/manifest.json +156 -0
  99. ciris_adapters/weather/service.py +600 -0
  100. ciris_agent-1.7.7.dist-info/METADATA +284 -0
  101. ciris_agent-1.7.7.dist-info/RECORD +986 -0
  102. ciris_agent-1.7.7.dist-info/WHEEL +5 -0
  103. ciris_agent-1.7.7.dist-info/entry_points.txt +15 -0
  104. ciris_agent-1.7.7.dist-info/licenses/LICENSE +205 -0
  105. ciris_agent-1.7.7.dist-info/licenses/NOTICE +82 -0
  106. ciris_agent-1.7.7.dist-info/top_level.txt +4 -0
  107. ciris_engine/__init__.py +15 -0
  108. ciris_engine/ciris_templates/ally.yaml +632 -0
  109. ciris_engine/ciris_templates/default.yaml +411 -0
  110. ciris_engine/ciris_templates/echo-core.yaml +629 -0
  111. ciris_engine/ciris_templates/echo-speculative.yaml +764 -0
  112. ciris_engine/ciris_templates/echo.yaml +647 -0
  113. ciris_engine/ciris_templates/sage.yaml +332 -0
  114. ciris_engine/ciris_templates/scout.yaml +338 -0
  115. ciris_engine/ciris_templates/test.yaml +168 -0
  116. ciris_engine/cli.py +42 -0
  117. ciris_engine/config/CIRIS_SERVICES.json +19 -0
  118. ciris_engine/config/MODEL_CAPABILITIES.json +419 -0
  119. ciris_engine/config/PRICING_DATA.json +179 -0
  120. ciris_engine/config/__init__.py +50 -0
  121. ciris_engine/config/ciris_services.py +113 -0
  122. ciris_engine/config/model_capabilities.py +388 -0
  123. ciris_engine/config/pricing_models.py +276 -0
  124. ciris_engine/constants.py +35 -0
  125. ciris_engine/data/__init__.py +1 -0
  126. ciris_engine/data/covenant_1.0b.txt +978 -0
  127. ciris_engine/gui_static/11steps.svg +107 -0
  128. ciris_engine/gui_static/2x-schematics.png +0 -0
  129. ciris_engine/gui_static/404/index.html +1 -0
  130. ciris_engine/gui_static/404.html +1 -0
  131. ciris_engine/gui_static/_next/static/0edhkwDxd5UccTsCmtaBi/_buildManifest.js +1 -0
  132. ciris_engine/gui_static/_next/static/0edhkwDxd5UccTsCmtaBi/_ssgManifest.js +1 -0
  133. ciris_engine/gui_static/_next/static/U-3xTQao7hc2wnAi-Uekm/_buildManifest.js +1 -0
  134. ciris_engine/gui_static/_next/static/U-3xTQao7hc2wnAi-Uekm/_ssgManifest.js +1 -0
  135. ciris_engine/gui_static/_next/static/chunks/3297-60e86ba0f8a7b040.js +1 -0
  136. ciris_engine/gui_static/_next/static/chunks/3835-2aad4b7f5f8e4643.js +1 -0
  137. ciris_engine/gui_static/_next/static/chunks/4499-99a0bc47de0b8975.js +1 -0
  138. ciris_engine/gui_static/_next/static/chunks/4534-af88cd4ba6e99bff.js +1 -0
  139. ciris_engine/gui_static/_next/static/chunks/4541-84b455f9e0dc4cfe.js +1 -0
  140. ciris_engine/gui_static/_next/static/chunks/4789-61412711484754bb.js +1 -0
  141. ciris_engine/gui_static/_next/static/chunks/6539-c6398bc9d7018430.js +1 -0
  142. ciris_engine/gui_static/_next/static/chunks/704-8e827b26cc8c2d32.js +1 -0
  143. ciris_engine/gui_static/_next/static/chunks/704-fb45d630f3192c6f.js +1 -0
  144. ciris_engine/gui_static/_next/static/chunks/8072-de4952a2e6d2b33f.js +1 -0
  145. ciris_engine/gui_static/_next/static/chunks/8315-b91d03a3949db0af.js +1 -0
  146. ciris_engine/gui_static/_next/static/chunks/8386-f93a83ccbd789bd9.js +1 -0
  147. ciris_engine/gui_static/_next/static/chunks/87c73c54-781a7f35148d5433.js +1 -0
  148. ciris_engine/gui_static/_next/static/chunks/8903-fefea3339a02d41b.js +1 -0
  149. ciris_engine/gui_static/_next/static/chunks/9090-e66485adf8d9d990.js +1 -0
  150. ciris_engine/gui_static/_next/static/chunks/app/_not-found/page-a67d9808462c23b1.js +1 -0
  151. ciris_engine/gui_static/_next/static/chunks/app/account/api-keys/page-2d7ee1583bbbd02e.js +1 -0
  152. ciris_engine/gui_static/_next/static/chunks/app/account/api-keys/page-6a3c2bae6fe92b7b.js +1 -0
  153. ciris_engine/gui_static/_next/static/chunks/app/account/consent/page-2ed3a035136bc4e8.js +1 -0
  154. ciris_engine/gui_static/_next/static/chunks/app/account/consent/page-b2f5c91844a32422.js +1 -0
  155. ciris_engine/gui_static/_next/static/chunks/app/account/page-25b90f89af3ea58c.js +1 -0
  156. ciris_engine/gui_static/_next/static/chunks/app/account/page-b65d16c94ecaf69c.js +1 -0
  157. ciris_engine/gui_static/_next/static/chunks/app/account/privacy/page-675b6d05c8f9184f.js +1 -0
  158. ciris_engine/gui_static/_next/static/chunks/app/account/privacy/page-cbee2e1c8ab52145.js +1 -0
  159. ciris_engine/gui_static/_next/static/chunks/app/account/settings/page-0f44da06697cf9f0.js +1 -0
  160. ciris_engine/gui_static/_next/static/chunks/app/account/settings/page-563420253577edbf.js +1 -0
  161. ciris_engine/gui_static/_next/static/chunks/app/adapters/page-1854631018bc32be.js +1 -0
  162. ciris_engine/gui_static/_next/static/chunks/app/agents/page-8353752c176a7c70.js +1 -0
  163. ciris_engine/gui_static/_next/static/chunks/app/agents/page-f61a529f110a6040.js +1 -0
  164. ciris_engine/gui_static/_next/static/chunks/app/api-demo/page-7f19b9d20d39be28.js +1 -0
  165. ciris_engine/gui_static/_next/static/chunks/app/api-demo/page-d1063938f249b8bd.js +1 -0
  166. ciris_engine/gui_static/_next/static/chunks/app/audit/page-321b6728b8fff0bb.js +1 -0
  167. ciris_engine/gui_static/_next/static/chunks/app/audit/page-ebac35ca961a1277.js +1 -0
  168. ciris_engine/gui_static/_next/static/chunks/app/billing/page-6f3dc3bd02924f8e.js +1 -0
  169. ciris_engine/gui_static/_next/static/chunks/app/billing/page-fa4a469f814c821a.js +1 -0
  170. ciris_engine/gui_static/_next/static/chunks/app/comms/page-0d4f734269addd8f.js +1 -0
  171. ciris_engine/gui_static/_next/static/chunks/app/comms/page-79227d426050089c.js +1 -0
  172. ciris_engine/gui_static/_next/static/chunks/app/config/page-018d21d683b6e5bc.js +1 -0
  173. ciris_engine/gui_static/_next/static/chunks/app/config/page-2aa5a5363ca2a371.js +1 -0
  174. ciris_engine/gui_static/_next/static/chunks/app/consent/page-198373205fd316e2.js +1 -0
  175. ciris_engine/gui_static/_next/static/chunks/app/consent/page-f2ca39e7713b13f8.js +1 -0
  176. ciris_engine/gui_static/_next/static/chunks/app/dashboard/page-1dd5a196f643c60d.js +1 -0
  177. ciris_engine/gui_static/_next/static/chunks/app/dashboard/page-530a04d3abbb8cda.js +1 -0
  178. ciris_engine/gui_static/_next/static/chunks/app/docs/page-3193b06d094ab654.js +1 -0
  179. ciris_engine/gui_static/_next/static/chunks/app/docs/page-330e996dedb87aba.js +1 -0
  180. ciris_engine/gui_static/_next/static/chunks/app/layout-0a70f5fc460298b1.js +1 -0
  181. ciris_engine/gui_static/_next/static/chunks/app/layout-21f2f99dd5b336e9.js +1 -0
  182. ciris_engine/gui_static/_next/static/chunks/app/login/page-33240e6c6034a49d.js +1 -0
  183. ciris_engine/gui_static/_next/static/chunks/app/login/page-68ffab6d54a7fdcd.js +1 -0
  184. ciris_engine/gui_static/_next/static/chunks/app/logs/page-8a6167aecc4a475c.js +1 -0
  185. ciris_engine/gui_static/_next/static/chunks/app/memory/page-9ca8c5d0056de3ff.js +1 -0
  186. ciris_engine/gui_static/_next/static/chunks/app/memory/page-e961226941c18f81.js +1 -0
  187. ciris_engine/gui_static/_next/static/chunks/app/page-6fdb065a787a4974.js +1 -0
  188. ciris_engine/gui_static/_next/static/chunks/app/page-89f87d431be6064a.js +1 -0
  189. ciris_engine/gui_static/_next/static/chunks/app/runtime/page-2e728b9c43aa164d.js +1 -0
  190. ciris_engine/gui_static/_next/static/chunks/app/runtime/page-c7dd033dc40a72f0.js +1 -0
  191. ciris_engine/gui_static/_next/static/chunks/app/services/page-ae9f0bdf11d01a95.js +1 -0
  192. ciris_engine/gui_static/_next/static/chunks/app/services/page-b10feb79ca5d75e5.js +1 -0
  193. ciris_engine/gui_static/_next/static/chunks/app/sessions/page-13ebe7ef1c16ae11.js +1 -0
  194. ciris_engine/gui_static/_next/static/chunks/app/sessions/page-e6c82b16d617f785.js +1 -0
  195. ciris_engine/gui_static/_next/static/chunks/app/setup/page-0beb5f5b5a5c20fc.js +1 -0
  196. ciris_engine/gui_static/_next/static/chunks/app/setup/page-2595e729eae30c0e.js +1 -0
  197. ciris_engine/gui_static/_next/static/chunks/app/status-dashboard/page-1037c987aecc3653.js +1 -0
  198. ciris_engine/gui_static/_next/static/chunks/app/status-dashboard/page-2ffd147f6d3162ff.js +1 -0
  199. ciris_engine/gui_static/_next/static/chunks/app/system/page-2c5798d58cafcd91.js +1 -0
  200. ciris_engine/gui_static/_next/static/chunks/app/system/page-505b1ba4eceb01c3.js +1 -0
  201. ciris_engine/gui_static/_next/static/chunks/app/test-auth/page-b0cad31d5cb1b2fa.js +1 -0
  202. ciris_engine/gui_static/_next/static/chunks/app/test-auth/page-f3ecd7a8012df230.js +1 -0
  203. ciris_engine/gui_static/_next/static/chunks/app/test-login/page-f35117fdc4105801.js +1 -0
  204. ciris_engine/gui_static/_next/static/chunks/app/test-login/page-fb583a7924114906.js +1 -0
  205. ciris_engine/gui_static/_next/static/chunks/app/test-sdk/page-50f116fd76935563.js +1 -0
  206. ciris_engine/gui_static/_next/static/chunks/app/test-sdk/page-c37d8aa5ba623a44.js +1 -0
  207. ciris_engine/gui_static/_next/static/chunks/app/tools/page-429aec7a707777ef.js +1 -0
  208. ciris_engine/gui_static/_next/static/chunks/app/tools/page-5f705aad60e0c04e.js +1 -0
  209. ciris_engine/gui_static/_next/static/chunks/app/users/page-13476b8b0f3808cc.js +1 -0
  210. ciris_engine/gui_static/_next/static/chunks/app/users/page-7e500d154ed5bba4.js +1 -0
  211. ciris_engine/gui_static/_next/static/chunks/app/wa/page-cc4a9d8a5cb44d08.js +1 -0
  212. ciris_engine/gui_static/_next/static/chunks/app/wa/page-ec3e429efbc79230.js +1 -0
  213. ciris_engine/gui_static/_next/static/chunks/framework-9d29490f5ba089ba.js +1 -0
  214. ciris_engine/gui_static/_next/static/chunks/main-1f554952e47a82c4.js +1 -0
  215. ciris_engine/gui_static/_next/static/chunks/main-app-26fa8aed029082e5.js +1 -0
  216. ciris_engine/gui_static/_next/static/chunks/main-app-97b0486ef6bcef25.js +1 -0
  217. ciris_engine/gui_static/_next/static/chunks/pages/_app-6ce685456e616eb2.js +1 -0
  218. ciris_engine/gui_static/_next/static/chunks/pages/_error-d4bce98d93fe21e7.js +1 -0
  219. ciris_engine/gui_static/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  220. ciris_engine/gui_static/_next/static/chunks/webpack-fcebd240b7f8477d.js +1 -0
  221. ciris_engine/gui_static/_next/static/css/16b94b1fe0cc6e37.css +3 -0
  222. ciris_engine/gui_static/_next/static/css/77a24ceaae86deff.css +3 -0
  223. ciris_engine/gui_static/_next/static/media/4cf2300e9c8272f7-s.p.woff2 +0 -0
  224. ciris_engine/gui_static/_next/static/media/747892c23ea88013-s.woff2 +0 -0
  225. ciris_engine/gui_static/_next/static/media/8d697b304b401681-s.woff2 +0 -0
  226. ciris_engine/gui_static/_next/static/media/93f479601ee12b01-s.p.woff2 +0 -0
  227. ciris_engine/gui_static/_next/static/media/9610d9e46709d722-s.woff2 +0 -0
  228. ciris_engine/gui_static/_next/static/media/ba015fad6dcf6784-s.woff2 +0 -0
  229. ciris_engine/gui_static/_next/static/media/d8298875641ec7d4-s.p.woff2 +0 -0
  230. ciris_engine/gui_static/account/api-keys/index.html +1 -0
  231. ciris_engine/gui_static/account/api-keys/index.txt +27 -0
  232. ciris_engine/gui_static/account/consent/index.html +1 -0
  233. ciris_engine/gui_static/account/consent/index.txt +27 -0
  234. ciris_engine/gui_static/account/index.html +1 -0
  235. ciris_engine/gui_static/account/index.txt +27 -0
  236. ciris_engine/gui_static/account/privacy/index.html +1 -0
  237. ciris_engine/gui_static/account/privacy/index.txt +27 -0
  238. ciris_engine/gui_static/account/settings/index.html +1 -0
  239. ciris_engine/gui_static/account/settings/index.txt +27 -0
  240. ciris_engine/gui_static/adapters/index.html +1 -0
  241. ciris_engine/gui_static/adapters/index.txt +27 -0
  242. ciris_engine/gui_static/agents/index.html +1 -0
  243. ciris_engine/gui_static/agents/index.txt +27 -0
  244. ciris_engine/gui_static/andrew-roberts-euBRXcx57T4-unsplash.jpg +0 -0
  245. ciris_engine/gui_static/api-demo/index.html +1 -0
  246. ciris_engine/gui_static/api-demo/index.txt +27 -0
  247. ciris_engine/gui_static/audit/index.html +1 -0
  248. ciris_engine/gui_static/audit/index.txt +27 -0
  249. ciris_engine/gui_static/billing/index.html +1 -0
  250. ciris_engine/gui_static/billing/index.txt +27 -0
  251. ciris_engine/gui_static/blurryinfo.png +0 -0
  252. ciris_engine/gui_static/chip-vincent-PkQDwfl9Flc-unsplash.jpg +0 -0
  253. ciris_engine/gui_static/ciris-architecture.svg +338 -0
  254. ciris_engine/gui_static/comms/index.html +1 -0
  255. ciris_engine/gui_static/comms/index.txt +27 -0
  256. ciris_engine/gui_static/config/index.html +1 -0
  257. ciris_engine/gui_static/config/index.txt +27 -0
  258. ciris_engine/gui_static/consent/index.html +1 -0
  259. ciris_engine/gui_static/consent/index.txt +27 -0
  260. ciris_engine/gui_static/dashboard/index.html +1 -0
  261. ciris_engine/gui_static/dashboard/index.txt +27 -0
  262. ciris_engine/gui_static/docs/index.html +1 -0
  263. ciris_engine/gui_static/docs/index.txt +27 -0
  264. ciris_engine/gui_static/eric.png +0 -0
  265. ciris_engine/gui_static/file.svg +1 -0
  266. ciris_engine/gui_static/globe.svg +1 -0
  267. ciris_engine/gui_static/index.html +1 -0
  268. ciris_engine/gui_static/index.txt +27 -0
  269. ciris_engine/gui_static/infogfx-1@2x.png +0 -0
  270. ciris_engine/gui_static/infogfx-2.png +0 -0
  271. ciris_engine/gui_static/infogfx-dark-1.png +0 -0
  272. ciris_engine/gui_static/kelly-vohs-soSTXmIxTDU-unsplash.jpg +0 -0
  273. ciris_engine/gui_static/login/index.html +1 -0
  274. ciris_engine/gui_static/login/index.txt +27 -0
  275. ciris_engine/gui_static/logs/index.html +1 -0
  276. ciris_engine/gui_static/logs/index.txt +27 -0
  277. ciris_engine/gui_static/memory/index.html +1 -0
  278. ciris_engine/gui_static/memory/index.txt +27 -0
  279. ciris_engine/gui_static/nathan-farrish-ArcTfEoBgzs-unsplash.jpg +0 -0
  280. ciris_engine/gui_static/next.svg +1 -0
  281. ciris_engine/gui_static/overview.svg +512 -0
  282. ciris_engine/gui_static/overview1.svg +407 -0
  283. ciris_engine/gui_static/overview2.svg +370 -0
  284. ciris_engine/gui_static/pipeline-visualization.svg +278 -0
  285. ciris_engine/gui_static/privacy-policy.html +160 -0
  286. ciris_engine/gui_static/runtime/index.html +8 -0
  287. ciris_engine/gui_static/runtime/index.txt +27 -0
  288. ciris_engine/gui_static/services/index.html +1 -0
  289. ciris_engine/gui_static/services/index.txt +27 -0
  290. ciris_engine/gui_static/sessions/index.html +1 -0
  291. ciris_engine/gui_static/sessions/index.txt +27 -0
  292. ciris_engine/gui_static/setup/index.html +1 -0
  293. ciris_engine/gui_static/setup/index.txt +27 -0
  294. ciris_engine/gui_static/status-dashboard/index.html +1 -0
  295. ciris_engine/gui_static/status-dashboard/index.txt +27 -0
  296. ciris_engine/gui_static/system/index.html +1 -0
  297. ciris_engine/gui_static/system/index.txt +27 -0
  298. ciris_engine/gui_static/terms-of-service.html +174 -0
  299. ciris_engine/gui_static/test-auth/index.html +1 -0
  300. ciris_engine/gui_static/test-auth/index.txt +27 -0
  301. ciris_engine/gui_static/test-login/index.html +1 -0
  302. ciris_engine/gui_static/test-login/index.txt +27 -0
  303. ciris_engine/gui_static/test-sdk/index.html +1 -0
  304. ciris_engine/gui_static/test-sdk/index.txt +27 -0
  305. ciris_engine/gui_static/tools/index.html +1 -0
  306. ciris_engine/gui_static/tools/index.txt +27 -0
  307. ciris_engine/gui_static/users/index.html +1 -0
  308. ciris_engine/gui_static/users/index.txt +27 -0
  309. ciris_engine/gui_static/vercel.svg +1 -0
  310. ciris_engine/gui_static/videos/video1.mp4 +0 -0
  311. ciris_engine/gui_static/videos/video3.mp4 +0 -0
  312. ciris_engine/gui_static/wa/index.html +1 -0
  313. ciris_engine/gui_static/wa/index.txt +27 -0
  314. ciris_engine/gui_static/window.svg +1 -0
  315. ciris_engine/logic/__init__.py +8 -0
  316. ciris_engine/logic/adapters/__init__.py +74 -0
  317. ciris_engine/logic/adapters/api/__init__.py +5 -0
  318. ciris_engine/logic/adapters/api/adapter.py +1037 -0
  319. ciris_engine/logic/adapters/api/api_communication.py +370 -0
  320. ciris_engine/logic/adapters/api/api_document.py +330 -0
  321. ciris_engine/logic/adapters/api/api_observer.py +24 -0
  322. ciris_engine/logic/adapters/api/api_runtime_control.py +388 -0
  323. ciris_engine/logic/adapters/api/api_tools.py +299 -0
  324. ciris_engine/logic/adapters/api/api_vision.py +215 -0
  325. ciris_engine/logic/adapters/api/app.py +272 -0
  326. ciris_engine/logic/adapters/api/auth.py +159 -0
  327. ciris_engine/logic/adapters/api/config.py +101 -0
  328. ciris_engine/logic/adapters/api/constants.py +55 -0
  329. ciris_engine/logic/adapters/api/dependencies/__init__.py +1 -0
  330. ciris_engine/logic/adapters/api/dependencies/auth.py +260 -0
  331. ciris_engine/logic/adapters/api/endpoints/__init__.py +1 -0
  332. ciris_engine/logic/adapters/api/endpoints/emergency.py +86 -0
  333. ciris_engine/logic/adapters/api/middleware/__init__.py +1 -0
  334. ciris_engine/logic/adapters/api/middleware/rate_limiter.py +302 -0
  335. ciris_engine/logic/adapters/api/models.py +29 -0
  336. ciris_engine/logic/adapters/api/routes/__init__.py +52 -0
  337. ciris_engine/logic/adapters/api/routes/agent.py +1762 -0
  338. ciris_engine/logic/adapters/api/routes/audit.py +707 -0
  339. ciris_engine/logic/adapters/api/routes/auth.py +1745 -0
  340. ciris_engine/logic/adapters/api/routes/billing.py +895 -0
  341. ciris_engine/logic/adapters/api/routes/config.py +329 -0
  342. ciris_engine/logic/adapters/api/routes/connectors.py +534 -0
  343. ciris_engine/logic/adapters/api/routes/consent.py +637 -0
  344. ciris_engine/logic/adapters/api/routes/dsar.py +637 -0
  345. ciris_engine/logic/adapters/api/routes/dsar_multi_source.py +484 -0
  346. ciris_engine/logic/adapters/api/routes/emergency.py +302 -0
  347. ciris_engine/logic/adapters/api/routes/memory.py +733 -0
  348. ciris_engine/logic/adapters/api/routes/memory_filters.py +230 -0
  349. ciris_engine/logic/adapters/api/routes/memory_models.py +112 -0
  350. ciris_engine/logic/adapters/api/routes/memory_queries.py +236 -0
  351. ciris_engine/logic/adapters/api/routes/memory_query_helpers.py +394 -0
  352. ciris_engine/logic/adapters/api/routes/memory_visualization.py +359 -0
  353. ciris_engine/logic/adapters/api/routes/memory_visualization_helpers.py +110 -0
  354. ciris_engine/logic/adapters/api/routes/partnership.py +541 -0
  355. ciris_engine/logic/adapters/api/routes/setup.py +1374 -0
  356. ciris_engine/logic/adapters/api/routes/system.py +3049 -0
  357. ciris_engine/logic/adapters/api/routes/system_extensions.py +952 -0
  358. ciris_engine/logic/adapters/api/routes/telemetry.py +1987 -0
  359. ciris_engine/logic/adapters/api/routes/telemetry_converters.py +141 -0
  360. ciris_engine/logic/adapters/api/routes/telemetry_helpers.py +111 -0
  361. ciris_engine/logic/adapters/api/routes/telemetry_logs_reader.py +280 -0
  362. ciris_engine/logic/adapters/api/routes/telemetry_metrics.py +131 -0
  363. ciris_engine/logic/adapters/api/routes/telemetry_models.py +190 -0
  364. ciris_engine/logic/adapters/api/routes/telemetry_otlp.py +878 -0
  365. ciris_engine/logic/adapters/api/routes/telemetry_resource_helpers.py +191 -0
  366. ciris_engine/logic/adapters/api/routes/tickets.py +541 -0
  367. ciris_engine/logic/adapters/api/routes/tools.py +556 -0
  368. ciris_engine/logic/adapters/api/routes/transparency.py +281 -0
  369. ciris_engine/logic/adapters/api/routes/users.py +981 -0
  370. ciris_engine/logic/adapters/api/routes/verification.py +373 -0
  371. ciris_engine/logic/adapters/api/routes/wa.py +369 -0
  372. ciris_engine/logic/adapters/api/service_configuration.py +177 -0
  373. ciris_engine/logic/adapters/api/services/__init__.py +1 -0
  374. ciris_engine/logic/adapters/api/services/auth_service.py +1417 -0
  375. ciris_engine/logic/adapters/api/services/oauth_security.py +68 -0
  376. ciris_engine/logic/adapters/base.py +141 -0
  377. ciris_engine/logic/adapters/base_adapter.py +73 -0
  378. ciris_engine/logic/adapters/base_observer.py +1141 -0
  379. ciris_engine/logic/adapters/base_vision.py +312 -0
  380. ciris_engine/logic/adapters/cirisnode_client.py +307 -0
  381. ciris_engine/logic/adapters/cli/__init__.py +3 -0
  382. ciris_engine/logic/adapters/cli/adapter.py +207 -0
  383. ciris_engine/logic/adapters/cli/cli_adapter.py +902 -0
  384. ciris_engine/logic/adapters/cli/cli_observer.py +268 -0
  385. ciris_engine/logic/adapters/cli/cli_tools.py +427 -0
  386. ciris_engine/logic/adapters/cli/cli_wa_service.py +134 -0
  387. ciris_engine/logic/adapters/cli/config.py +73 -0
  388. ciris_engine/logic/adapters/discord/__init__.py +3 -0
  389. ciris_engine/logic/adapters/discord/adapter.py +783 -0
  390. ciris_engine/logic/adapters/discord/ciris_discord_client.py +159 -0
  391. ciris_engine/logic/adapters/discord/config.py +177 -0
  392. ciris_engine/logic/adapters/discord/constants.py +185 -0
  393. ciris_engine/logic/adapters/discord/discord-stubs.pyi +50 -0
  394. ciris_engine/logic/adapters/discord/discord_adapter.py +1584 -0
  395. ciris_engine/logic/adapters/discord/discord_audit.py +150 -0
  396. ciris_engine/logic/adapters/discord/discord_channel_manager.py +351 -0
  397. ciris_engine/logic/adapters/discord/discord_connection_manager.py +313 -0
  398. ciris_engine/logic/adapters/discord/discord_embed_formatter.py +369 -0
  399. ciris_engine/logic/adapters/discord/discord_error_classifier.py +302 -0
  400. ciris_engine/logic/adapters/discord/discord_error_handler.py +316 -0
  401. ciris_engine/logic/adapters/discord/discord_guidance_handler.py +460 -0
  402. ciris_engine/logic/adapters/discord/discord_message_handler.py +207 -0
  403. ciris_engine/logic/adapters/discord/discord_observer.py +670 -0
  404. ciris_engine/logic/adapters/discord/discord_rate_limiter.py +249 -0
  405. ciris_engine/logic/adapters/discord/discord_reaction_handler.py +278 -0
  406. ciris_engine/logic/adapters/discord/discord_tool_handler.py +465 -0
  407. ciris_engine/logic/adapters/discord/discord_tool_service.py +790 -0
  408. ciris_engine/logic/adapters/discord/discord_tools.py +90 -0
  409. ciris_engine/logic/adapters/discord/discord_vision_helper.py +148 -0
  410. ciris_engine/logic/adapters/discord/py.typed +0 -0
  411. ciris_engine/logic/adapters/document_parser.py +320 -0
  412. ciris_engine/logic/audit/__init__.py +10 -0
  413. ciris_engine/logic/audit/hash_chain.py +313 -0
  414. ciris_engine/logic/audit/signature_manager.py +352 -0
  415. ciris_engine/logic/audit/verifier.py +408 -0
  416. ciris_engine/logic/buses/__init__.py +21 -0
  417. ciris_engine/logic/buses/base_bus.py +178 -0
  418. ciris_engine/logic/buses/bus_manager.py +121 -0
  419. ciris_engine/logic/buses/communication_bus.py +387 -0
  420. ciris_engine/logic/buses/llm_bus.py +722 -0
  421. ciris_engine/logic/buses/memory_bus.py +577 -0
  422. ciris_engine/logic/buses/prohibitions.py +502 -0
  423. ciris_engine/logic/buses/runtime_control_bus.py +539 -0
  424. ciris_engine/logic/buses/tool_bus.py +482 -0
  425. ciris_engine/logic/buses/wise_bus.py +684 -0
  426. ciris_engine/logic/config/__init__.py +25 -0
  427. ciris_engine/logic/config/bootstrap.py +255 -0
  428. ciris_engine/logic/config/config_accessor.py +202 -0
  429. ciris_engine/logic/config/db_paths.py +194 -0
  430. ciris_engine/logic/config/env_utils.py +39 -0
  431. ciris_engine/logic/conscience/__init__.py +16 -0
  432. ciris_engine/logic/conscience/build_deferral_package.py +0 -0
  433. ciris_engine/logic/conscience/core.py +688 -0
  434. ciris_engine/logic/conscience/interface.py +33 -0
  435. ciris_engine/logic/conscience/registry.py +76 -0
  436. ciris_engine/logic/conscience/thought_depth_guardrail.py +231 -0
  437. ciris_engine/logic/conscience/updated_status_conscience.py +156 -0
  438. ciris_engine/logic/context/__init__.py +10 -0
  439. ciris_engine/logic/context/batch_context.py +550 -0
  440. ciris_engine/logic/context/builder.py +149 -0
  441. ciris_engine/logic/context/channel_resolution.py +136 -0
  442. ciris_engine/logic/context/secrets_snapshot.py +52 -0
  443. ciris_engine/logic/context/system_snapshot.py +116 -0
  444. ciris_engine/logic/context/system_snapshot_helpers.py +1651 -0
  445. ciris_engine/logic/covenant/__init__.py +33 -0
  446. ciris_engine/logic/covenant/executor.py +303 -0
  447. ciris_engine/logic/covenant/extractor.py +382 -0
  448. ciris_engine/logic/covenant/handler.py +241 -0
  449. ciris_engine/logic/covenant/verifier.py +383 -0
  450. ciris_engine/logic/dma/__init__.py +15 -0
  451. ciris_engine/logic/dma/action_selection/__init__.py +11 -0
  452. ciris_engine/logic/dma/action_selection/action_instruction_generator.py +444 -0
  453. ciris_engine/logic/dma/action_selection/context_builder.py +508 -0
  454. ciris_engine/logic/dma/action_selection/faculty_integration.py +193 -0
  455. ciris_engine/logic/dma/action_selection/special_cases.py +132 -0
  456. ciris_engine/logic/dma/action_selection_pdma.py +365 -0
  457. ciris_engine/logic/dma/base_dma.py +335 -0
  458. ciris_engine/logic/dma/csdma.py +239 -0
  459. ciris_engine/logic/dma/dma_executor.py +575 -0
  460. ciris_engine/logic/dma/dsdma_base.py +410 -0
  461. ciris_engine/logic/dma/exceptions.py +4 -0
  462. ciris_engine/logic/dma/factory.py +150 -0
  463. ciris_engine/logic/dma/pdma.py +120 -0
  464. ciris_engine/logic/dma/prompt_loader.py +189 -0
  465. ciris_engine/logic/dma/prompts/action_selection_pdma.yml +58 -0
  466. ciris_engine/logic/dma/prompts/csdma_common_sense.yml +28 -0
  467. ciris_engine/logic/dma/prompts/dsdma_base.yml +17 -0
  468. ciris_engine/logic/dma/prompts/pdma_ethical.yml +42 -0
  469. ciris_engine/logic/formatters/__init__.py +26 -0
  470. ciris_engine/logic/formatters/crisis_resources.py +80 -0
  471. ciris_engine/logic/formatters/escalation.py +21 -0
  472. ciris_engine/logic/formatters/identity.py +224 -0
  473. ciris_engine/logic/formatters/prompt_blocks.py +64 -0
  474. ciris_engine/logic/formatters/system_snapshot.py +193 -0
  475. ciris_engine/logic/formatters/user_profiles.py +108 -0
  476. ciris_engine/logic/handlers/__init__.py +1 -0
  477. ciris_engine/logic/handlers/control/__init__.py +1 -0
  478. ciris_engine/logic/handlers/control/defer_handler.py +195 -0
  479. ciris_engine/logic/handlers/control/ponder_handler.py +154 -0
  480. ciris_engine/logic/handlers/control/reject_handler.py +81 -0
  481. ciris_engine/logic/handlers/external/__init__.py +1 -0
  482. ciris_engine/logic/handlers/external/observe_handler.py +154 -0
  483. ciris_engine/logic/handlers/external/speak_handler.py +250 -0
  484. ciris_engine/logic/handlers/external/tool_handler.py +148 -0
  485. ciris_engine/logic/handlers/memory/__init__.py +1 -0
  486. ciris_engine/logic/handlers/memory/forget_handler.py +107 -0
  487. ciris_engine/logic/handlers/memory/memorize_handler.py +391 -0
  488. ciris_engine/logic/handlers/memory/recall_handler.py +213 -0
  489. ciris_engine/logic/handlers/terminal/__init__.py +1 -0
  490. ciris_engine/logic/handlers/terminal/task_complete_handler.py +299 -0
  491. ciris_engine/logic/infrastructure/__init__.py +1 -0
  492. ciris_engine/logic/infrastructure/handlers/__init__.py +8 -0
  493. ciris_engine/logic/infrastructure/handlers/action_dispatcher.py +382 -0
  494. ciris_engine/logic/infrastructure/handlers/base_handler.py +450 -0
  495. ciris_engine/logic/infrastructure/handlers/exceptions.py +2 -0
  496. ciris_engine/logic/infrastructure/handlers/handler_registry.py +59 -0
  497. ciris_engine/logic/infrastructure/handlers/helpers.py +55 -0
  498. ciris_engine/logic/infrastructure/step_streaming.py +149 -0
  499. ciris_engine/logic/infrastructure/sub_services/__init__.py +1 -0
  500. ciris_engine/logic/infrastructure/sub_services/identity_variance_monitor.py +1035 -0
  501. ciris_engine/logic/infrastructure/sub_services/pattern_analysis_loop.py +758 -0
  502. ciris_engine/logic/infrastructure/sub_services/wa_cli_bootstrap.py +229 -0
  503. ciris_engine/logic/infrastructure/sub_services/wa_cli_display.py +176 -0
  504. ciris_engine/logic/infrastructure/sub_services/wa_cli_oauth.py +404 -0
  505. ciris_engine/logic/infrastructure/sub_services/wa_cli_wizard.py +181 -0
  506. ciris_engine/logic/persistence/__init__.py +130 -0
  507. ciris_engine/logic/persistence/analytics.py +97 -0
  508. ciris_engine/logic/persistence/db/__init__.py +28 -0
  509. ciris_engine/logic/persistence/db/core.py +520 -0
  510. ciris_engine/logic/persistence/db/dialect.py +380 -0
  511. ciris_engine/logic/persistence/db/execution_helpers.py +216 -0
  512. ciris_engine/logic/persistence/db/migration_runner.py +191 -0
  513. ciris_engine/logic/persistence/db/operations.py +313 -0
  514. ciris_engine/logic/persistence/db/query_builder.py +232 -0
  515. ciris_engine/logic/persistence/db/retry.py +154 -0
  516. ciris_engine/logic/persistence/db/setup.py +18 -0
  517. ciris_engine/logic/persistence/migrations/postgres/001_initial_schema.sql +4 -0
  518. ciris_engine/logic/persistence/migrations/postgres/002_add_retry_status.sql +3 -0
  519. ciris_engine/logic/persistence/migrations/postgres/003_add_task_update_tracking.sql +8 -0
  520. ciris_engine/logic/persistence/migrations/postgres/004_add_occurrence_id.sql +54 -0
  521. ciris_engine/logic/persistence/migrations/postgres/005_add_consolidation_locks.sql +22 -0
  522. ciris_engine/logic/persistence/migrations/postgres/006_add_correlation_id_unique_index.sql +16 -0
  523. ciris_engine/logic/persistence/migrations/postgres/007_add_dsar_tickets.sql +39 -0
  524. ciris_engine/logic/persistence/migrations/postgres/008_rename_to_tickets_add_sop.sql +123 -0
  525. ciris_engine/logic/persistence/migrations/postgres/009_add_ticket_status_columns.sql +39 -0
  526. ciris_engine/logic/persistence/migrations/postgres/010_add_images_to_tasks.sql +5 -0
  527. ciris_engine/logic/persistence/migrations/sqlite/001_initial_schema.sql +357 -0
  528. ciris_engine/logic/persistence/migrations/sqlite/002_add_retry_status.sql +3 -0
  529. ciris_engine/logic/persistence/migrations/sqlite/003_add_task_update_tracking.sql +8 -0
  530. ciris_engine/logic/persistence/migrations/sqlite/004_add_occurrence_id.sql +45 -0
  531. ciris_engine/logic/persistence/migrations/sqlite/005_add_consolidation_locks.sql +22 -0
  532. ciris_engine/logic/persistence/migrations/sqlite/006_add_correlation_id_unique_index.sql +16 -0
  533. ciris_engine/logic/persistence/migrations/sqlite/007_add_dsar_tickets.sql +39 -0
  534. ciris_engine/logic/persistence/migrations/sqlite/008_rename_to_tickets_add_sop.sql +120 -0
  535. ciris_engine/logic/persistence/migrations/sqlite/009_add_ticket_status_columns.sql +129 -0
  536. ciris_engine/logic/persistence/migrations/sqlite/010_add_images_to_tasks.sql +17 -0
  537. ciris_engine/logic/persistence/models/__init__.py +141 -0
  538. ciris_engine/logic/persistence/models/correlations.py +881 -0
  539. ciris_engine/logic/persistence/models/deferral.py +68 -0
  540. ciris_engine/logic/persistence/models/dsar.py +286 -0
  541. ciris_engine/logic/persistence/models/graph.py +362 -0
  542. ciris_engine/logic/persistence/models/identity.py +264 -0
  543. ciris_engine/logic/persistence/models/queue_status.py +139 -0
  544. ciris_engine/logic/persistence/models/tasks.py +1043 -0
  545. ciris_engine/logic/persistence/models/thoughts.py +400 -0
  546. ciris_engine/logic/persistence/models/tickets.py +518 -0
  547. ciris_engine/logic/persistence/stores/__init__.py +13 -0
  548. ciris_engine/logic/persistence/stores/auth_helpers.py +117 -0
  549. ciris_engine/logic/persistence/stores/authentication_store.py +414 -0
  550. ciris_engine/logic/persistence/utils.py +212 -0
  551. ciris_engine/logic/processors/__init__.py +30 -0
  552. ciris_engine/logic/processors/core/__init__.py +1 -0
  553. ciris_engine/logic/processors/core/base_processor.py +280 -0
  554. ciris_engine/logic/processors/core/main_processor.py +1777 -0
  555. ciris_engine/logic/processors/core/step_decorators.py +1583 -0
  556. ciris_engine/logic/processors/core/thought_processor/__init__.py +20 -0
  557. ciris_engine/logic/processors/core/thought_processor/action_execution.py +49 -0
  558. ciris_engine/logic/processors/core/thought_processor/conscience_execution.py +382 -0
  559. ciris_engine/logic/processors/core/thought_processor/finalize_action.py +66 -0
  560. ciris_engine/logic/processors/core/thought_processor/gather_context.py +120 -0
  561. ciris_engine/logic/processors/core/thought_processor/main.py +920 -0
  562. ciris_engine/logic/processors/core/thought_processor/perform_aspdma.py +86 -0
  563. ciris_engine/logic/processors/core/thought_processor/perform_dmas.py +106 -0
  564. ciris_engine/logic/processors/core/thought_processor/recursive_processing.py +237 -0
  565. ciris_engine/logic/processors/core/thought_processor/round_complete.py +52 -0
  566. ciris_engine/logic/processors/core/thought_processor/start_round.py +64 -0
  567. ciris_engine/logic/processors/exceptions.py +59 -0
  568. ciris_engine/logic/processors/states/__init__.py +1 -0
  569. ciris_engine/logic/processors/states/dream_processor.py +1381 -0
  570. ciris_engine/logic/processors/states/play_processor.py +141 -0
  571. ciris_engine/logic/processors/states/shutdown_processor.py +623 -0
  572. ciris_engine/logic/processors/states/solitude_processor.py +305 -0
  573. ciris_engine/logic/processors/states/wakeup_processor.py +802 -0
  574. ciris_engine/logic/processors/states/work_processor.py +742 -0
  575. ciris_engine/logic/processors/support/__init__.py +1 -0
  576. ciris_engine/logic/processors/support/dma_orchestrator.py +336 -0
  577. ciris_engine/logic/processors/support/processing_queue.py +133 -0
  578. ciris_engine/logic/processors/support/shutdown_condition_evaluator.py +294 -0
  579. ciris_engine/logic/processors/support/state_manager.py +358 -0
  580. ciris_engine/logic/processors/support/task_manager.py +303 -0
  581. ciris_engine/logic/processors/support/thought_escalation.py +116 -0
  582. ciris_engine/logic/processors/support/thought_manager.py +328 -0
  583. ciris_engine/logic/processors/support/thought_manager_enhanced.py +105 -0
  584. ciris_engine/logic/registries/__init__.py +34 -0
  585. ciris_engine/logic/registries/base.py +653 -0
  586. ciris_engine/logic/registries/circuit_breaker.py +275 -0
  587. ciris_engine/logic/registries/typed_registries.py +184 -0
  588. ciris_engine/logic/runtime/__init__.py +7 -0
  589. ciris_engine/logic/runtime/adapter_loader.py +261 -0
  590. ciris_engine/logic/runtime/adapter_manager.py +1053 -0
  591. ciris_engine/logic/runtime/ciris_runtime.py +2342 -0
  592. ciris_engine/logic/runtime/ciris_runtime_helpers.py +923 -0
  593. ciris_engine/logic/runtime/component_builder.py +361 -0
  594. ciris_engine/logic/runtime/identity_manager.py +219 -0
  595. ciris_engine/logic/runtime/module_loader.py +207 -0
  596. ciris_engine/logic/runtime/prevent_sideeffects.py +30 -0
  597. ciris_engine/logic/runtime/runtime_interface.py +23 -0
  598. ciris_engine/logic/runtime/service_initializer.py +1623 -0
  599. ciris_engine/logic/secrets/__init__.py +30 -0
  600. ciris_engine/logic/secrets/encryption.py +175 -0
  601. ciris_engine/logic/secrets/filter.py +295 -0
  602. ciris_engine/logic/secrets/service.py +652 -0
  603. ciris_engine/logic/secrets/store.py +669 -0
  604. ciris_engine/logic/services/__init__.py +1 -0
  605. ciris_engine/logic/services/adaptation/__init__.py +3 -0
  606. ciris_engine/logic/services/base_graph_service.py +142 -0
  607. ciris_engine/logic/services/base_infrastructure_service.py +69 -0
  608. ciris_engine/logic/services/base_scheduled_service.py +136 -0
  609. ciris_engine/logic/services/base_service.py +247 -0
  610. ciris_engine/logic/services/governance/__init__.py +3 -0
  611. ciris_engine/logic/services/governance/adaptive_filter/__init__.py +14 -0
  612. ciris_engine/logic/services/governance/adaptive_filter/service.py +818 -0
  613. ciris_engine/logic/services/governance/consent/__init__.py +53 -0
  614. ciris_engine/logic/services/governance/consent/air.py +403 -0
  615. ciris_engine/logic/services/governance/consent/decay.py +324 -0
  616. ciris_engine/logic/services/governance/consent/dsar_automation.py +589 -0
  617. ciris_engine/logic/services/governance/consent/exceptions.py +106 -0
  618. ciris_engine/logic/services/governance/consent/metrics.py +270 -0
  619. ciris_engine/logic/services/governance/consent/partnership.py +533 -0
  620. ciris_engine/logic/services/governance/consent/service.py +1256 -0
  621. ciris_engine/logic/services/governance/dsar/__init__.py +29 -0
  622. ciris_engine/logic/services/governance/dsar/orchestrator.py +977 -0
  623. ciris_engine/logic/services/governance/dsar/schemas.py +141 -0
  624. ciris_engine/logic/services/governance/dsar/signature_service.py +283 -0
  625. ciris_engine/logic/services/governance/self_observation/__init__.py +20 -0
  626. ciris_engine/logic/services/governance/self_observation/service.py +1153 -0
  627. ciris_engine/logic/services/governance/visibility/__init__.py +17 -0
  628. ciris_engine/logic/services/governance/visibility/service.py +512 -0
  629. ciris_engine/logic/services/governance/wise_authority/__init__.py +15 -0
  630. ciris_engine/logic/services/governance/wise_authority/service.py +827 -0
  631. ciris_engine/logic/services/graph/__init__.py +5 -0
  632. ciris_engine/logic/services/graph/audit_service/__init__.py +5 -0
  633. ciris_engine/logic/services/graph/audit_service/service.py +1675 -0
  634. ciris_engine/logic/services/graph/base.py +208 -0
  635. ciris_engine/logic/services/graph/config_service/__init__.py +5 -0
  636. ciris_engine/logic/services/graph/config_service/service.py +372 -0
  637. ciris_engine/logic/services/graph/incident_service/__init__.py +5 -0
  638. ciris_engine/logic/services/graph/incident_service/service.py +803 -0
  639. ciris_engine/logic/services/graph/memory_service.py +1120 -0
  640. ciris_engine/logic/services/graph/telemetry_service/__init__.py +5 -0
  641. ciris_engine/logic/services/graph/telemetry_service/exceptions.py +104 -0
  642. ciris_engine/logic/services/graph/telemetry_service/helpers.py +1337 -0
  643. ciris_engine/logic/services/graph/telemetry_service/service.py +2429 -0
  644. ciris_engine/logic/services/graph/tsdb_consolidation/__init__.py +17 -0
  645. ciris_engine/logic/services/graph/tsdb_consolidation/aggregation_helpers.py +355 -0
  646. ciris_engine/logic/services/graph/tsdb_consolidation/cleanup_helpers.py +438 -0
  647. ciris_engine/logic/services/graph/tsdb_consolidation/compressor.py +260 -0
  648. ciris_engine/logic/services/graph/tsdb_consolidation/consolidators/__init__.py +27 -0
  649. ciris_engine/logic/services/graph/tsdb_consolidation/consolidators/audit.py +326 -0
  650. ciris_engine/logic/services/graph/tsdb_consolidation/consolidators/conversation.py +291 -0
  651. ciris_engine/logic/services/graph/tsdb_consolidation/consolidators/memory.py +197 -0
  652. ciris_engine/logic/services/graph/tsdb_consolidation/consolidators/metrics.py +251 -0
  653. ciris_engine/logic/services/graph/tsdb_consolidation/consolidators/task.py +257 -0
  654. ciris_engine/logic/services/graph/tsdb_consolidation/consolidators/trace.py +363 -0
  655. ciris_engine/logic/services/graph/tsdb_consolidation/data_converter.py +545 -0
  656. ciris_engine/logic/services/graph/tsdb_consolidation/date_calculation_helpers.py +193 -0
  657. ciris_engine/logic/services/graph/tsdb_consolidation/db_query_helpers.py +296 -0
  658. ciris_engine/logic/services/graph/tsdb_consolidation/edge_helpers.py +92 -0
  659. ciris_engine/logic/services/graph/tsdb_consolidation/edge_manager.py +896 -0
  660. ciris_engine/logic/services/graph/tsdb_consolidation/extensive_helpers.py +322 -0
  661. ciris_engine/logic/services/graph/tsdb_consolidation/period_manager.py +152 -0
  662. ciris_engine/logic/services/graph/tsdb_consolidation/profound_helpers.py +277 -0
  663. ciris_engine/logic/services/graph/tsdb_consolidation/query_manager.py +812 -0
  664. ciris_engine/logic/services/graph/tsdb_consolidation/service.py +1692 -0
  665. ciris_engine/logic/services/graph/tsdb_consolidation/sql_builders.py +363 -0
  666. ciris_engine/logic/services/infrastructure/__init__.py +1 -0
  667. ciris_engine/logic/services/infrastructure/authentication/__init__.py +5 -0
  668. ciris_engine/logic/services/infrastructure/authentication/service.py +1634 -0
  669. ciris_engine/logic/services/infrastructure/database_maintenance/__init__.py +15 -0
  670. ciris_engine/logic/services/infrastructure/database_maintenance/service.py +764 -0
  671. ciris_engine/logic/services/infrastructure/resource_monitor/__init__.py +7 -0
  672. ciris_engine/logic/services/infrastructure/resource_monitor/ciris_billing_provider.py +755 -0
  673. ciris_engine/logic/services/infrastructure/resource_monitor/service.py +409 -0
  674. ciris_engine/logic/services/infrastructure/resource_monitor/simple_credit_provider.py +129 -0
  675. ciris_engine/logic/services/lifecycle/__init__.py +3 -0
  676. ciris_engine/logic/services/lifecycle/initialization/__init__.py +10 -0
  677. ciris_engine/logic/services/lifecycle/initialization/service.py +312 -0
  678. ciris_engine/logic/services/lifecycle/scheduler/__init__.py +5 -0
  679. ciris_engine/logic/services/lifecycle/scheduler/service.py +607 -0
  680. ciris_engine/logic/services/lifecycle/shutdown/__init__.py +9 -0
  681. ciris_engine/logic/services/lifecycle/shutdown/service.py +378 -0
  682. ciris_engine/logic/services/lifecycle/time/__init__.py +15 -0
  683. ciris_engine/logic/services/lifecycle/time/service.py +259 -0
  684. ciris_engine/logic/services/memory_service/__init__.py +8 -0
  685. ciris_engine/logic/services/mixins/__init__.py +13 -0
  686. ciris_engine/logic/services/mixins/example_usage.py +200 -0
  687. ciris_engine/logic/services/mixins/request_metrics.py +179 -0
  688. ciris_engine/logic/services/runtime/__init__.py +3 -0
  689. ciris_engine/logic/services/runtime/adapter_configuration/__init__.py +16 -0
  690. ciris_engine/logic/services/runtime/adapter_configuration/service.py +674 -0
  691. ciris_engine/logic/services/runtime/adapter_configuration/session.py +67 -0
  692. ciris_engine/logic/services/runtime/control_service/__init__.py +5 -0
  693. ciris_engine/logic/services/runtime/control_service/service.py +2269 -0
  694. ciris_engine/logic/services/runtime/llm_service/__init__.py +14 -0
  695. ciris_engine/logic/services/runtime/llm_service/pricing_calculator.py +279 -0
  696. ciris_engine/logic/services/runtime/llm_service/service.py +930 -0
  697. ciris_engine/logic/services/tools/__init__.py +5 -0
  698. ciris_engine/logic/services/tools/core_tool_service/__init__.py +8 -0
  699. ciris_engine/logic/services/tools/core_tool_service/service.py +852 -0
  700. ciris_engine/logic/setup/__init__.py +1 -0
  701. ciris_engine/logic/setup/first_run.py +250 -0
  702. ciris_engine/logic/setup/wizard.py +327 -0
  703. ciris_engine/logic/telemetry/__init__.py +46 -0
  704. ciris_engine/logic/telemetry/core.py +239 -0
  705. ciris_engine/logic/telemetry/hot_cold_config.py +133 -0
  706. ciris_engine/logic/telemetry/log_collector.py +190 -0
  707. ciris_engine/logic/telemetry/resource_monitor.py +7 -0
  708. ciris_engine/logic/telemetry/security.py +79 -0
  709. ciris_engine/logic/utils/__init__.py +18 -0
  710. ciris_engine/logic/utils/channel_utils.py +75 -0
  711. ciris_engine/logic/utils/consent/__init__.py +1 -0
  712. ciris_engine/logic/utils/consent/partnership_utils.py +172 -0
  713. ciris_engine/logic/utils/constants.py +92 -0
  714. ciris_engine/logic/utils/context_utils.py +145 -0
  715. ciris_engine/logic/utils/directory_setup.py +533 -0
  716. ciris_engine/logic/utils/graphql_context_provider.py +152 -0
  717. ciris_engine/logic/utils/identity_resolution.py +843 -0
  718. ciris_engine/logic/utils/incident_capture_handler.py +303 -0
  719. ciris_engine/logic/utils/initialization_manager.py +74 -0
  720. ciris_engine/logic/utils/jsondict_helpers.py +290 -0
  721. ciris_engine/logic/utils/log_sanitizer.py +97 -0
  722. ciris_engine/logic/utils/logging_config.py +151 -0
  723. ciris_engine/logic/utils/observability_decorators.py +544 -0
  724. ciris_engine/logic/utils/occurrence_utils.py +155 -0
  725. ciris_engine/logic/utils/path_resolution.py +281 -0
  726. ciris_engine/logic/utils/platform_detection.py +286 -0
  727. ciris_engine/logic/utils/privacy.py +266 -0
  728. ciris_engine/logic/utils/profile_loader.py +124 -0
  729. ciris_engine/logic/utils/profile_manager.py +16 -0
  730. ciris_engine/logic/utils/runtime_utils.py +69 -0
  731. ciris_engine/logic/utils/shutdown_manager.py +107 -0
  732. ciris_engine/logic/utils/task_formatters.py +60 -0
  733. ciris_engine/logic/utils/task_thought_factory.py +404 -0
  734. ciris_engine/logic/utils/thought_utils.py +54 -0
  735. ciris_engine/logic/utils/user_utils.py +70 -0
  736. ciris_engine/protocols/__init__.py +0 -0
  737. ciris_engine/protocols/adapters/__init__.py +35 -0
  738. ciris_engine/protocols/adapters/base.py +149 -0
  739. ciris_engine/protocols/adapters/configurable.py +265 -0
  740. ciris_engine/protocols/adapters/message.py +90 -0
  741. ciris_engine/protocols/audit/__init__.py +1 -0
  742. ciris_engine/protocols/buses/__init__.py +1 -0
  743. ciris_engine/protocols/config/__init__.py +1 -0
  744. ciris_engine/protocols/conscience/__init__.py +1 -0
  745. ciris_engine/protocols/consent.py +88 -0
  746. ciris_engine/protocols/context/__init__.py +1 -0
  747. ciris_engine/protocols/data/__init__.py +1 -0
  748. ciris_engine/protocols/dma/__init__.py +1 -0
  749. ciris_engine/protocols/dma/base.py +107 -0
  750. ciris_engine/protocols/faculties.py +34 -0
  751. ciris_engine/protocols/formatters/__init__.py +1 -0
  752. ciris_engine/protocols/handlers/__init__.py +1 -0
  753. ciris_engine/protocols/infrastructure/__init__.py +25 -0
  754. ciris_engine/protocols/infrastructure/base.py +377 -0
  755. ciris_engine/protocols/persistence/__init__.py +1 -0
  756. ciris_engine/protocols/pipeline_control.py +609 -0
  757. ciris_engine/protocols/processors/__init__.py +19 -0
  758. ciris_engine/protocols/processors/agent.py +299 -0
  759. ciris_engine/protocols/processors/base.py +130 -0
  760. ciris_engine/protocols/processors/orchestration.py +62 -0
  761. ciris_engine/protocols/registries/__init__.py +1 -0
  762. ciris_engine/protocols/runtime/__init__.py +1 -0
  763. ciris_engine/protocols/runtime/base.py +163 -0
  764. ciris_engine/protocols/secrets/__init__.py +1 -0
  765. ciris_engine/protocols/services/__init__.py +80 -0
  766. ciris_engine/protocols/services/adaptation/__init__.py +7 -0
  767. ciris_engine/protocols/services/adaptation/self_observation.py +265 -0
  768. ciris_engine/protocols/services/governance/__init__.py +20 -0
  769. ciris_engine/protocols/services/governance/communication.py +58 -0
  770. ciris_engine/protocols/services/governance/filter.py +56 -0
  771. ciris_engine/protocols/services/governance/visibility.py +32 -0
  772. ciris_engine/protocols/services/governance/wa_auth.py +192 -0
  773. ciris_engine/protocols/services/governance/wise_authority.py +75 -0
  774. ciris_engine/protocols/services/graph/__init__.py +19 -0
  775. ciris_engine/protocols/services/graph/audit.py +92 -0
  776. ciris_engine/protocols/services/graph/config.py +54 -0
  777. ciris_engine/protocols/services/graph/incident_management.py +103 -0
  778. ciris_engine/protocols/services/graph/memory.py +110 -0
  779. ciris_engine/protocols/services/graph/telemetry.py +51 -0
  780. ciris_engine/protocols/services/graph/tsdb_consolidation.py +87 -0
  781. ciris_engine/protocols/services/infrastructure/__init__.py +11 -0
  782. ciris_engine/protocols/services/infrastructure/authentication.py +159 -0
  783. ciris_engine/protocols/services/infrastructure/credit_gate.py +46 -0
  784. ciris_engine/protocols/services/infrastructure/database_maintenance.py +25 -0
  785. ciris_engine/protocols/services/infrastructure/resource_monitor.py +83 -0
  786. ciris_engine/protocols/services/lifecycle/__init__.py +13 -0
  787. ciris_engine/protocols/services/lifecycle/initialization.py +41 -0
  788. ciris_engine/protocols/services/lifecycle/scheduler.py +42 -0
  789. ciris_engine/protocols/services/lifecycle/shutdown.py +50 -0
  790. ciris_engine/protocols/services/lifecycle/time.py +31 -0
  791. ciris_engine/protocols/services/runtime/__init__.py +13 -0
  792. ciris_engine/protocols/services/runtime/llm.py +50 -0
  793. ciris_engine/protocols/services/runtime/runtime_control.py +193 -0
  794. ciris_engine/protocols/services/runtime/secrets.py +100 -0
  795. ciris_engine/protocols/services/runtime/tool.py +123 -0
  796. ciris_engine/protocols/telemetry/__init__.py +1 -0
  797. ciris_engine/protocols/utils/__init__.py +1 -0
  798. ciris_engine/schemas/__init__.py +112 -0
  799. ciris_engine/schemas/actions/__init__.py +37 -0
  800. ciris_engine/schemas/actions/parameters.py +137 -0
  801. ciris_engine/schemas/adapters/__init__.py +13 -0
  802. ciris_engine/schemas/adapters/cirisnode.py +135 -0
  803. ciris_engine/schemas/adapters/cli.py +97 -0
  804. ciris_engine/schemas/adapters/cli_tools.py +98 -0
  805. ciris_engine/schemas/adapters/discord.py +125 -0
  806. ciris_engine/schemas/adapters/graphql_core.py +144 -0
  807. ciris_engine/schemas/adapters/registration.py +47 -0
  808. ciris_engine/schemas/adapters/runtime_context.py +48 -0
  809. ciris_engine/schemas/adapters/tool_execution.py +45 -0
  810. ciris_engine/schemas/adapters/tools.py +96 -0
  811. ciris_engine/schemas/api/__init__.py +1 -0
  812. ciris_engine/schemas/api/agent.py +50 -0
  813. ciris_engine/schemas/api/audit.py +38 -0
  814. ciris_engine/schemas/api/auth.py +351 -0
  815. ciris_engine/schemas/api/config_security.py +242 -0
  816. ciris_engine/schemas/api/emergency.py +111 -0
  817. ciris_engine/schemas/api/responses.py +72 -0
  818. ciris_engine/schemas/api/runtime.py +26 -0
  819. ciris_engine/schemas/api/telemetry.py +109 -0
  820. ciris_engine/schemas/api/wa.py +90 -0
  821. ciris_engine/schemas/audit/__init__.py +13 -0
  822. ciris_engine/schemas/audit/core.py +139 -0
  823. ciris_engine/schemas/audit/hash_chain.py +58 -0
  824. ciris_engine/schemas/audit/verification.py +131 -0
  825. ciris_engine/schemas/buses/__init__.py +1 -0
  826. ciris_engine/schemas/config/__init__.py +41 -0
  827. ciris_engine/schemas/config/agent.py +279 -0
  828. ciris_engine/schemas/config/cognitive_state_behaviors.py +194 -0
  829. ciris_engine/schemas/config/default_dsar_sops.py +178 -0
  830. ciris_engine/schemas/config/essential.py +195 -0
  831. ciris_engine/schemas/config/tickets.py +86 -0
  832. ciris_engine/schemas/conscience/__init__.py +25 -0
  833. ciris_engine/schemas/conscience/context.py +34 -0
  834. ciris_engine/schemas/conscience/core.py +145 -0
  835. ciris_engine/schemas/conscience/results.py +24 -0
  836. ciris_engine/schemas/consent/__init__.py +5 -0
  837. ciris_engine/schemas/consent/core.py +404 -0
  838. ciris_engine/schemas/context/__init__.py +1 -0
  839. ciris_engine/schemas/covenant.py +382 -0
  840. ciris_engine/schemas/data/__init__.py +1 -0
  841. ciris_engine/schemas/dma/__init__.py +16 -0
  842. ciris_engine/schemas/dma/core.py +199 -0
  843. ciris_engine/schemas/dma/faculty.py +192 -0
  844. ciris_engine/schemas/dma/prompts.py +172 -0
  845. ciris_engine/schemas/dma/results.py +103 -0
  846. ciris_engine/schemas/formatters/__init__.py +1 -0
  847. ciris_engine/schemas/handlers/__init__.py +10 -0
  848. ciris_engine/schemas/handlers/context.py +119 -0
  849. ciris_engine/schemas/handlers/contexts.py +100 -0
  850. ciris_engine/schemas/handlers/core.py +167 -0
  851. ciris_engine/schemas/handlers/memory_schemas.py +67 -0
  852. ciris_engine/schemas/handlers/schemas.py +95 -0
  853. ciris_engine/schemas/identity.py +149 -0
  854. ciris_engine/schemas/infrastructure/__init__.py +1 -0
  855. ciris_engine/schemas/infrastructure/base.py +256 -0
  856. ciris_engine/schemas/infrastructure/behavioral_patterns.py +129 -0
  857. ciris_engine/schemas/infrastructure/feedback_loop.py +57 -0
  858. ciris_engine/schemas/infrastructure/identity_variance.py +141 -0
  859. ciris_engine/schemas/infrastructure/oauth.py +175 -0
  860. ciris_engine/schemas/infrastructure/wa_cli_wizard.py +54 -0
  861. ciris_engine/schemas/persistence/__init__.py +34 -0
  862. ciris_engine/schemas/persistence/core.py +140 -0
  863. ciris_engine/schemas/persistence/correlations.py +73 -0
  864. ciris_engine/schemas/persistence/postgres/__init__.py +1 -0
  865. ciris_engine/schemas/persistence/postgres/tables.py +280 -0
  866. ciris_engine/schemas/persistence/sqlite/__init__.py +1 -0
  867. ciris_engine/schemas/persistence/sqlite/tables.py +281 -0
  868. ciris_engine/schemas/platform.py +149 -0
  869. ciris_engine/schemas/processors/__init__.py +26 -0
  870. ciris_engine/schemas/processors/base.py +130 -0
  871. ciris_engine/schemas/processors/cognitive.py +77 -0
  872. ciris_engine/schemas/processors/context.py +35 -0
  873. ciris_engine/schemas/processors/core.py +152 -0
  874. ciris_engine/schemas/processors/dma.py +105 -0
  875. ciris_engine/schemas/processors/error.py +122 -0
  876. ciris_engine/schemas/processors/main.py +109 -0
  877. ciris_engine/schemas/processors/phase_results.py +21 -0
  878. ciris_engine/schemas/processors/results.py +99 -0
  879. ciris_engine/schemas/processors/solitude.py +79 -0
  880. ciris_engine/schemas/processors/state.py +202 -0
  881. ciris_engine/schemas/processors/state_example.py +177 -0
  882. ciris_engine/schemas/processors/states.py +21 -0
  883. ciris_engine/schemas/processors/status.py +34 -0
  884. ciris_engine/schemas/registries/__init__.py +1 -0
  885. ciris_engine/schemas/registries/base.py +66 -0
  886. ciris_engine/schemas/resources/__init__.py +15 -0
  887. ciris_engine/schemas/resources/crisis.py +315 -0
  888. ciris_engine/schemas/runtime/__init__.py +42 -0
  889. ciris_engine/schemas/runtime/adapter_management.py +186 -0
  890. ciris_engine/schemas/runtime/api.py +58 -0
  891. ciris_engine/schemas/runtime/audit.py +50 -0
  892. ciris_engine/schemas/runtime/bootstrap.py +33 -0
  893. ciris_engine/schemas/runtime/contexts.py +61 -0
  894. ciris_engine/schemas/runtime/core.py +161 -0
  895. ciris_engine/schemas/runtime/enums.py +167 -0
  896. ciris_engine/schemas/runtime/extended.py +232 -0
  897. ciris_engine/schemas/runtime/manifest.py +311 -0
  898. ciris_engine/schemas/runtime/memory.py +60 -0
  899. ciris_engine/schemas/runtime/messages.py +108 -0
  900. ciris_engine/schemas/runtime/models.py +156 -0
  901. ciris_engine/schemas/runtime/processing_context.py +43 -0
  902. ciris_engine/schemas/runtime/protocols_core.py +96 -0
  903. ciris_engine/schemas/runtime/resources.py +33 -0
  904. ciris_engine/schemas/runtime/system_context.py +417 -0
  905. ciris_engine/schemas/secrets/__init__.py +1 -0
  906. ciris_engine/schemas/secrets/core.py +267 -0
  907. ciris_engine/schemas/secrets/service.py +95 -0
  908. ciris_engine/schemas/services/__init__.py +33 -0
  909. ciris_engine/schemas/services/audit_summary_node.py +172 -0
  910. ciris_engine/schemas/services/authority/__init__.py +39 -0
  911. ciris_engine/schemas/services/authority/jwt.py +158 -0
  912. ciris_engine/schemas/services/authority/wa_updates.py +138 -0
  913. ciris_engine/schemas/services/authority/wise_authority.py +163 -0
  914. ciris_engine/schemas/services/authority_core.py +370 -0
  915. ciris_engine/schemas/services/capabilities.py +72 -0
  916. ciris_engine/schemas/services/community_core.py +95 -0
  917. ciris_engine/schemas/services/context.py +111 -0
  918. ciris_engine/schemas/services/conversation_summary_node.py +189 -0
  919. ciris_engine/schemas/services/core/__init__.py +153 -0
  920. ciris_engine/schemas/services/core/runtime.py +262 -0
  921. ciris_engine/schemas/services/core/runtime_config.py +117 -0
  922. ciris_engine/schemas/services/core/secrets.py +65 -0
  923. ciris_engine/schemas/services/correlation_node.py +179 -0
  924. ciris_engine/schemas/services/credit_gate.py +92 -0
  925. ciris_engine/schemas/services/discord_nodes.py +299 -0
  926. ciris_engine/schemas/services/feedback_core.py +131 -0
  927. ciris_engine/schemas/services/filters_core.py +270 -0
  928. ciris_engine/schemas/services/governance.py +26 -0
  929. ciris_engine/schemas/services/graph/__init__.py +26 -0
  930. ciris_engine/schemas/services/graph/attributes.py +254 -0
  931. ciris_engine/schemas/services/graph/audit.py +98 -0
  932. ciris_engine/schemas/services/graph/consolidation.py +338 -0
  933. ciris_engine/schemas/services/graph/edge_types.py +43 -0
  934. ciris_engine/schemas/services/graph/edges.py +88 -0
  935. ciris_engine/schemas/services/graph/incident.py +312 -0
  936. ciris_engine/schemas/services/graph/memory.py +84 -0
  937. ciris_engine/schemas/services/graph/node_data.py +174 -0
  938. ciris_engine/schemas/services/graph/query_results.py +82 -0
  939. ciris_engine/schemas/services/graph/telemetry.py +250 -0
  940. ciris_engine/schemas/services/graph/tsdb_consolidation.py +27 -0
  941. ciris_engine/schemas/services/graph/tsdb_models.py +107 -0
  942. ciris_engine/schemas/services/graph_core.py +196 -0
  943. ciris_engine/schemas/services/graph_typed_nodes.py +194 -0
  944. ciris_engine/schemas/services/infrastructure/__init__.py +1 -0
  945. ciris_engine/schemas/services/infrastructure/resource_monitor.py +20 -0
  946. ciris_engine/schemas/services/lifecycle/__init__.py +9 -0
  947. ciris_engine/schemas/services/lifecycle/initialization.py +33 -0
  948. ciris_engine/schemas/services/lifecycle/time.py +50 -0
  949. ciris_engine/schemas/services/llm.py +187 -0
  950. ciris_engine/schemas/services/metadata.py +43 -0
  951. ciris_engine/schemas/services/nodes.py +704 -0
  952. ciris_engine/schemas/services/operations.py +126 -0
  953. ciris_engine/schemas/services/requests.py +128 -0
  954. ciris_engine/schemas/services/resources_core.py +182 -0
  955. ciris_engine/schemas/services/runtime_control.py +1010 -0
  956. ciris_engine/schemas/services/shutdown.py +88 -0
  957. ciris_engine/schemas/services/special/__init__.py +0 -0
  958. ciris_engine/schemas/services/special/self_observation.py +396 -0
  959. ciris_engine/schemas/services/trace_summary_node.py +199 -0
  960. ciris_engine/schemas/services/visibility.py +98 -0
  961. ciris_engine/schemas/streaming/__init__.py +10 -0
  962. ciris_engine/schemas/streaming/reasoning_stream.py +95 -0
  963. ciris_engine/schemas/telemetry/__init__.py +0 -0
  964. ciris_engine/schemas/telemetry/collector.py +67 -0
  965. ciris_engine/schemas/telemetry/core.py +252 -0
  966. ciris_engine/schemas/telemetry/unified.py +59 -0
  967. ciris_engine/schemas/tools.py +72 -0
  968. ciris_engine/schemas/types.py +47 -0
  969. ciris_engine/schemas/utils/__init__.py +1 -0
  970. ciris_engine/schemas/utils/config_validator.py +54 -0
  971. ciris_engine/utils/__init__.py +1 -0
  972. ciris_engine/utils/serialization.py +35 -0
  973. ciris_sdk/__init__.py +124 -0
  974. ciris_sdk/auth_store.py +261 -0
  975. ciris_sdk/client.py +261 -0
  976. ciris_sdk/exceptions.py +73 -0
  977. ciris_sdk/model_types.py +258 -0
  978. ciris_sdk/models.py +354 -0
  979. ciris_sdk/pagination.py +214 -0
  980. ciris_sdk/rate_limiter.py +188 -0
  981. ciris_sdk/setup.py +17 -0
  982. ciris_sdk/telemetry_models.py +257 -0
  983. ciris_sdk/telemetry_responses.py +199 -0
  984. ciris_sdk/transport.py +177 -0
  985. ciris_sdk/websocket.py +400 -0
  986. main.py +766 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6539],{62:t=>{t.exports={style:{fontFamily:"'Geist Mono', 'Geist Mono Fallback'",fontStyle:"normal"},className:"__className_9a8899",variable:"__variable_9a8899"}},223:t=>{t.exports={style:{fontFamily:"'fontBrandRegular', 'fontBrandRegular Fallback', sans-serif",fontStyle:"normal"},className:"__className_c7d6ee",variable:"__variable_c7d6ee"}},589:(t,e,i)=>{"use strict";i.d(e,{$:()=>a,s:()=>o});var s=i(494),r=i(6759),n=i(1279),o=class extends r.k{#t;#e;#i;constructor(t){super(),this.mutationId=t.mutationId,this.#e=t.mutationCache,this.#t=[],this.state=t.state||a(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#e.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#e.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||("pending"===this.state.status?this.scheduleGc():this.#e.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#s({type:"continue"})};this.#i=(0,n.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#s({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#s({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#e.canRun(this)});let i="pending"===this.state.status,s=!this.#i.canStart();try{if(i)e();else{this.#s({type:"pending",variables:t,isPaused:s}),await this.#e.config.onMutate?.(t,this);let e=await this.options.onMutate?.(t);e!==this.state.context&&this.#s({type:"pending",context:e,variables:t,isPaused:s})}let r=await this.#i.start();return await this.#e.config.onSuccess?.(r,t,this.state.context,this),await this.options.onSuccess?.(r,t,this.state.context),await this.#e.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,t,this.state.context),this.#s({type:"success",data:r}),r}catch(e){try{throw await this.#e.config.onError?.(e,t,this.state.context,this),await this.options.onError?.(e,t,this.state.context),await this.#e.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,e,t,this.state.context),e}finally{this.#s({type:"error",error:e})}}finally{this.#e.runNext(this)}}#s(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),s.jG.batch(()=>{this.#t.forEach(e=>{e.onMutationUpdate(t)}),this.#e.notify({mutation:this,type:"updated",action:t})})}};function a(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},607:(t,e,i)=>{"use strict";i.d(e,{QP:()=>tu});let s=t=>{let e=a(t),{conflictingClassGroups:i,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:t=>{let i=t.split("-");return""===i[0]&&1!==i.length&&i.shift(),r(i,e)||o(t)},getConflictingClassGroupIds:(t,e)=>{let r=i[t]||[];return e&&s[t]?[...r,...s[t]]:r}}},r=(t,e)=>{if(0===t.length)return e.classGroupId;let i=t[0],s=e.nextPart.get(i),n=s?r(t.slice(1),s):void 0;if(n)return n;if(0===e.validators.length)return;let o=t.join("-");return e.validators.find(({validator:t})=>t(o))?.classGroupId},n=/^\[(.+)\]$/,o=t=>{if(n.test(t)){let e=n.exec(t)[1],i=e?.substring(0,e.indexOf(":"));if(i)return"arbitrary.."+i}},a=t=>{let{theme:e,classGroups:i}=t,s={nextPart:new Map,validators:[]};for(let t in i)l(i[t],s,t,e);return s},l=(t,e,i,s)=>{t.forEach(t=>{if("string"==typeof t){(""===t?e:u(e,t)).classGroupId=i;return}if("function"==typeof t)return h(t)?void l(t(s),e,i,s):void e.validators.push({validator:t,classGroupId:i});Object.entries(t).forEach(([t,r])=>{l(r,u(e,t),i,s)})})},u=(t,e)=>{let i=t;return e.split("-").forEach(t=>{i.nextPart.has(t)||i.nextPart.set(t,{nextPart:new Map,validators:[]}),i=i.nextPart.get(t)}),i},h=t=>t.isThemeGetter,d=t=>{if(t<1)return{get:()=>void 0,set:()=>{}};let e=0,i=new Map,s=new Map,r=(r,n)=>{i.set(r,n),++e>t&&(e=0,s=i,i=new Map)};return{get(t){let e=i.get(t);return void 0!==e?e:void 0!==(e=s.get(t))?(r(t,e),e):void 0},set(t,e){i.has(t)?i.set(t,e):r(t,e)}}},c=t=>{let{prefix:e,experimentalParseClassName:i}=t,s=t=>{let e,i=[],s=0,r=0,n=0;for(let o=0;o<t.length;o++){let a=t[o];if(0===s&&0===r){if(":"===a){i.push(t.slice(n,o)),n=o+1;continue}if("/"===a){e=o;continue}}"["===a?s++:"]"===a?s--:"("===a?r++:")"===a&&r--}let o=0===i.length?t:t.substring(n),a=p(o);return{modifiers:i,hasImportantModifier:a!==o,baseClassName:a,maybePostfixModifierPosition:e&&e>n?e-n:void 0}};if(e){let t=e+":",i=s;s=e=>e.startsWith(t)?i(e.substring(t.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:e,maybePostfixModifierPosition:void 0}}if(i){let t=s;s=e=>i({className:e,parseClassName:t})}return s},p=t=>t.endsWith("!")?t.substring(0,t.length-1):t.startsWith("!")?t.substring(1):t,m=t=>{let e=Object.fromEntries(t.orderSensitiveModifiers.map(t=>[t,!0]));return t=>{if(t.length<=1)return t;let i=[],s=[];return t.forEach(t=>{"["===t[0]||e[t]?(i.push(...s.sort(),t),s=[]):s.push(t)}),i.push(...s.sort()),i}},f=t=>({cache:d(t.cacheSize),parseClassName:c(t),sortModifiers:m(t),...s(t)}),g=/\s+/,y=(t,e)=>{let{parseClassName:i,getClassGroupId:s,getConflictingClassGroupIds:r,sortModifiers:n}=e,o=[],a=t.trim().split(g),l="";for(let t=a.length-1;t>=0;t-=1){let e=a[t],{isExternal:u,modifiers:h,hasImportantModifier:d,baseClassName:c,maybePostfixModifierPosition:p}=i(e);if(u){l=e+(l.length>0?" "+l:l);continue}let m=!!p,f=s(m?c.substring(0,p):c);if(!f){if(!m||!(f=s(c))){l=e+(l.length>0?" "+l:l);continue}m=!1}let g=n(h).join(":"),y=d?g+"!":g,v=y+f;if(o.includes(v))continue;o.push(v);let b=r(f,m);for(let t=0;t<b.length;++t){let e=b[t];o.push(y+e)}l=e+(l.length>0?" "+l:l)}return l};function v(){let t,e,i=0,s="";for(;i<arguments.length;)(t=arguments[i++])&&(e=b(t))&&(s&&(s+=" "),s+=e);return s}let b=t=>{let e;if("string"==typeof t)return t;let i="";for(let s=0;s<t.length;s++)t[s]&&(e=b(t[s]))&&(i&&(i+=" "),i+=e);return i},x=t=>{let e=e=>e[t]||[];return e.isThemeGetter=!0,e},w=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,k=/^\((?:(\w[\w-]*):)?(.+)\)$/i,P=/^\d+\/\d+$/,T=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,S=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,A=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,M=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,C=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,E=t=>P.test(t),D=t=>!!t&&!Number.isNaN(Number(t)),V=t=>!!t&&Number.isInteger(Number(t)),R=t=>t.endsWith("%")&&D(t.slice(0,-1)),j=t=>T.test(t),F=()=>!0,O=t=>S.test(t)&&!A.test(t),L=()=>!1,B=t=>M.test(t),I=t=>C.test(t),z=t=>!U(t)&&!H(t),N=t=>tt(t,tr,L),U=t=>w.test(t),q=t=>tt(t,tn,O),$=t=>tt(t,to,D),W=t=>tt(t,ti,L),Q=t=>tt(t,ts,I),G=t=>tt(t,tl,B),H=t=>k.test(t),K=t=>te(t,tn),Y=t=>te(t,ta),_=t=>te(t,ti),X=t=>te(t,tr),Z=t=>te(t,ts),J=t=>te(t,tl,!0),tt=(t,e,i)=>{let s=w.exec(t);return!!s&&(s[1]?e(s[1]):i(s[2]))},te=(t,e,i=!1)=>{let s=k.exec(t);return!!s&&(s[1]?e(s[1]):i)},ti=t=>"position"===t||"percentage"===t,ts=t=>"image"===t||"url"===t,tr=t=>"length"===t||"size"===t||"bg-size"===t,tn=t=>"length"===t,to=t=>"number"===t,ta=t=>"family-name"===t,tl=t=>"shadow"===t;Symbol.toStringTag;let tu=function(t,...e){let i,s,r,n=function(a){return s=(i=f(e.reduce((t,e)=>e(t),t()))).cache.get,r=i.cache.set,n=o,o(a)};function o(t){let e=s(t);if(e)return e;let n=y(t,i);return r(t,n),n}return function(){return n(v.apply(null,arguments))}}(()=>{let t=x("color"),e=x("font"),i=x("text"),s=x("font-weight"),r=x("tracking"),n=x("leading"),o=x("breakpoint"),a=x("container"),l=x("spacing"),u=x("radius"),h=x("shadow"),d=x("inset-shadow"),c=x("text-shadow"),p=x("drop-shadow"),m=x("blur"),f=x("perspective"),g=x("aspect"),y=x("ease"),v=x("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...w(),H,U],P=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],S=()=>[H,U,l],A=()=>[E,"full","auto",...S()],M=()=>[V,"none","subgrid",H,U],C=()=>["auto",{span:["full",V,H,U]},V,H,U],O=()=>[V,"auto",H,U],L=()=>["auto","min","max","fr",H,U],B=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],I=()=>["start","end","center","stretch","center-safe","end-safe"],tt=()=>["auto",...S()],te=()=>[E,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],ti=()=>[t,H,U],ts=()=>[...w(),_,W,{position:[H,U]}],tr=()=>["no-repeat",{repeat:["","x","y","space","round"]}],tn=()=>["auto","cover","contain",X,N,{size:[H,U]}],to=()=>[R,K,q],ta=()=>["","none","full",u,H,U],tl=()=>["",D,K,q],tu=()=>["solid","dashed","dotted","double"],th=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],td=()=>[D,R,_,W],tc=()=>["","none",m,H,U],tp=()=>["none",D,H,U],tm=()=>["none",D,H,U],tf=()=>[D,H,U],tg=()=>[E,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[j],breakpoint:[j],color:[F],container:[j],"drop-shadow":[j],ease:["in","out","in-out"],font:[z],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[j],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[j],shadow:[j],spacing:["px",D],text:[j],"text-shadow":[j],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",E,U,H,g]}],container:["container"],columns:[{columns:[D,U,H,a]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[V,"auto",H,U]}],basis:[{basis:[E,"full","auto",a,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[D,E,"auto","initial","none",U]}],grow:[{grow:["",D,H,U]}],shrink:[{shrink:["",D,H,U]}],order:[{order:[V,"first","last","none",H,U]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:C()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:C()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...B(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...B()]}],"align-items":[{items:[...I(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...I(),{baseline:["","last"]}]}],"place-content":[{"place-content":B()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:tt()}],mx:[{mx:tt()}],my:[{my:tt()}],ms:[{ms:tt()}],me:[{me:tt()}],mt:[{mt:tt()}],mr:[{mr:tt()}],mb:[{mb:tt()}],ml:[{ml:tt()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:te()}],w:[{w:[a,"screen",...te()]}],"min-w":[{"min-w":[a,"screen","none",...te()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...te()]}],h:[{h:["screen","lh",...te()]}],"min-h":[{"min-h":["screen","lh","none",...te()]}],"max-h":[{"max-h":["screen","lh",...te()]}],"font-size":[{text:["base",i,K,q]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,H,$]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",R,U]}],"font-family":[{font:[Y,U,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,H,U]}],"line-clamp":[{"line-clamp":[D,"none",H,$]}],leading:[{leading:[n,...S()]}],"list-image":[{"list-image":["none",H,U]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",H,U]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ti()}],"text-color":[{text:ti()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...tu(),"wavy"]}],"text-decoration-thickness":[{decoration:[D,"from-font","auto",H,q]}],"text-decoration-color":[{decoration:ti()}],"underline-offset":[{"underline-offset":[D,"auto",H,U]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",H,U]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",H,U]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ts()}],"bg-repeat":[{bg:tr()}],"bg-size":[{bg:tn()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},V,H,U],radial:["",H,U],conic:[V,H,U]},Z,Q]}],"bg-color":[{bg:ti()}],"gradient-from-pos":[{from:to()}],"gradient-via-pos":[{via:to()}],"gradient-to-pos":[{to:to()}],"gradient-from":[{from:ti()}],"gradient-via":[{via:ti()}],"gradient-to":[{to:ti()}],rounded:[{rounded:ta()}],"rounded-s":[{"rounded-s":ta()}],"rounded-e":[{"rounded-e":ta()}],"rounded-t":[{"rounded-t":ta()}],"rounded-r":[{"rounded-r":ta()}],"rounded-b":[{"rounded-b":ta()}],"rounded-l":[{"rounded-l":ta()}],"rounded-ss":[{"rounded-ss":ta()}],"rounded-se":[{"rounded-se":ta()}],"rounded-ee":[{"rounded-ee":ta()}],"rounded-es":[{"rounded-es":ta()}],"rounded-tl":[{"rounded-tl":ta()}],"rounded-tr":[{"rounded-tr":ta()}],"rounded-br":[{"rounded-br":ta()}],"rounded-bl":[{"rounded-bl":ta()}],"border-w":[{border:tl()}],"border-w-x":[{"border-x":tl()}],"border-w-y":[{"border-y":tl()}],"border-w-s":[{"border-s":tl()}],"border-w-e":[{"border-e":tl()}],"border-w-t":[{"border-t":tl()}],"border-w-r":[{"border-r":tl()}],"border-w-b":[{"border-b":tl()}],"border-w-l":[{"border-l":tl()}],"divide-x":[{"divide-x":tl()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":tl()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...tu(),"hidden","none"]}],"divide-style":[{divide:[...tu(),"hidden","none"]}],"border-color":[{border:ti()}],"border-color-x":[{"border-x":ti()}],"border-color-y":[{"border-y":ti()}],"border-color-s":[{"border-s":ti()}],"border-color-e":[{"border-e":ti()}],"border-color-t":[{"border-t":ti()}],"border-color-r":[{"border-r":ti()}],"border-color-b":[{"border-b":ti()}],"border-color-l":[{"border-l":ti()}],"divide-color":[{divide:ti()}],"outline-style":[{outline:[...tu(),"none","hidden"]}],"outline-offset":[{"outline-offset":[D,H,U]}],"outline-w":[{outline:["",D,K,q]}],"outline-color":[{outline:ti()}],shadow:[{shadow:["","none",h,J,G]}],"shadow-color":[{shadow:ti()}],"inset-shadow":[{"inset-shadow":["none",d,J,G]}],"inset-shadow-color":[{"inset-shadow":ti()}],"ring-w":[{ring:tl()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ti()}],"ring-offset-w":[{"ring-offset":[D,q]}],"ring-offset-color":[{"ring-offset":ti()}],"inset-ring-w":[{"inset-ring":tl()}],"inset-ring-color":[{"inset-ring":ti()}],"text-shadow":[{"text-shadow":["none",c,J,G]}],"text-shadow-color":[{"text-shadow":ti()}],opacity:[{opacity:[D,H,U]}],"mix-blend":[{"mix-blend":[...th(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":th()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[D]}],"mask-image-linear-from-pos":[{"mask-linear-from":td()}],"mask-image-linear-to-pos":[{"mask-linear-to":td()}],"mask-image-linear-from-color":[{"mask-linear-from":ti()}],"mask-image-linear-to-color":[{"mask-linear-to":ti()}],"mask-image-t-from-pos":[{"mask-t-from":td()}],"mask-image-t-to-pos":[{"mask-t-to":td()}],"mask-image-t-from-color":[{"mask-t-from":ti()}],"mask-image-t-to-color":[{"mask-t-to":ti()}],"mask-image-r-from-pos":[{"mask-r-from":td()}],"mask-image-r-to-pos":[{"mask-r-to":td()}],"mask-image-r-from-color":[{"mask-r-from":ti()}],"mask-image-r-to-color":[{"mask-r-to":ti()}],"mask-image-b-from-pos":[{"mask-b-from":td()}],"mask-image-b-to-pos":[{"mask-b-to":td()}],"mask-image-b-from-color":[{"mask-b-from":ti()}],"mask-image-b-to-color":[{"mask-b-to":ti()}],"mask-image-l-from-pos":[{"mask-l-from":td()}],"mask-image-l-to-pos":[{"mask-l-to":td()}],"mask-image-l-from-color":[{"mask-l-from":ti()}],"mask-image-l-to-color":[{"mask-l-to":ti()}],"mask-image-x-from-pos":[{"mask-x-from":td()}],"mask-image-x-to-pos":[{"mask-x-to":td()}],"mask-image-x-from-color":[{"mask-x-from":ti()}],"mask-image-x-to-color":[{"mask-x-to":ti()}],"mask-image-y-from-pos":[{"mask-y-from":td()}],"mask-image-y-to-pos":[{"mask-y-to":td()}],"mask-image-y-from-color":[{"mask-y-from":ti()}],"mask-image-y-to-color":[{"mask-y-to":ti()}],"mask-image-radial":[{"mask-radial":[H,U]}],"mask-image-radial-from-pos":[{"mask-radial-from":td()}],"mask-image-radial-to-pos":[{"mask-radial-to":td()}],"mask-image-radial-from-color":[{"mask-radial-from":ti()}],"mask-image-radial-to-color":[{"mask-radial-to":ti()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[D]}],"mask-image-conic-from-pos":[{"mask-conic-from":td()}],"mask-image-conic-to-pos":[{"mask-conic-to":td()}],"mask-image-conic-from-color":[{"mask-conic-from":ti()}],"mask-image-conic-to-color":[{"mask-conic-to":ti()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ts()}],"mask-repeat":[{mask:tr()}],"mask-size":[{mask:tn()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",H,U]}],filter:[{filter:["","none",H,U]}],blur:[{blur:tc()}],brightness:[{brightness:[D,H,U]}],contrast:[{contrast:[D,H,U]}],"drop-shadow":[{"drop-shadow":["","none",p,J,G]}],"drop-shadow-color":[{"drop-shadow":ti()}],grayscale:[{grayscale:["",D,H,U]}],"hue-rotate":[{"hue-rotate":[D,H,U]}],invert:[{invert:["",D,H,U]}],saturate:[{saturate:[D,H,U]}],sepia:[{sepia:["",D,H,U]}],"backdrop-filter":[{"backdrop-filter":["","none",H,U]}],"backdrop-blur":[{"backdrop-blur":tc()}],"backdrop-brightness":[{"backdrop-brightness":[D,H,U]}],"backdrop-contrast":[{"backdrop-contrast":[D,H,U]}],"backdrop-grayscale":[{"backdrop-grayscale":["",D,H,U]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[D,H,U]}],"backdrop-invert":[{"backdrop-invert":["",D,H,U]}],"backdrop-opacity":[{"backdrop-opacity":[D,H,U]}],"backdrop-saturate":[{"backdrop-saturate":[D,H,U]}],"backdrop-sepia":[{"backdrop-sepia":["",D,H,U]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",H,U]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[D,"initial",H,U]}],ease:[{ease:["linear","initial",y,H,U]}],delay:[{delay:[D,H,U]}],animate:[{animate:["none",v,H,U]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,H,U]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:tp()}],"rotate-x":[{"rotate-x":tp()}],"rotate-y":[{"rotate-y":tp()}],"rotate-z":[{"rotate-z":tp()}],scale:[{scale:tm()}],"scale-x":[{"scale-x":tm()}],"scale-y":[{"scale-y":tm()}],"scale-z":[{"scale-z":tm()}],"scale-3d":["scale-3d"],skew:[{skew:tf()}],"skew-x":[{"skew-x":tf()}],"skew-y":[{"skew-y":tf()}],transform:[{transform:[H,U,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:tg()}],"translate-x":[{"translate-x":tg()}],"translate-y":[{"translate-y":tg()}],"translate-z":[{"translate-z":tg()}],"translate-none":["translate-none"],accent:[{accent:ti()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ti()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",H,U]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",H,U]}],fill:[{fill:["none",...ti()]}],"stroke-w":[{stroke:[D,K,q,$]}],stroke:[{stroke:["none",...ti()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}})},1932:(t,e,i)=>{"use strict";i.d(e,{E:()=>f});var s=i(7703),r=i(2210),n=i(494),o=i(2327),a=class extends o.Q{constructor(t={}){super(),this.config=t,this.#r=new Map}#r;build(t,e,i){let n=e.queryKey,o=e.queryHash??(0,s.F$)(n,e),a=this.get(o);return a||(a=new r.X({client:t,queryKey:n,queryHash:o,options:t.defaultQueryOptions(e),state:i,defaultOptions:t.getQueryDefaults(n)}),this.add(a)),a}add(t){this.#r.has(t.queryHash)||(this.#r.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){let e=this.#r.get(t.queryHash);e&&(t.destroy(),e===t&&this.#r.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){n.jG.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#r.get(t)}getAll(){return[...this.#r.values()]}find(t){let e={exact:!0,...t};return this.getAll().find(t=>(0,s.MK)(e,t))}findAll(t={}){let e=this.getAll();return Object.keys(t).length>0?e.filter(e=>(0,s.MK)(t,e)):e}notify(t){n.jG.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){n.jG.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){n.jG.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},l=i(589),u=class extends o.Q{constructor(t={}){super(),this.config=t,this.#n=new Set,this.#o=new Map,this.#a=0}#n;#o;#a;build(t,e,i){let s=new l.s({mutationCache:this,mutationId:++this.#a,options:t.defaultMutationOptions(e),state:i});return this.add(s),s}add(t){this.#n.add(t);let e=h(t);if("string"==typeof e){let i=this.#o.get(e);i?i.push(t):this.#o.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#n.delete(t)){let e=h(t);if("string"==typeof e){let i=this.#o.get(e);if(i)if(i.length>1){let e=i.indexOf(t);-1!==e&&i.splice(e,1)}else i[0]===t&&this.#o.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){let e=h(t);if("string"!=typeof e)return!0;{let i=this.#o.get(e),s=i?.find(t=>"pending"===t.state.status);return!s||s===t}}runNext(t){let e=h(t);if("string"!=typeof e)return Promise.resolve();{let i=this.#o.get(e)?.find(e=>e!==t&&e.state.isPaused);return i?.continue()??Promise.resolve()}}clear(){n.jG.batch(()=>{this.#n.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#n.clear(),this.#o.clear()})}getAll(){return Array.from(this.#n)}find(t){let e={exact:!0,...t};return this.getAll().find(t=>(0,s.nJ)(e,t))}findAll(t={}){return this.getAll().filter(e=>(0,s.nJ)(t,e))}notify(t){n.jG.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){let t=this.getAll().filter(t=>t.state.isPaused);return n.jG.batch(()=>Promise.all(t.map(t=>t.continue().catch(s.lQ))))}};function h(t){return t.options.scope?.id}var d=i(1229),c=i(1116);function p(t){return{onFetch:(e,i)=>{let r=e.options,n=e.fetchOptions?.meta?.fetchMore?.direction,o=e.state.data?.pages||[],a=e.state.data?.pageParams||[],l={pages:[],pageParams:[]},u=0,h=async()=>{let i=!1,h=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(e.signal.aborted?i=!0:e.signal.addEventListener("abort",()=>{i=!0}),e.signal)})},d=(0,s.ZM)(e.options,e.fetchOptions),c=async(t,r,n)=>{if(i)return Promise.reject();if(null==r&&t.pages.length)return Promise.resolve(t);let o=(()=>{let t={client:e.client,queryKey:e.queryKey,pageParam:r,direction:n?"backward":"forward",meta:e.options.meta};return h(t),t})(),a=await d(o),{maxPages:l}=e.options,u=n?s.ZZ:s.y9;return{pages:u(t.pages,a,l),pageParams:u(t.pageParams,r,l)}};if(n&&o.length){let t="backward"===n,e={pages:o,pageParams:a},i=(t?function(t,{pages:e,pageParams:i}){return e.length>0?t.getPreviousPageParam?.(e[0],e,i[0],i):void 0}:m)(r,e);l=await c(e,i,t)}else{let e=t??o.length;do{let t=0===u?a[0]??r.initialPageParam:m(r,l);if(u>0&&null==t)break;l=await c(l,t),u++}while(u<e)}return l};e.options.persister?e.fetchFn=()=>e.options.persister?.(h,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},i):e.fetchFn=h}}}function m(t,{pages:e,pageParams:i}){let s=e.length-1;return e.length>0?t.getNextPageParam(e[s],e,i[s],i):void 0}var f=class{#l;#e;#u;#h;#d;#c;#p;#m;constructor(t={}){this.#l=t.queryCache||new a,this.#e=t.mutationCache||new u,this.#u=t.defaultOptions||{},this.#h=new Map,this.#d=new Map,this.#c=0}mount(){this.#c++,1===this.#c&&(this.#p=d.m.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#l.onFocus())}),this.#m=c.t.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#l.onOnline())}))}unmount(){this.#c--,0===this.#c&&(this.#p?.(),this.#p=void 0,this.#m?.(),this.#m=void 0)}isFetching(t){return this.#l.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#e.findAll({...t,status:"pending"}).length}getQueryData(t){let e=this.defaultQueryOptions({queryKey:t});return this.#l.get(e.queryHash)?.state.data}ensureQueryData(t){let e=this.defaultQueryOptions(t),i=this.#l.build(this,e),r=i.state.data;return void 0===r?this.fetchQuery(t):(t.revalidateIfStale&&i.isStaleByTime((0,s.d2)(e.staleTime,i))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return this.#l.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(t,e,i){let r=this.defaultQueryOptions({queryKey:t}),n=this.#l.get(r.queryHash),o=n?.state.data,a=(0,s.Zw)(e,o);if(void 0!==a)return this.#l.build(this,r).setData(a,{...i,manual:!0})}setQueriesData(t,e,i){return n.jG.batch(()=>this.#l.findAll(t).map(({queryKey:t})=>[t,this.setQueryData(t,e,i)]))}getQueryState(t){let e=this.defaultQueryOptions({queryKey:t});return this.#l.get(e.queryHash)?.state}removeQueries(t){let e=this.#l;n.jG.batch(()=>{e.findAll(t).forEach(t=>{e.remove(t)})})}resetQueries(t,e){let i=this.#l;return n.jG.batch(()=>(i.findAll(t).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){let i={revert:!0,...e};return Promise.all(n.jG.batch(()=>this.#l.findAll(t).map(t=>t.cancel(i)))).then(s.lQ).catch(s.lQ)}invalidateQueries(t,e={}){return n.jG.batch(()=>(this.#l.findAll(t).forEach(t=>{t.invalidate()}),t?.refetchType==="none")?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e))}refetchQueries(t,e={}){let i={...e,cancelRefetch:e.cancelRefetch??!0};return Promise.all(n.jG.batch(()=>this.#l.findAll(t).filter(t=>!t.isDisabled()&&!t.isStatic()).map(t=>{let e=t.fetch(void 0,i);return i.throwOnError||(e=e.catch(s.lQ)),"paused"===t.state.fetchStatus?Promise.resolve():e}))).then(s.lQ)}fetchQuery(t){let e=this.defaultQueryOptions(t);void 0===e.retry&&(e.retry=!1);let i=this.#l.build(this,e);return i.isStaleByTime((0,s.d2)(e.staleTime,i))?i.fetch(e):Promise.resolve(i.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(s.lQ).catch(s.lQ)}fetchInfiniteQuery(t){return t.behavior=p(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(s.lQ).catch(s.lQ)}ensureInfiniteQueryData(t){return t.behavior=p(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return c.t.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#l}getMutationCache(){return this.#e}getDefaultOptions(){return this.#u}setDefaultOptions(t){this.#u=t}setQueryDefaults(t,e){this.#h.set((0,s.EN)(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){let e=[...this.#h.values()],i={};return e.forEach(e=>{(0,s.Cp)(t,e.queryKey)&&Object.assign(i,e.defaultOptions)}),i}setMutationDefaults(t,e){this.#d.set((0,s.EN)(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){let e=[...this.#d.values()],i={};return e.forEach(e=>{(0,s.Cp)(t,e.mutationKey)&&Object.assign(i,e.defaultOptions)}),i}defaultQueryOptions(t){if(t._defaulted)return t;let e={...this.#u.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=(0,s.F$)(e.queryKey,e)),void 0===e.refetchOnReconnect&&(e.refetchOnReconnect="always"!==e.networkMode),void 0===e.throwOnError&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===s.hT&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#u.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#l.clear(),this.#e.clear()}}},5368:(t,e,i)=>{"use strict";function s(){for(var t,e,i=0,s="",r=arguments.length;i<r;i++)(t=arguments[i])&&(e=function t(e){var i,s,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(i=0;i<n;i++)e[i]&&(s=t(e[i]))&&(r&&(r+=" "),r+=s)}else for(s in e)e[s]&&(r&&(r+=" "),r+=s);return r}(t))&&(s&&(s+=" "),s+=e);return s}i.d(e,{$:()=>s})},9273:(t,e,i)=>{"use strict";let s;i.d(e,{P:()=>nP});var r=i(7620);let n=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],o=new Set(n),a=t=>180*t/Math.PI,l=t=>h(a(Math.atan2(t[1],t[0]))),u={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:l,rotateZ:l,skewX:t=>a(Math.atan(t[1])),skewY:t=>a(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},h=t=>((t%=360)<0&&(t+=360),t),d=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),c=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),p={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:d,scaleY:c,scale:t=>(d(t)+c(t))/2,rotateX:t=>h(a(Math.atan2(t[6],t[5]))),rotateY:t=>h(a(Math.atan2(-t[2],t[0]))),rotateZ:l,rotate:l,skewX:t=>a(Math.atan(t[4])),skewY:t=>a(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function m(t){return+!!t.includes("scale")}function f(t,e){let i,s;if(!t||"none"===t)return m(e);let r=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(r)i=p,s=r;else{let e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=u,s=e}if(!s)return m(e);let n=i[e],o=s[1].split(",").map(y);return"function"==typeof n?n(o):o[n]}let g=(t,e)=>{let{transform:i="none"}=getComputedStyle(t);return f(i,e)};function y(t){return parseFloat(t.trim())}let v=t=>e=>"string"==typeof e&&e.startsWith(t),b=v("--"),x=v("var(--"),w=t=>!!x(t)&&k.test(t.split("/*")[0].trim()),k=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function P({top:t,left:e,right:i,bottom:s}){return{x:{min:e,max:i},y:{min:t,max:s}}}let T=(t,e,i)=>t+(e-t)*i;function S(t){return void 0===t||1===t}function A({scale:t,scaleX:e,scaleY:i}){return!S(t)||!S(e)||!S(i)}function M(t){return A(t)||C(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function C(t){var e,i;return(e=t.x)&&"0%"!==e||(i=t.y)&&"0%"!==i}function E(t,e,i,s,r){return void 0!==r&&(t=s+r*(t-s)),s+i*(t-s)+e}function D(t,e=0,i=1,s,r){t.min=E(t.min,e,i,s,r),t.max=E(t.max,e,i,s,r)}function V(t,{x:e,y:i}){D(t.x,e.translate,e.scale,e.originPoint),D(t.y,i.translate,i.scale,i.originPoint)}function R(t,e){t.min=t.min+e,t.max=t.max+e}function j(t,e,i,s,r=.5){let n=T(t.min,t.max,r);D(t,e,i,n,s)}function F(t,e){j(t.x,e.x,e.scaleX,e.scale,e.originX),j(t.y,e.y,e.scaleY,e.scale,e.originY)}function O(t,e){return P(function(t,e){if(!e)return t;let i=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}let L=new Set(["width","height","top","left","right","bottom",...n]),B=(t,e,i)=>i>e?e:i<t?t:i,I={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},z={...I,transform:t=>B(0,1,t)},N={...I,default:1},U=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),q=U("deg"),$=U("%"),W=U("px"),Q=U("vh"),G=U("vw"),H={...$,parse:t=>$.parse(t)/100,transform:t=>$.transform(100*t)},K=t=>e=>e.test(t),Y=[I,W,$,q,G,Q,{test:t=>"auto"===t,parse:t=>t}],_=t=>Y.find(K(t)),X=()=>{},Z=()=>{},J=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),tt=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,te=t=>t===I||t===W,ti=new Set(["x","y","z"]),ts=n.filter(t=>!ti.has(t)),tr={width:({x:t},{paddingLeft:e="0",paddingRight:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),height:({y:t},{paddingTop:e="0",paddingBottom:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>f(e,"x"),y:(t,{transform:e})=>f(e,"y")};tr.translateX=tr.x,tr.translateY=tr.y;let tn=t=>t,to={},ta=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],tl={value:null,addProjectionMetrics:null};function tu(t,e){let i=!1,s=!0,r={delta:0,timestamp:0,isProcessing:!1},n=()=>i=!0,o=ta.reduce((t,i)=>(t[i]=function(t,e){let i=new Set,s=new Set,r=!1,n=!1,o=new WeakSet,a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(e){o.has(e)&&(h.schedule(e),t()),l++,e(a)}let h={schedule:(t,e=!1,n=!1)=>{let a=n&&r?i:s;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{s.delete(t),o.delete(t)},process:t=>{if(a=t,r){n=!0;return}r=!0,[i,s]=[s,i],i.forEach(u),e&&tl.value&&tl.value.frameloop[e].push(l),l=0,i.clear(),r=!1,n&&(n=!1,h.process(t))}};return h}(n,e?i:void 0),t),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:h,update:d,preRender:c,render:p,postRender:m}=o,f=()=>{let n=to.useManualTiming?r.timestamp:performance.now();i=!1,to.useManualTiming||(r.delta=s?1e3/60:Math.max(Math.min(n-r.timestamp,40),1)),r.timestamp=n,r.isProcessing=!0,a.process(r),l.process(r),u.process(r),h.process(r),d.process(r),c.process(r),p.process(r),m.process(r),r.isProcessing=!1,i&&e&&(s=!1,t(f))},g=()=>{i=!0,s=!0,r.isProcessing||t(f)};return{schedule:ta.reduce((t,e)=>{let s=o[e];return t[e]=(t,e=!1,r=!1)=>(i||g(),s.schedule(t,e,r)),t},{}),cancel:t=>{for(let e=0;e<ta.length;e++)o[ta[e]].cancel(t)},state:r,steps:o}}let{schedule:th,cancel:td,state:tc,steps:tp}=tu("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:tn,!0),tm=new Set,tf=!1,tg=!1,ty=!1;function tv(){if(tg){let t=Array.from(tm).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),i=new Map;e.forEach(t=>{let e=function(t){let e=[];return ts.forEach(i=>{let s=t.getValue(i);void 0!==s&&(e.push([i,s.get()]),s.set(+!!i.startsWith("scale")))}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();let e=i.get(t);e&&e.forEach(([e,i])=>{t.getValue(e)?.set(i)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}tg=!1,tf=!1,tm.forEach(t=>t.complete(ty)),tm.clear()}function tb(){tm.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(tg=!0)})}class tx{constructor(t,e,i,s,r,n=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=i,this.motionValue=s,this.element=r,this.isAsync=n}scheduleResolve(){this.state="scheduled",this.isAsync?(tm.add(this),tf||(tf=!0,th.read(tb),th.resolveKeyframes(tv))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:e,element:i,motionValue:s}=this;if(null===t[0]){let r=s?.get(),n=t[t.length-1];if(void 0!==r)t[0]=r;else if(i&&e){let s=i.readValue(e,n);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=n),s&&void 0===r&&s.set(t[0])}for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),tm.delete(this)}cancel(){"scheduled"===this.state&&(tm.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}let tw=t=>/^0[^.\s]+$/u.test(t),tk=t=>Math.round(1e5*t)/1e5,tP=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,tT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,tS=(t,e)=>i=>!!("string"==typeof i&&tT.test(i)&&i.startsWith(t)||e&&null!=i&&Object.prototype.hasOwnProperty.call(i,e)),tA=(t,e,i)=>s=>{if("string"!=typeof s)return s;let[r,n,o,a]=s.match(tP);return{[t]:parseFloat(r),[e]:parseFloat(n),[i]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},tM=t=>B(0,255,t),tC={...I,transform:t=>Math.round(tM(t))},tE={test:tS("rgb","red"),parse:tA("red","green","blue"),transform:({red:t,green:e,blue:i,alpha:s=1})=>"rgba("+tC.transform(t)+", "+tC.transform(e)+", "+tC.transform(i)+", "+tk(z.transform(s))+")"},tD={test:tS("#"),parse:function(t){let e="",i="",s="",r="";return t.length>5?(e=t.substring(1,3),i=t.substring(3,5),s=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),i=t.substring(2,3),s=t.substring(3,4),r=t.substring(4,5),e+=e,i+=i,s+=s,r+=r),{red:parseInt(e,16),green:parseInt(i,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}},transform:tE.transform},tV={test:tS("hsl","hue"),parse:tA("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:i,alpha:s=1})=>"hsla("+Math.round(t)+", "+$.transform(tk(e))+", "+$.transform(tk(i))+", "+tk(z.transform(s))+")"},tR={test:t=>tE.test(t)||tD.test(t)||tV.test(t),parse:t=>tE.test(t)?tE.parse(t):tV.test(t)?tV.parse(t):tD.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?tE.transform(t):tV.transform(t),getAnimatableNone:t=>{let e=tR.parse(t);return e.alpha=0,tR.transform(e)}},tj=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,tF="number",tO="color",tL=/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 tB(t){let e=t.toString(),i=[],s={color:[],number:[],var:[]},r=[],n=0,o=e.replace(tL,t=>(tR.test(t)?(s.color.push(n),r.push(tO),i.push(tR.parse(t))):t.startsWith("var(")?(s.var.push(n),r.push("var"),i.push(t)):(s.number.push(n),r.push(tF),i.push(parseFloat(t))),++n,"${}")).split("${}");return{values:i,split:o,indexes:s,types:r}}function tI(t){return tB(t).values}function tz(t){let{split:e,types:i}=tB(t),s=e.length;return t=>{let r="";for(let n=0;n<s;n++)if(r+=e[n],void 0!==t[n]){let e=i[n];e===tF?r+=tk(t[n]):e===tO?r+=tR.transform(t[n]):r+=t[n]}return r}}let tN=t=>"number"==typeof t?0:tR.test(t)?tR.getAnimatableNone(t):t,tU={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(tP)?.length||0)+(t.match(tj)?.length||0)>0},parse:tI,createTransformer:tz,getAnimatableNone:function(t){let e=tI(t);return tz(t)(e.map(tN))}},tq=new Set(["brightness","contrast","saturate","opacity"]);function t$(t){let[e,i]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;let[s]=i.match(tP)||[];if(!s)return t;let r=i.replace(s,""),n=+!!tq.has(e);return s!==i&&(n*=100),e+"("+n+r+")"}let tW=/\b([a-z-]*)\(.*?\)/gu,tQ={...tU,getAnimatableNone:t=>{let e=t.match(tW);return e?e.map(t$).join(" "):t}},tG={...I,transform:Math.round},tH={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,radius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,backgroundPositionX:W,backgroundPositionY:W,rotate:q,rotateX:q,rotateY:q,rotateZ:q,scale:N,scaleX:N,scaleY:N,scaleZ:N,skew:q,skewX:q,skewY:q,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:z,originX:H,originY:H,originZ:W,zIndex:tG,fillOpacity:z,strokeOpacity:z,numOctaves:tG},tK={...tH,color:tR,backgroundColor:tR,outlineColor:tR,fill:tR,stroke:tR,borderColor:tR,borderTopColor:tR,borderRightColor:tR,borderBottomColor:tR,borderLeftColor:tR,filter:tQ,WebkitFilter:tQ},tY=t=>tK[t];function t_(t,e){let i=tY(t);return i!==tQ&&(i=tU),i.getAnimatableNone?i.getAnimatableNone(e):void 0}let tX=new Set(["auto","none","0"]);class tZ extends tx{constructor(t,e,i,s,r){super(t,e,i,s,r,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:e,name:i}=this;if(!e||!e.current)return;super.readKeyframes();for(let i=0;i<t.length;i++){let s=t[i];if("string"==typeof s&&w(s=s.trim())){let r=function t(e,i,s=1){Z(s<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,n]=function(t){let e=tt.exec(t);if(!e)return[,];let[,i,s,r]=e;return[`--${i??s}`,r]}(e);if(!r)return;let o=window.getComputedStyle(i).getPropertyValue(r);if(o){let t=o.trim();return J(t)?parseFloat(t):t}return w(n)?t(n,i,s+1):n}(s,e.current);void 0!==r&&(t[i]=r),i===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!L.has(i)||2!==t.length)return;let[s,r]=t,n=_(s),o=_(r);if(n!==o)if(te(n)&&te(o))for(let e=0;e<t.length;e++){let i=t[e];"string"==typeof i&&(t[e]=parseFloat(i))}else tr[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:e}=this,i=[];for(let e=0;e<t.length;e++){var s;(null===t[e]||("number"==typeof(s=t[e])?0===s:null===s||"none"===s||"0"===s||tw(s)))&&i.push(e)}i.length&&function(t,e,i){let s,r=0;for(;r<t.length&&!s;){let e=t[r];"string"==typeof e&&!tX.has(e)&&tB(e).values.length&&(s=t[r]),r++}if(s&&i)for(let r of e)t[r]=t_(i,s)}(t,i,e)}measureInitialState(){let{element:t,unresolvedKeyframes:e,name:i}=this;if(!t||!t.current)return;"height"===i&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=tr[i](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;let s=e[e.length-1];void 0!==s&&t.getValue(i,s).jump(s,!1)}measureEndState(){let{element:t,name:e,unresolvedKeyframes:i}=this;if(!t||!t.current)return;let s=t.getValue(e);s&&s.jump(this.measuredOrigin,!1);let r=i.length-1,n=i[r];i[r]=tr[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==n&&void 0===this.finalKeyframe&&(this.finalKeyframe=n),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,i])=>{t.getValue(e).set(i)}),this.resolveNoneKeyframes()}}let tJ=t=>!!(t&&t.getVelocity);function t0(){s=void 0}let t1={now:()=>(void 0===s&&t1.set(tc.isProcessing||to.useManualTiming?tc.timestamp:performance.now()),s),set:t=>{s=t,queueMicrotask(t0)}};function t2(t,e){-1===t.indexOf(e)&&t.push(e)}function t5(t,e){let i=t.indexOf(e);i>-1&&t.splice(i,1)}class t3{constructor(){this.subscriptions=[]}add(t){return t2(this.subscriptions,t),()=>t5(this.subscriptions,t)}notify(t,e,i){let s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,i);else for(let r=0;r<s;r++){let s=this.subscriptions[r];s&&s(t,e,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}let t9=t=>!isNaN(parseFloat(t)),t4={current:void 0};class t6{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{let i=t1.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let t of this.dependents)t.dirty();e&&this.events.renderRequest?.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=t1.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=t9(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new t3);let i=this.events[t].add(e);return"change"===t?()=>{i(),th.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,i){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return t4.current&&t4.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var t;let e=t1.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;let i=Math.min(this.updatedAt-this.prevUpdatedAt,30);return t=parseFloat(this.current)-parseFloat(this.prevFrameValue),i?1e3/i*t:0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),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 t8(t,e){return new t6(t,e)}let t7=[...Y,tR,tU],et=t=>t7.find(K(t)),{schedule:ee}=tu(queueMicrotask,!1),ei={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"]},es={};for(let t in ei)es[t]={isEnabled:e=>ei[t].some(t=>!!e[t])};let er=()=>({translate:0,scale:1,origin:0,originPoint:0}),en=()=>({x:er(),y:er()}),eo=()=>({min:0,max:0}),ea=()=>({x:eo(),y:eo()}),el="undefined"!=typeof window,eu={current:null},eh={current:!1},ed=new WeakMap;function ec(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function ep(t){return"string"==typeof t||Array.isArray(t)}let em=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ef=["initial",...em];function eg(t){return ec(t.animate)||ef.some(e=>ep(t[e]))}function ey(t){return!!(eg(t)||t.variants)}function ev(t){let e=[{},{}];return t?.values.forEach((t,i)=>{e[0][i]=t.get(),e[1][i]=t.getVelocity()}),e}function eb(t,e,i,s){if("function"==typeof e){let[r,n]=ev(s);e=e(void 0!==i?i:t.custom,r,n)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){let[r,n]=ev(s);e=e(void 0!==i?i:t.custom,r,n)}return e}let ex=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ew{scrapeMotionValuesFromProps(t,e,i){return{}}constructor({parent:t,props:e,presenceContext:i,reducedMotionConfig:s,blockInitialAnimation:r,visualState:n},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=tx,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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 t=t1.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,th.render(this.render,!1,!0))};let{latestValues:a,renderState:l}=n;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.blockInitialAnimation=!!r,this.isControllingVariants=eg(e),this.isVariantNode=ey(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:u,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(let t in h){let e=h[t];void 0!==a[t]&&tJ(e)&&e.set(a[t],!1)}}mount(t){this.current=t,ed.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),eh.current||function(){if(eh.current=!0,el)if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=()=>eu.current=t.matches;t.addEventListener("change",e),e()}else eu.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||eu.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){for(let t in this.projection&&this.projection.unmount(),td(this.notifyUpdate),td(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this),this.events)this.events[t].clear();for(let t in this.features){let e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){let i;this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let s=o.has(t);s&&this.onBindTransform&&this.onBindTransform();let r=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&th.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),n=e.on("renderRequest",this.scheduleRender);window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{r(),n(),i&&i(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in es){let e=es[t];if(!e)continue;let{isEnabled:i,Feature:s}=e;if(!this.features[t]&&s&&i(this.props)&&(this.features[t]=new s(this)),this.features[t]){let e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ea()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<ex.length;e++){let i=ex[e];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);let s=t["on"+i];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=function(t,e,i){for(let s in e){let r=e[s],n=i[s];if(tJ(r))t.addValue(s,r);else if(tJ(n))t.addValue(s,t8(r,{owner:t}));else if(n!==r)if(t.hasValue(s)){let e=t.getValue(s);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{let e=t.getStaticValue(s);t.addValue(s,t8(void 0!==e?e:r,{owner:t}))}}for(let s in i)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){let e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){let i=this.values.get(t);e!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);let e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return void 0===i&&void 0!==e&&(i=t8(null===e?void 0:e,{owner:this}),this.addValue(t,i)),i}readValue(t,e){let i=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=i&&("string"==typeof i&&(J(i)||tw(i))?i=parseFloat(i):!et(i)&&tU.test(e)&&(i=t_(t,e)),this.setBaseTarget(t,tJ(i)?i.get():i)),tJ(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){let e,{initial:i}=this.props;if("string"==typeof i||"object"==typeof i){let s=eb(this.props,i,this.presenceContext?.custom);s&&(e=s[t])}if(i&&void 0!==e)return e;let s=this.getBaseTargetFromProps(this.props,t);return void 0===s||tJ(s)?void 0!==this.initialValues[t]&&void 0===e?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new t3),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){ee.render(this.render)}}class ek extends ew{constructor(){super(...arguments),this.KeyframeResolver=tZ}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:i}){delete e[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;tJ(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}let eP=(t,e)=>e&&"number"==typeof t?e.transform(t):t,eT={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},eS=n.length;function eA(t,e,i){let{style:s,vars:r,transformOrigin:a}=t,l=!1,u=!1;for(let t in e){let i=e[t];if(o.has(t)){l=!0;continue}if(b(t)){r[t]=i;continue}{let e=eP(i,tH[t]);t.startsWith("origin")?(u=!0,a[t]=e):s[t]=e}}if(!e.transform&&(l||i?s.transform=function(t,e,i){let s="",r=!0;for(let o=0;o<eS;o++){let a=n[o],l=t[a];if(void 0===l)continue;let u=!0;if(!(u="number"==typeof l?l===+!!a.startsWith("scale"):0===parseFloat(l))||i){let t=eP(l,tH[a]);if(!u){r=!1;let e=eT[a]||a;s+=`${e}(${t}) `}i&&(e[a]=t)}}return s=s.trim(),i?s=i(e,r?"":s):r&&(s="none"),s}(e,t.transform,i):s.transform&&(s.transform="none")),u){let{originX:t="50%",originY:e="50%",originZ:i=0}=a;s.transformOrigin=`${t} ${e} ${i}`}}function eM(t,{style:e,vars:i},s,r){let n,o=t.style;for(n in e)o[n]=e[n];for(n in r?.applyProjectionStyles(o,s),i)o.setProperty(n,i[n])}let eC={};function eE(t,{layout:e,layoutId:i}){return o.has(t)||t.startsWith("origin")||(e||void 0!==i)&&(!!eC[t]||"opacity"===t)}function eD(t,e,i){let{style:s}=t,r={};for(let n in s)(tJ(s[n])||e.style&&tJ(e.style[n])||eE(n,t)||i?.getValue(n)?.liveStyle!==void 0)&&(r[n]=s[n]);return r}class eV extends ek{constructor(){super(...arguments),this.type="html",this.renderInstance=eM}readValueFromInstance(t,e){if(o.has(e))return this.projection?.isProjecting?m(e):g(t,e);{let i=window.getComputedStyle(t),s=(b(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:e}){return O(t,e)}build(t,e,i){eA(t,e,i.transformTemplate)}scrapeMotionValuesFromProps(t,e,i){return eD(t,e,i)}}let eR=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ej={offset:"stroke-dashoffset",array:"stroke-dasharray"},eF={offset:"strokeDashoffset",array:"strokeDasharray"};function eO(t,{attrX:e,attrY:i,attrScale:s,pathLength:r,pathSpacing:n=1,pathOffset:o=0,...a},l,u,h){if(eA(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};let{attrs:d,style:c}=t;d.transform&&(c.transform=d.transform,delete d.transform),(c.transform||d.transformOrigin)&&(c.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),c.transform&&(c.transformBox=h?.transformBox??"fill-box",delete d.transformBox),void 0!==e&&(d.x=e),void 0!==i&&(d.y=i),void 0!==s&&(d.scale=s),void 0!==r&&function(t,e,i=1,s=0,r=!0){t.pathLength=1;let n=r?ej:eF;t[n.offset]=W.transform(-s);let o=W.transform(e),a=W.transform(i);t[n.array]=`${o} ${a}`}(d,r,n,o,!1)}let eL=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"]),eB=t=>"string"==typeof t&&"svg"===t.toLowerCase();function eI(t,e,i){let s=eD(t,e,i);for(let i in t)(tJ(t[i])||tJ(e[i]))&&(s[-1!==n.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]);return s}class ez extends ek{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ea}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(o.has(e)){let t=tY(e);return t&&t.default||0}return e=eL.has(e)?e:eR(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,i){return eI(t,e,i)}build(t,e,i){eO(t,e,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,e,i,s){for(let i in eM(t,e,void 0,s),e.attrs)t.setAttribute(eL.has(i)?i:eR(i),e.attrs[i])}mount(t){this.isSVGTag=eB(t.tagName),super.mount(t)}}let eN=["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 eU(t){if("string"!=typeof t||t.includes("-"));else if(eN.indexOf(t)>-1||/[A-Z]/u.test(t))return!0;return!1}var eq=i(4568);let e$=(0,r.createContext)({}),eW=(0,r.createContext)({strict:!1}),eQ=(0,r.createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),eG=(0,r.createContext)({});function eH(t){return Array.isArray(t)?t.join(" "):t}let eK=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function eY(t,e,i){for(let s in e)tJ(e[s])||eE(s,i)||(t[s]=e[s])}let e_=()=>({...eK(),attrs:{}}),eX=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","ignoreStrict","viewport"]);function eZ(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||eX.has(t)}let eJ=t=>!eZ(t);try{!function(t){"function"==typeof t&&(eJ=e=>e.startsWith("on")?!eZ(e):t(e))}(require("@emotion/is-prop-valid").default)}catch{}let e0=(0,r.createContext)(null);function e1(t){return tJ(t)?t.get():t}let e2=t=>(e,i)=>{let s=(0,r.useContext)(eG),n=(0,r.useContext)(e0),o=()=>(function({scrapeMotionValuesFromProps:t,createRenderState:e},i,s,r){return{latestValues:function(t,e,i,s){let r={},n=s(t,{});for(let t in n)r[t]=e1(n[t]);let{initial:o,animate:a}=t,l=eg(t),u=ey(t);e&&u&&!l&&!1!==t.inherit&&(void 0===o&&(o=e.initial),void 0===a&&(a=e.animate));let h=!!i&&!1===i.initial,d=(h=h||!1===o)?a:o;if(d&&"boolean"!=typeof d&&!ec(d)){let e=Array.isArray(d)?d:[d];for(let i=0;i<e.length;i++){let s=eb(t,e[i]);if(s){let{transitionEnd:t,transition:e,...i}=s;for(let t in i){let e=i[t];if(Array.isArray(e)){let t=h?e.length-1:0;e=e[t]}null!==e&&(r[t]=e)}for(let e in t)r[e]=t[e]}}}return r}(i,s,r,t),renderState:e()}})(t,e,s,n);return i?o():function(t){let e=(0,r.useRef)(null);return null===e.current&&(e.current=t()),e.current}(o)},e5=e2({scrapeMotionValuesFromProps:eD,createRenderState:eK}),e3=e2({scrapeMotionValuesFromProps:eI,createRenderState:e_}),e9=Symbol.for("motionComponentSymbol");function e4(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}let e6="data-"+eR("framerAppearId"),e8=(0,r.createContext)({}),e7=el?r.useLayoutEffect:r.useEffect;function it(t){var e,i;let{forwardMotionProps:s=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;n&&function(t){for(let e in t)es[e]={...es[e],...t[e]}}(n);let a=eU(t)?e3:e5;function l(e,i){var n,l,u;let h,d={...(0,r.useContext)(eQ),...e,layoutId:function(t){let{layoutId:e}=t,i=(0,r.useContext)(e$).id;return i&&void 0!==e?i+"-"+e:e}(e)},{isStatic:c}=d,p=function(t){let{initial:e,animate:i}=function(t,e){if(eg(t)){let{initial:e,animate:i}=t;return{initial:!1===e||ep(e)?e:void 0,animate:ep(i)?i:void 0}}return!1!==t.inherit?e:{}}(t,(0,r.useContext)(eG));return(0,r.useMemo)(()=>({initial:e,animate:i}),[eH(e),eH(i)])}(e),m=a(e,c);if(!c&&el){l=0,u=0,(0,r.useContext)(eW).strict;let e=function(t){let{drag:e,layout:i}=es;if(!e&&!i)return{};let s={...e,...i};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==i?void 0:i.isEnabled(t))?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}(d);h=e.MeasureLayout,p.visualElement=function(t,e,i,s,n){let{visualElement:o}=(0,r.useContext)(eG),a=(0,r.useContext)(eW),l=(0,r.useContext)(e0),u=(0,r.useContext)(eQ).reducedMotion,h=(0,r.useRef)(null);s=s||a.renderer,!h.current&&s&&(h.current=s(t,{visualState:e,parent:o,props:i,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u}));let d=h.current,c=(0,r.useContext)(e8);d&&!d.projection&&n&&("html"===d.type||"svg"===d.type)&&function(t,e,i,s){let{layoutId:r,layout:n,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:h}=e;t.projection=new i(t.latestValues,e["data-framer-portal-id"]?void 0:function t(e){if(e)return!1!==e.options.allowProjection?e.projection:t(e.parent)}(t.parent)),t.projection.setOptions({layoutId:r,layout:n,alwaysMeasureLayout:!!o||a&&e4(a),visualElement:t,animationType:"string"==typeof n?n:"both",initialPromotionConfig:s,crossfade:h,layoutScroll:l,layoutRoot:u})}(h.current,i,n,c);let p=(0,r.useRef)(!1);(0,r.useInsertionEffect)(()=>{d&&p.current&&d.update(i,l)});let m=i[e6],f=(0,r.useRef)(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return e7(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),f.current&&d.animationState&&d.animationState.animateChanges())}),(0,r.useEffect)(()=>{d&&(!f.current&&d.animationState&&d.animationState.animateChanges(),f.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),f.current=!1))}),d}(t,m,d,o,e.ProjectionNode)}return(0,eq.jsxs)(eG.Provider,{value:p,children:[h&&p.visualElement?(0,eq.jsx)(h,{visualElement:p.visualElement,...d}):null,function(t,e,i,{latestValues:s},n,o=!1){let a=(eU(t)?function(t,e,i,s){let n=(0,r.useMemo)(()=>{let i=e_();return eO(i,e,eB(s),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){let e={};eY(e,t.style,t),n.style={...e,...n.style}}return n}:function(t,e){let i={},s=function(t,e){let i=t.style||{},s={};return eY(s,i,t),Object.assign(s,function({transformTemplate:t},e){return(0,r.useMemo)(()=>{let i=eK();return eA(i,e,t),Object.assign({},i.vars,i.style)},[e])}(t,e)),s}(t,e);return t.drag&&!1!==t.dragListener&&(i.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=!0===t.drag?"none":`pan-${"x"===t.drag?"y":"x"}`),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=s,i})(e,s,n,t),l=function(t,e,i){let s={};for(let r in t)("values"!==r||"object"!=typeof t.values)&&(eJ(r)||!0===i&&eZ(r)||!e&&!eZ(r)||t.draggable&&r.startsWith("onDrag"))&&(s[r]=t[r]);return s}(e,"string"==typeof t,o),u=t!==r.Fragment?{...l,...a,ref:i}:{},{children:h}=e,d=(0,r.useMemo)(()=>tJ(h)?h.get():h,[h]);return(0,r.createElement)(t,{...u,children:d})}(t,e,(n=p.visualElement,(0,r.useCallback)(t=>{t&&m.onMount&&m.onMount(t),n&&(t?n.mount(t):n.unmount()),i&&("function"==typeof i?i(t):e4(i)&&(i.current=t))},[n])),m,c,s)]})}l.displayName="motion.".concat("string"==typeof t?t:"create(".concat(null!=(i=null!=(e=t.displayName)?e:t.name)?i:"",")"));let u=(0,r.forwardRef)(l);return u[e9]=t,u}function ie(t,e,i){let s=t.getProps();return eb(s,e,void 0!==i?i:s.custom,t)}function ii(t,e){return t?.[e]??t?.default??t}let is=t=>Array.isArray(t);function ir(t,e){let i=t.getValue("willChange");if(tJ(i)&&i.add)return i.add(e);if(!i&&to.WillChange){let i=new to.WillChange("auto");t.addValue("willChange",i),i.add(e)}}let io=(t,e)=>i=>e(t(i)),ia=(...t)=>t.reduce(io),il=t=>1e3*t,iu=t=>t/1e3,ih={layout:0,mainThread:0,waapi:0};function id(t,e,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?t+(e-t)*6*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function ic(t,e){return i=>i>0?e:t}let ip=(t,e,i)=>{let s=t*t,r=i*(e*e-s)+s;return r<0?0:Math.sqrt(r)},im=[tD,tE,tV],ig=t=>im.find(e=>e.test(t));function iy(t){let e=ig(t);if(X(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let i=e.parse(t);return e===tV&&(i=function({hue:t,saturation:e,lightness:i,alpha:s}){t/=360,i/=100;let r=0,n=0,o=0;if(e/=100){let s=i<.5?i*(1+e):i+e-i*e,a=2*i-s;r=id(a,s,t+1/3),n=id(a,s,t),o=id(a,s,t-1/3)}else r=n=o=i;return{red:Math.round(255*r),green:Math.round(255*n),blue:Math.round(255*o),alpha:s}}(i)),i}let iv=(t,e)=>{let i=iy(t),s=iy(e);if(!i||!s)return ic(t,e);let r={...i};return t=>(r.red=ip(i.red,s.red,t),r.green=ip(i.green,s.green,t),r.blue=ip(i.blue,s.blue,t),r.alpha=T(i.alpha,s.alpha,t),tE.transform(r))},ib=new Set(["none","hidden"]);function ix(t,e){return i=>T(t,e,i)}function iw(t){return"number"==typeof t?ix:"string"==typeof t?w(t)?ic:tR.test(t)?iv:iT:Array.isArray(t)?ik:"object"==typeof t?tR.test(t)?iv:iP:ic}function ik(t,e){let i=[...t],s=i.length,r=t.map((t,i)=>iw(t)(t,e[i]));return t=>{for(let e=0;e<s;e++)i[e]=r[e](t);return i}}function iP(t,e){let i={...t,...e},s={};for(let r in i)void 0!==t[r]&&void 0!==e[r]&&(s[r]=iw(t[r])(t[r],e[r]));return t=>{for(let e in s)i[e]=s[e](t);return i}}let iT=(t,e)=>{let i=tU.createTransformer(e),s=tB(t),r=tB(e);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?ib.has(t)&&!r.values.length||ib.has(e)&&!s.values.length?function(t,e){return ib.has(t)?i=>i<=0?t:e:i=>i>=1?e:t}(t,e):ia(ik(function(t,e){let i=[],s={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){let n=e.types[r],o=t.indexes[n][s[n]],a=t.values[o]??0;i[r]=a,s[n]++}return i}(s,r),r.values),i):(X(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),ic(t,e))};function iS(t,e,i){return"number"==typeof t&&"number"==typeof e&&"number"==typeof i?T(t,e,i):iw(t)(t,e)}let iA=t=>{let e=({timestamp:e})=>t(e);return{start:(t=!0)=>th.update(e,t),stop:()=>td(e),now:()=>tc.isProcessing?tc.timestamp:t1.now()}},iM=(t,e,i=10)=>{let s="",r=Math.max(Math.round(e/i),2);for(let e=0;e<r;e++)s+=Math.round(1e4*t(e/(r-1)))/1e4+", ";return`linear(${s.substring(0,s.length-2)})`};function iC(t){let e=0,i=t.next(e);for(;!i.done&&e<2e4;)e+=50,i=t.next(e);return e>=2e4?1/0:e}function iE(t,e,i){var s,r;let n=Math.max(e-5,0);return s=i-t(n),(r=e-n)?1e3/r*s:0}let iD={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 iV(t,e){return t*Math.sqrt(1-e*e)}let iR=["duration","bounce"],ij=["stiffness","damping","mass"];function iF(t,e){return e.some(e=>void 0!==t[e])}function iO(t=iD.visualDuration,e=iD.bounce){let i,s="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t,{restSpeed:r,restDelta:n}=s,o=s.keyframes[0],a=s.keyframes[s.keyframes.length-1],l={done:!1,value:o},{stiffness:u,damping:h,mass:d,duration:c,velocity:p,isResolvedFromDuration:m}=function(t){let e={velocity:iD.velocity,stiffness:iD.stiffness,damping:iD.damping,mass:iD.mass,isResolvedFromDuration:!1,...t};if(!iF(t,ij)&&iF(t,iR))if(t.visualDuration){let i=2*Math.PI/(1.2*t.visualDuration),s=i*i,r=2*B(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:iD.mass,stiffness:s,damping:r}}else{let i=function({duration:t=iD.duration,bounce:e=iD.bounce,velocity:i=iD.velocity,mass:s=iD.mass}){let r,n;X(t<=il(iD.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=B(iD.minDamping,iD.maxDamping,o),t=B(iD.minDuration,iD.maxDuration,iu(t)),o<1?(r=e=>{let s=e*o,r=s*t;return .001-(s-i)/iV(e,o)*Math.exp(-r)},n=e=>{let s=e*o*t,n=Math.pow(o,2)*Math.pow(e,2)*t,a=Math.exp(-s),l=iV(Math.pow(e,2),o);return(s*i+i-n)*a*(-r(e)+.001>0?-1:1)/l}):(r=e=>-.001+Math.exp(-e*t)*((e-i)*t+1),n=e=>t*t*(i-e)*Math.exp(-e*t));let a=function(t,e,i){let s=i;for(let i=1;i<12;i++)s-=t(s)/e(s);return s}(r,n,5/t);if(t=il(t),isNaN(a))return{stiffness:iD.stiffness,damping:iD.damping,duration:t};{let e=Math.pow(a,2)*s;return{stiffness:e,damping:2*o*Math.sqrt(s*e),duration:t}}}(t);(e={...e,...i,mass:iD.mass}).isResolvedFromDuration=!0}return e}({...s,velocity:-iu(s.velocity||0)}),f=p||0,g=h/(2*Math.sqrt(u*d)),y=a-o,v=iu(Math.sqrt(u/d)),b=5>Math.abs(y);if(r||(r=b?iD.restSpeed.granular:iD.restSpeed.default),n||(n=b?iD.restDelta.granular:iD.restDelta.default),g<1){let t=iV(v,g);i=e=>a-Math.exp(-g*v*e)*((f+g*v*y)/t*Math.sin(t*e)+y*Math.cos(t*e))}else if(1===g)i=t=>a-Math.exp(-v*t)*(y+(f+v*y)*t);else{let t=v*Math.sqrt(g*g-1);i=e=>{let i=Math.exp(-g*v*e),s=Math.min(t*e,300);return a-i*((f+g*v*y)*Math.sinh(s)+t*y*Math.cosh(s))/t}}let x={calculatedDuration:m&&c||null,next:t=>{let e=i(t);if(m)l.done=t>=c;else{let s=0===t?f:0;g<1&&(s=0===t?il(f):iE(i,t,e));let o=Math.abs(a-e)<=n;l.done=Math.abs(s)<=r&&o}return l.value=l.done?a:e,l},toString:()=>{let t=Math.min(iC(x),2e4),e=iM(e=>x.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return x}function iL({keyframes:t,velocity:e=0,power:i=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:n=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:h}){let d,c,p=t[0],m={done:!1,value:p},f=t=>void 0!==a&&t<a||void 0!==l&&t>l,g=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l,y=i*e,v=p+y,b=void 0===o?v:o(v);b!==v&&(y=b-p);let x=t=>-y*Math.exp(-t/s),w=t=>b+x(t),k=t=>{let e=x(t),i=w(t);m.done=Math.abs(e)<=u,m.value=m.done?b:i},P=t=>{f(m.value)&&(d=t,c=iO({keyframes:[m.value,g(m.value)],velocity:iE(w,t,m.value),damping:r,stiffness:n,restDelta:u,restSpeed:h}))};return P(0),{calculatedDuration:null,next:t=>{let e=!1;return(c||void 0!==d||(e=!0,k(t),P(t)),void 0!==d&&t>=d)?c.next(t-d):(e||k(t),m)}}}iO.applyToOptions=t=>{let e=function(t,e=100,i){let s=i({...t,keyframes:[0,e]}),r=Math.min(iC(s),2e4);return{type:"keyframes",ease:t=>s.next(r*t).value/e,duration:iu(r)}}(t,100,iO);return t.ease=e.ease,t.duration=il(e.duration),t.type="keyframes",t};let iB=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function iI(t,e,i,s){if(t===e&&i===s)return tn;let r=e=>(function(t,e,i,s,r){let n,o,a=0;do(n=iB(o=e+(i-e)/2,s,r)-t)>0?i=o:e=o;while(Math.abs(n)>1e-7&&++a<12);return o})(e,0,1,t,i);return t=>0===t||1===t?t:iB(r(t),e,s)}let iz=iI(.42,0,1,1),iN=iI(0,0,.58,1),iU=iI(.42,0,.58,1),iq=t=>Array.isArray(t)&&"number"!=typeof t[0],i$=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,iW=t=>e=>1-t(1-e),iQ=iI(.33,1.53,.69,.99),iG=iW(iQ),iH=i$(iG),iK=t=>(t*=2)<1?.5*iG(t):.5*(2-Math.pow(2,-10*(t-1))),iY=t=>1-Math.sin(Math.acos(t)),i_=iW(iY),iX=i$(iY),iZ=t=>Array.isArray(t)&&"number"==typeof t[0],iJ={linear:tn,easeIn:iz,easeInOut:iU,easeOut:iN,circIn:iY,circInOut:iX,circOut:i_,backIn:iG,backInOut:iH,backOut:iQ,anticipate:iK},i0=t=>"string"==typeof t,i1=t=>{if(iZ(t)){Z(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[e,i,s,r]=t;return iI(e,i,s,r)}return i0(t)?(Z(void 0!==iJ[t],`Invalid easing type '${t}'`,"invalid-easing-type"),iJ[t]):t},i2=(t,e,i)=>{let s=e-t;return 0===s?1:(i-t)/s};function i5({duration:t=300,keyframes:e,times:i,ease:s="easeInOut"}){var r;let n=iq(s)?s.map(i1):i1(s),o={done:!1,value:e[0]},a=function(t,e,{clamp:i=!0,ease:s,mixer:r}={}){let n=t.length;if(Z(n===e.length,"Both input and output ranges must be the same length","range-length"),1===n)return()=>e[0];if(2===n&&e[0]===e[1])return()=>e[1];let o=t[0]===t[1];t[0]>t[n-1]&&(t=[...t].reverse(),e=[...e].reverse());let a=function(t,e,i){let s=[],r=i||to.mix||iS,n=t.length-1;for(let i=0;i<n;i++){let n=r(t[i],t[i+1]);e&&(n=ia(Array.isArray(e)?e[i]||tn:e,n)),s.push(n)}return s}(e,s,r),l=a.length,u=i=>{if(o&&i<t[0])return e[0];let s=0;if(l>1)for(;s<t.length-2&&!(i<t[s+1]);s++);let r=i2(t[s],t[s+1],i);return a[s](r)};return i?e=>u(B(t[0],t[n-1],e)):u}((r=i&&i.length===e.length?i:function(t){let e=[0];return!function(t,e){let i=t[t.length-1];for(let s=1;s<=e;s++){let r=i2(0,e,s);t.push(T(i,1,r))}}(e,t.length-1),e}(e),r.map(e=>e*t)),e,{ease:Array.isArray(n)?n:e.map(()=>n||iU).splice(0,e.length-1)});return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}let i3=t=>null!==t;function i9(t,{repeat:e,repeatType:i="loop"},s,r=1){let n=t.filter(i3),o=r<0||e&&"loop"!==i&&e%2==1?0:n.length-1;return o&&void 0!==s?s:n[o]}let i4={decay:iL,inertia:iL,tween:i5,keyframes:i5,spring:iO};function i6(t){"string"==typeof t.type&&(t.type=i4[t.type])}class i8{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}let i7=t=>t/100;class st extends i8{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:t}=this.options;t&&t.updatedAt!==t1.now()&&this.tick(t1.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},ih.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){let{options:t}=this;i6(t);let{type:e=i5,repeat:i=0,repeatDelay:s=0,repeatType:r,velocity:n=0}=t,{keyframes:o}=t,a=e||i5;a!==i5&&"number"!=typeof o[0]&&(this.mixKeyframes=ia(i7,iS(o[0],o[1])),o=[0,100]);let l=a({...t,keyframes:o});"mirror"===r&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-n})),null===l.calculatedDuration&&(l.calculatedDuration=iC(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=l}updateTime(t){let e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){let{generator:i,totalDuration:s,mixKeyframes:r,mirroredGenerator:n,resolvedDuration:o,calculatedDuration:a}=this;if(null===this.startTime)return i.next(0);let{delay:l=0,keyframes:u,repeat:h,repeatType:d,repeatDelay:c,type:p,onUpdate:m,finalKeyframe:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);let g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let v=this.currentTime,b=i;if(h){let t=Math.min(this.currentTime,s)/o,e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--,(e=Math.min(e,h+1))%2&&("reverse"===d?(i=1-i,c&&(i-=c/o)):"mirror"===d&&(b=n)),v=B(0,1,i)*o}let x=y?{done:!1,value:u[0]}:b.next(v);r&&(x.value=r(x.value));let{done:w}=x;y||null===a||(w=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);let k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return k&&p!==iL&&(x.value=i9(u,this.options,f,this.speed)),m&&m(x.value),k&&this.finish(),x}then(t,e){return this.finished.then(t,e)}get duration(){return iu(this.calculatedDuration)}get time(){return iu(this.currentTime)}set time(t){t=il(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(t1.now());let e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=iu(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=iA,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();let i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=e??i),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(t1.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&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,ih.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}let se=t=>t.startsWith("--");function si(t){let e;return()=>(void 0===e&&(e=t()),e)}let ss=si(()=>void 0!==window.ScrollTimeline),sr={},sn=function(t,e){let i=si(t);return()=>sr[e]??i()}(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),so=([t,e,i,s])=>`cubic-bezier(${t}, ${e}, ${i}, ${s})`,sa={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:so([0,.65,.55,1]),circOut:so([.55,0,1,.45]),backIn:so([.31,.01,.66,-.59]),backOut:so([.33,1.53,.69,.99])};function sl(t){return"function"==typeof t&&"applyToOptions"in t}class su extends i8{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;let{element:e,name:i,keyframes:s,pseudoElement:r,allowFlatten:n=!1,finalKeyframe:o,onComplete:a}=t;this.isPseudoElement=!!r,this.allowFlatten=n,this.options=t,Z("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");let l=function({type:t,...e}){return sl(t)&&sn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=function(t,e,i,{delay:s=0,duration:r=300,repeat:n=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u){let h={[e]:i};l&&(h.offset=l);let d=function t(e,i){if(e)return"function"==typeof e?sn()?iM(e,i):"ease-out":iZ(e)?so(e):Array.isArray(e)?e.map(e=>t(e,i)||sa.easeOut):sa[e]}(a,r);Array.isArray(d)&&(h.easing=d),tl.value&&ih.waapi++;let c={delay:s,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:n+1,direction:"reverse"===o?"alternate":"normal"};u&&(c.pseudoElement=u);let p=t.animate(h,c);return tl.value&&p.finished.finally(()=>{ih.waapi--}),p}(e,i,s,l,r),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){let t=i9(s,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,i){se(e)?t.style.setProperty(e,i):t.style[e]=i}(e,i,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){return iu(Number(this.animation.effect?.getComputedTiming?.().duration||0))}get time(){return iu(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=il(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ss())?(this.animation.timeline=t,tn):e(this)}}let sh={anticipate:iK,backInOut:iH,circInOut:iX};class sd extends su{constructor(t){!function(t){"string"==typeof t.ease&&t.ease in sh&&(t.ease=sh[t.ease])}(t),i6(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:e,onUpdate:i,onComplete:s,element:r,...n}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);let o=new st({...n,autoplay:!1}),a=il(this.finishedTime??this.time);e.setWithVelocity(o.sample(a-10).value,o.sample(a).value,10),o.stop()}}let sc=(t,e)=>"zIndex"!==e&&!!("number"==typeof t||Array.isArray(t)||"string"==typeof t&&(tU.test(t)||"0"===t)&&!t.startsWith("url(")),sp=new Set(["opacity","clipPath","filter","transform"]),sm=si(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class sf extends i8{constructor({autoplay:t=!0,delay:e=0,type:i="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:n="loop",keyframes:o,name:a,motionValue:l,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=t1.now();let d={autoplay:t,delay:e,type:i,repeat:s,repeatDelay:r,repeatType:n,name:a,motionValue:l,element:u,...h},c=u?.KeyframeResolver||tx;this.keyframeResolver=new c(o,(t,e,i)=>this.onKeyframesResolved(t,e,d,!i),a,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,i,s){this.keyframeResolver=void 0;let{name:r,type:n,velocity:o,delay:a,isHandoff:l,onUpdate:u}=i;this.resolvedAt=t1.now(),!function(t,e,i,s){let r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;let n=t[t.length-1],o=sc(r,e),a=sc(n,e);return X(o===a,`You are trying to animate ${e} from "${r}" to "${n}". "${o?n:r}" is not an animatable value.`,"value-not-animatable"),!!o&&!!a&&(function(t){let e=t[0];if(1===t.length)return!0;for(let i=0;i<t.length;i++)if(t[i]!==e)return!0}(t)||("spring"===i||sl(i))&&s)}(t,r,n,o)&&((to.instantAnimations||!a)&&u?.(i9(t,i,e)),t[0]=t[t.length-1],i.duration=0,i.repeat=0);let h={startTime:s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...i,keyframes:t},d=!l&&function(t){let{motionValue:e,name:i,repeatDelay:s,repeatType:r,damping:n,type:o}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:a,transformTemplate:l}=e.owner.getProps();return sm()&&i&&sp.has(i)&&("transform"!==i||!l)&&!a&&!s&&"mirror"!==r&&0!==n&&"inertia"!==o}(h)?new sd({...h,element:h.motionValue.owner.current}):new st(h);d.finished.then(()=>this.notifyFinished()).catch(tn),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),ty=!0,tb(),tv(),ty=!1),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}let sg=t=>null!==t,sy={type:"spring",stiffness:500,damping:25,restSpeed:10},sv=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),sb={type:"keyframes",duration:.8},sx={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},sw=(t,{keyframes:e})=>e.length>2?sb:o.has(t)?t.startsWith("scale")?sv(e[1]):sy:sx,sk=(t,e,i,s={},r,n)=>o=>{let a=ii(s,t)||{},l=a.delay||s.delay||0,{elapsed:u=0}=s;u-=il(l);let h={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:n?void 0:r};!function({when:t,delay:e,delayChildren:i,staggerChildren:s,staggerDirection:r,repeat:n,repeatType:o,repeatDelay:a,from:l,elapsed:u,...h}){return!!Object.keys(h).length}(a)&&Object.assign(h,sw(t,h)),h.duration&&(h.duration=il(h.duration)),h.repeatDelay&&(h.repeatDelay=il(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if(!1!==h.type&&(0!==h.duration||h.repeatDelay)||(h.duration=0,0===h.delay&&(d=!0)),(to.instantAnimations||to.skipAnimations)&&(d=!0,h.duration=0,h.delay=0),h.allowFlatten=!a.type&&!a.ease,d&&!n&&void 0!==e.get()){let t=function(t,{repeat:e,repeatType:i="loop"},s){let r=t.filter(sg),n=e&&"loop"!==i&&e%2==1?0:r.length-1;return r[n]}(h.keyframes,a);if(void 0!==t)return void th.update(()=>{h.onUpdate(t),h.onComplete()})}return a.isSync?new st(h):new sf(h)};function sP(t,e,{delay:i=0,transitionOverride:s,type:r}={}){let{transition:n=t.getDefaultTransition(),transitionEnd:o,...a}=e;s&&(n=s);let l=[],u=r&&t.animationState&&t.animationState.getState()[r];for(let e in a){let s=t.getValue(e,t.latestValues[e]??null),r=a[e];if(void 0===r||u&&function({protectedKeys:t,needsAnimating:e},i){let s=t.hasOwnProperty(i)&&!0!==e[i];return e[i]=!1,s}(u,e))continue;let o={delay:i,...ii(n||{},e)},h=s.get();if(void 0!==h&&!s.isAnimating&&!Array.isArray(r)&&r===h&&!o.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){let i=t.props[e6];if(i){let t=window.MotionHandoffAnimation(i,e,th);null!==t&&(o.startTime=t,d=!0)}}ir(t,e),s.start(sk(e,s,r,t.shouldReduceMotion&&L.has(e)?{type:!1}:o,t,d));let c=s.animation;c&&l.push(c)}return o&&Promise.all(l).then(()=>{th.update(()=>{o&&function(t,e){let{transitionEnd:i={},transition:s={},...r}=ie(t,e)||{};for(let e in r={...r,...i}){var n;let i=is(n=r[e])?n[n.length-1]||0:n;t.hasValue(e)?t.getValue(e).set(i):t.addValue(e,t8(i))}}(t,o)})}),l}function sT(t,e,i={}){let s=ie(t,e,"exit"===i.type?t.presenceContext?.custom:void 0),{transition:r=t.getDefaultTransition()||{}}=s||{};i.transitionOverride&&(r=i.transitionOverride);let n=s?()=>Promise.all(sP(t,s,i)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(s=0)=>{let{delayChildren:n=0,staggerChildren:o,staggerDirection:a}=r;return function(t,e,i=0,s=0,r=0,n=1,o){let a=[],l=t.variantChildren.size,u=(l-1)*r,h="function"==typeof s,d=h?t=>s(t,l):1===n?(t=0)=>t*r:(t=0)=>u-t*r;return Array.from(t.variantChildren).sort(sS).forEach((t,r)=>{t.notify("AnimationStart",e),a.push(sT(t,e,{...o,delay:i+(h?0:s)+d(r)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(a)}(t,e,s,n,o,a,i)}:()=>Promise.resolve(),{when:a}=r;if(!a)return Promise.all([n(),o(i.delay)]);{let[t,e]="beforeChildren"===a?[n,o]:[o,n];return t().then(()=>e())}}function sS(t,e){return t.sortNodePosition(e)}function sA(t,e){if(!Array.isArray(e))return!1;let i=e.length;if(i!==t.length)return!1;for(let s=0;s<i;s++)if(e[s]!==t[s])return!1;return!0}let sM=ef.length,sC=[...em].reverse(),sE=em.length;function sD(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function sV(){return{animate:sD(!0),whileInView:sD(),whileHover:sD(),whileTap:sD(),whileDrag:sD(),whileFocus:sD(),exit:sD()}}class sR{constructor(t){this.isMounted=!1,this.node=t}update(){}}class sj extends sR{constructor(t){super(t),t.animationState||(t.animationState=function(t){let e=e=>Promise.all(e.map(({animation:e,options:i})=>(function(t,e,i={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e))s=Promise.all(e.map(e=>sT(t,e,i)));else if("string"==typeof e)s=sT(t,e,i);else{let r="function"==typeof e?ie(t,e,i.custom):e;s=Promise.all(sP(t,r,i))}return s.then(()=>{t.notify("AnimationComplete",e)})})(t,e,i))),i=sV(),s=!0,r=e=>(i,s)=>{let r=ie(t,s,"exit"===e?t.presenceContext?.custom:void 0);if(r){let{transition:t,transitionEnd:e,...s}=r;i={...i,...s,...e}}return i};function n(n){let{props:o}=t,a=function t(e){if(!e)return;if(!e.isControllingVariants){let i=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(i.initial=e.props.initial),i}let i={};for(let t=0;t<sM;t++){let s=ef[t],r=e.props[s];(ep(r)||!1===r)&&(i[s]=r)}return i}(t.parent)||{},l=[],u=new Set,h={},d=1/0;for(let e=0;e<sE;e++){var c,p;let m=sC[e],f=i[m],g=void 0!==o[m]?o[m]:a[m],y=ep(g),v=m===n?f.isActive:null;!1===v&&(d=e);let b=g===a[m]&&g!==o[m]&&y;if(b&&s&&t.manuallyAnimateOnMount&&(b=!1),f.protectedKeys={...h},!f.isActive&&null===v||!g&&!f.prevProp||ec(g)||"boolean"==typeof g)continue;let x=(c=f.prevProp,"string"==typeof(p=g)?p!==c:!!Array.isArray(p)&&!sA(p,c)),w=x||m===n&&f.isActive&&!b&&y||e>d&&y,k=!1,P=Array.isArray(g)?g:[g],T=P.reduce(r(m),{});!1===v&&(T={});let{prevResolvedValues:S={}}=f,A={...S,...T},M=e=>{w=!0,u.has(e)&&(k=!0,u.delete(e)),f.needsAnimating[e]=!0;let i=t.getValue(e);i&&(i.liveStyle=!1)};for(let t in A){let e=T[t],i=S[t];if(h.hasOwnProperty(t))continue;let s=!1;(is(e)&&is(i)?sA(e,i):e===i)?void 0!==e&&u.has(t)?M(t):f.protectedKeys[t]=!0:null!=e?M(t):u.add(t)}f.prevProp=g,f.prevResolvedValues=T,f.isActive&&(h={...h,...T}),s&&t.blockInitialAnimation&&(w=!1);let C=!(b&&x)||k;w&&C&&l.push(...P.map(t=>({animation:t,options:{type:m}})))}if(u.size){let e={};if("boolean"!=typeof o.initial){let i=ie(t,Array.isArray(o.initial)?o.initial[0]:o.initial);i&&i.transition&&(e.transition=i.transition)}u.forEach(i=>{let s=t.getBaseTarget(i),r=t.getValue(i);r&&(r.liveStyle=!0),e[i]=s??null}),l.push({animation:e})}let m=!!l.length;return s&&(!1===o.initial||o.initial===o.animate)&&!t.manuallyAnimateOnMount&&(m=!1),s=!1,m?e(l):Promise.resolve()}return{animateChanges:n,setActive:function(e,s){if(i[e].isActive===s)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,s)),i[e].isActive=s;let r=n(e);for(let t in i)i[t].protectedKeys={};return r},setAnimateFunction:function(i){e=i(t)},getState:()=>i,reset:()=>{i=sV(),s=!0}}}(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();ec(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let sF=0;class sO extends sR{constructor(){super(...arguments),this.id=sF++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;let s=this.node.animationState.setActive("exit",!t);e&&!t&&s.then(()=>{e(this.id)})}mount(){let{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}let sL={x:!1,y:!1};function sB(t,e,i,s={passive:!0}){return t.addEventListener(e,i,s),()=>t.removeEventListener(e,i)}let sI=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function sz(t){return{point:{x:t.pageX,y:t.pageY}}}let sN=t=>e=>sI(e)&&t(e,sz(e));function sU(t,e,i,s){return sB(t,e,sN(i),s)}function sq(t){return t.max-t.min}function s$(t,e,i,s=.5){t.origin=s,t.originPoint=T(e.min,e.max,t.origin),t.scale=sq(i)/sq(e),t.translate=T(i.min,i.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function sW(t,e,i,s){s$(t.x,e.x,i.x,s?s.originX:void 0),s$(t.y,e.y,i.y,s?s.originY:void 0)}function sQ(t,e,i){t.min=i.min+e.min,t.max=t.min+sq(e)}function sG(t,e,i){t.min=e.min-i.min,t.max=t.min+sq(e)}function sH(t,e,i){sG(t.x,e.x,i.x),sG(t.y,e.y,i.y)}function sK(t){return[t("x"),t("y")]}let sY=({current:t})=>t?t.ownerDocument.defaultView:null,s_=(t,e)=>Math.abs(t-e);class sX{constructor(t,e,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:r=!1,distanceThreshold:n=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let t=s0(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,i=function(t,e){return Math.sqrt(s_(t.x,e.x)**2+s_(t.y,e.y)**2)}(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!i)return;let{point:s}=t,{timestamp:r}=tc;this.history.push({...s,timestamp:r});let{onStart:n,onMove:o}=this.handlers;e||(n&&n(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=sZ(e,this.transformPagePoint),th.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();let{onEnd:i,onSessionEnd:s,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let n=s0("pointercancel"===t.type?this.lastMoveEventInfo:sZ(e,this.transformPagePoint),this.history);this.startEvent&&i&&i(t,n),s&&s(t,n)},!sI(t))return;this.dragSnapToOrigin=r,this.handlers=e,this.transformPagePoint=i,this.distanceThreshold=n,this.contextWindow=s||window;let o=sZ(sz(t),this.transformPagePoint),{point:a}=o,{timestamp:l}=tc;this.history=[{...a,timestamp:l}];let{onSessionStart:u}=e;u&&u(t,s0(o,this.history)),this.removeListeners=ia(sU(this.contextWindow,"pointermove",this.handlePointerMove),sU(this.contextWindow,"pointerup",this.handlePointerUp),sU(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),td(this.updatePoint)}}function sZ(t,e){return e?{point:e(t.point)}:t}function sJ(t,e){return{x:t.x-e.x,y:t.y-e.y}}function s0({point:t},e){return{point:t,delta:sJ(t,s1(e)),offset:sJ(t,e[0]),velocity:function(t,e){if(t.length<2)return{x:0,y:0};let i=t.length-1,s=null,r=s1(t);for(;i>=0&&(s=t[i],!(r.timestamp-s.timestamp>il(.1)));)i--;if(!s)return{x:0,y:0};let n=iu(r.timestamp-s.timestamp);if(0===n)return{x:0,y:0};let o={x:(r.x-s.x)/n,y:(r.y-s.y)/n};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}(e,.1)}}function s1(t){return t[t.length-1]}function s2(t,e,i){return{min:void 0!==e?t.min+e:void 0,max:void 0!==i?t.max+i-(t.max-t.min):void 0}}function s5(t,e){let i=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([i,s]=[s,i]),{min:i,max:s}}function s3(t,e,i){return{min:s9(t,e),max:s9(t,i)}}function s9(t,e){return"number"==typeof t?t:t[e]||0}let s4=new WeakMap;class s6{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ea(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:e=!1,distanceThreshold:i}={}){let{presenceContext:s}=this.visualElement;if(s&&!1===s.isPresent)return;let{dragSnapToOrigin:r}=this.getProps();this.panSession=new sX(t,{onSessionStart:t=>{let{dragSnapToOrigin:i}=this.getProps();i?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(sz(t).point)},onStart:(t,e)=>{let{drag:i,dragPropagation:s,onDragStart:r}=this.getProps();if(i&&!s&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(t){if("x"===t||"y"===t)if(sL[t])return null;else return sL[t]=!0,()=>{sL[t]=!1};return sL.x||sL.y?null:(sL.x=sL.y=!0,()=>{sL.x=sL.y=!1})}(i),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sK(t=>{let e=this.getAxisMotionValue(t).get()||0;if($.test(e)){let{projection:i}=this.visualElement;if(i&&i.layout){let s=i.layout.layoutBox[t];s&&(e=sq(s)*(parseFloat(e)/100))}}this.originPoint[t]=e}),r&&th.postRender(()=>r(t,e)),ir(this.visualElement,"transform");let{animationState:n}=this.visualElement;n&&n.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;let{dragPropagation:i,dragDirectionLock:s,onDirectionLock:r,onDrag:n}=this.getProps();if(!i&&!this.openDragLock)return;let{offset:o}=e;if(s&&null===this.currentDirection){this.currentDirection=function(t,e=10){let i=null;return Math.abs(t.y)>e?i="y":Math.abs(t.x)>e&&(i="x"),i}(o),null!==this.currentDirection&&r&&r(this.currentDirection);return}this.updateAxis("x",e.point,o),this.updateAxis("y",e.point,o),this.visualElement.render(),n&&n(t,e)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>sK(t=>"paused"===this.getAnimationState(t)&&this.getAxisMotionValue(t).animation?.play())},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,distanceThreshold:i,contextWindow:sY(this.visualElement)})}stop(t,e){let i=t||this.latestPointerEvent,s=e||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!s||!i)return;let{velocity:n}=s;this.startAnimation(n);let{onDragEnd:o}=this.getProps();o&&th.postRender(()=>o(i,s))}cancel(){this.isDragging=!1;let{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,i){let{drag:s}=this.getProps();if(!i||!s8(t,s,this.currentDirection))return;let r=this.getAxisMotionValue(t),n=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(n=function(t,{min:e,max:i},s){return void 0!==e&&t<e?t=s?T(e,t,s.min):Math.max(t,e):void 0!==i&&t>i&&(t=s?T(i,t,s.max):Math.min(t,i)),t}(n,this.constraints[t],this.elastic[t])),r.set(n)}resolveConstraints(){let{dragConstraints:t,dragElastic:e}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&e4(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=function(t,{top:e,left:i,bottom:s,right:r}){return{x:s2(t.x,i,r),y:s2(t.y,e,s)}}(i.layoutBox,t):this.constraints=!1,this.elastic=function(t=.35){return!1===t?t=0:!0===t&&(t=.35),{x:s3(t,"left","right"),y:s3(t,"top","bottom")}}(e),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&sK(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){let i={};return void 0!==e.min&&(i.min=e.min-t.min),void 0!==e.max&&(i.max=e.max-t.min),i}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){var t;let{dragConstraints:e,onMeasureDragConstraints:i}=this.getProps();if(!e||!e4(e))return!1;let s=e.current;Z(null!==s,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let n=function(t,e,i){let s=O(t,i),{scroll:r}=e;return r&&(R(s.x,r.offset.x),R(s.y,r.offset.y)),s}(s,r.root,this.visualElement.getTransformPagePoint()),o=(t=r.layout.layoutBox,{x:s5(t.x,n.x),y:s5(t.y,n.y)});if(i){let t=i(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=P(t))}return o}startAnimation(t){let{drag:e,dragMomentum:i,dragElastic:s,dragTransition:r,dragSnapToOrigin:n,onDragTransitionEnd:o}=this.getProps(),a=this.constraints||{};return Promise.all(sK(o=>{if(!s8(o,e,this.currentDirection))return;let l=a&&a[o]||{};n&&(l={min:0,max:0});let u={type:"inertia",velocity:i?t[o]:0,bounceStiffness:s?200:1e6,bounceDamping:s?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...r,...l};return this.startAxisValueAnimation(o,u)})).then(o)}startAxisValueAnimation(t,e){let i=this.getAxisMotionValue(t);return ir(this.visualElement,t),i.start(sk(t,i,0,e,this.visualElement,!1))}stopAnimation(){sK(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){sK(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){let e=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps();return i[e]||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){sK(e=>{let{drag:i}=this.getProps();if(!s8(e,i,this.currentDirection))return;let{projection:s}=this.visualElement,r=this.getAxisMotionValue(e);if(s&&s.layout){let{min:i,max:n}=s.layout.layoutBox[e];r.set(t[e]-T(i,n,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:e}=this.getProps(),{projection:i}=this.visualElement;if(!e4(e)||!i||!this.constraints)return;this.stopAnimation();let s={x:0,y:0};sK(t=>{let e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){let i=e.get();s[t]=function(t,e){let i=.5,s=sq(t),r=sq(e);return r>s?i=i2(e.min,e.max-s,t.min):s>r&&(i=i2(t.min,t.max-r,e.min)),B(0,1,i)}({min:i,max:i},this.constraints[t])}});let{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),sK(e=>{if(!s8(e,t,null))return;let i=this.getAxisMotionValue(e),{min:r,max:n}=this.constraints[e];i.set(T(r,n,s[e]))})}addListeners(){if(!this.visualElement.current)return;s4.set(this.visualElement,this);let t=sU(this.visualElement.current,"pointerdown",t=>{let{drag:e,dragListener:i=!0}=this.getProps();e&&i&&this.start(t)}),e=()=>{let{dragConstraints:t}=this.getProps();e4(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",e);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),th.read(e);let r=sB(window,"resize",()=>this.scalePositionWithinConstraints()),n=i.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(sK(e=>{let i=this.getAxisMotionValue(e);i&&(this.originPoint[e]+=t[e].translate,i.set(i.get()+t[e].translate))}),this.visualElement.render())});return()=>{r(),t(),s(),n&&n()}}getProps(){let t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:r=!1,dragElastic:n=.35,dragMomentum:o=!0}=t;return{...t,drag:e,dragDirectionLock:i,dragPropagation:s,dragConstraints:r,dragElastic:n,dragMomentum:o}}}function s8(t,e,i){return(!0===e||e===t)&&(null===i||i===t)}class s7 extends sR{constructor(t){super(t),this.removeGroupControls=tn,this.removeListeners=tn,this.controls=new s6(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tn}unmount(){this.removeGroupControls(),this.removeListeners()}}let rt=t=>(e,i)=>{t&&th.postRender(()=>t(e,i))};class re extends sR{constructor(){super(...arguments),this.removePointerDownListener=tn}onPointerDown(t){this.session=new sX(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:sY(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:rt(t),onStart:rt(e),onMove:i,onEnd:(t,e)=>{delete this.session,s&&th.postRender(()=>s(t,e))}}}mount(){this.removePointerDownListener=sU(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let ri={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function rs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}let rr={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t)if(!W.test(t))return t;else t=parseFloat(t);let i=rs(t,e.target.x),s=rs(t,e.target.y);return`${i}% ${s}%`}},rn=!1;class ro extends r.Component{componentDidMount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:s}=this.props,{projection:r}=t;for(let t in rl)eC[t]=rl[t],b(t)&&(eC[t].isCSSVariable=!0);r&&(e.group&&e.group.add(r),i&&i.register&&s&&i.register(r),rn&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),ri.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:e,visualElement:i,drag:s,isPresent:r}=this.props,{projection:n}=i;return n&&(n.isPresent=r,rn=!0,s||t.layoutDependency!==e||void 0===e||t.isPresent!==r?n.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?n.promote():n.relegate()||th.postRender(()=>{let t=n.getStack();t&&t.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ee.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ra(t){let[e,i]=function(t=!0){let e=(0,r.useContext)(e0);if(null===e)return[!0,null];let{isPresent:i,onExitComplete:s,register:n}=e,o=(0,r.useId)();(0,r.useEffect)(()=>{if(t)return n(o)},[t]);let a=(0,r.useCallback)(()=>t&&s&&s(o),[o,s,t]);return!i&&s?[!1,a]:[!0]}(),s=(0,r.useContext)(e$);return(0,eq.jsx)(ro,{...t,layoutGroup:s,switchLayoutGroup:(0,r.useContext)(e8),isPresent:e,safeToRemove:i})}let rl={borderRadius:{...rr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:rr,borderTopRightRadius:rr,borderBottomLeftRadius:rr,borderBottomRightRadius:rr,boxShadow:{correct:(t,{treeScale:e,projectionDelta:i})=>{let s=tU.parse(t);if(s.length>5)return t;let r=tU.createTransformer(t),n=+("number"!=typeof s[0]),o=i.x.scale*e.x,a=i.y.scale*e.y;s[0+n]/=o,s[1+n]/=a;let l=T(o,a,.5);return"number"==typeof s[2+n]&&(s[2+n]/=l),"number"==typeof s[3+n]&&(s[3+n]/=l),r(s)}}};function ru(t){return"object"==typeof t&&null!==t}function rh(t){return ru(t)&&"ownerSVGElement"in t}let rd=(t,e)=>t.depth-e.depth;class rc{constructor(){this.children=[],this.isDirty=!1}add(t){t2(this.children,t),this.isDirty=!0}remove(t){t5(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(rd),this.isDirty=!1,this.children.forEach(t)}}let rp=["TopLeft","TopRight","BottomLeft","BottomRight"],rm=rp.length,rf=t=>"string"==typeof t?parseFloat(t):t,rg=t=>"number"==typeof t||W.test(t);function ry(t,e){return void 0!==t[e]?t[e]:t.borderRadius}let rv=rx(0,.5,i_),rb=rx(.5,.95,tn);function rx(t,e,i){return s=>s<t?0:s>e?1:i(i2(t,e,s))}function rw(t,e){t.min=e.min,t.max=e.max}function rk(t,e){rw(t.x,e.x),rw(t.y,e.y)}function rP(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function rT(t,e,i,s,r){return t-=e,t=s+1/i*(t-s),void 0!==r&&(t=s+1/r*(t-s)),t}function rS(t,e,[i,s,r],n,o){!function(t,e=0,i=1,s=.5,r,n=t,o=t){if($.test(e)&&(e=parseFloat(e),e=T(o.min,o.max,e/100)-o.min),"number"!=typeof e)return;let a=T(n.min,n.max,s);t===n&&(a-=e),t.min=rT(t.min,e,i,a,r),t.max=rT(t.max,e,i,a,r)}(t,e[i],e[s],e[r],e.scale,n,o)}let rA=["x","scaleX","originX"],rM=["y","scaleY","originY"];function rC(t,e,i,s){rS(t.x,e,rA,i?i.x:void 0,s?s.x:void 0),rS(t.y,e,rM,i?i.y:void 0,s?s.y:void 0)}function rE(t){return 0===t.translate&&1===t.scale}function rD(t){return rE(t.x)&&rE(t.y)}function rV(t,e){return t.min===e.min&&t.max===e.max}function rR(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function rj(t,e){return rR(t.x,e.x)&&rR(t.y,e.y)}function rF(t){return sq(t.x)/sq(t.y)}function rO(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class rL{constructor(){this.members=[]}add(t){t2(this.members,t),t.scheduleRender()}remove(t){if(t5(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){let e,i=this.members.findIndex(e=>t===e);if(0===i)return!1;for(let t=i;t>=0;t--){let i=this.members[t];if(!1!==i.isPresent){e=i;break}}return!!e&&(this.promote(e),!0)}promote(t,e){let i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,e&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:s}=t.options;!1===s&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:e,resumingFrom:i}=t;e.onExitComplete&&e.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}let rB={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},rI=["","X","Y","Z"],rz=0;function rN(t,e,i,s){let{latestValues:r}=e;r[t]&&(i[t]=r[t],e.setStaticValue(t,0),s&&(s[t]=0))}function rU({attachResizeListener:t,defaultParent:e,measureScroll:i,checkIsScrollRoot:s,resetTransform:r}){return class{constructor(t={},i=e?.()){this.id=rz++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,tl.value&&(rB.nodes=rB.calculatedTargetDeltas=rB.calculatedProjections=0),this.nodes.forEach(rW),this.nodes.forEach(rX),this.nodes.forEach(rZ),this.nodes.forEach(rQ),tl.addProjectionMetrics&&tl.addProjectionMetrics(rB)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new rc)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new t3),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){let i=this.eventHandlers.get(t);i&&i.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=rh(e)&&!(rh(e)&&"svg"===e.tagName),this.instance=e;let{layoutId:i,layout:s,visualElement:r}=this.options;if(r&&!r.current&&r.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(s||i)&&(this.isLayoutDirty=!0),t){let i,s=0,r=()=>this.root.updateBlockedByResize=!1;th.read(()=>{s=window.innerWidth}),t(e,()=>{let t=window.innerWidth;t!==s&&(s=t,this.root.updateBlockedByResize=!0,i&&i(),i=function(t,e){let i=t1.now(),s=({timestamp:r})=>{let n=r-i;n>=250&&(td(s),t(n-e))};return th.setup(s,!0),()=>td(s)}(r,250),ri.hasAnimatedSinceResize&&(ri.hasAnimatedSinceResize=!1,this.nodes.forEach(r_)))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&r&&(i||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:s})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let n=this.options.transition||r.getDefaultTransition()||r3,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=r.getProps(),l=!this.targetLayout||!rj(this.targetLayout,s),u=!e&&i;if(this.options.layoutRoot||this.resumeFrom||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let e={...ii(n,"layout"),onPlay:o,onComplete:a};(r.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,u)}else e||r_(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=s})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),td(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(rJ),this.animationId++)}getTransformTemplate(){let{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function t(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:i}=e.options;if(!i)return;let s=i.props[e6];if(window.MotionHasOptimisedAnimation(s,"transform")){let{layout:t,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",th,!(t||i))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&t(r)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){let e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}let{layoutId:e,layout:i}=this.options;if(void 0===e&&!i)return;let s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(rH);return}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(rK);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(rY),this.nodes.forEach(rq),this.nodes.forEach(r$)):this.nodes.forEach(rK),this.clearAllSnapshots();let t=t1.now();tc.delta=B(0,1e3/60,t-tc.timestamp),tc.timestamp=t,tc.isProcessing=!0,tp.update.process(tc),tp.preRender.process(tc),tp.render.process(tc),tc.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ee.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(rG),this.sharedNodes.forEach(r0)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,th.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){th.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||sq(this.snapshot.measuredBox.x)||sq(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 t=0;t<this.path.length;t++)this.path[t].updateScroll();let t=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ea(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){let e=s(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!r)return;let t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!rD(this.projectionDelta),i=this.getTransformTemplate(),s=i?i(this.latestValues,""):void 0,n=s!==this.prevTransformTemplateValue;t&&this.instance&&(e||M(this.latestValues)||n)&&(r(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){var e;let i=this.measurePageBox(),s=this.removeElementScroll(i);return t&&(s=this.removeTransform(s)),r6((e=s).x),r6(e.y),{animationId:this.root.animationId,measuredBox:i,layoutBox:s,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:t}=this.options;if(!t)return ea();let e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(r7))){let{scroll:t}=this.root;t&&(R(e.x,t.offset.x),R(e.y,t.offset.y))}return e}removeElementScroll(t){let e=ea();if(rk(e,t),this.scroll?.wasRoot)return e;for(let i=0;i<this.path.length;i++){let s=this.path[i],{scroll:r,options:n}=s;s!==this.root&&r&&n.layoutScroll&&(r.wasRoot&&rk(e,t),R(e.x,r.offset.x),R(e.y,r.offset.y))}return e}applyTransform(t,e=!1){let i=ea();rk(i,t);for(let t=0;t<this.path.length;t++){let s=this.path[t];!e&&s.options.layoutScroll&&s.scroll&&s!==s.root&&F(i,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),M(s.latestValues)&&F(i,s.latestValues)}return M(this.latestValues)&&F(i,this.latestValues),i}removeTransform(t){let e=ea();rk(e,t);for(let t=0;t<this.path.length;t++){let i=this.path[t];if(!i.instance||!M(i.latestValues))continue;A(i.latestValues)&&i.updateSnapshot();let s=ea();rk(s,i.measurePageBox()),rC(e,i.latestValues,i.snapshot?i.snapshot.layoutBox:void 0,s)}return M(this.latestValues)&&rC(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.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!==tc.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){let e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);let i=!!this.resumingFrom||this!==e;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:s,layoutId:r}=this.options;if(this.layout&&(s||r)){if(this.resolvedRelativeTargetAt=tc.timestamp,!this.targetDelta&&!this.relativeTarget){let t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ea(),this.relativeTargetOrigin=ea(),sH(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),rk(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){if(this.target||(this.target=ea(),this.targetWithTransforms=ea()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var n,o,a;this.forceRelativeParentToResolveTarget(),n=this.target,o=this.relativeTarget,a=this.relativeParent.target,sQ(n.x,o.x,a.x),sQ(n.y,o.y,a.y)}else this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rk(this.target,this.layout.layoutBox),V(this.target,this.targetDelta)):rk(this.target,this.layout.layoutBox);if(this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let t=this.getClosestProjectingParent();t&&!!t.resumingFrom==!!this.resumingFrom&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ea(),this.relativeTargetOrigin=ea(),sH(this.relativeTargetOrigin,this.target,t.target),rk(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}tl.value&&rB.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||A(this.parent.latestValues)||C(this.parent.latestValues)))if(this.parent.isProjecting())return this.parent;else return this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){let t=this.getLead(),e=!!this.resumingFrom||this!==t,i=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(i=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===tc.timestamp&&(i=!1),i)return;let{layout:s,layoutId:r}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(s||r))return;rk(this.layoutCorrected,this.layout.layoutBox);let n=this.treeScale.x,o=this.treeScale.y;!function(t,e,i,s=!1){let r,n,o=i.length;if(o){e.x=e.y=1;for(let a=0;a<o;a++){n=(r=i[a]).projectionDelta;let{visualElement:o}=r.options;(!o||!o.props.style||"contents"!==o.props.style.display)&&(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&F(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),n&&(e.x*=n.x.scale,e.y*=n.y.scale,V(t,n)),s&&M(r.latestValues)&&F(t,r.latestValues))}e.x<1.0000000000001&&e.x>.999999999999&&(e.x=1),e.y<1.0000000000001&&e.y>.999999999999&&(e.y=1)}}(this.layoutCorrected,this.treeScale,this.path,e),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms=ea());let{target:a}=t;if(!a){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(rP(this.prevProjectionDelta.x,this.projectionDelta.x),rP(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),sW(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===n&&this.treeScale.y===o&&rO(this.projectionDelta.x,this.prevProjectionDelta.x)&&rO(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),tl.value&&rB.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){let t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=en(),this.projectionDelta=en(),this.projectionDeltaWithTransform=en()}setAnimationOrigin(t,e=!1){let i,s=this.snapshot,r=s?s.latestValues:{},n={...this.latestValues},o=en();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;let a=ea(),l=(s?s.source:void 0)!==(this.layout?this.layout.source:void 0),u=this.getStack(),h=!u||u.members.length<=1,d=!!(l&&!h&&!0===this.options.crossfade&&!this.path.some(r5));this.animationProgress=0,this.mixTargetDelta=e=>{let s=e/1e3;if(r1(o.x,t.x,s),r1(o.y,t.y,s),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var u,c,p,m,f,g;sH(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=a,g=s,r2(p.x,m.x,f.x,g),r2(p.y,m.y,f.y,g),i&&(u=this.relativeTarget,c=i,rV(u.x,c.x)&&rV(u.y,c.y))&&(this.isProjectionDirty=!1),i||(i=ea()),rk(i,this.relativeTarget)}l&&(this.animationValues=n,function(t,e,i,s,r,n){r?(t.opacity=T(0,i.opacity??1,rv(s)),t.opacityExit=T(e.opacity??1,0,rb(s))):n&&(t.opacity=T(e.opacity??1,i.opacity??1,s));for(let r=0;r<rm;r++){let n=`border${rp[r]}Radius`,o=ry(e,n),a=ry(i,n);(void 0!==o||void 0!==a)&&(o||(o=0),a||(a=0),0===o||0===a||rg(o)===rg(a)?(t[n]=Math.max(T(rf(o),rf(a),s),0),($.test(a)||$.test(o))&&(t[n]+="%")):t[n]=a)}(e.rotate||i.rotate)&&(t.rotate=T(e.rotate||0,i.rotate||0,s))}(n,r,this.latestValues,s,d,h)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=s},this.mixTargetDelta(1e3*!!this.options.layoutRoot)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(td(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=th.update(()=>{ri.hasAnimatedSinceResize=!0,ih.layout++,this.motionValue||(this.motionValue=t8(0)),this.currentAnimation=function(t,e,i){let s=tJ(t)?t:t8(t);return s.start(sk("",s,e,i)),s.animation}(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{ih.layout--},onComplete:()=>{ih.layout--,t.onComplete&&t.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 t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let t=this.getLead(),{targetWithTransforms:e,target:i,layout:s,latestValues:r}=t;if(e&&i&&s){if(this!==t&&this.layout&&s&&r8(this.options.animationType,this.layout.layoutBox,s.layoutBox)){i=this.target||ea();let e=sq(this.layout.layoutBox.x);i.x.min=t.target.x.min,i.x.max=i.x.min+e;let s=sq(this.layout.layoutBox.y);i.y.min=t.target.y.min,i.y.max=i.y.min+s}rk(e,i),F(e,r),sW(this.projectionDeltaWithTransform,this.layoutCorrected,e,r)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new rL),this.sharedNodes.get(t).add(e);let i=e.options.initialPromotionConfig;e.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(e):void 0})}isLead(){let t=this.getStack();return!t||t.lead===this}getLead(){let{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:i}={}){let s=this.getStack();s&&s.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){let t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){let{visualElement:t}=this.options;if(!t)return;let e=!1,{latestValues:i}=t;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(e=!0),!e)return;let s={};i.z&&rN("z",t,s,this.animationValues);for(let e=0;e<rI.length;e++)rN(`rotate${rI[e]}`,t,s,this.animationValues),rN(`skew${rI[e]}`,t,s,this.animationValues);for(let e in t.render(),s)t.setStaticValue(e,s[e]),this.animationValues&&(this.animationValues[e]=s[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible){t.visibility="hidden";return}let i=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=e1(e?.pointerEvents)||"",t.transform=i?i(this.latestValues,""):"none";return}let s=this.getLead();if(!this.projectionDelta||!this.layout||!s.target){this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=e1(e?.pointerEvents)||""),this.hasProjected&&!M(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1);return}t.visibility="";let r=s.animationValues||s.latestValues;this.applyTransformsToTarget();let n=function(t,e,i){let s="",r=t.x.translate/e.x,n=t.y.translate/e.y,o=i?.z||0;if((r||n||o)&&(s=`translate3d(${r}px, ${n}px, ${o}px) `),(1!==e.x||1!==e.y)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),i){let{transformPerspective:t,rotate:e,rotateX:r,rotateY:n,skewX:o,skewY:a}=i;t&&(s=`perspective(${t}px) ${s}`),e&&(s+=`rotate(${e}deg) `),r&&(s+=`rotateX(${r}deg) `),n&&(s+=`rotateY(${n}deg) `),o&&(s+=`skewX(${o}deg) `),a&&(s+=`skewY(${a}deg) `)}let a=t.x.scale*e.x,l=t.y.scale*e.y;return(1!==a||1!==l)&&(s+=`scale(${a}, ${l})`),s||"none"}(this.projectionDeltaWithTransform,this.treeScale,r);i&&(n=i(r,n)),t.transform=n;let{x:o,y:a}=this.projectionDelta;for(let e in t.transformOrigin=`${100*o.origin}% ${100*a.origin}% 0`,s.animationValues?t.opacity=s===this?r.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:t.opacity=s===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0,eC){if(void 0===r[e])continue;let{correct:i,applyTo:o,isCSSVariable:a}=eC[e],l="none"===n?r[e]:i(r[e],s);if(o){let e=o.length;for(let i=0;i<e;i++)t[o[i]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=s===this?e1(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(rH),this.root.sharedNodes.clear()}}}function rq(t){t.updateLayout()}function r$(t){let e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){let{layoutBox:i,measuredBox:s}=t.layout,{animationType:r}=t.options,n=e.source!==t.layout.source;"size"===r?sK(t=>{let s=n?e.measuredBox[t]:e.layoutBox[t],r=sq(s);s.min=i[t].min,s.max=s.min+r}):r8(r,e.layoutBox,i)&&sK(s=>{let r=n?e.measuredBox[s]:e.layoutBox[s],o=sq(i[s]);r.max=r.min+o,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[s].max=t.relativeTarget[s].min+o)});let o=en();sW(o,i,e.layoutBox);let a=en();n?sW(a,t.applyTransform(s,!0),e.measuredBox):sW(a,i,e.layoutBox);let l=!rD(o),u=!1;if(!t.resumeFrom){let s=t.getClosestProjectingParent();if(s&&!s.resumeFrom){let{snapshot:r,layout:n}=s;if(r&&n){let o=ea();sH(o,e.layoutBox,r.layoutBox);let a=ea();sH(a,i,n.layoutBox),rj(o,a)||(u=!0),s.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=o,t.relativeParent=s)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){let{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function rW(t){tl.value&&rB.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function rQ(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function rG(t){t.clearSnapshot()}function rH(t){t.clearMeasurements()}function rK(t){t.isLayoutDirty=!1}function rY(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function r_(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function rX(t){t.resolveTargetDelta()}function rZ(t){t.calcProjection()}function rJ(t){t.resetSkewAndRotation()}function r0(t){t.removeLeadSnapshot()}function r1(t,e,i){t.translate=T(e.translate,0,i),t.scale=T(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function r2(t,e,i,s){t.min=T(e.min,i.min,s),t.max=T(e.max,i.max,s)}function r5(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}let r3={duration:.45,ease:[.4,0,.1,1]},r9=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),r4=r9("applewebkit/")&&!r9("chrome/")?Math.round:tn;function r6(t){t.min=r4(t.min),t.max=r4(t.max)}function r8(t,e,i){return"position"===t||"preserve-aspect"===t&&!(.2>=Math.abs(rF(e)-rF(i)))}function r7(t){return t!==t.root&&t.scroll?.wasRoot}let nt=rU({attachResizeListener:(t,e)=>sB(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ne={current:void 0},ni=rU({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ne.current){let t=new nt({});t.mount(window),t.setOptions({layoutScroll:!0}),ne.current=t}return ne.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position});function ns(t,e){let i=function(t,e,i){if(t instanceof EventTarget)return[t];if("string"==typeof t){let e=document,i=(void 0)??e.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}(t),s=new AbortController;return[i,{passive:!0,...e,signal:s.signal},()=>s.abort()]}function nr(t){return!("touch"===t.pointerType||sL.x||sL.y)}function nn(t,e,i){let{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover","Start"===i);let r=s["onHover"+i];r&&th.postRender(()=>r(e,sz(e)))}class no extends sR{mount(){let{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){let[s,r,n]=ns(t,i),o=t=>{if(!nr(t))return;let{target:i}=t,s=e(i,t);if("function"!=typeof s||!i)return;let n=t=>{nr(t)&&(s(t),i.removeEventListener("pointerleave",n))};i.addEventListener("pointerleave",n,r)};return s.forEach(t=>{t.addEventListener("pointerenter",o,r)}),n}(t,(t,e)=>(nn(this.node,e,"Start"),t=>nn(this.node,t,"End"))))}unmount(){}}class na extends sR{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ia(sB(this.node.current,"focus",()=>this.onFocus()),sB(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}let nl=(t,e)=>!!e&&(t===e||nl(t,e.parentElement)),nu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),nh=new WeakSet;function nd(t){return e=>{"Enter"===e.key&&t(e)}}function nc(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}let np=(t,e)=>{let i=t.currentTarget;if(!i)return;let s=nd(()=>{if(nh.has(i))return;nc(i,"down");let t=nd(()=>{nc(i,"up")});i.addEventListener("keyup",t,e),i.addEventListener("blur",()=>nc(i,"cancel"),e)});i.addEventListener("keydown",s,e),i.addEventListener("blur",()=>i.removeEventListener("keydown",s),e)};function nm(t){return sI(t)&&!(sL.x||sL.y)}function nf(t,e,i){let{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap","Start"===i);let r=s["onTap"+("End"===i?"":i)];r&&th.postRender(()=>r(e,sz(e)))}class ng extends sR{mount(){let{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){let[s,r,n]=ns(t,i),o=t=>{let s=t.currentTarget;if(!nm(t))return;nh.add(s);let n=e(s,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),nh.has(s)&&nh.delete(s),nm(t)&&"function"==typeof n&&n(t,{success:e})},a=t=>{o(t,s===window||s===document||i.useGlobalTarget||nl(s,t.target))},l=t=>{o(t,!1)};window.addEventListener("pointerup",a,r),window.addEventListener("pointercancel",l,r)};return s.forEach(t=>{(i.useGlobalTarget?window:t).addEventListener("pointerdown",o,r),ru(t)&&"offsetHeight"in t&&(t.addEventListener("focus",t=>np(t,r)),nu.has(t.tagName)||-1!==t.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))}),n}(t,(t,e)=>(nf(this.node,e,"Start"),(t,{success:e})=>nf(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}let ny=new WeakMap,nv=new WeakMap,nb=t=>{let e=ny.get(t.target);e&&e(t)},nx=t=>{t.forEach(nb)},nw={some:0,all:1};class nk extends sR{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:e,margin:i,amount:s="some",once:r}=t,n={root:e?e.current:void 0,rootMargin:i,threshold:"number"==typeof s?s:nw[s]};return function(t,e,i){let s=function({root:t,...e}){let i=t||document;nv.has(i)||nv.set(i,{});let s=nv.get(i),r=JSON.stringify(e);return s[r]||(s[r]=new IntersectionObserver(nx,{root:t,...e})),s[r]}(e);return ny.set(t,i),s.observe(t),()=>{ny.delete(t),s.unobserve(t)}}(this.node.current,n,t=>{let{isIntersecting:e}=t;if(this.isInView===e||(this.isInView=e,r&&!e&&this.hasEnteredView))return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);let{onViewportEnter:i,onViewportLeave:s}=this.node.getProps(),n=e?i:s;n&&n(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return i=>t[i]!==e[i]}(t,e))&&this.startObserver()}unmount(){}}let nP=function(t,e){if("undefined"==typeof Proxy)return it;let i=new Map,s=(i,s)=>it(i,s,t,e);return new Proxy((t,e)=>s(t,e),{get:(r,n)=>"create"===n?s:(i.has(n)||i.set(n,it(n,void 0,t,e)),i.get(n))})}({animation:{Feature:sj},exit:{Feature:sO},inView:{Feature:nk},tap:{Feature:ng},focus:{Feature:na},hover:{Feature:no},pan:{Feature:re},drag:{Feature:s7,ProjectionNode:ni,MeasureLayout:ra},layout:{ProjectionNode:ni,MeasureLayout:ra}},(t,e)=>eU(t)?new ez(e):new eV(e,{allowProjection:t!==r.Fragment}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[704],{704:(t,e,s)=>{s.d(e,{AQ:()=>r.AQ,CIRISClient:()=>r.wG,Lb:()=>i.Lb,aS:()=>a.a,fz:()=>n.fz});var r=s(2987);s(3469),s(6690);var a=s(5950);s(3304);var n=s(9388),i=s(9684)},2987:(t,e,s)=>{s.d(e,{wG:()=>A,AQ:()=>L});var r=s(5950);class a{async checkLimit(t){let e=Date.now()/1e3;if(this.globalRemaining<=0&&e<this.globalReset)return!1;let s=this.getBucket(t);if(s.tokens<=0){let t=Math.floor((e-s.lastRefill)*(this.windowMs/1e3));t>0&&(s.tokens=Math.min(s.tokens+t,this.globalLimit),s.lastRefill=e)}return s.tokens>0}consumeToken(t){let e=this.getBucket(t);e.tokens=Math.max(0,e.tokens-1),this.globalRemaining=Math.max(0,this.globalRemaining-1)}updateFromHeaders(t){let e=e=>t instanceof Headers?t.get(e):t[e]||null,s=e("X-RateLimit-Limit"),r=e("X-RateLimit-Remaining"),a=e("X-RateLimit-Reset"),n=e("X-RateLimit-Window");s&&(this.globalLimit=parseInt(s,10)),r&&(this.globalRemaining=parseInt(r,10)),a&&(this.globalReset=parseInt(a,10)),n&&(this.windowMs=this.parseWindow(n))}getInfo(){return{limit:this.globalLimit,remaining:this.globalRemaining,reset:this.globalReset,window:"".concat(this.windowMs/1e3,"s")}}getRetryDelay(t){let e=Date.now()/1e3,s=Math.max(0,this.globalReset-e),r=this.baseDelayMs*Math.pow(2,t),a=.1*Math.random()*r;return Math.max(1e3*s,r+a)}getBucket(t){return this.buckets.has(t)||this.buckets.set(t,{tokens:this.globalLimit,lastRefill:Date.now()/1e3}),this.buckets.get(t)}parseWindow(t){let e=t.match(/^(\d+)([smh])$/);if(!e)return 6e4;let s=parseInt(e[1],10);switch(e[2]){case"s":return 1e3*s;case"m":return 60*s*1e3;case"h":return 60*s*6e4;default:return 6e4}}constructor(t=3,e=1e3){this.maxRetries=t,this.baseDelayMs=e,this.buckets=new Map,this.globalLimit=100,this.globalRemaining=100,this.globalReset=Date.now()/1e3,this.windowMs=6e4}}var n=s(6690);class i{async request(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.buildURL(e,s.params),a=null;for(let i=0;i<this.maxRetries;i++)try{if(this.rateLimiter&&!await this.rateLimiter.checkLimit(e)){let t=this.rateLimiter.getRetryDelay(i);await this.delay(t);continue}let a=this.buildHeaders(s.headers,s.skipAuth),n={method:t,headers:a,signal:AbortSignal.timeout(this.timeout)};s.body&&"GET"!==t&&(n.body=JSON.stringify(s.body),e.includes("/consent/grant")&&console.log("[CIRIS SDK] Consent request payload:",{url:r,method:t,body:s.body,stringified:JSON.stringify(s.body)}));let o=await fetch(r,n);return this.rateLimiter&&this.rateLimiter.updateFromHeaders(o.headers),this.rateLimiter&&this.rateLimiter.consumeToken(e),await this.handleResponse(o,s.responseType)}catch(t){if(a=t,t instanceof n.VB)throw t;if(t instanceof Error&&"AbortError"===t.name&&(a=new n.Wr("Request to ".concat(e," timed out after ").concat(this.timeout,"ms"))),t instanceof TypeError&&t.message.includes("fetch")&&(a=new n.BK("Failed to connect to ".concat(this.baseURL))),i<this.maxRetries-1){let t=Math.min(1e3*Math.pow(2,i),1e4);await this.delay(t);continue}}throw a||new n.BK("Request failed after retries")}async handleResponse(t){let e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"json";if(204===t.status)return null;if(401===t.status){console.error("401 Error Details:",{url:t.url,headers:Object.fromEntries(t.headers.entries()),status:t.status,statusText:t.statusText});try{let e=await t.json();console.error("401 Error Response:",e)}catch(t){console.error("Could not parse 401 error response")}throw r.a.clearToken(),this.onAuthError&&this.onAuthError(),new n.VB("Authentication failed")}if(429===t.status){let e=parseInt(t.headers.get("Retry-After")||"60",10),s=parseInt(t.headers.get("X-RateLimit-Limit")||"100",10),r=t.headers.get("X-RateLimit-Window")||"1m";throw new n.QX(e,s,r)}if(t.ok&&"json"!==s){if("blob"===s)return await t.blob();else if("text"===s)return await t.text()}let a="";try{e=(a=await t.text())?JSON.parse(a):{}}catch(s){if(console.error("[CIRIS SDK] Failed to parse JSON response:",{status:t.status,statusText:t.statusText,url:t.url,responseText:a.substring(0,500),error:s}),t.ok){if(a.includes("<!DOCTYPE")||a.includes("<html"))throw new n.N3(t.status,"Received HTML instead of JSON. The API endpoint may be incorrect or the server may be returning an error page.",a.substring(0,200));if(!a||""===a.trim())return{};throw new n.N3(t.status,"Failed to parse response as JSON",a.substring(0,200))}let e="HTTP ".concat(t.status," error");if(a.includes("<!DOCTYPE")||a.includes("<html")){let t=a.match(/<title>(.*?)<\/title>/i);t&&(e=t[1])}else a&&(e=a.substring(0,200));throw new n.N3(t.status,e,"Response was not valid JSON. This might indicate the API is down, the endpoint is incorrect, or there is a server error.")}if(!t.ok){let s=e;if(422===t.status&&console.error("[CIRIS SDK] 422 Validation Error:",{url:t.url,status:t.status,errorData:e,detail:s.detail,rawData:JSON.stringify(e)}),422===t.status&&Array.isArray(s.detail)){let e=s.detail.map(t=>{let e=Array.isArray(t.loc)?t.loc.join("."):t.loc;return"".concat(e,": ").concat(t.msg)}).join("; ");throw new n.N3(t.status,e||"Validation error",e,"validation_error")}if(403===t.status&&"error"in e&&"insufficient_permissions"===e.error){console.log("[CIRIS SDK] Creating PermissionDeniedError with Discord invite:",{message:e.message||s.detail||"Permission denied",discordInvite:e.discord_invite,canRequestPermissions:e.can_request_permissions,permissionRequested:e.permission_requested,requestedAt:e.requested_at});let t=new n.H7(e.message||s.detail||"Permission denied",e.discord_invite,e.can_request_permissions,e.permission_requested,e.requested_at);throw console.log("[CIRIS SDK] Throwing PermissionDeniedError:",t),t}throw new n.N3(t.status,s.detail||"HTTP ".concat(t.status," error"),s.detail,s.type)}return this.isSuccessResponse(e)?e.data:e}isSuccessResponse(t){return"object"==typeof t&&null!==t&&"data"in t&&"metadata"in t}buildURL(t,e){let s;if(t.startsWith("http://")||t.startsWith("https://"))s=new URL(t);else if(this.baseURL&&""!==this.baseURL)s=new URL(t.startsWith("/")?t.slice(1):t,this.baseURL.endsWith("/")?this.baseURL:this.baseURL+"/");else{let e=window.location.origin;s=new URL(t.startsWith("/")?t:"/"+t,e)}return e&&Object.entries(e).forEach(t=>{let[e,r]=t;null!=r&&s.searchParams.append(e,String(r))}),s.toString()}buildHeaders(t,e){let s={"Content-Type":"application/json",Accept:"application/json",...t};if(!e){let t=r.a.getAccessToken();if(t&&t===localStorage.getItem("manager_token"))return console.warn("[CIRIS SDK] Detected manager token, skipping auth for CIRIS SDK request"),s;t&&(s.Authorization="Bearer ".concat(t))}return s}delay(t){return new Promise(e=>setTimeout(e,t))}async get(t,e){return this.request("GET",t,e)}async post(t,e,s){return this.request("POST",t,{...s,body:e})}async put(t,e,s){return this.request("PUT",t,{...s,body:e})}async patch(t,e,s){return this.request("PATCH",t,{...s,body:e})}async delete(t,e){return this.request("DELETE",t,e)}setBaseURL(t){this.baseURL=t.replace(/\/$/,"")}getBaseURL(){return this.baseURL}setAuthToken(t){if(t){let e=r.a.getToken();e&&e.access_token===t||r.a.saveToken({access_token:t,token_type:"Bearer",expires_in:86400,user_id:"",role:"",created_at:Date.now()})}else r.a.clearToken()}constructor(t){this.baseURL=t.baseURL.replace(/\/$/,""),this.timeout=t.timeout||6e4,this.maxRetries=t.maxRetries||3,this.onAuthError=t.onAuthError,t.enableRateLimiting&&(this.rateLimiter=new a(this.maxRetries))}}var o=s(3304),c=s(5663);class u extends c.Q{async submitMessage(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.transport.post("/v1/agent/message",{message:t,channel_id:e.channel_id||"web_ui",context:e.context})}async interact(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.transport.post("/v1/agent/interact",{message:t,channel_id:e.channel_id||"web_ui",context:e.context})}async getStatus(){return this.transport.get("/v1/agent/status")}async getIdentity(){return this.transport.get("/v1/agent/identity")}async getHistory(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.transport.get("/v1/agent/history",{params:{channel_id:t.channel_id,limit:t.limit||50,offset:t.offset||0}})}async getChannels(){return(await this.transport.get("/v1/agent/channels")).channels||[]}async clearHistory(t){return this.transport.delete("/v1/agent/history/".concat(t))}async getMessage(t){return this.transport.get("/v1/agent/message/".concat(t))}}class l extends c.Q{async getHealth(){return this.transport.get("/v1/system/health")}async getServices(){return this.transport.get("/v1/system/services")}async getResources(){return this.transport.get("/v1/system/resources")}async pauseRuntime(){var t;let e=await this.transport.post("/v1/system/runtime/pause",{}),s=e.data||e;return{status:s.success?"success":"error",message:s.message||"Runtime paused",timestamp:(null==(t=e.metadata)?void 0:t.timestamp)||new Date().toISOString(),processor_state:s.processor_state,cognitive_state:s.cognitive_state}}async resumeRuntime(){var t;let e=await this.transport.post("/v1/system/runtime/resume",{}),s=e.data||e;return{status:s.success?"success":"error",message:s.message||"Runtime resumed",timestamp:(null==(t=e.metadata)?void 0:t.timestamp)||new Date().toISOString(),processor_state:s.processor_state,cognitive_state:s.cognitive_state}}async getRuntimeStatus(){let t=await this.transport.post("/v1/system/runtime/state",{});return{is_paused:"paused"===t.processor_state,processor_status:t.processor_state,health_status:"healthy",uptime_seconds:0,active_adapters:[],loaded_adapters:[]}}async getRuntimeState(){try{let[t,e]=await Promise.all([this.transport.get("/v1/system/health").catch(()=>null),this.transport.get("/v1/system/runtime/queue").catch(()=>null)]),s=(null==t?void 0:t.data)||t,r=(null==e?void 0:e.data)||e;return{success:!0,message:"Runtime state retrieved",processor_state:"running",cognitive_state:(null==s?void 0:s.cognitive_state)||"work",queue_depth:(null==r?void 0:r.queue_size)||0}}catch(t){return{success:!1,message:"Failed to retrieve runtime state",processor_state:"unknown",cognitive_state:"work",queue_depth:0}}}async pauseProcessor(t,e){return this.transport.post("/v1/system/processors/".concat(t,"/pause"),{duration:e})}async resumeProcessor(t){return this.transport.post("/v1/system/processors/".concat(t,"/resume"))}async getAdapters(){return this.transport.get("/v1/system/adapters")}async getAdapter(t){return this.transport.get("/v1/system/adapters/".concat(t))}async registerAdapter(t,e){return this.transport.post("/v1/system/adapters/".concat(t),{config:e})}async unregisterAdapter(t){return this.transport.delete("/v1/system/adapters/".concat(t))}async reloadAdapter(t){return this.transport.put("/v1/system/adapters/".concat(t,"/reload"))}async restartService(t){return this.transport.post("/v1/system/services/".concat(t,"/restart"))}async pauseAdapter(t,e){return this.transport.post("/v1/system/adapters/".concat(t,"/pause"),{duration:e})}async resumeAdapter(t){return this.transport.post("/v1/system/adapters/".concat(t,"/resume"))}async getProcessingQueueStatus(){return this.transport.get("/v1/system/runtime/queue")}async singleStepProcessor(){return this.transport.post("/v1/system/runtime/step")}async singleStepProcessorEnhanced(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0],e=await this.transport.post(t?"/v1/system/runtime/step?include_details=true":"/v1/system/runtime/step",{}),s=e.data||e;return{success:s.success||!1,message:s.message||"Single step completed",step_point:s.step_point||null,step_result:s.step_result||null,processing_time_ms:s.processing_time_ms||0,tokens_used:s.tokens_used||0,processor_state:s.processor_state||"unknown",cognitive_state:s.cognitive_state||"work",queue_depth:s.queue_depth||0,pipeline_state:s.pipeline_state||null,demo_data:s.demo_data||null}}async getServiceHealthDetails(){return this.transport.get("/v1/system/services/health")}async updateServicePriority(t,e){return this.transport.put("/v1/system/services/".concat(t,"/priority"),e)}async resetCircuitBreakers(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.transport.post("/v1/system/services/circuit-breakers/reset",t)}async getServiceSelectionExplanation(){return this.transport.get("/v1/system/services/selection-logic")}async getProcessorStates(){return this.transport.get("/v1/system/processors")}async transitionState(t){let e=await this.transport.post("/v1/system/state/transition",t);return e.data||e}async getTime(){return this.transport.get("/v1/system/time")}async shutdown(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.transport.post("/v1/system/shutdown",{reason:t,confirm:e,force:s})}async getTools(){return this.transport.get("/v1/system/tools")}async getModuleTypes(){let t=await this.transport.get("/v1/system/adapters/types");return t.data||t}async getConfigurableAdapters(){let t=await this.transport.get("/v1/system/adapters/configurable");return t.data||t}async startConfigSession(t){let e=await this.transport.post("/v1/system/adapters/".concat(t,"/configure/start"),{});return e.data||e}async getConfigSessionStatus(t){let e=await this.transport.get("/v1/system/adapters/configure/".concat(t,"/status"));return e.data||e}async executeConfigStep(t,e){let s=await this.transport.post("/v1/system/adapters/configure/".concat(t,"/step"),{step_data:e});return s.data||s}async completeConfigSession(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=await this.transport.post("/v1/system/adapters/configure/".concat(t,"/complete"),{persist:e});return s.data||s}async registerAdapterWithConfig(t,e){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=arguments.length>3?arguments[3]:void 0,a=r?"/v1/system/adapters/".concat(t,"?adapter_id=").concat(r):"/v1/system/adapters/".concat(t),n=await this.transport.post(a,{config:{adapter_type:t,enabled:!0,settings:e},auto_start:s});return n.data||n}async reloadAdapterWithConfig(t,e){let s=await this.transport.put("/v1/system/adapters/".concat(t,"/reload"),{config:e||{},auto_start:!0});return s.data||s}}class h extends c.Q{async query(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=t&&(t.toLowerCase().startsWith("metric_")||t.toLowerCase().startsWith("audit_")||t.toLowerCase().startsWith("log_")||t.toLowerCase().startsWith("dream_schedule_")||t.toLowerCase().startsWith("thought_")||t.toLowerCase().startsWith("thought/")||t.toLowerCase().startsWith("task_")||t.toLowerCase().startsWith("observation_")||t.toLowerCase().startsWith("concept_")||t.toLowerCase().startsWith("identity_")||t.toLowerCase().startsWith("config_")||t.toLowerCase().startsWith("config:")||t.toLowerCase().startsWith("tsdb_data_")||t.toLowerCase().startsWith("conversation_summary_")||t.toLowerCase().startsWith("trace_summary_")||t.toLowerCase().startsWith("audit_summary_")||t.toLowerCase().startsWith("tsdb_summary_")||t.toLowerCase().startsWith("user_")||t.toLowerCase().startsWith("user/")||t.toLowerCase().startsWith("shutdown_")||t.toLowerCase().startsWith("edge_")||t.toLowerCase().startsWith("datum-")||/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(t)||t.includes("_")&&!t.startsWith("_")&&/\d{10}/.test(t)),r={...s?{node_id:t}:{query:t},...e};console.log("Memory query:",{query:t,isNodeId:s,body:r});let a=await this.transport.post("/v1/memory/query",r);return console.log("Memory query response:",a),Array.isArray(a)?a:a.data||a}async getNode(t){return this.transport.get("/v1/memory/".concat(encodeURIComponent(t)))}async recall(t){return this.transport.get("/v1/memory/recall/".concat(encodeURIComponent(t)))}async createNode(t){return this.transport.post("/v1/memory/store",t)}async updateNode(t,e){return this.transport.patch("/v1/memory/".concat(encodeURIComponent(t)),e)}async deleteNode(t){return this.transport.delete("/v1/memory/".concat(encodeURIComponent(t)))}async getStats(){return this.transport.get("/v1/memory/stats")}async search(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(await this.transport.post("/v1/memory/query",{query:t,...e})).results||[]}async getTimeline(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.transport.get("/v1/memory/timeline",{params:t})}async getRelated(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.transport.get("/v1/memory/".concat(encodeURIComponent(t),"/related"),{params:e})}async getVisualization(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return await this.transport.get("/v1/memory/visualize/graph",{params:t,responseType:"text"})}async createEdge(t){return this.transport.post("/v1/memory/edges",{edge:t})}async getNodeEdges(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";return this.transport.get("/v1/memory/".concat(encodeURIComponent(t),"/edges"),{params:{scope:e}})}async queryWithEdges(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.query(t,{...e,include_edges:!0})}}class p extends c.Q{async getEntries(t){var e;let s=await this.transport.get("/v1/audit/entries",t);return{items:s.entries||[],total:(null==(e=s.entries)?void 0:e.length)||0,page:(null==t?void 0:t.page)||1,page_size:(null==t?void 0:t.page_size)||100,has_next:!1,has_prev:!1}}async getEntry(t){return this.transport.get("/v1/audit/entries/".concat(t))}async exportEntries(t){return await this.transport.get("/v1/audit/export",{...t,responseType:"blob"})}async searchEntries(t){return this.transport.post("/v1/audit/search",t||{})}async verifyEntry(t){return this.transport.get("/v1/audit/verify/".concat(t))}}var g=s(9388);class d extends c.Q{async getLogs(t,e,s){return"string"==typeof t||void 0===t?(await this.transport.get("/v1/telemetry/logs",{params:{level:t,service:e,limit:s||100}})).logs||[]:this.transport.get("/v1/telemetry/logs",t)}async getMetrics(t){return this.transport.get("/v1/telemetry/metrics",t)}async getMetricDetail(t){return this.transport.get("/v1/telemetry/metrics/".concat(t))}async getOverview(t){return this.transport.get("/v1/telemetry/overview",t)}async query(t){return this.transport.post("/v1/telemetry/query",t)}async getResources(){return this.transport.get("/v1/telemetry/resources")}async getResourceHistory(t){return this.transport.get("/v1/telemetry/resources/history",t)}async getTraces(t){return this.transport.get("/v1/telemetry/traces",t)}async getIncidents(t){return(await this.transport.get("/v1/telemetry/logs",{params:{level:"ERROR",limit:(null==t?void 0:t.limit)||50,service:null==t?void 0:t.service}})).logs||[]}}class m extends c.Q{async getDeferrals(t){return(await this.transport.get("/v1/wa/deferrals",t)).deferrals||[]}async resolveDeferral(t,e,s,r){return this.transport.post("/v1/wa/deferrals/".concat(t,"/resolve"),{resolution:"deny"===e?"reject":e,guidance:s})}async requestGuidance(t){return this.transport.post("/v1/wa/guidance",t)}async getPermissions(t){return this.transport.get("/v1/wa/permissions",t)}async getStatus(){return this.transport.get("/v1/wa/status")}}class y extends c.Q{async shutdown(t){return this.transport.post("/emergency/shutdown",t,{skipAuth:!0,headers:{"X-Emergency-Signature":t.signature}})}async test(){return this.transport.get("/emergency/test")}}class v extends c.Q{async list(t){return this.transport.get("/v1/users",{params:t})}async get(t){return this.transport.get("/v1/users/".concat(t))}async create(t){return this.transport.post("/v1/users",t)}async update(t,e){return this.transport.put("/v1/users/".concat(t),e)}async changePassword(t,e){return this.transport.put("/v1/users/".concat(t,"/password"),e)}async mintWiseAuthority(t,e){return this.transport.post("/v1/users/".concat(t,"/mint-wa"),e)}async deactivate(t){return this.transport.delete("/v1/users/".concat(t))}async listAPIKeys(t){return this.transport.get("/v1/users/".concat(t,"/api-keys"))}async checkWAKeyExists(t){return this.transport.get("/v1/users/wa/key-check",{params:{path:t}})}async requestPermissions(){return this.transport.post("/v1/users/request-permissions")}async getPermissionRequests(){return this.transport.get("/v1/users/permission-requests")}async grantPermissions(t,e){return this.transport.put("/v1/users/".concat(t,"/permissions"),e)}async linkOAuthAccount(t,e){return this.transport.post("/v1/users/".concat(t,"/oauth-links"),e)}async unlinkOAuthAccount(t,e,s){return this.transport.delete("/v1/users/".concat(t,"/oauth-links/").concat(e,"/").concat(s))}async getMySettings(){return this.transport.get("/v1/users/me/settings")}async updateMySettings(t){return this.transport.put("/v1/users/me/settings",t)}}class w extends c.Q{async listAgents(){let t="".concat(window.location.origin,"/manager/v1/agents");return(await this.transport.request("GET",t,{skipAuth:!0})).agents||[]}async getAgent(t){let e="".concat(window.location.origin,"/manager/v1/agents/").concat(t);return this.transport.request("GET",e,{skipAuth:!0})}async health(){let t="".concat(window.location.origin,"/manager/v1/health");return this.transport.request("GET",t,{skipAuth:!0})}}var _=s(9684);class R extends c.Q{async submitRequest(t){return this.transport.post("/v1/dsr/submit",t,{skipAuth:!0})}async checkStatus(t){return this.transport.get("/v1/dsr/status/".concat(t),{skipAuth:!0})}async listRequests(){return this.transport.get("/v1/dsr/admin/requests")}async updateRequest(t,e,s){return this.transport.put("/v1/dsr/admin/requests/".concat(t),{status:e,response:s})}}class f extends c.Q{async getCredits(){return this.transport.get("/v1/api/billing/credits")}async initiatePurchase(t){return this.transport.post("/v1/api/billing/purchase/initiate",t||{})}async getPurchaseStatus(t){return this.transport.get("/v1/api/billing/purchase/status/".concat(t))}async getTransactions(t){let e=new URLSearchParams;(null==t?void 0:t.limit)&&e.append("limit",t.limit.toString()),(null==t?void 0:t.offset)&&e.append("offset",t.offset.toString());let s=e.toString();return this.transport.get("/v1/api/billing/transactions".concat(s?"?".concat(s):""))}}class S extends c.Q{async getStatus(){return this.transport.get("/v1/setup/status")}async getProviders(){return this.transport.get("/v1/setup/providers")}async validateLLM(t){return this.transport.post("/v1/setup/validate-llm",t)}async getTemplates(){return this.transport.get("/v1/setup/templates")}async getAdapters(){return this.transport.get("/v1/setup/adapters")}async complete(t){return this.transport.post("/v1/setup/complete",t)}async getConfig(){return this.transport.get("/v1/setup/config")}async updateConfig(t){return this.transport.put("/v1/setup/config",t)}}var k=s(9664);s(3469);var b=s(4338);class A{async login(t,e){return this.auth.login(t,e)}async logout(){return this.auth.logout()}isAuthenticated(){return this.auth.isAuthenticated()}getCurrentUser(){return this.auth.getCurrentUser()}setConfig(t){t.baseURL&&this.transport.setBaseURL(t.baseURL),void 0!==t.authToken&&this.transport.setAuthToken(t.authToken)}getVersion(){return k.MF}getVersionString(){return k.MF.version}setBaseURL(t){this.transport.setBaseURL(t)}getBaseURL(){return this.transport.getBaseURL()}withConfig(t){let e=new A({baseURL:t.baseURL||this.transport.getBaseURL(),timeout:t.timeout,maxRetries:t.maxRetries,enableRateLimiting:t.enableRateLimiting,onAuthError:t.onAuthError});return t.authToken&&e.transport.setAuthToken(t.authToken),e}async interact(t,e){return this.agent.interact(t,e)}async getStatus(){return this.agent.getStatus()}async getHealth(){return this.system.getHealth()}constructor(t={}){let e;e="localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname?b.env.NEXT_PUBLIC_API_BASE_URL||"http://localhost:8080":"";let s={baseURL:t.baseURL||e,timeout:t.timeout,maxRetries:t.maxRetries,enableRateLimiting:!1!==t.enableRateLimiting,onAuthError:t.onAuthError||(()=>{"/login"!==window.location.pathname&&(window.location.href="/login")})};this.transport=new i(s),this.auth=new o.p(this.transport),this.agent=new u(this.transport),this.system=new l(this.transport),this.memory=new h(this.transport),this.audit=new p(this.transport),this.config=new g.xt(this.transport),this.telemetry=new d(this.transport),this.wiseAuthority=new m(this.transport),this.emergency=new y(this.transport),this.users=new v(this.transport),this.manager=new w(this.transport),this.consent=new _.jv(this.transport),this.dsar=new R(this.transport),this.billing=new f(this.transport),this.setup=new S(this.transport)}}let L=(()=>{let t;return console.log("[CIRIS SDK] Creating default client with baseURL:",t="localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname?b.env.NEXT_PUBLIC_API_BASE_URL||"http://localhost:8080":""),new A({baseURL:t})})()},3304:(t,e,s)=>{s.d(e,{p:()=>i});var r=s(5663),a=s(5950),n=s(6690);class i extends r.Q{async login(t,e){try{let s=await this.transport.post("/v1/auth/login",{username:t,password:e},{skipAuth:!0}),r={access_token:s.access_token,token_type:s.token_type,expires_in:s.expires_in,user_id:s.user_id,role:s.role,created_at:Date.now()};a.a.saveToken(r);let n=await this.getMe();return a.a.saveUser(n),n}catch(t){throw new n.VB(this.buildErrorMessage("login",t.message))}}async logout(){try{await this.transport.post("/v1/auth/logout")}catch(t){}finally{a.a.clearToken()}}async getMe(){return this.transport.get("/v1/auth/me")}isAuthenticated(){return a.a.isAuthenticated()}getCurrentUser(){return a.a.getUser()}getAccessToken(){return a.a.getAccessToken()}async refresh(){try{let t=await this.transport.post("/v1/auth/refresh"),e={access_token:t.access_token,token_type:t.token_type,expires_in:t.expires_in,user_id:t.user_id,role:t.role,created_at:Date.now()};return a.a.saveToken(e),t}catch(t){throw new n.VB(this.buildErrorMessage("refresh",t.message))}}async listOAuthProviders(){return this.transport.get("/v1/auth/oauth/providers")}async configureOAuthProvider(t,e,s,r){return this.transport.post("/v1/auth/oauth/providers",{provider:t,client_id:e,client_secret:s,metadata:r||void 0})}async initiateOAuthLogin(t,e){return this.transport.get("/v1/auth/oauth/".concat(t,"/login"),{params:e?{redirect_uri:e}:void 0,skipAuth:!0})}async handleOAuthCallback(t,e,s){try{let r=await this.transport.get("/v1/auth/oauth/".concat(t,"/callback"),{params:{code:e,state:s},skipAuth:!0}),n={access_token:r.access_token,token_type:r.token_type,expires_in:r.expires_in,user_id:r.user_id,role:r.role,created_at:Date.now()};a.a.saveToken(n);let i=await this.getMe();return a.a.saveUser(i),i}catch(t){throw new n.VB(this.buildErrorMessage("OAuth callback",t.message))}}async createAPIKey(t,e){return this.transport.post("/v1/auth/api-keys",{description:t,expires_in_minutes:e})}async listAPIKeys(){return this.transport.get("/v1/auth/api-keys")}async deleteAPIKey(t){return this.transport.delete("/v1/auth/api-keys/".concat(t))}}},3469:(t,e,s)=>{},5663:(t,e,s)=>{s.d(e,{Q:()=>r});class r{buildErrorMessage(t,e){let s="Failed to ".concat(t);return e?"".concat(s,": ").concat(e):s}constructor(t){this.transport=t}}},5950:(t,e,s)=>{s.d(e,{a:()=>a});var r=s(7932);class a{static saveToken(t){{let e={...t,created_at:Date.now()};window.localStorage&&localStorage.setItem(this.STORAGE_KEY,JSON.stringify(e)),r.A.set("auth_token",t.access_token,{expires:t.expires_in/86400})}}static getToken(){if(!window.localStorage)return null;let t=localStorage.getItem(this.STORAGE_KEY);if(!t)return null;try{let e=JSON.parse(t),s=e.created_at+1e3*e.expires_in;if(Date.now()>s)return this.clearToken(),null;return e}catch(t){return this.clearToken(),null}}static clearToken(){window.localStorage&&(localStorage.removeItem(this.STORAGE_KEY),localStorage.removeItem(this.USER_KEY)),r.A.remove("auth_token")}static saveUser(t){window.localStorage&&localStorage.setItem(this.USER_KEY,JSON.stringify(t))}static getUser(){if(!window.localStorage)return null;let t=localStorage.getItem(this.USER_KEY);if(!t)return null;try{return JSON.parse(t)}catch(t){return null}}static isAuthenticated(){return null!==this.getToken()}static getAccessToken(){let t=this.getToken();return t?t.access_token:r.A.get("auth_token")||null}}a.STORAGE_KEY="ciris_auth_token",a.USER_KEY="ciris_auth_user"},6690:(t,e,s)=>{s.d(e,{BK:()=>i,H7:()=>u,N3:()=>a,QX:()=>c,VB:()=>n,Wr:()=>o});class r extends Error{constructor(t){super(t),this.name="CIRISError"}}class a extends r{constructor(t,e,s,r){super(e),this.status=t,this.detail=s,this.type=r,this.name="CIRISAPIError"}}class n extends r{constructor(t){super(t),this.name="CIRISAuthError"}}class i extends r{constructor(t){super(t),this.name="CIRISConnectionError"}}class o extends r{constructor(t){super(t),this.name="CIRISTimeoutError"}}class c extends a{constructor(t,e,s){super(429,"Rate limit exceeded. Retry after ".concat(t," seconds")),this.retryAfter=t,this.limit=e,this.window=s,this.name="CIRISRateLimitError"}}class u extends a{constructor(t,e,s,r,a){super(403,t),this.name="CIRISPermissionDeniedError",this.discordInvite=e,this.canRequestPermissions=s,this.permissionRequested=r,this.requestedAt=a}}},9388:(t,e,s)=>{s.d(e,{fz:()=>a,xt:()=>n});var r=s(5663);function a(t){return t?null!==t.string_value&&void 0!==t.string_value?t.string_value:null!==t.int_value&&void 0!==t.int_value?t.int_value:null!==t.float_value&&void 0!==t.float_value?t.float_value:null!==t.bool_value&&void 0!==t.bool_value?t.bool_value:null!==t.list_value&&void 0!==t.list_value?t.list_value:null!==t.dict_value&&void 0!==t.dict_value?t.dict_value:null:null}class n extends r.Q{async getAll(){return this.transport.get("/v1/config")}async updateMultiple(t){let e=await Promise.allSettled(Object.entries(t).map(t=>{let[e,s]=t;return this.set(e,s)})),s=[],r=[];return e.forEach((e,a)=>{let n=Object.keys(t)[a];"fulfilled"===e.status?s.push(n):r.push(n)}),{success:0===r.length,updated:s,failed:r,message:0===r.length?"All configurations updated":"".concat(r.length," updates failed")}}async get(t){return this.transport.get("/v1/config/".concat(t))}async set(t,e,s){return this.transport.put("/v1/config/".concat(t),{value:e,reason:s})}async delete(t){return this.transport.delete("/v1/config/".concat(t))}async getConfig(){let t=await this.getAll(),e={};return t.configs.forEach(t=>{e[t.key]=a(t.value)}),e}async updateConfig(t){return this.updateMultiple(t)}async getConfigByKey(t){let e=await this.get(t);return{key:e.key,value:a(e.value),updated_at:e.updated_at,updated_by:e.updated_by}}async updateConfigByKey(t,e,s){let r=await this.set(t,e,s);return{success:!0,key:r.key,new_value:a(r.value),message:"Configuration updated successfully"}}async getByPrefix(t){return this.transport.get("/v1/config?prefix=".concat(encodeURIComponent(t)))}}},9664:(t,e,s)=>{s.d(e,{MF:()=>a});var r=s(4338);let a={version:r.env.NEXT_PUBLIC_APP_VERSION,buildDate:new Date().toISOString(),gitHash:r.env.NEXT_PUBLIC_GIT_HASH||"development",gitBranch:r.env.NEXT_PUBLIC_GIT_BRANCH||"main"}},9684:(t,e,s)=>{s.d(e,{Lb:()=>a,jv:()=>n});var r=s(5663),a=function(t){return t.INTERACTION="interaction",t.PREFERENCE="preference",t.IMPROVEMENT="improvement",t.RESEARCH="research",t.SHARING="sharing",t}({});class n extends r.Q{async getStatus(){return this.transport.get("/v1/consent/status")}async grantConsent(t){let e=await this.transport.get("/v1/auth/me"),s={...t,user_id:e.user_id};return this.transport.post("/v1/consent/grant",s)}async revokeConsent(t){return this.transport.post("/v1/consent/revoke",{reason:t})}async getImpactReport(){return this.transport.get("/v1/consent/impact")}async getAuditTrail(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this.transport.get("/v1/consent/audit?limit=".concat(t))}async getStreams(){return this.transport.get("/v1/consent/streams")}async getCategories(){return this.transport.get("/v1/consent/categories")}async getPartnershipStatus(){return this.transport.get("/v1/consent/partnership/status")}async cleanupExpired(){return this.transport.post("/v1/consent/cleanup",{})}async requestPartnership(t,e){return this.grantConsent({stream:"partnered",categories:t,reason:e||"User requested partnership upgrade"})}async switchToTemporary(){return this.grantConsent({stream:"temporary",categories:[],reason:"User switched to temporary consent"})}async switchToAnonymous(){return this.grantConsent({stream:"anonymous",categories:[],reason:"User switched to anonymous consent"})}async hasPartnership(){return"partnered"===(await this.getStatus()).stream}async getTimeRemaining(){let t=await this.getStatus();return"temporary"===t.stream&&t.expires_at?Math.max(0,new Date(t.expires_at).getTime()-Date.now()):null}async pollPartnershipStatus(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:60,s=0;for(;s<e;){let e=await this.getPartnershipStatus();if(t&&t(e),"pending"!==e.partnership_status)return e;await new Promise(t=>setTimeout(t,5e3)),s++}return this.getPartnershipStatus()}async initiateDSARExport(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"full";return this.transport.post("/v1/consent/dsar/initiate",{request_type:t})}async getDSARStatus(t){return this.transport.get("/v1/consent/dsar/status/".concat(t))}async downloadConsentData(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"full",e=await this.initiateDSARExport(t),s=new Blob([JSON.stringify(e.export_data,null,2)],{type:"application/json"}),r=URL.createObjectURL(s),a=document.createElement("a");return a.href=r,a.download="ciris-consent-export-".concat(e.request_id,".json"),document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(r),e.request_id}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[704],{704:(t,e,s)=>{s.d(e,{AQ:()=>r.AQ,CIRISClient:()=>r.wG,Lb:()=>i.Lb,aS:()=>a.a,fz:()=>n.fz});var r=s(2987);s(3469),s(6690);var a=s(5950);s(3304);var n=s(9388),i=s(9684)},2987:(t,e,s)=>{s.d(e,{wG:()=>A,AQ:()=>L});var r=s(5950);class a{async checkLimit(t){let e=Date.now()/1e3;if(this.globalRemaining<=0&&e<this.globalReset)return!1;let s=this.getBucket(t);if(s.tokens<=0){let t=Math.floor((e-s.lastRefill)*(this.windowMs/1e3));t>0&&(s.tokens=Math.min(s.tokens+t,this.globalLimit),s.lastRefill=e)}return s.tokens>0}consumeToken(t){let e=this.getBucket(t);e.tokens=Math.max(0,e.tokens-1),this.globalRemaining=Math.max(0,this.globalRemaining-1)}updateFromHeaders(t){let e=e=>t instanceof Headers?t.get(e):t[e]||null,s=e("X-RateLimit-Limit"),r=e("X-RateLimit-Remaining"),a=e("X-RateLimit-Reset"),n=e("X-RateLimit-Window");s&&(this.globalLimit=parseInt(s,10)),r&&(this.globalRemaining=parseInt(r,10)),a&&(this.globalReset=parseInt(a,10)),n&&(this.windowMs=this.parseWindow(n))}getInfo(){return{limit:this.globalLimit,remaining:this.globalRemaining,reset:this.globalReset,window:"".concat(this.windowMs/1e3,"s")}}getRetryDelay(t){let e=Date.now()/1e3,s=Math.max(0,this.globalReset-e),r=this.baseDelayMs*Math.pow(2,t),a=.1*Math.random()*r;return Math.max(1e3*s,r+a)}getBucket(t){return this.buckets.has(t)||this.buckets.set(t,{tokens:this.globalLimit,lastRefill:Date.now()/1e3}),this.buckets.get(t)}parseWindow(t){let e=t.match(/^(\d+)([smh])$/);if(!e)return 6e4;let s=parseInt(e[1],10);switch(e[2]){case"s":return 1e3*s;case"m":return 60*s*1e3;case"h":return 60*s*6e4;default:return 6e4}}constructor(t=3,e=1e3){this.maxRetries=t,this.baseDelayMs=e,this.buckets=new Map,this.globalLimit=100,this.globalRemaining=100,this.globalReset=Date.now()/1e3,this.windowMs=6e4}}var n=s(6690);class i{async request(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.buildURL(e,s.params),a=null;for(let i=0;i<this.maxRetries;i++)try{if(this.rateLimiter&&!await this.rateLimiter.checkLimit(e)){let t=this.rateLimiter.getRetryDelay(i);await this.delay(t);continue}let a=this.buildHeaders(s.headers,s.skipAuth),n={method:t,headers:a,signal:AbortSignal.timeout(this.timeout)};s.body&&"GET"!==t&&(n.body=JSON.stringify(s.body),e.includes("/consent/grant")&&console.log("[CIRIS SDK] Consent request payload:",{url:r,method:t,body:s.body,stringified:JSON.stringify(s.body)}));let o=await fetch(r,n);return this.rateLimiter&&this.rateLimiter.updateFromHeaders(o.headers),this.rateLimiter&&this.rateLimiter.consumeToken(e),await this.handleResponse(o,s.responseType)}catch(t){if(a=t,t instanceof n.VB)throw t;if(t instanceof Error&&"AbortError"===t.name&&(a=new n.Wr("Request to ".concat(e," timed out after ").concat(this.timeout,"ms"))),t instanceof TypeError&&t.message.includes("fetch")&&(a=new n.BK("Failed to connect to ".concat(this.baseURL))),i<this.maxRetries-1){let t=Math.min(1e3*Math.pow(2,i),1e4);await this.delay(t);continue}}throw a||new n.BK("Request failed after retries")}async handleResponse(t){let e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"json";if(204===t.status)return null;if(401===t.status){console.error("401 Error Details:",{url:t.url,headers:Object.fromEntries(t.headers.entries()),status:t.status,statusText:t.statusText});try{let e=await t.json();console.error("401 Error Response:",e)}catch(t){console.error("Could not parse 401 error response")}throw r.a.clearToken(),this.onAuthError&&this.onAuthError(),new n.VB("Authentication failed")}if(429===t.status){let e=parseInt(t.headers.get("Retry-After")||"60",10),s=parseInt(t.headers.get("X-RateLimit-Limit")||"100",10),r=t.headers.get("X-RateLimit-Window")||"1m";throw new n.QX(e,s,r)}if(t.ok&&"json"!==s){if("blob"===s)return await t.blob();else if("text"===s)return await t.text()}let a="";try{e=(a=await t.text())?JSON.parse(a):{}}catch(s){if(console.error("[CIRIS SDK] Failed to parse JSON response:",{status:t.status,statusText:t.statusText,url:t.url,responseText:a.substring(0,500),error:s}),t.ok){if(a.includes("<!DOCTYPE")||a.includes("<html"))throw new n.N3(t.status,"Received HTML instead of JSON. The API endpoint may be incorrect or the server may be returning an error page.",a.substring(0,200));if(!a||""===a.trim())return{};throw new n.N3(t.status,"Failed to parse response as JSON",a.substring(0,200))}let e="HTTP ".concat(t.status," error");if(a.includes("<!DOCTYPE")||a.includes("<html")){let t=a.match(/<title>(.*?)<\/title>/i);t&&(e=t[1])}else a&&(e=a.substring(0,200));throw new n.N3(t.status,e,"Response was not valid JSON. This might indicate the API is down, the endpoint is incorrect, or there is a server error.")}if(!t.ok){let s=e;if(422===t.status&&console.error("[CIRIS SDK] 422 Validation Error:",{url:t.url,status:t.status,errorData:e,detail:s.detail,rawData:JSON.stringify(e)}),422===t.status&&Array.isArray(s.detail)){let e=s.detail.map(t=>{let e=Array.isArray(t.loc)?t.loc.join("."):t.loc;return"".concat(e,": ").concat(t.msg)}).join("; ");throw new n.N3(t.status,e||"Validation error",e,"validation_error")}if(403===t.status&&"error"in e&&"insufficient_permissions"===e.error){console.log("[CIRIS SDK] Creating PermissionDeniedError with Discord invite:",{message:e.message||s.detail||"Permission denied",discordInvite:e.discord_invite,canRequestPermissions:e.can_request_permissions,permissionRequested:e.permission_requested,requestedAt:e.requested_at});let t=new n.H7(e.message||s.detail||"Permission denied",e.discord_invite,e.can_request_permissions,e.permission_requested,e.requested_at);throw console.log("[CIRIS SDK] Throwing PermissionDeniedError:",t),t}throw new n.N3(t.status,s.detail||"HTTP ".concat(t.status," error"),s.detail,s.type)}return this.isSuccessResponse(e)?e.data:e}isSuccessResponse(t){return"object"==typeof t&&null!==t&&"data"in t&&"metadata"in t}buildURL(t,e){let s;if(t.startsWith("http://")||t.startsWith("https://"))s=new URL(t);else if(this.baseURL&&""!==this.baseURL)s=new URL(t.startsWith("/")?t.slice(1):t,this.baseURL.endsWith("/")?this.baseURL:this.baseURL+"/");else{let e=window.location.origin;s=new URL(t.startsWith("/")?t:"/"+t,e)}return e&&Object.entries(e).forEach(t=>{let[e,r]=t;null!=r&&s.searchParams.append(e,String(r))}),s.toString()}buildHeaders(t,e){let s={"Content-Type":"application/json",Accept:"application/json",...t};if(!e){let t=r.a.getAccessToken();if(t&&t===localStorage.getItem("manager_token"))return console.warn("[CIRIS SDK] Detected manager token, skipping auth for CIRIS SDK request"),s;t&&(s.Authorization="Bearer ".concat(t))}return s}delay(t){return new Promise(e=>setTimeout(e,t))}async get(t,e){return this.request("GET",t,e)}async post(t,e,s){return this.request("POST",t,{...s,body:e})}async put(t,e,s){return this.request("PUT",t,{...s,body:e})}async patch(t,e,s){return this.request("PATCH",t,{...s,body:e})}async delete(t,e){return this.request("DELETE",t,e)}setBaseURL(t){this.baseURL=t.replace(/\/$/,"")}getBaseURL(){return this.baseURL}setAuthToken(t){if(t){let e=r.a.getToken();e&&e.access_token===t||r.a.saveToken({access_token:t,token_type:"Bearer",expires_in:86400,user_id:"",role:"",created_at:Date.now()})}else r.a.clearToken()}constructor(t){this.baseURL=t.baseURL.replace(/\/$/,""),this.timeout=t.timeout||6e4,this.maxRetries=t.maxRetries||3,this.onAuthError=t.onAuthError,t.enableRateLimiting&&(this.rateLimiter=new a(this.maxRetries))}}var o=s(3304),c=s(5663);class u extends c.Q{async submitMessage(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.transport.post("/v1/agent/message",{message:t,channel_id:e.channel_id||"web_ui",context:e.context})}async interact(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.transport.post("/v1/agent/interact",{message:t,channel_id:e.channel_id||"web_ui",context:e.context})}async getStatus(){return this.transport.get("/v1/agent/status")}async getIdentity(){return this.transport.get("/v1/agent/identity")}async getHistory(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.transport.get("/v1/agent/history",{params:{channel_id:t.channel_id,limit:t.limit||50,offset:t.offset||0}})}async getChannels(){return(await this.transport.get("/v1/agent/channels")).channels||[]}async clearHistory(t){return this.transport.delete("/v1/agent/history/".concat(t))}async getMessage(t){return this.transport.get("/v1/agent/message/".concat(t))}}class l extends c.Q{async getHealth(){return this.transport.get("/v1/system/health")}async getServices(){return this.transport.get("/v1/system/services")}async getResources(){return this.transport.get("/v1/system/resources")}async pauseRuntime(){var t;let e=await this.transport.post("/v1/system/runtime/pause",{}),s=e.data||e;return{status:s.success?"success":"error",message:s.message||"Runtime paused",timestamp:(null==(t=e.metadata)?void 0:t.timestamp)||new Date().toISOString(),processor_state:s.processor_state,cognitive_state:s.cognitive_state}}async resumeRuntime(){var t;let e=await this.transport.post("/v1/system/runtime/resume",{}),s=e.data||e;return{status:s.success?"success":"error",message:s.message||"Runtime resumed",timestamp:(null==(t=e.metadata)?void 0:t.timestamp)||new Date().toISOString(),processor_state:s.processor_state,cognitive_state:s.cognitive_state}}async getRuntimeStatus(){let t=await this.transport.post("/v1/system/runtime/state",{});return{is_paused:"paused"===t.processor_state,processor_status:t.processor_state,health_status:"healthy",uptime_seconds:0,active_adapters:[],loaded_adapters:[]}}async getRuntimeState(){try{let[t,e]=await Promise.all([this.transport.get("/v1/system/health").catch(()=>null),this.transport.get("/v1/system/runtime/queue").catch(()=>null)]),s=(null==t?void 0:t.data)||t,r=(null==e?void 0:e.data)||e;return{success:!0,message:"Runtime state retrieved",processor_state:"running",cognitive_state:(null==s?void 0:s.cognitive_state)||"work",queue_depth:(null==r?void 0:r.queue_size)||0}}catch(t){return{success:!1,message:"Failed to retrieve runtime state",processor_state:"unknown",cognitive_state:"work",queue_depth:0}}}async pauseProcessor(t,e){return this.transport.post("/v1/system/processors/".concat(t,"/pause"),{duration:e})}async resumeProcessor(t){return this.transport.post("/v1/system/processors/".concat(t,"/resume"))}async getAdapters(){return this.transport.get("/v1/system/adapters")}async getAdapter(t){return this.transport.get("/v1/system/adapters/".concat(t))}async registerAdapter(t,e){return this.transport.post("/v1/system/adapters/".concat(t),{config:e})}async unregisterAdapter(t){return this.transport.delete("/v1/system/adapters/".concat(t))}async reloadAdapter(t){return this.transport.put("/v1/system/adapters/".concat(t,"/reload"))}async restartService(t){return this.transport.post("/v1/system/services/".concat(t,"/restart"))}async pauseAdapter(t,e){return this.transport.post("/v1/system/adapters/".concat(t,"/pause"),{duration:e})}async resumeAdapter(t){return this.transport.post("/v1/system/adapters/".concat(t,"/resume"))}async getProcessingQueueStatus(){return this.transport.get("/v1/system/runtime/queue")}async singleStepProcessor(){return this.transport.post("/v1/system/runtime/step")}async singleStepProcessorEnhanced(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0],e=await this.transport.post(t?"/v1/system/runtime/step?include_details=true":"/v1/system/runtime/step",{}),s=e.data||e;return{success:s.success||!1,message:s.message||"Single step completed",step_point:s.step_point||null,step_result:s.step_result||null,processing_time_ms:s.processing_time_ms||0,tokens_used:s.tokens_used||0,processor_state:s.processor_state||"unknown",cognitive_state:s.cognitive_state||"work",queue_depth:s.queue_depth||0,pipeline_state:s.pipeline_state||null,demo_data:s.demo_data||null}}async getServiceHealthDetails(){return this.transport.get("/v1/system/services/health")}async updateServicePriority(t,e){return this.transport.put("/v1/system/services/".concat(t,"/priority"),e)}async resetCircuitBreakers(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.transport.post("/v1/system/services/circuit-breakers/reset",t)}async getServiceSelectionExplanation(){return this.transport.get("/v1/system/services/selection-logic")}async getProcessorStates(){return this.transport.get("/v1/system/processors")}async transitionState(t){let e=await this.transport.post("/v1/system/state/transition",t);return e.data||e}async getTime(){return this.transport.get("/v1/system/time")}async shutdown(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.transport.post("/v1/system/shutdown",{reason:t,confirm:e,force:s})}async getTools(){return this.transport.get("/v1/system/tools")}}class h extends c.Q{async query(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=t&&(t.toLowerCase().startsWith("metric_")||t.toLowerCase().startsWith("audit_")||t.toLowerCase().startsWith("log_")||t.toLowerCase().startsWith("dream_schedule_")||t.toLowerCase().startsWith("thought_")||t.toLowerCase().startsWith("thought/")||t.toLowerCase().startsWith("task_")||t.toLowerCase().startsWith("observation_")||t.toLowerCase().startsWith("concept_")||t.toLowerCase().startsWith("identity_")||t.toLowerCase().startsWith("config_")||t.toLowerCase().startsWith("config:")||t.toLowerCase().startsWith("tsdb_data_")||t.toLowerCase().startsWith("conversation_summary_")||t.toLowerCase().startsWith("trace_summary_")||t.toLowerCase().startsWith("audit_summary_")||t.toLowerCase().startsWith("tsdb_summary_")||t.toLowerCase().startsWith("user_")||t.toLowerCase().startsWith("user/")||t.toLowerCase().startsWith("shutdown_")||t.toLowerCase().startsWith("edge_")||t.toLowerCase().startsWith("datum-")||/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(t)||t.includes("_")&&!t.startsWith("_")&&/\d{10}/.test(t)),r={...s?{node_id:t}:{query:t},...e};console.log("Memory query:",{query:t,isNodeId:s,body:r});let a=await this.transport.post("/v1/memory/query",r);return console.log("Memory query response:",a),Array.isArray(a)?a:a.data||a}async getNode(t){return this.transport.get("/v1/memory/".concat(encodeURIComponent(t)))}async recall(t){return this.transport.get("/v1/memory/recall/".concat(encodeURIComponent(t)))}async createNode(t){return this.transport.post("/v1/memory/store",t)}async updateNode(t,e){return this.transport.patch("/v1/memory/".concat(encodeURIComponent(t)),e)}async deleteNode(t){return this.transport.delete("/v1/memory/".concat(encodeURIComponent(t)))}async getStats(){return this.transport.get("/v1/memory/stats")}async search(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(await this.transport.post("/v1/memory/query",{query:t,...e})).results||[]}async getTimeline(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.transport.get("/v1/memory/timeline",{params:t})}async getRelated(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.transport.get("/v1/memory/".concat(encodeURIComponent(t),"/related"),{params:e})}async getVisualization(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return await this.transport.get("/v1/memory/visualize/graph",{params:t,responseType:"text"})}async createEdge(t){return this.transport.post("/v1/memory/edges",{edge:t})}async getNodeEdges(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";return this.transport.get("/v1/memory/".concat(encodeURIComponent(t),"/edges"),{params:{scope:e}})}async queryWithEdges(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.query(t,{...e,include_edges:!0})}}class p extends c.Q{async getEntries(t){var e;let s=await this.transport.get("/v1/audit/entries",t);return{items:s.entries||[],total:(null==(e=s.entries)?void 0:e.length)||0,page:(null==t?void 0:t.page)||1,page_size:(null==t?void 0:t.page_size)||100,has_next:!1,has_prev:!1}}async getEntry(t){return this.transport.get("/v1/audit/entries/".concat(t))}async exportEntries(t){return await this.transport.get("/v1/audit/export",{...t,responseType:"blob"})}async searchEntries(t){return this.transport.post("/v1/audit/search",t||{})}async verifyEntry(t){return this.transport.get("/v1/audit/verify/".concat(t))}}var g=s(9388);class d extends c.Q{async getLogs(t,e,s){return"string"==typeof t||void 0===t?(await this.transport.get("/v1/telemetry/logs",{params:{level:t,service:e,limit:s||100}})).logs||[]:this.transport.get("/v1/telemetry/logs",t)}async getMetrics(t){return this.transport.get("/v1/telemetry/metrics",t)}async getMetricDetail(t){return this.transport.get("/v1/telemetry/metrics/".concat(t))}async getOverview(t){return this.transport.get("/v1/telemetry/overview",t)}async query(t){return this.transport.post("/v1/telemetry/query",t)}async getResources(){return this.transport.get("/v1/telemetry/resources")}async getResourceHistory(t){return this.transport.get("/v1/telemetry/resources/history",t)}async getTraces(t){return this.transport.get("/v1/telemetry/traces",t)}async getIncidents(t){return(await this.transport.get("/v1/telemetry/logs",{params:{level:"ERROR",limit:(null==t?void 0:t.limit)||50,service:null==t?void 0:t.service}})).logs||[]}}class m extends c.Q{async getDeferrals(t){return(await this.transport.get("/v1/wa/deferrals",t)).deferrals||[]}async resolveDeferral(t,e,s,r){return this.transport.post("/v1/wa/deferrals/".concat(t,"/resolve"),{resolution:"deny"===e?"reject":e,guidance:s})}async requestGuidance(t){return this.transport.post("/v1/wa/guidance",t)}async getPermissions(t){return this.transport.get("/v1/wa/permissions",t)}async getStatus(){return this.transport.get("/v1/wa/status")}}class y extends c.Q{async shutdown(t){return this.transport.post("/emergency/shutdown",t,{skipAuth:!0,headers:{"X-Emergency-Signature":t.signature}})}async test(){return this.transport.get("/emergency/test")}}class v extends c.Q{async list(t){return this.transport.get("/v1/users",{params:t})}async get(t){return this.transport.get("/v1/users/".concat(t))}async create(t){return this.transport.post("/v1/users",t)}async update(t,e){return this.transport.put("/v1/users/".concat(t),e)}async changePassword(t,e){return this.transport.put("/v1/users/".concat(t,"/password"),e)}async mintWiseAuthority(t,e){return this.transport.post("/v1/users/".concat(t,"/mint-wa"),e)}async deactivate(t){return this.transport.delete("/v1/users/".concat(t))}async listAPIKeys(t){return this.transport.get("/v1/users/".concat(t,"/api-keys"))}async checkWAKeyExists(t){return this.transport.get("/v1/users/wa/key-check",{params:{path:t}})}async requestPermissions(){return this.transport.post("/v1/users/request-permissions")}async getPermissionRequests(){return this.transport.get("/v1/users/permission-requests")}async grantPermissions(t,e){return this.transport.put("/v1/users/".concat(t,"/permissions"),e)}async linkOAuthAccount(t,e){return this.transport.post("/v1/users/".concat(t,"/oauth-links"),e)}async unlinkOAuthAccount(t,e,s){return this.transport.delete("/v1/users/".concat(t,"/oauth-links/").concat(e,"/").concat(s))}async getMySettings(){return this.transport.get("/v1/users/me/settings")}async updateMySettings(t){return this.transport.put("/v1/users/me/settings",t)}}class w extends c.Q{async listAgents(){let t="".concat(window.location.origin,"/manager/v1/agents");return(await this.transport.request("GET",t,{skipAuth:!0})).agents||[]}async getAgent(t){let e="".concat(window.location.origin,"/manager/v1/agents/").concat(t);return this.transport.request("GET",e,{skipAuth:!0})}async health(){let t="".concat(window.location.origin,"/manager/v1/health");return this.transport.request("GET",t,{skipAuth:!0})}}var _=s(9684);class R extends c.Q{async submitRequest(t){return this.transport.post("/v1/dsr/submit",t,{skipAuth:!0})}async checkStatus(t){return this.transport.get("/v1/dsr/status/".concat(t),{skipAuth:!0})}async listRequests(){return this.transport.get("/v1/dsr/admin/requests")}async updateRequest(t,e,s){return this.transport.put("/v1/dsr/admin/requests/".concat(t),{status:e,response:s})}}class f extends c.Q{async getCredits(){return this.transport.get("/v1/api/billing/credits")}async initiatePurchase(t){return this.transport.post("/v1/api/billing/purchase/initiate",t||{})}async getPurchaseStatus(t){return this.transport.get("/v1/api/billing/purchase/status/".concat(t))}async getTransactions(t){let e=new URLSearchParams;(null==t?void 0:t.limit)&&e.append("limit",t.limit.toString()),(null==t?void 0:t.offset)&&e.append("offset",t.offset.toString());let s=e.toString();return this.transport.get("/v1/api/billing/transactions".concat(s?"?".concat(s):""))}}class k extends c.Q{async getStatus(){return this.transport.get("/v1/setup/status")}async getProviders(){return this.transport.get("/v1/setup/providers")}async validateLLM(t){return this.transport.post("/v1/setup/validate-llm",t)}async getTemplates(){return this.transport.get("/v1/setup/templates")}async getAdapters(){return this.transport.get("/v1/setup/adapters")}async complete(t){return this.transport.post("/v1/setup/complete",t)}async getConfig(){return this.transport.get("/v1/setup/config")}async updateConfig(t){return this.transport.put("/v1/setup/config",t)}}var S=s(9664);s(3469);var b=s(4338);class A{async login(t,e){return this.auth.login(t,e)}async logout(){return this.auth.logout()}isAuthenticated(){return this.auth.isAuthenticated()}getCurrentUser(){return this.auth.getCurrentUser()}setConfig(t){t.baseURL&&this.transport.setBaseURL(t.baseURL),void 0!==t.authToken&&this.transport.setAuthToken(t.authToken)}getVersion(){return S.MF}getVersionString(){return S.MF.version}setBaseURL(t){this.transport.setBaseURL(t)}getBaseURL(){return this.transport.getBaseURL()}withConfig(t){let e=new A({baseURL:t.baseURL||this.transport.getBaseURL(),timeout:t.timeout,maxRetries:t.maxRetries,enableRateLimiting:t.enableRateLimiting,onAuthError:t.onAuthError});return t.authToken&&e.transport.setAuthToken(t.authToken),e}async interact(t,e){return this.agent.interact(t,e)}async getStatus(){return this.agent.getStatus()}async getHealth(){return this.system.getHealth()}constructor(t={}){let e;e="localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname?b.env.NEXT_PUBLIC_API_BASE_URL||"http://localhost:8080":"";let s={baseURL:t.baseURL||e,timeout:t.timeout,maxRetries:t.maxRetries,enableRateLimiting:!1!==t.enableRateLimiting,onAuthError:t.onAuthError||(()=>{"/login"!==window.location.pathname&&(window.location.href="/login")})};this.transport=new i(s),this.auth=new o.p(this.transport),this.agent=new u(this.transport),this.system=new l(this.transport),this.memory=new h(this.transport),this.audit=new p(this.transport),this.config=new g.xt(this.transport),this.telemetry=new d(this.transport),this.wiseAuthority=new m(this.transport),this.emergency=new y(this.transport),this.users=new v(this.transport),this.manager=new w(this.transport),this.consent=new _.jv(this.transport),this.dsar=new R(this.transport),this.billing=new f(this.transport),this.setup=new k(this.transport)}}let L=(()=>{let t;return console.log("[CIRIS SDK] Creating default client with baseURL:",t="localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname?b.env.NEXT_PUBLIC_API_BASE_URL||"http://localhost:8080":""),new A({baseURL:t})})()},3304:(t,e,s)=>{s.d(e,{p:()=>i});var r=s(5663),a=s(5950),n=s(6690);class i extends r.Q{async login(t,e){try{let s=await this.transport.post("/v1/auth/login",{username:t,password:e},{skipAuth:!0}),r={access_token:s.access_token,token_type:s.token_type,expires_in:s.expires_in,user_id:s.user_id,role:s.role,created_at:Date.now()};a.a.saveToken(r);let n=await this.getMe();return a.a.saveUser(n),n}catch(t){throw new n.VB(this.buildErrorMessage("login",t.message))}}async logout(){try{await this.transport.post("/v1/auth/logout")}catch(t){}finally{a.a.clearToken()}}async getMe(){return this.transport.get("/v1/auth/me")}isAuthenticated(){return a.a.isAuthenticated()}getCurrentUser(){return a.a.getUser()}getAccessToken(){return a.a.getAccessToken()}async refresh(){try{let t=await this.transport.post("/v1/auth/refresh"),e={access_token:t.access_token,token_type:t.token_type,expires_in:t.expires_in,user_id:t.user_id,role:t.role,created_at:Date.now()};return a.a.saveToken(e),t}catch(t){throw new n.VB(this.buildErrorMessage("refresh",t.message))}}async listOAuthProviders(){return this.transport.get("/v1/auth/oauth/providers")}async configureOAuthProvider(t,e,s,r){return this.transport.post("/v1/auth/oauth/providers",{provider:t,client_id:e,client_secret:s,metadata:r||void 0})}async initiateOAuthLogin(t,e){return this.transport.get("/v1/auth/oauth/".concat(t,"/login"),{params:e?{redirect_uri:e}:void 0,skipAuth:!0})}async handleOAuthCallback(t,e,s){try{let r=await this.transport.get("/v1/auth/oauth/".concat(t,"/callback"),{params:{code:e,state:s},skipAuth:!0}),n={access_token:r.access_token,token_type:r.token_type,expires_in:r.expires_in,user_id:r.user_id,role:r.role,created_at:Date.now()};a.a.saveToken(n);let i=await this.getMe();return a.a.saveUser(i),i}catch(t){throw new n.VB(this.buildErrorMessage("OAuth callback",t.message))}}async createAPIKey(t,e){return this.transport.post("/v1/auth/api-keys",{description:t,expires_in_minutes:e})}async listAPIKeys(){return this.transport.get("/v1/auth/api-keys")}async deleteAPIKey(t){return this.transport.delete("/v1/auth/api-keys/".concat(t))}}},3469:(t,e,s)=>{},5663:(t,e,s)=>{s.d(e,{Q:()=>r});class r{buildErrorMessage(t,e){let s="Failed to ".concat(t);return e?"".concat(s,": ").concat(e):s}constructor(t){this.transport=t}}},5950:(t,e,s)=>{s.d(e,{a:()=>a});var r=s(7932);class a{static saveToken(t){{let e={...t,created_at:Date.now()};window.localStorage&&localStorage.setItem(this.STORAGE_KEY,JSON.stringify(e)),r.A.set("auth_token",t.access_token,{expires:t.expires_in/86400})}}static getToken(){if(!window.localStorage)return null;let t=localStorage.getItem(this.STORAGE_KEY);if(!t)return null;try{let e=JSON.parse(t),s=e.created_at+1e3*e.expires_in;if(Date.now()>s)return this.clearToken(),null;return e}catch(t){return this.clearToken(),null}}static clearToken(){window.localStorage&&(localStorage.removeItem(this.STORAGE_KEY),localStorage.removeItem(this.USER_KEY)),r.A.remove("auth_token")}static saveUser(t){window.localStorage&&localStorage.setItem(this.USER_KEY,JSON.stringify(t))}static getUser(){if(!window.localStorage)return null;let t=localStorage.getItem(this.USER_KEY);if(!t)return null;try{return JSON.parse(t)}catch(t){return null}}static isAuthenticated(){return null!==this.getToken()}static getAccessToken(){let t=this.getToken();return t?t.access_token:r.A.get("auth_token")||null}}a.STORAGE_KEY="ciris_auth_token",a.USER_KEY="ciris_auth_user"},6690:(t,e,s)=>{s.d(e,{BK:()=>i,H7:()=>u,N3:()=>a,QX:()=>c,VB:()=>n,Wr:()=>o});class r extends Error{constructor(t){super(t),this.name="CIRISError"}}class a extends r{constructor(t,e,s,r){super(e),this.status=t,this.detail=s,this.type=r,this.name="CIRISAPIError"}}class n extends r{constructor(t){super(t),this.name="CIRISAuthError"}}class i extends r{constructor(t){super(t),this.name="CIRISConnectionError"}}class o extends r{constructor(t){super(t),this.name="CIRISTimeoutError"}}class c extends a{constructor(t,e,s){super(429,"Rate limit exceeded. Retry after ".concat(t," seconds")),this.retryAfter=t,this.limit=e,this.window=s,this.name="CIRISRateLimitError"}}class u extends a{constructor(t,e,s,r,a){super(403,t),this.name="CIRISPermissionDeniedError",this.discordInvite=e,this.canRequestPermissions=s,this.permissionRequested=r,this.requestedAt=a}}},9388:(t,e,s)=>{s.d(e,{fz:()=>a,xt:()=>n});var r=s(5663);function a(t){return t?null!==t.string_value&&void 0!==t.string_value?t.string_value:null!==t.int_value&&void 0!==t.int_value?t.int_value:null!==t.float_value&&void 0!==t.float_value?t.float_value:null!==t.bool_value&&void 0!==t.bool_value?t.bool_value:null!==t.list_value&&void 0!==t.list_value?t.list_value:null!==t.dict_value&&void 0!==t.dict_value?t.dict_value:null:null}class n extends r.Q{async getAll(){return this.transport.get("/v1/config")}async updateMultiple(t){let e=await Promise.allSettled(Object.entries(t).map(t=>{let[e,s]=t;return this.set(e,s)})),s=[],r=[];return e.forEach((e,a)=>{let n=Object.keys(t)[a];"fulfilled"===e.status?s.push(n):r.push(n)}),{success:0===r.length,updated:s,failed:r,message:0===r.length?"All configurations updated":"".concat(r.length," updates failed")}}async get(t){return this.transport.get("/v1/config/".concat(t))}async set(t,e,s){return this.transport.put("/v1/config/".concat(t),{value:e,reason:s})}async delete(t){return this.transport.delete("/v1/config/".concat(t))}async getConfig(){let t=await this.getAll(),e={};return t.configs.forEach(t=>{e[t.key]=a(t.value)}),e}async updateConfig(t){return this.updateMultiple(t)}async getConfigByKey(t){let e=await this.get(t);return{key:e.key,value:a(e.value),updated_at:e.updated_at,updated_by:e.updated_by}}async updateConfigByKey(t,e,s){let r=await this.set(t,e,s);return{success:!0,key:r.key,new_value:a(r.value),message:"Configuration updated successfully"}}async getByPrefix(t){return this.transport.get("/v1/config?prefix=".concat(encodeURIComponent(t)))}}},9664:(t,e,s)=>{s.d(e,{MF:()=>a});var r=s(4338);let a={version:r.env.NEXT_PUBLIC_APP_VERSION,buildDate:new Date().toISOString(),gitHash:r.env.NEXT_PUBLIC_GIT_HASH||"development",gitBranch:r.env.NEXT_PUBLIC_GIT_BRANCH||"main"}},9684:(t,e,s)=>{s.d(e,{Lb:()=>a,jv:()=>n});var r=s(5663),a=function(t){return t.INTERACTION="interaction",t.PREFERENCE="preference",t.IMPROVEMENT="improvement",t.RESEARCH="research",t.SHARING="sharing",t}({});class n extends r.Q{async getStatus(){return this.transport.get("/v1/consent/status")}async grantConsent(t){let e=await this.transport.get("/v1/auth/me"),s={...t,user_id:e.user_id};return this.transport.post("/v1/consent/grant",s)}async revokeConsent(t){return this.transport.post("/v1/consent/revoke",{reason:t})}async getImpactReport(){return this.transport.get("/v1/consent/impact")}async getAuditTrail(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this.transport.get("/v1/consent/audit?limit=".concat(t))}async getStreams(){return this.transport.get("/v1/consent/streams")}async getCategories(){return this.transport.get("/v1/consent/categories")}async getPartnershipStatus(){return this.transport.get("/v1/consent/partnership/status")}async cleanupExpired(){return this.transport.post("/v1/consent/cleanup",{})}async requestPartnership(t,e){return this.grantConsent({stream:"partnered",categories:t,reason:e||"User requested partnership upgrade"})}async switchToTemporary(){return this.grantConsent({stream:"temporary",categories:[],reason:"User switched to temporary consent"})}async switchToAnonymous(){return this.grantConsent({stream:"anonymous",categories:[],reason:"User switched to anonymous consent"})}async hasPartnership(){return"partnered"===(await this.getStatus()).stream}async getTimeRemaining(){let t=await this.getStatus();return"temporary"===t.stream&&t.expires_at?Math.max(0,new Date(t.expires_at).getTime()-Date.now()):null}async pollPartnershipStatus(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:60,s=0;for(;s<e;){let e=await this.getPartnershipStatus();if(t&&t(e),"pending"!==e.partnership_status)return e;await new Promise(t=>setTimeout(t,5e3)),s++}return this.getPartnershipStatus()}async initiateDSARExport(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"full";return this.transport.post("/v1/consent/dsar/initiate",{request_type:t})}async getDSARStatus(t){return this.transport.get("/v1/consent/dsar/status/".concat(t))}async downloadConsentData(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"full",e=await this.initiateDSARExport(t),s=new Blob([JSON.stringify(e.export_data,null,2)],{type:"application/json"}),r=URL.createObjectURL(s),a=document.createElement("a");return a.href=r,a.download="ciris-consent-export-".concat(e.request_id,".json"),document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(r),e.request_id}}}}]);