adminizer 5.0.0-build.2 → 5.0.0-build.21

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 (300) hide show
  1. package/assets/abnfDiagram-VCTEODGH-CkmsvdDi.js +1 -0
  2. package/assets/add-CESPH_aI.js +1 -0
  3. package/assets/add-group-CQ4Xm8Ru.js +1 -0
  4. package/assets/add-user-B-QNjR4B.js +1 -0
  5. package/assets/ai-assistant/agent.es.js +28362 -0
  6. package/assets/app-C5Ju5Zra.css +1 -0
  7. package/assets/app-Ca5yUSBv.js +138 -0
  8. package/assets/arc-B-Dt8YNl.js +1 -0
  9. package/assets/architectureDiagram-5GKGNRK7-Ca58kq-l.js +36 -0
  10. package/assets/asmcrypto-DZeQH0LC.js +1 -0
  11. package/assets/blockDiagram-NRAW4CY4-CuqE52IG.js +129 -0
  12. package/assets/c4Diagram-UCG6FXSJ-Cx8z-0Bw.js +38 -0
  13. package/assets/catalog-CkSbxvx0.js +6 -0
  14. package/assets/channel-C9z6Pi_j.js +1 -0
  15. package/assets/chunk-2Q5K7J3B-CXISVKTC.js +1 -0
  16. package/assets/chunk-5VM5RSS4-DYGeeVYe.js +15 -0
  17. package/assets/chunk-F27PBJKO-BeY-dbKj.js +1 -0
  18. package/assets/chunk-G27WJ6UU-DeX_eH7C.js +231 -0
  19. package/assets/chunk-JWPE2WC7-DaxI9q0u.js +1 -0
  20. package/assets/chunk-LCL6LL3I-B7PkaEz_.js +206 -0
  21. package/assets/chunk-POPQ4Y6H-lwu6ZpsN.js +1 -0
  22. package/assets/chunk-SVP7TREG-CVFllgl1.js +88 -0
  23. package/assets/chunk-XXDRQBXY-DDLN0rcg.js +1 -0
  24. package/assets/classDiagram-DTDB5LWJ-BKtCIC3B.js +1 -0
  25. package/assets/classDiagram-v2-JRS7N3AN-BKtCIC3B.js +1 -0
  26. package/assets/controls/ckeditor.es.js +9370 -9306
  27. package/assets/controls/handsontable.es.js +11971 -11938
  28. package/assets/controls/jsoneditor.es.js +13104 -13008
  29. package/assets/controls/leaflet.es.js +1023 -1004
  30. package/assets/controls/toast-ui.es.js +1843 -1834
  31. package/assets/cose-bilkent-JH36ORCC-CWRyUkhQ.js +1 -0
  32. package/assets/cynefin-OW5HDTMX-B1iLDXCC.js +166 -0
  33. package/assets/cynefinDiagram-5FMLGOSQ-DaXQHr3l.js +62 -0
  34. package/assets/cytoscape.esm-yzknjiTM.js +321 -0
  35. package/assets/dagre-3AP2YEHR-DFORa4Hz.js +4 -0
  36. package/assets/dashboard-Ssa1_Of3.js +3 -0
  37. package/assets/debounce-B3mXI_sx.js +1 -0
  38. package/assets/defaultLocale-DX6XiGOO.js +1 -0
  39. package/assets/diagram-S7CK7UJ4-CgP6KBo0.js +30 -0
  40. package/assets/diagram-UQ7AKVKN-oYfQe6w0.js +41 -0
  41. package/assets/diagram-VSXAHHWV-DfCU5wgt.js +3 -0
  42. package/assets/diagram-VX7I27RA-BITJVrNY.js +24 -0
  43. package/assets/diagram-Z3DM3KII-D8J9Ssjy.js +24 -0
  44. package/assets/docs-DHMt_Rq1.js +1 -0
  45. package/assets/ebnfDiagram-PWID7BFC-qpNmoYgx.js +1 -0
  46. package/assets/erDiagram-SSCWMZ5O-DDF-Y0zs.js +99 -0
  47. package/assets/flowDiagram-A5DVABFB-CjKVkR9T.js +168 -0
  48. package/assets/ganttDiagram-EL5Y4UJY-BXGQ53w6.js +292 -0
  49. package/assets/gitGraphDiagram-WWUBYQGX-BLMevdLh.js +106 -0
  50. package/assets/history-tBOo2gd5.js +1 -0
  51. package/assets/infoDiagram-RXCK75RN-BAnPdnyw.js +2 -0
  52. package/assets/init-Gi6I4Gst.js +1 -0
  53. package/assets/init-user-DrNUHa6r.js +1 -0
  54. package/assets/isObject-DL-BuaBl.js +1 -0
  55. package/assets/ishikawaDiagram-5VMMS53U-PnL0Z4Li.js +70 -0
  56. package/assets/journeyDiagram-EYS64GPL-CLcsCSwF.js +139 -0
  57. package/assets/kanban-definition-3QL26DDD-C2eU3uBE.js +89 -0
  58. package/assets/katex-HP8lGamR.js +257 -0
  59. package/assets/layout-BXoYdHdx.js +1 -0
  60. package/assets/linear-BSzrP0oP.js +1 -0
  61. package/assets/list-CLg6xeIK.js +4 -0
  62. package/assets/login-Ce7o3-o_.js +1 -0
  63. package/assets/manifest.json +834 -58
  64. package/assets/{media-manager-BDbpSSjH.js → media-manager-D7G1P3fz.js} +3 -3
  65. package/assets/mermaid.core-aKMJHeEk.js +310 -0
  66. package/assets/mindmap-definition-FBJOCRG2-Dzbz5ghA.js +96 -0
  67. package/assets/module-BsXph_pA.js +1 -0
  68. package/assets/notification-D-Zz1gF_.js +20 -0
  69. package/assets/ordinal-Cboi1Yqb.js +1 -0
  70. package/assets/pegDiagram-XKGWAZYB-BTdWkU0Y.js +1 -0
  71. package/assets/pieDiagram-E7YTZNPT-Dnw8-TB-.js +39 -0
  72. package/assets/quadrantDiagram-AXDQQJYC-CALzLlg9.js +7 -0
  73. package/assets/railroadDiagram-O6MQD6OU-CTA1vzcv.js +1 -0
  74. package/assets/register-CNnBkzej.js +1 -0
  75. package/assets/requirementDiagram-EFPCY7ZU-UX2CF5HA.js +84 -0
  76. package/assets/ru-CoNgAwFK.js +1 -0
  77. package/assets/sankeyDiagram-P5KCCOFB-4aPp3ATV.js +40 -0
  78. package/assets/sequenceDiagram-WJ2MYXX4--kltkwJw.js +162 -0
  79. package/assets/sizeCapture-X5ZJPWSS-Ca9-g5QY.js +1 -0
  80. package/assets/stateDiagram-HBIQ2CUA-Diaf5Q7I.js +1 -0
  81. package/assets/stateDiagram-v2-4QOOHH4V-C6FlRp7u.js +1 -0
  82. package/assets/swimlanes-XN3QIQJK-DhqX_myE.js +1 -0
  83. package/assets/swimlanesDiagram-VK2B7HYN-i_3LTEBk.js +8 -0
  84. package/assets/timeline-definition-24CTP7MA-CwkJQbhq.js +120 -0
  85. package/assets/toNumber-DZb-r9sy.js +1 -0
  86. package/assets/use-appearance-DC-DESKB.js +1 -0
  87. package/assets/user-filters-list-W47DTBp2.js +1 -0
  88. package/assets/vennDiagram-4TSXK5OY-BNM3_cVS.js +34 -0
  89. package/assets/wardleyDiagram-VM6X3IG4-BODb1NP8.js +78 -0
  90. package/assets/welcome-BeBm6NIi.js +1 -0
  91. package/assets/with-app-layout-B90DtzYC.js +31 -0
  92. package/assets/xychartDiagram-S5SC5T6Z-DthqEh3g.js +7 -0
  93. package/controllers/access-rights/permissionOptions.d.ts +2 -0
  94. package/controllers/access-rights/permissionOptions.js +23 -0
  95. package/controllers/add.js +1 -1
  96. package/controllers/addGroup.js +15 -6
  97. package/controllers/ai/AiAgentController.d.ts +66 -0
  98. package/controllers/ai/AiAgentController.js +435 -0
  99. package/controllers/ai/AiAssistantController.d.ts +0 -4
  100. package/controllers/ai/AiAssistantController.js +4 -78
  101. package/controllers/catalog/FrontendCatalogAdapter.d.ts +1 -1
  102. package/controllers/catalog/FrontentCatalogAdapter.d.ts +1 -1
  103. package/controllers/docs/index.d.ts +22 -0
  104. package/controllers/docs/index.js +126 -0
  105. package/controllers/edit.js +1 -1
  106. package/controllers/editGroup.js +15 -6
  107. package/controllers/feedback/feedbackController.d.ts +1 -1
  108. package/controllers/filter-fields/savedFilters.js +1 -1
  109. package/controllers/history-actions/HistoryController.d.ts +1 -1
  110. package/controllers/history-actions/HistoryController.js +6 -6
  111. package/controllers/list.js +1 -1
  112. package/controllers/login.js +1 -1
  113. package/controllers/media-manager/mediaManagerAdapter.d.ts +1 -1
  114. package/controllers/notifications/NotificationController.js +14 -8
  115. package/controllers/view.js +2 -2
  116. package/controllers/widgets/filterInfo.js +1 -1
  117. package/helpers/accessRightsHelper.d.ts +11 -4
  118. package/helpers/accessRightsHelper.js +82 -12
  119. package/helpers/assetVersionHelper.d.ts +14 -0
  120. package/helpers/assetVersionHelper.js +42 -0
  121. package/helpers/configHelper.d.ts +3 -3
  122. package/helpers/configHelper.js +20 -18
  123. package/helpers/controllerHelper.d.ts +3 -2
  124. package/helpers/controllerHelper.js +25 -15
  125. package/helpers/fieldsHelper.d.ts +2 -2
  126. package/helpers/fieldsHelper.js +3 -3
  127. package/helpers/filterDatetimeHelper.d.ts +1 -1
  128. package/helpers/inertiaActionsHelper.d.ts +3 -3
  129. package/helpers/inertiaActionsHelper.js +4 -5
  130. package/helpers/inertiaAddHelper.d.ts +5 -5
  131. package/helpers/inertiaAddHelper.js +7 -6
  132. package/helpers/inertiaGroupHelper.d.ts +3 -3
  133. package/helpers/inertiaGroupHelper.js +10 -2
  134. package/helpers/inertiaListHelper.d.ts +4 -4
  135. package/helpers/inertiaListHelper.js +7 -8
  136. package/helpers/inertiaMenuHelper.d.ts +2 -3
  137. package/helpers/inertiaMenuHelper.js +3 -26
  138. package/helpers/inertiaUserHelper.d.ts +3 -3
  139. package/helpers/menuHelper.d.ts +2 -2
  140. package/helpers/modelResourceHelper.d.ts +9 -0
  141. package/helpers/modelResourceHelper.js +43 -0
  142. package/helpers/navigationAccessHelper.d.ts +13 -0
  143. package/helpers/navigationAccessHelper.js +40 -0
  144. package/helpers/translationHelper.d.ts +2 -2
  145. package/index.d.ts +69 -58
  146. package/index.js +11 -0
  147. package/interfaces/adminpanelConfig.d.ts +18 -5
  148. package/interfaces/global.d.ts +6 -6
  149. package/interfaces/internalModelAccess.d.ts +1 -1
  150. package/interfaces/listQueryBuilder.d.ts +1 -1
  151. package/interfaces/types.d.ts +171 -2
  152. package/lib/Adminizer.d.ts +46 -26
  153. package/lib/Adminizer.js +37 -1
  154. package/lib/DataAccessor.d.ts +7 -6
  155. package/lib/DataAccessor.js +50 -48
  156. package/lib/MiddlewareManager.d.ts +1 -1
  157. package/lib/access-rights/AccessRightsHandler.d.ts +2 -2
  158. package/lib/admin-links/AdminLinkHandler.d.ts +72 -0
  159. package/lib/admin-links/AdminLinkHandler.js +175 -0
  160. package/lib/ai-assistant/AbstractAiConversationHistoryService.d.ts +39 -0
  161. package/lib/ai-assistant/AbstractAiConversationHistoryService.js +98 -0
  162. package/lib/ai-assistant/AbstractAiModelService.d.ts +140 -3
  163. package/lib/ai-assistant/AbstractAiModelService.js +154 -1
  164. package/lib/ai-assistant/AiAgentRunManager.d.ts +35 -0
  165. package/lib/ai-assistant/AiAgentRunManager.js +109 -0
  166. package/lib/ai-assistant/AiAssistantAgentSkillHandler.d.ts +58 -0
  167. package/lib/ai-assistant/AiAssistantAgentSkillHandler.js +87 -0
  168. package/lib/ai-assistant/AiAssistantHandler.d.ts +16 -5
  169. package/lib/ai-assistant/AiAssistantHandler.js +35 -1
  170. package/lib/ai-assistant/AiAssistantUiMethodHandler.d.ts +60 -0
  171. package/lib/ai-assistant/AiAssistantUiMethodHandler.js +138 -0
  172. package/lib/ai-assistant/builtinAgentSkills.d.ts +9 -0
  173. package/lib/ai-assistant/builtinAgentSkills.js +256 -0
  174. package/lib/ai-assistant/jsonSafe.d.ts +13 -0
  175. package/lib/ai-assistant/jsonSafe.js +81 -0
  176. package/lib/app-manager/AdminizerApp.d.ts +40 -11
  177. package/lib/app-manager/AppManager.d.ts +2 -2
  178. package/lib/app-manager/AppManager.js +54 -50
  179. package/lib/app-manager/AssetHandler.d.ts +2 -2
  180. package/lib/app-manager/ConfigLayerHandler.d.ts +2 -2
  181. package/lib/app-manager/ControllerHandler.d.ts +2 -2
  182. package/lib/catalog/AbstractCatalog.d.ts +1 -1
  183. package/lib/catalog/CatalogHandler.d.ts +1 -1
  184. package/lib/controls/ControlsHandler.d.ts +1 -1
  185. package/lib/controls/codeEditor/MonacoEditor.d.ts +1 -1
  186. package/lib/controls/geojsoneditor/GeoEditor.d.ts +1 -1
  187. package/lib/controls/jsoneditor/JsonEditor.d.ts +1 -1
  188. package/lib/controls/markdown/ToastUiEditor.d.ts +1 -1
  189. package/lib/controls/table/Handsontable.d.ts +1 -1
  190. package/lib/controls/wysiwyg/CKeditor.d.ts +1 -1
  191. package/lib/docs/AbstractDocumentation.d.ts +100 -0
  192. package/lib/docs/AbstractDocumentation.js +108 -0
  193. package/lib/docs/DocumentationHandler.d.ts +100 -0
  194. package/lib/docs/DocumentationHandler.js +198 -0
  195. package/lib/docs/FileDocumentation.d.ts +47 -0
  196. package/lib/docs/FileDocumentation.js +189 -0
  197. package/lib/docs/docsAgentSkills.d.ts +10 -0
  198. package/lib/docs/docsAgentSkills.js +93 -0
  199. package/lib/feedback/FeedbackHandler.d.ts +2 -2
  200. package/lib/filters/ConditionValidator.d.ts +1 -1
  201. package/lib/filters/FilterCustomFieldHandler.d.ts +2 -2
  202. package/lib/filters/FilterService.d.ts +4 -4
  203. package/lib/filters/FilterService.js +4 -3
  204. package/lib/filters/index.d.ts +6 -6
  205. package/lib/history-actions/AbstractHistoryAdapter.d.ts +6 -6
  206. package/lib/history-actions/AbstractHistoryAdapter.js +11 -9
  207. package/lib/history-actions/DefaultHistoryAdapter.d.ts +4 -4
  208. package/lib/history-actions/HistoryHandler.d.ts +1 -1
  209. package/lib/list-query-builder/ListQueryBuilder.d.ts +7 -7
  210. package/lib/media-manager/AbstractMediaManager.d.ts +2 -2
  211. package/lib/media-manager/MediaManagerHandler.d.ts +1 -1
  212. package/lib/media-manager/Thumb.d.ts +1 -1
  213. package/lib/media-manager/helpers/MediaManagerHelper.d.ts +5 -5
  214. package/lib/model/AbstractModel.d.ts +11 -4
  215. package/lib/model/InternalModelAccessFactory.d.ts +2 -2
  216. package/lib/model/ModelHandler.d.ts +50 -5
  217. package/lib/model/ModelHandler.js +107 -8
  218. package/lib/model/adapter/sequelize.d.ts +7 -5
  219. package/lib/model/adapter/sequelize.js +79 -46
  220. package/lib/model/adapter/typeorm.d.ts +2 -2
  221. package/lib/model/adapter/typeorm.js +1 -1
  222. package/lib/model/internalModelRepository.d.ts +2 -2
  223. package/lib/notifications/AbstractNotificationService.d.ts +4 -4
  224. package/lib/notifications/GeneralNotificationService.d.ts +2 -2
  225. package/lib/notifications/GeneralNotificationService.js +6 -5
  226. package/lib/notifications/NotificationHandler.d.ts +2 -2
  227. package/lib/notifications/SystemNotificationService.d.ts +2 -2
  228. package/lib/notifications/SystemNotificationService.js +1 -1
  229. package/lib/requestProcessor.d.ts +1 -1
  230. package/lib/ui-i18n/uiTranslationKeys.d.ts +2 -1
  231. package/lib/ui-i18n/uiTranslationKeys.js +42 -1
  232. package/lib/widgets/abstractAction.d.ts +1 -1
  233. package/lib/widgets/abstractCustom.d.ts +2 -2
  234. package/lib/widgets/abstractInfo.d.ts +1 -1
  235. package/lib/widgets/abstractLink.d.ts +2 -2
  236. package/lib/widgets/abstractSwitch.d.ts +1 -1
  237. package/lib/widgets/abstractWidgetBase.d.ts +1 -1
  238. package/lib/widgets/widgetHandler.d.ts +9 -9
  239. package/lib/widgets/widgetHandler.js +5 -1
  240. package/models/Filter.d.ts +1 -1
  241. package/models/FilterColumn.d.ts +1 -1
  242. package/models/Group.d.ts +3 -2
  243. package/models/HistoryActions.d.ts +1 -1
  244. package/models/MediaManagerAP.d.ts +2 -2
  245. package/models/MediaManagerAssociationsAP.d.ts +1 -1
  246. package/models/MediaManagerMetaAP.d.ts +1 -1
  247. package/models/User.d.ts +2 -2
  248. package/models/UserNotification.d.ts +1 -1
  249. package/package.json +29 -20
  250. package/policies/authPolicies.js +6 -6
  251. package/policies/permissionResolvers.d.ts +1 -0
  252. package/policies/permissionResolvers.js +3 -0
  253. package/services/FeedService.d.ts +3 -3
  254. package/system/Router.d.ts +1 -1
  255. package/system/Router.js +27 -1
  256. package/system/bindAccessRights.d.ts +1 -1
  257. package/system/bindAccessRights.js +2 -3
  258. package/system/bindAuthorization.d.ts +1 -1
  259. package/system/bindControls.d.ts +1 -1
  260. package/system/bindCors.d.ts +1 -1
  261. package/system/bindCustomFilterHandlers.d.ts +1 -1
  262. package/system/bindDashboardWidgets.d.ts +1 -1
  263. package/system/bindDev.d.ts +1 -1
  264. package/system/bindDocs.d.ts +13 -0
  265. package/system/bindDocs.js +77 -0
  266. package/system/bindHistory.d.ts +1 -1
  267. package/system/bindInertia.d.ts +1 -1
  268. package/system/bindInertia.js +23 -1
  269. package/system/bindMediaManager.d.ts +1 -1
  270. package/system/bindNotifications.d.ts +1 -1
  271. package/system/bindReqFunctions.d.ts +1 -1
  272. package/system/bindTranslations.d.ts +1 -1
  273. package/system/buildInternalModelAccess.d.ts +3 -3
  274. package/system/buildInternalModelAccess.js +5 -2
  275. package/system/defaults.d.ts +1 -1
  276. package/system/routePolicies.d.ts +1 -1
  277. package/system/systemModelContracts.d.ts +1 -1
  278. package/system/systemModelContracts.js +11 -7
  279. package/system/validateSystemModels.d.ts +1 -1
  280. package/system/validateSystemModels.js +29 -9
  281. package/assets/add-group-BdHFzKng.js +0 -1
  282. package/assets/add-p6yGCoZ7.js +0 -1
  283. package/assets/add-user-CDspCLu4.js +0 -1
  284. package/assets/app-DNXiApCk.css +0 -1
  285. package/assets/app-layout-DCr_-JY3.js +0 -1
  286. package/assets/app.js +0 -138
  287. package/assets/catalog-XN-_p9TB.js +0 -6
  288. package/assets/dashboard-CHZO2QFY.js +0 -3
  289. package/assets/debounce-BMmXVQ06.js +0 -1
  290. package/assets/history-CQd0FojQ.js +0 -1
  291. package/assets/init-user-8aUohVDq.js +0 -1
  292. package/assets/list-PHWgTHsg.js +0 -4
  293. package/assets/login-CO4laf6m.js +0 -1
  294. package/assets/module-DVyQtIxm.js +0 -1
  295. package/assets/notification-B87XG8nQ.js +0 -20
  296. package/assets/register-DBYIMXGQ.js +0 -1
  297. package/assets/ru-rYKdQbWF.js +0 -1
  298. package/assets/use-appearance-_EbbjHTh.js +0 -1
  299. package/assets/user-filters-list-BRzDbPkx.js +0 -1
  300. package/assets/welcome-DiXmrTgc.js +0 -1
