nx-kv 0.65.3 → 0.66.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (337) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +15 -37
  3. package/assets/nx-kv/QUICKSTART.md +110 -0
  4. package/assets/nx-kv/SKILL.md +7 -2
  5. package/assets/nx-kv/references/A02-/346/217/220/344/272/244/344/273/273/345/212/241.md +59 -4
  6. package/assets/nx-kv/references/A05-/344/273/273/345/212/241/351/223/276/344/270/216/345/217/215/351/246/210/346/261/207/346/200/273.md +1 -1
  7. package/assets/nx-kv/references/A06-/345/217/202/350/200/203/344/273/223/345/272/223/351/251/261/345/212/250/347/232/204/345/274/200/345/217/221.md +143 -0
  8. package/assets/nx-kv/references/A07-/344/273/273/345/212/241/351/223/276/345/233/236/351/241/276/344/270/216/346/243/200/347/264/242.md +86 -0
  9. package/assets/nx-kv/references/B02-CLI/351/200/237/346/237/245.md +1 -2
  10. package/package.json +2 -2
  11. package/src/core/config.ts +72 -0
  12. package/src/core/db/driver.ts +1 -1
  13. package/src/core/db/migrations/index.ts +2 -0
  14. package/src/core/db/migrations/v14.sql +37 -0
  15. package/src/core/db/version.ts +1 -1
  16. package/src/core/instruction-template.ts +1 -1
  17. package/src/core/workflow/project.ts +1 -1
  18. package/src/core/workflow/types.ts +2 -2
  19. package/src/modules/bundled/actions/_manifest.generated.ts +12 -12
  20. package/src/modules/bundled/actions/{bundled-get.ts → skill-get.ts} +4 -4
  21. package/src/modules/bundled/actions/{bundled-groups.ts → skill-groups.ts} +4 -4
  22. package/src/modules/bundled/actions/{bundled-install.ts → skill-install.ts} +4 -4
  23. package/src/modules/bundled/actions/{bundled-list.ts → skill-list.ts} +4 -4
  24. package/src/modules/claim/actions/_manifest.generated.ts +3 -6
  25. package/src/modules/claim/actions/{localtask-claim.ts → localtask-get.ts} +18 -9
  26. package/src/modules/claim/actions/localtask-preview.ts +2 -2
  27. package/src/modules/{delivery → claim}/assemble.ts +3 -3
  28. package/src/modules/claim/get.ts +3 -4
  29. package/src/modules/{delivery → claim}/groupctx.ts +4 -7
  30. package/src/modules/{delivery → claim}/host.ts +4 -4
  31. package/src/modules/claim/index.ts +2 -2
  32. package/src/modules/claim/panel-escort.ts +2 -2
  33. package/src/modules/claim/params.ts +2 -2
  34. package/src/modules/{delivery → claim}/preview.ts +3 -3
  35. package/src/modules/claim/wait.ts +19 -19
  36. package/src/modules/claim/waitgoal-config.ts +1 -22
  37. package/src/modules/docs/actions/_manifest.generated.ts +49 -37
  38. package/src/modules/docs/actions/{doc-attach.ts → docs-attach.ts} +4 -4
  39. package/src/modules/docs/actions/{doc-attachments.ts → docs-attachments.ts} +4 -4
  40. package/src/modules/docs/actions/{doc-detach.ts → docs-detach.ts} +4 -4
  41. package/src/modules/docs/actions/{doc-get.ts → docs-get.ts} +4 -4
  42. package/src/modules/docs/actions/{doc-link-file.ts → docs-link-file.ts} +3 -3
  43. package/src/modules/docs/actions/{doc-list.ts → docs-list.ts} +4 -4
  44. package/src/modules/docs/actions/{doc-mdfile.ts → docs-mdfile.ts} +3 -3
  45. package/src/modules/docs/actions/{doc-mdfiles.ts → docs-mdfiles.ts} +3 -3
  46. package/src/modules/docs/actions/{docs-notebind.ts → docs-note-bind.ts} +3 -3
  47. package/src/modules/docs/actions/{doc-ref.ts → docs-ref.ts} +4 -4
  48. package/src/modules/docs/actions/{doc-remove.ts → docs-remove.ts} +4 -4
  49. package/src/modules/docs/actions/{doc-update.ts → docs-set.ts} +4 -4
  50. package/src/modules/docs/actions/{doc-unbind.ts → docs-unbind.ts} +4 -4
  51. package/src/modules/{repos → docs}/actions/repo-doc-add.ts +3 -2
  52. package/src/modules/{repos → docs}/actions/repo-doc-list.ts +3 -2
  53. package/src/modules/{repos → docs}/actions/repo-doc-remove.ts +3 -2
  54. package/src/modules/{repos → docs}/actions/repo-knowledge.ts +3 -2
  55. package/src/modules/docs/host-scrub.ts +1 -1
  56. package/src/modules/docs/index.ts +1 -1
  57. package/src/modules/docs/knowledge.ts +8 -16
  58. package/src/modules/goals/actions/timegoal-check.ts +1 -1
  59. package/src/modules/goals/actions/timegoal-clear.ts +1 -1
  60. package/src/modules/goals/actions/timegoal-list.ts +1 -1
  61. package/src/modules/goals/actions/timegoal-log.ts +1 -1
  62. package/src/modules/goals/actions/timegoal-set.ts +1 -1
  63. package/src/modules/goals/actions/timegoal-show.ts +1 -1
  64. package/src/modules/goals/actions/timegoal-update.ts +1 -1
  65. package/src/modules/goals/plugins/timegoal-cwd-store.ts +1 -1
  66. package/src/modules/goals/plugins/timegoal-store.ts +3 -3
  67. package/src/modules/goals/plugins/timegoal-task-store.ts +2 -2
  68. package/src/modules/{localtask → goals}/support.ts +3 -1
  69. package/src/modules/localtask/actions/_manifest.generated.ts +14 -14
  70. package/src/modules/localtask/actions/localtask-add.ts +3 -3
  71. package/src/modules/localtask/actions/localtask-attach-note.ts +1 -1
  72. package/src/modules/localtask/actions/localtask-attach.ts +1 -1
  73. package/src/modules/localtask/actions/localtask-attachments.ts +2 -2
  74. package/src/modules/localtask/actions/{localtask-cancelMany.ts → localtask-cancel-many.ts} +3 -3
  75. package/src/modules/localtask/actions/localtask-cancel.ts +1 -1
  76. package/src/modules/localtask/actions/localtask-chain.ts +1 -1
  77. package/src/modules/localtask/actions/{localtask-closeMany.ts → localtask-close-many.ts} +3 -3
  78. package/src/modules/localtask/actions/localtask-detach.ts +2 -2
  79. package/src/modules/localtask/actions/localtask-done.ts +1 -1
  80. package/src/modules/localtask/actions/localtask-list.ts +1 -1
  81. package/src/modules/localtask/actions/{localtask-removeMany.ts → localtask-remove-many.ts} +3 -3
  82. package/src/modules/localtask/actions/localtask-reopen.ts +5 -5
  83. package/src/modules/localtask/actions/{localtask-get.ts → localtask-show.ts} +17 -8
  84. package/src/modules/localtask/actions/localtask-tasks.ts +19 -4
  85. package/src/modules/localtask/actions/{localtask-timegoalLog.ts → localtask-timegoal-log.ts} +3 -3
  86. package/src/modules/localtask/actions/{localtask-topic-removeMany.ts → localtask-topic-remove-many.ts} +4 -4
  87. package/src/modules/localtask/actions/localtask-update.ts +2 -2
  88. package/src/modules/localtask/{bus → infra/bus}/index.ts +1 -1
  89. package/src/modules/localtask/{engine.ts → infra/engine.ts} +1 -1
  90. package/src/modules/localtask/{events.ts → infra/events.ts} +3 -3
  91. package/src/modules/localtask/{mutator → infra/mutator}/index.ts +2 -2
  92. package/src/modules/localtask/{mutator → infra/mutator}/validate.ts +4 -4
  93. package/src/modules/localtask/{repo → infra/repo}/goals.ts +2 -2
  94. package/src/modules/localtask/{repo → infra/repo}/index.ts +1 -1
  95. package/src/modules/localtask/{repo → infra/repo}/links.ts +3 -3
  96. package/src/modules/localtask/{repo → infra/repo}/open.ts +4 -4
  97. package/src/modules/localtask/{repo → infra/repo}/presence.ts +1 -1
  98. package/src/modules/localtask/{repo → infra/repo}/rows.ts +1 -1
  99. package/src/modules/localtask/{repo → infra/repo}/settings.ts +9 -6
  100. package/src/modules/localtask/{repo → infra/repo}/snapshot.ts +9 -7
  101. package/src/modules/localtask/{repo → infra/repo}/tasks.ts +82 -4
  102. package/src/modules/localtask/{repo → infra/repo}/topics.ts +3 -3
  103. package/src/modules/localtask/{repo-ctx.ts → infra/repo-ctx.ts} +1 -1
  104. package/src/modules/localtask/{scheduler → infra/scheduler}/index.ts +1 -1
  105. package/src/modules/localtask/{scheduler → infra/scheduler}/state-drive.ts +4 -4
  106. package/src/modules/localtask/{store → infra/store}/file-adapter.ts +2 -2
  107. package/src/modules/localtask/{store → infra/store}/index.ts +4 -4
  108. package/src/modules/localtask/{store → infra/store}/memory-adapter.ts +2 -2
  109. package/src/modules/localtask/{store-io.ts → infra/store-io.ts} +1 -1
  110. package/src/modules/localtask/{writes.ts → infra/writes.ts} +3 -3
  111. package/src/modules/localtask/{add.ts → lifecycle/add.ts} +5 -5
  112. package/src/modules/localtask/{deletion.ts → lifecycle/deletion.ts} +4 -4
  113. package/src/modules/localtask/{task-lifecycle.ts → lifecycle/task-lifecycle.ts} +27 -24
  114. package/src/modules/localtask/{task-ops.ts → lifecycle/task-ops.ts} +19 -18
  115. package/src/modules/localtask/{task-remove.ts → lifecycle/task-remove.ts} +5 -5
  116. package/src/modules/localtask/{task-templates.ts → lifecycle/task-templates.ts} +2 -2
  117. package/src/modules/localtask/{task-view.ts → lifecycle/task-view.ts} +39 -13
  118. package/src/modules/localtask/{topics.ts → lifecycle/topics.ts} +7 -7
  119. package/src/modules/localtask/{update.ts → lifecycle/update.ts} +5 -5
  120. package/src/modules/{delivery → localtask/ops}/attach-resource.ts +4 -4
  121. package/src/modules/{delivery → localtask/ops}/attach-template.ts +3 -3
  122. package/src/modules/{delivery → localtask/ops}/attach.ts +11 -11
  123. package/src/modules/localtask/{board-target.ts → ops/board-target.ts} +1 -1
  124. package/src/modules/{delivery → localtask/ops}/doc-inline.ts +3 -3
  125. package/src/modules/localtask/{group-store.ts → ops/group-store.ts} +1 -1
  126. package/src/modules/localtask/service.ts +16 -16
  127. package/src/modules/localtask/{action-render.ts → ui/action-render.ts} +18 -4
  128. package/src/modules/localtask/{contract-views.ts → ui/contract-views.ts} +9 -4
  129. package/src/modules/localtask/{panel-guard.ts → ui/panel-guard.ts} +1 -1
  130. package/src/modules/localtask/{panel-presence.ts → ui/panel-presence.ts} +6 -6
  131. package/src/modules/localtask/waiters.ts +2 -2
  132. package/src/modules/localtask/waiting.ts +1 -1
  133. package/src/modules/promptplug/factory.ts +2 -2
  134. package/src/modules/promptplug/index.ts +5 -5
  135. package/src/modules/promptplug/plugins/attachment.ts +1 -1
  136. package/src/modules/promptplug/plugins/context.ts +9 -20
  137. package/src/modules/promptplug/plugins/goal-prompt.ts +1 -1
  138. package/src/modules/promptplug/template-store.ts +163 -58
  139. package/src/modules/repos/actions/_manifest.generated.ts +0 -12
  140. package/src/modules/repos/service/crud.ts +1 -1
  141. package/src/modules/setting/actions/setting-set.ts +1 -0
  142. package/src/modules/setting/service.ts +15 -1
  143. package/src/modules/templates/actions/_manifest.generated.ts +18 -18
  144. package/src/modules/templates/actions/{templates-add.ts → template-add.ts} +4 -4
  145. package/src/modules/templates/actions/{templates-default.ts → template-default.ts} +4 -4
  146. package/src/modules/templates/actions/{templates-list.ts → template-list.ts} +4 -4
  147. package/src/modules/templates/actions/{templates-remove.ts → template-remove.ts} +4 -4
  148. package/src/modules/templates/actions/{templates-reorder.ts → template-reorder.ts} +4 -4
  149. package/src/modules/templates/actions/{templates-update.ts → template-update.ts} +4 -4
  150. package/src/runtime/cli.ts +1 -1
  151. package/src/runtime/registry.ts +0 -2
  152. package/src/{modules/delivery → shared}/delivery-text.ts +5 -4
  153. package/src/shared/feedback-text.ts +80 -20
  154. package/src/shared/task-status.ts +42 -0
  155. package/src/web/frontend/App.tsx +10 -9
  156. package/src/web/frontend/api/cli-tree.json +307 -322
  157. package/src/web/frontend/api/client.generated.ts +285 -283
  158. package/src/web/frontend/components/doc/doc-head.tsx +1 -1
  159. package/src/web/frontend/components/layout/crumbs.ts +3 -9
  160. package/src/web/frontend/components/md/{attach-area.tsx → attachments/attach-area.tsx} +5 -5
  161. package/src/web/frontend/components/md/{attach-bar.tsx → attachments/attach-bar.tsx} +1 -1
  162. package/src/web/frontend/components/md/{attach-common.ts → attachments/attach-common.ts} +1 -1
  163. package/src/web/frontend/components/md/{attach-modal.tsx → attachments/attach-modal.tsx} +4 -4
  164. package/src/web/frontend/components/md/{attach-picker.tsx → attachments/attach-picker.tsx} +4 -4
  165. package/src/web/frontend/components/md/{attachments.ts → attachments/attachments.ts} +1 -1
  166. package/src/web/frontend/components/md/{composer-launch.ts → composer/composer-launch.ts} +3 -3
  167. package/src/web/frontend/components/md/{composer-panel.tsx → composer/composer-panel.tsx} +12 -12
  168. package/src/web/frontend/components/md/{use-live-preview.ts → hooks/use-live-preview.ts} +8 -8
  169. package/src/web/frontend/components/md/{use-slash-menu.ts → hooks/use-slash-menu.ts} +4 -4
  170. package/src/web/frontend/components/md/{use-source-editor.ts → hooks/use-source-editor.ts} +7 -7
  171. package/src/web/frontend/components/md/{sel-menu.tsx → menus/sel-menu.tsx} +1 -1
  172. package/src/web/frontend/components/md/model/autolink-angle/index.ts +20 -0
  173. package/src/web/frontend/components/md/model/code/index.ts +30 -0
  174. package/src/web/frontend/components/md/model/divider/index.ts +19 -0
  175. package/src/web/frontend/components/md/model/emphasis/index.ts +21 -0
  176. package/src/web/frontend/components/md/model/escape/index.ts +35 -0
  177. package/src/web/frontend/components/md/model/footnote/index.ts +77 -0
  178. package/src/web/frontend/components/md/model/heading/index.ts +19 -0
  179. package/src/web/frontend/components/md/model/highlight/index.ts +10 -0
  180. package/src/web/frontend/components/md/model/image/index.ts +31 -0
  181. package/src/web/frontend/components/md/model/inline-scan.ts +47 -0
  182. package/src/web/frontend/components/md/model/link-ref/index.ts +41 -0
  183. package/src/web/frontend/components/md/model/list-common.ts +97 -0
  184. package/src/web/frontend/components/md/model/math/index.ts +70 -0
  185. package/src/web/frontend/components/md/model/math/latex.ts +106 -0
  186. package/src/web/frontend/components/md/model/ordered-list/index.ts +27 -0
  187. package/src/web/frontend/components/md/model/paragraph/index.ts +19 -0
  188. package/src/web/frontend/components/md/model/quote/index.ts +63 -0
  189. package/src/web/frontend/components/md/model/registry.ts +74 -0
  190. package/src/web/frontend/components/md/model/table/index.ts +100 -0
  191. package/src/web/frontend/components/md/model/types.ts +92 -0
  192. package/src/web/frontend/components/md/model/unordered-list/index.ts +37 -0
  193. package/src/web/frontend/components/md/{live-block.tsx → panes/live-block.tsx} +3 -3
  194. package/src/web/frontend/components/md/{md-panes-helpers.ts → panes/md-panes-helpers.ts} +15 -4
  195. package/src/web/frontend/components/md/{md-panes-keys.ts → panes/md-panes-keys.ts} +3 -3
  196. package/src/web/frontend/components/md/{md-panes-root.tsx → panes/md-panes-root.tsx} +2 -2
  197. package/src/web/frontend/components/md/{md-panes.tsx → panes/md-panes.tsx} +12 -12
  198. package/src/web/frontend/components/md/{ack-rail.tsx → rails/ack-rail.tsx} +2 -2
  199. package/src/web/frontend/components/md/{block-rail.tsx → rails/block-rail.tsx} +2 -2
  200. package/src/web/frontend/components/md/{doc-outline-rail.tsx → rails/doc-outline-rail.tsx} +1 -1
  201. package/src/web/frontend/components/md/{shortcut-sheet.tsx → shell/shortcut-sheet.tsx} +1 -1
  202. package/src/web/frontend/components/md/{tool-bar.tsx → shell/tool-bar.tsx} +5 -7
  203. package/src/web/frontend/components/md/standalone/task-chain-graph.tsx +194 -0
  204. package/src/web/frontend/components/md/{task-chain.tsx → standalone/task-chain.tsx} +34 -11
  205. package/src/web/frontend/components/md/{template-editor.tsx → standalone/template-editor.tsx} +2 -2
  206. package/src/web/frontend/components/repos/get-loop-members.tsx +54 -0
  207. package/src/web/frontend/components/repos/get-loop-modal.tsx +6 -4
  208. package/src/web/frontend/components/sidebar/brand-row.tsx +30 -0
  209. package/src/web/frontend/components/sidebar/drag.ts +53 -1
  210. package/src/web/frontend/components/sidebar/index.tsx +121 -62
  211. package/src/web/frontend/components/sidebar/model.ts +102 -7
  212. package/src/web/frontend/components/sidebar/ns-add-modal.tsx +81 -0
  213. package/src/web/frontend/components/sidebar/ns-dialogs.tsx +67 -0
  214. package/src/web/frontend/components/sidebar/ns-manage-modal.tsx +56 -0
  215. package/src/web/frontend/components/sidebar/ns-modal.tsx +58 -0
  216. package/src/web/frontend/components/sidebar/ns-observe-modal.tsx +36 -0
  217. package/src/web/frontend/components/sidebar/ns-picker.tsx +134 -0
  218. package/src/web/frontend/components/sidebar/ns-row.tsx +70 -0
  219. package/src/web/frontend/components/sidebar/row-menu.tsx +39 -5
  220. package/src/web/frontend/components/sidebar/search-row.tsx +37 -0
  221. package/src/web/frontend/components/sidebar/use-ns.ts +178 -0
  222. package/src/web/frontend/components/sidebar/use-sidebar-ns.ts +64 -0
  223. package/src/web/frontend/components/task-panel/task-row.tsx +26 -0
  224. package/src/web/frontend/components/tool-acts/bar.tsx +7 -7
  225. package/src/web/frontend/components/tool-acts/modules.ts +7 -4
  226. package/src/web/frontend/components/use-rail-drag.ts +1 -1
  227. package/src/web/frontend/modules/board/ack-nodes.ts +11 -14
  228. package/src/web/frontend/modules/board/ack-rail-pos.ts +1 -1
  229. package/src/web/frontend/modules/board/reopen-text.ts +5 -0
  230. package/src/web/frontend/modules/board/task-search.ts +43 -0
  231. package/src/web/frontend/modules/md/attach-mention.ts +2 -2
  232. package/src/web/frontend/modules/md/doc-store.ts +2 -2
  233. package/src/web/frontend/modules/md/md-blocks.ts +18 -1
  234. package/src/web/frontend/modules/md/md-edit-ops.ts +18 -3
  235. package/src/web/frontend/modules/md/md-render.ts +108 -179
  236. package/src/web/frontend/modules/md/styles/docs.css +89 -0
  237. package/src/web/frontend/modules/md/styles/editor.css +33 -7
  238. package/src/web/frontend/modules/md/styles/panels.css +107 -2
  239. package/src/web/frontend/page/dir/landing.tsx +35 -0
  240. package/src/web/frontend/page/dir/task-actions.ts +2 -2
  241. package/src/web/frontend/page/dir/task-chain.ts +5 -2
  242. package/src/web/frontend/page/dir/task-dock-panel.tsx +19 -28
  243. package/src/web/frontend/page/dir/task-feedback.ts +4 -4
  244. package/src/web/frontend/page/dir/task-utils.ts +19 -3
  245. package/src/web/frontend/page/dir/task.tsx +16 -13
  246. package/src/web/frontend/page/doc/doc-dock.tsx +1 -1
  247. package/src/web/frontend/page/doc/index.tsx +4 -4
  248. package/src/web/frontend/page/group/index.tsx +47 -2
  249. package/src/web/frontend/page/progress/api.ts +5 -0
  250. package/src/web/frontend/page/progress/chain-view.tsx +108 -0
  251. package/src/web/frontend/page/progress/index.tsx +210 -152
  252. package/src/web/frontend/page/repos/index.tsx +0 -11
  253. package/src/web/frontend/page/repos/repo-table.tsx +1 -20
  254. package/src/web/frontend/page/settings/api.ts +0 -4
  255. package/src/web/frontend/page/settings/index.tsx +1 -12
  256. package/src/web/frontend/page/settings/prompt-template-editor.tsx +1 -1
  257. package/src/web/frontend/page/settings/prompt-templates-section.tsx +1 -1
  258. package/src/web/frontend/page/templates/index.tsx +3 -3
  259. package/src/web/frontend/page/templates/manage.tsx +1 -1
  260. package/src/web/frontend/panels.tsx +2 -8
  261. package/src/web/frontend/prefs.ts +4 -3
  262. package/src/web/frontend/registry.ts +0 -1
  263. package/src/web/frontend/routes/index.ts +1 -2
  264. package/src/web/frontend/routes/static.ts +0 -1
  265. package/src/web/frontend/styles-v2/dag.css +17 -2
  266. package/src/web/frontend/styles-v2/dir.css +0 -36
  267. package/src/web/frontend/styles-v2/sidebar.css +92 -1
  268. package/src/web/frontend/types.ts +22 -1
  269. package/src/web/frontend/use-ns-persist.ts +63 -0
  270. package/src/web/frontend/workspace/areas.ts +1 -3
  271. package/src/web/frontend/workspace/panels.ts +1 -1
  272. package/src/web/public/assets/bar-Dy_QDX2h.js +1 -0
  273. package/src/web/public/assets/board-view-Cm8189wG.js +1 -0
  274. package/src/web/public/assets/composer-launch-B7DH53Yf.js +1 -0
  275. package/src/web/public/assets/composer-panel-CWFFEe5a.js +1 -0
  276. package/src/web/public/assets/dag-DjtLPr3j.js +1 -0
  277. package/src/web/public/assets/dir-DPboO_1M.js +3 -0
  278. package/src/web/public/assets/doc-_iteSM2X.js +6 -0
  279. package/src/web/public/assets/get-loop-modal-BW2dD9kv.js +2 -0
  280. package/src/web/public/assets/group-UEOT29Zq.js +1 -0
  281. package/src/web/public/assets/index-BpNXBbNQ.css +1 -0
  282. package/src/web/public/assets/index-BxrcTrww.js +3 -0
  283. package/src/web/public/assets/md-history-Bj790fdn.js +46 -0
  284. package/src/web/public/assets/progress-MPse2JLQ.js +3 -0
  285. package/src/web/public/assets/refs-DiIPoqnJ.js +2 -0
  286. package/src/web/public/assets/{repo-form-modal-Dg3hJWUV.js → repo-form-modal-CNLYR12c.js} +1 -1
  287. package/src/web/public/assets/repos-BGx-yAXd.js +12 -0
  288. package/src/web/public/assets/route-crumb-DX9C4jmQ.js +1 -0
  289. package/src/web/public/assets/settings-buy_qJGW.js +1 -0
  290. package/src/web/public/assets/task-DHlwHURz.js +13 -0
  291. package/src/web/public/assets/task-status-Cjsm0xF7.js +7 -0
  292. package/src/web/public/assets/task-utils-CJfMODCP.js +13 -0
  293. package/src/web/public/assets/templates-DdMaVWok.js +10 -0
  294. package/src/web/public/assets/tool-bar-D5wLBLRl.js +28 -0
  295. package/src/web/public/assets/use-rail-drag-CNOHXWng.js +1 -0
  296. package/src/web/public/index.html +11 -13
  297. package/src/modules/claim/actions/localtask-wait.ts +0 -41
  298. package/src/modules/delivery/index.ts +0 -18
  299. package/src/web/frontend/modules/md/progress-chain.ts +0 -34
  300. package/src/web/frontend/page/overview/api.ts +0 -29
  301. package/src/web/frontend/page/overview/index.tsx +0 -378
  302. package/src/web/frontend/page/settings/sidebar-section.tsx +0 -75
  303. package/src/web/public/assets/bar-Dc5Tq1eE.js +0 -1
  304. package/src/web/public/assets/board-view-BVennxTs.js +0 -1
  305. package/src/web/public/assets/composer-launch-fp2IzGzQ.js +0 -1
  306. package/src/web/public/assets/composer-panel-Dh681iO6.js +0 -1
  307. package/src/web/public/assets/dag-DnaU0I_z.js +0 -1
  308. package/src/web/public/assets/dir-d16q1GLe.js +0 -3
  309. package/src/web/public/assets/doc-DRSKD0Re.js +0 -6
  310. package/src/web/public/assets/frontmatter-CN6IlxWU.js +0 -2
  311. package/src/web/public/assets/group-Dc3ZgW24.js +0 -1
  312. package/src/web/public/assets/index-BIVxGd6t.css +0 -1
  313. package/src/web/public/assets/index-Bg0m8gbJ.js +0 -2
  314. package/src/web/public/assets/md-history-DNtgaIdH.js +0 -39
  315. package/src/web/public/assets/md-parse-C9Vd6ejP.js +0 -2
  316. package/src/web/public/assets/model-CtG2jIDv.js +0 -2
  317. package/src/web/public/assets/overview-C68QpcT9.js +0 -1
  318. package/src/web/public/assets/progress-CEmAFxo9.js +0 -3
  319. package/src/web/public/assets/refs-TzxZYy7T.js +0 -2
  320. package/src/web/public/assets/repos-uNqSR5YB.js +0 -12
  321. package/src/web/public/assets/route-crumb-C4DgkJ8G.js +0 -1
  322. package/src/web/public/assets/settings-BzIllshQ.js +0 -1
  323. package/src/web/public/assets/status-tag-8cLH8hl9.js +0 -1
  324. package/src/web/public/assets/task-DuFOXLPC.js +0 -11
  325. package/src/web/public/assets/task-row-CRjuAfKW.js +0 -1
  326. package/src/web/public/assets/task-utils-DAPxKm4c.js +0 -12
  327. package/src/web/public/assets/templates-DNiGvmdq.js +0 -10
  328. package/src/web/public/assets/use-rail-drag-DxIYcszo.js +0 -1
  329. package/src/web/public/assets/workspace-DojQ3RP4.js +0 -28
  330. /package/src/modules/localtask/{store → infra/store}/topic-adapter.ts +0 -0
  331. /package/src/modules/localtask/{action-flags.ts → ui/action-flags.ts} +0 -0
  332. /package/src/web/frontend/components/md/{use-block-drag.ts → hooks/use-block-drag.ts} +0 -0
  333. /package/src/web/frontend/components/md/{slash-menu.tsx → menus/slash-menu.tsx} +0 -0
  334. /package/src/web/frontend/components/md/{doc-keys.ts → panes/doc-keys.ts} +0 -0
  335. /package/src/web/frontend/components/md/{find-bar.tsx → shell/find-bar.tsx} +0 -0
  336. /package/src/web/frontend/components/md/{status-bar.tsx → shell/status-bar.tsx} +0 -0
  337. /package/src/web/public/assets/{md-history-CLIs9Dr0.css → tool-bar-CLIs9Dr0.css} +0 -0
@@ -1,28 +0,0 @@
1
- import{d as e,f as t,h as n,p as r}from"./popup-DZ2Khv2c.js";var i=r((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&A(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&A(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var ee=new MessageChannel,k=ee.port2;ee.port1.onmessage=D,O=function(){k.postMessage(null)}}else O=function(){_(D,0)};function A(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,A(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),a=r(((e,t)=>{t.exports=i()})),o=r((e=>{var n=t();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`),s=Symbol.for(`react.recoverable`),c=Symbol.for(`react.optimistic_key`);function l(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:r===c?c:``+r,children:e,containerInfo:t,implementation:n}}var u=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.browser=function(e){return{$$typeof:s,_reason:e}},e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return l(e,t,null,n)},e.flushSync=function(e){var t=u.T,n=a.p;try{if(u.T=null,a.p=2,e)return e()}finally{u.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return u.H.useFormState(e,t,n)},e.useFormStatus=function(){return u.H.useHostTransitionStatus()},e.version=`19.3.0`})),s=r(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=o()})),c=r((e=>{var n=a(),r=t(),i=s();function o(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function u(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(l(e)!==e)throw Error(o(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(o(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return f(i),e;if(a===r)return f(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,c=i.child;c;){if(c===n){s=!0,n=i,r=a;break}if(c===r){s=!0,r=i,n=a;break}c=c.sibling}if(!s){for(c=a.child;c;){if(c===n){s=!0,n=a,r=i;break}if(c===r){s=!0,r=a,n=i;break}c=c.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}function h(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&h(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(o(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),ee=Symbol.for(`react.transitional.element`),k=Symbol.for(`react.portal`),A=Symbol.for(`react.fragment`),j=Symbol.for(`react.strict_mode`),te=Symbol.for(`react.profiler`),ne=Symbol.for(`react.consumer`),M=Symbol.for(`react.context`),re=Symbol.for(`react.forward_ref`),ie=Symbol.for(`react.suspense`),ae=Symbol.for(`react.suspense_list`),oe=Symbol.for(`react.memo`),se=Symbol.for(`react.lazy`),ce=Symbol.for(`react.activity`),le=Symbol.for(`react.legacy_hidden`),ue=Symbol.for(`react.memo_cache_sentinel`),N=Symbol.for(`react.view_transition`),P=Symbol.for(`react.recoverable`),de=Symbol.iterator;function fe(e){return typeof e!=`object`||!e?null:(e=de&&e[de]||e[`@@iterator`],typeof e==`function`?e:null)}var pe=Symbol.for(`react.client.reference`);function me(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===pe?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case A:return`Fragment`;case te:return`Profiler`;case j:return`StrictMode`;case ie:return`Suspense`;case ae:return`SuspenseList`;case ce:return`Activity`;case N:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case k:return`Portal`;case M:return e.displayName||`Context`;case ne:return(e._context.displayName||`Context`)+`.Consumer`;case re:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case oe:return t=e.displayName||null,t===null?me(e.type)||`Memo`:t;case se:t=e._payload,e=e._init;try{return me(e(t))}catch{}}return null}var he=Array.isArray,F=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L={pending:!1,data:null,method:null,action:null},R=[],z=-1;function ge(e){return{current:e}}function _e(e){0>z||(e.current=R[z],R[z]=null,z--)}function B(e,t){z++,R[z]=e.current,e.current=t}var ve=ge(null),ye=ge(null),be=ge(null),xe=ge(null);function Se(e,t){switch(B(be,t),B(ye,e),B(ve,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}_e(ve),B(ve,e)}function Ce(){_e(ve),_e(ye),_e(be)}function we(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,B(xe,e)),t=ve.current;var n=dp(t,e.type);t!==n&&(B(ye,e),B(ve,n))}function Te(e){ye.current===e&&(_e(ve),_e(ye)),xe.current===e&&(_e(xe),sh._currentValue=L)}var Ee,De;function Oe(e){if(Ee===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ee=t&&t[1]||``,De=-1<e.stack.indexOf(`
2
- at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
- `+Ee+e+De}var ke=!1;function Ae(e,t){if(!e||ke)return``;ke=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
- `),l=s.split(`
5
- `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
- `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ke=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Oe(n):``}function je(e,t){switch(e.tag){case 26:case 27:case 5:return Oe(e.type);case 16:return Oe(`Lazy`);case 13:return e.child!==t&&t!==null?Oe(`Suspense Fallback`):Oe(`Suspense`);case 19:return Oe(`SuspenseList`);case 0:case 15:return Ae(e.type,!1);case 11:return Ae(e.type.render,!1);case 1:return Ae(e.type,!0);case 31:return Oe(`Activity`);case 30:return Oe(`ViewTransition`);default:return``}}function Me(e){try{var t=``,n=null;do t+=je(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
- Error generating stack: `+e.message+`
8
- `+e.stack}}var Ne=Object.prototype.hasOwnProperty,Pe=n.unstable_scheduleCallback,Fe=n.unstable_cancelCallback,Ie=n.unstable_shouldYield,Le=n.unstable_requestPaint,Re=n.unstable_now,ze=n.unstable_getCurrentPriorityLevel,Be=n.unstable_ImmediatePriority,Ve=n.unstable_UserBlockingPriority,He=n.unstable_NormalPriority,Ue=n.unstable_LowPriority,We=n.unstable_IdlePriority,Ge=n.log,Ke=n.unstable_setDisableYieldValue,qe=null,Je=null;function Ye(e){if(typeof Ge==`function`&&Ke(e),Je&&typeof Je.setStrictMode==`function`)try{Je.setStrictMode(qe,e)}catch{}}var Xe=Math.clz32?Math.clz32:$e,Ze=Math.log,Qe=Math.LN2;function $e(e){return e>>>=0,e===0?32:31-(Ze(e)/Qe|0)|0}var et=256,tt=262144,nt=4194304;function rt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function it(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=rt(n))):i=rt(o):i=rt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=rt(n))):i=rt(o)):i=rt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function at(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ot(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Xe(n),i=1<<r;t|=e[r],n&=~i}return t}function st(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ct(){var e=nt;return nt<<=1,!(nt&62914560)&&(nt=4194304),e}function lt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ut(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function dt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Xe(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ft(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ft(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Xe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function pt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Xe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function mt(e,t){var n=t&-t;return n=n&42?1:ht(n),(n&(e.suspendedLanes|t))===0?n:0}function ht(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function gt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function _t(){var e=I.p;return e===0?(e=window.event,e===void 0?32:Ch(e.type)):e}function vt(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var yt=Math.random().toString(36).slice(2),bt=`__reactFiber$`+yt,xt=`__reactProps$`+yt,St=`__reactContainer$`+yt,Ct=`__reactEvents$`+yt,wt=`__reactListeners$`+yt,Tt=`__reactHandles$`+yt,Et=`__reactResources$`+yt,Dt=`__reactMarker$`+yt,Ot=`__reactLoad$`+yt;function kt(e){delete e[bt],delete e[xt],delete e[wt],delete e[Tt]}function At(e){var t;if(t=e[bt])return t;for(var n=e.parentNode;n;){if(t=n[St]||n[bt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=fm(e);e!==null;){if(n=e[bt])return n;e=fm(e)}return t}e=n,n=e.parentNode}return null}function jt(e){if(e=e[bt]||e[St]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Mt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Nt(e){var t=e[Et];return t||=e[Et]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Pt(e){e[Dt]=!0}function Ft(e){e[Ot]=void 0}var It=new Set,Lt={};function Rt(e,t){zt(e,t),zt(e+`Capture`,t)}function zt(e,t){for(Lt[e]=t,e=0;e<t.length;e++)It.add(t[e])}var Bt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Vt={},Ht={};function Ut(e){return Ne.call(Ht,e)?!0:Ne.call(Vt,e)?!1:Bt.test(e)?Ht[e]=!0:(Vt[e]=!0,!1)}var V=!1;function Wt(){var e=V;return V=!1,e}function Gt(e,t,n){if(Ut(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Kt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function qt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Jt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Yt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Xt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zt(e){if(!e._valueTracker){var t=Yt(e)?`checked`:`value`;e._valueTracker=Xt(e,t,``+e[t])}}function Qt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Yt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var $t=/[\n"\\]/g;function en(e){return e.replace($t,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function tn(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Jt(t)):e.value!==``+Jt(t)&&(e.value=``+Jt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):rn(e,Jt(n)):o===`number`&&e.value==t?rn(e,Jt(e.value)):rn(e,Jt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Jt(s):e.removeAttribute(`name`)}function nn(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Zt(e);return}n=n==null?``:``+Jt(n),t=t==null?n:``+Jt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Zt(e)}function rn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function an(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Jt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function on(e,t,n){if(t!=null&&(t=``+Jt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Jt(n)}function sn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(o(92));if(he(r)){if(1<r.length)throw Error(o(93));r=r[0]}n=r}n??=``,t=n}n=Jt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Zt(e)}function cn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ln=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function un(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||ln.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function dn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(o(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,V=!0);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&(un(e,i,r),V=!0)}else for(var a in t)t.hasOwnProperty(a)&&un(e,a,t[a])}function fn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var pn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),mn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function hn(e){return mn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function gn(){}var _n=null;function vn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yn=null,bn=null;function xn(e){var t=jt(e);if(t&&(e=t.stateNode)){var n=e[xt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(tn(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+en(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[xt]||null;if(!i)throw Error(o(90));tn(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Qt(r)}break a;case`textarea`:on(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&an(e,!!n.multiple,t,!1)}}}var Sn=!1;function Cn(e,t,n){if(Sn)return e(t,n);Sn=!0;try{return e(t)}finally{if(Sn=!1,(yn!==null||bn!==null)&&(zd(),yn&&(t=yn,e=bn,bn=yn=null,xn(t),e)))for(t=0;t<e.length;t++)xn(e[t])}}function wn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[xt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(o(231,t,typeof n));return n}var Tn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),En=!1;if(Tn)try{var Dn={};Object.defineProperty(Dn,"passive",{get:function(){En=!0}}),window.addEventListener(`test`,Dn,Dn),window.removeEventListener(`test`,Dn,Dn)}catch{En=!1}var On=null,kn=null,An=null;function jn(){if(An)return An;var e,t=kn,n=t.length,r,i=`value`in On?On.value:On.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return An=i.slice(e,1<r?1-r:void 0)}function Mn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Nn(){return!0}function Pn(){return!1}function Fn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Nn:Pn,this.isPropagationStopped=Pn,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Nn)},persist:function(){},isPersistent:Nn}),t}var In={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ln=Fn(In),Rn=D({},In,{view:0,detail:0}),zn=Fn(Rn),Bn,Vn,Hn,Un=D({},Rn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:er,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Hn&&(Hn&&e.type===`mousemove`?(Bn=e.screenX-Hn.screenX,Vn=e.screenY-Hn.screenY):Vn=Bn=0,Hn=e),Bn)},movementY:function(e){return`movementY`in e?e.movementY:Vn}}),Wn=Fn(Un),Gn=Fn(D({},Un,{dataTransfer:0})),Kn=Fn(D({},Rn,{relatedTarget:0})),qn=Fn(D({},In,{animationName:0,elapsedTime:0,pseudoElement:0})),Jn=Fn(D({},In,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Yn=Fn(D({},In,{data:0})),Xn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Zn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Qn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function $n(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Qn[e])?!!t[e]:!1}function er(){return $n}var tr=Fn(D({},Rn,{key:function(e){if(e.key){var t=Xn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Mn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Zn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:er,charCode:function(e){return e.type===`keypress`?Mn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Mn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),nr=Fn(D({},Un,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),rr=Fn(D({},In,{submitter:0})),ir=Fn(D({},Rn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:er})),ar=Fn(D({},In,{propertyName:0,elapsedTime:0,pseudoElement:0})),or=Fn(D({},Un,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),sr=Fn(D({},In,{newState:0,oldState:0,source:0})),cr=[9,13,27,32],lr=Tn&&`CompositionEvent`in window,ur=null;Tn&&`documentMode`in document&&(ur=document.documentMode);var dr=Tn&&`TextEvent`in window&&!ur,fr=Tn&&(!lr||ur&&8<ur&&11>=ur),pr=` `,mr=!1;function hr(e,t){switch(e){case`keyup`:return cr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function gr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var _r=!1;function vr(e,t){switch(e){case`compositionend`:return gr(t);case`keypress`:return t.which===32?(mr=!0,pr):null;case`textInput`:return e=t.data,e===pr&&mr?null:e;default:return null}}function yr(e,t){if(_r)return e===`compositionend`||!lr&&hr(e,t)?(e=jn(),An=kn=On=null,_r=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return fr&&t.locale!==`ko`?null:t.data;default:return null}}var br={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function xr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!br[e.type]:t===`textarea`}function Sr(e,t,n,r){yn?bn?bn.push(r):bn=[r]:yn=r,t=Jf(t,`onChange`),0<t.length&&(n=new Ln(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Cr=null,wr=null;function Tr(e){Vf(e,0)}function Er(e){if(Qt(Mt(e)))return e}function Dr(e,t){if(e===`change`)return t}var Or=!1;if(Tn){var kr;if(Tn){var Ar=`oninput`in document;if(!Ar){var jr=document.createElement(`div`);jr.setAttribute(`oninput`,`return;`),Ar=typeof jr.oninput==`function`}kr=Ar}else kr=!1;Or=kr&&(!document.documentMode||9<document.documentMode)}function Mr(){Cr&&(Cr.detachEvent(`onpropertychange`,Nr),wr=Cr=null)}function Nr(e){if(e.propertyName===`value`&&Er(wr)){var t=[];Sr(t,wr,e,vn(e)),Cn(Tr,t)}}function Pr(e,t,n){e===`focusin`?(Mr(),Cr=t,wr=n,Cr.attachEvent(`onpropertychange`,Nr)):e===`focusout`&&Mr()}function Fr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Er(wr)}function Ir(e,t){if(e===`click`)return Er(t)}function Lr(e,t){if(e===`input`||e===`change`)return Er(t)}function Rr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var zr=typeof Object.is==`function`?Object.is:Rr;function Br(e,t){if(zr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ne.call(t,i)||!zr(e[i],t[i]))return!1}return!0}function Vr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Hr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ur(e,t){var n=Hr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Hr(n)}}function Wr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vr(e.document)}return t}function Kr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var qr=Tn&&`documentMode`in document&&11>=document.documentMode,Jr=null,Yr=null,Xr=null,Zr=!1;function Qr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Zr||Jr==null||Jr!==Vr(r)||(r=Jr,`selectionStart`in r&&Kr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Xr&&Br(Xr,r)||(Xr=r,r=Jf(Yr,`onSelect`),0<r.length&&(t=new Ln(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Jr)))}function $r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ei={animationend:$r(`Animation`,`AnimationEnd`),animationiteration:$r(`Animation`,`AnimationIteration`),animationstart:$r(`Animation`,`AnimationStart`),transitionrun:$r(`Transition`,`TransitionRun`),transitionstart:$r(`Transition`,`TransitionStart`),transitioncancel:$r(`Transition`,`TransitionCancel`),transitionend:$r(`Transition`,`TransitionEnd`)},ti={},ni={};Tn&&(ni=document.createElement(`div`).style,`AnimationEvent`in window||(delete ei.animationend.animation,delete ei.animationiteration.animation,delete ei.animationstart.animation),`TransitionEvent`in window||delete ei.transitionend.transition);function ri(e){if(ti[e])return ti[e];if(!ei[e])return e;var t=ei[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ni)return ti[e]=t[n];return e}var ii=ri(`animationend`),ai=ri(`animationiteration`),oi=ri(`animationstart`),si=ri(`transitionrun`),ci=ri(`transitionstart`),li=ri(`transitioncancel`),ui=ri(`transitionend`),di=new Map,fi=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);fi.push(`scrollEnd`);function pi(e,t){di.set(e,t),Rt(t,[e])}var mi=0;function hi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=bd.identifierPrefix;var n=mi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function gi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Od;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function _i(e,t){return e=gi(e),t=gi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var vi=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},yi=[],bi=0,xi=0;function Si(){for(var e=bi,t=xi=bi=0;t<e;){var n=yi[t];yi[t++]=null;var r=yi[t];yi[t++]=null;var i=yi[t];yi[t++]=null;var a=yi[t];if(yi[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Ei(n,i,a)}}function Ci(e,t,n,r){yi[bi++]=e,yi[bi++]=t,yi[bi++]=n,yi[bi++]=r,xi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function wi(e,t,n,r){return Ci(e,t,n,r),Di(e)}function Ti(e,t){return Ci(e,null,null,t),Di(e)}function Ei(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Xe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Di(e){if(50<kd)throw kd=0,Ad=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Oi={};function ki(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ai(e,t,n,r){return new ki(e,t,n,r)}function ji(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Mi(e,t){var n=e.alternate;return n===null?(n=Ai(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ni(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Pi(e,t,n,r,i,a){var s=0;if(r=e,typeof r==`function`)ji(r)&&(s=1);else if(typeof r==`string`)s=qm(e,n,ve.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ce:return e=Ai(31,n,t,i),e.elementType=ce,e.lanes=a,e;case A:return Fi(n.children,i,a,t);case j:s=8,i|=24;break;case te:return e=Ai(12,n,t,i|2),e.elementType=te,e.lanes=a,e;case ie:return e=Ai(13,n,t,i),e.elementType=ie,e.lanes=a,e;case ae:return e=Ai(19,n,t,i),e.elementType=ae,e.lanes=a,e;case le:case N:return e=i|32,e=Ai(30,n,t,e),e.elementType=N,e.lanes=a,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case M:s=10;break a;case ne:s=9;break a;case re:s=11;break a;case oe:s=14;break a;case se:s=16,r=null;break a}s=29,n=Error(o(130,e===null?`null`:typeof e,``)),r=null}return t=Ai(s,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function Fi(e,t,n,r){return e=Ai(7,e,r,t),e.lanes=n,e}function Ii(e,t,n){return e=Ai(6,e,null,t),e.lanes=n,e}function Li(e){var t=Ai(18,null,null,0);return t.stateNode=e,t}function Ri(e,t,n){return t=Ai(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var zi=new WeakMap;function Bi(e,t){if(typeof e==`object`&&e){var n=zi.get(e);return n===void 0?(t={value:e,source:t,stack:Me(t)},zi.set(e,t),t):n}return{value:e,source:t,stack:Me(t)}}var Vi=[],Hi=0,Ui=null,Wi=0,Gi=[],Ki=0,qi=null,Ji=1,Yi=``;function Xi(e,t){Vi[Hi++]=Wi,Vi[Hi++]=Ui,Ui=e,Wi=t}function Zi(e,t,n){Gi[Ki++]=Ji,Gi[Ki++]=Yi,Gi[Ki++]=qi,qi=e;var r=Ji;e=Yi;var i=32-Xe(r)-1;r&=~(1<<i),n+=1;var a=32-Xe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ji=1<<32-Xe(t)+i|n<<i|r,Yi=a+e}else Ji=1<<a|n<<i|r,Yi=e}function Qi(e){e.return!==null&&(Xi(e,1),Zi(e,1,0))}function $i(e){for(;e===Ui;)Ui=Vi[--Hi],Vi[Hi]=null,Wi=Vi[--Hi],Vi[Hi]=null;for(;e===qi;)qi=Gi[--Ki],Gi[Ki]=null,Yi=Gi[--Ki],Gi[Ki]=null,Ji=Gi[--Ki],Gi[Ki]=null}function ea(e,t){Gi[Ki++]=Ji,Gi[Ki++]=Yi,Gi[Ki++]=qi,Ji=t.id,Yi=t.overflow,qi=e}var ta=null,na=null,H=!1,ra=null,ia=!1,aa=Error(o(519));function oa(e){throw fa(Bi(Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),aa}function sa(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[bt]=e,t[xt]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<zf.length;n++)Q(zf[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),nn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),sn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||ep(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=gn),t=!0):t=!1,t||oa(e,!0)}function ca(e){for(ta=e.return;ta;)switch(ta.tag){case 5:case 31:case 13:ia=!1;return;case 27:case 3:ia=!0;return;default:ta=ta.return}}function la(e){if(e!==ta)return!1;if(!H)return ca(e),H=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||pp(e.type,e.memoizedProps)),n=!n),n&&na&&oa(e),ca(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(o(317));na=dm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(o(317));na=dm(e)}else t===27?(t=na,Sp(e.type)?(e=um,um=null,na=e):na=t):na=ta?lm(e.stateNode.nextSibling):null;return!0}function ua(){na=ta=null,H=!1}function da(){var e=ra;return e!==null&&(fd===null?fd=e:fd.push.apply(fd,e),ra=null),e}function fa(e){ra===null?ra=[e]:ra.push(e)}var pa=ge(null),ma=null,ha=null;function ga(e,t,n){B(pa,t._currentValue),t._currentValue=n}function _a(e){e._currentValue=pa.current,_e(pa)}function va(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ya(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var s=i.child;a=a.firstContext;a:for(;a!==null;){var c=a;a=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),va(a.return,n,e),r||(s=null);break a}a=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(o(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),va(s,n,e),s=null}else i.tag===13&&i.memoizedState!==null&&i.memoizedState.dehydrated===null?(i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),va(i.return,n,e),s=i.child,s=s===null?null:s.sibling):s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function ba(e,t,n,r){e=null;for(var i=t,a=!1;i!==null;){if(!a){if(i.flags&524288)a=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(o(387));if(s=s.memoizedProps,s!==null){var c=i.type;zr(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===xe.current){if(s=i.alternate,s===null)throw Error(o(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[sh]:e.push(sh))}i=i.return}return e!==null&&ya(t,e,n,r),t.flags|=262144,e!==null}function xa(e){for(e=e.firstContext;e!==null;){if(!zr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Sa(e){ma=e,ha=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ca(e){return Ta(ma,e)}function wa(e,t){return ma===null&&Sa(e),Ta(e,t)}function Ta(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ha===null){if(e===null)throw Error(o(308));ha=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ha=ha.next=t;return n}var Ea=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Da=n.unstable_scheduleCallback,Oa=n.unstable_NormalPriority,ka={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Aa(){return{controller:new Ea,data:new Map,refCount:0}}function ja(e){e.refCount--,e.refCount===0&&Da(Oa,function(){e.controller.abort()})}function Ma(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Na=null;function Pa(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Fa=null,Ia=0,La=0,Ra=null;function za(e,t){if(Fa===null){var n=Fa=[];Ia=0,La=Pf(),Ra={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ia++,t.then(Ba,Ba),t}function Ba(){if(--Ia===0&&(Na=null,Fa!==null)){Ra!==null&&(Ra.status=`fulfilled`);var e=Fa;Fa=null,La=0,Ra=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Va(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ha=F.S;F.S=function(e,t){if(hd=Re(),typeof t==`object`&&t&&typeof t.then==`function`&&za(e,t),Na!==null)for(var n=bf;n!==null;)Ma(n,Na),n=n.next;if(n=e.types,n!==null){for(var r=bf;r!==null;)Ma(r,n),r=r.next;if(La!==0){r=Na,r===null&&(r=Na=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ha!==null&&Ha(e,t)};var Ua=ge(null);function Wa(){var e=Ua.current;return e===null?q.pooledCache:e}function Ga(e,t){t===null?B(Ua,Ua.current):B(Ua,t.pool)}function Ka(){var e=Wa();return e===null?null:{parent:ka._currentValue,pool:e}}var qa=Error(o(460)),Ja=Error(o(474)),Ya=Error(o(542)),Xa={then:function(){}};function Za(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Qa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(gn,gn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,no(e),e===void 0&&!(`reason`in t)?Error(o(600)):e;default:if(typeof t.status==`string`)t.then(gn,gn);else{if(e=q,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,no(e),e}throw eo=t,qa}}function $a(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(eo=e,qa):e}}var eo=null;function to(){if(eo===null)throw Error(o(459));var e=eo;return eo=null,e}function no(e){if(e===qa||e===Ya)throw Error(o(483))}var ro=null,io=0;function ao(e){var t=io;return io+=1,ro===null&&(ro=[]),Qa(ro,e,t)}function oo(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function so(e,t){throw t.$$typeof===O?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function co(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=Mi(e,t),e.index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Ii(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===A?(e=d(e,t,n.props.children,r,n.key),oo(e,n),e):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===se&&$a(a)===t.type)?(t=i(t,n.props),oo(t,n),t.return=e,t):(t=Pi(n.type,n.key,n.props,null,e.mode,r),oo(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Ri(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=Fi(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Ii(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case ee:return n=Pi(t.type,t.key,t.props,null,e.mode,n),oo(n,t),n.return=e,n;case k:return t=Ri(t,e.mode,n),t.return=e,t;case se:return t=$a(t),f(e,t,n)}if(he(t)||fe(t))return t=Fi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ao(t),n);if(t.$$typeof===M)return f(e,wa(e,t),n);so(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case ee:return n.key===i?l(e,t,n,r):null;case k:return n.key===i?u(e,t,n,r):null;case se:return n=$a(n),p(e,t,n,r)}if(he(n)||fe(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ao(n),r);if(n.$$typeof===M)return p(e,t,wa(e,n),r);so(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case ee:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case k:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case se:return r=$a(r),m(e,t,n,r,i)}if(he(r)||fe(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ao(r),i);if(r.$$typeof===M)return m(e,t,n,wa(t,r),i);so(t,r)}return null}function h(i,o,s,c){for(var l=null,u=null,d=o,h=o=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),o=a(_,o,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),H&&Xi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(o=a(d,o,h),u===null?l=d:u.sibling=d,u=d);return H&&Xi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),o=a(g,o,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),H&&Xi(i,h),l}function g(i,s,c,l){if(c==null)throw Error(o(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=a(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),H&&Xi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=a(v,s,g),d===null?u=v:d.sibling=v,d=v);return H&&Xi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=a(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),H&&Xi(i,g),u}function _(e,r,a,c){if(typeof a==`object`&&a&&a.type===A&&a.key===null&&a.props.ref===void 0&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case ee:a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===A){if(r.tag===7){n(e,r.sibling),c=i(r,a.props.children),oo(c,a),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===se&&$a(l)===r.type){n(e,r.sibling),c=i(r,a.props),oo(c,a),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}a.type===A?(c=Fi(a.props.children,e.mode,c,a.key),oo(c,a),c.return=e,e=c):(c=Pi(a.type,a.key,a.props,null,e.mode,c),oo(c,a),c.return=e,e=c)}return s(e);case k:a:{for(l=a.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),c=i(r,a.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Ri(a,e.mode,c),c.return=e,e=c}return s(e);case se:return a=$a(a),_(e,r,a,c)}if(he(a))return h(e,r,a,c);if(fe(a)){if(l=fe(a),typeof l!=`function`)throw Error(o(150));return a=l.call(a),g(e,r,a,c)}if(typeof a.then==`function`)return _(e,r,ao(a),c);if(a.$$typeof===M)return _(e,r,wa(e,a),c);so(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,a),c.return=e,e=c):(n(e,r),c=Ii(a,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{io=0;var i=_(e,t,n,r);return ro=null,i}catch(t){if(t===qa||t===Ya)throw t;var a=Ai(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var lo=co(!0),uo=co(!1),fo=!1;function po(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ho(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function go(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Di(e),Ei(e,null,n),t}return Ci(e,r,t,n),Di(e)}function _o(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pt(e,n)}}function vo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var yo=!1;function bo(){if(yo){var e=Ra;if(e!==null)throw e}}function xo(e,t,n,r){yo=!1;var i=e.updateQueue;fo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===La&&(yo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:fo=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),od|=o,e.lanes=o,e.memoizedState=d}}function So(e,t){if(typeof e!=`function`)throw Error(o(191,e));e.call(t)}function Co(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)So(n[e],t)}var wo=ge(null),To=ge(0);function Eo(e,t){e=id,B(To,e),B(wo,t),id=e|t.baseLanes}function Do(){B(To,id),B(wo,wo.current)}function Oo(){id=To.current,_e(wo),_e(To)}var ko=ge(null),Ao=null;function jo(e){var t=e.alternate;B(Io,Io.current&1),B(ko,e),Ao===null&&(t===null||wo.current!==null||t.memoizedState!==null)&&(Ao=e)}function Mo(e){B(Io,Io.current),B(ko,e),Ao===null&&(Ao=e)}function No(e){e.tag===22?(B(Io,Io.current),B(ko,e),Ao===null&&(Ao=e)):Po()}function Po(){B(Io,Io.current),B(ko,ko.current)}function Fo(e){_e(ko),Ao===e&&(Ao=null),_e(Io)}var Io=ge(0);function Lo(e,t){B(ko,ko.current),B(Io,t)}function Ro(e){_e(Io),_e(ko),Ao===e&&(Ao=null)}function zo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||om(n)||sm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Bo=0,U=null,W=null,Vo=null,Ho=!1,Uo=!1,Wo=!1,Go=0,Ko=0,qo=null,Jo=0;function Yo(){throw Error(o(321))}function Xo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!zr(e[n],t[n]))return!1;return!0}function Zo(e,t,n,r,i,a){return Bo=a,U=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?mc:hc,Wo=!1,a=n(r,i),Wo=!1,Uo&&(a=$o(t,n,r,i)),Qo(e),a}function Qo(e){F.H=pc;var t=W!==null&&W.next!==null;if(Bo=0,Vo=W=U=null,Ho=!1,Ko=0,qo=null,t)throw Error(o(300));e===null||Mc||(e=e.dependencies,e!==null&&xa(e)&&(Mc=!0))}function $o(e,t,n,r){U=e;var i=0;do{if(Uo&&(qo=null),Ko=0,Uo=!1,25<=i)throw Error(o(301));if(i+=1,Vo=W=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}F.H=gc,a=t(n,r)}while(Uo);return a}function es(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?ss(t):t,e=e.useState()[0],(W===null?null:W.memoizedState)!==e&&(U.flags|=1024),t}function ts(){var e=Go!==0;return Go=0,e}function ns(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function rs(e){if(Ho){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ho=!1}Bo=0,Vo=W=U=null,Uo=!1,Ko=Go=0,qo=null}function is(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vo===null?U.memoizedState=Vo=e:Vo=Vo.next=e,Vo}function as(){if(W===null){var e=U.alternate;e=e===null?null:e.memoizedState}else e=W.next;var t=Vo===null?U.memoizedState:Vo.next;if(t!==null)Vo=t,W=e;else{if(e===null)throw U.alternate===null?Error(o(467)):Error(o(310));W=e,e={memoizedState:W.memoizedState,baseState:W.baseState,baseQueue:W.baseQueue,queue:W.queue,next:null},Vo===null?U.memoizedState=Vo=e:Vo=Vo.next=e}return Vo}function os(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ss(e){var t=Ko;return Ko+=1,qo===null&&(qo=[]),e=Qa(qo,e,t),t=U,(Vo===null?t.memoizedState:Vo.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?mc:hc),e}function cs(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ss(e);if(e.$$typeof===P)return;if(e.$$typeof===M)return Ca(e)}throw Error(o(438,String(e)))}function ls(e){var t=null,n=U.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=U.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=os(),U.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ue;return t.index++,n}function us(e,t){return typeof t==`function`?t(e):t}function ds(e){return fs(as(),W,e)}function fs(e,t,n){var r=e.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=n;var i=e.baseQueue,a=r.pending;if(a!==null){if(i!==null){var s=i.next;i.next=a.next,a.next=s}t.baseQueue=i=a,r.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Bo&f)===f:(Y&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===La&&(d=!0);else if((Bo&p)===p){u=u.next,p===La&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=a):l=l.next=f,U.lanes|=p,od|=p;f=u.action,Wo&&n(a,f),a=u.hasEagerState?u.eagerState:n(a,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=a):l=l.next=p,U.lanes|=f,od|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=a:l.next=c,!zr(a,e.memoizedState)&&(Mc=!0,d&&(n=Ra,n!==null)))throw n;e.memoizedState=a,e.baseState=s,e.baseQueue=l,r.lastRenderedState=a}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ps(e){var t=as(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do a=e(a,s.action),s=s.next;while(s!==i);zr(a,t.memoizedState)||(Mc=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function ms(e,t,n){var r=U,i=as(),a=H;if(a){if(n===void 0)throw Error(o(407));n=n()}else n=t();var s=!zr((W||i).memoizedState,n);if(s&&(i.memoizedState=n,Mc=!0),i=i.queue,zs(_s.bind(null,r,i,e),[e]),e=i.getSnapshot!==t||s||Vo!==null&&!!(Vo.memoizedState.tag&1),Ps(e?9:8,{destroy:void 0},gs.bind(null,r,i,n,t),null),e){if(r.flags|=2048,q===null)throw Error(o(349));a||Bo&127||hs(r,t,n)}return n}function hs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=U.updateQueue,t===null?(t=os(),U.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function gs(e,t,n,r){t.value=n,t.getSnapshot=r,vs(t)&&ys(e)}function _s(e,t,n){return n(function(){vs(t)&&ys(e)})}function vs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!zr(e,n)}catch{return!0}}function ys(e){var t=Ti(e,2);t!==null&&Pd(t,e,2)}function bs(e){var t=is();if(typeof e==`function`){var n=e;if(e=n(),Wo){Ye(!0);try{n()}finally{Ye(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:us,lastRenderedState:e},t}function xs(e,t,n,r){return e.baseState=n,fs(e,W,typeof r==`function`?r:us)}function Ss(e,t,n,r,i){if(uc(e))throw Error(o(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};F.T===null?a.isTransition=!1:n(!0),r(a),n=t.pending,n===null?(a.next=t.pending=a,Cs(t,a)):(a.next=n.next,t.pending=n.next=a)}}function Cs(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=F.T,o={};o.types=a===null?null:a.types,F.T=o;try{var s=n(i,r),c=F.S;c!==null&&c(o,s),ws(e,t,s)}catch(n){Es(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),ws(e,t,a)}catch(n){Es(e,t,n)}}function ws(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ts(e,t,n)},function(n){return Es(e,t,n)}):Ts(e,t,n)}function Ts(e,t,n){t.status=`fulfilled`,t.value=n,Ds(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Cs(e,n)))}function Es(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Ds(t),t=t.next;while(t!==r)}e.action=null}function Ds(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Os(e,t){return t}function ks(e,t){if(H){var n=q.formState;if(n!==null){a:{var r=U;if(H){if(na){b:{for(var i=na,a=ia;i.nodeType!==8;){if(!a){i=null;break b}if(i=lm(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){na=lm(i.nextSibling),r=i.data===`F!`;break a}}oa(r)}r=!1}r&&(t=n[0])}}return n=is(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Os,lastRenderedState:t},n.queue=r,n=sc.bind(null,U,r),r.dispatch=n,r=bs(!1),a=lc.bind(null,U,!1,r.queue),r=is(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Ss.bind(null,U,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function As(e){return js(as(),W,e)}function js(e,t,n){if(t=fs(e,t,Os)[0],e=ds(us)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ss(t)}catch(e){throw e===qa?Ya:e}else r=t;t=as();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(U.flags|=2048,Ps(9,{destroy:void 0},Ms.bind(null,i,n),null)),[r,a,e]}function Ms(e,t){e.action=t}function Ns(e){var t=as(),n=W;if(n!==null)return js(t,n,e);as(),t=t.memoizedState,n=as();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ps(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=U.updateQueue,t===null&&(t=os(),U.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Fs(){return as().memoizedState}function Is(e,t,n,r){var i=is();U.flags|=e,i.memoizedState=Ps(1|t,{destroy:void 0},n,r===void 0?null:r)}function Ls(e,t,n,r){var i=as();r=r===void 0?null:r;var a=i.memoizedState.inst;W!==null&&r!==null&&Xo(r,W.memoizedState.deps)?i.memoizedState=Ps(t,a,n,r):(U.flags|=e,i.memoizedState=Ps(1|t,a,n,r))}function Rs(e,t){Is(8390656,8,e,t)}function zs(e,t){Ls(2048,8,e,t)}function Bs(e){U.flags|=4;var t=U.updateQueue;if(t===null)t=os(),U.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Vs(e){var t=as().memoizedState;return Bs({ref:t,nextImpl:e}),function(){if(K&2)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Hs(e,t){return Ls(4,2,e,t)}function Us(e,t){return Ls(4,4,e,t)}function Ws(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Gs(e,t,n){n=n==null?null:n.concat([e]),Ls(4,4,Ws.bind(null,t,e),n)}function Ks(){}function qs(e,t){var n=as();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Xo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Js(e,t){var n=as();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Xo(t,r[1]))return r[0];if(r=e(),Wo){Ye(!0);try{e()}finally{Ye(!1)}}return n.memoizedState=[r,t],r}function Ys(e,t,n){return n===void 0||Bo&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=Md(),U.lanes|=e,od|=e,n)}function Xs(e,t,n,r){return zr(n,t)?n:wo.current===null?!(Bo&106)||Bo&1073741824&&!(Y&261930)?(Mc=!0,e.memoizedState=n):(e=Md(),U.lanes|=e,od|=e,t):(e=Ys(e,n,r),zr(e,t)||(Mc=!0),e)}function Zs(e,t,n,r,i){var a=I.p;I.p=a!==0&&8>a?a:8;var o=F.T,s={};s.types=o===null?null:o.types,F.T=s,lc(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?cc(e,t,Va(c,r),jd(e)):cc(e,t,r,jd(e))}catch(n){cc(e,t,{then:function(){},status:`rejected`,reason:n},jd())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function Qs(){}function $s(e,t,n,r){if(e.tag!==5)throw Error(o(476));var i=ec(e).queue;Zs(e,i,t,L,n===null?Qs:function(){return tc(e),n(r)})}function ec(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:L,baseState:L,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:us,lastRenderedState:L},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:us,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function tc(e){var t=ec(e);t.next===null&&(t=e.alternate.memoizedState),cc(e,t.next.queue,{},jd())}function nc(){return Ca(sh)}function rc(){return as().memoizedState}function ic(){return as().memoizedState}function ac(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=jd();e=ho(n);var r=go(t,e,n);r!==null&&(Pd(r,t,n),_o(r,t,n)),t={cache:Aa()},e.payload=t;return}t=t.return}}function oc(e,t,n){var r=jd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},uc(e)?dc(t,n):(n=wi(e,t,n,r),n!==null&&(Pd(n,e,r),fc(n,t,r)))}function sc(e,t,n){cc(e,t,n,jd())}function cc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(uc(e))dc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,zr(s,o))return Ci(e,t,i,0),q===null&&Si(),!1}catch{}if(n=wi(e,t,i,r),n!==null)return Pd(n,e,r),fc(n,t,r),!0}return!1}function lc(e,t,n,r){if(r={lane:2,revertLane:Pf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},uc(e)){if(t)throw Error(o(479))}else t=wi(e,n,r,2),t!==null&&Pd(t,e,2)}function uc(e){var t=e.alternate;return e===U||t!==null&&t===U}function dc(e,t){Uo=Ho=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function fc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pt(e,n)}}var pc={readContext:Ca,use:cs,useCallback:Yo,useContext:Yo,useEffect:Yo,useImperativeHandle:Yo,useLayoutEffect:Yo,useInsertionEffect:Yo,useMemo:Yo,useReducer:Yo,useRef:Yo,useState:Yo,useDebugValue:Yo,useDeferredValue:Yo,useTransition:Yo,useSyncExternalStore:Yo,useId:Yo,useHostTransitionStatus:Yo,useFormState:Yo,useActionState:Yo,useOptimistic:Yo,useMemoCache:Yo,useCacheRefresh:Yo,useEffectEvent:Yo},mc={readContext:Ca,use:cs,useCallback:function(e,t){return is().memoizedState=[e,t===void 0?null:t],e},useContext:Ca,useEffect:Rs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Is(4194308,4,Ws.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Is(4194308,4,e,t)},useInsertionEffect:function(e,t){Is(4,2,e,t)},useMemo:function(e,t){var n=is();t=t===void 0?null:t;var r=e();if(Wo){Ye(!0);try{e()}finally{Ye(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=is();if(n!==void 0){var i=n(t);if(Wo){Ye(!0);try{n(t)}finally{Ye(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=oc.bind(null,U,e),[r.memoizedState,e]},useRef:function(e){var t=is();return e={current:e},t.memoizedState=e},useState:function(e){e=bs(e);var t=e.queue,n=sc.bind(null,U,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ks,useDeferredValue:function(e,t){return Ys(is(),e,t)},useTransition:function(){var e=bs(!1);return e=Zs.bind(null,U,e.queue,!0,!1),is().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=U,i=is();if(H){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),q===null)throw Error(o(349));Y&127||hs(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Rs(_s.bind(null,r,a,e),[e]),r.flags|=2048,Ps(9,{destroy:void 0},gs.bind(null,r,a,n,t),null),n},useId:function(){var e=is(),t=q.identifierPrefix;if(H){var n=Yi,r=Ji;n=(r&~(1<<32-Xe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Go++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Jo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:nc,useFormState:ks,useActionState:ks,useOptimistic:function(e){var t=is();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=lc.bind(null,U,!0,n),n.dispatch=t,[e,t]},useMemoCache:ls,useCacheRefresh:function(){return is().memoizedState=ac.bind(null,U)},useEffectEvent:function(e){var t=is(),n={impl:e};return t.memoizedState=n,function(){if(K&2)throw Error(o(440));return n.impl.apply(void 0,arguments)}}},hc={readContext:Ca,use:cs,useCallback:qs,useContext:Ca,useEffect:zs,useImperativeHandle:Gs,useInsertionEffect:Hs,useLayoutEffect:Us,useMemo:Js,useReducer:ds,useRef:Fs,useState:function(){return ds(us)},useDebugValue:Ks,useDeferredValue:function(e,t){return Xs(as(),W.memoizedState,e,t)},useTransition:function(){var e=ds(us)[0],t=as().memoizedState;return[typeof e==`boolean`?e:ss(e),t]},useSyncExternalStore:ms,useId:rc,useHostTransitionStatus:nc,useFormState:As,useActionState:As,useOptimistic:function(e,t){return xs(as(),W,e,t)},useMemoCache:ls,useCacheRefresh:ic,useEffectEvent:Vs},gc={readContext:Ca,use:cs,useCallback:qs,useContext:Ca,useEffect:zs,useImperativeHandle:Gs,useInsertionEffect:Hs,useLayoutEffect:Us,useMemo:Js,useReducer:ps,useRef:Fs,useState:function(){return ps(us)},useDebugValue:Ks,useDeferredValue:function(e,t){var n=as();return W===null?Ys(n,e,t):Xs(n,W.memoizedState,e,t)},useTransition:function(){var e=ps(us)[0],t=as().memoizedState;return[typeof e==`boolean`?e:ss(e),t]},useSyncExternalStore:ms,useId:rc,useHostTransitionStatus:nc,useFormState:Ns,useActionState:Ns,useOptimistic:function(e,t){var n=as();return W===null?(n.baseState=e,[e,n.queue.dispatch]):xs(n,W,e,t)},useMemoCache:ls,useCacheRefresh:ic,useEffectEvent:Vs};function _c(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var vc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=jd(),i=ho(r);i.payload=t,n!=null&&(i.callback=n),t=go(e,i,r),t!==null&&(Pd(t,e,r),_o(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=jd(),i=ho(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=go(e,i,r),t!==null&&(Pd(t,e,r),_o(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=jd(),r=ho(n);r.tag=2,t!=null&&(r.callback=t),t=go(e,r,n),t!==null&&(Pd(t,e,n),_o(t,e,n))}};function yc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Br(n,r)||!Br(i,a):!0}function bc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&vc.enqueueReplaceState(t,t.state,null)}function xc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Sc(e){vi(e)}function Cc(e){console.error(e)}function wc(e){vi(e)}function Tc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ec(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Dc(e,t,n){return n=ho(n),n.tag=3,n.payload={element:null},n.callback=function(){Tc(e,t)},n}function Oc(e){return e=ho(e),e.tag=3,e}function kc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Ec(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ec(t,n,r),typeof i!=`function`&&(vd===null?vd=new Set([this]):vd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Ac(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ba(t,n,i,!0),n=ko.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Ao===null?Kd():n.alternate===null&&ad===0&&(ad=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Xa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),mf(e,r,i)),!1;case 22:return n.flags|=65536,r===Xa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),mf(e,r,i)),!1}throw Error(o(435,n.tag))}return mf(e,r,i),Kd(),!1}if(H)return t=ko.current,t===null?(r!==aa&&(t=Error(o(423),{cause:r}),fa(Bi(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=Bi(r,n),i=Dc(e.stateNode,r,i),vo(e,i),ad!==4&&(ad=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==aa&&(e=Error(o(422),{cause:r}),fa(Bi(e,n)))),!1;var a=Error(o(520),{cause:r});if(a=Bi(a,n),dd===null?dd=[a]:dd.push(a),ad!==4&&(ad=2),t===null)return!0;r=Bi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Dc(n.stateNode,r,e),vo(n,e),!1;case 1:if(t=n.type,a=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||a!==null&&typeof a.componentDidCatch==`function`&&(vd===null||!vd.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Oc(i),kc(i,e,n,r),vo(n,i),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var jc=Error(o(461)),Mc=!1;function Nc(e,t,n,r){t.child=e===null?uo(t,null,n,r):lo(t,e.child,n,r)}function Pc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Sa(t),r=Zo(e,t,n,o,a,i),s=ts(),e!==null&&!Mc?(ns(e,t,i),cl(e,t,i)):(H&&s&&Qi(t),t.flags|=1,Nc(e,t,r,i),t.child)}function Fc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ji(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Ic(e,t,a,r,i)):(e=Pi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!ll(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Br:n,n(o,r)&&e.ref===t.ref)return cl(e,t,i)}return t.flags|=1,e=Mi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Ic(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Br(a,r)&&e.ref===t.ref){if(Mc=!1,t.pendingProps=r=a,ll(e,i))e.flags&131072&&(Mc=!0);else return t.lanes=e.lanes,cl(e,t,i)}}return Wc(e,t,n,r,i)}function Lc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return zc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ga(t,a===null?null:a.cachePool),a===null?Do():Eo(t,a),No(t);else return r=t.lanes=536870912,zc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ga(t,null),Do(),Po()):(Ga(t,a.cachePool),Eo(t,a),Po(),t.memoizedState=null);return Nc(e,t,i,n),t.child}function Rc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function zc(e,t,n,r,i){var a=Wa();return a=a===null?null:{parent:ka._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ga(t,null),Do(),No(t),e!==null&&ba(e,t,r,!0),t.childLanes=i,null}function Bc(e,t){return t=$c({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Vc(e,t,n){return lo(t,e.child,null,n),e=Bc(t,t.pendingProps),e.flags|=2,Fo(t),t.memoizedState=null,e}function Hc(e,t,n){var r=t.pendingProps,i=!!(t.flags&128);if(t.flags&=-129,e===null){if(H){if(r.mode===`hidden`)return e=Bc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Rc(null,e);if(Mo(t),(e=na)?(e=am(e,ia),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qi===null?null:{id:Ji,overflow:Yi},retryLane:536870912,hydrationErrors:null},n=Li(e),n.return=t,t.child=n,ta=t,na=null)):e=null,e===null)throw oa(t);return t.lanes=536870912,null}return Bc(t,r)}var a=e.memoizedState;if(a!==null){var s=a.dehydrated;if(Mo(t),i){if(t.flags&256)t.flags&=-257,t=Vc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558))}else if(Mc||ba(e,t,n,!1),i=(n&e.childLanes)!==0,Mc||i){if(wo.current===null){if(r=q,r!==null&&(s=mt(r,n),s!==0&&s!==a.retryLane))throw a.retryLane=s,Ti(e,s),Pd(r,e,s),jc;Kd()}t=Vc(e,t,n)}else e=a.treeContext,na=lm(s.nextSibling),ta=t,H=!0,ra=null,ia=!1,e!==null&&ea(t,e),t=Bc(t,r),t.flags|=134221824;return t}return e=Mi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Uc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(o(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Wc(e,t,n,r,i){return Sa(t),n=Zo(e,t,n,r,void 0,i),r=ts(),e!==null&&!Mc?(ns(e,t,i),cl(e,t,i)):(H&&r&&Qi(t),t.flags|=1,Nc(e,t,n,i),t.child)}function Gc(e,t,n,r,i,a){return Sa(t),t.updateQueue=null,n=$o(t,r,n,i),Qo(e),r=ts(),e!==null&&!Mc?(ns(e,t,a),cl(e,t,a)):(H&&r&&Qi(t),t.flags|=1,Nc(e,t,n,a),t.child)}function Kc(e,t,n,r,i){if(Sa(t),t.stateNode===null){var a=Oi,o=n.contextType;typeof o==`object`&&o&&(a=Ca(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=vc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},po(t),o=n.contextType,a.context=typeof o==`object`&&o?Ca(o):Oi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(_c(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&vc.enqueueReplaceState(a,a.state,null),xo(t,r,a,i),bo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=xc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Oi,typeof u==`object`&&u&&(o=Ca(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&bc(t,a,r,o),fo=!1;var f=t.memoizedState;a.state=f,xo(t,r,a,i),bo(),l=t.memoizedState,s||f!==l||fo?(typeof d==`function`&&(_c(t,n,d,r),l=t.memoizedState),(c=fo||yc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,mo(e,t),o=t.memoizedProps,u=xc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Oi,typeof l==`object`&&l&&(c=Ca(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&bc(t,a,r,c),fo=!1,f=t.memoizedState,a.state=f,xo(t,r,a,i),bo();var p=t.memoizedState;o!==d||f!==p||fo||e!==null&&e.dependencies!==null&&xa(e.dependencies)?(typeof s==`function`&&(_c(t,n,s,r),p=t.memoizedState),(u=fo||yc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&xa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Uc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=lo(t,e.child,null,i),t.child=lo(t,null,n,i)):Nc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=cl(e,t,i),e}function qc(e,t,n,r){return ua(),t.flags|=256,Nc(e,t,n,r),t.child}var Jc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yc(e){return{baseLanes:e,cachePool:Ka()}}function Xc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ld),e}function Zc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Io.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(H){if(i?jo(t):Po(),(e=na)?(e=am(e,ia),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:qi===null?null:{id:Ji,overflow:Yi},retryLane:536870912,hydrationErrors:null},n=Li(e),n.return=t,t.child=n,ta=t,na=null)):e=null,e===null)throw oa(t);return t.lanes=sm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Po(),i=t.mode,a=$c({mode:`hidden`,children:a},i),r=Fi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Yc(n),r.childLanes=Xc(e,o,n),t.memoizedState=Jc,Rc(null,r)):(jo(t),Qc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return tl(e,t,a,o,r,c,s,n)}return i?(Po(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Mi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Fi(i,a,n,null),i.flags|=2):i=Mi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Rc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Yc(n):(a=i.cachePool,a===null?a=Ka():(s=ka._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Xc(e,o,n),t.memoizedState=Jc,Rc(e.child,r)):(jo(t),n=e.child,e=n.sibling,n=Mi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Qc(e,t){return t=$c({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function $c(e,t){return e=Ai(22,e,null,t),e.lanes=0,e}function el(e,t,n){return lo(t,e.child,null,n),e=Qc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function tl(e,t,n,r,i,a,s,c){if(n)return t.flags&256?(jo(t),t.flags&=-257,el(e,t,c)):t.memoizedState===null?(Po(),a=i.fallback,s=t.mode,i=$c({mode:`visible`,children:i.children},s),a=Fi(a,s,c,null),a.flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,lo(t,e.child,null,c),i=t.child,i.memoizedState=Yc(c),i.childLanes=Xc(e,r,c),t.memoizedState=Jc,Rc(null,i)):(Po(),t.child=e.child,t.flags|=128,null);if(jo(t),sm(a)){if(r=a.nextSibling&&a.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(i=Error(o(419)),i.stack=``,i.digest=r,fa({value:i,source:null,stack:null})),el(e,t,c)}if(Mc||ba(e,t,c,!1),r=(c&e.childLanes)!==0,Mc||r){if(wo.current!==null)return el(e,t,c);if(r=q,r!==null&&(i=mt(r,c),i!==0&&i!==s.retryLane))throw s.retryLane=i,Ti(e,i),Pd(r,e,i),jc;return om(a)||Kd(),el(e,t,c)}return om(a)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,na=lm(a.nextSibling),ta=t,H=!0,ra=null,ia=!1,e!==null&&ea(t,e),t=Qc(t,i.children),t.flags|=134221824,t)}function nl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),va(e.return,t,n)}function rl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&zo(n)===null&&(t=e),e=e.sibling}return t}function il(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function al(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function ol(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Io.current;if(t.flags&128)return Lo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Lo(t,o),i===`backwards`&&e!==null?(al(e),Nc(e,t,r,n),al(e)):Nc(e,t,r,n),r=H?Wi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&nl(e,n,t);else if(e.tag===19)nl(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=rl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,al(t)),il(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&zo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}il(t,!0,n,null,a,r);break;case`together`:il(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=rl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),il(t,!1,i,n,a,r)}return t.child}function sl(e,t,n){var r=t.pendingProps;return ga(t,t.type,r.value),Nc(e,t,r.children,n),t.child}function cl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),od|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ba(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,n=Mi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Mi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ll(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&xa(e)))}function ul(e,t,n){switch(t.tag){case 3:Se(t,t.stateNode.containerInfo),ga(t,ka,e.memoizedState.cache),ua();break;case 27:case 5:we(t);break;case 4:Se(t,t.stateNode.containerInfo);break;case 10:ga(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Mo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return jo(t),t.flags|=128,null;r=ba(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Zc(e,t,n):(jo(t),e=cl(e,t,n),e===null?null:e.sibling)}jo(t);break;case 19:if(t.flags&128)return ol(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(ba(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return ol(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Lo(t,Io.current),r)break;return null;case 22:return t.lanes=0,Lc(e,t,n,t.pendingProps);case 24:ga(t,ka,e.memoizedState.cache)}return cl(e,t,n)}function dl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Mc=!0;else{if(!ll(e,n)&&!(t.flags&128))return Mc=!1,ul(e,t,n);Mc=!!(e.flags&131072)}}else Mc=!1,H&&t.flags&1048576&&Zi(t,Wi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=$a(t.elementType),t.type=e,typeof e==`function`)ji(e)?(r=xc(e,r),t.tag=1,t=Kc(null,t,e,r,n)):(t.tag=0,t=Wc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===re){t.tag=11,t=Pc(null,t,e,r,n);break a}if(i===oe){t.tag=14,t=Fc(null,t,e,r,n);break a}if(i===M){t.tag=10,t.type=e,t=sl(null,t,n);break a}}throw t=me(e)||e,Error(o(306,t,``))}}return t;case 0:return Wc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=xc(r,t.pendingProps),Kc(e,t,r,i,n);case 3:a:{if(Se(t,t.stateNode.containerInfo),e===null)throw Error(o(387));r=t.pendingProps;var a=t.memoizedState;i=a.element,mo(e,t),xo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ga(t,ka,r),r!==a.cache&&ya(t,[ka],n,!0),bo(),r=s.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=qc(e,t,r,n);break a}if(r!==i){i=Bi(Error(o(424)),t),fa(i),t=qc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(na=lm(e.firstChild),ta=t,H=!0,ra=null,ia=!0,n=uo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ua(),r===i){t=cl(e,t,n);break a}Nc(e,t,r,n)}t=t.child}return t;case 26:return Uc(e,t),e===null?(n=Nm(t.type,null,t.pendingProps,null))?t.memoizedState=n:H||(t.stateNode=fp(t.type,t.pendingProps,be.current,t)):t.memoizedState=Nm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return we(t),e===null&&H&&(r=t.stateNode=hm(t.type,t.pendingProps,be.current),ta=t,ia=!0,i=na,Sp(t.type)?(um=i,na=lm(r.firstChild)):na=i),Nc(e,t,t.pendingProps.children,n),Uc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&H&&((i=r=na)&&(r=rm(r,t.type,t.pendingProps,ia),r===null?i=!1:(t.stateNode=r,ta=t,na=lm(r.firstChild),ia=!1,i=!0)),i||oa(t)),we(t),i=t.type,a=t.pendingProps,s=e===null?null:e.memoizedProps,r=a.children,pp(i,a)?r=null:s!==null&&pp(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=Zo(e,t,es,null,null,n),sh._currentValue=i),Uc(e,t),Nc(e,t,r,n),t.child;case 6:return e===null&&H&&((e=n=na)&&(n=im(n,t.pendingProps,ia),n===null?e=!1:(t.stateNode=n,ta=t,na=null,e=!0)),e||oa(t)),null;case 13:return Zc(e,t,n);case 4:return Se(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=lo(t,null,r,n):Nc(e,t,r,n),t.child;case 11:return Pc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Uc(e,t),Nc(e,t,r,n),t.child;case 8:return Nc(e,t,t.pendingProps.children,n),t.child;case 12:return Nc(e,t,t.pendingProps.children,n),t.child;case 10:return sl(e,t,n);case 9:return i=t.type._context,r=t.pendingProps.children,Sa(t),i=Ca(i),r=r(i),t.flags|=1,Nc(e,t,r,n),t.child;case 14:return Fc(e,t,t.type,t.pendingProps,n);case 15:return Ic(e,t,t.type,t.pendingProps,n);case 19:return ol(e,t,n);case 31:return Hc(e,t,n);case 22:return Lc(e,t,n,t.pendingProps);case 24:return Sa(t),r=Ca(ka),e===null?(i=Wa(),i===null&&(i=q,a=Aa(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:r,cache:i},po(t),ga(t,ka,i)):((e.lanes&n)!==0&&(mo(e,t),xo(t,null,null,n),bo()),i=e.memoizedState,a=t.memoizedState,i.parent===r?(r=a.cache,ga(t,ka,r),r!==i.cache&&ya(t,[ka],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),ga(t,ka,r))),Nc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:H&&Qi(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Uc(e,t),Nc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function fl(e){e.flags|=4}function pl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Jm(t,r):Jm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Ud())e.flags|=8192;else throw eo=Xa,Ja}}else e.flags&=-16777217}function ml(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Ym(t)){if(Ud())e.flags|=8192;else throw eo=Xa,Ja}}function hl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ct(),e.lanes|=t,ud|=t)}function gl(e,t){if(!H)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function _l(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function vl(e,t,n){var r=t.pendingProps;switch($i(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _l(t),null;case 1:return _l(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),_a(ka),Ce(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(la(t)?fl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,da())),_l(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(fl(t),a===null?(_l(t),pl(t,i,null,r,n)):(_l(t),ml(t,a))):a?a===e.memoizedState?(_l(t),t.flags&=-16777217):(fl(t),_l(t),ml(t,a)):(e=e.memoizedProps,e!==r&&fl(t),_l(t),pl(t,i,e,r,n)),null;case 27:if(Te(t),n=be.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&fl(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return _l(t),t.subtreeFlags&=-33554433,null}e=ve.current,la(t)?sa(t,e):(e=hm(i,r,n),t.stateNode=e,fl(t))}return _l(t),t.subtreeFlags&=-33554433,null;case 5:if(Te(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&fl(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return _l(t),t.subtreeFlags&=-33554433,null}if(a=ve.current,la(t))sa(t,a);else{var s=lp(be.current);switch(a){case 1:a=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:a=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:a=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:a=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:a=s.createElement(`div`),a.innerHTML=`<script><\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}a[bt]=t,a[xt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)a.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=a;a:switch(np(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&fl(t)}}return _l(t),t.subtreeFlags&=-33554433,pl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&fl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(o(166));if(e=be.current,la(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=ta,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[bt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ep(e.nodeValue,n)),e||oa(t,!0)}else e=lp(e).createTextNode(r),e[bt]=t,t.stateNode=e}return _l(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=la(t),n!==null){if(e===null){if(!r)throw Error(o(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(o(557));e[bt]=t}else ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;_l(t),e=!1}else n=da(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Fo(t),t):(Fo(t),null);if(t.flags&128)throw Error(o(558))}return _l(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=la(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(o(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(o(317));i[bt]=t}else ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;_l(t),i=!1}else i=da(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Fo(t),t):(Fo(t),null)}return Fo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),hl(t,t.updateQueue),_l(t),null);case 4:return Ce(),e===null&&Wf(t.stateNode.containerInfo),t.flags|=67108864,_l(t),null;case 10:return _a(t.type),_l(t),null;case 19:if(Ro(t),r=t.memoizedState,r===null)return _l(t),null;if(i=!!(t.flags&128),a=r.rendering,a===null){if(i)gl(r,!1);else{if(ad!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=zo(e),a!==null){for(t.flags|=128,gl(r,!1),e=a.updateQueue,t.updateQueue=e,hl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ni(n,e),n=n.sibling;return Lo(t,Io.current&1|2),H&&Xi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Re()>gd&&(t.flags|=128,i=!0,gl(r,!1),t.lanes=4194304)}}else{if(!i){if(e=zo(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,hl(t,e),gl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!a.alternate&&!H)return _l(t),null}else 2*Re()-r.renderingStartTime>gd&&n!==536870912&&(t.flags|=128,i=!0,gl(r,!1),t.lanes=4194304)}r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Re(),e.sibling=null,a=Io.current,a=i?a&1|2:a&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||H?Lo(t,a):(n=a,B(ko,t),B(Io,n),Ao===null&&(Ao=t)),H&&Xi(t,r.treeForkCount),e}return _l(t),null;case 22:case 23:return Fo(t),Oo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(_l(t),t.subtreeFlags&6&&(t.flags|=8192)):_l(t),n=t.updateQueue,n!==null&&hl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&_e(Ua),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),_a(ka),_l(t),null;case 25:return null;case 30:return t.flags|=33554432,_l(t),null}throw Error(o(156,t.tag))}function yl(e,t){switch($i(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _a(ka),Ce(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Te(t),null;case 31:if(t.memoizedState!==null){if(Fo(t),t.alternate===null)throw Error(o(340));ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Fo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ro(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Ce(),null;case 10:return _a(t.type),null;case 22:case 23:return Fo(t),Oo(),e!==null&&_e(Ua),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return _a(ka),null;case 25:return null;default:return null}}function bl(e,t){switch($i(t),t.tag){case 3:_a(ka),Ce();break;case 26:case 27:case 5:Te(t);break;case 4:Ce();break;case 31:t.memoizedState!==null&&Fo(t);break;case 13:Fo(t);break;case 19:Ro(t);break;case 10:_a(t.type);break;case 22:case 23:Fo(t),Oo(),e!==null&&_e(Ua);break;case 24:_a(ka)}}function xl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Sl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Cl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Co(t,n)}catch(t){Z(e,e.return,t)}}}function wl(e,t,n){n.props=xc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Tl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=hi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Pp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Fp(e);h(e.child,!1,Qp,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function El(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}}function Dl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)em(e.stateNode,t[n])}function Ol(e){for(var t=e.return;t!==null&&(jl(t)&&em(e.stateNode,t.stateNode),!Al(t));)t=t.return}function kl(e){for(var t=e.return;t!==null&&(jl(t)&&tm(e.stateNode,t.stateNode),!Al(t));)t=t.return}function Al(e){return e.tag===5||e.tag===3||e.tag===27}function jl(e){return e&&e.tag===7&&e.stateNode!==null}function Ml(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Nl(e,t,n){try{var r=e.stateNode;ip(r,e.type,n,t),r[xt]=t}catch(t){Z(e,e.return,t)}}function Pl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Sp(e.type)||e.tag===4}function Fl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Pl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Sp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Il(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=gn)),Dl(e,r),V=!0;else if(i!==4&&(i===27&&(Dl(e,r),r=null,Sp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Il(e,t,n,r),e=e.sibling;e!==null;)Il(e,t,n,r),e=e.sibling}function Ll(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Dl(e,r),V=!0;else if(i!==4&&(i===27&&(Dl(e,r),r=null,Sp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Ll(e,t,n,r),e=e.sibling;e!==null;)Ll(e,t,n,r),e=e.sibling}function Rl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);np(t,r,n),t[bt]=e,t[xt]=n}catch(t){Z(e,e.return,t)}}var zl=!1,Bl=null;function Vl(e){(e.tag===30||e.subtreeFlags&33554432)&&(zl=!0)}var Hl=null;function Ul(){var e=Hl;return Hl=null,e}var Wl=0;function Gl(e,t,n,r,i){return Wl=0,Kl(e.child,t,n,r,i)}function Kl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Op(o);r.push(s),s.view&&(a=!0)}else a||Op(o).view&&(a=!0);zl=!0,Tp(o,Wl===0?t:t+`_`+Wl,n),Wl++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||Kl(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function ql(e,t){for(;e!==null;)e.tag===5?Ep(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||ql(e.child,t)),e=e.sibling}function Jl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Jl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(o(544));var n=t.name;t=_i(t.default,t.share),t!==`none`&&(Gl(e,n,t,null,!1)||ql(e.child,!1))}e=e.sibling}}function Yl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=hi(r,n),a=_i(r.default,n.paired?r.share:r.enter);a===`none`?Jl(e):Gl(e,i,a,null,!1)?(Jl(e),n.paired||t||Nd(e,r.onEnter)):ql(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Yl(e,t),e=e.sibling;else Jl(e)}function Xl(e){if(Bl!==null&&Bl.size!==0){var t=Bl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=_i(n.default,n.share);if(a!==`none`&&(Gl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Nd(e,n.onShare)):ql(e.child,!1)),t.delete(r),t.size===0)break}}}Xl(e)}e=e.sibling}}}function Zl(e){if(e.tag===30){var t=e.memoizedProps,n=hi(t,e.stateNode),r=Bl===null?void 0:Bl.get(n),i=_i(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Gl(e,n,i,null,!1)?r===void 0?Nd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Bl.delete(n),Nd(e,t.onShare)):ql(e.child,!1)),Bl!==null&&Xl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Zl(e),e=e.sibling;else Bl!==null&&Xl(e)}function Ql(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=hi(t,e.stateNode);t=_i(t.default,t.update),e.flags&=-5,t!==`none`&&Gl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Ql(e);e=e.sibling}}function $l(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,ql(e.child,!1))}$l(e)}e=e.sibling}}function eu(e){if(e.tag===30)e.stateNode.paired=null,ql(e.child,!1),$l(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)eu(e),e=e.sibling;else $l(e)}function tu(e){for(e=e.child;e!==null;)e.tag===30?ql(e.child,!1):e.subtreeFlags&33554432&&tu(e),e=e.sibling}function nu(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Wl<a.length){var l=a[Wl],u=Op(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Tp(c,Wl===0?n:n+`_`+Wl,i),s&&e.flags&4||(Hl===null&&(Hl=[]),Hl.push(c,Wl===0?r:r+`_`+Wl,t.memoizedProps)),Wl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:nu(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function ru(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=hi(n,r),a=_i(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(kp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Wl=0,i=nu(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Nd(e,n.onUpdate))}else e.subtreeFlags&33554432&&ru(e,t);e=e.sibling}}var iu=!1,G=!1,au=!1,ou=!1,su=typeof WeakSet==`function`?WeakSet:Set,cu=null,lu=!1,uu=!1,du=!1,fu=!1;function pu(e,t,n){if(e=e.containerInfo,sp=gh,e=Gr(e),Kr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(cp={focusedElem:e,selectionRange:r},gh=!1,n=(n&335544064)===n,cu=t,t=n?9270:1024;cu!==null;){if(e=cu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Zl(r[a]);if(e.alternate===null&&e.flags&2)n&&Vl(e),mu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Zl(r),mu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Vl(e),mu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,cu=r):(n&&Ql(e),mu(n))}}Bl=null}function mu(e){for(;cu!==null;){var t=cu,n=e,r=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(i&1024&&r!==null){n=void 0,i=r.memoizedProps,r=r.memoizedState;var a=t.stateNode;try{var s=xc(t.type,i);n=a.getSnapshotBeforeUpdate(s,r),a.__reactInternalSnapshotBeforeUpdate=n}catch(e){Z(t,t.return,e)}}break;case 3:if(i&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)nm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:nm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=hi(r.memoizedProps,r.stateNode),i=t.memoizedProps,i=_i(i.default,i.update),i!==`none`&&Gl(r,n,i,r.memoizedState=[],!0));break;default:if(i&1024)throw Error(o(163))}if(r=t.sibling,r!==null){r.return=t.return,cu=r;break}cu=t.return}}function hu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Fu(e,n),r&4&&xl(5,n);break;case 1:if(Fu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=xc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}}r&64&&Cl(n),r&512&&Tl(n,n.return);break;case 3:if(Fu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Co(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&Rl(n);case 26:case 5:Fu(e,n),t===null&&r&4&&Ml(n),r&512&&Tl(n,n.return);break;case 12:Fu(e,n);break;case 31:Fu(e,n),r&4&&wu(e,n);break;case 13:Fu(e,n),r&4&&Tu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=_f.bind(null,n),cm(e,n))));break;case 22:if(r=n.memoizedState!==null||iu,!r){var a=t!==null&&t.memoizedState!==null||G;t=iu,i=G,iu=r,(G=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Lu(e,n,r)):Fu(e,n),iu=t,G=i}break;case 30:Fu(e,n),r&512&&Tl(n,n.return);break;case 7:r&512&&Tl(n,n.return);default:Fu(e,n)}}function gu(e,t){for(e=e.child;e!==null;)_u(e,t),e=e.sibling}function _u(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){Z(e,e.return,t)}vu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,V=!0}catch(t){Z(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?wp(s,!0):wp(e.stateNode,!1)}catch(t){Z(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&gu(e,t);break;default:gu(e,t)}}function vu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:_u(n,r);break a;case 22:n.memoizedState===null&&vu(n,r);break a;default:vu(n,r)}}e=e.sibling}}function yu(e){var t=e.alternate;t!==null&&(e.alternate=null,yu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&kt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var bu=null,xu=!1;function Su(e,t,n){for(n=n.child;n!==null;)Cu(e,t,n),n=n.sibling}function Cu(e,t,n){if(Je&&typeof Je.onCommitFiberUnmount==`function`)try{Je.onCommitFiberUnmount(qe,n)}catch{}switch(n.tag){case 26:G||El(n,t),Su(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!G&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:G||El(n,t),kl(n);var r=bu,i=xu;Sp(n.type)&&(bu=n.stateNode,xu=!1),Su(e,t,n),gm(n.stateNode,n.type,n.memoizedProps),bu=r,xu=i;break;case 5:G||El(n,t),kl(n);case 6:if(n.tag===6&&kl(n),r=bu,i=xu,bu=null,Su(e,t,n),bu=r,xu=i,bu!==null){if(xu)try{(bu.nodeType===9?bu.body:bu.nodeName===`HTML`?bu.ownerDocument.body:bu).removeChild(n.stateNode),V=!0}catch(e){Z(n,t,e)}else try{bu.removeChild(n.stateNode),V=!0}catch(e){Z(n,t,e)}}break;case 18:bu!==null&&(xu?(e=bu,Cp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hh(e)):Cp(bu,n.stateNode));break;case 4:r=bu,i=xu,bu=n.stateNode.containerInfo,xu=!0,Su(e,t,n),bu=r,xu=i;break;case 0:case 11:case 14:case 15:Sl(2,n,t),G||Sl(4,n,t),Su(e,t,n);break;case 1:G||(El(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&wl(n,t,r)),Su(e,t,n);break;case 21:Su(e,t,n);break;case 22:G=(r=G)||n.memoizedState!==null,Su(e,t,n),G=r;break;case 30:El(n,t),Su(e,t,n);break;case 7:G||El(n,t),Su(e,t,n);break;default:Su(e,t,n)}}function wu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hh(e)}catch(e){Z(t,t.return,e)}}}function Tu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hh(e)}catch(e){Z(t,t.return,e)}}function Eu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new su),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new su),t;default:throw Error(o(435,e.tag))}}function Du(e,t){var n=Eu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=vf.bind(null,e,t);t.then(r,r)}})}function Ou(e,t,n){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var a=r[i],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Sp(l.type)){bu=l.stateNode,xu=!1;break a}break;case 5:bu=l.stateNode,xu=!1;break a;case 3:case 4:bu=l.stateNode.containerInfo,xu=!0;break a}l=l.return}if(bu===null)throw Error(o(160));Cu(s,c,a),bu=null,xu=!1,s=a.alternate,s!==null&&(s.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Au(t,e,n),t=t.sibling}var ku=null;function Au(e,t,n){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(i&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var a=0;a<r.length;a++){var s=r[a];s.ref.impl=s.nextImpl}Ou(t,e,n),ju(e),i&4&&(Sl(3,e,e.return),xl(3,e),Sl(5,e,e.return));break;case 1:Ou(t,e,n),ju(e),i&512&&(G||r===null||El(r,r.return)),i&64&&iu&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(a=ku,Ou(t,e,n),ju(e),i&512&&(G||r===null||El(r,r.return)),i&4){if(i=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(iu)e.stateNode=fp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,i=a.ownerDocument||a;b:switch(t){case`title`:r=i.getElementsByTagName(`title`)[0],(!r||r[Dt]||r[bt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=i.createElement(t),i.head.insertBefore(r,i.querySelector(`head > title`))),np(r,t,n),r[bt]=e,Pt(r),t=r;break a;case`link`:if(a=Gm(`link`,`href`,i).get(t+(n.href||``))){for(s=0;s<a.length;s++)if(r=a[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){a.splice(s,1);break b}}r=i.createElement(t),np(r,t,n),i.head.appendChild(r);break;case`meta`:if(a=Gm(`meta`,`content`,i).get(t+(n.content||``))){for(s=0;s<a.length;s++)if(r=a[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){a.splice(s,1);break b}}r=i.createElement(t),np(r,t,n),i.head.appendChild(r);break;default:throw Error(o(468,t))}r[bt]=e,Pt(r),t=r}e.stateNode=t}}else iu||Km(a,e.type,e.stateNode)}else e.stateNode=Bm(a,n,e.memoizedProps)}else i===n?n===null&&e.stateNode!==null&&Nl(e,e.memoizedProps,r.memoizedProps):(i===null?(t=r.stateNode,t===null||G||t.parentNode.removeChild(t)):i.count--,n===null?iu||Km(a,e.type,e.stateNode):Bm(a,n,e.memoizedProps))}break;case 27:Ou(t,e,n),ju(e),i&512&&(G||r===null||El(r,r.return)),r!==null&&i&4&&Nl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(a=au,au=!1,Ou(t,e,n),au=a,ju(e),i&512&&(G||r===null||El(r,r.return)),e.flags&32){t=e.stateNode;try{cn(t,``),V=!0}catch(t){Z(e,e.return,t)}}i&4&&e.stateNode!=null&&(t=e.memoizedProps,Nl(e,t,r===null?t:r.memoizedProps)),i&1024&&(ou=!0);break;case 6:if(Ou(t,e,n),ju(e),i&4){if(e.stateNode===null)throw Error(o(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,V=!0}catch(t){Z(e,e.return,t)}}break;case 3:if(V=!1,Wm=null,a=ku,ku=bm(t.containerInfo),Ou(t,e,n),ku=a,ju(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{Hh(t.containerInfo)}catch(t){Z(e,e.return,t)}ou&&(ou=!1,Mu(e)),V=!1;break;case 4:i=au,au=iu,r=Wt(),a=ku,ku=bm(e.stateNode.containerInfo),Ou(t,e,n),ju(e),ku=a,V&&uu&&(du=!0),V=r,au=i;break;case 12:Ou(t,e,n),ju(e);break;case 31:Ou(t,e,n),ju(e),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 13:Ou(t,e,n),ju(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(md=Re()),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 22:a=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=iu,l=G,u=au;iu=c||a,au=u||a,G=l||s,Ou(t,e,n),G=l,au=u,iu=c,ju(e),i&8192&&(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,!a||r===null||s||iu||G||(t=s||G,n=iu,r=G,iu=a||iu,G=t,Iu(e,2),iu=n,G=r),!a&&au||gu(e,a)),i&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Du(e,n))));break;case 19:Ou(t,e,n),ju(e),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 30:i&512&&(G||r===null||El(r,r.return)),i=Wt(),a=uu,s=(n&335544064)===n,c=e.memoizedProps,uu=s&&_i(c.default,c.update)!==`none`,Ou(t,e,n),ju(e),s&&r!==null&&V&&(e.flags|=4),uu=a,V=i;break;case 21:break;case 7:i&512&&(G||r===null||El(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Ou(t,e,n),ju(e)}}function ju(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Pl(r)){n=r;break}r=r.return}r=null;for(var i=e.return;i!==null;){if(jl(i)){var a=i.stateNode;r===null?r=[a]:r.push(a)}if(Al(i))break;i=i.return}var s=r;if(n==null)throw Error(o(160));switch(n.tag){case 27:var c=n.stateNode;Ll(e,Fl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(cn(l,``),n.flags&=-33),Ll(e,Fl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Il(e,Fl(e),u,s);break;default:throw Error(o(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Mu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,gh=!0,t.reset(),gh=!1),e=e.sibling}}function Nu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Pu(t,e),t=t.sibling;else ru(t,!1)}function Pu(e,t){var n=e.alternate;if(n===null)Yl(e,!1);else switch(e.tag){case 3:if(fu=lu=!1,Ul(),Nu(t,e),!lu&&!du){if(e=Hl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Ep(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),fu=!0}Hl=null;break;case 5:Nu(t,e);break;case 4:r=lu,lu=!1,Nu(t,e),lu&&(du=!0),lu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Nu(t,e):Yl(e,!1));break;case 30:r=lu,i=Ul(),lu=!1,Nu(t,e),lu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=hi(a,o),o=hi(n.memoizedProps,o);var s=_i(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Wl=0,t=nu(e,n,t,o,s,a,!0),Wl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Nd(e,e.memoizedProps.onUpdate),Hl=i):i!==null&&(i.push.apply(i,Hl),Hl=i),lu=e.flags&32?!0:r;break;default:Nu(t,e)}}function Fu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)hu(e,t.alternate,t),t=t.sibling}function Iu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Sl(4,n,n.return),Iu(n,r);break;case 1:El(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&wl(n,n.return,i),Iu(n,r);break;case 27:r&2&&gm(n.stateNode,n.type,n.memoizedProps);case 5:El(n,n.return),n.tag!==5&&n.tag!==27||kl(n),Iu(n,r);break;case 6:kl(n);break;case 26:El(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||G||i.parentNode.removeChild(i),Iu(n,r);break;case 22:n.memoizedState===null&&Iu(n,r);break;case 30:El(n,n.return),Iu(n,r);break;case 7:El(n,n.return);default:Iu(n,r)}e=e.sibling}}function Lu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Lu(i,a,n),xl(4,a);break;case 1:if(Lu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)So(l[i],c)}catch(e){Z(r,r.return,e)}}s&&o&64&&Cl(a),Tl(a,a.return);break;case 27:n&2&&Rl(a);case 5:a.tag!==5&&a.tag!==27||Ol(a),Lu(i,a,n),s&&r===null&&o&4&&Ml(a),Tl(a,a.return);break;case 6:Ol(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||iu||Km(bm(c.ownerDocument),a.type,c),Lu(i,a,n),s&&r===null&&o&4&&Ml(a),Tl(a,a.return);break;case 12:Lu(i,a,n);break;case 31:Lu(i,a,n),s&&o&4&&wu(i,a);break;case 13:Lu(i,a,n),s&&o&4&&Tu(i,a);break;case 22:a.memoizedState===null&&Lu(i,a,n),Tl(a,a.return);break;case 30:Lu(i,a,n),Tl(a,a.return);break;case 7:Tl(a,a.return);default:Lu(i,a,n)}t=t.sibling}}function Ru(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ja(n))}function zu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ja(e))}function Bu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Vu(e,t,n,r),t=t.sibling;else i&&tu(t)}function Vu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&eu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Bu(e,t,n,r),a&2048&&xl(9,t);break;case 1:Bu(e,t,n,r);break;case 3:Bu(e,t,n,r),i&&fu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&ja(a)));break;case 12:if(a&2048){Bu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){Z(t,t.return,e)}}else Bu(e,t,n,r);break;case 31:Bu(e,t,n,r);break;case 13:Bu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&eu(t),o._visibility&2?Bu(e,t,n,r):(o._visibility|=2,Hu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&eu(s),o._visibility&2?Bu(e,t,n,r):Uu(e,t)),a&2048&&Ru(s,t);break;case 24:Bu(e,t,n,r),a&2048&&zu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(ql(a.child,!0),ql(t.child,!0))),Bu(e,t,n,r);break;default:Bu(e,t,n,r)}}function Hu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Hu(a,o,s,c,i),xl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Hu(a,o,s,c,i)):u._visibility&2?Hu(a,o,s,c,i):Uu(a,o),i&&l&2048&&Ru(o.alternate,o);break;case 24:Hu(a,o,s,c,i),i&&l&2048&&zu(o.alternate,o);break;default:Hu(a,o,s,c,i)}t=t.sibling}}function Uu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Uu(n,r),i&2048&&Ru(r.alternate,r);break;case 24:Uu(n,r),i&2048&&zu(r.alternate,r);break;default:Uu(n,r)}t=t.sibling}}var Wu=8192;function Gu(e,t,n){if(e.subtreeFlags&Wu)for(e=e.child;e!==null;)Ku(e,t,n),e=e.sibling}function Ku(e,t,n){switch(e.tag){case 26:Gu(e,t,n),e.flags&Wu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&Zm(n,e)):Qm(n,ku,e.memoizedState,e.memoizedProps));break;case 5:Gu(e,t,n),e.flags&Wu&&(e=e.stateNode,(t&335544128)===t&&Zm(n,e));break;case 3:case 4:var r=ku;ku=bm(e.stateNode.containerInfo),Gu(e,t,n),ku=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Wu,Wu=16777216,Gu(e,t,n),Wu=r):Gu(e,t,n));break;case 30:if((e.flags&Wu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Bl===null&&(Bl=new Map),Bl.set(r,i)}Gu(e,t,n);break;default:Gu(e,t,n)}}function qu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ju(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cu=r,Zu(r,e)}qu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Yu(e),e=e.sibling}function Yu(e){switch(e.tag){case 0:case 11:case 15:Ju(e),e.flags&2048&&Sl(9,e,e.return);break;case 3:Ju(e);break;case 12:Ju(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Xu(e)):Ju(e);break;default:Ju(e)}}function Xu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cu=r,Zu(r,e)}qu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Sl(8,t,t.return),Xu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Xu(t));break;default:Xu(t)}e=e.sibling}}function Zu(e,t){for(;cu!==null;){var n=cu;switch(n.tag){case 0:case 11:case 15:Sl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ja(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,cu=r;else a:for(n=e;cu!==null;){r=cu;var i=r.sibling,a=r.return;if(yu(r),r===n){cu=null;break a}if(i!==null){i.return=a,cu=i;break a}cu=a}}}var Qu={getCacheForType:function(e){var t=Ca(ka),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ca(ka).controller.signal}},$u=typeof WeakMap==`function`?WeakMap:Map,K=0,q=null,J=null,Y=0,X=0,ed=null,td=!1,nd=!1,rd=!1,id=0,ad=0,od=0,sd=0,cd=0,ld=0,ud=0,dd=null,fd=null,pd=!1,md=0,hd=0,gd=1/0,_d=null,vd=null,yd=0,bd=null,xd=null,Sd=0,Cd=0,wd=null,Td=null,Ed=null,Dd=null,Od=null,kd=0,Ad=null;function jd(){return K&2&&Y!==0?Y&-Y:F.T===null?_t():Pf()}function Md(){if(ld===0){if(!(Y&536870912)||H){var e=tt;tt<<=1,!(tt&3932160)&&(tt=262144),ld=e}else ld=536870912}return e=ko.current,e!==null&&(e.flags|=32),ld}function Nd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Pp(hi(e.memoizedProps,n))),Dd===null&&(Dd=[]),Dd.push(t.bind(null,r))}}function Pd(e,t,n){(e===q&&(X===2||X===9)||e.cancelPendingCommit!==null)&&(Vd(e,0),Rd(e,Y,ld,!1)),ut(e,n),(!(K&2)||e!==q)&&(e===q&&(!(K&2)&&(sd|=n),ad===4&&Rd(e,Y,ld,!1)),Ef(e))}function Fd(e,t,n){if(K&6)throw Error(o(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||at(e,t),i=r?Yd(e,t):qd(e,t,!0),a=r;do{if(i===0){nd&&!r&&Rd(e,t,0,!1);break}if(n=e.current.alternate,a&&!Ld(n)){i=qd(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;i=dd;var l=c.current.memoizedState.isDehydrated;if(l&&(Vd(c,s).flags|=256),s=qd(c,s,!1),s!==2&&s!==6){if(rd&&!l){c.errorRecoveryDisabledLanes|=a,sd|=a,i=4;break a}a=fd,fd=i,a!==null&&(fd===null?fd=a:fd.push.apply(fd,a))}i=s}if(a=!1,i!==2)continue}}if(i===1){Vd(e,0),Rd(e,t,0,!0);break}a:{switch(r=e,a=i,a){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Rd(r,t,ld,!td);break a;case 2:fd=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=md+300-Re(),10<i)){if(Rd(r,t,ld,!td),it(r,0,!0)!==0)break a;Sd=t,r.timeoutHandle=gp(Id.bind(null,r,n,fd,_d,pd,t,ld,sd,ud,td,a,`Throttled`,-0,0),i);break a}Id(r,n,fd,_d,pd,t,ld,sd,ud,td,a,null,-0,0)}break}while(1);Ef(e)}function Id(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;if(d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:gn},Bl=null,Ku(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=nh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?md-Re():(a&4194048)===a?hd-Re():0,m=eh(d,m),m!==null)){Sd=a,e.cancelPendingCommit=m(nf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Rd(e,a,o,!l);return}nf(e,t,a,n,r,i,o,s,c,l,u,d)}function Ld(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!zr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Rd(e,t,n,r){t=ot(e,t),t&=~cd,t&=~sd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Xe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ft(e,n,t)}function zd(){return K&6?!0:(Df(0,!1),!1)}function Bd(){if(J!==null){if(X===0)var e=J.return;else e=J,ha=ma=null,rs(e),ro=null,io=0,e=J;for(;e!==null;)bl(e.alternate,e),e=e.return;J=null}}function Vd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,_p(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Sd=0,Bd(),q=e,J=n=Mi(e.current,null),Y=t,X=0,ed=null,td=!1,nd=at(e,t),rd=!1,ud=ld=cd=sd=od=ad=0,fd=dd=null,pd=!1,id=ot(e,t),Si(),n}function Hd(e,t){U=null,F.H=pc,t===qa||t===Ya?(t=to(),X=3):t===Ja?(t=to(),X=4):X=t===jc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,ed=t,J===null&&(ad=1,Tc(e,Bi(t,e.current)))}function Ud(){var e=ko.current;return e===null?!0:(Y&4194048)===Y?Ao===null:(Y&62914560)===Y||Y&536870912?e===Ao:!1}function Wd(){var e=F.H;return F.H=pc,e===null?pc:e}function Gd(){var e=F.A;return F.A=Qu,e}function Kd(){ad=4,td||(Y&4194048)!==Y&&ko.current!==null||(nd=!0),!(od&134217727)&&!(sd&134217727)||q===null||Rd(q,Y,ld,!1)}function qd(e,t,n){var r=K;K|=2;var i=Wd(),a=Gd();(q!==e||Y!==t)&&(_d=null,Vd(e,t)),t=!1;var o=ad;a:do try{if(X!==0&&J!==null){var s=J,c=ed;switch(X){case 8:Bd(),o=6;break a;case 3:case 2:case 9:case 6:ko.current===null&&(t=!0);var l=X;if(X=0,ed=null,$d(e,s,c,l),n&&nd){o=0;break a}break;default:l=X,X=0,ed=null,$d(e,s,c,l)}}Jd(),o=ad;break}catch(t){Hd(e,t)}while(1);return t&&e.shellSuspendCounter++,ha=ma=null,K=r,F.H=i,F.A=a,J===null&&(q=null,Y=0,Si()),o}function Jd(){for(;J!==null;)Zd(J)}function Yd(e,t){var n=K;K|=2;var r=Wd(),i=Gd();q!==e||Y!==t?(_d=null,gd=Re()+500,Vd(e,t)):nd=at(e,t);a:do try{if(X!==0&&J!==null){t=J;var a=ed;b:switch(X){case 1:X=0,ed=null,$d(e,t,a,1);break;case 2:case 9:if(Za(a)){X=0,ed=null,Qd(t);break}t=function(){X!==2&&X!==9||q!==e||(X=7),Ef(e)},a.then(t,t);break a;case 3:X=7;break a;case 4:X=5;break a;case 7:Za(a)?(X=0,ed=null,Qd(t)):(X=0,ed=null,$d(e,t,a,7));break;case 5:var s=null;switch(J.tag){case 26:s=J.memoizedState;case 5:case 27:var c=J;if(s?Ym(s):c.stateNode.complete){X=0,ed=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,ef(u))}break b}}X=0,ed=null,$d(e,t,a,5);break;case 6:X=0,ed=null,$d(e,t,a,6);break;case 8:Bd(),ad=6;break a;default:throw Error(o(462))}}Xd();break}catch(t){Hd(e,t)}while(1);return ha=ma=null,F.H=r,F.A=i,K=n,J===null?(q=null,Y=0,Si(),ad):0}function Xd(){for(;J!==null&&!Ie();)Zd(J)}function Zd(e){var t=dl(e.alternate,e,id);e.memoizedProps=e.pendingProps,t===null?ef(e):J=t}function Qd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Gc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=Gc(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:rs(t);var r=t;r===ta&&(H?(ca(r),r.tag===5&&r.stateNode!=null&&(na=r.stateNode)):(ca(r),H=!0));default:bl(n,t),t=J=Ni(t,id),t=dl(n,t,id)}e.memoizedProps=e.pendingProps,t===null?ef(e):J=t}function $d(e,t,n,r){ha=ma=null,rs(t),ro=null,io=0;var i=t.return;try{if(Ac(e,i,t,n,Y)){ad=1,Tc(e,Bi(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;ad=1,Tc(e,Bi(n,e.current)),J=null;return}t.flags&32768?(H||r===1?e=!0:nd||Y&536870912?e=!1:(td=e=!0,(r===2||r===9||r===3||r===6)&&(r=ko.current,r!==null&&r.tag===13&&(r.flags|=16384))),tf(t,e)):ef(t)}function ef(e){var t=e;do{if(t.flags&32768){tf(t,td);return}e=t.return;var n=vl(t.alternate,t,id);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);ad===0&&(ad=5)}function tf(e,t){do{var n=yl(e.alternate,e);if(n!==null){n.flags&=32767,J=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){J=e;return}J=e=n}while(e!==null);ad=6,J=null}function nf(e,t,n,r,i,a,s,c,l,u,d,f){e.cancelPendingCommit=null;do df();while(yd!==0);if(K&6)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));e===q&&(J=q=null,Y=0),xd=t,bd=e,Sd=n,wd=i,Td=r,rf(e,t,n,s,c,l,f)}}function rf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Cd=s,s|=xi,dt(e,n,s,r,i,a),Dd=null,(n&335544064)===n?(Od=Pa(e),r=10262):(Od=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,yf(He,function(){return ff(),null})):(e.callbackNode=null,e.callbackPriority=0),zl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=F.T,F.T=null,i=I.p,I.p=2,a=K,K|=4;try{pu(e,t,n)}finally{K=a,I.p=i,F.T=r}}yd=1,zl?Ed=Mp(o,e.containerInfo,Od,sf,cf,of,lf,ff,af,null,null):(sf(),cf(),lf())}function af(e){if(yd!==0){var t=bd.onRecoverableError;t(e,{componentStack:null})}}function of(){yd===3&&(yd=0,Pu(xd,bd),yd=4)}function sf(){if(yd===1){yd=0;var e=bd,t=xd,n=Sd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=F.T,F.T=null;var i=I.p;I.p=2;var a=K;K|=4;try{uu=du=!1,Au(t,e,n),n=cp;var o=Gr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Wr(s.ownerDocument.documentElement,s)){if(c!==null&&Kr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Ur(s,h),v=Ur(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}gh=!!sp,cp=sp=null}finally{K=a,I.p=i,F.T=r}}e.current=t,yd=2}}function cf(){if(yd===2){yd=0;var e=bd,t=xd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=K;K|=4;try{hu(e,t.alternate,t)}finally{K=i,I.p=r,F.T=n}}yd=3}}function lf(){if(yd===4||yd===3){yd=0;var e=Ed;Ed=null,Le();var t=bd,n=xd,r=Sd,i=Td,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?yd=5:(yd=0,xd=bd=null,uf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(vd=null),gt(r),n=n.stateNode,Je&&typeof Je.onCommitFiberRoot==`function`)try{Je.onCommitFiberRoot(qe,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=F.T,a=I.p,I.p=2,F.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{F.T=n,I.p=a}}if(i=Dd,o=Od,Od=null,i!==null&&(Dd=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Sd&3&&df(),Ef(t),a=t.pendingLanes,r&261930&&a&42?t===Ad?kd++:(kd=0,Ad=t):(kd=0,Ad=null),Df(0,!1)}}function uf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ja(t)))}function df(){return Ed!==null&&(Ed.skipTransition(),Ed=null),sf(),cf(),lf(),ff()}function ff(){if(yd!==5)return!1;var e=bd,t=Cd;Cd=0;var n=gt(Sd),r=F.T,i=I.p;try{I.p=32>n?32:n,F.T=null,n=wd,wd=null;var a=bd,s=Sd;if(yd=0,xd=bd=null,Sd=0,K&6)throw Error(o(331));var c=K;if(K|=4,Yu(a.current),Vu(a,a.current,s,n),K=c,Df(0,!1),Je&&typeof Je.onPostCommitFiberRoot==`function`)try{Je.onPostCommitFiberRoot(qe,a)}catch{}return!0}finally{I.p=i,F.T=r,uf(e,t)}}function pf(e,t,n){t=Bi(n,t),t=Dc(e.stateNode,t,2),e=go(e,t,2),e!==null&&(ut(e,2),Ef(e))}function Z(e,t,n){if(e.tag===3)pf(e,e,n);else for(;t!==null;){if(t.tag===3){pf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(vd===null||!vd.has(r))){e=Bi(n,e),n=Oc(2),r=go(t,n,2),r!==null&&(kc(n,r,t,e),ut(r,2),Ef(r));break}}t=t.return}}function mf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $u;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(rd=!0,i.add(n),e=hf.bind(null,e,t,n),t.then(e,e))}function hf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,q===e&&(Y&n)===n&&(ad===4||ad===3&&(Y&62914560)===Y&&300>Re()-md?K&2?cd|=n:Vd(e,0):cd|=n,ud===Y&&(ud=0)),Ef(e)}function gf(e,t){t===0&&(t=ct()),e=Ti(e,t),e!==null&&(ut(e,t),Ef(e))}function _f(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gf(e,n)}function vf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(o(314))}r!==null&&r.delete(t),gf(e,n)}function yf(e,t){return Pe(e,t)}var bf=null,xf=null,Sf=!1,Cf=!1,wf=!1,Tf=0;function Ef(e){e!==xf&&e.next===null&&(xf===null?bf=xf=e:xf=xf.next=e),Cf=!0,Sf||(Sf=!0,Nf())}function Df(e,t){if(!wf&&Cf){wf=!0;do for(var n=!1,r=bf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Xe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Mf(r,a))}else a=Y,a=it(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||at(r,a)||(n=!0,Mf(r,a))}r=r.next}while(n);wf=!1}}function Of(){kf()}function kf(){Cf=Sf=!1;var e=0;Tf!==0&&hp()&&(e=Tf);for(var t=Re(),n=null,r=bf;r!==null;){var i=r.next,a=Af(r,t);a===0?(r.next=null,n===null?bf=i:n.next=i,i===null&&(xf=n)):(n=r,(e!==0||a&3)&&(Cf=!0)),r=i}yd!==0&&yd!==5||Df(e,!1),Tf!==0&&(Tf=0)}function Af(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Xe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=st(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=q,n=Y,n=it(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(X===2||X===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Fe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||at(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Fe(r),gt(n)){case 2:case 8:n=Ve;break;case 32:n=He;break;case 268435456:n=We;break;default:n=He}return r=jf.bind(null,e),n=Pe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Fe(r),e.callbackPriority=2,e.callbackNode=null,2}function jf(e,t){if(yd!==0&&yd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(df()&&e.callbackNode!==n)return null;var r=Y;return r=it(e,e===q?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Fd(e,r,t),Af(e,Re()),e.callbackNode!=null&&e.callbackNode===n?jf.bind(null,e):null)}function Mf(e,t){if(df())return null;Fd(e,t,!0)}function Nf(){bp(function(){K&6?Pe(Be,Of):kf()})}function Pf(){if(Tf===0){var e=La;e===0&&(e=et,et<<=1,!(et&261888)&&(et=256)),Tf=e}return Tf}function Ff(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:hn(e)}function If(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Ff((i[xt]||null).action),o=r.submitter;o&&(t=(t=o[xt]||null)?Ff(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Ln(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Tf!==0){var e=new FormData(i,o);$s(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),$s(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Lf=0;Lf<fi.length;Lf++){var Rf=fi[Lf];pi(Rf.toLowerCase(),`on`+(Rf[0].toUpperCase()+Rf.slice(1)))}pi(ii,`onAnimationEnd`),pi(ai,`onAnimationIteration`),pi(oi,`onAnimationStart`),pi(`dblclick`,`onDoubleClick`),pi(`focusin`,`onFocus`),pi(`focusout`,`onBlur`),pi(si,`onTransitionRun`),pi(ci,`onTransitionStart`),pi(li,`onTransitionCancel`),pi(ui,`onTransitionEnd`),zt(`onMouseEnter`,[`mouseout`,`mouseover`]),zt(`onMouseLeave`,[`mouseout`,`mouseover`]),zt(`onPointerEnter`,[`pointerout`,`pointerover`]),zt(`onPointerLeave`,[`pointerout`,`pointerover`]),Rt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Rt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Rt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Rt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Rt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Rt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var zf=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Bf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(zf));function Vf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){vi(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){vi(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[Ct];n===void 0&&(n=t[Ct]=new Set);var r=e+`__bubble`;n.has(r)||(Gf(t,e,2,!1),n.add(r))}function Hf(e,t,n){var r=0;t&&(r|=4),Gf(n,e,r,t)}var Uf=`_reactListening`+Math.random().toString(36).slice(2);function Wf(e){if(!e[Uf]){e[Uf]=!0,It.forEach(function(t){t!==`selectionchange`&&(Bf.has(t)||Hf(t,!1,e),Hf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Uf]||(t[Uf]=!0,Hf(`selectionchange`,!1,t))}}function Gf(e,t,n,r){switch(Ch(t)){case 2:var i=_h;break;case 8:i=vh;break;default:i=yh}n=i.bind(null,t,n,e),i=void 0,!En||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Kf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;s!==null;){if(o=At(s),o===null)return;if(c=o.tag,c===5||c===6||c===26||c===27){r=a=o;continue a}s=s.parentNode}}r=r.return}Cn(function(){var r=a,i=vn(n),o=[];a:{var s=di.get(e);if(s!==void 0){var c=Ln,u=e;switch(e){case`keypress`:if(Mn(n)===0)break a;case`keydown`:case`keyup`:c=tr;break;case`focusin`:u=`focus`,c=Kn;break;case`focusout`:u=`blur`,c=Kn;break;case`beforeblur`:case`afterblur`:c=Kn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=Wn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Gn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=ir;break;case ii:case ai:case oi:c=qn;break;case ui:c=ar;break;case`scroll`:case`scrollend`:c=zn;break;case`wheel`:c=or;break;case`copy`:case`cut`:case`paste`:c=Jn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=nr;break;case`submit`:c=rr;break;case`toggle`:case`beforetoggle`:c=sr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?s===null?null:s+`Capture`:s;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=wn(m,p),g!=null&&d.push(qf(m,g,h))),f)break;m=m.return}0<d.length&&(s=new c(s,u,null,n,i),o.push({event:s,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,s=e===`mouseout`||e===`pointerout`,c&&n!==_n&&(u=n.relatedTarget||n.fromElement)&&(At(u)||u[St]))break a;(s||c)&&(u=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,s?(c=n.relatedTarget||n.toElement,s=r,c=c?At(c):null,c!==null&&(f=l(c),d=c.tag,c!==f||d!==5&&d!==27&&d!==6)&&(c=null)):(s=null,c=r),s!==c&&(d=Wn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=nr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=s==null?u:Mt(s),h=c==null?u:Mt(c),u=new d(g,m+`leave`,s,n,i),u.target=f,u.relatedTarget=h,g=null,At(i)===r&&(d=new d(p,m+`enter`,c,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=s&&c?E(s,c,Yf):null,s!==null&&Xf(o,u,s,d,!1),c!==null&&f!==null&&Xf(o,f,c,d,!0)))}a:{if(s=r?Mt(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var _=Dr;else if(xr(s)){if(Or)_=Lr;else{_=Fr;var v=Pr}}else c=s.nodeName,!c||c.toLowerCase()!==`input`||s.type!==`checkbox`&&s.type!==`radio`?r&&fn(r.elementType)&&(_=Dr):_=Ir;if(_&&=_(e,r)){Sr(o,_,n,i);break a}v&&v(e,s,r)}switch(v=r?Mt(r):window,e){case`focusin`:(xr(v)||v.contentEditable===`true`)&&(Jr=v,Yr=r,Xr=null);break;case`focusout`:Xr=Yr=Jr=null;break;case`mousedown`:Zr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Zr=!1,Qr(o,n,i);break;case`selectionchange`:if(qr)break;case`keydown`:case`keyup`:Qr(o,n,i)}var y;if(lr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else _r?hr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(fr&&n.locale!==`ko`&&(_r||b!==`onCompositionStart`?b===`onCompositionEnd`&&_r&&(y=jn()):(On=i,kn=`value`in On?On.value:On.textContent,_r=!0)),v=Jf(r,b),0<v.length&&(b=new Yn(b,e,null,n,i),o.push({event:b,listeners:v}),y?b.data=y:(y=gr(n),y!==null&&(b.data=y)))),(y=dr?vr(e,n):yr(e,n))&&(b=Jf(r,`onBeforeInput`),0<b.length&&(v=new Yn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:v,listeners:b}),v.data=y)),If(o,e,r,n,i)}Vf(o,t)})}function qf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Jf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=wn(e,n),i!=null&&r.unshift(qf(e,i,a)),i=wn(e,t),i!=null&&r.push(qf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Yf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xf(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=wn(n,a),l!=null&&o.unshift(qf(n,l,c))):i||(l=wn(n,a),l!=null&&o.push(qf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Zf=/\r\n?/g,Qf=/\u0000|\uFFFD/g;function $f(e){return(typeof e==`string`?e:``+e).replace(Zf,`
9
- `).replace(Qf,``)}function ep(e,t){return t=$f(t),$f(e)===t}function $(e,t,n,r,i,a){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||cn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&cn(e,``+r);else return;break;case`className`:Kt(e,`class`,r);break;case`tabIndex`:Kt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Kt(e,n,r);break;case`style`:dn(e,r,a);return;case`data`:if(t!==`object`){Kt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=hn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof a==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,i.name,i,null),$(e,t,`formEncType`,i.formEncType,i,null),$(e,t,`formMethod`,i.formMethod,i,null),$(e,t,`formTarget`,i.formTarget,i,null)):($(e,t,`encType`,i.encType,i,null),$(e,t,`method`,i.method,i,null),$(e,t,`target`,i.target,i,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=hn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=gn);return;case`onScroll`:r!=null&&Q(`scroll`,e);return;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(o(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(o(60));a?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=hn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),Gt(e,`popover`,r);break;case`xlinkActuate`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Gt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=pn.get(n)||n,Gt(e,n,r);else return}V=!0}function tp(e,t,n,r,i,a){switch(n){case`style`:dn(e,r,a);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(o(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(o(60));a?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)cn(e,r);else if(typeof r==`number`||typeof r==`bigint`)cn(e,``+r);else return;break;case`onScroll`:r!=null&&Q(`scroll`,e);return;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=gn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Lt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),a=n.slice(2,i?n.length-7:void 0),t=e[xt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(a,t,i),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(a,r,i);break a}V=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Gt(e,n,r)}return}V=!0}function np(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var s=n[a];if(s!=null)switch(a){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(o(137,t));default:$(e,t,a,s,n,null)}}i&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=a=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:a=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(o(137,t));break;default:$(e,t,r,d,n,null)}}nn(e,a,c,l,u,s,i,!1);return;case`select`:for(i in Q(`invalid`,e),r=s=a=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:a=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,i,c,n,null)}t=a,n=s,e.multiple=!!r,t==null?n!=null&&an(e,!!r,n,!0):an(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),a=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:a=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(o(91));break;default:$(e,t,s,c,n,null)}sn(e,r,i,a);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<zf.length;r++)Q(zf[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(o(137,t));default:$(e,t,u,r,n,null)}return;default:if(fn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&tp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}var rp={};function ip(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,a=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(V=!0),a=m;break;case`name`:m!==f&&(V=!0),i=m;break;case`checked`:m!==f&&(V=!0),u=m;break;case`defaultChecked`:m!==f&&(V=!0),d=m;break;case`value`:m!==f&&(V=!0),s=m;break;case`defaultValue`:m!==f&&(V=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(o(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}tn(e,s,c,l,u,d,a,i);return;case`select`:for(a in m=s=c=p=null,n)if(l=n[a],n.hasOwnProperty(a)&&l!=null)switch(a){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(a)||$(e,t,a,null,r,l)}for(i in r)if(a=r[i],l=n[i],r.hasOwnProperty(i)&&(a!=null||l!=null))switch(i){case`value`:a!==l&&(V=!0),p=a;break;case`defaultValue`:a!==l&&(V=!0),c=a;break;case`multiple`:a!==l&&(V=!0),s=a;default:a!==l&&$(e,t,i,a,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?an(e,!!n,n?[]:``,!1):an(e,!!n,t,!0)):an(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,i)}for(s in r)if(i=r[s],a=n[s],r.hasOwnProperty(s)&&(i!=null||a!=null))switch(s){case`value`:i!==a&&(V=!0),p=i;break;case`defaultValue`:i!==a&&(V=!0),m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(o(91));break;default:i!==a&&$(e,t,s,i,r,a)}on(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(V=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(o(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(fn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&tp(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||tp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function ap(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function op(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&ap(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&ap(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var sp=null,cp=null;function lp(e){return e.nodeType===9?e:e.ownerDocument}function up(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function dp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function fp(e,t,n,r){return n=lp(n).createElement(e),n[bt]=r,n[xt]=t,np(n,e,t),Pt(n),n}function pp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var mp=null;function hp(){var e=window.event;return e&&e.type===`popstate`?e!==mp&&(mp=e,!0):(mp=null,!1)}var gp=typeof setTimeout==`function`?setTimeout:void 0,_p=typeof clearTimeout==`function`?clearTimeout:void 0,vp=typeof Promise==`function`?Promise:void 0,yp=typeof requestAnimationFrame==`function`?requestAnimationFrame:gp,bp=typeof queueMicrotask==`function`?queueMicrotask:vp===void 0?gp:function(e){return vp.resolve(null).then(e).catch(xp)};function xp(e){setTimeout(function(){throw e})}function Sp(e){return e===`head`}function Cp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Hh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)_m(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,_m(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Dt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&_m(e.ownerDocument.body)}n=i}while(n);Hh(t)}function wp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Tp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Ep(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Dp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Op(e){return Dp(e.getBoundingClientRect(),getComputedStyle(e),e)}function kp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Dp(t,n,e)}function Ap(e){return e.documentElement.clientHeight}function jp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Mp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Ap(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Xm(f),u>$m){s.length=o;break}f=new Promise(jp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Np(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Np.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Np.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Np.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Pp(e){return{name:e,group:new Np(`group`,e),imagePair:new Np(`image-pair`,e),old:new Np(`old`,e),new:new Np(`new`,e)}}function Fp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Fp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Bp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Rp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),h(this._fragmentFiber.child,!1,Ip,e,s,r)}this._eventListeners=a}};function Ip(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Fp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Bp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Rp(i.optionsOrUseCapture),h(this._fragmentFiber.child,!1,Lp,e,n,i),r.splice(t,1),a!==null&&a()}};function Lp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Rp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function zp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Bp(e,t,n,r){if(e.length===0)return-1;r=zp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&zp(a.optionsOrUseCapture)===r)return i}return-1}Fp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Rp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Rp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Fp.prototype.focus=function(e){h(this._fragmentFiber.child,!0,Vp,e,void 0,void 0)};function Vp(e,t){return e.tag!==6&&(e=b(e),pm(e,t))}Fp.prototype.focusLast=function(e){var t=[];h(this._fragmentFiber.child,!0,Hp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Vp(t[n],e);n--);};function Hp(e,t){return t.push(e),!1}Fp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=lp(e).activeElement,e!==null&&h(this._fragmentFiber.child,!1,Up,e,void 0,void 0))};function Up(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Fp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),h(this._fragmentFiber.child,!1,Wp,e,void 0,void 0)};function Wp(e,t){return e.tag!==6&&(e=b(e),t.observe(e),!1)}Fp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),h(this._fragmentFiber.child,!1,Gp,e,void 0,void 0);for(var n=t=0;n<Kp.length;n++){var r=Kp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Kp[t++]=r}Kp.length=t}};function Gp(e,t){return e.tag!==6&&(e=b(e),t.unobserve(e),!1)}var Kp=[],qp=!1;function Jp(e,t,n){Kp.push({fragmentInstance:e,observer:t,instance:n}),qp||(qp=!0,mm(function(){qp=!1;var e=Kp;Kp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Fp.prototype.getClientRects=function(){var e=[];return h(this._fragmentFiber.child,!1,Yp,e,void 0,void 0),e};function Yp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Fp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Fp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];h(this._fragmentFiber.child,!1,Hp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Xp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Xp(e,t,n,r,i){var a=At(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(h(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(h(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function Zp(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Fp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(o(566));var t=[];h(this._fragmentFiber.child,!1,Hp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),Zp(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var i=t[r];i.tag===6?(i=b(i),Zp(i,n)):b(i).scrollIntoView(e),r+=n?-1:1}};function Qp(e,t){return e=b(e),$p(e,t),!1}function $p(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function em(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Kp.length;i++){var a=Kp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Kp[r++]=a)}Kp.length=r,n.observe(e)}),$p(e,t))}function tm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Jp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function nm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:nm(n),kt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function rm(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Dt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=lm(e.nextSibling),e===null)break}return null}function im(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lm(e.nextSibling),e===null))return null;return e}function am(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lm(e.nextSibling),e===null))return null;return e}function om(e){return e.data===`$?`||e.data===`$~`}function sm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function lm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var um=null;function dm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function fm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function pm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function mm(e){yp(function(){yp(function(t){return e(t)})})}function hm(e,t,n){switch(t=lp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(o(452));return e;case`head`:if(e=t.head,!e)throw Error(o(453));return e;case`body`:if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function gm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&$(e,t,r,null,rp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===gn&&(e.onclick=null),kt(e)}function _m(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);kt(e)}var vm=new Map,ym=new Set;function bm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var xm=I.d;I.d={f:Sm,r:Cm,D:Em,C:Dm,L:Om,m:km,X:jm,S:Am,M:Mm};function Sm(){var e=xm.f(),t=zd();return e||t}function Cm(e){var t=jt(e);t!==null&&t.tag===5&&t.type===`form`?tc(t):xm.r(e)}var wm=typeof document>`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=en(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),ym.has(i)||(ym.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),np(t,`link`,e),Pt(t),r.head.appendChild(t)))}}function Em(e){xm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){xm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){xm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+en(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+en(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+en(n.imageSizes)+`"]`)):i+=`[href="`+en(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(vm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);np(o,`link`,e),t===`style`&&(o[Ot]=!0,o.onload=o.onerror=function(){Ft(o)}),Pt(o),r.head.appendChild(o)}}}function km(e,t){xm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+en(r)+`"][href="`+en(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!vm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),vm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),np(r,`link`,e),Pt(r),n.head.appendChild(r)}}}function Am(e,t,n){xm.S(e,t,n);var r=wm;if(r&&e){var i=Nt(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vm.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);Pt(c),np(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){xm.X(e,t);var n=wm;if(n&&e){var r=Nt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=D({src:e,async:!0},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Pt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){xm.M(e,t);var n=wm;if(n&&e){var r=Nt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Pt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var i=(i=be.current)?bm(i):null;if(!i)throw Error(o(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Pm(n.href),t=Nt(i).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pm(n.href);var a=Nt(i).hoistableStyles,s=a.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},a.set(e,s),(a=i.querySelector(Fm(e)))?a._p||(s.instance=a,s.state.loading=5):(a=vm.get(e),a||(a={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vm.set(e,a)),Lm(i,e,a,s.state))),t&&r===null)throw Error(o(528,``));return s}if(t&&r!==null)throw Error(o(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=Nt(i).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Pm(e){return`href="`+en(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Ot]){r.loading=1;return}}else t=e.createElement(`link`),t[Ot]=!0,t.onload=t.onerror=Ft.bind(null,t),np(t,`link`,n),Pt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+en(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+en(n.href)+`"]`);if(r)return t.instance=r,Pt(r),r;var i=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Pt(r),np(r,`style`,i),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Pm(n.href);var a=e.querySelector(Fm(i));if(a)return t.state.loading|=4,t.instance=a,Pt(a),a;r=Im(n),(i=vm.get(i))&&Hm(r,i),a=(e.ownerDocument||e).createElement(`link`),Pt(a);var s=a;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),np(a,`link`,r),t.state.loading|=4,Vm(a,n.precedence,e),t.instance=a;case`script`:return a=Rm(n.src),(i=e.querySelector(zm(a)))?(t.instance=i,Pt(i),i):(r=n,(i=vm.get(a))&&(r=D({},n),Um(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),Pt(i),np(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(o(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vm(r,n.precedence,e));return t.instance}function Vm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Hm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Wm=null;function Gm(e,t,n){if(Wm===null){var r=new Map,i=Wm=new Map;i.set(n,r)}else i=Wm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Dt]||a[bt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Km(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function qm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Pt(a);return}a=t.ownerDocument||t,r=Im(r),(i=vm.get(i))&&Hm(r,i),a=a.createElement(`link`),Pt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),np(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&$m===0&&($m=62500*op());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=nh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var sh={$$typeof:M,Provider:null,Consumer:null,_currentValue:L,_currentValue2:L,_threadCount:0};function ch(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=lt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lt(0),this.hiddenUpdates=lt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function lh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ch(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Ai(3,null,null,t),e.current=a,a.stateNode=e,t=Aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},po(a),e}function uh(e){return e?(e=Oi,e):Oi}function dh(e,t,n,r,i,a){i=uh(i),r.context===null?r.context=i:r.pendingContext=i,r=ho(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=go(e,r,t),n!==null&&(Pd(n,e,t),_o(n,e,t))}function fh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ph(e,t){fh(e,t),(e=e.alternate)&&fh(e,t)}function mh(e){if(e.tag===13||e.tag===31){var t=Ti(e,67108864);t!==null&&Pd(t,e,67108864),ph(e,67108864)}}function hh(e){if(e.tag===13||e.tag===31){var t=jd();t=ht(t);var n=Ti(e,t);n!==null&&Pd(n,e,t),ph(e,t)}}var gh=!0;function _h(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=2,yh(e,t,n,r)}finally{I.p=a,F.T=i}}function vh(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=8,yh(e,t,n,r)}finally{I.p=a,F.T=i}}function yh(e,t,n,r){if(gh){var i=bh(r);if(i===null)Kf(e,t,r,xh,n),Mh(e,r);else if(Ph(i,e,t,n,r))r.stopPropagation();else if(Mh(e,r),t&4&&-1<jh.indexOf(e)){for(;i!==null;){var a=jt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=rt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Xe(o);s.entanglements[1]|=c,o&=~c}Ef(a),!(K&6)&&(gd=Re()+500,Df(0,!1))}}break;case 31:case 13:s=Ti(a,2),s!==null&&Pd(s,a,2),zd(),ph(a,2)}if(a=bh(r),a===null&&Kf(e,t,r,xh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Kf(e,t,r,null,n)}}function bh(e){return e=vn(e),Sh(e)}var xh=null;function Sh(e){if(xh=null,e=At(e),e!==null){var t=l(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=u(t),e!==null)return e;e=null}else if(n===31){if(e=d(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return xh=e,null}function Ch(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(ze()){case Be:return 2;case Ve:return 8;case He:case Ue:return 32;case We:return 268435456;default:return 32}default:return 32}}var wh=!1,Th=null,Eh=null,Dh=null,Oh=new Map,kh=new Map,Ah=[],jh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Mh(e,t){switch(e){case`focusin`:case`focusout`:Th=null;break;case`dragenter`:case`dragleave`:Eh=null;break;case`mouseover`:case`mouseout`:Dh=null;break;case`pointerover`:case`pointerout`:Oh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kh.delete(t.pointerId)}}function Nh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=jt(t),t!==null&&mh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ph(e,t,n,r,i){switch(t){case`focusin`:return Th=Nh(Th,e,t,n,r,i),!0;case`dragenter`:return Eh=Nh(Eh,e,t,n,r,i),!0;case`mouseover`:return Dh=Nh(Dh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Oh.set(a,Nh(Oh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kh.set(a,Nh(kh.get(a)||null,e,t,n,r,i)),!0}return!1}function Fh(e){var t=At(e.target);if(t!==null){var n=l(t);if(n!==null){if(t=n.tag,t===13){if(t=u(n),t!==null){e.blockedOn=t,vt(e.priority,function(){hh(n)});return}}else if(t===31){if(t=d(n),t!==null){e.blockedOn=t,vt(e.priority,function(){hh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ih(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);_n=r,n.target.dispatchEvent(r),_n=null}else return t=jt(n),t!==null&&mh(t),e.blockedOn=n,!1;t.shift()}return!0}function Lh(e,t,n){Ih(e)&&n.delete(t)}function Rh(){wh=!1,Th!==null&&Ih(Th)&&(Th=null),Eh!==null&&Ih(Eh)&&(Eh=null),Dh!==null&&Ih(Dh)&&(Dh=null),Oh.forEach(Lh),kh.forEach(Lh)}function zh(e,t){e.blockedOn===t&&(e.blockedOn=null,wh||(wh=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Rh)))}var Bh=null;function Vh(e){Bh!==e&&(Bh=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Bh===e&&(Bh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Sh(r||n)===null)continue;break}var a=jt(n);a!==null&&(e.splice(t,3),t-=3,$s(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hh(e){function t(t){return zh(t,e)}Th!==null&&zh(Th,e),Eh!==null&&zh(Eh,e),Dh!==null&&zh(Dh,e),Oh.forEach(t),kh.forEach(t);for(var n=0;n<Ah.length;n++){var r=Ah[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ah.length&&(n=Ah[0],n.blockedOn===null);)Fh(n),n.blockedOn===null&&Ah.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[xt]||null;if(typeof a==`function`)o||Vh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[xt]||null)s=o.formAction;else if(Sh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vh(n)}}}function Uh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Wh(e){this._internalRoot=e}Gh.prototype.render=Wh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var n=t.current;dh(n,jd(),e,t,null,null)},Gh.prototype.unmount=Wh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dh(e.current,2,null,e,null,null),zd(),t[St]=null}};function Gh(e){this._internalRoot=e}Gh.prototype.unstable_scheduleHydration=function(e){if(e){var t=_t();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ah.length&&t!==0&&t<Ah[n].priority;n++);Ah.splice(n,0,e),n===0&&Fh(e)}};var Kh=r.version;if(Kh!==`19.3.0`)throw Error(o(527,Kh,`19.3.0`));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(o(188)):(e=Object.keys(e).join(`,`),Error(o(268,e)));return e=p(t),e=e===null?null:m(e),e=e===null?null:e.stateNode,e};var qh={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:F,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{qe=Jh.inject(qh),Je=Jh}catch{}}e.createRoot=function(e,t){if(!c(e))throw Error(o(299));var n=!1,r=``,i=Sc,a=Cc,s=wc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=lh(e,1,!1,null,null,n,r,null,i,a,s,Uh),e[St]=t.current,Wf(e),new Wh(t)}})),l=r(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=c()})),u=n(t(),1),d=e(),f=s(),p=l(),m=new WeakMap;function h(e,t){let n=m.get(e);n||(n=new Set,m.set(e,n)),n.add(t)}function g(e,t){m.get(e)?.delete(t)}function _(e,t){return m.get(e)?.has(t)??!1}var v=class{attributes;nameToAttribute;constructor(){this.attributes=[],this.nameToAttribute=new Map}addWithAll(e,t,n,r){let i=new y(e,t,n,r);return this.attributes.push(i),this.nameToAttribute.set(e,i),i}addInherited(e,t){return this.addWithAll(e,t,void 0,!1)}add(e,t,n){return this.addWithAll(e,void 0,t,n)}getAttributes(){return this.attributes}getModelName(e){let t=this.nameToAttribute.get(e);if(t!==void 0)return t.modelName}toJson(e,t){for(let n of this.attributes){let r=t[n.name];(n.alwaysWriteJson||r!==void 0&&r!==n.defaultValue||n.preserveIfExplicit&&r!==void 0&&_(t,n.name))&&(e[n.name]=r)}}fromJson(e,t){for(let n of this.attributes){let r=e[n.name];r===void 0&&n.alias&&(r=e[n.alias]),r===void 0?(t[n.name]=n.defaultValue,g(t,n.name)):(t[n.name]=r,h(t,n.name))}}update(e,t){for(let n of this.attributes){let r=n.name;if(!Object.prototype.hasOwnProperty.call(e,r)&&n.alias!==void 0&&Object.prototype.hasOwnProperty.call(e,n.alias)&&(r=n.alias),Object.prototype.hasOwnProperty.call(e,r)){let i=e[r];i===void 0?(delete t[n.name],g(t,n.name)):(t[n.name]=i,h(t,n.name))}}}setDefaults(e){for(let t of this.attributes)e[t.name]=t.defaultValue,g(e,t.name)}pairAttributes(e,t){for(let n of t.attributes)if(n.modelName&&this.nameToAttribute.has(n.modelName)){let t=this.nameToAttribute.get(n.modelName);t.setpairedAttr(n),n.setpairedAttr(t),t.setPairedType(e)}}toTypescriptInterface(e,t){let n=[],r=[...this.attributes].sort((e,t)=>e.name.localeCompare(t.name));n.push(`export interface I`+e+`Attributes {`);for(let e=0;e<r.length;e++){let i=r[e],a=i.type,o,s=i,c;s.defaultValue===void 0?s.modelName!==void 0&&t!==void 0&&t.nameToAttribute.get(s.modelName)!==void 0&&(c=s.modelName,s=t.nameToAttribute.get(c),o=s.defaultValue,a=s.type):o=s.defaultValue;let l=JSON.stringify(o),u=s.required?``:`?`,d=` /**
10
- `;i.description?d+=i.description:i.pairedType&&i.pairedAttr?.description&&(d+=`Value for ${i.pairedType} attribute ${i.pairedAttr.name} if not overridden`,d+=`
11
-
12
- `,d+=i.pairedAttr?.description),d+=`
13
-
14
- `,i.fixed?d+=`Fixed value: ${l}`:d+=c?`Default: inherited from Global attribute ${i.modelName} (default ${l})`:`Default: ${l}`,d+=`
15
- */`,n.push(d),n.push(` `+i.name+u+`: `+a+`;
16
- `)}return n.push(`}`),n.join(`
17
- `)}},y=class{static NUMBER=`number`;static STRING=`string`;static BOOLEAN=`boolean`;name;alias;modelName;pairedAttr;pairedType;defaultValue;alwaysWriteJson;preserveIfExplicit;type;required;fixed;description;values;constructor(e,t,n,r){this.name=e,this.alias=void 0,this.modelName=t,this.defaultValue=n,this.alwaysWriteJson=r,this.required=!1,this.fixed=!1,this.type=`any`}setType(e){return this.type=e,this}getEffectiveType(){return this.type===`any`?this.pairedAttr?.type:this.type}setAlias(e){return this.alias=e,this}setPreserveIfExplicit(e=!0){return this.preserveIfExplicit=e,this}setDescription(e){this.description=e}setValues(e){return this.values=e.map(e=>typeof e==`object`&&e&&`value`in e?{value:e.value,label:e.label===void 0?String(e.value):e.label}:{value:e,label:typeof e==`string`?e.charAt(0).toUpperCase()+e.slice(1):String(e)}),this}getValues(){return this.values===void 0?this.pairedAttr?.values:this.values}setRequired(){return this.required=!0,this}setFixed(){return this.fixed=!0,this}setpairedAttr(e){this.pairedAttr=e}setPairedType(e){this.pairedType=e}},b=class e{static empty(){return new e(0,0,0,0)}static fromJson(t){return new e(t.x,t.y,t.width,t.height)}x;y;width;height;constructor(e,t,n,r){this.x=e,this.y=t,this.width=n,this.height=r}toJson(){return{x:this.x,y:this.y,width:this.width,height:this.height}}snap(e){this.x=Math.round(this.x/e)*e,this.y=Math.round(this.y/e)*e,this.width=Math.round(this.width/e)*e,this.height=Math.round(this.height/e)*e}static getBoundingClientRect(t){let{x:n,y:r,width:i,height:a}=t.getBoundingClientRect();return new e(n,r,i,a)}static fromDomRect(t){return new e(t.x,t.y,t.width,t.height)}relativeTo(t){return new e(this.x-t.x,this.y-t.y,this.width,this.height)}clone(){return new e(this.x,this.y,this.width,this.height)}equals(e){return this.x===e?.x&&this.y===e?.y&&this.width===e?.width&&this.height===e?.height}equalsWhenRounded(e){if(!e)return!1;let t=.5;return Math.abs(this.x-e.x)<t&&Math.abs(this.y-e.y)<t&&Math.abs(this.width-e.width)<t&&Math.abs(this.height-e.height)<t}getBottom(){return this.y+this.height}getRight(){return this.x+this.width}get bottom(){return this.y+this.height}get right(){return this.x+this.width}getCenter(){return{x:this.x+this.width/2,y:this.y+this.height/2}}positionElement(e,t){this.styleWithPosition(e.style,t)}styleWithPosition(e,t=`absolute`){return e.left=this.x+`px`,e.top=this.y+`px`,e.width=Math.max(0,this.width)+`px`,e.height=Math.max(0,this.height)+`px`,e.position=t,e}contains(e,t){return this.x<=e&&e<=this.getRight()&&this.y<=t&&t<=this.getBottom()}centerInRect(e){this.x=e.x+(e.width-this.width)/2,this.y=e.y+(e.height-this.height)/2}clamp(e){this.width>e.width&&(this.width=e.width),this.height>e.height&&(this.height=e.height),this.x<e.x&&(this.x=e.x),this.y<e.y&&(this.y=e.y),this.getRight()>e.getRight()&&(this.x=e.getRight()-this.width),this.getBottom()>e.getBottom()&&(this.y=e.getBottom()-this.height),this.x<e.x&&(this.x=e.x),this.y<e.y&&(this.y=e.y)}toString(){return`(Rect: x=`+this.x+`, y=`+this.y+`, width=`+this.width+`, height=`+this.height+`)`}},x=class e{static HORZ=new e(`horz`);static VERT=new e(`vert`);static flip(t){return t===e.HORZ?e.VERT:e.HORZ}_name;constructor(e){this._name=e}getName(){return this._name}toString(){return this._name}},S=class e{static values=new Map;static TOP=new e(`top`,x.VERT,0);static BOTTOM=new e(`bottom`,x.VERT,1);static LEFT=new e(`left`,x.HORZ,0);static RIGHT=new e(`right`,x.HORZ,1);static CENTER=new e(`center`,x.VERT,0);static getByName(t){let n=e.values.get(t);if(n===void 0)throw Error(`Error: unknown dock location "${t}"`);return n}static getLocation(t,n,r,i=!1){if(!(t.width>0)||!(t.height>0)||(n=(n-t.x)/t.width,r=(r-t.y)/t.height,!i&&n>=.25&&n<.75&&r>=.25&&r<.75))return e.CENTER;let a=r>=n,o=r>=1-n;return a?o?e.BOTTOM:e.LEFT:o?e.RIGHT:e.TOP}name;orientation;indexPlus;constructor(t,n,r){this.name=t,this.orientation=n,this.indexPlus=r,e.values.set(this.name,this)}getName(){return this.name}getOrientation(){return this.orientation}getDockRect(t){return this===e.TOP?new b(t.x,t.y,t.width,t.height/2):this===e.BOTTOM?new b(t.x,t.getBottom()-t.height/2,t.width,t.height/2):this===e.LEFT?new b(t.x,t.y,t.width/2,t.height):this===e.RIGHT?new b(t.getRight()-t.width/2,t.y,t.width/2,t.height):t.clone()}toString(){return`(DockLocation: name=`+this.name+`, orientation=`+this.orientation+`)`}},C=class{node;rect;location;index;className;constructor(e,t,n,r,i){this.node=e,this.rect=t,this.location=n,this.index=r,this.className=i}},w=function(e){return e.FLEXLAYOUT__BORDER=`flexlayout__border`,e.FLEXLAYOUT__BORDER_=`flexlayout__border_`,e.FLEXLAYOUT__BORDER_TAB_CONTENTS=`flexlayout__border_tab_contents`,e.FLEXLAYOUT__BORDER_TAB_OVERLAY=`flexlayout__border_tab_overlay`,e.FLEXLAYOUT__BORDER_TAB_OVERLAY_=`flexlayout__border_tab_overlay_`,e.FLEXLAYOUT__BORDER_BUTTON=`flexlayout__border_button`,e.FLEXLAYOUT__BORDER_BUTTON_=`flexlayout__border_button_`,e.FLEXLAYOUT__BORDER_BUTTON_CONTENT=`flexlayout__border_button_content`,e.FLEXLAYOUT__BORDER_BUTTON_LEADING=`flexlayout__border_button_leading`,e.FLEXLAYOUT__BORDER_BUTTON_TRAILING=`flexlayout__border_button_trailing`,e.FLEXLAYOUT__BORDER_BUTTON__SELECTED=`flexlayout__border_button--selected`,e.FLEXLAYOUT__BORDER_BUTTON__UNSELECTED=`flexlayout__border_button--unselected`,e.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW=`flexlayout__border_toolbar_button_overflow`,e.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW_=`flexlayout__border_toolbar_button_overflow_`,e.FLEXLAYOUT__BORDER_INNER=`flexlayout__border_inner`,e.FLEXLAYOUT__BORDER_INNER_=`flexlayout__border_inner_`,e.FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER=`flexlayout__border_inner_tab_container`,e.FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER_=`flexlayout__border_inner_tab_container_`,e.FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER_LEFT_DOWN=`flexlayout__border_inner_tab_container_left_down`,e.FLEXLAYOUT__BORDER_TAB_DIVIDER=`flexlayout__border_tab_divider`,e.FLEXLAYOUT__BORDER_LEADING=`flexlayout__border_leading`,e.FLEXLAYOUT__BORDER_SIZER=`flexlayout__border_sizer`,e.FLEXLAYOUT__BORDER_TOOLBAR=`flexlayout__border_toolbar`,e.FLEXLAYOUT__BORDER_TOOLBAR_=`flexlayout__border_toolbar_`,e.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON=`flexlayout__border_toolbar_button`,e.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_FLOAT=`flexlayout__border_toolbar_button-float`,e.FLEXLAYOUT__DRAG_RECT=`flexlayout__drag_rect`,e.FLEXLAYOUT__EDGE_RECT=`flexlayout__edge_rect`,e.FLEXLAYOUT__EDGE_RECT_TOP=`flexlayout__edge_rect_top`,e.FLEXLAYOUT__EDGE_RECT_LEFT=`flexlayout__edge_rect_left`,e.FLEXLAYOUT__EDGE_RECT_BOTTOM=`flexlayout__edge_rect_bottom`,e.FLEXLAYOUT__EDGE_RECT_RIGHT=`flexlayout__edge_rect_right`,e.FLEXLAYOUT__ERROR_BOUNDARY_CONTAINER=`flexlayout__error_boundary_container`,e.FLEXLAYOUT__ERROR_BOUNDARY_CONTENT=`flexlayout__error_boundary_content`,e.FLEXLAYOUT__FLOAT_WINDOW=`flexlayout__float_window`,e.FLEXLAYOUT__FLOAT_WINDOW_HEADER=`flexlayout__float_window_header`,e.FLEXLAYOUT__FLOAT_WINDOW_HEADER_TITLE=`flexlayout__float_window_header_title`,e.FLEXLAYOUT__FLOAT_WINDOW_CONTENT=`flexlayout__float_window_content`,e.FLEXLAYOUT__FLOAT_WINDOW_DRAG_HANDLE=`flexlayout__float_window_drag_handle`,e.FLEXLAYOUT__FLOAT_WINDOW_BUTTON=`flexlayout__float_window_button`,e.FLEXLAYOUT__FLOATING_WINDOW_CONTENT=`flexlayout__floating_window_content`,e.FLEXLAYOUT__LAYOUT=`flexlayout__layout`,e.FLEXLAYOUT__LAYOUT_METRICS=`flexlayout__layout_metrics`,e.FLEXLAYOUT__LAYOUT_MOVEABLES_HOME=`flexlayout__layout_moveables_home`,e.FLEXLAYOUT__LAYOUT_OVERLAY=`flexlayout__layout_overlay`,e.FLEXLAYOUT__LAYOUT_TAB_STAMPS=`flexlayout__layout_tab_stamps`,e.FLEXLAYOUT__LAYOUT_MAIN=`flexlayout__layout_main`,e.FLEXLAYOUT__LAYOUT_BORDER_CONTAINER=`flexlayout__layout_border_container`,e.FLEXLAYOUT__LAYOUT_BORDER_CONTAINER_INNER=`flexlayout__layout_border_container_inner`,e.FLEXLAYOUT__OUTLINE_RECT=`flexlayout__outline_rect`,e.FLEXLAYOUT__OUTLINE_RECT_EDGE=`flexlayout__outline_rect_edge`,e.FLEXLAYOUT__SPLITTER=`flexlayout__splitter`,e.FLEXLAYOUT__SPLITTER_=`flexlayout__splitter_`,e.FLEXLAYOUT__SPLITTER_BORDER=`flexlayout__splitter_border`,e.FLEXLAYOUT__SPLITTER_DRAG=`flexlayout__splitter_drag`,e.FLEXLAYOUT__SPLITTER_HANDLE=`flexlayout__splitter_handle`,e.FLEXLAYOUT__SPLITTER_HANDLE_HORZ=`flexlayout__splitter_handle_horz`,e.FLEXLAYOUT__SPLITTER_HANDLE_VERT=`flexlayout__splitter_handle_vert`,e.FLEXLAYOUT__ROW=`flexlayout__row`,e.FLEXLAYOUT__TAB=`flexlayout__tab`,e.FLEXLAYOUT__TAB_MOVEABLE=`flexlayout__tab_moveable`,e.FLEXLAYOUT__TAB_OVERLAY=`flexlayout__tab_overlay`,e.FLEXLAYOUT__TAB_OVERLAY_RAISED=`flexlayout__tab_overlay_raised`,e.FLEXLAYOUT__TAB_LAYOUT_CONTAINER=`flexlayout__tab_layout_container`,e.FLEXLAYOUT__TAB_LAYOUT_CONTAINER_USER=`flexlayout__tab_layout_container_user`,e.FLEXLAYOUT__TABSET=`flexlayout__tabset`,e.FLEXLAYOUT__TABSET_CONTAINER=`flexlayout__tabset_container`,e.FLEXLAYOUT__TABSET_MAXIMIZED=`flexlayout__tabset-maximized`,e.FLEXLAYOUT__TABSET_SELECTED=`flexlayout__tabset-selected`,e.FLEXLAYOUT__TABSET_TAB_SPACER=`flexlayout__tabset_tab_spacer`,e.FLEXLAYOUT__TABSET_TAB_DIVIDER=`flexlayout__tabset_tab_divider`,e.FLEXLAYOUT__TABSET_TAB_DIVIDER_SELECTED_BEFORE=`flexlayout__tabset_tab_divider_selected_before`,e.FLEXLAYOUT__TABSET_TAB_DIVIDER_SELECTED_AFTER=`flexlayout__tabset_tab_divider_selected_after`,e.FLEXLAYOUT__TABSET_TAB_DIVIDER_INNER=`flexlayout__tabset_tab_divider_inner`,e.FLEXLAYOUT__TABSET_CONTENT=`flexlayout__tabset_content`,e.FLEXLAYOUT__TABSET_TABBAR_INNER=`flexlayout__tabset_tabbar_inner`,e.FLEXLAYOUT__TABSET_TABBAR_INNER_=`flexlayout__tabset_tabbar_inner_`,e.FLEXLAYOUT__TABSET_LEADING=`flexlayout__tabset_leading`,e.FLEXLAYOUT__GROUP_PILL=`flexlayout__group_pill`,e.FLEXLAYOUT__GROUP_PILL_COLLAPSED=`flexlayout__group_pill_collapsed`,e.FLEXLAYOUT__GROUP_PILL_UNDERLINE=`flexlayout__group_pill_underline`,e.FLEXLAYOUT__GROUP_PILL_NAME=`flexlayout__group_pill_name`,e.FLEXLAYOUT__GROUP_PILL_COUNT=`flexlayout__group_pill_count`,e.FLEXLAYOUT__GROUP_END_MARKER=`flexlayout__group_end_marker`,e.FLEXLAYOUT__GROUP_RENAME=`flexlayout__group_rename`,e.FLEXLAYOUT__GROUP_RENAME_INPUT=`flexlayout__group_rename_input`,e.FLEXLAYOUT__TAB_BUTTON_GROUPED=`flexlayout__tab_button_grouped`,e.FLEXLAYOUT__TAB_BUTTON_GROUPED_UNDERLINE=`flexlayout__tab_button_grouped_underline`,e.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER=`flexlayout__tabset_tabbar_inner_tab_container`,e.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER_=`flexlayout__tabset_tabbar_inner_tab_container_`,e.FLEXLAYOUT__TABSET_TABBAR_OUTER=`flexlayout__tabset_tabbar_outer`,e.FLEXLAYOUT__TABSET_TABBAR_OUTER_=`flexlayout__tabset_tabbar_outer_`,e.FLEXLAYOUT__TAB_BORDER=`flexlayout__tab_border`,e.FLEXLAYOUT__TAB_BORDER_=`flexlayout__tab_border_`,e.FLEXLAYOUT__TAB_BORDER_OVERLAY=`flexlayout__tab_border_overlay`,e.FLEXLAYOUT__TAB_BUTTON=`flexlayout__tab_button`,e.FLEXLAYOUT__TAB_BUTTON_STRETCH=`flexlayout__tab_button_stretch`,e.FLEXLAYOUT__TAB_BUTTON_CONTENT=`flexlayout__tab_button_content`,e.FLEXLAYOUT__TAB_BUTTON_LEADING=`flexlayout__tab_button_leading`,e.FLEXLAYOUT__TAB_BUTTON_OVERFLOW=`flexlayout__tab_button_overflow`,e.FLEXLAYOUT__TAB_BUTTON_PIN=`flexlayout__tab_button_pin`,e.FLEXLAYOUT__TAB_BUTTON_OVERFLOW_COUNT=`flexlayout__tab_button_overflow_count`,e.FLEXLAYOUT__TAB_BUTTON_TEXTBOX=`flexlayout__tab_button_textbox`,e.FLEXLAYOUT__TAB_BUTTON_TRAILING=`flexlayout__tab_button_trailing`,e.FLEXLAYOUT__TAB_BUTTON_STAMP=`flexlayout__tab_button_stamp`,e.FLEXLAYOUT__TAB_TOOLBAR=`flexlayout__tab_toolbar`,e.FLEXLAYOUT__TAB_TOOLBAR_BUTTON=`flexlayout__tab_toolbar_button`,e.FLEXLAYOUT__TAB_TOOLBAR_ICON=`flexlayout__tab_toolbar_icon`,e.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_=`flexlayout__tab_toolbar_button-`,e.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_FLOAT=`flexlayout__tab_toolbar_button-float`,e.FLEXLAYOUT__TAB_TOOLBAR_STICKY_BUTTONS_CONTAINER=`flexlayout__tab_toolbar_sticky_buttons_container`,e.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_CLOSE=`flexlayout__tab_toolbar_button-close`,e.FLEXLAYOUT__POPUP_MENU_CONTAINER=`flexlayout__popup_menu_container`,e.FLEXLAYOUT__POPUP_MENU_ITEM=`flexlayout__popup_menu_item`,e.FLEXLAYOUT__POPUP_MENU_ITEM__SELECTED=`flexlayout__popup_menu_item--selected`,e.FLEXLAYOUT__POPUP_MENU_ITEM__DISABLED=`flexlayout__popup_menu_item--disabled`,e.FLEXLAYOUT__POPUP_MENU_ITEM_GROUPED=`flexlayout__popup_menu_item_grouped`,e.FLEXLAYOUT__POPUP_MENU_DIVIDER=`flexlayout__popup_menu_divider`,e.FLEXLAYOUT__POPUP_MENU=`flexlayout__popup_menu`,e.FLEXLAYOUT__MINI_SCROLLBAR=`flexlayout__mini_scrollbar`,e.FLEXLAYOUT__MINI_SCROLLBAR_CONTAINER=`flexlayout__mini_scrollbar_container`,e}({}),T=class e{static ADD_TAB=`FlexLayout_AddTab`;static DELETE_TAB=`FlexLayout_DeleteTab`;static RENAME_TAB=`FlexLayout_RenameTab`;static SET_TAB_PINNED=`FlexLayout_SetTabPinned`;static SET_BORDER_TYPE=`FlexLayout_SetBorderType`;static SELECT_TAB=`FlexLayout_SelectTab`;static MOVE_NODE=`FlexLayout_MoveNode`;static DELETE_TABSET=`FlexLayout_DeleteTabset`;static SET_ACTIVE_TABSET=`FlexLayout_SetActiveTabset`;static ADJUST_WEIGHTS=`FlexLayout_AdjustWeights`;static ADJUST_BORDER_SPLIT=`FlexLayout_AdjustBorderSplit`;static MAXIMIZE_TOGGLE=`FlexLayout_MaximizeToggle`;static UPDATE_MODEL_ATTRIBUTES=`FlexLayout_UpdateModelAttributes`;static UPDATE_NODE_ATTRIBUTES=`FlexLayout_UpdateNodeAttributes`;static UPDATE_SUBLAYOUT_ATTRIBUTES=`FlexLayout_UpdateSubLayoutAttributes`;static POPOUT_TAB=`FlexLayout_PopoutTab`;static POPOUT_TABSET=`FlexLayout_PopoutTabset`;static CLOSE_POPOUT=`FlexLayout_ClosePopout`;static MOVE_FLOAT_TO_FRONT=`FlexLayout_MoveFloatToFront`;static MOVE_FLOAT=`FlexLayout_MoveFloat`;static DOCK_FLOAT_TO_LAYOUT=`FlexLayout_DockFloatToLayout`;static POPOUT_FLOAT=`FlexLayout_PopoutFloat`;static CREATE_SUBLAYOUT=`FlexLayout_CreateSubLayout`;static ADD_TAB_TO_NEW_GROUP=`FlexLayout_AddTabToNewGroup`;static UNGROUP=`FlexLayout_Ungroup`;static REMOVE_TAB_FROM_GROUP=`FlexLayout_RemoveTabFromGroup`;static GROUP=`FlexLayout_Group`;static group(e){return new D(e)}static addTab(t,n,r,i,a){return new E(e.ADD_TAB,{json:t,toNode:n,location:r.getName(),index:i,select:a})}static addNode(e,t,n,r,i){return this.addTab(e,t,n,r,i)}static moveNode(t,n,r,i,a){return new E(e.MOVE_NODE,{fromNode:t,toNode:n,location:r.getName(),index:i,select:a})}static deleteTab(t){return new E(e.DELETE_TAB,{node:t})}static deleteTabset(t){return new E(e.DELETE_TABSET,{node:t})}static renameTab(t,n){return new E(e.RENAME_TAB,{node:t,text:n})}static setTabPinned(t,n){return new E(e.SET_TAB_PINNED,{node:t,pinned:n})}static setBorderType(t,n){return new E(e.SET_BORDER_TYPE,{node:t,borderType:n})}static selectTab(t){return new E(e.SELECT_TAB,{tabNode:t})}static setActiveTabset(t,n){return new E(e.SET_ACTIVE_TABSET,{tabsetNode:t,layoutId:n})}static adjustWeights(t,n){return new E(e.ADJUST_WEIGHTS,{nodeId:t,weights:n})}static adjustBorderSplit(t,n){return new E(e.ADJUST_BORDER_SPLIT,{node:t,size:n})}static maximizeToggle(t,n){return new E(e.MAXIMIZE_TOGGLE,{node:t,layoutId:n})}static updateModelAttributes(t){return new E(e.UPDATE_MODEL_ATTRIBUTES,{json:t})}static updateNodeAttributes(t,n){return new E(e.UPDATE_NODE_ATTRIBUTES,{node:t,json:n})}static updateSubLayoutAttributes(t,n){return new E(e.UPDATE_SUBLAYOUT_ATTRIBUTES,{layoutId:t,json:n})}static popoutTab(t,n=`window`){return new E(e.POPOUT_TAB,{node:t,type:n})}static popoutTabset(t,n=`window`){return new E(e.POPOUT_TABSET,{node:t,type:n})}static closePopout(t){return new E(e.CLOSE_POPOUT,{layoutId:t})}static movePopoutToFront(t){return new E(e.MOVE_FLOAT_TO_FRONT,{layoutId:t})}static moveFloat(t,n){return new E(e.MOVE_FLOAT,{layoutId:t,rect:n})}static popoutFloat(t,n){return new E(e.POPOUT_FLOAT,{layoutId:t,rect:n})}static dockFloatToLayout(t,n,r,i){return new E(e.DOCK_FLOAT_TO_LAYOUT,{layoutId:t,toNode:n,location:r.getName(),index:i})}static createPopout(e,t,n){return this.createSubLayout(e,t,n)}static addTabToNewGroup(t,n,r){return new E(e.ADD_TAB_TO_NEW_GROUP,{node:t,name:n,color:r})}static ungroup(t){return new E(e.UNGROUP,{node:t})}static removeTabFromGroup(t){return new E(e.REMOVE_TAB_FROM_GROUP,{node:t})}static createSubLayout(t,n,r){return new E(e.CREATE_SUBLAYOUT,{layout:t,rect:n,type:r})}},E=class{type;data;adjusting;userData=void 0;constructor(e,t){this.type=e,this.data=t,this.adjusting=!1}setAdjusting(e){return this.adjusting=e,this}setUserData(e){return this.userData=e,this}isAdjusting(){return this.adjusting}toJSON(){return this.userData===void 0?{type:this.type,data:this.data}:{type:this.type,data:this.data,userData:this.userData}}},D=class extends E{actions;constructor(e){super(T.GROUP,e),this.actions=e}},O=class e{static fromJson(t,n){let r=new e(n);r.borders=t.map(e=>L.fromJson(e,n));for(let e of r.borders)r.borderMap.set(e.getLocation(),e);return r}borders;borderMap;constructor(e){this.borders=[],this.borderMap=new Map}toJson(){return this.borders.map(e=>e.toJson())}getBorders(){return this.borders}getBorderMap(){return this.borderMap}forEachNode(e){for(let t of this.borders){e(t,0);for(let n of t.getChildren())n.forEachNode(e,1)}}setPaths(){for(let e of this.borders){let t=`/border/`+e.getLocation().getName();e.setPath(t);let n=0;for(let r of e.getChildren())r.getType()===F.TYPE?r.setPaths(t+`/g`+n):r.setPath(t+`/t`+n),n++}}findDropTargetNode(e,t,n,r=!1){for(let i of this.borders)if(i.isShowing()){let a=i.canDrop(e,t,n,r);if(a!==void 0)return a}}},ee=function(e){return e[e.Visible=1]=`Visible`,e[e.Always=2]=`Always`,e[e.Selected=3]=`Selected`,e}({}),k=class{model;attributes;parent;children;rect;path;listeners;constructor(e){this.model=e,this.attributes={},this.children=[],this.rect=b.empty(),this.listeners=new Map,this.path=``}getId(){let e=this.attributes.id;return e===void 0?(e=this.model.nextUniqueId(),this.setId(e),e):e}getModel(){return this.model}getType(){return this.attributes.type}getParent(){return this.parent}getChildren(){return this.children}getRect(){return this.rect}getPath(){return this.path}isCloseable(){for(let e=0;e<this.children.length;e++)if(!this.children[e].isCloseable())return!1;return!0}isAllowedInWindow(){for(let e=0;e<this.children.length;e++)if(!this.children[e].isAllowedInWindow())return!1;return!0}getOrientation(){return this.parent===void 0?this.model.isRootOrientationVertical()?x.VERT:x.HORZ:x.flip(this.parent.getOrientation())}getLayoutId(){return this.getLayout().getLayoutId()}getLayout(){return this.parent?this.parent.getLayout():this.model.getMainLayout()}getLayoutRef(){return this.getLayout().getController().getLayoutRef()}getWindow(){return this.getLayout().getWindow()}getDocument(){return this.getWindow()?.document}setEventListener(e,t){this.listeners.set(e,t)}removeEventListener(e){this.listeners.delete(e)}setId(e){this.attributes.id=e}fireEvent(e,t){this.listeners.has(e)&&this.listeners.get(e)(t)}getAttr(e){let t=this.attributes[e];if(t===void 0){let n=this.getAttributeDefinitions().getModelName(e);n!==void 0&&(t=this.model.getAttribute(n))}return t}getAttributeOwn(e){return this.attributes[e]}forEachNode(e,t){e(this,t),t++;for(let n of this.children)n.forEachNode(e,t)}setPaths(e){this.path=e;let t=0;for(let n of this.children){let r=e;n.getType()===`row`?r+=`/r`+t:n.getType()===`tabset`?r+=`/ts`+t:n.getType()===`tab`?r+=`/t`+t:n.getType()===`tabgroup`&&(r+=`/g`+t),n.path=r,n.setPaths(r),t++}}setParent(e){this.parent=e}setRect(e){this.rect=e}setPath(e){this.path=e}setWeight(e){this.attributes.weight=e}setSelected(e){this.attributes.selected=e}findDropTargetNode(e,t,n,r,i=!1){let a;if(this.rect.contains(n,r)){if(this.model.getMaximizedTabset(e)!==void 0)a=this.model.getMaximizedTabset(e).canDrop(t,n,r,i);else if(a=this.canDrop(t,n,r,i),a===void 0&&this.children.length!==0){for(let o of this.children)if(a=o.findDropTargetNode(e,t,n,r,i),a!==void 0)break}}return a}canDrop(e,t,n,r=!1){}canDockInto(e,t){if(t!=null){if(t.location===S.CENTER&&t.node.isEnableDrop()===!1||t.location===S.CENTER&&e.getType()===`tabset`&&e.isEnableClose()===!1||e.getType()===`tab`&&e.isPinned()===!0&&e.getParent()!==void 0&&(t.node!==e.getParent()||t.location!==S.CENTER)||t.location===S.CENTER&&e.getType()!==`tab`&&A(e)||t.location!==S.CENTER&&t.node.isEnableDivide()===!1)return!1;if(this.model.getOnAllowDrop())return this.model.getOnAllowDrop()(e,t)}return!0}removeChild(e){let t=this.children.indexOf(e);return t!==-1&&this.children.splice(t,1),t}addChild(e,t){return t==null?(this.children.push(e),t=this.children.length-1):this.children.splice(t,0,e),e.parent=this,t}removeAll(){this.children=[]}isEnableDivide(){return!0}};function A(e){return e.getType()===`tab`?e.isPinned()===!0:e.getChildren().some(A)}function j(e,t,n,r){if(e instanceof F)return e.getLineRectAt(t,n);let i=e.getTabRect();if(i!==void 0)return r?i.x<=t&&t<=i.getRight()?i:void 0:i.y<=n&&n<=i.getBottom()?i:void 0}function te(e,t){return e?new b(t.x,t.y-2,t.width,3):new b(t.x-2,t.y,3,t.height)}function ne(e,t){return e?new b(t.x,t.getBottom()-2,t.width,3):new b(t.getRight()-2,t.y,3,t.height)}function M(e,t,n){return e?new b(t.x,(n?t.y:t.getBottom())-2,t.width,3):new b((n?t.x:t.getRight())-2,t.y,3,t.height)}function re(e,t,n,r,i,a,o,s){if(n.length===0){let n=t.clone();return o?n.height=2:n.width=2,new C(e,n,S.CENTER,0,w.FLEXLAYOUT__OUTLINE_RECT)}let c=[];for(let e=0;e<n.length;e++){let t=j(n[e],i,a,o);t!==void 0&&c.push({child:n[e],index:e,extent:t})}if(c.length===0)return;let l=o?a:i,u=e.getRect(),d=o?t.y:t.x;for(let t=0;t<c.length;t++){let{child:n,index:f,extent:p}=c[t],m=o?p.y+p.height/2:p.x+p.width/2;if(n instanceof F&&n.contains(i,a)){if(r instanceof F){let t=n.getDropRegion(),r=o?a<t.y+t.height/2:i<t.x+t.width/2;return new C(e,M(o,n.getReorderBoundary(r),r),S.CENTER,r?f:f+1,w.FLEXLAYOUT__OUTLINE_RECT)}return n.canDrop(r,i,a)}if(d<=l&&l<m){let t=o?p.y:p.x;return!s||u.x<t&&t<u.getRight()?new C(e,te(o,p),S.CENTER,f,w.FLEXLAYOUT__OUTLINE_RECT):void 0}d=m}let f=c[c.length-1],p=f.extent,m=o?p.y+p.height/2:p.x+p.width/2,h=o?p.getBottom():p.getRight(),g=o?u.getBottom():u.getRight();if(l>=m&&h<g){if(f.child instanceof F&&f.child!==n[n.length-1]){let e=f.child.canDrop(r,i,a);if(e!==void 0)return e}return new C(e,ne(o,f.child instanceof F?f.child.getReorderBoundary(!1):p),S.CENTER,n.length,w.FLEXLAYOUT__OUTLINE_RECT)}}function ie(e,t){let n=0,r=e.getChildren();for(let e=0;e<t&&e<r.length;e++){let t=r[e];t instanceof F?t.isOpened()&&(n+=t.getChildren().length):t instanceof R&&n++}return n}function ae(e,t,n=1){if(e instanceof F)return;let r=e.getSelected();n>0&&r!==-1&&ie(e,t)<=r&&e.setSelected(r+n)}function oe(e,t){if(e instanceof F){e.getTabContainer().repairSelected();return}if(e!==void 0&&(e instanceof N||e instanceof L)){let n=e.getSelected();if(n!==-1){let r=ie(e,t),i=e.getTabNodes().length;r===n&&i>0?r>=i&&e.setSelected(i-1):r<n?e.setSelected(n-1):r>n||e.setSelected(-1)}e.repairSelected()}}function se(e,t){let n=e;for(;n!==void 0;){if(n===t)return!0;n=n.getParent()}return!1}function ce(e,t){let n=0,r=e.getParent();return r!==void 0&&(n=r.removeChild(e),e instanceof F?r.repairSelected():r instanceof L&&r!==t&&r.getSelected()===n?r.setSelected(-1):r instanceof F?(r.getTabContainer().repairSelected(),r.getChildren().length===0&&r.getTabContainer().removeChild(r)):oe(r,n)),{dragParent:r,fromIndex:n}}function le(e,t,n,r){if(r!==void 0&&(n||n!==!1&&e.isAutoSelectTab()))e.setSelected(e.getTabNodes().indexOf(r));else if(t!==void 0){let n=e.getTabNodes().indexOf(t);n===-1?e.repairSelected():e.setSelected(n)}else e.repairSelected()}function ue(){return`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}var N=class e extends k{static TYPE=`tabset`;static fromJson(t,n,r){let i=new e(n,t);if(t.children!=null)for(let e of t.children)if(e.type===F.TYPE){let t=F.fromJson(e,n);i.addChild(t)}else if(e.type===R.TYPE||e.type===void 0){let t=R.fromJson(e,n);i.addChild(t)}else throw Error(`Error: invalid tabset child type "${e.type}" (expected "tab" or "tabgroup")`);return i.children.length===0?i.setSelected(-1):i.getSelected()>=i.getTabNodes().length?i.setSelected(i.getTabNodes().length-1):i.getSelected()<-1&&i.setSelected(-1),t.maximized&&t.maximized===!0&&r.setMaximizedTabSet(i),t.active&&t.active===!0&&r.setActiveTabSet(i),i}static attributeDefinitions=e.createAttributeDefinitions();tabStripRect=b.empty();contentRect=b.empty();calculatedMinHeight;calculatedMinWidth;calculatedMaxHeight;calculatedMaxWidth;constructor(t,n){super(t),this.calculatedMinHeight=0,this.calculatedMinWidth=0,this.calculatedMaxHeight=0,this.calculatedMaxWidth=0,e.attributeDefinitions.fromJson(n,this.attributes),t.addNode(this)}getName(){return this.model.translate(this.getAttr(`name`))}isEnableActiveIcon(){return this.getAttr(`enableActiveIcon`)}getSelected(){let e=this.attributes.selected;return e===void 0?-1:e}getTabNodes(){let e=[];for(let t of this.children)t instanceof R?e.push(t):t instanceof F&&t.isOpened()&&e.push(...t.getChildren());return e}getVisibleTabCount(){return this.getTabNodes().length}getSelectedNode(){let e=this.getSelected();if(e!==-1)return this.getTabNodes()[e]}repairSelected(){let e=this.getTabNodes();if(e.length===0)this.setSelected(-1);else{let t=this.getSelected();t!==-1&&t>=e.length&&this.setSelected(e.length-1)}}getPinnedRunLength(){let e=0;for(let t of this.children)if(t instanceof R&&t.isPinned())e++;else break;return e}getWeight(){return this.getAttr(`weight`)}getAttrMinWidth(){return this.getAttr(`minWidth`)}getAttrMinHeight(){return this.getAttr(`minHeight`)}getMinWidth(){return this.calculatedMinWidth}getMinHeight(){return this.calculatedMinHeight}getAttrMaxWidth(){return this.getAttr(`maxWidth`)}getAttrMaxHeight(){return this.getAttr(`maxHeight`)}getMaxWidth(){return this.calculatedMaxWidth}getMaxHeight(){return this.calculatedMaxHeight}isCloseable(){let e=this.isEnableClose();return e&&=super.isCloseable(),e}getConfig(){return this.attributes.config}isMaximized(){return this.model.getMaximizedTabset(this.getLayoutId())===this}isActive(){return this.model.getActiveTabset(this.getLayoutId())===this}isEnableDeleteWhenEmpty(){return this.getAttr(`enableDeleteWhenEmpty`)}isEnableDrop(){return this.getAttr(`enableDrop`)}isEnableTabStrip(){return this.getAttr(`enableTabStrip`)}isEnableTabWrap(){return this.getAttr(`enableTabWrap`)}isEnableDrag(){return this.getAttr(`enableDrag`)}isEnableDivide(){return this.getAttr(`enableDivide`)}isEnableMaximize(){return this.getAttr(`enableMaximize`)}isEnableClose(){return this.getAttr(`enableClose`)}isEnableCloseButton(){return this.getAttr(`enableCloseButton`)}isEnableSingleTabStretch(){return this.getAttr(`enableSingleTabStretch`)}isAutoSelectTab(){return this.getAttr(`autoSelectTab`)}isEnableTabScrollbar(){return this.getAttr(`enableTabScrollbar`)}isEnableTabGroups(){return this.getAttr(`enableTabGroups`)}getClassNameTabStrip(){return this.getAttr(`classNameTabStrip`)}getTabLocation(){return this.getAttr(`tabLocation`)}toJson(){let t={};return e.attributeDefinitions.toJson(t,this.attributes),t.children=this.children.map(e=>e.toJson()),this.isActive()&&(t.active=!0),this.isMaximized()&&(t.maximized=!0),t}calcMinMaxSize(){this.calculatedMinHeight=this.getAttrMinHeight(),this.calculatedMinWidth=this.getAttrMinWidth(),this.calculatedMaxHeight=this.getAttrMaxHeight(),this.calculatedMaxWidth=this.getAttrMaxWidth();for(let e of this.getTabNodes())this.calculatedMinWidth=Math.max(this.calculatedMinWidth,e.getMinWidth()),this.calculatedMinHeight=Math.max(this.calculatedMinHeight,e.getMinHeight()),this.calculatedMaxWidth=Math.min(this.calculatedMaxWidth,e.getMaxWidth()),this.calculatedMaxHeight=Math.min(this.calculatedMaxHeight,e.getMaxHeight());this.calculatedMinHeight+=this.tabStripRect.height,this.calculatedMaxHeight+=this.tabStripRect.height,this.calculatedMaxWidth=Math.max(this.calculatedMaxWidth,this.calculatedMinWidth),this.calculatedMaxHeight=Math.max(this.calculatedMaxHeight,this.calculatedMinHeight)}canMaximize(){return this.isEnableMaximize()?this.getModel().getMaximizedTabset(this.getLayoutId())===this||this.getParent()!==this.getModel().getRootRow(this.getLayoutId())||this.getModel().getRootRow(this.getLayoutId()).getChildren().length!==1:!1}setContentRect(e){this.contentRect=e}getContentRect(){return this.contentRect}setTabStripRect(e){this.tabStripRect=e}getTabStripRect(){return this.tabStripRect}setWeight(e){this.attributes.weight=e}setSelected(e){this.attributes.selected=e}canDrop(e,t,n,r=!1){let i,a=this.getLayout();if(e===this){let e=S.CENTER,t=this.tabStripRect;i=new C(this,t,e,-1,w.FLEXLAYOUT__OUTLINE_RECT)}else if(this.getLayoutId()!==me.MAIN_LAYOUT_ID&&!a.canDockTo(e))return;else if(this.contentRect.contains(t,n)){let e=S.CENTER;if(this.model.getMaximizedTabset(this.getLayoutId())===void 0){let i=!r&&this.isEnableDrop(),a=this.isEnableDivide();if(!i&&!a)return;e=i&&a?S.getLocation(this.contentRect,t,n):i?S.CENTER:S.getLocation(this.contentRect,t,n,!0)}let a=e.getDockRect(this.rect);i=new C(this,a,e,-1,w.FLEXLAYOUT__OUTLINE_RECT)}else if(this.tabStripRect!=null&&this.tabStripRect.contains(t,n)&&(i=re(this,this.tabStripRect,this.children,e,t,n,!1,!0),i!==void 0&&i.node!==this))return i;if(i!==void 0&&i.index!==-1&&this.children.length>0){let t=this.getPinnedRunLength(),n=e instanceof R&&e.isPinned()?Math.min(i.index,t):Math.max(i.index,t);if(n!==i.index){let e;if(n<this.children.length){let t=this.children[n],r=t instanceof F?t.getPillRect():t.getTabRect();e=new b(r.x-2,r.y,3,r.height)}else{let t=this.children[this.children.length-1],n=t instanceof F?t.getPillRect():t.getTabRect();e=new b(n.getRight()-2,n.y,3,n.height)}i=new C(this,e,S.CENTER,n,w.FLEXLAYOUT__OUTLINE_RECT)}}if(this.canDockInto(e,i))return i}delete(){let e=this.getLayoutId();this.parent.removeChild(this),this===this.model.getMaximizedTabset(e)&&this.model.setMaximizedTabset(void 0,e)}remove(e){let t=this.removeChild(e);this.model.tidy(),oe(this,t)}drop(t,n,r,i){let a=n;if(se(this,t))return;let o=this.getSelectedNode(),{dragParent:s,fromIndex:c}=ce(t,this);if((t instanceof R||t instanceof F)&&s===this&&c<r&&r>0&&r--,a===S.CENTER){let e=r;e===-1&&(e=this.children.length);let n=this.getPinnedRunLength();if(e=t instanceof R&&t.isPinned()?Math.min(e,n):Math.max(e,n),t instanceof R)this.addChild(t,e),le(this,o,i,t);else if(t instanceof F)this.addChild(t,e),le(this,o);else if(t instanceof P){let n=e;t.forEachNode((t,n)=>{t instanceof R&&(this.addChild(t,e),e++)},0),ae(this,n,e-n)}else{let n=e;for(let n=0;n<t.getChildren().length;n++){let r=t.getChildren()[n];this.addChild(r,e),e++}ae(this,n,e-n),this.getSelected()===-1&&this.children.length>0&&this.setSelected(0)}this.model.setActiveTabset(this,this.parent.getLayoutId())}else{let r;if(t instanceof R){let n=this.model.getOnCreateTabSet();r=new e(this.model,n?n(t):{}),r.addChild(t)}else if(t instanceof F)r=new e(this.model,{}),r.addChild(t);else if(t instanceof P){let e=this.getParent();if(t.getOrientation()===e.getOrientation()&&(n.getOrientation()===e.getOrientation()||n===S.CENTER)){let e=new P(this.model,{});e.addChild(t),r=e}else r=t}else r=t;let i=this.parent,o=i.getChildren().indexOf(this);if(i.getOrientation()===a.orientation)r.setWeight(this.getWeight()/2),this.setWeight(this.getWeight()/2),i.addChild(r,o+a.indexPlus);else{let e=new P(this.model,{});if(e.setWeight(this.getWeight()),e.addChild(this),this.setWeight(50),t instanceof P&&t.getChildren().length>0&&t.getOrientation()!==i.getOrientation()){let n=t.getChildren(),r=n.reduce((e,t)=>e+t.getWeight(),0),i=a.indexPlus;for(let t of n)t.setWeight(r===0?50/n.length:50*t.getWeight()/r),e.addChild(t,i++)}else r.setWeight(50),e.addChild(r,a.indexPlus);i.removeChild(this),i.addChild(e,o)}r instanceof e&&this.model.setActiveTabset(r,this.getLayoutId())}this.model.tidy()}updateAttrs(t){e.attributeDefinitions.update(t,this.attributes)}getAttributeDefinitions(){return e.attributeDefinitions}static getAttributeDefinitions(){return me.ensureAttributePairing(),e.attributeDefinitions}static createAttributeDefinitions(){let t=new v;return t.add(`type`,e.TYPE,!0).setType(y.STRING).setFixed(),t.add(`id`,void 0).setType(y.STRING).setDescription(`the unique id of the tab set, if left undefined a uuid will be assigned`),t.add(`weight`,100).setType(y.NUMBER).setDescription(`relative weight for sizing of this tabset in parent row`),t.add(`selected`,0).setType(y.NUMBER).setDescription(`index of selected/visible tab in tabset; -1 means no tab selected`),t.add(`name`,void 0).setType(y.STRING).setDescription(`an accessible label for the tab strip (used as the tablist's aria-label; not displayed visually)`),t.add(`config`,void 0).setType(`any`).setDescription(`a place to hold json config used in your own code`),t.addInherited(`enableDeleteWhenEmpty`,`tabSetEnableDeleteWhenEmpty`).setDescription(`whether to delete this tabset when it has no tabs`),t.addInherited(`enableDrop`,`tabSetEnableDrop`).setDescription(`whether tabs can be dropped into this tabset`),t.addInherited(`enableDrag`,`tabSetEnableDrag`).setDescription(`whether the user can drag tabs out of this tabset`),t.addInherited(`enableDivide`,`tabSetEnableDivide`).setDescription(`whether dropping on an edge of this tabset splits it to create a new tabset`),t.addInherited(`enableMaximize`,`tabSetEnableMaximize`).setDescription(`whether the tabset can be maximized to fill the layout via the maximize button`),t.addInherited(`enableClose`,`tabSetEnableClose`).setDescription(`whether this tabset can be closed`),t.addInherited(`enableCloseButton`,`tabSetEnableCloseButton`).setDescription(`if the tabset can be closed then show a close button`),t.addInherited(`enableSingleTabStretch`,`tabSetEnableSingleTabStretch`).setDescription(`if the tabset has only a single tab then stretch the single tab to fill area and display in a header style`),t.addInherited(`classNameTabStrip`,`tabSetClassNameTabStrip`).setDescription(`a class name to apply to the tab strip`),t.addInherited(`enableTabStrip`,`tabSetEnableTabStrip`).setDescription(`when enabled the tabset shows a tab strip and can host multiple tabs; when disabled the strip is hidden`),t.addInherited(`minWidth`,`tabSetMinWidth`).setDescription(`minimum width (in px) for this tabset`),t.addInherited(`minHeight`,`tabSetMinHeight`).setDescription(`minimum height (in px) for this tabset`),t.addInherited(`maxWidth`,`tabSetMaxWidth`).setDescription(`maximum width (in px) for this tabset`),t.addInherited(`maxHeight`,`tabSetMaxHeight`).setDescription(`maximum height (in px) for this tabset`),t.addInherited(`enableTabWrap`,`tabSetEnableTabWrap`).setDescription(`wrap tabs onto multiple lines`),t.addInherited(`tabLocation`,`tabSetTabLocation`).setDescription(`the location of the tabs either top or bottom`),t.addInherited(`autoSelectTab`,`tabSetAutoSelectTab`).setDescription(`whether to select new/moved tabs in tabset`),t.addInherited(`enableActiveIcon`,`tabSetEnableActiveIcon`).setDescription(`whether the active icon (*) should be displayed when the tabset is active`),t.addInherited(`enableTabScrollbar`,`tabSetEnableTabScrollbar`).setDescription(`whether to show a mini scrollbar for the tabs`),t.addInherited(`enableTabGroups`,`tabSetEnableTabGroups`).setDescription(`whether the tab group options are enabled in the context menu (default menus)`),t}},P=class e extends k{static TYPE=`row`;static fromJson(t,n,r){let i=new e(n,t);if(t.children!=null)for(let a of t.children)if(a.type===N.TYPE){let e=N.fromJson(a,n,r);i.addChild(e)}else if(a.type===e.TYPE){let t=e.fromJson(a,n,r);i.addChild(t)}else throw Error(`Error: invalid row child type "${a.type}" (expected "row" or "tabset")`);return i}static attributeDefinitions=e.createAttributeDefinitions();layout;minHeight;minWidth;maxHeight;maxWidth;constructor(t,n){super(t),this.minHeight=1,this.minWidth=1,this.maxHeight=pe,this.maxWidth=pe,e.attributeDefinitions.fromJson(n,this.attributes),t.addNode(this)}getWeight(){return this.attributes.weight}toJson(){let t={};e.attributeDefinitions.toJson(t,this.attributes),t.children=[];for(let e of this.children)t.children.push(e.toJson());return t}getLayout(){return this.layout?this.layout:super.getLayout()}setLayout(e){this.layout=e}setWeight(e){this.attributes.weight=e}getSplitterBounds(e){let t=this.getOrientation()===x.HORZ,n=this.getChildren(),r=this.model.getSplitterSize(),i=n[0].getRect(),a=n[n.length-1].getRect(),o=t?[i.x,a.getRight()]:[i.y,a.getBottom()],s=t?[i.x,a.getRight()]:[i.y,a.getBottom()];for(let i=0;i<e;i++){let e=n[i];o[0]+=t?e.getMinWidth():e.getMinHeight(),s[0]+=t?Math.max(e.getMinWidth(),e.getMaxWidth()):Math.max(e.getMinHeight(),e.getMaxHeight()),i>0&&(o[0]+=r,s[0]+=r)}for(let i=n.length-1;i>=e;i--){let e=n[i];o[1]-=(t?e.getMinWidth():e.getMinHeight())+r,s[1]-=(t?Math.max(e.getMinWidth(),e.getMaxWidth()):Math.max(e.getMinHeight(),e.getMaxHeight()))+r}return o=[Math.max(s[1],o[0]),Math.min(s[0],o[1])],o[0]>o[1]&&(o=[o[0],o[0]]),o}getSplitterInitials(e){let t=this.getOrientation()===x.HORZ,n=this.getChildren(),r=this.model.getSplitterSize(),i=[],a=0;for(let e=0;e<n.length;e++){let r=n[e].getRect(),o=t?r.width:r.height;i.push(o),a+=o}let o=n[e].getRect(),s=(t?o.x:o.y)-r;return{initialSizes:i,sum:a,startPosition:s}}calculateSplit(e,t,n,r,i){let a=this.getOrientation()===x.HORZ,o=this.getChildren(),s=[...n];if(r<=0||s.length===0)return[];if(t<i){let n=o[e],r=a?n.getMaxWidth():n.getMaxHeight(),c=i-t,l=0;s[e]+c>r?(l=s[e]+c-r,s[e]=r):s[e]+=c;for(let t=e-1;t>=0;t--){let e=o[t],n=a?e.getMinWidth():e.getMinHeight();if(s[t]-c>n){s[t]-=c;break}c-=s[t]-n,s[t]=n}for(let t=e+1;t<o.length;t++){let e=o[t],n=a?e.getMaxWidth():e.getMaxHeight();if(s[t]+l<n){s[t]+=l;break}l-=n-s[t],s[t]=n}}else{let n=o[e-1],r=a?n.getMaxWidth():n.getMaxHeight(),c=t-i,l=0;s[e-1]+c>r?(l=s[e-1]+c-r,s[e-1]=r):s[e-1]+=c;for(let t=e;t<o.length;t++){let e=o[t],n=a?e.getMinWidth():e.getMinHeight();if(s[t]-c>n){s[t]-=c;break}c-=s[t]-n,s[t]=n}for(let t=e-1;t>=0;t--){let e=o[t],n=a?e.getMaxWidth():e.getMaxHeight();if(s[t]+l<n){s[t]+=l;break}l-=n-s[t],s[t]=n}}return s.map(e=>Math.max(.1,e)*100/r)}getMinWidth(){return this.minWidth}getMinHeight(){return this.minHeight}getMaxWidth(){return this.maxWidth}getMaxHeight(){return this.maxHeight}calcMinMaxSize(){this.minHeight=1,this.minWidth=1,this.maxHeight=pe,this.maxWidth=pe;let e=!0;for(let t of this.children){let n=t;n.calcMinMaxSize();let r=Math.max(n.getMinHeight(),n.getMaxHeight()),i=Math.max(n.getMinWidth(),n.getMaxWidth());this.getOrientation()===x.VERT?(this.minHeight+=n.getMinHeight(),this.maxHeight+=r,e||(this.minHeight+=this.model.getSplitterSize(),this.maxHeight+=this.model.getSplitterSize()),this.minWidth=Math.max(this.minWidth,n.getMinWidth()),this.maxWidth=Math.min(this.maxWidth,i)):(this.minWidth+=n.getMinWidth(),this.maxWidth+=i,e||(this.minWidth+=this.model.getSplitterSize(),this.maxWidth+=this.model.getSplitterSize()),this.minHeight=Math.max(this.minHeight,n.getMinHeight()),this.maxHeight=Math.min(this.maxHeight,r)),e=!1}this.maxWidth=Math.max(this.maxWidth,this.minWidth),this.maxHeight=Math.max(this.maxHeight,this.minHeight)}tidy(){let t=0;for(;t<this.children.length;){let n=this.children[t];if(n instanceof e){n.tidy();let r=n.getChildren();if(r.length===0)this.removeChild(n);else if(r.length===1){let i=r[0];if(this.removeChild(n),i instanceof e){let e=0,r=i.getChildren();for(let t of r)e+=t.getWeight();for(let i=0;i<r.length;i++){let a=r[i];a.setWeight(e===0?n.getWeight()/r.length:n.getWeight()*a.getWeight()/e),this.addChild(a,t+i)}}else i.setWeight(n.getWeight()),this.addChild(i,t)}else t++}else n instanceof N&&n.getChildren().length===0&&n.isEnableDeleteWhenEmpty()&&n.isEnableClose()?(this.removeChild(n),n===this.model.getMaximizedTabset(this.getLayoutId())&&this.model.setMaximizedTabset(void 0,this.getLayoutId())):t++}if(this===this.model.getRootRow(this.getLayoutId())&&this.children.length===0){if(this.getLayout()?.getType()!==`tab`&&this.getLayoutId()!==me.MAIN_LAYOUT_ID)this.model.getLayouts().delete(this.getLayoutId());else{let e=this.model.getOnCreateTabSet(),t=e?e():{};t={...t,selected:-1};let n=new N(this.model,t);this.model.setActiveTabset(n,this.getLayoutId()),this.addChild(n)}}}canDrop(e,t,n,r=!1){let i=n-this.rect.y,a=t-this.rect.x,o=this.rect.width,s=this.rect.height,c=this.model.isEnableEdgeDockIndicators()?50:9999,l,u=this.getLayout();if(this.getLayoutId()===me.MAIN_LAYOUT_ID||u.canDockTo(e)){if(this.model.isEnableEdgeDock()&&this.parent===void 0){if(t<this.rect.x+10&&i>s/2-c&&i<s/2+c){let e=S.LEFT,t=e.getDockRect(this.rect);t.width/=2,l=new C(this,t,e,-1,w.FLEXLAYOUT__OUTLINE_RECT_EDGE)}else if(t>this.rect.getRight()-10&&i>s/2-c&&i<s/2+c){let e=S.RIGHT,t=e.getDockRect(this.rect);t.width/=2,t.x+=t.width,l=new C(this,t,e,-1,w.FLEXLAYOUT__OUTLINE_RECT_EDGE)}else if(n<this.rect.y+10&&a>o/2-c&&a<o/2+c){let e=S.TOP,t=e.getDockRect(this.rect);t.height/=2,l=new C(this,t,e,-1,w.FLEXLAYOUT__OUTLINE_RECT_EDGE)}else if(n>this.rect.getBottom()-10&&a>o/2-c&&a<o/2+c){let e=S.BOTTOM,t=e.getDockRect(this.rect);t.height/=2,t.y+=t.height,l=new C(this,t,e,-1,w.FLEXLAYOUT__OUTLINE_RECT_EDGE)}if(l!==void 0&&!this.canDockInto(e,l))return}return l}}drop(t,n,r,i){let a=n;if(se(this,t))return;let o=t.getParent();o&&o.removeChild(t),o!==void 0&&o instanceof N&&o.setSelected(0),o!==void 0&&o instanceof L&&o.setSelected(-1);let s;if(t instanceof N||t instanceof e)s=t,s instanceof e&&s.getOrientation()===this.getOrientation()&&(n.getOrientation()===this.getOrientation()||n===S.CENTER)&&(s=new e(this.model,{}),s.addChild(t));else{let e=this.model.getOnCreateTabSet(),n=e&&t instanceof R?e(t):{};s=new N(this.model,n),s.addChild(t)}let c=this.children.reduce((e,t)=>e+t.getWeight(),0);c===0&&(c=100),s.setWeight(c/3);let l=this.getOrientation()===x.HORZ;if(a===S.CENTER)r===-1?this.addChild(s,this.children.length):this.addChild(s,r);else if(l&&a===S.LEFT||!l&&a===S.TOP)this.addChild(s,0);else if(l&&a===S.RIGHT||!l&&a===S.BOTTOM)this.addChild(s);else if(l&&a===S.TOP||!l&&a===S.LEFT){let t=new e(this.model,{}),n=new e(this.model,{});n.setWeight(75),s.setWeight(25);for(let e of this.children)n.addChild(e);this.removeAll(),t.addChild(s),t.addChild(n),this.addChild(t)}else if(l&&a===S.BOTTOM||!l&&a===S.RIGHT){let t=new e(this.model,{}),n=new e(this.model,{});n.setWeight(75),s.setWeight(25);for(let e of this.children)n.addChild(e);this.removeAll(),t.addChild(n),t.addChild(s),this.addChild(t)}s instanceof N&&this.model.setActiveTabset(s,this.getLayoutId()),this.model.tidy()}isEnableDrop(){return!0}getAttributeDefinitions(){return e.attributeDefinitions}updateAttrs(t){e.attributeDefinitions.update(t,this.attributes)}static getAttributeDefinitions(){return me.ensureAttributePairing(),e.attributeDefinitions}static createAttributeDefinitions(){let t=new v;return t.add(`type`,e.TYPE,!0).setType(y.STRING).setFixed(),t.add(`id`,void 0).setType(y.STRING).setDescription(`the unique id of the row, if left undefined a uuid will be assigned`),t.add(`weight`,100).setType(y.NUMBER).setDescription(`relative weight for sizing of this row in parent row`),t}},de=class e{layoutId;type;rect;path;attributes;controller;rootRow;maximizedTabSet;activeTabSet;toExportRectFunction;static attributeDefinitions=e.createAttributeDefinitions();constructor(t,n,r,i,a){this.attributes={},e.attributeDefinitions.fromJson(a??{},this.attributes),this.layoutId=t,this.type=r,this.rect=i,this.toExportRectFunction=(e,t)=>e,this.path=t===me.MAIN_LAYOUT_ID?``:`/sublayout`+n}getPath(){return this.path}visitNodes(e){this.getRootRow()?.forEachNode(e,0)}isMainLayout(){return this.layoutId===me.MAIN_LAYOUT_ID}findParentLayout(){let e;return this.getController().getModel().visitNodes(t=>{t instanceof R&&t.getSubLayoutId()===this.getLayoutId()&&(e=t.getLayout())}),e}canDockTo(e){let t=this.getType();if(t===`window`)return e.isAllowedInWindow();if(t===`float`)return!0;if(t===`tab`){let t=this.findParentLayout();return!(t&&t.getType()===`window`&&!t.isMainLayout()&&!e.isAllowedInWindow()||fe(e))}return!1}getLayoutId(){return this.layoutId}getType(){return this.type}getName(){return this.getController()?.getModel().translate(this.getAttr(`name`))}getAttr(e){return this.attributes[e]}getAttributeDefinitions(){return e.attributeDefinitions}updateAttrs(t){e.attributeDefinitions.update(t,this.attributes)}getRect(){return this.rect}getWindow(){return this.controller?.getCurrentWindow()}setType(e){this.type=e}getController(){return this.controller}getRootRow(){return this.rootRow}getMaximizedTabSet(){return this.maximizedTabSet}getActiveTabSet(){return this.activeTabSet}setRect(e){this.rect=e}setController(e){this.controller=e}getWindowId(){return this.controller?.getWindowId()}setRootRow(e){e?.setLayout(this),this.rootRow=e}setMaximizedTabSet(e){this.maximizedTabSet=e}setActiveTabSet(e){this.activeTabSet=e}getToExportRectFunction(){return this.toExportRectFunction}setToExportRectFunction(e){this.toExportRectFunction=e}static getAttributeDefinitions(){return e.attributeDefinitions}static createAttributeDefinitions(){let e=new v;return e.add(`name`,void 0).setType(y.STRING).setDescription(`the name of the sub layout, e.g. as shown in the model explorer`),e}toJson(){this.getType()===`window`&&this.getWindow()&&this.getWindow().screenTop>-1e4&&this.setRect(new b(this.getWindow().screenLeft,this.getWindow().screenTop,this.getWindow().outerWidth,this.getWindow().outerHeight));let t={type:this.getType(),layout:this.getRootRow().toJson(),rect:this.getType()===`tab`?void 0:this.getRect().toJson()};return e.attributeDefinitions.toJson(t,this.attributes),t}static fromJson(t,n,r){let i=n.getLayouts().size,a=t.rect?b.fromJson(t.rect):new b(50+50*i,50+50*i,600,400);a.snap(1);let o=r===me.MAIN_LAYOUT_ID?0:n.getNextSubLayoutId(),s=new e(r,o,t.type||`window`,a,t);return s.setRootRow(P.fromJson(t.layout,n,s)),s}};function fe(e){return e instanceof R?e.getSubLayoutId()!==void 0:e.getChildren().some(e=>fe(e))}var pe=99999,me=class e{static MAIN_LAYOUT_ID=`__main_layout_id__`;static attributeDefinitions=e.createAttributeDefinitions();static attributePairingDone=!1;static ensureAttributePairing(){e.attributePairingDone||(e.attributePairingDone=!0,e.attributeDefinitions.pairAttributes(`RowNode`,P.getAttributeDefinitions()),e.attributeDefinitions.pairAttributes(`TabSetNode`,N.getAttributeDefinitions()),e.attributeDefinitions.pairAttributes(`TabNode`,R.getAttributeDefinitions()),e.attributeDefinitions.pairAttributes(`BorderNode`,L.getAttributeDefinitions()),e.attributeDefinitions.pairAttributes(`TabGroupNode`,F.getAttributeDefinitions()))}attributes;layouts;borders;changeListeners;idMap;mainLayout;adoptedFromModel;splitterSize;onAllowDrop;onCreateTabSet;nextSubLayoutId;i18nTranslator;i18nDefaults;constructor(){this.attributes={},this.layouts=new Map,this.borders=new O(this),this.idMap=new Map,this.changeListeners=[],this.nextSubLayoutId=1,this.mainLayout=new de(e.MAIN_LAYOUT_ID,0,`window`,b.empty()),this.layouts.set(e.MAIN_LAYOUT_ID,this.mainLayout),this.splitterSize=8}setI18nTranslator(e){this.i18nTranslator=e}setI18nDefaults(e){this.i18nDefaults=e}translate(e){if(e!==void 0){if(this.i18nTranslator)return this.i18nTranslator(e);if(this.i18nDefaults){let t=this.i18nDefaults[e];if(t!==void 0)return t}return e}}doAction(e){for(let t of[...this.changeListeners])typeof t!=`function`&&t.onBeforeAction?.(e);let t=this.applyAction(e);this.updateIdMap();for(let t of[...this.changeListeners])typeof t==`function`?t(e):t.onAfterAction?.(e);return t}applyAction(e){switch(e.type){case T.ADD_TAB:return this.applyAddTab(e);case T.MOVE_NODE:return this.applyMoveNode(e);case T.DELETE_TAB:return this.applyDeleteTab(e);case T.DELETE_TABSET:return this.applyDeleteTabset(e);case T.POPOUT_TABSET:return this.applyPopoutTabset(e);case T.POPOUT_TAB:return this.applyPopoutTab(e);case T.SELECT_TAB:return this.applySelectTab(e);case T.SET_ACTIVE_TABSET:return this.applySetActiveTabset(e);case T.ADJUST_WEIGHTS:return this.applyAdjustWeights(e);case T.ADJUST_BORDER_SPLIT:return this.applyAdjustBorderSplit(e);case T.MAXIMIZE_TOGGLE:return this.applyMaximizeToggle(e);case T.UPDATE_MODEL_ATTRIBUTES:return this.applyUpdateModelAttributes(e);case T.UPDATE_NODE_ATTRIBUTES:return this.applyUpdateNodeAttributes(e);case T.ADD_TAB_TO_NEW_GROUP:return this.applyAddTabToNewGroup(e);case T.UNGROUP:return this.applyUngroup(e);case T.REMOVE_TAB_FROM_GROUP:return this.applyRemoveTabFromGroup(e);case T.UPDATE_SUBLAYOUT_ATTRIBUTES:return this.applyUpdateSubLayoutAttributes(e);case T.RENAME_TAB:return this.applyRenameTab(e);case T.SET_TAB_PINNED:return this.applySetTabPinned(e);case T.SET_BORDER_TYPE:return this.applySetBorderType(e);case T.CREATE_SUBLAYOUT:return this.applyCreateSubLayout(e);case T.CLOSE_POPOUT:return this.applyClosePopout(e);case T.MOVE_FLOAT_TO_FRONT:return this.applyMovePopoutToFront(e);case T.MOVE_FLOAT:return this.applyMoveFloat(e);case T.POPOUT_FLOAT:return this.applyPopoutFloat(e);case T.DOCK_FLOAT_TO_LAYOUT:return this.applyDockFloatToLayout(e);case T.GROUP:return this.applyGroup(e);default:return}}applyAddTab(e){let t=new R(this,e.data.json,!0),n=this.idMap.get(e.data.toNode);if(n instanceof N||n instanceof L||n instanceof P||n instanceof F)return n.drop(t,S.getByName(e.data.location),e.data.index,e.data.select),t}applyMoveNode(e){let t=this.idMap.get(e.data.fromNode);if(t instanceof R||t instanceof N||t instanceof P||t instanceof F){let n=this.layouts.get(t.getLayoutId()),r=n?.getMaximizedTabSet();r!==void 0&&se(r,t)&&n.setMaximizedTabSet(void 0);let i=this.idMap.get(e.data.toNode);(i instanceof N||i instanceof L||i instanceof P||i instanceof F)&&!se(i,t)&&i.drop(t,S.getByName(e.data.location),e.data.index,e.data.select)}}applyDeleteTab(e){let t=this.idMap.get(e.data.node);t instanceof R&&t.delete()}applyDeleteTabset(e){let t=this.idMap.get(e.data.node);if(t instanceof N){let e=[...t.getChildren()];for(let t=0;t<e.length;t++){let n=e[t];n.isCloseable()&&n.delete()}t.getChildren().length===0&&t.delete(),this.tidy()}}applyPopoutTabset(e){let t=this.idMap.get(e.data.node);if(t instanceof N){let n=t.isMaximized(),r=t.getLayout(),i=r.getActiveTabSet()===t,a=ue(),o=e.data.type||`window`,s=new de(a,this.getNextSubLayoutId(),o,r.getToExportRectFunction()(t.getRect(),o)),c=P.fromJson({type:`row`},this,s);s.setRootRow(c),this.layouts.set(a,s),c.drop(t,S.CENTER,0),n&&r.setMaximizedTabSet(void 0),i&&r.setActiveTabSet(void 0)}}applyPopoutTab(e){let t=this.idMap.get(e.data.node);if(t instanceof R){let n=ue(),r=t.getTabContainer().getContentRect(),i=t.getLayout(),a=e.data.type||`window`,o=new de(n,this.getNextSubLayoutId(),a,i.getToExportRectFunction()(r,a)),s=ue(),c={type:`row`,children:[{type:`tabset`,id:s}]},l=P.fromJson(c,this,o);o.setRootRow(l),this.layouts.set(n,o),this.idMap.get(s).drop(t,S.CENTER,0,!0)}}applySelectTab(e){let t=this.idMap.get(e.data.tabNode);if(t instanceof R){let e=t.getTabContainer(),n=e.getTabNodes().indexOf(t);e instanceof L?e.getSelected()===n?e.setSelected(-1):e.setSelected(n):e instanceof N&&(e.getSelected()!==n&&e.setSelected(n),t.getLayout().setActiveTabSet(e))}}applySetActiveTabset(t){let n=t.data.layoutId?t.data.layoutId:e.MAIN_LAYOUT_ID,r=this.layouts.get(n);if(r!==void 0){if(t.data.tabsetNode===void 0)r.setActiveTabSet(void 0);else{let e=this.idMap.get(t.data.tabsetNode);e instanceof N&&e.getLayoutId()===n&&r.setActiveTabSet(e)}}}applyAdjustWeights(e){let t=this.idMap.get(e.data.nodeId);if(t instanceof P){let n=e.data.weights,r=t.getChildren();for(let e=0;e<r.length;e++){let t=r[e];typeof n?.[e]==`number`&&Number.isFinite(n[e])&&n[e]>0&&t.setWeight(n[e])}}}applyAdjustBorderSplit(e){let t=this.idMap.get(e.data.node);t instanceof L&&t.setSize(e.data.size)}applyMaximizeToggle(t){let n=t.data.layoutId?t.data.layoutId:e.MAIN_LAYOUT_ID,r=this.layouts.get(n),i=this.idMap.get(t.data.node);r!==void 0&&i instanceof N&&i.getLayoutId()===n&&(i===r.getMaximizedTabSet()?r.setMaximizedTabSet(void 0):(r.setMaximizedTabSet(i),r.setActiveTabSet(i)))}applyUpdateModelAttributes(e){this.updateAttrs(e.data.json)}applyUpdateNodeAttributes(e){let t=this.idMap.get(e.data.node);if(t!==void 0){let n=t instanceof F&&t.isOpened(),r,i=-1;if(t instanceof F){let e=t.getTabContainer();if(r=e.getSelectedNode(),n){let n=t.getChildren();n.length>0&&(i=e.getTabNodes().indexOf(n[0]))}}if(t.updateAttrs(e.data.json),t instanceof F&&n!==t.isOpened()){let e=t.getTabContainer(),a=e.getTabNodes();if(r!==void 0){let t=a.indexOf(r);t===-1?n&&i!==-1&&(i<a.length?e.setSelected(i):i>0?e.setSelected(i-1):e.setSelected(-1)):e.setSelected(t)}else if(!n&&t.getChildren().length>0&&e instanceof N){let n=t.getChildren()[0];e.setSelected(e.getTabNodes().indexOf(n))}else e.repairSelected()}}}applyAddTabToNewGroup(e){let t=this.idMap.get(e.data.node);if(t instanceof R&&!t.isPinned()){let n=t.getTabContainer();if(n instanceof N||n instanceof L){let r=t.getParent(),i;r instanceof F?(i=n.getChildren().indexOf(r)+1,r.removeChild(t),r.getChildren().length===0&&(n.removeChild(r),i--)):(i=n.getChildren().indexOf(t),i===-1&&(i=n.getChildren().length),n.removeChild(t));let a={name:e.data.name,color:e.data.color},o=new F(this,a);n.addChild(o,i),o.addChild(t);let s=n.getTabNodes().indexOf(t);return n.setSelected(s),n instanceof N&&this.setActiveTabset(n,n.getLayoutId()),o.getId()}}}applyUngroup(e){let t=this.idMap.get(e.data.node);if(t instanceof F){let e=t.getTabContainer(),n=e.getChildren().indexOf(t),r=[...t.getChildren()];e.removeChild(t);for(let t=0;t<r.length;t++)e.addChild(r[t],n+t);e.repairSelected(),e instanceof N&&this.setActiveTabset(e,e.getLayoutId())}}applyRemoveTabFromGroup(e){let t=this.idMap.get(e.data.node);if(t instanceof R&&t.getParent()instanceof F){let e=t.getParent(),n=e.getTabContainer(),r=n.getChildren().indexOf(e);e.remove(t);let i=n.getChildren().indexOf(e);n.addChild(t,i===-1?r:i+1),n.setSelected(n.getTabNodes().indexOf(t)),n instanceof N&&this.setActiveTabset(n,n.getLayoutId())}}applyUpdateSubLayoutAttributes(e){let t=this.layouts.get(e.data.layoutId);t!==void 0&&t.updateAttrs(e.data.json)}applyRenameTab(e){let t=this.idMap.get(e.data.node);t instanceof R&&t.setName(e.data.text)}applySetTabPinned(e){let t=this.idMap.get(e.data.node);if(t instanceof R&&(t.getParent()instanceof N||t.getParent()instanceof F)){let n=t.getTabContainer();if(!(n instanceof N))return;let r=e.data.pinned===!0;if(r&&!t.isEnablePin())return;if(t.isPinned()!==r){let e=n.getSelectedNode();t.setPinned(r);let i=t.getParent()instanceof F?t.getParent():void 0;i===void 0?n.removeChild(t):(i.removeChild(t),i.getChildren().length===0&&n.removeChild(i),n.repairSelected()),n.addChild(t,n.getPinnedRunLength()),e!==void 0&&n.setSelected(n.getTabNodes().indexOf(e))}}}applySetBorderType(e){let t=this.idMap.get(e.data.node);t instanceof L&&(e.data.borderType===`split`||e.data.borderType===`overlay`)&&t.setBorderType(e.data.borderType)}applyCreateSubLayout(e){let t=ue(),n=new de(t,this.getNextSubLayoutId(),e.data.type||`window`,b.fromJson(e.data.rect)),r=P.fromJson(e.data.layout,this,n);return n.setRootRow(r),this.layouts.set(t,n),t}applyClosePopout(e){let t=this.layouts.get(e.data.layoutId);if(t){t.setType(`float`);let e=this.mainLayout.getController()?.getDomRect();e&&t.setRect(new b(e.width/4,e.height/4,e.width/2,e.height/2))}}applyMovePopoutToFront(e){let t=e.data.layoutId,n=this.layouts.get(t);n&&(this.layouts.delete(t),this.layouts.set(t,n))}applyMoveFloat(e){let t=e.data.layoutId,n=this.layouts.get(t);n&&n.setRect(e.data.rect)}applyPopoutFloat(e){let t=this.layouts.get(e.data.layoutId);t&&!t.isMainLayout()&&t.getType()===`float`&&(t.setType(`window`),e.data.rect&&t.setRect(b.fromJson(e.data.rect)))}applyDockFloatToLayout(e){let t=this.layouts.get(e.data.layoutId),n=this.idMap.get(e.data.toNode),r=S.getByName(e.data.location);if(t&&!t.isMainLayout()&&t.getType()===`float`&&(n instanceof N||n instanceof P)&&r!==S.CENTER){let i=n.getLayout();if(i.getLayoutId()!==t.getLayoutId()){let a=t.getRootRow();if(a){let o=!1;i.getType()===`tab`&&a.forEachNode(e=>{e instanceof R&&e.getSubLayoutId()!==void 0&&(o=!0)},0),o||(this.layouts.delete(t.getLayoutId()),t.setRootRow(void 0),a.setLayout(void 0),n.drop(a,r,e.data.index))}}}}applyGroup(e){let t=e;for(let e of t.actions)this.applyAction(e)}getActiveTabset(t=e.MAIN_LAYOUT_ID){let n=this.layouts.get(t);if(n&&n.getActiveTabSet()&&this.getNodeById(n.getActiveTabSet().getId()))return n.getActiveTabSet()}getMaximizedTabset(t=e.MAIN_LAYOUT_ID){return this.layouts.get(t)?.getMaximizedTabSet()}getRootRow(t=e.MAIN_LAYOUT_ID){return this.layouts.get(t)?.getRootRow()}isRootOrientationVertical(){return this.attributes.rootOrientationVertical}isEnableRotateBorderIcons(){return this.attributes.enableRotateBorderIcons}getBorderLeftTabDirection(){return this.attributes.borderLeftTabDirection}getTabGroupType(){return this.attributes.tabGroupType}getBorderSet(){return this.borders}visitNodes(e){this.borders.forEachNode(e);for(let[t,n]of this.layouts)n.getRootRow()?.forEachNode(e,0)}visitLayoutNodes(t,n){this.layouts.has(t)&&(t===e.MAIN_LAYOUT_ID&&this.borders.forEachNode(n),this.layouts.get(t).visitNodes(n))}getNodeById(e){return this.idMap.get(e)}getFirstTabSet(t=this.layouts.get(e.MAIN_LAYOUT_ID)?.getRootRow()){if(t===void 0)return;let n=t.getChildren()[0];if(n instanceof N)return n;if(n instanceof P)return this.getFirstTabSet(n)}static fromJson(t,n){e.ensureAttributePairing();let r=new e;e.attributeDefinitions.fromJson(t.global??{},r.attributes),t.borders&&(r.borders=O.fromJson(t.borders,r));let i=t.subLayouts||t.popouts;if(i)for(let t in i){if(t===e.MAIN_LAYOUT_ID)continue;let n=i[t],a=de.fromJson(n,r,t);r.layouts.set(t,a)}return r.mainLayout.setRootRow(P.fromJson(t.layout,r,r.mainLayout)),r.tidy(),n&&(r.adoptedFromModel=n,n.adoptedFromModel=void 0,r.visitNodes(e=>{if(e instanceof R){let t=n.getNodeById(e.getId());t instanceof R&&e.adoptViewState(t)}})),r}getAdoptedFromModel(){return this.adoptedFromModel}toJson(){let t={};e.attributeDefinitions.toJson(t,this.attributes),this.visitNodes(e=>{e.fireEvent(`save`,{})});let n={};for(let[t,r]of this.layouts)t!==e.MAIN_LAYOUT_ID&&(n[t]=r.toJson());return{global:t,borders:this.borders.toJson(),layout:this.mainLayout.getRootRow().toJson(),subLayouts:n}}getSplitterSize(){return this.splitterSize}isEnableEdgeDock(){return this.attributes.enableEdgeDock}isEnableEdgeDockIndicators(){return this.attributes.enableEdgeDockIndicators}setOnAllowDrop(e){this.onAllowDrop=e}setOnCreateTabSet(e){this.onCreateTabSet=e}addChangeListener(e){this.changeListeners.push(e)}removeChangeListener(e){let t=this.changeListeners.findIndex(t=>t===e);t!==-1&&this.changeListeners.splice(t,1)}toString(){return JSON.stringify(this.toJson())}setSplitterSize(e){this.splitterSize=e}getMainLayout(){return this.mainLayout}getLayouts(){return this.layouts}sortLayouts(){let e={window:1,tab:2,float:3},t=Array.from(this.getLayouts().values()).sort((t,n)=>e[t.getType()]-e[n.getType()]);this.layouts.clear(),t.forEach(e=>this.layouts.set(e.getLayoutId(),e))}setActiveTabset(e,t){let n=this.layouts.get(t);n&&(e?n.setActiveTabSet(e):n.setActiveTabSet(void 0))}setMaximizedTabset(e,t){let n=this.layouts.get(t);n&&(e?n.setMaximizedTabSet(e):n.setMaximizedTabSet(void 0))}updateIdMap(){this.idMap.clear(),this.visitNodes(e=>{this.idMap.set(e.getId(),e)})}addNode(e){let t=e.getId();if(this.idMap.has(t))throw Error(`Error: each node must have a unique id, duplicate id:${e.getId()}`);this.idMap.set(t,e)}findDropTargetNode(t,n,r,i,a=!1){if(t===e.MAIN_LAYOUT_ID){for(let e of this.borders.getBorders())if(e.isShowing()&&e.isOverlay()&&e.getSelected()!==-1&&e.getContentRect()?.contains(r,i)){let t=e.canDrop(n,r,i,a);if(t!==void 0)return t}}let o=(this.layouts.get(t)?.getRootRow())?.findDropTargetNode(t,n,r,i,a);return o===void 0&&t===e.MAIN_LAYOUT_ID&&(o=this.borders.findDropTargetNode(n,r,i,a)),o}tidy(){for(let[e,t]of this.layouts)t.getRootRow().tidy()}updateAttrs(t){e.attributeDefinitions.update(t,this.attributes)}nextUniqueId(){return`#`+ue()}getAttribute(e){return this.attributes[e]}getOnAllowDrop(){return this.onAllowDrop}getOnCreateTabSet(){return this.onCreateTabSet}getNextSubLayoutId(){return this.nextSubLayoutId++}static getGlobalAttributeDefinitions(){return e.ensureAttributePairing(),e.attributeDefinitions}static toTypescriptInterfaces(){e.ensureAttributePairing();let t=[];return t.push(e.attributeDefinitions.toTypescriptInterface(`Global`,void 0)),t.push(P.getAttributeDefinitions().toTypescriptInterface(`Row`,e.attributeDefinitions)),t.push(N.getAttributeDefinitions().toTypescriptInterface(`TabSet`,e.attributeDefinitions)),t.push(R.getAttributeDefinitions().toTypescriptInterface(`Tab`,e.attributeDefinitions)),t.push(L.getAttributeDefinitions().toTypescriptInterface(`Border`,e.attributeDefinitions)),t.push(F.getAttributeDefinitions().toTypescriptInterface(`TabGroup`,e.attributeDefinitions)),t.push(de.getAttributeDefinitions().toTypescriptInterface(`SubLayout`,void 0)),t.join(`
18
- `)}static createAttributeDefinitions(){let e=new v;return e.add(`enableEdgeDock`,!0).setType(y.BOOLEAN).setDescription(`enable docking to the edges of the layout`),e.add(`enableEdgeDockIndicators`,!0).setType(y.BOOLEAN).setDescription(`show the edge indicators when dragging`),e.add(`rootOrientationVertical`,!1).setType(y.BOOLEAN).setDescription(`the top level 'row' will layout horizontally by default, set this option true to make it layout vertically`),e.add(`enableRotateBorderIcons`,!0).setType(y.BOOLEAN).setDescription(`boolean indicating if tab icons should rotate with the text in the left and right borders`),e.add(`tabEnableClose`,!0).setType(y.BOOLEAN),e.add(`tabCloseType`,1).setType(`ICloseType`).setValues([{value:ee.Visible,label:`Visible`},{value:ee.Always,label:`Always`},{value:ee.Selected,label:`Selected`}]),e.add(`tabEnablePopout`,!1).setType(y.BOOLEAN),e.add(`tabEnableFloat`,!1).setType(y.BOOLEAN),e.add(`tabEnablePopoutIcon`,!1).setType(y.BOOLEAN).setPreserveIfExplicit(),e.add(`tabEnableFloatIcon`,!1).setType(y.BOOLEAN).setAlias(`tabEnablePopoutFloatIcon`),e.add(`tabEnablePopoutOverlay`,!1).setType(y.BOOLEAN),e.add(`tabEnableDrag`,!0).setType(y.BOOLEAN),e.add(`tabEnableRename`,!1).setType(y.BOOLEAN).setPreserveIfExplicit(),e.add(`tabEnablePin`,!1).setType(y.BOOLEAN).setPreserveIfExplicit(),e.add(`tabContentClassName`,void 0).setType(y.STRING),e.add(`tabClassName`,void 0).setType(y.STRING),e.add(`tabIcon`,void 0).setType(y.STRING),e.add(`tabEnableRenderOnDemand`,!0).setType(y.BOOLEAN),e.add(`tabBorderWidth`,-1).setType(y.NUMBER),e.add(`tabBorderHeight`,-1).setType(y.NUMBER),e.add(`tabEnableScrollbars`,!0).setType(y.BOOLEAN),e.add(`tabSetEnableDeleteWhenEmpty`,!0).setType(y.BOOLEAN),e.add(`tabSetEnableDrop`,!0).setType(y.BOOLEAN),e.add(`tabSetEnableDrag`,!0).setType(y.BOOLEAN),e.add(`tabSetEnableDivide`,!0).setType(y.BOOLEAN),e.add(`tabSetEnableMaximize`,!0).setType(y.BOOLEAN),e.add(`tabSetEnableClose`,!0).setType(y.BOOLEAN),e.add(`tabSetEnableCloseButton`,!1).setType(y.BOOLEAN),e.add(`tabSetEnableSingleTabStretch`,!1).setType(y.BOOLEAN),e.add(`tabSetAutoSelectTab`,!0).setType(y.BOOLEAN),e.add(`tabSetEnableActiveIcon`,!1).setType(y.BOOLEAN),e.add(`tabSetClassNameTabStrip`,void 0).setType(y.STRING),e.add(`tabSetEnableTabStrip`,!0).setType(y.BOOLEAN),e.add(`tabSetEnableTabWrap`,!1).setType(y.BOOLEAN),e.add(`tabSetTabLocation`,`top`).setType(`ITabLocation`).setValues([`top`,`bottom`]),e.add(`tabMinWidth`,1).setType(y.NUMBER),e.add(`tabMinHeight`,1).setType(y.NUMBER),e.add(`tabSetMinWidth`,1).setType(y.NUMBER),e.add(`tabSetMinHeight`,1).setType(y.NUMBER),e.add(`tabMaxWidth`,pe).setType(y.NUMBER),e.add(`tabMaxHeight`,pe).setType(y.NUMBER),e.add(`tabSetMaxWidth`,pe).setType(y.NUMBER),e.add(`tabSetMaxHeight`,pe).setType(y.NUMBER),e.add(`tabSetEnableTabScrollbar`,!1).setType(y.BOOLEAN),e.add(`tabSetEnableTabGroups`,!1).setType(y.BOOLEAN).setDescription(`whether the tab group options are enabled in the context menu (default menus)`),e.add(`tabGroupType`,`splitpill`).setType(`ITabGroupType`).setValues([{value:`splitpill`,label:`Split Pill`},{value:`underline`,label:`Underline`}]).setDescription(`how a tab group is visually indicated: 'splitpill' encloses the group's tabs in a pill (left/right caps), 'underline' draws a colored underline under each grouped tab`),e.add(`borderSize`,200).setType(y.NUMBER),e.add(`borderMinSize`,1).setType(y.NUMBER),e.add(`borderMaxSize`,pe).setType(y.NUMBER),e.add(`borderEnableDrop`,!0).setType(y.BOOLEAN),e.add(`borderAutoSelectTabWhenOpen`,!0).setType(y.BOOLEAN),e.add(`borderAutoSelectTabWhenClosed`,!1).setType(y.BOOLEAN),e.add(`borderClassName`,void 0).setType(y.STRING),e.add(`borderEnableAutoHide`,!1).setType(y.BOOLEAN),e.add(`borderEnableTabScrollbar`,!1).setType(y.BOOLEAN),e.add(`borderLeftTabDirection`,`up`).setType(`IBorderTabDirection`).setValues([`up`,`down`]).setDescription(`the direction the left border tabs read: 'up' (default, text reads bottom to top) or 'down' (text reads top to bottom like the right border)`),e}},he=`#9e9e9e`,F=class e extends k{static TYPE=`tabgroup`;static fromJson(t,n){let r=new e(n,t);if(t.children!=null)for(let e of t.children){let t=R.fromJson(e,n);r.addChild(t)}return r}static attributeDefinitions=e.createAttributeDefinitions();pillRect=b.empty();endMarkerRect=b.empty();constructor(t,n){super(t),e.attributeDefinitions.fromJson(n,this.attributes),t.addNode(this)}getName(){return this.model.translate(this.getAttr(`name`))}getColor(){return this.getAttr(`color`)}isOpened(){return this.getAttr(`opened`)}setOpened(e){this.attributes.opened=e}isEnableDrag(){return this.getAttr(`enableDrag`)}getPillRect(){return this.pillRect}setPillRect(e){this.pillRect=e}getEndMarkerRect(){return this.endMarkerRect}setEndMarkerRect(e){this.endMarkerRect=e}getTabContainer(){return this.getParent()}hasEndMarker(){return this.model.getTabGroupType()===`splitpill`&&this.endMarkerRect.width>0}getDropRegion(){let e=this.pillRect.clone();if(this.isOpened()){for(let t of this.children){let n=t.getTabRect();n!==void 0&&(e=I(e,n))}this.hasEndMarker()&&(e=I(e,this.endMarkerRect))}return e}getFlowRects(){let e=[this.pillRect];if(this.isOpened()){for(let t of this.children){let n=t.getTabRect();n!==void 0&&e.push(n)}this.hasEndMarker()&&e.push(this.endMarkerRect)}return e}getReorderBoundary(e){let t=this.getTabContainer();if(t instanceof L&&t.getLocation()===S.LEFT&&this.model.getBorderLeftTabDirection()!==`down`){if(e){if(this.hasEndMarker())return this.endMarkerRect;let e=this.getChildren();if(e.length>0){let t=e[e.length-1].getTabRect();if(t)return t}return this.pillRect}return this.pillRect}if(e)return this.pillRect;let n=this.getFlowRects();return n.length>0?n[n.length-1]:this.pillRect}getLines(){let e=this.getTabContainer(),t=e instanceof L&&e.isHorizontal(),n=[],r,i;for(let e of this.getFlowRects()){let a=t?e.x:e.y,o=t?e.getRight():e.getBottom();r!==void 0&&a<i+.5?(n[n.length-1].push(e),i=Math.max(i,o)):(n.push([e]),r=a,i=o)}return n}getLineRects(){return this.getLines().map(e=>e.reduce((e,t)=>I(e,t)))}contains(e,t){return this.getLineRects().some(n=>n.contains(e,t))}getLineRectAt(e,t){let n=this.getTabContainer(),r=n instanceof L&&n.isHorizontal();return this.getLineRects().find(n=>r?n.x<=e&&e<=n.getRight():n.y<=t&&t<=n.getBottom())}findDropTargetNode(e,t,n,r,i=!1){if(!this.contains(n,r))return;if(this.model.getMaximizedTabset(e)!==void 0)return this.model.getMaximizedTabset(e).canDrop(t,n,r,i);let a=this.canDrop(t,n,r,i);if(a!==void 0)return a;for(let a of this.children){let o=a.findDropTargetNode(e,t,n,r,i);if(o!==void 0)return o}}toJson(){let t={};return e.attributeDefinitions.toJson(t,this.attributes),t.children=this.children.map(e=>e.toJson()),t}remove(e){this.removeChild(e);let t=this.getTabContainer();this.getChildren().length===0&&t.removeChild(this),t.repairSelected(),this.model.tidy()}canDrop(e,t,n,r=!1){if(!(e instanceof R)||e.isPinned())return;let i,a=this.getChildren();if(this.pillRect.contains(t,n))i=new C(this,this.pillRect.clone(),S.CENTER,0,w.FLEXLAYOUT__OUTLINE_RECT);else if(a.length>0){let e=this.getTabContainer();if(e instanceof L&&e.isHorizontal()){if(this.isOpened()){if(e.getLocation()===S.LEFT&&this.model.getBorderLeftTabDirection()!==`down`){let e=[...a].reverse(),r,o=0,s=0,c;if(this.hasEndMarker())c=this.endMarkerRect.getBottom();else if(e.length>0){let t=e[0].getTabRect();c=t?t.y:this.pillRect.y}else c=this.pillRect.y;for(let l=0;l<e.length;l++){r=e[l].getTabRect(),l===0&&(o=r.x,s=r.width);let u=r.y+r.height/2;if(c<=n&&n<u&&r.x<t&&t<r.getRight()){let e=a.length-l,t=new b(r.x,r.y-2,r.width,3);i=new C(this,t,S.CENTER,e,w.FLEXLAYOUT__OUTLINE_RECT);break}c=u}if(i===void 0&&r!==void 0&&n>=c&&n<this.pillRect.y&&t>=r.x&&t<r.getRight()){let e=new b(o,r.getBottom()-2,s,3);i=new C(this,e,S.CENTER,0,w.FLEXLAYOUT__OUTLINE_RECT)}}else{let e,r=0,o=0,s=this.pillRect.getBottom();for(let c=0;c<a.length;c++){e=a[c].getTabRect(),c===0&&(r=e.x,o=e.width);let l=e.y+e.height/2;if(s<=n&&n<l&&e.x<t&&t<e.getRight()){let t=new b(e.x,e.y-2,e.width,3);i=new C(this,t,S.CENTER,c,w.FLEXLAYOUT__OUTLINE_RECT);break}s=l}if(i===void 0&&e!==void 0&&n>=s&&n<=e.getBottom()&&t>=e.x&&t<e.getRight()){let t=new b(r,e.getBottom()-2,o,3);i=new C(this,t,S.CENTER,a.length,w.FLEXLAYOUT__OUTLINE_RECT)}}}}else{let e=this.getLines(),r=e.findIndex(e=>e.some(e=>e.y<=n&&n<=e.getBottom()));if(r!==-1){let n=e[r],a=n.reduce((e,t)=>I(e,t)),o=n.indexOf(this.pillRect)!==-1,s=n.filter(e=>e!==this.pillRect&&e!==this.endMarkerRect);if(this.isOpened()){if(s.length===0)o&&t>=this.pillRect.getRight()&&(i=new C(this,this.pillRect.clone(),S.CENTER,0,w.FLEXLAYOUT__OUTLINE_RECT));else{let n=0;for(let t=0;t<r;t++)n+=e[t].filter(e=>e!==this.pillRect&&e!==this.endMarkerRect).length;let c=o?this.pillRect.getRight():a.x;for(let e=0;e<s.length;e++){let r=s[e],o=r.x+r.width/2;if(c<=t&&t<o){let t=new b(r.x-2,a.y,3,a.height);i=new C(this,t,S.CENTER,n+e,w.FLEXLAYOUT__OUTLINE_RECT);break}if(e===s.length-1&&t>=o){let t=new b(r.getRight()-2,a.y,3,a.height);i=new C(this,t,S.CENTER,n+e+1,w.FLEXLAYOUT__OUTLINE_RECT)}c=o}}}else t>=this.pillRect.getRight()&&(i=new C(this,this.pillRect.clone(),S.CENTER,0,w.FLEXLAYOUT__OUTLINE_RECT))}}}if(i===void 0||this.canDockInto(e,i))return i}drop(t,n,r,i){if(!(t instanceof R)||t.isPinned())return;let a=t.getParent(),o=this.getTabContainer(),s=o.getSelectedNode(),c=0;a!==void 0&&(a instanceof e?(c=a.getChildren().indexOf(t),a===this?a.removeChild(t):a.remove(t)):(a instanceof N||a instanceof L)&&(a.removeChild(t),a.repairSelected())),a===this&&c<r&&r>0&&r--;let l=r;if(l===-1&&(l=this.children.length),l=Math.max(0,Math.min(l,this.children.length)),this.addChild(t,l),this.isOpened()||this.setOpened(!0),i||i!==!1&&o.isAutoSelectTab())o.setSelected(o.getTabNodes().indexOf(t));else if(s!==void 0){let e=o.getTabNodes().indexOf(s);e===-1?o.repairSelected():o.setSelected(e)}else o.repairSelected();o instanceof N&&this.model.setActiveTabset(o,o.getLayoutId()),this.model.tidy()}isEnableDrop(){return!0}updateAttrs(t){e.attributeDefinitions.update(t,this.attributes)}getAttributeDefinitions(){return e.attributeDefinitions}static getAttributeDefinitions(){return me.ensureAttributePairing(),e.attributeDefinitions}static createAttributeDefinitions(){let t=new v;return t.add(`type`,e.TYPE,!0).setType(y.STRING).setFixed(),t.add(`id`,void 0).setType(y.STRING).setDescription(`the unique id of the group, if left undefined a uuid will be assigned`),t.add(`name`,`flexlayout.ui.group.default.name`).setType(y.STRING).setDescription(`the name of the group shown in its pill`),t.add(`color`,he).setType(y.STRING).setDescription(`the color of the group pill and the underline of its tabs (a css color)`),t.add(`opened`,!0).setType(y.BOOLEAN).setDescription(`whether the group is expanded to show its tabs; when false only the pill is shown`),t.add(`enableDrag`,!0).setType(y.BOOLEAN).setDescription(`whether the user can drag the group pill to a new location`),t.add(`config`,void 0).setType(`any`).setDescription(`a place to hold json config used in your own code`),t}};function I(e,t){let n=Math.min(e.x,t.x),r=Math.min(e.y,t.y),i=Math.max(e.getRight(),t.getRight()),a=Math.max(e.getBottom(),t.getBottom());return new b(n,r,i-n,a-r)}var L=class e extends k{static TYPE=`border`;static fromJson(t,n){let r=S.getByName(t.location),i=new e(r,t,n);return t.children&&(i.children=t.children.map(e=>{let t;if(e.type===F.TYPE)t=F.fromJson(e,n);else if(e.type===R.TYPE||e.type===void 0)t=R.fromJson(e,n);else throw Error(`Error: invalid border child type "${e.type}" (expected "tab" or "tabgroup")`);return t.setParent(i),t})),i.getSelected()>=i.getTabNodes().length?i.setSelected(i.getTabNodes().length-1):i.getSelected()<-1&&i.setSelected(-1),i}static attributeDefinitions=e.createAttributeDefinitions();contentRect=b.empty();tabHeaderRect=b.empty();location;constructor(t,n,r){super(r),this.location=t,this.attributes.id=`border_${t.getName()}`,e.attributeDefinitions.fromJson(n,this.attributes),r.addNode(this)}getLocation(){return this.location}getClassName(){return this.getAttr(`className`)}isHorizontal(){return this.location.orientation===x.HORZ}getSize(){let e=this.getAttr(`size`),t=this.getSelectedNode();if(t===void 0)return e;{let n=this.isHorizontal()?t.getAttr(`borderWidth`):t.getAttr(`borderHeight`);return n===-1?e:n}}getMinSize(){let e=this.getSelectedNode(),t=this.getAttr(`minSize`);if(e){let n=this.isHorizontal()?e.getMinWidth():e.getMinHeight();t=Math.max(t,n)}return t}getMaxSize(){let e=this.getSelectedNode(),t=this.getAttr(`maxSize`);if(e){let n=this.isHorizontal()?e.getMaxWidth():e.getMaxHeight();t=Math.min(t,n)}return t}getSelected(){return this.attributes.selected}getTabNodes(){let e=[];for(let t of this.children)t instanceof R?e.push(t):t instanceof F&&t.isOpened()&&e.push(...t.getChildren());return e}isAutoHide(){return this.getAttr(`enableAutoHide`)}getBorderType(){return this.getAttr(`borderType`)}isOverlay(){return this.getAttr(`borderType`)===`overlay`}setBorderType(e){this.attributes.borderType=e}getSelectedNode(){if(this.getSelected()!==-1)return this.getTabNodes()[this.getSelected()]}repairSelected(){let e=this.getTabNodes();if(e.length===0)this.setSelected(-1);else{let t=this.getSelected();t!==-1&&t>=e.length&&this.setSelected(e.length-1)}}getOrientation(){return this.location.getOrientation()}getConfig(){return this.attributes.config}isMaximized(){return!1}isShowing(){return this.attributes.show}toJson(){let t={location:`bottom`};return e.attributeDefinitions.toJson(t,this.attributes),t.location=this.location.getName(),t.children=this.children.map(e=>e.toJson()),t}isAutoSelectTabWhenOpen(){return this.getAttr(`autoSelectTabWhenOpen`)}isAutoSelectTabWhenClosed(){return this.getAttr(`autoSelectTabWhenClosed`)}isAutoSelectTab(e){return e??=this.getSelected()!==-1,e?this.isAutoSelectTabWhenOpen():this.isAutoSelectTabWhenClosed()}isEnableTabScrollbar(){return this.getAttr(`enableTabScrollbar`)}setSelected(e){this.attributes.selected=e}setTabHeaderRect(e){this.tabHeaderRect=e}getRect(){return this.tabHeaderRect}getContentRect(){return this.contentRect}setContentRect(e){this.contentRect=e}isEnableDrop(){return this.getAttr(`enableDrop`)}setSize(e){if(this.getSelected()===-1)this.attributes.size=e;else{let t=this.getSelectedNode();if(t===void 0){this.attributes.size=e;return}(this.isHorizontal()?t.getAttr(`borderWidth`):t.getAttr(`borderHeight`))===-1?this.attributes.size=e:this.isHorizontal()?t.setBorderWidth(e):t.setBorderHeight(e)}}updateAttrs(t){e.attributeDefinitions.update(t,this.attributes)}remove(e){this.removeChild(e),this.repairSelected()}canDrop(e,t,n,r=!1){if(!(e instanceof R)&&!(e instanceof F))return;let i,a=S.CENTER;if(this.tabHeaderRect.contains(t,n)){if(i=re(this,this.tabHeaderRect,this.children,e,t,n,this.isHorizontal(),!1),i!==void 0&&i.node!==this)return i;if(!this.canDockInto(e,i))return}else if(this.getSelected()!==-1&&this.contentRect.contains(t,n)){let t=this.contentRect;if(i=new C(this,t,a,-1,w.FLEXLAYOUT__OUTLINE_RECT),!this.canDockInto(e,i))return}return i}drop(e,t,n,r){if(!(e instanceof R)&&!(e instanceof F))return;let i=this.getSelectedNode(),{dragParent:a,fromIndex:o}=ce(e,this);a===this&&o<n&&n>0&&n--;let s=n;s===-1&&(s=this.children.length),this.addChild(e,s),e instanceof F?le(this,i):le(this,i,r,e),this.model.tidy()}getSplitterBounds(e=!1){let t=[0,0],n=this.model.getRootRow(me.MAIN_LAYOUT_ID),r=n.getRect();if(r.width===0&&r.height===0)return t;let i=e?this.getMinSize():0,a=e?this.getMaxSize():99999,o=this.model.getSplitterSize();if(this.location===S.TOP){t[0]=this.tabHeaderRect.getBottom()+i;let e=this.tabHeaderRect.getBottom()+a;t[1]=Math.max(t[0],r.getBottom()-n.getMinHeight()-o),t[1]=Math.min(t[1],e)}else if(this.location===S.LEFT){t[0]=this.tabHeaderRect.getRight()+i;let e=this.tabHeaderRect.getRight()+a;t[1]=Math.max(t[0],r.getRight()-n.getMinWidth()-o),t[1]=Math.min(t[1],e)}else if(this.location===S.BOTTOM){t[1]=this.tabHeaderRect.y-i-o;let e=this.tabHeaderRect.y-a-o;t[0]=Math.min(t[1],r.y+n.getMinHeight()),t[0]=Math.max(t[0],e)}else if(this.location===S.RIGHT){t[1]=this.tabHeaderRect.x-i-o;let e=this.tabHeaderRect.x-a-o;t[0]=Math.min(t[1],r.x+n.getMinWidth()),t[0]=Math.max(t[0],e)}return t}calculateSplit(e,t){let n=this.getSplitterBounds();return this.location===S.BOTTOM||this.location===S.RIGHT?Math.max(0,n[1]-t):Math.max(0,t-n[0])}getAttributeDefinitions(){return e.attributeDefinitions}static getAttributeDefinitions(){return me.ensureAttributePairing(),e.attributeDefinitions}static createAttributeDefinitions(){let t=new v;return t.add(`type`,e.TYPE,!0).setType(y.STRING).setFixed(),t.add(`selected`,-1).setType(y.NUMBER).setDescription(`index of selected/visible tab in border; -1 means no tab selected`),t.add(`borderType`,`split`).setType(y.STRING).setValues([`split`,`overlay`]).setDescription(`the border display type: 'split' splits the main layout to make room when a tab is selected; 'overlay' shows
19
- the selected tab's panel as an overlay on top of the main layout area, and the tab is deselected
20
- by a pointer-down in the main layout area (Visual Studio style auto hide). Set via
21
- Actions.setBorderType. Not related to enableAutoHide (which hides the border strip when it has
22
- zero tabs)`),t.add(`show`,!0).setType(y.BOOLEAN).setDescription(`show/hide this border`),t.add(`config`,void 0).setType(`any`).setDescription(`a place to hold json config used in your own code`),t.addInherited(`enableDrop`,`borderEnableDrop`).setDescription(`whether tabs can be dropped into this border`),t.addInherited(`className`,`borderClassName`).setDescription(`class applied to the border container`),t.addInherited(`autoSelectTabWhenOpen`,`borderAutoSelectTabWhenOpen`).setDescription(`whether to select new/moved tabs in border when the border is already open`),t.addInherited(`autoSelectTabWhenClosed`,`borderAutoSelectTabWhenClosed`).setDescription(`whether to select new/moved tabs in border when the border is currently closed`),t.addInherited(`size`,`borderSize`).setDescription(`size of the tab area when selected`),t.addInherited(`minSize`,`borderMinSize`).setDescription(`the minimum size of the tab area`),t.addInherited(`maxSize`,`borderMaxSize`).setDescription(`the maximum size of the tab area`),t.addInherited(`enableAutoHide`,`borderEnableAutoHide`).setDescription(`hide border if it has zero tabs; not related to the borderType 'overlay' mode (Visual Studio
23
- style auto hide), see the borderType attribute`),t.addInherited(`enableTabScrollbar`,`borderEnableTabScrollbar`).setDescription(`whether to show a mini scrollbar for the tabs`),t}},R=class e extends k{static TYPE=`tab`;static fromJson(t,n,r=!0){return new e(n,t,r)}tabRect=b.empty();renderedName;extra;visible;rendered;moveableElement;tabStamp;scrollTop;scrollLeft;constructor(t,n,r=!0){super(t),this.extra={},this.moveableElement=null,this.tabStamp=null,this.rendered=!1,this.visible=!1,e.attributeDefinitions.fromJson(n,this.attributes),r===!0&&t.addNode(this)}getName(){return this.model.translate(this.getAttr(`name`))}getIcon(){return this.getAttr(`icon`)}getSubLayoutId(){return this.getAttr(`subLayoutId`)}getHelpText(){return this.model.translate(this.getAttr(`helpText`))}getComponent(){return this.getAttr(`component`)}getAltName(){return this.model.translate(this.getAttr(`altName`))}getWindowId(){let e=this.getLayout();if(e)return e.getWindowId()}getConfig(){return this.attributes.config}getExtraData(){return this.extra}isPoppedOut(){return this.getLayoutId()!==me.MAIN_LAYOUT_ID}getTabContainer(){let e=this.getParent();return e instanceof F?e.getTabContainer():e}isInsideTabSet(){let e=this.getParent();return e instanceof N||e instanceof F&&e.getTabContainer()instanceof N}isInsideBorder(){let e=this.getParent();return e instanceof L||e instanceof F&&e.getTabContainer()instanceof L}isSelected(){return this.getTabContainer().getSelectedNode()===this}isPinned(){return this.getAttr(`pinned`)}isCloseable(){if(this.isPinned())return!1;let e=this.isEnableClose();if(e&&this.getSubLayoutId()){let t=this.model.getLayouts().get(this.getSubLayoutId());t&&(e=t.getRootRow().isCloseable())}return e}isAllowedInWindow(){let e=this.isEnablePopout();if(e&&this.getSubLayoutId()){let t=this.model.getLayouts().get(this.getSubLayoutId());t&&(e=t.getRootRow().isAllowedInWindow())}return e}isEnableClose(){return this.getAttr(`enableClose`)}isEnableScrollbars(){return this.getAttr(`enableScrollbars`)}getCloseType(){return this.getAttr(`closeType`)}isEnablePopout(){return this.getAttr(`enablePopout`)}isEnableFloat(){return this.getAttr(`enableFloat`)}isEnablePopoutIcon(){return this.getAttr(`enablePopoutIcon`)}isEnableFloatIcon(){return this.getAttr(`enableFloatIcon`)}isEnablePopoutOverlay(){return this.getAttr(`enablePopoutOverlay`)}isEnableDrag(){return this.getAttr(`enableDrag`)}isEnableRename(){return this.getAttr(`enableRename`)}isEnablePin(){return this.getAttr(`enablePin`)}isEnableWindowReMount(){return this.getAttr(`enableWindowReMount`)}getClassName(){return this.getAttr(`className`)}getContentClassName(){return this.getAttr(`contentClassName`)}getTabSetClassName(){return this.getAttr(`tabsetClassName`)}isEnableRenderOnDemand(){return this.getAttr(`enableRenderOnDemand`)}getMinWidth(){return this.getAttr(`minWidth`)}getMinHeight(){return this.getAttr(`minHeight`)}getMaxWidth(){return this.getAttr(`maxWidth`)}getMaxHeight(){return this.getAttr(`maxHeight`)}getBorderWidth(){return this.getAttr(`borderWidth`)}getBorderHeight(){return this.getAttr(`borderHeight`)}isVisible(){return this.visible}toJson(){let t={};return e.attributeDefinitions.toJson(t,this.attributes),t}saveScrollPosition(){this.moveableElement&&(this.scrollLeft=this.moveableElement.scrollLeft,this.scrollTop=this.moveableElement.scrollTop)}restoreScrollPosition(){(this.scrollTop||this.scrollLeft)&&requestAnimationFrame(()=>{this.moveableElement&&(this.moveableElement.scrollTop=this.scrollTop??0,this.moveableElement.scrollLeft=this.scrollLeft??0)})}setRect(e){e.equalsWhenRounded(this.rect)||this.fireEvent(`resize`,{rect:e}),this.rect=e}setVisible(e){e!==this.visible&&(this.visible=e,this.fireEvent(`visibility`,{visible:e}))}setScrollTop(e){this.scrollTop=e}setScrollLeft(e){this.scrollLeft=e}isRendered(){return this.rendered}setRendered(e){this.rendered=e}getTabRect(){return this.tabRect}setTabRect(e){this.tabRect=e}getTabStamp(){return this.tabStamp}setTabStamp(e){this.tabStamp=e}getMoveableElement(){return this.moveableElement===null&&(this.moveableElement=document.createElement(`div`),this.moveableElement.className=w.FLEXLAYOUT__TAB_MOVEABLE),this.moveableElement}setMoveableElement(e){this.moveableElement=e}setRenderedName(e){this.renderedName=e}getNameForOverflowMenu(){let e=this.getAttr(`altName`);return e===void 0?this.model.translate(this.renderedName):this.model.translate(e)}setName(e){this.attributes.name=e}setPinned(e){this.attributes.pinned=e}delete(){this.parent.remove(this),this.deleteSubLayout(),this.fireEvent(`close`,{})}adoptViewState(e){this.moveableElement=e.moveableElement,e.moveableElement=null,this.tabStamp=e.tabStamp,this.scrollTop=e.scrollTop,this.scrollLeft=e.scrollLeft,this.rendered=e.rendered,this.visible=e.visible,this.rect=e.rect,this.tabRect=e.tabRect,this.extra=e.extra}deleteSubLayout(){let t=this.getSubLayoutId();if(t){let n=this.model.getLayouts().get(t);this.model.getLayouts().delete(t),n&&n.getRootRow()?.forEachNode(t=>{t instanceof e&&(t.deleteSubLayout(),t.fireEvent(`close`,{}))},0)}}updateAttrs(t){e.attributeDefinitions.update(t,this.attributes)}getAttributeDefinitions(){return e.attributeDefinitions}setBorderWidth(e){this.attributes.borderWidth=e}setBorderHeight(e){this.attributes.borderHeight=e}static getAttributeDefinitions(){return me.ensureAttributePairing(),e.attributeDefinitions}static attributeDefinitions=e.createAttributeDefinitions();static createAttributeDefinitions(){let t=new v;return t.add(`type`,e.TYPE,!0).setType(y.STRING).setFixed(),t.add(`id`,void 0).setType(y.STRING).setDescription(`the unique id of the tab, if left undefined a uuid will be assigned`),t.add(`name`,`[Unnamed Tab]`).setType(y.STRING).setDescription(`name of tab to be displayed in the tab button`),t.add(`component`,void 0).setType(y.STRING).setDescription(`string identifying which component to render in this tab (used in the layout factory function)`),t.add(`subLayoutId`,void 0).setType(y.STRING).setDescription(`the Id of the sub layout to render in this tab, defined in the subLayouts section of the model json (if
24
- component is also defined then use the <TabLayout> component in the factory to render the sublayout)`),t.add(`altName`,void 0).setType(y.STRING).setDescription(`the name used in the overflow menu when the tab has no name (e.g. an icon-only tab)`),t.add(`helpText`,void 0).setType(y.STRING).setDescription(`help text for the tab to be displayed upon tab hover`),t.add(`config`,void 0).setType(`any`).setDescription(`a place to hold json config for the hosted component`),t.add(`tabsetClassName`,void 0).setType(y.STRING).setDescription(`class applied to parent tabset when this is the only tab and it is stretched to fill the tabset`),t.add(`enableWindowReMount`,!1).setType(y.BOOLEAN).setDescription(`if enabled the tab will re-mount when popped out/in`),t.add(`pinned`,!1).setType(y.BOOLEAN).setDescription(`whether the tab is pinned; pinned tabs are grouped at the start of the tabstrip, cannot be closed
25
- via the ui, and cannot be dragged out of their tabset (they can be reordered within the pinned group).
26
- Set via Actions.setTabPinned. Only applies to tabs in tabsets (not borders); pinned tabs should be
27
- listed first in the json`),t.addInherited(`enableClose`,`tabEnableClose`).setDescription(`whether the tab can be closed by the user via its close button`),t.addInherited(`closeType`,`tabCloseType`).setDescription(`when the tab's close button is active: Visible (default) active if selected or hovered (note: mobile doesnt support hovered), Always: always active, Selected only active on selected tab (clicking on the x button on a non-selected tab will just select it)`),t.addInherited(`enableDrag`,`tabEnableDrag`).setDescription(`whether the user can drag the tab to a new location`),t.addInherited(`enableRename`,`tabEnableRename`).setDescription(`whether the user can rename the tab by double clicking`),t.addInherited(`enablePin`,`tabEnablePin`).setDescription(`whether the user can pin/unpin the tab via the context menu`),t.addInherited(`className`,`tabClassName`).setDescription(`class applied to tab button`),t.addInherited(`contentClassName`,`tabContentClassName`).setDescription(`class applied to tab content`),t.addInherited(`icon`,`tabIcon`).setDescription(`the tab icon`),t.addInherited(`enableRenderOnDemand`,`tabEnableRenderOnDemand`).setDescription(`whether to avoid rendering component until tab is visible`),t.addInherited(`enablePopout`,`tabEnablePopout`).setDescription(`enable window popout (in popout capable browser), to show an icon in the tabset header also set the enablePopoutIcon attribute`),t.addInherited(`enableFloat`,`tabEnableFloat`).setDescription(`whether the user can move the tab to a floating window via the context menu`),t.addInherited(`enablePopoutIcon`,`tabEnablePopoutIcon`).setDescription(`whether to show the popout icon in the tabset header if this tab enables popouts`),t.addInherited(`enableFloatIcon`,`tabEnableFloatIcon`).setAlias(`enablePopoutFloatIcon`).setDescription(`whether to show the float icon in the tabset header if this tab enables floating`),t.addInherited(`enablePopoutOverlay`,`tabEnablePopoutOverlay`).setDescription(`if this tab will not work correctly in a popout window when the main window is backgrounded (inactive)
28
- then enabling this option will gray out this tab`),t.addInherited(`borderWidth`,`tabBorderWidth`).setDescription(`the width of this tab when shown in a border; -1 uses the border's default size`),t.addInherited(`borderHeight`,`tabBorderHeight`).setDescription(`the height of this tab when shown in a border; -1 uses the border's default size`),t.addInherited(`minWidth`,`tabMinWidth`).setDescription(`the minimum width (in px) of this tab`),t.addInherited(`minHeight`,`tabMinHeight`).setDescription(`the minimum height (in px) of this tab`),t.addInherited(`maxWidth`,`tabMaxWidth`).setDescription(`the maximum width (in px) of this tab`),t.addInherited(`maxHeight`,`tabMaxHeight`).setDescription(`the maximum height (in px) of this tab`),t.addInherited(`enableScrollbars`,`tabEnableScrollbars`).setDescription(`whether the tab will be hosted in a scrollable container`),t}},z=function(e){return e.Close_Tab=`flexlayout.ui.close.tab`,e.Pinned_Tab=`flexlayout.ui.pinned.tab`,e.Rename_Tab=`flexlayout.ui.rename.tab`,e.Close_Tabset=`flexlayout.ui.close.tabset`,e.Active_Tabset=`flexlayout.ui.active.tabset`,e.Move_Tabset=`flexlayout.ui.move.tabset`,e.Move_Tabs=`flexlayout.ui.move.tabs (?)`,e.Move_Group=`flexlayout.ui.move.group (?)`,e.Maximize=`flexlayout.ui.maximize.tabset`,e.Restore=`flexlayout.ui.restore.tabset`,e.Popout_Tab=`flexlayout.ui.popout.tab`,e.Popout_Tab_Float=`flexlayout.ui.popout.tab.float`,e.Popout_Float_To_Window=`flexlayout.ui.popout.float.to.window`,e.Dock_Float_To_Layout=`flexlayout.ui.dock.float.to.layout`,e.Dock_Float_Tabs=`flexlayout.ui.dock.float.tabs (?)`,e.Overflow_Menu_Tooltip=`flexlayout.ui.overflow.menu.tooltip`,e.Splitter=`flexlayout.ui.splitter`,e.Error_rendering_component=`flexlayout.ui.error.rendering.component`,e.Error_rendering_component_retry=`flexlayout.ui.error.rendering.component.retry`,e.Popout_Window_Name=`flexlayout.ui.popout.window.name`,e.Menu_Rename=`flexlayout.ui.menu.rename`,e.Menu_Pin=`flexlayout.ui.menu.pin`,e.Menu_Unpin=`flexlayout.ui.menu.unpin`,e.Menu_Popout=`flexlayout.ui.menu.popout`,e.Menu_Float=`flexlayout.ui.menu.float`,e.Menu_Popout_Tabset=`flexlayout.ui.menu.popout.tabset`,e.Menu_Float_Tabset=`flexlayout.ui.menu.float.tabset`,e.Menu_Maximize=`flexlayout.ui.menu.maximize`,e.Menu_Restore=`flexlayout.ui.menu.restore`,e.Menu_Overlay=`flexlayout.ui.menu.overlay`,e.Menu_Split=`flexlayout.ui.menu.split`,e.Menu_Close_All=`flexlayout.ui.menu.close.all`,e.Menu_Close_Right=`flexlayout.ui.menu.close.right`,e.Menu_Close_Others=`flexlayout.ui.menu.close.others`,e.Menu_Add_To_New_Group=`flexlayout.ui.menu.add.to.new.group`,e.Menu_Add_To_Group=`flexlayout.ui.menu.add.to.group`,e.Menu_Remove_From_Group=`flexlayout.ui.menu.remove.from.group`,e.Menu_Ungroup=`flexlayout.ui.menu.ungroup`,e.Menu_Expand=`flexlayout.ui.menu.expand`,e.Menu_Collapse=`flexlayout.ui.menu.collapse`,e.Rename_Group=`flexlayout.ui.rename.group`,e.Group_Color=`flexlayout.ui.group.color`,e.Group_Pill_Tooltip=`flexlayout.ui.group.pill.tooltip`,e.Group_Name_Label=`flexlayout.ui.group.name.label`,e.Group_Name_Placeholder=`flexlayout.ui.group.name.placeholder`,e.Group_Color_N=`flexlayout.ui.group.color.n`,e.Group_Default_Name=`flexlayout.ui.group.default.name`,e}({}),ge={"flexlayout.ui.close.tab":`Close`,"flexlayout.ui.pinned.tab":`Pinned`,"flexlayout.ui.rename.tab":`Rename tab`,"flexlayout.ui.close.tabset":`Close tabset`,"flexlayout.ui.active.tabset":`Active tabset`,"flexlayout.ui.move.tabset":`Move tabset`,"flexlayout.ui.move.tabs (?)":`Move tabs (?)`,"flexlayout.ui.move.group (?)":`Move group (?)`,"flexlayout.ui.maximize.tabset":`Maximize tabset`,"flexlayout.ui.restore.tabset":`Restore tabset`,"flexlayout.ui.popout.tab":`Popout selected tab`,"flexlayout.ui.popout.tab.float":`Float selected tab`,"flexlayout.ui.popout.float.to.window":`Popout panel`,"flexlayout.ui.dock.float.to.layout":`Drag into another layout`,"flexlayout.ui.dock.float.tabs (?)":`Dock tabs (?)`,"flexlayout.ui.overflow.menu.tooltip":`Hidden tabs`,"flexlayout.ui.splitter":`Resize`,"flexlayout.ui.error.rendering.component":`Error rendering component`,"flexlayout.ui.error.rendering.component.retry":`Retry`,"flexlayout.ui.popout.window.name":`Popout Window`,"flexlayout.ui.menu.rename":`Rename`,"flexlayout.ui.menu.pin":`Pin`,"flexlayout.ui.menu.unpin":`Unpin`,"flexlayout.ui.menu.popout":`Popout`,"flexlayout.ui.menu.float":`Float`,"flexlayout.ui.menu.popout.tabset":`Pop out tabset`,"flexlayout.ui.menu.float.tabset":`Float tabset`,"flexlayout.ui.menu.maximize":`Maximize`,"flexlayout.ui.menu.restore":`Restore`,"flexlayout.ui.menu.overlay":`Overlay`,"flexlayout.ui.menu.split":`Split`,"flexlayout.ui.menu.close.all":`Close All`,"flexlayout.ui.menu.close.right":`Close to the Right`,"flexlayout.ui.menu.close.others":`Close Others`,"flexlayout.ui.menu.add.to.new.group":`Add to new group`,"flexlayout.ui.menu.add.to.group":`Add to group`,"flexlayout.ui.menu.remove.from.group":`Remove from group`,"flexlayout.ui.menu.ungroup":`Ungroup`,"flexlayout.ui.menu.expand":`Expand`,"flexlayout.ui.menu.collapse":`Collapse`,"flexlayout.ui.rename.group":`Rename group`,"flexlayout.ui.group.color":`Group color`,"flexlayout.ui.group.pill.tooltip":`Tab Group, click to expand/collapse`,"flexlayout.ui.group.name.label":`Name`,"flexlayout.ui.group.name.placeholder":`Group Name`,"flexlayout.ui.group.color.n":`Group color ?`,"flexlayout.ui.group.default.name":`Group`},_e={closeTab:`Ctrl+Delete`,renameTab:`F2`,focusTabToggle:void 0,focusNextTabset:void 0,focusPreviousTabset:void 0,closeOverlayBorder:`Escape`};function B(){return typeof window<`u`&&window.matchMedia&&window.matchMedia(`(hover: hover) and (pointer: fine)`).matches}function ve(e,t,n){let r,i=t.getName(),a=t.getName();n===void 0&&(n=0),r===void 0&&t.getIcon()!==void 0&&(r=n===0?(0,d.jsx)(`img`,{style:{width:`1em`,height:`1em`},src:t.getIcon(),alt:``}):(0,d.jsx)(`img`,{style:{width:`1em`,height:`1em`,transform:`rotate(`+n+`deg)`},src:t.getIcon(),alt:``}));let o={leading:r,content:i,name:a,buttons:[]};return e.customizeTab(t,o),t.setRenderedName(o.name),o}function ye(e,t){return e+t.replace(/\s/g,`_`)}function be(e){return e.getPath().replace(/\/t(\d+)$/,`/tb$1`)}function xe(e,t){if(!t||typeof e.key!=`string`)return!1;let n=t.split(`+`),r=n.pop(),i=e=>n.some(t=>t.toLowerCase()===e);return e.key.toLowerCase()===r.toLowerCase()&&e.ctrlKey===i(`ctrl`)&&e.shiftKey===i(`shift`)&&e.altKey===i(`alt`)&&e.metaKey===i(`meta`)}function Se(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}function Ce(e){return{..._e,...e}}function we(e){return e?.replace(/\bctrl\b/i,`Control`)}function Te(e){e&&(e.querySelector(`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)??e).focus()}function Ee(e){let t=!1;return e.nativeEvent instanceof MouseEvent&&(e.nativeEvent.button!==0||e.ctrlKey||e.altKey||e.metaKey||e.shiftKey)&&(t=!0),t}function De(e,t){let n=[...Oe(`iframe`,t),...Oe(`webview`,t)];for(let t of n)t.style.pointerEvents=e?`auto`:`none`}function Oe(e,t){return[...t.getElementsByTagName(e)]}var ke=!1;function Ae(e,t,n,r,i){ke=!0,t.preventDefault(),t.currentTarget&&typeof t.currentTarget.setPointerCapture==`function`&&t.currentTarget.setPointerCapture(t.pointerId);let a=e=>{e.preventDefault(),n(e.clientX,e.clientY)},o=()=>{e.removeEventListener(`pointermove`,a),e.removeEventListener(`pointerup`,c),e.removeEventListener(`pointercancel`,s)},s=e=>{e.preventDefault(),o(),ke=!1,i()},c=()=>{o(),ke=!1,r()};e.addEventListener(`pointermove`,a),e.addEventListener(`pointerup`,c),e.addEventListener(`pointercancel`,s)}function je(e,t){let n=e.getAttribute(`style`);return n!==t.getAttribute(`style`)&&(n?t.setAttribute(`style`,n):t.removeAttribute(`style`),!0)}function Me(){let e=navigator.userAgent;return e.includes(`Safari`)&&!e.includes(`Chrome`)&&!e.includes(`Chromium`)}function Ne(e=window){let t=e.document;return{scrollTop:e.pageYOffset||t.documentElement.scrollTop||t.body.scrollTop||0,scrollLeft:e.pageXOffset||t.documentElement.scrollLeft||t.body.scrollLeft||0,fullHeight:Math.max(t.body.scrollHeight,t.documentElement.scrollHeight,t.body.offsetHeight,t.documentElement.offsetHeight,t.body.clientHeight,t.documentElement.clientHeight),fullWidth:Math.max(t.body.scrollWidth,t.documentElement.scrollWidth,t.body.offsetWidth,t.documentElement.offsetWidth,t.body.clientWidth,t.documentElement.clientWidth),viewportHeight:e.innerHeight||t.documentElement.clientHeight,viewportWidth:e.innerWidth||t.documentElement.clientWidth}}var Pe=e=>{let{controller:t,show:n}=e;return(0,d.jsx)(`div`,{"aria-hidden":`true`,className:t.getClassName(w.FLEXLAYOUT__LAYOUT_OVERLAY),style:{display:n?`flex`:`none`}})};Pe.displayName=`Overlay`;var Fe=2e3,Ie=750,Le=e=>{let{title:t,controller:n,layout:r,url:i,onCloseLayout:a,children:o}=e,s=u.useRef(null),[c,l]=u.useState(void 0),[d,p]=u.useState(void 0),[m,h]=u.useState(void 0),g=u.useMemo(()=>new Map,[]),_=u.useRef(!1),v=u.useRef(null),y=u.useRef(null),b=u.useRef(null),x=u.useRef(new Map);if(u.useLayoutEffect(()=>{!_.current&&c&&(_.current=!0,n.redrawLayout(),Ue(g))},[c,n,g]),u.useLayoutEffect(()=>{let e=()=>{if(s.current){let e=s.current;s.current=null,e.close()}};if(!s.current){let o=r.getLayoutId(),c=r.getRect();s.current=window.open(i,o,`left=${c.x},top=${c.y},width=${c.width},height=${c.height}`),s.current?(window.addEventListener(`beforeunload`,e),s.current.addEventListener(`load`,()=>{if(s.current){b.current?.(),_.current=!1;let e=s.current;s.current.focus(),s.current.resizeTo(c.width,c.height),s.current.moveTo(c.x,c.y);let i=s.current;i.resizeBy(c.width-i.outerWidth,c.height-i.outerHeight),i.moveBy(c.x-i.screenLeft,c.y-i.screenTop);let o=s.current.document;p(s.current),h(o),o.title=t,document.documentElement.lang&&(o.documentElement.lang=document.documentElement.lang),document.documentElement.dir&&(o.documentElement.dir=document.documentElement.dir);let u=o.createElement(`div`);u.className=w.FLEXLAYOUT__FLOATING_WINDOW_CONTENT,o.body.appendChild(u),n.getProps().onPopoutOpen?.(r,s.current,o),Be(o,g).then(()=>{l(u)}),v.current=new MutationObserver(e=>Re(e,o,g)),v.current.observe(document.head,{childList:!0,subtree:!0,characterData:!0}),y.current=o.defaultView?.setInterval(()=>{We(g,x.current)},Ie)??null;let d=()=>{s.current&&(n.getProps().onPopoutClose?.(r,s.current,o),a(r),s.current=null,b.current?.())};e.addEventListener(`beforeunload`,d),b.current=()=>{v.current?.disconnect(),v.current=null,y.current!=null&&(o.defaultView?.clearInterval(y.current),y.current=null),e.removeEventListener(`beforeunload`,d)}}})):(console.warn(`Unable to open window ${i}`),a(r))}return()=>{window.removeEventListener(`beforeunload`,e),s.current?.close(),s.current=null,b.current?.()}},[]),c!==void 0){let e=n.getProps().renderPopoutContent,t=o;return e&&m&&(t=e({children:o,layout:r,popoutWindow:d??window,popoutDocument:m})),(0,f.createPortal)(t,c)}return null};function Re(e,t,n){for(let r of e)if(r.type===`childList`&&r.target===document.head){for(let e of r.addedNodes)(e instanceof HTMLLinkElement||e instanceof HTMLStyleElement)&&Ve(t,e,n);for(let e of r.removedNodes)if(e instanceof HTMLLinkElement||e instanceof HTMLStyleElement){let t=n.get(e);t&&(t.remove(),n.delete(e))}}else{let e=ze(r.target),t=e&&n.get(e);e&&t&&He(e,t)}}function ze(e){let t=e instanceof HTMLElement?e:e.parentNode;for(;t&&!(t instanceof HTMLStyleElement);)t=t.parentNode;return t instanceof HTMLStyleElement?t:void 0}function Be(e,t){let n=[],r=document.querySelectorAll(`style, link[rel="stylesheet"]`);for(let i of r)Ve(e,i,t,n);return Promise.all(n)}function Ve(e,t,n,r){if(t instanceof HTMLLinkElement){let i=t.cloneNode(!0);e.head.appendChild(i),n.set(t,i),r&&r.push(new Promise(t=>{let n=!1,r=e=>{n||(n=!0,t(e))};i.onload=()=>r(!0),i.onerror=()=>r(!1),e.defaultView?.setTimeout(()=>r(!1),Fe)}))}else if(t instanceof HTMLStyleElement)try{let r=t.cloneNode(!0);e.head.appendChild(r),He(t,r),n.set(t,r)}catch{}}function He(e,t){let n=e.textContent??``;if(n.trim()!==``)t.textContent=n;else try{t.textContent=``;let n=e.sheet?.cssRules;if(n)for(let e of n)t.sheet.insertRule(e.cssText,t.sheet.cssRules.length)}catch{}}function Ue(e){for(let[t,n]of e)t instanceof HTMLStyleElement&&He(t,n)}function We(e,t){for(let[n,r]of e){if(!(n instanceof HTMLStyleElement)||(n.textContent??``).trim()!==``)continue;let e=0;try{e=n.sheet?.cssRules.length??0}catch{}e!==t.get(n)&&(t.set(n,e),He(n,r))}}Le.displayName=`PopoutWindow`;var Ge=10,Ke=-4,qe=8,Je=12,Ye=150,Xe=25,Ze=e=>{let{controller:t,layout:n,children:r}=e,[i,a]=u.useState(n.getRect()),o=u.useRef(b.empty()),s=t.getClassName,c=u.useRef(null),l=u.useRef(null),f=u.useRef(null),p=u.useRef(null),m=u.useRef(null),h=u.useRef(null),g=u.useRef(null),_=u.useRef(null),v=u.useRef(null),y=u.useRef(null),x=u.useRef(!1),S=u.useRef(void 0);u.useEffect(()=>{o.current=i},[i]),u.useEffect(()=>{let e=requestAnimationFrame(()=>{a(n.getRect())});return()=>cancelAnimationFrame(e)},[n]);let C=u.useCallback(e=>{let n=t.getCurrentWindow()??window,r=b.fromDomRect(t.getRootDiv().getBoundingClientRect()),i;if(t.getProps().constrainFloatPanels)i=new b(0,0,r.width,r.height);else{let e=Ne(n),t=Math.max(e.fullWidth,n.innerWidth),a=Math.max(e.fullHeight,n.innerHeight);i=new b(-r.x,-r.y,t,a)}let a=e.clone();return a.clamp(i),a},[t]),E=u.useCallback(e=>{e.preventDefault(),e.stopImmediatePropagation()},[]);u.useEffect(()=>{let e=[l,f,p,m,h,g,_,v,y].map(e=>e.current).filter(e=>e!==null);return e.forEach(e=>e.addEventListener(`touchstart`,E,{passive:!1})),()=>{e.forEach(e=>e.removeEventListener(`touchstart`,E))}},[E]);let D=u.useRef(!1);u.useLayoutEffect(()=>{if(!D.current){D.current=!0;let e=C(i);e.equals(i)||(a(e),n.setRect(e))}},[C,i,n]),u.useEffect(()=>{let e=()=>{let e=[...t.getModel().getLayouts()],r=e[e.length-1][1];n!==r&&(x.current=!0)},r=t.getCurrentWindow()??window,i=()=>{x.current&&=(S.current=r.setTimeout(()=>{S.current=void 0,t.moveWindowToFront(n.getLayoutId())},10),!1)},a=c.current;return a&&(a.addEventListener(`pointerdown`,e,{capture:!0}),a.addEventListener(`pointerup`,i)),()=>{a&&(a.removeEventListener(`pointerdown`,e,{capture:!0}),a.removeEventListener(`pointerup`,i)),S.current!==void 0&&(r.clearTimeout(S.current),S.current=void 0)}},[t,n]);let O=e=>{e.stopPropagation();let r={x:e.clientX-i.x,y:e.clientY-i.y};t.showOverlayOnAllWindows(!0),Ae(t.getCurrentDocument()??document,e,(e,o)=>{x.current&&=(t.moveWindowToFront(n.getLayoutId()),!1);let s=new b(e-r.x,o-r.y,i.width,i.height),c=C(s);a(c),t.doAction(T.moveFloat(n.getLayoutId(),c).setAdjusting(!0))},()=>{t.doAction(T.moveFloat(n.getLayoutId(),o.current).setAdjusting(!1)),t.redrawLayout(),t.showOverlayOnAllWindows(!1)},()=>{t.doAction(T.moveFloat(n.getLayoutId(),o.current).setAdjusting(!1)),t.redrawLayout(),t.showOverlayOnAllWindows(!1)})},ee=t.getIcons(),k=t.isSupportsPopout()&&n.getRootRow()?.isAllowedInWindow()===!0,A=e=>{e.stopPropagation(),n.getRootRow()?.getChildren().length?t.getDragDropManager().startDockLayoutDrag(e.nativeEvent,n,c.current??void 0):e.preventDefault()},j=e=>{t.getDragDropManager().onDragEnded()},te=e=>{e.stopPropagation()},ne=e=>{e.stopPropagation();let r=t.getScreenRect(n.getRect());t.doAction(T.popoutFloat(n.getLayoutId(),r.toJson()))},M=(e,r)=>{let s=i,c={x:e.clientX,y:e.clientY};t.showOverlayOnAllWindows(!0),Ae(t.getCurrentDocument()??document,e,(e,i)=>{let o=e-c.x,l=i-c.y,u=s.x,d=s.y,f=s.width,p=s.height;r.includes(`n`)&&(d+=l,p-=l),r.includes(`s`)&&(p+=l),r.includes(`w`)&&(u+=o,f-=o),r.includes(`e`)&&(f+=o);let m=new b(u,d,Math.max(Ye,f),Math.max(Xe,p)),h=C(m);a(h),t.doAction(T.moveFloat(n.getLayoutId(),h).setAdjusting(!0))},()=>{t.doAction(T.moveFloat(n.getLayoutId(),o.current).setAdjusting(!1)),t.redrawLayout(),t.showOverlayOnAllWindows(!1)},()=>{t.doAction(T.moveFloat(n.getLayoutId(),o.current).setAdjusting(!1)),t.redrawLayout(),t.showOverlayOnAllWindows(!1)}),e.stopPropagation()};return(0,d.jsxs)(`div`,{ref:c,className:s(w.FLEXLAYOUT__FLOAT_WINDOW),style:{left:i.x,top:i.y,width:i.width,height:i.height,position:`absolute`},children:[(0,d.jsxs)(`div`,{ref:l,className:s(w.FLEXLAYOUT__FLOAT_WINDOW_HEADER),onPointerDown:O,children:[(0,d.jsx)(`div`,{"data-layout-path":`/floatwindow/drag-handle`,className:s(w.FLEXLAYOUT__FLOAT_WINDOW_DRAG_HANDLE),draggable:!0,title:t.i18nName(z.Dock_Float_To_Layout),"aria-label":t.i18nName(z.Dock_Float_To_Layout),onDragStart:A,onDragEnd:j,onPointerDown:te,children:ee.dragToDock}),(0,d.jsx)(`div`,{style:{flexGrow:1,display:`flex`,justifyContent:`center`,alignItems:`center`,minWidth:0,overflow:`hidden`},children:n.getName()===void 0?(0,d.jsx)(`div`,{style:{width:50,height:8,display:`flex`,flexDirection:`column`,justifyContent:`space-around`,opacity:.5},children:(0,d.jsx)(`div`,{style:{height:2,backgroundColor:`gray`,borderRadius:1}})}):(0,d.jsx)(`span`,{"data-layout-path":`/floatwindow/title`,className:s(w.FLEXLAYOUT__FLOAT_WINDOW_HEADER_TITLE),title:n.getName(),children:n.getName()})}),k&&(0,d.jsx)(`button`,{type:`button`,"data-layout-path":`/floatwindow/button/popout`,className:s(w.FLEXLAYOUT__FLOAT_WINDOW_BUTTON),title:t.i18nName(z.Popout_Float_To_Window),"aria-label":t.i18nName(z.Popout_Float_To_Window),onClick:ne,onPointerDown:te,children:ee.popoutFloatWindow})]}),(0,d.jsx)(`div`,{className:s(w.FLEXLAYOUT__FLOAT_WINDOW_CONTENT),children:r}),(0,d.jsx)(`div`,{ref:f,style:{position:`absolute`,zIndex:Ge,top:Ke,left:qe,right:qe,height:qe,cursor:`ns-resize`},onPointerDown:e=>M(e,`n`)}),(0,d.jsx)(`div`,{ref:g,style:{position:`absolute`,zIndex:Ge,bottom:Ke,left:qe,right:qe,height:qe,cursor:`ns-resize`},onPointerDown:e=>M(e,`s`)}),(0,d.jsx)(`div`,{ref:m,style:{position:`absolute`,zIndex:Ge,top:qe,bottom:qe,right:Ke,width:qe,cursor:`ew-resize`},onPointerDown:e=>M(e,`e`)}),(0,d.jsx)(`div`,{ref:v,style:{position:`absolute`,zIndex:Ge,top:qe,bottom:qe,left:Ke,width:qe,cursor:`ew-resize`},onPointerDown:e=>M(e,`w`)}),(0,d.jsx)(`div`,{ref:y,style:{position:`absolute`,zIndex:Ge,top:Ke,left:Ke,width:Je,height:Je,cursor:`nwse-resize`},onPointerDown:e=>M(e,`nw`)}),(0,d.jsx)(`div`,{ref:p,style:{position:`absolute`,zIndex:Ge,top:Ke,right:Ke,width:Je,height:Je,cursor:`nesw-resize`},onPointerDown:e=>M(e,`ne`)}),(0,d.jsx)(`div`,{ref:_,style:{position:`absolute`,zIndex:Ge,bottom:Ke,left:Ke,width:Je,height:Je,cursor:`nesw-resize`},onPointerDown:e=>M(e,`sw`)}),(0,d.jsx)(`div`,{ref:h,style:{position:`absolute`,zIndex:Ge,bottom:0,right:0,width:Je,height:Je,cursor:`nwse-resize`},onPointerDown:e=>M(e,`se`)})]})},Qe=({controller:e})=>{let t=[],n=e.getModel().getLayouts(),r=2e3;for(let[i,a]of n)a.isMainLayout()||(a.getType()===`window`&&e.isSupportsPopout()?t.push((0,d.jsx)(Le,{controller:e,layout:a,title:e.getPopoutWindowName()+` `+i,url:e.getPopoutURL()+`?id=`+encodeURIComponent(i),onCloseLayout:e.onCloseLayout,children:(0,d.jsx)(`div`,{className:e.getProps().popoutClassName,children:(0,d.jsx)(V,{...e.getProps(),layoutId:i,path:a.getPath(),mainLayoutController:e})})},i)):a.getType()===`float`&&(t.push((0,d.jsx)(Ze,{controller:e,layout:a,zIndex:r,onCloseLayout:e.onCloseLayout,children:(0,d.jsx)(V,{...e.getProps(),layoutId:i,path:a.getPath(),mainLayoutController:e})},i+`float`)),r++));return(0,d.jsx)(d.Fragment,{children:t})};Qe.displayName=`FloatingWindowContainer`;var $e=e=>{let{controller:t,tabNode:n,selected:r,border:i,icons:a,path:o}=e,s=u.useRef(null),c=u.useRef(null),l=t.getKeyMap(),f=e=>{n.isEnableDrag()?(e.stopPropagation(),t.getDragDropManager().setDragNode(e.nativeEvent,n)):e.preventDefault()},p=e=>{e.stopPropagation(),t.getDragDropManager().onDragEnded()},m=e=>{Ee(e)&&t.auxMouseClick(n,e)},h=e=>{t.showContextMenu(n,e)},g=()=>{t.doAction(T.selectTab(n.getId()))},_=e=>{let t=s.current?.closest(`[role="tablist"]`);if(t){let n=Array.from(t.querySelectorAll(`[role="tab"]`));n[n.indexOf(s.current)+e]?.focus()}},v=()=>{let e=s.current.ownerDocument,t=()=>Te(e.getElementById(ye(`flexlayout-tab-`,n.getId())));r?t():(g(),requestAnimationFrame(t))},y=e=>{t.getEditingTab()!==n&&(xe(e,l.focusTabToggle)?(v(),e.preventDefault()):e.key===`Enter`||e.key===` `?(g(),e.preventDefault()):(e.key===`ArrowLeft`||e.key===`ArrowUp`)&&!Se(e)?(_(-1),e.preventDefault()):(e.key===`ArrowRight`||e.key===`ArrowDown`)&&!Se(e)?(_(1),e.preventDefault()):xe(e,l.closeTab)&&n.isCloseable()&&(_(1),t.doAction(T.deleteTab(n.getId())),e.preventDefault()))},b=()=>{let e=n.getCloseType();return!!(r||e===ee.Always||e===ee.Visible&&t.getCurrentWindow()?.matchMedia(`(hover: hover) and (pointer: fine)`).matches)},x=e=>{b()&&(t.doAction(T.deleteTab(n.getId())),e.stopPropagation())},S=e=>{e.stopPropagation()},C=()=>{if(r)return!0;let e=n.getTabContainer();return e instanceof L&&e.getSelected()===-1&&e.getTabNodes()[0]===n},E=t.getEditingTab()===n,D=u.useCallback(e=>{s.current=e,t.registerMeasurable(n,`tabbutton`,e)},[t,n]);u.useLayoutEffect(()=>{E&&c.current.select()},[E]),u.useEffect(()=>{if(E){let e=t.getCurrentDocument().body,n=e=>{e.target!==c.current&&t.setEditingTab(void 0)};return e.addEventListener(`pointerdown`,n),()=>e.removeEventListener(`pointerdown`,n)}},[E,t]);let O=e=>{e.stopPropagation()},k=e=>{e.code===`Escape`?(t.setEditingTab(void 0),s.current?.focus()):(e.code===`Enter`||e.code===`NumpadEnter`)&&(t.setEditingTab(void 0),t.doAction(T.renameTab(n.getId(),e.target.value)),s.current?.focus())},A=t.getClassName,j=A(w.FLEXLAYOUT__BORDER_BUTTON)+` `+A(w.FLEXLAYOUT__BORDER_BUTTON_+i);j+=r?` `+A(w.FLEXLAYOUT__BORDER_BUTTON__SELECTED):` `+A(w.FLEXLAYOUT__BORDER_BUTTON__UNSELECTED);let te=n.getParent()instanceof F?n.getParent():void 0;te!==void 0&&(j+=` `+A(w.FLEXLAYOUT__TAB_BUTTON_GROUPED),n.getModel().getTabGroupType()===`underline`&&(j+=` `+A(w.FLEXLAYOUT__TAB_BUTTON_GROUPED_UNDERLINE))),n.getClassName()!==void 0&&(j+=` `+n.getClassName());let ne=0;n.getModel().isEnableRotateBorderIcons()===!1&&(i===`left`?ne=n.getModel().getBorderLeftTabDirection()===`down`?-90:90:i===`right`&&(ne=-90));let M=ve(t,n,ne),re=M.content?(0,d.jsx)(`div`,{className:A(w.FLEXLAYOUT__BORDER_BUTTON_CONTENT),children:M.content}):null,ie=M.leading?(0,d.jsx)(`div`,{className:A(w.FLEXLAYOUT__BORDER_BUTTON_LEADING),children:M.leading}):null;if(E&&(re=(0,d.jsx)(`input`,{ref:c,className:A(w.FLEXLAYOUT__TAB_BUTTON_TEXTBOX),"data-layout-path":o+`/textbox`,type:`text`,"aria-label":t.i18nName(z.Rename_Tab),autoFocus:!0,defaultValue:n.getName(),onKeyDown:k,onPointerDown:O})),n.isCloseable()){let e=t.i18nName(z.Close_Tab);M.buttons.push((0,d.jsx)(`div`,{"data-layout-path":o+`/button/close`,title:e,"aria-hidden":`true`,className:A(w.FLEXLAYOUT__BORDER_BUTTON_TRAILING),onPointerDown:S,onClick:x,children:typeof a.close==`function`?a.close(n):a.close},`close`))}let ae=[we(l.focusTabToggle),n.isCloseable()?we(l.closeTab):void 0].filter(Boolean).join(` `)||void 0,oe={};return te!==void 0&&(oe[`--flexlayout-group-color`]=te.getColor()),(0,d.jsxs)(`div`,{ref:D,id:ye(`flexlayout-tabbutton-`,n.getId()),role:E?void 0:`tab`,"aria-selected":E?void 0:r,"aria-controls":E?void 0:ye(`flexlayout-tab-`,n.getId()),"aria-label":E?void 0:M.name,"aria-keyshortcuts":E?void 0:ae,tabIndex:E?-1:C()?0:-1,onKeyDown:y,"data-layout-path":o,className:j,style:oe,onClick:g,onAuxClick:m,onContextMenu:h,title:n.getHelpText(),draggable:!0,onDragStart:f,onDragEnd:p,children:[ie,re,M.buttons]})};$e.displayName=`BorderButton`;var et=e=>{let{controller:t,groupNode:n,path:r}=e,i=u.useRef(null),a=u.useCallback(e=>{i.current=e,t.registerMeasurable(n,`grouppill`,e)},[t,n]),o=e=>{n.isEnableDrag()?(e.stopPropagation(),t.getDragDropManager().setDragNode(e.nativeEvent,n)):e.preventDefault()},s=e=>{t.getDragDropManager().onDragEnded()},c=e=>{t.showContextMenu(n,e)},l=()=>{t.doAction(T.updateNodeAttributes(n.getId(),{opened:!n.isOpened()}))},f=e=>{l(),e.stopPropagation()},p=e=>{if(e.key===`Enter`||e.key===` `)l(),e.preventDefault();else if(e.key===`ContextMenu`||e.shiftKey&&e.key===`F10`){let t=i.current.getBoundingClientRect();i.current.dispatchEvent(new MouseEvent(`contextmenu`,{bubbles:!0,cancelable:!0,clientX:t.x+t.width/2,clientY:t.y+t.height/2})),e.preventDefault()}},m=t.getClassName,h=m(w.FLEXLAYOUT__GROUP_PILL);n.isOpened()?t.getModel().getTabGroupType()===`underline`&&(h+=` `+m(w.FLEXLAYOUT__GROUP_PILL_UNDERLINE)):h+=` `+m(w.FLEXLAYOUT__GROUP_PILL_COLLAPSED);let g=n.getColor(),_={backgroundColor:g,borderColor:g},v=t.i18nName(z.Group_Pill_Tooltip);return(0,d.jsxs)(`div`,{ref:a,"data-layout-path":r,role:`button`,"aria-label":n.getName(),"aria-expanded":n.isOpened(),tabIndex:0,title:v,className:h,style:_,draggable:!0,onDragStart:o,onDragEnd:s,onClick:f,onKeyDown:p,onContextMenu:c,children:[(0,d.jsx)(`span`,{className:m(w.FLEXLAYOUT__GROUP_PILL_NAME),children:n.getName()}),!n.isOpened()&&(0,d.jsx)(`span`,{"aria-hidden":`true`,className:m(w.FLEXLAYOUT__GROUP_PILL_COUNT),children:n.getChildren().length})]})};et.displayName=`GroupPill`;var tt=e=>{let{controller:t,groupNode:n,path:r}=e,i=u.useRef(null),a=u.useCallback(e=>{i.current=e,t.registerMeasurable(n,`groupendmarker`,e)},[t,n]),o=e=>{t.doAction(T.updateNodeAttributes(n.getId(),{opened:!n.isOpened()})),e.stopPropagation()},s=n.getColor(),c={backgroundColor:s,borderColor:s};return(0,d.jsx)(`div`,{ref:a,"data-layout-path":r,title:n.getName(),"aria-hidden":!0,className:t.getClassName(w.FLEXLAYOUT__GROUP_END_MARKER),style:c,onClick:o})};tt.displayName=`GroupEndMarker`;var nt=e=>{let{controller:t,tabNode:n}=e,r=t.getClassName,i=r(w.FLEXLAYOUT__TAB_BUTTON_STAMP),a=ve(t,n),o=a.content?(0,d.jsx)(`div`,{className:r(w.FLEXLAYOUT__TAB_BUTTON_CONTENT),children:a.content}):n.getNameForOverflowMenu(),s=a.leading?(0,d.jsx)(`div`,{className:r(w.FLEXLAYOUT__TAB_BUTTON_LEADING),children:a.leading}):null;return(0,d.jsxs)(`div`,{className:i,title:n.getHelpText(),children:[s,o]})};nt.displayName=`TabButtonStamp`;var rt=500;function it(e){return typeof e.getBoundingClientRect==`function`}function at(e){return e.container?e.container:it(e.anchor)?e.anchor.ownerDocument.body:document.body}function ot(e){if(it(e))return e.getBoundingClientRect();if(`right`in e&&`bottom`in e)return e;let t=e;return new DOMRect(t.x,t.y,0,0)}function st(e,t){let n=t,{left:r,right:i,top:a,bottom:o}=e,s={};return(r+i)/2<n.left+n.width/2?s.left=r-n.left:s.right=n.right-i,(a+o)/2<n.top+n.height/2?s.top=a-n.top:s.bottom=n.bottom-o,s}var ct=e=>{let{anchor:t,items:n,onSelect:r,onClose:i,renderItem:a,title:o}=e,s=e.classNameMapper??(e=>e),c=at(e),l=u.useRef(null),p=u.useRef(null),m=u.useRef({buffer:``,timer:void 0});u.useEffect(()=>()=>{m.current.timer&&clearTimeout(m.current.timer)},[]);let h=u.useCallback(e=>{e.disabled||((e.onSelect??r)?.(e),i())},[r,i]);u.useEffect(()=>{let n=c.ownerDocument;p.current?.contains(n.activeElement)||(p.current?.querySelector(`[role="menuitem"]:not([aria-disabled="true"])`)??p.current)?.focus();let r=e.returnFocusTo??(it(t)?t:void 0);return()=>{r?.focus?.()}},[]),u.useEffect(()=>{let e=c.ownerDocument,t=e=>{l.current?.contains(e.target)||i()};return e.addEventListener(`pointerdown`,t),()=>e.removeEventListener(`pointerdown`,t)},[c,i]);let g=e=>{let t=Array.from(p.current?.querySelectorAll(`[role="menuitem"]:not([aria-disabled="true"])`)??[]),n=e.target.closest?.(`[role="menuitem"]`),r=n?t.indexOf(n):-1;if(e.key===`Escape`||e.key===`Tab`)i(),e.preventDefault();else if(e.key===`ArrowDown`||e.key===`ArrowUp`)t.length>0&&t[(r+(e.key===`ArrowDown`?1:-1)+t.length)%t.length]?.focus(),e.preventDefault();else if(e.key===`Home`||e.key===`End`)(e.key===`Home`?t[0]:t[t.length-1])?.focus(),e.preventDefault();else if(e.key.length===1&&e.key!==` `&&!e.ctrlKey&&!e.metaKey&&!e.altKey){let n=m.current;n.timer&&clearTimeout(n.timer),n.buffer+=e.key.toLowerCase(),n.timer=setTimeout(()=>{n.buffer=``},rt);let i=[...n.buffer].every(e=>e===n.buffer[0]),a=i?n.buffer[0]:n.buffer,o=i?r+1:Math.max(r,0);for(let e=0;e<t.length;e++){let n=(o+e)%t.length;if((t[n].textContent??``).trim().toLowerCase().startsWith(a)){t[n].focus();break}}e.preventDefault()}else(e.key===`Enter`||e.key===` `)&&n&&(n.click(),e.preventDefault())},_=e=>({select:()=>h(e),close:i}),v=e=>(0,d.jsx)(`div`,{className:s(w.FLEXLAYOUT__POPUP_MENU_ITEM)+(e.disabled?` `+s(w.FLEXLAYOUT__POPUP_MENU_ITEM__DISABLED):``),role:`menuitem`,tabIndex:-1,"aria-disabled":e.disabled||void 0,onClick:t=>{h(e),t.stopPropagation()},children:e.content??(0,d.jsxs)(d.Fragment,{children:[e.icon,e.label]})},e.key),y=(0,d.jsx)(`div`,{ref:l,className:s(w.FLEXLAYOUT__POPUP_MENU_CONTAINER),style:st(ot(t),c.getBoundingClientRect()),children:(0,d.jsx)(`div`,{ref:p,className:s(w.FLEXLAYOUT__POPUP_MENU),role:`menu`,"aria-label":o,tabIndex:0,onKeyDown:g,"data-layout-path":`/popup-menu`,children:n.map((e,t)=>e.type===`divider`?(0,d.jsx)(`div`,{className:s(w.FLEXLAYOUT__POPUP_MENU_DIVIDER),role:`separator`},e.key):a?a(e,t,_(e)):v(e))})});return(0,f.createPortal)(y,c)};function lt(e){let t=at(e),n=it(e.anchor)?e.anchor.getBoundingClientRect():e.anchor,r=t.ownerDocument.createElement(`div`);t.appendChild(r);let i=(0,p.createRoot)(r),a=!1,o=()=>{a||(a=!0,i.unmount(),r.remove(),e.onClose())};return i.render((0,d.jsx)(ct,{...e,anchor:n,container:t,onClose:o})),o}function ut(e,t,n,r,i,a){let o=i.getClassName,s=n.map(e=>({key:e.node.getId()}));return i.showOverlayOnAllWindows(!0),lt({anchor:e,container:i.getRootDiv()??void 0,classNameMapper:o,returnFocusTo:e,title:i.i18nName(z.Overflow_Menu_Tooltip),items:s,onSelect:e=>{let t=s.indexOf(e);t>=0&&r(n[t])},renderItem:(e,r,a)=>{let s=n[r],c=s.node.getParent()instanceof F?s.node.getParent():void 0,l=c!==void 0,u=o(w.FLEXLAYOUT__POPUP_MENU_ITEM);l&&(u+=` `+o(w.FLEXLAYOUT__POPUP_MENU_ITEM_GROUPED)),t.getSelected()===s.index&&(u+=` `+o(w.FLEXLAYOUT__POPUP_MENU_ITEM__SELECTED));let f={};return l&&(f[`--flexlayout-group-color`]=c.getColor()),(0,d.jsx)(`div`,{className:u,role:`menuitem`,"aria-label":s.node.getNameForOverflowMenu(),tabIndex:-1,"data-layout-path":`/popup-menu/tb`+r,style:f,onClick:e=>{a.select(),e.stopPropagation()},draggable:!0,onDragStart:e=>{e.stopPropagation(),i.getDragDropManager().setDragNode(e.nativeEvent,s.node)},onDragEnd:()=>{i.getDragDropManager().onDragEnded(),a.close()},title:s.node.getHelpText(),children:(0,d.jsx)(nt,{tabNode:s.node,controller:i})},e.key)},onClose:()=>{i.showOverlayOnAllWindows(!1),a?.()}})}ct.displayName=`PopupMenu`;var dt=(e,t,n,r,i,a,o,s)=>{let[c,l]=u.useState([]),[d,f]=u.useState(!1),[p,m]=u.useState(!1),h=u.useRef(!1),g=u.useRef(void 0),_=u.useRef([]),v=u.useRef(0),y=u.useRef(!1),b=u.useRef(0);u.useEffect(()=>()=>{g.current!==void 0&&clearTimeout(g.current)},[]),u.useLayoutEffect(()=>{_.current=c});let S=u.useCallback(e=>{n===x.HORZ?r.current.scrollLeft=e:r.current.scrollTop=e},[n,r]),C=u.useCallback(e=>n===x.HORZ?e.scrollLeft:e.scrollTop,[n]),w=u.useCallback(e=>n===x.HORZ?e.clientWidth:e.clientHeight,[n]),T=u.useCallback(e=>n===x.HORZ?e.scrollWidth:e.scrollHeight,[n]),E=u.useCallback(e=>n===x.HORZ?e.width:e.height,[n]),D=u.useCallback(e=>n===x.HORZ?e.x:e.y,[n]),O=u.useCallback(e=>n===x.HORZ?e.right:e.bottom,[n]),ee=u.useCallback(()=>{let e=[];if(r.current){let t=r.current,n=t.getBoundingClientRect(),i=D(n)-1,a=O(n)+1,s=t.firstElementChild,c=0;Array.from(s.children).forEach(t=>{let n=t.getBoundingClientRect();t.classList.contains(o)&&((D(n)<i||O(n)>a)&&e.push(c),c++)})}return e},[o,r,D,O]),k=u.useCallback(()=>{if(r.current&&i.current){let e=r.current,t=i.current,a=w(e),o=T(e),s=C(e);if(o>a&&o>0){let e=a*a/o,r=0;e<20&&(r=20-e,e=20);let i=s*(a-r)/o;n===x.HORZ?(t.style.width=e+`px`,t.style.left=i+`px`):(t.style.height=e+`px`,t.style.top=i+`px`),t.style.display=`block`}else t.style.display=`none`;n===x.HORZ?t.style.bottom=`0px`:t.style.right=`0px`}},[n,r,i,w,T,C]),A=u.useCallback((e=!1)=>{let t=ee(),n=t.length>0;n!==d&&f(n),e?l(t):g.current===void 0&&(g.current=setTimeout(()=>{let e=ee();ft(e,_.current)||l(e),g.current=void 0},100))},[ee,d]),j=u.useCallback(()=>{let n=t.getSelectedNode();if(n&&r.current){let t=e.getBoundingClientRect(r.current),i=r.current.ownerDocument.getElementById(ye(`flexlayout-tabbutton-`,n.getId()));if(!i)return;let a=e.getBoundingClientRect(i),o=D(t)-D(a);o>0||E(a)>E(t)?(S(C(r.current)-o),y.current=!0):(o=O(a)-O(t),o>0&&(S(C(r.current)+o),y.current=!0))}},[t,e,r,D,O,E,C,S]),te=u.useCallback(()=>{if(r.current){let e=r.current,t=0;for(let n of Array.from(e.children))t+=w(n);if(s?.current){let e=w(s.current);e>0&&(b.current=e)}let n=b.current,i=t+(p?n:0)>w(r.current);i!==p&&m(i)}},[r,s,p,w]),ne=u.useCallback(()=>{y.current||(h.current=!0),y.current=!1,k(),A()},[k,A]),M=u.useCallback((e,t)=>{if(r.current&&i.current){let a=r.current,o=i.current,s=w(a),c=T(a),l=w(o),u=a.getBoundingClientRect(),d;if(d=n===x.HORZ?e-u.x-v.current:t-u.y-v.current,d=Math.max(0,Math.min(c-l,d)),s>0){let e=d*c/s;S(e)}}},[r,i,n,w,T,S]),re=u.useCallback(()=>{},[]),ie=u.useCallback(()=>{},[]),ae=u.useCallback(e=>{e.stopPropagation(),i.current.setPointerCapture(e.pointerId);let t=i.current.getBoundingClientRect();n===x.HORZ?v.current=e.clientX-t.x:v.current=e.clientY-t.y,Ae(e.currentTarget.ownerDocument,e,M,re,ie)},[i,n,M,re,ie]),oe=u.useCallback(e=>{if(!r.current||t.getChildren().length===0)return;let i=Math.abs(e.deltaX),a=Math.abs(e.deltaY);if(i===0&&a===0)return;let o;o=n===x.HORZ?i>a?e.deltaX:e.deltaY:a>i?e.deltaY:e.deltaX,e.deltaMode===1&&(o*=40);let s=T(r.current)-w(r.current);if(s<=0)return;let c=C(r.current)+o;S(Math.max(0,Math.min(s,c))),e.stopPropagation()},[t,r,n,C,T,w,S]),se=u.useCallback(e=>{let t=r.current;t&&(T(t)-w(t)<=0||e.preventDefault())},[r,T,w]),ce=t.getId(),le=t.getSelectedNode();return u.useLayoutEffect(()=>{r.current&&S(0)},[ce,r,S]),u.useLayoutEffect(()=>{h.current=!1},[le]),u.useLayoutEffect(()=>{te(),h.current===!1&&j(),k(),A(!0);let e=requestAnimationFrame(()=>{A()});return()=>cancelAnimationFrame(e)},[te,j,k,A,n,le]),u.useLayoutEffect(()=>{let t=r.current;if(!t)return;let n=t.ownerDocument.defaultView,i=new n.ResizeObserver(()=>{te();let t=e.isSplitterDragging();(!h.current||t)&&(t&&(h.current=!1),j()),k(),A()});i.observe(t);let a=t.firstElementChild,o=new n.MutationObserver(()=>{A()});return a&&o.observe(a,{childList:!0,subtree:!0}),()=>{i.disconnect(),o.disconnect()}},[te,j,k,A,r,e]),u.useLayoutEffect(()=>{let e=s?.current;if(!e)return;let t=new e.ownerDocument.defaultView.ResizeObserver(()=>{te()});return t.observe(e),()=>t.disconnect()},[te,s,p]),u.useEffect(()=>{if(t instanceof N&&t.isEnableTabWrap())return;let e=a.current;return e?.addEventListener(`wheel`,se,{passive:!1}),()=>{e?.removeEventListener(`wheel`,se)}}),{userControlledPositionRef:h,onScroll:ne,onScrollPointerDown:ae,hiddenTabs:c,onMouseWheel:oe,isDockStickyButtons:p,isShowHiddenTabs:d}};function ft(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}var pt=e=>{let{borderNode:t,controller:n,size:r}=e,i=u.useRef(null),a=u.useRef(null),o=u.useRef(null),s=u.useRef(null),c=u.useRef(null),l=u.useRef(null),[f,p]=u.useState(!1),m=u.useRef(null),h=n.getIcons();u.useEffect(()=>()=>m.current?.(),[]);let{userControlledPositionRef:g,onScroll:_,onScrollPointerDown:v,hiddenTabs:y,onMouseWheel:b,isDockStickyButtons:C,isShowHiddenTabs:E}=dt(n,t,x.flip(t.getOrientation()),l,o,i,n.getClassName(w.FLEXLAYOUT__BORDER_BUTTON),c),D=u.useCallback(e=>{i.current=e,n.registerMeasurable(t,`borderheader`,e)},[n,t]),O=e=>{Ee(e)&&n.auxMouseClick(t,e)},ee=e=>{n.showContextMenu(t,e)},k=e=>{e.stopPropagation()},A=e=>{let r=n.getShowOverflowMenu(),i=t.getTabNodes(),a=y.map(e=>({index:e,node:i[e]}));if(r!==void 0)r(t,e,a,j);else{let e=s.current;p(!0),m.current=ut(e,t,a,j,n,()=>{p(!1),m.current=null})}e.stopPropagation()},j=e=>{n.doAction(T.selectTab(e.node.getId())),g.current=!1},te=e=>{let r=t.getSelectedNode();r!==void 0&&n.doAction(T.popoutTab(r.getId(),`window`)),e.stopPropagation()},ne=e=>{let r=t.getSelectedNode();r!==void 0&&n.doAction(T.popoutTab(r.getId(),`float`)),e.stopPropagation()},M=n.getClassName,re=()=>{let e=[],r=n.getModel().getTabGroupType()===`splitpill`,i=0,a=!1,o=0,s=()=>(0,d.jsx)(`div`,{className:M(w.FLEXLAYOUT__BORDER_TAB_DIVIDER)},`divider`+o++),c=t.getLocation()===S.LEFT&&n.getModel().getBorderLeftTabDirection()!==`down`;for(let o of t.getChildren()){if(o instanceof F){let l=o.getChildren();if(c&&o.isOpened()){a&&e.push(s()),r&&e.push((0,d.jsx)(tt,{controller:n,groupNode:o,path:o.getPath()+`/end`},o.getId()+`/end`));let c=i;for(let r=l.length-1;r>=0;r--){let i=t.getSelected()===c+r;r<l.length-1&&e.push(s()),e.push((0,d.jsx)($e,{controller:n,border:t.getLocation().getName(),tabNode:l[r],path:be(l[r]),selected:i,icons:h},l[r].getId()))}i+=l.length,e.push((0,d.jsx)(et,{controller:n,groupNode:o,path:o.getPath()},o.getId())),a=!0}else if(a&&e.push(s()),e.push((0,d.jsx)(et,{controller:n,groupNode:o,path:o.getPath()},o.getId())),a=!0,o.isOpened()){for(let r=0;r<l.length;r++){let a=t.getSelected()===i;r>0&&e.push(s()),e.push((0,d.jsx)($e,{controller:n,border:t.getLocation().getName(),tabNode:l[r],path:be(l[r]),selected:a,icons:h},l[r].getId())),i++}r&&e.push((0,d.jsx)(tt,{controller:n,groupNode:o,path:o.getPath()+`/end`},o.getId()+`/end`))}continue}let l=o,u=t.getSelected()===i;a&&e.push(s()),e.push((0,d.jsx)($e,{controller:n,border:t.getLocation().getName(),tabNode:l,path:be(l),selected:u,icons:h},l.getId())),a=!0,i++}return e},ie=()=>{let e,r=[],i=[],o,l={leading:e,buttons:r,stickyButtons:i,overflowPosition:void 0};if(n.customizeTabSet(t,l),e=l.leading,i=l.stickyButtons,r=l.buttons,l.overflowPosition===void 0&&(l.overflowPosition=i.length),i.length>0&&(C?r=[...i,...r]:o=(0,d.jsx)(`div`,{ref:c,onPointerDown:k,onDragStart:e=>{e.preventDefault()},className:M(w.FLEXLAYOUT__TAB_TOOLBAR_STICKY_BUTTONS_CONTAINER),children:i},`sticky_buttons_container`)),E){let e=n.i18nName(z.Overflow_Menu_Tooltip),i;if(typeof h.more==`function`){let e=t.getTabNodes(),n=y.map(t=>({index:t,node:e[t]}));i=h.more(t,n)}else i=(0,d.jsxs)(d.Fragment,{children:[h.more,(0,d.jsx)(`div`,{className:M(w.FLEXLAYOUT__TAB_BUTTON_OVERFLOW_COUNT),children:y.length>0?y.length:``})]});r.splice(Math.min(l.overflowPosition,r.length),0,(0,d.jsx)(`button`,{tabIndex:0,"aria-haspopup":`menu`,"aria-expanded":f,"aria-label":e,ref:s,className:M(w.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON)+` `+M(w.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW)+` `+M(w.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_OVERFLOW_+t.getLocation().getName()),title:e,onClick:A,onPointerDown:k,children:i},`overflowbutton`))}if(t.getSelected()!==-1){let e=t.getSelectedNode();if(e!==void 0&&n.isMainLayout()){if(e.isEnableFloat()&&e.isEnableFloatIcon()){let t=n.i18nName(z.Popout_Tab_Float);r.push((0,d.jsx)(`button`,{tabIndex:0,title:t,"aria-label":t,className:M(w.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON)+` `+M(w.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_FLOAT),onClick:ne,onPointerDown:k,children:typeof h.popoutFloat==`function`?h.popoutFloat(e):h.popoutFloat},`popout-float`))}if(n.isSupportsPopout()&&e.isEnablePopoutIcon()&&e.isAllowedInWindow()){let t=n.i18nName(z.Popout_Tab);r.push((0,d.jsx)(`button`,{tabIndex:0,title:t,"aria-label":t,className:M(w.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON)+` `+M(w.FLEXLAYOUT__BORDER_TOOLBAR_BUTTON_FLOAT),onClick:te,onPointerDown:k,children:typeof h.popout==`function`?h.popout(e):h.popout},`popout`))}}}let u=(0,d.jsx)(`div`,{ref:a,className:M(w.FLEXLAYOUT__BORDER_TOOLBAR)+` `+M(w.FLEXLAYOUT__BORDER_TOOLBAR_+t.getLocation().getName()),children:r},`toolbar`);return{leading:e,toolbar:u,stickyBar:o}},ae=re(),{leading:oe,toolbar:se,stickyBar:ce}=ie(),le=M(w.FLEXLAYOUT__BORDER)+` `+M(w.FLEXLAYOUT__BORDER_+t.getLocation().getName());t.getClassName()!==void 0&&(le+=` `+t.getClassName());let ue,N,P=r-1;t.getLocation()===S.LEFT?(ue=n.getModel().getBorderLeftTabDirection()===`down`?{left:`100%`,top:0}:{right:`100%`,top:0},N={width:P,overflowY:`auto`}):t.getLocation()===S.RIGHT?(ue={left:`100%`,top:0},N={width:P,overflowY:`auto`}):(ue={left:0},N={height:P,overflowX:`auto`});let de;t.isEnableTabScrollbar()&&(de=(0,d.jsx)(`div`,{ref:o,"aria-hidden":`true`,className:M(w.FLEXLAYOUT__MINI_SCROLLBAR),onPointerDown:v}));let fe;oe&&(fe=(0,d.jsx)(`div`,{className:M(w.FLEXLAYOUT__BORDER_LEADING),children:oe}));let pe=M(w.FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER)+` `+M(w.FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER_+t.getLocation().getName())+(t.getLocation()===S.LEFT&&n.getModel().getBorderLeftTabDirection()===`down`?` `+M(w.FLEXLAYOUT__BORDER_INNER_TAB_CONTAINER_LEFT_DOWN):``);return(0,d.jsxs)(`div`,{ref:D,style:{display:`flex`,flexDirection:t.getOrientation()===x.VERT?`row`:`column`},className:le,"data-layout-path":t.getPath(),onClick:O,onAuxClick:O,onContextMenu:ee,onWheel:b,children:[fe,(0,d.jsxs)(`div`,{className:M(w.FLEXLAYOUT__MINI_SCROLLBAR_CONTAINER),children:[(0,d.jsxs)(`div`,{ref:l,className:M(w.FLEXLAYOUT__BORDER_INNER)+` `+M(w.FLEXLAYOUT__BORDER_INNER_+t.getLocation().getName()),style:N,onScroll:_,children:[(0,d.jsx)(`div`,{style:ue,role:n.getEditingTab()?.getParent()===t?void 0:`tablist`,"aria-orientation":n.getEditingTab()?.getParent()!==t&&(t.getLocation()===S.LEFT||t.getLocation()===S.RIGHT)?`vertical`:void 0,className:pe,children:ae}),ce]}),de]}),se]})};pt.displayName=`BorderTabSet`;var mt=e=>{let{controller:t,node:n,index:r,horizontal:i}=e,a=u.useRef(null),o=u.useRef([]),s=u.useRef(void 0),c=u.useRef(void 0),l=u.useRef(0),f=u.useRef(0),p=u.useRef({initialSizes:[],sum:0,startPosition:0}),m=u.useRef(void 0),h=u.useCallback(e=>{e.preventDefault(),e.stopImmediatePropagation()},[]);u.useEffect(()=>{let e=a.current;return e?.addEventListener(`touchstart`,h,{passive:!1}),()=>{e?.removeEventListener(`touchstart`,h),m.current!==void 0&&(clearTimeout(m.current),m.current=void 0),s.current&&(t.getRootDiv()?.removeChild(s.current),s.current=void 0,De(!0,t.getCurrentDocument()),t.setSplitterDragging(!1))}},[h,t]);let g=e=>{e.stopPropagation(),n instanceof P&&(p.current=n.getSplitterInitials(r)),t.setSplitterDragging(!0),De(!1,t.getCurrentDocument()),Ae(e.currentTarget.ownerDocument,e,y,C,v),o.current=n instanceof L?n.getSplitterBounds(!0):n.getSplitterBounds(r);let u=t.getRootDiv();s.current=t.getCurrentDocument().createElement(`div`),s.current.style.flexDirection=i?`row`:`column`,s.current.className=t.getClassName(w.FLEXLAYOUT__SPLITTER_DRAG)+(n instanceof L?` `+t.getClassName(w.FLEXLAYOUT__SPLITTER_BORDER):``),s.current.style.cursor=n.getOrientation()===x.VERT?`ns-resize`:`ew-resize`,c.current=t.getCurrentDocument().createElement(`div`),c.current.className=O(w.FLEXLAYOUT__SPLITTER_HANDLE)+` `+O(i?w.FLEXLAYOUT__SPLITTER_HANDLE_HORZ:w.FLEXLAYOUT__SPLITTER_HANDLE_VERT),s.current.appendChild(c.current);let d=a.current.getBoundingClientRect(),m=new b(d.x-t.getDomRect().x,d.y-t.getDomRect().y,d.width,d.height);l.current=e.clientX-d.x,f.current=e.clientY-d.y,m.positionElement(s.current),u&&u.appendChild(s.current)},_=e=>{if(Se(e))return;let a=0;if(i?(e.key===`ArrowLeft`&&(a=-10),e.key===`ArrowRight`&&(a=10)):(e.key===`ArrowUp`&&(a=-10),e.key===`ArrowDown`&&(a=10)),a!==0){if(e.preventDefault(),t.setSplitterDragging(!0),n instanceof L){let e=n.getLocation(),r=e===S.BOTTOM||e===S.RIGHT?-a:a,i=Math.max(n.getMinSize(),Math.min(n.getMaxSize(),n.getSize()+r));t.doAction(T.adjustBorderSplit(n.getId(),i))}else{let e=n.getSplitterInitials(r);if(e.sum<=0){t.setSplitterDragging(!1);return}let i=n.getSplitterBounds(r),o=Math.max(i[0],Math.min(i[1],e.startPosition+a)),s=n.calculateSplit(r,o,e.initialSizes,e.sum,e.startPosition);t.doAction(T.adjustWeights(n.getId(),s))}setTimeout(()=>t.setSplitterDragging(!1),300)}},v=()=>{if(s.current){t.isRealtimeResize()&&E(!1);let e=t.getRootDiv();e&&s.current&&e.removeChild(s.current),s.current=void 0}m.current=window.setTimeout(()=>t.setSplitterDragging(!1),300),De(!0,t.getCurrentDocument())},y=(e,r)=>{if(s.current){let i=t.getDomRect();if(!i)return;n.getOrientation()===x.VERT?s.current.style.top=D(r-i.y-f.current)+`px`:s.current.style.left=D(e-i.x-l.current)+`px`,t.isRealtimeResize()&&E(!0)}},C=()=>{if(s.current){E(!1);let e=t.getRootDiv();e&&s.current&&e.removeChild(s.current),s.current=void 0}m.current=window.setTimeout(()=>t.setSplitterDragging(!1),300),De(!0,t.getCurrentDocument())},E=e=>{(()=>{if(s.current){let i;if(i=n.getOrientation()===x.VERT?s.current.offsetTop:s.current.offsetLeft,n instanceof L){let r=n.calculateSplit(n,i);t.doAction(T.adjustBorderSplit(n.getId(),r).setAdjusting(e))}else{let a=p.current;if(a.sum<=0)return;let o=n.calculateSplit(r,i,a.initialSizes,a.sum,a.startPosition);t.doAction(T.adjustWeights(n.getId(),o).setAdjusting(e))}}})()},D=e=>{let t=o.current,n=e;return e<t[0]&&(n=t[0]),e>t[1]&&(n=t[1]),n},O=t.getClassName,ee={cursor:i?`ew-resize`:`ns-resize`,flexDirection:i?`column`:`row`},k=O(w.FLEXLAYOUT__SPLITTER)+` `+O(w.FLEXLAYOUT__SPLITTER_+n.getOrientation().getName());n instanceof L?k+=` `+O(w.FLEXLAYOUT__SPLITTER_BORDER):n.getModel().getMaximizedTabset(t.getLayoutId())!==void 0&&(ee.display=`none`),B()||(ee[`--fl-splitter-active-size`]=`30px`);let A,j,te,ne;if(n instanceof P){let e=n.getRect(),t=n.getChildren()[r-1],a=i?e.width:e.height;if(t&&a>0){let n=t.getRect();A=Math.round((i?n.getRight()-e.x:n.getBottom()-e.y)/a*100),j=0,te=100,ne=A+`%`}}else A=Math.round(n.getSize()),j=Math.round(n.getMinSize()),te=Math.round(n.getMaxSize()),ne=A+`px`;return(0,d.jsx)(`div`,{className:k,style:ee,ref:a,role:`separator`,"aria-label":t.i18nName(z.Splitter),"aria-orientation":i?`vertical`:`horizontal`,"aria-valuenow":A,"aria-valuemin":j,"aria-valuemax":te,"aria-valuetext":ne,tabIndex:0,onKeyDown:_,"data-layout-path":n.getPath()+`/s`+(r-1),onPointerDown:g,children:(0,d.jsx)(`div`,{className:O(w.FLEXLAYOUT__SPLITTER_HANDLE)+` `+O(i?w.FLEXLAYOUT__SPLITTER_HANDLE_HORZ:w.FLEXLAYOUT__SPLITTER_HANDLE_VERT)})})};mt.displayName=`Splitter`;function ht(e){let{controller:t,borderNode:n,show:r}=e,i=u.useRef(null),a=u.useCallback(e=>{i.current=e,t.registerMeasurable(n,`bordercontent`,e)},[t,n]),o=!0,s={};n.getOrientation()===x.HORZ?(s.width=n.getSize(),s.minWidth=n.getMinSize(),s.maxWidth=n.getMaxSize()):(s.height=n.getSize(),s.minHeight=n.getMinSize(),s.maxHeight=n.getMaxSize(),o=!1);let c=t.getClassName(w.FLEXLAYOUT__BORDER_TAB_CONTENTS),l=n.getLocation()===S.LEFT||n.getLocation()===S.TOP;if(n.isOverlay()){s.display=`flex`;let e={display:r?`flex`:`none`};if(o){let r=t.getModel();for(let t of r.getBorderSet().getBorders())if(t!==n&&t.isOverlay()&&t.isShowing()&&t.getSelected()!==-1){let n=t.getSize()+r.getSplitterSize();t.getLocation()===S.TOP?e.top=n:t.getLocation()===S.BOTTOM&&(e.bottom=n)}}let i=t.getClassName(w.FLEXLAYOUT__BORDER_TAB_OVERLAY)+` `+t.getClassName(w.FLEXLAYOUT__BORDER_TAB_OVERLAY_+n.getLocation().getName());return(0,d.jsxs)(`div`,{className:i,style:e,children:[l&&(0,d.jsx)(`div`,{ref:a,style:s,className:c}),r&&(0,d.jsx)(mt,{controller:t,node:n,index:0,horizontal:o}),!l&&(0,d.jsx)(`div`,{ref:a,style:s,className:c})]})}return s.display=r?`flex`:`none`,l?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`div`,{ref:a,style:s,className:c}),r&&(0,d.jsx)(mt,{controller:t,node:n,index:0,horizontal:o})]}):(0,d.jsxs)(d.Fragment,{children:[r&&(0,d.jsx)(mt,{controller:t,node:n,index:0,horizontal:o}),(0,d.jsx)(`div`,{ref:a,style:s,className:c})]})}ht.displayName=`BorderTab`;var gt=({controller:e,inner:t})=>{let n=e.getClassName(w.FLEXLAYOUT__LAYOUT_MAIN),r=e.getModel().getBorderSet().getBorderMap();if(e.isMainLayout()&&r.size>0){let i=(0,d.jsx)(`div`,{className:n,ref:e.getMainRef(),children:t}),a=new Map,o=new Map;for(let[t,n]of S.values){let t=r.get(n);t&&t.isShowing()&&(!t.isAutoHide()||t.isAutoHide()&&(t.getChildren().length>0||e.getState().showHiddenBorder===n))&&(a.set(n,(0,d.jsx)(pt,{controller:e,borderNode:t,size:e.getState().calculatedBorderBarSize})),o.set(n,(0,d.jsx)(ht,{controller:e,borderNode:t,show:t.getSelected()!==-1})))}let s=e.getClassName(w.FLEXLAYOUT__LAYOUT_BORDER_CONTAINER),c=e.getClassName(w.FLEXLAYOUT__LAYOUT_BORDER_CONTAINER_INNER),l=(0,d.jsxs)(`div`,{className:c,style:{flexDirection:`column`},children:[o.get(S.TOP),(0,d.jsxs)(`div`,{className:c,style:{flexDirection:`row`},children:[o.get(S.LEFT),i,o.get(S.RIGHT)]}),o.get(S.BOTTOM)]});return(0,d.jsxs)(`div`,{className:s,style:{flexDirection:`column`},children:[a.get(S.TOP),(0,d.jsxs)(`div`,{className:c,style:{flexDirection:`row`},children:[a.get(S.LEFT),l,a.get(S.RIGHT)]}),a.get(S.BOTTOM)]})}return(0,d.jsx)(`div`,{className:n,ref:e.getMainRef(),style:{position:`absolute`,top:0,left:0,bottom:0,right:0,display:`flex`},children:t})};gt.displayName=`BorderContainer`;var _t={width:`1em`,height:`1em`,display:`flex`,alignItems:`center`},vt=()=>(0,d.jsxs)(`svg`,{"aria-hidden":`true`,focusable:`false`,xmlns:`http://www.w3.org/2000/svg`,style:_t,viewBox:`0 0 24 24`,children:[(0,d.jsx)(`path`,{fill:`none`,d:`M0 0h24v24H0z`}),(0,d.jsx)(`path`,{stroke:`var(--fl-color-icon)`,fill:`var(--fl-color-icon)`,d:`M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`})]});vt.displayName=`CloseIcon`;var yt=()=>(0,d.jsxs)(`svg`,{"aria-hidden":`true`,focusable:`false`,xmlns:`http://www.w3.org/2000/svg`,style:_t,viewBox:`0 0 24 24`,fill:`var(--fl-color-icon)`,children:[(0,d.jsx)(`path`,{fill:`none`,d:`M0 0h24v24H0z`}),(0,d.jsx)(`path`,{transform:`rotate(45 12 12)`,d:`M16 9V4h1a1 1 0 000-2H7a1 1 0 000 2h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3z`})]});yt.displayName=`PinIcon`;var bt=()=>(0,d.jsxs)(`svg`,{"aria-hidden":`true`,focusable:`false`,xmlns:`http://www.w3.org/2000/svg`,style:_t,viewBox:`0 0 24 24`,fill:`var(--fl-color-icon)`,children:[(0,d.jsx)(`path`,{d:`M0 0h24v24H0z`,fill:`none`}),(0,d.jsx)(`path`,{stroke:`var(--fl-color-icon)`,d:`M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z`})]});bt.displayName=`MaximizeIcon`;var xt=()=>(0,d.jsxs)(`svg`,{"aria-hidden":`true`,focusable:`false`,xmlns:`http://www.w3.org/2000/svg`,style:_t,viewBox:`0 0 24 24`,fill:`var(--fl-color-icon)`,children:[(0,d.jsx)(`path`,{d:`M0 0h24v24H0z`,fill:`none`}),(0,d.jsx)(`path`,{stroke:`var(--fl-color-icon)`,d:`M7 10l5 5 5-5z`})]});xt.displayName=`OverflowIcon`;var St=()=>(0,d.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,xmlns:`http://www.w3.org/2000/svg`,style:{display:`block`,width:10,height:10},preserveAspectRatio:`none`,viewBox:`0 0 100 100`,children:(0,d.jsx)(`path`,{fill:`var(--fl-color-edge-icon)`,stroke:`var(--fl-color-edge-icon)`,d:`M10 30 L90 30 l-40 40 Z`})});St.displayName=`EdgeIcon`;var Ct=()=>(0,d.jsxs)(`svg`,{"aria-hidden":`true`,focusable:`false`,xmlns:`http://www.w3.org/2000/svg`,style:_t,viewBox:`0 0 20 20`,fill:`var(--fl-color-icon)`,children:[(0,d.jsx)(`path`,{d:`M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z`}),(0,d.jsx)(`path`,{d:`M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z`})]});Ct.displayName=`PopoutIcon`;var wt=()=>(0,d.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 -960 960 960`,style:_t,fill:`var(--fl-color-icon)`,children:(0,d.jsx)(`path`,{d:`M360-280q-33 0-56.5-23.5T280-360v-400q0-33 23.5-56.5T360-840h400q33 0 56.5 23.5T840-760v400q0 33-23.5 56.5T760-280H360Zm0-80h400v-400H360v400ZM200-200v80q-33 0-56.5-23.5T120-200h80Zm-80-80v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 480v-80h80v80h-80Zm160 0v-80h80v80h-80Zm160 0v-80h80v80h-80Z`})});wt.displayName=`PopoutFloatIcon`;var Tt=()=>(0,d.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,style:_t,fill:`var(--fl-color-icon)`,children:(0,d.jsx)(`path`,{d:`M4 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm0 6a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm0 6a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm6-12a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm0 6a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm0 6a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm6-12a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm0 6a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm0 6a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z`})});Tt.displayName=`GripIcon`;var Et=()=>(0,d.jsxs)(`svg`,{"aria-hidden":`true`,focusable:`false`,xmlns:`http://www.w3.org/2000/svg`,style:_t,viewBox:`0 0 24 24`,fill:`var(--fl-color-icon)`,children:[(0,d.jsx)(`path`,{d:`M0 0h24v24H0z`,fill:`none`}),(0,d.jsx)(`path`,{stroke:`var(--fl-color-icon)`,d:`M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z`})]});Et.displayName=`RestoreIcon`;var Dt=()=>(0,d.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,xmlns:`http://www.w3.org/2000/svg`,style:_t,height:`24px`,viewBox:`0 -960 960 960`,width:`24px`,children:(0,d.jsx)(`path`,{fill:`var(--fl-color-icon)`,stroke:`var(--fl-color-icon)`,d:`M440-120v-264L254-197l-57-57 187-186H120v-80h264L197-706l57-57 186 187v-264h80v264l186-187 57 57-187 186h264v80H576l187 186-57 57-186-187v264h-80Z`})});Dt.displayName=`AsterickIcon`;var Ot=e=>{let{controller:t,tabNode:n,selected:r,path:i}=e,a=u.useRef(null),o=u.useRef(null),s=t.getIcons(),c=t.getKeyMap(),l=t.getEditingTab()===n,f=u.useCallback(e=>{a.current=e,t.registerMeasurable(n,`tabbutton`,e)},[t,n]);u.useLayoutEffect(()=>{l&&o.current.select()},[l]),u.useEffect(()=>{if(l){let e=t.getCurrentDocument().body,n=e=>{e.target!==o.current&&t.setEditingTab(void 0)};return e.addEventListener(`pointerdown`,n),()=>e.removeEventListener(`pointerdown`,n)}},[l,t]);let p=e=>{n.isEnableDrag()?(e.stopPropagation(),t.getDragDropManager().setDragNode(e.nativeEvent,n)):e.preventDefault()},m=e=>{t.getDragDropManager().onDragEnded()},h=e=>{Ee(e)&&t.auxMouseClick(n,e)},g=e=>{t.showContextMenu(n,e)},_=()=>{n.isSelected()||t.doAction(T.selectTab(n.getId()))},v=e=>{let t=a.current?.closest(`[role="tablist"]`);if(t){let n=Array.from(t.querySelectorAll(`[role="tab"]`));n[n.indexOf(a.current)+e]?.focus()}},y=()=>{let e=a.current.ownerDocument,t=()=>Te(e.getElementById(ye(`flexlayout-tab-`,n.getId())));r?t():(_(),requestAnimationFrame(t))},b=e=>{l||(xe(e,c.focusTabToggle)?(y(),e.preventDefault()):e.key===`Enter`||e.key===` `?(r?y():_(),e.preventDefault()):(e.key===`ArrowLeft`||e.key===`ArrowUp`)&&!Se(e)?(v(-1),e.preventDefault()):(e.key===`ArrowRight`||e.key===`ArrowDown`)&&!Se(e)?(v(1),e.preventDefault()):xe(e,c.closeTab)&&n.isCloseable()?(v(1),t.doAction(T.deleteTab(n.getId())),e.preventDefault()):xe(e,c.renameTab)&&n.isEnableRename()&&(S(),e.preventDefault()))},x=e=>{n.isEnableRename()&&(S(),e.stopPropagation())},S=()=>{t.setEditingTab(n)},C=()=>{let e=n.getCloseType();return!!(r||e===ee.Always||e===ee.Visible&&t.getCurrentWindow()?.matchMedia(`(hover: hover) and (pointer: fine)`).matches)},E=e=>{C()&&(t.doAction(T.deleteTab(n.getId())),e.stopPropagation())},D=e=>{e.stopPropagation()},O=e=>{e.stopPropagation()},k=e=>{e.code===`Escape`?(t.setEditingTab(void 0),a.current?.focus()):(e.code===`Enter`||e.code===`NumpadEnter`)&&(t.setEditingTab(void 0),t.doAction(T.renameTab(n.getId(),e.target.value)),a.current?.focus())},A=t.getClassName,j=n.getTabContainer(),te=n.getParent()instanceof F?n.getParent():void 0,ne=j.isEnableSingleTabStretch()&&j.getChildren().length===1&&j.getChildren()[0]===n,M=ne?w.FLEXLAYOUT__TAB_BUTTON_STRETCH:w.FLEXLAYOUT__TAB_BUTTON,re=A(M);re+=` `+A(M+`_`+j.getTabLocation()),ne||(re+=r?` `+A(M+`--selected`):` `+A(M+`--unselected`)),n.isPinned()&&(re+=` `+A(M+`--pinned`)),te!==void 0&&(re+=` `+A(w.FLEXLAYOUT__TAB_BUTTON_GROUPED),n.getModel().getTabGroupType()===`underline`&&(re+=` `+A(w.FLEXLAYOUT__TAB_BUTTON_GROUPED_UNDERLINE))),n.getClassName()!==void 0&&(re+=` `+n.getClassName());let ie=ve(t,n),ae=r||j.getSelectedNode()===void 0&&j.getTabNodes()[0]===n,oe=[we(c.focusTabToggle),n.isCloseable()?we(c.closeTab):void 0,n.isEnableRename()?we(c.renameTab):void 0].filter(Boolean).join(` `)||void 0,se=ie.content?(0,d.jsx)(`div`,{className:A(w.FLEXLAYOUT__TAB_BUTTON_CONTENT),children:ie.content}):null,ce=ie.leading?(0,d.jsx)(`div`,{className:A(w.FLEXLAYOUT__TAB_BUTTON_LEADING),children:ie.leading}):null;if(l&&(se=(0,d.jsx)(`input`,{ref:o,className:A(w.FLEXLAYOUT__TAB_BUTTON_TEXTBOX),"data-layout-path":i+`/textbox`,type:`text`,"aria-label":t.i18nName(z.Rename_Tab),autoFocus:!0,defaultValue:n.getName(),onKeyDown:k,onPointerDown:O})),n.isPinned()){let e=t.i18nName(z.Pinned_Tab);ie.buttons.push((0,d.jsx)(`div`,{"data-layout-path":i+`/button/pin`,title:e,"aria-hidden":`true`,className:A(w.FLEXLAYOUT__TAB_BUTTON_PIN),children:typeof s.pin==`function`?s.pin(n):s.pin},`pin`))}if(n.isCloseable()&&!ne){let e=t.i18nName(z.Close_Tab);ie.buttons.push((0,d.jsx)(`div`,{"data-layout-path":i+`/button/close`,title:e,"aria-hidden":`true`,className:A(w.FLEXLAYOUT__TAB_BUTTON_TRAILING),onPointerDown:D,onClick:E,children:typeof s.close==`function`?s.close(n):s.close},`close`))}let le={};return te!==void 0&&(le[`--flexlayout-group-color`]=te.getColor()),(0,d.jsxs)(`div`,{ref:f,id:ye(`flexlayout-tabbutton-`,n.getId()),role:l?void 0:`tab`,"aria-selected":l?void 0:r,"aria-controls":l?void 0:ye(`flexlayout-tab-`,n.getId()),"aria-label":l?void 0:n.isPinned()?ie.name+` (`+t.i18nName(z.Pinned_Tab)+`)`:ie.name,"aria-keyshortcuts":l?void 0:oe,tabIndex:l?-1:ae?0:-1,onKeyDown:b,"data-layout-path":i,className:re,style:le,onClick:_,onAuxClick:h,onContextMenu:g,title:n.getHelpText(),draggable:!0,onDragStart:p,onDragEnd:m,onDoubleClick:x,children:[ce,se,ie.buttons]})};Ot.displayName=`TabButton`;var kt=e=>{let{tabsetNode:t,controller:n}=e,r=u.useRef(null),i=u.useRef(null),a=u.useRef(null),o=u.useRef(null),s=u.useRef(null),c=u.useRef(null),l=u.useRef(null),p=u.useRef(null),[m,h]=u.useState(!1),g=u.useRef(null),_=n.getIcons();u.useEffect(()=>()=>g.current?.(),[]);let{userControlledPositionRef:v,onScroll:y,onScrollPointerDown:b,hiddenTabs:S,onMouseWheel:C,isDockStickyButtons:E,isShowHiddenTabs:D}=dt(n,t,x.HORZ,o,a,i,n.getClassName(w.FLEXLAYOUT__TAB_BUTTON),p),O=u.useCallback(e=>{r.current=e,n.registerMeasurable(t,`tabset`,e)},[n,t]),ee=u.useCallback(e=>{i.current=e,n.registerMeasurable(t,`tabstrip`,e)},[n,t]),k=u.useCallback(e=>{s.current=e,n.registerMeasurable(t,`tabsetcontent`,e)},[n,t]),A=e=>{let r=n.getShowOverflowMenu(),i=t.getTabNodes(),a=S.map(e=>({index:e,node:i[e]}));if(r!==void 0)r(t,e,a,j);else{let e=l.current;h(!0),g.current=ut(e,t,a,j,n,()=>{h(!1),g.current=null})}e.stopPropagation()},j=e=>{n.doAction(T.selectTab(e.node.getId())),v.current=!1},te=e=>{n.getEditingTab()?e.preventDefault():t.isEnableDrag()?(e.stopPropagation(),n.getDragDropManager().setDragNode(e.nativeEvent,t)):e.preventDefault()},ne=e=>{n.getDragDropManager().onDragEnded()},M=e=>{!Ee(e)&&!t.isActive()&&n.doAction(T.setActiveTabset(t.getId(),n.getLayoutId()))},re=e=>{Ee(e)&&n.auxMouseClick(t,e)},ie=e=>{n.showContextMenu(t,e)},ae=e=>{e.stopPropagation()},oe=e=>{t.canMaximize()&&n.maximize(t),e.stopPropagation()},se=e=>{n.doAction(T.deleteTabset(t.getId())),e.stopPropagation()},ce=e=>{n.doAction(T.deleteTab(t.getChildren()[0].getId())),e.stopPropagation()},le=e=>{de!==void 0&&n.doAction(T.popoutTab(de.getId(),`window`)),e.stopPropagation()},ue=e=>{de!==void 0&&n.doAction(T.popoutTab(de.getId(),`float`)),e.stopPropagation()},N=e=>{t.canMaximize()&&n.maximize(t)},P=n.getClassName,de=t.getSelectedNode(),fe=t.getPath(),pe=t.getChildren(),me=t.isEnableSingleTabStretch()&&pe.length===1&&pe[0]instanceof R,he=(e,n,r,i)=>{let a=P(w.FLEXLAYOUT__TABSET_TAB_SPACER);return i&&(a+=` `+P(w.FLEXLAYOUT__TABSET_TAB_DIVIDER)),!t.isEnableTabWrap()&&!me&&(n?a+=` `+P(w.FLEXLAYOUT__TABSET_TAB_DIVIDER_SELECTED_BEFORE):r&&(a+=` `+P(w.FLEXLAYOUT__TABSET_TAB_DIVIDER_SELECTED_AFTER))),(0,d.jsx)(`div`,{className:a,children:(0,d.jsx)(`div`,{className:P(w.FLEXLAYOUT__TABSET_TAB_DIVIDER_INNER)})},`divider`+e)},I=()=>{let e=[],r=n.getModel().getTabGroupType()===`splitpill`,i=0,a=0,o=!1,s=!1,c=!1;if(t.isEnableTabStrip()){for(let l of pe){if(l instanceof F){if(e.push(he(a++,!1,o,c)),e.push((0,d.jsx)(et,{controller:n,groupNode:l,path:l.getPath()},l.getId())),c=!0,s=!1,l.isOpened()){let u=l.getChildren();for(let r=0;r<u.length;r++){let l=u[r],f=t.getSelected()===i;e.push(he(a++,f,o,r>0)),e.push((0,d.jsx)(Ot,{controller:n,tabNode:l,path:be(l),selected:f},l.getId())),o=f,s=!0,c=!0,i++}r&&(e.push(he(a++,!1,o,!1)),e.push((0,d.jsx)(tt,{controller:n,groupNode:l,path:l.getPath()+`/end`},l.getId()+`/end`)),o=!1)}continue}let u=l,f=t.getSelected()===i;e.push(he(a++,f,o,c)),e.push((0,d.jsx)(Ot,{controller:n,tabNode:u,path:be(u),selected:f},u.getId())),o=f,s=!0,c=!0,i++}if(s){let n=P(w.FLEXLAYOUT__TABSET_TAB_SPACER);!t.isEnableTabWrap()&&!me&&o&&(n+=` `+P(w.FLEXLAYOUT__TABSET_TAB_DIVIDER_SELECTED_AFTER)),e.push((0,d.jsx)(`div`,{className:n,children:(0,d.jsx)(`div`,{className:P(w.FLEXLAYOUT__TABSET_TAB_DIVIDER_INNER)})},`divider`+a))}}return e},L=()=>{let e,r=[],i=[],a={leading:e,stickyButtons:r,buttons:i,overflowPosition:void 0};n.customizeTabSet(t,a),e=a.leading,r=a.stickyButtons,i=a.buttons;let o=me,s=o&&t.getChildren()[0].isCloseable()||t.isCloseable();s&&=t.isEnableCloseButton(),a.overflowPosition===void 0&&(a.overflowPosition=r.length);let u;if(r.length>0&&(!t.isEnableTabWrap()&&(E||o)?i=[...r,...i]:u=(0,d.jsx)(`div`,{ref:p,onPointerDown:ae,onDragStart:e=>{e.preventDefault()},className:P(w.FLEXLAYOUT__TAB_TOOLBAR_STICKY_BUTTONS_CONTAINER),children:r},`sticky_buttons_container`)),!t.isEnableTabWrap()&&D){let e=n.i18nName(z.Overflow_Menu_Tooltip),r;if(typeof _.more==`function`){let e=t.getTabNodes(),n=S.map(t=>({index:t,node:e[t]}));r=_.more(t,n)}else r=(0,d.jsxs)(d.Fragment,{children:[_.more,(0,d.jsx)(`div`,{className:P(w.FLEXLAYOUT__TAB_BUTTON_OVERFLOW_COUNT),children:S.length>0?S.length:``})]});i.splice(Math.min(a.overflowPosition,i.length),0,(0,d.jsx)(`button`,{tabIndex:0,"data-layout-path":fe+`/button/overflow`,"aria-haspopup":`menu`,"aria-expanded":m,"aria-label":e,ref:l,className:P(w.FLEXLAYOUT__TAB_TOOLBAR_BUTTON)+` `+P(w.FLEXLAYOUT__TAB_BUTTON_OVERFLOW),title:e,onClick:A,onPointerDown:ae,children:r},`overflowbutton`))}if(de!==void 0&&!de.isPinned()){if(de.isEnableFloat()&&de.isEnableFloatIcon()){let e=n.i18nName(z.Popout_Tab_Float);i.push((0,d.jsx)(`button`,{tabIndex:0,"data-layout-path":fe+`/button/popout-float`,title:e,"aria-label":e,className:P(w.FLEXLAYOUT__TAB_TOOLBAR_BUTTON)+` `+P(w.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_FLOAT),onClick:ue,onPointerDown:ae,children:typeof _.popoutFloat==`function`?_.popoutFloat(de):_.popoutFloat},`popout-float`))}if(n.isSupportsPopout()&&de.isAllowedInWindow()&&de.isEnablePopoutIcon()){let e=n.i18nName(z.Popout_Tab);i.push((0,d.jsx)(`button`,{tabIndex:0,"data-layout-path":fe+`/button/popout`,title:e,"aria-label":e,className:P(w.FLEXLAYOUT__TAB_TOOLBAR_BUTTON)+` `+P(w.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_FLOAT),onClick:le,onPointerDown:ae,children:typeof _.popout==`function`?_.popout(de):_.popout},`popout`))}}if(t.canMaximize()){let e=n.i18nName(z.Restore),r=n.i18nName(z.Maximize);i.push((0,d.jsx)(`button`,{tabIndex:0,"data-layout-path":fe+`/button/max`,title:t.isMaximized()?e:r,"aria-label":t.isMaximized()?e:r,"aria-pressed":t.isMaximized(),className:P(w.FLEXLAYOUT__TAB_TOOLBAR_BUTTON)+` `+P(w.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_+(t.isMaximized()?`max`:`min`)),onClick:oe,onPointerDown:ae,children:t.isMaximized()?typeof _.restore==`function`?_.restore(t):_.restore:typeof _.maximize==`function`?_.maximize(t):_.maximize},`max`))}if(!t.isMaximized()&&s){let e=o?n.i18nName(z.Close_Tab):n.i18nName(z.Close_Tabset);i.push((0,d.jsx)(`button`,{tabIndex:0,"data-layout-path":fe+`/button/close`,title:e,"aria-label":e,className:P(w.FLEXLAYOUT__TAB_TOOLBAR_BUTTON)+` `+P(w.FLEXLAYOUT__TAB_TOOLBAR_BUTTON_CLOSE),onClick:o?ce:se,onPointerDown:ae,children:typeof _.closeTabset==`function`?_.closeTabset(t):_.closeTabset},`close`))}if(t.isActive()&&t.isEnableActiveIcon()){let e=n.i18nName(z.Active_Tabset);i.push((0,d.jsx)(`div`,{"data-layout-path":fe+`/button/active`,title:e,"aria-hidden":`true`,className:P(w.FLEXLAYOUT__TAB_TOOLBAR_ICON),children:typeof _.activeTabset==`function`?_.activeTabset(t):_.activeTabset},`active`))}let f=(0,d.jsx)(`div`,{ref:c,className:P(w.FLEXLAYOUT__TAB_TOOLBAR),onPointerDown:ae,onDragStart:e=>{e.preventDefault()},children:i},`buttonbar`);return{leading:e,buttonbar:f,stickyBar:u}},ge=(e,r,i,s)=>{let c,l=n.getKeyMap(),u=[we(l.focusNextTabset),we(l.focusPreviousTabset)].filter(Boolean).join(` `)||void 0,f=n.getEditingTab()?.getParent()===t,p=f?void 0:`tablist`,m=P(w.FLEXLAYOUT__TABSET_TABBAR_OUTER);t.getClassNameTabStrip()!==void 0&&(m+=` `+t.getClassNameTabStrip()),m+=` `+P(w.FLEXLAYOUT__TABSET_TABBAR_OUTER_+t.getTabLocation()),t.isActive()&&(m+=` `+P(w.FLEXLAYOUT__TABSET_SELECTED)),t.isMaximized()&&(m+=` `+P(w.FLEXLAYOUT__TABSET_MAXIMIZED));let h=me;if(h){let e=t.getChildren()[0];e.getTabSetClassName()!==void 0&&(m+=` `+e.getTabSetClassName())}let g;if(r&&(g=(0,d.jsx)(`div`,{className:P(w.FLEXLAYOUT__TABSET_LEADING),children:r})),t.isEnableTabWrap())t.isEnableTabStrip()&&(c=(0,d.jsxs)(`div`,{className:m,style:{flexWrap:`wrap`,gap:`1px`,marginTop:`2px`},ref:ee,"data-layout-path":fe+`/tabstrip`,onPointerDown:M,onDoubleClick:N,onContextMenu:ie,onClick:re,onAuxClick:re,draggable:!0,onDragStart:te,onDragEnd:ne,children:[g,(0,d.jsx)(`div`,{role:p,"aria-orientation":f?void 0:`horizontal`,"aria-label":f?void 0:t.getName(),"aria-keyshortcuts":f?void 0:u,style:{display:`contents`},children:e}),s,(0,d.jsx)(`div`,{style:{flexGrow:1,display:`flex`,justifyContent:`flex-end`},children:i})]}));else if(t.isEnableTabStrip()){let n;t.isEnableTabScrollbar()&&(n=(0,d.jsx)(`div`,{ref:a,"aria-hidden":`true`,className:P(w.FLEXLAYOUT__MINI_SCROLLBAR),onPointerDown:b})),c=(0,d.jsxs)(`div`,{className:m,ref:ee,"data-layout-path":fe+`/tabstrip`,onPointerDown:M,onDoubleClick:N,onContextMenu:ie,onClick:re,onAuxClick:re,draggable:!0,onWheel:C,onDragStart:te,onDragEnd:ne,children:[g,(0,d.jsxs)(`div`,{className:P(w.FLEXLAYOUT__MINI_SCROLLBAR_CONTAINER),children:[(0,d.jsxs)(`div`,{ref:o,className:P(w.FLEXLAYOUT__TABSET_TABBAR_INNER)+` `+P(w.FLEXLAYOUT__TABSET_TABBAR_INNER_+t.getTabLocation()),style:{overflowX:`auto`,overflowY:`hidden`},onScroll:y,children:[(0,d.jsx)(`div`,{style:{width:h?`100%`:`none`},role:p,"aria-orientation":f?void 0:`horizontal`,"aria-label":f?void 0:t.getName(),"aria-keyshortcuts":f?void 0:u,className:P(w.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER)+` `+P(w.FLEXLAYOUT__TABSET_TABBAR_INNER_TAB_CONTAINER_+t.getTabLocation()),children:e}),s]}),n]}),i]})}return c},_e=e=>{let r;if(t.getTabNodes().length===0){let e=n.getTabSetPlaceHolderCallback();e&&(r=e(t))}let i=(0,d.jsx)(`div`,{ref:k,className:P(w.FLEXLAYOUT__TABSET_CONTENT),children:r});return i=t.getTabLocation()===`top`?(0,d.jsxs)(d.Fragment,{children:[e,i]}):(0,d.jsxs)(d.Fragment,{children:[i,e]}),i},B=I(),{leading:ve,buttonbar:ye,stickyBar:xe}=L(),Se=_e(ge(B,ve,ye,xe)),Ce={flexGrow:Math.max(1,t.getWeight()*1e3),minWidth:t.getMinWidth(),minHeight:t.getMinHeight(),maxWidth:t.getMaxWidth(),maxHeight:t.getMaxHeight()};t.getModel().getMaximizedTabset(n.getLayoutId())!==void 0&&!t.isMaximized()&&(Ce.display=`none`);let Te=(0,d.jsx)(`div`,{ref:O,className:P(w.FLEXLAYOUT__TABSET_CONTAINER),style:Ce,children:(0,d.jsx)(`div`,{className:P(w.FLEXLAYOUT__TABSET),"data-layout-path":fe,children:Se})});return t.isMaximized()&&n.getMainElement()?(0,f.createPortal)((0,d.jsx)(`div`,{style:{position:`absolute`,display:`flex`,top:0,left:0,bottom:0,right:0},children:Te}),n.getMainElement()):Te};kt.displayName=`TabSet`;var At=e=>{let{controller:t,rowNode:n}=e,r=u.useRef(null),i=n.getOrientation()===x.HORZ,a=u.useCallback(e=>{r.current=e,t.registerMeasurable(n,`row`,e)},[t,n]),o=[],s=0;for(let e of n.getChildren())s>0&&o.push((0,d.jsx)(mt,{controller:t,node:n,index:s,horizontal:i},`splitter`+s)),e instanceof P?o.push((0,d.jsx)(At,{controller:t,rowNode:e},e.getId())):e instanceof N&&o.push((0,d.jsx)(kt,{controller:t,tabsetNode:e},e.getId())),s++;let c={flexGrow:Math.max(1,n.getWeight()*1e3),minWidth:n.getMinWidth(),minHeight:n.getMinHeight(),maxWidth:n.getMaxWidth(),maxHeight:n.getMaxHeight()};return c.flexDirection=i?`row`:`column`,(0,d.jsx)(`div`,{ref:a,className:t.getClassName(w.FLEXLAYOUT__ROW),style:c,children:o})};At.displayName=`Row`;var jt=e=>{let{controller:t,selected:n,tabNode:r}=e,i=u.useRef(null),a=u.useRef(!0),o=u.useCallback(()=>{let e=r.getParent();e instanceof N&&(e.isActive()||t.doAction(T.setActiveTabset(e.getId(),t.getLayoutId())))},[r,t]),s=r.getParent(),c=t.getKeyMap().focusTabToggle,l=e=>{if(xe(e,c)){let t=e.currentTarget.ownerDocument.getElementById(ye(`flexlayout-tabbutton-`,r.getId()));t&&(t.focus(),e.preventDefault(),e.stopPropagation())}};u.useLayoutEffect(()=>{let e=r.getMoveableElement(),n=i.current.ownerDocument,a=e.ownerDocument!==n;a&&n.adoptNode(e),e.parentElement!==i.current&&i.current.appendChild(e),a&&t.redrawLayoutAndTabContent();let s=()=>{r.saveScrollPosition()};e.addEventListener(`scroll`,s);let c=i.current;return c&&c.addEventListener(`pointerdown`,o),()=>{c&&c.removeEventListener(`pointerdown`,o),e.removeEventListener(`scroll`,s),e.isConnected||(t.getModel().getNodeById(r.getId())&&(r.isEnableWindowReMount()||t.getMainController()?.getMoveablesHome()?.appendChild(e)),r.setVisible(!1))}},[r,t,o]),u.useEffect(()=>{r.isSelected()&&(a.current&&=(r.restoreScrollPosition(),!1))}),u.useLayoutEffect(()=>(t.registerTabPanel(r,i.current),()=>{t.registerTabPanel(r,null)}),[t,r]);let f=t.getClassName,p=null;if(n&&document.hidden&&r.isEnablePopoutOverlay()){let e={};s.getContentRect().styleWithPosition(e);let t=f(w.FLEXLAYOUT__TAB_OVERLAY);s instanceof L&&s.isOverlay()&&(t+=` `+f(w.FLEXLAYOUT__TAB_OVERLAY_RAISED)),p=(0,d.jsx)(`div`,{style:e,className:t})}let m=f(w.FLEXLAYOUT__TAB);return s instanceof L&&(m+=` `+f(w.FLEXLAYOUT__TAB_BORDER),m+=` `+f(w.FLEXLAYOUT__TAB_BORDER_+s.getLocation().getName()),s.isOverlay()&&(m+=` `+f(w.FLEXLAYOUT__TAB_BORDER_OVERLAY))),r.getContentClassName()!==void 0&&(m+=` `+r.getContentClassName()),(0,d.jsxs)(d.Fragment,{children:[p,(0,d.jsx)(`div`,{ref:i,id:ye(`flexlayout-tab-`,r.getId()),role:`tabpanel`,"aria-labelledby":ye(`flexlayout-tabbutton-`,r.getId()),"aria-keyshortcuts":we(c),tabIndex:-1,onKeyDown:c?l:void 0,className:m,"data-layout-path":r.getPath()})]})};jt.displayName=`Tab`;var Mt=class extends u.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){}retry=()=>{this.setState({hasError:!1})};render(){return this.state.hasError?(0,d.jsx)(`div`,{className:w.FLEXLAYOUT__ERROR_BOUNDARY_CONTAINER,children:(0,d.jsx)(`div`,{role:`alert`,className:w.FLEXLAYOUT__ERROR_BOUNDARY_CONTENT,children:(0,d.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`},children:[this.props.message,(0,d.jsx)(`p`,{children:(0,d.jsx)(`button`,{tabIndex:0,onClick:this.retry,children:this.props.retryText})})]})})}):this.props.children}},Nt=u.memo(({controller:e,tabNode:t})=>{let n;if(t.getComponent())n=e.getFactory()(t);else if(t.getSubLayoutId()){let r=t.getModel().getLayouts().get(t.getSubLayoutId());n=(0,d.jsx)(`div`,{className:e.getClassName(w.FLEXLAYOUT__TAB_LAYOUT_CONTAINER),children:(0,d.jsx)(V,{...e.getProps(),layoutId:t.getSubLayoutId(),path:t.getPath()+r.getPath(),mainLayoutController:e.getMainController()})})}return(0,d.jsx)(Mt,{message:e.i18nName(z.Error_rendering_component),retryText:e.i18nName(z.Error_rendering_component_retry),children:n})},Pt);Nt.displayName=`TabContentRenderer`;function Pt(e,t){return!t.visible||e.windowId===t.windowId&&e.fullRedrawRevision===t.fullRedrawRevision&&e.parentRedrawRevision===t.parentRedrawRevision&&e.tabNode===t.tabNode&&t.tabNode.getSubLayoutId()===void 0}var Ft=class e{static dragState=void 0;_controller;_dragEnterCount=0;_dragging=!1;_active=!1;_dropInfo;_outlineDiv;_mainController;constructor(e){this._controller=e,this._mainController=e.getMainController()}isDockTarget(){return this._controller.getLayout().getLayoutId()!==e.dragState?.floatLayoutId}isExcludeCenter(){if(e.dragState?.dockFloatToMain)return!0;let t=e.dragState?.dragNode;return t instanceof N?!t.isEnableClose()||t.getPinnedRunLength()>0:!1}addTabWithDragAndDrop(t,n,r){let i=R.fromJson(n,this._controller.getModel(),!1);e.dragState=new It(this._controller.getMainController(),`add`,i,n,r)}onDragEnded(){this.clearDragMain(),e.dragState=void 0}moveTabWithDragAndDrop(e,t){this.setDragNode(e,t)}startDockLayoutDrag(t,n,r){let i=n.getRootRow();e.dragState=new It(this._controller.getMainController(),`float`,i,void 0,void 0,!0,n.getLayoutId(),r),t.dataTransfer.setData(`text/plain`,`--flexlayout--`),t.dataTransfer.effectAllowed=`copyMove`,t.dataTransfer.dropEffect=`move`,this._dragEnterCount=0,this._controller.getModel().sortLayouts();let a=0;n.getRootRow()?.forEachNode(e=>{e instanceof R&&a++},0);let o=this._controller.i18nName(z.Dock_Float_Tabs).replace(`?`,String(a)),s=!1;if(this._controller.getProps().onRenderDragRect){let e=this._controller.getProps().onRenderDragRect(o,i,void 0);e&&(this.setDragComponent(t,e,10,10),s=!0)}s||this.setDragComponent(t,o,10,10)}setDragNode=(t,n)=>{if(e.dragState=new It(this._controller.getMainController(),`internal`,n,void 0,void 0),t.dataTransfer.setData(`text/plain`,`--flexlayout--`),t.dataTransfer.effectAllowed=`copyMove`,t.dataTransfer.dropEffect=`move`,this._dragEnterCount=0,this._controller.getModel().sortLayouts(),n instanceof N){let e=!1,r=this._controller.i18nName(z.Move_Tabset);if(n.getChildren().length>0&&(r=this._controller.i18nName(z.Move_Tabs).replace(`?`,String(n.getChildren().length))),this._controller.getProps().onRenderDragRect){let i=this._controller.getProps().onRenderDragRect(r,n,void 0);i&&(this.setDragComponent(t,i,10,10),e=!0)}e||this.setDragComponent(t,r,10,10)}else if(n instanceof F){let e=!1,r=this._controller.i18nName(z.Move_Group).replace(`?`,String(n.getChildren().length));if(this._controller.getProps().onRenderDragRect){let i=this._controller.getProps().onRenderDragRect(r,n,void 0);i&&(this.setDragComponent(t,i,10,10),e=!0)}e||this.setDragComponent(t,r,10,10)}else{let e=t.target;if(e&&typeof e.getBoundingClientRect==`function`){let r=e.getBoundingClientRect(),i=t.clientX-r.left,a=t.clientY-r.top,o=n?.getParent(),s=o instanceof L&&o.getOrientation()===x.HORZ,c=s?10:i,l=s?10:a,u=!1;if(this._controller.getProps().onRenderDragRect){let e=(0,d.jsx)(nt,{controller:this._controller,tabNode:n},n.getId()),r=this._controller.getProps().onRenderDragRect(e,n,void 0);r&&(this.setDragComponent(t,r,c,l),u=!0)}u||(Me()?this.setDragComponent(t,(0,d.jsx)(nt,{tabNode:n,controller:this._controller}),c,l):t.dataTransfer.setDragImage(n.getTabStamp(),c,l))}}};setDragComponent(e,t,n,r){let i=(0,d.jsx)(`div`,{style:{position:`unset`},className:this._controller.getClassName(w.FLEXLAYOUT__LAYOUT)+` `+this._controller.getClassName(w.FLEXLAYOUT__DRAG_RECT),children:t}),a=this._controller.getCurrentDocument(),o=a.createElement(`div`);o.setAttribute(`data-layout-path`,`/drag-rectangle`),o.style.position=`absolute`,o.style.left=`-10000px`,o.style.top=`-10000px`,a.body.appendChild(o);let s=(0,p.createRoot)(o);(0,f.flushSync)(()=>s.render(i)),e.dataTransfer.setDragImage(o,n,r),setTimeout(()=>{s.unmount(),a.body.removeChild(o)},0)}updateActive(t){let n=Array.from(this._controller.getModel().getLayouts().values()),r=e.dragState?.dockFloatToMain===!0,i,a;for(let t=n.length-1;t>=0;t--){let o=n[t];if(r&&o.getLayoutId()===e.dragState?.floatLayoutId)continue;let s=Ut(o)?.getDragDropManager();s&&s.getDragEnterCount()>0&&(o.getType()===`tab`?a=o:!i&&!a&&(i=o))}if(a){let e=a.findParentLayout();(i===e||!i)&&(i=a)}i&&Ut(i).getDragDropManager().setActive(!0,t);for(let e of n)e!==i&&Ut(e)?.getDragDropManager().setActive(!1,t)}setActive(e,t){this._active!==e&&(this._active=e,this._active?this.onDragEnter(t):this.onDragLeave(t))}onDragEnterRaw=e=>{this._dragEnterCount++,this.updateActive(e)};onDragLeaveRaw=e=>{this._dragEnterCount--,this.updateActive(e)};clearDragMain(){this._controller.showOverlayOnAllWindows(!1);for(let[,e]of this._controller.getModel().getLayouts()){let t=Ut(e);t&&t.getDragDropManager().clearDragLocal()}}clearDragLocal(){this._dragEnterCount=0,this._active=!1,this.clearDragLocalVisuals()}clearDragLocalVisuals(){this._controller.setState({showEdges:!1}),this._dragging=!1,this._outlineDiv&&=(this._controller.getRootDiv().removeChild(this._outlineDiv),void 0)}onDragEnter=t=>{if(!e.dragState&&this._controller.getProps().onExternalDrag){let n=this._controller.getProps().onExternalDrag(t);if(n){let t=R.fromJson(n.json,this._controller.getModel(),!1);e.dragState=new It(this._controller.getMainController(),`external`,t,n.json,n.onDrop)}}if(this._mainController===e.dragState?.mainLayoutController&&(!e.dragState?.dockFloatToMain||this.isDockTarget())&&e.dragState){t.preventDefault(),this._dropInfo=void 0;let e=this._controller.getRootDiv(),n=this._controller.getCurrentDocument();this._outlineDiv=n.createElement(`div`),this._outlineDiv.className=this._controller.getClassName(w.FLEXLAYOUT__OUTLINE_RECT),this._outlineDiv.style.visibility=`hidden`;let r=this._controller.getTabDragSpeed();this._outlineDiv.style.transition=`top ${r}s, left ${r}s, width ${r}s, height ${r}s`,e.appendChild(this._outlineDiv),this._dragging=!0,this._controller.showOverlayOnAllWindows(!0),this._controller.getModel().getMaximizedTabset(this._controller.getLayoutId())===void 0&&this._controller.setState({showEdges:this._controller.getModel().isEnableEdgeDock()});let i=this._controller.getRootDiv().getBoundingClientRect();new b(t.clientX-i.left,t.clientY-i.top,1,1).positionElement(this._outlineDiv)}};onDragOver=t=>{if(this._mainController===e.dragState?.mainLayoutController&&(!e.dragState?.dockFloatToMain||this.isDockTarget())&&this._active){if(e.dragState?.dockFloatToMain){let n=t.target;if(n&&e.dragState.sourceFloatElement?.contains(n)){this._dropInfo=void 0;return}}let n=this._controller.getRootDiv()?.getBoundingClientRect(),r={x:t.clientX-(n?.left??0),y:t.clientY-(n?.top??0)};e.dragState.dockFloatToMain||this._controller.checkForBorderToShow(r.x,r.y);let i=this._controller.getModel().findDropTargetNode(this._controller.getLayoutId(),e.dragState.dragNode,r.x,r.y,this.isExcludeCenter());if(i){if(e.dragState.dockFloatToMain&&(i.location===S.CENTER||!(i.node instanceof N)&&!(i.node instanceof P)))return;t.preventDefault(),this._dropInfo=i,this._outlineDiv&&(this._outlineDiv.className=this._controller.getClassName(i.className),i.rect.positionElement(this._outlineDiv),this._outlineDiv.style.visibility=`visible`)}}};onDragLeave=t=>{if(this._mainController===e.dragState?.mainLayoutController&&(this.clearDragLocalVisuals(),this._controller.isMainLayout())){let e=!1;for(let[,t]of this._controller.getModel().getLayouts()){let n=Ut(t);if(n&&n.getDragDropManager().isDragging()){e=!0;break}}e===!1&&this.clearDragMain()}};onDrop=t=>{if(this._mainController!==e.dragState?.mainLayoutController){this.clearDragLocal();return}if(!e.dragState?.dockFloatToMain||this.isDockTarget()){if(this._active){t.preventDefault();let n=e.dragState;if(this._dropInfo&&n.dockFloatToMain){let e=t.target;e&&n.sourceFloatElement?.contains(e)&&(this._dropInfo=void 0)}if(this._dropInfo){if(n.dragJson!==void 0){let e=this._controller.doAction(T.addTab(n.dragJson,this._dropInfo.node.getId(),this._dropInfo.location,this._dropInfo.index));n.fnNewNodeDropped!==void 0&&n.fnNewNodeDropped(e,t)}else n.dragNode!==void 0&&(n.dockFloatToMain?this._controller.doAction(T.dockFloatToLayout(n.floatLayoutId,this._dropInfo.node.getId(),this._dropInfo.location,this._dropInfo.index)):this._controller.doAction(T.moveNode(n.dragNode.getId(),this._dropInfo.node.getId(),this._dropInfo.location,this._dropInfo.index)))}this.clearDragMain(),e.dragState=void 0}this._dragEnterCount=0}};getDragEnterCount(){return this._dragEnterCount}isDragging(){return this._dragging}},It=class{mainLayoutController;dragSource;dragNode;dragJson;fnNewNodeDropped;dockFloatToMain;floatLayoutId;sourceFloatElement;constructor(e,t,n,r,i,a=!1,o=void 0,s=void 0){this.mainLayoutController=e,this.dragSource=t,this.dragNode=n,this.dragJson=r,this.fnNewNodeDropped=i,this.dockFloatToMain=a,this.floatLayoutId=o,this.sourceFloatElement=s}},Lt=({controller:e})=>{let t=[],n=e.getIcons().edgeArrow;if(e.getState().showEdges&&e.getModel().isEnableEdgeDockIndicators()){let r=e.getModel().getRootRow(e.getLayoutId()).getRect(),i=e.getClassName(w.FLEXLAYOUT__EDGE_RECT);t.push((0,d.jsx)(`div`,{"aria-hidden":`true`,style:{top:0,left:r.width/2-50,width:100,height:10,borderBottomLeftRadius:50,borderBottomRightRadius:50},className:i+` `+e.getClassName(w.FLEXLAYOUT__EDGE_RECT_TOP),children:(0,d.jsx)(`div`,{style:{transform:`rotate(180deg)`},children:n})},`North`)),t.push((0,d.jsx)(`div`,{"aria-hidden":`true`,style:{top:r.height/2-50,left:0,width:10,height:100,borderTopRightRadius:50,borderBottomRightRadius:50},className:i+` `+e.getClassName(w.FLEXLAYOUT__EDGE_RECT_LEFT),children:(0,d.jsx)(`div`,{style:{transform:`rotate(90deg)`},children:n})},`West`)),t.push((0,d.jsx)(`div`,{"aria-hidden":`true`,style:{top:r.height-10,left:r.width/2-50,width:100,height:10,borderTopLeftRadius:50,borderTopRightRadius:50},className:i+` `+e.getClassName(w.FLEXLAYOUT__EDGE_RECT_BOTTOM),children:(0,d.jsx)(`div`,{children:n})},`South`)),t.push((0,d.jsx)(`div`,{"aria-hidden":`true`,style:{top:r.height/2-50,left:r.width-10,width:10,height:100,borderTopLeftRadius:50,borderBottomLeftRadius:50},className:i+` `+e.getClassName(w.FLEXLAYOUT__EDGE_RECT_RIGHT),children:(0,d.jsx)(`div`,{style:{transform:`rotate(-90deg)`},children:n})},`East`))}return(0,d.jsx)(d.Fragment,{children:t})};Lt.displayName=`EdgeIndicators`;var Rt=u.memo(e=>{Rt.displayName=`DragTabButton`;let{controller:t,tabNode:n}=e,r=u.useRef(null);u.useEffect(()=>(n.setTabStamp(r.current),()=>{n.setTabStamp(null)}),[n]);let i=t.getClassName,a=i(w.FLEXLAYOUT__DRAG_RECT);return(0,d.jsx)(`div`,{ref:r,className:a,children:(0,d.jsx)(nt,{controller:t,tabNode:n},n.getId())})},zt);function zt(e,t){return t.dragging}var Bt=class e{static Windows=new WeakMap;_props;_state;_setState;_layoutRef;_moveablesHomeRef;_findBorderBarSizeRef;_findSplitterSizeRef;_mainRef;_orderedTabIds;_orderedTabMoveableIds;_currentDocument;_currentWindow;_showOverlay=!1;_supportsPopout;_popoutURL;_icons;_dragDropManager;_layoutId;_layout;_mainController;_popoutWindowName;_cachedLayoutDOMRect;_reLayout;_measurables=new Map;_tabPanels=new Map;_lastRect=b.empty();_lastSplitterSize=8;_geometryResizeObserver;_splitterDragging=!1;constructor(e,t,n){this._props=e,this._state=t,this._setState=n,this._orderedTabIds=[],this._orderedTabMoveableIds=[],this._supportsPopout=e.supportsPopout===void 0?Ht:e.supportsPopout,this._popoutURL=e.popoutURL?e.popoutURL:`popout.html`,this._icons={...Vt,...e.icons},this._layoutId=e.layoutId?e.layoutId:me.MAIN_LAYOUT_ID,this._mainController=e.mainLayoutController?e.mainLayoutController:this,this._dragDropManager=new Ft(this),this._layout=e.model.getLayouts().get(this._layoutId),this._layout.setController(this),this._popoutWindowName=e.popoutWindowName,this._reLayout=!1}renderLayout(){return this._cachedLayoutDOMRect=void 0,(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(At,{controller:this,rowNode:this._props.model.getRootRow(this._layoutId)},`__row__`),(0,d.jsx)(Lt,{controller:this})]})}renderTabContainers(){let e=new Map;return this._props.model.visitLayoutNodes(this._layoutId,t=>{if(t instanceof R){let n=t,r=n.isSelected(),i=n.isRendered(),a=n.isEnableRenderOnDemand();(i||r||!a)&&e.set(n.getId(),(0,d.jsx)(jt,{controller:this,tabNode:n,selected:r},n.getId()))}}),e}renderTabContents(){let e=new Map;for(let[t,n]of this._props.model.getLayouts())this._props.model.visitLayoutNodes(t,t=>{if(t instanceof R){let r=t,i=r.isSelected(),a=r.isRendered(),o=r.isEnableRenderOnDemand(),s=r.getTabContainer().getContentRect(),c=i||!o;if(a||c&&s.width>0&&s.height>0){let t=r.getMoveableElement();t.style.overflow=r.isEnableScrollbars()?`auto`:`hidden`;let i=n.getWindowId()||``,a=r.getId()+(r.isEnableWindowReMount()?i:``);e.set(r.getId(),(0,f.createPortal)((0,d.jsx)(Nt,{controller:this,tabNode:r,windowId:i,visible:c,fullRedrawRevision:this._state.fullRedrawRevision,parentRedrawRevision:this._props.parentRedrawRevision},a),t,a)),r.setRendered(!0)}}});return e}renderDragTabButtons(){let e=[];return this._props.model.visitNodes(t=>{if(t instanceof R){let n=t;e.push((0,d.jsx)(Rt,{controller:this,tabNode:n,dragging:ke},n.getId()))}}),e}redrawLayout(){this._mainController?.setState(e=>({layoutRedrawRevision:e.layoutRedrawRevision+1}))}redrawLayoutAndTabContent(){this._mainController?.setState(e=>({fullRedrawRevision:e.fullRedrawRevision+1}))}doAction(e){if(this._props.onAction!==void 0){let t=this._props.onAction(e);return t===void 0?void 0:this._props.model.doAction(t)}return this._props.model.doAction(e)}updateRect=()=>{if(this._layoutRef.current){let e=this._layoutRef.current;if(!this._layout.isMainLayout()&&this._layout.getType()===`float`){let t=e.closest(`.`+this.getClassName(w.FLEXLAYOUT__FLOAT_WINDOW));t instanceof HTMLDivElement&&(e=t)}let t=b.fromDomRect(e.getBoundingClientRect());if(!this._layout.isMainLayout()&&this._layout.getType()===`float`){let e=this._mainController.getDomRect();t=t.relativeTo(e)}!t.equalsWhenRounded(this._lastRect)&&t.width!==0&&t.height!==0&&(this._lastRect=t,this._layout.setRect(t),this.redrawLayout())}};onModelChange=e=>{let t=e instanceof D?e.actions:[e];for(let e of t)if(e.type==T.DELETE_TAB&&this._state.showHiddenBorder!==S.CENTER){let e=this._props.model.getBorderSet().getBorderMap().get(this._state.showHiddenBorder);if(!e||e.getChildren().length===0){this._setState({showHiddenBorder:S.CENTER});break}}if(e.isAdjusting()&&(e.type===T.ADJUST_WEIGHTS||e.type===T.ADJUST_BORDER_SPLIT)){e.type===T.ADJUST_WEIGHTS?this.applyAdjustingWeights(e):this.applyAdjustingBorderSplit(e),this._props.onModelChange&&this._props.onModelChange(this._props.model,e);return}this.redrawLayout(),this._props.onModelChange&&this._props.onModelChange(this._props.model,e)};applyMeasuredGeometry(){this.syncLayoutMetrics(),this.positionTabPanels(),this.isReLayout()&&(this.redrawLayout(),this.setReLayout(!1))}applyAdjustingWeights(e){let t=this._props.model.getNodeById(e.data.nodeId);if(!(t instanceof P)){this.redrawLayout();return}let n=e.data.weights,r=t.getChildren();for(let e=0;e<r.length;e++){let t=r[e];if(typeof n?.[e]!=`number`||!Number.isFinite(n[e]))continue;let i=t instanceof P?`row`:`tabset`,a=this._measurables.get(i+`:`+t.getId())?.element;if(!a){this.redrawLayout();return}a.style.flexGrow=String(Math.max(1,n[e]*1e3))}this.applyMeasuredGeometry()}applyAdjustingBorderSplit(e){let t=this._props.model.getNodeById(e.data.node);if(!(t instanceof L)){this.redrawLayout();return}if(t.isOverlay()){this.redrawLayout();return}let n=this._measurables.get(`bordercontent:`+t.getId())?.element;if(!n){this.redrawLayout();return}let r=t.getSize();t.isHorizontal()?(n.style.width=r+`px`,n.style.minWidth=t.getMinSize()+`px`,n.style.maxWidth=t.getMaxSize()+`px`):(n.style.height=r+`px`,n.style.minHeight=t.getMinSize()+`px`,n.style.maxHeight=t.getMaxSize()+`px`),this.applyMeasuredGeometry()}reorderComponents(e,t){let n=t.filter(t=>e.has(t)),r=new Set(n);for(let t of e.keys())r.has(t)||n.push(t);return t===this._orderedTabIds?this._orderedTabIds=n:t===this._orderedTabMoveableIds&&(this._orderedTabMoveableIds=n),n.map(t=>e.get(t))}checkForBorderToShow(e,t){let n=this.getBoundingClientRect(this._mainRef.current),r=n.getCenter(),i=!1;this._props.model.isEnableEdgeDock()&&this._state.showHiddenBorder===S.CENTER&&(t>r.y-50&&t<r.y+50||e>r.x-50&&e<r.x+50)&&(i=!0);let a=S.CENTER;i||(e<=n.x+10?a=S.LEFT:e>=n.getRight()-10?a=S.RIGHT:t<=n.y+10?a=S.TOP:t>=n.getBottom()-10&&(a=S.BOTTOM)),a!==S.CENTER&&!this._props.model.getBorderSet().getBorderMap().has(a)&&(a=S.CENTER),a!==this._state.showHiddenBorder&&this.setState({showHiddenBorder:a})}onOverlayBorderPointerDown=e=>{let t=this._props.model.getBorderSet().getBorders().filter(e=>e.isOverlay()&&e.getSelected()!==-1);if(t.length===0||e.target?.closest?.(`.`+this.getClassName(w.FLEXLAYOUT__POPUP_MENU_CONTAINER)+`,.`+this.getClassName(w.FLEXLAYOUT__FLOAT_WINDOW)+`,.`+this.getClassName(w.FLEXLAYOUT__FLOATING_WINDOW_CONTENT)+`,.`+this.getClassName(w.FLEXLAYOUT__BORDER_TAB_OVERLAY)))return;let n=this.getDomRect();if(!n)return;let r=e.clientX-n.x,i=e.clientY-n.y,a=this._props.model.getRootRow(me.MAIN_LAYOUT_ID)?.getRect();if(a&&a.contains(r,i))for(let e of t)e.getContentRect()?.contains(r,i)||this.closeOverlayBorder(e)};closeOverlayBorder(e){let t=e.getSelectedNode();if(t===void 0)return;let n=this._currentDocument,r=n?.getElementById(ye(`flexlayout-tab-`,t.getId())),i=!!n&&!!r&&r.contains(n.activeElement);this.doAction(T.selectTab(t.getId())),i&&n.getElementById(ye(`flexlayout-tabbutton-`,t.getId()))?.focus()}onOverlayBorderKeyDown=e=>{if(!xe(e,this.getKeyMap().closeOverlayBorder))return;let t=this._currentDocument?.activeElement;if(!t)return;let n=this._props.model.getBorderSet().getBorders().filter(e=>e.isOverlay()&&e.getSelected()!==-1);for(let r of n){let n=r.getSelectedNode(),i=this._currentDocument.getElementById(ye(`flexlayout-tab-`,n.getId())),a=this._currentDocument.getElementById(ye(`flexlayout-tabbutton-`,n.getId()));if(i&&i.contains(t)||t===a){this.closeOverlayBorder(r),e.preventDefault();break}}};onTabsetNavKeyDown=e=>{if(e.defaultPrevented)return;let t=this.getKeyMap(),n;if(xe(e,t.focusNextTabset))n=1;else if(xe(e,t.focusPreviousTabset))n=-1;else return;this.focusAdjacentTabset(n)&&e.preventDefault()};focusAdjacentTabset(e){let t=this._currentDocument,n=t?.activeElement;if(!t||!n||!this.getRootDiv()?.contains(n))return!1;let r=n.tagName;if(r===`INPUT`||r===`TEXTAREA`||n.isContentEditable||n.closest(`[role="menu"]`)||this._props.model.getMaximizedTabset(this._layoutId)!==void 0)return!1;let i=[];if(this._props.model.visitLayoutNodes(this._layoutId,e=>{e instanceof N&&e.getSelectedNode()!==void 0&&i.push(e)}),i.length<2)return!1;let a=i.findIndex(e=>this._measurables.get(`tabset:`+e.getId())?.element.contains(n)?!0:!!t.getElementById(ye(`flexlayout-tab-`,e.getSelectedNode().getId()))?.contains(n));if(a===-1){let e=this._props.model.getActiveTabset(this._layoutId);a=e===void 0?0:i.indexOf(e),a===-1&&(a=0)}let o=i[(a+e+i.length)%i.length];return t.getElementById(ye(`flexlayout-tabbutton-`,o.getSelectedNode().getId()))?.focus(),this.doAction(T.setActiveTabset(o.getId(),this._layoutId)),!0}registerMeasurable(e,t,n){let r=t+`:`+e.getId(),i=this._measurables.get(r);n?this._measurables.set(r,{kind:t,node:e,element:n}):(this._measurables.delete(r),t===`grouppill`?e.setPillRect(b.empty()):t===`groupendmarker`&&e.setEndMarkerRect(b.empty())),t!==`tabbutton`&&(i&&this._geometryResizeObserver?.unobserve(i.element),n&&this._geometryResizeObserver?.observe(n))}setGeometryResizeObserver(e){if(this._geometryResizeObserver=e,e)for(let{kind:t,element:n}of this._measurables.values())t!==`tabbutton`&&e.observe(n)}syncLayoutMetrics(){this._cachedLayoutDOMRect=void 0;let e=!1;for(let{kind:t,node:n,element:r}of this._measurables.values()){if(!r.isConnected)continue;let i=this.getBoundingClientRect(r);switch(t){case`row`:case`tabset`:i.equalsWhenRounded(n.getRect())||(n.setRect(i),e=!0);break;case`tabstrip`:i.equalsWhenRounded(n.getTabStripRect())||(n.setTabStripRect(i),e=!0);break;case`tabsetcontent`:{let t=n;if(!isNaN(i.x)&&!t.getContentRect().equalsWhenRounded(i)){let n=t.getContentRect().width>0&&t.getContentRect().height>0;t.setContentRect(i),e=!0,!n&&i.width>0&&i.height>0&&this.setReLayout(!0)}break}case`tabbutton`:i.equalsWhenRounded(n.getTabRect())||(n.setTabRect(i),e=!0);break;case`grouppill`:i.equalsWhenRounded(n.getPillRect())||(n.setPillRect(i),e=!0);break;case`groupendmarker`:i.equalsWhenRounded(n.getEndMarkerRect())||(n.setEndMarkerRect(i),e=!0);break;case`borderheader`:i.equalsWhenRounded(n.getRect())||(n.setTabHeaderRect(i),e=!0);break;case`bordercontent`:{let t=n;if(!isNaN(i.x)&&i.width>0&&!t.getContentRect().equalsWhenRounded(i)){let n=t.getContentRect().width>0&&t.getContentRect().height>0;t.setContentRect(i),e=!0,!n&&i.height>0&&this.setReLayout(!0)}break}}}for(let{kind:t,node:n}of this._measurables.values())if(t===`grouppill`){let t=n,r=t.getDropRegion();r.equalsWhenRounded(t.getRect())||(t.setRect(r),e=!0)}return e}registerTabPanel(e,t){t?this._tabPanels.set(e.getId(),{node:e,element:t}):this._tabPanels.delete(e.getId())}positionTabPanels(){for(let{node:e,element:t}of this._tabPanels.values()){let n=e.getTabContainer(),r=n.getContentRect(),i=e.isSelected();n instanceof N?this._props.model.getMaximizedTabset(this._layoutId)!==void 0&&!n.isMaximized()&&(i=!1):n instanceof L&&(n.isShowing()||(i=!1)),r.positionElement(t),t.style.display=i?``:`none`,e.setRect(r),e.setVisible(i)}}updateLayoutMetrics=()=>{if(this._findBorderBarSizeRef.current){let e=this._findBorderBarSizeRef.current.getBoundingClientRect().height;Math.abs(e-this._state.calculatedBorderBarSize)>.5&&this.setState({calculatedBorderBarSize:e})}if(this._findSplitterSizeRef.current){let e=this._findSplitterSizeRef.current.getBoundingClientRect().width;Math.abs(e-this._lastSplitterSize)>.5&&(this._lastSplitterSize=e,this._props.model.setSplitterSize(e),this.redrawLayout())}};addTabWithDragAndDrop(e,t,n){this._dragDropManager.addTabWithDragAndDrop(e,t,n)}moveTabWithDragAndDrop(e,t){this._dragDropManager.moveTabWithDragAndDrop(e,t)}setDragComponent(e,t,n,r){this._dragDropManager.setDragComponent(e,t,n,r)}getMoveablesHome(){return this._moveablesHomeRef.current}getProps(){return this._props}getKeyMap(){return Ce(this._props.keyMap)}setProps(e){this._props=e}getState(){return this._state}setStateRaw(e){this._state=e}setState(e){this._setState(e)}setSetState(e){this._setState=e}setLayoutRef(e){this._layoutRef=e}setMoveablesHomeRef(e){this._moveablesHomeRef=e}setFindBorderBarSizeRef(e){this._findBorderBarSizeRef=e}setFindSplitterSizeRef(e){this._findSplitterSizeRef=e}getMainRef(){return this._mainRef}setMainRef(e){this._mainRef=e}getOrderedTabIds(){return this._orderedTabIds}getOrderedTabMoveableIds(){return this._orderedTabMoveableIds}getCurrentDocument(){return this._currentDocument}setCurrentDocument(e){this._currentDocument=e}getCurrentWindow(){return this._currentWindow}setCurrentWindow(t){this._currentWindow=t,t&&!e.Windows.has(t)&&e.Windows.set(t,ue())}getWindowId(){if(this.getCurrentWindow())return e.Windows.get(this.getCurrentWindow())}isSupportsPopout(){return this._supportsPopout}getPopoutURL(){return this._popoutURL}getIcons(){return this._icons}getDragDropManager(){return this._dragDropManager}getLayoutId(){return this._layoutId}getLayout(){return this._layout}setLayout(e){this._layout=e}getMainController(){return this._mainController}isMainLayout(){return this._layout.isMainLayout()}getPopoutWindowName(){return this._popoutWindowName??this.i18nName(z.Popout_Window_Name)}isReLayout(){return this._reLayout}setReLayout(e){this._reLayout=e}getBoundingClientRect(e){let t=this.getDomRect();return t?b.getBoundingClientRect(e).relativeTo(t):b.empty()}getClassName=e=>this._props.classNameMapper===void 0?e:this._props.classNameMapper(e);getLayoutRef(){return this._layoutRef.current}getDomRect(){return this._cachedLayoutDOMRect===void 0?this._layoutRef.current?(this._cachedLayoutDOMRect=b.fromDomRect(this._layoutRef.current.getBoundingClientRect()),this._cachedLayoutDOMRect):b.empty():this._cachedLayoutDOMRect}getRootDiv(){return this._layoutRef.current}getMainElement(){return this._mainRef.current}getFactory(){return this._props.factory}isRealtimeResize(){return this._props.realtimeResize??!0}isSplitterDragging(){return this._mainController?this._mainController._splitterDragging:this._splitterDragging}setSplitterDragging(e){let t=this._mainController??this;t._splitterDragging=e}setEditingTab(e){this.setState({editingTab:e})}getEditingTab(){return this._state.editingTab}getModel(){return this._props.model}getTabDragSpeed(){return this._props.tabDragSpeed?this._props.tabDragSpeed:.3}onCloseLayout=e=>{this.doAction(T.closePopout(e.getLayoutId()))};getScreenRect(e){let t=e.clone(),n=this.getDomRect(),r=this._currentWindow.outerHeight-this._currentWindow.innerHeight,i=this._currentWindow.outerWidth-this._currentWindow.innerWidth,a=r>=0&&r<=200?r:60,o=i>=0&&i<=100?i:2;return t.x=this._currentWindow.screenX+this._currentWindow.scrollX+o/2+n.x+t.x,t.y=this._currentWindow.screenY+this._currentWindow.scrollY+(a-o/2)+n.y+t.y,t.height+=a,t.width+=o,t}getRelativeRect(e){let t=e.clone();if(!this._layout.isMainLayout()){let e=this._layout.getRect();t.x+=e.x,t.y+=e.y}return t}moveWindowToFront(e){this.doAction(T.movePopoutToFront(e))}addTabToTabSet(e,t){if(this._props.model.getNodeById(e)!==void 0)return this.doAction(T.addTab(t,e,S.CENTER,-1))}addTabToActiveTabSet(e){let t=this._props.model.getActiveTabset(this._layoutId);if(t!==void 0)return this.doAction(T.addTab(e,t.getId(),S.CENTER,-1))}maximize(e){this.doAction(T.maximizeToggle(e.getId(),this.getLayoutId()))}customizeTab(e,t){this._props.onRenderTab&&this._props.onRenderTab(e,t)}customizeTabSet(e,t){this._props.onRenderTabSet&&this._props.onRenderTabSet(e,t)}i18nName(e,t){let n=this._props.model.translate(e);return n===e&&(n=ge[e]??e),n===void 0&&(n=e+(t===void 0?``:t)),n}getShowOverflowMenu(){return this._props.onShowOverflowMenu}getTabSetPlaceHolderCallback(){return this._props.onTabSetPlaceHolder}showContextMenu(e,t){this._props.onContextMenu&&this._props.onContextMenu(e,t)}auxMouseClick(e,t){this._props.onAuxMouseClick&&this._props.onAuxMouseClick(e,t)}showOverlay(e){this._showOverlay!==e&&(this._showOverlay=e,this.setState({showOverlay:e}),De(!e,this._currentDocument))}showOverlayOnAllWindows(e){for(let[,t]of this._props.model.getLayouts()){let n=Ut(t);n&&n.showOverlay(e)}}},Vt={close:(0,d.jsx)(vt,{}),pin:(0,d.jsx)(yt,{}),closeTabset:(0,d.jsx)(vt,{}),closeFloatPopout:(0,d.jsx)(vt,{}),popout:(0,d.jsx)(Ct,{}),popoutFloat:(0,d.jsx)(wt,{}),maximize:(0,d.jsx)(bt,{}),restore:(0,d.jsx)(Et,{}),more:(0,d.jsx)(xt,{}),edgeArrow:(0,d.jsx)(St,{}),activeTabset:(0,d.jsx)(Dt,{}),dragToDock:(0,d.jsx)(Tt,{}),popoutFloatWindow:(0,d.jsx)(Ct,{})},Ht=B();function Ut(e){return e.getController()}var V=u.forwardRef((e,t)=>{let[n,r]=u.useState({editingTab:void 0,showEdges:!1,showOverlay:!1,calculatedBorderBarSize:29,layoutRedrawRevision:0,fullRedrawRevision:0,showHiddenBorder:S.CENTER}),i=u.useCallback(t=>{r(n=>({...n,...typeof t==`function`?t(n,e):t}))},[e]),a=u.useRef(null),[o,s]=u.useState(0),c=u.useRef(null),l=u.useRef(null),f=u.useRef(null),p=u.useRef(null),m=u.useMemo(()=>new Bt(e,n,i),[]);m.setProps(e),m.setStateRaw(n),m.setSetState(i),m.setLayoutRef(a),m.setMoveablesHomeRef(c),m.setFindBorderBarSizeRef(l),m.setFindSplitterSizeRef(f),m.setMainRef(p);let h=e.model.getLayouts().get(m.getLayoutId());h.setController(m),u.useImperativeHandle(t,()=>m,[m]),u.useLayoutEffect(()=>{let e=m.syncLayoutMetrics();if(m.positionTabPanels(),m.isMainLayout()&&m.updateLayoutMetrics(),m.isReLayout()&&(m.redrawLayout(),m.setReLayout(!1)),a.current&&m.getCurrentDocument()!==void 0&&m.getCurrentDocument()!==a.current.ownerDocument&&s(e=>e+1),e){let e=a.current?.ownerDocument.defaultView??window,t=e.requestAnimationFrame(()=>{m.syncLayoutMetrics(),m.positionTabPanels(),m.isReLayout()&&(m.redrawLayout(),m.setReLayout(!1))});return()=>e.cancelAnimationFrame(t)}}),u.useEffect(()=>{let e=a.current.ownerDocument,t=e.defaultView;m.setCurrentDocument(e),m.setCurrentWindow(t);let n=new t.ResizeObserver(()=>{m.updateRect(),m.syncLayoutMetrics(),m.positionTabPanels(),m.updateLayoutMetrics(),m.isReLayout()&&(m.redrawLayout(),m.setReLayout(!1))});n.observe(a.current),m.setGeometryResizeObserver(n),l.current&&n.observe(l.current),f.current&&n.observe(f.current);let r=()=>{m.updateRect()};t.addEventListener(`resize`,r);let i=()=>{for(let[e,t]of m.getProps().model.getLayouts()){let e=t.getController();e&&e.redrawLayout()}};return m.isMainLayout()&&(e.addEventListener(`visibilitychange`,i),e.addEventListener(`pointerdown`,m.onOverlayBorderPointerDown,!0),e.addEventListener(`keydown`,m.onOverlayBorderKeyDown)),(m.isMainLayout()||m.getLayout()?.getType()===`window`)&&e.addEventListener(`keydown`,m.onTabsetNavKeyDown),()=>{m.setGeometryResizeObserver(void 0),n.disconnect(),t.removeEventListener(`resize`,r),e.removeEventListener(`visibilitychange`,i),e.removeEventListener(`pointerdown`,m.onOverlayBorderPointerDown,!0),e.removeEventListener(`keydown`,m.onOverlayBorderKeyDown),e.removeEventListener(`keydown`,m.onTabsetNavKeyDown)}},[m,o]),u.useEffect(()=>{let e;if(!m.isMainLayout()&&m.getLayout().getType()===`window`){let t=m.getProps().mainLayoutController?.getRootDiv();if(t){let n=t,r=a.current;je(n,r),e=new MutationObserver(()=>{je(n,r)&&m.redrawLayout()}),e.observe(n,{attributeFilter:[`style`]})}}return()=>{e&&e.disconnect()}},[m]),u.useEffect(()=>{let t=e.model;if(h.setToExportRectFunction((e,t)=>t===`window`?m.getScreenRect(e):m.getRelativeRect(e)),m.setLayout(h),m.isMainLayout()){let e={onAfterAction:m.onModelChange};return t.addChangeListener(e),()=>{t.removeChangeListener(e)}}},[e.model,m,h]);let g=m.isMainLayout()?(0,d.jsxs)(`div`,{className:m.getClassName(w.FLEXLAYOUT__LAYOUT_METRICS),children:[(0,d.jsx)(`div`,{ref:l,className:m.getClassName(w.FLEXLAYOUT__BORDER_SIZER),children:`FindBorderBarSize`},`findBorderBarSize`),(0,d.jsx)(`div`,{ref:f,className:m.getClassName(w.FLEXLAYOUT__SPLITTER_+`horz`)},`findSplitterSize`)]}):null;if(!a.current)return(0,d.jsx)(`div`,{ref:a,className:m.getClassName(w.FLEXLAYOUT__LAYOUT),children:g});let _=e.model,v=m.getLayoutId();_.getRootRow(v).calcMinMaxSize(),_.getRootRow(v).setPaths(e.path||``),m.isMainLayout()&&_.getBorderSet().setPaths();let y=(0,d.jsx)(Pe,{controller:m,show:n.showOverlay},`__overlay__`),b=m.renderLayout(),x=(0,d.jsx)(gt,{controller:m,inner:b}),C=m.renderTabContainers(),T=m.reorderComponents(C,m.getOrderedTabIds()),E=null,D=null,O=null,ee=null;return m.isMainLayout()&&(E=(0,d.jsx)(Qe,{controller:m}),D=m.reorderComponents(m.renderTabContents(),m.getOrderedTabMoveableIds()),O=(0,d.jsx)(`div`,{"aria-hidden":`true`,className:m.getClassName(w.FLEXLAYOUT__LAYOUT_TAB_STAMPS),children:m.renderDragTabButtons()},`__dragTabButtons__`),ee=(0,d.jsx)(`div`,{ref:c,className:m.getClassName(w.FLEXLAYOUT__LAYOUT_MOVEABLES_HOME)},`__moveables_home__`)),(0,d.jsxs)(`div`,{ref:a,className:m.getClassName(w.FLEXLAYOUT__LAYOUT),onDragEnter:m.getDragDropManager().onDragEnterRaw,onDragLeave:m.getDragDropManager().onDragLeaveRaw,onDragOver:m.getDragDropManager().onDragOver,onDrop:m.getDragDropManager().onDrop,children:[g,ee,y,x,T,D,E,O]})});V.displayName=`LayoutInternal`;var Wt=u.forwardRef((e,t)=>{let n=(0,u.useRef)(null),r=(0,u.useRef)(e.model),i=(0,u.useRef)(0);r.current!==e.model&&(e.model.getAdoptedFromModel()!==r.current&&i.current++,r.current=e.model),(0,u.useEffect)(()=>(e.model.setI18nDefaults(ge),e.model.setI18nTranslator(e.i18nTranslator),()=>{e.model.setI18nDefaults(void 0),e.model.setI18nTranslator(void 0)}),[e.model,e.i18nTranslator]),Wt.displayName=`Layout`,(0,u.useImperativeHandle)(t,()=>({redraw:()=>{n.current?.redrawLayoutAndTabContent()},addTabToTabSet:(e,t)=>n.current?.addTabToTabSet(e,t),addTabWithDragAndDrop:(e,t,r)=>{n.current?.addTabWithDragAndDrop(e,t,r)},moveTabWithDragAndDrop:(e,t)=>{n.current?.moveTabWithDragAndDrop(e,t)},addTabToActiveTabSet:e=>n.current?.addTabToActiveTabSet(e),setDragComponent:(e,t,r,i)=>{n.current?.setDragComponent(e,t,r,i)},editTabName:e=>{let t=n.current?.getModel().getNodeById(e);t instanceof R&&t.isEnableRename()&&Ut(t.getLayout())?.setEditingTab(t)},getRootDiv:()=>n.current.getRootDiv()}));let a=(0,u.useRef)({}),o=e.invalidateTabContentOnParentRender===!1?a.current:{};return(0,d.jsx)(V,{ref:n,...e,parentRedrawRevision:o},i.current)});T.SET_ACTIVE_TABSET;var Gt=1.2,Kt=2.5;function qt(e){let t=Number(e);return!Number.isFinite(t)||t<=0?`expanded`:t<2?`closed`:t<8?`collapsed`:`expanded`}function Jt(e){let t=Number(e);return!Number.isFinite(t)||t<=0?16:t<.5?Gt:Yt(qt(t)).weight}function Yt(e){return{weight:e===`closed`?Gt:e===`collapsed`?Kt:16,enableTabStrip:!1}}var Xt=e=>S.getByName(e);function Zt(e){let t=e||{};return Object.keys(t).filter(e=>t[e]!==void 0).sort().map(e=>`${e}=${String(t[e])}`).join(`|`)}function Qt(e,t,n){if(!e)return null;let r=Zt(n),i=null;return e.visitNodes(e=>{if(i||e.getType()!==`tab`)return;let n=e;n.getComponent()===t&&Zt(n.getConfig()||{})===r&&(i=n)}),i}function $t(e){let t=[];return e.visitNodes(e=>{e.getType()===`tabset`&&t.push(e)}),t}function en(e,t){if(!e)return null;let n=null;return e.visitNodes(e=>{if(n||e.getType()!==`tab`)return;let r=e;r.getComponent()===t&&(n=r)}),n}function tn(e){if(!e)return null;let t=an(e);if(!t)return null;let n=e.getNodeById(t);if(!n)return null;let r=typeof n.getSelectedTab==`function`?n.getSelectedTab():null,i=n.getTabNodes&&n.getTabNodes()||[],a=r||i[i.length-1]||null;return a?{component:a.getComponent()||``,name:a.getName(),config:a.getConfig()||{}}:null}function nn(e,t){return!t||!t.length?!1:(e.getTabNodes()||[]).some(e=>t.includes(e.getComponent()||``))}function rn(e,t=[]){let n=e.getActiveTabset()||e.getFirstTabSet();if(n&&!nn(n,t))return n.getId();let r=[...$t(e)].reverse().find(e=>!nn(e,t));return r?r.getId():n?n.getId():void 0}function an(e){if(!e)return null;let t=null;return e.visitNodes(e=>{if(t||e.getType()!==`tabset`)return;let n=e,r=n.getId();if(r===`ts_main`){t=r;return}r!==`ts_sidebar`&&r!==`ts_right`&&!nn(n,[`sidebar`])&&(t=r)}),t}var on=[`progress`,`refs`],sn=[`dir`,`page`,`group`,`repos`,`overview`,`doc`,`dag`,`compose`,`templates`];function cn(e){if(!e)return null;let t=null;return e.visitNodes(e=>{if(!t&&!String(e.getId()).startsWith(`float`)){if(e.getType()===`tabset`&&e.getId()===`ts_right`){t=e.getId();return}if(e.getType()===`tabset`&&typeof e.getTabNodes==`function`){let n=(e.getTabNodes()||[]).map(e=>e.getComponent()||``);if(n.some(e=>sn.includes(e)))return;n.some(e=>on.includes(e))&&(t=e.getId())}}}),t}var ln=16,un=0;function dn(e,t){let n=cn(e);return n?xn(e,n,{weight:t?ln:un,enableTabStrip:!1}):!1}function fn(e){if(!e)return;let t=[];e.visitNodes(e=>{e.getType()===`tab`&&e.getComponent()===`progress`&&t.push(e.getId())});for(let n of t)e.doAction(T.deleteTab(n));dn(e,!1)}function pn(e,t){if(!e)return 0;let n=cn(e),r=[];e.visitNodes(e=>{if(e.getType()!==`tab`)return;let i=e;if(t&&i.getComponent()===t)return;let a=i.getParent();a&&a.getId()===n&&r.push(i.getId())});for(let t of r)e.doAction(T.deleteTab(t));return r.length}function mn(e,t){if(!e)return;let n=[];e.visitNodes(e=>{e.getType()===`tab`&&e.getComponent()===t&&n.push(e.getId())});for(let t of n)e.doAction(T.deleteTab(t));let r=cn(e),i=r?e.getNodeById(r):null;i&&(i.getTabNodes()||[]).length||dn(e,!1)}function hn(e,{dirKey:t,groupId:n,task:r}={}){if(!e)return;let i=en(e,`progress`);if(!i)return;pn(e,`progress`);let a=i.getConfig()||{},o=n?{groupKey:n}:{dirKey:t||``};r!=null&&String(r)!==``&&(o.task=String(r)),JSON.stringify(a)!==JSON.stringify(o)&&(e.doAction(T.updateNodeAttributes(i.getId(),{config:o})),(t||n)&&dn(e,!0))}function gn(e,t=null){if(!e)return 0;let n=cn(e),r=[];e.visitNodes(e=>{if(e.getType()!==`tab`||t&&e.getId()===t)return;let i=e,a=i.getComponent();if(a===`sidebar`||on.includes(a||``))return;let o=i.getParent();if(!o||o.getType()!==`tabset`)return;let s=o.getId();s===`ts_sidebar`||n&&s===n||(typeof i.getWindowId!=`function`||i.getWindowId()!==`float`)&&r.push(i.getId())});for(let t of r)e.doAction(T.deleteTab(t));return r.length}function _n(e){if(!e)return 0;let t=[];e.visitNodes(e=>{e.getType()===`tab`&&(e.getConfig()||{}).beside&&t.push(e.getId())});for(let n of t)e.doAction(T.deleteTab(n));return t.length}function vn(e,t){if(!e||!t)return!1;let n=e.getNodeById(t);if(!n)return!1;let r=cn(e),i=n.getParent&&n.getParent()?n.getParent().getId():``;if(r&&i===r)return!1;if(r)return e.doAction(T.moveNode(t,r,Xt(`center`),-1,!0)),!0;let a=e.getRootRow?e.getRootRow():null;return a?(e.doAction(T.moveNode(t,a.getId(),Xt(`right`),-1,!0)),!0):!1}function yn(e,t){if(!e)return null;let n=[];e.visitNodes(e=>{if(n.length||e.getType()!==`tab`||e.getComponent()!==t)return;let r=e.getParent();r&&r.getType()===`tabset`&&n.push(r)});let r=n[0];return r?r.getId():null}function bn(e,t){if(!e||!t)return null;let n=null;return e.visitNodes(e=>{n===null&&e.getType()===`tabset`&&e.getId()===t&&(n=e.getWeight())}),n}function xn(e,t,n){if(!e||!t)return!1;let r=!1;return e.visitNodes(e=>{r||e.getType()===`tabset`&&e.getId()===t&&(r=!0)}),r?(e.doAction(T.updateNodeAttributes(t,n)),!0):!1}function Sn(e){if(!e)return null;let t=yn(e,`sidebar`);if(t)return t;let n=e.getFirstTabSet&&e.getFirstTabSet(),r=n?n.getId():null;if(!r)return null;e.doAction(T.addTab({type:`tab`,id:`t_sidebar`,name:`目录`,component:`sidebar`,enableClose:!1},r,Xt(`left`),-1,!0));let i=yn(e,`sidebar`);return i&&xn(e,i,Yt(`expanded`)),i}function Cn(e){let t=e&&e.getActiveTabset();return t&&t.getSelectedNode()||null}var wn={SIDEBAR:`sidebar`,MAIN:`maincontent`,RIGHT:`rightSidebar`,FLOAT:`float`},Tn={sidebar:wn.SIDEBAR,dir:wn.MAIN,page:wn.MAIN,group:wn.MAIN,repos:wn.MAIN,overview:wn.MAIN,templates:wn.MAIN,doc:wn.MAIN,dag:wn.MAIN,compose:wn.MAIN,progress:wn.RIGHT,refs:wn.RIGHT,settings:wn.FLOAT},En=new Set([`sidebar`,`repos`,`overview`,`progress`,`refs`,`settings`]);function Dn(e){return Tn[e]||wn.MAIN}function On(e){return En.has(e)}var kn=e=>S.getByName(e);function An(e,t){let{component:n,name:r,config:i={}}=t||{};if(!e||!n)return{tabId:null,reused:!1};let a=an(e);if(!a)return{tabId:null,reused:!1};let o={...i,beside:!0},s=Qt(e,n,o);if(s)return e.doAction(T.selectTab(s.getId())),r&&s.getName()!==r&&e.doAction(T.renameTab(s.getId(),r)),{tabId:s.getId(),reused:!0};_n(e),e.doAction(T.addTab({type:`tab`,name:r||n,component:n,config:o,enableClose:!0},a,kn(`right`),-1,!0));let c=Qt(e,n,o);return{tabId:c?c.getId():null,reused:!1}}function jn(e,t){let{component:n,config:r={}}=t,i=t.name??void 0;if(!e)return{tabId:null,reused:!1};let a=t.area||Dn(n),o=Qt(e,n,r);if(o)return e.doAction(T.selectTab(o.getId())),i&&o.getName()!==i&&e.doAction(T.renameTab(o.getId(),i)),a===wn.RIGHT&&(vn(e,o.getId()),dn(e,!0)),a===wn.MAIN&&(n===`page`||n===`dir`)&&hn(e,{dirKey:r.dirKey,groupId:r.groupId,task:r.task}),{tabId:o.getId(),reused:!0};if(a===wn.RIGHT&&On(n)){pn(e,n);let t=en(e,n);if(t)return e.doAction(T.updateNodeAttributes(t.getId(),{config:r})),e.doAction(T.selectTab(t.getId())),i&&t.getName()!==i&&e.doAction(T.renameTab(t.getId(),i)),vn(e,t.getId()),dn(e,!0),{tabId:t.getId(),reused:!0}}if(a===wn.MAIN){let a=an(e);if(!a)return{tabId:null,reused:!1};e.doAction(T.addTab({type:`tab`,name:i,component:n,config:r},a,kn(`center`),-1,!0));let o=Qt(e,n,r);return o&&!t._float&&gn(e,o.getId()),o&&!t._float&&(n===`page`||n===`dir`)&&hn(e,{dirKey:r.dirKey,groupId:r.groupId,task:r.task}),{tabId:o?o.getId():null,reused:!1}}if(a===wn.RIGHT){let t=cn(e);if(t){pn(e,n),dn(e,!0),e.doAction(T.addTab({type:`tab`,name:i,component:n,config:r},t,kn(`center`),-1,!0));let a=Qt(e,n,r);return{tabId:a?a.getId():null,reused:!1}}let a=e.getRootRow?e.getRootRow():null;if(a){e.doAction(T.addTab({type:`tab`,name:i,component:n,config:r},a.getId(),kn(`right`),-1,!0));let t=Qt(e,n,r);return dn(e,!0),{tabId:t?t.getId():null,reused:!1}}}if(a===wn.FLOAT)return Mn(e,{...t,component:n,name:i,config:r});let s=rn(e,[`sidebar`]);if(!s)return{tabId:null,reused:!1};let c=kn(t.location||`center`);e.doAction(T.addTab({type:`tab`,name:i,component:n,config:r},s,c,-1,!0));let l=Qt(e,n,r);return{tabId:l?l.getId():null,reused:!1}}function Mn(e,t){if(!e)return{tabId:null,reused:!1};let n=e,r=Qt(e,t.component,t.config||{});if(r)return e.doAction(T.selectTab(r.getId())),{tabId:r.getId(),reused:!0};let i=an(e);if(!i)return{tabId:null,reused:!1};let a=n.nextUniqueId(),o=[T.addTab({type:`tab`,id:a,name:t.name||t.component,component:t.component,config:t.config||{}},i,kn(`center`),-1,!0),T.popoutTab(a,`float`)];e.doAction(T.group(o));let s=typeof window<`u`?window.innerWidth:1280,c=typeof window<`u`?window.innerHeight:800,l=Math.min(760,Math.max(560,s-160)),u=Math.min(700,Math.max(460,c-160));for(let[,t]of n.getLayouts()){if(t.getType()!==`float`)continue;let n=t.getRect(),r=new b(Math.round(n.x+(n.width-l)/2),Math.round(n.y+(n.height-u)/2),l,u);e.doAction(T.moveFloat(t.getLayoutId(),r))}return{tabId:a,reused:!1}}export{l as C,_e as S,Yt as _,mn as a,Wt as b,tn as c,Sn as d,xn as f,Jt as g,qt as h,Cn as i,en as l,bn as m,Mn as n,fn as o,yn as p,jn as r,Zt as s,An as t,Qt as u,T as v,s as w,me as x,S as y};