@@ -0,0 +1,6 @@
1
+ import{r as g,j as v,az as wl,bn as $,f as Sl,au as Dl,bN as Cl,o as et,L as Lo,i as Yr,k as Zr,l as Jr,m as Qr,n as es,d as Be,b8 as No,q as X,b1 as El,b2 as Pl,b3 as Ol,b4 as Bn,A as Lt,a as Il,b as $s,t as ct,bV as Fn,T as Ml,D as Al,bm as Rl,aU as kl,cW as Ll,cX as Nl,aB as Vl,bl as jl,aD as Bl,bj as Fl,I as _l,bq as zl,br as Hl,bs as $l,bt as Nt}from"./app-Ca5yUSBv.js";import{c as an,w as Ul}from"./with-app-layout-B90DtzYC.js";import{d as Wl}from"./debounce-B3mXI_sx.js";import"./use-appearance-DC-DESKB.js";import"./isObject-DL-BuaBl.js";import"./toNumber-DZb-r9sy.js";var Vo=t=>{throw TypeError(t)},jo=(t,e,n)=>e.has(t)||Vo("Cannot "+n),A=(t,e,n)=>(jo(t,e,"read from private field"),n?n.call(t):e.get(t)),le=(t,e,n)=>e.has(t)?Vo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Fe=(t,e,n,r)=>(jo(t,e,"write to private field"),e.set(t,n),n),Ie,Gl=class{constructor(){le(this,Ie),this.register=t=>{A(this,Ie).push(t)},this.unregister=t=>{for(;A(this,Ie).indexOf(t)!==-1;)A(this,Ie).splice(A(this,Ie).indexOf(t),1)},this.backendChanged=t=>{for(let e of A(this,Ie))e.backendChanged(t)},Fe(this,Ie,[])}};Ie=new WeakMap;var se,ft,ie,Ce,_e,fr,pr,gr,Gt,qt,pt,Bo=class Kt{constructor(e,n,r){if(le(this,se),le(this,ft),le(this,ie),le(this,Ce),le(this,_e),le(this,fr,(s,i,o)=>{if(!o.backend)throw new Error(`You must specify a 'backend' property in your Backend entry: ${JSON.stringify(o)}`);let a=o.backend(s,i,o.options),c=o.id,l=!o.id&&a&&a.constructor;if(l&&(c=a.constructor.name),!c)throw new Error(`You must specify an 'id' property in your Backend entry: ${JSON.stringify(o)}
2
+ see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-5xx`);if(l&&console.warn(`Deprecation notice: You are using a pipeline which doesn't include backends' 'id'.
3
+ This might be unsupported in the future, please specify 'id' explicitely for every backend.`),A(this,ie)[c])throw new Error(`You must specify a unique 'id' property in your Backend entry:
4
+ ${JSON.stringify(o)} (conflicts with: ${JSON.stringify(A(this,ie)[c])})`);return{id:c,instance:a,preview:o.preview??!1,transition:o.transition,skipDispatchOnTransition:o.skipDispatchOnTransition??!1}}),this.setup=()=>{if(!(typeof window>"u")){if(Kt.isSetUp)throw new Error("Cannot have two MultiBackends at the same time.");Kt.isSetUp=!0,A(this,pr).call(this,window),A(this,ie)[A(this,se)].instance.setup()}},this.teardown=()=>{typeof window>"u"||(Kt.isSetUp=!1,A(this,gr).call(this,window),A(this,ie)[A(this,se)].instance.teardown())},this.connectDragSource=(s,i,o)=>A(this,pt).call(this,"connectDragSource",s,i,o),this.connectDragPreview=(s,i,o)=>A(this,pt).call(this,"connectDragPreview",s,i,o),this.connectDropTarget=(s,i,o)=>A(this,pt).call(this,"connectDropTarget",s,i,o),this.profile=()=>A(this,ie)[A(this,se)].instance.profile(),this.previewEnabled=()=>A(this,ie)[A(this,se)].preview,this.previewsList=()=>A(this,ft),this.backendsList=()=>A(this,Ce),le(this,pr,s=>{for(let i of A(this,Ce))i.transition&&s.addEventListener(i.transition.event,A(this,Gt))}),le(this,gr,s=>{for(let i of A(this,Ce))i.transition&&s.removeEventListener(i.transition.event,A(this,Gt))}),le(this,Gt,s=>{let i=A(this,se);if(A(this,Ce).some(o=>o.id!==A(this,se)&&o.transition&&o.transition.check(s)?(Fe(this,se,o.id),!0):!1),A(this,se)!==i){A(this,ie)[i].instance.teardown();for(let[l,u]of Object.entries(A(this,_e)))u.unsubscribe(),u.unsubscribe=A(this,qt).call(this,u.func,...u.args);A(this,ft).backendChanged(this);let o=A(this,ie)[A(this,se)];if(o.instance.setup(),o.skipDispatchOnTransition)return;let a=s.constructor,c=new a(s.type,s);s.target?.dispatchEvent(c)}}),le(this,qt,(s,i,o,a)=>A(this,ie)[A(this,se)].instance[s](i,o,a)),le(this,pt,(s,i,o,a)=>{let c=`${s}_${i}`,l=A(this,qt).call(this,s,i,o,a);return A(this,_e)[c]={func:s,args:[i,o,a],unsubscribe:l},()=>{A(this,_e)[c].unsubscribe(),delete A(this,_e)[c]}}),!r||!r.backends||r.backends.length<1)throw new Error(`You must specify at least one Backend, if you are coming from 2.x.x (or don't understand this error)
5
+ see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-2xx`);Fe(this,ft,new Gl),Fe(this,ie,{}),Fe(this,Ce,[]);for(let s of r.backends){let i=A(this,fr).call(this,e,n,s);A(this,ie)[i.id]=i,A(this,Ce).push(i)}Fe(this,se,A(this,Ce)[0].id),Fe(this,_e,{})}};se=new WeakMap,ft=new WeakMap,ie=new WeakMap,Ce=new WeakMap,_e=new WeakMap,fr=new WeakMap,pr=new WeakMap,gr=new WeakMap,Gt=new WeakMap,qt=new WeakMap,pt=new WeakMap,Bo.isSetUp=!1;var ql=Bo,Kl=(t,e,n)=>new ql(t,e,n),Fo=(t,e)=>({event:t,check:e}),Xl=Fo("touchstart",t=>{let e=t;return e.touches!==null&&e.touches!==void 0}),Yl=Fo("pointerdown",t=>t.pointerType==="mouse");const _o=g.createContext({dragDropManager:void 0});function ce(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Us=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Ws=function(){return Math.random().toString(36).substring(7).split("").join(".")},Gs={INIT:"@@redux/INIT"+Ws(),REPLACE:"@@redux/REPLACE"+Ws()};function Zl(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function zo(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(ce(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(ce(1));return n(zo)(t,e)}if(typeof t!="function")throw new Error(ce(2));var s=t,i=e,o=[],a=o,c=!1;function l(){a===o&&(a=o.slice())}function u(){if(c)throw new Error(ce(3));return i}function d(m){if(typeof m!="function")throw new Error(ce(4));if(c)throw new Error(ce(5));var y=!0;return l(),a.push(m),function(){if(y){if(c)throw new Error(ce(6));y=!1,l();var x=a.indexOf(m);a.splice(x,1),o=null}}}function h(m){if(!Zl(m))throw new Error(ce(7));if(typeof m.type>"u")throw new Error(ce(8));if(c)throw new Error(ce(9));try{c=!0,i=s(i,m)}finally{c=!1}for(var y=o=a,b=0;b<y.length;b++){var x=y[b];x()}return m}function f(m){if(typeof m!="function")throw new Error(ce(10));s=m,h({type:Gs.REPLACE})}function p(){var m,y=d;return m={subscribe:function(x){if(typeof x!="object"||x===null)throw new Error(ce(11));function w(){x.next&&x.next(u())}w();var S=y(w);return{unsubscribe:S}}},m[Us]=function(){return this},m}return h({type:Gs.INIT}),r={dispatch:h,subscribe:d,getState:u,replaceReducer:f},r[Us]=p,r}function R(t,e,...n){if(Jl()&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){let r;if(e===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let s=0;r=new Error(e.replace(/%s/g,function(){return n[s++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function Jl(){return typeof process<"u"&&!0}function Ql(t,e,n){return e.split(".").reduce((r,s)=>r&&r[s]?r[s]:n||null,t)}function eu(t,e){return t.filter(n=>n!==e)}function Ho(t){return typeof t=="object"}function tu(t,e){const n=new Map,r=i=>{n.set(i,n.has(i)?n.get(i)+1:1)};t.forEach(r),e.forEach(r);const s=[];return n.forEach((i,o)=>{i===1&&s.push(o)}),s}function nu(t,e){return t.filter(n=>e.indexOf(n)>-1)}const ts="dnd-core/INIT_COORDS",bn="dnd-core/BEGIN_DRAG",ns="dnd-core/PUBLISH_DRAG_SOURCE",Tn="dnd-core/HOVER",xn="dnd-core/DROP",wn="dnd-core/END_DRAG";function qs(t,e){return{type:ts,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const ru={type:ts,payload:{clientOffset:null,sourceClientOffset:null}};function su(t){return function(n=[],r={publishSource:!0}){const{publishSource:s=!0,clientOffset:i,getSourceClientOffset:o}=r,a=t.getMonitor(),c=t.getRegistry();t.dispatch(qs(i)),iu(n,a,c);const l=cu(n,a);if(l==null){t.dispatch(ru);return}let u=null;if(i){if(!o)throw new Error("getSourceClientOffset must be defined");ou(o),u=o(l)}t.dispatch(qs(i,u));const h=c.getSource(l).beginDrag(a,l);if(h==null)return;au(h),c.pinSource(l);const f=c.getSourceType(l);return{type:bn,payload:{itemType:f,item:h,sourceId:l,clientOffset:i||null,sourceClientOffset:u||null,isSourcePublic:!!s}}}}function iu(t,e,n){R(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){R(n.getSource(r),"Expected sourceIds to be registered.")})}function ou(t){R(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function au(t){R(Ho(t),"Item must be an object.")}function cu(t,e){let n=null;for(let r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function lu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function uu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){lu(t,s,n[s])})}return t}function du(t){return function(n={}){const r=t.getMonitor(),s=t.getRegistry();hu(r),gu(r).forEach((o,a)=>{const c=fu(o,a,s,r),l={type:xn,payload:{dropResult:uu({},n,c)}};t.dispatch(l)})}}function hu(t){R(t.isDragging(),"Cannot call drop while not dragging."),R(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function fu(t,e,n,r){const s=n.getTarget(t);let i=s?s.drop(r,t):void 0;return pu(i),typeof i>"u"&&(i=e===0?{}:r.getDropResult()),i}function pu(t){R(typeof t>"u"||Ho(t),"Drop result must either be an object or undefined.")}function gu(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function mu(t){return function(){const n=t.getMonitor(),r=t.getRegistry();vu(n);const s=n.getSourceId();return s!=null&&(r.getSource(s,!0).endDrag(n,s),r.unpinSource()),{type:wn}}}function vu(t){R(t.isDragging(),"Cannot call endDrag while not dragging.")}function mr(t,e){return e===null?t===null:Array.isArray(t)?t.some(n=>n===e):t===e}function yu(t){return function(n,{clientOffset:r}={}){bu(n);const s=n.slice(0),i=t.getMonitor(),o=t.getRegistry(),a=i.getItemType();return xu(s,o,a),Tu(s,i,o),wu(s,i,o),{type:Tn,payload:{targetIds:s,clientOffset:r||null}}}}function bu(t){R(Array.isArray(t),"Expected targetIds to be an array.")}function Tu(t,e,n){R(e.isDragging(),"Cannot call hover while not dragging."),R(!e.didDrop(),"Cannot call hover after drop.");for(let r=0;r<t.length;r++){const s=t[r];R(t.lastIndexOf(s)===r,"Expected targetIds to be unique in the passed array.");const i=n.getTarget(s);R(i,"Expected targetIds to be registered.")}}function xu(t,e,n){for(let r=t.length-1;r>=0;r--){const s=t[r],i=e.getTargetType(s);mr(i,n)||t.splice(r,1)}}function wu(t,e,n){t.forEach(function(r){n.getTarget(r).hover(e,r)})}function Su(t){return function(){if(t.getMonitor().isDragging())return{type:ns}}}function Du(t){return{beginDrag:su(t),publishDragSource:Su(t),hover:yu(t),drop:du(t),endDrag:mu(t)}}class Cu{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:n}=this.store;function r(i){return(...o)=>{const a=i.apply(e,o);typeof a<"u"&&n(a)}}const s=Du(this);return Object.keys(s).reduce((i,o)=>{const a=s[o];return i[o]=r(a),i},{})}dispatch(e){this.store.dispatch(e)}constructor(e,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}}function Eu(t,e){return{x:t.x+e.x,y:t.y+e.y}}function $o(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Pu(t){const{clientOffset:e,initialClientOffset:n,initialSourceClientOffset:r}=t;return!e||!n||!r?null:$o(Eu(e,r),n)}function Ou(t){const{clientOffset:e,initialClientOffset:n}=t;return!e||!n?null:$o(e,n)}const mt=[],rs=[];mt.__IS_NONE__=!0;rs.__IS_ALL__=!0;function Iu(t,e){return t===mt?!1:t===rs||typeof e>"u"?!0:nu(e,t).length>0}class Mu{subscribeToStateChange(e,n={}){const{handlerIds:r}=n;R(typeof e=="function","listener must be a function."),R(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let s=this.store.getState().stateId;const i=()=>{const o=this.store.getState(),a=o.stateId;try{a===s||a===s+1&&!Iu(o.dirtyHandlerIds,r)||e()}finally{s=a}};return this.store.subscribe(i)}subscribeToOffsetChange(e){R(typeof e=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const s=this.store.getState().dragOffset;s!==n&&(n=s,e())};return this.store.subscribe(r)}canDragSource(e){if(!e)return!1;const n=this.registry.getSource(e);return R(n,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:n.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const n=this.registry.getTarget(e);if(R(n,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(e),s=this.getItemType();return mr(r,s)&&n.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const n=this.registry.getSource(e,!0);if(R(n,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(e),s=this.getItemType();return r!==s?!1:n.isDragging(this,e)}isOverTarget(e,n={shallow:!1}){if(!e)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const s=this.registry.getTargetType(e),i=this.getItemType();if(i&&!mr(s,i))return!1;const o=this.getTargetIds();if(!o.length)return!1;const a=o.indexOf(e);return r?a===o.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Pu(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return Ou(this.store.getState().dragOffset)}constructor(e,n){this.store=e,this.registry=n}}const Ks=typeof global<"u"?global:self,Uo=Ks.MutationObserver||Ks.WebKitMutationObserver;function Wo(t){return function(){const n=setTimeout(s,0),r=setInterval(s,50);function s(){clearTimeout(n),clearInterval(r),t()}}}function Au(t){let e=1;const n=new Uo(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const Ru=typeof Uo=="function"?Au:Wo;class ku{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,s=e.length-this.index;r<s;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Ru(this.flush),this.requestErrorThrow=Wo(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Lu{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class Nu{create(e){const n=this.freeTasks,r=n.length?n.pop():new Lu(this.onError,s=>n[n.length]=s);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const Go=new ku,Vu=new Nu(Go.registerPendingError);function ju(t){Go.enqueueTask(Vu.create(t))}const ss="dnd-core/ADD_SOURCE",is="dnd-core/ADD_TARGET",os="dnd-core/REMOVE_SOURCE",Sn="dnd-core/REMOVE_TARGET";function Bu(t){return{type:ss,payload:{sourceId:t}}}function Fu(t){return{type:is,payload:{targetId:t}}}function _u(t){return{type:os,payload:{sourceId:t}}}function zu(t){return{type:Sn,payload:{targetId:t}}}function Hu(t){R(typeof t.canDrag=="function","Expected canDrag to be a function."),R(typeof t.beginDrag=="function","Expected beginDrag to be a function."),R(typeof t.endDrag=="function","Expected endDrag to be a function.")}function $u(t){R(typeof t.canDrop=="function","Expected canDrop to be a function."),R(typeof t.hover=="function","Expected hover to be a function."),R(typeof t.drop=="function","Expected beginDrag to be a function.")}function vr(t,e){if(e&&Array.isArray(t)){t.forEach(n=>vr(n,!1));return}R(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var ue;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(ue||(ue={}));let Uu=0;function Wu(){return Uu++}function Gu(t){const e=Wu().toString();switch(t){case ue.SOURCE:return`S${e}`;case ue.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function Xs(t){switch(t[0]){case"S":return ue.SOURCE;case"T":return ue.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function Ys(t,e){const n=t.entries();let r=!1;do{const{done:s,value:[,i]}=n.next();if(i===e)return!0;r=!!s}while(!r);return!1}class qu{addSource(e,n){vr(e),Hu(n);const r=this.addHandler(ue.SOURCE,e,n);return this.store.dispatch(Bu(r)),r}addTarget(e,n){vr(e,!0),$u(n);const r=this.addHandler(ue.TARGET,e,n);return this.store.dispatch(Fu(r)),r}containsHandler(e){return Ys(this.dragSources,e)||Ys(this.dropTargets,e)}getSource(e,n=!1){return R(this.isSourceId(e),"Expected a valid source ID."),n&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return R(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return R(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return R(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return Xs(e)===ue.SOURCE}isTargetId(e){return Xs(e)===ue.TARGET}removeSource(e){R(this.getSource(e),"Expected an existing source."),this.store.dispatch(_u(e)),ju(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){R(this.getTarget(e),"Expected an existing target."),this.store.dispatch(zu(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const n=this.getSource(e);R(n,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=n}unpinSource(){R(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,n,r){const s=Gu(e);return this.types.set(s,n),e===ue.SOURCE?this.dragSources.set(s,r):e===ue.TARGET&&this.dropTargets.set(s,r),s}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const Ku=(t,e)=>t===e;function Xu(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function Yu(t,e,n=Ku){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function Zu(t=mt,e){switch(e.type){case Tn:break;case ss:case is:case Sn:case os:return mt;case bn:case ns:case wn:case xn:default:return rs}const{targetIds:n=[],prevTargetIds:r=[]}=e.payload,s=tu(n,r);if(!(s.length>0||!Yu(n,r)))return mt;const o=r[r.length-1],a=n[n.length-1];return o!==a&&(o&&s.push(o),a&&s.push(a)),s}function Ju(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Qu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){Ju(t,s,n[s])})}return t}const Zs={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function ed(t=Zs,e){const{payload:n}=e;switch(e.type){case ts:case bn:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Tn:return Xu(t.clientOffset,n.clientOffset)?t:Qu({},t,{clientOffset:n.clientOffset});case wn:case xn:return Zs;default:return t}}function td(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Xe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){td(t,s,n[s])})}return t}const nd={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function rd(t=nd,e){const{payload:n}=e;switch(e.type){case bn:return Xe({},t,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case ns:return Xe({},t,{isSourcePublic:!0});case Tn:return Xe({},t,{targetIds:n.targetIds});case Sn:return t.targetIds.indexOf(n.targetId)===-1?t:Xe({},t,{targetIds:eu(t.targetIds,n.targetId)});case xn:return Xe({},t,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case wn:return Xe({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function sd(t=0,e){switch(e.type){case ss:case is:return t+1;case os:case Sn:return t-1;default:return t}}function id(t=0){return t+1}function od(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ad(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){od(t,s,n[s])})}return t}function cd(t={},e){return{dirtyHandlerIds:Zu(t.dirtyHandlerIds,{type:e.type,payload:ad({},e.payload,{prevTargetIds:Ql(t,"dragOperation.targetIds",[])})}),dragOffset:ed(t.dragOffset,e),refCount:sd(t.refCount,e),dragOperation:rd(t.dragOperation,e),stateId:id(t.stateId)}}function ld(t,e=void 0,n={},r=!1){const s=ud(r),i=new Mu(s,new qu(s)),o=new Cu(s,i),a=t(o,e,n);return o.receiveBackend(a),o}function ud(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return zo(cd,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function dd(t,e){if(t==null)return{};var n=hd(t,e),r,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(s=0;s<i.length;s++)r=i[s],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function hd(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,i;for(i=0;i<r.length;i++)s=r[i],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}let Js=0;const Xt=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var fd=g.memo(function(e){var{children:n}=e,r=dd(e,["children"]);const[s,i]=pd(r);return g.useEffect(()=>{if(i){const o=qo();return++Js,()=>{--Js===0&&(o[Xt]=null)}}},[]),v.jsx(_o.Provider,{value:s,children:n})});function pd(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=gd(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[e,n]}function gd(t,e=qo(),n,r){const s=e;return s[Xt]||(s[Xt]={dragDropManager:ld(t,e,n,r)}),s[Xt]}function qo(){return typeof global<"u"?global:window}var _n,Qs;function md(){return Qs||(Qs=1,_n=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,s,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(s=r;s--!==0;)if(!t(e[s],n[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[s]))return!1;for(s=r;s--!==0;){var o=i[s];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n}),_n}var vd=md();const yd=wl(vd),Ke=typeof window<"u"?g.useLayoutEffect:g.useEffect;function Ko(t,e,n){const[r,s]=g.useState(()=>e(t)),i=g.useCallback(()=>{const o=e(t);yd(r,o)||(s(o),n&&n())},[r,t,n]);return Ke(i),[r,i]}function bd(t,e,n){const[r,s]=Ko(t,e,n);return Ke(function(){const o=t.getHandlerId();if(o!=null)return t.subscribeToStateChange(s,{handlerIds:[o]})},[t,s]),r}function Xo(t,e,n){return bd(e,t||(()=>({})),()=>n.reconnect())}function Yo(t,e){const n=[];return typeof t!="function"&&n.push(t),g.useMemo(()=>typeof t=="function"?t():t,n)}function Td(t){return g.useMemo(()=>t.hooks.dragSource(),[t])}function xd(t){return g.useMemo(()=>t.hooks.dragPreview(),[t])}let zn=!1,Hn=!1;class wd{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){R(!zn,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return zn=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{zn=!1}}isDragging(){if(!this.sourceId)return!1;R(!Hn,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Hn=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Hn=!1}}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,n){return this.internalMonitor.isOverTarget(e,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let $n=!1;class Sd{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}canDrop(){if(!this.targetId)return!1;R(!$n,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return $n=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{$n=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function Dd(t,e,n){const r=n.getRegistry(),s=r.addTarget(t,e);return[s,()=>r.removeTarget(s)]}function Cd(t,e,n){const r=n.getRegistry(),s=r.addSource(t,e);return[s,()=>r.removeSource(s)]}function yr(t,e,n,r){let s;if(s!==void 0)return!!s;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const i=Object.keys(t),o=Object.keys(e);if(i.length!==o.length)return!1;const a=Object.prototype.hasOwnProperty.bind(e);for(let c=0;c<i.length;c++){const l=i[c];if(!a(l))return!1;const u=t[l],d=e[l];if(s=void 0,s===!1||s===void 0&&u!==d)return!1}return!0}function br(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Ed(t){if(typeof t.type=="string")return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function Pd(t){return(e=null,n=null)=>{if(!g.isValidElement(e)){const i=e;return t(i,n),i}const r=e;return Ed(r),Od(r,n?i=>t(i,n):t)}}function Zo(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{const s=Pd(r);e[n]=()=>s}}),e}function ei(t,e){typeof t=="function"?t(e):t.current=e}function Od(t,e){const n=t.ref;return R(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?g.cloneElement(t,{ref:r=>{ei(n,r),ei(e,r)}}):g.cloneElement(t,{ref:e})}class Id{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?e?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),n):(this.lastConnectedDragSource=e,n):n}reconnectDragPreview(e=!1){const n=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!yr(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!yr(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=Zo({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,br(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,br(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class Md{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!yr(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=Zo({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,br(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function Pe(){const{dragDropManager:t}=g.useContext(_o);return R(t!=null,"Expected drag drop context"),t}function Ad(t,e){const n=Pe(),r=g.useMemo(()=>new Id(n.getBackend()),[n]);return Ke(()=>(r.dragSourceOptions=t||null,r.reconnect(),()=>r.disconnectDragSource()),[r,t]),Ke(()=>(r.dragPreviewOptions=e||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,e]),r}function Rd(){const t=Pe();return g.useMemo(()=>new wd(t),[t])}class kd{beginDrag(){const e=this.spec,n=this.monitor;let r=null;return typeof e.item=="object"?r=e.item:typeof e.item=="function"?r=e.item(n):r={},r??null}canDrag(){const e=this.spec,n=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(n):!0}isDragging(e,n){const r=this.spec,s=this.monitor,{isDragging:i}=r;return i?i(s):n===e.getSourceId()}endDrag(){const e=this.spec,n=this.monitor,r=this.connector,{end:s}=e;s&&s(n.getItem(),n),r.reconnect()}constructor(e,n,r){this.spec=e,this.monitor=n,this.connector=r}}function Ld(t,e,n){const r=g.useMemo(()=>new kd(t,e,n),[e,n]);return g.useEffect(()=>{r.spec=t},[t]),r}function Nd(t){return g.useMemo(()=>{const e=t.type;return R(e!=null,"spec.type must be defined"),e},[t])}function Vd(t,e,n){const r=Pe(),s=Ld(t,e,n),i=Nd(t);Ke(function(){if(i!=null){const[a,c]=Cd(i,s,r);return e.receiveHandlerId(a),n.receiveHandlerId(a),c}},[r,e,n,s,i])}function jd(t,e){const n=Yo(t);R(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=Rd(),s=Ad(n.options,n.previewOptions);return Vd(n,r,s),[Xo(n.collect,r,s),Td(s),xd(s)]}function Bd(t){const n=Pe().getMonitor(),[r,s]=Ko(n,t);return g.useEffect(()=>n.subscribeToOffsetChange(s)),g.useEffect(()=>n.subscribeToStateChange(s)),r}function Fd(t){return g.useMemo(()=>t.hooks.dropTarget(),[t])}function _d(t){const e=Pe(),n=g.useMemo(()=>new Md(e.getBackend()),[e]);return Ke(()=>(n.dropTargetOptions=t||null,n.reconnect(),()=>n.disconnectDropTarget()),[t]),n}function zd(){const t=Pe();return g.useMemo(()=>new Sd(t),[t])}function Hd(t){const{accept:e}=t;return g.useMemo(()=>(R(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class $d{canDrop(){const e=this.spec,n=this.monitor;return e.canDrop?e.canDrop(n.getItem(),n):!0}hover(){const e=this.spec,n=this.monitor;e.hover&&e.hover(n.getItem(),n)}drop(){const e=this.spec,n=this.monitor;if(e.drop)return e.drop(n.getItem(),n)}constructor(e,n){this.spec=e,this.monitor=n}}function Ud(t,e){const n=g.useMemo(()=>new $d(t,e),[e]);return g.useEffect(()=>{n.spec=t},[t]),n}function Wd(t,e,n){const r=Pe(),s=Ud(t,e),i=Hd(t);Ke(function(){const[a,c]=Dd(i,s,r);return e.receiveHandlerId(a),n.receiveHandlerId(a),c},[r,e,s,n,i.map(o=>o.toString()).join("|")])}function Jo(t,e){const n=Yo(t),r=zd(),s=_d(n.options);return Wd(n,r,s),[Xo(n.collect,r,s),Fd(s)]}function Qo(t){let e=null;return()=>(e==null&&(e=t()),e)}function Gd(t,e){return t.filter(n=>n!==e)}function qd(t,e){const n=new Set,r=i=>n.add(i);t.forEach(r),e.forEach(r);const s=[];return n.forEach(i=>s.push(i)),s}class Kd{enter(e){const n=this.entered.length,r=s=>this.isNodeInDocument(s)&&(!s.contains||s.contains(e));return this.entered=qd(this.entered.filter(r),[e]),n===0&&this.entered.length>0}leave(e){const n=this.entered.length;return this.entered=Gd(this.entered.filter(this.isNodeInDocument),e),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class Xd{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const s=this.config.exposeProperties[r];s!=null&&(n[r]={value:s(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,n){return n===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const ea="__NATIVE_FILE__",ta="__NATIVE_URL__",na="__NATIVE_TEXT__",ra="__NATIVE_HTML__",ti=Object.freeze(Object.defineProperty({__proto__:null,FILE:ea,HTML:ra,TEXT:na,URL:ta},Symbol.toStringTag,{value:"Module"}));function Un(t,e,n){const r=e.reduce((s,i)=>s||t.getData(i),"");return r??n}const Tr={[ea]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[ra]:{exposeProperties:{html:(t,e)=>Un(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[ta]:{exposeProperties:{urls:(t,e)=>Un(t,e,"").split(`
6
+ `),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[na]:{exposeProperties:{text:(t,e)=>Un(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function Yd(t,e){const n=Tr[t];if(!n)throw new Error(`native type ${t} has no configuration`);const r=new Xd(n);return r.loadDataTransfer(e),r}function Wn(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(Tr).filter(n=>{const r=Tr[n];return r?.matchesTypes?r.matchesTypes.some(s=>e.indexOf(s)>-1):!1})[0]||null}const Zd=Qo(()=>/firefox/i.test(navigator.userAgent)),sa=Qo(()=>!!window.safari);class ni{interpolate(e){const{xs:n,ys:r,c1s:s,c2s:i,c3s:o}=this;let a=n.length-1;if(e===n[a])return r[a];let c=0,l=o.length-1,u;for(;c<=l;){u=Math.floor(.5*(c+l));const f=n[u];if(f<e)c=u+1;else if(f>e)l=u-1;else return r[u]}a=Math.max(0,l);const d=e-n[a],h=d*d;return r[a]+s[a]*d+i[a]*h+o[a]*d*h}constructor(e,n){const{length:r}=e,s=[];for(let f=0;f<r;f++)s.push(f);s.sort((f,p)=>e[f]<e[p]?-1:1);const i=[],o=[];let a,c;for(let f=0;f<r-1;f++)a=e[f+1]-e[f],c=n[f+1]-n[f],i.push(a),o.push(c/a);const l=[o[0]];for(let f=0;f<i.length-1;f++){const p=o[f],m=o[f+1];if(p*m<=0)l.push(0);else{a=i[f];const y=i[f+1],b=a+y;l.push(3*b/((b+y)/p+(b+a)/m))}}l.push(o[o.length-1]);const u=[],d=[];let h;for(let f=0;f<l.length-1;f++){h=o[f];const p=l[f],m=1/i[f],y=p+l[f+1]-h-h;u.push((h-p-y)*m),d.push(y*m*m)}this.xs=e,this.ys=n,this.c1s=l,this.c2s=u,this.c3s=d}}const Jd=1;function ia(t){const e=t.nodeType===Jd?t:t.parentElement;if(!e)return null;const{top:n,left:r}=e.getBoundingClientRect();return{x:r,y:n}}function Vt(t){return{x:t.clientX,y:t.clientY}}function Qd(t){var e;return t.nodeName==="IMG"&&(Zd()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function eh(t,e,n,r){let s=t?e.width:n,i=t?e.height:r;return sa()&&t&&(i/=window.devicePixelRatio,s/=window.devicePixelRatio),{dragPreviewWidth:s,dragPreviewHeight:i}}function th(t,e,n,r,s){const i=Qd(e),a=ia(i?t:e),c={x:n.x-a.x,y:n.y-a.y},{offsetWidth:l,offsetHeight:u}=t,{anchorX:d,anchorY:h}=r,{dragPreviewWidth:f,dragPreviewHeight:p}=eh(i,e,l,u),m=()=>{let N=new ni([0,.5,1],[c.y,c.y/u*p,c.y+p-u]).interpolate(h);return sa()&&i&&(N+=(window.devicePixelRatio-1)*p),N},y=()=>new ni([0,.5,1],[c.x,c.x/l*f,c.x+f-l]).interpolate(d),{offsetX:b,offsetY:x}=s,w=b===0||b,S=x===0||x;return{x:w?b:y(),y:S?x:m()}}let nh=class{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,n){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=n}};function rh(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ri(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){rh(t,s,n[s])})}return t}class sh{profile(){var e,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,n,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,n),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,n,r){this.sourceNodes.set(e,n),this.sourceNodeOptions.set(e,r);const s=o=>this.handleDragStart(o,e),i=o=>this.handleSelectStart(o);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",s),n.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),n.removeEventListener("dragstart",s),n.removeEventListener("selectstart",i),n.setAttribute("draggable","false")}}connectDropTarget(e,n){const r=o=>this.handleDragEnter(o,e),s=o=>this.handleDragOver(o,e),i=o=>this.handleDrop(o,e);return n.addEventListener("dragenter",r),n.addEventListener("dragover",s),n.addEventListener("drop",i),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",s),n.removeEventListener("drop",i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(e);return ri({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(e);return ri({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(ti).some(n=>ti[n]===e)}beginDragNativeItem(e,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=Yd(e,n),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,n){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(e,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(e,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(e,n){this.dropTargetIds.unshift(n)}constructor(e,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=s=>{const i=this.sourceNodes.get(s);return i&&ia(i)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=s=>!!(s&&this.document&&this.document.body&&this.document.body.contains(s)),this.endDragIfSourceWasRemovedFromDOM=()=>{const s=this.currentDragSourceNode;s==null||this.isNodeInDocument(s)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=s=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(s||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=s=>{if(s.defaultPrevented)return;const{dragStartSourceIds:i}=this;this.dragStartSourceIds=null;const o=Vt(s);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(i||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:o});const{dataTransfer:a}=s,c=Wn(a);if(this.monitor.isDragging()){if(a&&typeof a.setDragImage=="function"){const u=this.monitor.getSourceId(),d=this.sourceNodes.get(u),h=this.sourcePreviewNodes.get(u)||d;if(h){const{anchorX:f,anchorY:p,offsetX:m,offsetY:y}=this.getCurrentSourcePreviewNodeOptions(),w=th(d,h,o,{anchorX:f,anchorY:p},{offsetX:m,offsetY:y});a.setDragImage(h,w.x,w.y)}}try{a?.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(s.target);const{captureDraggingState:l}=this.getCurrentSourcePreviewNodeOptions();l?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(c)this.beginDragNativeItem(c);else{if(a&&!a.types&&(s.target&&!s.target.hasAttribute||!s.target.hasAttribute("draggable")))return;s.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=s=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}if(!this.enterLeaveCounter.enter(s.target)||this.monitor.isDragging())return;const{dataTransfer:a}=s,c=Wn(a);c&&this.beginDragNativeItem(c,a)},this.handleTopDragEnter=s=>{const{dragEnterTargetIds:i}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=s.altKey,i.length>0&&this.actions.hover(i,{clientOffset:Vt(s)}),i.some(a=>this.monitor.canDropOnTarget(a))&&(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=s=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}},this.handleTopDragOver=s=>{const{dragOverTargetIds:i}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none");return}this.altKeyPressed=s.altKey,this.lastClientOffset=Vt(s),this.scheduleHover(i),(i||[]).some(a=>this.monitor.canDropOnTarget(a))?(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?s.preventDefault():(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=s=>{this.isDraggingNativeItem()&&s.preventDefault(),this.enterLeaveCounter.leave(s.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=s=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var i;s.preventDefault(),(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}else Wn(s.dataTransfer)&&s.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=s=>{const{dropTargetIds:i}=this;this.dropTargetIds=[],this.actions.hover(i,{clientOffset:Vt(s)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=s=>{const i=s.target;typeof i.dragDrop=="function"&&(i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.isContentEditable||(s.preventDefault(),i.dragDrop()))},this.options=new nh(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new Kd(this.isNodeInDocument)}}let jt;function ih(){return jt||(jt=new Image,jt.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),jt}const oh=function(e,n,r){return new sh(e,n,r)};var Ae;(function(t){t.mouse="mouse",t.touch="touch",t.keyboard="keyboard"})(Ae||(Ae={}));class ah{get delay(){var e;return(e=this.args.delay)!==null&&e!==void 0?e:0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){var e;return(e=this.args.ignoreContextMenu)!==null&&e!==void 0?e:!1}get enableHoverOutsideTarget(){var e;return(e=this.args.enableHoverOutsideTarget)!==null&&e!==void 0?e:!1}get enableKeyboardEvents(){var e;return(e=this.args.enableKeyboardEvents)!==null&&e!==void 0?e:!1}get enableMouseEvents(){var e;return(e=this.args.enableMouseEvents)!==null&&e!==void 0?e:!1}get enableTouchEvents(){var e;return(e=this.args.enableTouchEvents)!==null&&e!==void 0?e:!0}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var e,n,r,s;return(s=(r=(e=this.args)===null||e===void 0?void 0:e.delayTouchStart)!==null&&r!==void 0?r:(n=this.args)===null||n===void 0?void 0:n.delay)!==null&&s!==void 0?s:0}get delayMouseStart(){var e,n,r,s;return(s=(r=(e=this.args)===null||e===void 0?void 0:e.delayMouseStart)!==null&&r!==void 0?r:(n=this.args)===null||n===void 0?void 0:n.delay)!==null&&s!==void 0?s:0}get window(){if(this.context&&this.context.window)return this.context.window;if(typeof window<"u")return window}get document(){var e;if(!((e=this.context)===null||e===void 0)&&e.document)return this.context.document;if(this.window)return this.window.document}get rootElement(){var e;return((e=this.args)===null||e===void 0?void 0:e.rootElement)||this.document}constructor(e,n){this.args=e,this.context=n}}function ch(t,e,n,r){return Math.sqrt(Math.pow(Math.abs(n-t),2)+Math.pow(Math.abs(r-e),2))}function lh(t,e,n,r,s){if(!s)return!1;const i=Math.atan2(r-e,n-t)*180/Math.PI+180;for(let o=0;o<s.length;++o){const a=s[o];if(a&&(a.start==null||i>=a.start)&&(a.end==null||i<=a.end))return!0}return!1}const uh={Left:1},dh={Left:0};function Gn(t){return t.button===void 0||t.button===dh.Left}function hh(t){return t.buttons===void 0||(t.buttons&uh.Left)===0}function oa(t){return!!t.targetTouches}const fh=1;function ph(t){const e=t.nodeType===fh?t:t.parentElement;if(!e)return;const{top:n,left:r}=e.getBoundingClientRect();return{x:r,y:n}}function gh(t,e){if(t.targetTouches.length===1)return cn(t.targetTouches[0]);if(e&&t.touches.length===1&&t.touches[0].target===e.target)return cn(t.touches[0])}function cn(t,e){return oa(t)?gh(t,e):{x:t.clientX,y:t.clientY}}const si=(()=>{let t=!1;try{addEventListener("test",()=>{},Object.defineProperty({},"passive",{get(){return t=!0,!0}}))}catch{}return t})(),lt={[Ae.mouse]:{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"},[Ae.touch]:{start:"touchstart",move:"touchmove",end:"touchend"},[Ae.keyboard]:{keydown:"keydown"}};class vt{profile(){var e;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:((e=this.dragOverTargetIds)===null||e===void 0?void 0:e.length)||0}}get document(){return this.options.document}setup(){const e=this.options.rootElement;e&&(R(!vt.isSetUp,"Cannot have two Touch backends at the same time."),vt.isSetUp=!0,this.addEventListener(e,"start",this.getTopMoveStartHandler()),this.addEventListener(e,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(e,"move",this.handleTopMove),this.addEventListener(e,"move",this.handleTopMoveCapture,!0),this.addEventListener(e,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(e,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(e,"keydown",this.handleCancelOnEscape,!0))}teardown(){const e=this.options.rootElement;e&&(vt.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(e,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(e,"start",this.handleTopMoveStart),this.removeEventListener(e,"move",this.handleTopMoveCapture,!0),this.removeEventListener(e,"move",this.handleTopMove),this.removeEventListener(e,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(e,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(e,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(e,n,r,s=!1){const i=si?{capture:s,passive:!1}:s;this.listenerTypes.forEach(function(o){const a=lt[o][n];a&&e.addEventListener(a,r,i)})}removeEventListener(e,n,r,s=!1){const i=si?{capture:s,passive:!1}:s;this.listenerTypes.forEach(function(o){const a=lt[o][n];a&&e.removeEventListener(a,r,i)})}connectDragSource(e,n){const r=this.handleMoveStart.bind(this,e);return this.sourceNodes.set(e,n),this.addEventListener(n,"start",r),()=>{this.sourceNodes.delete(e),this.removeEventListener(n,"start",r)}}connectDragPreview(e,n,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,n),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDropTarget(e,n){const r=this.options.rootElement;if(!this.document||!r)return()=>{};const s=i=>{if(!this.document||!r||!this.monitor.isDragging())return;let o;switch(i.type){case lt.mouse.move:o={x:i.clientX,y:i.clientY};break;case lt.touch.move:var a,c;o={x:((a=i.touches[0])===null||a===void 0?void 0:a.clientX)||0,y:((c=i.touches[0])===null||c===void 0?void 0:c.clientY)||0};break}const l=o!=null?this.document.elementFromPoint(o.x,o.y):void 0,u=l&&n.contains(l);if(l===n||u)return this.handleMove(i,e)};return this.addEventListener(this.document.body,"move",s),this.targetNodes.set(e,n),()=>{this.document&&(this.targetNodes.delete(e),this.removeEventListener(this.document.body,"move",s))}}getTopMoveStartHandler(){return!this.options.delayTouchStart&&!this.options.delayMouseStart?this.handleTopMoveStart:this.handleTopMoveStartDelay}installSourceNodeRemovalObserver(e){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=e,this.draggedSourceNodeRemovalObserver=new MutationObserver(()=>{e&&!e.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())}),!(!e||!e.parentElement)&&this.draggedSourceNodeRemovalObserver.observe(e.parentElement,{childList:!0})}resurrectSourceNode(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}uninstallSourceNodeRemovalObserver(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}constructor(e,n,r){this.getSourceClientOffset=s=>{const i=this.sourceNodes.get(s);return i&&ph(i)},this.handleTopMoveStartCapture=s=>{Gn(s)&&(this.moveStartSourceIds=[])},this.handleMoveStart=s=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(s)},this.handleTopMoveStart=s=>{if(!Gn(s))return;const i=cn(s);i&&(oa(s)&&(this.lastTargetTouchFallback=s.targetTouches[0]),this._mouseClientOffset=i),this.waitingForDelay=!1},this.handleTopMoveStartDelay=s=>{if(!Gn(s))return;const i=s.type===lt.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,s),i),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(s,i)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(i)},this.handleTopMove=s=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;const{moveStartSourceIds:i,dragOverTargetIds:o}=this,a=this.options.enableHoverOutsideTarget,c=cn(s,this.lastTargetTouchFallback);if(!c)return;if(this._isScrolling||!this.monitor.isDragging()&&lh(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,c.x,c.y,this.options.scrollAngleRanges)){this._isScrolling=!0;return}if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty("x")&&i&&ch(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,c.x,c.y)>(this.options.touchSlop?this.options.touchSlop:0)&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(i,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;const l=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(l),this.actions.publishDragSource(),s.cancelable&&s.preventDefault();const u=(o||[]).map(p=>this.targetNodes.get(p)).filter(p=>!!p),d=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(c.x,c.y,u):this.document.elementsFromPoint(c.x,c.y),h=[];for(const p in d){if(!d.hasOwnProperty(p))continue;let m=d[p];for(m!=null&&h.push(m);m;)m=m.parentElement,m&&h.indexOf(m)===-1&&h.push(m)}const f=h.filter(p=>u.indexOf(p)>-1).map(p=>this._getDropTargetId(p)).filter(p=>!!p).filter((p,m,y)=>y.indexOf(p)===m);if(a)for(const p in this.targetNodes){const m=this.targetNodes.get(p);if(l&&m&&m.contains(l)&&f.indexOf(p)===-1){f.unshift(p);break}}f.reverse(),this.actions.hover(f,{clientOffset:c})},this._getDropTargetId=s=>{const i=this.targetNodes.keys();let o=i.next();for(;o.done===!1;){const a=o.value;if(s===this.targetNodes.get(a))return a;o=i.next()}},this.handleTopMoveEndCapture=s=>{if(this._isScrolling=!1,this.lastTargetTouchFallback=void 0,!!hh(s)){if(!this.monitor.isDragging()||this.monitor.didDrop()){this.moveStartSourceIds=void 0;return}s.cancelable&&s.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()}},this.handleCancelOnEscape=s=>{s.key==="Escape"&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new ah(r,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(Ae.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(Ae.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(Ae.keyboard)}}const mh=function(e,n={},r={}){return new vt(e,n,r)};var Ue=[],vh=function(){return Ue.some(function(t){return t.activeTargets.length>0})},yh=function(){return Ue.some(function(t){return t.skippedTargets.length>0})},ii="ResizeObserver loop completed with undelivered notifications.",bh=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:ii}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=ii),window.dispatchEvent(t)},St;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(St||(St={}));var We=function(t){return Object.freeze(t)},Th=(function(){function t(e,n){this.inlineSize=e,this.blockSize=n,We(this)}return t})(),aa=(function(){function t(e,n,r,s){return this.x=e,this.y=n,this.width=r,this.height=s,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,We(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,s=e.top,i=e.right,o=e.bottom,a=e.left,c=e.width,l=e.height;return{x:n,y:r,top:s,right:i,bottom:o,left:a,width:c,height:l}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t})(),as=function(t){return t instanceof SVGElement&&"getBBox"in t},ca=function(t){if(as(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var s=t,i=s.offsetWidth,o=s.offsetHeight;return!(i||o||t.getClientRects().length)},oi=function(t){var e;if(t instanceof Element)return!0;var n=(e=t?.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},xh=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},yt=typeof window<"u"?window:{},Bt=new WeakMap,ai=/auto|scroll/,wh=/^tb|vertical/,Sh=/msie|trident/i.test(yt.navigator&&yt.navigator.userAgent),ve=function(t){return parseFloat(t||"0")},tt=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new Th((n?e:t)||0,(n?t:e)||0)},ci=We({devicePixelContentBoxSize:tt(),borderBoxSize:tt(),contentBoxSize:tt(),contentRect:new aa(0,0,0,0)}),la=function(t,e){if(e===void 0&&(e=!1),Bt.has(t)&&!e)return Bt.get(t);if(ca(t))return Bt.set(t,ci),ci;var n=getComputedStyle(t),r=as(t)&&t.ownerSVGElement&&t.getBBox(),s=!Sh&&n.boxSizing==="border-box",i=wh.test(n.writingMode||""),o=!r&&ai.test(n.overflowY||""),a=!r&&ai.test(n.overflowX||""),c=r?0:ve(n.paddingTop),l=r?0:ve(n.paddingRight),u=r?0:ve(n.paddingBottom),d=r?0:ve(n.paddingLeft),h=r?0:ve(n.borderTopWidth),f=r?0:ve(n.borderRightWidth),p=r?0:ve(n.borderBottomWidth),m=r?0:ve(n.borderLeftWidth),y=d+l,b=c+u,x=m+f,w=h+p,S=a?t.offsetHeight-w-t.clientHeight:0,P=o?t.offsetWidth-x-t.clientWidth:0,N=s?y+x:0,L=s?b+w:0,I=r?r.width:ve(n.width)-N-P,_=r?r.height:ve(n.height)-L-S,E=I+y+P+x,V=_+b+S+w,U=We({devicePixelContentBoxSize:tt(Math.round(I*devicePixelRatio),Math.round(_*devicePixelRatio),i),borderBoxSize:tt(E,V,i),contentBoxSize:tt(I,_,i),contentRect:new aa(d,c,I,_)});return Bt.set(t,U),U},ua=function(t,e,n){var r=la(t,n),s=r.borderBoxSize,i=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(e){case St.DEVICE_PIXEL_CONTENT_BOX:return o;case St.BORDER_BOX:return s;default:return i}},Dh=(function(){function t(e){var n=la(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=We([n.borderBoxSize]),this.contentBoxSize=We([n.contentBoxSize]),this.devicePixelContentBoxSize=We([n.devicePixelContentBoxSize])}return t})(),da=function(t){if(ca(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},Ch=function(){var t=1/0,e=[];Ue.forEach(function(o){if(o.activeTargets.length!==0){var a=[];o.activeTargets.forEach(function(l){var u=new Dh(l.target),d=da(l.target);a.push(u),l.lastReportedSize=ua(l.target,l.observedBox),d<t&&(t=d)}),e.push(function(){o.callback.call(o.observer,a,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var s=r[n];s()}return t},li=function(t){Ue.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(s){s.isActive()&&(da(s.target)>t?n.activeTargets.push(s):n.skippedTargets.push(s))})})},Eh=function(){var t=0;for(li(t);vh();)t=Ch(),li(t);return yh()&&bh(),t>0},qn,ha=[],Ph=function(){return ha.splice(0).forEach(function(t){return t()})},Oh=function(t){if(!qn){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Ph()}).observe(n,r),qn=function(){n.textContent="".concat(e?e--:e++)}}ha.push(t),qn()},Ih=function(t){Oh(function(){requestAnimationFrame(t)})},Yt=0,Mh=function(){return!!Yt},Ah=250,Rh={attributes:!0,characterData:!0,childList:!0,subtree:!0},ui=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],di=function(t){return t===void 0&&(t=0),Date.now()+t},Kn=!1,kh=(function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=Ah),!Kn){Kn=!0;var r=di(e);Ih(function(){var s=!1;try{s=Eh()}finally{if(Kn=!1,e=r-di(),!Mh())return;s?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,Rh)};document.body?n():yt.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ui.forEach(function(n){return yt.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),ui.forEach(function(n){return yt.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t})(),xr=new kh,hi=function(t){!Yt&&t>0&&xr.start(),Yt+=t,!Yt&&xr.stop()},Lh=function(t){return!as(t)&&!xh(t)&&getComputedStyle(t).display==="inline"},Nh=(function(){function t(e,n){this.target=e,this.observedBox=n||St.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=ua(this.target,this.observedBox,!0);return Lh(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t})(),Vh=(function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t})(),Ft=new WeakMap,fi=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},_t=(function(){function t(){}return t.connect=function(e,n){var r=new Vh(e,n);Ft.set(e,r)},t.observe=function(e,n,r){var s=Ft.get(e),i=s.observationTargets.length===0;fi(s.observationTargets,n)<0&&(i&&Ue.push(s),s.observationTargets.push(new Nh(n,r&&r.box)),hi(1),xr.schedule())},t.unobserve=function(e,n){var r=Ft.get(e),s=fi(r.observationTargets,n),i=r.observationTargets.length===1;s>=0&&(i&&Ue.splice(Ue.indexOf(r),1),r.observationTargets.splice(s,1),hi(-1))},t.disconnect=function(e){var n=this,r=Ft.get(e);r.observationTargets.slice().forEach(function(s){return n.unobserve(e,s.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t})(),jh=(function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");_t.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!oi(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");_t.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!oi(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");_t.unobserve(this,e)},t.prototype.disconnect=function(){_t.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t})();const fa=g.createContext({});function Bh(t){const e=g.useRef(null);return e.current===null&&(e.current=t()),e.current}const Fh=typeof window<"u",_h=Fh?g.useLayoutEffect:g.useEffect,cs=g.createContext(null);function ls(t,e){t.indexOf(e)===-1&&t.push(e)}function ln(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const xe=(t,e,n)=>n>e?e:n<t?t:n;let Dn=()=>{};const Re={},pa=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),ga=t=>typeof t=="object"&&t!==null,ma=t=>/^0[^.\s]+$/u.test(t);function va(t){let e;return()=>(e===void 0&&(e=t()),e)}const he=t=>t,Ot=(...t)=>t.reduce((e,n)=>r=>n(e(r))),Dt=(t,e,n)=>{const r=e-t;return r?(n-t)/r:1};class us{constructor(){this.subscriptions=[]}add(e){return ls(this.subscriptions,e),()=>ln(this.subscriptions,e)}notify(e,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const oe=t=>t*1e3,de=t=>t/1e3,ya=(t,e)=>e?t*(1e3/e):0,ba=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,zh=1e-7,Hh=12;function $h(t,e,n,r,s){let i,o,a=0;do o=e+(n-e)/2,i=ba(o,r,s)-t,i>0?n=o:e=o;while(Math.abs(i)>zh&&++a<Hh);return o}function It(t,e,n,r){if(t===e&&n===r)return he;const s=i=>$h(i,0,1,t,n);return i=>i===0||i===1?i:ba(s(i),e,r)}const Ta=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,xa=t=>e=>1-t(1-e),wa=It(.33,1.53,.69,.99),ds=xa(wa),Sa=Ta(ds),Da=t=>t>=1?1:(t*=2)<1?.5*ds(t):.5*(2-Math.pow(2,-10*(t-1))),hs=t=>1-Math.sin(Math.acos(t)),Ca=xa(hs),Ea=Ta(hs),Uh=It(.42,0,1,1),Wh=It(0,0,.58,1),Pa=It(.42,0,.58,1),Gh=t=>Array.isArray(t)&&typeof t[0]!="number",Oa=t=>Array.isArray(t)&&typeof t[0]=="number",qh={linear:he,easeIn:Uh,easeInOut:Pa,easeOut:Wh,circIn:hs,circInOut:Ea,circOut:Ca,backIn:ds,backInOut:Sa,backOut:wa,anticipate:Da},Kh=t=>typeof t=="string",pi=t=>{if(Oa(t)){Dn(t.length===4);const[e,n,r,s]=t;return It(e,n,r,s)}else if(Kh(t))return qh[t];return t},zt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Xh(t){let e=new Set,n=new Set,r=!1,s=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(l){i.has(l)&&(c.schedule(l),t()),l(o)}const c={schedule:(l,u=!1,d=!1)=>{const f=d&&r?e:n;return u&&i.add(l),f.add(l),l},cancel:l=>{n.delete(l),i.delete(l)},process:l=>{if(o=l,r){s=!0;return}r=!0;const u=e;e=n,n=u,e.forEach(a),e.clear(),r=!1,s&&(s=!1,c.process(l))}};return c}const Yh=40;function Ia(t,e){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=zt.reduce((w,S)=>(w[S]=Xh(i),w),{}),{setup:a,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:h,render:f,postRender:p}=o,m=()=>{const w=Re.useManualTiming,S=w?s.timestamp:performance.now();n=!1,w||(s.delta=r?1e3/60:Math.max(Math.min(S-s.timestamp,Yh),1)),s.timestamp=S,s.isProcessing=!0,a.process(s),c.process(s),l.process(s),u.process(s),d.process(s),h.process(s),f.process(s),p.process(s),s.isProcessing=!1,n&&e&&(r=!1,t(m))},y=()=>{n=!0,r=!0,s.isProcessing||t(m)};return{schedule:zt.reduce((w,S)=>{const P=o[S];return w[S]=(N,L=!1,I=!1)=>(n||y(),P.schedule(N,L,I)),w},{}),cancel:w=>{for(let S=0;S<zt.length;S++)o[zt[S]].cancel(w)},state:s,steps:o}}const{schedule:F,cancel:ke,state:Z,steps:Xn}=Ia(typeof requestAnimationFrame<"u"?requestAnimationFrame:he,!0);let Zt;function Zh(){Zt=void 0}const Q={now:()=>(Zt===void 0&&Q.set(Z.isProcessing||Re.useManualTiming?Z.timestamp:performance.now()),Zt),set:t=>{Zt=t,queueMicrotask(Zh)}},Ma=t=>e=>typeof e=="string"&&e.startsWith(t),Aa=Ma("--"),Jh=Ma("var(--"),fs=t=>Jh(t)?Qh.test(t.split("/*")[0].trim()):!1,Qh=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function gi(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const st={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ct={...st,transform:t=>xe(0,1,t)},Ht={...st,default:1},bt=t=>Math.round(t*1e5)/1e5,ps=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ef(t){return t==null}const tf=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,gs=(t,e)=>n=>!!(typeof n=="string"&&tf.test(n)&&n.startsWith(t)||e&&!ef(n)&&Object.prototype.hasOwnProperty.call(n,e)),Ra=(t,e,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(ps);return{[t]:parseFloat(s),[e]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},nf=t=>xe(0,255,t),Yn={...st,transform:t=>Math.round(nf(t))},He={test:gs("rgb","red"),parse:Ra("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Yn.transform(t)+", "+Yn.transform(e)+", "+Yn.transform(n)+", "+bt(Ct.transform(r))+")"};function rf(t){let e="",n="",r="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,r+=r,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const wr={test:gs("#"),parse:rf,transform:He.transform},Mt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ee=Mt("deg"),Te=Mt("%"),D=Mt("px"),sf=Mt("vh"),of=Mt("vw"),mi={...Te,parse:t=>Te.parse(t)/100,transform:t=>Te.transform(t*100)},Ze={test:gs("hsl","hue"),parse:Ra("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+Te.transform(bt(e))+", "+Te.transform(bt(n))+", "+bt(Ct.transform(r))+")"},K={test:t=>He.test(t)||wr.test(t)||Ze.test(t),parse:t=>He.test(t)?He.parse(t):Ze.test(t)?Ze.parse(t):wr.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?He.transform(t):Ze.transform(t),getAnimatableNone:t=>{const e=K.parse(t);return e.alpha=0,K.transform(e)}},af=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function cf(t){return isNaN(t)&&typeof t=="string"&&(t.match(ps)?.length||0)+(t.match(af)?.length||0)>0}const ka="number",La="color",lf="var",uf="var(",vi="${}",df=/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 nt(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=e.replace(df,c=>(K.test(c)?(r.color.push(i),s.push(La),n.push(K.parse(c))):c.startsWith(uf)?(r.var.push(i),s.push(lf),n.push(c)):(r.number.push(i),s.push(ka),n.push(parseFloat(c))),++i,vi)).split(vi);return{values:n,split:a,indexes:r,types:s}}function hf(t){return nt(t).values}function Na({split:t,types:e}){const n=t.length;return r=>{let s="";for(let i=0;i<n;i++)if(s+=t[i],r[i]!==void 0){const o=e[i];o===ka?s+=bt(r[i]):o===La?s+=K.transform(r[i]):s+=r[i]}return s}}function ff(t){return Na(nt(t))}const pf=t=>typeof t=="number"?0:K.test(t)?K.getAnimatableNone(t):t,gf=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:pf(t);function mf(t){const e=nt(t);return Na(e)(e.values.map((r,s)=>gf(r,e.split[s])))}const me={test:cf,parse:hf,createTransformer:ff,getAnimatableNone:mf};function Zn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function vf({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let s=0,i=0,o=0;if(!e)s=i=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;s=Zn(c,a,t+1/3),i=Zn(c,a,t),o=Zn(c,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function un(t,e){return n=>n>0?e:t}const B=(t,e,n)=>t+(e-t)*n,Jn=(t,e,n)=>{const r=t*t,s=n*(e*e-r)+r;return s<0?0:Math.sqrt(s)},yf=[wr,He,Ze],bf=t=>yf.find(e=>e.test(t));function yi(t){const e=bf(t);if(!e)return!1;let n=e.parse(t);return e===Ze&&(n=vf(n)),n}const bi=(t,e)=>{const n=yi(t),r=yi(e);if(!n||!r)return un(t,e);const s={...n};return i=>(s.red=Jn(n.red,r.red,i),s.green=Jn(n.green,r.green,i),s.blue=Jn(n.blue,r.blue,i),s.alpha=B(n.alpha,r.alpha,i),He.transform(s))},Sr=new Set(["none","hidden"]);function Tf(t,e){return Sr.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function xf(t,e){return n=>B(t,e,n)}function ms(t){return typeof t=="number"?xf:typeof t=="string"?fs(t)?un:K.test(t)?bi:Df:Array.isArray(t)?Va:typeof t=="object"?K.test(t)?bi:wf:un}function Va(t,e){const n=[...t],r=n.length,s=t.map((i,o)=>ms(i)(i,e[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function wf(t,e){const n={...t,...e},r={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(r[s]=ms(t[s])(t[s],e[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function Sf(t,e){const n=[],r={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const i=e.types[s],o=t.indexes[i][r[i]],a=t.values[o]??0;n[s]=a,r[i]++}return n}const Df=(t,e)=>{const n=me.createTransformer(e),r=nt(t),s=nt(e);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Sr.has(t)&&!s.values.length||Sr.has(e)&&!r.values.length?Tf(t,e):Ot(Va(Sf(r,s),s.values),n):un(t,e)};function ja(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?B(t,e,n):ms(t)(t,e)}const Cf=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>F.update(e,n),stop:()=>ke(e),now:()=>Z.isProcessing?Z.timestamp:Q.now()}},Ba=(t,e,n=10)=>{let r="";const s=Math.max(Math.round(e/n),2);for(let i=0;i<s;i++)r+=Math.round(t(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},dn=2e4;function vs(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<dn;)e+=n,r=t.next(e);return e>=dn?1/0:e}function Ef(t,e=100,n){const r=n({...t,keyframes:[0,e]}),s=Math.min(vs(r),dn);return{type:"keyframes",ease:i=>r.next(s*i).value/e,duration:de(s)}}const G={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 Dr(t,e){return t*Math.sqrt(1-e*e)}const Pf=12;function Of(t,e,n){let r=n;for(let s=1;s<Pf;s++)r=r-t(r)/e(r);return r}const Qn=.001;function If({duration:t=G.duration,bounce:e=G.bounce,velocity:n=G.velocity,mass:r=G.mass}){let s,i,o=1-e;o=xe(G.minDamping,G.maxDamping,o),t=xe(G.minDuration,G.maxDuration,de(t)),o<1?(s=l=>{const u=l*o,d=u*t,h=u-n,f=Dr(l,o),p=Math.exp(-d);return Qn-h/f*p},i=l=>{const d=l*o*t,h=d*n+n,f=Math.pow(o,2)*Math.pow(l,2)*t,p=Math.exp(-d),m=Dr(Math.pow(l,2),o);return(-s(l)+Qn>0?-1:1)*((h-f)*p)/m}):(s=l=>{const u=Math.exp(-l*t),d=(l-n)*t+1;return-Qn+u*d},i=l=>{const u=Math.exp(-l*t),d=(n-l)*(t*t);return u*d});const a=5/t,c=Of(s,i,a);if(t=oe(t),isNaN(c))return{stiffness:G.stiffness,damping:G.damping,duration:t};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:o*2*Math.sqrt(r*l),duration:t}}}const Mf=["duration","bounce"],Af=["stiffness","damping","mass"];function Ti(t,e){return e.some(n=>t[n]!==void 0)}function Rf(t){let e={velocity:G.velocity,stiffness:G.stiffness,damping:G.damping,mass:G.mass,isResolvedFromDuration:!1,...t};if(!Ti(t,Af)&&Ti(t,Mf))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*xe(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:G.mass,stiffness:s,damping:i}}else{const n=If({...t,velocity:0});e={...e,...n,mass:G.mass},e.isResolvedFromDuration=!0}return e}function hn(t=G.visualDuration,e=G.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:c,damping:l,mass:u,duration:d,velocity:h,isResolvedFromDuration:f}=Rf({...n,velocity:-de(n.velocity||0)}),p=h||0,m=l/(2*Math.sqrt(c*u)),y=o-i,b=de(Math.sqrt(c/u)),x=Math.abs(y)<5;r||(r=x?G.restSpeed.granular:G.restSpeed.default),s||(s=x?G.restDelta.granular:G.restDelta.default);let w,S,P,N,L,I;if(m<1)P=Dr(b,m),N=(p+m*b*y)/P,w=E=>{const V=Math.exp(-m*b*E);return o-V*(N*Math.sin(P*E)+y*Math.cos(P*E))},L=m*b*N+y*P,I=m*b*y-N*P,S=E=>Math.exp(-m*b*E)*(L*Math.sin(P*E)+I*Math.cos(P*E));else if(m===1){w=V=>o-Math.exp(-b*V)*(y+(p+b*y)*V);const E=p+b*y;S=V=>Math.exp(-b*V)*(b*E*V-p)}else{const E=b*Math.sqrt(m*m-1);w=ne=>{const fe=Math.exp(-m*b*ne),re=Math.min(E*ne,300);return o-fe*((p+m*b*y)*Math.sinh(re)+E*y*Math.cosh(re))/E};const V=(p+m*b*y)/E,U=m*b*V-y*E,we=m*b*y-V*E;S=ne=>{const fe=Math.exp(-m*b*ne),re=Math.min(E*ne,300);return fe*(U*Math.sinh(re)+we*Math.cosh(re))}}const _={calculatedDuration:f&&d||null,velocity:E=>oe(S(E)),next:E=>{if(!f&&m<1){const U=Math.exp(-m*b*E),we=Math.sin(P*E),ne=Math.cos(P*E),fe=o-U*(N*we+y*ne),re=oe(U*(L*we+I*ne));return a.done=Math.abs(re)<=r&&Math.abs(o-fe)<=s,a.value=a.done?o:fe,a}const V=w(E);if(f)a.done=E>=d;else{const U=oe(S(E));a.done=Math.abs(U)<=r&&Math.abs(o-V)<=s}return a.value=a.done?o:V,a},toString:()=>{const E=Math.min(vs(_),dn),V=Ba(U=>_.next(E*U).value,E,30);return E+"ms "+V},toTransition:()=>{}};return _}hn.applyToOptions=t=>{const e=Ef(t,100,hn);return t.ease=e.ease,t.duration=oe(e.duration),t.type="keyframes",t};const kf=5;function Fa(t,e,n){const r=Math.max(e-kf,0);return ya(n-t(r),e-r)}function Cr({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:c,restDelta:l=.5,restSpeed:u}){const d=t[0],h={done:!1,value:d},f=I=>a!==void 0&&I<a||c!==void 0&&I>c,p=I=>a===void 0?c:c===void 0||Math.abs(a-I)<Math.abs(c-I)?a:c;let m=n*e;const y=d+m,b=o===void 0?y:o(y);b!==y&&(m=b-d);const x=I=>-m*Math.exp(-I/r),w=I=>b+x(I),S=I=>{const _=x(I),E=w(I);h.done=Math.abs(_)<=l,h.value=h.done?b:E};let P,N;const L=I=>{f(h.value)&&(P=I,N=hn({keyframes:[h.value,p(h.value)],velocity:Fa(w,I,h.value),damping:s,stiffness:i,restDelta:l,restSpeed:u}))};return L(0),{calculatedDuration:null,next:I=>{let _=!1;return!N&&P===void 0&&(_=!0,S(I),L(I)),P!==void 0&&I>=P?N.next(I-P):(!_&&S(I),h)}}}function Lf(t,e,n){const r=[],s=n||Re.mix||ja,i=t.length-1;for(let o=0;o<i;o++){let a=s(t[o],t[o+1]);if(e){const c=Array.isArray(e)?e[o]||he:e;a=Ot(c,a)}r.push(a)}return r}function Nf(t,e,{clamp:n=!0,ease:r,mixer:s}={}){const i=t.length;if(Dn(i===e.length),i===1)return()=>e[0];if(i===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Lf(e,r,s),c=a.length,l=u=>{if(o&&u<t[0])return e[0];let d=0;if(c>1)for(;d<t.length-2&&!(u<t[d+1]);d++);const h=Dt(t[d],t[d+1],u);return a[d](h)};return n?u=>l(xe(t[0],t[i-1],u)):l}function Vf(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const s=Dt(0,e,r);t.push(B(n,1,s))}}function jf(t){const e=[0];return Vf(e,t.length-1),e}function Bf(t,e){return t.map(n=>n*e)}function Ff(t,e){return t.map(()=>e||Pa).splice(0,t.length-1)}function Tt({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const s=Gh(r)?r.map(pi):pi(r),i={done:!1,value:e[0]},o=Bf(n&&n.length===e.length?n:jf(e),t),a=Nf(o,e,{ease:Array.isArray(s)?s:Ff(e,s)});return{calculatedDuration:t,next:c=>(i.value=a(c),i.done=c>=t,i)}}const _f=t=>t!==null;function Cn(t,{repeat:e,repeatType:n="loop"},r,s=1){const i=t.filter(_f),a=s<0||e&&n!=="loop"&&e%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const zf={decay:Cr,inertia:Cr,tween:Tt,keyframes:Tt,spring:hn};function _a(t){typeof t.type=="string"&&(t.type=zf[t.type])}class ys{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Hf=t=>t/100;class fn extends ys{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Q.now()&&this.tick(Q.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;_a(e);const{type:n=Tt,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=e;let{keyframes:a}=e;const c=n||Tt;c!==Tt&&typeof a[0]!="number"&&(this.mixKeyframes=Ot(Hf,ja(a[0],a[1])),a=[0,100]);const l=c({...e,keyframes:a});i==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...a].reverse(),velocity:-o})),l.calculatedDuration===null&&(l.calculatedDuration=vs(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=l}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:l=0,keyframes:u,repeat:d,repeatType:h,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const b=this.currentTime-l*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?b<0:b>s;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let w=this.currentTime,S=r;if(d){const I=Math.min(this.currentTime,s)/a;let _=Math.floor(I),E=I%1;!E&&I>=1&&(E=1),E===1&&_--,_=Math.min(_,d+1),_%2&&(h==="reverse"?(E=1-E,f&&(E-=f/a)):h==="mirror"&&(S=o)),w=xe(0,1,E)*a}let P;x?(this.delayState.value=u[0],P=this.delayState):P=S.next(w),i&&!x&&(P.value=i(P.value));let{done:N}=P;!x&&c!==null&&(N=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&N);return L&&p!==Cr&&(P.value=Cn(u,this.options,y,this.speed)),m&&m(P.value),L&&this.finish(),P}then(e,n){return this.finished.then(e,n)}get duration(){return de(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+de(e)}get time(){return de(this.currentTime)}set time(e){e=oe(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return Fa(r=>this.generator.next(r).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(Q.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=de(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Cf,startTime:n}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Q.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function $f(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const $e=t=>t*180/Math.PI,Er=t=>{const e=$e(Math.atan2(t[1],t[0]));return Pr(e)},Uf={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Er,rotateZ:Er,skewX:t=>$e(Math.atan(t[1])),skewY:t=>$e(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Pr=t=>(t=t%360,t<0&&(t+=360),t),xi=Er,wi=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Si=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Wf={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:wi,scaleY:Si,scale:t=>(wi(t)+Si(t))/2,rotateX:t=>Pr($e(Math.atan2(t[6],t[5]))),rotateY:t=>Pr($e(Math.atan2(-t[2],t[0]))),rotateZ:xi,rotate:xi,skewX:t=>$e(Math.atan(t[4])),skewY:t=>$e(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Or(t){return t.includes("scale")?1:0}function Ir(t,e){if(!t||t==="none")return Or(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=Wf,s=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Uf,s=a}if(!s)return Or(e);const i=r[e],o=s[1].split(",").map(qf);return typeof i=="function"?i(o):o[i]}const Gf=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Ir(n,e)};function qf(t){return parseFloat(t.trim())}const it=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ot=new Set([...it,"pathRotation"]),Di=t=>t===st||t===D,Kf=new Set(["x","y","z"]),Xf=it.filter(t=>!Kf.has(t));function Yf(t){const e=[];return Xf.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Me={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:r})=>{const s=t.max-t.min;return r==="border-box"?s:s-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:r})=>{const s=t.max-t.min;return r==="border-box"?s:s-parseFloat(e)-parseFloat(n)},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})=>Ir(e,"x"),y:(t,{transform:e})=>Ir(e,"y")};Me.translateX=Me.x;Me.translateY=Me.y;const Ge=new Set;let Mr=!1,Ar=!1,Rr=!1;function za(){if(Ar){const t=Array.from(Ge).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const s=Yf(r);s.length&&(n.set(r,s),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{r.getValue(i)?.set(o)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Ar=!1,Mr=!1,Ge.forEach(t=>t.complete(Rr)),Ge.clear()}function Ha(){Ge.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ar=!0)})}function Zf(){Rr=!0,Ha(),za(),Rr=!1}class bs{constructor(e,n,r,s,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ge.add(this),Mr||(Mr=!0,F.read(Ha),F.resolveKeyframes(za))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:s}=this;if(e[0]===null){const i=s?.get(),o=e[e.length-1];if(i!==void 0)e[0]=i;else if(r&&n){const a=r.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),s&&i===void 0&&s.set(e[0])}$f(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Ge.delete(this)}cancel(){this.state==="scheduled"&&(Ge.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Jf=t=>t.startsWith("--");function $a(t,e,n){Jf(e)?t.style.setProperty(e,n):t.style[e]=n}const Qf={};function Ua(t,e){const n=va(t);return()=>Qf[e]??n()}const ep=Ua(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Wa=Ua(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),gt=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,Ci={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:gt([0,.65,.55,1]),circOut:gt([.55,0,1,.45]),backIn:gt([.31,.01,.66,-.59]),backOut:gt([.33,1.53,.69,.99])};function Ga(t,e){if(t)return typeof t=="function"?Wa()?Ba(t,e):"ease-out":Oa(t)?gt(t):Array.isArray(t)?t.map(n=>Ga(n,e)||Ci.easeOut):Ci[t]}function tp(t,e,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:c}={},l=void 0){const u={[e]:n};c&&(u.offset=c);const d=Ga(a,s);Array.isArray(d)&&(u.easing=d);const h={delay:r,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return l&&(h.pseudoElement=l),t.animate(u,h)}function qa(t){return typeof t=="function"&&"applyToOptions"in t}function np({type:t,...e}){return qa(t)&&Wa()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Ka extends ys{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=e;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=e,Dn(typeof e.type!="string");const l=np(e);this.animation=tp(n,r,s,l,i),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Cn(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),$a(n,r,u),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return de(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+de(e)}get time(){return de(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=oe(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:r,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&ep()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),he):s(this)}}const Xa={anticipate:Da,backInOut:Sa,circInOut:Ea};function rp(t){return t in Xa}function sp(t){typeof t.ease=="string"&&rp(t.ease)&&(t.ease=Xa[t.ease])}const er=10;class ip extends Ka{constructor(e){sp(e),_a(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new fn({...o,autoplay:!1}),c=Math.max(er,Q.now()-this.startTime),l=xe(0,er,c-er),u=a.sample(c).value,{name:d}=this.options;i&&d&&$a(i,d,u),n.setWithVelocity(a.sample(Math.max(0,c-l)).value,u,l),a.stop()}}const Ei=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(me.test(t)||t==="0")&&!t.startsWith("url("));function op(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function ap(t,e,n,r){const s=t[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const i=t[t.length-1],o=Ei(s,e),a=Ei(i,e);return!o||!a?!1:op(t)||(n==="spring"||qa(n))&&r}function kr(t){t.duration=0,t.type="keyframes"}const Ya=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),cp=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function lp(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&cp.test(t[e]))return!0;return!1}const up=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),dp=va(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function hp(t){const{motionValue:e,name:n,repeatDelay:r,repeatType:s,damping:i,type:o,keyframes:a}=t,c=e?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return dp()&&n&&(Ya.has(n)||up.has(n)&&lp(a))&&(n!=="transform"||!u)&&!l&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const fp=40;class pp extends ys{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:c,motionValue:l,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Q.now();const h={autoplay:e,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:c,motionValue:l,element:u,...d},f=u?.KeyframeResolver||bs;this.keyframeResolver=new f(a,(p,m,y)=>this.onKeyframesResolved(p,m,h,!y),c,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,r,s){this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:c,isHandoff:l,onUpdate:u}=r;this.resolvedAt=Q.now();let d=!0;ap(e,i,o,a)||(d=!1,(Re.instantAnimations||!c)&&u?.(Cn(e,r,n)),e[0]=e[e.length-1],kr(r),r.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>fp?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},p=d&&!l&&hp(f),m=f.motionValue?.owner?.current;let y;if(p)try{y=new ip({...f,element:m})}catch{y=new fn(f)}else y=new fn(f);y.finished.then(()=>{this.notifyFinished()}).catch(he),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Zf()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Za(t,e,n,r=0,s=1){const i=Array.from(t).sort((l,u)=>l.sortNodePosition(u)).indexOf(e),o=t.size,a=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:a-i*r}const Pi=30,gp=t=>!isNaN(parseFloat(t));class mp{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const s=Q.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Q.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=gp(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new us);const r=this.events[e].add(n);return e==="change"?()=>{r(),F.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Q.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Pi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Pi);return ya(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function rt(t,e){return new mp(t,e)}function Ja(t,e){if(t?.inherit&&e){const{inherit:n,...r}=t;return{...e,...r}}return t}function Ts(t,e){const n=t?.[e]??t?.default??t;return n!==t?Ja(n,t):n}const vp={type:"spring",stiffness:500,damping:25,restSpeed:10},yp=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),bp={type:"keyframes",duration:.8},Tp={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},xp=(t,{keyframes:e})=>e.length>2?bp:ot.has(t)?t.startsWith("scale")?yp(e[1]):vp:Tp,wp=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Sp(t){for(const e in t)if(!wp.has(e))return!0;return!1}const xs=(t,e,n,r={},s,i)=>o=>{const a=Ts(r,t)||{},c=a.delay||r.delay||0;let{elapsed:l=0}=r;l=l-oe(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:h=>{e.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:i?void 0:s};Sp(a)||Object.assign(u,xp(t,u)),u.duration&&(u.duration=oe(u.duration)),u.repeatDelay&&(u.repeatDelay=oe(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(kr(u),u.delay===0&&(d=!0)),(Re.instantAnimations||Re.skipAnimations||s?.shouldSkipAnimations||a.skipAnimations)&&(d=!0,kr(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!i&&e.get()!==void 0){const h=Cn(u.keyframes,a);if(h!==void 0){F.update(()=>{u.onUpdate(h),u.onComplete()});return}}return a.isSync?new fn(u):new pp(u)},Dp=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Cp(t){const e=Dp.exec(t);if(!e)return[,];const[,n,r,s]=e;return[`--${n??r}`,s]}function Qa(t,e,n=1){const[r,s]=Cp(t);if(!r)return;const i=window.getComputedStyle(e).getPropertyValue(r);if(i){const o=i.trim();return pa(o)?parseFloat(o):o}return fs(s)?Qa(s,e,n+1):s}function Oi(t){const e=[{},{}];return t?.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function ws(t,e,n,r){if(typeof e=="function"){const[s,i]=Oi(r);e=e(n!==void 0?n:t.custom,s,i)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[s,i]=Oi(r);e=e(n!==void 0?n:t.custom,s,i)}return e}function qe(t,e,n){const r=t.getProps();return ws(r,e,n!==void 0?n:r.custom,t)}const ec=new Set(["width","height","top","left","right","bottom",...it]),Lr=t=>Array.isArray(t);function Ep(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,rt(n))}function Pp(t){return Lr(t)?t[t.length-1]||0:t}function Op(t,e){const n=qe(t,e);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=Pp(i[o]);Ep(t,o,a)}}const J=t=>!!(t&&t.getVelocity);function Ip(t){return!!(J(t)&&t.add)}function Nr(t,e){const n=t.getValue("willChange");if(Ip(n))return n.add(e);if(!n&&Re.WillChange){const r=new Re.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function Ss(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const Mp="framerAppearId",tc="data-"+Ss(Mp);function nc(t){return t.props[tc]}function Ap({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function rc(t,e,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...a}=e;const c=t.getDefaultTransition();i=i?Ja(i,c):c;const l=i?.reduceMotion,u=i?.skipAnimations;r&&(i=r);const d=[],h=s&&t.animationState&&t.animationState.getState()[s],f=i?.path;f&&f.animateVisualElement(t,a,i,n,d);for(const p in a){const m=t.getValue(p,t.latestValues[p]??null),y=a[p];if(y===void 0||h&&Ap(h,p))continue;const b={delay:n,...Ts(i||{},p)};u&&(b.skipAnimations=!0);const x=m.get();if(x!==void 0&&!m.isAnimating()&&!Array.isArray(y)&&y===x&&!b.velocity){F.update(()=>m.set(y));continue}let w=!1;if(window.MotionHandoffAnimation){const N=nc(t);if(N){const L=window.MotionHandoffAnimation(N,p,F);L!==null&&(b.startTime=L,w=!0)}}Nr(t,p);const S=l??t.shouldReduceMotion;m.start(xs(p,m,y,S&&ec.has(p)?{type:!1}:b,t,w));const P=m.animation;P&&d.push(P)}if(o){const p=()=>F.update(()=>{o&&Op(t,o)});d.length?Promise.all(d).then(p):p()}return d}function Vr(t,e,n={}){const r=qe(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(rc(t,r,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:u,staggerDirection:d}=s;return Rp(t,e,c,l,u,d,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,l]=a==="beforeChildren"?[i,o]:[o,i];return c().then(()=>l())}else return Promise.all([i(),o(n.delay)])}function Rp(t,e,n=0,r=0,s=0,i=1,o){const a=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),a.push(Vr(c,e,{...o,delay:n+(typeof r=="function"?0:r)+Za(t.variantChildren,c,r,s,i)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(a)}function kp(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const s=e.map(i=>Vr(t,i,n));r=Promise.all(s)}else if(typeof e=="string")r=Vr(t,e,n);else{const s=typeof e=="function"?qe(t,e,n.custom):e;r=Promise.all(rc(t,s,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}const Lp={test:t=>t==="auto",parse:t=>t},sc=t=>e=>e.test(t),ic=[st,D,Te,Ee,of,sf,Lp],Ii=t=>ic.find(sc(t));function Np(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||ma(t):!0}const Vp=new Set(["brightness","contrast","saturate","opacity"]);function jp(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(ps)||[];if(!r)return t;const s=n.replace(r,"");let i=Vp.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+s+")"}const Bp=/\b([a-z-]*)\(.*?\)/gu,jr={...me,getAnimatableNone:t=>{const e=t.match(Bp);return e?e.map(jp).join(" "):t}},Br={...me,getAnimatableNone:t=>{const e=me.parse(t);return me.createTransformer(t)(e.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Mi={...st,transform:Math.round},Fp={rotate:Ee,pathRotation:Ee,rotateX:Ee,rotateY:Ee,rotateZ:Ee,scale:Ht,scaleX:Ht,scaleY:Ht,scaleZ:Ht,skew:Ee,skewX:Ee,skewY:Ee,distance:D,translateX:D,translateY:D,translateZ:D,x:D,y:D,z:D,perspective:D,transformPerspective:D,opacity:Ct,originX:mi,originY:mi,originZ:D},pn={borderWidth:D,borderTopWidth:D,borderRightWidth:D,borderBottomWidth:D,borderLeftWidth:D,borderRadius:D,borderTopLeftRadius:D,borderTopRightRadius:D,borderBottomRightRadius:D,borderBottomLeftRadius:D,width:D,maxWidth:D,height:D,maxHeight:D,top:D,right:D,bottom:D,left:D,inset:D,insetBlock:D,insetBlockStart:D,insetBlockEnd:D,insetInline:D,insetInlineStart:D,insetInlineEnd:D,padding:D,paddingTop:D,paddingRight:D,paddingBottom:D,paddingLeft:D,paddingBlock:D,paddingBlockStart:D,paddingBlockEnd:D,paddingInline:D,paddingInlineStart:D,paddingInlineEnd:D,margin:D,marginTop:D,marginRight:D,marginBottom:D,marginLeft:D,marginBlock:D,marginBlockStart:D,marginBlockEnd:D,marginInline:D,marginInlineStart:D,marginInlineEnd:D,fontSize:D,backgroundPositionX:D,backgroundPositionY:D,...Fp,zIndex:Mi,fillOpacity:Ct,strokeOpacity:Ct,numOctaves:Mi},_p={...pn,color:K,backgroundColor:K,outlineColor:K,fill:K,stroke:K,borderColor:K,borderTopColor:K,borderRightColor:K,borderBottomColor:K,borderLeftColor:K,filter:jr,WebkitFilter:jr,mask:Br,WebkitMask:Br},oc=t=>_p[t],zp=new Set([jr,Br]);function ac(t,e){let n=oc(t);return zp.has(n)||(n=me),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Hp=new Set(["auto","none","0"]);function $p(t,e,n){let r=0,s;for(;r<t.length&&!s;){const i=t[r];typeof i=="string"&&!Hp.has(i)&&nt(i).values.length&&(s=t[r]),r++}if(s&&n)for(const i of e)t[i]=ac(n,s)}class Up extends bs{constructor(e,n,r,s,i){super(e,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let d=e[u];if(typeof d=="string"&&(d=d.trim(),fs(d))){const h=Qa(d,n.current);h!==void 0&&(e[u]=h),u===e.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!ec.has(r)||e.length!==2)return;const[s,i]=e,o=Ii(s),a=Ii(i),c=gi(s),l=gi(i);if(c!==l&&Me[r]){this.needsMeasurement=!0;return}if(o!==a)if(Di(o)&&Di(a))for(let u=0;u<e.length;u++){const d=e[u];typeof d=="string"&&(e[u]=parseFloat(d))}else Me[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let s=0;s<e.length;s++)(e[s]===null||Np(e[s]))&&r.push(s);r.length&&$p(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Me[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&e.getValue(r,s).jump(s,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=Me[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,c])=>{e.getValue(a).set(c)}),this.resolveNoneKeyframes()}}const Ds=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function cc(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let r=document;const s=n?.[t]??r.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(r=>r!=null)}const Fr=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Wp(t){return ga(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:Cs}=Ia(queueMicrotask,!1),ge={x:!1,y:!1};function lc(){return ge.x||ge.y}function Gp(t){return t==="x"||t==="y"?ge[t]?null:(ge[t]=!0,()=>{ge[t]=!1}):ge.x||ge.y?null:(ge.x=ge.y=!0,()=>{ge.x=ge.y=!1})}function uc(t,e){const n=cc(t),r=new AbortController,s={passive:!0,...e,signal:r.signal};return[n,s,()=>r.abort()]}function qp(t){return!(t.pointerType==="touch"||lc())}function Kp(t,e,n={}){const[r,s,i]=uc(t,n);return r.forEach(o=>{let a=!1,c=!1,l;const u=()=>{o.removeEventListener("pointerleave",p)},d=y=>{l&&(l(y),l=void 0),u()},h=y=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),c&&(c=!1,d(y))},f=()=>{a=!0,window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",h,s)},p=y=>{if(y.pointerType!=="touch"){if(a){c=!0;return}d(y)}},m=y=>{if(!qp(y))return;c=!1;const b=e(o,y);typeof b=="function"&&(l=b,o.addEventListener("pointerleave",p,s))};o.addEventListener("pointerenter",m,s),o.addEventListener("pointerdown",f,s)}),i}const dc=(t,e)=>e?t===e?!0:dc(t,e.parentElement):!1,Es=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Xp=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Yp(t){return Xp.has(t.tagName)||t.isContentEditable===!0}const Zp=new Set(["INPUT","SELECT","TEXTAREA"]);function Jp(t){return Zp.has(t.tagName)||t.isContentEditable===!0}const Jt=new WeakSet;function Ai(t){return e=>{e.key==="Enter"&&t(e)}}function tr(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Qp=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=Ai(()=>{if(Jt.has(n))return;tr(n,"down");const s=Ai(()=>{tr(n,"up")}),i=()=>tr(n,"cancel");n.addEventListener("keyup",s,e),n.addEventListener("blur",i,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function Ri(t){return Es(t)&&!lc()}const ki=new WeakSet;function eg(t,e,n={}){const[r,s,i]=uc(t,n),o=a=>{const c=a.currentTarget;if(!Ri(a)||ki.has(a))return;Jt.add(c),n.stopPropagation&&ki.add(a);const l=e(c,a),u={...s,capture:!0},d=(p,m)=>{window.removeEventListener("pointerup",h,u),window.removeEventListener("pointercancel",f,u),Jt.has(c)&&Jt.delete(c),Ri(p)&&typeof l=="function"&&l(p,{success:m})},h=p=>{d(p,c===window||c===document||n.useGlobalTarget||dc(c,p.target))},f=p=>{d(p,!1)};window.addEventListener("pointerup",h,u),window.addEventListener("pointercancel",f,u)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),Wp(a)&&(a.addEventListener("focus",l=>Qp(l,s)),!Yp(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Ps(t){return ga(t)&&"ownerSVGElement"in t}const Qt=new WeakMap;let en;const hc=(t,e,n)=>(r,s)=>s&&s[0]?s[0][t+"Size"]:Ps(r)&&"getBBox"in r?r.getBBox()[e]:r[n],tg=hc("inline","width","offsetWidth"),ng=hc("block","height","offsetHeight");function rg({target:t,borderBoxSize:e}){Qt.get(t)?.forEach(n=>{n(t,{get width(){return tg(t,e)},get height(){return ng(t,e)}})})}function sg(t){t.forEach(rg)}function ig(){typeof ResizeObserver>"u"||(en=new ResizeObserver(sg))}function og(t,e){en||ig();const n=cc(t);return n.forEach(r=>{let s=Qt.get(r);s||(s=new Set,Qt.set(r,s)),s.add(e),en?.observe(r)}),()=>{n.forEach(r=>{const s=Qt.get(r);s?.delete(e),s?.size||en?.unobserve(r)})}}const tn=new Set;let Je;function ag(){Je=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};tn.forEach(e=>e(t))},window.addEventListener("resize",Je)}function cg(t){return tn.add(t),Je||ag(),()=>{tn.delete(t),!tn.size&&typeof Je=="function"&&(window.removeEventListener("resize",Je),Je=void 0)}}function Li(t,e){return typeof t=="function"?cg(t):og(t,e)}function lg(t){return Ps(t)&&t.tagName==="svg"}const ug=[...ic,K,me],dg=t=>ug.find(sc(t)),Ni=()=>({translate:0,scale:1,origin:0,originPoint:0}),Qe=()=>({x:Ni(),y:Ni()}),Vi=()=>({min:0,max:0}),Y=()=>({x:Vi(),y:Vi()}),hg=new WeakMap;function En(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Et(t){return typeof t=="string"||Array.isArray(t)}const Os=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Is=["initial",...Os];function Pn(t){return En(t.animate)||Is.some(e=>Et(t[e]))}function fc(t){return!!(Pn(t)||t.variants)}function fg(t,e,n){for(const r in e){const s=e[r],i=n[r];if(J(s))t.addValue(r,s);else if(J(i))t.addValue(r,rt(s,{owner:t}));else if(i!==s)if(t.hasValue(r)){const o=t.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=t.getStaticValue(r);t.addValue(r,rt(o!==void 0?o:s,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const _r={current:null},pc={current:!1},pg=typeof window<"u";function gg(){if(pc.current=!0,!!pg)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>_r.current=t.matches;t.addEventListener("change",e),e()}else _r.current=!1}const ji=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let gn={};function gc(t){gn=t}function mg(){return gn}class vg{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:o,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=bs,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Q.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,F.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=Pn(n),this.isVariantNode=fc(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const p=h[f];l[f]!==void 0&&J(p)&&p.set(l[f])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,hg.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(pc.current||gg(),this.shouldReduceMotion=_r.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),ke(this.notifyUpdate),ke(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&Ya.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:c,ease:l,duration:u}=n.accelerate,d=new Ka({element:this.current,name:e,keyframes:a,times:c,ease:l,duration:oe(u)}),h=o(d);this.valueSubscriptions.set(e,()=>{h(),d.cancel()});return}const r=ot.has(e);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&F.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{s(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in gn){const n=gn[e];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[e]&&s&&r(this.props)&&(this.features[e]=new s(this)),this.features[e]){const i=this.features[e];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Y()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<ji.length;r++){const s=ji[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=e[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=fg(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=rt(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(pa(r)||ma(r))?r=parseFloat(r):!dg(r)&&me.test(n)&&(r=ac(e,n)),this.setBaseTarget(e,J(r)?r.get():r)),J(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=ws(this.props,n,this.presenceContext?.custom);i&&(r=i[e])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!J(s)?s:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new us),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Cs.render(this.render)}}class mc extends vg{constructor(){super(...arguments),this.KeyframeResolver=Up}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const r=e.style;return r?r[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;J(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ne{constructor(e){this.isMounted=!1,this.node=e}update(){}}function vc({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function yg({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function bg(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function nr(t){return t===void 0||t===1}function zr({scale:t,scaleX:e,scaleY:n}){return!nr(t)||!nr(e)||!nr(n)}function ze(t){return zr(t)||yc(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function yc(t){return Bi(t.x)||Bi(t.y)}function Bi(t){return t&&t!=="0%"}function mn(t,e,n){const r=t-n,s=e*r;return n+s}function Fi(t,e,n,r,s){return s!==void 0&&(t=mn(t,s,r)),mn(t,n,r)+e}function Hr(t,e=0,n=1,r,s){t.min=Fi(t.min,e,n,r,s),t.max=Fi(t.max,e,n,r,s)}function bc(t,{x:e,y:n}){Hr(t.x,e.translate,e.scale,e.originPoint),Hr(t.y,n.translate,n.scale,n.originPoint)}const _i=.999999999999,zi=1.0000000000001;function Tg(t,e,n,r=!1){const s=n.length;if(!s)return;e.x=e.y=1;let i,o;for(let a=0;a<s;a++){i=n[a],o=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(be(t.x,-i.scroll.offset.x),be(t.y,-i.scroll.offset.y)),o&&(e.x*=o.x.scale,e.y*=o.y.scale,bc(t,o)),r&&ze(i.latestValues)&&nn(t,i.latestValues,i.layout?.layoutBox))}e.x<zi&&e.x>_i&&(e.x=1),e.y<zi&&e.y>_i&&(e.y=1)}function be(t,e){t.min+=e,t.max+=e}function Hi(t,e,n,r,s=.5){const i=B(t.min,t.max,s);Hr(t,e,n,i,r)}function $i(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function nn(t,e,n){const r=n??t;Hi(t.x,$i(e.x,r.x),e.scaleX,e.scale,e.originX),Hi(t.y,$i(e.y,r.y),e.scaleY,e.scale,e.originY)}function Tc(t,e){return vc(bg(t.getBoundingClientRect(),e))}function xg(t,e,n){const r=Tc(t,n),{scroll:s}=e;return s&&(be(r.x,s.offset.x),be(r.y,s.offset.y)),r}const wg={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Sg=it.length;function Dg(t,e,n){let r="",s=!0;for(let o=0;o<Sg;o++){const a=it[o],c=t[a];if(c===void 0)continue;let l=!0;if(typeof c=="number")l=c===(a.startsWith("scale")?1:0);else{const u=parseFloat(c);l=a.startsWith("scale")?u===1:u===0}if(!l||n){const u=Fr(c,pn[a]);if(!l){s=!1;const d=wg[a]||a;r+=`${d}(${u}) `}n&&(e[a]=u)}}const i=t.pathRotation;return i&&(s=!1,r+=`rotate(${Fr(i,pn.pathRotation)}) `),r=r.trim(),n?r=n(e,s?"":r):s&&(r="none"),r}function Ms(t,e,n){const{style:r,vars:s,transformOrigin:i}=t;let o=!1,a=!1;for(const c in e){const l=e[c];if(ot.has(c)){o=!0;continue}else if(Aa(c)){s[c]=l;continue}else{const u=Fr(l,pn[c]);c.startsWith("origin")?(a=!0,i[c]=u):r[c]=u}}if(e.transform||(o||n?r.transform=Dg(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:c="50%",originY:l="50%",originZ:u=0}=i;r.transformOrigin=`${c} ${l} ${u}`}}function xc(t,{style:e,vars:n},r,s){const i=t.style;let o;for(o in e)i[o]=e[o];s?.applyProjectionStyles(i,r);for(o in n)i.setProperty(o,n[o])}function Ui(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ut={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(D.test(t))t=parseFloat(t);else return t;const n=Ui(t,e.target.x),r=Ui(t,e.target.y);return`${n}% ${r}%`}},Cg={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,s=me.parse(t);if(s.length>5)return r;const i=me.createTransformer(t),o=typeof s[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;s[0+o]/=a,s[1+o]/=c;const l=B(a,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=l),typeof s[3+o]=="number"&&(s[3+o]/=l),i(s)}},$r={borderRadius:{...ut,applyTo:[...Ds]},borderTopLeftRadius:ut,borderTopRightRadius:ut,borderBottomLeftRadius:ut,borderBottomRightRadius:ut,boxShadow:Cg};function wc(t,{layout:e,layoutId:n}){return ot.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!$r[t]||t==="opacity")}function As(t,e,n){const r=t.style,s=e?.style,i={};if(!r)return i;for(const o in r)(J(r[o])||s&&J(s[o])||wc(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=r[o]);return i}function Eg(t){return window.getComputedStyle(t)}class Pg extends mc{constructor(){super(...arguments),this.type="html",this.renderInstance=xc}mount(e){Dn(!!e.style),super.mount(e)}readValueFromInstance(e,n){if(ot.has(n))return this.projection?.isProjecting?Or(n):Gf(e,n);{const r=Eg(e),s=(Aa(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Tc(e,n)}build(e,n,r){Ms(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return As(e,n,r)}}const Og={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ig={offset:"strokeDashoffset",array:"strokeDasharray"};function Mg(t,e,n=1,r=0,s=!0){t.pathLength=1;const i=s?Og:Ig;t[i.offset]=`${-r}`,t[i.array]=`${e} ${n}`}const Ag=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Sc(t,{attrX:e,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...a},c,l,u){if(Ms(t,a,l),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h}=t;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const f of Ag)d[f]!==void 0&&(h[f]=d[f],delete d[f]);e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),s!==void 0&&Mg(d,s,i,o,!1)}const Dc=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"]),Cc=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Rg(t,e,n,r){xc(t,e,void 0,r);for(const s in e.attrs)t.setAttribute(Dc.has(s)?s:Ss(s),e.attrs[s])}function Ec(t,e,n){const r=As(t,e,n);for(const s in t)if(J(t[s])||J(e[s])){const i=it.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=t[s]}return r}class kg extends mc{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Y}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(ot.has(n)){const r=oc(n);return r&&r.default||0}return n=Dc.has(n)?n:Ss(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return Ec(e,n,r)}build(e,n,r){Sc(e,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,n,r,s){Rg(e,n,r,s)}mount(e){this.isSVGTag=Cc(e.tagName),super.mount(e)}}const Lg=Is.length;function Pc(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Pc(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Lg;n++){const r=Is[n],s=t.props[r];(Et(s)||s===!1)&&(e[r]=s)}return e}function Oc(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const Ng=[...Os].reverse(),Vg=Os.length;function jg(t){return e=>Promise.all(e.map(({animation:n,options:r})=>kp(t,n,r)))}function Bg(t){let e=jg(t),n=Wi(),r=!0,s=!1;const i=l=>(u,d)=>{const h=qe(t,d,l==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:f,transitionEnd:p,...m}=h;u={...u,...m,...p}}return u};function o(l){e=l(t)}function a(l){const{props:u}=t,d=Pc(t.parent)||{},h=[],f=new Set;let p={},m=1/0;for(let b=0;b<Vg;b++){const x=Ng[b],w=n[x],S=u[x]!==void 0?u[x]:d[x],P=Et(S),N=x===l?w.isActive:null;N===!1&&(m=b);let L=S===d[x]&&S!==u[x]&&P;if(L&&(r||s)&&t.manuallyAnimateOnMount&&(L=!1),w.protectedKeys={...p},!w.isActive&&N===null||!S&&!w.prevProp||En(S)||typeof S=="boolean")continue;if(x==="exit"&&w.isActive&&N!==!0){w.prevResolvedValues&&(p={...p,...w.prevResolvedValues});continue}const I=Fg(w.prevProp,S);let _=I||x===l&&w.isActive&&!L&&P||b>m&&P,E=!1;const V=Array.isArray(S)?S:[S];let U=V.reduce(i(x),{});N===!1&&(U={});const{prevResolvedValues:we={}}=w,ne={...we,...U},fe=q=>{_=!0,f.has(q)&&(E=!0,f.delete(q)),w.needsAnimating[q]=!0;const te=t.getValue(q);te&&(te.liveStyle=!1)};for(const q in ne){const te=U[q],Se=we[q];if(p.hasOwnProperty(q))continue;let ae=!1;Lr(te)&&Lr(Se)?ae=!Oc(te,Se)||I:ae=te!==Se,ae?te!=null?fe(q):f.add(q):te!==void 0&&f.has(q)?fe(q):w.protectedKeys[q]=!0}w.prevProp=S,w.prevResolvedValues=U,w.isActive&&(p={...p,...U}),(r||s)&&t.blockInitialAnimation&&(_=!1);const re=L&&I;_&&(!re||E)&&h.push(...V.map(q=>{const te={type:x};if(typeof q=="string"&&(r||s)&&!re&&t.manuallyAnimateOnMount&&t.parent){const{parent:Se}=t,ae=qe(Se,q);if(Se.enteringChildren&&ae){const{delayChildren:Mn}=ae.transition||{};te.delay=Za(Se.enteringChildren,t,Mn)}}return{animation:q,options:te}}))}if(f.size){const b={};if(typeof u.initial!="boolean"){const x=qe(t,Array.isArray(u.initial)?u.initial[0]:u.initial);x&&x.transition&&(b.transition=x.transition)}f.forEach(x=>{const w=t.getBaseTarget(x),S=t.getValue(x);S&&(S.liveStyle=!0),b[x]=w??null}),h.push({animation:b})}let y=!!h.length;return r&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(y=!1),r=!1,s=!1,y?e(h):Promise.resolve()}function c(l,u){if(n[l].isActive===u)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(l,u)),n[l].isActive=u;const d=a(l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:a,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Wi(),s=!0}}}function Fg(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Oc(e,t):!1}function je(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Wi(){return{animate:je(!0),whileInView:je(),whileHover:je(),whileTap:je(),whileDrag:je(),whileFocus:je(),exit:je()}}function Ur(t,e){t.min=e.min,t.max=e.max}function pe(t,e){Ur(t.x,e.x),Ur(t.y,e.y)}function Gi(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const Ic=1e-4,_g=1-Ic,zg=1+Ic,Mc=.01,Hg=0-Mc,$g=0+Mc;function ee(t){return t.max-t.min}function Ug(t,e,n){return Math.abs(t-e)<=n}function qi(t,e,n,r=.5){t.origin=r,t.originPoint=B(e.min,e.max,t.origin),t.scale=ee(n)/ee(e),t.translate=B(n.min,n.max,t.origin)-t.originPoint,(t.scale>=_g&&t.scale<=zg||isNaN(t.scale))&&(t.scale=1),(t.translate>=Hg&&t.translate<=$g||isNaN(t.translate))&&(t.translate=0)}function xt(t,e,n,r){qi(t.x,e.x,n.x,r?r.originX:void 0),qi(t.y,e.y,n.y,r?r.originY:void 0)}function Ki(t,e,n,r=0){const s=r?B(n.min,n.max,r):n.min;t.min=s+e.min,t.max=t.min+ee(e)}function Wg(t,e,n,r){Ki(t.x,e.x,n.x,r?.x),Ki(t.y,e.y,n.y,r?.y)}function Xi(t,e,n,r=0){const s=r?B(n.min,n.max,r):n.min;t.min=e.min-s,t.max=t.min+ee(e)}function vn(t,e,n,r){Xi(t.x,e.x,n.x,r?.x),Xi(t.y,e.y,n.y,r?.y)}function Yi(t,e,n,r,s){return t-=e,t=mn(t,1/n,r),s!==void 0&&(t=mn(t,1/s,r)),t}function Gg(t,e=0,n=1,r=.5,s,i=t,o=t){if(Te.test(e)&&(e=parseFloat(e),e=B(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=B(i.min,i.max,r);t===i&&(a-=e),t.min=Yi(t.min,e,n,a,s),t.max=Yi(t.max,e,n,a,s)}function Zi(t,e,[n,r,s],i,o){Gg(t,e[n],e[r],e[s],e.scale,i,o)}const qg=["x","scaleX","originX"],Kg=["y","scaleY","originY"];function Ji(t,e,n,r){Zi(t.x,e,qg,n?n.x:void 0,r?r.x:void 0),Zi(t.y,e,Kg,n?n.y:void 0,r?r.y:void 0)}function Qi(t){return t.translate===0&&t.scale===1}function Ac(t){return Qi(t.x)&&Qi(t.y)}function eo(t,e){return t.min===e.min&&t.max===e.max}function Xg(t,e){return eo(t.x,e.x)&&eo(t.y,e.y)}function to(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Rc(t,e){return to(t.x,e.x)&&to(t.y,e.y)}function no(t){return ee(t.x)/ee(t.y)}function ro(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function ye(t){return[t("x"),t("y")]}function Yg(t,e,n){let r="";const s=t.x.translate/e.x,i=t.y.translate/e.y,o=n?.z||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:l,rotate:u,pathRotation:d,rotateX:h,rotateY:f,skewX:p,skewY:m}=n;l&&(r=`perspective(${l}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,c=t.y.scale*e.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const Zg=Ds.length,so=t=>typeof t=="string"?parseFloat(t):t,io=t=>typeof t=="number"||D.test(t);function Jg(t,e,n,r,s,i){s?(t.opacity=B(0,n.opacity??1,Qg(r)),t.opacityExit=B(e.opacity??1,0,em(r))):i&&(t.opacity=B(e.opacity??1,n.opacity??1,r));for(let o=0;o<Zg;o++){const a=Ds[o];let c=oo(e,a),l=oo(n,a);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||io(c)===io(l)?(t[a]=Math.max(B(so(c),so(l),r),0),(Te.test(l)||Te.test(c))&&(t[a]+="%")):t[a]=l}(e.rotate||n.rotate)&&(t.rotate=B(e.rotate||0,n.rotate||0,r))}function oo(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Qg=kc(0,.5,Ca),em=kc(.5,.95,he);function kc(t,e,n){return r=>r<t?0:r>e?1:n(Dt(t,e,r))}function tm(t,e,n){const r=J(t)?t:rt(t);return r.start(xs("",r,e,n)),r.animation}function Pt(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}const nm=(t,e)=>t.depth-e.depth;class rm{constructor(){this.children=[],this.isDirty=!1}add(e){ls(this.children,e),this.isDirty=!0}remove(e){ln(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(nm),this.isDirty=!1,this.children.forEach(e)}}function sm(t,e){const n=Q.now(),r=({timestamp:s})=>{const i=s-n;i>=e&&(ke(r),t(i-e))};return F.setup(r,!0),()=>ke(r)}function rn(t){return J(t)?t.get():t}class im{constructor(){this.members=[]}add(e){ls(this.members,e);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===e||r===this.lead||r===this.prevLead)continue;const s=r.instance;(!s||s.isConnected===!1)&&!r.snapshot&&(ln(this.members,r),r.unmount())}e.scheduleRender()}remove(e){if(ln(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){for(let n=this.members.indexOf(e)-1;n>=0;n--){const r=this.members[n];if(r.isPresent!==!1&&r.instance?.isConnected!==!1)return this.promote(r),!0}return!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.updateSnapshot(),e.scheduleRender();const{layoutDependency:s}=r.options,{layoutDependency:i}=e.options;(s===void 0||s!==i)&&(e.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const sn={hasAnimatedSinceResize:!0,hasEverUpdated:!1},rr=["","X","Y","Z"],om=1e3;let am=0;function sr(t,e,n,r){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),r&&(r[t]=0))}function Lc(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=nc(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",F,!(s||i))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&Lc(r)}function Nc({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=e?.()){this.id=am++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(um),this.nodes.forEach(mm),this.nodes.forEach(vm),this.nodes.forEach(dm)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new rm)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new us),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const c=this.eventHandlers.get(o);c&&c.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Ps(o)&&!lg(o),this.instance=o;const{layoutId:a,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),t){let u,d=0;const h=()=>this.root.updateBlockedByResize=!1;F.read(()=>{d=window.innerWidth}),t(o,()=>{const f=window.innerWidth;f!==d&&(d=f,this.root.updateBlockedByResize=!0,u&&u(),u=sm(h,250),sn.hasAnimatedSinceResize&&(sn.hasAnimatedSinceResize=!1,this.nodes.forEach(lo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||l.getDefaultTransition()||wm,{onLayoutAnimationStart:m,onLayoutAnimationComplete:y}=l.getProps(),b=!this.targetLayout||!Rc(this.targetLayout,f),x=!d&&h;if(this.options.layoutRoot||this.resumeFrom||x||d&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Ts(p,"layout"),onPlay:m,onComplete:y};(l.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(u,x,w.path)}else d||lo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ke(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(ym),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Lc(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,(typeof d.latestValues.x=="string"||typeof d.latestValues.y=="string")&&(d.isLayoutDirty=!0),d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(fm),this.nodes.forEach(ao);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(co);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(pm),this.nodes.forEach(gm),this.nodes.forEach(cm),this.nodes.forEach(lm)):this.nodes.forEach(co),this.clearAllSnapshots();const a=Q.now();Z.delta=xe(0,1e3/60,a-Z.timestamp),Z.timestamp=a,Z.isProcessing=!0,Xn.update.process(Z),Xn.preRender.process(Z),Xn.render.process(Z),Z.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Cs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(hm),this.sharedNodes.forEach(bm)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,F.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){F.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ee(this.snapshot.measuredBox.x)&&!ee(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Y()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ac(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;o&&this.instance&&(a||ze(this.latestValues)||u)&&(s(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return o&&(c=this.removeTransform(c)),Sm(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return Y();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Dm))){const{scroll:l}=this.root;l&&(be(a.x,l.offset.x),be(a.y,l.offset.y))}return a}removeElementScroll(o){const a=Y();if(pe(a,o),this.scroll?.wasRoot)return a;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:u,options:d}=l;l!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&pe(a,o),be(a.x,u.offset.x),be(a.y,u.offset.y))}return a}applyTransform(o,a=!1,c){const l=c||Y();pe(l,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&(be(l.x,-d.scroll.offset.x),be(l.y,-d.scroll.offset.y)),ze(d.latestValues)&&nn(l,d.latestValues,d.layout?.layoutBox)}return ze(this.latestValues)&&nn(l,this.latestValues,this.layout?.layoutBox),l}removeTransform(o){const a=Y();pe(a,o);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!ze(l.latestValues))continue;let u;l.instance&&(zr(l.latestValues)&&l.updateSnapshot(),u=Y(),pe(u,l.measurePageBox())),Ji(a,l.latestValues,l.snapshot?.layoutBox,u)}return ze(this.latestValues)&&Ji(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Z.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=Z.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Y(),this.targetWithTransforms=Y()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Wg(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):pe(this.target,this.layout.layoutBox),bc(this.target,this.targetDelta)):pe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||zr(this.parent.latestValues)||yc(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Y(),this.relativeTargetOrigin=Y(),vn(this.relativeTargetOrigin,a,c,this.options.layoutAnchor||void 0),pe(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Z.timestamp&&(c=!1),c)return;const{layout:l,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||u))return;pe(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;Tg(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Y());const{target:f}=o;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Gi(this.prevProjectionDelta.x,this.projectionDelta.x),Gi(this.prevProjectionDelta.y,this.projectionDelta.y)),xt(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!ro(this.projectionDelta.x,this.prevProjectionDelta.x)||!ro(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Qe(),this.projectionDelta=Qe(),this.projectionDeltaWithTransform=Qe()}setAnimationOrigin(o,a=!1,c){const l=this.snapshot,u=l?l.latestValues:{},d={...this.latestValues},h=Qe();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Y(),p=l?l.source:void 0,m=this.layout?this.layout.source:void 0,y=p!==m,b=this.getStack(),x=!b||b.members.length<=1,w=!!(y&&!x&&this.options.crossfade===!0&&!this.path.some(xm));this.animationProgress=0;let S;const P=c?.interpolateProjection(o);this.mixTargetDelta=N=>{const L=N/1e3,I=P?.(L);I?(h.x.translate=I.x,h.x.scale=B(o.x.scale,1,L),h.x.origin=o.x.origin,h.x.originPoint=o.x.originPoint,h.y.translate=I.y,h.y.scale=B(o.y.scale,1,L),h.y.origin=o.y.origin,h.y.originPoint=o.y.originPoint):(uo(h.x,o.x,L),uo(h.y,o.y,L)),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(vn(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Tm(this.relativeTarget,this.relativeTargetOrigin,f,L),S&&Xg(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=Y()),pe(S,this.relativeTarget)),y&&(this.animationValues=d,Jg(d,u,this.latestValues,L,w,x)),I&&I.rotate!==void 0&&(this.animationValues||(this.animationValues=d),this.animationValues.pathRotation=I.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ke(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=F.update(()=>{sn.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=rt(0)),this.motionValue.jump(0,!1),this.currentAnimation=tm(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(om),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=o;if(!(!a||!c||!l)){if(this!==o&&this.layout&&l&&Vc(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Y();const d=ee(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+d;const h=ee(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+h}pe(a,c),nn(a,u),xt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new im),this.sharedNodes.get(o).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const l={};c.z&&sr("z",o,l,this.animationValues);for(let u=0;u<rr.length;u++)sr(`rotate${rr[u]}`,o,l,this.animationValues),sr(`skew${rr[u]}`,o,l,this.animationValues);o.render();for(const u in l)o.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=rn(a?.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=rn(a?.pointerEvents)||""),this.hasProjected&&!ze(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=l.animationValues||l.latestValues;this.applyTransformsToTarget();let d=Yg(this.projectionDeltaWithTransform,this.treeScale,u);c&&(d=c(u,d)),o.transform=d;const{x:h,y:f}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${f.origin*100}% 0`,l.animationValues?o.opacity=l===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=l===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const p in $r){if(u[p]===void 0)continue;const{correct:m,applyTo:y,isCSSVariable:b}=$r[p],x=d==="none"?u[p]:m(u[p],l);if(y){const w=y.length;for(let S=0;S<w;S++)o[y[S]]=x}else b?this.options.visualElement.renderState.vars[p]=x:o[p]=x}this.options.layoutId&&(o.pointerEvents=l===this?rn(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(ao),this.root.sharedNodes.clear()}}}function cm(t){t.updateLayout()}function lm(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=t.layout,{animationType:s}=t.options,i=e.source!==t.layout.source;if(s==="size")ye(u=>{const d=i?e.measuredBox[u]:e.layoutBox[u],h=ee(d);d.min=n[u].min,d.max=d.min+h});else if(s==="x"||s==="y"){const u=s==="x"?"y":"x";Ur(i?e.measuredBox[u]:e.layoutBox[u],n[u])}else Vc(s,e.layoutBox,n)&&ye(u=>{const d=i?e.measuredBox[u]:e.layoutBox[u],h=ee(n[u]);d.max=d.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+h)});const o=Qe();xt(o,n,e.layoutBox);const a=Qe();i?xt(a,t.applyTransform(r,!0),e.measuredBox):xt(a,n,e.layoutBox);const c=!Ac(o);let l=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:h}=u;if(d&&h){const f=t.options.layoutAnchor||void 0,p=Y();vn(p,e.layoutBox,d.layoutBox,f);const m=Y();vn(m,n,h.layoutBox,f),Rc(p,m)||(l=!0),u.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function um(t){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 dm(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function hm(t){t.clearSnapshot()}function ao(t){t.clearMeasurements()}function fm(t){t.isLayoutDirty=!0,t.updateLayout()}function co(t){t.isLayoutDirty=!1}function pm(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function gm(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function lo(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function mm(t){t.resolveTargetDelta()}function vm(t){t.calcProjection()}function ym(t){t.resetSkewAndRotation()}function bm(t){t.removeLeadSnapshot()}function uo(t,e,n){t.translate=B(e.translate,0,n),t.scale=B(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ho(t,e,n,r){t.min=B(e.min,n.min,r),t.max=B(e.max,n.max,r)}function Tm(t,e,n,r){ho(t.x,e.x,n.x,r),ho(t.y,e.y,n.y,r)}function xm(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const wm={duration:.45,ease:[.4,0,.1,1]},fo=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),po=fo("applewebkit/")&&!fo("chrome/")?Math.round:he;function go(t){t.min=po(t.min),t.max=po(t.max)}function Sm(t){go(t.x),go(t.y)}function Vc(t,e,n){return t==="position"||t==="preserve-aspect"&&!Ug(no(e),no(n),.2)}function Dm(t){return t!==t.root&&t.scroll?.wasRoot}const Cm=Nc({attachResizeListener:(t,e)=>Pt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),ir={current:void 0},jc=Nc({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ir.current){const t=new Cm({});t.mount(window),t.setOptions({layoutScroll:!0}),ir.current=t}return ir.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Bc=g.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Em(t=!0){const e=g.useContext(cs);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=e,i=g.useId();g.useEffect(()=>{if(t)return s(i)},[t]);const o=g.useCallback(()=>t&&r&&r(i),[i,r,t]);return!n&&r?[!1,o]:[!0]}const Fc=g.createContext({strict:!1}),mo={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let vo=!1;function Pm(){if(vo)return;const t={};for(const e in mo)t[e]={isEnabled:n=>mo[e].some(r=>!!n[r])};gc(t),vo=!0}function _c(){return Pm(),mg()}function Om(t){const e=_c();for(const n in t)e[n]={...e[n],...t[n]};gc(e)}const Im=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function yn(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Im.has(t)}let zc=t=>!yn(t);function Mm(t){typeof t=="function"&&(zc=e=>e.startsWith("on")?!yn(e):t(e))}try{Mm(require("@emotion/is-prop-valid").default)}catch{}function Am(t,e,n){const r={};for(const s in t)s==="values"&&typeof t.values=="object"||J(t[s])||(zc(s)||n===!0&&yn(s)||!e&&!yn(s)||t.draggable&&s.startsWith("onDrag"))&&(r[s]=t[s]);return r}const On=g.createContext({});function Rm(t,e){if(Pn(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Et(n)?n:void 0,animate:Et(r)?r:void 0}}return t.inherit!==!1?e:{}}function km(t){const{initial:e,animate:n}=Rm(t,g.useContext(On));return g.useMemo(()=>({initial:e,animate:n}),[yo(e),yo(n)])}function yo(t){return Array.isArray(t)?t.join(" "):t}const Rs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Hc(t,e,n){for(const r in e)!J(e[r])&&!wc(r,n)&&(t[r]=e[r])}function Lm({transformTemplate:t},e){return g.useMemo(()=>{const n=Rs();return Ms(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Nm(t,e){const n=t.style||{},r={};return Hc(r,n,t),Object.assign(r,Lm(t,e)),r}function Vm(t,e){const n={},r=Nm(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const $c=()=>({...Rs(),attrs:{}});function jm(t,e,n,r){const s=g.useMemo(()=>{const i=$c();return Sc(i,e,Cc(r),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};Hc(i,t.style,t),s.style={...i,...s.style}}return s}const Bm=["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 ks(t){return typeof t!="string"||t.includes("-")?!1:!!(Bm.indexOf(t)>-1||/[A-Z]/u.test(t))}function Fm(t,e,n,{latestValues:r},s,i=!1,o){const c=(o??ks(t)?jm:Vm)(e,r,s,t),l=Am(e,typeof t=="string",i),u=t!==g.Fragment?{...l,...c,ref:n}:{},{children:d}=e,h=g.useMemo(()=>J(d)?d.get():d,[d]);return g.createElement(t,{...u,children:h})}function _m({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,s){return{latestValues:zm(n,r,s,t),renderState:e()}}function zm(t,e,n,r){const s={},i=r(t,{});for(const h in i)s[h]=rn(i[h]);let{initial:o,animate:a}=t;const c=Pn(t),l=fc(t);e&&l&&!c&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const d=u?a:o;if(d&&typeof d!="boolean"&&!En(d)){const h=Array.isArray(d)?d:[d];for(let f=0;f<h.length;f++){const p=ws(t,h[f]);if(p){const{transitionEnd:m,transition:y,...b}=p;for(const x in b){let w=b[x];if(Array.isArray(w)){const S=u?w.length-1:0;w=w[S]}w!==null&&(s[x]=w)}for(const x in m)s[x]=m[x]}}}return s}const Uc=t=>(e,n)=>{const r=g.useContext(On),s=g.useContext(cs),i=()=>_m(t,e,r,s);return n?i():Bh(i)},Hm=Uc({scrapeMotionValuesFromProps:As,createRenderState:Rs}),$m=Uc({scrapeMotionValuesFromProps:Ec,createRenderState:$c}),Um=Symbol.for("motionComponentSymbol");function Wm(t,e,n){const r=g.useRef(n);g.useInsertionEffect(()=>{r.current=n});const s=g.useRef(null);return g.useCallback(i=>{i&&t.onMount?.(i),e&&(i?e.mount(i):e.unmount());const o=r.current;if(typeof o=="function")if(i){const a=o(i);typeof a=="function"&&(s.current=a)}else s.current?(s.current(),s.current=null):o(i);else o&&(o.current=i)},[e])}const Wc=g.createContext({});function Ye(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Gm(t,e,n,r,s,i){const{visualElement:o}=g.useContext(On),a=g.useContext(Fc),c=g.useContext(cs),l=g.useContext(Bc),u=l.reducedMotion,d=l.skipAnimations,h=g.useRef(null),f=g.useRef(!1);r=r||a.renderer,!h.current&&r&&(h.current=r(t,{visualState:e,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:i}),f.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const p=h.current,m=g.useContext(Wc);p&&!p.projection&&s&&(p.type==="html"||p.type==="svg")&&qm(h.current,n,s,m);const y=g.useRef(!1);g.useInsertionEffect(()=>{p&&y.current&&p.update(n,c)});const b=n[tc],x=g.useRef(!!b&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(b)&&window.MotionHasOptimisedAnimation?.(b));return _h(()=>{f.current=!0,p&&(y.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),x.current&&p.animationState&&p.animationState.animateChanges())}),g.useEffect(()=>{p&&(!x.current&&p.animationState&&p.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(b)}),x.current=!1),p.enteringChildren=void 0)}),p}function qm(t,e,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Gc(t.parent)),t.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&Ye(a),visualElement:t,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Gc(t){if(t)return t.options.allowProjection!==!1?t.projection:Gc(t.parent)}function or(t,{forwardMotionProps:e=!1,type:n}={},r,s){r&&Om(r);const i=n?n==="svg":ks(t),o=i?$m:Hm;function a(l,u){let d;const h={...g.useContext(Bc),...l,layoutId:Km(l)},{isStatic:f}=h,p=km(l),m=o(l,f);if(!f&&typeof window<"u"){Xm();const y=Ym(h);d=y.MeasureLayout,p.visualElement=Gm(t,m,h,s,y.ProjectionNode,i)}return v.jsxs(On.Provider,{value:p,children:[d&&p.visualElement?v.jsx(d,{visualElement:p.visualElement,...h}):null,Fm(t,l,Wm(m,p.visualElement,u),m,f,e,i)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const c=g.forwardRef(a);return c[Um]=t,c}function Km({layoutId:t}){const e=g.useContext(fa).id;return e&&t!==void 0?e+"-"+t:t}function Xm(t,e){g.useContext(Fc).strict}function Ym(t){const e=_c(),{drag:n,layout:r}=e;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n?.isEnabled(t)||r?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Zm(t,e){if(typeof Proxy>"u")return or;const n=new Map,r=(i,o)=>or(i,o,t,e),s=(i,o)=>r(i,o);return new Proxy(s,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,or(o,void 0,t,e)),n.get(o))})}const Jm=(t,e)=>e.isSVG??ks(t)?new kg(e):new Pg(e,{allowProjection:t!==g.Fragment});class Qm extends Ne{constructor(e){super(e),e.animationState||(e.animationState=Bg(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();En(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let ev=0;class tv extends Ne{constructor(){super(...arguments),this.id=ev++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;if(e&&r===!1){if(this.isExitComplete){const{initial:i,custom:o}=this.node.getProps();if(typeof i=="string"||typeof i=="object"&&i!==null&&!Array.isArray(i)){const a=qe(this.node,i,o);if(a){const{transition:c,transitionEnd:l,...u}=a;for(const d in u)this.node.getValue(d)?.jump(u[d])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!e);n&&!e&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const nv={animation:{Feature:Qm},exit:{Feature:tv}};function At(t){return{point:{x:t.pageX,y:t.pageY}}}const rv=t=>e=>Es(e)&&t(e,At(e));function wt(t,e,n,r){return Pt(t,e,rv(n),r)}const qc=({current:t})=>t?t.ownerDocument.defaultView:null,bo=(t,e)=>Math.abs(t-e);function sv(t,e){const n=bo(t.x,e.x),r=bo(t.y,e.y);return Math.sqrt(n**2+r**2)}const To=new Set(["auto","scroll"]);class Kc{constructor(e,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=$t(this.lastRawMoveEventInfo,this.transformPagePoint));const p=ar(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,y=sv(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!y)return;const{point:b}=p,{timestamp:x}=Z;this.history.push({...b,timestamp:x});const{onStart:w,onMove:S}=this.handlers;m||(w&&w(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,p)},this.handlePointerMove=(p,m)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=$t(m,this.transformPagePoint),F.update(this.updatePoint,!0)},this.handlePointerUp=(p,m)=>{this.end();const{onEnd:y,onSessionEnd:b,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=ar(p.type==="pointercancel"?this.lastMoveEventInfo:$t(m,this.transformPagePoint),this.history);this.startEvent&&y&&y(p,w),b&&b(p,w)},!Es(e))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const c=At(e),l=$t(c,this.transformPagePoint),{point:u}=l,{timestamp:d}=Z;this.history=[{...u,timestamp:d}];const{onSessionStart:h}=n;h&&h(e,ar(l,this.history));const f={passive:!0,capture:!0};this.removeListeners=Ot(wt(this.contextWindow,"pointermove",this.handlePointerMove,f),wt(this.contextWindow,"pointerup",this.handlePointerUp,f),wt(this.contextWindow,"pointercancel",this.handlePointerUp,f)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const r=getComputedStyle(n);(To.has(r.overflowX)||To.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const r=e===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,s),F.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ke(this.updatePoint)}}function $t(t,e){return e?{point:e(t.point)}:t}function xo(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ar({point:t},e){return{point:t,delta:xo(t,Xc(e)),offset:xo(t,iv(e)),velocity:ov(e,.1)}}function iv(t){return t[0]}function Xc(t){return t[t.length-1]}function ov(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const s=Xc(t);for(;n>=0&&(r=t[n],!(s.timestamp-r.timestamp>oe(e)));)n--;if(!r)return{x:0,y:0};r===t[0]&&t.length>2&&s.timestamp-r.timestamp>oe(e)*2&&(r=t[1]);const i=de(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function av(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?B(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?B(n,t,r.max):Math.min(t,n)),t}function wo(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function cv(t,{top:e,left:n,bottom:r,right:s}){return{x:wo(t.x,n,s),y:wo(t.y,e,r)}}function So(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function lv(t,e){return{x:So(t.x,e.x),y:So(t.y,e.y)}}function uv(t,e){let n=.5;const r=ee(t),s=ee(e);return s>r?n=Dt(e.min,e.max-r,t.min):r>s&&(n=Dt(t.min,t.max-s,e.min)),xe(0,1,n)}function dv(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Wr=.35;function hv(t=Wr){return t===!1?t=0:t===!0&&(t=Wr),{x:Do(t,"left","right"),y:Do(t,"top","bottom")}}function Do(t,e,n){return{min:Co(t,e),max:Co(t,n)}}function Co(t,e){return typeof t=="number"?t:t[e]||0}const fv=new WeakMap;class pv{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Y(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=d=>{n&&this.snapToCursor(At(d).point),this.stopAnimation()},o=(d,h)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Gp(f),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ye(b=>{let x=this.getAxisMotionValue(b).get()||0;if(Te.test(x)){const{projection:w}=this.visualElement;if(w&&w.layout){const S=w.layout.layoutBox[b];S&&(x=ee(S)*(parseFloat(x)/100))}}this.originPoint[b]=x}),m&&F.update(()=>m(d,h),!1,!0),Nr(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:y}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:b}=h;if(p&&this.currentDirection===null){this.currentDirection=mv(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",h.point,b),this.updateAxis("y",h.point,b),this.visualElement.render(),y&&F.update(()=>y(d,h),!1,!0)},c=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new Kc(e,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:qc(this.visualElement),element:this.visualElement.current})}stop(e,n){const r=e||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&F.postRender(()=>a(r,s))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,r){const{drag:s}=this.getProps();if(!r||!Ut(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(o=av(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;e&&Ye(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=cv(r.layoutBox,e):this.constraints=!1,this.elastic=hv(n),s!==this.constraints&&!Ye(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&ye(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=dv(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Ye(e))return!1;const r=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;s.root&&(s.root.scroll=void 0,s.root.updateScroll());const i=xg(r,s.root,this.visualElement.getTransformPagePoint());let o=lv(s.layout.layoutBox,i);if(n){const a=n(yg(o));this.hasMutatedConstraints=!!a,a&&(o=vc(a))}return o}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=ye(u=>{if(!Ut(u,n,this.currentDirection))return;let d=c&&c[u]||{};(o===!0||o===u)&&(d={min:0,max:0});const h=s?200:1e6,f=s?40:1e7,p={type:"inertia",velocity:r?e[u]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(l).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return Nr(this.visualElement,e),r.start(xs(e,r,0,n,this.visualElement,!1))}stopAnimation(){ye(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps()[n];return s||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){ye(n=>{const{drag:r}=this.getProps();if(!Ut(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],c=i.get()||0;i.set(e[n]-B(o,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ye(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};ye(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const c=a.get();s[o]=uv({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),ye(o=>{if(!Ut(o,e,null))return;const a=this.getAxisMotionValue(o),{min:c,max:l}=this.constraints[o];a.set(B(c,l,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;fv.set(this.visualElement,this);const e=this.visualElement.current,n=wt(e,"pointerdown",l=>{const{drag:u,dragListener:d=!0}=this.getProps(),h=l.target,f=h!==e&&Jp(h);u&&d&&!f&&this.start(l)});let r;const s=()=>{const{dragConstraints:l}=this.getProps();Ye(l)&&l.current&&(this.constraints=this.resolveRefConstraints(),r||(r=gv(e,l.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),F.read(s);const a=Pt(window,"resize",()=>this.scalePositionWithinConstraints()),c=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(ye(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=l[d].translate,h.set(h.get()+l[d].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),c&&c(),r&&r()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=Wr,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Eo(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function gv(t,e,n){const r=Li(t,Eo(n)),s=Li(e,Eo(n));return()=>{r(),s()}}function Ut(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function mv(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class vv extends Ne{constructor(e){super(e),this.removeGroupControls=he,this.removeListeners=he,this.controls=new pv(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||he}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const cr=t=>(e,n)=>{t&&F.update(()=>t(e,n),!1,!0)};class yv extends Ne{constructor(){super(...arguments),this.removePointerDownListener=he}onPointerDown(e){this.session=new Kc(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:qc(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:cr(e),onStart:cr(n),onMove:cr(r),onEnd:(i,o)=>{delete this.session,s&&F.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=wt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let lr=!1;class bv extends g.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=e;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),lr&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),sn.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),lr=!0,s||e.layoutDependency!==n||n===void 0||e.isPresent!==i?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||F.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:r}=e;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),Cs.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=e;lr=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Yc(t){const[e,n]=Em(),r=g.useContext(fa);return v.jsx(bv,{...t,layoutGroup:r,switchLayoutGroup:g.useContext(Wc),isPresent:e,safeToRemove:n})}const Tv={pan:{Feature:yv},drag:{Feature:vv,ProjectionNode:jc,MeasureLayout:Yc}};function Po(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&F.postRender(()=>i(e,At(e)))}class xv extends Ne{mount(){const{current:e}=this.node;e&&(this.unmount=Kp(e,(n,r)=>(Po(this.node,r,"Start"),s=>Po(this.node,s,"End"))))}unmount(){}}class wv extends Ne{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ot(Pt(this.node.current,"focus",()=>this.onFocus()),Pt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Oo(t,e,n){const{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&F.postRender(()=>i(e,At(e)))}class Sv extends Ne{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=eg(e,(s,i)=>(Oo(this.node,i,"Start"),(o,{success:a})=>Oo(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}}const Gr=new WeakMap,ur=new WeakMap,Dv=t=>{const e=Gr.get(t.target);e&&e(t)},Cv=t=>{t.forEach(Dv)};function Ev({root:t,...e}){const n=t||document;ur.has(n)||ur.set(n,{});const r=ur.get(n),s=JSON.stringify(e);return r[s]||(r[s]=new IntersectionObserver(Cv,{root:t,...e})),r[s]}function Pv(t,e,n){const r=Ev(e);return Gr.set(t,n),r.observe(t),()=>{Gr.delete(t),r.unobserve(t)}}const Ov={some:0,all:1};class Iv extends Ne{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=e,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:Ov[s]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,i&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),h=l?u:d;h&&h(c)};this.stopObserver=Pv(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Mv(e,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function Mv({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Av={inView:{Feature:Iv},tap:{Feature:Sv},focus:{Feature:wv},hover:{Feature:xv}},Rv={layout:{ProjectionNode:jc,MeasureLayout:Yc}},kv={...nv,...Av,...Tv,...Rv},Lv=Zm(kv,Jm);function Io(t,e){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>t(...r),e)}}function Nv({debounce:t,scroll:e,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){const s=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[i,o]=g.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),a=g.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:i,orientationHandler:null}),c=t?typeof t=="number"?t:t.scroll:null,l=t?typeof t=="number"?t:t.resize:null,u=g.useRef(!1);g.useEffect(()=>(u.current=!0,()=>{u.current=!1}));const[d,h,f]=g.useMemo(()=>{const b=()=>{if(!a.current.element)return;const{left:x,top:w,width:S,height:P,bottom:N,right:L,x:I,y:_}=a.current.element.getBoundingClientRect(),E={left:x,top:w,width:S,height:P,bottom:N,right:L,x:I,y:_};a.current.element instanceof HTMLElement&&r&&(E.height=a.current.element.offsetHeight,E.width=a.current.element.offsetWidth),Object.freeze(E),u.current&&!Fv(a.current.lastBounds,E)&&o(a.current.lastBounds=E)};return[b,l?Io(b,l):b,c?Io(b,c):b]},[o,r,c,l]);function p(){a.current.scrollContainers&&(a.current.scrollContainers.forEach(b=>b.removeEventListener("scroll",f,!0)),a.current.scrollContainers=null),a.current.resizeObserver&&(a.current.resizeObserver.disconnect(),a.current.resizeObserver=null),a.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",a.current.orientationHandler))}function m(){a.current.element&&(a.current.resizeObserver=new s(f),a.current.resizeObserver.observe(a.current.element),e&&a.current.scrollContainers&&a.current.scrollContainers.forEach(b=>b.addEventListener("scroll",f,{capture:!0,passive:!0})),a.current.orientationHandler=()=>{f()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",a.current.orientationHandler))}const y=b=>{!b||b===a.current.element||(p(),a.current.element=b,a.current.scrollContainers=Zc(b),m())};return jv(f,!!e),Vv(h),g.useEffect(()=>{p(),m()},[e,f,h]),g.useEffect(()=>p,[]),[y,i,d]}function Vv(t){g.useEffect(()=>{const e=t;return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[t])}function jv(t,e){g.useEffect(()=>{if(e){const n=t;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",n,!0)}}},[t,e])}function Zc(t){const e=[];if(!t||t===document.body)return e;const{overflow:n,overflowX:r,overflowY:s}=window.getComputedStyle(t);return[n,r,s].some(i=>i==="auto"||i==="scroll")&&e.push(t),[...e,...Zc(t.parentElement)]}const Bv=["x","y","top","bottom","left","right","width","height"],Fv=(t,e)=>Bv.every(n=>t[n]===e[n]),Jc=g.createContext({}),_v={isLock:!1},zv=t=>{const[e,n]=g.useState(_v.isLock);return $.createElement(Jc.Provider,{value:{isLock:e,lock:()=>n(!0),unlock:()=>n(!1)}},t.children)},Rt=g.createContext({}),Wt={dropTargetId:void 0,index:void 0},Hv=t=>{const[e,n]=g.useState(Wt.dropTargetId),[r,s]=g.useState(Wt.index),i=(a,c)=>{n(a),s(c)},o=()=>{n(Wt.dropTargetId),s(Wt.index)};return $.createElement(Rt.Provider,{value:{dropTargetId:e,index:r,showPlaceholder:i,hidePlaceholder:o}},t.children)},$v=(t,e)=>t.text>e.text?1:t.text<e.text?-1:0,Uv=(t={})=>({backends:[{id:"html5",backend:oh,options:t.html5,transition:Yl},{id:"touch",backend:mh,options:t.touch||{enableMouseEvents:!0},preview:!0,transition:Xl}]}),Qc=(t,e,n)=>{if(n===0)return 0;const r=t.filter(s=>s.parent===e);return r[n]?t.findIndex(s=>s.id===r[n].id):t.findIndex(s=>s.id===r[n-1].id)+1},el=(t,e,n)=>{if(n===0)return!1;const r=t.find(s=>s.id===n);return r===void 0?!1:r.parent===e?!0:el(t,e,r.parent)},Ls=t=>typeof t=="object"&&t!==null&&"id"in t&&"parent"in t&&"text"in t,Le=(t,e,n)=>{const{tree:r,rootId:s,canDrop:i}=n;if(t===null){if(e===s)return!0;const o=r.find(a=>a.id===e);return!!(o&&o.droppable)}else{const o=Ls(t)?t.id:null;if(i){const l=i(o,e);if(l!==void 0)return l}if(o===e)return!1;const a=r.find(l=>l.id===o),c=r.find(l=>l.id===e);return a===void 0||o===null?e===s||!!c?.droppable:c===void 0?a.parent!==0:a.parent===e||!c.droppable?!1:!el(r,o,e)}},Wv=(t,e)=>{const n=t.getBoundingClientRect(),r=n.top+n.height/2;return e>r?"down":"up"},qr=(t,e)=>{let n="",r=0;return t.forEach((s,i)=>{const o=Wv(s,e.getClientOffset()?.y||0);n===""?n=o:n!==o&&(n=o,r=i),i===t.length-1&&o==="down"&&(r=i+1)}),r},Mo=(t,e,n)=>{const s=e.closest('[role="list"]')?.querySelectorAll(':scope > [role="listitem"]');return s?qr(s,n):null},Gv=(t,e,n)=>{const r=t.getBoundingClientRect(),s=n.dropTargetOffset;if(s===0)return"middle";const i=r.top+s,o=r.bottom-s;return e>o?"lower":e<i?"upper":"middle"},Kr=(t,e,n,r)=>{if(!e)return null;if(t===null){const a=e.querySelectorAll(':scope > [role="listitem"]');return{id:r.rootId,index:qr(a,n)}}const s=n.getItem(),i=e.querySelector('[role="list"]'),o=Gv(e,n.getClientOffset()?.y||0,r);if(i){if(o==="upper")if(Le(s,t.parent,r)){const c=Mo(t,e,n);return c===null?null:{id:t.parent,index:c}}else return{id:t.id,index:0};const a=i.querySelectorAll(':scope > [role="listitem"]');return{id:t.id,index:qr(a,n)}}else{if(o==="middle")return{id:t.id,index:0};if(Le(s,t.parent,r)){const a=Mo(t,e,n);return a===null?null:{id:t.parent,index:a}}return null}},qv=(t,e)=>t.findIndex(n=>n.id===e),tl=(t,e,n,r)=>{const s=qv(t,e);let i=Qc(t,n,r);return i=i>s?i-1:i,[s,i]},dt=(t,e)=>t.find(n=>n.id===e),on=(t,e)=>t.some(n=>n.parent===e),Kv=(t,e,n)=>t.map(r=>r.id===e?{...r,parent:n}:r),Xv=(t,e,n)=>{const r=e<0?t.length+e:e;if(r>=0&&r<t.length){const s=n<0?t.length+n:n,[i]=t.splice(e,1);t.splice(s,0,i)}},Yv=(t,e,n,r)=>{const[s,i]=tl(t,e,n,r),o=[...t];return Xv(o,s,i),o.map(a=>a.id===e?{...a,parent:n}:a)},nl=g.createContext({}),Zv=t=>{const[e,{handleToggle:n,handleCloseAll:r,handleOpenAll:s,handleOpen:i,handleClose:o}]=iy(t.tree,t.initialOpen);g.useImperativeHandle(t.treeRef,()=>({open:d=>i(d,t.onChangeOpen),close:d=>o(d,t.onChangeOpen),openAll:()=>s(t.onChangeOpen),closeAll:()=>r(t.onChangeOpen)}));const a=Pe().getMonitor(),c=t.canDrop,l=t.canDrag,u={extraAcceptTypes:[],listComponent:"ul",listItemComponent:"li",placeholderComponent:"li",sort:!0,insertDroppableFirst:!0,enableAnimateExpand:!1,dropTargetOffset:0,initialOpen:!1,...t,openIds:e,onDrop:(d,h,f)=>{if(d){const p={dragSourceId:d.id,dropTargetId:h,dragSource:d,dropTarget:dt(t.tree,h),monitor:a};let m=t.tree;if(dt(m,d.id)||(m=[...m,d]),t.sort===!1){const[,y]=tl(m,d.id,h,f);p.destinationIndex=y,p.relativeIndex=f,t.onDrop(Yv(m,d.id,h,f),p);return}t.onDrop(Kv(m,d.id,h),p)}else{const p={dropTargetId:h,dropTarget:dt(t.tree,h),monitor:a};t.sort===!1&&(p.destinationIndex=Qc(t.tree,h,f),p.relativeIndex=f),t.onDrop(t.tree,p)}},canDrop:c?(d,h)=>c(t.tree,{dragSourceId:d??void 0,dropTargetId:h,dragSource:a.getItem(),dropTarget:dt(t.tree,h),monitor:a}):void 0,canDrag:l?d=>l(dt(t.tree,d)):void 0,onToggle:d=>n(d,t.onChangeOpen)};return $.createElement(nl.Provider,{value:u},t.children)},Jv=t=>$.createElement(Zv,{...t},$.createElement(zv,null,$.createElement(Hv,null,t.children))),Ve=()=>{const t=g.useContext(nl);if(!t)throw new Error("useTreeContext must be used under TreeProvider");return t},Qv=(t,e)=>{const{rootId:n,rootProps:r,classes:s}=Ve();let i=s?.container||"";return e&&s?.dropTarget&&(i=`${i} ${s.dropTarget}`),t===n&&s?.root&&(i=`${i} ${s.root}`),t===n&&r?.className&&(i=`${i} ${r.className}`),i=i.trim(),i},ey=t=>{const e=g.useContext(Jc);g.useEffect(()=>{if(!t.current)return;const n=t.current,r=u=>{const{target:d}=u;(d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement)&&e.lock()},s=u=>{const{target:d}=u;(d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement)&&e.unlock()},i=u=>r(u),o=u=>s(u),a=u=>r(u),c=u=>s(u),l=new MutationObserver(()=>{document.activeElement===document.body&&e.unlock()});return l.observe(n,{subtree:!0,childList:!0}),n.addEventListener("mouseover",i),n.addEventListener("mouseout",o),n.addEventListener("focusin",a),n.addEventListener("focusout",c),()=>{l.disconnect(),n.removeEventListener("mouseover",i),n.removeEventListener("mouseout",o),n.removeEventListener("focusin",a),n.removeEventListener("focusout",c)}},[t,e]),g.useEffect(()=>{t.current?.setAttribute("draggable",e.isLock?"false":"true")},[t,e.isLock])},ty=(t,e,n)=>{e.current?n(e):n(t),g.useEffect(()=>{e.current?n(e):n(t)},[e.current])},In={TREE_ITEM:Symbol()};let rl=null;const sl=t=>{const{target:e}=t;if(e instanceof HTMLElement){const n=e.closest('[role="listitem"]');t.currentTarget===n&&(rl=n)}},Ao=t=>sl(t),Ro=t=>sl(t),ny=(t,e)=>{const n=Ve();g.useEffect(()=>{const o=e.current;return o?.addEventListener("dragstart",Ao),o?.addEventListener("touchstart",Ro,{passive:!0}),()=>{o?.removeEventListener("dragstart",Ao),o?.removeEventListener("touchstart",Ro)}},[e]);const[{isDragging:r},s,i]=jd({type:In.TREE_ITEM,item:o=>{const a={ref:e,...t};return n.onDragStart&&n.onDragStart(a,o),a},end:(o,a)=>{const c=o;n.onDragEnd&&n.onDragEnd(c,a)},canDrag:()=>{const{canDrag:o}=n;return rl!==e.current?!1:o?o(t.id):!0},collect:o=>({isDragging:o.isDragging()})});return[r,s,i]},ry=(t,e)=>{const n=Ve(),r=g.useContext(Rt),[{isOver:s,dragSource:i},o]=Jo({accept:[In.TREE_ITEM,...n.extraAcceptTypes],drop:(a,c)=>{const{dropTargetId:l,index:u}=r;c.isOver({shallow:!0})&&l!==void 0&&u!==void 0&&n.onDrop(Ls(a)?a:null,l,u),r.hidePlaceholder()},canDrop:(a,c)=>{if(c.isOver({shallow:!0})){const l=Kr(t,e.current,c,n);return l===null?!1:Le(a,l.id,n)}return!1},hover:(a,c)=>{if(c.isOver({shallow:!0})){const{dropTargetId:l,index:u,showPlaceholder:d,hidePlaceholder:h}=r,f=Kr(t,e.current,c,n);if(f===null||!Le(a,f.id,n)){h();return}(f.id!==l||f.index!==u)&&d(f.id,f.index)}},collect:a=>{const c=a.getItem();return{isOver:a.isOver({shallow:!0})&&a.canDrop(),dragSource:c}}});return[s,i,o]},sy=t=>{const e=Ve(),n=g.useContext(Rt),[{isOver:r,dragSource:s},i]=Jo({accept:[In.TREE_ITEM,...e.extraAcceptTypes],drop:(o,a)=>{const{rootId:c,onDrop:l}=e,{dropTargetId:u,index:d}=n;a.isOver({shallow:!0})&&u!==void 0&&d!==void 0&&l(Ls(o)?o:null,c,d),n.hidePlaceholder()},canDrop:(o,a)=>{const{rootId:c}=e;return a.isOver({shallow:!0})?o===void 0?!1:Le(o,c,e):!1},hover:(o,a)=>{if(a.isOver({shallow:!0})){const{rootId:c}=e,{dropTargetId:l,index:u,showPlaceholder:d,hidePlaceholder:h}=n,f=Kr(null,t.current,a,e);if(f===null||!Le(o,c,e)){h();return}(f.id!==l||f.index!==u)&&d(f.id,f.index)}},collect:o=>{const a=o.getItem();return{isOver:o.isOver({shallow:!0})&&o.canDrop(),dragSource:a}}});return[r,s,i]},iy=(t,e)=>{const n=g.useMemo(()=>e===!0?t.filter(u=>on(t,u.id)).map(u=>u.id):Array.isArray(e)?e:[],[e]),[r,s]=g.useState(n);return g.useEffect(()=>s(n),[n]),[r,{handleToggle:(u,d)=>{const h=r.includes(u)?r.filter(f=>f!==u):[...r,u];s(h),d&&d(h)},handleCloseAll:u=>{s([]),u&&u([])},handleOpenAll:u=>{const d=t.filter(h=>on(t,h.id)).map(h=>h.id);s(d),u&&u(d)},handleOpen:(u,d)=>{let h=[];if(Array.isArray(u)){const f=t.filter(p=>u.includes(p.id)&&on(t,p.id));h=[...r,...f.map(p=>p.id)].filter((p,m,y)=>y.indexOf(p)===m)}else h=r.includes(u)?r:[...r,u];s(h),d&&d(h)},handleClose:(u,d)=>{const h=r.filter(f=>Array.isArray(u)?!u.includes(f):f!==u);s(h),d&&d(h)}}]},oy=()=>Bd(t=>{const e=t.getItemType();return{item:t.getItem(),clientOffset:t.getClientOffset(),isDragging:t.isDragging()&&e===In.TREE_ITEM}});function ay(t){const{isVisible:e,ease:n="easeIn",duration:r,variants:s={open:{opacity:1,height:"auto"},close:{opacity:0,height:0}},children:i}=t,[o,{height:a}]=Nv({polyfill:jh}),[c,l]=g.useState(e),[u,d]=g.useState(e),[h,f]=g.useState(!1),p=()=>{f(!1),e||l(!1)};g.useEffect(()=>{f(!0),e?l(!0):d(!1)},[e]);const m=a===0;return g.useEffect(()=>{c&&d(!0)},[m]),$.createElement(Lv.div,{style:h?{overflow:"hidden"}:void 0,onAnimationComplete:p,initial:u?"open":"close",animate:u?"open":"close",inherit:!1,variants:s,transition:{ease:n,duration:cy(a,r)}},$.createElement("div",{ref:o},c&&i))}function cy(t,e){if(e)return e;if(!t)return 0;const n=t/36;return Math.round((4+10*n**.25+n/5)*10)/1500}const ly=t=>{const e=Ve(),n=g.useContext(Rt),r=g.useRef(null),s=g.useRef(null),i=e.tree.find(N=>N.id===t.id),{openIds:o,classes:a,enableAnimateExpand:c}=e,l=o.includes(t.id),[u,d,h]=ny(i,r),[f,p,m]=ry(i,r);ty(r,s,d),Le(p,t.id,e)&&m(r),g.useEffect(()=>{e.dragPreviewRender?h(ih(),{captureDraggingState:!0}):s.current&&h(r)},[h,e.dragPreviewRender]),ey(r);const y=g.useCallback(()=>{e.onToggle(i.id)},[i.id,e]),b=e.listItemComponent,x=e.canDrag?e.canDrag(t.id):!0,w=n.dropTargetId===t.id,S={depth:t.depth,isOpen:l,isDragging:u,isDropTarget:w,draggable:x,hasChild:on(e.tree,t.id),containerRef:r,handleRef:s,onToggle:y};let P="";return a?.listItem&&(P=typeof a.listItem=="string"?a.listItem:a.listItem(i,S)),f&&a?.dropTarget&&(P=`${P} ${a.dropTarget}`),u&&a?.draggingSource&&(P=`${P} ${a.draggingSource}`),$.createElement(b,{ref:r,className:P,role:"listitem"},e.render(i,S),c&&S.hasChild&&$.createElement(ay,{isVisible:l},$.createElement(Xr,{parentId:t.id,depth:t.depth+1})),!c&&S.hasChild&&l&&$.createElement(Xr,{parentId:t.id,depth:t.depth+1}))},ko=t=>{const{placeholderRender:e,placeholderComponent:n,classes:r}=Ve(),s=g.useContext(Rt),o=Pe().getMonitor(),a=o.getItem();if(!e||!a)return null;const c=t.dropTargetId===s.dropTargetId&&(t.index===s.index||t.index===void 0&&t.listCount===s.index),l=o.getTargetIds();return!c||!l.length?null:$.createElement(n,{className:r?.placeholder||""},e(a,{depth:t.depth}))},Xr=t=>{const e=Ve(),n=g.useRef(null),r=e.tree.filter(h=>h.parent===t.parentId);let s=r;const i=typeof e.sort=="function"?e.sort:$v;if(e.insertDroppableFirst){let h=r.filter(p=>p.droppable),f=r.filter(p=>!p.droppable);e.sort===!1?s=[...h,...f]:(h=h.sort(i),f=f.sort(i),s=[...h,...f])}else e.sort!==!1&&(s=r.sort(i));const[o,a,c]=sy(n);t.parentId===e.rootId&&Le(a,e.rootId,e)&&c(n);const l=Qv(t.parentId,o),u=e.rootProps||{},d=e.listComponent;return $.createElement(d,{ref:n,role:"list",...u,className:l},s.map((h,f)=>$.createElement($.Fragment,{key:h.id},$.createElement(ko,{depth:t.depth,listCount:s.length,dropTargetId:t.parentId,index:f}),$.createElement(ly,{id:h.id,depth:t.depth}))),$.createElement(ko,{depth:t.depth,listCount:s.length,dropTargetId:t.parentId}))},uy={height:"100%",left:0,pointerEvents:"none",position:"fixed",top:0,width:"100%",zIndex:100},dy=t=>{const e=t.clientOffset;if(!e)return{};const{x:n,y:r}=e;return{pointerEvents:"none",transform:`translate(${n}px, ${r}px)`}},hy=()=>{const t=Ve(),e=oy(),{isDragging:n,clientOffset:r}=e;return!n||!r?null:$.createElement("div",{style:uy},$.createElement("div",{style:dy(e)},t.dragPreviewRender&&t.dragPreviewRender(e)))};function fy(t,e){return $.createElement(Jv,{...t,treeRef:e},t.dragPreviewRender&&$.createElement(hy,null),$.createElement(Xr,{parentId:t.rootId,depth:0}))}const py=g.forwardRef(fy),gy="_root_oow0e_1",my="_isSelected_oow0e_9",vy="_expandIconWrapper_oow0e_12",yy="_isOpen_oow0e_24",by="_labelGridItem_oow0e_28",ht={root:gy,isSelected:my,expandIconWrapper:vy,isOpen:yy,labelGridItem:by},Ty=t=>{const e=t.depth*24,n=s=>{s.stopPropagation(),t.onToggle(t.node.id)},r=()=>t.onSelect(t.node);return v.jsxs("div",{className:`tree-node ${ht.root} ${t.isSelected?ht.isSelected:""} ${t.node.data?.marked?"bg-gray-200":""}`,style:{paddingInlineStart:e},onClick:r,children:[v.jsx("div",{className:`${ht.expandIconWrapper} ${t.isOpen?ht.isOpen:""}`,children:t.node.droppable&&v.jsx("div",{onClick:n,children:v.jsx(Sl,{size:18})})}),v.jsxs("div",{className:"flex items-center gap-2",children:[t.node.data?.isNavigation&&(t.node.data?.visible?v.jsx(Dl,{className:"size-5"}):v.jsx(Cl,{className:"size-5"})),v.jsx(an,{name:t.node.data?.icon??"folder"})]}),v.jsx("div",{className:ht.labelGridItem,children:v.jsx("span",{children:t.node.text})}),t.loading&&v.jsx(et,{className:"size-4 animate-spin"})]})},xy="_root_ahb0f_1",wy="_icon_ahb0f_15",Sy="_label_ahb0f_16",dr={root:xy,icon:wy,label:Sy},Dy=t=>{const e=t.monitorProps.item;return v.jsxs("div",{className:`${dr.root} bg-chart-1/60`,children:[v.jsx("div",{className:dr.icon,children:v.jsx(an,{name:e.data?.icon??"folder"})}),v.jsx("div",{className:dr.label,children:e.text})]})},Cy="_app_gsniw_1",Ey="_draggingSource_gsniw_9",Py="_placeholderContainer_gsniw_13",hr={app:Cy,draggingSource:Ey,placeholderContainer:Py},Oy="_root_rda6r_1",Iy={root:Oy},My=t=>{const e=t.depth*24;return v.jsx("div",{className:`${Iy.root} bg-chart-3`,style:{left:e}})},il=g.createContext({messages:{}}),Ay=({type:t,callback:e,parentId:n,...r})=>{const[s,i]=g.useState(!1),o=async a=>{try{i(!0),(await X.post("",{data:{record:a,parentId:n,_method:"select",type:t},_method:"createItem"})).data&&e()}catch(c){console.error(c)}finally{i(!1)}};return v.jsxs("div",{className:"p-8",children:[v.jsx("div",{className:"flex gap-4 flex-col",children:v.jsxs("div",{className:`grid gap-4 ${r.items.length?"":"opacity-50 pointer-events-none"}`,children:[v.jsx(Lo,{children:r.labels.selectTitle}),v.jsxs(Yr,{onValueChange:o,disabled:s,children:[v.jsx(Zr,{className:"w-full max-w-[170px] cursor-pointer",children:v.jsx(Jr,{placeholder:r.labels.selectTitle})}),v.jsx(Qr,{className:"z-[1003]",children:r.items.map(a=>v.jsx(es,{value:a.id.toString(),children:a.name},`${a.id}-${a.name}`))})]})]})}),v.jsx("div",{className:"mt-8",children:v.jsx("span",{children:v.jsx("b",{children:r.labels.OR})})}),v.jsxs(Be,{className:"mt-8",onClick:()=>r.add(r.model),children:[v.jsx(No,{}),r.labels.createTitle]})]})},Ry=({items:t,onSelect:e})=>{const n=g.useContext(il),[r,s]=g.useState(""),i=o=>{s(o),e(o),s("")};return v.jsxs("div",{className:"p-8",children:[v.jsx(Lo,{className:"mb-4",children:n.messages["Select Item type"]}),v.jsxs(Yr,{onValueChange:i,value:r,children:[v.jsx(Zr,{className:"w-full max-w-[170px] cursor-pointer",children:v.jsx(Jr,{placeholder:n.messages["Select Ids"]})}),v.jsx(Qr,{className:"z-[1005]",children:t.map(o=>v.jsx(es,{value:o.type,children:o.name},`${o.type}-${o.name}`))})]})]})},ky=({dialogRef:t,PopupEvent:e,firstRender:n,secondRender:r,popupType:s,addProps:i,editModel:o,popUpTargetBlank:a,popUpVisible:c,messages:l,DynamicComponent:u,DynamicActionComponent:d,reloadCatalog:h,itemType:f,parentid:p,addItemProps:m,getAddModelJSON:y,addModel:b,items:x,selectCatalogItem:w})=>v.jsxs(El,{ref:t,children:[v.jsx(Pl,{}),v.jsxs(Ol,{children:[v.jsx(Bn,{children:v.jsxs("div",{className:"relative h-full",children:[e==="create"&&v.jsxs(v.Fragment,{children:[n&&v.jsx(et,{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 size-8 animate-spin"}),v.jsx(Ry,{items:x,onSelect:w})]}),e==="update"&&v.jsx("div",{className:"h-full overflow-y-auto mt-5",children:n?v.jsx(et,{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 size-8 animate-spin"}):v.jsxs(v.Fragment,{children:[s==="model.link"&&v.jsx(Lt,{page:i,catalog:!0,callback:o,openNewWindowLabel:l["Open in a new window"],visibleLable:l.Visible,openNewWindow:a,DnavVisible:c}),s==="model"&&v.jsx(Lt,{page:i,catalog:!0,callback:o,openNewWindowLabel:l["Open in a new window"],visibleLable:l.Visible,openNewWindow:a,DnavVisible:c}),s==="component"&&v.jsx(v.Fragment,{children:u})]})}),e==="action"&&v.jsx(v.Fragment,{children:d})]})}),v.jsx(Bn,{children:v.jsxs("div",{className:"relative h-full",children:[r&&v.jsx(et,{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 size-8 animate-spin"}),e==="create"&&v.jsxs(v.Fragment,{children:[s==="model.link"&&v.jsx(Ay,{add:y,callback:()=>{t.current?.close(),h(null)},type:f??"",parentId:p,...m}),s==="model"&&v.jsx("div",{className:"h-full overflow-y-auto mt-5",children:v.jsx(Lt,{page:i,catalog:!0,callback:b,openNewWindowLabel:l["Open in a new window"],visibleLable:l.Visible})}),s==="component"&&v.jsx(v.Fragment,{children:u})]})]})}),v.jsx(Bn,{children:v.jsx("div",{className:"h-full overflow-y-auto mt-5",children:v.jsx(Lt,{page:i,catalog:!0,callback:b,openNewWindowLabel:l["Open in a new window"],visibleLable:l.Visible})})})]})]}),Ly=t=>t,Ny=()=>{const t=g.useRef(null),e=g.useRef(null),[n,r]=g.useState([]),[s,i]=g.useState([]),[o,a]=g.useState({catalogId:"",catalogName:"",catalogSlug:"",idList:[],nodes:[],movingGroupsRootOnly:!1}),{t:c}=Il(),l=g.useMemo(()=>new Proxy({},{get:(T,C)=>c(String(C))}),[c]),[u,d]=g.useState([]),[h,f]=g.useState({}),[p,m]=g.useState(!1),y=g.useRef(null),[b,x]=g.useState({items:[],model:"",labels:{}}),[w,S]=g.useState(""),[P,N]=g.useState(null),[L,I]=g.useState(null),[_,E]=g.useState(null),[V,U]=g.useState(0),[we,ne]=g.useState(!1),[fe,re]=g.useState(!1),[Ns,q]=g.useState(null),[te,Se]=g.useState(null),[ae,Mn]=g.useState([]),[An,Vs]=g.useState([]),[ol,js]=g.useState(!1),[al,Rn]=g.useState(!1),[cl,kn]=g.useState({props:{actions:[],btnBack:{link:"",title:""},btnSave:{title:""},edit:!1,fields:[],notFound:"",postLink:"",search:"",view:!1}}),[ll,De]=g.useState(!1),[ul,Bs]=g.useState(!1);g.useEffect(()=>{const T=async()=>{const O=await X.post("",{_method:"getCatalog"}),{catalog:k,items:M,toolsActions:j,templateComponents:z=[]}=O.data;a(k),d(M),f(Object.fromEntries(z.map(H=>[H.type.toLowerCase(),H]))),r(k.nodes),Mn(j)};(async()=>{try{m(!0),await T()}catch(O){console.error("Error initializing catalog:",O)}finally{m(!1)}})()},[]),g.useEffect(()=>{o.idList.length===1&&!o.catalogId&&o.catalogSlug&&$s.get(`${window.routePrefix}/catalog/${o.catalogSlug}/${o.idList[0]}`)},[o.catalogId,o.catalogSlug,o.idList]);const Fs=T=>{s.find(O=>O.id===T.id)?(U(0),i(s.filter(O=>O.id!==T.id))):(U(T.id),i([...s,T]))},dl=T=>{T.target===T.currentTarget&&i([])},hl=g.useCallback(async(T,{dragSourceId:C,dropTargetId:O})=>{try{const k=T.find(z=>z.id===C),M=O||0,j={data:{reqNode:[{id:k?.id,parent:M,text:k?.text,data:k?.data}],reqParent:{id:M,children:T.filter(z=>z.parent===M).map(z=>({id:z.id,text:z.text,data:z.data})),data:M===0?{id:0}:T.find(z=>z.id===M)?.data}},_method:"updateTree"};r(T),await X.put("",j)}catch(k){console.error("Error updating tree:",k)}},[n]),Ln=g.useCallback(async(T,C)=>{if(C)try{N(T);const O=n.find(j=>j.id===T),M=(await X.post("",{data:O,_method:"getChilds"})).data.data;r(j=>{const z=new Set(j.map(W=>W.id)),H=M.filter(W=>!z.has(W.id));return H.length===0?j:[...j,...H]})}catch(O){console.error("Error loading child nodes:",O)}finally{N(null)}},[n]),fl=g.useCallback(async()=>{try{const T=await X.post("",{_method:"getCatalog"}),{catalog:C}=T.data;r(O=>{const k=new Map(O.map(H=>[H.id,H])),M=C.nodes,j=O.map(H=>{const W=M.find(jn=>jn.id===H.id);return W&&W.text!==H.text?W:H}),z=M.filter(H=>!k.has(H.id)||k.get(H.id)?.text!==H.text);return z.length===0&&j.length===O.length&&j.every((H,W)=>H===O[W])?O:[...j,...z]})}catch(T){console.error("Error reloading catalog:",T)}},[]),Oe=g.useCallback(async T=>{T?r(C=>C.map(O=>O.id===T.id?{...O,text:T.name,data:{...O.data,...T}}:O)):s[0]?.droppable?(t.current?.open(s[0].id),await Ln(s[0].id,!0)):await fl()},[s,Ln,r]),at=g.useCallback(async T=>{Bs(!0);const C=await X.get(`${window.routePrefix}/model/${T}/add?without_layout=true`);kn(C.data),y.current?.next(),Bs(!1)},[]),kt=g.useCallback(async(T,C,O=L)=>{const k=h[T.type.toLowerCase()];if(!k)return!1;const M=await import(Ly(k.component)),j=k.exportName?M[k.exportName]:M.default;return j?(q(v.jsx(j,{mode:C,type:T.type,template:T,parentId:V,itemType:O,selectedItem:s[0]?.data,messages:l,actions:{close:()=>y.current?.close(),reload:Oe,openModelAdd:at}},`${T.type}-${C}-${Date.now()}`)),S("component"),!0):(ct.error(`Catalog template component "${T.type}" was not found`),!1)},[at,L,l,V,Oe,s,h]),_s=g.useCallback(async(T,C=L)=>{if(!await kt(T,"create",C))switch(T.type){case"model.link":x(T.data),S("model.link");break;case"model":x(T.data),S("model");break;default:(async()=>{const M=(await import(T.data.path)).default;q(v.jsx(M,{parentId:V,callback:j=>{y.current?.close(),Oe(j)}},JSON.stringify(new Date)))})(),S("component");break}},[L,V,Oe,kt]),pl=g.useCallback(async T=>{I(T),De(!0);const C=await X.post("",{type:T,_method:"getAddTemplate"});C.data.type==="model"?(S("model"),await at(C.data.data.model)):(await _s(C.data,T),y.current?.next()),De(!1)},[at,_s]),zs=g.useCallback(async()=>{try{De(!0);const T=await X.post("",{type:s[0]?.data?.type,modelId:s[0]?.data?.modelId??null,id:s[0]?.data?.id,_method:"getEditTemplate"});if(T.data){if(await kt(T.data,"update")){De(!1);return}switch(T.data.type){case"model.link":const C=T.data.data.item,O=T.data.data.model??C.type??s[0]?.data?.type;if(!O){ct.error("Unable to determine model for edit form"),De(!1);break}const k=await X.get(`${window.routePrefix}/model/${O}/edit/${C.modelId}?without_layout=true`);kn(k.data),ne(C.targetBlank),re(C.visible),S("model.link"),De(!1);break;case"model":const M=T.data.data.item,j=T.data.data.model??M.type??s[0]?.data?.type;if(!j){ct.error("Unable to determine model for edit form"),De(!1);break}const z=await X.get(`${window.routePrefix}/model/${j}/edit/${M.modelId}?without_layout=true`);kn(z.data),ne(M.targetBlank),re(M.visible),S("model"),De(!1);break;default:(async()=>{const jn=(await import(T.data.data.path)).default;q(v.jsx(jn,{callback:xl=>{y.current?.close(),Oe(xl)},update:!0,item:T.data.data.item},`${T.data.data.id}-${T.data.data.item.name}`))})(),S("component"),De(!1);break}}}catch(T){console.log(T)}},[Oe,kt,s]),gl=g.useCallback(async()=>{if(s.length)try{for(const T of s)if((await X.delete("",T)).data.data.ok){let O=[...n];const k=(M,j)=>{let z=j.filter(W=>W.id!==M);return j.filter(W=>W.parent===M).forEach(W=>{z=k(W.id,z)}),z};s.forEach(M=>{O=k(M.id,O)}),r(O)}}catch(T){console.error("Error deleting node:",T)}finally{i([]),U(0)}},[s,n]),ml=async(T,C,O)=>{C&&(T.targetBlank=C),O&&(T.visible=O);try{await X.post("",{data:{record:T,parentId:V,type:L},_method:"createItem"})}catch(k){console.log(k)}finally{y.current?.close(),Oe()}},vl=g.useCallback(async(T,C,O)=>{C&&(T[0].targetBlank=C),O&&(T[0].visible=O),T[0].treeId=s[0]?.data?.id;try{const k=await X.put("",{type:s[0]?.data?.type,data:{record:T[0]},modelId:s[0]?.data?.modelId,_method:"updateItem"});r(M=>{const{modelId:j,type:z,name:H}=k.data.data;return j===void 0||z===void 0?(console.warn("No modelId or type in response!"),M):M.map(W=>W.data?.modelId===j&&W.data?.type===z?{...W,text:H,data:{...W.data,...k.data.data,visible:k.data.data.visible??!1}}:W)})}catch(k){console.error("Error updating model:",k)}finally{y.current?.close()}},[s,r,n]),Hs=async T=>{if(i([]),Rn(!0),!T.trim()){const C=await X.post("",{_method:"getCatalog"}),{catalog:O}=C.data;r(O.nodes),requestAnimationFrame(()=>{requestAnimationFrame(()=>{t.current&&(t.current.closeAll?.(),Rn(!1))})});return}try{const C=await X.post("",{s:T,_method:"search"});r(C.data.data),requestAnimationFrame(()=>{requestAnimationFrame(()=>{t.current&&(t.current.openAll?.(),Rn(!1))})})}catch(C){console.error("Error searching:",C)}},yl=Wl(Hs,500),bl=g.useCallback((T,C)=>{if(T){const O=s.some(k=>k.id===C.id);i([]),O||(Fs(C),Tl(C))}},[]),Tl=g.useCallback(async T=>{Vs([]),js(!0);try{const C=await X.post("",{items:[T],type:"context",_method:"getActions"});C.data&&C?.data?.data?.length&&Vs(C.data.data)}catch(C){console.error(C)}finally{js(!1)}},[]),Nn=g.useCallback(async T=>{const C=ae.find(k=>k.id===T)??An.find(k=>k.id===T);if(!C)return;let O=null;switch(C.type){case"link":try{O=await X.put("",{actionId:C.id,_method:"getLink"}),O.data&&window.open(`${O.data.data}`,"_blank")?.focus()}catch(M){console.error(M)}break;case"basic":let k={actionID:C.id,items:s,data:""};try{ct.warning(l["Performing an action..."]),await X.put("",{data:k,_method:"handleAction"})}catch(M){console.error(M)}finally{ct.success(l["Action completed"])}break;case"external":try{const M=await X.put("",{actionId:C.id,_method:"getPopUpTemplate"});M.data&&((async()=>{const H=(await import(M.data.data)).default;Se(v.jsx(H,{items:s,callback:()=>{y.current?.close()}},JSON.stringify(s)))})(),y.current?.open(),E("action"))}catch(M){console.error(M)}break}},[ae,s,An]),Vn=o.catalogId||(o.idList.length===1?o.idList[0]:"");return v.jsx(v.Fragment,{children:p?v.jsxs(v.Fragment,{children:[v.jsx(Fn,{className:"h-12 w-1/4 rounded-md"}),v.jsx(Fn,{className:"h-12 w-full rounded-md"}),v.jsx(Fn,{className:"h-full w-full rounded-md"})]}):v.jsxs(il.Provider,{value:{messages:l},children:[v.jsx(Ml,{position:"top-center",richColors:!0,closeButton:!0}),v.jsxs("div",{className:"flex gap-8 items-center mb-4",children:[v.jsx("h1",{className:"text-[28px] leading-[36px] text-foreground",children:o.catalogName}),o.idList.length===1&&Vn&&v.jsx(Al,{variant:"secondary",className:"px-3 py-1 text-sm",children:Vn}),o.idList.length>1&&v.jsxs(Yr,{value:Vn,onValueChange:T=>{$s.get(`${window.routePrefix}/catalog/${o.catalogSlug}/${T}`)},children:[v.jsx(Zr,{className:"w-full max-w-[170px] cursor-pointer",children:v.jsx(Jr,{placeholder:l["Select Ids"]})}),v.jsx(Qr,{children:o.idList.map(T=>v.jsx(es,{value:T,children:T},T))})]})]}),v.jsxs("div",{className:"xl:gap-10 justify-between flex flex-col xl:flex-row gap-3.5",children:[v.jsxs("div",{className:"flex gap-2 items-center",children:[v.jsxs("div",{className:"flex gap-2 items-center flex-wrap md:flex-nowrap",children:[v.jsxs(Be,{variant:"default",size:"sm",className:`w-fit rounded-sm ${s.length===0||s.length===1&&s[0]?.droppable?"":"opacity-50 pointer-events-none"}`,onClick:()=>{E("create"),y.current?.open()},children:[v.jsx(No,{}),l.create]}),v.jsxs(Be,{variant:"outline",size:"sm",className:`w-fit cursor-pointer rounded-sm ${s.length>1||!s.length?"opacity-50 pointer-events-none":""}`,onClick:()=>{zs(),E("update"),y.current?.open()},children:[v.jsx(Rl,{}),l.Edit]}),v.jsx(kl,{btnTitle:l.Delete,ref:e,variant:"destructive",btnCLass:`w-fit text-white hover ${s.length?"":"opacity-50 pointer-events-none"}`,delModal:{yes:l.Yes,no:l.No,text:l["Are you sure?"]},isLink:!1,handleDelete:gl}),v.jsxs(Be,{variant:"secondary",size:"sm",className:`w-fit cursor-pointer rounded-sm ${s.length?"":"opacity-50 pointer-events-none"}`,onClick:()=>{U(0),i([])},children:[v.jsx(Ll,{}),l.Clean]})]}),v.jsxs("div",{className:"ml-4",children:[v.jsx("div",{className:"hidden lg:flex gap-2",children:ae.map(T=>v.jsxs(Be,{variant:"outline",size:"sm",onClick:()=>Nn(T.id),children:[v.jsx(an,{name:T.icon}),T.name]},T.id))}),ae.length>0&&v.jsx("div",{className:"block lg:hidden",children:v.jsxs(Nl,{children:[v.jsx(Vl,{asChild:!0,children:v.jsx(Be,{variant:"outline",size:"icon",children:v.jsx(jl,{})})}),v.jsx(Bl,{className:"w-fit",side:"right",align:"start",children:v.jsx(Fl,{className:"grid gap-2",children:ae.map(T=>v.jsxs(Be,{variant:"outline",size:"sm",onClick:()=>Nn(T.id),children:[v.jsx(an,{name:T.icon}),T.name]},T.id))})})]})})]})]}),v.jsxs("div",{className:"flex gap-2 items-center justify-start xl:justify-end",children:[al&&v.jsx(et,{className:"size-4 animate-spin order-2 xl:order-1"}),v.jsx(_l,{type:"search",autoFocus:!1,placeholder:l.Search,className:"w-[200px] p-2 border rounded order-1 xl:order-2",onChange:T=>{yl(T.target.value)},onKeyDown:T=>{T.key==="Enter"&&(T.preventDefault(),Hs(T.currentTarget.value))}})]})]}),v.jsx("div",{className:"h-full",children:v.jsx(fd,{backend:Kl,options:Uv(),children:v.jsx("div",{className:hr.app,children:v.jsx(py,{ref:t,tree:n,rootId:0,render:(T,{depth:C,isOpen:O,onToggle:k})=>v.jsxs(zl,{onOpenChange:M=>bl(M,T),children:[v.jsx(Hl,{children:v.jsx(Ty,{node:T,depth:C,isOpen:O,loading:P===T.id,isSelected:!!s.find(M=>M.id===T.id),onToggle:M=>{k(),Ln(M,!O)},onSelect:Fs})}),v.jsxs($l,{children:[v.jsx(Nt,{className:`${s[0]?.droppable?"":"opacity-50 pointer-events-none"}`,onClick:()=>{E("create"),y.current?.open()},children:l.create}),v.jsx(Nt,{onClick:()=>{zs(),E("update"),y.current?.open()},children:l.Edit}),v.jsx(Nt,{variant:"destructive",onClick:()=>{document.body.removeAttribute("style"),e.current?.click()},className:s.length?"":"opacity-50 pointer-events-none",children:l.Delete}),ol?v.jsx(et,{className:"mx-auto size-3 animate-spin"}):An.map(M=>v.jsx(Nt,{onClick:()=>Nn(M.id),children:M.name},M.id))]})]}),dropTargetOffset:5,insertDroppableFirst:!1,classes:{draggingSource:hr.draggingSource,dropTarget:"bg-chart-1/30",placeholder:hr.placeholderContainer,root:"py-4"},canDrop:(T,{dragSource:C,dropTargetId:O})=>{if(C?.parent===O)return!0},sort:!1,dragPreviewRender:T=>v.jsx(Dy,{monitorProps:T}),onDrop:hl,placeholderRender:(T,{depth:C})=>v.jsx(My,{node:T,depth:C}),rootProps:{onClick:dl}})})})}),v.jsx(ky,{dialogRef:y,PopupEvent:_,firstRender:ll,secondRender:ul,popupType:w,addProps:cl,editModel:vl,popUpTargetBlank:we,popUpVisible:fe,messages:l,DynamicComponent:Ns,DynamicActionComponent:te,reloadCatalog:Oe,itemType:L,parentid:V,addItemProps:b,getAddModelJSON:at,addModel:ml,items:u,selectCatalogItem:pl})]})})},Vy=[];function jy(){return v.jsx("div",{className:"flex h-full flex-1 flex-col gap-4 rounded-xl p-4",children:v.jsx(Ny,{})})}const Gy=Ul(jy,{breadcrumbs:Vy});export{Gy as default};
@@ -0,0 +1 @@
1
+ import{U as a,P as n}from"./mermaid.core-aKMJHeEk.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
@@ -0,0 +1 @@
1
+ import{_ as s}from"./mermaid.core-aKMJHeEk.js";var t,e=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{e as I};