@co0ontty/wand 4.102.0 → 4.103.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.
- package/dist/ai-team-live.js +1 -1
- package/dist/apns-client.d.ts +45 -0
- package/dist/apns-client.js +156 -0
- package/dist/apns-service.d.ts +29 -0
- package/dist/apns-service.js +156 -0
- package/dist/build-info.json +3 -3
- package/dist/conversation-service.d.ts +2 -0
- package/dist/conversation-service.js +23 -3
- package/dist/conversation-types.d.ts +2 -0
- package/dist/dingtalk-auth.d.ts +41 -0
- package/dist/dingtalk-auth.js +127 -0
- package/dist/dingtalk-dws.d.ts +45 -0
- package/dist/dingtalk-dws.js +240 -0
- package/dist/dingtalk-service.d.ts +100 -0
- package/dist/dingtalk-service.js +865 -0
- package/dist/dingtalk-stream.d.ts +24 -0
- package/dist/dingtalk-stream.js +115 -0
- package/dist/dingtalk-types.d.ts +138 -0
- package/dist/dingtalk-types.js +1 -0
- package/dist/employee-knowledge.js +8 -0
- package/dist/live-activity-service.d.ts +26 -0
- package/dist/live-activity-service.js +158 -0
- package/dist/live-activity-state.d.ts +37 -0
- package/dist/live-activity-state.js +108 -0
- package/dist/middleware/api-scope.js +2 -0
- package/dist/pi-cli-checkpoint.d.ts +17 -0
- package/dist/pi-cli-checkpoint.js +10 -0
- package/dist/pi-event-projection.js +13 -0
- package/dist/pi-execution.js +2 -1
- package/dist/pi-protocol-reader.d.ts +6 -2
- package/dist/pi-protocol-reader.js +36 -12
- package/dist/pi-tmux-host.d.ts +1 -1
- package/dist/pi-tmux-host.js +28 -8
- package/dist/pi-tool-result-preview.d.ts +23 -0
- package/dist/pi-tool-result-preview.js +185 -0
- package/dist/render-daemon-client.js +1 -1
- package/dist/render-host.d.ts +3 -3
- package/dist/render-host.js +3 -3
- package/dist/server-apns-routes.d.ts +12 -0
- package/dist/server-apns-routes.js +111 -0
- package/dist/server-dingtalk-routes.d.ts +8 -0
- package/dist/server-dingtalk-routes.js +35 -0
- package/dist/server.js +49 -3
- package/dist/session-completion.d.ts +2 -1
- package/dist/session-completion.js +6 -2
- package/dist/session-registry.d.ts +3 -1
- package/dist/session-registry.js +3 -1
- package/dist/storage/apns-repository.d.ts +52 -0
- package/dist/storage/apns-repository.js +108 -0
- package/dist/storage/conversations-repository.d.ts +2 -0
- package/dist/storage/conversations-repository.js +10 -0
- package/dist/storage/dingtalk-repository.d.ts +20 -0
- package/dist/storage/dingtalk-repository.js +75 -0
- package/dist/storage/live-activity-repository.d.ts +68 -0
- package/dist/storage/live-activity-repository.js +117 -0
- package/dist/storage/migrations.js +22 -0
- package/dist/storage/sessions-repository.d.ts +5 -0
- package/dist/storage/sessions-repository.js +43 -1
- package/dist/storage-schema.js +2 -0
- package/dist/storage.d.ts +7 -1
- package/dist/storage.js +10 -0
- package/dist/structured-exec-host.d.ts +9 -1
- package/dist/structured-exec-pump.d.ts +11 -0
- package/dist/structured-exec-pump.js +27 -8
- package/dist/structured-pi-adapter.js +5 -0
- package/dist/structured-runner.d.ts +2 -0
- package/dist/structured-session-manager.d.ts +2 -0
- package/dist/structured-session-manager.js +51 -4
- package/dist/types.d.ts +7 -0
- package/dist/web-ui/content/module-manifest.json +1 -1
- package/dist/web-ui/content/modules/{4f30a913cc5b3f89 → 02fad74223254019}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{acb21c7e7fd6cb67 → 033e0a741edd2ba1}/page.js +1 -1
- package/dist/web-ui/content/modules/{e61136c22675ec7d → 0c04f94bbfd39a2f}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{119874145414688d → 12e91deb96ace24d}/shell-file-panel-drawer.js +1 -1
- package/dist/web-ui/content/modules/15279373f0e1461f/host.js +1 -0
- package/dist/web-ui/content/modules/{78a46adbf9807f89 → 17603a34d545c784}/chunk.js +1 -1
- package/dist/web-ui/content/modules/1f041aa8d3673d93/chunk.js +1 -0
- package/dist/web-ui/content/modules/{96dd661559b67ebf → 20483d6e57cfe9d7}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{f55031a02775c89e → 217595f72a1c3fc5}/chunk.js +1 -1
- package/dist/web-ui/content/modules/2230c51655163cf3/runtime.js +279 -0
- package/dist/web-ui/content/modules/{82e40fdf0abfb8cd → 2460e872ab3a1f37}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{9e754b01fa4207fb → 2a47853ca7752c1f}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{e95b60ab18a79499 → 2afbc201474adacc}/login-visual.js +1 -1
- package/dist/web-ui/content/modules/{38917c19e2cf1702 → 30169d15cea782f0}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{5513bcbacdf44588 → 37abb74d1a0a0791}/notice-view.js +1 -1
- package/dist/web-ui/content/modules/{b62294e53dcb3147 → 38bb024e09cb5d5d}/host.js +1 -1
- package/dist/web-ui/content/modules/39faef0cffbad28e/home.js +6 -0
- package/dist/web-ui/content/modules/3a2fa12c8b537964/chunk.js +1 -0
- package/dist/web-ui/content/modules/{35a8fd2cfd31d7a0 → 3a72b79418f0f80a}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{321bd9c755bc30fc → 3bd3c84c4257ba0d}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{2981483671797b92 → 3d10e3f6f6f92b55}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{6f341fe3e8aee844 → 3d4451bc069c1498}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{4a9a3e1f87b2c32b → 3d5c498522b48225}/dialog-modal.js +1 -1
- package/dist/web-ui/content/modules/426b8133daebff78/host.js +1 -0
- package/dist/web-ui/content/modules/455436229dc57d7f/sidebar-peek.js +1 -0
- package/dist/web-ui/content/modules/46de3c2e2ca680c1/host.js +1 -0
- package/dist/web-ui/content/modules/47af6b35e1d01ea7/host.js +30 -0
- package/dist/web-ui/content/modules/4841e45cb7c5cc67/queue-view-adapter.js +3 -0
- package/dist/web-ui/content/modules/{47419445e0aaa3cc → 497789a07177ed7b}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{32c461164a1b364c → 5472191457a926d3}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{c152782274c04fad → 55a47b6e2c2016f2}/chunk.js +1 -1
- package/dist/web-ui/content/modules/5743d8116d15696b/employee-card.js +1 -0
- package/dist/web-ui/content/modules/{c81a3d95b14cdcd4 → 578703196f82222d}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{8ce71665ae55ccf1 → 57d68f0a47e8fd7c}/toast-region.js +1 -1
- package/dist/web-ui/content/modules/58866143a3365521/chunk.js +1 -0
- package/dist/web-ui/content/modules/{3601736ae2d678ef → 5bb5db89a343817f}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{a098c7b1aa4e2f6b → 5c9e8245d4a8a312}/sha256.js +1 -1
- package/dist/web-ui/content/modules/{8198bfd269c0caca → 5de35db482fb1a42}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{aab92f2990a7185f → 5e7104e569359449}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{4b9deeeb77570db3 → 601a2767ae24d1cb}/chunk.js +1 -1
- package/dist/web-ui/content/modules/6687ad7aa57f443b/task-board-host.js +22 -0
- package/dist/web-ui/content/modules/{c422f47fd13dc4bc → 684db83476dcba20}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{cf715621edb1d12e → 6b0bafa239dfe4e2}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{cd22aa55f6cc5276 → 6bd6ee3c9f05e2f5}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{09ef1bb1d195d727 → 79b0c18f2bf35740}/host.js +1 -1
- package/dist/web-ui/content/modules/{905f8bc3f8a3efb8 → 7ae83a3f06f2daa3}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{84b79a33c64e146c → 7f32261c1627c3cd}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{eece3c2d2374e8f7 → 805b859b1b76ce4d}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{eecaebc5482ee203 → 84358b5b729cbe48}/chunk.js +1 -1
- package/dist/web-ui/content/modules/85181d84d5ce62b3/employee-profile.js +1 -0
- package/dist/web-ui/content/modules/87edd7cc79811bb8/composer-surface-adapter.js +1 -0
- package/dist/web-ui/content/modules/{b0254a2d3652a925 → 8ea498cf092dba30}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{a4af270960a39ea6 → 8f0d4e22c18a58b0}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{c72c4f1d47c3726d → 907dcf0ea5b5f23f}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{9f33acc1c4284e03 → 916021ce252882ca}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{98c14fc0474455a5 → 91ee32135a3582b0}/chunk.js +1 -1
- package/dist/web-ui/content/modules/92df279c40bc4218/host.js +1 -0
- package/dist/web-ui/content/modules/{544dc812abdfbbb8 → 9661b076f08e64b4}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{5c94fb2b7abcd1a5 → 97ef63ff1f0784d9}/chunk.js +1 -1
- package/dist/web-ui/content/modules/99e48e07517d3f83/dropdown-surface.js +1 -0
- package/dist/web-ui/content/modules/9eb83751622e2b97/chunk.js +10 -0
- package/dist/web-ui/content/modules/{7375574a2ea42740 → a1715be0f97c2479}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{456634525d44777d → a2be1fd01cf06837}/chunk.js +1 -1
- package/dist/web-ui/content/modules/a33666b143331cd6/workspace-window.js +1 -0
- package/dist/web-ui/content/modules/{b38924f45bfa71d6 → a41351130003e6bb}/chunk.js +1 -1
- package/dist/web-ui/content/modules/a59c83b5b5b85da2/host.js +1 -0
- package/dist/web-ui/content/modules/{a4dca2ffaf656d3c → a63f0b3d73d97e0b}/chunk.js +1 -1
- package/dist/web-ui/content/modules/a685793c5d9b90d1/chunk.js +1 -0
- package/dist/web-ui/content/modules/a750f4868304b089/host.js +1 -0
- package/dist/web-ui/content/modules/abfe4b88dcd89d88/host.js +1 -0
- package/dist/web-ui/content/modules/{15bcc550ef9fd5b7 → acda148b7423bdab}/host.js +1 -1
- package/dist/web-ui/content/modules/{ad1136919a65fc6e → af6ff78aeb782cf2}/host.js +1 -1
- package/dist/web-ui/content/modules/b32c9addcd31f54b/panel-host.js +1 -0
- package/dist/web-ui/content/modules/{b937f1a939618be9 → b358eaf2e45849a6}/host.js +1 -1
- package/dist/web-ui/content/modules/{476ff7911bce1a38 → b7aeeb22bf604ec7}/chunk.js +1 -1
- package/dist/web-ui/content/modules/bad2c42c7ddeab94/host.js +1 -0
- package/dist/web-ui/content/modules/{622a8d12c4c622bf → bb59e8cb4323bf06}/host.js +1 -1
- package/dist/web-ui/content/modules/{08c7b047195f138d → be497f1d39753979}/chunk.js +1 -1
- package/dist/web-ui/content/modules/bfa8e2c827201374/chunk.js +1 -0
- package/dist/web-ui/content/modules/{5395fa57a47e9b96 → bfe51130a84795fb}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{8e29056fb56439f7 → c03e0f84f798d33a}/chunk.js +1 -1
- package/dist/web-ui/content/modules/c118e0c96bc023ee/host-bridge.js +1 -0
- package/dist/web-ui/content/modules/c3512b18c4c0e4ac/brand-identity.js +1 -0
- package/dist/web-ui/content/modules/c3e0de0a61f0db34/chunk.js +1 -0
- package/dist/web-ui/content/modules/{9d48d1ea3c9228bd → c3e1f083e07d6840}/library-bridge.js +1 -1
- package/dist/web-ui/content/modules/cd5e90a37ccdf2dc/group-editor.js +1 -0
- package/dist/web-ui/content/modules/{2edc19639ac1bd4b → cdb8281bb89da303}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{f6f86d43c12b0864 → ce90d0b55bbe6430}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{72b13a7486b6d437 → d274491ffc8ee646}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{b1d43ed06a5d1a57 → d3cc94cf4a47a12a}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{b0c4eed46c1b6ad4 → d4b07cef43d36e79}/chat-render.js +5 -4
- package/dist/web-ui/content/modules/{8a4f0ef2c0812af6 → d7b540917fb90755}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{ef7f76b551fdc619 → d856bfc56bea5f20}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{42c439d3acfe22bd → d857ea8244b1026e}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{36ce8123a2079807 → d9019922118b2c37}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{58836e616e6d12ff → d90e77f9f8d4f1ec}/workspaces-panel.js +1 -1
- package/dist/web-ui/content/modules/{4d4870f20eb1c52d → da1aa5fa0186fea7}/chunk.js +1 -1
- package/dist/web-ui/content/modules/de977ff0b3ad3882/progress.js +1 -0
- package/dist/web-ui/content/modules/{222f48948517167e → e01769df89873feb}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{5df1b522f5d3c99d → e0ab9fa5a8882433}/host.js +1 -1
- package/dist/web-ui/content/modules/e25dea52e13504b6/markdown.js +1 -0
- package/dist/web-ui/content/modules/{36bd608366c56b72 → e43af4aa407885fd}/chunk.js +1 -1
- package/dist/web-ui/content/modules/ee893f06cdb2b4f7/panel.js +1 -0
- package/dist/web-ui/content/modules/{f90f80d7207dff1f → f2bdbdc4a1141826}/host.js +1 -1
- package/dist/web-ui/content/modules/{e33f6d66a02ec26c → f36b4d3d44491852}/chunk.js +1 -1
- package/dist/web-ui/content/modules/{665e81fe210f1b7a → fa79ed5d045c24dd}/chunk.js +1 -1
- package/dist/web-ui/content/styles.css +1 -1
- package/dist/web-ui/embedded-assets.d.ts +412 -406
- package/dist/web-ui/embedded-assets.js +4 -4
- package/package.json +1 -1
- package/scripts/install-render-binary.js +1 -1
- package/dist/web-ui/content/modules/1a7303b87763fd43/employee-profile.js +0 -1
- package/dist/web-ui/content/modules/1d35739f634745f6/task-board-host.js +0 -22
- package/dist/web-ui/content/modules/2099d37d57856cbd/brand-identity.js +0 -1
- package/dist/web-ui/content/modules/2d6339b2f6c2e2d0/host.js +0 -1
- package/dist/web-ui/content/modules/2f88fc37c6105f7e/sidebar-peek.js +0 -1
- package/dist/web-ui/content/modules/31124fb7ee6939df/host.js +0 -1
- package/dist/web-ui/content/modules/31b28c5d0019c363/host-bridge.js +0 -1
- package/dist/web-ui/content/modules/36e5c3a6d6705358/employee-card.js +0 -1
- package/dist/web-ui/content/modules/3700d99c54d3c400/host.js +0 -1
- package/dist/web-ui/content/modules/3ae29086b227f9d9/markdown.js +0 -1
- package/dist/web-ui/content/modules/42db858e4417c702/chunk.js +0 -10
- package/dist/web-ui/content/modules/443dc81eac29f233/host.js +0 -1
- package/dist/web-ui/content/modules/4af10e1f8a789204/runtime.js +0 -275
- package/dist/web-ui/content/modules/55b75ebcf6924001/host.js +0 -30
- package/dist/web-ui/content/modules/626c7ce0aa1714b0/host.js +0 -1
- package/dist/web-ui/content/modules/76adde4019731df1/chunk.js +0 -1
- package/dist/web-ui/content/modules/7925b65867b7aa4a/queue-view-adapter.js +0 -3
- package/dist/web-ui/content/modules/8a6844a4251a1271/chunk.js +0 -1
- package/dist/web-ui/content/modules/8bd214570df4a7a0/host.js +0 -1
- package/dist/web-ui/content/modules/8bff85e108320aab/panel.js +0 -1
- package/dist/web-ui/content/modules/988e01b67e6f1883/composer-surface-adapter.js +0 -1
- package/dist/web-ui/content/modules/a975ff38c3d43ba8/workspace-window.js +0 -1
- package/dist/web-ui/content/modules/b550260fc9c5363a/dropdown-surface.js +0 -1
- package/dist/web-ui/content/modules/bce467c603299460/chunk.js +0 -1
- package/dist/web-ui/content/modules/c138b442c1682189/panel-host.js +0 -1
- package/dist/web-ui/content/modules/c32d14632487364f/group-editor.js +0 -1
- package/dist/web-ui/content/modules/c6d0a1b2753a4883/host.js +0 -1
- package/dist/web-ui/content/modules/cdff6e7f72879c88/progress.js +0 -1
- package/dist/web-ui/content/modules/cfee7b0d79587d59/home.js +0 -6
- package/dist/web-ui/content/modules/e5e93fe5304838a1/chunk.js +0 -1
- package/dist/web-ui/content/modules/fbe35e7ddd7384fa/host.js +0 -1
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
const __wandCssTextPool = Object.freeze([":root{--wand-page-inset:20px;--wand-page-title-size:18px;--wand-page-toolbar-height:36px;--wand-page-header-height:56px}@media(max-width:639px){:root{--wand-page-inset:12px}}#overlay-root{isolation:isolate;position:fixed;inset:0;z-index:20000;pointer-events:none}.wand-ui-mount{display:contents}.wand-ui-portals{position:fixed;inset:0;pointer-events:none}.wand-ui-portals :is(.ant-modal-wrap,.ant-dropdown,.ant-dropdown-menu-submenu-popup,.ant-select-dropdown,.ant-popover,.ant-notification-notice){pointer-events:auto}.wand-ui-dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.wand-ui-dialog-content .ant-modal-body{max-height:calc(100dvh - 180px - var(--wand-safe-top,0px) - var(--wand-safe-bottom,0px));overflow:auto;overscroll-behavior:contain}.wand-ui-dialog-title{font-size:var(--wand-page-title-size);font-weight:600;line-height:1.4}.wand-ui-dialog-description{white-space:pre-wrap;font-weight:400;font-size:13px;line-height:1.55;color:var(--text-secondary);padding-top:4px}.wand-ui-dialog-content .wand-dialog-sticky-actions{position:sticky;bottom:0;z-index:2;padding-block:12px;background:var(--bg-elevated);border-top:1px solid var(--border-subtle)}@media(max-width:639px){.wand-ui-dialog-content .ant-modal-body{max-height:calc(100dvh - 160px - var(--wand-safe-top,0px) - var(--wand-safe-bottom,0px))}}.wand-ui-dialog-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:20px}.wand-ui-switch-row{display:inline-flex;align-items:center;gap:9px}.wand-ui-menu{display:flex;flex-direction:column}.wand-ui-menu-item{justify-content:flex-start;width:100%}.wand-ui-menu-item-label{flex:1;min-width:0;text-align:start}.wand-ui-menu-item-hint,.wand-ui-dropdown-item-hint{margin-inline-start:auto}.wand-ui-badge{font-variant-numeric:tabular-nums;margin-inline-end:0}.wand-self-tag{margin-inline-start:6px;vertical-align:middle}.wand-ui-select-content{max-width:calc(100vw - var(--wand-safe-left, 0px) - var(--wand-safe-right, 0px) - 24px)}.wand-ui-select-content .ant-dropdown-menu{max-height:min(360px,60dvh);overflow-y:auto;overscroll-behavior:contain}.wand-ui-navigation-list{list-style:none;margin:0;padding:0}.wand-ui-navigation[data-orientation=horizontal] .wand-ui-navigation-list{display:flex}.wand-ui-navigation-link{height:auto;justify-content:flex-start;text-align:start}.wand-ui-stretch-tabs{position:relative;isolation:isolate}.wand-ui-stretch-tabs .ant-segmented-thumb{visibility:hidden}.wand-ui-stretch-tabs .ant-segmented-item-selected{background:transparent;box-shadow:none}.wand-ui-stretch-tabs .ant-segmented-item{position:relative;z-index:1}.wand-ui-stretch-indicator{position:absolute;z-index:0;top:2px;bottom:2px;border-radius:inherit;background:var(--bg-elevated, #fffdfa);box-shadow:var(--shadow-sm);pointer-events:none;transition:left var(--motion-indicator) var(--ease-in-out-smooth),width var(--motion-indicator) var(--ease-in-out-smooth)}\n","@keyframes wand-ui-fade-in{0%{opacity:0}to{opacity:1}}@keyframes wand-ui-fade-out{0%{opacity:1}to{opacity:0}}@keyframes wand-ui-dialog-in{0%{opacity:0;transform:translate(-50%,calc(-50% + 6px))}to{opacity:1;transform:translate(-50%,-50%)}}@keyframes wand-ui-dialog-out{0%{opacity:1;transform:translate(-50%,-50%)}to{opacity:0;transform:translate(-50%,calc(-50% + 4px))}}@keyframes wand-ui-scale-in{0%{opacity:0;transform:scale(.98)}to{opacity:1;transform:scale(1)}}@media(max-width:520px){.wand-ui-dialog-actions{flex-direction:column-reverse}.wand-ui-dialog-actions .wand-ui-button{width:100%}}\n","@media(prefers-reduced-motion:reduce){:is(.ant-dropdown,.ant-dropdown-menu-submenu-popup,.ant-popover,.ant-tooltip,.ant-picker-dropdown,.ant-select-dropdown){transition-property:none!important;animation-duration:.01ms!important;transform:none!important}.ant-modal{animation-duration:.01ms!important;transform:none!important}#overlay-root *,#overlay-root *:before,#overlay-root *:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n","@keyframes wand-settings-fade-in{0%{opacity:0}to{opacity:1}}\n",".wand-workspace-agent-model-select,.wand-new-session-model-select{width:100%}\n",".composer-config-select-host{display:inline-flex;flex:1 1 auto;min-width:0;max-width:100%}.wand-composer-select-trigger{width:100%;min-width:0}.wand-composer-select-trigger>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wand-composer-select-content{width:max-content;max-width:min(560px,calc(100vw - 28px));max-height:min(330px,var(--available-height));overflow:auto}.wand-composer-select-item{max-width:min(530px,calc(100vw - 48px))}.wand-composer-select-item .ant-dropdown-menu-title-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n","[data-pi-composer]{position:relative}[data-pi-settings-host]{position:absolute;inset-inline-start:0;bottom:calc(100% + 8px);width:min(640px,100%);z-index:55}[data-pi-settings-toggle-host]{display:contents}.input-composer:has(.permission-actions:not(.hidden)) [data-pi-settings-toggle-host]{display:none}.wand-pi-skill-switch:focus-visible{outline:2px solid var(--border-focus);outline-offset:2px;border-radius:var(--control-radius)}\n",".local-preview-link{color:var(--accent);text-decoration:underline;text-underline-offset:2px}.local-preview-link:hover{color:var(--accent-hover)}\n",".wand-media-stage.ant-btn{display:flex;align-items:center;justify-content:center;flex:1 1 auto;min-width:0;min-height:0;width:100%;height:100%;padding:12px;overflow:auto;white-space:normal;background-image:linear-gradient(45deg,var(--bg-tertiary) 25%,transparent 25%),linear-gradient(-45deg,var(--bg-tertiary) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--bg-tertiary) 75%),linear-gradient(-45deg,transparent 75%,var(--bg-tertiary) 75%);background-position:0 0,0 8px,8px -8px,-8px 0;background-size:16px 16px;cursor:zoom-in}.wand-media-stage .ant-image{display:flex;max-width:100%;max-height:100%}.wand-media-stage img{max-width:100%;max-height:100%;object-fit:contain}.wand-media-stage.zoomed{align-items:flex-start;justify-content:flex-start;cursor:zoom-out}.wand-media-stage.zoomed .ant-image,.wand-media-stage.zoomed img{max-width:none;max-height:none}.wand-image-viewer-caption{display:block;max-width:100%;overflow-wrap:anywhere;text-align:center}.wand-image-viewer :is(.ant-image-preview-close,.ant-image-preview-switch,.ant-image-preview-actions-action){min-width:44px;min-height:44px}.wand-image-viewer.ant-image-preview .ant-image-preview-switch:not(:disabled){background:var(--bg-terminal)}.wand-image-viewer .ant-image-preview-img{touch-action:none}.markdown-content img[role=button]{max-width:100%;max-height:360px;object-fit:contain;cursor:zoom-in}.markdown-content img[role=button]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}\n",".wand-plush-avatar{position:relative;display:inline-grid;flex:none;place-items:center;overflow:visible;isolation:isolate;vertical-align:middle;line-height:0}.wand-plush-avatar canvas,.wand-plush-avatar-fallback{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none}.wand-plush-avatar canvas{opacity:0}.wand-plush-avatar[data-renderer=webgl] canvas{opacity:1}.wand-plush-avatar[data-renderer=webgl] .wand-plush-avatar-fallback{visibility:hidden}.wand-avatar-file-fallback{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.wand-plush-avatar[data-renderer=webgl] .wand-avatar-file-fallback{visibility:hidden}\n",".wand-avatar-editor{min-width:0}.wand-avatar-editor-summary{flex-wrap:wrap}.wand-avatar-editor-trigger.ant-btn{flex:0 0 44px;width:44px;height:44px;padding:0;position:relative;overflow:visible}.wand-avatar-edit-mark{position:absolute;bottom:0;right:-2px;display:grid;place-items:center;width:16px;height:16px;border-radius:5px;background:var(--bg-elevated);color:var(--text-secondary);border:1px solid var(--border-subtle)}.wand-avatar-upload-hint{display:block;margin-top:4px;font-size:11px}.wand-avatar-options:disabled{opacity:.65}.wand-avatar-options:disabled input{cursor:default}.wand-avatar-editor-caption{font-size:12px}.wand-avatar-sculpt{display:grid;grid-template-columns:172px minmax(0,1fr);gap:12px 18px;margin-top:12px;padding:14px;background:var(--bg-elevated);border:1px solid var(--border-subtle);border-radius:8px}.wand-avatar-sculpt-preview{min-width:0;align-self:center;display:flex;flex-direction:column;align-items:center;gap:5px}.wand-avatar-sculpt-preview>.ant-typography{font-size:11px}.wand-avatar-sculpt-preview>.ant-btn{font-size:12px}.wand-avatar-sculpt-controls{display:flex;flex-direction:column;gap:10px;min-width:0}.wand-avatar-options{margin:0;padding:0;border:0;min-width:0}.wand-avatar-options legend{display:flex;gap:8px;align-items:baseline;width:100%;margin:0 0 5px;padding:0;font-size:12px;color:var(--text-primary)}.wand-avatar-options legend>span{color:var(--text-secondary);font-size:11px}.wand-avatar-option-row{display:flex;flex-wrap:wrap;gap:4px}.wand-avatar-option{position:relative;width:32px;height:32px;cursor:pointer;display:grid;place-items:center}.wand-avatar-option input{appearance:none;position:absolute;margin:0;inset:0;width:100%;height:100%;border-radius:6px;border:1px solid transparent;background:transparent;cursor:pointer}.wand-avatar-option input:hover{background:var(--bg-hover)}.wand-avatar-option input:checked{background:var(--accent-muted);border-color:var(--primary)}.wand-avatar-option input:focus-visible{outline:2px solid var(--border-focus);outline-offset:2px}.wand-avatar-option-mark{width:22px;height:22px;display:grid;place-items:center;color:var(--text-secondary);pointer-events:none;position:relative}.wand-avatar-option-mark svg{width:20px;height:20px;fill:var(--text-secondary);stroke:currentColor;stroke-width:1.4;stroke-linejoin:round;stroke-linecap:round}.wand-avatar-color{width:18px;height:18px;border-radius:50%;box-shadow:inset 0 0 0 1px #0000001f}.wand-avatar-option-name{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.wand-avatar-sculpt-footer{grid-column:1/-1;padding-top:10px;border-top:1px solid var(--border-subtle)}.wand-avatar-sculpt-footer>.ant-typography{font-size:11px}@media(max-width:600px){.wand-avatar-sculpt{grid-template-columns:minmax(0,1fr);gap:12px;padding:12px}.wand-avatar-sculpt-preview{flex-direction:row;flex-wrap:wrap;justify-content:center}.wand-avatar-sculpt-preview>[data-plush-avatar]{flex:0 0 140px}.wand-avatar-sculpt-preview>.ant-typography{display:none}.wand-avatar-sculpt-controls{display:grid;grid-template-columns:1fr 1fr;gap:10px}.wand-avatar-options:nth-child(-n+2){grid-column:1/-1}.wand-avatar-editor-summary>.ant-btn{padding-inline:6px}}@media(pointer:coarse){.wand-avatar-option{width:44px;height:44px}.wand-avatar-option-row{gap:2px}}@media(forced-colors:active){.wand-avatar-option input:checked{border-color:Highlight}.wand-avatar-color{border:1px solid CanvasText}}\n",".sidebar-session-preview{display:grid;grid-template-rows:1fr;opacity:1;min-width:0;transition:grid-template-rows var(--motion-normal) var(--ease-out-expo),opacity var(--motion-fast) var(--ease-in-out-smooth)}.sidebar-session-preview[data-expanded=true]{grid-template-rows:0fr;opacity:0}.sidebar-session-preview-clip{min-height:0;min-width:0;overflow:hidden}.sidebar-session-preview-row{display:flex;align-items:center;gap:4px;min-width:0;padding:2px 4px 6px;overflow:hidden}.sidebar-session-preview .sidebar-session-tag.ant-btn{flex:none;width:36px;min-width:36px;height:28px;padding:0;gap:4px;border-radius:var(--radius-xs);color:var(--text-secondary);background:var(--sidebar-surface,var(--bg-surface));border:1px solid var(--border-subtle)}.sidebar-session-preview .sidebar-session-tag[data-titles=true]{width:auto;padding-inline:6px}.sidebar-session-preview .sidebar-session-tag[aria-pressed=true],.sidebar-session-preview .sidebar-session-more.ant-btn[data-contains-current=true]{background:var(--sidebar-selected,var(--bg-active));color:var(--sidebar-accent,var(--text-link));border-color:var(--sidebar-selected,var(--border-subtle))}.sidebar-session-preview :is(.sidebar-session-tag,.sidebar-session-more):focus-visible{outline:2px solid var(--sidebar-accent,var(--border-focus));outline-offset:-2px}.sidebar-session-preview .sidebar-session-more.ant-btn{flex:none;width:auto;min-width:0;max-width:100%;height:28px;padding:0 6px;font-size:11px;font-variant-numeric:tabular-nums;border-radius:var(--radius-xs);color:var(--text-secondary);background:var(--sidebar-surface,var(--bg-surface));border:1px solid var(--border-subtle)}.sidebar-session-tag-content{display:inline-flex;align-items:center;gap:4px}.sidebar-session-tag-title{font-size:11px;line-height:16px;white-space:nowrap}.sidebar-session-preview .sidebar-provider-mark{flex:none}.sidebar-session-preview .sidebar-provider-mark>svg{width:100%;height:100%}.sidebar-session-preview-status{display:inline-flex;align-items:center;justify-content:center;width:8px;height:8px;flex:none;line-height:0}.sidebar-session-preview-status .ant-badge{line-height:0}.sidebar-session-preview-status .ant-badge-status-dot{width:5px;height:5px}.sidebar-session-preview-measure-clip{position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;pointer-events:none}.sidebar-session-preview-measure{display:flex;width:max-content;gap:4px}.sidebar-session-preview-measure-clip .sidebar-session-more.ant-btn{max-width:none}.sidebar-session-preview-task{margin-inline-start:20px}.sidebar-session-preview-person{margin-inline-start:28px}@media(pointer:coarse){.sidebar-session-preview :is(.sidebar-session-tag,.sidebar-session-more).ant-btn{height:36px}}@media(prefers-reduced-motion:reduce){.sidebar-session-preview{transition:none}}\n",".sidebar-session-area{display:grid;grid-template-columns:24px minmax(0,1fr);align-items:start;min-width:0}.sidebar-session-area[data-empty]{min-height:36px}.sidebar-session-area .sidebar-session-area-toggle.ant-btn{width:24px;min-width:24px;height:28px;padding:0;margin-block-start:2px;color:var(--text-secondary)}.sidebar-session-area-content{min-width:0}.sidebar-session-area[data-inline-toggle]{display:block;padding-inline-start:18px}.sidebar-session-area-content>.sidebar-session-preview{margin-inline-start:0}.sidebar-session-area-content .conversation-person-sessions,.sidebar .sidebar-session-area-content .im-sidebar-group-inner,.sidebar .sidebar-session-area-content .workspace-task-sessions{margin-inline-start:0}@media(pointer:coarse),(max-width:640px){.sidebar-session-area{grid-template-columns:36px minmax(0,1fr)}.sidebar-session-area[data-empty]{min-height:44px}.sidebar-session-area .sidebar-session-area-toggle.ant-btn{width:32px;min-width:32px;height:44px;margin-block-start:0}}\n",".sidebar-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.workspaces-panel{position:relative}.sidebar-navigation-rail{width:56px;flex:none;min-height:0;padding:8px 4px;border-inline-end:1px solid var(--border-subtle);background:var(--sidebar-rail)}.sidebar-rail-scroll{width:100%;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.sidebar-rail-scroll>.sidebar-brand-mark{display:block;margin:8px auto 16px}.sidebar-list-panel{flex:1;min-width:0;min-height:0}.sidebar-list-panel[hidden]{display:none}.sidebar.context-rail .sidebar-navigation-rail{border-inline-end:1px solid var(--border-subtle)}.sidebar-navigation-rail :is(.wand-ui-icon-button,.sidebar-list-error,[data-daemon-update-status]){width:44px;min-width:44px;height:44px;padding:0;flex:none}.sidebar .conversation-navigation .wand-ui-icon-button{height:48px;display:flex;flex-direction:column;gap:3px;border-radius:var(--control-radius);color:var(--text-secondary)}.sidebar .conversation-navigation .wand-ui-icon-button[aria-current=page]{color:var(--sidebar-accent);background:var(--sidebar-selected)}.sidebar-nav-icon{display:flex;height:20px;align-items:center;justify-content:center}.sidebar-nav-label{font-size:10px;line-height:14px;font-weight:500}.sidebar:focus-visible{outline:2px solid var(--sidebar-accent);outline-offset:-2px}.sidebar .wand-ui-button:focus-visible{outline:2px solid var(--sidebar-accent);outline-offset:2px}.sidebar-list-panel{background:var(--sidebar-surface);border-inline-end:1px solid var(--border-subtle)}.sidebar-rail-notices{margin-block:12px 4px;padding-block-start:12px;border-block-start:1px solid var(--border-subtle)}.sidebar .sidebar-profile-button{margin-block-start:8px;display:flex;flex-direction:column;gap:3px;color:var(--text-secondary)}.sidebar-notification-content{width:min(280px,calc(100vw - 64px));max-height:min(480px,65dvh);overflow:auto}.sidebar .conversation-navigation{width:100%}.sidebar:not(.collapsed) .conversation-navigation>.wand-ui-stretch-tabs,.sidebar:not(.collapsed) .conversation-navigation .ant-segmented{width:100%}.sidebar:not(.collapsed) .conversation-navigation .ant-segmented-group{display:flex}.sidebar:not(.collapsed) .conversation-navigation .ant-segmented-item{flex:1;text-align:center}.sidebar .sidebar-body{overscroll-behavior:contain;scrollbar-gutter:stable}.sidebar-header-primary{min-height:32px}.sidebar-header-main{min-width:0}.sidebar-header-actions{flex-shrink:0}.sidebar-compact-toggle-label,.conversation-create-label{display:none}.sidebar-header-actions :is(.sidebar-more-trigger,.sidebar-compact-toggle,.sidebar-close,.conversation-create-button){width:32px;min-width:32px;height:32px;padding:0}.sidebar-title{font-size:15px;letter-spacing:0}.sidebar-compact-toggle[aria-pressed=true] .sidebar-collapse-direction{transform:rotate(180deg)}.sidebar-new-task.ant-btn{height:34px;font-size:13px}.sidebar-status:empty{display:none}.sidebar-footer-actions{min-width:0}.sidebar-footer:has(#back-to-native-button,#switch-server-button){flex-wrap:wrap}.sidebar .conversation-list-tools,.sidebar-presentation-tools{position:sticky;top:0;z-index:2;background:var(--sidebar-surface)}.sidebar-search-slot{display:grid;flex:1;min-width:0;align-items:center;min-height:32px}.sidebar-list-title,.sidebar-search-expand{grid-area:1 / 1;min-width:0;transition:opacity var(--motion-fast) var(--ease-in-out-smooth),visibility var(--motion-fast) var(--ease-in-out-smooth)}.sidebar-search-expand{opacity:0;pointer-events:none}.is-searching .sidebar-search-expand{opacity:1;pointer-events:auto}.is-searching .sidebar-list-title{opacity:0;visibility:hidden}.sidebar-search-input input::-webkit-search-cancel-button{display:none}.sidebar-disclosure-chevron{display:inline-flex;flex-shrink:0;transform:rotate(-90deg);transition:transform var(--motion-fast) var(--ease-in-out-smooth)}.sidebar-disclosure-chevron[data-open=true]{transform:rotate(0)}.sidebar .workspace-row-main{min-height:48px}.sidebar .workspace-row-title{font-size:13px;font-weight:600}.sidebar .workspace-row-path{display:block;max-width:100%;line-height:1.5}.sidebar .workspace-row-count,.sidebar .workspace-task-count,.sidebar .im-sidebar-group-count{color:var(--text-secondary);font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap;flex-shrink:0}.sidebar .workspace-row-count{min-width:2ch;text-align:end}.sidebar .sidebar-head-activity,.sidebar .im-sidebar-group-attention-slot{width:12px;flex:none;display:inline-flex;justify-content:center}.sidebar .wand-sidebar-group-toggle{min-height:48px;padding:6px}.sidebar .im-sidebar-group-title{min-width:0;font-size:13px;font-weight:600}.sidebar .im-sidebar-group-meta{display:inline-flex;align-items:center;gap:4px;flex:none}.sidebar .im-sidebar-group-action{display:inline-flex;flex:none}.sidebar .sidebar-recent-add{width:28px;min-width:28px;height:32px;padding:0}.sidebar .im-sidebar-group-inner{margin-inline-start:8px;border-inline-start:1px solid var(--border-subtle)}.sidebar .sidebar-group-empty,.sidebar .sidebar-filter-empty{margin:0;padding:6px;font-size:12px;line-height:1.5}.sidebar .workspace-tasks{margin-inline-start:8px;border-inline-start:1px solid var(--border-subtle)}.sidebar .workspace-task-sessions{margin-inline-start:6px;border-inline-start:1px solid var(--border-subtle)}.sidebar .workspace-task-main,.sidebar .workspace-session-main{min-height:36px}.sidebar .workspace-task-main{flex:1 1 0;min-width:0;overflow:hidden}.sidebar .workspace-task-name{font-size:13px;white-space:nowrap}.sidebar .workspace-task-disclosure-slot{width:20px;height:32px;flex:none;display:inline-flex;align-items:center}.sidebar .workspace-task-disclosure.ant-btn{width:20px;min-width:20px;height:32px;padding:0;color:var(--text-secondary)}.sidebar .sidebar-task-status{display:inline-flex;align-items:center;justify-content:flex-end;gap:3px;flex:0 0 auto;min-width:4em;white-space:nowrap;word-break:keep-all;font-size:12px;line-height:18px;color:var(--text-secondary)}.sidebar .sidebar-task-status>*{flex:none;white-space:nowrap}.sidebar .sidebar-task-status.tone-accent{color:var(--success)}.sidebar .sidebar-task-status.tone-warning{color:var(--warning)}.sidebar .sidebar-task-status.tone-success{color:var(--success)}.sidebar .workspace-task-children{margin-inline-start:8px;padding-inline-start:8px;border-inline-start:1px solid var(--border-subtle)}.sidebar .workspace-session-name{font-size:13px}.sidebar .workspace-session-kind{color:var(--text-secondary);font-size:11px}.sidebar .workspace-loose-label{display:block;padding:8px 6px 4px;font-size:12px}.sidebar .workspace-loose-session-list{display:flex;flex-direction:column;gap:2px}.sidebar .sidebar-list-title{font-size:12px;color:var(--text-secondary)}.sidebar .sidebar-view-switch .ant-segmented-item-label{padding-inline:8px;font-size:12px}.sidebar .sidebar-body{scroll-padding-block:100px 12px}.sidebar :is(.workspace-task-action,.workspace-task-chevron-btn){width:28px;min-width:28px;height:32px;padding:0;flex-shrink:0}.sidebar-menu-heading{display:grid;gap:2px;min-width:0;padding-block:2px}.sidebar-menu-heading strong,.sidebar-menu-heading span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-menu-heading strong{color:var(--text-primary);font-weight:var(--font-weight-semibold)}.sidebar-menu-heading span{color:var(--text-secondary);font-size:var(--font-size-xs)}.sidebar-menu-error{color:var(--danger);white-space:normal;overflow-wrap:anywhere}:is(.sidebar-row-menu,.sidebar-menu-submenus) .ant-dropdown-menu{max-width:min(288px,calc(100vw - 24px))}.sidebar-menu-submenus .ant-dropdown-menu-submenu-popup{min-width:min(224px,calc(100vw - 24px));max-width:min(288px,calc(100vw - 24px))}.sidebar-menu-submenus .ant-dropdown-menu{max-height:min(360px,calc(100dvh - 24px));overflow-y:auto;overscroll-behavior:contain}:is(.sidebar-row-menu,.sidebar-menu-submenus) :is(.ant-dropdown-menu-item,.ant-dropdown-menu-submenu-title){height:auto;min-height:32px}.sidebar [data-sidebar-menu-open=true]{border-radius:var(--control-radius);background:var(--sidebar-selected)}.sidebar .sidebar-footer-actions{align-items:center}.sidebar .conversation-search-host{padding:0 4px 10px}.sidebar .conversation-search-input{min-height:34px;font-size:12px;background:var(--bg-surface)}.sidebar .conversation-list-section{padding:0 4px 10px;gap:6px}.sidebar .conversation-list-count{padding-inline:2px;color:var(--text-secondary)}.sidebar .conversation-row:hover,.sidebar .conversation-row:focus-within{background:var(--sidebar-hover)}.sidebar .conversation-row[aria-current=page]{background:var(--sidebar-selected)}.sidebar .conversation-row[aria-current=page] .conversation-row-title{color:var(--sidebar-accent)}.sidebar .conversation-row-open.ant-btn:hover{color:inherit;background:transparent}.sidebar .conversation-row-time{color:var(--text-secondary)}.conversation-person-sessions{margin-inline-start:28px;border-inline-start:1px solid var(--border-subtle);padding-inline-start:4px;min-width:0;max-height:min(45dvh,360px);overflow-y:auto;overscroll-behavior:contain}.sidebar .im-sidebar-group:has(.sidebar-session-preview) .im-sidebar-group-inner{max-height:min(45dvh,360px);overflow-y:auto;overscroll-behavior:contain}.conversation-person-sessions .wand-sidebar-session-row{min-height:44px}.sidebar :is(.workspace-session-main,.workspace-task-main,.wand-sidebar-session-row)[aria-current=page],.sidebar .wand-sidebar-session-row.active{color:var(--sidebar-accent);background:var(--sidebar-selected)}.sidebar .conversation-navigation .wand-ui-icon-button:hover{background:var(--sidebar-hover)}.sidebar .conversation-navigation .wand-ui-icon-button[aria-current=page]{background:var(--sidebar-selected)}.sidebar .conversation-navigation .wand-ui-icon-button[aria-current=page]:before{content:\"\";position:absolute;inset-inline-start:0;inset-block:14px;width:2px;border-radius:2px;background:var(--sidebar-accent)}.sidebar .conversation-list-filter{flex:1;min-width:0}.sidebar .conversation-list-filter .ant-segmented-item-label{padding-inline:6px}.sidebar .conversation-list-filter .ant-segmented-item-selected{color:var(--sidebar-accent)}.sidebar .sidebar-activity-filter.ant-btn{flex:none;width:48px;height:28px;padding:0;border-radius:var(--radius-full);font-size:12px;color:var(--text-secondary);background:transparent;border-color:var(--border-subtle)}.sidebar .sidebar-activity-filter.ant-btn[aria-pressed=true]{color:var(--sidebar-accent);background:var(--sidebar-selected);border-color:color-mix(in srgb,var(--sidebar-accent) 45%,var(--border-subtle))}.sidebar .conversation-search-input:focus-within{border-color:var(--sidebar-accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--sidebar-accent) 14%,transparent)}.sidebar.collapsed .conversation-row{justify-content:center;padding:6px 0;min-height:48px}.sidebar.collapsed .sidebar-body{scrollbar-gutter:auto}@media(pointer:coarse),(max-width:640px){.sidebar-header-actions :is(.sidebar-compact-toggle,.sidebar-close,.conversation-create-button){width:44px;min-width:44px;height:44px}.sidebar-new-task.ant-btn{min-height:44px}.sidebar :is(.workspace-task-action,.workspace-task-chevron-btn){width:32px;min-width:32px;height:44px}.sidebar .workspace-task-main,.sidebar .workspace-session-main{min-height:44px}.sidebar .workspace-task-disclosure-slot{width:36px;height:44px}.sidebar .workspace-task-disclosure.ant-btn{width:36px;min-width:36px;height:44px}.sidebar .sidebar-activity-filter.ant-btn{min-height:44px}.sidebar .sidebar-recent-add{width:44px;min-width:44px;height:44px}:is(.sidebar-row-menu,.sidebar-menu-submenus) :is(.ant-dropdown-menu-item,.ant-dropdown-menu-submenu-title){min-height:44px}}@media(max-width:640px){:is(.sidebar-row-menu,.sidebar-menu-submenus) :is(.ant-dropdown-menu-item,.ant-dropdown-menu-submenu-title){min-height:44px}}@media(prefers-reduced-motion:reduce){.sidebar-list-title,.sidebar-search-expand,.sidebar-disclosure-chevron{transition:none}}.sidebar-full-list{opacity:1;visibility:visible;transition:opacity var(--motion-fast) var(--ease-in-out-smooth),visibility var(--motion-normal) var(--ease-in-out-smooth)}.workspaces-panel-compact .sidebar-full-list{position:absolute;inset:0 auto auto 0;opacity:0;visibility:hidden;pointer-events:none;transition:opacity var(--motion-quick-exit) var(--ease-in-out-smooth),visibility var(--motion-quick-exit) var(--ease-in-out-smooth)}.sidebar-projection-swap{position:relative}.sidebar-projection-current{opacity:1;transition:opacity var(--motion-fast) var(--ease-in-out-smooth)}.sidebar-projection-swap[data-entering=true] .sidebar-projection-current{opacity:0}.sidebar-projection-old{position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity var(--motion-quick-exit) var(--ease-in-out-smooth)}@starting-style{.sidebar-projection-old{opacity:1}}@media(prefers-reduced-motion:reduce){.sidebar-full-list,.sidebar-projection-current,.sidebar-projection-old{transition:none}}.wand-workspace-manage-check{display:inline-flex;flex:none;margin-inline-end:6px;pointer-events:none}.wand-sidebar-modal-form{display:grid;gap:16px}.wand-sidebar-modal-body{min-width:0;max-height:64dvh;overflow:auto}.wand-sidebar-modal-footer{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.wand-task-create-input{width:100%}.wand-subject-provider{width:20px;height:20px;flex:none}.wand-workspace-tabs{flex:1;min-width:0}.wand-workspace-tab-label{display:inline-flex;align-items:center;gap:6px;max-width:240px}.wand-workspace-tab-label>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:640px){.wand-workspace-tab-label{max-width:96px}[data-session-tabs=task] .wand-workspace-tabs .ant-tabs-tab-remove{display:none}}.wand-attention-list{display:flex;flex-direction:column;gap:2px;margin:0;padding:0;list-style:none}.wand-attention-item{width:100%;height:auto;white-space:normal;text-align:start;justify-content:flex-start}.wand-attention-item strong,.wand-attention-item span{overflow-wrap:anywhere}.home-attention.is-sidebar{max-height:min(50dvh,520px);overflow-y:auto;overscroll-behavior:contain}.blank-chat-attention{position:absolute;inset-block-start:24px;inset-inline-start:24px;z-index:1}.wand-worktree-selection{display:flex;align-items:flex-start;width:100%;margin-block:8px}@media(prefers-reduced-motion:no-preference){#sessions-drawer.sidebar-refined[role=dialog]:not([data-drawer-gesture=active]){animation:sidebar-drawer-slide-in var(--motion-normal, .22s) cubic-bezier(.16,1,.3,1)}.drawer-backdrop.open:not([data-drawer-gesture=active]){animation:sidebar-backdrop-fade-in var(--motion-normal, .22s) cubic-bezier(.16,1,.3,1)}}@keyframes sidebar-drawer-slide-in{0%{transform:translate3d(-100%,0,0)}to{transform:translateZ(0)}}@keyframes sidebar-backdrop-fade-in{0%{opacity:0}to{opacity:1}}\n"]);
|
|
3
|
-
function uZ(e,t){return e.resources?.skills.includes(t)?e.lockedSkills?.includes(t)?"locked":"on":"off"}function cZ(e,t,r){let n=e.resources??{skills:[],mcpServers:[]},a=e.lockedSkills??[];return{resources:{...n,skills:r==="off"?n.skills.filter(o=>o!==t):[...new Set([...n.skills,t])]},lockedSkills:r==="locked"?[...new Set([...a,t])]:a.filter(o=>o!==t)}}var m4e=Object.freeze({tools:!1,codemode:!1,codemodeOnly:!1,globalTools:!1,goalMode:!1,localDecision:!1,autoCompaction:!1});function Xg(e){let t=e.trim();return t==="/"||["/settings","/codemode","/tools","/goal-mode"].some(r=>t.length>1&&r.startsWith(t))}var dZ=Object.create,Vw=Object.defineProperty,pZ=Object.getOwnPropertyDescriptor,fZ=Object.getOwnPropertyNames,mZ=Object.getPrototypeOf,hZ=Object.prototype.hasOwnProperty,gZ=(e,t,r)=>t in e?Vw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Zt=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},Jl=(e,t)=>{for(var r in t)Vw(e,r,{get:t[r],enumerable:!0})},vZ=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of fZ(t))!hZ.call(e,a)&&a!==r&&Vw(e,a,{get:()=>t[a],enumerable:!(n=pZ(t,a))||n.enumerable});return e},B=(e,t,r)=>(r=e!=null?dZ(mZ(e)):{},vZ(t||!e||!e.__esModule?Vw(r,"default",{value:e,enumerable:!0}):r,e)),oe=(e,t,r)=>gZ(e,typeof t!="symbol"?t+"":t,r);var Vs=class{constructor(e){oe(this,"equals",e),oe(this,"snapshot"),oe(this,"listeners",new Set),oe(this,"subscribe",t=>(this.listeners.add(t),()=>this.listeners.delete(t))),oe(this,"getSnapshot",()=>this.snapshot),this.snapshot=Object.freeze({revision:0,mounts:Object.freeze([])})}sync(e){let t=this.snapshot.mounts;if(!(t.length===e.length&&e.every((r,n)=>this.equals(t[n],r)))){this.snapshot=Object.freeze({revision:this.snapshot.revision+1,mounts:Object.freeze(e.slice())});for(let r of this.listeners)r()}}clear(){this.snapshot.mounts.length!==0&&this.sync([])}};var bZ=class extends Vs{constructor(){super((e,t)=>e.target===t.target&&e.toggleTarget===t.toggleTarget&&e.sessionId===t.sessionId&&e.draft===t.draft&&e.open===t.open&&e.openRevision===t.openRevision),oe(this,"dismissed",null),oe(this,"expanded",null),oe(this,"opener","draft"),oe(this,"focusPending",!1),oe(this,"openRevision",0),oe(this,"panelFocus",null)}sync(e){this.expanded&&this.expanded!==e[0]?.sessionId&&(this.expanded=null);let t=this.getSnapshot().mounts[0];t?.sessionId!==e[0]?.sessionId&&(this.focusPending=!1,this.opener="draft"),e[0]?.open&&(!t?.open||t.sessionId!==e[0].sessionId)&&this.openRevision++,super.sync(e.map(r=>({...r,openRevision:this.openRevision})))}isDismissed(e,t){return this.dismissed?.sessionId===e&&this.dismissed.draft===t}isExpanded(e){return this.expanded===e}openedBy(){return this.opener}toggle(e){let t=this.getSnapshot().mounts[0];return!t||t.sessionId!==e?!1:t.open?(this.dismiss(),!1):(this.dismissed=null,this.expanded=e,this.opener="toggle",this.focusPending=!0,this.sync([{...t,open:!0}]),!0)}dismiss(){let e=this.getSnapshot().mounts[0];e&&(this.dismissed={sessionId:e.sessionId,draft:e.draft},this.expanded=null,this.focusPending=!1,this.sync([{...e,open:!1}]))}reopen(){this.dismissed=null,this.expanded=null,this.opener="draft";let e=this.getSnapshot().mounts[0];e&&this.sync([{...e,open:!0}])}hasPendingFocus(){return this.focusPending}clearPendingFocus(){this.focusPending=!1}registerFocus(e,t){let r={sessionId:e.sessionId,target:e.target,focus:t};return this.panelFocus=r,()=>{this.panelFocus===r&&(this.panelFocus=null)}}focusControl(e=!1){let t=this.getSnapshot().mounts[0];return t?.open&&this.panelFocus?.sessionId===t.sessionId&&this.panelFocus.target===t.target?this.panelFocus.focus(e):!1}},Gn=new bZ;function Uw(e){return/^wlt_[a-zA-Z0-9_-]{43}$/.test(e)}function k8(e){let t=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set;t?t.call(e,""):e.value="",e.dispatchEvent(new Event("input",{bubbles:!0}))}var Bo={viewport:108,inset:24,background:"#E3E8EE",paths:[{fill:"#6B7B8D",d:"M6,0h6v6h-6z M48,0h6v6h-6z M0,6h6v6h-6z M12,6h6v6h-6z M42,6h6v6h-6z M54,6h6v6h-6z M0,12h6v6h-6z M54,12h6v6h-6z M6,36h6v6h-6z M48,36h6v6h-6z M18,48h6v6h-6z M36,48h6v6h-6z"},{fill:"#9EAAB8",d:"M6,6h6v6h-6z M48,6h6v6h-6z M6,12h48v6h-48z M0,18h12v6h-12z M24,18h12v6h-12z M48,18h12v6h-12z M0,24h12v6h-12z M24,24h12v6h-12z M48,24h12v6h-12z M0,30h24v6h-24z M36,30h24v6h-24z M0,36h6v6h-6z M12,36h6v6h-6z M24,36h12v6h-12z M42,36h6v6h-6z M54,36h6v6h-6z M6,42h48v6h-48z M12,48h6v6h-6z M24,48h12v6h-12z M42,48h6v6h-6z M18,54h6v6h-6z M36,54h6v6h-6z"},{fill:"#FFFFFF",d:"M12,18h6v6h-6z M36,18h6v6h-6z M12,24h12v6h-12z M36,24h12v6h-12z"},{fill:"#7EC88B",d:"M18,18h6v6h-6z M42,18h6v6h-6z"},{fill:"#F28B9A",d:"M24,30h12v6h-12z"},{fill:"#C5CED8",d:"M18,36h6v6h-6z M36,36h6v6h-6z"}]};function F_(e="wand-brand-mark"){let t=e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">"),{viewport:r,inset:n,background:a,paths:o}=Bo;return`<svg class="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${r} ${r}" aria-hidden="true" focusable="false" data-wand-brand="pixel-cat"><rect width="${r}" height="${r}" rx="24" fill="${a}"/><g transform="translate(${n} ${n})">`+o.map(({fill:l,d:c})=>`<path fill="${l}" d="${c}"/>`).join("")+"</g></svg>"}var C8="data:image/svg+xml,"+encodeURIComponent(F_());var yZ=Zt(e=>{"use strict";var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),y=Symbol.iterator;function w(T){return T===null||typeof T!="object"?null:(T=y&&T[y]||T["@@iterator"],typeof T=="function"?T:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,F={};function C(T,V,X){this.props=T,this.context=V,this.refs=F,this.updater=X||x}C.prototype.isReactComponent={},C.prototype.setState=function(T,V){if(typeof T!="object"&&typeof T!="function"&&T!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,T,V,"setState")},C.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function D(){}D.prototype=C.prototype;function S(T,V,X){this.props=T,this.context=V,this.refs=F,this.updater=X||x}var A=S.prototype=new D;A.constructor=S,k(A,C.prototype),A.isPureReactComponent=!0;var I=Array.isArray;function j(){}var $={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function N(T,V,X){var Q=X.ref;return{$$typeof:t,type:T,key:V,ref:Q!==void 0?Q:null,props:X}}function R(T,V){return N(T.type,V,T.props)}function U(T){return typeof T=="object"&&T!==null&&T.$$typeof===t}function H(T){var V={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(X){return V[X]})}var q=/\/+/g;function L(T,V){return typeof T=="object"&&T!==null&&T.key!=null?H(""+T.key):V.toString(36)}function O(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(j,j):(T.status="pending",T.then(function(V){T.status==="pending"&&(T.status="fulfilled",T.value=V)},function(V){T.status==="pending"&&(T.status="rejected",T.reason=V)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function W(T,V,X,Q,re){var J=typeof T;(J==="undefined"||J==="boolean")&&(T=null);var se=!1;if(T===null)se=!0;else switch(J){case"bigint":case"string":case"number":se=!0;break;case"object":switch(T.$$typeof){case t:case r:se=!0;break;case g:return se=T._init,W(se(T._payload),V,X,Q,re)}}if(se)return re=re(T),se=Q===""?"."+L(T,0):Q,I(re)?(X="",se!=null&&(X=se.replace(q,"$&/")+"/"),W(re,V,X,"",function(he){return he})):re!=null&&(U(re)&&(re=R(re,X+(re.key==null||T&&T.key===re.key?"":(""+re.key).replace(q,"$&/")+"/")+se)),V.push(re)),1;se=0;var ue=Q===""?".":Q+":";if(I(T))for(var ae=0;ae<T.length;ae++)Q=T[ae],J=ue+L(Q,ae),se+=W(Q,V,X,J,re);else if(ae=w(T),typeof ae=="function")for(T=ae.call(T),ae=0;!(Q=T.next()).done;)Q=Q.value,J=ue+L(Q,ae++),se+=W(Q,V,X,J,re);else if(J==="object"){if(typeof T.then=="function")return W(O(T),V,X,Q,re);throw V=String(T),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return se}function z(T,V,X){if(T==null)return T;var Q=[],re=0;return W(T,Q,"","",function(J){return V.call(X,J,re++)}),Q}function Y(T){if(T._status===-1){var V=T._result;V=V(),V.then(function(X){(T._status===0||T._status===-1)&&(T._status=1,T._result=X)},function(X){(T._status===0||T._status===-1)&&(T._status=2,T._result=X)}),T._status===-1&&(T._status=0,T._result=V)}if(T._status===1)return T._result.default;throw T._result}var G=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},Z={map:z,forEach:function(T,V,X){z(T,function(){V.apply(this,arguments)},X)},count:function(T){var V=0;return z(T,function(){V++}),V},toArray:function(T){return z(T,function(V){return V})||[]},only:function(T){if(!U(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};e.Activity=v,e.Children=Z,e.Component=C,e.Fragment=n,e.Profiler=o,e.PureComponent=S,e.StrictMode=a,e.Suspense=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,e.__COMPILER_RUNTIME={__proto__:null,c:function(T){return $.H.useMemoCache(T)}},e.cache=function(T){return function(){return T.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(T,V,X){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var Q=k({},T.props),re=T.key;if(V!=null)for(J in V.key!==void 0&&(re=""+V.key),V)!P.call(V,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&V.ref===void 0||(Q[J]=V[J]);var J=arguments.length-2;if(J===1)Q.children=X;else if(1<J){for(var se=Array(J),ue=0;ue<J;ue++)se[ue]=arguments[ue+2];Q.children=se}return N(T.type,re,Q)},e.createContext=function(T){return T={$$typeof:c,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:l,_context:T},T},e.createElement=function(T,V,X){var Q,re={},J=null;if(V!=null)for(Q in V.key!==void 0&&(J=""+V.key),V)P.call(V,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(re[Q]=V[Q]);var se=arguments.length-2;if(se===1)re.children=X;else if(1<se){for(var ue=Array(se),ae=0;ae<se;ae++)ue[ae]=arguments[ae+2];re.children=ue}if(T&&T.defaultProps)for(Q in se=T.defaultProps,se)re[Q]===void 0&&(re[Q]=se[Q]);return N(T,J,re)},e.createRef=function(){return{current:null}},e.forwardRef=function(T){return{$$typeof:d,render:T}},e.isValidElement=U,e.lazy=function(T){return{$$typeof:g,_payload:{_status:-1,_result:T},_init:Y}},e.memo=function(T,V){return{$$typeof:h,type:T,compare:V===void 0?null:V}},e.startTransition=function(T){var V=$.T,X={};$.T=X;try{var Q=T(),re=$.S;re!==null&&re(X,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(j,G)}catch(J){G(J)}finally{V!==null&&X.types!==null&&(V.types=X.types),$.T=V}},e.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},e.use=function(T){return $.H.use(T)},e.useActionState=function(T,V,X){return $.H.useActionState(T,V,X)},e.useCallback=function(T,V){return $.H.useCallback(T,V)},e.useContext=function(T){return $.H.useContext(T)},e.useDebugValue=function(){},e.useDeferredValue=function(T,V){return $.H.useDeferredValue(T,V)},e.useEffect=function(T,V){return $.H.useEffect(T,V)},e.useEffectEvent=function(T){return $.H.useEffectEvent(T)},e.useId=function(){return $.H.useId()},e.useImperativeHandle=function(T,V,X){return $.H.useImperativeHandle(T,V,X)},e.useInsertionEffect=function(T,V){return $.H.useInsertionEffect(T,V)},e.useLayoutEffect=function(T,V){return $.H.useLayoutEffect(T,V)},e.useMemo=function(T,V){return $.H.useMemo(T,V)},e.useOptimistic=function(T,V){return $.H.useOptimistic(T,V)},e.useReducer=function(T,V,X){return $.H.useReducer(T,V,X)},e.useRef=function(T){return $.H.useRef(T)},e.useState=function(T){return $.H.useState(T)},e.useSyncExternalStore=function(T,V,X){return $.H.useSyncExternalStore(T,V,X)},e.useTransition=function(){return $.H.useTransition()},e.version="19.2.7"}),_=Zt((e,t)=>{"use strict";t.exports=yZ()});var Sm=B(_(),1),D_=(0,Sm.createContext)(null);function wZ(e){return{subscribe:t=>e.subscribe(t),getSnapshot:()=>e.getSnapshot()}}function S8({store:e,children:t}){return(0,Sm.createElement)(D_.Provider,{value:e},t)}function A_(){let e=(0,Sm.useContext)(D_);if(!e)throw new Error("useUiStore must be used inside UiStoreProvider");return e}function ai(){let e=A_(),t=(0,Sm.useMemo)(()=>wZ(e),[e]);return(0,Sm.useSyncExternalStore)(t.subscribe,t.getSnapshot,t.getSnapshot)}function Ci(){let e=A_();return(0,Sm.useCallback)(t=>e.dispatch(t),[e])}function ct(...e){return e.filter(Boolean).join(" ")}var xZ=Zt(e=>{"use strict";var t=_();function r(p){var h="https://react.dev/errors/"+p;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+p+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(r(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function l(p,h,g){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:v==null?null:""+v,children:p,containerInfo:h,implementation:g}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(p,h){if(p==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(p,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(r(299));return l(p,h,null,g)},e.flushSync=function(p){var h=c.T,g=a.p;try{if(c.T=null,a.p=2,p)return p()}finally{c.T=h,a.p=g,a.d.f()}},e.preconnect=function(p,h){typeof p=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(p,h))},e.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},e.preinit=function(p,h){if(typeof p=="string"&&h&&typeof h.as=="string"){var g=h.as,v=d(g,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,w=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?a.d.S(p,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:v,integrity:y,fetchPriority:w}):g==="script"&&a.d.X(p,{crossOrigin:v,integrity:y,fetchPriority:w,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},e.preinitModule=function(p,h){if(typeof p=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=d(h.as,h.crossOrigin);a.d.M(p,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(p)},e.preload=function(p,h){if(typeof p=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,v=d(g,h.crossOrigin);a.d.L(p,g,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},e.preloadModule=function(p,h){if(typeof p=="string")if(h){var g=d(h.as,h.crossOrigin);a.d.m(p,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(p)},e.requestFormReset=function(p){a.d.r(p)},e.unstable_batchedUpdates=function(p,h){return p(h)},e.useFormState=function(p,h,g){return c.H.useFormState(p,h,g)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version="19.2.7"}),er=Zt((e,t)=>{"use strict";function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(n){console.error(n)}}r(),t.exports=xZ()}),EZ=Zt(e=>{"use strict";function t(O,W){var z=O.length;O.push(W);e:for(;0<z;){var Y=z-1>>>1,G=O[Y];if(0<a(G,W))O[Y]=W,O[z]=G,z=Y;else break e}}function r(O){return O.length===0?null:O[0]}function n(O){if(O.length===0)return null;var W=O[0],z=O.pop();if(z!==W){O[0]=z;e:for(var Y=0,G=O.length,Z=G>>>1;Y<Z;){var T=2*(Y+1)-1,V=O[T],X=T+1,Q=O[X];if(0>a(V,z))X<G&&0>a(Q,V)?(O[Y]=Q,O[X]=z,Y=X):(O[Y]=V,O[T]=z,Y=T);else if(X<G&&0>a(Q,z))O[Y]=Q,O[X]=z,Y=X;else break e}}return W}function a(O,W){var z=O.sortIndex-W.sortIndex;return z!==0?z:O.id-W.id}e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"?(o=performance,e.unstable_now=function(){return o.now()}):(l=Date,c=l.now(),e.unstable_now=function(){return l.now()-c});var o,l,c,d=[],p=[],h=1,g=null,v=3,y=!1,w=!1,x=!1,k=!1,F=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function S(O){for(var W=r(p);W!==null;){if(W.callback===null)n(p);else if(W.startTime<=O)n(p),W.sortIndex=W.expirationTime,t(d,W);else break;W=r(p)}}function A(O){if(x=!1,S(O),!w)if(r(d)!==null)w=!0,I||(I=!0,U());else{var W=r(p);W!==null&&L(A,W.startTime-O)}}var I=!1,j=-1,$=5,P=-1;function N(){return k?!0:!(e.unstable_now()-P<$)}function R(){if(k=!1,I){var O=e.unstable_now();P=O;var W=!0;try{e:{w=!1,x&&(x=!1,C(j),j=-1),y=!0;var z=v;try{t:{for(S(O),g=r(d);g!==null&&!(g.expirationTime>O&&N());){var Y=g.callback;if(typeof Y=="function"){g.callback=null,v=g.priorityLevel;var G=Y(g.expirationTime<=O);if(O=e.unstable_now(),typeof G=="function"){g.callback=G,S(O),W=!0;break t}g===r(d)&&n(d),S(O)}else n(d);g=r(d)}if(g!==null)W=!0;else{var Z=r(p);Z!==null&&L(A,Z.startTime-O),W=!1}}break e}finally{g=null,v=z,y=!1}W=void 0}}finally{W?U():I=!1}}}var U;typeof D=="function"?U=function(){D(R)}:typeof MessageChannel<"u"?(H=new MessageChannel,q=H.port2,H.port1.onmessage=R,U=function(){q.postMessage(null)}):U=function(){F(R,0)};var H,q;function L(O,W){j=F(function(){O(e.unstable_now())},W)}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(O){O.callback=null},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(O){switch(v){case 1:case 2:case 3:var W=3;break;default:W=v}var z=v;v=W;try{return O()}finally{v=z}},e.unstable_requestPaint=function(){k=!0},e.unstable_runWithPriority=function(O,W){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var z=v;v=O;try{return W()}finally{v=z}},e.unstable_scheduleCallback=function(O,W,z){var Y=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?Y+z:Y):z=Y,O){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=z+G,O={id:h++,callback:W,priorityLevel:O,startTime:z,expirationTime:G,sortIndex:-1},z>Y?(O.sortIndex=z,t(p,O),r(d)===null&&O===r(p)&&(x?(C(j),j=-1):x=!0,L(A,z-Y))):(O.sortIndex=G,t(d,O),w||y||(w=!0,I||(I=!0,U()))),O},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(O){var W=v;return function(){var z=v;v=W;try{return O.apply(this,arguments)}finally{v=z}}}}),kZ=Zt((e,t)=>{"use strict";t.exports=EZ()}),CZ=Zt(e=>{"use strict";var t=kZ(),r=_(),n=er();function a(i){var s="https://react.dev/errors/"+i;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function l(i){var s=i,u=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(u=s.return),i=s.return;while(i)}return s.tag===3?u:null}function c(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function d(i){if(i.tag===31){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function p(i){if(l(i)!==i)throw Error(a(188))}function h(i){var s=i.alternate;if(!s){if(s=l(i),s===null)throw Error(a(188));return s!==i?null:i}for(var u=i,f=s;;){var b=u.return;if(b===null)break;var E=b.alternate;if(E===null){if(f=b.return,f!==null){u=f;continue}break}if(b.child===E.child){for(E=b.child;E;){if(E===u)return p(b),i;if(E===f)return p(b),s;E=E.sibling}throw Error(a(188))}if(u.return!==f.return)u=b,f=E;else{for(var M=!1,K=b.child;K;){if(K===u){M=!0,u=b,f=E;break}if(K===f){M=!0,f=b,u=E;break}K=K.sibling}if(!M){for(K=E.child;K;){if(K===u){M=!0,u=E,f=b;break}if(K===f){M=!0,f=E,u=b;break}K=K.sibling}if(!M)throw Error(a(189))}}if(u.alternate!==f)throw Error(a(190))}if(u.tag!==3)throw Error(a(188));return u.stateNode.current===u?i:s}function g(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i;for(i=i.child;i!==null;){if(s=g(i),s!==null)return s;i=i.sibling}return null}var v=Object.assign,y=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),S=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),R=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function H(i){return i===null||typeof i!="object"?null:(i=U&&i[U]||i["@@iterator"],typeof i=="function"?i:null)}var q=Symbol.for("react.client.reference");function L(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===q?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case k:return"Fragment";case C:return"Profiler";case F:return"StrictMode";case I:return"Suspense";case j:return"SuspenseList";case N:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case x:return"Portal";case S:return i.displayName||"Context";case D:return(i._context.displayName||"Context")+".Consumer";case A:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case $:return s=i.displayName||null,s!==null?s:L(i.type)||"Memo";case P:s=i._payload,i=i._init;try{return L(i(s))}catch{}}return null}var O=Array.isArray,W=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},G=[],Z=-1;function T(i){return{current:i}}function V(i){0>Z||(i.current=G[Z],G[Z]=null,Z--)}function X(i,s){Z++,G[Z]=i.current,i.current=s}var Q=T(null),re=T(null),J=T(null),se=T(null);function ue(i,s){switch(X(J,s),X(re,i),X(Q,null),s.nodeType){case 9:case 11:i=(i=s.documentElement)&&(i=i.namespaceURI)?Xj(i):0;break;default:if(i=s.tagName,s=s.namespaceURI)s=Xj(s),i=Yj(s,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}V(Q),X(Q,i)}function ae(){V(Q),V(re),V(J)}function he(i){i.memoizedState!==null&&X(se,i);var s=Q.current,u=Yj(s,i.type);s!==u&&(X(re,i),X(Q,u))}function le(i){re.current===i&&(V(Q),V(re)),se.current===i&&(V(se),Wg._currentValue=Y)}var fe,we;function _e(i){if(fe===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);fe=s&&s[1]||"",we=-1<u.stack.indexOf(`
|
|
4
|
-
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
5
|
-
`+fe+i+we}var $e=!1;function De(i,s){if(!i||$e)return"";$e=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(s){var xe=function(){throw Error()};if(Object.defineProperty(xe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(xe,[])}catch(ge){var me=ge}Reflect.construct(i,[],xe)}else{try{xe.call()}catch(ge){me=ge}i.call(xe.prototype)}}else{try{throw Error()}catch(ge){me=ge}(xe=i())&&typeof xe.catch=="function"&&xe.catch(function(){})}}catch(ge){if(ge&&me&&typeof ge.stack=="string")return[ge.stack,me.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var b=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");b&&b.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var E=f.DetermineComponentFrameRoot(),M=E[0],K=E[1];if(M&&K){var ee=M.split(`
|
|
6
|
-
`),pe=K.split(`
|
|
7
|
-
`);for(b=f=0;f<ee.length&&!ee[f].includes("DetermineComponentFrameRoot");)f++;for(;b<pe.length&&!pe[b].includes("DetermineComponentFrameRoot");)b++;if(f===ee.length||b===pe.length)for(f=ee.length-1,b=pe.length-1;1<=f&&0<=b&&ee[f]!==pe[b];)b--;for(;1<=f&&0<=b;f--,b--)if(ee[f]!==pe[b]){if(f!==1||b!==1)do if(f--,b--,0>b||ee[f]!==pe[b]){var be=`
|
|
8
|
-
`+ee[f].replace(" at new "," at ");return i.displayName&&be.includes("<anonymous>")&&(be=be.replace("<anonymous>",i.displayName)),be}while(1<=f&&0<=b);break}}}finally{$e=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?_e(u):""}function Ce(i,s){switch(i.tag){case 26:case 27:case 5:return _e(i.type);case 16:return _e("Lazy");case 13:return i.child!==s&&s!==null?_e("Suspense Fallback"):_e("Suspense");case 19:return _e("SuspenseList");case 0:case 15:return De(i.type,!1);case 11:return De(i.type.render,!1);case 1:return De(i.type,!0);case 31:return _e("Activity");default:return""}}function qe(i){try{var s="",u=null;do s+=Ce(i,u),u=i,i=i.return;while(i);return s}catch(f){return`
|
|
9
|
-
Error generating stack: `+f.message+`
|
|
10
|
-
`+f.stack}}var Ae=Object.prototype.hasOwnProperty,Be=t.unstable_scheduleCallback,Me=t.unstable_cancelCallback,Ue=t.unstable_shouldYield,He=t.unstable_requestPaint,Ie=t.unstable_now,Ne=t.unstable_getCurrentPriorityLevel,Je=t.unstable_ImmediatePriority,gt=t.unstable_UserBlockingPriority,et=t.unstable_NormalPriority,Ve=t.unstable_LowPriority,Se=t.unstable_IdlePriority,Pe=t.log,dt=t.unstable_setDisableYieldValue,at=null,Ke=null;function je(i){if(typeof Pe=="function"&&dt(i),Ke&&typeof Ke.setStrictMode=="function")try{Ke.setStrictMode(at,i)}catch{}}var rt=Math.clz32?Math.clz32:Kr,$t=Math.log,Bt=Math.LN2;function Kr(i){return i>>>=0,i===0?32:31-($t(i)/Bt|0)|0}var zt=256,$r=262144,Kt=4194304;function St(i){var s=i&42;if(s!==0)return s;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function nr(i,s,u){var f=i.pendingLanes;if(f===0)return 0;var b=0,E=i.suspendedLanes,M=i.pingedLanes;i=i.warmLanes;var K=f&134217727;return K!==0?(f=K&~E,f!==0?b=St(f):(M&=K,M!==0?b=St(M):u||(u=K&~i,u!==0&&(b=St(u))))):(K=f&~E,K!==0?b=St(K):M!==0?b=St(M):u||(u=f&~i,u!==0&&(b=St(u)))),b===0?0:s!==0&&s!==b&&(s&E)===0&&(E=b&-b,u=s&-s,E>=u||E===32&&(u&4194048)!==0)?s:b}function Sr(i,s){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&s)===0}function Rt(i,s){switch(i){case 1:case 2:case 4:case 8:case 64:return s+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 s+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 ot(){var i=Kt;return Kt<<=1,(Kt&62914560)===0&&(Kt=4194304),i}function vt(i){for(var s=[],u=0;31>u;u++)s.push(i);return s}function Oe(i,s){i.pendingLanes|=s,s!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function Qe(i,s,u,f,b,E){var M=i.pendingLanes;i.pendingLanes=u,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=u,i.entangledLanes&=u,i.errorRecoveryDisabledLanes&=u,i.shellSuspendCounter=0;var K=i.entanglements,ee=i.expirationTimes,pe=i.hiddenUpdates;for(u=M&~u;0<u;){var be=31-rt(u),xe=1<<be;K[be]=0,ee[be]=-1;var me=pe[be];if(me!==null)for(pe[be]=null,be=0;be<me.length;be++){var ge=me[be];ge!==null&&(ge.lane&=-536870913)}u&=~xe}f!==0&&it(i,f,0),E!==0&&b===0&&i.tag!==0&&(i.suspendedLanes|=E&~(M&~s))}function it(i,s,u){i.pendingLanes|=s,i.suspendedLanes&=~s;var f=31-rt(s);i.entangledLanes|=s,i.entanglements[f]=i.entanglements[f]|1073741824|u&261930}function Re(i,s){var u=i.entangledLanes|=s;for(i=i.entanglements;u;){var f=31-rt(u),b=1<<f;b&s|i[f]&s&&(i[f]|=s),u&=~b}}function Ze(i,s){var u=s&-s;return u=(u&42)!==0?1:pt(u),(u&(i.suspendedLanes|s))!==0?0:u}function pt(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function Ht(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function qt(){var i=z.p;return i!==0?i:(i=window.event,i===void 0?32:y_(i.type))}function Jr(i,s){var u=z.p;try{return z.p=i,s()}finally{z.p=u}}var Tr=Math.random().toString(36).slice(2),Gt="__reactFiber$"+Tr,Lr="__reactProps$"+Tr,ft="__reactContainer$"+Tr,It="__reactEvents$"+Tr,dr="__reactListeners$"+Tr,Cn="__reactHandles$"+Tr,_a="__reactResources$"+Tr,sr="__reactMarker$"+Tr;function ri(i){delete i[Gt],delete i[Lr],delete i[It],delete i[dr],delete i[Cn]}function Pa(i){var s=i[Gt];if(s)return s;for(var u=i.parentNode;u;){if(s=u[ft]||u[Gt]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(i=n_(i);i!==null;){if(u=i[Gt])return u;i=n_(i)}return s}i=u,u=i.parentNode}return null}function Fr(i){if(i=i[Gt]||i[ft]){var s=i.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return i}return null}function Mn(i){var s=i.tag;if(s===5||s===26||s===27||s===6)return i.stateNode;throw Error(a(33))}function ma(i){var s=i[_a];return s||(s=i[_a]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function lr(i){i[sr]=!0}var gi=new Set,Ki={};function ha(i,s){mt(i,s),mt(i+"Capture",s)}function mt(i,s){for(Ki[i]=s,i=0;i<s.length;i++)gi.add(s[i])}var Wn=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]*$"),Vn={},Un={};function Cd(i){return Ae.call(Un,i)?!0:Ae.call(Vn,i)?!1:Wn.test(i)?Un[i]=!0:(Vn[i]=!0,!1)}function is(i,s,u){if(Cd(s))if(u===null)i.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":i.removeAttribute(s);return;case"boolean":var f=s.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){i.removeAttribute(s);return}}i.setAttribute(s,""+u)}}function Ls(i,s,u){if(u===null)i.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(s);return}i.setAttribute(s,""+u)}}function vi(i,s,u,f){if(f===null)i.removeAttribute(u);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttributeNS(s,u,""+f)}}function ga(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Hf(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ag(i,s,u){var f=Object.getOwnPropertyDescriptor(i.constructor.prototype,s);if(!i.hasOwnProperty(s)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var b=f.get,E=f.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return b.call(this)},set:function(M){u=""+M,E.call(this,M)}}),Object.defineProperty(i,s,{enumerable:f.enumerable}),{getValue:function(){return u},setValue:function(M){u=""+M},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function ig(i){if(!i._valueTracker){var s=Hf(i)?"checked":"value";i._valueTracker=ag(i,s,""+i[s])}}function We(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var u=s.getValue(),f="";return i&&(f=Hf(i)?i.checked?"true":"false":i.value),i=f,i!==u?(s.setValue(i),!0):!1}function Xt(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var qf=/[\n"\\]/g;function Gi(i){return i.replace(qf,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Wf(i,s,u,f,b,E,M,K){i.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?i.type=M:i.removeAttribute("type"),s!=null?M==="number"?(s===0&&i.value===""||i.value!=s)&&(i.value=""+ga(s)):i.value!==""+ga(s)&&(i.value=""+ga(s)):M!=="submit"&&M!=="reset"||i.removeAttribute("value"),s!=null?sg(i,M,ga(s)):u!=null?sg(i,M,ga(u)):f!=null&&i.removeAttribute("value"),b==null&&E!=null&&(i.defaultChecked=!!E),b!=null&&(i.checked=b&&typeof b!="function"&&typeof b!="symbol"),K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?i.name=""+ga(K):i.removeAttribute("name")}function og(i,s,u,f,b,E,M,K){if(E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(i.type=E),s!=null||u!=null){if(!(E!=="submit"&&E!=="reset"||s!=null)){ig(i);return}u=u!=null?""+ga(u):"",s=s!=null?""+ga(s):u,K||s===i.value||(i.value=s),i.defaultValue=s}f=f??b,f=typeof f!="function"&&typeof f!="symbol"&&!!f,i.checked=K?i.checked:!!f,i.defaultChecked=!!f,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(i.name=M),ig(i)}function sg(i,s,u){s==="number"&&Xt(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function Vf(i,s,u,f){if(i=i.options,s){s={};for(var b=0;b<u.length;b++)s["$"+u[b]]=!0;for(u=0;u<i.length;u++)b=s.hasOwnProperty("$"+i[u].value),i[u].selected!==b&&(i[u].selected=b),b&&f&&(i[u].defaultSelected=!0)}else{for(u=""+ga(u),s=null,b=0;b<i.length;b++){if(i[b].value===u){i[b].selected=!0,f&&(i[b].defaultSelected=!0);return}s!==null||i[b].disabled||(s=i[b])}s!==null&&(s.selected=!0)}}function qI(i,s,u){if(s!=null&&(s=""+ga(s),s!==i.value&&(i.value=s),u==null)){i.defaultValue!==s&&(i.defaultValue=s);return}i.defaultValue=u!=null?""+ga(u):""}function WI(i,s,u,f){if(s==null){if(f!=null){if(u!=null)throw Error(a(92));if(O(f)){if(1<f.length)throw Error(a(93));f=f[0]}u=f}u==null&&(u=""),s=u}u=ga(s),i.defaultValue=u,f=i.textContent,f===u&&f!==""&&f!==null&&(i.value=f),ig(i)}function Uf(i,s){if(s){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=s;return}}i.textContent=s}var oY=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 VI(i,s,u){var f=s.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?f?i.setProperty(s,""):s==="float"?i.cssFloat="":i[s]="":f?i.setProperty(s,u):typeof u!="number"||u===0||oY.has(s)?s==="float"?i.cssFloat=u:i[s]=(""+u).trim():i[s]=u+"px"}function UI(i,s,u){if(s!=null&&typeof s!="object")throw Error(a(62));if(i=i.style,u!=null){for(var f in u)!u.hasOwnProperty(f)||s!=null&&s.hasOwnProperty(f)||(f.indexOf("--")===0?i.setProperty(f,""):f==="float"?i.cssFloat="":i[f]="");for(var b in s)f=s[b],s.hasOwnProperty(b)&&u[b]!==f&&VI(i,b,f)}else for(var E in s)s.hasOwnProperty(E)&&VI(i,E,s[E])}function xk(i){if(i.indexOf("-")===-1)return!1;switch(i){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 sY=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"],["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"]]),lY=/^[\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 jy(i){return lY.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Pl(){}var Ek=null;function kk(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Kf=null,Gf=null;function KI(i){var s=Fr(i);if(s&&(i=s.stateNode)){var u=i[Lr]||null;e:switch(i=s.stateNode,s.type){case"input":if(Wf(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),s=u.name,u.type==="radio"&&s!=null){for(u=i;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Gi(""+s)+'"][type="radio"]'),s=0;s<u.length;s++){var f=u[s];if(f!==i&&f.form===i.form){var b=f[Lr]||null;if(!b)throw Error(a(90));Wf(f,b.value,b.defaultValue,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name)}}for(s=0;s<u.length;s++)f=u[s],f.form===i.form&&We(f)}break e;case"textarea":qI(i,u.value,u.defaultValue);break e;case"select":s=u.value,s!=null&&Vf(i,!!u.multiple,s,!1)}}}var Ck=!1;function GI(i,s,u){if(Ck)return i(s,u);Ck=!0;try{var f=i(s);return f}finally{if(Ck=!1,(Kf!==null||Gf!==null)&&(Ew(),Kf&&(s=Kf,i=Gf,Gf=Kf=null,KI(s),i)))for(s=0;s<i.length;s++)KI(i[s])}}function lg(i,s){var u=i.stateNode;if(u===null)return null;var f=u[Lr]||null;if(f===null)return null;u=f[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(i=i.type,f=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!f;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(a(231,s,typeof u));return u}var Nl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sk=!1;if(Nl)try{Xf={},Object.defineProperty(Xf,"passive",{get:function(){Sk=!0}}),window.addEventListener("test",Xf,Xf),window.removeEventListener("test",Xf,Xf)}catch{Sk=!1}var Xf,Lu=null,Fk=null,_y=null;function XI(){if(_y)return _y;var i,s=Fk,u=s.length,f,b="value"in Lu?Lu.value:Lu.textContent,E=b.length;for(i=0;i<u&&s[i]===b[i];i++);var M=u-i;for(f=1;f<=M&&s[u-f]===b[E-f];f++);return _y=b.slice(i,1<f?1-f:void 0)}function Py(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Ny(){return!0}function YI(){return!1}function bi(i){function s(u,f,b,E,M){this._reactName=u,this._targetInst=b,this.type=f,this.nativeEvent=E,this.target=M,this.currentTarget=null;for(var K in i)i.hasOwnProperty(K)&&(u=i[K],this[K]=u?u(E):E[K]);return this.isDefaultPrevented=(E.defaultPrevented!=null?E.defaultPrevented:E.returnValue===!1)?Ny:YI,this.isPropagationStopped=YI,this}return v(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Ny)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Ny)},persist:function(){},isPersistent:Ny}),s}var Sd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Oy=bi(Sd),ug=v({},Sd,{view:0,detail:0}),uY=bi(ug),Dk,Ak,cg,Ry=v({},ug,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bk,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==cg&&(cg&&i.type==="mousemove"?(Dk=i.screenX-cg.screenX,Ak=i.screenY-cg.screenY):Ak=Dk=0,cg=i),Dk)},movementY:function(i){return"movementY"in i?i.movementY:Ak}}),QI=bi(Ry),cY=v({},Ry,{dataTransfer:0}),dY=bi(cY),pY=v({},ug,{relatedTarget:0}),$k=bi(pY),fY=v({},Sd,{animationName:0,elapsedTime:0,pseudoElement:0}),mY=bi(fY),hY=v({},Sd,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),gY=bi(hY),vY=v({},Sd,{data:0}),ZI=bi(vY),bY={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yY={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"},wY={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xY(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=wY[i])?!!s[i]:!1}function Bk(){return xY}var EY=v({},ug,{key:function(i){if(i.key){var s=bY[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Py(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?yY[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bk,charCode:function(i){return i.type==="keypress"?Py(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Py(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),kY=bi(EY),CY=v({},Ry,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),JI=bi(CY),SY=v({},ug,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bk}),FY=bi(SY),DY=v({},Sd,{propertyName:0,elapsedTime:0,pseudoElement:0}),AY=bi(DY),$Y=v({},Ry,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),BY=bi($Y),IY=v({},Sd,{newState:0,oldState:0}),MY=bi(IY),TY=[9,13,27,32],Ik=Nl&&"CompositionEvent"in window,dg=null;Nl&&"documentMode"in document&&(dg=document.documentMode);var jY=Nl&&"TextEvent"in window&&!dg,eM=Nl&&(!Ik||dg&&8<dg&&11>=dg),tM=" ",rM=!1;function nM(i,s){switch(i){case"keyup":return TY.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function aM(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Yf=!1;function _Y(i,s){switch(i){case"compositionend":return aM(s);case"keypress":return s.which!==32?null:(rM=!0,tM);case"textInput":return i=s.data,i===tM&&rM?null:i;default:return null}}function PY(i,s){if(Yf)return i==="compositionend"||!Ik&&nM(i,s)?(i=XI(),_y=Fk=Lu=null,Yf=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return eM&&s.locale!=="ko"?null:s.data;default:return null}}var NY={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 iM(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!NY[i.type]:s==="textarea"}function oM(i,s,u,f){Kf?Gf?Gf.push(f):Gf=[f]:Kf=f,s=Iw(s,"onChange"),0<s.length&&(u=new Oy("onChange","change",null,u,f),i.push({event:u,listeners:s}))}var pg=null,fg=null;function OY(i){qj(i,0)}function Ly(i){var s=Mn(i);if(We(s))return i}function sM(i,s){if(i==="change")return s}var lM=!1;Nl&&(Nl?(zy="oninput"in document,zy||(Tk=document.createElement("div"),Tk.setAttribute("oninput","return;"),zy=typeof Tk.oninput=="function"),Mk=zy):Mk=!1,lM=Mk&&(!document.documentMode||9<document.documentMode));var Mk,zy,Tk;function uM(){pg&&(pg.detachEvent("onpropertychange",cM),fg=pg=null)}function cM(i){if(i.propertyName==="value"&&Ly(fg)){var s=[];oM(s,fg,i,kk(i)),GI(OY,s)}}function RY(i,s,u){i==="focusin"?(uM(),pg=s,fg=u,pg.attachEvent("onpropertychange",cM)):i==="focusout"&&uM()}function LY(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Ly(fg)}function zY(i,s){if(i==="click")return Ly(s)}function HY(i,s){if(i==="input"||i==="change")return Ly(s)}function qY(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Xi=typeof Object.is=="function"?Object.is:qY;function mg(i,s){if(Xi(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var u=Object.keys(i),f=Object.keys(s);if(u.length!==f.length)return!1;for(f=0;f<u.length;f++){var b=u[f];if(!Ae.call(s,b)||!Xi(i[b],s[b]))return!1}return!0}function dM(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function pM(i,s){var u=dM(i);i=0;for(var f;u;){if(u.nodeType===3){if(f=i+u.textContent.length,i<=s&&f>=s)return{node:u,offset:s-i};i=f}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=dM(u)}}function fM(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?fM(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function mM(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var s=Xt(i.document);s instanceof i.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)i=s.contentWindow;else break;s=Xt(i.document)}return s}function jk(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}var WY=Nl&&"documentMode"in document&&11>=document.documentMode,Qf=null,_k=null,hg=null,Pk=!1;function hM(i,s,u){var f=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Pk||Qf==null||Qf!==Xt(f)||(f=Qf,"selectionStart"in f&&jk(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),hg&&mg(hg,f)||(hg=f,f=Iw(_k,"onSelect"),0<f.length&&(s=new Oy("onSelect","select",null,s,u),i.push({event:s,listeners:f}),s.target=Qf)))}function Fd(i,s){var u={};return u[i.toLowerCase()]=s.toLowerCase(),u["Webkit"+i]="webkit"+s,u["Moz"+i]="moz"+s,u}var Zf={animationend:Fd("Animation","AnimationEnd"),animationiteration:Fd("Animation","AnimationIteration"),animationstart:Fd("Animation","AnimationStart"),transitionrun:Fd("Transition","TransitionRun"),transitionstart:Fd("Transition","TransitionStart"),transitioncancel:Fd("Transition","TransitionCancel"),transitionend:Fd("Transition","TransitionEnd")},Nk={},gM={};Nl&&(gM=document.createElement("div").style,"AnimationEvent"in window||(delete Zf.animationend.animation,delete Zf.animationiteration.animation,delete Zf.animationstart.animation),"TransitionEvent"in window||delete Zf.transitionend.transition);function Dd(i){if(Nk[i])return Nk[i];if(!Zf[i])return i;var s=Zf[i],u;for(u in s)if(s.hasOwnProperty(u)&&u in gM)return Nk[i]=s[u];return i}var vM=Dd("animationend"),bM=Dd("animationiteration"),yM=Dd("animationstart"),VY=Dd("transitionrun"),UY=Dd("transitionstart"),KY=Dd("transitioncancel"),wM=Dd("transitionend"),xM=new Map,Ok="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error 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(" ");Ok.push("scrollEnd");function os(i,s){xM.set(i,s),ha(s,[i])}var Hy=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},ko=[],Jf=0,Rk=0;function qy(){for(var i=Jf,s=Rk=Jf=0;s<i;){var u=ko[s];ko[s++]=null;var f=ko[s];ko[s++]=null;var b=ko[s];ko[s++]=null;var E=ko[s];if(ko[s++]=null,f!==null&&b!==null){var M=f.pending;M===null?b.next=b:(b.next=M.next,M.next=b),f.pending=b}E!==0&&EM(u,b,E)}}function Wy(i,s,u,f){ko[Jf++]=i,ko[Jf++]=s,ko[Jf++]=u,ko[Jf++]=f,Rk|=f,i.lanes|=f,i=i.alternate,i!==null&&(i.lanes|=f)}function Lk(i,s,u,f){return Wy(i,s,u,f),Vy(i)}function Ad(i,s){return Wy(i,null,null,s),Vy(i)}function EM(i,s,u){i.lanes|=u;var f=i.alternate;f!==null&&(f.lanes|=u);for(var b=!1,E=i.return;E!==null;)E.childLanes|=u,f=E.alternate,f!==null&&(f.childLanes|=u),E.tag===22&&(i=E.stateNode,i===null||i._visibility&1||(b=!0)),i=E,E=E.return;return i.tag===3?(E=i.stateNode,b&&s!==null&&(b=31-rt(u),i=E.hiddenUpdates,f=i[b],f===null?i[b]=[s]:f.push(s),s.lane=u|536870912),E):null}function Vy(i){if(50<Ng)throw Ng=0,XC=null,Error(a(185));for(var s=i.return;s!==null;)i=s,s=i.return;return i.tag===3?i.stateNode:null}var em={};function GY(i,s,u,f){this.tag=i,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yi(i,s,u,f){return new GY(i,s,u,f)}function zk(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Ol(i,s){var u=i.alternate;return u===null?(u=Yi(i.tag,s,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=s,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&65011712,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,s=i.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u.refCleanup=i.refCleanup,u}function kM(i,s){i.flags&=65011714;var u=i.alternate;return u===null?(i.childLanes=0,i.lanes=s,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type,s=u.dependencies,i.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),i}function Uy(i,s,u,f,b,E){var M=0;if(f=i,typeof i=="function")zk(i)&&(M=1);else if(typeof i=="string")M=QQ(i,u,Q.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case N:return i=Yi(31,u,s,b),i.elementType=N,i.lanes=E,i;case k:return $d(u.children,b,E,s);case F:M=8,b|=24;break;case C:return i=Yi(12,u,s,b|2),i.elementType=C,i.lanes=E,i;case I:return i=Yi(13,u,s,b),i.elementType=I,i.lanes=E,i;case j:return i=Yi(19,u,s,b),i.elementType=j,i.lanes=E,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case S:M=10;break e;case D:M=9;break e;case A:M=11;break e;case $:M=14;break e;case P:M=16,f=null;break e}M=29,u=Error(a(130,i===null?"null":typeof i,"")),f=null}return s=Yi(M,u,s,b),s.elementType=i,s.type=f,s.lanes=E,s}function $d(i,s,u,f){return i=Yi(7,i,f,s),i.lanes=u,i}function Hk(i,s,u){return i=Yi(6,i,null,s),i.lanes=u,i}function CM(i){var s=Yi(18,null,null,0);return s.stateNode=i,s}function qk(i,s,u){return s=Yi(4,i.children!==null?i.children:[],i.key,s),s.lanes=u,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}var SM=new WeakMap;function Co(i,s){if(typeof i=="object"&&i!==null){var u=SM.get(i);return u!==void 0?u:(s={value:i,source:s,stack:qe(s)},SM.set(i,s),s)}return{value:i,source:s,stack:qe(s)}}var tm=[],rm=0,Ky=null,gg=0,So=[],Fo=0,zu=null,zs=1,Hs="";function Rl(i,s){tm[rm++]=gg,tm[rm++]=Ky,Ky=i,gg=s}function FM(i,s,u){So[Fo++]=zs,So[Fo++]=Hs,So[Fo++]=zu,zu=i;var f=zs;i=Hs;var b=32-rt(f)-1;f&=~(1<<b),u+=1;var E=32-rt(s)+b;if(30<E){var M=b-b%5;E=(f&(1<<M)-1).toString(32),f>>=M,b-=M,zs=1<<32-rt(s)+b|u<<b|f,Hs=E+i}else zs=1<<E|u<<b|f,Hs=i}function Wk(i){i.return!==null&&(Rl(i,1),FM(i,1,0))}function Vk(i){for(;i===Ky;)Ky=tm[--rm],tm[rm]=null,gg=tm[--rm],tm[rm]=null;for(;i===zu;)zu=So[--Fo],So[Fo]=null,Hs=So[--Fo],So[Fo]=null,zs=So[--Fo],So[Fo]=null}function DM(i,s){So[Fo++]=zs,So[Fo++]=Hs,So[Fo++]=zu,zs=s.id,Hs=s.overflow,zu=i}var va=null,en=null,ar=!1,Hu=null,Do=!1,Uk=Error(a(519));function qu(i){var s=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw vg(Co(s,i)),Uk}function AM(i){var s=i.stateNode,u=i.type,f=i.memoizedProps;switch(s[Gt]=i,s[Lr]=f,u){case"dialog":Vt("cancel",s),Vt("close",s);break;case"iframe":case"object":case"embed":Vt("load",s);break;case"video":case"audio":for(u=0;u<Rg.length;u++)Vt(Rg[u],s);break;case"source":Vt("error",s);break;case"img":case"image":case"link":Vt("error",s),Vt("load",s);break;case"details":Vt("toggle",s);break;case"input":Vt("invalid",s),og(s,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0);break;case"select":Vt("invalid",s);break;case"textarea":Vt("invalid",s),WI(s,f.value,f.defaultValue,f.children)}u=f.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||s.textContent===""+u||f.suppressHydrationWarning===!0||Kj(s.textContent,u)?(f.popover!=null&&(Vt("beforetoggle",s),Vt("toggle",s)),f.onScroll!=null&&Vt("scroll",s),f.onScrollEnd!=null&&Vt("scrollend",s),f.onClick!=null&&(s.onclick=Pl),s=!0):s=!1,s||qu(i,!0)}function $M(i){for(va=i.return;va;)switch(va.tag){case 5:case 31:case 13:Do=!1;return;case 27:case 3:Do=!0;return;default:va=va.return}}function nm(i){if(i!==va)return!1;if(!ar)return $M(i),ar=!0,!1;var s=i.tag,u;if((u=s!==3&&s!==27)&&((u=s===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||l8(i.type,i.memoizedProps)),u=!u),u&&en&&qu(i),$M(i),s===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));en=r_(i)}else if(s===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));en=r_(i)}else s===27?(s=en,nc(i.type)?(i=f8,f8=null,en=i):en=s):en=va?Ao(i.stateNode.nextSibling):null;return!0}function Bd(){en=va=null,ar=!1}function Kk(){var i=Hu;return i!==null&&(Ei===null?Ei=i:Ei.push.apply(Ei,i),Hu=null),i}function vg(i){Hu===null?Hu=[i]:Hu.push(i)}var Gk=T(null),Id=null,Ll=null;function Wu(i,s,u){X(Gk,s._currentValue),s._currentValue=u}function zl(i){i._currentValue=Gk.current,V(Gk)}function Xk(i,s,u){for(;i!==null;){var f=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,f!==null&&(f.childLanes|=s)):f!==null&&(f.childLanes&s)!==s&&(f.childLanes|=s),i===u)break;i=i.return}}function Yk(i,s,u,f){var b=i.child;for(b!==null&&(b.return=i);b!==null;){var E=b.dependencies;if(E!==null){var M=b.child;E=E.firstContext;e:for(;E!==null;){var K=E;E=b;for(var ee=0;ee<s.length;ee++)if(K.context===s[ee]){E.lanes|=u,K=E.alternate,K!==null&&(K.lanes|=u),Xk(E.return,u,i),f||(M=null);break e}E=K.next}}else if(b.tag===18){if(M=b.return,M===null)throw Error(a(341));M.lanes|=u,E=M.alternate,E!==null&&(E.lanes|=u),Xk(M,u,i),M=null}else M=b.child;if(M!==null)M.return=b;else for(M=b;M!==null;){if(M===i){M=null;break}if(b=M.sibling,b!==null){b.return=M.return,M=b;break}M=M.return}b=M}}function am(i,s,u,f){i=null;for(var b=s,E=!1;b!==null;){if(!E){if((b.flags&524288)!==0)E=!0;else if((b.flags&262144)!==0)break}if(b.tag===10){var M=b.alternate;if(M===null)throw Error(a(387));if(M=M.memoizedProps,M!==null){var K=b.type;Xi(b.pendingProps.value,M.value)||(i!==null?i.push(K):i=[K])}}else if(b===se.current){if(M=b.alternate,M===null)throw Error(a(387));M.memoizedState.memoizedState!==b.memoizedState.memoizedState&&(i!==null?i.push(Wg):i=[Wg])}b=b.return}i!==null&&Yk(s,i,u,f),s.flags|=262144}function Gy(i){for(i=i.firstContext;i!==null;){if(!Xi(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Md(i){Id=i,Ll=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function ba(i){return BM(Id,i)}function Xy(i,s){return Id===null&&Md(i),BM(i,s)}function BM(i,s){var u=s._currentValue;if(s={context:s,memoizedValue:u,next:null},Ll===null){if(i===null)throw Error(a(308));Ll=s,i.dependencies={lanes:0,firstContext:s},i.flags|=524288}else Ll=Ll.next=s;return u}var XY=typeof AbortController<"u"?AbortController:function(){var i=[],s=this.signal={aborted:!1,addEventListener:function(u,f){i.push(f)}};this.abort=function(){s.aborted=!0,i.forEach(function(u){return u()})}},YY=t.unstable_scheduleCallback,QY=t.unstable_NormalPriority,Tn={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qk(){return{controller:new XY,data:new Map,refCount:0}}function bg(i){i.refCount--,i.refCount===0&&YY(QY,function(){i.controller.abort()})}var yg=null,Zk=0,im=0,om=null;function ZY(i,s){if(yg===null){var u=yg=[];Zk=0,im=t8(),om={status:"pending",value:void 0,then:function(f){u.push(f)}}}return Zk++,s.then(IM,IM),s}function IM(){if(--Zk===0&&yg!==null){om!==null&&(om.status="fulfilled");var i=yg;yg=null,im=0,om=null;for(var s=0;s<i.length;s++)(0,i[s])()}}function JY(i,s){var u=[],f={status:"pending",value:null,reason:null,then:function(b){u.push(b)}};return i.then(function(){f.status="fulfilled",f.value=s;for(var b=0;b<u.length;b++)(0,u[b])(s)},function(b){for(f.status="rejected",f.reason=b,b=0;b<u.length;b++)(0,u[b])(void 0)}),f}var MM=W.S;W.S=function(i,s){hj=Ie(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&ZY(i,s),MM!==null&&MM(i,s)};var Td=T(null);function Jk(){var i=Td.current;return i!==null?i:zr.pooledCache}function Yy(i,s){s===null?X(Td,Td.current):X(Td,s.pool)}function TM(){var i=Jk();return i===null?null:{parent:Tn._currentValue,pool:i}}var sm=Error(a(460)),eC=Error(a(474)),Qy=Error(a(542)),Zy={then:function(){}};function jM(i){return i=i.status,i==="fulfilled"||i==="rejected"}function _M(i,s,u){switch(u=i[u],u===void 0?i.push(s):u!==s&&(s.then(Pl,Pl),s=u),s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,NM(i),i;default:if(typeof s.status=="string")s.then(Pl,Pl);else{if(i=zr,i!==null&&100<i.shellSuspendCounter)throw Error(a(482));i=s,i.status="pending",i.then(function(f){if(s.status==="pending"){var b=s;b.status="fulfilled",b.value=f}},function(f){if(s.status==="pending"){var b=s;b.status="rejected",b.reason=f}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw i=s.reason,NM(i),i}throw _d=s,sm}}function jd(i){try{var s=i._init;return s(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(_d=u,sm):u}}var _d=null;function PM(){if(_d===null)throw Error(a(459));var i=_d;return _d=null,i}function NM(i){if(i===sm||i===Qy)throw Error(a(483))}var lm=null,wg=0;function Jy(i){var s=wg;return wg+=1,lm===null&&(lm=[]),_M(lm,i,s)}function xg(i,s){s=s.props.ref,i.ref=s!==void 0?s:null}function ew(i,s){throw s.$$typeof===y?Error(a(525)):(i=Object.prototype.toString.call(s),Error(a(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i)))}function OM(i){function s(ce,ie){if(i){var de=ce.deletions;de===null?(ce.deletions=[ie],ce.flags|=16):de.push(ie)}}function u(ce,ie){if(!i)return null;for(;ie!==null;)s(ce,ie),ie=ie.sibling;return null}function f(ce){for(var ie=new Map;ce!==null;)ce.key!==null?ie.set(ce.key,ce):ie.set(ce.index,ce),ce=ce.sibling;return ie}function b(ce,ie){return ce=Ol(ce,ie),ce.index=0,ce.sibling=null,ce}function E(ce,ie,de){return ce.index=de,i?(de=ce.alternate,de!==null?(de=de.index,de<ie?(ce.flags|=67108866,ie):de):(ce.flags|=67108866,ie)):(ce.flags|=1048576,ie)}function M(ce){return i&&ce.alternate===null&&(ce.flags|=67108866),ce}function K(ce,ie,de,ye){return ie===null||ie.tag!==6?(ie=Hk(de,ce.mode,ye),ie.return=ce,ie):(ie=b(ie,de),ie.return=ce,ie)}function ee(ce,ie,de,ye){var st=de.type;return st===k?be(ce,ie,de.props.children,ye,de.key):ie!==null&&(ie.elementType===st||typeof st=="object"&&st!==null&&st.$$typeof===P&&jd(st)===ie.type)?(ie=b(ie,de.props),xg(ie,de),ie.return=ce,ie):(ie=Uy(de.type,de.key,de.props,null,ce.mode,ye),xg(ie,de),ie.return=ce,ie)}function pe(ce,ie,de,ye){return ie===null||ie.tag!==4||ie.stateNode.containerInfo!==de.containerInfo||ie.stateNode.implementation!==de.implementation?(ie=qk(de,ce.mode,ye),ie.return=ce,ie):(ie=b(ie,de.children||[]),ie.return=ce,ie)}function be(ce,ie,de,ye,st){return ie===null||ie.tag!==7?(ie=$d(de,ce.mode,ye,st),ie.return=ce,ie):(ie=b(ie,de),ie.return=ce,ie)}function xe(ce,ie,de){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return ie=Hk(""+ie,ce.mode,de),ie.return=ce,ie;if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case w:return de=Uy(ie.type,ie.key,ie.props,null,ce.mode,de),xg(de,ie),de.return=ce,de;case x:return ie=qk(ie,ce.mode,de),ie.return=ce,ie;case P:return ie=jd(ie),xe(ce,ie,de)}if(O(ie)||H(ie))return ie=$d(ie,ce.mode,de,null),ie.return=ce,ie;if(typeof ie.then=="function")return xe(ce,Jy(ie),de);if(ie.$$typeof===S)return xe(ce,Xy(ce,ie),de);ew(ce,ie)}return null}function me(ce,ie,de,ye){var st=ie!==null?ie.key:null;if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return st!==null?null:K(ce,ie,""+de,ye);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case w:return de.key===st?ee(ce,ie,de,ye):null;case x:return de.key===st?pe(ce,ie,de,ye):null;case P:return de=jd(de),me(ce,ie,de,ye)}if(O(de)||H(de))return st!==null?null:be(ce,ie,de,ye,null);if(typeof de.then=="function")return me(ce,ie,Jy(de),ye);if(de.$$typeof===S)return me(ce,ie,Xy(ce,de),ye);ew(ce,de)}return null}function ge(ce,ie,de,ye,st){if(typeof ye=="string"&&ye!==""||typeof ye=="number"||typeof ye=="bigint")return ce=ce.get(de)||null,K(ie,ce,""+ye,st);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case w:return ce=ce.get(ye.key===null?de:ye.key)||null,ee(ie,ce,ye,st);case x:return ce=ce.get(ye.key===null?de:ye.key)||null,pe(ie,ce,ye,st);case P:return ye=jd(ye),ge(ce,ie,de,ye,st)}if(O(ye)||H(ye))return ce=ce.get(de)||null,be(ie,ce,ye,st,null);if(typeof ye.then=="function")return ge(ce,ie,de,Jy(ye),st);if(ye.$$typeof===S)return ge(ce,ie,de,Xy(ie,ye),st);ew(ie,ye)}return null}function tt(ce,ie,de,ye){for(var st=null,hr=null,nt=ie,Mt=ie=0,Qt=null;nt!==null&&Mt<de.length;Mt++){nt.index>Mt?(Qt=nt,nt=null):Qt=nt.sibling;var gr=me(ce,nt,de[Mt],ye);if(gr===null){nt===null&&(nt=Qt);break}i&&nt&&gr.alternate===null&&s(ce,nt),ie=E(gr,ie,Mt),hr===null?st=gr:hr.sibling=gr,hr=gr,nt=Qt}if(Mt===de.length)return u(ce,nt),ar&&Rl(ce,Mt),st;if(nt===null){for(;Mt<de.length;Mt++)nt=xe(ce,de[Mt],ye),nt!==null&&(ie=E(nt,ie,Mt),hr===null?st=nt:hr.sibling=nt,hr=nt);return ar&&Rl(ce,Mt),st}for(nt=f(nt);Mt<de.length;Mt++)Qt=ge(nt,ce,Mt,de[Mt],ye),Qt!==null&&(i&&Qt.alternate!==null&&nt.delete(Qt.key===null?Mt:Qt.key),ie=E(Qt,ie,Mt),hr===null?st=Qt:hr.sibling=Qt,hr=Qt);return i&&nt.forEach(function(lc){return s(ce,lc)}),ar&&Rl(ce,Mt),st}function ht(ce,ie,de,ye){if(de==null)throw Error(a(151));for(var st=null,hr=null,nt=ie,Mt=ie=0,Qt=null,gr=de.next();nt!==null&&!gr.done;Mt++,gr=de.next()){nt.index>Mt?(Qt=nt,nt=null):Qt=nt.sibling;var lc=me(ce,nt,gr.value,ye);if(lc===null){nt===null&&(nt=Qt);break}i&&nt&&lc.alternate===null&&s(ce,nt),ie=E(lc,ie,Mt),hr===null?st=lc:hr.sibling=lc,hr=lc,nt=Qt}if(gr.done)return u(ce,nt),ar&&Rl(ce,Mt),st;if(nt===null){for(;!gr.done;Mt++,gr=de.next())gr=xe(ce,gr.value,ye),gr!==null&&(ie=E(gr,ie,Mt),hr===null?st=gr:hr.sibling=gr,hr=gr);return ar&&Rl(ce,Mt),st}for(nt=f(nt);!gr.done;Mt++,gr=de.next())gr=ge(nt,ce,Mt,gr.value,ye),gr!==null&&(i&&gr.alternate!==null&&nt.delete(gr.key===null?Mt:gr.key),ie=E(gr,ie,Mt),hr===null?st=gr:hr.sibling=gr,hr=gr);return i&&nt.forEach(function(lZ){return s(ce,lZ)}),ar&&Rl(ce,Mt),st}function Pr(ce,ie,de,ye){if(typeof de=="object"&&de!==null&&de.type===k&&de.key===null&&(de=de.props.children),typeof de=="object"&&de!==null){switch(de.$$typeof){case w:e:{for(var st=de.key;ie!==null;){if(ie.key===st){if(st=de.type,st===k){if(ie.tag===7){u(ce,ie.sibling),ye=b(ie,de.props.children),ye.return=ce,ce=ye;break e}}else if(ie.elementType===st||typeof st=="object"&&st!==null&&st.$$typeof===P&&jd(st)===ie.type){u(ce,ie.sibling),ye=b(ie,de.props),xg(ye,de),ye.return=ce,ce=ye;break e}u(ce,ie);break}else s(ce,ie);ie=ie.sibling}de.type===k?(ye=$d(de.props.children,ce.mode,ye,de.key),ye.return=ce,ce=ye):(ye=Uy(de.type,de.key,de.props,null,ce.mode,ye),xg(ye,de),ye.return=ce,ce=ye)}return M(ce);case x:e:{for(st=de.key;ie!==null;){if(ie.key===st)if(ie.tag===4&&ie.stateNode.containerInfo===de.containerInfo&&ie.stateNode.implementation===de.implementation){u(ce,ie.sibling),ye=b(ie,de.children||[]),ye.return=ce,ce=ye;break e}else{u(ce,ie);break}else s(ce,ie);ie=ie.sibling}ye=qk(de,ce.mode,ye),ye.return=ce,ce=ye}return M(ce);case P:return de=jd(de),Pr(ce,ie,de,ye)}if(O(de))return tt(ce,ie,de,ye);if(H(de)){if(st=H(de),typeof st!="function")throw Error(a(150));return de=st.call(de),ht(ce,ie,de,ye)}if(typeof de.then=="function")return Pr(ce,ie,Jy(de),ye);if(de.$$typeof===S)return Pr(ce,ie,Xy(ce,de),ye);ew(ce,de)}return typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint"?(de=""+de,ie!==null&&ie.tag===6?(u(ce,ie.sibling),ye=b(ie,de),ye.return=ce,ce=ye):(u(ce,ie),ye=Hk(de,ce.mode,ye),ye.return=ce,ce=ye),M(ce)):u(ce,ie)}return function(ce,ie,de,ye){try{wg=0;var st=Pr(ce,ie,de,ye);return lm=null,st}catch(nt){if(nt===sm||nt===Qy)throw nt;var hr=Yi(29,nt,null,ce.mode);return hr.lanes=ye,hr.return=ce,hr}}}var Pd=OM(!0),RM=OM(!1),Vu=!1;function tC(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function rC(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Uu(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ku(i,s,u){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(vr&2)!==0){var b=f.pending;return b===null?s.next=s:(s.next=b.next,b.next=s),f.pending=s,s=Vy(i),EM(i,null,u),s}return Wy(i,f,s,u),Vy(i)}function Eg(i,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194048)!==0)){var f=s.lanes;f&=i.pendingLanes,u|=f,s.lanes=u,Re(i,u)}}function nC(i,s){var u=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,u===f)){var b=null,E=null;if(u=u.firstBaseUpdate,u!==null){do{var M={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};E===null?b=E=M:E=E.next=M,u=u.next}while(u!==null);E===null?b=E=s:E=E.next=s}else b=E=s;u={baseState:f.baseState,firstBaseUpdate:b,lastBaseUpdate:E,shared:f.shared,callbacks:f.callbacks},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=s:i.next=s,u.lastBaseUpdate=s}var aC=!1;function kg(){if(aC){var i=om;if(i!==null)throw i}}function Cg(i,s,u,f){aC=!1;var b=i.updateQueue;Vu=!1;var E=b.firstBaseUpdate,M=b.lastBaseUpdate,K=b.shared.pending;if(K!==null){b.shared.pending=null;var ee=K,pe=ee.next;ee.next=null,M===null?E=pe:M.next=pe,M=ee;var be=i.alternate;be!==null&&(be=be.updateQueue,K=be.lastBaseUpdate,K!==M&&(K===null?be.firstBaseUpdate=pe:K.next=pe,be.lastBaseUpdate=ee))}if(E!==null){var xe=b.baseState;M=0,be=pe=ee=null,K=E;do{var me=K.lane&-536870913,ge=me!==K.lane;if(ge?(Yt&me)===me:(f&me)===me){me!==0&&me===im&&(aC=!0),be!==null&&(be=be.next={lane:0,tag:K.tag,payload:K.payload,callback:null,next:null});e:{var tt=i,ht=K;me=s;var Pr=u;switch(ht.tag){case 1:if(tt=ht.payload,typeof tt=="function"){xe=tt.call(Pr,xe,me);break e}xe=tt;break e;case 3:tt.flags=tt.flags&-65537|128;case 0:if(tt=ht.payload,me=typeof tt=="function"?tt.call(Pr,xe,me):tt,me==null)break e;xe=v({},xe,me);break e;case 2:Vu=!0}}me=K.callback,me!==null&&(i.flags|=64,ge&&(i.flags|=8192),ge=b.callbacks,ge===null?b.callbacks=[me]:ge.push(me))}else ge={lane:me,tag:K.tag,payload:K.payload,callback:K.callback,next:null},be===null?(pe=be=ge,ee=xe):be=be.next=ge,M|=me;if(K=K.next,K===null){if(K=b.shared.pending,K===null)break;ge=K,K=ge.next,ge.next=null,b.lastBaseUpdate=ge,b.shared.pending=null}}while(!0);be===null&&(ee=xe),b.baseState=ee,b.firstBaseUpdate=pe,b.lastBaseUpdate=be,E===null&&(b.shared.lanes=0),Zu|=M,i.lanes=M,i.memoizedState=xe}}function LM(i,s){if(typeof i!="function")throw Error(a(191,i));i.call(s)}function zM(i,s){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)LM(u[i],s)}var um=T(null),tw=T(0);function HM(i,s){i=Yl,X(tw,i),X(um,s),Yl=i|s.baseLanes}function iC(){X(tw,Yl),X(um,um.current)}function oC(){Yl=tw.current,V(um),V(tw)}var Qi=T(null),ss=null;function Gu(i){var s=i.alternate;X(Sn,Sn.current&1),X(Qi,i),ss===null&&(s===null||um.current!==null||s.memoizedState!==null)&&(ss=i)}function sC(i){X(Sn,Sn.current),X(Qi,i),ss===null&&(ss=i)}function qM(i){i.tag===22?(X(Sn,Sn.current),X(Qi,i),ss===null&&(ss=i)):Xu(i)}function Xu(){X(Sn,Sn.current),X(Qi,Qi.current)}function Zi(i){V(Qi),ss===i&&(ss=null),V(Sn)}var Sn=T(0);function rw(i){for(var s=i;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||d8(u)||p8(u)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Hl=0,Ft=null,jr=null,jn=null,nw=!1,cm=!1,Nd=!1,aw=0,Sg=0,dm=null,eQ=0;function bn(){throw Error(a(321))}function lC(i,s){if(s===null)return!1;for(var u=0;u<s.length&&u<i.length;u++)if(!Xi(i[u],s[u]))return!1;return!0}function uC(i,s,u,f,b,E){return Hl=E,Ft=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,W.H=i===null||i.memoizedState===null?FT:CC,Nd=!1,E=u(f,b),Nd=!1,cm&&(E=VM(s,u,f,b)),WM(i),E}function WM(i){W.H=Ag;var s=jr!==null&&jr.next!==null;if(Hl=0,jn=jr=Ft=null,nw=!1,Sg=0,dm=null,s)throw Error(a(300));i===null||_n||(i=i.dependencies,i!==null&&Gy(i)&&(_n=!0))}function VM(i,s,u,f){Ft=i;var b=0;do{if(cm&&(dm=null),Sg=0,cm=!1,25<=b)throw Error(a(301));if(b+=1,jn=jr=null,i.updateQueue!=null){var E=i.updateQueue;E.lastEffect=null,E.events=null,E.stores=null,E.memoCache!=null&&(E.memoCache.index=0)}W.H=DT,E=s(u,f)}while(cm);return E}function tQ(){var i=W.H,s=i.useState()[0];return s=typeof s.then=="function"?Fg(s):s,i=i.useState()[0],(jr!==null?jr.memoizedState:null)!==i&&(Ft.flags|=1024),s}function cC(){var i=aw!==0;return aw=0,i}function dC(i,s,u){s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~u}function pC(i){if(nw){for(i=i.memoizedState;i!==null;){var s=i.queue;s!==null&&(s.pending=null),i=i.next}nw=!1}Hl=0,jn=jr=Ft=null,cm=!1,Sg=aw=0,dm=null}function ni(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jn===null?Ft.memoizedState=jn=i:jn=jn.next=i,jn}function Fn(){if(jr===null){var i=Ft.alternate;i=i!==null?i.memoizedState:null}else i=jr.next;var s=jn===null?Ft.memoizedState:jn.next;if(s!==null)jn=s,jr=i;else{if(i===null)throw Ft.alternate===null?Error(a(467)):Error(a(310));jr=i,i={memoizedState:jr.memoizedState,baseState:jr.baseState,baseQueue:jr.baseQueue,queue:jr.queue,next:null},jn===null?Ft.memoizedState=jn=i:jn=jn.next=i}return jn}function iw(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Fg(i){var s=Sg;return Sg+=1,dm===null&&(dm=[]),i=_M(dm,i,s),s=Ft,(jn===null?s.memoizedState:jn.next)===null&&(s=s.alternate,W.H=s===null||s.memoizedState===null?FT:CC),i}function ow(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Fg(i);if(i.$$typeof===S)return ba(i)}throw Error(a(438,String(i)))}function fC(i){var s=null,u=Ft.updateQueue;if(u!==null&&(s=u.memoCache),s==null){var f=Ft.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(s={data:f.data.map(function(b){return b.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),u===null&&(u=iw(),Ft.updateQueue=u),u.memoCache=s,u=s.data[s.index],u===void 0)for(u=s.data[s.index]=Array(i),f=0;f<i;f++)u[f]=R;return s.index++,u}function ql(i,s){return typeof s=="function"?s(i):s}function sw(i){var s=Fn();return mC(s,jr,i)}function mC(i,s,u){var f=i.queue;if(f===null)throw Error(a(311));f.lastRenderedReducer=u;var b=i.baseQueue,E=f.pending;if(E!==null){if(b!==null){var M=b.next;b.next=E.next,E.next=M}s.baseQueue=b=E,f.pending=null}if(E=i.baseState,b===null)i.memoizedState=E;else{s=b.next;var K=M=null,ee=null,pe=s,be=!1;do{var xe=pe.lane&-536870913;if(xe!==pe.lane?(Yt&xe)===xe:(Hl&xe)===xe){var me=pe.revertLane;if(me===0)ee!==null&&(ee=ee.next={lane:0,revertLane:0,gesture:null,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null}),xe===im&&(be=!0);else if((Hl&me)===me){pe=pe.next,me===im&&(be=!0);continue}else xe={lane:0,revertLane:pe.revertLane,gesture:null,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null},ee===null?(K=ee=xe,M=E):ee=ee.next=xe,Ft.lanes|=me,Zu|=me;xe=pe.action,Nd&&u(E,xe),E=pe.hasEagerState?pe.eagerState:u(E,xe)}else me={lane:xe,revertLane:pe.revertLane,gesture:pe.gesture,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null},ee===null?(K=ee=me,M=E):ee=ee.next=me,Ft.lanes|=xe,Zu|=xe;pe=pe.next}while(pe!==null&&pe!==s);if(ee===null?M=E:ee.next=K,!Xi(E,i.memoizedState)&&(_n=!0,be&&(u=om,u!==null)))throw u;i.memoizedState=E,i.baseState=M,i.baseQueue=ee,f.lastRenderedState=E}return b===null&&(f.lanes=0),[i.memoizedState,f.dispatch]}function hC(i){var s=Fn(),u=s.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=i;var f=u.dispatch,b=u.pending,E=s.memoizedState;if(b!==null){u.pending=null;var M=b=b.next;do E=i(E,M.action),M=M.next;while(M!==b);Xi(E,s.memoizedState)||(_n=!0),s.memoizedState=E,s.baseQueue===null&&(s.baseState=E),u.lastRenderedState=E}return[E,f]}function UM(i,s,u){var f=Ft,b=Fn(),E=ar;if(E){if(u===void 0)throw Error(a(407));u=u()}else u=s();var M=!Xi((jr||b).memoizedState,u);if(M&&(b.memoizedState=u,_n=!0),b=b.queue,bC(XM.bind(null,f,b,i),[i]),b.getSnapshot!==s||M||jn!==null&&jn.memoizedState.tag&1){if(f.flags|=2048,pm(9,{destroy:void 0},GM.bind(null,f,b,u,s),null),zr===null)throw Error(a(349));E||(Hl&127)!==0||KM(f,s,u)}return u}function KM(i,s,u){i.flags|=16384,i={getSnapshot:s,value:u},s=Ft.updateQueue,s===null?(s=iw(),Ft.updateQueue=s,s.stores=[i]):(u=s.stores,u===null?s.stores=[i]:u.push(i))}function GM(i,s,u,f){s.value=u,s.getSnapshot=f,YM(s)&&QM(i)}function XM(i,s,u){return u(function(){YM(s)&&QM(i)})}function YM(i){var s=i.getSnapshot;i=i.value;try{var u=s();return!Xi(i,u)}catch{return!0}}function QM(i){var s=Ad(i,2);s!==null&&ki(s,i,2)}function gC(i){var s=ni();if(typeof i=="function"){var u=i;if(i=u(),Nd){je(!0);try{u()}finally{je(!1)}}}return s.memoizedState=s.baseState=i,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ql,lastRenderedState:i},s}function ZM(i,s,u,f){return i.baseState=u,mC(i,jr,typeof f=="function"?f:ql)}function rQ(i,s,u,f,b){if(cw(i))throw Error(a(485));if(i=s.action,i!==null){var E={payload:b,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){E.listeners.push(M)}};W.T!==null?u(!0):E.isTransition=!1,f(E),u=s.pending,u===null?(E.next=s.pending=E,JM(s,E)):(E.next=u.next,s.pending=u.next=E)}}function JM(i,s){var u=s.action,f=s.payload,b=i.state;if(s.isTransition){var E=W.T,M={};W.T=M;try{var K=u(b,f),ee=W.S;ee!==null&&ee(M,K),eT(i,s,K)}catch(pe){vC(i,s,pe)}finally{E!==null&&M.types!==null&&(E.types=M.types),W.T=E}}else try{E=u(b,f),eT(i,s,E)}catch(pe){vC(i,s,pe)}}function eT(i,s,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(f){tT(i,s,f)},function(f){return vC(i,s,f)}):tT(i,s,u)}function tT(i,s,u){s.status="fulfilled",s.value=u,rT(s),i.state=u,s=i.pending,s!==null&&(u=s.next,u===s?i.pending=null:(u=u.next,s.next=u,JM(i,u)))}function vC(i,s,u){var f=i.pending;if(i.pending=null,f!==null){f=f.next;do s.status="rejected",s.reason=u,rT(s),s=s.next;while(s!==f)}i.action=null}function rT(i){i=i.listeners;for(var s=0;s<i.length;s++)(0,i[s])()}function nT(i,s){return s}function aT(i,s){if(ar){var u=zr.formState;if(u!==null){e:{var f=Ft;if(ar){if(en){t:{for(var b=en,E=Do;b.nodeType!==8;){if(!E){b=null;break t}if(b=Ao(b.nextSibling),b===null){b=null;break t}}E=b.data,b=E==="F!"||E==="F"?b:null}if(b){en=Ao(b.nextSibling),f=b.data==="F!";break e}}qu(f)}f=!1}f&&(s=u[0])}}return u=ni(),u.memoizedState=u.baseState=s,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:nT,lastRenderedState:s},u.queue=f,u=kT.bind(null,Ft,f),f.dispatch=u,f=gC(!1),E=kC.bind(null,Ft,!1,f.queue),f=ni(),b={state:s,dispatch:null,action:i,pending:null},f.queue=b,u=rQ.bind(null,Ft,b,E,u),b.dispatch=u,f.memoizedState=i,[s,u,!1]}function iT(i){var s=Fn();return oT(s,jr,i)}function oT(i,s,u){if(s=mC(i,s,nT)[0],i=sw(ql)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var f=Fg(s)}catch(M){throw M===sm?Qy:M}else f=s;s=Fn();var b=s.queue,E=b.dispatch;return u!==s.memoizedState&&(Ft.flags|=2048,pm(9,{destroy:void 0},nQ.bind(null,b,u),null)),[f,E,i]}function nQ(i,s){i.action=s}function sT(i){var s=Fn(),u=jr;if(u!==null)return oT(s,u,i);Fn(),s=s.memoizedState,u=Fn();var f=u.queue.dispatch;return u.memoizedState=i,[s,f,!1]}function pm(i,s,u,f){return i={tag:i,create:u,deps:f,inst:s,next:null},s=Ft.updateQueue,s===null&&(s=iw(),Ft.updateQueue=s),u=s.lastEffect,u===null?s.lastEffect=i.next=i:(f=u.next,u.next=i,i.next=f,s.lastEffect=i),i}function lT(){return Fn().memoizedState}function lw(i,s,u,f){var b=ni();Ft.flags|=i,b.memoizedState=pm(1|s,{destroy:void 0},u,f===void 0?null:f)}function uw(i,s,u,f){var b=Fn();f=f===void 0?null:f;var E=b.memoizedState.inst;jr!==null&&f!==null&&lC(f,jr.memoizedState.deps)?b.memoizedState=pm(s,E,u,f):(Ft.flags|=i,b.memoizedState=pm(1|s,E,u,f))}function uT(i,s){lw(8390656,8,i,s)}function bC(i,s){uw(2048,8,i,s)}function aQ(i){Ft.flags|=4;var s=Ft.updateQueue;if(s===null)s=iw(),Ft.updateQueue=s,s.events=[i];else{var u=s.events;u===null?s.events=[i]:u.push(i)}}function cT(i){var s=Fn().memoizedState;return aQ({ref:s,nextImpl:i}),function(){if((vr&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}function dT(i,s){return uw(4,2,i,s)}function pT(i,s){return uw(4,4,i,s)}function fT(i,s){if(typeof s=="function"){i=i();var u=s(i);return function(){typeof u=="function"?u():s(null)}}if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function mT(i,s,u){u=u!=null?u.concat([i]):null,uw(4,4,fT.bind(null,s,i),u)}function yC(){}function hT(i,s){var u=Fn();s=s===void 0?null:s;var f=u.memoizedState;return s!==null&&lC(s,f[1])?f[0]:(u.memoizedState=[i,s],i)}function gT(i,s){var u=Fn();s=s===void 0?null:s;var f=u.memoizedState;if(s!==null&&lC(s,f[1]))return f[0];if(f=i(),Nd){je(!0);try{i()}finally{je(!1)}}return u.memoizedState=[f,s],f}function wC(i,s,u){return u===void 0||(Hl&1073741824)!==0&&(Yt&261930)===0?i.memoizedState=s:(i.memoizedState=u,i=vj(),Ft.lanes|=i,Zu|=i,u)}function vT(i,s,u,f){return Xi(u,s)?u:um.current!==null?(i=wC(i,u,f),Xi(i,s)||(_n=!0),i):(Hl&42)===0||(Hl&1073741824)!==0&&(Yt&261930)===0?(_n=!0,i.memoizedState=u):(i=vj(),Ft.lanes|=i,Zu|=i,s)}function bT(i,s,u,f,b){var E=z.p;z.p=E!==0&&8>E?E:8;var M=W.T,K={};W.T=K,kC(i,!1,s,u);try{var ee=b(),pe=W.S;if(pe!==null&&pe(K,ee),ee!==null&&typeof ee=="object"&&typeof ee.then=="function"){var be=JY(ee,f);Dg(i,s,be,to(i))}else Dg(i,s,f,to(i))}catch(xe){Dg(i,s,{then:function(){},status:"rejected",reason:xe},to())}finally{z.p=E,M!==null&&K.types!==null&&(M.types=K.types),W.T=M}}function iQ(){}function xC(i,s,u,f){if(i.tag!==5)throw Error(a(476));var b=yT(i).queue;bT(i,b,s,Y,u===null?iQ:function(){return wT(i),u(f)})}function yT(i){var s=i.memoizedState;if(s!==null)return s;s={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ql,lastRenderedState:Y},next:null};var u={};return s.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ql,lastRenderedState:u},next:null},i.memoizedState=s,i=i.alternate,i!==null&&(i.memoizedState=s),s}function wT(i){var s=yT(i);s.next===null&&(s=i.alternate.memoizedState),Dg(i,s.next.queue,{},to())}function EC(){return ba(Wg)}function xT(){return Fn().memoizedState}function ET(){return Fn().memoizedState}function oQ(i){for(var s=i.return;s!==null;){switch(s.tag){case 24:case 3:var u=to();i=Uu(u);var f=Ku(s,i,u);f!==null&&(ki(f,s,u),Eg(f,s,u)),s={cache:Qk()},i.payload=s;return}s=s.return}}function sQ(i,s,u){var f=to();u={lane:f,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},cw(i)?CT(s,u):(u=Lk(i,s,u,f),u!==null&&(ki(u,i,f),ST(u,s,f)))}function kT(i,s,u){var f=to();Dg(i,s,u,f)}function Dg(i,s,u,f){var b={lane:f,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(cw(i))CT(s,b);else{var E=i.alternate;if(i.lanes===0&&(E===null||E.lanes===0)&&(E=s.lastRenderedReducer,E!==null))try{var M=s.lastRenderedState,K=E(M,u);if(b.hasEagerState=!0,b.eagerState=K,Xi(K,M))return Wy(i,s,b,0),zr===null&&qy(),!1}catch{}if(u=Lk(i,s,b,f),u!==null)return ki(u,i,f),ST(u,s,f),!0}return!1}function kC(i,s,u,f){if(f={lane:2,revertLane:t8(),gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},cw(i)){if(s)throw Error(a(479))}else s=Lk(i,u,f,2),s!==null&&ki(s,i,2)}function cw(i){var s=i.alternate;return i===Ft||s!==null&&s===Ft}function CT(i,s){cm=nw=!0;var u=i.pending;u===null?s.next=s:(s.next=u.next,u.next=s),i.pending=s}function ST(i,s,u){if((u&4194048)!==0){var f=s.lanes;f&=i.pendingLanes,u|=f,s.lanes=u,Re(i,u)}}var Ag={readContext:ba,use:ow,useCallback:bn,useContext:bn,useEffect:bn,useImperativeHandle:bn,useLayoutEffect:bn,useInsertionEffect:bn,useMemo:bn,useReducer:bn,useRef:bn,useState:bn,useDebugValue:bn,useDeferredValue:bn,useTransition:bn,useSyncExternalStore:bn,useId:bn,useHostTransitionStatus:bn,useFormState:bn,useActionState:bn,useOptimistic:bn,useMemoCache:bn,useCacheRefresh:bn};Ag.useEffectEvent=bn;var FT={readContext:ba,use:ow,useCallback:function(i,s){return ni().memoizedState=[i,s===void 0?null:s],i},useContext:ba,useEffect:uT,useImperativeHandle:function(i,s,u){u=u!=null?u.concat([i]):null,lw(4194308,4,fT.bind(null,s,i),u)},useLayoutEffect:function(i,s){return lw(4194308,4,i,s)},useInsertionEffect:function(i,s){lw(4,2,i,s)},useMemo:function(i,s){var u=ni();s=s===void 0?null:s;var f=i();if(Nd){je(!0);try{i()}finally{je(!1)}}return u.memoizedState=[f,s],f},useReducer:function(i,s,u){var f=ni();if(u!==void 0){var b=u(s);if(Nd){je(!0);try{u(s)}finally{je(!1)}}}else b=s;return f.memoizedState=f.baseState=b,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:b},f.queue=i,i=i.dispatch=sQ.bind(null,Ft,i),[f.memoizedState,i]},useRef:function(i){var s=ni();return i={current:i},s.memoizedState=i},useState:function(i){i=gC(i);var s=i.queue,u=kT.bind(null,Ft,s);return s.dispatch=u,[i.memoizedState,u]},useDebugValue:yC,useDeferredValue:function(i,s){var u=ni();return wC(u,i,s)},useTransition:function(){var i=gC(!1);return i=bT.bind(null,Ft,i.queue,!0,!1),ni().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,s,u){var f=Ft,b=ni();if(ar){if(u===void 0)throw Error(a(407));u=u()}else{if(u=s(),zr===null)throw Error(a(349));(Yt&127)!==0||KM(f,s,u)}b.memoizedState=u;var E={value:u,getSnapshot:s};return b.queue=E,uT(XM.bind(null,f,E,i),[i]),f.flags|=2048,pm(9,{destroy:void 0},GM.bind(null,f,E,u,s),null),u},useId:function(){var i=ni(),s=zr.identifierPrefix;if(ar){var u=Hs,f=zs;u=(f&~(1<<32-rt(f)-1)).toString(32)+u,s="_"+s+"R_"+u,u=aw++,0<u&&(s+="H"+u.toString(32)),s+="_"}else u=eQ++,s="_"+s+"r_"+u.toString(32)+"_";return i.memoizedState=s},useHostTransitionStatus:EC,useFormState:aT,useActionState:aT,useOptimistic:function(i){var s=ni();s.memoizedState=s.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=u,s=kC.bind(null,Ft,!0,u),u.dispatch=s,[i,s]},useMemoCache:fC,useCacheRefresh:function(){return ni().memoizedState=oQ.bind(null,Ft)},useEffectEvent:function(i){var s=ni(),u={impl:i};return s.memoizedState=u,function(){if((vr&2)!==0)throw Error(a(440));return u.impl.apply(void 0,arguments)}}},CC={readContext:ba,use:ow,useCallback:hT,useContext:ba,useEffect:bC,useImperativeHandle:mT,useInsertionEffect:dT,useLayoutEffect:pT,useMemo:gT,useReducer:sw,useRef:lT,useState:function(){return sw(ql)},useDebugValue:yC,useDeferredValue:function(i,s){var u=Fn();return vT(u,jr.memoizedState,i,s)},useTransition:function(){var i=sw(ql)[0],s=Fn().memoizedState;return[typeof i=="boolean"?i:Fg(i),s]},useSyncExternalStore:UM,useId:xT,useHostTransitionStatus:EC,useFormState:iT,useActionState:iT,useOptimistic:function(i,s){var u=Fn();return ZM(u,jr,i,s)},useMemoCache:fC,useCacheRefresh:ET};CC.useEffectEvent=cT;var DT={readContext:ba,use:ow,useCallback:hT,useContext:ba,useEffect:bC,useImperativeHandle:mT,useInsertionEffect:dT,useLayoutEffect:pT,useMemo:gT,useReducer:hC,useRef:lT,useState:function(){return hC(ql)},useDebugValue:yC,useDeferredValue:function(i,s){var u=Fn();return jr===null?wC(u,i,s):vT(u,jr.memoizedState,i,s)},useTransition:function(){var i=hC(ql)[0],s=Fn().memoizedState;return[typeof i=="boolean"?i:Fg(i),s]},useSyncExternalStore:UM,useId:xT,useHostTransitionStatus:EC,useFormState:sT,useActionState:sT,useOptimistic:function(i,s){var u=Fn();return jr!==null?ZM(u,jr,i,s):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:fC,useCacheRefresh:ET};DT.useEffectEvent=cT;function SC(i,s,u,f){s=i.memoizedState,u=u(f,s),u=u==null?s:v({},s,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var FC={enqueueSetState:function(i,s,u){i=i._reactInternals;var f=to(),b=Uu(f);b.payload=s,u!=null&&(b.callback=u),s=Ku(i,b,f),s!==null&&(ki(s,i,f),Eg(s,i,f))},enqueueReplaceState:function(i,s,u){i=i._reactInternals;var f=to(),b=Uu(f);b.tag=1,b.payload=s,u!=null&&(b.callback=u),s=Ku(i,b,f),s!==null&&(ki(s,i,f),Eg(s,i,f))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var u=to(),f=Uu(u);f.tag=2,s!=null&&(f.callback=s),s=Ku(i,f,u),s!==null&&(ki(s,i,u),Eg(s,i,u))}};function AT(i,s,u,f,b,E,M){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,E,M):s.prototype&&s.prototype.isPureReactComponent?!mg(u,f)||!mg(b,E):!0}function $T(i,s,u,f){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,f),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,f),s.state!==i&&FC.enqueueReplaceState(s,s.state,null)}function Od(i,s){var u=s;if("ref"in s){u={};for(var f in s)f!=="ref"&&(u[f]=s[f])}if(i=i.defaultProps){u===s&&(u=v({},u));for(var b in i)u[b]===void 0&&(u[b]=i[b])}return u}function BT(i){Hy(i)}function IT(i){console.error(i)}function MT(i){Hy(i)}function dw(i,s){try{var u=i.onUncaughtError;u(s.value,{componentStack:s.stack})}catch(f){setTimeout(function(){throw f})}}function TT(i,s,u){try{var f=i.onCaughtError;f(u.value,{componentStack:u.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(b){setTimeout(function(){throw b})}}function DC(i,s,u){return u=Uu(u),u.tag=3,u.payload={element:null},u.callback=function(){dw(i,s)},u}function jT(i){return i=Uu(i),i.tag=3,i}function _T(i,s,u,f){var b=u.type.getDerivedStateFromError;if(typeof b=="function"){var E=f.value;i.payload=function(){return b(E)},i.callback=function(){TT(s,u,f)}}var M=u.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(i.callback=function(){TT(s,u,f),typeof b!="function"&&(Ju===null?Ju=new Set([this]):Ju.add(this));var K=f.stack;this.componentDidCatch(f.value,{componentStack:K!==null?K:""})})}function lQ(i,s,u,f,b){if(u.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(s=u.alternate,s!==null&&am(s,u,b,!0),u=Qi.current,u!==null){switch(u.tag){case 31:case 13:return ss===null?kw():u.alternate===null&&yn===0&&(yn=3),u.flags&=-257,u.flags|=65536,u.lanes=b,f===Zy?u.flags|=16384:(s=u.updateQueue,s===null?u.updateQueue=new Set([f]):s.add(f),ZC(i,f,b)),!1;case 22:return u.flags|=65536,f===Zy?u.flags|=16384:(s=u.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([f])},u.updateQueue=s):(u=s.retryQueue,u===null?s.retryQueue=new Set([f]):u.add(f)),ZC(i,f,b)),!1}throw Error(a(435,u.tag))}return ZC(i,f,b),kw(),!1}if(ar)return s=Qi.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=b,f!==Uk&&(i=Error(a(422),{cause:f}),vg(Co(i,u)))):(f!==Uk&&(s=Error(a(423),{cause:f}),vg(Co(s,u))),i=i.current.alternate,i.flags|=65536,b&=-b,i.lanes|=b,f=Co(f,u),b=DC(i.stateNode,f,b),nC(i,b),yn!==4&&(yn=2)),!1;var E=Error(a(520),{cause:f});if(E=Co(E,u),Pg===null?Pg=[E]:Pg.push(E),yn!==4&&(yn=2),s===null)return!0;f=Co(f,u),u=s;do{switch(u.tag){case 3:return u.flags|=65536,i=b&-b,u.lanes|=i,i=DC(u.stateNode,f,i),nC(u,i),!1;case 1:if(s=u.type,E=u.stateNode,(u.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(Ju===null||!Ju.has(E))))return u.flags|=65536,b&=-b,u.lanes|=b,b=jT(b),_T(b,i,u,f),nC(u,b),!1}u=u.return}while(u!==null);return!1}var AC=Error(a(461)),_n=!1;function ya(i,s,u,f){s.child=i===null?RM(s,null,u,f):Pd(s,i.child,u,f)}function PT(i,s,u,f,b){u=u.render;var E=s.ref;if("ref"in f){var M={};for(var K in f)K!=="ref"&&(M[K]=f[K])}else M=f;return Md(s),f=uC(i,s,u,M,E,b),K=cC(),i!==null&&!_n?(dC(i,s,b),Wl(i,s,b)):(ar&&K&&Wk(s),s.flags|=1,ya(i,s,f,b),s.child)}function NT(i,s,u,f,b){if(i===null){var E=u.type;return typeof E=="function"&&!zk(E)&&E.defaultProps===void 0&&u.compare===null?(s.tag=15,s.type=E,OT(i,s,E,f,b)):(i=Uy(u.type,null,f,s,s.mode,b),i.ref=s.ref,i.return=s,s.child=i)}if(E=i.child,!PC(i,b)){var M=E.memoizedProps;if(u=u.compare,u=u!==null?u:mg,u(M,f)&&i.ref===s.ref)return Wl(i,s,b)}return s.flags|=1,i=Ol(E,f),i.ref=s.ref,i.return=s,s.child=i}function OT(i,s,u,f,b){if(i!==null){var E=i.memoizedProps;if(mg(E,f)&&i.ref===s.ref)if(_n=!1,s.pendingProps=f=E,PC(i,b))(i.flags&131072)!==0&&(_n=!0);else return s.lanes=i.lanes,Wl(i,s,b)}return $C(i,s,u,f,b)}function RT(i,s,u,f){var b=f.children,E=i!==null?i.memoizedState:null;if(i===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),f.mode==="hidden"){if((s.flags&128)!==0){if(E=E!==null?E.baseLanes|u:u,i!==null){for(f=s.child=i.child,b=0;f!==null;)b=b|f.lanes|f.childLanes,f=f.sibling;f=b&~E}else f=0,s.child=null;return LT(i,s,E,u,f)}if((u&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},i!==null&&Yy(s,E!==null?E.cachePool:null),E!==null?HM(s,E):iC(),qM(s);else return f=s.lanes=536870912,LT(i,s,E!==null?E.baseLanes|u:u,u,f)}else E!==null?(Yy(s,E.cachePool),HM(s,E),Xu(s),s.memoizedState=null):(i!==null&&Yy(s,null),iC(),Xu(s));return ya(i,s,b,u),s.child}function $g(i,s){return i!==null&&i.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function LT(i,s,u,f,b){var E=Jk();return E=E===null?null:{parent:Tn._currentValue,pool:E},s.memoizedState={baseLanes:u,cachePool:E},i!==null&&Yy(s,null),iC(),qM(s),i!==null&&am(i,s,f,!0),s.childLanes=b,null}function pw(i,s){return s=mw({mode:s.mode,children:s.children},i.mode),s.ref=i.ref,i.child=s,s.return=i,s}function zT(i,s,u){return Pd(s,i.child,null,u),i=pw(s,s.pendingProps),i.flags|=2,Zi(s),s.memoizedState=null,i}function uQ(i,s,u){var f=s.pendingProps,b=(s.flags&128)!==0;if(s.flags&=-129,i===null){if(ar){if(f.mode==="hidden")return i=pw(s,f),s.lanes=536870912,$g(null,i);if(sC(s),(i=en)?(i=t_(i,Do),i=i!==null&&i.data==="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:zu!==null?{id:zs,overflow:Hs}:null,retryLane:536870912,hydrationErrors:null},u=CM(i),u.return=s,s.child=u,va=s,en=null)):i=null,i===null)throw qu(s);return s.lanes=536870912,null}return pw(s,f)}var E=i.memoizedState;if(E!==null){var M=E.dehydrated;if(sC(s),b)if(s.flags&256)s.flags&=-257,s=zT(i,s,u);else if(s.memoizedState!==null)s.child=i.child,s.flags|=128,s=null;else throw Error(a(558));else if(_n||am(i,s,u,!1),b=(u&i.childLanes)!==0,_n||b){if(f=zr,f!==null&&(M=Ze(f,u),M!==0&&M!==E.retryLane))throw E.retryLane=M,Ad(i,M),ki(f,i,M),AC;kw(),s=zT(i,s,u)}else i=E.treeContext,en=Ao(M.nextSibling),va=s,ar=!0,Hu=null,Do=!1,i!==null&&DM(s,i),s=pw(s,f),s.flags|=4096;return s}return i=Ol(i.child,{mode:f.mode,children:f.children}),i.ref=s.ref,s.child=i,i.return=s,i}function fw(i,s){var u=s.ref;if(u===null)i!==null&&i.ref!==null&&(s.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(a(284));(i===null||i.ref!==u)&&(s.flags|=4194816)}}function $C(i,s,u,f,b){return Md(s),u=uC(i,s,u,f,void 0,b),f=cC(),i!==null&&!_n?(dC(i,s,b),Wl(i,s,b)):(ar&&f&&Wk(s),s.flags|=1,ya(i,s,u,b),s.child)}function HT(i,s,u,f,b,E){return Md(s),s.updateQueue=null,u=VM(s,f,u,b),WM(i),f=cC(),i!==null&&!_n?(dC(i,s,E),Wl(i,s,E)):(ar&&f&&Wk(s),s.flags|=1,ya(i,s,u,E),s.child)}function qT(i,s,u,f,b){if(Md(s),s.stateNode===null){var E=em,M=u.contextType;typeof M=="object"&&M!==null&&(E=ba(M)),E=new u(f,E),s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,E.updater=FC,s.stateNode=E,E._reactInternals=s,E=s.stateNode,E.props=f,E.state=s.memoizedState,E.refs={},tC(s),M=u.contextType,E.context=typeof M=="object"&&M!==null?ba(M):em,E.state=s.memoizedState,M=u.getDerivedStateFromProps,typeof M=="function"&&(SC(s,u,M,f),E.state=s.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(M=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),M!==E.state&&FC.enqueueReplaceState(E,E.state,null),Cg(s,f,E,b),kg(),E.state=s.memoizedState),typeof E.componentDidMount=="function"&&(s.flags|=4194308),f=!0}else if(i===null){E=s.stateNode;var K=s.memoizedProps,ee=Od(u,K);E.props=ee;var pe=E.context,be=u.contextType;M=em,typeof be=="object"&&be!==null&&(M=ba(be));var xe=u.getDerivedStateFromProps;be=typeof xe=="function"||typeof E.getSnapshotBeforeUpdate=="function",K=s.pendingProps!==K,be||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(K||pe!==M)&&$T(s,E,f,M),Vu=!1;var me=s.memoizedState;E.state=me,Cg(s,f,E,b),kg(),pe=s.memoizedState,K||me!==pe||Vu?(typeof xe=="function"&&(SC(s,u,xe,f),pe=s.memoizedState),(ee=Vu||AT(s,u,ee,f,me,pe,M))?(be||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(s.flags|=4194308)):(typeof E.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=pe),E.props=f,E.state=pe,E.context=M,f=ee):(typeof E.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{E=s.stateNode,rC(i,s),M=s.memoizedProps,be=Od(u,M),E.props=be,xe=s.pendingProps,me=E.context,pe=u.contextType,ee=em,typeof pe=="object"&&pe!==null&&(ee=ba(pe)),K=u.getDerivedStateFromProps,(pe=typeof K=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(M!==xe||me!==ee)&&$T(s,E,f,ee),Vu=!1,me=s.memoizedState,E.state=me,Cg(s,f,E,b),kg();var ge=s.memoizedState;M!==xe||me!==ge||Vu||i!==null&&i.dependencies!==null&&Gy(i.dependencies)?(typeof K=="function"&&(SC(s,u,K,f),ge=s.memoizedState),(be=Vu||AT(s,u,be,f,me,ge,ee)||i!==null&&i.dependencies!==null&&Gy(i.dependencies))?(pe||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(f,ge,ee),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(f,ge,ee)),typeof E.componentDidUpdate=="function"&&(s.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof E.componentDidUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(s.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=ge),E.props=f,E.state=ge,E.context=ee,f=be):(typeof E.componentDidUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(s.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&me===i.memoizedState||(s.flags|=1024),f=!1)}return E=f,fw(i,s),f=(s.flags&128)!==0,E||f?(E=s.stateNode,u=f&&typeof u.getDerivedStateFromError!="function"?null:E.render(),s.flags|=1,i!==null&&f?(s.child=Pd(s,i.child,null,b),s.child=Pd(s,null,u,b)):ya(i,s,u,b),s.memoizedState=E.state,i=s.child):i=Wl(i,s,b),i}function WT(i,s,u,f){return Bd(),s.flags|=256,ya(i,s,u,f),s.child}var BC={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function IC(i){return{baseLanes:i,cachePool:TM()}}function MC(i,s,u){return i=i!==null?i.childLanes&~u:0,s&&(i|=eo),i}function VT(i,s,u){var f=s.pendingProps,b=!1,E=(s.flags&128)!==0,M;if((M=E)||(M=i!==null&&i.memoizedState===null?!1:(Sn.current&2)!==0),M&&(b=!0,s.flags&=-129),M=(s.flags&32)!==0,s.flags&=-33,i===null){if(ar){if(b?Gu(s):Xu(s),(i=en)?(i=t_(i,Do),i=i!==null&&i.data!=="&"?i:null,i!==null&&(s.memoizedState={dehydrated:i,treeContext:zu!==null?{id:zs,overflow:Hs}:null,retryLane:536870912,hydrationErrors:null},u=CM(i),u.return=s,s.child=u,va=s,en=null)):i=null,i===null)throw qu(s);return p8(i)?s.lanes=32:s.lanes=536870912,null}var K=f.children;return f=f.fallback,b?(Xu(s),b=s.mode,K=mw({mode:"hidden",children:K},b),f=$d(f,b,u,null),K.return=s,f.return=s,K.sibling=f,s.child=K,f=s.child,f.memoizedState=IC(u),f.childLanes=MC(i,M,u),s.memoizedState=BC,$g(null,f)):(Gu(s),TC(s,K))}var ee=i.memoizedState;if(ee!==null&&(K=ee.dehydrated,K!==null)){if(E)s.flags&256?(Gu(s),s.flags&=-257,s=jC(i,s,u)):s.memoizedState!==null?(Xu(s),s.child=i.child,s.flags|=128,s=null):(Xu(s),K=f.fallback,b=s.mode,f=mw({mode:"visible",children:f.children},b),K=$d(K,b,u,null),K.flags|=2,f.return=s,K.return=s,f.sibling=K,s.child=f,Pd(s,i.child,null,u),f=s.child,f.memoizedState=IC(u),f.childLanes=MC(i,M,u),s.memoizedState=BC,s=$g(null,f));else if(Gu(s),p8(K)){if(M=K.nextSibling&&K.nextSibling.dataset,M)var pe=M.dgst;M=pe,f=Error(a(419)),f.stack="",f.digest=M,vg({value:f,source:null,stack:null}),s=jC(i,s,u)}else if(_n||am(i,s,u,!1),M=(u&i.childLanes)!==0,_n||M){if(M=zr,M!==null&&(f=Ze(M,u),f!==0&&f!==ee.retryLane))throw ee.retryLane=f,Ad(i,f),ki(M,i,f),AC;d8(K)||kw(),s=jC(i,s,u)}else d8(K)?(s.flags|=192,s.child=i.child,s=null):(i=ee.treeContext,en=Ao(K.nextSibling),va=s,ar=!0,Hu=null,Do=!1,i!==null&&DM(s,i),s=TC(s,f.children),s.flags|=4096);return s}return b?(Xu(s),K=f.fallback,b=s.mode,ee=i.child,pe=ee.sibling,f=Ol(ee,{mode:"hidden",children:f.children}),f.subtreeFlags=ee.subtreeFlags&65011712,pe!==null?K=Ol(pe,K):(K=$d(K,b,u,null),K.flags|=2),K.return=s,f.return=s,f.sibling=K,s.child=f,$g(null,f),f=s.child,K=i.child.memoizedState,K===null?K=IC(u):(b=K.cachePool,b!==null?(ee=Tn._currentValue,b=b.parent!==ee?{parent:ee,pool:ee}:b):b=TM(),K={baseLanes:K.baseLanes|u,cachePool:b}),f.memoizedState=K,f.childLanes=MC(i,M,u),s.memoizedState=BC,$g(i.child,f)):(Gu(s),u=i.child,i=u.sibling,u=Ol(u,{mode:"visible",children:f.children}),u.return=s,u.sibling=null,i!==null&&(M=s.deletions,M===null?(s.deletions=[i],s.flags|=16):M.push(i)),s.child=u,s.memoizedState=null,u)}function TC(i,s){return s=mw({mode:"visible",children:s},i.mode),s.return=i,i.child=s}function mw(i,s){return i=Yi(22,i,null,s),i.lanes=0,i}function jC(i,s,u){return Pd(s,i.child,null,u),i=TC(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function UT(i,s,u){i.lanes|=s;var f=i.alternate;f!==null&&(f.lanes|=s),Xk(i.return,s,u)}function _C(i,s,u,f,b,E){var M=i.memoizedState;M===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:u,tailMode:b,treeForkCount:E}:(M.isBackwards=s,M.rendering=null,M.renderingStartTime=0,M.last=f,M.tail=u,M.tailMode=b,M.treeForkCount=E)}function KT(i,s,u){var f=s.pendingProps,b=f.revealOrder,E=f.tail;f=f.children;var M=Sn.current,K=(M&2)!==0;if(K?(M=M&1|2,s.flags|=128):M&=1,X(Sn,M),ya(i,s,f,u),f=ar?gg:0,!K&&i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&UT(i,u,s);else if(i.tag===19)UT(i,u,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(b){case"forwards":for(u=s.child,b=null;u!==null;)i=u.alternate,i!==null&&rw(i)===null&&(b=u),u=u.sibling;u=b,u===null?(b=s.child,s.child=null):(b=u.sibling,u.sibling=null),_C(s,!1,b,u,E,f);break;case"backwards":case"unstable_legacy-backwards":for(u=null,b=s.child,s.child=null;b!==null;){if(i=b.alternate,i!==null&&rw(i)===null){s.child=b;break}i=b.sibling,b.sibling=u,u=b,b=i}_C(s,!0,u,null,E,f);break;case"together":_C(s,!1,null,null,void 0,f);break;default:s.memoizedState=null}return s.child}function Wl(i,s,u){if(i!==null&&(s.dependencies=i.dependencies),Zu|=s.lanes,(u&s.childLanes)===0)if(i!==null){if(am(i,s,u,!1),(u&s.childLanes)===0)return null}else return null;if(i!==null&&s.child!==i.child)throw Error(a(153));if(s.child!==null){for(i=s.child,u=Ol(i,i.pendingProps),s.child=u,u.return=s;i.sibling!==null;)i=i.sibling,u=u.sibling=Ol(i,i.pendingProps),u.return=s;u.sibling=null}return s.child}function PC(i,s){return(i.lanes&s)!==0?!0:(i=i.dependencies,!!(i!==null&&Gy(i)))}function cQ(i,s,u){switch(s.tag){case 3:ue(s,s.stateNode.containerInfo),Wu(s,Tn,i.memoizedState.cache),Bd();break;case 27:case 5:he(s);break;case 4:ue(s,s.stateNode.containerInfo);break;case 10:Wu(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,sC(s),null;break;case 13:var f=s.memoizedState;if(f!==null)return f.dehydrated!==null?(Gu(s),s.flags|=128,null):(u&s.child.childLanes)!==0?VT(i,s,u):(Gu(s),i=Wl(i,s,u),i!==null?i.sibling:null);Gu(s);break;case 19:var b=(i.flags&128)!==0;if(f=(u&s.childLanes)!==0,f||(am(i,s,u,!1),f=(u&s.childLanes)!==0),b){if(f)return KT(i,s,u);s.flags|=128}if(b=s.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),X(Sn,Sn.current),f)break;return null;case 22:return s.lanes=0,RT(i,s,u,s.pendingProps);case 24:Wu(s,Tn,i.memoizedState.cache)}return Wl(i,s,u)}function GT(i,s,u){if(i!==null)if(i.memoizedProps!==s.pendingProps)_n=!0;else{if(!PC(i,u)&&(s.flags&128)===0)return _n=!1,cQ(i,s,u);_n=(i.flags&131072)!==0}else _n=!1,ar&&(s.flags&1048576)!==0&&FM(s,gg,s.index);switch(s.lanes=0,s.tag){case 16:e:{var f=s.pendingProps;if(i=jd(s.elementType),s.type=i,typeof i=="function")zk(i)?(f=Od(i,f),s.tag=1,s=qT(null,s,i,f,u)):(s.tag=0,s=$C(null,s,i,f,u));else{if(i!=null){var b=i.$$typeof;if(b===A){s.tag=11,s=PT(null,s,i,f,u);break e}else if(b===$){s.tag=14,s=NT(null,s,i,f,u);break e}}throw s=L(i)||i,Error(a(306,s,""))}}return s;case 0:return $C(i,s,s.type,s.pendingProps,u);case 1:return f=s.type,b=Od(f,s.pendingProps),qT(i,s,f,b,u);case 3:e:{if(ue(s,s.stateNode.containerInfo),i===null)throw Error(a(387));f=s.pendingProps;var E=s.memoizedState;b=E.element,rC(i,s),Cg(s,f,null,u);var M=s.memoizedState;if(f=M.cache,Wu(s,Tn,f),f!==E.cache&&Yk(s,[Tn],u,!0),kg(),f=M.element,E.isDehydrated)if(E={element:f,isDehydrated:!1,cache:M.cache},s.updateQueue.baseState=E,s.memoizedState=E,s.flags&256){s=WT(i,s,f,u);break e}else if(f!==b){b=Co(Error(a(424)),s),vg(b),s=WT(i,s,f,u);break e}else for(i=s.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,en=Ao(i.firstChild),va=s,ar=!0,Hu=null,Do=!0,u=RM(s,null,f,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Bd(),f===b){s=Wl(i,s,u);break e}ya(i,s,f,u)}s=s.child}return s;case 26:return fw(i,s),i===null?(u=s_(s.type,null,s.pendingProps,null))?s.memoizedState=u:ar||(u=s.type,i=s.pendingProps,f=Mw(J.current).createElement(u),f[Gt]=s,f[Lr]=i,wa(f,u,i),lr(f),s.stateNode=f):s.memoizedState=s_(s.type,i.memoizedProps,s.pendingProps,i.memoizedState),null;case 27:return he(s),i===null&&ar&&(f=s.stateNode=a_(s.type,s.pendingProps,J.current),va=s,Do=!0,b=en,nc(s.type)?(f8=b,en=Ao(f.firstChild)):en=b),ya(i,s,s.pendingProps.children,u),fw(i,s),i===null&&(s.flags|=4194304),s.child;case 5:return i===null&&ar&&((b=f=en)&&(f=OQ(f,s.type,s.pendingProps,Do),f!==null?(s.stateNode=f,va=s,en=Ao(f.firstChild),Do=!1,b=!0):b=!1),b||qu(s)),he(s),b=s.type,E=s.pendingProps,M=i!==null?i.memoizedProps:null,f=E.children,l8(b,E)?f=null:M!==null&&l8(b,M)&&(s.flags|=32),s.memoizedState!==null&&(b=uC(i,s,tQ,null,null,u),Wg._currentValue=b),fw(i,s),ya(i,s,f,u),s.child;case 6:return i===null&&ar&&((i=u=en)&&(u=RQ(u,s.pendingProps,Do),u!==null?(s.stateNode=u,va=s,en=null,i=!0):i=!1),i||qu(s)),null;case 13:return VT(i,s,u);case 4:return ue(s,s.stateNode.containerInfo),f=s.pendingProps,i===null?s.child=Pd(s,null,f,u):ya(i,s,f,u),s.child;case 11:return PT(i,s,s.type,s.pendingProps,u);case 7:return ya(i,s,s.pendingProps,u),s.child;case 8:return ya(i,s,s.pendingProps.children,u),s.child;case 12:return ya(i,s,s.pendingProps.children,u),s.child;case 10:return f=s.pendingProps,Wu(s,s.type,f.value),ya(i,s,f.children,u),s.child;case 9:return b=s.type._context,f=s.pendingProps.children,Md(s),b=ba(b),f=f(b),s.flags|=1,ya(i,s,f,u),s.child;case 14:return NT(i,s,s.type,s.pendingProps,u);case 15:return OT(i,s,s.type,s.pendingProps,u);case 19:return KT(i,s,u);case 31:return uQ(i,s,u);case 22:return RT(i,s,u,s.pendingProps);case 24:return Md(s),f=ba(Tn),i===null?(b=Jk(),b===null&&(b=zr,E=Qk(),b.pooledCache=E,E.refCount++,E!==null&&(b.pooledCacheLanes|=u),b=E),s.memoizedState={parent:f,cache:b},tC(s),Wu(s,Tn,b)):((i.lanes&u)!==0&&(rC(i,s),Cg(s,null,null,u),kg()),b=i.memoizedState,E=s.memoizedState,b.parent!==f?(b={parent:f,cache:f},s.memoizedState=b,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=b),Wu(s,Tn,f)):(f=E.cache,Wu(s,Tn,f),f!==b.cache&&Yk(s,[Tn],u,!0))),ya(i,s,s.pendingProps.children,u),s.child;case 29:throw s.pendingProps}throw Error(a(156,s.tag))}function Vl(i){i.flags|=4}function NC(i,s,u,f,b){if((s=(i.mode&32)!==0)&&(s=!1),s){if(i.flags|=16777216,(b&335544128)===b)if(i.stateNode.complete)i.flags|=8192;else if(xj())i.flags|=8192;else throw _d=Zy,eC}else i.flags&=-16777217}function XT(i,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!p_(s))if(xj())i.flags|=8192;else throw _d=Zy,eC}function hw(i,s){s!==null&&(i.flags|=4),i.flags&16384&&(s=i.tag!==22?ot():536870912,i.lanes|=s,gm|=s)}function Bg(i,s){if(!ar)switch(i.tailMode){case"hidden":s=i.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var f=null;u!==null;)u.alternate!==null&&(f=u),u=u.sibling;f===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function tn(i){var s=i.alternate!==null&&i.alternate.child===i.child,u=0,f=0;if(s)for(var b=i.child;b!==null;)u|=b.lanes|b.childLanes,f|=b.subtreeFlags&65011712,f|=b.flags&65011712,b.return=i,b=b.sibling;else for(b=i.child;b!==null;)u|=b.lanes|b.childLanes,f|=b.subtreeFlags,f|=b.flags,b.return=i,b=b.sibling;return i.subtreeFlags|=f,i.childLanes=u,s}function dQ(i,s,u){var f=s.pendingProps;switch(Vk(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tn(s),null;case 1:return tn(s),null;case 3:return u=s.stateNode,f=null,i!==null&&(f=i.memoizedState.cache),s.memoizedState.cache!==f&&(s.flags|=2048),zl(Tn),ae(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(nm(s)?Vl(s):i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Kk())),tn(s),null;case 26:var b=s.type,E=s.memoizedState;return i===null?(Vl(s),E!==null?(tn(s),XT(s,E)):(tn(s),NC(s,b,null,f,u))):E?E!==i.memoizedState?(Vl(s),tn(s),XT(s,E)):(tn(s),s.flags&=-16777217):(i=i.memoizedProps,i!==f&&Vl(s),tn(s),NC(s,b,i,f,u)),null;case 27:if(le(s),u=J.current,b=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==f&&Vl(s);else{if(!f){if(s.stateNode===null)throw Error(a(166));return tn(s),null}i=Q.current,nm(s)?AM(s,i):(i=a_(b,f,u),s.stateNode=i,Vl(s))}return tn(s),null;case 5:if(le(s),b=s.type,i!==null&&s.stateNode!=null)i.memoizedProps!==f&&Vl(s);else{if(!f){if(s.stateNode===null)throw Error(a(166));return tn(s),null}if(E=Q.current,nm(s))AM(s,E);else{var M=Mw(J.current);switch(E){case 1:E=M.createElementNS("http://www.w3.org/2000/svg",b);break;case 2:E=M.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;default:switch(b){case"svg":E=M.createElementNS("http://www.w3.org/2000/svg",b);break;case"math":E=M.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;case"script":E=M.createElement("div"),E.innerHTML="<script><\/script>",E=E.removeChild(E.firstChild);break;case"select":E=typeof f.is=="string"?M.createElement("select",{is:f.is}):M.createElement("select"),f.multiple?E.multiple=!0:f.size&&(E.size=f.size);break;default:E=typeof f.is=="string"?M.createElement(b,{is:f.is}):M.createElement(b)}}E[Gt]=s,E[Lr]=f;e:for(M=s.child;M!==null;){if(M.tag===5||M.tag===6)E.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===s)break e;for(;M.sibling===null;){if(M.return===null||M.return===s)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}s.stateNode=E;e:switch(wa(E,b,f),b){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}f&&Vl(s)}}return tn(s),NC(s,s.type,i===null?null:i.memoizedProps,s.pendingProps,u),null;case 6:if(i&&s.stateNode!=null)i.memoizedProps!==f&&Vl(s);else{if(typeof f!="string"&&s.stateNode===null)throw Error(a(166));if(i=J.current,nm(s)){if(i=s.stateNode,u=s.memoizedProps,f=null,b=va,b!==null)switch(b.tag){case 27:case 5:f=b.memoizedProps}i[Gt]=s,i=!!(i.nodeValue===u||f!==null&&f.suppressHydrationWarning===!0||Kj(i.nodeValue,u)),i||qu(s,!0)}else i=Mw(i).createTextNode(f),i[Gt]=s,s.stateNode=i}return tn(s),null;case 31:if(u=s.memoizedState,i===null||i.memoizedState!==null){if(f=nm(s),u!==null){if(i===null){if(!f)throw Error(a(318));if(i=s.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(557));i[Gt]=s}else Bd(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;tn(s),i=!1}else u=Kk(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return s.flags&256?(Zi(s),s):(Zi(s),null);if((s.flags&128)!==0)throw Error(a(558))}return tn(s),null;case 13:if(f=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(b=nm(s),f!==null&&f.dehydrated!==null){if(i===null){if(!b)throw Error(a(318));if(b=s.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(a(317));b[Gt]=s}else Bd(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;tn(s),b=!1}else b=Kk(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=b),b=!0;if(!b)return s.flags&256?(Zi(s),s):(Zi(s),null)}return Zi(s),(s.flags&128)!==0?(s.lanes=u,s):(u=f!==null,i=i!==null&&i.memoizedState!==null,u&&(f=s.child,b=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(b=f.alternate.memoizedState.cachePool.pool),E=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(E=f.memoizedState.cachePool.pool),E!==b&&(f.flags|=2048)),u!==i&&u&&(s.child.flags|=8192),hw(s,s.updateQueue),tn(s),null);case 4:return ae(),i===null&&n8(s.stateNode.containerInfo),tn(s),null;case 10:return zl(s.type),tn(s),null;case 19:if(V(Sn),f=s.memoizedState,f===null)return tn(s),null;if(b=(s.flags&128)!==0,E=f.rendering,E===null)if(b)Bg(f,!1);else{if(yn!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(E=rw(i),E!==null){for(s.flags|=128,Bg(f,!1),i=E.updateQueue,s.updateQueue=i,hw(s,i),s.subtreeFlags=0,i=u,u=s.child;u!==null;)kM(u,i),u=u.sibling;return X(Sn,Sn.current&1|2),ar&&Rl(s,f.treeForkCount),s.child}i=i.sibling}f.tail!==null&&Ie()>ww&&(s.flags|=128,b=!0,Bg(f,!1),s.lanes=4194304)}else{if(!b)if(i=rw(E),i!==null){if(s.flags|=128,b=!0,i=i.updateQueue,s.updateQueue=i,hw(s,i),Bg(f,!0),f.tail===null&&f.tailMode==="hidden"&&!E.alternate&&!ar)return tn(s),null}else 2*Ie()-f.renderingStartTime>ww&&u!==536870912&&(s.flags|=128,b=!0,Bg(f,!1),s.lanes=4194304);f.isBackwards?(E.sibling=s.child,s.child=E):(i=f.last,i!==null?i.sibling=E:s.child=E,f.last=E)}return f.tail!==null?(i=f.tail,f.rendering=i,f.tail=i.sibling,f.renderingStartTime=Ie(),i.sibling=null,u=Sn.current,X(Sn,b?u&1|2:u&1),ar&&Rl(s,f.treeForkCount),i):(tn(s),null);case 22:case 23:return Zi(s),oC(),f=s.memoizedState!==null,i!==null?i.memoizedState!==null!==f&&(s.flags|=8192):f&&(s.flags|=8192),f?(u&536870912)!==0&&(s.flags&128)===0&&(tn(s),s.subtreeFlags&6&&(s.flags|=8192)):tn(s),u=s.updateQueue,u!==null&&hw(s,u.retryQueue),u=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),f=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(f=s.memoizedState.cachePool.pool),f!==u&&(s.flags|=2048),i!==null&&V(Td),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),s.memoizedState.cache!==u&&(s.flags|=2048),zl(Tn),tn(s),null;case 25:return null;case 30:return null}throw Error(a(156,s.tag))}function pQ(i,s){switch(Vk(s),s.tag){case 1:return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return zl(Tn),ae(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 26:case 27:case 5:return le(s),null;case 31:if(s.memoizedState!==null){if(Zi(s),s.alternate===null)throw Error(a(340));Bd()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 13:if(Zi(s),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(a(340));Bd()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return V(Sn),null;case 4:return ae(),null;case 10:return zl(s.type),null;case 22:case 23:return Zi(s),oC(),i!==null&&V(Td),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 24:return zl(Tn),null;case 25:return null;default:return null}}function YT(i,s){switch(Vk(s),s.tag){case 3:zl(Tn),ae();break;case 26:case 27:case 5:le(s);break;case 4:ae();break;case 31:s.memoizedState!==null&&Zi(s);break;case 13:Zi(s);break;case 19:V(Sn);break;case 10:zl(s.type);break;case 22:case 23:Zi(s),oC(),i!==null&&V(Td);break;case 24:zl(Tn)}}function Ig(i,s){try{var u=s.updateQueue,f=u!==null?u.lastEffect:null;if(f!==null){var b=f.next;u=b;do{if((u.tag&i)===i){f=void 0;var E=u.create,M=u.inst;f=E(),M.destroy=f}u=u.next}while(u!==b)}}catch(K){Ir(s,s.return,K)}}function Yu(i,s,u){try{var f=s.updateQueue,b=f!==null?f.lastEffect:null;if(b!==null){var E=b.next;f=E;do{if((f.tag&i)===i){var M=f.inst,K=M.destroy;if(K!==void 0){M.destroy=void 0,b=s;var ee=u,pe=K;try{pe()}catch(be){Ir(b,ee,be)}}}f=f.next}while(f!==E)}}catch(be){Ir(s,s.return,be)}}function QT(i){var s=i.updateQueue;if(s!==null){var u=i.stateNode;try{zM(s,u)}catch(f){Ir(i,i.return,f)}}}function ZT(i,s,u){u.props=Od(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(f){Ir(i,s,f)}}function Mg(i,s){try{var u=i.ref;if(u!==null){switch(i.tag){case 26:case 27:case 5:var f=i.stateNode;break;case 30:f=i.stateNode;break;default:f=i.stateNode}typeof u=="function"?i.refCleanup=u(f):u.current=f}}catch(b){Ir(i,s,b)}}function qs(i,s){var u=i.ref,f=i.refCleanup;if(u!==null)if(typeof f=="function")try{f()}catch(b){Ir(i,s,b)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(b){Ir(i,s,b)}else u.current=null}function JT(i){var s=i.type,u=i.memoizedProps,f=i.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":u.autoFocus&&f.focus();break e;case"img":u.src?f.src=u.src:u.srcSet&&(f.srcset=u.srcSet)}}catch(b){Ir(i,i.return,b)}}function OC(i,s,u){try{var f=i.stateNode;MQ(f,i.type,u,s),f[Lr]=s}catch(b){Ir(i,i.return,b)}}function ej(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&nc(i.type)||i.tag===4}function RC(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||ej(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&nc(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function LC(i,s,u){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(i,s):(s=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,s.appendChild(i),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=Pl));else if(f!==4&&(f===27&&nc(i.type)&&(u=i.stateNode,s=null),i=i.child,i!==null))for(LC(i,s,u),i=i.sibling;i!==null;)LC(i,s,u),i=i.sibling}function gw(i,s,u){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?u.insertBefore(i,s):u.appendChild(i);else if(f!==4&&(f===27&&nc(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(gw(i,s,u),i=i.sibling;i!==null;)gw(i,s,u),i=i.sibling}function tj(i){var s=i.stateNode,u=i.memoizedProps;try{for(var f=i.type,b=s.attributes;b.length;)s.removeAttributeNode(b[0]);wa(s,f,u),s[Gt]=i,s[Lr]=u}catch(E){Ir(i,i.return,E)}}var Ul=!1,Pn=!1,zC=!1,rj=typeof WeakSet=="function"?WeakSet:Set,sa=null;function fQ(i,s){if(i=i.containerInfo,o8=Rw,i=mM(i),jk(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var f=u.getSelection&&u.getSelection();if(f&&f.rangeCount!==0){u=f.anchorNode;var b=f.anchorOffset,E=f.focusNode;f=f.focusOffset;try{u.nodeType,E.nodeType}catch{u=null;break e}var M=0,K=-1,ee=-1,pe=0,be=0,xe=i,me=null;t:for(;;){for(var ge;xe!==u||b!==0&&xe.nodeType!==3||(K=M+b),xe!==E||f!==0&&xe.nodeType!==3||(ee=M+f),xe.nodeType===3&&(M+=xe.nodeValue.length),(ge=xe.firstChild)!==null;)me=xe,xe=ge;for(;;){if(xe===i)break t;if(me===u&&++pe===b&&(K=M),me===E&&++be===f&&(ee=M),(ge=xe.nextSibling)!==null)break;xe=me,me=xe.parentNode}xe=ge}u=K===-1||ee===-1?null:{start:K,end:ee}}else u=null}u=u||{start:0,end:0}}else u=null;for(s8={focusedElem:i,selectionRange:u},Rw=!1,sa=s;sa!==null;)if(s=sa,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,sa=i;else for(;sa!==null;){switch(s=sa,E=s.alternate,i=s.flags,s.tag){case 0:if((i&4)!==0&&(i=s.updateQueue,i=i!==null?i.events:null,i!==null))for(u=0;u<i.length;u++)b=i[u],b.ref.impl=b.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&E!==null){i=void 0,u=s,b=E.memoizedProps,E=E.memoizedState,f=u.stateNode;try{var tt=Od(u.type,b);i=f.getSnapshotBeforeUpdate(tt,E),f.__reactInternalSnapshotBeforeUpdate=i}catch(ht){Ir(u,u.return,ht)}}break;case 3:if((i&1024)!==0){if(i=s.stateNode.containerInfo,u=i.nodeType,u===9)c8(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":c8(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(a(163))}if(i=s.sibling,i!==null){i.return=s.return,sa=i;break}sa=s.return}}function nj(i,s,u){var f=u.flags;switch(u.tag){case 0:case 11:case 15:Gl(i,u),f&4&&Ig(5,u);break;case 1:if(Gl(i,u),f&4)if(i=u.stateNode,s===null)try{i.componentDidMount()}catch(M){Ir(u,u.return,M)}else{var b=Od(u.type,s.memoizedProps);s=s.memoizedState;try{i.componentDidUpdate(b,s,i.__reactInternalSnapshotBeforeUpdate)}catch(M){Ir(u,u.return,M)}}f&64&&QT(u),f&512&&Mg(u,u.return);break;case 3:if(Gl(i,u),f&64&&(i=u.updateQueue,i!==null)){if(s=null,u.child!==null)switch(u.child.tag){case 27:case 5:s=u.child.stateNode;break;case 1:s=u.child.stateNode}try{zM(i,s)}catch(M){Ir(u,u.return,M)}}break;case 27:s===null&&f&4&&tj(u);case 26:case 5:Gl(i,u),s===null&&f&4&&JT(u),f&512&&Mg(u,u.return);break;case 12:Gl(i,u);break;case 31:Gl(i,u),f&4&&oj(i,u);break;case 13:Gl(i,u),f&4&&sj(i,u),f&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=EQ.bind(null,u),LQ(i,u))));break;case 22:if(f=u.memoizedState!==null||Ul,!f){s=s!==null&&s.memoizedState!==null||Pn,b=Ul;var E=Pn;Ul=f,(Pn=s)&&!E?Xl(i,u,(u.subtreeFlags&8772)!==0):Gl(i,u),Ul=b,Pn=E}break;case 30:break;default:Gl(i,u)}}function aj(i){var s=i.alternate;s!==null&&(i.alternate=null,aj(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&ri(s)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var sn=null,yi=!1;function Kl(i,s,u){for(u=u.child;u!==null;)ij(i,s,u),u=u.sibling}function ij(i,s,u){if(Ke&&typeof Ke.onCommitFiberUnmount=="function")try{Ke.onCommitFiberUnmount(at,u)}catch{}switch(u.tag){case 26:Pn||qs(u,s),Kl(i,s,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Pn||qs(u,s);var f=sn,b=yi;nc(u.type)&&(sn=u.stateNode,yi=!1),Kl(i,s,u),zg(u.stateNode),sn=f,yi=b;break;case 5:Pn||qs(u,s);case 6:if(f=sn,b=yi,sn=null,Kl(i,s,u),sn=f,yi=b,sn!==null)if(yi)try{(sn.nodeType===9?sn.body:sn.nodeName==="HTML"?sn.ownerDocument.body:sn).removeChild(u.stateNode)}catch(E){Ir(u,s,E)}else try{sn.removeChild(u.stateNode)}catch(E){Ir(u,s,E)}break;case 18:sn!==null&&(yi?(i=sn,Jj(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),Cm(i)):Jj(sn,u.stateNode));break;case 4:f=sn,b=yi,sn=u.stateNode.containerInfo,yi=!0,Kl(i,s,u),sn=f,yi=b;break;case 0:case 11:case 14:case 15:Yu(2,u,s),Pn||Yu(4,u,s),Kl(i,s,u);break;case 1:Pn||(qs(u,s),f=u.stateNode,typeof f.componentWillUnmount=="function"&&ZT(u,s,f)),Kl(i,s,u);break;case 21:Kl(i,s,u);break;case 22:Pn=(f=Pn)||u.memoizedState!==null,Kl(i,s,u),Pn=f;break;default:Kl(i,s,u)}}function oj(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Cm(i)}catch(u){Ir(s,s.return,u)}}}function sj(i,s){if(s.memoizedState===null&&(i=s.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Cm(i)}catch(u){Ir(s,s.return,u)}}function mQ(i){switch(i.tag){case 31:case 13:case 19:var s=i.stateNode;return s===null&&(s=i.stateNode=new rj),s;case 22:return i=i.stateNode,s=i._retryCache,s===null&&(s=i._retryCache=new rj),s;default:throw Error(a(435,i.tag))}}function vw(i,s){var u=mQ(i);s.forEach(function(f){if(!u.has(f)){u.add(f);var b=kQ.bind(null,i,f);f.then(b,b)}})}function wi(i,s){var u=s.deletions;if(u!==null)for(var f=0;f<u.length;f++){var b=u[f],E=i,M=s,K=M;e:for(;K!==null;){switch(K.tag){case 27:if(nc(K.type)){sn=K.stateNode,yi=!1;break e}break;case 5:sn=K.stateNode,yi=!1;break e;case 3:case 4:sn=K.stateNode.containerInfo,yi=!0;break e}K=K.return}if(sn===null)throw Error(a(160));ij(E,M,b),sn=null,yi=!1,E=b.alternate,E!==null&&(E.return=null),b.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)lj(s,i),s=s.sibling}var ls=null;function lj(i,s){var u=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:wi(s,i),xi(i),f&4&&(Yu(3,i,i.return),Ig(3,i),Yu(5,i,i.return));break;case 1:wi(s,i),xi(i),f&512&&(Pn||u===null||qs(u,u.return)),f&64&&Ul&&(i=i.updateQueue,i!==null&&(f=i.callbacks,f!==null&&(u=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=u===null?f:u.concat(f))));break;case 26:var b=ls;if(wi(s,i),xi(i),f&512&&(Pn||u===null||qs(u,u.return)),f&4){var E=u!==null?u.memoizedState:null;if(f=i.memoizedState,u===null)if(f===null)if(i.stateNode===null){e:{f=i.type,u=i.memoizedProps,b=b.ownerDocument||b;t:switch(f){case"title":E=b.getElementsByTagName("title")[0],(!E||E[sr]||E[Gt]||E.namespaceURI==="http://www.w3.org/2000/svg"||E.hasAttribute("itemprop"))&&(E=b.createElement(f),b.head.insertBefore(E,b.querySelector("head > title"))),wa(E,f,u),E[Gt]=i,lr(E),f=E;break e;case"link":var M=c_("link","href",b).get(f+(u.href||""));if(M){for(var K=0;K<M.length;K++)if(E=M[K],E.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&E.getAttribute("rel")===(u.rel==null?null:u.rel)&&E.getAttribute("title")===(u.title==null?null:u.title)&&E.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){M.splice(K,1);break t}}E=b.createElement(f),wa(E,f,u),b.head.appendChild(E);break;case"meta":if(M=c_("meta","content",b).get(f+(u.content||""))){for(K=0;K<M.length;K++)if(E=M[K],E.getAttribute("content")===(u.content==null?null:""+u.content)&&E.getAttribute("name")===(u.name==null?null:u.name)&&E.getAttribute("property")===(u.property==null?null:u.property)&&E.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&E.getAttribute("charset")===(u.charSet==null?null:u.charSet)){M.splice(K,1);break t}}E=b.createElement(f),wa(E,f,u),b.head.appendChild(E);break;default:throw Error(a(468,f))}E[Gt]=i,lr(E),f=E}i.stateNode=f}else d_(b,i.type,i.stateNode);else i.stateNode=u_(b,f,i.memoizedProps);else E!==f?(E===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):E.count--,f===null?d_(b,i.type,i.stateNode):u_(b,f,i.memoizedProps)):f===null&&i.stateNode!==null&&OC(i,i.memoizedProps,u.memoizedProps)}break;case 27:wi(s,i),xi(i),f&512&&(Pn||u===null||qs(u,u.return)),u!==null&&f&4&&OC(i,i.memoizedProps,u.memoizedProps);break;case 5:if(wi(s,i),xi(i),f&512&&(Pn||u===null||qs(u,u.return)),i.flags&32){b=i.stateNode;try{Uf(b,"")}catch(tt){Ir(i,i.return,tt)}}f&4&&i.stateNode!=null&&(b=i.memoizedProps,OC(i,b,u!==null?u.memoizedProps:b)),f&1024&&(zC=!0);break;case 6:if(wi(s,i),xi(i),f&4){if(i.stateNode===null)throw Error(a(162));f=i.memoizedProps,u=i.stateNode;try{u.nodeValue=f}catch(tt){Ir(i,i.return,tt)}}break;case 3:if(_w=null,b=ls,ls=Tw(s.containerInfo),wi(s,i),ls=b,xi(i),f&4&&u!==null&&u.memoizedState.isDehydrated)try{Cm(s.containerInfo)}catch(tt){Ir(i,i.return,tt)}zC&&(zC=!1,uj(i));break;case 4:f=ls,ls=Tw(i.stateNode.containerInfo),wi(s,i),xi(i),ls=f;break;case 12:wi(s,i),xi(i);break;case 31:wi(s,i),xi(i),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,vw(i,f)));break;case 13:wi(s,i),xi(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(yw=Ie()),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,vw(i,f)));break;case 22:b=i.memoizedState!==null;var ee=u!==null&&u.memoizedState!==null,pe=Ul,be=Pn;if(Ul=pe||b,Pn=be||ee,wi(s,i),Pn=be,Ul=pe,xi(i),f&8192)e:for(s=i.stateNode,s._visibility=b?s._visibility&-2:s._visibility|1,b&&(u===null||ee||Ul||Pn||Rd(i)),u=null,s=i;;){if(s.tag===5||s.tag===26){if(u===null){ee=u=s;try{if(E=ee.stateNode,b)M=E.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{K=ee.stateNode;var xe=ee.memoizedProps.style,me=xe!=null&&xe.hasOwnProperty("display")?xe.display:null;K.style.display=me==null||typeof me=="boolean"?"":(""+me).trim()}}catch(tt){Ir(ee,ee.return,tt)}}}else if(s.tag===6){if(u===null){ee=s;try{ee.stateNode.nodeValue=b?"":ee.memoizedProps}catch(tt){Ir(ee,ee.return,tt)}}}else if(s.tag===18){if(u===null){ee=s;try{var ge=ee.stateNode;b?e_(ge,!0):e_(ee.stateNode,!1)}catch(tt){Ir(ee,ee.return,tt)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===i)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;s.sibling===null;){if(s.return===null||s.return===i)break e;u===s&&(u=null),s=s.return}u===s&&(u=null),s.sibling.return=s.return,s=s.sibling}f&4&&(f=i.updateQueue,f!==null&&(u=f.retryQueue,u!==null&&(f.retryQueue=null,vw(i,u))));break;case 19:wi(s,i),xi(i),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,vw(i,f)));break;case 30:break;case 21:break;default:wi(s,i),xi(i)}}function xi(i){var s=i.flags;if(s&2){try{for(var u,f=i.return;f!==null;){if(ej(f)){u=f;break}f=f.return}if(u==null)throw Error(a(160));switch(u.tag){case 27:var b=u.stateNode,E=RC(i);gw(i,E,b);break;case 5:var M=u.stateNode;u.flags&32&&(Uf(M,""),u.flags&=-33);var K=RC(i);gw(i,K,M);break;case 3:case 4:var ee=u.stateNode.containerInfo,pe=RC(i);LC(i,pe,ee);break;default:throw Error(a(161))}}catch(be){Ir(i,i.return,be)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function uj(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var s=i;uj(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),i=i.sibling}}function Gl(i,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)nj(i,s.alternate,s),s=s.sibling}function Rd(i){for(i=i.child;i!==null;){var s=i;switch(s.tag){case 0:case 11:case 14:case 15:Yu(4,s,s.return),Rd(s);break;case 1:qs(s,s.return);var u=s.stateNode;typeof u.componentWillUnmount=="function"&&ZT(s,s.return,u),Rd(s);break;case 27:zg(s.stateNode);case 26:case 5:qs(s,s.return),Rd(s);break;case 22:s.memoizedState===null&&Rd(s);break;case 30:Rd(s);break;default:Rd(s)}i=i.sibling}}function Xl(i,s,u){for(u=u&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var f=s.alternate,b=i,E=s,M=E.flags;switch(E.tag){case 0:case 11:case 15:Xl(b,E,u),Ig(4,E);break;case 1:if(Xl(b,E,u),f=E,b=f.stateNode,typeof b.componentDidMount=="function")try{b.componentDidMount()}catch(pe){Ir(f,f.return,pe)}if(f=E,b=f.updateQueue,b!==null){var K=f.stateNode;try{var ee=b.shared.hiddenCallbacks;if(ee!==null)for(b.shared.hiddenCallbacks=null,b=0;b<ee.length;b++)LM(ee[b],K)}catch(pe){Ir(f,f.return,pe)}}u&&M&64&&QT(E),Mg(E,E.return);break;case 27:tj(E);case 26:case 5:Xl(b,E,u),u&&f===null&&M&4&&JT(E),Mg(E,E.return);break;case 12:Xl(b,E,u);break;case 31:Xl(b,E,u),u&&M&4&&oj(b,E);break;case 13:Xl(b,E,u),u&&M&4&&sj(b,E);break;case 22:E.memoizedState===null&&Xl(b,E,u),Mg(E,E.return);break;case 30:break;default:Xl(b,E,u)}s=s.sibling}}function HC(i,s){var u=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),i=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(i=s.memoizedState.cachePool.pool),i!==u&&(i!=null&&i.refCount++,u!=null&&bg(u))}function qC(i,s){i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&bg(i))}function us(i,s,u,f){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)cj(i,s,u,f),s=s.sibling}function cj(i,s,u,f){var b=s.flags;switch(s.tag){case 0:case 11:case 15:us(i,s,u,f),b&2048&&Ig(9,s);break;case 1:us(i,s,u,f);break;case 3:us(i,s,u,f),b&2048&&(i=null,s.alternate!==null&&(i=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==i&&(s.refCount++,i!=null&&bg(i)));break;case 12:if(b&2048){us(i,s,u,f),i=s.stateNode;try{var E=s.memoizedProps,M=E.id,K=E.onPostCommit;typeof K=="function"&&K(M,s.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(ee){Ir(s,s.return,ee)}}else us(i,s,u,f);break;case 31:us(i,s,u,f);break;case 13:us(i,s,u,f);break;case 23:break;case 22:E=s.stateNode,M=s.alternate,s.memoizedState!==null?E._visibility&2?us(i,s,u,f):Tg(i,s):E._visibility&2?us(i,s,u,f):(E._visibility|=2,fm(i,s,u,f,(s.subtreeFlags&10256)!==0||!1)),b&2048&&HC(M,s);break;case 24:us(i,s,u,f),b&2048&&qC(s.alternate,s);break;default:us(i,s,u,f)}}function fm(i,s,u,f,b){for(b=b&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var E=i,M=s,K=u,ee=f,pe=M.flags;switch(M.tag){case 0:case 11:case 15:fm(E,M,K,ee,b),Ig(8,M);break;case 23:break;case 22:var be=M.stateNode;M.memoizedState!==null?be._visibility&2?fm(E,M,K,ee,b):Tg(E,M):(be._visibility|=2,fm(E,M,K,ee,b)),b&&pe&2048&&HC(M.alternate,M);break;case 24:fm(E,M,K,ee,b),b&&pe&2048&&qC(M.alternate,M);break;default:fm(E,M,K,ee,b)}s=s.sibling}}function Tg(i,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var u=i,f=s,b=f.flags;switch(f.tag){case 22:Tg(u,f),b&2048&&HC(f.alternate,f);break;case 24:Tg(u,f),b&2048&&qC(f.alternate,f);break;default:Tg(u,f)}s=s.sibling}}var jg=8192;function mm(i,s,u){if(i.subtreeFlags&jg)for(i=i.child;i!==null;)dj(i,s,u),i=i.sibling}function dj(i,s,u){switch(i.tag){case 26:mm(i,s,u),i.flags&jg&&i.memoizedState!==null&&ZQ(u,ls,i.memoizedState,i.memoizedProps);break;case 5:mm(i,s,u);break;case 3:case 4:var f=ls;ls=Tw(i.stateNode.containerInfo),mm(i,s,u),ls=f;break;case 22:i.memoizedState===null&&(f=i.alternate,f!==null&&f.memoizedState!==null?(f=jg,jg=16777216,mm(i,s,u),jg=f):mm(i,s,u));break;default:mm(i,s,u)}}function pj(i){var s=i.alternate;if(s!==null&&(i=s.child,i!==null)){s.child=null;do s=i.sibling,i.sibling=null,i=s;while(i!==null)}}function _g(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var f=s[u];sa=f,mj(f,i)}pj(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)fj(i),i=i.sibling}function fj(i){switch(i.tag){case 0:case 11:case 15:_g(i),i.flags&2048&&Yu(9,i,i.return);break;case 3:_g(i);break;case 12:_g(i);break;case 22:var s=i.stateNode;i.memoizedState!==null&&s._visibility&2&&(i.return===null||i.return.tag!==13)?(s._visibility&=-3,bw(i)):_g(i);break;default:_g(i)}}function bw(i){var s=i.deletions;if((i.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var f=s[u];sa=f,mj(f,i)}pj(i)}for(i=i.child;i!==null;){switch(s=i,s.tag){case 0:case 11:case 15:Yu(8,s,s.return),bw(s);break;case 22:u=s.stateNode,u._visibility&2&&(u._visibility&=-3,bw(s));break;default:bw(s)}i=i.sibling}}function mj(i,s){for(;sa!==null;){var u=sa;switch(u.tag){case 0:case 11:case 15:Yu(8,u,s);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var f=u.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:bg(u.memoizedState.cache)}if(f=u.child,f!==null)f.return=u,sa=f;else e:for(u=i;sa!==null;){f=sa;var b=f.sibling,E=f.return;if(aj(f),f===u){sa=null;break e}if(b!==null){b.return=E,sa=b;break e}sa=E}}}var hQ={getCacheForType:function(i){var s=ba(Tn),u=s.data.get(i);return u===void 0&&(u=i(),s.data.set(i,u)),u},cacheSignal:function(){return ba(Tn).controller.signal}},gQ=typeof WeakMap=="function"?WeakMap:Map,vr=0,zr=null,Wt=null,Yt=0,Br=0,Ji=null,Qu=!1,hm=!1,WC=!1,Yl=0,yn=0,Zu=0,Ld=0,VC=0,eo=0,gm=0,Pg=null,Ei=null,UC=!1,yw=0,hj=0,ww=1/0,xw=null,Ju=null,Kn=0,ec=null,vm=null,Ql=0,KC=0,GC=null,gj=null,Ng=0,XC=null;function to(){return(vr&2)!==0&&Yt!==0?Yt&-Yt:W.T!==null?t8():qt()}function vj(){if(eo===0)if((Yt&536870912)===0||ar){var i=$r;$r<<=1,($r&3932160)===0&&($r=262144),eo=i}else eo=536870912;return i=Qi.current,i!==null&&(i.flags|=32),eo}function ki(i,s,u){(i===zr&&(Br===2||Br===9)||i.cancelPendingCommit!==null)&&(bm(i,0),tc(i,Yt,eo,!1)),Oe(i,u),((vr&2)===0||i!==zr)&&(i===zr&&((vr&2)===0&&(Ld|=u),yn===4&&tc(i,Yt,eo,!1)),Ws(i))}function bj(i,s,u){if((vr&6)!==0)throw Error(a(327));var f=!u&&(s&127)===0&&(s&i.expiredLanes)===0||Sr(i,s),b=f?yQ(i,s):QC(i,s,!0),E=f;do{if(b===0){hm&&!f&&tc(i,s,0,!1);break}else{if(u=i.current.alternate,E&&!vQ(u)){b=QC(i,s,!1),E=!1;continue}if(b===2){if(E=s,i.errorRecoveryDisabledLanes&E)var M=0;else M=i.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){s=M;e:{var K=i;b=Pg;var ee=K.current.memoizedState.isDehydrated;if(ee&&(bm(K,M).flags|=256),M=QC(K,M,!1),M!==2){if(WC&&!ee){K.errorRecoveryDisabledLanes|=E,Ld|=E,b=4;break e}E=Ei,Ei=b,E!==null&&(Ei===null?Ei=E:Ei.push.apply(Ei,E))}b=M}if(E=!1,b!==2)continue}}if(b===1){bm(i,0),tc(i,s,0,!0);break}e:{switch(f=i,E=b,E){case 0:case 1:throw Error(a(345));case 4:if((s&4194048)!==s)break;case 6:tc(f,s,eo,!Qu);break e;case 2:Ei=null;break;case 3:case 5:break;default:throw Error(a(329))}if((s&62914560)===s&&(b=yw+300-Ie(),10<b)){if(tc(f,s,eo,!Qu),nr(f,0,!0)!==0)break e;Ql=s,f.timeoutHandle=Qj(yj.bind(null,f,u,Ei,xw,UC,s,eo,Ld,gm,Qu,E,"Throttled",-0,0),b);break e}yj(f,u,Ei,xw,UC,s,eo,Ld,gm,Qu,E,null,-0,0)}}break}while(!0);Ws(i)}function yj(i,s,u,f,b,E,M,K,ee,pe,be,xe,me,ge){if(i.timeoutHandle=-1,xe=s.subtreeFlags,xe&8192||(xe&16785408)===16785408){xe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Pl},dj(s,E,xe);var tt=(E&62914560)===E?yw-Ie():(E&4194048)===E?hj-Ie():0;if(tt=JQ(xe,tt),tt!==null){Ql=E,i.cancelPendingCommit=tt(Dj.bind(null,i,s,E,u,f,b,M,K,ee,be,xe,null,me,ge)),tc(i,E,M,!pe);return}}Dj(i,s,E,u,f,b,M,K,ee)}function vQ(i){for(var s=i;;){var u=s.tag;if((u===0||u===11||u===15)&&s.flags&16384&&(u=s.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var f=0;f<u.length;f++){var b=u[f],E=b.getSnapshot;b=b.value;try{if(!Xi(E(),b))return!1}catch{return!1}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function tc(i,s,u,f){s&=~VC,s&=~Ld,i.suspendedLanes|=s,i.pingedLanes&=~s,f&&(i.warmLanes|=s),f=i.expirationTimes;for(var b=s;0<b;){var E=31-rt(b),M=1<<E;f[E]=-1,b&=~M}u!==0&&it(i,u,s)}function Ew(){return(vr&6)===0?(Og(0,!1),!1):!0}function YC(){if(Wt!==null){if(Br===0)var i=Wt.return;else i=Wt,Ll=Id=null,pC(i),lm=null,wg=0,i=Wt;for(;i!==null;)YT(i.alternate,i),i=i.return;Wt=null}}function bm(i,s){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,_Q(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),Ql=0,YC(),zr=i,Wt=u=Ol(i.current,null),Yt=s,Br=0,Ji=null,Qu=!1,hm=Sr(i,s),WC=!1,gm=eo=VC=Ld=Zu=yn=0,Ei=Pg=null,UC=!1,(s&8)!==0&&(s|=s&32);var f=i.entangledLanes;if(f!==0)for(i=i.entanglements,f&=s;0<f;){var b=31-rt(f),E=1<<b;s|=i[b],f&=~E}return Yl=s,qy(),u}function wj(i,s){Ft=null,W.H=Ag,s===sm||s===Qy?(s=PM(),Br=3):s===eC?(s=PM(),Br=4):Br=s===AC?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Ji=s,Wt===null&&(yn=1,dw(i,Co(s,i.current)))}function xj(){var i=Qi.current;return i===null?!0:(Yt&4194048)===Yt?ss===null:(Yt&62914560)===Yt||(Yt&536870912)!==0?i===ss:!1}function Ej(){var i=W.H;return W.H=Ag,i===null?Ag:i}function kj(){var i=W.A;return W.A=hQ,i}function kw(){yn=4,Qu||(Yt&4194048)!==Yt&&Qi.current!==null||(hm=!0),(Zu&134217727)===0&&(Ld&134217727)===0||zr===null||tc(zr,Yt,eo,!1)}function QC(i,s,u){var f=vr;vr|=2;var b=Ej(),E=kj();(zr!==i||Yt!==s)&&(xw=null,bm(i,s)),s=!1;var M=yn;e:do try{if(Br!==0&&Wt!==null){var K=Wt,ee=Ji;switch(Br){case 8:YC(),M=6;break e;case 3:case 2:case 9:case 6:Qi.current===null&&(s=!0);var pe=Br;if(Br=0,Ji=null,ym(i,K,ee,pe),u&&hm){M=0;break e}break;default:pe=Br,Br=0,Ji=null,ym(i,K,ee,pe)}}bQ(),M=yn;break}catch(be){wj(i,be)}while(!0);return s&&i.shellSuspendCounter++,Ll=Id=null,vr=f,W.H=b,W.A=E,Wt===null&&(zr=null,Yt=0,qy()),M}function bQ(){for(;Wt!==null;)Cj(Wt)}function yQ(i,s){var u=vr;vr|=2;var f=Ej(),b=kj();zr!==i||Yt!==s?(xw=null,ww=Ie()+500,bm(i,s)):hm=Sr(i,s);e:do try{if(Br!==0&&Wt!==null){s=Wt;var E=Ji;t:switch(Br){case 1:Br=0,Ji=null,ym(i,s,E,1);break;case 2:case 9:if(jM(E)){Br=0,Ji=null,Sj(s);break}s=function(){Br!==2&&Br!==9||zr!==i||(Br=7),Ws(i)},E.then(s,s);break e;case 3:Br=7;break e;case 4:Br=5;break e;case 7:jM(E)?(Br=0,Ji=null,Sj(s)):(Br=0,Ji=null,ym(i,s,E,7));break;case 5:var M=null;switch(Wt.tag){case 26:M=Wt.memoizedState;case 5:case 27:var K=Wt;if(M?p_(M):K.stateNode.complete){Br=0,Ji=null;var ee=K.sibling;if(ee!==null)Wt=ee;else{var pe=K.return;pe!==null?(Wt=pe,Cw(pe)):Wt=null}break t}}Br=0,Ji=null,ym(i,s,E,5);break;case 6:Br=0,Ji=null,ym(i,s,E,6);break;case 8:YC(),yn=6;break e;default:throw Error(a(462))}}wQ();break}catch(be){wj(i,be)}while(!0);return Ll=Id=null,W.H=f,W.A=b,vr=u,Wt!==null?0:(zr=null,Yt=0,qy(),yn)}function wQ(){for(;Wt!==null&&!Ue();)Cj(Wt)}function Cj(i){var s=GT(i.alternate,i,Yl);i.memoizedProps=i.pendingProps,s===null?Cw(i):Wt=s}function Sj(i){var s=i,u=s.alternate;switch(s.tag){case 15:case 0:s=HT(u,s,s.pendingProps,s.type,void 0,Yt);break;case 11:s=HT(u,s,s.pendingProps,s.type.render,s.ref,Yt);break;case 5:pC(s);default:YT(u,s),s=Wt=kM(s,Yl),s=GT(u,s,Yl)}i.memoizedProps=i.pendingProps,s===null?Cw(i):Wt=s}function ym(i,s,u,f){Ll=Id=null,pC(s),lm=null,wg=0;var b=s.return;try{if(lQ(i,b,s,u,Yt)){yn=1,dw(i,Co(u,i.current)),Wt=null;return}}catch(E){if(b!==null)throw Wt=b,E;yn=1,dw(i,Co(u,i.current)),Wt=null;return}s.flags&32768?(ar||f===1?i=!0:hm||(Yt&536870912)!==0?i=!1:(Qu=i=!0,(f===2||f===9||f===3||f===6)&&(f=Qi.current,f!==null&&f.tag===13&&(f.flags|=16384))),Fj(s,i)):Cw(s)}function Cw(i){var s=i;do{if((s.flags&32768)!==0){Fj(s,Qu);return}i=s.return;var u=dQ(s.alternate,s,Yl);if(u!==null){Wt=u;return}if(s=s.sibling,s!==null){Wt=s;return}Wt=s=i}while(s!==null);yn===0&&(yn=5)}function Fj(i,s){do{var u=pQ(i.alternate,i);if(u!==null){u.flags&=32767,Wt=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!s&&(i=i.sibling,i!==null)){Wt=i;return}Wt=i=u}while(i!==null);yn=6,Wt=null}function Dj(i,s,u,f,b,E,M,K,ee){i.cancelPendingCommit=null;do Sw();while(Kn!==0);if((vr&6)!==0)throw Error(a(327));if(s!==null){if(s===i.current)throw Error(a(177));if(E=s.lanes|s.childLanes,E|=Rk,Qe(i,u,E,M,K,ee),i===zr&&(Wt=zr=null,Yt=0),vm=s,ec=i,Ql=u,KC=E,GC=b,gj=f,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,CQ(et,function(){return Mj(),null})):(i.callbackNode=null,i.callbackPriority=0),f=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||f){f=W.T,W.T=null,b=z.p,z.p=2,M=vr,vr|=4;try{fQ(i,s,u)}finally{vr=M,z.p=b,W.T=f}}Kn=1,Aj(),$j(),Bj()}}function Aj(){if(Kn===1){Kn=0;var i=ec,s=vm,u=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||u){u=W.T,W.T=null;var f=z.p;z.p=2;var b=vr;vr|=4;try{lj(s,i);var E=s8,M=mM(i.containerInfo),K=E.focusedElem,ee=E.selectionRange;if(M!==K&&K&&K.ownerDocument&&fM(K.ownerDocument.documentElement,K)){if(ee!==null&&jk(K)){var pe=ee.start,be=ee.end;if(be===void 0&&(be=pe),"selectionStart"in K)K.selectionStart=pe,K.selectionEnd=Math.min(be,K.value.length);else{var xe=K.ownerDocument||document,me=xe&&xe.defaultView||window;if(me.getSelection){var ge=me.getSelection(),tt=K.textContent.length,ht=Math.min(ee.start,tt),Pr=ee.end===void 0?ht:Math.min(ee.end,tt);!ge.extend&&ht>Pr&&(M=Pr,Pr=ht,ht=M);var ce=pM(K,ht),ie=pM(K,Pr);if(ce&&ie&&(ge.rangeCount!==1||ge.anchorNode!==ce.node||ge.anchorOffset!==ce.offset||ge.focusNode!==ie.node||ge.focusOffset!==ie.offset)){var de=xe.createRange();de.setStart(ce.node,ce.offset),ge.removeAllRanges(),ht>Pr?(ge.addRange(de),ge.extend(ie.node,ie.offset)):(de.setEnd(ie.node,ie.offset),ge.addRange(de))}}}}for(xe=[],ge=K;ge=ge.parentNode;)ge.nodeType===1&&xe.push({element:ge,left:ge.scrollLeft,top:ge.scrollTop});for(typeof K.focus=="function"&&K.focus(),K=0;K<xe.length;K++){var ye=xe[K];ye.element.scrollLeft=ye.left,ye.element.scrollTop=ye.top}}Rw=!!o8,s8=o8=null}finally{vr=b,z.p=f,W.T=u}}i.current=s,Kn=2}}function $j(){if(Kn===2){Kn=0;var i=ec,s=vm,u=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||u){u=W.T,W.T=null;var f=z.p;z.p=2;var b=vr;vr|=4;try{nj(i,s.alternate,s)}finally{vr=b,z.p=f,W.T=u}}Kn=3}}function Bj(){if(Kn===4||Kn===3){Kn=0,He();var i=ec,s=vm,u=Ql,f=gj;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Kn=5:(Kn=0,vm=ec=null,Ij(i,i.pendingLanes));var b=i.pendingLanes;if(b===0&&(Ju=null),Ht(u),s=s.stateNode,Ke&&typeof Ke.onCommitFiberRoot=="function")try{Ke.onCommitFiberRoot(at,s,void 0,(s.current.flags&128)===128)}catch{}if(f!==null){s=W.T,b=z.p,z.p=2,W.T=null;try{for(var E=i.onRecoverableError,M=0;M<f.length;M++){var K=f[M];E(K.value,{componentStack:K.stack})}}finally{W.T=s,z.p=b}}(Ql&3)!==0&&Sw(),Ws(i),b=i.pendingLanes,(u&261930)!==0&&(b&42)!==0?i===XC?Ng++:(Ng=0,XC=i):Ng=0,Og(0,!1)}}function Ij(i,s){(i.pooledCacheLanes&=s)===0&&(s=i.pooledCache,s!=null&&(i.pooledCache=null,bg(s)))}function Sw(){return Aj(),$j(),Bj(),Mj()}function Mj(){if(Kn!==5)return!1;var i=ec,s=KC;KC=0;var u=Ht(Ql),f=W.T,b=z.p;try{z.p=32>u?32:u,W.T=null,u=GC,GC=null;var E=ec,M=Ql;if(Kn=0,vm=ec=null,Ql=0,(vr&6)!==0)throw Error(a(331));var K=vr;if(vr|=4,fj(E.current),cj(E,E.current,M,u),vr=K,Og(0,!1),Ke&&typeof Ke.onPostCommitFiberRoot=="function")try{Ke.onPostCommitFiberRoot(at,E)}catch{}return!0}finally{z.p=b,W.T=f,Ij(i,s)}}function Tj(i,s,u){s=Co(u,s),s=DC(i.stateNode,s,2),i=Ku(i,s,2),i!==null&&(Oe(i,2),Ws(i))}function Ir(i,s,u){if(i.tag===3)Tj(i,i,u);else for(;s!==null;){if(s.tag===3){Tj(s,i,u);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Ju===null||!Ju.has(f))){i=Co(u,i),u=jT(2),f=Ku(s,u,2),f!==null&&(_T(u,f,s,i),Oe(f,2),Ws(f));break}}s=s.return}}function ZC(i,s,u){var f=i.pingCache;if(f===null){f=i.pingCache=new gQ;var b=new Set;f.set(s,b)}else b=f.get(s),b===void 0&&(b=new Set,f.set(s,b));b.has(u)||(WC=!0,b.add(u),i=xQ.bind(null,i,s,u),s.then(i,i))}function xQ(i,s,u){var f=i.pingCache;f!==null&&f.delete(s),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,zr===i&&(Yt&u)===u&&(yn===4||yn===3&&(Yt&62914560)===Yt&&300>Ie()-yw?(vr&2)===0&&bm(i,0):VC|=u,gm===Yt&&(gm=0)),Ws(i)}function jj(i,s){s===0&&(s=ot()),i=Ad(i,s),i!==null&&(Oe(i,s),Ws(i))}function EQ(i){var s=i.memoizedState,u=0;s!==null&&(u=s.retryLane),jj(i,u)}function kQ(i,s){var u=0;switch(i.tag){case 31:case 13:var f=i.stateNode,b=i.memoizedState;b!==null&&(u=b.retryLane);break;case 19:f=i.stateNode;break;case 22:f=i.stateNode._retryCache;break;default:throw Error(a(314))}f!==null&&f.delete(s),jj(i,u)}function CQ(i,s){return Be(i,s)}var Fw=null,wm=null,JC=!1,Dw=!1,e8=!1,rc=0;function Ws(i){i!==wm&&i.next===null&&(wm===null?Fw=wm=i:wm=wm.next=i),Dw=!0,JC||(JC=!0,FQ())}function Og(i,s){if(!e8&&Dw){e8=!0;do for(var u=!1,f=Fw;f!==null;){if(!s)if(i!==0){var b=f.pendingLanes;if(b===0)var E=0;else{var M=f.suspendedLanes,K=f.pingedLanes;E=(1<<31-rt(42|i)+1)-1,E&=b&~(M&~K),E=E&201326741?E&201326741|1:E?E|2:0}E!==0&&(u=!0,Oj(f,E))}else E=Yt,E=nr(f,f===zr?E:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(E&3)===0||Sr(f,E)||(u=!0,Oj(f,E));f=f.next}while(u);e8=!1}}function SQ(){_j()}function _j(){Dw=JC=!1;var i=0;rc!==0&&jQ()&&(i=rc);for(var s=Ie(),u=null,f=Fw;f!==null;){var b=f.next,E=Pj(f,s);E===0?(f.next=null,u===null?Fw=b:u.next=b,b===null&&(wm=u)):(u=f,(i!==0||(E&3)!==0)&&(Dw=!0)),f=b}Kn!==0&&Kn!==5||Og(i,!1),rc!==0&&(rc=0)}function Pj(i,s){for(var u=i.suspendedLanes,f=i.pingedLanes,b=i.expirationTimes,E=i.pendingLanes&-62914561;0<E;){var M=31-rt(E),K=1<<M,ee=b[M];ee===-1?((K&u)===0||(K&f)!==0)&&(b[M]=Rt(K,s)):ee<=s&&(i.expiredLanes|=K),E&=~K}if(s=zr,u=Yt,u=nr(i,i===s?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),f=i.callbackNode,u===0||i===s&&(Br===2||Br===9)||i.cancelPendingCommit!==null)return f!==null&&f!==null&&Me(f),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||Sr(i,u)){if(s=u&-u,s===i.callbackPriority)return s;switch(f!==null&&Me(f),Ht(u)){case 2:case 8:u=gt;break;case 32:u=et;break;case 268435456:u=Se;break;default:u=et}return f=Nj.bind(null,i),u=Be(u,f),i.callbackPriority=s,i.callbackNode=u,s}return f!==null&&f!==null&&Me(f),i.callbackPriority=2,i.callbackNode=null,2}function Nj(i,s){if(Kn!==0&&Kn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(Sw()&&i.callbackNode!==u)return null;var f=Yt;return f=nr(i,i===zr?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),f===0?null:(bj(i,f,s),Pj(i,Ie()),i.callbackNode!=null&&i.callbackNode===u?Nj.bind(null,i):null)}function Oj(i,s){if(Sw())return null;bj(i,s,!0)}function FQ(){PQ(function(){(vr&6)!==0?Be(Je,SQ):_j()})}function t8(){if(rc===0){var i=im;i===0&&(i=zt,zt<<=1,(zt&261888)===0&&(zt=256)),rc=i}return rc}function Rj(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:jy(""+i)}function Lj(i,s){var u=s.ownerDocument.createElement("input");return u.name=s.name,u.value=s.value,i.id&&u.setAttribute("form",i.id),s.parentNode.insertBefore(u,s),i=new FormData(i),u.parentNode.removeChild(u),i}function DQ(i,s,u,f,b){if(s==="submit"&&u&&u.stateNode===b){var E=Rj((b[Lr]||null).action),M=f.submitter;M&&(s=(s=M[Lr]||null)?Rj(s.formAction):M.getAttribute("formAction"),s!==null&&(E=s,M=null));var K=new Oy("action","action",null,f,b);i.push({event:K,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(rc!==0){var ee=M?Lj(b,M):new FormData(b);xC(u,{pending:!0,data:ee,method:b.method,action:E},null,ee)}}else typeof E=="function"&&(K.preventDefault(),ee=M?Lj(b,M):new FormData(b),xC(u,{pending:!0,data:ee,method:b.method,action:E},E,ee))},currentTarget:b}]})}}for($w=0;$w<Ok.length;$w++)Aw=Ok[$w],zj=Aw.toLowerCase(),Hj=Aw[0].toUpperCase()+Aw.slice(1),os(zj,"on"+Hj);var Aw,zj,Hj,$w;os(vM,"onAnimationEnd"),os(bM,"onAnimationIteration"),os(yM,"onAnimationStart"),os("dblclick","onDoubleClick"),os("focusin","onFocus"),os("focusout","onBlur"),os(VY,"onTransitionRun"),os(UY,"onTransitionStart"),os(KY,"onTransitionCancel"),os(wM,"onTransitionEnd"),mt("onMouseEnter",["mouseout","mouseover"]),mt("onMouseLeave",["mouseout","mouseover"]),mt("onPointerEnter",["pointerout","pointerover"]),mt("onPointerLeave",["pointerout","pointerover"]),ha("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ha("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ha("onBeforeInput",["compositionend","keypress","textInput","paste"]),ha("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ha("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ha("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rg="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(" "),AQ=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Rg));function qj(i,s){s=(s&4)!==0;for(var u=0;u<i.length;u++){var f=i[u],b=f.event;f=f.listeners;e:{var E=void 0;if(s)for(var M=f.length-1;0<=M;M--){var K=f[M],ee=K.instance,pe=K.currentTarget;if(K=K.listener,ee!==E&&b.isPropagationStopped())break e;E=K,b.currentTarget=pe;try{E(b)}catch(be){Hy(be)}b.currentTarget=null,E=ee}else for(M=0;M<f.length;M++){if(K=f[M],ee=K.instance,pe=K.currentTarget,K=K.listener,ee!==E&&b.isPropagationStopped())break e;E=K,b.currentTarget=pe;try{E(b)}catch(be){Hy(be)}b.currentTarget=null,E=ee}}}}function Vt(i,s){var u=s[It];u===void 0&&(u=s[It]=new Set);var f=i+"__bubble";u.has(f)||(Wj(s,i,2,!1),u.add(f))}function r8(i,s,u){var f=0;s&&(f|=4),Wj(u,i,f,s)}var Bw="_reactListening"+Math.random().toString(36).slice(2);function n8(i){if(!i[Bw]){i[Bw]=!0,gi.forEach(function(u){u!=="selectionchange"&&(AQ.has(u)||r8(u,!1,i),r8(u,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Bw]||(s[Bw]=!0,r8("selectionchange",!1,s))}}function Wj(i,s,u,f){switch(y_(s)){case 2:var b=rZ;break;case 8:b=nZ;break;default:b=b8}u=b.bind(null,s,u,i),b=void 0,!Sk||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(b=!0),f?b!==void 0?i.addEventListener(s,u,{capture:!0,passive:b}):i.addEventListener(s,u,!0):b!==void 0?i.addEventListener(s,u,{passive:b}):i.addEventListener(s,u,!1)}function a8(i,s,u,f,b){var E=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var M=f.tag;if(M===3||M===4){var K=f.stateNode.containerInfo;if(K===b)break;if(M===4)for(M=f.return;M!==null;){var ee=M.tag;if((ee===3||ee===4)&&M.stateNode.containerInfo===b)return;M=M.return}for(;K!==null;){if(M=Pa(K),M===null)return;if(ee=M.tag,ee===5||ee===6||ee===26||ee===27){f=E=M;continue e}K=K.parentNode}}f=f.return}GI(function(){var pe=E,be=kk(u),xe=[];e:{var me=xM.get(i);if(me!==void 0){var ge=Oy,tt=i;switch(i){case"keypress":if(Py(u)===0)break e;case"keydown":case"keyup":ge=kY;break;case"focusin":tt="focus",ge=$k;break;case"focusout":tt="blur",ge=$k;break;case"beforeblur":case"afterblur":ge=$k;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ge=QI;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=dY;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=FY;break;case vM:case bM:case yM:ge=mY;break;case wM:ge=AY;break;case"scroll":case"scrollend":ge=uY;break;case"wheel":ge=BY;break;case"copy":case"cut":case"paste":ge=gY;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ge=JI;break;case"toggle":case"beforetoggle":ge=MY}var ht=(s&4)!==0,Pr=!ht&&(i==="scroll"||i==="scrollend"),ce=ht?me!==null?me+"Capture":null:me;ht=[];for(var ie=pe,de;ie!==null;){var ye=ie;if(de=ye.stateNode,ye=ye.tag,ye!==5&&ye!==26&&ye!==27||de===null||ce===null||(ye=lg(ie,ce),ye!=null&&ht.push(Lg(ie,ye,de))),Pr)break;ie=ie.return}0<ht.length&&(me=new ge(me,tt,null,u,be),xe.push({event:me,listeners:ht}))}}if((s&7)===0){e:{if(me=i==="mouseover"||i==="pointerover",ge=i==="mouseout"||i==="pointerout",me&&u!==Ek&&(tt=u.relatedTarget||u.fromElement)&&(Pa(tt)||tt[ft]))break e;if((ge||me)&&(me=be.window===be?be:(me=be.ownerDocument)?me.defaultView||me.parentWindow:window,ge?(tt=u.relatedTarget||u.toElement,ge=pe,tt=tt?Pa(tt):null,tt!==null&&(Pr=l(tt),ht=tt.tag,tt!==Pr||ht!==5&&ht!==27&&ht!==6)&&(tt=null)):(ge=null,tt=pe),ge!==tt)){if(ht=QI,ye="onMouseLeave",ce="onMouseEnter",ie="mouse",(i==="pointerout"||i==="pointerover")&&(ht=JI,ye="onPointerLeave",ce="onPointerEnter",ie="pointer"),Pr=ge==null?me:Mn(ge),de=tt==null?me:Mn(tt),me=new ht(ye,ie+"leave",ge,u,be),me.target=Pr,me.relatedTarget=de,ye=null,Pa(be)===pe&&(ht=new ht(ce,ie+"enter",tt,u,be),ht.target=de,ht.relatedTarget=Pr,ye=ht),Pr=ye,ge&&tt)t:{for(ht=$Q,ce=ge,ie=tt,de=0,ye=ce;ye;ye=ht(ye))de++;ye=0;for(var st=ie;st;st=ht(st))ye++;for(;0<de-ye;)ce=ht(ce),de--;for(;0<ye-de;)ie=ht(ie),ye--;for(;de--;){if(ce===ie||ie!==null&&ce===ie.alternate){ht=ce;break t}ce=ht(ce),ie=ht(ie)}ht=null}else ht=null;ge!==null&&Vj(xe,me,ge,ht,!1),tt!==null&&Pr!==null&&Vj(xe,Pr,tt,ht,!0)}}e:{if(me=pe?Mn(pe):window,ge=me.nodeName&&me.nodeName.toLowerCase(),ge==="select"||ge==="input"&&me.type==="file")var hr=sM;else if(iM(me))if(lM)hr=HY;else{hr=LY;var nt=RY}else ge=me.nodeName,!ge||ge.toLowerCase()!=="input"||me.type!=="checkbox"&&me.type!=="radio"?pe&&xk(pe.elementType)&&(hr=sM):hr=zY;if(hr&&(hr=hr(i,pe))){oM(xe,hr,u,be);break e}nt&&nt(i,me,pe),i==="focusout"&&pe&&me.type==="number"&&pe.memoizedProps.value!=null&&sg(me,"number",me.value)}switch(nt=pe?Mn(pe):window,i){case"focusin":(iM(nt)||nt.contentEditable==="true")&&(Qf=nt,_k=pe,hg=null);break;case"focusout":hg=_k=Qf=null;break;case"mousedown":Pk=!0;break;case"contextmenu":case"mouseup":case"dragend":Pk=!1,hM(xe,u,be);break;case"selectionchange":if(WY)break;case"keydown":case"keyup":hM(xe,u,be)}var Mt;if(Ik)e:{switch(i){case"compositionstart":var Qt="onCompositionStart";break e;case"compositionend":Qt="onCompositionEnd";break e;case"compositionupdate":Qt="onCompositionUpdate";break e}Qt=void 0}else Yf?nM(i,u)&&(Qt="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(Qt="onCompositionStart");Qt&&(eM&&u.locale!=="ko"&&(Yf||Qt!=="onCompositionStart"?Qt==="onCompositionEnd"&&Yf&&(Mt=XI()):(Lu=be,Fk="value"in Lu?Lu.value:Lu.textContent,Yf=!0)),nt=Iw(pe,Qt),0<nt.length&&(Qt=new ZI(Qt,i,null,u,be),xe.push({event:Qt,listeners:nt}),Mt?Qt.data=Mt:(Mt=aM(u),Mt!==null&&(Qt.data=Mt)))),(Mt=jY?_Y(i,u):PY(i,u))&&(Qt=Iw(pe,"onBeforeInput"),0<Qt.length&&(nt=new ZI("onBeforeInput","beforeinput",null,u,be),xe.push({event:nt,listeners:Qt}),nt.data=Mt)),DQ(xe,i,pe,u,be)}qj(xe,s)})}function Lg(i,s,u){return{instance:i,listener:s,currentTarget:u}}function Iw(i,s){for(var u=s+"Capture",f=[];i!==null;){var b=i,E=b.stateNode;if(b=b.tag,b!==5&&b!==26&&b!==27||E===null||(b=lg(i,u),b!=null&&f.unshift(Lg(i,b,E)),b=lg(i,s),b!=null&&f.push(Lg(i,b,E))),i.tag===3)return f;i=i.return}return[]}function $Q(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function Vj(i,s,u,f,b){for(var E=s._reactName,M=[];u!==null&&u!==f;){var K=u,ee=K.alternate,pe=K.stateNode;if(K=K.tag,ee!==null&&ee===f)break;K!==5&&K!==26&&K!==27||pe===null||(ee=pe,b?(pe=lg(u,E),pe!=null&&M.unshift(Lg(u,pe,ee))):b||(pe=lg(u,E),pe!=null&&M.push(Lg(u,pe,ee)))),u=u.return}M.length!==0&&i.push({event:s,listeners:M})}var BQ=/\r\n?/g,IQ=/\u0000|\uFFFD/g;function Uj(i){return(typeof i=="string"?i:""+i).replace(BQ,`
|
|
11
|
-
`).replace(IQ,"")}function Kj(i,s){return s=Uj(s),Uj(i)===s}function _r(i,s,u,f,b,E){switch(u){case"children":typeof f=="string"?s==="body"||s==="textarea"&&f===""||Uf(i,f):(typeof f=="number"||typeof f=="bigint")&&s!=="body"&&Uf(i,""+f);break;case"className":Ls(i,"class",f);break;case"tabIndex":Ls(i,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":Ls(i,u,f);break;case"style":UI(i,f,E);break;case"data":if(s!=="object"){Ls(i,"data",f);break}case"src":case"href":if(f===""&&(s!=="a"||u!=="href")){i.removeAttribute(u);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){i.removeAttribute(u);break}f=jy(""+f),i.setAttribute(u,f);break;case"action":case"formAction":if(typeof f=="function"){i.setAttribute(u,"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}else typeof E=="function"&&(u==="formAction"?(s!=="input"&&_r(i,s,"name",b.name,b,null),_r(i,s,"formEncType",b.formEncType,b,null),_r(i,s,"formMethod",b.formMethod,b,null),_r(i,s,"formTarget",b.formTarget,b,null)):(_r(i,s,"encType",b.encType,b,null),_r(i,s,"method",b.method,b,null),_r(i,s,"target",b.target,b,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){i.removeAttribute(u);break}f=jy(""+f),i.setAttribute(u,f);break;case"onClick":f!=null&&(i.onclick=Pl);break;case"onScroll":f!=null&&Vt("scroll",i);break;case"onScrollEnd":f!=null&&Vt("scrollend",i);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(a(61));if(u=f.__html,u!=null){if(b.children!=null)throw Error(a(60));i.innerHTML=u}}break;case"multiple":i.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":i.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){i.removeAttribute("xlink:href");break}u=jy(""+f),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":f!=null&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(u,""+f):i.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":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":f&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":f===!0?i.setAttribute(u,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(u,f):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?i.setAttribute(u,f):i.removeAttribute(u);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?i.removeAttribute(u):i.setAttribute(u,f);break;case"popover":Vt("beforetoggle",i),Vt("toggle",i),is(i,"popover",f);break;case"xlinkActuate":vi(i,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":vi(i,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":vi(i,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":vi(i,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":vi(i,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":vi(i,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":vi(i,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":vi(i,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":vi(i,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":is(i,"is",f);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=sY.get(u)||u,is(i,u,f))}}function i8(i,s,u,f,b,E){switch(u){case"style":UI(i,f,E);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(a(61));if(u=f.__html,u!=null){if(b.children!=null)throw Error(a(60));i.innerHTML=u}}break;case"children":typeof f=="string"?Uf(i,f):(typeof f=="number"||typeof f=="bigint")&&Uf(i,""+f);break;case"onScroll":f!=null&&Vt("scroll",i);break;case"onScrollEnd":f!=null&&Vt("scrollend",i);break;case"onClick":f!=null&&(i.onclick=Pl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ki.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(b=u.endsWith("Capture"),s=u.slice(2,b?u.length-7:void 0),E=i[Lr]||null,E=E!=null?E[u]:null,typeof E=="function"&&i.removeEventListener(s,E,b),typeof f=="function")){typeof E!="function"&&E!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(s,f,b);break e}u in i?i[u]=f:f===!0?i.setAttribute(u,""):is(i,u,f)}}}function wa(i,s,u){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Vt("error",i),Vt("load",i);var f=!1,b=!1,E;for(E in u)if(u.hasOwnProperty(E)){var M=u[E];if(M!=null)switch(E){case"src":f=!0;break;case"srcSet":b=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:_r(i,s,E,M,u,null)}}b&&_r(i,s,"srcSet",u.srcSet,u,null),f&&_r(i,s,"src",u.src,u,null);return;case"input":Vt("invalid",i);var K=E=M=b=null,ee=null,pe=null;for(f in u)if(u.hasOwnProperty(f)){var be=u[f];if(be!=null)switch(f){case"name":b=be;break;case"type":M=be;break;case"checked":ee=be;break;case"defaultChecked":pe=be;break;case"value":E=be;break;case"defaultValue":K=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(a(137,s));break;default:_r(i,s,f,be,u,null)}}og(i,E,K,ee,pe,M,b,!1);return;case"select":Vt("invalid",i),f=M=E=null;for(b in u)if(u.hasOwnProperty(b)&&(K=u[b],K!=null))switch(b){case"value":E=K;break;case"defaultValue":M=K;break;case"multiple":f=K;default:_r(i,s,b,K,u,null)}s=E,u=M,i.multiple=!!f,s!=null?Vf(i,!!f,s,!1):u!=null&&Vf(i,!!f,u,!0);return;case"textarea":Vt("invalid",i),E=b=f=null;for(M in u)if(u.hasOwnProperty(M)&&(K=u[M],K!=null))switch(M){case"value":f=K;break;case"defaultValue":b=K;break;case"children":E=K;break;case"dangerouslySetInnerHTML":if(K!=null)throw Error(a(91));break;default:_r(i,s,M,K,u,null)}WI(i,f,b,E);return;case"option":for(ee in u)u.hasOwnProperty(ee)&&(f=u[ee],f!=null)&&(ee==="selected"?i.selected=f&&typeof f!="function"&&typeof f!="symbol":_r(i,s,ee,f,u,null));return;case"dialog":Vt("beforetoggle",i),Vt("toggle",i),Vt("cancel",i),Vt("close",i);break;case"iframe":case"object":Vt("load",i);break;case"video":case"audio":for(f=0;f<Rg.length;f++)Vt(Rg[f],i);break;case"image":Vt("error",i),Vt("load",i);break;case"details":Vt("toggle",i);break;case"embed":case"source":case"link":Vt("error",i),Vt("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(pe in u)if(u.hasOwnProperty(pe)&&(f=u[pe],f!=null))switch(pe){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:_r(i,s,pe,f,u,null)}return;default:if(xk(s)){for(be in u)u.hasOwnProperty(be)&&(f=u[be],f!==void 0&&i8(i,s,be,f,u,void 0));return}}for(K in u)u.hasOwnProperty(K)&&(f=u[K],f!=null&&_r(i,s,K,f,u,null))}function MQ(i,s,u,f){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var b=null,E=null,M=null,K=null,ee=null,pe=null,be=null;for(ge in u){var xe=u[ge];if(u.hasOwnProperty(ge)&&xe!=null)switch(ge){case"checked":break;case"value":break;case"defaultValue":ee=xe;default:f.hasOwnProperty(ge)||_r(i,s,ge,null,f,xe)}}for(var me in f){var ge=f[me];if(xe=u[me],f.hasOwnProperty(me)&&(ge!=null||xe!=null))switch(me){case"type":E=ge;break;case"name":b=ge;break;case"checked":pe=ge;break;case"defaultChecked":be=ge;break;case"value":M=ge;break;case"defaultValue":K=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(a(137,s));break;default:ge!==xe&&_r(i,s,me,ge,f,xe)}}Wf(i,M,K,ee,pe,be,E,b);return;case"select":ge=M=K=me=null;for(E in u)if(ee=u[E],u.hasOwnProperty(E)&&ee!=null)switch(E){case"value":break;case"multiple":ge=ee;default:f.hasOwnProperty(E)||_r(i,s,E,null,f,ee)}for(b in f)if(E=f[b],ee=u[b],f.hasOwnProperty(b)&&(E!=null||ee!=null))switch(b){case"value":me=E;break;case"defaultValue":K=E;break;case"multiple":M=E;default:E!==ee&&_r(i,s,b,E,f,ee)}s=K,u=M,f=ge,me!=null?Vf(i,!!u,me,!1):!!f!=!!u&&(s!=null?Vf(i,!!u,s,!0):Vf(i,!!u,u?[]:"",!1));return;case"textarea":ge=me=null;for(K in u)if(b=u[K],u.hasOwnProperty(K)&&b!=null&&!f.hasOwnProperty(K))switch(K){case"value":break;case"children":break;default:_r(i,s,K,null,f,b)}for(M in f)if(b=f[M],E=u[M],f.hasOwnProperty(M)&&(b!=null||E!=null))switch(M){case"value":me=b;break;case"defaultValue":ge=b;break;case"children":break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(a(91));break;default:b!==E&&_r(i,s,M,b,f,E)}qI(i,me,ge);return;case"option":for(var tt in u)me=u[tt],u.hasOwnProperty(tt)&&me!=null&&!f.hasOwnProperty(tt)&&(tt==="selected"?i.selected=!1:_r(i,s,tt,null,f,me));for(ee in f)me=f[ee],ge=u[ee],f.hasOwnProperty(ee)&&me!==ge&&(me!=null||ge!=null)&&(ee==="selected"?i.selected=me&&typeof me!="function"&&typeof me!="symbol":_r(i,s,ee,me,f,ge));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 ht in u)me=u[ht],u.hasOwnProperty(ht)&&me!=null&&!f.hasOwnProperty(ht)&&_r(i,s,ht,null,f,me);for(pe in f)if(me=f[pe],ge=u[pe],f.hasOwnProperty(pe)&&me!==ge&&(me!=null||ge!=null))switch(pe){case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(a(137,s));break;default:_r(i,s,pe,me,f,ge)}return;default:if(xk(s)){for(var Pr in u)me=u[Pr],u.hasOwnProperty(Pr)&&me!==void 0&&!f.hasOwnProperty(Pr)&&i8(i,s,Pr,void 0,f,me);for(be in f)me=f[be],ge=u[be],!f.hasOwnProperty(be)||me===ge||me===void 0&&ge===void 0||i8(i,s,be,me,f,ge);return}}for(var ce in u)me=u[ce],u.hasOwnProperty(ce)&&me!=null&&!f.hasOwnProperty(ce)&&_r(i,s,ce,null,f,me);for(xe in f)me=f[xe],ge=u[xe],!f.hasOwnProperty(xe)||me===ge||me==null&&ge==null||_r(i,s,xe,me,f,ge)}function Gj(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function TQ(){if(typeof performance.getEntriesByType=="function"){for(var i=0,s=0,u=performance.getEntriesByType("resource"),f=0;f<u.length;f++){var b=u[f],E=b.transferSize,M=b.initiatorType,K=b.duration;if(E&&K&&Gj(M)){for(M=0,K=b.responseEnd,f+=1;f<u.length;f++){var ee=u[f],pe=ee.startTime;if(pe>K)break;var be=ee.transferSize,xe=ee.initiatorType;be&&Gj(xe)&&(ee=ee.responseEnd,M+=be*(ee<K?1:(K-pe)/(ee-pe)))}if(--f,s+=8*(E+M)/(b.duration/1e3),i++,10<i)break}}if(0<i)return s/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var o8=null,s8=null;function Mw(i){return i.nodeType===9?i:i.ownerDocument}function Xj(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Yj(i,s){if(i===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&s==="foreignObject"?0:i}function l8(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var u8=null;function jQ(){var i=window.event;return i&&i.type==="popstate"?i===u8?!1:(u8=i,!0):(u8=null,!1)}var Qj=typeof setTimeout=="function"?setTimeout:void 0,_Q=typeof clearTimeout=="function"?clearTimeout:void 0,Zj=typeof Promise=="function"?Promise:void 0,PQ=typeof queueMicrotask=="function"?queueMicrotask:typeof Zj<"u"?function(i){return Zj.resolve(null).then(i).catch(NQ)}:Qj;function NQ(i){setTimeout(function(){throw i})}function nc(i){return i==="head"}function Jj(i,s){var u=s,f=0;do{var b=u.nextSibling;if(i.removeChild(u),b&&b.nodeType===8)if(u=b.data,u==="/$"||u==="/&"){if(f===0){i.removeChild(b),Cm(s);return}f--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")f++;else if(u==="html")zg(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,zg(u);for(var E=u.firstChild;E;){var M=E.nextSibling,K=E.nodeName;E[sr]||K==="SCRIPT"||K==="STYLE"||K==="LINK"&&E.rel.toLowerCase()==="stylesheet"||u.removeChild(E),E=M}}else u==="body"&&zg(i.ownerDocument.body);u=b}while(u);Cm(s)}function e_(i,s){var u=i;i=0;do{var f=u.nextSibling;if(u.nodeType===1?s?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(s?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),f&&f.nodeType===8)if(u=f.data,u==="/$"){if(i===0)break;i--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||i++;u=f}while(u)}function c8(i){var s=i.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var u=s;switch(s=s.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":c8(u),ri(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function OQ(i,s,u,f){for(;i.nodeType===1;){var b=u;if(i.nodeName.toLowerCase()!==s.toLowerCase()){if(!f&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(f){if(!i[sr])switch(s){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(E=i.getAttribute("rel"),E==="stylesheet"&&i.hasAttribute("data-precedence")||E!==b.rel||i.getAttribute("href")!==(b.href==null||b.href===""?null:b.href)||i.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin)||i.getAttribute("title")!==(b.title==null?null:b.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(E=i.getAttribute("src"),(E!==(b.src==null?null:b.src)||i.getAttribute("type")!==(b.type==null?null:b.type)||i.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin))&&E&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(s==="input"&&i.type==="hidden"){var E=b.name==null?null:""+b.name;if(b.type==="hidden"&&i.getAttribute("name")===E)return i}else return i;if(i=Ao(i.nextSibling),i===null)break}return null}function RQ(i,s,u){if(s==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=Ao(i.nextSibling),i===null))return null;return i}function t_(i,s){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!s||(i=Ao(i.nextSibling),i===null))return null;return i}function d8(i){return i.data==="$?"||i.data==="$~"}function p8(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function LQ(i,s){var u=i.ownerDocument;if(i.data==="$~")i._reactRetry=s;else if(i.data!=="$?"||u.readyState!=="loading")s();else{var f=function(){s(),u.removeEventListener("DOMContentLoaded",f)};u.addEventListener("DOMContentLoaded",f),i._reactRetry=f}}function Ao(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return i}var f8=null;function r_(i){i=i.nextSibling;for(var s=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(s===0)return Ao(i.nextSibling);s--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||s++}i=i.nextSibling}return null}function n_(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(s===0)return i;s--}else u!=="/$"&&u!=="/&"||s++}i=i.previousSibling}return null}function a_(i,s,u){switch(s=Mw(u),i){case"html":if(i=s.documentElement,!i)throw Error(a(452));return i;case"head":if(i=s.head,!i)throw Error(a(453));return i;case"body":if(i=s.body,!i)throw Error(a(454));return i;default:throw Error(a(451))}}function zg(i){for(var s=i.attributes;s.length;)i.removeAttributeNode(s[0]);ri(i)}var $o=new Map,i_=new Set;function Tw(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Zl=z.d;z.d={f:zQ,r:HQ,D:qQ,C:WQ,L:VQ,m:UQ,X:GQ,S:KQ,M:XQ};function zQ(){var i=Zl.f(),s=Ew();return i||s}function HQ(i){var s=Fr(i);s!==null&&s.tag===5&&s.type==="form"?wT(s):Zl.r(i)}var xm=typeof document>"u"?null:document;function o_(i,s,u){var f=xm;if(f&&typeof s=="string"&&s){var b=Gi(s);b='link[rel="'+i+'"][href="'+b+'"]',typeof u=="string"&&(b+='[crossorigin="'+u+'"]'),i_.has(b)||(i_.add(b),i={rel:i,crossOrigin:u,href:s},f.querySelector(b)===null&&(s=f.createElement("link"),wa(s,"link",i),lr(s),f.head.appendChild(s)))}}function qQ(i){Zl.D(i),o_("dns-prefetch",i,null)}function WQ(i,s){Zl.C(i,s),o_("preconnect",i,s)}function VQ(i,s,u){Zl.L(i,s,u);var f=xm;if(f&&i&&s){var b='link[rel="preload"][as="'+Gi(s)+'"]';s==="image"&&u&&u.imageSrcSet?(b+='[imagesrcset="'+Gi(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(b+='[imagesizes="'+Gi(u.imageSizes)+'"]')):b+='[href="'+Gi(i)+'"]';var E=b;switch(s){case"style":E=Em(i);break;case"script":E=km(i)}$o.has(E)||(i=v({rel:"preload",href:s==="image"&&u&&u.imageSrcSet?void 0:i,as:s},u),$o.set(E,i),f.querySelector(b)!==null||s==="style"&&f.querySelector(Hg(E))||s==="script"&&f.querySelector(qg(E))||(s=f.createElement("link"),wa(s,"link",i),lr(s),f.head.appendChild(s)))}}function UQ(i,s){Zl.m(i,s);var u=xm;if(u&&i){var f=s&&typeof s.as=="string"?s.as:"script",b='link[rel="modulepreload"][as="'+Gi(f)+'"][href="'+Gi(i)+'"]',E=b;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":E=km(i)}if(!$o.has(E)&&(i=v({rel:"modulepreload",href:i},s),$o.set(E,i),u.querySelector(b)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(qg(E)))return}f=u.createElement("link"),wa(f,"link",i),lr(f),u.head.appendChild(f)}}}function KQ(i,s,u){Zl.S(i,s,u);var f=xm;if(f&&i){var b=ma(f).hoistableStyles,E=Em(i);s=s||"default";var M=b.get(E);if(!M){var K={loading:0,preload:null};if(M=f.querySelector(Hg(E)))K.loading=5;else{i=v({rel:"stylesheet",href:i,"data-precedence":s},u),(u=$o.get(E))&&m8(i,u);var ee=M=f.createElement("link");lr(ee),wa(ee,"link",i),ee._p=new Promise(function(pe,be){ee.onload=pe,ee.onerror=be}),ee.addEventListener("load",function(){K.loading|=1}),ee.addEventListener("error",function(){K.loading|=2}),K.loading|=4,jw(M,s,f)}M={type:"stylesheet",instance:M,count:1,state:K},b.set(E,M)}}}function GQ(i,s){Zl.X(i,s);var u=xm;if(u&&i){var f=ma(u).hoistableScripts,b=km(i),E=f.get(b);E||(E=u.querySelector(qg(b)),E||(i=v({src:i,async:!0},s),(s=$o.get(b))&&h8(i,s),E=u.createElement("script"),lr(E),wa(E,"link",i),u.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},f.set(b,E))}}function XQ(i,s){Zl.M(i,s);var u=xm;if(u&&i){var f=ma(u).hoistableScripts,b=km(i),E=f.get(b);E||(E=u.querySelector(qg(b)),E||(i=v({src:i,async:!0,type:"module"},s),(s=$o.get(b))&&h8(i,s),E=u.createElement("script"),lr(E),wa(E,"link",i),u.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},f.set(b,E))}}function s_(i,s,u,f){var b=(b=J.current)?Tw(b):null;if(!b)throw Error(a(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(s=Em(u.href),u=ma(b).hoistableStyles,f=u.get(s),f||(f={type:"style",instance:null,count:0,state:null},u.set(s,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=Em(u.href);var E=ma(b).hoistableStyles,M=E.get(i);if(M||(b=b.ownerDocument||b,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},E.set(i,M),(E=b.querySelector(Hg(i)))&&!E._p&&(M.instance=E,M.state.loading=5),$o.has(i)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},$o.set(i,u),E||YQ(b,i,u,M.state))),s&&f===null)throw Error(a(528,""));return M}if(s&&f!==null)throw Error(a(529,""));return null;case"script":return s=u.async,u=u.src,typeof u=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=km(u),u=ma(b).hoistableScripts,f=u.get(s),f||(f={type:"script",instance:null,count:0,state:null},u.set(s,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,i))}}function Em(i){return'href="'+Gi(i)+'"'}function Hg(i){return'link[rel="stylesheet"]['+i+"]"}function l_(i){return v({},i,{"data-precedence":i.precedence,precedence:null})}function YQ(i,s,u,f){i.querySelector('link[rel="preload"][as="style"]['+s+"]")?f.loading=1:(s=i.createElement("link"),f.preload=s,s.addEventListener("load",function(){return f.loading|=1}),s.addEventListener("error",function(){return f.loading|=2}),wa(s,"link",u),lr(s),i.head.appendChild(s))}function km(i){return'[src="'+Gi(i)+'"]'}function qg(i){return"script[async]"+i}function u_(i,s,u){if(s.count++,s.instance===null)switch(s.type){case"style":var f=i.querySelector('style[data-href~="'+Gi(u.href)+'"]');if(f)return s.instance=f,lr(f),f;var b=v({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return f=(i.ownerDocument||i).createElement("style"),lr(f),wa(f,"style",b),jw(f,u.precedence,i),s.instance=f;case"stylesheet":b=Em(u.href);var E=i.querySelector(Hg(b));if(E)return s.state.loading|=4,s.instance=E,lr(E),E;f=l_(u),(b=$o.get(b))&&m8(f,b),E=(i.ownerDocument||i).createElement("link"),lr(E);var M=E;return M._p=new Promise(function(K,ee){M.onload=K,M.onerror=ee}),wa(E,"link",f),s.state.loading|=4,jw(E,u.precedence,i),s.instance=E;case"script":return E=km(u.src),(b=i.querySelector(qg(E)))?(s.instance=b,lr(b),b):(f=u,(b=$o.get(E))&&(f=v({},u),h8(f,b)),i=i.ownerDocument||i,b=i.createElement("script"),lr(b),wa(b,"link",f),i.head.appendChild(b),s.instance=b);case"void":return null;default:throw Error(a(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(f=s.instance,s.state.loading|=4,jw(f,u.precedence,i));return s.instance}function jw(i,s,u){for(var f=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=f.length?f[f.length-1]:null,E=b,M=0;M<f.length;M++){var K=f[M];if(K.dataset.precedence===s)E=K;else if(E!==b)break}E?E.parentNode.insertBefore(i,E.nextSibling):(s=u.nodeType===9?u.head:u,s.insertBefore(i,s.firstChild))}function m8(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.title==null&&(i.title=s.title)}function h8(i,s){i.crossOrigin==null&&(i.crossOrigin=s.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=s.referrerPolicy),i.integrity==null&&(i.integrity=s.integrity)}var _w=null;function c_(i,s,u){if(_w===null){var f=new Map,b=_w=new Map;b.set(u,f)}else b=_w,f=b.get(u),f||(f=new Map,b.set(u,f));if(f.has(i))return f;for(f.set(i,null),u=u.getElementsByTagName(i),b=0;b<u.length;b++){var E=u[b];if(!(E[sr]||E[Gt]||i==="link"&&E.getAttribute("rel")==="stylesheet")&&E.namespaceURI!=="http://www.w3.org/2000/svg"){var M=E.getAttribute(s)||"";M=i+M;var K=f.get(M);K?K.push(E):f.set(M,[E])}}return f}function d_(i,s,u){i=i.ownerDocument||i,i.head.insertBefore(u,s==="title"?i.querySelector("head > title"):null)}function QQ(i,s,u){if(u===1||s.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(i=s.disabled,typeof s.precedence=="string"&&i==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function p_(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function ZQ(i,s,u,f){if(u.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var b=Em(f.href),E=s.querySelector(Hg(b));if(E){s=E._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(i.count++,i=Pw.bind(i),s.then(i,i)),u.state.loading|=4,u.instance=E,lr(E);return}E=s.ownerDocument||s,f=l_(f),(b=$o.get(b))&&m8(f,b),E=E.createElement("link"),lr(E);var M=E;M._p=new Promise(function(K,ee){M.onload=K,M.onerror=ee}),wa(E,"link",f),u.instance=E}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,s),(s=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=Pw.bind(i),s.addEventListener("load",u),s.addEventListener("error",u))}}var g8=0;function JQ(i,s){return i.stylesheets&&i.count===0&&Ow(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var f=setTimeout(function(){if(i.stylesheets&&Ow(i,i.stylesheets),i.unsuspend){var E=i.unsuspend;i.unsuspend=null,E()}},6e4+s);0<i.imgBytes&&g8===0&&(g8=62500*TQ());var b=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Ow(i,i.stylesheets),i.unsuspend)){var E=i.unsuspend;i.unsuspend=null,E()}},(i.imgBytes>g8?50:800)+s);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(f),clearTimeout(b)}}:null}function Pw(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ow(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Nw=null;function Ow(i,s){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Nw=new Map,s.forEach(eZ,i),Nw=null,Pw.call(i))}function eZ(i,s){if(!(s.state.loading&4)){var u=Nw.get(i);if(u)var f=u.get(null);else{u=new Map,Nw.set(i,u);for(var b=i.querySelectorAll("link[data-precedence],style[data-precedence]"),E=0;E<b.length;E++){var M=b[E];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(u.set(M.dataset.precedence,M),f=M)}f&&u.set(null,f)}b=s.instance,M=b.getAttribute("data-precedence"),E=u.get(M)||f,E===f&&u.set(null,b),u.set(M,b),this.count++,f=Pw.bind(this),b.addEventListener("load",f),b.addEventListener("error",f),E?E.parentNode.insertBefore(b,E.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(b,i.firstChild)),s.state.loading|=4}}var Wg={$$typeof:S,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function tZ(i,s,u,f,b,E,M,K,ee){this.tag=1,this.containerInfo=i,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=vt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vt(0),this.hiddenUpdates=vt(null),this.identifierPrefix=f,this.onUncaughtError=b,this.onCaughtError=E,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ee,this.incompleteTransitions=new Map}function f_(i,s,u,f,b,E,M,K,ee,pe,be,xe){return i=new tZ(i,s,u,M,ee,pe,be,xe,K),s=1,E===!0&&(s|=24),E=Yi(3,null,null,s),i.current=E,E.stateNode=i,s=Qk(),s.refCount++,i.pooledCache=s,s.refCount++,E.memoizedState={element:f,isDehydrated:u,cache:s},tC(E),i}function m_(i){return i?(i=em,i):em}function h_(i,s,u,f,b,E){b=m_(b),f.context===null?f.context=b:f.pendingContext=b,f=Uu(s),f.payload={element:u},E=E===void 0?null:E,E!==null&&(f.callback=E),u=Ku(i,f,s),u!==null&&(ki(u,i,s),Eg(u,i,s))}function g_(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<s?u:s}}function v8(i,s){g_(i,s),(i=i.alternate)&&g_(i,s)}function v_(i){if(i.tag===13||i.tag===31){var s=Ad(i,67108864);s!==null&&ki(s,i,67108864),v8(i,67108864)}}function b_(i){if(i.tag===13||i.tag===31){var s=to();s=pt(s);var u=Ad(i,s);u!==null&&ki(u,i,s),v8(i,s)}}var Rw=!0;function rZ(i,s,u,f){var b=W.T;W.T=null;var E=z.p;try{z.p=2,b8(i,s,u,f)}finally{z.p=E,W.T=b}}function nZ(i,s,u,f){var b=W.T;W.T=null;var E=z.p;try{z.p=8,b8(i,s,u,f)}finally{z.p=E,W.T=b}}function b8(i,s,u,f){if(Rw){var b=y8(f);if(b===null)a8(i,s,f,Lw,u),w_(i,f);else if(iZ(b,i,s,u,f))f.stopPropagation();else if(w_(i,f),s&4&&-1<aZ.indexOf(i)){for(;b!==null;){var E=Fr(b);if(E!==null)switch(E.tag){case 3:if(E=E.stateNode,E.current.memoizedState.isDehydrated){var M=St(E.pendingLanes);if(M!==0){var K=E;for(K.pendingLanes|=2,K.entangledLanes|=2;M;){var ee=1<<31-rt(M);K.entanglements[1]|=ee,M&=~ee}Ws(E),(vr&6)===0&&(ww=Ie()+500,Og(0,!1))}}break;case 31:case 13:K=Ad(E,2),K!==null&&ki(K,E,2),Ew(),v8(E,2)}if(E=y8(f),E===null&&a8(i,s,f,Lw,u),E===b)break;b=E}b!==null&&f.stopPropagation()}else a8(i,s,f,null,u)}}function y8(i){return i=kk(i),w8(i)}var Lw=null;function w8(i){if(Lw=null,i=Pa(i),i!==null){var s=l(i);if(s===null)i=null;else{var u=s.tag;if(u===13){if(i=c(s),i!==null)return i;i=null}else if(u===31){if(i=d(s),i!==null)return i;i=null}else if(u===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null)}}return Lw=i,null}function y_(i){switch(i){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"resize":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"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"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ne()){case Je:return 2;case gt:return 8;case et:case Ve:return 32;case Se:return 268435456;default:return 32}default:return 32}}var x8=!1,ac=null,ic=null,oc=null,Vg=new Map,Ug=new Map,sc=[],aZ="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 w_(i,s){switch(i){case"focusin":case"focusout":ac=null;break;case"dragenter":case"dragleave":ic=null;break;case"mouseover":case"mouseout":oc=null;break;case"pointerover":case"pointerout":Vg.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ug.delete(s.pointerId)}}function Kg(i,s,u,f,b,E){return i===null||i.nativeEvent!==E?(i={blockedOn:s,domEventName:u,eventSystemFlags:f,nativeEvent:E,targetContainers:[b]},s!==null&&(s=Fr(s),s!==null&&v_(s)),i):(i.eventSystemFlags|=f,s=i.targetContainers,b!==null&&s.indexOf(b)===-1&&s.push(b),i)}function iZ(i,s,u,f,b){switch(s){case"focusin":return ac=Kg(ac,i,s,u,f,b),!0;case"dragenter":return ic=Kg(ic,i,s,u,f,b),!0;case"mouseover":return oc=Kg(oc,i,s,u,f,b),!0;case"pointerover":var E=b.pointerId;return Vg.set(E,Kg(Vg.get(E)||null,i,s,u,f,b)),!0;case"gotpointercapture":return E=b.pointerId,Ug.set(E,Kg(Ug.get(E)||null,i,s,u,f,b)),!0}return!1}function x_(i){var s=Pa(i.target);if(s!==null){var u=l(s);if(u!==null){if(s=u.tag,s===13){if(s=c(u),s!==null){i.blockedOn=s,Jr(i.priority,function(){b_(u)});return}}else if(s===31){if(s=d(u),s!==null){i.blockedOn=s,Jr(i.priority,function(){b_(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function zw(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var u=y8(i.nativeEvent);if(u===null){u=i.nativeEvent;var f=new u.constructor(u.type,u);Ek=f,u.target.dispatchEvent(f),Ek=null}else return s=Fr(u),s!==null&&v_(s),i.blockedOn=u,!1;s.shift()}return!0}function E_(i,s,u){zw(i)&&u.delete(s)}function oZ(){x8=!1,ac!==null&&zw(ac)&&(ac=null),ic!==null&&zw(ic)&&(ic=null),oc!==null&&zw(oc)&&(oc=null),Vg.forEach(E_),Ug.forEach(E_)}function Hw(i,s){i.blockedOn===s&&(i.blockedOn=null,x8||(x8=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,oZ)))}var qw=null;function k_(i){qw!==i&&(qw=i,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){qw===i&&(qw=null);for(var s=0;s<i.length;s+=3){var u=i[s],f=i[s+1],b=i[s+2];if(typeof f!="function"){if(w8(f||u)===null)continue;break}var E=Fr(u);E!==null&&(i.splice(s,3),s-=3,xC(E,{pending:!0,data:b,method:u.method,action:f},f,b))}}))}function Cm(i){function s(ee){return Hw(ee,i)}ac!==null&&Hw(ac,i),ic!==null&&Hw(ic,i),oc!==null&&Hw(oc,i),Vg.forEach(s),Ug.forEach(s);for(var u=0;u<sc.length;u++){var f=sc[u];f.blockedOn===i&&(f.blockedOn=null)}for(;0<sc.length&&(u=sc[0],u.blockedOn===null);)x_(u),u.blockedOn===null&&sc.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(f=0;f<u.length;f+=3){var b=u[f],E=u[f+1],M=b[Lr]||null;if(typeof E=="function")M||k_(u);else if(M){var K=null;if(E&&E.hasAttribute("formAction")){if(b=E,M=E[Lr]||null)K=M.formAction;else if(w8(b)!==null)continue}else K=M.action;typeof K=="function"?u[f+1]=K:(u.splice(f,3),f-=3),k_(u)}}}function C_(){function i(E){E.canIntercept&&E.info==="react-transition"&&E.intercept({handler:function(){return new Promise(function(M){return b=M})},focusReset:"manual",scroll:"manual"})}function s(){b!==null&&(b(),b=null),f||setTimeout(u,20)}function u(){if(!f&&!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 f=!1,b=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(u,100),function(){f=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),b!==null&&(b(),b=null)}}}function E8(i){this._internalRoot=i}Ww.prototype.render=E8.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(a(409));var u=s.current,f=to();h_(u,f,i,s,null,null)},Ww.prototype.unmount=E8.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;h_(i.current,2,null,i,null,null),Ew(),s[ft]=null}};function Ww(i){this._internalRoot=i}Ww.prototype.unstable_scheduleHydration=function(i){if(i){var s=qt();i={blockedOn:null,target:i,priority:s};for(var u=0;u<sc.length&&s!==0&&s<sc[u].priority;u++);sc.splice(u,0,i),u===0&&x_(i)}};var S_=r.version;if(S_!=="19.2.7")throw Error(a(527,S_,"19.2.7"));z.findDOMNode=function(i){var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(a(188)):(i=Object.keys(i).join(","),Error(a(268,i)));return i=h(s),i=i!==null?g(i):null,i=i===null?null:i.stateNode,i};var sZ={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:W,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Gg=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Gg.isDisabled&&Gg.supportsFiber))try{at=Gg.inject(sZ),Ke=Gg}catch{}var Gg;e.createRoot=function(i,s){if(!o(i))throw Error(a(299));var u=!1,f="",b=BT,E=IT,M=MT;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onUncaughtError!==void 0&&(b=s.onUncaughtError),s.onCaughtError!==void 0&&(E=s.onCaughtError),s.onRecoverableError!==void 0&&(M=s.onRecoverableError)),s=f_(i,1,!1,null,null,u,f,null,b,E,M,C_),i[ft]=s.current,n8(i),new E8(s)},e.hydrateRoot=function(i,s,u){if(!o(i))throw Error(a(299));var f=!1,b="",E=BT,M=IT,K=MT,ee=null;return u!=null&&(u.unstable_strictMode===!0&&(f=!0),u.identifierPrefix!==void 0&&(b=u.identifierPrefix),u.onUncaughtError!==void 0&&(E=u.onUncaughtError),u.onCaughtError!==void 0&&(M=u.onCaughtError),u.onRecoverableError!==void 0&&(K=u.onRecoverableError),u.formState!==void 0&&(ee=u.formState)),s=f_(i,1,!0,s,u??null,f,b,ee,E,M,K,C_),s.context=m_(null),u=s.current,f=to(),f=pt(f),b=Uu(f),b.callback=null,Ku(u,b,f),u=f,s.current.lanes=u,Oe(s,u),Ws(s),i[ft]=s.current,n8(i),new Ww(s)},e.version="19.2.7"}),si=Zt((e,t)=>{"use strict";function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(n){console.error(n)}}r(),t.exports=CZ()}),SZ=Zt(e=>{"use strict";var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function n(a,o,l){var c=null;if(l!==void 0&&(c=""+l),o.key!==void 0&&(c=""+o.key),"key"in o){l={};for(var d in o)d!=="key"&&(l[d]=o[d])}else l=o;return o=l.ref,{$$typeof:t,type:a,key:c,ref:o!==void 0?o:null,props:l}}e.Fragment=r,e.jsx=n,e.jsxs=n}),Ee=Zt((e,t)=>{"use strict";t.exports=SZ()}),FZ=Zt(e=>{"use strict";var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.for("react.view_transition"),w=Symbol.for("react.client.reference");function x(k){if(typeof k=="object"&&k!==null){var F=k.$$typeof;switch(F){case t:switch(k=k.type,k){case n:case o:case a:case p:case h:case y:return k;default:switch(k=k&&k.$$typeof,k){case c:case d:case v:case g:return k;case l:return k;default:return F}}case r:return F}}}e.ContextConsumer=l,e.ContextProvider=c,e.Element=t,e.ForwardRef=d,e.Fragment=n,e.Lazy=v,e.Memo=g,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=p,e.SuspenseList=h,e.isContextConsumer=function(k){return x(k)===l},e.isContextProvider=function(k){return x(k)===c},e.isElement=function(k){return typeof k=="object"&&k!==null&&k.$$typeof===t},e.isForwardRef=function(k){return x(k)===d},e.isFragment=function(k){return x(k)===n},e.isLazy=function(k){return x(k)===v},e.isMemo=function(k){return x(k)===g},e.isPortal=function(k){return x(k)===r},e.isProfiler=function(k){return x(k)===o},e.isStrictMode=function(k){return x(k)===a},e.isSuspense=function(k){return x(k)===p},e.isSuspenseList=function(k){return x(k)===h},e.isValidElementType=function(k){return typeof k=="string"||typeof k=="function"||k===n||k===o||k===a||k===p||k===h||k===y||typeof k=="object"&&k!==null&&(k.$$typeof===v||k.$$typeof===g||k.$$typeof===c||k.$$typeof===l||k.$$typeof===d||k.$$typeof===w||k.getModuleId!==void 0)},e.typeOf=x}),DZ=Zt((e,t)=>{"use strict";t.exports=FZ()}),AZ=Zt((e,t)=>{"use strict";t.exports=o,t.exports.isMobile=o,t.exports.default=o;var r=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,n=/CrOS/,a=/android|ipad|playbook|silk/i;function o(l){l||(l={});let c=l.ua;if(!c&&typeof navigator<"u"&&(c=navigator.userAgent),c&&c.headers&&typeof c.headers["user-agent"]=="string"&&(c=c.headers["user-agent"]),typeof c!="string")return!1;let d=r.test(c)&&!n.test(c)||!!l.tablet&&a.test(c);return!d&&l.tablet&&l.featureDetect&&navigator&&navigator.maxTouchPoints>1&&c.indexOf("Macintosh")!==-1&&c.indexOf("Safari")!==-1&&(d=!0),d}});function rN(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=rN(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function te(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=rN(e))&&(n&&(n+=" "),n+=t);return n}var zS=te,$Z=B(_()),U8=B(_());function Na(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var $_=Na()?U8.useLayoutEffect:U8.useEffect,nN=(e,t)=>{let r=U8.useRef(!0);$_(()=>e(r.current),t),$_(()=>(r.current=!1,()=>{r.current=!0}),[])},HS=(e,t)=>{nN(r=>{if(!r)return e()},t)},Jt=nN;function yr(e,t){let[r,n]=(0,$Z.useState)(e),a=t!==void 0?t:r;return Jt(o=>{o||n(t)},[t]),[a,n]}var K8=B(_());function BZ(){return{...K8}.useId}var B_=0,I_=BZ(),Xs=I_?function(e){let t=I_();return e||t}:function(e){let[t,r]=K8.useState("ssr-id");return K8.useEffect(()=>{let n=B_;B_+=1,r(`rc_unique_${n}`)},[]),e||t};function Yr(e){return e!=null}function ir(e){return Yr(e)&&e!==!1&&e!==""}function wr(e,t){let r=Object.assign({},e);return Array.isArray(t)&&t.forEach(n=>{delete r[n]}),r}var IZ=Symbol.for("react.element"),MZ=Symbol.for("react.transitional.element"),TZ=Symbol.for("react.fragment");function aN(e){return e&&typeof e=="object"&&(e.$$typeof===IZ||e.$$typeof===MZ)&&e.type===TZ}var jZ=B(_());function Hr(e,t={}){let r=[];return jZ.default.Children.forEach(e,n=>{n==null&&!t.keepEmpty||(Array.isArray(n)?r=r.concat(Hr(n)):aN(n)&&n.props?r=r.concat(Hr(n.props.children,t)):r.push(n))}),r}function _Z(...e){let t={};for(let r of e)if(r)for(let n of Object.keys(r))r[n]!==void 0&&(t[n]=r[n]);return t}var w5=_Z,PZ=B(si()),m5="__rc_react_root__";function qS(e,t){let r=t[m5]||(0,PZ.createRoot)(t);r.render(e),t[m5]=r}async function WS(e){return Promise.resolve().then(()=>{e[m5]?.unmount(),delete e[m5]})}var M_=B(_()),NZ=e=>{let t=M_.useRef(e);return t.current=e,M_.useCallback((...r)=>t.current?.(...r),[])},xt=NZ,F8=B(_()),OZ=e=>{let t=F8.useRef(!1),[r,n]=F8.useState(e);F8.useEffect(()=>(t.current=!1,()=>{t.current=!0}),[]);function a(o,l){l&&t.current||n(o)}return[r,a]},iN=OZ,T_=B(_()),oN=e=>+setTimeout(e,16),sN=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(oN=e=>window.requestAnimationFrame(e),sN=e=>window.cancelAnimationFrame(e));var j_=0,VS=new Map;function lN(e){VS.delete(e)}var uN=(e,t=1)=>{j_+=1;let r=j_;function n(a){if(a===0)lN(r),e();else{let o=oN(()=>{n(a-1)});VS.set(r,o)}}return n(t),r};uN.cancel=e=>{let t=VS.get(e);return lN(e),sN(t)};var pr=uN;function Nm(e){let[t,r]=T_.useState(e),n=T_.useRef(null),a=xt(()=>{if(n.current){let[l,c]=n.current;l?pr.cancel(c):clearTimeout(c),n.current=null}}),o=xt((l,c)=>{let d=c||{frame:1};a(),d===!0?r(l):"ms"in d?n.current=[!1,setTimeout(()=>r(l),d.ms)]:n.current=[!0,pr(()=>r(l),d.frame)]});return[t,o]}var RZ=B(_());function Om(e,t,r){let n=RZ.useRef({});return(!("value"in n.current)||r(n.current.condition,t))&&(n.current.value=e(),n.current.condition=t),n.current.value}var __=B(_());function LZ(e){let[,t]=__.useReducer(o=>o+1,0),r=__.useRef(e),n=xt(()=>r.current),a=xt(o=>{r.current=typeof o=="function"?o(r.current):o,t()});return[n,a]}var cN=LZ,dN=B(_()),D8=B(DZ()),zZ=Number(dN.version.split(".")[0]),HZ=(e,t)=>{typeof e=="function"?e(t):typeof e=="object"&&e&&"current"in e&&(e.current=t)},ln=(...e)=>{let t=e.filter(Boolean);return t.length<=1?t[0]:r=>{e.forEach(n=>{HZ(n,r)})}},jo=(...e)=>Om(()=>ln(...e),e,(t,r)=>t.length!==r.length||t.every((n,a)=>n!==r[a])),ru=e=>{if(!e)return!1;if(US(e)&&zZ>=19)return!0;let t=(0,D8.isMemo)(e)?e.type.type:e.type;return!(typeof t=="function"&&!t.prototype?.render&&t.$$typeof!==D8.ForwardRef||typeof e=="function"&&!e.prototype?.render&&e.$$typeof!==D8.ForwardRef)};function US(e){return(0,dN.isValidElement)(e)&&!aN(e)}var pN=e=>US(e)&&ru(e),Ys=e=>{if(e&&US(e)){let t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null};function fN(e,t){if(!e)return!1;if(e.contains)return e.contains(t);let r=t;for(;r;){if(r===e)return!0;r=r.parentNode}return!1}var P_="data-rc-order",N_="data-rc-priority",qZ="rc-util-key",G8=new Map;function mN({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:qZ}function x5(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function WZ(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function KS(e){return Array.from((G8.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function hN(e,t={}){if(!Na())return null;let{csp:r,prepend:n,priority:a=0}=t,o=WZ(n),l=o==="prependQueue",c=document.createElement("style");c.setAttribute(P_,o),l&&a&&c.setAttribute(N_,`${a}`),r?.nonce&&(c.nonce=r?.nonce),c.innerHTML=e;let d=x5(t),{firstChild:p}=d;if(n){if(l){let h=(t.styles||KS(d)).filter(g=>{if(!["prepend","prependQueue"].includes(g.getAttribute(P_)))return!1;let v=Number(g.getAttribute(N_)||0);return a>=v});if(h.length)return d.insertBefore(c,h[h.length-1].nextSibling),c}d.insertBefore(c,p)}else d.appendChild(c);return c}function gN(e,t={}){let{styles:r}=t;return r||(r=KS(x5(t))),r.find(n=>n.getAttribute(mN(t))===e)}function iv(e,t={}){let r=gN(e,t);r&&x5(t).removeChild(r)}function VZ(e,t){let r=G8.get(e);if(!r||!fN(document,r)){let n=hN("",t),{parentNode:a}=n;G8.set(e,a),e.removeChild(n)}}function Gd(e,t,r={}){let n=x5(r),a=KS(n),o={...r,styles:a};VZ(n,o);let l=gN(t,o);if(l)return o.csp?.nonce&&l.nonce!==o.csp?.nonce&&(l.nonce=o.csp?.nonce),l.innerHTML!==e&&(l.innerHTML=e),l;let c=hN(e,o);return c.setAttribute(mN(o),t),c}function Tm(e){return e instanceof HTMLElement||e instanceof SVGElement}function E5(e){return e&&typeof e=="object"&&Tm(e.nativeElement)?e.nativeElement:Tm(e)?e:null}var Zg=B(_()),cv=(e=>{if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){let{width:t,height:r}=e.getBBox();if(t||r)return!0}if(e.getBoundingClientRect){let{width:t,height:r}=e.getBoundingClientRect();if(t||r)return!0}}return!1});function O_(e,t=!1){if(cv(e)){let r=e.nodeName.toLowerCase(),n=["input","select","textarea","button"].includes(r)||e.isContentEditable||r==="a"&&!!e.getAttribute("href"),a=e.getAttribute("tabindex"),o=Number(a),l=null;return a&&!Number.isNaN(o)?l=o:n&&l===null&&(l=0),n&&e.disabled&&(l=null),l!==null&&(l>=0||t&&l<0)}return!1}function dv(e,t=!1){let r=[...e.querySelectorAll("*")].filter(n=>O_(n,t));return O_(e,t)&&r.unshift(e),r}function k5(e,t){if(!e)return;e.focus(t);let{cursor:r}=t||{};if(r&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){let n=e.value.length;switch(r){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(n,n);break;default:e.setSelectionRange(0,n)}}}var Mm=null,pc=[],X8=new Map,GS=new Map;function XS(){return pc[pc.length-1]}function UZ(e){let t=XS();if(e&&t){let r;for(let[a,o]of X8.entries())if(o===t){r=a;break}let n=GS.get(r);return!!n&&(n===e||n.contains(e))}return!1}function KZ(e){let{activeElement:t}=document;return e===t||e.contains(t)}function A8(){let e=XS(),{activeElement:t}=document;if(!UZ(t))if(e&&!KZ(e)){let r=dv(e);(r.includes(Mm)?Mm:r[0])?.focus({preventScroll:!0})}else Mm=t}function R_(e){if(e.key==="Tab"){let{activeElement:t}=document,r=XS(),n=dv(r),a=n[n.length-1];e.shiftKey&&t===n[0]?Mm=a:!e.shiftKey&&t===a&&(Mm=n[0])}}function GZ(e,t){return e&&(X8.set(t,e),pc=pc.filter(r=>r!==e),pc.push(e),window.addEventListener("focusin",A8),window.addEventListener("keydown",R_,!0),A8()),()=>{Mm=null,pc=pc.filter(r=>r!==e),X8.delete(t),GS.delete(t),pc.length===0&&(window.removeEventListener("focusin",A8),window.removeEventListener("keydown",R_,!0))}}function XZ(e,t){let r=(0,Zg.useRef)(0),[n,a]=(0,Zg.useState)(0);(0,Zg.useEffect)(()=>{r.current=0},t),(0,Zg.useEffect)(()=>{let[o,l]=e(r.current);return l||(r.current+=1,a(c=>c+1)),o},[...t,n])}function YZ(e,t){let r=Xs(),n=(0,Zg.useRef)(t);return n.current=t,XZ(a=>{if(!e)return[void 0,!0];let o=n.current();return o?[GZ(o,r),!0]:[void 0,a>=1]},[r,e]),[a=>{a&&GS.set(r,a)}]}function vN(e){return e?.getRootNode?.()}function QZ(e){return vN(e)instanceof ShadowRoot}function Y8(e){return QZ(e)?vN(e):null}var bN=e=>{if(Na()&&window.document.documentElement){let t=Array.isArray(e)?e:[e],{documentElement:r}=window.document;return t.some(n=>n in r.style)}return!1},ZZ=(e,t)=>{if(!bN(e))return!1;let r=document.createElement("div"),n=r.style[e];return r.style[e]=t,r.style[e]!==n};function C5(e,t){return!Array.isArray(e)&&t!==void 0?ZZ(e,t):bN(e)}var bt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){let{keyCode:t}=e;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=bt.F1&&t<=bt.F12)return!1;switch(t){case bt.ALT:case bt.CAPS_LOCK:case bt.CONTEXT_MENU:case bt.CTRL:case bt.DOWN:case bt.END:case bt.ESC:case bt.HOME:case bt.INSERT:case bt.LEFT:case bt.MAC_FF_META:case bt.META:case bt.NUMLOCK:case bt.NUM_CENTER:case bt.PAGE_DOWN:case bt.PAGE_UP:case bt.PAUSE:case bt.PRINT_SCREEN:case bt.RIGHT:case bt.SHIFT:case bt.UP:case bt.WIN_KEY:case bt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=bt.ZERO&&e<=bt.NINE||e>=bt.NUM_ZERO&&e<=bt.NUM_MULTIPLY||e>=bt.A&&e<=bt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&e===0)return!0;switch(e){case bt.SPACE:case bt.QUESTION_MARK:case bt.NUM_PLUS:case bt.NUM_MINUS:case bt.NUM_PERIOD:case bt.NUM_DIVISION:case bt.SEMICOLON:case bt.DASH:case bt.EQUALS:case bt.COMMA:case bt.PERIOD:case bt.SLASH:case bt.APOSTROPHE:case bt.SINGLE_QUOTE:case bt.OPEN_SQUARE_BRACKET:case bt.BACKSLASH:case bt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}},isEditableTarget:function(e){let t=e.target;if(!(t instanceof HTMLElement))return!1;let r=t.tagName;return!!(r==="INPUT"||r==="TEXTAREA"||r==="SELECT"||t.isContentEditable)}},On=bt;function JZ(e){let t=`rc-scrollbar-measure-${Math.random().toString(36).substring(7)}`,r=document.createElement("div");r.id=t;let n=r.style;n.position="absolute",n.left="0",n.top="0",n.width="100px",n.height="100px",n.overflow="scroll";let a,o;if(e){let d=getComputedStyle(e);n.scrollbarColor=d.scrollbarColor,n.scrollbarWidth=d.scrollbarWidth;let p=getComputedStyle(e,"::-webkit-scrollbar"),h=parseInt(p.width,10),g=parseInt(p.height,10);try{let v=h?`width: ${p.width};`:"",y=g?`height: ${p.height};`:"";Gd(`
|
|
12
|
-
#${t}::-webkit-scrollbar {
|
|
13
|
-
${v}
|
|
14
|
-
${y}
|
|
15
|
-
}`,t)}catch(v){console.error(v),a=h,o=g}}document.body.appendChild(r);let l=e&&a&&!Number.isNaN(a)?a:r.offsetWidth-r.clientWidth,c=e&&o&&!Number.isNaN(o)?o:r.offsetHeight-r.clientHeight;return document.body.removeChild(r),iv(t),{width:l,height:c}}function eJ(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:JZ(e)}var Q8={},tJ=[],rJ=e=>{tJ.push(e)};function nJ(e,t){}function aJ(e,t){}function iJ(){Q8={}}function yN(e,t,r){!t&&!Q8[r]&&(e(!1,r),Q8[r]=!0)}function S5(e,t){yN(nJ,e,t)}function oJ(e,t){yN(aJ,e,t)}S5.preMessage=rJ;S5.resetWarned=iJ;S5.noteOnce=oJ;var xa=S5;function sJ(e,t,r=!1){let n=new Set;function a(o,l,c=1){let d=n.has(o);if(xa(!d,"Warning: There may be circular references"),d)return!1;if(o===l)return!0;if(r&&c>1)return!1;n.add(o);let p=c+1;if(Array.isArray(o)){if(!Array.isArray(l)||o.length!==l.length)return!1;for(let h=0;h<o.length;h++)if(!a(o[h],l[h],p))return!1;return!0}if(o&&l&&typeof o=="object"&&typeof l=="object"){let h=Object.keys(o);return h.length!==Object.keys(l).length?!1:h.every(g=>a(o[g],l[g],p))}return!1}return a(e,t)}var yc=sJ,lJ=B(AZ()),$8,uJ=()=>(typeof $8>"u"&&($8=(0,lJ.default)()),$8),YS=uJ,cJ=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
16
|
-
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
17
|
-
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
18
|
-
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
19
|
-
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
20
|
-
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
21
|
-
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
22
|
-
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
23
|
-
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
24
|
-
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
25
|
-
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
26
|
-
summary tabIndex target title type useMap value width wmode wrap`,dJ=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
27
|
-
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
28
|
-
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
29
|
-
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
30
|
-
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
31
|
-
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
32
|
-
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad
|
|
33
|
-
onPointerDown onPointerMove onPointerUp onPointerCancel onPointerEnter onPointerLeave onPointerOver onPointerOut onGotPointerCapture onLostPointerCapture
|
|
34
|
-
onAnimationStart onAnimationEnd onAnimationIteration
|
|
35
|
-
onTransitionEnd onTransitionRun onTransitionStart onTransitionCancel
|
|
36
|
-
onBeforeInput onReset onInvalid
|
|
37
|
-
onAuxClick onToggle onBeforeToggle onCancel onClose onResize onScrollEnd`,pJ=`${cJ} ${dJ}`.split(/[\s\n]+/),fJ="aria-",mJ="data-";function L_(e,t){return e.indexOf(t)===0}function no(e,t=!1){let r;t===!1?r={aria:!0,data:!0,attr:!0}:t===!0?r={aria:!0}:r={...t};let n={};return Object.keys(e).forEach(a=>{(r.aria&&(a==="role"||L_(a,fJ))||r.data&&L_(a,mJ)||r.attr&&pJ.includes(a))&&(n[a]=e[a])}),n}function hJ(e,t){return typeof Proxy<"u"&&e?new Proxy(e,{get(r,n){if(t[n])return t[n];let a=r[n];return typeof a=="function"?a.bind(r):a}}):e}function Fi(e,t){let r=e;for(let n=0;n<t.length;n+=1){if(r==null)return;r=r[t[n]]}return r}function wN(e,t,r,n){if(!t.length)return r;let[a,...o]=t,l;return!e&&typeof a=="number"?l=[]:Array.isArray(e)?l=[...e]:l={...e},n&&r===void 0&&o.length===1?delete l[a][o[0]]:l[a]=wN(l[a],o,r,n),l}function oi(e,t,r,n=!1){return t.length&&n&&r===void 0&&!Fi(e,t.slice(0,-1))?e:wN(e,t,r,n)}function gJ(e){return typeof e=="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function z_(e){return Array.isArray(e)?[]:{}}var vJ=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function bJ(e,t={}){let{prepareArray:r}=t,n=r||(()=>[]),a=z_(e[0]);return e.forEach(o=>{function l(c,d){let p=new Set(d),h=Fi(o,c),g=Array.isArray(h);if(g||gJ(h)){if(!p.has(h)){p.add(h);let v=Fi(a,c);g?a=oi(a,c,n(v,h)):(!v||typeof v!="object")&&(a=oi(a,c,z_(h))),vJ(h).forEach(y=>{Object.getOwnPropertyDescriptor(h,y).enumerable&&l([...c,y],p)})}}else a=oi(a,c,h)}l([])}),a}function wc(...e){return bJ(e)}var P4e=B(_()),N4e=B(er());function Z8(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function yJ(e){if(Array.isArray(e))return Z8(e)}function wJ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xN(e,t){if(e){if(typeof e=="string")return Z8(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Z8(e,t):void 0}}function xJ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
38
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xr(e){return yJ(e)||wJ(e)||xN(e)||xJ()}var Oa=e=>typeof e=="number"&&!Number.isNaN(e),Di=e=>typeof e=="string",kt=e=>e!==null&&typeof e=="object",xr=e=>typeof e=="function",EJ=e=>Yr(e)&&xr(e.then),kJ=e=>typeof e!="object"&&!xr(e)||e===null,pv=e=>kt(e)&&"propertyName"in e&&Di(e.propertyName),F5=B(_()),J8=(e,t)=>{let r={...e};return Object.keys(t).forEach(n=>{t[n]._default?r[n]||(r[n]={}):r[n]=J8(r[n],t[n])}),r},EN=(e={},...t)=>t.filter(r=>!!r).reduce((r,n)=>(Object.keys(n).forEach(a=>{let o=e[a],l=n[a];if(o)if(kt(l))r[a]=EN(o,r[a],l);else{let{_default:c}=o;c&&(r[a]=r[a]||{},r[a][c]=te(r[a][c],l))}else r[a]=te(r[a],l)}),r),{}),CJ=(e,...t)=>F5.useMemo(()=>EN.apply(void 0,[e].concat(t)),[e].concat(t)),SJ=(...e)=>e.filter(t=>!!t).reduce((t,r={})=>(Object.keys(r).forEach(n=>{t[n]={...t[n],...r[n]}}),t),{}),FJ=(...e)=>F5.useMemo(()=>SJ.apply(void 0,e),[].concat(e)),lt=(e,t="root")=>F5.useMemo(()=>e?{[t]:e}:void 0,[e,t]),eS=(e,t)=>xr(e)?e(t):e,Tt=(e,t,r,n)=>{let a=e.map(d=>d?eS(d,r):void 0),o=t.map(d=>d?eS(d,r):void 0),l=CJ.apply(void 0,[n].concat(Xr(a))),c=FJ.apply(void 0,Xr(o));return F5.useMemo(()=>n?[J8(l,n),J8(c,n)]:[l,c],[l,c,n])},DJ=B(_());function AJ(){}var{resetWarned:O4e}=xa,$J=DJ.createContext({}),kN=()=>{let e=()=>{};return e.deprecated=AJ,e},D5=kN,CN=B(_()),gc="ant",A5="anticon",QS=["outlined","borderless","filled","underlined"],BJ=(e,t)=>t||(e?`${gc}-${e}`:gc),wt=CN.createContext({getPrefixCls:BJ,iconPrefixCls:A5}),{Consumer:R4e}=wt,H_={};function jt(e){let t=CN.useContext(wt),{getPrefixCls:r,direction:n,getPopupContainer:a,renderEmpty:o}=t,l=t[e];return{classNames:H_,styles:H_,...l,getPrefixCls:r,direction:n,getPopupContainer:a,renderEmpty:o}}var q_=B(_());function IJ(e){for(var t=0,r,n=0,a=e.length;a>=4;++n,a-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var ov=IJ,MJ=B(_()),TJ=B(_());function tS(e){return e.join("%")}var W_=0,jJ=class{constructor(e){oe(this,"instanceId"),oe(this,"cache",new Map),oe(this,"updateTimes",new Map),oe(this,"extracted",new Set),this.instanceId=e}get(e){return this.opGet(tS(e))}opGet(e){return this.cache.get(e)||null}update(e,t){return this.opUpdate(tS(e),t)}opUpdate(e,t){let r=this.cache.get(e),n=t(r);n===null?(this.cache.delete(e),this.updateTimes.delete(e)):(this.cache.set(e,n),this.updateTimes.set(e,W_),W_+=1)}},_J=jJ,$5="data-token-hash",Gs="data-css-hash",fc="__cssinjs_instance__";function PJ(){let e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){let t=document.body.querySelectorAll(`style[${Gs}]`)||[],{firstChild:r}=document.head;Array.from(t).forEach(a=>{a[fc]||(a[fc]=e),a[fc]===e&&document.head.insertBefore(a,r)});let n={};Array.from(document.querySelectorAll(`style[${Gs}]`)).forEach(a=>{let o=a.getAttribute(Gs);n[o]?a[fc]===e&&a.parentNode?.removeChild(a):n[o]=!0})}return new _J(e)}var NJ=TJ.createContext({hashPriority:"low",cache:PJ(),defaultCache:!0,autoPrefix:!1}),xc=NJ,OJ="CALC_UNIT",L4e=new RegExp(OJ,"g");function RJ(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}var rS=class nS{constructor(){oe(this,"cache"),oe(this,"keys"),oe(this,"cacheCallTimes"),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}size(){return this.keys.length}internalGet(t,r=!1){let n={map:this.cache};return t.forEach(a=>{n?n=n?.map?.get(a):n=void 0}),n?.value&&r&&(n.value[1]=this.cacheCallTimes++),n?.value}get(t){return this.internalGet(t,!0)?.[0]}has(t){return!!this.internalGet(t)}set(t,r){if(!this.has(t)){if(this.size()+1>nS.MAX_CACHE_SIZE+nS.MAX_CACHE_OFFSET){let[a]=this.keys.reduce((o,l)=>{let[,c]=o;return this.internalGet(l)[1]<c?[l,this.internalGet(l)[1]]:o},[this.keys[0],this.cacheCallTimes]);this.delete(a)}this.keys.push(t)}let n=this.cache;t.forEach((a,o)=>{if(o===t.length-1)n.set(a,{value:[r,this.cacheCallTimes++]});else{let l=n.get(a);l?l.map||(l.map=new Map):n.set(a,{map:new Map}),n=n.get(a).map}})}deleteByPath(t,r){let n=t.get(r[0]);if(r.length===1)return n.map?t.set(r[0],{map:n.map}):t.delete(r[0]),n.value?.[0];let a=this.deleteByPath(n.map,r.slice(1));return(!n.map||n.map.size===0)&&!n.value&&t.delete(r[0]),a}delete(t){if(this.has(t))return this.keys=this.keys.filter(r=>!RJ(r,t)),this.deleteByPath(this.cache,t)}};oe(rS,"MAX_CACHE_SIZE",20),oe(rS,"MAX_CACHE_OFFSET",5);var LJ=rS,V_=0,SN=class{constructor(e){oe(this,"derivatives"),oe(this,"id"),this.derivatives=Array.isArray(e)?e:[e],this.id=V_,e.length===0&&e.length>0,V_+=1}getDerivativeToken(e){return this.derivatives.reduce((t,r)=>r(e,t),void 0)}},B8=new LJ;function jm(e){let t=Array.isArray(e)?e:[e];return B8.has(t)||B8.set(t,new SN(t)),B8.get(t)}var zJ=new WeakMap,I8={};function HJ(e,t){let r=zJ;for(let n=0;n<t.length;n+=1){let a=t[n];r.has(a)||r.set(a,new WeakMap),r=r.get(a)}return r.has(I8)||r.set(I8,e()),r.get(I8)}var U_=new WeakMap;function tv(e){let t=U_.get(e)||"";return t||(Object.keys(e).forEach(r=>{let n=e[r];t+=r,n instanceof SN?t+=n.id:n&&typeof n=="object"?t+=tv(n):t+=n}),t=ov(t),U_.set(e,t)),t}function qJ(e,t){return ov(`${t}_${tv(e)}`)}var z4e=`random-${Date.now()}-${Math.random()}`.replace(/\./g,""),aS=Na();function ve(e){return typeof e=="number"?`${e}px`:e}function h5(e,t,r,n={},a=!1){if(a)return e;let o={...n,[$5]:t,[Gs]:r};return`<style ${Object.keys(o).map(l=>{let c=o[l];return c?`${l}="${c}"`:null}).filter(l=>l).join(" ")}>${e}</style>`}function FN(e){let{hashCls:t,hashPriority:r="low"}=e||{};if(!t)return"";let n=`.${t}`;return r==="low"?`:where(${n})`:n}var WJ=e=>e!=null;function ZS(e,t){let r=typeof t=="function"?t():t;return r?{...e,csp:{...e.csp,nonce:r}}:e}var s5=(e,t="")=>`--${t?`${t}-`:""}${e}`.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase(),VJ=(e,t,r)=>{let{hashCls:n,hashPriority:a="low",scope:o}=r||{};if(!Object.keys(e).length)return"";let l=`${FN({hashCls:n,hashPriority:a})}.${t}`,c=[o].flat().filter(Boolean);return`${c.length?c.map(d=>`${l}.${d}`).join(", "):l}{${Object.entries(e).map(([d,p])=>`${d}:${p};`).join("")}}`},DN=(e,t,r)=>{let{hashCls:n,hashPriority:a="low",prefix:o,unitless:l,ignore:c,preserve:d}=r||{},p={},h={};return Object.entries(e).forEach(([g,v])=>{if(d?.[g])h[g]=v;else if((typeof v=="string"||typeof v=="number")&&!c?.[g]){let y=s5(g,o);p[y]=typeof v=="number"&&!l?.[g]?`${v}px`:String(v),h[g]=`var(${y})`}}),[h,VJ(p,t,{scope:r?.scope,hashCls:n,hashPriority:a})]},K_=B(_()),UJ=B(_());function KJ(){return!1}var GJ=KJ,Kw=new Map;function JS(e,t,r,n,a){let{cache:o}=K_.useContext(xc),l=[e,...t],c=tS(l),d=GJ(),p=g=>{o.opUpdate(c,v=>{let[y=0,w]=v||[void 0,void 0],x=w||r(),k=[y,x];return g?g(k):k})};K_.useMemo(()=>{p()},[c]);let h=o.opGet(c)[1];return(0,UJ.useInsertionEffect)(()=>(p(([g,v])=>[g+1,v]),Kw.has(c)||(a?.(h),Kw.set(c,!0),Promise.resolve().then(()=>{Kw.delete(c)})),()=>{o.opUpdate(c,g=>{let[v=0,y]=g||[];return v-1===0?(n?.(y,!1),Kw.delete(c),null):[v-1,y]})}),[c]),h}var XJ={},YJ="css",qd=new Map;function QJ(e){qd.set(e,(qd.get(e)||0)+1)}function ZJ(e,t){typeof document<"u"&&document.querySelectorAll(`style[${$5}="${e}"]`).forEach(r=>{r[fc]===t&&r.parentNode?.removeChild(r)})}var JJ=-1;function eee(e,t){qd.set(e,(qd.get(e)||0)-1);let r=new Set;qd.forEach((n,a)=>{n<=0&&r.add(a)}),qd.size-r.size>JJ&&r.forEach(n=>{ZJ(n,t),qd.delete(n)})}var B5=(e,t,r,n)=>{let a={...r.getDerivativeToken(e),...t};return n&&(a=n(a)),a},AN="token";function $N(e,t,r){let{cache:{instanceId:n},container:a,hashPriority:o}=(0,MJ.useContext)(xc),{salt:l="",override:c=XJ,formatToken:d,getComputedToken:p,cssVar:h,nonce:g}=r,v=HJ(()=>Object.assign({},...t),t),y=tv(v),w=tv(c),x=tv(h);return JS(AN,[l,e.id,y,w,x],()=>{let k=p?p(v,c,e):B5(v,c,e,d),F={...k},C=`${l}_${h.prefix}`,D=ov(C),S=`${YJ}-${D}`;F._tokenKey=qJ(F,C);let[A,I]=DN(k,h.key,{prefix:h.prefix,ignore:h.ignore,unitless:h.unitless,preserve:h.preserve,hashPriority:o,hashCls:h.hashed?S:void 0});return A._hashId=D,QJ(h.key),[A,S,F,I,h.key]},([,,,,k])=>{eee(k,n)},([,,,k,F])=>{if(!k)return;let C={mark:Gs,prepend:"queue",attachTo:a,priority:-999};C=ZS(C,g);let D=Gd(k,ov(`css-var-${F}`),C);D[fc]=n,D.setAttribute($5,F)})}var tee=(e,t,r)=>{let[,,n,a,o]=e,{plain:l}=r||{};if(!a)return null;let c=n._tokenKey,d=-999,p={"data-rc-order":"prependQueue","data-rc-priority":`${d}`},h=h5(a,o,c,p,l);return[d,c,h]},ree=B(_()),nee=B(_()),aee={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},iee=aee,rn="-ms-",rv="-moz-",br="-webkit-",BN="comm",e4="rule",t4="decl",oee="@import",see="@namespace",IN="@keyframes",lee="@layer",uee=Math.abs,nv=String.fromCharCode,iS=Object.assign;function cee(e,t){return Xn(e,0)^45?(((t<<2^Xn(e,0))<<2^Xn(e,1))<<2^Xn(e,2))<<2^Xn(e,3):0}function MN(e){return e.trim()}function eu(e,t){return(e=t.exec(e))?e[0]:e}function Nt(e,t,r){return e.replace(t,r)}function M8(e,t){return e.indexOf(t)}function Xn(e,t){return e.charCodeAt(t)|0}function Yd(e,t,r){return e.slice(t,r)}function cs(e){return e.length}function TN(e){return e.length}function Jg(e,t){return t.push(e),e}function dee(e,t){return e.map(t).join("")}function G_(e,t){return e.filter(function(r){return!eu(r,t)})}var I5=1,_m=1,jN=0,To=0,Nn=0,Rm="";function M5(e,t,r,n,a,o,l,c){return{value:e,root:t,parent:r,type:n,props:a,children:o,line:I5,column:_m,length:l,return:"",siblings:c}}function dc(e,t){return iS(M5("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function Fm(e){for(;e.root;)e=dc(e.root,{children:[e]});Jg(e,e.siblings)}function pee(){return Nn}function fee(){return Nn=To>0?Xn(Rm,--To):0,_m--,Nn===10&&(_m=1,I5--),Nn}function ps(){return Nn=To<jN?Xn(Rm,To++):0,_m++,Nn===10&&(_m=1,I5++),Nn}function mc(){return Xn(Rm,To)}function l5(){return To}function T5(e,t){return Yd(Rm,e,t)}function sv(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function mee(e){return I5=_m=1,jN=cs(Rm=e),To=0,[]}function hee(e){return Rm="",e}function T8(e){return MN(T5(To-1,oS(e===91?e+2:e===40?e+1:e)))}function gee(e){for(;(Nn=mc())&&Nn<33;)ps();return sv(e)>2||sv(Nn)>3?"":" "}function vee(e,t){for(;--t&&ps()&&!(Nn<48||Nn>102||Nn>57&&Nn<65||Nn>70&&Nn<97););return T5(e,l5()+(t<6&&mc()==32&&ps()==32))}function oS(e){for(;ps();)switch(Nn){case e:return To;case 34:case 39:e!==34&&e!==39&&oS(Nn);break;case 40:e===41&&oS(e);break;case 92:ps();break}return To}function bee(e,t){for(;ps()&&e+Nn!==57&&!(e+Nn===84&&mc()===47););return"/*"+T5(t,To-1)+"*"+nv(e===47?e:ps())}function yee(e){for(;!sv(mc());)ps();return T5(e,To)}function X_(e){return hee(u5("",null,null,null,[""],e=mee(e),0,[0],e))}function u5(e,t,r,n,a,o,l,c,d){for(var p=0,h=0,g=l,v=0,y=0,w=0,x=1,k=1,F=1,C=0,D=0,S="",A=a,I=o,j=n,$=S;k;)switch(w=D,D=ps()){case 40:w!=108&&Xn($,g-1)==58?(C++,$+="("):$+=T8(D);break;case 41:C--,$+=")";break;case 34:case 39:case 91:$+=T8(D);break;case 9:case 10:case 13:case 32:if(C>0){$+=nv(D);break}$+=gee(w);break;case 92:$+=vee(l5()-1,7);continue;case 47:switch(mc()){case 42:case 47:Jg(wee(bee(ps(),l5()),t,r,d),d),(sv(w||1)==5||sv(mc()||1)==5)&&cs($)&&Yd($,-1,void 0)!==" "&&($+=" ");break;default:$+="/"}break;case 123*x:c[p++]=cs($)*F;case 125*x:case 59:case 0:if(C>0&&D){$+=nv(D);break}switch(D){case 0:case 125:k=0;case 59+h:F==-1&&($=Nt($,/\f/g,"")),y>0&&(cs($)-g||x===0)&&Jg(y>32?Q_($+";",n,r,g-1,d):Q_(Nt($," ","")+";",n,r,g-2,d),d);break;case 59:$+=";";default:if(Jg(j=Y_($,t,r,p,h,a,c,S,A=[],I=[],g,o),o),D===123)if(h===0)u5($,t,j,j,A,o,g,c,I);else{switch(v){case 99:if(Xn($,3)===110)break;case 108:if(Xn($,2)===97)break;default:h=0;case 100:case 109:case 115:}h?u5(e,j,j,n&&Jg(Y_(e,j,j,0,0,a,c,S,a,A=[],g,I),I),a,I,g,c,n?A:I):u5($,j,j,j,[""],I,0,c,I)}}p=h=y=0,x=F=1,S=$="",g=l;break;case 58:g=1+cs($),y=w;default:if(x<1){if(D==123)--x;else if(D==125&&x++==0&&fee()==125)continue}switch($+=nv(D),D*x){case 38:F=h>0?1:($+="\f",-1);break;case 44:if(C>0)break;c[p++]=(cs($)-1)*F,F=1;break;case 64:mc()===45&&($+=T8(ps())),v=mc(),h=g=cs(S=$+=yee(l5())),D++;break;case 45:w===45&&cs($)==2&&(x=0)}}return o}function Y_(e,t,r,n,a,o,l,c,d,p,h,g){for(var v=a-1,y=a===0?o:[""],w=TN(y),x=0,k=0,F=0;x<n;++x)for(var C=0,D=Yd(e,v+1,v=uee(k=l[x])),S=e;C<w;++C)(S=MN(k>0?y[C]+" "+D:Nt(D,/&\f/g,y[C])))&&(d[F++]=S);return M5(e,t,r,a===0?e4:c,d,p,h,g)}function wee(e,t,r,n){return M5(e,t,r,BN,nv(pee()),Yd(e,2,-2),0,n)}function Q_(e,t,r,n,a){return M5(e,t,r,t4,Yd(e,0,n),Yd(e,n+1,-1),n,a)}function _N(e,t,r){switch(cee(e,t)){case 5103:return br+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return br+e+e;case 4855:return br+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return rv+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return br+e+rv+e+rn+e+e;case 5936:switch(Xn(e,t+11)){case 114:return br+e+rn+Nt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return br+e+rn+Nt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return br+e+rn+Nt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return br+e+rn+e+e;case 6165:return br+e+rn+"flex-"+e+e;case 5187:return br+e+Nt(e,/(\w+).+(:[^]+)/,br+"box-$1$2"+rn+"flex-$1$2")+e;case 5443:return br+e+rn+"flex-item-"+Nt(e,/flex-|-self/g,"")+(eu(e,/flex-|baseline/)?"":rn+"grid-row-"+Nt(e,/flex-|-self/g,""))+e;case 4675:return br+e+rn+"flex-line-pack"+Nt(e,/align-content|flex-|-self/g,"")+e;case 5548:return br+e+rn+Nt(e,"shrink","negative")+e;case 5292:return br+e+rn+Nt(e,"basis","preferred-size")+e;case 6060:return br+"box-"+Nt(e,"-grow","")+br+e+rn+Nt(e,"grow","positive")+e;case 4554:return br+Nt(e,/([^-])(transform)/g,"$1"+br+"$2")+e;case 6187:return Nt(Nt(Nt(e,/(zoom-|grab)/,br+"$1"),/(image-set)/,br+"$1"),e,"")+e;case 5495:case 3959:return Nt(e,/(image-set\([^]*)/,br+"$1$`$1");case 4968:return Nt(Nt(e,/(.+:)(flex-)?(.*)/,br+"box-pack:$3"+rn+"flex-pack:$3"),/space-between/,"justify")+br+e+e;case 4200:if(!eu(e,/flex-|baseline/))return rn+"grid-column-align"+Yd(e,t)+e;break;case 2592:case 3360:return rn+Nt(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(n,a){return t=a,eu(n.props,/grid-\w+-end/)})?~M8(e+(r=r[t].value),"span")?e:rn+Nt(e,"-start","")+e+rn+"grid-row-span:"+(~M8(r,"span")?eu(r,/\d+/):+eu(r,/\d+/)-+eu(e,/\d+/))+";":rn+Nt(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(n){return eu(n.props,/grid-\w+-start/)})?e:rn+Nt(Nt(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Nt(e,/(.+)-inline(.+)/,br+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(cs(e)-1-t>6)switch(Xn(e,t+1)){case 109:if(Xn(e,t+4)!==45)break;case 102:return Nt(e,/(.+:)(.+)-([^]+)/,"$1"+br+"$2-$3$1"+rv+(Xn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~M8(e,"stretch")?_N(Nt(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Nt(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,a,o,l,c,d,p){return rn+a+":"+o+p+(l?rn+a+"-span:"+(c?d:+d-+o)+p:"")+e});case 4949:if(Xn(e,t+6)===121)return Nt(e,":",":"+br)+e;break;case 6444:switch(Xn(e,Xn(e,14)===45?18:11)){case 120:return Nt(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+br+(Xn(e,14)===45?"inline-":"")+"box$3$1"+br+"$2$3$1"+rn+"$2box$3")+e;case 100:return Nt(e,":",":"+rn)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Nt(e,"scroll-","scroll-snap-")+e}return e}function lv(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function Z_(e,t,r,n){switch(e.type){case lee:if(e.children.length)break;case oee:case see:case t4:return e.return=e.return||e.value;case BN:return"";case IN:return e.return=e.value+"{"+lv(e.children,n)+"}";case e4:if(!cs(e.value=e.props.join(",")))return""}return cs(r=lv(e.children,n))?e.return=e.value+"{"+r+"}":""}function xee(e){var t=TN(e);return function(r,n,a,o){for(var l="",c=0;c<t;c++)l+=e[c](r,n,a,o)||"";return l}}function Eee(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case t4:e.return=_N(e.value,e.length,r);return;case IN:return lv([dc(e,{value:Nt(e.value,"@","@"+br)})],n);case e4:if(e.length)return dee(r=e.props,function(a){switch(eu(a,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Fm(dc(e,{props:[Nt(a,/:(read-\w+)/,":"+rv+"$1")]})),Fm(dc(e,{props:[a]})),iS(e,{props:G_(r,n)});break;case"::placeholder":Fm(dc(e,{props:[Nt(a,/:(plac\w+)/,":"+br+"input-$1")]})),Fm(dc(e,{props:[Nt(a,/:(plac\w+)/,":"+rv+"$1")]})),Fm(dc(e,{props:[Nt(a,/:(plac\w+)/,rn+"input-$1")]})),Fm(dc(e,{props:[a]})),iS(e,{props:G_(r,n)});break}return""})}}var J_="data-ant-cssinjs-cache-path",PN="_FILE_STYLE__",Xd,NN=!0;function kee(){if(!Xd&&(Xd={},Na())){let e=document.createElement("div");e.className=J_,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);let t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(n=>{let[a,o]=n.split(":");Xd[a]=o});let r=document.querySelector(`style[${J_}]`);r&&(NN=!1,r.parentNode?.removeChild(r)),document.body.removeChild(e)}}function Cee(e){return kee(),!!Xd[e]}function See(e){let t=Xd[e],r=null;if(t&&Na())if(NN)r=PN;else{let n=document.querySelector(`style[${Gs}="${Xd[e]}"]`);n?r=n.innerHTML:delete Xd[e]}return[r,t]}var Fee="_skip_check_",ON="_multi_value_";function c5(e,t){return(t?lv(X_(e),xee([Eee,Z_])):lv(X_(e),Z_)).replace(/\{%%%\:[^;];}/g,";")}function Dee(e){return typeof e=="object"&&e&&(Fee in e||ON in e)}function eP(e,t,r="high"){if(!t)return e;let n=FN({hashCls:t,hashPriority:r});return e.split(",").map(a=>{let o=a.trim().split(/\s+/),l=o[0]||"",c=l.match(/^\w+/)?.[0]||"";return l=`${c}${n}${l.slice(c.length)}`,[l,...o.slice(1)].join(" ")}).join(",")}var sS=(e,t={},{root:r,injectHash:n,parentSelectors:a}={root:!0,parentSelectors:[]})=>{let{hashId:o,layer:l,path:c,hashPriority:d,transformers:p=[],linters:h=[]}=t,g="",v={};function y(x){let k=x.getName(o);if(!v[k]){let[F]=sS(x.style,t,{root:!1,parentSelectors:a});v[k]=`@keyframes ${x.getName(o)}${F}`}}function w(x,k=[]){return x.forEach(F=>{Array.isArray(F)?w(F,k):F&&k.push(F)}),k}return w(Array.isArray(e)?e:[e]).forEach(x=>{let k=typeof x=="string"&&!r?{}:x;if(typeof k=="string")g+=`${k}
|
|
39
|
-
`;else if(k._keyframe)y(k);else{let F=p.reduce((C,D)=>D?.visit?.(C)||C,k);Object.keys(F).forEach(C=>{let D=F[C];if(typeof D=="object"&&D&&(C!=="animationName"||!D._keyframe)&&!Dee(D)){let S=!1,A=C.trim(),I=!1;(r||n)&&o?A.startsWith("@")?S=!0:A==="&"?A=eP("",o,d):A=eP(C,o,d):r&&!o&&(A==="&"||A==="")&&(A="",I=!0);let[j,$]=sS(D,t,{root:I,injectHash:S,parentSelectors:[...a,A]});v={...v,...$},g+=`${A}${j}`}else{let S=function(I,j){let $=I.replace(/[A-Z]/g,N=>`-${N.toLowerCase()}`),P=j;!iee[I]&&typeof P=="number"&&P!==0&&(P=`${P}px`),I==="animationName"&&j?._keyframe&&(y(j),P=j.getName(o)),g+=`${$}:${P};`},A=D?.value??D;typeof D=="object"&&D?.[ON]&&Array.isArray(A)?A.forEach(I=>{S(C,I)}):WJ(A)&&S(C,A)}})}}),r?l&&(g&&(g=`@layer ${l.name} {${g}}`),l.dependencies&&(v[`@layer ${l.name}`]=l.dependencies.map(x=>`@layer ${x}, ${l.name};`).join(`
|
|
40
|
-
`))):g=`{${g}}`,[g,v]};function RN(e,t){return ov(`${e.join("%")}${t}`)}var LN="style";function lS(e,t){let{path:r,hashId:n,layer:a,nonce:o,clientOnly:l,order:c=0}=e,{mock:d,hashPriority:p,container:h,transformers:g,linters:v,cache:y,layer:w,autoPrefix:x}=nee.useContext(xc),k=[n||""];w&&k.push("layer"),k.push(...r);let F=aS;JS(LN,k,()=>{let C=k.join("|");if(Cee(C)){let[$,P]=See(C);if($)return[$,P,{},l,c]}let D=t(),[S,A]=sS(D,{hashId:n,hashPriority:p,layer:w?a:void 0,path:r.join("-"),transformers:g,linters:v}),I=c5(S,x||!1),j=RN(k,I);return[I,j,A,l,c]},(C,D)=>{let[,S]=C;D&&aS&&iv(S,{mark:Gs,attachTo:h})},C=>{let[D,S,A,,I]=C;if(F&&D!==PN){let j={mark:Gs,prepend:w?!1:"queue",attachTo:h,priority:I};j=ZS(j,o);let $=[],P=[];Object.keys(A).forEach(R=>{R.startsWith("@layer")?$.push(R):P.push(R)}),$.forEach(R=>{Gd(c5(A[R],x||!1),`_layer-${R}`,{...j,prepend:!0})});let N=Gd(D,S,j);N[fc]=y.instanceId,P.forEach(R=>{Gd(c5(A[R],x||!1),`_effect-${R}`,j)})}})}var Aee=(e,t,r)=>{let[n,a,o,l,c]=e,{plain:d,autoPrefix:p}=r||{};if(l)return null;let h=n,g={"data-rc-order":"prependQueue","data-rc-priority":`${c}`};return h=h5(n,void 0,a,g,d),o&&Object.keys(o).forEach(v=>{if(!t[v]){t[v]=!0;let y=c5(o[v],p||!1),w=h5(y,void 0,`_effect-${v}`,g,d);v.startsWith("@layer")?h=w+h:h+=w}}),[c,a,h]},zN="cssVar",$ee=(e,t)=>{let{key:r,prefix:n,unitless:a,ignore:o,token:l,hashId:c,scope:d,nonce:p}=e,{cache:{instanceId:h},container:g,hashPriority:v}=(0,ree.useContext)(xc),{_tokenKey:y}=l,w=Array.isArray(d)?d.join("@@"):d,x=[...e.path,r,w,y];return JS(zN,x,()=>{let k=t(),[F,C]=DN(k,r,{prefix:n,unitless:a,ignore:o,scope:d,hashPriority:v,hashCls:c}),D=RN(x,C);return[F,C,D,r]},([,,k])=>{aS&&iv(k,{mark:Gs,attachTo:g})},([,k,F])=>{if(!k)return;let C={mark:Gs,prepend:"queue",attachTo:g,priority:-999};C=ZS(C,p);let D=Gd(k,F,C);D[fc]=h,D.setAttribute($5,r)})},Bee=(e,t,r)=>{let[,n,a,o]=e,{plain:l}=r||{};if(!n)return null;let c=-999,d={"data-rc-order":"prependQueue","data-rc-priority":`${c}`},p=h5(n,o,a,d,l);return[c,a,p]},Iee=$ee,H4e={[LN]:Aee,[AN]:tee,[zN]:Bee},Mee=class{constructor(e,t){oe(this,"name"),oe(this,"style"),oe(this,"_keyframe",!0),this.name=e,this.style=t}getName(e=""){return e?`${e}-${this.name}`:this.name}},Ct=Mee;function Dm(e){return e.notSplit=!0,e}var q4e={inset:["top","right","bottom","left"],insetBlock:["top","bottom"],insetBlockStart:["top"],insetBlockEnd:["bottom"],insetInline:["left","right"],insetInlineStart:["left"],insetInlineEnd:["right"],marginBlock:["marginTop","marginBottom"],marginBlockStart:["marginTop"],marginBlockEnd:["marginBottom"],marginInline:["marginLeft","marginRight"],marginInlineStart:["marginLeft"],marginInlineEnd:["marginRight"],paddingBlock:["paddingTop","paddingBottom"],paddingBlockStart:["paddingTop"],paddingBlockEnd:["paddingBottom"],paddingInline:["paddingLeft","paddingRight"],paddingInlineStart:["paddingLeft"],paddingInlineEnd:["paddingRight"],borderBlock:Dm(["borderTop","borderBottom"]),borderBlockStart:Dm(["borderTop"]),borderBlockEnd:Dm(["borderBottom"]),borderInline:Dm(["borderLeft","borderRight"]),borderInlineStart:Dm(["borderLeft"]),borderInlineEnd:Dm(["borderRight"]),borderBlockWidth:["borderTopWidth","borderBottomWidth"],borderBlockStartWidth:["borderTopWidth"],borderBlockEndWidth:["borderBottomWidth"],borderInlineWidth:["borderLeftWidth","borderRightWidth"],borderInlineStartWidth:["borderLeftWidth"],borderInlineEndWidth:["borderRightWidth"],borderBlockStyle:["borderTopStyle","borderBottomStyle"],borderBlockStartStyle:["borderTopStyle"],borderBlockEndStyle:["borderBottomStyle"],borderInlineStyle:["borderLeftStyle","borderRightStyle"],borderInlineStartStyle:["borderLeftStyle"],borderInlineEndStyle:["borderRightStyle"],borderBlockColor:["borderTopColor","borderBottomColor"],borderBlockStartColor:["borderTopColor"],borderBlockEndColor:["borderBottomColor"],borderInlineColor:["borderLeftColor","borderRightColor"],borderInlineStartColor:["borderLeftColor"],borderInlineEndColor:["borderRightColor"],borderStartStartRadius:["borderTopLeftRadius"],borderStartEndRadius:["borderTopRightRadius"],borderEndStartRadius:["borderBottomLeftRadius"],borderEndEndRadius:["borderBottomRightRadius"]},Tee="6.6.5",jee=Tee,_ee=B(_()),fv={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Pee={...fv,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
41
|
-
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
42
|
-
'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,focusOutline:!0,motion:!0},vc=Pee,Nee={aliceblue:"9ehhb",antiquewhite:"9sgk7",aqua:"1ekf",aquamarine:"4zsno",azure:"9eiv3",beige:"9lhp8",bisque:"9zg04",black:"0",blanchedalmond:"9zhe5",blue:"73",blueviolet:"5e31e",brown:"6g016",burlywood:"8ouiv",cadetblue:"3qba8",chartreuse:"4zshs",chocolate:"87k0u",coral:"9yvyo",cornflowerblue:"3xael",cornsilk:"9zjz0",crimson:"8l4xo",cyan:"1ekf",darkblue:"3v",darkcyan:"rkb",darkgoldenrod:"776yz",darkgray:"6mbhl",darkgreen:"jr4",darkgrey:"6mbhl",darkkhaki:"7ehkb",darkmagenta:"5f91n",darkolivegreen:"3bzfz",darkorange:"9yygw",darkorchid:"5z6x8",darkred:"5f8xs",darksalmon:"9441m",darkseagreen:"5lwgf",darkslateblue:"2th1n",darkslategray:"1ugcv",darkslategrey:"1ugcv",darkturquoise:"14up",darkviolet:"5rw7n",deeppink:"9yavn",deepskyblue:"11xb",dimgray:"442g9",dimgrey:"442g9",dodgerblue:"16xof",firebrick:"6y7tu",floralwhite:"9zkds",forestgreen:"1cisi",fuchsia:"9y70f",gainsboro:"8m8kc",ghostwhite:"9pq0v",goldenrod:"8j4f4",gold:"9zda8",gray:"50i2o",green:"pa8",greenyellow:"6senj",grey:"50i2o",honeydew:"9eiuo",hotpink:"9yrp0",indianred:"80gnw",indigo:"2xcoy",ivory:"9zldc",khaki:"9edu4",lavenderblush:"9ziet",lavender:"90c8q",lawngreen:"4vk74",lemonchiffon:"9zkct",lightblue:"6s73a",lightcoral:"9dtog",lightcyan:"8s1rz",lightgoldenrodyellow:"9sjiq",lightgray:"89jo3",lightgreen:"5nkwg",lightgrey:"89jo3",lightpink:"9z6wx",lightsalmon:"9z2ii",lightseagreen:"19xgq",lightskyblue:"5arju",lightslategray:"4nwk9",lightslategrey:"4nwk9",lightsteelblue:"6wau6",lightyellow:"9zlcw",lime:"1edc",limegreen:"1zcxe",linen:"9shk6",magenta:"9y70f",maroon:"4zsow",mediumaquamarine:"40eju",mediumblue:"5p",mediumorchid:"79qkz",mediumpurple:"5r3rv",mediumseagreen:"2d9ip",mediumslateblue:"4tcku",mediumspringgreen:"1di2",mediumturquoise:"2uabw",mediumvioletred:"7rn9h",midnightblue:"z980",mintcream:"9ljp6",mistyrose:"9zg0x",moccasin:"9zfzp",navajowhite:"9zest",navy:"3k",oldlace:"9wq92",olive:"50hz4",olivedrab:"472ub",orange:"9z3eo",orangered:"9ykg0",orchid:"8iu3a",palegoldenrod:"9bl4a",palegreen:"5yw0o",paleturquoise:"6v4ku",palevioletred:"8k8lv",papayawhip:"9zi6t",peachpuff:"9ze0p",peru:"80oqn",pink:"9z8wb",plum:"8nba5",powderblue:"6wgdi",purple:"4zssg",rebeccapurple:"3zk49",red:"9y6tc",rosybrown:"7cv4f",royalblue:"2jvtt",saddlebrown:"5fmkz",salmon:"9rvci",sandybrown:"9jn1c",seagreen:"1tdnb",seashell:"9zje6",sienna:"6973h",silver:"7ir40",skyblue:"5arjf",slateblue:"45e4t",slategray:"4e100",slategrey:"4e100",snow:"9zke2",springgreen:"1egv",steelblue:"2r1kk",tan:"87yx8",teal:"pds",thistle:"8ggk8",tomato:"9yqfb",turquoise:"2j4r4",violet:"9b10u",wheat:"9ld4j",white:"9zldr",whitesmoke:"9lhpx",yellow:"9zl6o",yellowgreen:"61fzm"},la=Math.round;function j8(e,t){let r=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=r.map(a=>parseFloat(a));for(let a=0;a<3;a+=1)n[a]=t(n[a]||0,r[a]||"",a);return r[3]?n[3]=r[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}var tP=(e,t,r)=>r===0?e:e/100;function Yg(e,t){let r=t||255;return e>r?r:e<0?0:e}var nn=class HN{constructor(t){oe(this,"isValid",!0),oe(this,"r",0),oe(this,"g",0),oe(this,"b",0),oe(this,"a",1),oe(this,"_h"),oe(this,"_hsl_s"),oe(this,"_hsv_s"),oe(this,"_l"),oe(this,"_v"),oe(this,"_max"),oe(this,"_min"),oe(this,"_brightness");function r(n){return n[0]in t&&n[1]in t&&n[2]in t}if(t)if(typeof t=="string"){let n=function(o){return a.startsWith(o)},a=t.trim();if(/^#?[A-F\d]{3,8}$/i.test(a))this.fromHexString(a);else if(n("rgb"))this.fromRgbString(a);else if(n("hsl"))this.fromHslString(a);else if(n("hsv")||n("hsb"))this.fromHsvString(a);else{let o=Nee[a.toLowerCase()];o&&this.fromHexString(parseInt(o,36).toString(16).padStart(6,"0"))}}else if(t instanceof HN)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._hsl_s=t._hsl_s,this._hsv_s=t._hsv_s,this._l=t._l,this._v=t._v;else if(r("rgb"))this.r=Yg(t.r),this.g=Yg(t.g),this.b=Yg(t.b),this.a=typeof t.a=="number"?Yg(t.a,1):1;else if(r("hsl"))this.fromHsl(t);else if(r("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){let r=this.toHsv();return r.h=t,this._c(r)}getLuminance(){function t(o){let l=o/255;return l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4)}let r=t(this.r),n=t(this.g),a=t(this.b);return .2126*r+.7152*n+.0722*a}getHue(){if(typeof this._h>"u"){let t=this.getMax()-this.getMin();t===0?this._h=0:this._h=la(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){return this.getHSVSaturation()}getHSVSaturation(){if(typeof this._hsv_s>"u"){let t=this.getMax()-this.getMin();t===0?this._hsv_s=0:this._hsv_s=t/this.getMax()}return this._hsv_s}getHSLSaturation(){if(typeof this._hsl_s>"u"){let t=this.getMax()-this.getMin();if(t===0)this._hsl_s=0;else{let r=this.getLightness();this._hsl_s=t/255/(1-Math.abs(2*r-1))}}return this._hsl_s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){let r=this.getHue(),n=this.getSaturation(),a=this.getLightness()-t/100;return a<0&&(a=0),this._c({h:r,s:n,l:a,a:this.a})}lighten(t=10){let r=this.getHue(),n=this.getSaturation(),a=this.getLightness()+t/100;return a>1&&(a=1),this._c({h:r,s:n,l:a,a:this.a})}mix(t,r=50){let n=this._c(t),a=r/100,o=c=>(n[c]-this[c])*a+this[c],l={r:la(o("r")),g:la(o("g")),b:la(o("b")),a:la(o("a")*100)/100};return this._c(l)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){let r=this._c(t),n=this.a+r.a*(1-this.a),a=o=>la((this[o]*this.a+r[o]*r.a*(1-this.a))/n);return this._c({r:a("r"),g:a("g"),b:a("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#",r=(this.r||0).toString(16);t+=r.length===2?r:"0"+r;let n=(this.g||0).toString(16);t+=n.length===2?n:"0"+n;let a=(this.b||0).toString(16);if(t+=a.length===2?a:"0"+a,typeof this.a=="number"&&this.a>=0&&this.a<1){let o=la(this.a*255).toString(16);t+=o.length===2?o:"0"+o}return t}toHsl(){return{h:this.getHue(),s:this.getHSLSaturation(),l:this.getLightness(),a:this.a}}toHslString(){let t=this.getHue(),r=la(this.getHSLSaturation()*100),n=la(this.getLightness()*100);return this.a!==1?`hsla(${t},${r}%,${n}%,${this.a})`:`hsl(${t},${r}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getHSVSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,r,n){let a=this.clone();return a[t]=Yg(r,n),a}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){let r=t.replace("#","");function n(a,o){return parseInt(r[a]+r[o||a],16)}r.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=r[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=r[6]?n(6,7)/255:1)}fromHsl({h:t,s:r,l:n,a}){let o=(t%360+360)%360;if(this._h=o,this._hsl_s=r,this._l=n,this.a=typeof a=="number"?a:1,r<=0){let y=la(n*255);this.r=y,this.g=y,this.b=y;return}let l=0,c=0,d=0,p=o/60,h=(1-Math.abs(2*n-1))*r,g=h*(1-Math.abs(p%2-1));p>=0&&p<1?(l=h,c=g):p>=1&&p<2?(l=g,c=h):p>=2&&p<3?(c=h,d=g):p>=3&&p<4?(c=g,d=h):p>=4&&p<5?(l=g,d=h):p>=5&&p<6&&(l=h,d=g);let v=n-h/2;this.r=la((l+v)*255),this.g=la((c+v)*255),this.b=la((d+v)*255)}fromHsv({h:t,s:r,v:n,a}){let o=(t%360+360)%360;this._h=o,this._hsv_s=r,this._v=n,this.a=typeof a=="number"?a:1;let l=la(n*255);if(this.r=l,this.g=l,this.b=l,r<=0)return;let c=o/60,d=Math.floor(c),p=c-d,h=la(n*(1-r)*255),g=la(n*(1-r*p)*255),v=la(n*(1-r*(1-p))*255);switch(d){case 0:this.g=v,this.b=h;break;case 1:this.r=g,this.b=h;break;case 2:this.r=h,this.b=v;break;case 3:this.r=h,this.g=g;break;case 4:this.r=v,this.g=h;break;default:this.g=h,this.b=g;break}}fromHsvString(t){let r=j8(t,tP);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){let r=j8(t,tP);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){let r=j8(t,(n,a)=>a.includes("%")?la(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}},Gw=2,rP=.16,Oee=.05,Ree=.05,Lee=.15,qN=5,WN=4,zee=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function nP(e,t,r){let n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-Gw*t:Math.round(e.h)+Gw*t:n=r?Math.round(e.h)+Gw*t:Math.round(e.h)-Gw*t,n<0?n+=360:n>=360&&(n-=360),n}function aP(e,t,r){if(e.h===0&&e.s===0)return e.s;let n;return r?n=e.s-rP*t:t===WN?n=e.s+rP:n=e.s+Oee*t,n>1&&(n=1),r&&t===qN&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function iP(e,t,r){let n;return r?n=e.v+Ree*t:n=e.v-Lee*t,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function Lm(e,t={}){let r=[],n=new nn(e),a=n.toHsv();for(let o=qN;o>0;o-=1){let l=new nn({h:nP(a,o,!0),s:aP(a,o,!0),v:iP(a,o,!0)});r.push(l)}r.push(n);for(let o=1;o<=WN;o+=1){let l=new nn({h:nP(a,o),s:aP(a,o),v:iP(a,o)});r.push(l)}return t.theme==="dark"?zee.map(({index:o,amount:l})=>new nn(t.backgroundColor||"#141414").mix(r[o],l).toHexString()):r.map(o=>o.toHexString())}var d5={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},uS=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];uS.primary=uS[5];var cS=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];cS.primary=cS[5];var dS=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];dS.primary=dS[5];var Pm=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Pm.primary=Pm[5];var pS=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];pS.primary=pS[5];var fS=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];fS.primary=fS[5];var mS=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];mS.primary=mS[5];var hS=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];hS.primary=hS[5];var gS=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];gS.primary=gS[5];var vS=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];vS.primary=vS[5];var bS=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];bS.primary=bS[5];var yS=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];yS.primary=yS[5];var wS=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];wS.primary=wS[5];var _8={red:uS,volcano:cS,orange:dS,gold:Pm,yellow:pS,lime:fS,green:mS,cyan:hS,blue:gS,geekblue:vS,purple:bS,magenta:yS,grey:wS},oP=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];oP.primary=oP[5];var sP=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];sP.primary=sP[5];var lP=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];lP.primary=lP[5];var uP=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];uP.primary=uP[5];var cP=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];cP.primary=cP[5];var dP=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];dP.primary=dP[5];var pP=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];pP.primary=pP[5];var fP=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];fP.primary=fP[5];var mP=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];mP.primary=mP[5];var hP=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];hP.primary=hP[5];var gP=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];gP.primary=gP[5];var vP=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];vP.primary=vP[5];var bP=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];bP.primary=bP[5];var li=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function j5(e,{generateColorPalettes:t,generateNeutralColorPalettes:r}){let{colorSuccess:n,colorWarning:a,colorError:o,colorInfo:l,colorPrimary:c,colorBgBase:d,colorTextBase:p}=e,h=t(c),g=t(n),v=t(a),y=t(o),w=t(l),x=r(d,p),k=e.colorLink||e.colorInfo,F=t(k),C=new nn(y[1]).mix(new nn(y[3]),50).toHexString(),D={};return li.forEach(S=>{let A=e[S];if(A){let I=t(A);D[`${S}Hover`]=I[5],D[`${S}Active`]=I[7]}}),{...x,colorPrimaryBg:h[1],colorPrimaryBgHover:h[2],colorPrimaryBorder:h[3],colorPrimaryBorderHover:h[4],colorPrimaryHover:h[5],colorPrimary:h[6],colorPrimaryActive:h[7],colorPrimaryTextHover:h[8],colorPrimaryText:h[9],colorPrimaryTextActive:h[10],colorSuccessBg:g[1],colorSuccessBgHover:g[2],colorSuccessBorder:g[3],colorSuccessBorderHover:g[4],colorSuccessHover:g[4],colorSuccess:g[6],colorSuccessActive:g[7],colorSuccessTextHover:g[8],colorSuccessText:g[9],colorSuccessTextActive:g[10],colorErrorBg:y[1],colorErrorBgHover:y[2],colorErrorBgFilledHover:C,colorErrorBgActive:y[3],colorErrorBorder:y[3],colorErrorBorderHover:y[4],colorErrorHover:y[5],colorError:y[6],colorErrorActive:y[7],colorErrorTextHover:y[8],colorErrorText:y[9],colorErrorTextActive:y[10],colorWarningBg:v[1],colorWarningBgHover:v[2],colorWarningBorder:v[3],colorWarningBorderHover:v[4],colorWarningHover:v[4],colorWarning:v[6],colorWarningActive:v[7],colorWarningTextHover:v[8],colorWarningText:v[9],colorWarningTextActive:v[10],colorInfoBg:w[1],colorInfoBgHover:w[2],colorInfoBorder:w[3],colorInfoBorderHover:w[4],colorInfoHover:w[4],colorInfo:w[6],colorInfoActive:w[7],colorInfoTextHover:w[8],colorInfoText:w[9],colorInfoTextActive:w[10],colorLinkHover:F[4],colorLink:F[6],colorLinkActive:F[7],...D,colorBgMask:new nn("#000").setA(.45).toRgbString(),colorWhite:"#fff"}}var Hee=e=>{let t=e,r=e,n=e,a=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?r=4:e<8&&e>=7?r=5:e<14&&e>=8?r=6:e<16&&e>=14?r=7:e>=16&&(r=8),e<6&&e>=2?n=1:e>=6&&(n=2),e>4&&e<8?a=4:e>=8&&(a=6),{borderRadius:e,borderRadiusXS:n,borderRadiusSM:r,borderRadiusLG:t,borderRadiusOuter:a}},qee=Hee;function Wee(e){let{motionUnit:t,motionBase:r,borderRadius:n,lineWidth:a}=e;return{motionDurationFast:`${(r+t).toFixed(1)}s`,motionDurationMid:`${(r+t*2).toFixed(1)}s`,motionDurationSlow:`${(r+t*3).toFixed(1)}s`,lineWidthBold:a+1,...qee(n)}}var Vee=e=>{let{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},_5=Vee;function zm(e){return(e+8)/e}function Uee(e){let t=Array.from({length:10}).map((r,n)=>{let a=n-1,o=e*Math.E**(a/5),l=n>1?Math.floor(o):Math.ceil(o);return Math.floor(l/2)*2});return t[1]=e,t.map(r=>({size:r,lineHeight:zm(r)}))}var Kee=e=>{let t=Uee(e),r=t.map(h=>h.size),n=t.map(h=>h.lineHeight),a=r[1],o=r[0],l=r[2],c=n[1],d=n[0],p=n[2];return{fontSizeSM:o,fontSize:a,fontSizeLG:l,fontSizeXL:r[3],fontSizeHeading1:r[6],fontSizeHeading2:r[5],fontSizeHeading3:r[4],fontSizeHeading4:r[3],fontSizeHeading5:r[2],lineHeight:c,lineHeightLG:p,lineHeightSM:d,fontHeight:Math.round(c*a),fontHeightLG:Math.round(p*l),fontHeightSM:Math.round(d*o),lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}},P5=Kee;function Gee(e){let{sizeUnit:t,sizeStep:r}=e;return{sizeXXL:t*(r+8),sizeXL:t*(r+4),sizeLG:t*(r+2),sizeMD:t*(r+1),sizeMS:t*r,size:t*r,sizeSM:t*(r-1),sizeXS:t*(r-2),sizeXXS:t*(r-3)}}var Io=(e,t)=>new nn(e).setA(t).toRgbString(),Am=(e,t)=>new nn(e).darken(t).toHexString(),Xee=e=>{let t=Lm(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},Yee=(e,t,r)=>{let n=e||"#fff",a=t||"#000";return{colorBgBase:n,colorTextBase:a,colorShadow:r||"#000",colorText:Io(a,.88),colorTextSecondary:Io(a,.65),colorTextTertiary:Io(a,.45),colorTextQuaternary:Io(a,.25),colorFill:Io(a,.15),colorFillSecondary:Io(a,.06),colorFillTertiary:Io(a,.04),colorFillQuaternary:Io(a,.02),colorBgSolid:Io(a,1),colorBgSolidHover:Io(a,.75),colorBgSolidActive:Io(a,.95),colorBgLayout:Am(n,4),colorBgContainer:Am(n,0),colorBgElevated:Am(n,0),colorBgSpotlight:Io(a,.85),colorBgBlur:"transparent",colorBorder:Am(n,15),colorBorderDisabled:Am(n,15),colorBorderSecondary:Am(n,6)}};function Hm(e){d5.pink=d5.magenta,_8.pink=_8.magenta;let t=Object.keys(fv).map(r=>{let n=e[r]===d5[r]?_8[r]:Lm(e[r]);return Array.from({length:10},()=>1).reduce((a,o,l)=>(a[`${r}-${l+1}`]=n[l],a[`${r}${l+1}`]=n[l],a),{})}).reduce((r,n)=>(r={...r,...n},r),{});return{...e,...t,...j5(e,{generateColorPalettes:Xee,generateNeutralColorPalettes:Yee}),...P5(e.fontSize),...Gee(e),..._5(e),...Wee(e)}}var Qee=jm(Hm),mv=Qee,Qd={token:vc,override:{override:vc},hashed:!0},hv=_ee.default.createContext(Qd);function P8(e){return e>=0&&e<=255}function Zee(e,t){let{r,g:n,b:a,a:o}=new nn(e).toRgb();if(o<1)return e;let{r:l,g:c,b:d}=new nn(t).toRgb();for(let p=.01;p<=1;p+=.01){let h=Math.round((r-l*(1-p))/p),g=Math.round((n-c*(1-p))/p),v=Math.round((a-d*(1-p))/p);if(P8(h)&&P8(g)&&P8(v))return new nn({r:h,g,b:v,a:Math.round(p*100)/100}).toRgbString()}return new nn({r,g:n,b:a,a:1}).toRgbString()}var Ud=Zee;function N5(e){let{override:t,...r}=e,n={...t};Object.keys(vc).forEach(x=>{delete n[x]});let a={...r,...n},o=new nn(a.colorShadow),l=o.a,c=x=>o.clone().setA(l*x).toRgbString(),d=480,p=576,h=768,g=992,v=1200,y=1600,w=1920;return a.motion===!1&&(a.motionDurationFast="0s",a.motionDurationMid="0s",a.motionDurationSlow="0s"),{...a,colorFillContent:a.colorFillSecondary,colorFillContentHover:a.colorFill,colorFillAlter:a.colorFillQuaternary,colorBgContainerDisabled:a.colorFillTertiary,colorBorderBg:a.colorBgContainer,colorSplit:Ud(a.colorBorderSecondary,a.colorBgContainer),colorTextPlaceholder:a.colorTextQuaternary,colorTextDisabled:a.colorTextQuaternary,colorTextHeading:a.colorText,colorTextLabel:a.colorTextSecondary,colorTextDescription:a.colorTextTertiary,colorTextLightSolid:a.colorWhite,colorHighlight:a.colorError,colorBgTextHover:a.colorFillSecondary,colorBgTextActive:a.colorFill,colorIcon:a.colorTextTertiary,colorIconHover:a.colorText,colorErrorOutline:Ud(a.colorErrorBg,a.colorBgContainer),colorWarningOutline:Ud(a.colorWarningBg,a.colorBgContainer),colorErrorAffix:a.colorError,colorWarningAffix:a.colorWarning,fontHeight:Math.round(a.fontSize*a.lineHeight),fontHeightSM:Math.round(a.fontSizeSM*a.lineHeightSM),fontHeightLG:Math.round(a.fontSizeLG*a.lineHeightLG),fontSizeIcon:a.fontSizeSM,lineWidthFocus:a.focusOutline===!1?0:a.lineWidth*3,lineWidth:a.lineWidth,controlOutlineWidth:a.lineWidth*2,controlInteractiveSize:a.controlHeight/2,controlItemBgHover:a.colorFillTertiary,controlItemBgActive:a.colorPrimaryBg,controlItemBgActiveHover:a.colorPrimaryBgHover,controlItemBgActiveDisabled:a.colorFill,controlTmpOutline:a.colorFillQuaternary,controlOutline:Ud(a.colorPrimaryBg,a.colorBgContainer),lineType:a.lineType,borderRadius:a.borderRadius,borderRadiusXS:a.borderRadiusXS,borderRadiusSM:a.borderRadiusSM,borderRadiusLG:a.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:a.sizeXXS,paddingXS:a.sizeXS,paddingSM:a.sizeSM,padding:a.size,paddingMD:a.sizeMD,paddingLG:a.sizeLG,paddingXL:a.sizeXL,paddingContentHorizontalLG:a.sizeLG,paddingContentVerticalLG:a.sizeMS,paddingContentHorizontal:a.sizeMS,paddingContentVertical:a.sizeSM,paddingContentHorizontalSM:a.size,paddingContentVerticalSM:a.sizeXS,marginXXS:a.sizeXXS,marginXS:a.sizeXS,marginSM:a.sizeSM,margin:a.size,marginMD:a.sizeMD,marginLG:a.sizeLG,marginXL:a.sizeXL,marginXXL:a.sizeXXL,boxShadow:`
|
|
43
|
-
0 6px 16px 0 ${c(.08)},
|
|
44
|
-
0 3px 6px -4px ${c(.12)},
|
|
45
|
-
0 9px 28px 8px ${c(.05)}
|
|
46
|
-
`,boxShadowSecondary:`
|
|
47
|
-
0 6px 16px 0 ${c(.08)},
|
|
48
|
-
0 3px 6px -4px ${c(.12)},
|
|
49
|
-
0 9px 28px 8px ${c(.05)}
|
|
50
|
-
`,boxShadowTertiary:`
|
|
51
|
-
0 1px 2px 0 ${c(.05)},
|
|
52
|
-
0 1px 6px -1px ${c(.03)},
|
|
53
|
-
0 2px 4px 0 ${c(.03)}
|
|
54
|
-
`,screenXS:d,screenXSMin:d,screenXSMax:p-1,screenSM:p,screenSMMin:p,screenSMMax:h-1,screenMD:h,screenMDMin:h,screenMDMax:g-1,screenLG:g,screenLGMin:g,screenLGMax:v-1,screenXL:v,screenXLMin:v,screenXLMax:y-1,screenXXL:y,screenXXLMin:y,screenXXLMax:w-1,screenXXXL:w,screenXXXLMin:w,boxShadowPopoverArrow:`2px 2px 5px ${c(.05)}`,dropShadowPopover:`drop-shadow(0 6px 16px ${c(.08)}) drop-shadow(0 3px 6px ${c(.12)}) drop-shadow(0 9px 28px ${c(.05)})`,boxShadowCard:`
|
|
55
|
-
0 1px 2px -2px ${c(.16)},
|
|
56
|
-
0 3px 6px 0 ${c(.12)},
|
|
57
|
-
0 5px 12px 4px ${c(.09)}
|
|
58
|
-
`,boxShadowDrawerRight:`
|
|
59
|
-
-6px 0 16px 0 ${c(.08)},
|
|
60
|
-
-3px 0 6px -4px ${c(.12)},
|
|
61
|
-
-9px 0 28px 8px ${c(.05)}
|
|
62
|
-
`,boxShadowDrawerLeft:`
|
|
63
|
-
6px 0 16px 0 ${c(.08)},
|
|
64
|
-
3px 0 6px -4px ${c(.12)},
|
|
65
|
-
9px 0 28px 8px ${c(.05)}
|
|
66
|
-
`,boxShadowDrawerUp:`
|
|
67
|
-
0 6px 16px 0 ${c(.08)},
|
|
68
|
-
0 3px 6px -4px ${c(.12)},
|
|
69
|
-
0 9px 28px 8px ${c(.05)}
|
|
70
|
-
`,boxShadowDrawerDown:`
|
|
71
|
-
0 -6px 16px 0 ${c(.08)},
|
|
72
|
-
0 -3px 6px -4px ${c(.12)},
|
|
73
|
-
0 -9px 28px 8px ${c(.05)}
|
|
74
|
-
`,boxShadowTabsOverflowLeft:`inset 10px 0 8px -8px ${c(.08)}`,boxShadowTabsOverflowRight:`inset -10px 0 8px -8px ${c(.08)}`,boxShadowTabsOverflowTop:`inset 0 10px 8px -8px ${c(.08)}`,boxShadowTabsOverflowBottom:`inset 0 -10px 8px -8px ${c(.08)}`,...n}}var VN={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},Jee={motionBase:!0,motionUnit:!0},ete={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0,screenXXLMax:!0,screenXXXL:!0,screenXXXLMin:!0},UN=(e,t,r)=>{let n=r.getDerivativeToken(e),{override:a,...o}=t,l={...n,override:a};return l=N5(l),o&&Object.entries(o).forEach(([c,d])=>{let{theme:p,...h}=d,g=h;p&&(g=UN({...l,...h},{override:h},p)),l[c]=g}),l};function ui(){let{token:e,hashed:t,theme:r,override:n,cssVar:a,zeroRuntime:o}=q_.default.useContext(hv),{csp:l,getPrefixCls:c}=q_.default.useContext(wt),d={prefix:a?.prefix??c(),key:a?.key??"css-var-root"},p=`${jee}-${t||""}`,h=r||mv,[g,v,y]=$N(h,[vc,e],{salt:p,override:n,getComputedToken:UN,cssVar:{...d,unitless:VN,ignore:Jee,preserve:ete},nonce:l?.nonce});return[h,y,t?v:"",g,d,!!o]}function fs(e){"@babel/helpers - typeof";return fs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fs(e)}function tte(e){if(Array.isArray(e))return e}function rte(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,l,c=[],d=!0,p=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;d=!1}else for(;!(d=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);d=!0);}catch(h){p=!0,a=h}finally{try{if(!d&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(p)throw a}}return c}}function nte(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
75
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r4(e,t){return tte(e)||rte(e,t)||xN(e,t)||nte()}function ate(e,t){if(fs(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(fs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function KN(e){var t=ate(e,"string");return fs(t)=="symbol"?t:t+""}function Mo(e,t,r){return(t=KN(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Si(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yP(Object(r),!0).forEach(function(n){Mo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ite=B(_());function nu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wP(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,KN(n.key),n)}}function au(e,t,r){return t&&wP(e.prototype,t),r&&wP(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function av(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xS(e,t){return xS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},xS(e,t)}function gv(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xS(e,t)}function bc(e){return bc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bc(e)}function vv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vv=function(){return!!e})()}function O5(e,t){if(t&&(fs(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return av(e)}function GN(e){var t=vv();return function(){var r,n=bc(e);if(t){var a=bc(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return O5(this,r)}}var ote=au(function e(){nu(this,e)}),XN=ote,YN="CALC_UNIT",ste=new RegExp(YN,"g");function N8(e){return typeof e=="number"?"".concat(e).concat(YN):e}var lte=(function(e){gv(r,e);var t=GN(r);function r(n,a){var o;nu(this,r),o=t.call(this),Mo(av(o),"result",""),Mo(av(o),"unitlessCssVar",void 0),Mo(av(o),"lowPriority",void 0);var l=fs(n);return o.unitlessCssVar=a,n instanceof r?o.result="(".concat(n.result,")"):l==="number"?o.result=N8(n):l==="string"&&(o.result=n),o}return au(r,[{key:"add",value:function(n){return n instanceof r?this.result="".concat(this.result," + ").concat(n.getResult()):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," + ").concat(N8(n))),this.lowPriority=!0,this}},{key:"sub",value:function(n){return n instanceof r?this.result="".concat(this.result," - ").concat(n.getResult()):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," - ").concat(N8(n))),this.lowPriority=!0,this}},{key:"mul",value:function(n){return this.lowPriority&&(this.result="(".concat(this.result,")")),n instanceof r?this.result="".concat(this.result," * ").concat(n.getResult(!0)):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," * ").concat(n)),this.lowPriority=!1,this}},{key:"div",value:function(n){return this.lowPriority&&(this.result="(".concat(this.result,")")),n instanceof r?this.result="".concat(this.result," / ").concat(n.getResult(!0)):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," / ").concat(n)),this.lowPriority=!1,this}},{key:"getResult",value:function(n){return this.lowPriority||n?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(n){var a=this,o=n||{},l=o.unit,c=!0;return typeof l=="boolean"?c=l:Array.from(this.unitlessCssVar).some(function(d){return a.result.includes(d)})&&(c=!1),this.result=this.result.replace(ste,c?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),r})(XN),ute=(function(e){gv(r,e);var t=GN(r);function r(n){var a;return nu(this,r),a=t.call(this),Mo(av(a),"result",0),n instanceof r?a.result=n.result:typeof n=="number"&&(a.result=n),a}return au(r,[{key:"add",value:function(n){return n instanceof r?this.result+=n.result:typeof n=="number"&&(this.result+=n),this}},{key:"sub",value:function(n){return n instanceof r?this.result-=n.result:typeof n=="number"&&(this.result-=n),this}},{key:"mul",value:function(n){return n instanceof r?this.result*=n.result:typeof n=="number"&&(this.result*=n),this}},{key:"div",value:function(n){return n instanceof r?this.result/=n.result:typeof n=="number"&&(this.result/=n),this}},{key:"equal",value:function(){return this.result}}]),r})(XN),cte=ute,dte=function(e,t){var r=e==="css"?lte:cte;return function(n){return new r(n,t)}},pte=dte,fte=function(e,t){return"".concat([t,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))},xP=fte;function mte(e,t,r,n){var a=Si({},t[e]);if(n!=null&&n.deprecatedTokens){var o=n.deprecatedTokens;o.forEach(function(c){var d=r4(c,2),p=d[0],h=d[1];if(a!=null&&a[p]||a!=null&&a[h]){var g;(g=a[h])!==null&&g!==void 0||(a[h]=a?.[p])}})}var l=Si(Si({},r),a);return Object.keys(l).forEach(function(c){l[c]===t[c]&&delete l[c]}),l}var EP=mte,QN=typeof CSSINJS_STATISTIC<"u",ES=!0;function _t(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(!QN)return Object.assign.apply(Object,[{}].concat(t));ES=!1;var n={};return t.forEach(function(a){if(fs(a)==="object"){var o=Object.keys(a);o.forEach(function(l){Object.defineProperty(n,l,{configurable:!0,enumerable:!0,get:function(){return a[l]}})})}}),ES=!0,n}var kP={};function hte(){}var gte=function(e){var t,r=e,n=hte;return QN&&typeof Proxy<"u"&&(t=new Set,r=new Proxy(e,{get:function(a,o){if(ES){var l;(l=t)===null||l===void 0||l.add(o)}return a[o]}}),n=function(a,o){var l;kP[a]={global:Array.from(t),component:Si(Si({},(l=kP[a])===null||l===void 0?void 0:l.component),o)}}),{token:r,keys:t,flush:n}},vte=gte;function bte(e,t,r){if(typeof r=="function"){var n;return r(_t(t,(n=t[e])!==null&&n!==void 0?n:{}))}return r??{}}var CP=bte;function yte(e){return e==="js"?{max:Math.max,min:Math.min}:{max:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return"max(".concat(r.map(function(a){return ve(a)}).join(","),")")},min:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return"min(".concat(r.map(function(a){return ve(a)}).join(","),")")}}}var wte=yte,xte=B(_()),Ete=1e3*60*10,kte=(function(){function e(){nu(this,e),Mo(this,"map",new Map),Mo(this,"objectIDMap",new WeakMap),Mo(this,"nextID",0),Mo(this,"lastAccessBeat",new Map),Mo(this,"accessBeat",0)}return au(e,[{key:"set",value:function(t,r){this.clear();var n=this.getCompositeKey(t);this.map.set(n,r),this.lastAccessBeat.set(n,Date.now())}},{key:"get",value:function(t){var r=this.getCompositeKey(t),n=this.map.get(r);return this.lastAccessBeat.set(r,Date.now()),this.accessBeat+=1,n}},{key:"getCompositeKey",value:function(t){var r=this,n=t.map(function(a){return a&&fs(a)==="object"?"obj_".concat(r.getObjectID(a)):"".concat(fs(a),"_").concat(a)});return n.join("|")}},{key:"getObjectID",value:function(t){if(this.objectIDMap.has(t))return this.objectIDMap.get(t);var r=this.nextID;return this.objectIDMap.set(t,r),this.nextID+=1,r}},{key:"clear",value:function(){var t=this;if(this.accessBeat>1e4){var r=Date.now();this.lastAccessBeat.forEach(function(n,a){r-n>Ete&&(t.map.delete(a),t.lastAccessBeat.delete(a))}),this.accessBeat=0}}}]),e})(),SP=new kte;function Cte(e,t){return xte.default.useMemo(function(){var r=SP.get(t);if(r)return r;var n=e();return SP.set(t,n),n},t)}var Ste=Cte,Fte=function(){return{}},Dte=Fte;function Ate(e){var t=e.useCSP,r=t===void 0?Dte:t,n=e.useToken,a=e.usePrefix,o=e.getResetStyles,l=e.getCommonStyle,c=e.getCompUnitless;function d(v,y,w,x){var k=Array.isArray(v)?v[0]:v;function F($){return"".concat(String(k)).concat($.slice(0,1).toUpperCase()).concat($.slice(1))}var C=x?.unitless||{},D=typeof c=="function"?c(v):{},S=Si(Si({},D),{},Mo({},F("zIndexPopup"),!0));Object.keys(C).forEach(function($){S[F($)]=C[$]});var A=Si(Si({},x),{},{unitless:S,prefixToken:F}),I=h(v,y,w,A),j=p(k,w,A);return function($){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$,N=I($,P),R=x?.extraCssVarPrefixCls,U=typeof R=="function"?R({prefixCls:$,rootCls:P}):R,H=j(U!=null&&U.length?[P].concat(Xr(U)):P);return[N,H]}}function p(v,y,w){var x=w.unitless,k=w.prefixToken,F=w.ignore;return function(C){var D=n(),S=D.cssVar,A=D.realToken,I=r();return Iee({path:[v],prefix:S.prefix,key:S.key,unitless:x,ignore:F,token:A,scope:C,nonce:function(){return I.nonce}},function(){var j=CP(v,A,y),$=EP(v,A,j,{deprecatedTokens:w?.deprecatedTokens});return j&&Object.keys(j).forEach(function(P){$[k(P)]=$[P],delete $[P]}),$}),S?.key}}function h(v,y,w){var x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},k=Array.isArray(v)?v:[v,v],F=r4(k,1),C=F[0],D=k.join("-"),S=e.layer||{name:"antd"};return function(A){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:A,j=n(),$=j.theme,P=j.realToken,N=j.hashId,R=j.token,U=j.cssVar,H=j.zeroRuntime,q=(0,ite.useMemo)(function(){return H},[]);if(q)return N;var L=a(),O=L.rootPrefixCls,W=L.iconPrefixCls,z=r(),Y="css",G=Ste(function(){var Q=new Set;return Object.keys(x.unitless||{}).forEach(function(re){Q.add(s5(re,U.prefix)),Q.add(s5(re,xP(C,U.prefix)))}),pte(Y,Q)},[Y,C,U?.prefix]),Z=wte(Y),T=Z.max,V=Z.min,X={theme:$,token:R,hashId:N,nonce:function(){return z.nonce},clientOnly:x.clientOnly,layer:S,order:x.order||-999};return typeof o=="function"&&lS(Si(Si({},X),{},{clientOnly:!1,path:["Shared",O]}),function(){return o(R,{prefix:{rootPrefixCls:O,iconPrefixCls:W},csp:z})}),lS(Si(Si({},X),{},{path:[D,A,W]}),function(){if(x.injectStyle===!1)return[];var Q=vte(R),re=Q.token,J=Q.flush,se=CP(C,P,w),ue=".".concat(A),ae=EP(C,P,se,{deprecatedTokens:x.deprecatedTokens});se&&fs(se)==="object"&&Object.keys(se).forEach(function(we){se[we]="var(".concat(s5(we,xP(C,U.prefix)),")")});var he=_t(re,{componentCls:ue,prefixCls:A,iconCls:".".concat(W),antCls:".".concat(O),calc:G,max:T,min:V},se),le=y(he,{hashId:N,prefixCls:A,rootPrefixCls:O,iconPrefixCls:W});J(C,ae);var fe=typeof l=="function"?l(he,A,I,x.resetFont):null;return[x.resetStyle===!1?null:fe,le]}),N}}function g(v,y,w){var x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},k=h(v,y,w,Si({resetStyle:!1,order:-998},x)),F=function(C){var D=C.prefixCls,S=C.rootCls,A=S===void 0?D:S;return k(D,A),null};return F}return{genStyleHooks:d,genSubStyleComponent:g,genComponentStyleHook:h}}var ZN=Ate,FP=B(_()),Zd={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},fr=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),bv=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block",verticalAlign:"inherit"}}),$te=new Ct("loadingCircle",{"100%":{transform:"rotate(360deg)"}}),n4=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),ao=(e,t)=>({outline:`${ve(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:["outline-offset","outline"].map(r=>`${r} 0s`).join(", ")}),Ai=(e,t)=>({"&:focus-visible":ao(e,t)}),Bte=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},...Ai(e),"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),Ite=(e,t,r,n)=>{let a=`[class^="${t}"], [class*=" ${t}"]`,o=r?`.${r}`:a,l={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}},c={};return n!==!1&&(c={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[o]:{...c,...l,[a]:l}}},JN=e=>({[`.${e}`]:{...bv(),"&::before":{display:"none"},"&[tabindex]":{cursor:"pointer"}},[`.${e} .${e}-icon`]:{display:"block"},[`.${e}-spin`]:{animationName:$te,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}}),R5=e=>({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none",...Ai(e),"&:hover":{color:e.colorLinkHover,textDecoration:e.linkHoverDecoration},"&:focus":{color:e.colorLinkHover,textDecoration:e.linkFocusDecoration},"&:active":{color:e.colorLinkActive,textDecoration:e.linkHoverDecoration}}),{genStyleHooks:Et,genComponentStyleHook:a4,genSubStyleComponent:qm}=ZN({usePrefix:()=>{let{getPrefixCls:e,iconPrefixCls:t}=(0,FP.useContext)(wt);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{let[e,t,r,n,a,o]=ui();return{theme:e,realToken:t,hashId:r,token:n,cssVar:a,zeroRuntime:o}},useCSP:()=>{let{csp:e}=(0,FP.useContext)(wt);return e??{}},getResetStyles:(e,t)=>{let r=Bte(e);return[r,{"&":r},JN(t?.prefix.iconPrefixCls??A5)]},getCommonStyle:Ite,getCompUnitless:()=>VN}),pn=(e,t)=>{let r=`--${e.replace(/\./g,"")}-${t}-`;return[n=>`${r}${n}`,(n,a)=>a?`var(${r}${n}, ${a})`:`var(${r}${n})`]};function Ec(e,t){return li.reduce((r,n)=>{let a=e[`${n}1`],o=e[`${n}3`],l=e[`${n}6`],c=e[`${n}7`];return{...r,...t(n,{lightColor:a,lightBorderColor:o,darkColor:l,textColor:c})}},{})}var Mte=(e,t)=>{let[r,n]=ui();return lS({theme:r,token:n,hashId:"",path:["ant-design-icons",e],nonce:()=>t?.nonce,layer:{name:"antd"}},()=>JN(e))},Tte=Mte,O8=B(_()),jte=B(_()),_te=(0,jte.createContext)(void 0),i4=_te,Pte={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},eO=Pte,Nte={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},Ote={...Nte,locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Last year",nextYear:"Next year",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},Rte=Ote,Lte={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},tO=Lte,zte={lang:{placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"],...Rte},timePickerLocale:{...tO}},o4=zte,rO=o4,ro="${label} is not a valid ${type}",Hte={locale:"en",Pagination:eO,DatePicker:o4,TimePicker:tO,Calendar:rO,global:{placeholder:"Please select",close:"Close",sortable:"sortable",show:"Show",hide:"Hide"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Carousel:{prevSlide:"Previous slide",nextSlide:"Next slide"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:ro,method:ro,array:ro,object:ro,number:ro,date:ro,boolean:ro,integer:ro,float:ro,regexp:ro,email:ro,url:ro,hex:ro},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}},tu=Hte,qte=(e,t)=>{let r=O8.useContext(i4),n=O8.useMemo(()=>{let o=t||tu[e],l=r?.[e]??{};return{...xr(o)?o():o,...l||{}}},[e,t,r]),a=O8.useMemo(()=>{let o=r?.locale;return r?.exist&&!o?tu.locale:o},[r]);return[n,a]},Jd=qte,R8=B(_()),p5={...tu.Modal},f5=[],DP=()=>f5.reduce((e,t)=>({...e,...t}),tu.Modal);function Wte(e){if(e){let t={...e};return f5.push(t),p5=DP(),()=>{f5=f5.filter(r=>r!==t),p5=DP()}}p5={...tu.Modal}}function Vte(){return p5}var Ute="internalMark",Kte=e=>{let{locale:t={},children:r,_ANT_MARK__:n}=e;R8.useEffect(()=>Wte(t?.Modal),[t]);let a=R8.useMemo(()=>({...t,exist:!0}),[t]);return R8.createElement(i4.Provider,{value:a},r)},Gte=Kte,g5=B(_());function yv(e){return e&&g5.default.isValidElement(e)&&e.type===g5.default.Fragment}var L5=(e,t,r)=>g5.default.isValidElement(e)?g5.default.cloneElement(e,xr(r)?r(e.props||{}):r):t;function fn(e,t){return L5(e,e,t)}var AP=B(_()),zd=B(_()),Xte=B(er()),Yte=B(_()),Qte=Yte.createContext(null),nO=Qte,$P=!1;function Zte(e){return typeof e=="boolean"&&($P=e),$P}var Xw=B(_()),BP=[];function Jte(e,t){let[r]=Xw.useState(()=>Na()?document.createElement("div"):null),n=Xw.useRef(!1),a=Xw.useContext(nO),[o,l]=Xw.useState(BP),c=a||(n.current?void 0:h=>{l(g=>[h,...g])});function d(){r.parentElement||document.body.appendChild(r),n.current=!0}function p(){r.parentElement?.removeChild(r),n.current=!1}return Jt(()=>(e?a?a(d):d():p(),p),[e]),Jt(()=>{o.length&&(o.forEach(h=>h()),l(BP))},[o]),[r,c]}var ere=B(_());function tre(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var rre=`rc-util-locker-${Date.now()}`,IP=0;function nre(e){let t=!!e,[r]=ere.useState(()=>(IP+=1,`${rre}_${IP}`));Jt(()=>{if(t){let n=eJ(document.body).width,a=tre();Gd(`
|
|
76
|
-
html body {
|
|
77
|
-
overflow-y: hidden;
|
|
78
|
-
${a?`width: calc(100% - ${n}px);`:""}
|
|
79
|
-
}`,r)}else iv(r);return()=>{iv(r)}},[t,r])}var MP=B(_()),Kd=[],are=200,aO=0,iO=e=>{if(e.key==="Escape"&&!e.isComposing){if(Date.now()-aO<are)return;let t=Kd.length;for(let r=t-1;r>=0;r-=1)Kd[r].onEsc({top:r===t-1,event:e})}},oO=()=>{aO=Date.now()};function ire(){window.addEventListener("keydown",iO),window.addEventListener("compositionend",oO)}function ore(){Kd.length===0&&(window.removeEventListener("keydown",iO),window.removeEventListener("compositionend",oO))}function sre(e,t){let r=Xs(),n=xt(t),a=()=>{Kd.find(l=>l.id===r)||Kd.push({id:r,onEsc:n})},o=()=>{Kd=Kd.filter(l=>l.id!==r)};(0,MP.useMemo)(()=>{e?a():e||o()},[e]),(0,MP.useEffect)(()=>{if(e)return a(),ire(),()=>{o(),ore()}},[e])}var TP=e=>e===!1?!1:!Na()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e,lre=zd.forwardRef((e,t)=>{let{open:r,autoLock:n,getContainer:a,debug:o,autoDestroy:l=!0,children:c,onEsc:d}=e,[p,h]=zd.useState(r),g=p||r;zd.useEffect(()=>{(l||r)&&h(r)},[r,l]);let[v,y]=zd.useState(()=>TP(a));zd.useEffect(()=>{let A=TP(a);y(()=>A??null)});let[w,x]=Jte(g&&!v,o),k=v??w;nre(n&&r&&Na()&&(k===w||k===document.body)),sre(r,d);let F=null;c&&ru(c)&&t&&(F=Ys(c));let C=jo(F,t);if(!g||!Na()||v===void 0)return null;let D=k===!1||Zte(),S=c;return t&&(S=zd.cloneElement(c,{ref:C})),zd.createElement(nO.Provider,{value:x},D?S:(0,Xte.createPortal)(S,k))}),ure=lre,z5=ure,sO=B(_()),Bm=B(_()),Im=B(_()),kS=Im.createContext(null);function cre({children:e,onBatchResize:t}){let r=Im.useRef(0),n=Im.useRef([]),a=Im.useContext(kS),o=Im.useCallback((l,c,d)=>{r.current+=1;let p=r.current;n.current.push({size:l,element:c,data:d}),Promise.resolve().then(()=>{p===r.current&&(t?.(n.current),n.current=[])}),a?.(l,c,d)},[t,a]);return Im.createElement(kS.Provider,{value:o},e)}var L8=B(_()),hc=new Map;function dre(e){e.forEach(t=>{let{target:r}=t;hc.get(r)?.forEach(n=>n(r))})}var z8;function lO(){return z8||(z8=new ResizeObserver(dre)),z8}function pre(e,t){hc.has(e)||(hc.set(e,new Set),lO().observe(e)),hc.get(e).add(t)}function fre(e,t){hc.has(e)&&(hc.get(e).delete(t),hc.get(e).size||(lO().unobserve(e),hc.delete(e)))}function uO(e,t,r,n){let a=L8.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),o=xt(d=>{let{width:p,height:h}=d.getBoundingClientRect(),{offsetWidth:g,offsetHeight:v}=d,y=Math.floor(p),w=Math.floor(h);if(a.current.width!==y||a.current.height!==w||a.current.offsetWidth!==g||a.current.offsetHeight!==v){let x={width:y,height:w,offsetWidth:g,offsetHeight:v};a.current=x;let k=g===Math.round(p)?p:g,F=v===Math.round(h)?h:v,C={...x,offsetWidth:k,offsetHeight:F};n?.(C,d),Promise.resolve().then(()=>{r?.(C,d)})}}),l=typeof t=="function",c=L8.useRef(0);L8.useEffect(()=>{let d=l?t():t;return d&&e?pre(d,o):e&&l&&(c.current+=1),()=>{d&&fre(d,o)}},[e,l?c.current:t])}function mre(e,t){let{children:r,disabled:n,onResize:a,data:o}=e,l=Bm.useRef(null),c=Bm.useContext(kS),d=typeof r=="function",p=d?r(l):r,h=!d&&Bm.isValidElement(p)&&ru(p),g=h?Ys(p):null,v=jo(g,l),y=()=>E5(l.current);return Bm.useImperativeHandle(t,()=>y()),uO(!n,y,a,(w,x)=>{c?.(w,x,o)}),h?Bm.cloneElement(p,{ref:v}):p}var hre=Bm.forwardRef(mre),gre=hre;function CS(){return CS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},CS.apply(this,arguments)}var vre="rc-observer-key";function bre(e,t){let{children:r}=e;return(typeof r=="function"?[r]:Hr(r)).map((n,a)=>{let o=n?.key||`${vre}-${a}`;return sO.createElement(gre,CS({},e,{key:o,ref:a===0?t:void 0}),n)})}var cO=sO.forwardRef(bre);cO.Collection=cre;var Ea=cO,Gr=B(_()),uc=B(_()),yre=B(_()),SS=B(_()),dO=SS.createContext({}),wre=e=>{let{children:t,...r}=e,n=SS.useMemo(()=>({motion:r.motion}),[r.motion]);return SS.createElement(dO.Provider,{value:n},t)},xre=wre,Yw=B(_()),Hd=B(_()),Ks="none",Qw="appear",Zw="enter",Jw="leave",jP="none",ds="prepare",Wd="start",Vd="active",pO="prepared",Ere=B(_()),kre=B(_());function _P(e,t){let r={};return r[e.toLowerCase()]=t.toLowerCase(),r[`Webkit${e}`]=`webkit${t}`,r[`Moz${e}`]=`moz${t}`,r[`ms${e}`]=`MS${t}`,r[`O${e}`]=`o${t.toLowerCase()}`,r}function Cre(e,t){let r={animationend:_P("Animation","AnimationEnd"),transitionend:_P("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete r.animationend.animation,"TransitionEvent"in t||delete r.transitionend.transition),r}var Sre=Cre(Na(),typeof window<"u"?window:{}),fO={};Na()&&({style:fO}=document.createElement("div"));var e5={};function mO(e){if(e5[e])return e5[e];let t=Sre[e];if(t){let r=Object.keys(t),n=r.length;for(let a=0;a<n;a+=1){let o=r[a];if(Object.prototype.hasOwnProperty.call(t,o)&&o in fO)return e5[e]=t[o],e5[e]}}return""}var hO=mO("animationend"),gO=mO("transitionend"),vO=!!(hO&&gO),PP=hO||"animationend",NP=gO||"transitionend";function OP(e,t){if(!e)return null;if(typeof e=="object"){let r=t.replace(/-\w/g,n=>n[1].toUpperCase());return e[r]}return`${e}-${t}`}var Fre=(e=>{let t=(0,kre.useRef)();function r(a){a&&(a.removeEventListener(NP,e),a.removeEventListener(PP,e))}function n(a){t.current&&t.current!==a&&r(t.current),a&&a!==t.current&&(a.addEventListener(NP,e),a.addEventListener(PP,e),t.current=a)}return Ere.useEffect(()=>()=>{r(t.current),t.current=null},[]),[n,r]}),RP=B(_()),Dre=Na()?RP.useLayoutEffect:RP.useEffect,bO=Dre,Are=B(_()),LP=B(_()),$re=(()=>{let e=LP.useRef(null);function t(){pr.cancel(e.current)}function r(n,a=2){t();let o=pr(()=>{a<=1?n({isCanceled:()=>o!==e.current}):r(n,a-1)});e.current=o}return LP.useEffect(()=>()=>{t()},[]),[r,t]}),Bre=[ds,Wd,Vd,"end"],Ire=[ds,pO],yO=!1,Mre=!0;function wO(e){return e===Vd||e==="end"}var Tre=((e,t,r)=>{let[n,a]=iN(jP),[o,l]=$re();function c(){a(ds,!0)}let d=t?Ire:Bre;return bO(()=>{if(n!==jP&&n!=="end"){let p=d.indexOf(n),h=d[p+1],g=r(n);g===yO?a(h,!0):h&&o(v=>{function y(){v.isCanceled()||a(h,!0)}g===!0?y():Promise.resolve(g).then(y)})}},[e,n]),Are.useEffect(()=>()=>{l()},[]),[c,n]});function jre(e,t,r,{motionEnter:n=!0,motionAppear:a=!0,motionLeave:o=!0,motionDeadline:l,motionLeaveImmediately:c,onAppearPrepare:d,onEnterPrepare:p,onLeavePrepare:h,onAppearStart:g,onEnterStart:v,onLeaveStart:y,onAppearActive:w,onEnterActive:x,onLeaveActive:k,onAppearEnd:F,onEnterEnd:C,onLeaveEnd:D,onVisibleChanged:S}){let[A,I]=Yw.useState(),[j,$]=cN(Ks),[P,N]=Yw.useState([null,null]),R=j(),U=(0,Hd.useRef)(!1),H=(0,Hd.useRef)(null);function q(){return r()}let L=(0,Hd.useRef)(!1);function O(){$(Ks),N([null,null])}let W=xt(se=>{let ue=j();if(ue===Ks)return;let ae=q();if(se&&!se.deadline&&se.target!==ae)return;let he=L.current,le;ue===Qw&&he?le=F?.(ae,se):ue===Zw&&he?le=C?.(ae,se):ue===Jw&&he&&(le=D?.(ae,se)),he&&le!==!1&&O()}),[z]=Fre(W),Y=se=>{switch(se){case Qw:return{[ds]:d,[Wd]:g,[Vd]:w};case Zw:return{[ds]:p,[Wd]:v,[Vd]:x};case Jw:return{[ds]:h,[Wd]:y,[Vd]:k};default:return{}}},G=Yw.useMemo(()=>Y(R),[R]),[Z,T]=Tre(R,!e,se=>{if(se===ds){let ue=G[ds];return ue?ue(q()):yO}return se in G&&N([G[se]?.(q(),null)||null,se]),se===Vd&&R!==Ks&&(z(q()),l>0&&(clearTimeout(H.current),H.current=setTimeout(()=>{W({deadline:!0})},l))),se===pO&&O(),Mre}),V=wO(T);L.current=V;let X=(0,Hd.useRef)(null);bO(()=>{if(U.current&&X.current===t)return;I(t);let se=U.current;U.current=!0;let ue;!se&&t&&a&&(ue=Qw),se&&t&&n&&(ue=Zw),(se&&!t&&o||!se&&c&&!t&&o)&&(ue=Jw);let ae=Y(ue);ue&&(e||ae[ds])?($(ue),Z()):$(Ks),X.current=t},[t]),(0,Hd.useEffect)(()=>{(R===Qw&&!a||R===Zw&&!n||R===Jw&&!o)&&$(Ks)},[a,n,o]),(0,Hd.useEffect)(()=>()=>{U.current=!1,clearTimeout(H.current)},[]);let Q=Yw.useRef(!1);(0,Hd.useEffect)(()=>{A&&(Q.current=!0),A!==void 0&&R===Ks&&((Q.current||A)&&S?.(A),Q.current=!0)},[A,R]);let re=P[0];G[ds]&&T===Wd&&(re={transition:"none",...re});let J=P[1];return[j,T,re,A??t,!U.current&&R===Ks&&e&&a?"NONE":T===Wd||T===Vd?J===T:!0]}function xO(e){return e?.length<2}function _re(e){let t=e;typeof e=="object"&&({transitionSupport:t}=e);function r(a,o){return!!(a.motionName&&t&&o!==!1)}let n=uc.forwardRef((a,o)=>{let{visible:l=!0,removeOnLeave:c=!0,forceRender:d,children:p,motionName:h,leavedClassName:g,eventProps:v}=a,{motion:y}=uc.useContext(dO),w=r(a,y),x=(0,yre.useRef)();function k(){return E5(x.current)}let[F,C,D,S,A]=jre(w,l,k,a),I=F(),j=uc.useRef(S);S&&(j.current=!0);let $=uc.useMemo(()=>{let R={};return Object.defineProperties(R,{nativeElement:{enumerable:!0,get:k},inMotion:{enumerable:!0,get:()=>()=>F()!==Ks},enableMotion:{enumerable:!0,get:()=>()=>w}}),R},[]);uc.useImperativeHandle(o,()=>$,[]);let P=uc.useRef(0);A&&(P.current+=1);let N=uc.useMemo(()=>{if(A==="NONE")return null;let R,U={...v,visible:l};if(!p)R=null;else if(I===Ks)S?R=p({...U},x):!c&&j.current&&g?R=p({...U,className:g},x):d||!c&&!g?R=p({...U,style:{display:"none"}},x):R=null;else{let H;C===ds?H="prepare":wO(C)?H="active":C===Wd&&(H="start");let q=OP(h,`${I}-${H}`);R=p({...U,className:te(OP(h,I),{[q]:q&&H,[h]:typeof h=="string"}),style:D},x)}return R},[P.current]);if(xO(p)&&pN(N)){let R=Ys(N);if(R!==x)return uc.cloneElement(N,{ref:ln(R,x)})}return N});return n.displayName="CSSMotion",n}var EO=_re(vO),t5=B(_()),FS="keep",DS="remove",H8="removed";function Pre(e){let t;return e&&typeof e=="object"&&"key"in e?t=e:t={key:e},{...t,key:String(t.key)}}function AS(e=[]){return e.map(Pre)}function Nre(e=[],t=[]){let r=[],n=0,a=t.length,o=AS(e),l=AS(t);o.forEach(d=>{let p=!1;for(let h=n;h<a;h+=1){let g=l[h];if(g.key===d.key){n<h&&(r=r.concat(l.slice(n,h).map(v=>({...v,status:"add"}))),n=h),r.push({...g,status:FS}),n+=1,p=!0;break}}p||r.push({...d,status:DS})}),n<a&&(r=r.concat(l.slice(n).map(d=>({...d,status:"add"}))));let c={};return r.forEach(({key:d})=>{c[d]=(c[d]||0)+1}),Object.keys(c).filter(d=>c[d]>1).forEach(d=>{r=r.filter(({key:p,status:h})=>p!==d||h!==DS),r.forEach(p=>{p.key===d&&(p.status=FS)})}),r}function $S(){return $S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$S.apply(this,arguments)}var Ore=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Rre(e,t=EO){class r extends t5.Component{constructor(){super(...arguments),oe(this,"state",{keyEntities:[]}),oe(this,"removeKey",a=>{this.setState(o=>({keyEntities:o.keyEntities.map(l=>l.key!==a?l:{...l,status:H8})}),()=>{let{keyEntities:o}=this.state;o.filter(({status:l})=>l!==H8).length===0&&this.props.onAllRemoved&&this.props.onAllRemoved()})})}static getDerivedStateFromProps({keys:a},{keyEntities:o}){let l=AS(a);return{keyEntities:Nre(o,l).filter(c=>{let d=o.find(({key:p})=>c.key===p);return!(d&&d.status===H8&&c.status===DS)})}}render(){let{keyEntities:a}=this.state,{component:o,children:l,onVisibleChanged:c,onAllRemoved:d,...p}=this.props,h=o||t5.Fragment,g={};return Ore.forEach(v=>{g[v]=p[v],delete p[v]}),delete p.keys,t5.createElement(h,p,a.map(({status:v,...y},w)=>{let x=v==="add"||v===FS;return t5.createElement(t,$S({},g,{key:y.key,visible:x,eventProps:y,onVisibleChanged:k=>{c?.(k,{key:y.key}),k||this.removeKey(y.key)}}),xO(l)?k=>l({...k,index:w}):(k,F)=>l({...k,index:w},F))}))}}return oe(r,"defaultProps",{component:"div"}),r}var Lre=Rre(vO),Yn=EO,Us=B(_()),zP=B(_());function zre(e){let{prefixCls:t,align:r,arrow:n,arrowPos:a}=e,{className:o,content:l,style:c}=n||{},{x:d=0,y:p=0}=a,h=zP.useRef(null);if(!r||!r.points)return null;let g={position:"absolute"};if(r.autoArrow!==!1){let v=r.points[0],y=r.points[1],w=v[0],x=v[1],k=y[0],F=y[1];w===k||!["t","b"].includes(w)?g.top=p:w==="t"?g.top=0:g.bottom=0,x===F||!["l","r"].includes(x)?g.left=d:x==="l"?g.left=0:g.right=0}return zP.createElement("div",{ref:h,className:te(`${t}-arrow`,o),style:{...g,...c}},l)}var HP=B(_());function BS(){return BS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},BS.apply(this,arguments)}function Hre(e){let{prefixCls:t,open:r,zIndex:n,mask:a,motion:o,mobile:l}=e;return a?HP.createElement(Yn,BS({},o,{motionAppear:!0,visible:r,removeOnLeave:!0}),({className:c})=>HP.createElement("div",{style:{zIndex:n},className:te(`${t}-mask`,l&&`${t}-mobile-mask`,c)})):null}var qre=B(_()),Wre=qre.memo(({children:e})=>e,(e,t)=>t.cache),Vre=Wre;function kO(e,t,r,n,a,o,l,c){let d="auto",p=e?{}:{left:"-1000vw",top:"-1000vh",right:d,bottom:d};if(!e&&(t||!r)){let{points:h}=n,g=n.dynamicInset||n._experimental?.dynamicInset,v=g&&h[0][1]==="r",y=g&&h[0][0]==="b";v?(p.right=a,p.left=d):(p.left=l,p.right=d),y?(p.bottom=o,p.top=d):(p.top=c,p.bottom=d)}return p}function IS(){return IS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},IS.apply(this,arguments)}var Ure=Us.forwardRef((e,t)=>{let{onEsc:r,popup:n,className:a,prefixCls:o,style:l,target:c,onVisibleChanged:d,open:p,keepDom:h,fresh:g,onClick:v,mask:y,arrow:w,arrowPos:x,align:k,motion:F,maskMotion:C,mobile:D,forceRender:S,getPopupContainer:A,autoDestroy:I,portal:j,children:$,zIndex:P,onMouseEnter:N,onMouseLeave:R,onPointerEnter:U,onPointerDownCapture:H,ready:q,offsetX:L,offsetY:O,offsetR:W,offsetB:z,onAlign:Y,onPrepare:G,onResize:Z,stretch:T,targetWidth:V,targetHeight:X}=e,Q=typeof n=="function"?n():n,re=p||h,J=!!D,[se,ue,ae]=Us.useMemo(()=>D?[D.mask,D.maskMotion,D.motion]:[y,C,F],[D,y,C,F]),he=A?.length>0,[le,fe]=Us.useState(!A||!he);Jt(()=>{!le&&he&&c&&fe(!0)},[le,he,c]);let we=xt((De,Ce)=>{Z?.(De,Ce),Y()}),_e=kO(J,q,p,k,W,z,L,O);if(!le)return null;let $e={};return T&&(T.includes("height")&&X?$e.height=X:T.includes("minHeight")&&X&&($e.minHeight=X),T.includes("width")&&V?$e.width=V:T.includes("minWidth")&&V&&($e.minWidth=V)),p||($e.pointerEvents="none"),Us.createElement(j,{open:S||re,getContainer:A&&(()=>A(c)),autoDestroy:I,onEsc:r},Us.createElement(Hre,{prefixCls:o,open:p,zIndex:P,mask:se,motion:ue,mobile:J}),Us.createElement(Ea,{onResize:we,disabled:!p},De=>Us.createElement(Yn,IS({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:S,leavedClassName:`${o}-hidden`},ae,{onAppearPrepare:G,onEnterPrepare:G,visible:p,onVisibleChanged:Ce=>{F?.onVisibleChanged?.(Ce),d(Ce)}}),({className:Ce,style:qe},Ae)=>{let Be=te(o,Ce,a,{[`${o}-mobile`]:J});return Us.createElement("div",{ref:ln(De,t,Ae),className:Be,style:{"--arrow-x":`${x.x||0}px`,"--arrow-y":`${x.y||0}px`,..._e,...$e,...qe,boxSizing:"border-box",zIndex:P,...l},onMouseEnter:N,onMouseLeave:R,onPointerEnter:U,onClick:v,onPointerDownCapture:H},w&&Us.createElement(zre,{prefixCls:o,arrow:w,arrowPos:x,align:k}),Us.createElement(Vre,{cache:!p&&!g},Q))})),$)}),CO=Ure,SO=B(_()),Kre=SO.createContext(null),v5=Kre,FO=SO.createContext(null),Gre=B(_());function qP(e){return e?Array.isArray(e)?e:[e]:[]}function Xre(e,t,r){return Gre.useMemo(()=>{let n=qP(t??e),a=qP(r??e),o=new Set(n),l=new Set(a);return o.has("hover")&&!o.has("click")&&o.add("touch"),l.has("hover")&&!l.has("click")&&l.add("touch"),[o,l]},[e,t,r])}var r5=B(_());function Yre(e=[],t=[],r){let n=(a,o)=>a[o]||"";return r?n(e,0)===n(t,0):n(e,0)===n(t,0)&&n(e,1)===n(t,1)}function DO(e,t,r,n){let{points:a}=r,o=Object.keys(e);for(let l=0;l<o.length;l+=1){let c=o[l];if(Yre(e[c]?.points,a,n))return`${t}-placement-${c}`}return""}function wv(e){return e.ownerDocument.defaultView}function MS(e){let t=[],r=e?.parentElement,n=["hidden","scroll","clip","auto"];for(;r;){let{overflowX:a,overflowY:o,overflow:l}=wv(r).getComputedStyle(r);[a,o,l].some(c=>n.includes(c))&&t.push(r),r=r.parentElement}return t}function uv(e,t=1){return Number.isNaN(e)?t:e}function Qg(e){return uv(parseFloat(e),0)}function WP(e,t){let r={...e};return(t||[]).forEach(n=>{if(n instanceof HTMLBodyElement||n instanceof HTMLHtmlElement)return;let{overflow:a,overflowClipMargin:o,borderTopWidth:l,borderBottomWidth:c,borderLeftWidth:d,borderRightWidth:p}=wv(n).getComputedStyle(n),h=n.getBoundingClientRect(),{offsetHeight:g,clientHeight:v,offsetWidth:y,clientWidth:w}=n,x=Qg(l),k=Qg(c),F=Qg(d),C=Qg(p),D=uv(Math.round(h.width/y*1e3)/1e3),S=uv(Math.round(h.height/g*1e3)/1e3),A=(y-w-F-C)*D,I=(g-v-x-k)*S,j=x*S,$=k*S,P=F*D,N=C*D,R=0,U=0;if(a==="clip"){let W=Qg(o);R=W*D,U=W*S}let H=h.x+P-R,q=h.y+j-U,L=H+h.width+2*R-P-N-A,O=q+h.height+2*U-j-$-I;r.left=Math.max(r.left,H),r.top=Math.max(r.top,q),r.right=Math.min(r.right,L),r.bottom=Math.min(r.bottom,O)}),r}function VP(e,t=0){let r=`${t}`,n=r.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(r)}function UP(e,t){let[r,n]=t||[];return[VP(e.width,r),VP(e.height,n)]}function KP(e=""){return[e[0],e[1]]}function $m(e,t){let r=t[0],n=t[1],a,o;return r==="t"?o=e.y:r==="b"?o=e.y+e.height:o=e.y+e.height/2,n==="l"?a=e.x:n==="r"?a=e.x+e.width:a=e.x+e.width/2,{x:a,y:o}}function cc(e,t){let r={t:"b",b:"t",l:"r",r:"l"},n=[...e];return n[t]=r[e[t]]||"c",n}function GP(e){return e.join("")}function AO(e,t,r,n,a,o,l,c){let[d,p]=r5.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:a[n]||{}}),h=r5.useRef(0),g=r5.useMemo(()=>!t||c?[]:MS(t),[t]),v=r5.useRef({});e||(v.current={});let y=xt(()=>{if(t&&r&&e&&!c){let k=function(mt,Wn,Vn=De){let Un=O.x+mt,Cd=O.y+Wn,is=Un+re,Ls=Cd+Q,vi=Math.max(Un,Vn.left),ga=Math.max(Cd,Vn.top),Hf=Math.min(is,Vn.right),ag=Math.min(Ls,Vn.bottom);return Math.max(0,(Hf-vi)*(ag-ga))},F=function(){Oe=O.y+rt,Qe=Oe+Q,it=O.x+je,Re=it+re},C=t,D=C.ownerDocument,S=wv(C),{position:A}=S.getComputedStyle(C),I=C.style.left,j=C.style.top,$=C.style.right,P=C.style.bottom,N=C.style.overflow,R=C.style.overflowX,U=C.style.overflowY,H={...a[n],...o},q=D.createElement("div");C.parentElement?.appendChild(q),q.style.left=`${C.offsetLeft}px`,q.style.top=`${C.offsetTop}px`,q.style.position=A,q.style.height=`${C.offsetHeight}px`,q.style.width=`${C.offsetWidth}px`,C.style.left="0",C.style.top="0",C.style.right="auto",C.style.bottom="auto",C.style.overflow="hidden";let L;if(Array.isArray(r))L={x:r[0],y:r[1],width:0,height:0};else{let mt=r.getBoundingClientRect();mt.x=mt.x??mt.left,mt.y=mt.y??mt.top,L={x:mt.x,y:mt.y,width:mt.width,height:mt.height}}let O=C.getBoundingClientRect(),{height:W,width:z}=S.getComputedStyle(C);O.x=O.x??O.left,O.y=O.y??O.top;let{clientWidth:Y,clientHeight:G,scrollWidth:Z,scrollHeight:T,scrollTop:V,scrollLeft:X}=D.documentElement,Q=O.height,re=O.width,J=L.height,se=L.width,ue={left:0,top:0,right:Y,bottom:G},ae={left:-X,top:-V,right:Z-X,bottom:T-V},{htmlRegion:he}=H,le="visible",fe="visibleFirst";he!=="scroll"&&he!==fe&&(he=le);let we=he===fe,_e=WP(ae,g),$e=WP(ue,g),De=he===le?$e:_e,Ce=we?$e:De;C.style.left="auto",C.style.top="auto",C.style.right="0",C.style.bottom="0";let qe=C.getBoundingClientRect();C.style.left=I,C.style.top=j,C.style.right=$,C.style.bottom=P,C.style.overflow=N,C.style.overflowX=R,C.style.overflowY=U,C.parentElement?.removeChild(q);let Ae=uv(Math.round(re/parseFloat(z)*1e3)/1e3),Be=uv(Math.round(Q/parseFloat(W)*1e3)/1e3);if(Ae===0||Be===0||Tm(r)&&!cv(r))return;let{offset:Me,targetOffset:Ue}=H,[He,Ie]=UP(O,Me),[Ne,Je]=UP(L,Ue);L.x-=Ne,L.y-=Je;let[gt,et]=H.points||[],Ve=KP(et),Se=KP(gt),Pe=$m(L,Ve),dt=$m(O,Se),at={...H},Ke=[Se,Ve],je=Pe.x-dt.x+He,rt=Pe.y-dt.y+Ie,$t=k(je,rt),Bt=k(je,rt,$e),Kr=$m(L,["t","l"]),zt=$m(O,["t","l"]),$r=$m(L,["b","r"]),Kt=$m(O,["b","r"]),St=H.overflow||{},{adjustX:nr,adjustY:Sr,shiftX:Rt,shiftY:ot}=St,vt=mt=>typeof mt=="boolean"?mt:mt>=0,Oe,Qe,it,Re;F();let Ze=vt(Sr),pt=Se[0]===Ve[0];if(Ze&&Se[0]==="t"&&(Qe>Ce.bottom||v.current.bt)){let mt=rt;pt?mt-=Q-J:mt=Kr.y-Kt.y-Ie;let Wn=k(je,mt),Vn=k(je,mt,$e);Wn>$t||Wn===$t&&(!we||Vn>=Bt)?(v.current.bt=!0,rt=mt,Ie=-Ie,Ke=[cc(Ke[0],0),cc(Ke[1],0)]):v.current.bt=!1}if(Ze&&Se[0]==="b"&&(Oe<Ce.top||v.current.tb)){let mt=rt;pt?mt+=Q-J:mt=$r.y-zt.y-Ie;let Wn=k(je,mt),Vn=k(je,mt,$e);Wn>$t||Wn===$t&&(!we||Vn>=Bt)?(v.current.tb=!0,rt=mt,Ie=-Ie,Ke=[cc(Ke[0],0),cc(Ke[1],0)]):v.current.tb=!1}let Ht=vt(nr),qt=Se[1]===Ve[1];if(Ht&&Se[1]==="l"&&(Re>Ce.right||v.current.rl)){let mt=je;qt?mt-=re-se:mt=Kr.x-Kt.x-He;let Wn=k(mt,rt),Vn=k(mt,rt,$e);Wn>$t||Wn===$t&&(!we||Vn>=Bt)?(v.current.rl=!0,je=mt,He=-He,Ke=[cc(Ke[0],1),cc(Ke[1],1)]):v.current.rl=!1}if(Ht&&Se[1]==="r"&&(it<Ce.left||v.current.lr)){let mt=je;qt?mt+=re-se:mt=$r.x-zt.x-He;let Wn=k(mt,rt),Vn=k(mt,rt,$e);Wn>$t||Wn===$t&&(!we||Vn>=Bt)?(v.current.lr=!0,je=mt,He=-He,Ke=[cc(Ke[0],1),cc(Ke[1],1)]):v.current.lr=!1}at.points=[GP(Ke[0]),GP(Ke[1])],F();let Jr=Rt===!0?0:Rt;typeof Jr=="number"&&(it<$e.left&&(je-=it-$e.left-He,L.x+se<$e.left+Jr&&(je+=L.x-$e.left+se-Jr)),Re>$e.right&&(je-=Re-$e.right-He,L.x>$e.right-Jr&&(je+=L.x-$e.right+Jr)));let Tr=ot===!0?0:ot;typeof Tr=="number"&&(Oe<$e.top&&(rt-=Oe-$e.top-Ie,L.y+J<$e.top+Tr&&(rt+=L.y-$e.top+J-Tr)),Qe>$e.bottom&&(rt-=Qe-$e.bottom-Ie,L.y>$e.bottom-Tr&&(rt+=L.y-$e.bottom+Tr)));let Gt=O.x+je,Lr=Gt+re,ft=O.y+rt,It=ft+Q,dr=L.x,Cn=dr+se,_a=L.y,sr=_a+J,ri=Math.max(Gt,dr),Pa=Math.min(Lr,Cn),Fr=(ri+Pa)/2-Gt,Mn=Math.max(ft,_a),ma=Math.min(It,sr),lr=(Mn+ma)/2-ft;l?.(t,at);let gi=qe.right-O.x-(je+O.width),Ki=qe.bottom-O.y-(rt+O.height);Ae===1&&(je=Math.floor(je),gi=Math.floor(gi)),Be===1&&(rt=Math.floor(rt),Ki=Math.floor(Ki));let ha={ready:!0,offsetX:je/Ae,offsetY:rt/Be,offsetR:gi/Ae,offsetB:Ki/Be,arrowX:Fr/Ae,arrowY:lr/Be,scaleX:Ae,scaleY:Be,align:at};p(ha)}}),w=()=>{h.current+=1;let k=h.current;Promise.resolve().then(()=>{h.current===k&&y()})},x=()=>{p(k=>({...k,ready:!1}))};return Jt(x,[n]),Jt(()=>{e||x()},[e]),[d.ready,d.offsetX,d.offsetY,d.offsetR,d.offsetB,d.arrowX,d.arrowY,d.scaleX,d.scaleY,d.align,w]}var XP=B(_());function $O(){let e=XP.useRef(null),t=()=>{e.current&&(clearTimeout(e.current),e.current=null)},r=(n,a)=>{t(),a===0?n():e.current=setTimeout(()=>{n()},a*1e3)};return XP.useEffect(()=>()=>{t()},[]),r}function Qre(e,t,r,n,a){Jt(()=>{if(e&&t&&r){let o=function(){n(),a()},l=t,c=r,d=MS(l),p=MS(c),h=wv(c),g=new Set([h,...d,...p]);return g.forEach(v=>{v.addEventListener("scroll",o,{passive:!0})}),h.addEventListener("resize",o,{passive:!0}),n(),()=>{g.forEach(v=>{v.removeEventListener("scroll",o),h.removeEventListener("resize",o)})}}},[e,t,r])}var q8=B(_());function Zre(e,t,r,n,a,o,l,c){let d=q8.useRef(e);d.current=e;let p=q8.useRef(!1);q8.useEffect(()=>{if(t&&n&&(!a||o)){let g=()=>{p.current=!1},v=x=>{d.current&&!l(x.composedPath?.()?.[0]||x.target)&&!p.current&&c(!1)},y=wv(n);y.addEventListener("pointerdown",g,!0),y.addEventListener("mousedown",v,!0),y.addEventListener("contextmenu",v,!0);let w=Y8(r);return w&&(w.addEventListener("mousedown",v,!0),w.addEventListener("contextmenu",v,!0)),()=>{y.removeEventListener("pointerdown",g,!0),y.removeEventListener("mousedown",v,!0),y.removeEventListener("contextmenu",v,!0),w&&(w.removeEventListener("mousedown",v,!0),w.removeEventListener("contextmenu",v,!0))}}},[t,r,n,a,o]);function h(){p.current=!0}return h}var ii=B(_()),n5=B(_());function Jre(){let[e,t]=n5.default.useState(null),[r,n]=n5.default.useState(!1),[a,o]=n5.default.useState(!1),l=n5.default.useRef(null),c=xt(p=>{p===!1?(l.current=null,n(!1)):a&&r?l.current=p:(n(!0),t(p),l.current=null,r||o(!0))}),d=xt(p=>{p?(o(!1),l.current&&(t(l.current),l.current=null)):(o(!1),l.current=null)});return[c,r,e,d]}var a5=B(_());function TS(){return TS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},TS.apply(this,arguments)}var ene=e=>{let{prefixCls:t,isMobile:r,ready:n,open:a,align:o,offsetR:l,offsetB:c,offsetX:d,offsetY:p,arrowPos:h,popupSize:g,motion:v,uniqueContainerClassName:y,uniqueContainerStyle:w}=e,x=`${t}-unique-container`,[k,F]=a5.default.useState(!1),C=kO(r,n,a,o,l,c,d,p),D=a5.default.useRef(C);n&&(D.current=C);let S={};return g&&(S.width=g.width,S.height=g.height),a5.default.createElement(Yn,TS({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,leavedClassName:`${x}-hidden`},v,{visible:a,onVisibleChanged:A=>{F(A)}}),({className:A,style:I})=>{let j=te(x,A,y,{[`${x}-visible`]:k});return a5.default.createElement("div",{className:j,style:{"--arrow-x":`${h?.x||0}px`,"--arrow-y":`${h?.y||0}px`,...D.current,...S,...I,...w}})})},tne=ene,rne=({children:e,postTriggerProps:t})=>{let[r,n,a,o]=Jre(),l=ii.useMemo(()=>!a||!t?a:t(a),[a,t]),[c,d]=ii.useState(null),[p,h]=ii.useState(null),g=ii.useRef(null),v=xt(z=>{g.current=z,Tm(z)&&c!==z&&d(z)}),y=ii.useRef(null),w=$O(),x=xt((z,Y)=>{y.current=Y,w(()=>{r(z)},z.delay)}),k=z=>{w(()=>{y.current?.()||r(!1)},z)},F=xt(z=>{o(z)}),[C,D,S,A,I,j,$,,,P,N]=AO(n,c,l?.target,l?.popupPlacement,l?.builtinPlacements||{},l?.popupAlign,void 0,!1),R=ii.useMemo(()=>{if(!l)return"";let z=DO(l.builtinPlacements||{},l.prefixCls||"",P,!1);return te(z,l.getPopupClassNameFromAlign?.(P))},[P,l?.getPopupClassNameFromAlign,l?.builtinPlacements,l?.prefixCls]),U=ii.useMemo(()=>({show:x,hide:k}),[]);ii.useEffect(()=>{N()},[l?.target]);let H=xt(()=>(N(),Promise.resolve())),q=ii.useRef({}),L=ii.useContext(v5),O=ii.useMemo(()=>({registerSubPopup:(z,Y)=>{q.current[z]=Y,L?.registerSubPopup(z,Y)}}),[L]),W=l?.prefixCls;return ii.createElement(FO.Provider,{value:U},e,l&&ii.createElement(v5.Provider,{value:O},ii.createElement(CO,{ref:v,portal:z5,onEsc:l.onEsc,prefixCls:W,popup:l.popup,className:te(l.popupClassName,R,`${W}-unique-controlled`),style:l.popupStyle,target:l.target,open:n,keepDom:!0,fresh:!0,autoDestroy:!1,onVisibleChanged:F,ready:C,offsetX:D,offsetY:S,offsetR:A,offsetB:I,onAlign:N,onPrepare:H,onResize:z=>h({width:z.offsetWidth,height:z.offsetHeight}),arrowPos:{x:j,y:$},align:P,zIndex:l.zIndex,mask:l.mask,arrow:l.arrow,motion:l.popupMotion,maskMotion:l.maskMotion,getPopupContainer:l.getPopupContainer},ii.createElement(tne,{prefixCls:W,isMobile:!1,ready:C,open:n,align:P,offsetR:A,offsetB:I,offsetX:D,offsetY:S,arrowPos:{x:j,y:$},popupSize:p,motion:l.popupMotion,uniqueContainerClassName:te(l.uniqueContainerClassName,R),uniqueContainerStyle:l.uniqueContainerStyle}))))},nne=rne,ane=B(er());function ine(e=z5){return Gr.forwardRef((t,r)=>{let{prefixCls:n="rc-trigger-popup",children:a,action:o="hover",showAction:l,hideAction:c,disabled:d=!1,popupVisible:p,defaultPopupVisible:h,onOpenChange:g,afterOpenChange:v,onPopupVisibleChange:y,afterPopupVisibleChange:w,mouseEnterDelay:x,mouseLeaveDelay:k=.1,focusDelay:F,blurDelay:C,mask:D,maskClosable:S=!0,getPopupContainer:A,forceRender:I,autoDestroy:j,popup:$,popupClassName:P,uniqueContainerClassName:N,uniqueContainerStyle:R,popupStyle:U,popupPlacement:H,builtinPlacements:q={},popupAlign:L,zIndex:O,stretch:W,getPopupClassNameFromAlign:z,fresh:Y,unique:G,alignPoint:Z,onPopupClick:T,onPopupAlign:V,arrow:X,popupMotion:Q,maskMotion:re,mobile:J,...se}=t,ue=j||!1,ae=p===void 0,he=!!J,le=Gr.useRef({}),fe=Gr.useContext(v5),we=Gr.useMemo(()=>({registerSubPopup:(We,Xt)=>{le.current[We]=Xt,fe?.registerSubPopup(We,Xt)}}),[fe]),_e=Gr.useContext(FO),$e=Xs(),[De,Ce]=Gr.useState(null),qe=Gr.useRef(null),Ae=xt(We=>{qe.current=We,Tm(We)&&De!==We&&Ce(We),fe?.registerSubPopup($e,We)}),[Be,Me]=Gr.useState(null),Ue=Gr.useRef(null),He=xt(We=>{let Xt=E5(We);Tm(Xt)&&Be!==Xt&&(Me(Xt),Ue.current=Xt)}),Ie={},Ne=xt(We=>{let Xt=Be;return Xt?.contains(We)||Y8(Xt)?.host===We||We===Xt||De?.contains(We)||Y8(De)?.host===We||We===De||Object.values(le.current).some(qf=>qf?.contains(We)||We===qf)}),Je=X?{...X!==!0?X:{}}:null,[gt,et]=yr(h||!1,p),Ve=gt||!1,Se=Ve&&!d,Pe=Gr.useMemo(()=>{let We=typeof a=="function"?a({open:Se}):a;return Gr.Children.only(We)},[a,Se]),dt=Pe?.props||{},at=xt(()=>Se),Ke=xt((We=0)=>({popup:$,target:Be,delay:We,prefixCls:n,popupClassName:P,uniqueContainerClassName:N,uniqueContainerStyle:R,popupStyle:U,popupPlacement:H,builtinPlacements:q,popupAlign:L,zIndex:O,mask:D,maskClosable:S,popupMotion:Q,maskMotion:re,arrow:Je,getPopupContainer:A,getPopupClassNameFromAlign:z,id:$e,onEsc:Kr}));Jt(()=>{_e&&G&&Be&&!ae&&!fe&&(Se?_e.show(Ke(x),at):_e.hide(k))},[Se,Be]);let je=Gr.useRef(Se);je.current=Se;let rt=xt(We=>{(0,ane.flushSync)(()=>{Ve!==We&&(et(We),g?.(We),y?.(We))})}),$t=$O(),Bt=(We,Xt=0)=>{if(p!==void 0){$t(()=>{rt(We)},Xt);return}if(_e&&G&&ae&&!fe){We?_e.show(Ke(Xt),at):_e.hide(Xt);return}$t(()=>{rt(We)},Xt)};function Kr({top:We}){We&&Bt(!1)}let[zt,$r]=Gr.useState(!1);Jt(We=>{(!We||Se)&&$r(!0)},[Se]);let[Kt,St]=Gr.useState(null),[nr,Sr]=Gr.useState(null),Rt=We=>{Sr([We.clientX,We.clientY])},[ot,vt,Oe,Qe,it,Re,Ze,pt,Ht,qt,Jr]=AO(Se,De,Z&&nr!==null?nr:Be,H,q,L,V,he),[Tr,Gt]=Xre(o,l,c),Lr=Tr.has("click"),ft=Gt.has("click")||Gt.has("contextMenu"),It=xt(()=>{zt||Jr()});Qre(Se,Be,De,It,()=>{je.current&&Z&&ft&&Bt(!1)}),Jt(()=>{It()},[nr,H]),Jt(()=>{Se&&!q?.[H]&&It()},[JSON.stringify(L)]);let dr=Gr.useMemo(()=>{let We=DO(q,n,qt,Z);return te(We,z?.(qt))},[qt,z,q,n,Z]);Gr.useImperativeHandle(r,()=>({nativeElement:Ue.current,popupElement:qe.current,forceAlign:It}));let[Cn,_a]=Gr.useState(0),[sr,ri]=Gr.useState(0),Pa=()=>{if(W&&Be){let We=Be.getBoundingClientRect();_a(We.width),ri(We.height)}},Fr=()=>{Pa(),It()},Mn=We=>{$r(!1),Jr(),v?.(We),w?.(We)},ma=()=>new Promise(We=>{Pa(),St(()=>We)});Jt(()=>{Kt&&(Jr(),Kt(),St(null))},[Kt]);function lr(We,Xt,qf,Gi,Wf){Ie[We]=(og,...sg)=>{(!Wf||!Wf())&&(Gi?.(og),Bt(Xt,qf)),dt[We]?.(og,...sg)}}let gi=Tr.has("touch"),Ki=Gt.has("touch"),ha=Gr.useRef(!1);(gi||Ki)&&(Ie.onTouchStart=(...We)=>{ha.current=!0,je.current&&Ki?Bt(!1):!je.current&&gi&&Bt(!0),dt.onTouchStart?.(...We)}),(Lr||ft)&&(Ie.onClick=(We,...Xt)=>{je.current&&ft?Bt(!1):!je.current&&Lr&&(Rt(We),Bt(!0)),dt.onClick?.(We,...Xt),ha.current=!1});let mt=Zre(Se,ft||Ki,Be,De,D,S,Ne,Bt),Wn=Tr.has("hover"),Vn=Gt.has("hover"),Un,Cd,is=()=>ha.current;if(Wn){let We=Xt=>{Rt(Xt)};lr("onMouseEnter",!0,x,We,is),lr("onPointerEnter",!0,x,We,is),Un=Xt=>{(Se||zt)&&De?.contains(Xt.target)&&Bt(!0,x)},Z&&(Ie.onMouseMove=Xt=>{dt.onMouseMove?.(Xt)})}Vn&&(lr("onMouseLeave",!1,k,void 0,is),lr("onPointerLeave",!1,k,void 0,is),Cd=()=>{Bt(!1,k)}),Tr.has("focus")&&lr("onFocus",!0,F),Gt.has("focus")&&lr("onBlur",!1,C),Tr.has("contextMenu")&&(Ie.onContextMenu=(We,...Xt)=>{je.current&&Gt.has("contextMenu")?Bt(!1):(Rt(We),Bt(!0)),We.preventDefault(),dt.onContextMenu?.(We,...Xt)});let Ls=Gr.useRef(!1);Ls.current||(Ls.current=I||Se||zt);let vi={...dt,...Ie},ga={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach(We=>{se[We]&&(ga[We]=(...Xt)=>{vi[We]?.(...Xt),se[We](...Xt)})});let Hf={x:Re,y:Ze};uO(Se,Be,Fr);let ag=jo(He,Ys(Pe)),ig=Gr.cloneElement(Pe,{...vi,...ga,ref:ag});return Gr.createElement(Gr.Fragment,null,ig,Ls.current&&(!_e||!G)&&Gr.createElement(v5.Provider,{value:we},Gr.createElement(CO,{portal:e,ref:Ae,prefixCls:n,popup:$,className:te(P,!he&&dr),style:U,target:Be,onMouseEnter:Un,onMouseLeave:Cd,onPointerEnter:Un,zIndex:O,open:Se,keepDom:zt,fresh:Y,onClick:T,onPointerDownCapture:mt,mask:D,motion:Q,maskMotion:re,onVisibleChanged:Mn,onPrepare:ma,forceRender:I,autoDestroy:ue,getPopupContainer:A,onEsc:Kr,align:qt,arrow:Je,arrowPos:Hf,ready:ot,offsetX:vt,offsetY:Oe,offsetR:Qe,offsetB:it,onAlign:It,stretch:W,targetWidth:Cn/pt,targetHeight:sr/Ht,mobile:J})))})}var Wm=ine(z5),W8=B(_()),one=({children:e})=>{let{getPrefixCls:t}=W8.default.useContext(wt),r=t();return W8.default.isValidElement(e)?W8.default.createElement(Yn,{visible:!0,motionName:`${r}-fade`,motionAppear:!0,motionEnter:!0,motionLeave:!1,removeOnLeave:!1},({style:n,className:a})=>fn(e,o=>({className:te(o.className,a),style:{...o.style,...n}}))):e},sne=one,i5=[null,null];function lne(e){if(i5[0]!==e){let t={};Object.keys(e).forEach(r=>{t[r]={...e[r],dynamicInset:!1}}),i5[0]=e,i5[1]=t}return i5[1]}var une=({children:e})=>{let t=r=>{let{id:n,builtinPlacements:a,popup:o}=r,l=xr(o)?o():o,c=lne(a);return{...r,getPopupContainer:null,arrow:!1,popup:AP.default.createElement(sne,{key:n},l),builtinPlacements:c}};return AP.default.createElement(nne,{postTriggerProps:t},e)},H5=une,jS=B(_()),_S=jS.createContext(!1),BO=({children:e,disabled:t})=>{let r=jS.useContext(_S);return jS.createElement(_S.Provider,{value:t??r},e)},ci=_S,dn=B(_()),cne=B(_()),dne=(0,cne.createContext)({}),Vm=dne,pne=B(_()),IO=(0,pne.createContext)(void 0),YP=B(_()),PS=B(_()),NS=PS.createContext(void 0),fne=({children:e,size:t})=>{let r=PS.useContext(NS);return PS.createElement(NS.Provider,{value:t||r},e)},Um=NS;function mne(){let e=(0,YP.useContext)(ci),t=(0,YP.useContext)(Um);return{componentDisabled:e,componentSize:t}}var hne=mne,gne=B(_());function vne(e,t,r){let n=D5("ConfigProvider"),a=e||{},o=a.inherit===!1||!t?{...Qd,hashed:t?.hashed??Qd.hashed,cssVar:t?.cssVar,zeroRuntime:t?.zeroRuntime}:t,l=(0,gne.useId)();return Om(()=>{if(!e)return t;let c={...o.components};Object.keys(e.components||{}).forEach(h=>{c[h]={...c[h],...e.components[h]}});let d=`css-var-${l.replace(/:/g,"")}`,p={prefix:r?.prefixCls,...o.cssVar,...a.cssVar,key:a.cssVar?.key||d};return{...o,...a,token:{...o.token,...a.token},components:c,cssVar:p}},[a,o,r?.prefixCls,l],(c,d)=>c.some((p,h)=>{let g=d[h];return!yc(p,g,!0)}))}var ev=B(_()),QP=ev.createContext(!0);function bne(e){let t=ev.useContext(QP),{children:r}=e,[,n]=ui(),{motion:a}=n,o=ev.useRef(!1);return o.current||(o.current=t!==a),o.current?ev.createElement(QP.Provider,{value:a},ev.createElement(xre,{motion:a},r)):r}var W4e=B(_()),yne=()=>null,wne=({iconPrefixCls:e,csp:t})=>(Tte(e,t),null),xne=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"],s4,MO,TO,jO;function V8(){return s4||gc}function Ene(){return MO||A5}var kne=e=>{let{prefixCls:t,iconPrefixCls:r,theme:n,holderRender:a}=e;t!==void 0&&(s4=t),r!==void 0&&(MO=r),"holderRender"in e&&(jO=a),n&&(TO=n)},Cne=()=>({getPrefixCls:(e,t)=>t||(e?`${V8()}-${e}`:V8()),getIconPrefixCls:Ene,getRootPrefixCls:()=>s4||V8(),getTheme:()=>TO,holderRender:jO}),Sne=e=>{let{children:t,csp:r,autoInsertSpaceInButton:n,alert:a,affix:o,anchor:l,app:c,form:d,locale:p,componentSize:h,direction:g,space:v,splitter:y,virtual:w,dropdownMatchSelectWidth:x,popupMatchSelectWidth:k,popupOverflow:F,legacyLocale:C,parentContext:D,iconPrefixCls:S,theme:A,componentDisabled:I,segmented:j,statistic:$,spin:P,calendar:N,carousel:R,cascader:U,collapse:H,typography:q,checkbox:L,descriptions:O,divider:W,drawer:z,skeleton:Y,steps:G,image:Z,layout:T,list:V,listy:X,mentions:Q,modal:re,progress:J,result:se,slider:ue,breadcrumb:ae,masonry:he,menu:le,pagination:fe,input:we,inputPassword:_e,inputSearch:$e,textArea:De,otp:Ce,empty:qe,badge:Ae,borderBeam:Be,radio:Me,rate:Ue,ribbon:He,switch:Ie,transfer:Ne,avatar:Je,message:gt,tag:et,table:Ve,card:Se,cardMeta:Pe,tabs:dt,timeline:at,timePicker:Ke,upload:je,notification:rt,tree:$t,colorPicker:Bt,datePicker:Kr,rangePicker:zt,flex:$r,wave:Kt,dropdown:St,warning:nr,tour:Sr,tooltip:Rt,popover:ot,popconfirm:vt,qrcode:Oe,floatButton:Qe,floatButtonGroup:it,variant:Re,inputNumber:Ze,treeSelect:pt,watermark:Ht}=e,qt=dn.useMemo(()=>kt(p)&&Object.prototype.hasOwnProperty.call(p,"default")&&p.default?.locale?p.default:p,[p]),Jr=dn.useCallback((Fr,Mn)=>{let{prefixCls:ma}=e;if(Mn)return Mn;let lr=ma||D.getPrefixCls("");return Fr?`${lr}-${Fr}`:lr},[D.getPrefixCls,e.prefixCls]),Tr=S||D.iconPrefixCls||A5,Gt=r||D.csp,Lr=vne(A,D.theme,{prefixCls:Jr("")}),ft={csp:Gt,autoInsertSpaceInButton:n,alert:a,affix:o,anchor:l,app:c,locale:qt||C,direction:g,space:v,splitter:y,virtual:w,popupMatchSelectWidth:k??x,popupOverflow:F,getPrefixCls:Jr,iconPrefixCls:Tr,theme:Lr,segmented:j,statistic:$,spin:P,calendar:N,carousel:R,cascader:U,collapse:H,typography:q,checkbox:L,descriptions:O,divider:W,drawer:z,skeleton:Y,steps:G,image:Z,input:we,inputPassword:_e,inputSearch:$e,textArea:De,otp:Ce,layout:T,list:V,listy:X,mentions:Q,modal:re,progress:J,result:se,slider:ue,breadcrumb:ae,masonry:he,menu:le,pagination:fe,empty:qe,badge:Ae,borderBeam:Be,radio:Me,rate:Ue,ribbon:He,switch:Ie,transfer:Ne,avatar:Je,message:gt,tag:et,table:Ve,card:Se,cardMeta:Pe,tabs:dt,timeline:at,timePicker:Ke,upload:je,notification:rt,tree:$t,colorPicker:Bt,datePicker:Kr,rangePicker:zt,flex:$r,wave:Kt,dropdown:St,warning:nr,tour:Sr,tooltip:Rt,popover:ot,popconfirm:vt,qrcode:Oe,floatButton:Qe,floatButtonGroup:it,variant:Re,inputNumber:Ze,treeSelect:pt,watermark:Ht},It={...D};Object.keys(ft).forEach(Fr=>{ft[Fr]!==void 0&&(It[Fr]=ft[Fr])}),xne.forEach(Fr=>{let Mn=e[Fr];Mn&&(It[Fr]=Mn)}),typeof n<"u"&&(It.button={autoInsertSpace:n,...It.button});let dr=Om(()=>It,It,(Fr,Mn)=>{let ma=Object.keys(Fr),lr=Object.keys(Mn);return ma.length!==lr.length||ma.some(gi=>Fr[gi]!==Mn[gi])}),{layer:Cn}=dn.useContext(xc),_a=dn.useMemo(()=>({prefixCls:Tr,csp:Gt,layer:Cn?"antd":void 0,zeroRuntime:!!Cn||Lr?.zeroRuntime}),[Tr,Gt,Cn,Lr?.zeroRuntime]),sr=dn.createElement(dn.Fragment,null,dn.createElement(wne,{iconPrefixCls:Tr,csp:Gt}),dn.createElement(yne,{dropdownMatchSelectWidth:x}),t),ri=dn.useMemo(()=>wc(tu.Form?.defaultValidateMessages||{},dr.locale?.Form?.defaultValidateMessages||{},dr.form?.validateMessages||{},d?.validateMessages||{}),[dr,d?.validateMessages]);Object.keys(ri).length>0&&(sr=dn.createElement(IO.Provider,{value:ri},sr)),qt&&(sr=dn.createElement(Gte,{locale:qt,_ANT_MARK__:Ute},sr)),(Tr||Gt)&&(sr=dn.createElement(Vm.Provider,{value:_a},sr)),h&&(sr=dn.createElement(fne,{size:h},sr)),sr=dn.createElement(bne,null,sr),Rt?.unique&&(sr=dn.createElement(H5,null,sr));let Pa=dn.useMemo(()=>{let{algorithm:Fr,token:Mn,components:ma,cssVar:lr,...gi}=Lr||{},Ki=Fr&&(!Array.isArray(Fr)||Fr.length>0)?jm(Fr):mv,ha={};Object.entries(ma||{}).forEach(([Wn,Vn])=>{let Un={...Vn};"algorithm"in Un&&(Un.algorithm===!0?Un.theme=Ki:(Array.isArray(Un.algorithm)||xr(Un.algorithm))&&(Un.theme=jm(Un.algorithm)),delete Un.algorithm),ha[Wn]=Un});let mt={...vc,...Mn};return{...gi,theme:Ki,token:mt,components:ha,override:{override:mt,...ha},cssVar:lr}},[Lr]);return A&&(sr=dn.createElement(hv.Provider,{value:Pa},sr)),dr.warning&&(sr=dn.createElement($J.Provider,{value:dr.warning},sr)),I!==void 0&&(sr=dn.createElement(BO,{disabled:I},sr)),dn.createElement(wt.Provider,{value:dr},sr)},Km=e=>{let t=dn.useContext(wt),r=dn.useContext(i4);return dn.createElement(Sne,{parentContext:t,legacyLocale:r,...e})};Km.ConfigContext=wt;Km.SizeContext=Um;Km.config=kne;Km.useConfig=hne;Object.defineProperty(Km,"SizeContext",{get:()=>Um});var Gm=Km,Fne=e=>`${e}-css-var`,Qn=Fne,o5=B(_()),Dne=B(_()),b5=B(_()),ZP="data-rc-order",JP="data-rc-priority",Ane="rc-util-key",OS=new Map;function _O(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function $ne(e,t){if(!e||!t)return!1;if(e.contains)return e.contains(t);let r=t;for(;r;){if(r===e)return!0;r=r.parentNode}return!1}function PO({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:Ane}function l4(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function Bne(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function u4(e){return Array.from((OS.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function NO(e,t={}){if(!_O())return null;let{csp:r,prepend:n,priority:a=0}=t,o=Bne(n),l=o==="prependQueue",c=document.createElement("style");c.setAttribute(ZP,o),l&&a&&c.setAttribute(JP,`${a}`),r?.nonce&&(c.nonce=r.nonce),c.innerHTML=e;let d=l4(t),{firstChild:p}=d;if(n){if(l){let h=(t.styles||u4(d)).filter(g=>{if(!["prepend","prependQueue"].includes(g.getAttribute(ZP)))return!1;let v=Number(g.getAttribute(JP)||0);return a>=v});if(h.length)return d.insertBefore(c,h[h.length-1].nextSibling),c}d.insertBefore(c,p)}else d.appendChild(c);return c}function Ine(e,t={}){let{styles:r}=t;return r||(r=u4(l4(t))),r.find(n=>n.getAttribute(PO(t))===e)}function Mne(e,t){let r=OS.get(e);if(!r||!$ne(document,r)){let n=NO("",t);if(!n)return;let{parentNode:a}=n;OS.set(e,a),e.removeChild(n)}}function Tne(e,t,r={}){if(!_O())return null;let n=l4(r),a=u4(n),o={...r,styles:a};Mne(n,o);let l=Ine(t,o);if(l)return o.csp?.nonce&&l.nonce!==o.csp.nonce&&(l.nonce=o.csp.nonce),l.innerHTML!==e&&(l.innerHTML=e),l;let c=NO(e,o);return c?.setAttribute(PO(o),t),c}function jne(e){return e?.getRootNode?.()}function _ne(e){let t=jne(e);return typeof ShadowRoot<"u"&&t instanceof ShadowRoot?t:null}var eN={};function Pne(e,t){e||eN[t]||(eN[t]=!0)}function Nne(e){return e.replace(/-(.)/g,(t,r)=>r.toUpperCase())}function c4(e,t){Pne(e,`[@ant-design/icons] ${t}`)}function y5(e){return e!==null&&typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function tN(e={}){return Object.keys(e).reduce((t,r)=>{let n=e[r];return r==="class"?(t.className=n,delete t.class):(delete t[r],t[Nne(r)]=n),t},{})}function RS(e,t,r){return r?b5.default.createElement(e.tag,{key:t,...tN(e.attrs),...r},(e.children||[]).map((n,a)=>RS(n,`${t}-${e.tag}-${a}`))):b5.default.createElement(e.tag,{key:t,...tN(e.attrs)},(e.children||[]).map((n,a)=>RS(n,`${t}-${e.tag}-${a}`)))}var One={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},Rne=`
|
|
80
|
-
.anticon {
|
|
81
|
-
display: inline-flex;
|
|
82
|
-
align-items: center;
|
|
83
|
-
color: inherit;
|
|
84
|
-
font-style: normal;
|
|
85
|
-
line-height: 0;
|
|
86
|
-
text-align: center;
|
|
87
|
-
text-transform: none;
|
|
88
|
-
vertical-align: -0.125em;
|
|
89
|
-
text-rendering: optimizeLegibility;
|
|
90
|
-
-webkit-font-smoothing: antialiased;
|
|
91
|
-
-moz-osx-font-smoothing: grayscale;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.anticon > * {
|
|
95
|
-
line-height: 1;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.anticon svg {
|
|
99
|
-
display: inline-block;
|
|
100
|
-
vertical-align: inherit;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.anticon::before {
|
|
104
|
-
display: none;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.anticon .anticon-icon {
|
|
108
|
-
display: block;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.anticon[tabindex] {
|
|
112
|
-
cursor: pointer;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.anticon-spin {
|
|
116
|
-
-webkit-animation: loadingCircle 1s infinite linear;
|
|
117
|
-
animation: loadingCircle 1s infinite linear;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
@-webkit-keyframes loadingCircle {
|
|
121
|
-
100% {
|
|
122
|
-
-webkit-transform: rotate(360deg);
|
|
123
|
-
transform: rotate(360deg);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
@keyframes loadingCircle {
|
|
128
|
-
100% {
|
|
129
|
-
-webkit-transform: rotate(360deg);
|
|
130
|
-
transform: rotate(360deg);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
`,OO=e=>{let{csp:t,prefixCls:r,layer:n,zeroRuntime:a}=(0,b5.useContext)(Vm),o=Rne;r&&(o=o.replace(/anticon/g,r)),n&&(o=`@layer ${n} {
|
|
134
|
-
${o}
|
|
135
|
-
}`),(0,b5.useEffect)(()=>{if(a)return;let l=e.current,c=_ne(l);Tne(o,"@ant-design-icons",{prepend:!n,csp:t,attachTo:c})},[])},RO=e=>{let{icon:t,className:r,onClick:n,style:a,primaryColor:o,secondaryColor:l,...c}=e,d=Dne.useRef(null);if(OO(d),c4(y5(t),`icon should be icon definiton, but got ${typeof t}`),!y5(t))return null;let p=t;return RS(p.icon,`svg-${p.name}`,{className:r,onClick:n,style:a,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...c,ref:d})};RO.displayName="IconReact";var Lne=RO;function LS(){return LS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},LS.apply(this,arguments)}var zne=o5.forwardRef((e,t)=>{let{className:r,icon:n,spin:a,rotate:o,tabIndex:l,onClick:c,twoToneColor:d,...p}=e,{prefixCls:h="anticon",rootClassName:g}=o5.useContext(Vm);if(c4(y5(n),`icon should be icon definiton, but got ${typeof n}`),!y5(n))return null;let v=te(g,h,{[`${h}-${n.name}`]:!!n.name,[`${h}-spin`]:!!a||n.name==="loading"},r),y=l;y===void 0&&c&&(y=-1);let w=o?{msTransform:`rotate(${o}deg)`,transform:`rotate(${o}deg)`}:void 0;return o5.createElement("span",LS({role:"img","aria-label":n.name},p,{ref:t,tabIndex:y,onClick:c,className:v}),o5.createElement(Lne,{icon:n,style:w}))}),Ut=zne;var LO=B(_(),1),xv=B(Ee(),1);function zO(e){let t=e.trim();return t?(t=t.replace(/\/{2,}/g,"/"),t=t.replace(/\/+$/,""),t||"/"):""}function Hne(e){let t=zO(e);return t==="/"||!t?"/":t.slice(0,t.lastIndexOf("/"))||"/"}function d4({explorerRef:e,suspended:t=!1}={}){let r=ai(),n=Ci(),a=r.layout.filePanelOpen&&!t,[o,l]=LO.useState(null);return LO.useEffect(()=>{if(!a||o)return;let c=!0;return globalThis.__wandImportBrowserModule("5f0e00d267a0d1e3").then(d=>{c&&l(()=>d.ShellFilePanelDrawer)}),()=>{c=!1}},[a,o]),(0,xv.jsxs)(xv.Fragment,{children:[(0,xv.jsx)("div",{id:"file-panel-backdrop",className:ct("file-panel-backdrop",r.layout.filePanelBackdropVisible&&"open"),"aria-hidden":"true",onClick:()=>{n({type:"layout.files.close"})},hidden:!0}),(0,xv.jsx)("div",{className:"file-explorer legacy-file-explorer-host",id:"file-explorer",ref:e,hidden:!0,"aria-hidden":"true"}),o?(0,xv.jsx)(o,{explorerRef:e,suspended:t}):null]})}var ep=globalThis.__wandBrowserRuntime??{configPath:"${wandConfigPath}",aiTeamsChunkSrc:"${aiTeamsChunkSrc}",plushAvatarChunkSrc:"${plushAvatarChunkSrc}"},q5="wand-decision-expert",W5="\u77F3\u4E00",qne="Wand \u672C\u5730\u51B3\u7B56\u6A21\u578B \xB7 LAYA";var Zs=["claude","codex","opencode","grok","qoder","pi"],Wne=["claude","codex","opencode","grok","qoder","pi"],Vne=`^(?:${Wne.join("|")}):[a-z0-9][a-z0-9_-]{0,31}$`;function V5(e){return typeof e=="string"&&Une.test(e)}var Une=new RegExp(Vne),Kne=new Set(Zs);function f4(e){return typeof e=="string"&&Kne.has(e)}function U5(e){return e==="qoder"?"qodercli":e}var Qs={claude:"Claude",codex:"Codex",opencode:"OpenCode",grok:"Grok",qoder:"Qoder",pi:"Pi"},Ev="Wand Agent",Gne={anthropic:"claude",claude:"claude","claude-cli":"claude","claude-cli-print":"claude","claude-sdk":"claude",codex:"codex","codex-cli":"codex","codex-cli-exec":"codex",grok:"grok","grok-cli":"grok","grok-cli-headless":"grok","open-code":"opencode",open_code:"opencode",opencode:"opencode","opencode-cli-run":"opencode",qoder:"qoder","qoder-cli":"qoder","qoder-cli-print":"qoder",qodercli:"qoder",pi:"pi","pi-cli":"pi","pi-cli-json":"pi"};function _o(e){if(typeof e!="string")return null;let t=e.trim().toLowerCase();return t?Gne[t]??null:null}var Xne=new Set(["npx","pnpx","bunx","yarn","pnpm","corepack"]),Yne=new Set(["dlx","exec","x"]);function p4(e){let t=e.match(/^(?:"([^"]+)"|'([^']+)'|(\S+))/);return(t?.[1]??t?.[2]??t?.[3]??"").split(/[\\/]/).pop()?.replace(/\.(?:cmd|exe)$/i,"")??""}function Qne(e){if(typeof e!="string")return;let t=e.trim();if(!t)return;let r=t.match(/"[^"]*"|'[^']*'|\S+/g)??[],n=0;if(Xne.has(p4(r[0]??"").toLowerCase()))for(n=1;n<r.length;){let a=r[n];if(a.startsWith("-")){n+=1;continue}if(Yne.has(p4(a).toLowerCase())){n+=1;continue}break}return _o(p4(r[n]??""))??void 0}function kv(e){if(typeof e=="string"&&e.trim().toLowerCase()==="terminal")return"\u7EC8\u7AEF";let t=_o(e);return t?Qs[t]:typeof e=="string"&&e.trim()?e.trim():"AI"}var iu=Qne,Xm="wand-agent",Ym=[{id:"claude",provider:"claude",label:Qs.claude,description:"Claude Code"},{id:"codex",provider:"codex",label:Qs.codex,description:"OpenAI Codex CLI"},{id:"opencode",provider:"opencode",label:Qs.opencode,description:"OpenCode CLI"},{id:"grok",provider:"grok",label:Qs.grok,description:"Grok Build CLI"},{id:"qoder",provider:"qoder",label:Qs.qoder,description:"Qoder CLI"},{id:"pi",provider:"pi",engine:"cli",label:Qs.pi,description:"Pi CLI\uFF1A\u7ED3\u6784\u5316 JSON \u6216 PTY \u7EC8\u7AEF"},{id:Xm,provider:"pi",engine:"sdk",label:Ev,description:"Wand \u81EA\u5E26 Agent\uFF1A\u8FDB\u7A0B\u5185 SDK \u6267\u884C\uFF0C\u53EA\u652F\u6301\u7ED3\u6784\u5316\u4F1A\u8BDD"}];function Cv(e){return e?Ym.find(t=>t.id===e)??null:null}function m4(e,t){return e==="pi"&&t==="sdk"?Xm:e}function ou(e,t){return _o(e)==="pi"&&(t==="sdk"||t==="core")?Ev:kv(e)}var rFe=new Set(Zs),K5="#D97757",G5="m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z",X5="M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z",Zne="M517.36 400H634.72V634.72H517.36Z",Y5=[{fill:"#F09082",d:"M165.29 165.29H517.36V400H400V282.65H165.29Z"},{fill:"#4D9ABF",d:"M165.29 282.65H282.65V400H400V517.36H282.65V634.72H165.29Z"},{fill:"#F1BE58",d:Zne}],Q5=["M13.2371 21.0407L24.3186 12.8506C24.8619 12.4491 25.6384 12.6057 25.8973 13.2294C27.2597 16.5185 26.651 20.4712 23.9403 23.1851C21.2297 25.8989 17.4581 26.4941 14.0108 25.1386L10.2449 26.8843C15.6463 30.5806 22.2053 29.6665 26.304 25.5601C29.5551 22.3051 30.562 17.8683 29.6205 13.8673L29.629 13.8758C28.2637 7.99809 29.9647 5.64871 33.449.844576C33.5314.730667 33.6139.616757 33.6964.5L29.1113 5.09055V5.07631L13.2343 21.0436Z","M10.9503 23.0313C7.07343 19.3235 7.74185 13.5853 11.0498 10.2763C13.4959 7.82722 17.5036 6.82767 21.0021 8.2971L24.7595 6.55998C24.0826 6.07017 23.215 5.54334 22.2195 5.17313C17.7198 3.31926 12.3326 4.24192 8.67479 7.90126C5.15635 11.4239 4.0499 16.8403 5.94992 21.4622C7.36924 24.9165 5.04257 27.3598 2.69884 29.826C1.86829 30.7002 1.0349 31.5745.36364 32.5L10.9474 23.0341Z"];function Jne(e){let t=_o(e),r=`class="${`wand-provider-logo wand-provider-logo-${t??"generic"}`}" aria-hidden="true" focusable="false" data-provider-logo="${t??"generic"}"`;return t==="opencode"?`<svg ${r} viewBox="0 0 512 512"><path d="M0 0H512V512H0Z" fill="#131010"/><path d="M320 224V352H192V224H320Z" fill="#5A5858"/><path d="M384 416H128V96H384V416ZM320 160H192V352H320V160Z" fill="#fff" fill-rule="evenodd"/></svg>`:t==="qoder"?`<svg ${r} viewBox="0 0 180 180"><rect width="180" height="180" rx="40" fill="#111113"/><path d="M78 31c18 0 35 6 49 18l8 7c-5-2-10-3-15-3-10 0-19 3-26 9-11 10-17 24-17 40v18c0 12 5 21 13 28l-45-24c-8-4-13-12-13-21V80c0-27 20-49 46-49Z" fill="#fff"/><path d="M126 53c13 4 22 15 22 29v54c0 8-8 13-15 9l-10-5c-6 5-14 8-23 8-14 0-26-7-34-17l-6-9c15-7 26-19 33-33 4-9 6-18 6-28v-8c8-3 18-3 27 0Z" fill="#2ADB5C"/></svg>`:t==="grok"?`<svg ${r} viewBox="0 0 34 33" fill="currentColor">${Q5.map(n=>`<path d="${n}"/>`).join("")}</svg>`:t==="pi"?`<svg ${r} viewBox="0 0 800 800">${Y5.map(({d:n,fill:a})=>`<path d="${n}" fill="${a}"/>`).join("")}</svg>`:t==="claude"?`<svg ${r} viewBox="0 0 24 24" fill="${K5}"><path d="${G5}"/></svg>`:t==="codex"?`<svg ${r} viewBox="0 0 24 24" fill="currentColor"><path d="${X5}"/></svg>`:`<svg ${r} viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M5.6 18.4l2.1-2.1M16.3 7.7l2.1-2.1"/><circle cx="12" cy="12" r="3"/></svg>`}var uFe=B(_(),1),Zn=B(Ee(),1);function Js({provider:e,className:t}){let r=_o(e),n=ct("wand-provider-logo",`wand-provider-logo-${r??"generic"}`,t);return r==="qoder"?(0,Zn.jsxs)("svg",{className:n,viewBox:"0 0 180 180","aria-hidden":"true",focusable:"false","data-provider-logo":"qoder",children:[(0,Zn.jsx)("rect",{width:"180",height:"180",rx:"40",fill:"#111113"}),(0,Zn.jsx)("path",{d:"M78 31c18 0 35 6 49 18l8 7c-5-2-10-3-15-3-10 0-19 3-26 9-11 10-17 24-17 40v18c0 12 5 21 13 28l-45-24c-8-4-13-12-13-21V80c0-27 20-49 46-49Z",fill:"#fff"}),(0,Zn.jsx)("path",{d:"M126 53c13 4 22 15 22 29v54c0 8-8 13-15 9l-10-5c-6 5-14 8-23 8-14 0-26-7-34-17l-6-9c15-7 26-19 33-33 4-9 6-18 6-28v-8c8-3 18-3 27 0Z",fill:"#2ADB5C"})]}):r==="opencode"?(0,Zn.jsxs)("svg",{className:n,viewBox:"0 0 512 512","aria-hidden":"true",focusable:"false","data-provider-logo":"opencode",children:[(0,Zn.jsx)("path",{d:"M0 0H512V512H0Z",fill:"#131010"}),(0,Zn.jsx)("path",{d:"M320 224V352H192V224H320Z",fill:"#5A5858"}),(0,Zn.jsx)("path",{d:"M384 416H128V96H384V416ZM320 160H192V352H320V160Z",fill:"#fff",fillRule:"evenodd"})]}):r==="grok"?(0,Zn.jsx)("svg",{className:n,viewBox:"0 0 34 33",fill:"currentColor","aria-hidden":"true",focusable:"false","data-provider-logo":"grok",children:Q5.map(a=>(0,Zn.jsx)("path",{d:a},a))}):r==="pi"?(0,Zn.jsx)("svg",{className:n,viewBox:"0 0 800 800",fill:"currentColor","aria-hidden":"true",focusable:"false","data-provider-logo":"pi",children:Y5.map(({d:a,fill:o})=>(0,Zn.jsx)("path",{d:a,fill:o},o))}):r==="claude"?(0,Zn.jsx)("svg",{className:n,viewBox:"0 0 24 24",fill:K5,"aria-hidden":"true",focusable:"false","data-provider-logo":"claude",children:(0,Zn.jsx)("path",{d:G5})}):r==="codex"?(0,Zn.jsx)("svg",{className:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false","data-provider-logo":"codex",children:(0,Zn.jsx)("path",{d:X5})}):(0,Zn.jsxs)("svg",{className:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false","data-provider-logo":"generic",children:[(0,Zn.jsx)("path",{d:"M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M5.6 18.4l2.1-2.1M16.3 7.7l2.1-2.1"}),(0,Zn.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}var eae=B(_()),tp=["xxxl","xxl","xl","lg","md","sm","xs"],tae=[].concat(tp).reverse(),rae=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`,xxxl:`(min-width: ${e.screenXXXL}px)`}),nae=e=>{let t=e,r=[].concat(tp).reverse();return r.forEach((n,a)=>{let o=n.toUpperCase(),l=`screen${o}Min`,c=`screen${o}`;if(!(t[l]<=t[c]))throw new Error(`${l}<=${c} fails : !(${t[l]}<=${t[c]})`);if(a<r.length-1){let d=`screen${o}Max`;if(!(t[c]<=t[d]))throw new Error(`${c}<=${d} fails : !(${t[c]}<=${t[d]})`);let p=`screen${r[a+1].toUpperCase()}Min`;if(!(t[d]<=t[p]))throw new Error(`${d}<=${p} fails : !(${t[d]}<=${t[p]})`)}}),e},aae=(e,t)=>{if(t){for(let r of tp)if(e[r]&&t?.[r]!==void 0)return t[r]}},iae=()=>{let[,e]=ui(),t=rae(nae(e));return eae.default.useMemo(()=>{let r=new Map,n=-1,a={};return{responsiveMap:t,matchHandlers:{},dispatch(o){return a=o,r.forEach(l=>{l(a)}),r.size>=1},subscribe(o){return r.size||this.register(),n+=1,r.set(n,o),o(a),n},unsubscribe(o){r.delete(o),r.size||this.unregister()},register(){Object.entries(t).forEach(([o,l])=>{let c=({matches:p})=>{this.dispatch({...a,[o]:p})},d=window.matchMedia(l);xr(d.addEventListener)&&d.addEventListener("change",c),this.matchHandlers[l]={mql:d,listener:c},c(d)})},unregister(){Object.values(t).forEach(o=>{let l=this.matchHandlers[o];xr(l?.mql.removeEventListener)&&l.mql.removeEventListener("change",l?.listener)}),r.clear()}}},[t])},oae=iae,sae=B(_()),lae=B(_()),HO=()=>lae.default.useReducer(e=>e+1,0);function uae(e=!0,t={}){let r=(0,sae.useRef)(t),[,n]=HO(),a=oae();return Jt(()=>{let o=a.subscribe(l=>{r.current=l,e&&n()});return()=>a.unsubscribe(o)},[e]),r.current}var h4=uae;var rp=(e,t,r)=>te({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:r}),Qm=(e,t)=>t||e;var qO=B(_()),cae=e=>{let t=qO.default.useContext(Um);return qO.default.useMemo(()=>e?Di(e)?e??t:xr(e)?e(t):t:t,[e,t])},Rn=cae,g4=()=>({height:0,opacity:0}),WO=e=>({height:e?.scrollHeight??0,opacity:e?1:0}),dae=e=>({height:e?.offsetHeight??0}),v4=(e,t)=>t?.deadline===!0||pv(t)&&t.propertyName==="height",pae=(e=gc)=>({motionName:`${e}-motion-collapse`,onAppearStart:g4,onEnterStart:g4,onAppearActive:WO,onEnterActive:WO,onLeaveStart:dae,onLeaveActive:g4,onAppearEnd:v4,onEnterEnd:v4,onLeaveEnd:v4,motionDeadline:500}),np=(e,t,r)=>r!==void 0?r:`${e}-${t}`,b4=pae,VO=e=>({animationDuration:e,animationFillMode:"both"}),Z5=(e,t,r,n,a=!1)=>{let o=a?"&":"";return{[`
|
|
136
|
-
${o}${e}-enter,
|
|
137
|
-
${o}${e}-appear
|
|
138
|
-
`]:{...VO(n),animationPlayState:"paused"},[`${o}${e}-leave`]:{...VO(n),animationPlayState:"paused"},[`
|
|
139
|
-
${o}${e}-enter${e}-enter-active,
|
|
140
|
-
${o}${e}-appear${e}-appear-active
|
|
141
|
-
`]:{animationName:t,animationPlayState:"running"},[`${o}${e}-leave${e}-leave-active`]:{animationName:r,animationPlayState:"running",pointerEvents:"none"}}},fae=new Ct("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),mae=new Ct("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),y4=(e,t=!1)=>{let{antCls:r}=e,n=`${r}-fade`,a=t?"&":"";return[Z5(n,fae,mae,e.motionDurationMid,t),{[`
|
|
142
|
-
${a}${n}-enter,
|
|
143
|
-
${a}${n}-appear
|
|
144
|
-
`]:{opacity:0,animationTimingFunction:"linear"},[`${a}${n}-leave`]:{animationTimingFunction:"linear"}}]},J5=new Ct("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),ex=new Ct("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),tx=new Ct("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),rx=new Ct("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),GO=new Ct("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),XO=new Ct("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),YO=new Ct("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),QO=new Ct("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),hae={"slide-up":{inKeyframes:J5,outKeyframes:ex},"slide-down":{inKeyframes:tx,outKeyframes:rx},"slide-left":{inKeyframes:GO,outKeyframes:XO},"slide-right":{inKeyframes:YO,outKeyframes:QO}},nx=(e,t)=>{let{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:a,outKeyframes:o}=hae[t];return[Z5(n,a,o,e.motionDurationMid),{[`
|
|
145
|
-
${n}-enter,
|
|
146
|
-
${n}-appear
|
|
147
|
-
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},ap=()=>({"@media (prefers-reduced-motion: reduce)":{"&, &::before, &::after":{transition:"none",animation:"none"}}}),ax=()=>({"@media (prefers-reduced-motion: reduce)":{transition:"none",animation:"none"}}),ZO=new Ct("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),gae=new Ct("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),UO=new Ct("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),KO=new Ct("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),vae=new Ct("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),bae=new Ct("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),yae=new Ct("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),wae=new Ct("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),xae=new Ct("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),Eae=new Ct("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),kae=new Ct("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),Cae=new Ct("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),Sae={zoom:{inKeyframes:ZO,outKeyframes:gae},"zoom-big":{inKeyframes:UO,outKeyframes:KO},"zoom-big-fast":{inKeyframes:UO,outKeyframes:KO},"zoom-left":{inKeyframes:yae,outKeyframes:wae},"zoom-right":{inKeyframes:xae,outKeyframes:Eae},"zoom-up":{inKeyframes:vae,outKeyframes:bae},"zoom-down":{inKeyframes:kae,outKeyframes:Cae}},Sv=(e,t)=>{let{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:a,outKeyframes:o}=Sae[t];return[Z5(n,a,o,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[`
|
|
148
|
-
${n}-enter,
|
|
149
|
-
${n}-appear
|
|
150
|
-
`]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Fae=e=>{let{componentCls:t,antCls:r,motionDurationMid:n,motionEaseInOut:a}=e;return{[t]:{[`${r}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`${["height","opacity"].map(o=>`${o} ${n} ${a}`).join(", ")} !important`}},[`${r}-motion-collapse`]:{overflow:"hidden",transition:`${["height","opacity"].map(o=>`${o} ${n} ${a}`).join(", ")} !important`}}}},w4=Fae,Dae=new Ct("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Aae=new Ct("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),$ae=new Ct("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Bae=new Ct("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Iae=new Ct("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Mae=new Ct("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Tae=new Ct("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),jae=new Ct("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),_ae={"move-up":{inKeyframes:Tae,outKeyframes:jae},"move-down":{inKeyframes:Dae,outKeyframes:Aae},"move-left":{inKeyframes:$ae,outKeyframes:Bae},"move-right":{inKeyframes:Iae,outKeyframes:Mae}},Pae=(e,t)=>{let{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:a,outKeyframes:o}=_ae[t];return[Z5(n,a,o,e.motionDurationMid),{[`
|
|
151
|
-
${n}-enter,
|
|
152
|
-
${n}-appear
|
|
153
|
-
`]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]};var Nae=B(_()),JO=e=>e==="horizontal"||e==="vertical",el=(e,t,r)=>(0,Nae.useMemo)(()=>{let n=JO(e),a;return n?a=e:typeof t=="boolean"?a=t?"vertical":"horizontal":a=JO(r)?r:"horizontal",[a,a==="vertical"]},[r,e,t]),$i=B(_()),Oae=e=>{let{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"}}}},Rae=Et(["Space","Compact"],Oae,()=>({}),{resetStyle:!1}),ix=$i.createContext(null),tl=(e,t)=>{let r=$i.useContext(ix),n=$i.useMemo(()=>{if(!r)return"";let{compactDirection:a,isFirstItem:o,isLastItem:l}=r,c=a==="vertical"?"-vertical-":"-";return te(`${e}-compact${c}item`,{[`${e}-compact${c}first-item`]:o,[`${e}-compact${c}last-item`]:l,[`${e}-compact${c}item-rtl`]:t==="rtl"})},[e,t,r]);return{compactSize:r?.compactSize,compactDirection:r?.compactDirection,compactItemClassnames:n}},E4=e=>{let{children:t}=e;return $i.createElement(ix.Provider,{value:null},t)},Lae=e=>{let{children:t,...r}=e;return $i.createElement(ix.Provider,{value:$i.useMemo(()=>r,[r])},t)},zae=$i.forwardRef((e,t)=>{let{getPrefixCls:r,direction:n}=$i.useContext(wt),{size:a,direction:o,orientation:l,block:c,prefixCls:d,className:p,rootClassName:h,children:g,vertical:v,...y}=e,[w,x]=el(l,v,o),k=Rn($=>a??$),F=r("space-compact",d),[C]=Rae(F),D=te(F,C,{[`${F}-rtl`]:n==="rtl",[`${F}-block`]:c,[`${F}-vertical`]:x},p,h),S=$i.useContext(ix),A=$i.useRef(null);$i.useImperativeHandle(t,()=>({nativeElement:A.current}));let I=Hr(g),j=$i.useMemo(()=>I.map(($,P)=>{let N=$?.key||`${F}-item-${P}`;return $i.createElement(Lae,{key:N,compactSize:k,compactDirection:w,isFirstItem:P===0&&(!S||S?.isFirstItem),isLastItem:P===I.length-1&&(!S||S?.isLastItem)},$)}),[I,S,w,k,F]);return I.length===0?null:$i.createElement("div",{ref:A,className:D,...y},j)}),Fv=zae,SFe=B(_()),x4=e=>Math.round(Number(e||0)),Hae=e=>{if(e instanceof nn)return e;if(e&&typeof e=="object"&&"h"in e&&"b"in e){let{b:t,...r}=e;return{...r,v:t}}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e},ip=class extends nn{constructor(e){super(Hae(e))}toHsbString(){let e=this.toHsb(),t=x4(e.s*100),r=x4(e.b*100),n=x4(e.h),a=e.a,o=`hsb(${n}, ${t}%, ${r}%)`,l=`hsba(${n}, ${t}%, ${r}%, ${a.toFixed(a===0?0:2)})`;return a===1?o:l}toHsb(){let{v:e,...t}=this.toHsv();return{...t,b:e,a:this.a}}},qae=e=>e instanceof ip?e:new ip(e),FFe=qae("#1677ff"),DFe=B(_()),AFe=B(_()),$Fe=B(_()),BFe=B(_()),IFe=B(_()),MFe=B(_()),TFe=B(_()),jFe=B(_()),_Fe=B(_()),PFe=B(_()),Wae=(e,t)=>e?.replace(/[^0-9a-f]/gi,"").slice(0,t?8:6)||"",Vae=(e,t)=>e?Wae(e,t):"",op=(function(){function e(t){if(nu(this,e),this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=t.colors?.map(n=>({color:new e(n.color),percent:n.percent})),this.cleared=t.cleared;return}let r=Array.isArray(t);r&&t.length?(this.colors=t.map(({color:n,percent:a})=>({color:new e(n),percent:a})),this.metaColor=new ip(this.colors[0].color.metaColor)):this.metaColor=new ip(r?"":t),(!t||r&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return au(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return Vae(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){let{colors:t}=this;return t?`linear-gradient(90deg, ${t.map(r=>`${r.color.toRgbString()} ${r.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(t){return!t||this.isGradient()!==t.isGradient()?!1:this.isGradient()?this.colors.length===t.colors.length&&this.colors.every((r,n)=>{let a=t.colors[n];return r.percent===a.percent&&r.color.equals(a.color)}):this.toHexString()===t.toHexString()}}])})(),k4=e=>e instanceof op?e:new op(e);var eR=B(_()),Uae={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},Kae=Uae;function C4(){return C4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},C4.apply(this,arguments)}var Gae=(e,t)=>eR.createElement(Ut,C4({},e,{ref:t,icon:Kae})),Xae=eR.forwardRef(Gae),Dv=Xae;function Dn(){return Dn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dn.apply(null,arguments)}var Zm=B(_()),uR=B(_()),Yae={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},Qae=Yae;function I4(){return I4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},I4.apply(this,arguments)}var Zae=(e,t)=>uR.createElement(Ut,I4({},e,{ref:t,icon:Qae})),Jae=uR.forwardRef(Zae),sp=Jae,tR=B(_()),cR=B(_()),su=B(_()),Av=B(_()),eie=Av.default.forwardRef((e,t)=>{let{prefixCls:r,forceRender:n,className:a,style:o,children:l,isActive:c,role:d,classNames:p,styles:h}=e,[g,v]=Av.default.useState(c||n);return Av.default.useEffect(()=>{(n||c)&&v(!0)},[n,c]),g?Av.default.createElement("div",{ref:t,className:te(`${r}-panel`,{[`${r}-panel-active`]:c,[`${r}-panel-inactive`]:!c},a),style:o,role:d},Av.default.createElement("div",{className:te(`${r}-body`,p?.body),style:h?.body},l)):null}),tie=eie,rie=su.default.forwardRef((e,t)=>{let{showArrow:r=!0,headerClass:n,isActive:a,onItemClick:o,forceRender:l,className:c,classNames:d={},styles:p={},prefixCls:h,collapsible:g,accordion:v,panelKey:y,extra:w,header:x,expandIcon:k,openMotion:F,destroyOnHidden:C,children:D,...S}=e,A=g==="disabled",I=w!=null&&typeof w!="boolean",j={onClick:()=>{o?.(y)},onKeyDown:U=>{(U.key==="Enter"||U.keyCode===On.ENTER||U.which===On.ENTER)&&o?.(y)},role:v?"tab":"button","aria-expanded":a,"aria-disabled":A,tabIndex:A?-1:0},$=typeof k=="function"?k(e):su.default.createElement("i",{className:"arrow"}),P=$&&su.default.createElement("div",Dn({className:te(`${h}-expand-icon`,d?.icon),style:p?.icon},["header","icon"].includes(g)?j:{}),$),N=te(`${h}-item`,{[`${h}-item-active`]:a,[`${h}-item-disabled`]:A},c),R={className:te(n,`${h}-header`,{[`${h}-collapsible-${g}`]:!!g},d?.header),style:p?.header,...["header","icon"].includes(g)?{}:j};return su.default.createElement("div",Dn({},S,{ref:t,className:N}),su.default.createElement("div",R,r&&P,su.default.createElement("span",Dn({className:te(`${h}-title`,d?.title),style:p?.title},g==="header"?j:{}),x),I&&su.default.createElement("div",{className:`${h}-extra`},w)),su.default.createElement(Yn,Dn({visible:a,leavedClassName:`${h}-panel-hidden`},F,{forceRender:l,removeOnLeave:C}),({className:U,style:H},q)=>su.default.createElement(tie,{ref:q,prefixCls:h,className:U,classNames:d,style:H,styles:p,isActive:a,forceRender:l,role:v?"tabpanel":void 0},D)))}),dR=rie;function pR(e,t,r){if(!e||!t)return e||t;let n=Array.from(new Set([...Object.keys(e),...Object.keys(t)])),a={};return n.forEach(o=>{a[o]=r(e[o],t[o])}),a}function nie(e,t){return pR(e,t,(r,n)=>zS(r,n))}function aie(e,t){return pR(e,t,(r,n)=>({...r,...n}))}var iie=(e,t)=>{let{prefixCls:r,accordion:n,collapsible:a,destroyOnHidden:o,onItemClick:l,activeKey:c,openMotion:d,expandIcon:p,classNames:h,styles:g}=t;return e.map((v,y)=>{let{children:w,label:x,key:k,collapsible:F,onItemClick:C,destroyOnHidden:D,classNames:S,styles:A,...I}=v,j=String(k??y),$=F??a,P=D??o,N=U=>{$!=="disabled"&&(l(U),C?.(U))},R=!1;return n?R=c[0]===j:R=c.indexOf(j)>-1,cR.default.createElement(dR,Dn({},I,{classNames:nie(h,S),styles:aie(g,A),prefixCls:r,key:j,panelKey:j,isActive:R,accordion:n,openMotion:d,expandIcon:p,header:x,collapsible:$,onItemClick:N,destroyOnHidden:P}),w)})},oie=(e,t,r)=>{if(!e)return null;let{prefixCls:n,accordion:a,collapsible:o,destroyOnHidden:l,onItemClick:c,activeKey:d,openMotion:p,expandIcon:h,classNames:g,styles:v}=r,y=e.key||String(t),{header:w,headerClass:x,destroyOnHidden:k,collapsible:F,onItemClick:C}=e.props,D=!1;a?D=d[0]===y:D=d.indexOf(y)>-1;let S=F??o,A=j=>{S!=="disabled"&&(c(j),C?.(j))},I={key:y,panelKey:y,header:w,headerClass:x,classNames:g,styles:v,isActive:D,prefixCls:n,destroyOnHidden:k??l,openMotion:p,accordion:a,children:e.props.children,onItemClick:A,expandIcon:h,collapsible:S};return typeof e.type=="string"?e:(Object.keys(I).forEach(j=>{typeof I[j]>"u"&&delete I[j]}),cR.default.cloneElement(e,I))};function sie(e,t,r){return Array.isArray(e)?iie(e,r):Hr(t).map((n,a)=>oie(n,a,r))}var lie=sie;function rR(e){let t=e;if(!Array.isArray(t)){let r=typeof t;t=r==="number"||r==="string"?[t]:[]}return t.map(r=>String(r))}var uie=tR.default.forwardRef((e,t)=>{let{prefixCls:r="rc-collapse",destroyOnHidden:n=!1,style:a,accordion:o,className:l,children:c,collapsible:d,openMotion:p,expandIcon:h,activeKey:g,defaultActiveKey:v,onChange:y,items:w,classNames:x,styles:k}=e,F=te(r,l),[C,D]=yr(v,g),S=rR(C),A=xt($=>{let P=rR($);D(P),y?.(P)}),I=$=>{A(o?S[0]===$?[]:[$]:S.includes($)?S.filter(P=>P!==$):[...S,$])};xa(!c,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");let j=lie(w,c,{prefixCls:r,accordion:o,openMotion:p,expandIcon:h,collapsible:d,destroyOnHidden:n,onItemClick:I,activeKey:S,classNames:x,styles:k});return tR.default.createElement("div",Dn({ref:t,className:F,style:a,role:o?"tablist":void 0},no(e,{aria:!0,data:!0})),j)}),fR=Object.assign(uie,{Panel:dR}),mR=fR,{Panel:QFe}=fR,S4=B(_()),cie=S4.forwardRef((e,t)=>{let{getPrefixCls:r}=S4.useContext(wt),{prefixCls:n,className:a,showArrow:o=!0}=e,l=r("collapse",n),c=te({[`${l}-no-arrow`]:!o},a);return S4.createElement(mR.Panel,{ref:t,...e,prefixCls:l,className:c})}),die=cie,pie=e=>{let{componentCls:t,contentBg:r,padding:n,headerBg:a,headerPadding:o,headerPaddingSM:l,headerPaddingLG:c,collapsePanelBorderRadius:d,lineWidth:p,lineType:h,colorBorder:g,colorText:v,colorTextHeading:y,colorTextDisabled:w,fontSizeLG:x,lineHeight:k,lineHeightLG:F,marginSM:C,paddingSM:D,paddingLG:S,paddingXS:A,motionDurationSlow:I,fontSizeIcon:j,contentPadding:$,contentPaddingSM:P,contentPaddingLG:N,fontHeight:R,fontHeightLG:U}=e,H=`${ve(p)} ${h} ${g}`;return{[t]:{...fr(e),backgroundColor:a,border:H,borderRadius:d,"&-rtl":{direction:"rtl"},[`& > ${t}-item`]:{borderBottom:H,"&:first-child":{[`
|
|
154
|
-
&,
|
|
155
|
-
& > ${t}-header`]:{borderRadius:`${ve(d)} ${ve(d)} 0 0`}},"&:last-child":{[`
|
|
156
|
-
&,
|
|
157
|
-
& > ${t}-header`]:{borderRadius:`0 0 ${ve(d)} ${ve(d)}`}},[`> ${t}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:o,color:y,lineHeight:k,cursor:"pointer",transition:`all ${I}, visibility 0s`,...Ai(e),[`> ${t}-title`]:{flex:"auto"},[`${t}-expand-icon`]:{height:R,display:"flex",alignItems:"center",marginInlineEnd:C},[`${t}-arrow`]:{...bv(),fontSize:j,transition:`transform ${I}`,svg:{transition:`transform ${I}`}},[`${t}-title`]:{marginInlineEnd:"auto","> svg":{display:"inline-block",verticalAlign:"middle",marginBlockEnd:"0.2em"}}},[`${t}-collapsible-header`]:{cursor:"default",[`${t}-title`]:{flex:"none",cursor:"pointer"},[`${t}-expand-icon`]:{cursor:"pointer"}},[`${t}-collapsible-icon`]:{cursor:"unset",[`${t}-expand-icon`]:{cursor:"pointer"}}},[`${t}-panel`]:{color:v,backgroundColor:r,borderTop:H,[`& > ${t}-body`]:{padding:$},"&-hidden":{display:"none"}},"&-small":{[`> ${t}-item`]:{[`> ${t}-header`]:{padding:l,[`> ${t}-expand-icon`]:{marginInlineStart:e.calc(D).sub(A).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:P}}},"&-large":{[`> ${t}-item`]:{fontSize:x,lineHeight:F,[`> ${t}-header`]:{padding:c,[`> ${t}-expand-icon`]:{height:U,marginInlineStart:e.calc(S).sub(n).equal()}},[`> ${t}-panel > ${t}-body`]:{padding:N}}},[`${t}-item:last-child`]:{borderBottom:0,[`> ${t}-panel`]:{borderRadius:`0 0 ${ve(d)} ${ve(d)}`}},[`& ${t}-item-disabled > ${t}-header`]:{"&, & > .arrow":{color:w,cursor:"not-allowed"}},[`&${t}-icon-placement-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,marginInlineEnd:0,marginInlineStart:C}}}}}}},fie=e=>{let{componentCls:t}=e,r=`> ${t}-item > ${t}-header ${t}-arrow`;return{[`${t}-rtl`]:{[r]:{transform:"rotate(180deg)"}}}},mie=e=>{let{componentCls:t,headerBg:r,borderlessContentPadding:n,borderlessContentBg:a,colorBorder:o}=e;return{[`${t}-borderless`]:{backgroundColor:r,border:0,[`> ${t}-item`]:{borderBottom:`${ve(e.lineWidth)} ${e.lineType} ${o}`},[`
|
|
158
|
-
> ${t}-item:last-child,
|
|
159
|
-
> ${t}-item:last-child ${t}-header
|
|
160
|
-
`]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-panel`]:{backgroundColor:a,borderTop:0},[`> ${t}-item > ${t}-panel > ${t}-body`]:{padding:n}}}},hie=e=>{let{componentCls:t,paddingSM:r}=e;return{[`${t}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-panel`]:{backgroundColor:"transparent",border:0,[`> ${t}-body`]:{paddingBlock:r}}}}}},gie=e=>({headerPadding:`${ve(e.paddingSM)} ${ve(e.padding)}`,headerPaddingSM:`${ve(e.paddingXS)} ${ve(e.paddingSM)} ${ve(e.paddingXS)} ${ve(e.paddingXS)}`,headerPaddingLG:`${ve(e.padding)} ${ve(e.paddingLG)} ${ve(e.padding)} ${ve(e.padding)}`,headerBg:e.colorFillAlter,contentPadding:`${ve(e.padding)} ${ve(16)}`,contentPaddingSM:e.paddingSM,contentPaddingLG:e.paddingLG,contentBg:e.colorBgContainer,borderlessContentPadding:`${ve(e.paddingXXS)} ${ve(16)} ${ve(e.padding)}`,borderlessContentBg:"transparent"}),vie=Et("Collapse",e=>{let t=_t(e,{collapsePanelBorderRadius:e.borderRadiusLG});return[pie(t),mie(t),hie(t),fie(t),w4(t)]},gie),bie=Zm.forwardRef((e,t)=>{let{getPrefixCls:r,direction:n,expandIcon:a,className:o,style:l,classNames:c,styles:d}=jt("collapse"),{prefixCls:p,className:h,rootClassName:g,style:v,bordered:y=!0,ghost:w,size:x,expandIconPlacement:k,expandIconPosition:F,children:C,destroyInactivePanel:D,destroyOnHidden:S,expandIcon:A,classNames:I,styles:j}=e,$=Rn(X=>x??X??"middle"),P=r("collapse",p),N=r(),[R,U]=vie(P),H=k??F??"start",q={...e,size:$,bordered:y,expandIconPlacement:H},L=lt(l),O=lt(v),[W,z]=Tt([c,I],[d,L,j,O],{props:q}),Y=A??a,G=Zm.useCallback((X={})=>{let Q=X.collapsible==="header"||X.collapsible==="icon",re=xr(Y)?Y(X):Zm.createElement(sp,{rotate:X.isActive?n==="rtl"?-90:90:void 0,...Q?{"aria-label":X.isActive?"expanded":"collapsed"}:{"aria-hidden":!0}});return fn(re,J=>({className:te(J.className,`${P}-arrow`)}))},[Y,P,n]),Z=te(`${P}-icon-placement-${H}`,{[`${P}-borderless`]:!y,[`${P}-rtl`]:n==="rtl",[`${P}-ghost`]:!!w,[`${P}-large`]:$==="large",[`${P}-small`]:$==="small"},o,h,g,R,U,W.root),T=Zm.useMemo(()=>({...b4(N),motionAppear:!1,leavedClassName:`${P}-panel-hidden`}),[N,P]),V=Zm.useMemo(()=>C?Hr(C).map(X=>X):null,[C]);return Zm.createElement(mR,{ref:t,openMotion:T,...wr(e,["rootClassName"]),expandIcon:G,prefixCls:P,className:Z,style:z.root,classNames:W,styles:z,destroyOnHidden:S??D},V)}),yie=Object.assign(bie,{Panel:die}),T4=yie,ox=B(_()),wie=e=>{let{componentCls:t,colorPrimary:r,motionDurationSlow:n,motionEaseInOut:a,motionEaseOutCirc:o,antCls:l}=e,[,c]=pn(l,"wave");return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:c("color",r),boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:["box-shadow 0.4s","opacity 2s"].map(d=>`${d} ${o}`).join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:["box-shadow","opacity"].map(d=>`${d} ${n} ${a}`).join(",")}}}}},xie=a4("Wave",wie),F4=B(_()),Bv=`${gc}-wave-target`,io=B(_()),nR=e=>e?Di(e)&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/i.test(e)&&!/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i.test(e)&&e!=="transparent"&&e!=="canvastext":!1;function Eie(e,t=null){let r=getComputedStyle(e),{borderTopColor:n,borderColor:a,backgroundColor:o}=r;return t&&nR(r[t])?r[t]:[n,a,o].find(nR)??null}function D4(e){return Number.isNaN(e)?0:e}var kie=e=>{let{className:t,target:r,component:n,colorSource:a}=e,o=io.useRef(null),{getPrefixCls:l}=io.useContext(wt),c=l(),[d]=pn(c,"wave"),[p,h]=io.useState(null),[g,v]=io.useState([]),[y,w]=io.useState(0),[x,k]=io.useState(0),[F,C]=io.useState(0),[D,S]=io.useState(0),[A,I]=io.useState(!1),j={left:y,top:x,width:F,height:D,borderRadius:g.map(N=>`${N}px`).join(" ")};p&&(j[d("color")]=p);function $(){let N=getComputedStyle(r);h(Eie(r,a));let R=N.position==="static",{borderLeftWidth:U,borderTopWidth:H}=N;w(R?r.offsetLeft:D4(-Number.parseFloat(U))),k(R?r.offsetTop:D4(-Number.parseFloat(H))),C(r.offsetWidth),S(r.offsetHeight);let{borderTopLeftRadius:q,borderTopRightRadius:L,borderBottomLeftRadius:O,borderBottomRightRadius:W}=N;v([q,L,W,O].map(z=>D4(Number.parseFloat(z))))}if(io.useEffect(()=>{if(r){let N=pr(()=>{$(),I(!0)}),R;return typeof ResizeObserver<"u"&&(R=new ResizeObserver($),R.observe(r)),()=>{pr.cancel(N),R?.disconnect()}}},[r]),!A)return null;let P=(n==="Checkbox"||n==="Radio")&&r?.classList.contains(Bv);return io.createElement(Yn,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(N,R)=>{if(R.deadline||pv(R)&&R.propertyName==="opacity"){let U=o.current?.parentElement;WS(U).then(()=>{U?.remove()})}return!1}},({className:N},R)=>io.createElement("div",{ref:ln(o,R),className:te(t,N,{"wave-quick":P}),style:j}))},Cie=(e,t)=>{let{component:r}=t;if(r==="Checkbox"&&!e.querySelector("input")?.checked)return;let n=document.createElement("div");n.style.position="absolute",n.style.left="0px",n.style.top="0px",e?.insertBefore(n,e?.firstChild),qS(io.createElement(kie,{...t,target:e}),n)},Sie=Cie,Fie=(e,t,r,n)=>{let{wave:a}=F4.useContext(wt),[,o,l]=ui(),c=xt(p=>{let h=e.current;if(a?.disabled||!h)return;let g=h.querySelector(`.${Bv}`)||h,{showEffect:v}=a||{};(v||Sie)(g,{className:t,token:o,component:r,event:p,hashId:l,colorSource:n})}),d=F4.useRef(null);return F4.useEffect(()=>()=>{pr.cancel(d.current)},[]),p=>{pr.cancel(d.current),d.current=pr(()=>{c(p)})}},Die=Fie,aR={click:"click",mousedown:"mousedown",mouseup:"mouseup",pointerdown:"pointerdown",pointerup:"pointerup"},Aie=e=>{let{children:t,disabled:r,component:n,colorSource:a}=e,{getPrefixCls:o,wave:l}=(0,ox.useContext)(wt),c=(0,ox.useRef)(null),d=o("wave"),p=xie(d),h=Die(c,te(d,p),n,a);if(ox.default.useEffect(()=>{let v=c.current;if(!v||v.nodeType!==window.Node.ELEMENT_NODE||r)return;let y=k=>{!cv(k.target)||!v.getAttribute||v.getAttribute("disabled")||v.disabled||v.className.includes("disabled")&&!v.className.includes("disabled:")||v.getAttribute("aria-disabled")==="true"||v.className.includes("-leave")||h(k)},w=l?.triggerType,x=w&&w in aR?aR[w]:"click";return v.addEventListener(x,y,!0),()=>{v.removeEventListener(x,y,!0)}},[r,l?.triggerType]),!ox.default.isValidElement(t))return t??null;let g=ru(t)?ln(Ys(t),c):c;return fn(t,{ref:g})},eh=Aie,sx=B(_()),iR=/^[\u4E00-\u9FA5]{2}$/,M4=iR.test.bind(iR);function $ie(e){return e==="danger"?{danger:!0}:{type:e}}function A4(e){return e==="text"||e==="link"}function Bie(e,t,r,n){if(!ir(e))return;let a=t?" ":"";return!Di(e)&&!Oa(e)&&Di(e.type)&&M4(e.props.children)?fn(e,o=>{let l=te(o.className,n)||void 0,c={...r,...o.style};return{...o,children:o.children.split("").join(a),className:l,style:c}}):Di(e)?sx.default.createElement("span",{className:n,style:r},M4(e)?e.split("").join(a):e):yv(e)?sx.default.createElement("span",{className:n,style:r},e):fn(e,o=>({...o,className:te(o.className,n)||void 0,style:{...o.style,...r}}))}function Iie(e,t,r,n){let a=!1,o=[];return sx.default.Children.forEach(e,l=>{let c=Di(l)||Oa(l);if(a&&c){let d=o.length-1,p=o[d];o[d]=`${p}${l}`}else o.push(l);a=c}),sx.default.Children.map(o,l=>Bie(l,t,r,n))}var ZFe=["default","primary","danger"].concat(Xr(li)),Jn=B(_()),$v=B(_()),hR=$v.createContext(void 0),Mie=e=>{let{getPrefixCls:t,direction:r}=$v.useContext(wt),{prefixCls:n,size:a,className:o,...l}=e,c=t("btn-group",n),[,,d]=ui(),p=$v.useMemo(()=>{switch(a){case"large":return"lg";case"small":return"sm";default:return""}},[a]),h=te(c,{[`${c}-${p}`]:p,[`${c}-rtl`]:r==="rtl"},o,d);return $v.createElement(hR.Provider,{value:a},$v.createElement("div",{...l,className:h}))},Tie=Mie,Jm=B(_()),oR=B(_()),jie=(0,oR.forwardRef)((e,t)=>{let{className:r,style:n,children:a,prefixCls:o}=e,l=te(`${o}-icon`,r);return oR.default.createElement("span",{ref:t,className:l,style:n},a)}),gR=jie,sR=(0,Jm.forwardRef)((e,t)=>{let{prefixCls:r,className:n,style:a,iconClassName:o}=e,l=te(`${r}-loading-icon`,n);return Jm.default.createElement(gR,{prefixCls:r,className:l,style:a,ref:t},Jm.default.createElement(Dv,{className:o}))}),$4=()=>({width:0,opacity:0,transform:"scale(0)"}),B4=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),_ie=e=>{let{prefixCls:t,loading:r,existIcon:n,className:a,style:o,mount:l}=e,c=!!r;return n?Jm.default.createElement(sR,{prefixCls:t,className:a,style:o}):Jm.default.createElement(Yn,{visible:c,motionName:`${t}-loading-icon-motion`,motionAppear:!l,motionEnter:!l,motionLeave:!l,removeOnLeave:!0,onAppearStart:$4,onAppearActive:B4,onEnterStart:$4,onEnterActive:B4,onLeaveStart:B4,onLeaveActive:$4},({className:d,style:p},h)=>{let g={...o,...p};return Jm.default.createElement(sR,{prefixCls:t,className:te(a,d),style:g,ref:h})})},Pie=_ie,lR=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),Nie=e=>{let{componentCls:t,fontSize:r,lineWidth:n,groupBorderColor:a,colorErrorHover:o}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(n).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:r}},lR(`${t}-primary`,a),lR(`${t}-danger`,o)]}},Oie=Nie,JFe=B(_()),lx=(e,t)=>{let{r,g:n,b:a,a:o}=e.toRgb(),l=new ip(e.toRgbString()).onBackground(t).toHsv();return o<=.5?l.v>.5:r*.299+n*.587+a*.114>192},vR=e=>{let{paddingInline:t,onlyIconSize:r,borderColorDisabled:n}=e;return _t(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:r,colorBorderDisabled:n})},bR=e=>{let t=e.contentFontSize??e.fontSize,r=e.contentFontSizeSM??e.fontSize,n=e.contentFontSizeLG??e.fontSizeLG,a=e.contentLineHeight??zm(t),o=e.contentLineHeightSM??zm(r),l=e.contentLineHeightLG??zm(n),c=lx(new op(e.colorBgSolid),"#fff")?"#000":"#fff",d=li.reduce((g,v)=>({...g,[`${v}ShadowColor`]:`0 ${ve(e.controlOutlineWidth)} 0 ${Ud(e[`${v}1`],e.colorBgContainer)}`}),{}),p=e.colorBgContainerDisabled,h=e.colorBgContainerDisabled;return{...d,fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:c,contentFontSize:t,contentFontSizeSM:r,contentFontSizeLG:n,contentLineHeight:a,contentLineHeightSM:o,contentLineHeightLG:l,paddingBlock:Math.max((e.controlHeight-t*a)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-r*o)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-n*l)/2-e.lineWidth,0),defaultBgDisabled:p,dashedBgDisabled:h}},Rie=e=>{let{componentCls:t,antCls:r,lineWidth:n,lineType:a}=e,[o,l]=pn(r,"btn");return{[t]:[{[o("border-width")]:n,[o("border-color")]:"#000",[o("border-color-hover")]:l("border-color"),[o("border-color-active")]:l("border-color"),[o("border-color-disabled")]:l("border-color"),[o("border-style")]:a,[o("text-color")]:"#000",[o("text-color-hover")]:l("text-color"),[o("text-color-active")]:l("text-color"),[o("text-color-disabled")]:l("text-color"),[o("bg-color")]:"#ddd",[o("bg-color-hover")]:l("bg-color"),[o("bg-color-active")]:l("bg-color"),[o("bg-color-disabled")]:e.colorBgContainerDisabled,[o("bg-color-container")]:e.colorBgContainer,[o("shadow")]:"none"},{border:[l("border-width"),l("border-style"),l("border-color")].join(" "),color:l("text-color"),backgroundColor:l("bg-color"),[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:[l("border-width"),l("border-style"),l("border-color-hover")].join(" "),color:l("text-color-hover"),backgroundColor:l("bg-color-hover")},"&:active":{border:[l("border-width"),l("border-style"),l("border-color-active")].join(" "),color:l("text-color-active"),backgroundColor:l("bg-color-active")}}},{[`&${t}-variant-solid`]:{[o("solid-bg-color")]:l("color-base"),[o("solid-bg-color-hover")]:l("color-hover"),[o("solid-bg-color-active")]:l("color-active"),[o("border-color")]:"transparent",[o("text-color")]:e.colorTextLightSolid,[o("bg-color")]:l("solid-bg-color"),[o("bg-color-hover")]:l("solid-bg-color-hover"),[o("bg-color-active")]:l("solid-bg-color-active"),boxShadow:l("shadow")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("border-color")]:l("color-base"),[o("border-color-hover")]:l("color-hover"),[o("border-color-active")]:l("color-active"),[o("bg-color")]:l("bg-color-container"),[o("text-color")]:l("color-base"),[o("text-color-hover")]:l("color-hover"),[o("text-color-active")]:l("color-active"),boxShadow:l("shadow")},[`&${t}-variant-dashed`]:{[o("border-style")]:"dashed",[o("bg-color-disabled")]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[o("border-color")]:"transparent",[o("text-color")]:l("color-base"),[o("bg-color")]:l("color-light"),[o("bg-color-hover")]:l("color-light-hover"),[o("bg-color-active")]:l("color-light-active")},[`&${t}-variant-text, &${t}-variant-link`]:{[o("border-color")]:"transparent",[o("text-color")]:l("color-base"),[o("text-color-hover")]:l("color-hover"),[o("text-color-active")]:l("color-active"),[o("bg-color")]:"transparent",[o("bg-color-hover")]:"transparent",[o("bg-color-active")]:"transparent",[`&:disabled, &${e.componentCls}-disabled`]:{background:"transparent",borderColor:"transparent"}},[`&${t}-variant-text`]:{[o("bg-color-hover")]:l("color-light"),[o("bg-color-active")]:l("color-light-active")}},{[`&${t}-variant-link`]:{[o("color-base")]:e.colorLink,[o("color-hover")]:e.colorLinkHover,[o("color-active")]:e.colorLinkActive,[o("bg-color-hover")]:e.linkHoverBg},[`&${t}-color-primary`]:{[o("color-base")]:e.colorPrimary,[o("color-hover")]:e.colorPrimaryHover,[o("color-active")]:e.colorPrimaryActive,[o("color-light")]:e.colorPrimaryBg,[o("color-light-hover")]:e.colorPrimaryBgHover,[o("color-light-active")]:e.colorPrimaryBorder,[o("shadow")]:e.primaryShadow,[`&${t}-variant-solid`]:{[o("text-color")]:e.primaryColor,[o("text-color-hover")]:l("text-color"),[o("text-color-active")]:l("text-color")}},[`&${t}-color-dangerous`]:{[o("color-base")]:e.colorError,[o("color-hover")]:e.colorErrorHover,[o("color-active")]:e.colorErrorActive,[o("color-light")]:e.colorErrorBg,[o("color-light-hover")]:e.colorErrorBgFilledHover,[o("color-light-active")]:e.colorErrorBgActive,[o("shadow")]:e.dangerShadow,[`&${t}-variant-solid`]:{[o("text-color")]:e.dangerColor,[o("text-color-hover")]:l("text-color"),[o("text-color-active")]:l("text-color")}},[`&${t}-color-default`]:{[o("solid-bg-color")]:e.colorBgSolid,[o("solid-bg-color-hover")]:e.colorBgSolidHover,[o("solid-bg-color-active")]:e.colorBgSolidActive,[o("color-base")]:e.defaultBorderColor,[o("color-hover")]:e.defaultHoverBorderColor,[o("color-active")]:e.defaultActiveBorderColor,[o("color-light")]:e.colorFillTertiary,[o("color-light-hover")]:e.colorFillSecondary,[o("color-light-active")]:e.colorFill,[o("text-color")]:e.defaultColor,[o("text-color-hover")]:e.defaultHoverColor,[o("text-color-active")]:e.defaultActiveColor,[o("shadow")]:e.defaultShadow,[`&${t}-variant-outlined`]:{[o("bg-color-disabled")]:e.defaultBgDisabled},[`&${t}-variant-solid`]:{[o("text-color")]:e.solidTextColor,[o("text-color-hover")]:l("text-color"),[o("text-color-active")]:l("text-color")},[`&${t}-variant-filled, &${t}-variant-text`]:{[o("text-color-hover")]:l("text-color"),[o("text-color-active")]:l("text-color")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("text-color")]:e.defaultColor,[o("text-color-hover")]:e.defaultHoverColor,[o("text-color-active")]:e.defaultActiveColor,[o("bg-color-container")]:e.defaultBg,[o("bg-color-hover")]:e.defaultHoverBg,[o("bg-color-active")]:e.defaultActiveBg},[`&${t}-variant-text`]:{[o("text-color")]:e.textTextColor,[o("text-color-hover")]:e.textTextHoverColor,[o("text-color-active")]:e.textTextActiveColor,[o("bg-color-hover")]:e.textHoverBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("text-color")]:e.defaultGhostColor,[o("border-color")]:e.defaultGhostBorderColor}}}},li.map(c=>{let d=e[`${c}6`],p=e[`${c}1`],h=e[`${c}Hover`],g=e[`${c}2`],v=e[`${c}3`],y=e[`${c}Active`],w=e[`${c}ShadowColor`];return{[`&${t}-color-${c}`]:{[o("color-base")]:d,[o("color-hover")]:h,[o("color-active")]:y,[o("color-light")]:p,[o("color-light-hover")]:g,[o("color-light-active")]:v,[o("shadow")]:w}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",borderColor:e.colorBorderDisabled,background:l("bg-color-disabled"),color:e.colorTextDisabled,boxShadow:"none"}},{[`&${t}-background-ghost`]:{[o("bg-color")]:e.ghostBg,[o("bg-color-hover")]:e.ghostBg,[o("bg-color-active")]:e.ghostBg,[o("shadow")]:"none",[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("bg-color-hover")]:e.ghostBg,[o("bg-color-active")]:e.ghostBg}}}]}},Lie=Rie,zie=e=>{let{componentCls:t,iconCls:r,fontWeight:n,opacityLoading:a,motionDurationSlow:o,motionEaseInOut:l,iconGap:c,calc:d}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:c,alignItems:"center",justifyContent:"center",fontWeight:n,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",...ap(),"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:bv(),[`${t}-icon`]:{display:"inline-flex",alignItems:"center",[r]:{verticalAlign:"middle","&:before":{content:'"\\a0"',display:"inline-block",width:0}}},"> a":{color:"currentColor"},"&:not(:disabled)":Ai(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${r})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"}},[`&${t}-loading`]:{opacity:a,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(p=>`${p} ${o} ${l}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start, &-appear-prepare, &-enter-prepare":{marginInlineEnd:d(c).mul(-1).equal(),opacity:0},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:d(c).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start, &-appear-prepare, &-enter-prepare":{marginInlineStart:d(c).mul(-1).equal(),opacity:0},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:d(c).mul(-1).equal()}}}}}},Hie=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}),j4=(e,t="")=>{let{componentCls:r,controlHeight:n,fontSize:a,borderRadius:o,buttonPaddingHorizontal:l,iconCls:c,buttonPaddingVertical:d,buttonIconOnlyFontSize:p}=e;return[{[t]:{fontSize:a,height:n,padding:`${ve(d)} ${ve(l)}`,borderRadius:o,[`&${r}-icon-only`]:{width:n,[c]:{fontSize:p}}}},{[`${r}${r}-circle${t}`]:Hie(e)},{[`${r}${r}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${r}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},qie=e=>{let t=_t(e,{fontSize:e.contentFontSize});return j4(t,e.componentCls)},Wie=e=>{let t=_t(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return j4(t,`${e.componentCls}-sm`)},Vie=e=>{let t=_t(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return j4(t,`${e.componentCls}-lg`)},Uie=e=>{let{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},Kie=Et("Button",e=>{let t=vR(e);return[zie(t),qie(t),Wie(t),Vie(t),Uie(t),Lie(t),Oie(t)]},bR,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function Gie(e,t,r,n){let{focusElCls:a,focus:o,borderElCls:l}=r,c=l?"> *":"",d=c?` ${c}`:"",p=v=>v.filter(Boolean).map(y=>`&:${y}${d}`).join(","),h=p(["hover",a?`hover${a}`:null]),g=p([o?"focus":null,"active"]);return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{[g]:{zIndex:3},[h]:{zIndex:4},...a?{[`&${a}`]:{zIndex:3}}:{},[`&[disabled] ${c}`]:{zIndex:0}}}}function Xie(e,t,r){let{borderElCls:n}=r,a=n?`> ${n}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${a}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${a}, &${e}-sm ${a}, &${e}-lg ${a}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${a}, &${e}-sm ${a}, &${e}-lg ${a}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function th(e,t={focus:!0}){let{componentCls:r}=e,{componentCls:n}=t,a=n||r,o=`${a}-compact`;return{[o]:{...Gie(e,o,t,a),...Xie(a,o,t)}}}function Yie(e,t,r){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":{"&:focus,&:active":{zIndex:3},"&:hover":{zIndex:4},"&[disabled]":{zIndex:0}}}}function Qie(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function Zie(e){let t=`${e.componentCls}-compact-vertical`;return{[t]:{...Yie(e,t,e.componentCls),...Qie(e.componentCls,t)}}}var Jie=e=>{let{antCls:t,componentCls:r,lineWidth:n,calc:a,colorBgContainer:o}=e,l=`${r}-variant-solid:not([disabled])`,c=a(n).mul(-1).equal(),[d,p]=pn(t,"btn"),h=g=>({[`${r}-compact${g?"-vertical":""}-item`]:{[d("compact-connect-border-color")]:p("bg-color-hover"),[`&${l}`]:{transition:"none",[`& + ${l}:before`]:[{position:"absolute",backgroundColor:p("compact-connect-border-color"),content:'""'},g?{top:c,insetInline:c,height:n}:{insetBlock:c,insetInlineStart:c,width:n}],"&:hover:before":{display:"none"}}}});return[h(),h(!0),{[`${l}${r}-color-default`]:{[d("compact-connect-border-color")]:`color-mix(in srgb, ${p("bg-color-hover")} 75%, ${o})`}}]},eoe=qm(["Button","compact"],e=>{let t=vR(e);return[th(t),Zie(t),Jie(t)]},bR);function toe(e){if(kt(e)){let t=e?.delay;return t=Oa(t)?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}var roe={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},noe=Jn.default.forwardRef((e,t)=>{let{_skipSemantic:r,loading:n=!1,prefixCls:a,color:o,variant:l,type:c,danger:d=!1,shape:p,size:h,disabled:g,className:v,rootClassName:y,children:w,icon:x,iconPosition:k,iconPlacement:F,ghost:C=!1,block:D=!1,htmlType:S="button",classNames:A,styles:I,style:j,autoInsertSpace:$,autoFocus:P,...N}=e,R=Hr(w),U=c||"default",{getPrefixCls:H,direction:q,autoInsertSpace:L,className:O,style:W,classNames:z,styles:Y,loadingIcon:G,shape:Z,color:T,variant:V}=jt("button"),X=p||Z||"default",[Q,re]=(0,Jn.useMemo)(()=>{if(o&&l)return[o,l];if(c||d){let Rt=roe[U]||[];return d?["danger",Rt[1]]:Rt}return l==="solid"?["primary",l]:T&&V?[T,V]:V==="solid"?["primary",V]:["default","outlined"]},[o,l,c,d,T,V,U]),[J,se]=(0,Jn.useMemo)(()=>C&&re==="solid"?[Q,"outlined"]:[Q,re],[Q,re,C]),ue=J==="danger",ae=ue?"dangerous":J,he=$??L??!0,le=H("btn",a),[fe,we]=Kie(le),_e=(0,Jn.useContext)(ci),$e=g??_e,De=(0,Jn.useContext)(hR),Ce=(0,Jn.useMemo)(()=>toe(n),[n]),[qe,Ae]=Nm(Ce.loading),[Be,Me]=(0,Jn.useState)(!1),Ue=(0,Jn.useRef)(null),He=jo(t,Ue),Ie=R.length===1&&!x&&!A4(se),Ne=(0,Jn.useRef)(!0);Jn.default.useEffect(()=>(Ne.current=!1,()=>{Ne.current=!0}),[]),Jt(()=>{Ce.delay>0?Ae(!0,{ms:Ce.delay}):Ae(Ce.loading,!0)},[Ce.delay,Ce.loading]),(0,Jn.useEffect)(()=>{if(!Ue.current||!he)return;let Rt=Ue.current.textContent||"";Ie&&M4(Rt)?Be||Me(!0):Be&&Me(!1)}),(0,Jn.useEffect)(()=>{P&&Ue.current?.focus()},[]);let Je=Jn.default.useCallback(Rt=>{if(qe||$e){Rt.preventDefault();return}e.onClick?.(("href"in e,Rt))},[e.onClick,qe,$e]),{compactSize:gt,compactItemClassnames:et}=tl(le,q),Ve=Rn(Rt=>h??gt??De??Rt),Se=qe?"loading":x,Pe=F??k??"start",dt=wr(N,["navigate"]),at={...e,type:U,color:J,variant:se,danger:ue,shape:X,size:Ve,disabled:$e,loading:qe,iconPlacement:Pe},Ke=lt(W),je=lt(j),[rt,$t]=Tt([r?void 0:z,A],[r?void 0:Y,Ke,I,je],{props:at}),Bt=te(le,fe,we,{[`${le}-${X}`]:X!=="default"&&X!=="square"&&X,[`${le}-${U}`]:U,[`${le}-dangerous`]:d,[`${le}-color-${ae}`]:ae,[`${le}-variant-${se}`]:se,[`${le}-lg`]:Ve==="large",[`${le}-sm`]:Ve==="small",[`${le}-icon-only`]:!w&&w!==0&&!!Se,[`${le}-background-ghost`]:C&&!A4(se),[`${le}-loading`]:qe,[`${le}-two-chinese-chars`]:Be&&he&&!qe,[`${le}-block`]:D,[`${le}-rtl`]:q==="rtl",[`${le}-icon-end`]:Pe==="end"},et,v,y,O,rt.root),Kr={className:rt.icon,style:$t.icon},zt=Rt=>Jn.default.createElement(gR,{prefixCls:le,...Kr},Rt),$r=Jn.default.createElement(Pie,{existIcon:!!x,prefixCls:le,loading:qe,mount:Ne.current,...Kr}),Kt=kt(n)&&n.icon||G,St;x&&!qe?St=zt(x):n&&Kt?St=zt(Kt):St=$r;let nr=ir(w)?Iie(w,Ie&&he,$t.content,rt.content):null;if(dt.href!==void 0)return Jn.default.createElement("a",{...dt,className:te(Bt,{[`${le}-disabled`]:$e}),href:$e?void 0:dt.href,style:$t.root,onClick:Je,ref:He,tabIndex:$e?-1:0,"aria-disabled":$e},St,nr);let Sr=Jn.default.createElement("button",{...N,type:S,className:Bt,style:$t.root,onClick:Je,disabled:$e,ref:He},St,nr,et&&Jn.default.createElement(eoe,{prefixCls:le}));return A4(se)||(Sr=Jn.default.createElement(eh,{component:"Button",disabled:qe},Sr)),Sr}),_4=noe;_4.Group=Tie;_4.__ANT_BUTTON=!0;var Iv=_4;var rl=Iv;function lp(e){return["small","middle","medium","large"].includes(e)}function ux(e){return e?Oa(e):!1}var Mv=B(_()),P4=B(_()),aoe=e=>{let{componentCls:t,borderRadius:r,paddingSM:n,colorBorder:a,paddingXS:o,fontSizeLG:l,fontSizeSM:c,borderRadiusLG:d,borderRadiusSM:p,colorBgContainerDisabled:h,lineWidth:g,lineType:v,antCls:y}=e,[w,x]=pn(y,"space-addon");return{[t]:[{...fr(e),display:"inline-flex",alignItems:"center",gap:0,whiteSpace:"nowrap",paddingInline:n,margin:0,borderWidth:g,borderStyle:v,borderRadius:r,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:l,borderRadius:d},"&-small":{paddingInline:o,borderRadius:p,fontSize:c},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[w("addon-border-color")]:a,[w("addon-background")]:h,[w("addon-border-color-outlined")]:a,[w("addon-background-filled")]:h,borderColor:x("addon-border-color"),background:x("addon-background"),"&-variant-outlined":{[w("addon-border-color")]:x("addon-border-color-outlined")},"&-variant-filled":{[w("addon-border-color")]:"transparent",[w("addon-background")]:x("addon-background-filled"),[`&${t}-disabled`]:{[w("addon-border-color")]:a,[w("addon-background")]:h}},"&-variant-borderless":{border:"none",background:"transparent"},"&-variant-underlined":{border:"none",background:"transparent"}},{"&-status-error":{[w("addon-border-color-outlined")]:e.colorError,[w("addon-background-filled")]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[w("addon-border-color-outlined")]:e.colorWarning,[w("addon-background-filled")]:e.colorWarningBg,color:e.colorWarning}}]}},ioe=Et("Addon",e=>[aoe(e),th(e,{focus:!1})]),ooe=P4.default.forwardRef((e,t)=>{let{className:r,children:n,style:a,prefixCls:o,variant:l="outlined",disabled:c,status:d,...p}=e,{getPrefixCls:h,direction:g}=P4.default.useContext(wt),v=h("space-addon",o),[y,w]=ioe(v),{compactItemClassnames:x,compactSize:k}=tl(v,g),F=rp(v,d),C=te(v,y,x,w,`${v}-variant-${l}`,F,{[`${v}-${k}`]:k,[`${v}-disabled`]:c},r);return P4.default.createElement("div",{ref:t,className:C,style:a,...p},n)}),yR=ooe,soe=B(_()),wR=soe.default.createContext({latestIndex:0}),loe=wR.Provider,Tv=B(_()),uoe=e=>{let{className:t,prefix:r,index:n,children:a,separator:o,style:l,classNames:c,styles:d}=e,{latestIndex:p}=Tv.useContext(wR);return ir(a)?Tv.createElement(Tv.Fragment,null,Tv.createElement("div",{className:t,style:l},a),n<p&&o&&Tv.createElement("span",{className:te(`${r}-item-separator`,c?.separator),style:d?.separator},o)):null},coe=uoe,doe=e=>{let{componentCls:t,antCls:r}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${r}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},poe=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-medium, &-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-medium, &-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},foe=Et("Space",e=>{let t=_t(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[doe(t),poe(t)]},()=>({}),{resetStyle:!1}),moe=Mv.forwardRef((e,t)=>{let{getPrefixCls:r,direction:n,size:a,className:o,style:l,classNames:c,styles:d}=jt("space"),{size:p=a??"small",align:h,className:g,rootClassName:v,children:y,direction:w,orientation:x,prefixCls:k,split:F,separator:C,style:D,vertical:S,wrap:A=!1,classNames:I,styles:j,...$}=e,[P,N]=Array.isArray(p)?p:[p,p],R=lp(N),U=lp(P),H=ux(N),q=ux(P),L=Hr(y,{keepEmpty:!0}),[O,W]=el(x,S,w),z=h===void 0&&!W?"center":h,Y=C??F,G=r("space",k),[Z,T]=foe(G),V={...e,size:p,orientation:O,align:z},X=lt(l),Q=lt(D),[re,J]=Tt([c,I],[d,X,j,Q],{props:V}),se=te(G,o,Z,`${G}-${O}`,{[`${G}-rtl`]:n==="rtl",[`${G}-align-${z}`]:z,[`${G}-gap-row-${N}`]:R,[`${G}-gap-col-${P}`]:U},g,v,T,re.root),ue=te(`${G}-item`,re.item),ae=L.map((fe,we)=>{let _e=fe?.key||`${ue}-${we}`;return Mv.createElement(coe,{prefix:G,classNames:re,styles:J,className:ue,key:_e,index:we,separator:Y,style:J.item},fe)}),he=Mv.useMemo(()=>({latestIndex:L.reduce((fe,we,_e)=>ir(we)?_e:fe,0)}),[L]);if(L.length===0)return null;let le={};return A&&(le.flexWrap="wrap"),!U&&q&&(le.columnGap=P),!R&&H&&(le.rowGap=N),Mv.createElement("div",{ref:t,className:se,style:{...le,...J.root},...$},Mv.createElement(loe,{value:he},ae))}),N4=moe;N4.Compact=Fv;N4.Addon=yR;var O4=N4;var rh=B(_()),hoe=B(_()),cp="RC_FORM_INTERNAL_HOOKS",Nr=()=>{xa(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},goe=hoe.createContext({getFieldValue:Nr,getFieldsValue:Nr,getFieldError:Nr,getFieldWarning:Nr,getFieldsError:Nr,isFieldsTouched:Nr,isFieldTouched:Nr,isFieldValidating:Nr,isFieldsValidating:Nr,resetFields:Nr,setFields:Nr,setFieldValue:Nr,setFieldsValue:Nr,validateFields:Nr,submit:Nr,getInternalHooks:()=>(Nr(),{dispatch:Nr,initEntityValue:Nr,registerField:Nr,useSubscribe:Nr,setInitialValues:Nr,destroyForm:Nr,setCallbacks:Nr,registerWatch:Nr,getFields:Nr,setValidateMessages:Nr,setPreserve:Nr,getInitialValue:Nr})}),dp=goe;function H4(e){return e==null?[]:Array.isArray(e)?e:[e]}function voe(e){return e&&!!e._init}function wn(e){return H4(e)}function xR(e,t){let r={};return t.forEach(n=>{let a=Fi(e,n);r=oi(r,n,a)}),r}function ih(e,t,r=!1){return e&&e.some(n=>mx(t,n,r))}function mx(e,t,r=!1){return!e||!t||!r&&e.length!==t.length?!1:t.every((n,a)=>e[a]===n)}function boe(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||typeof e!="object"||typeof t!="object")return!1;let r=Object.keys(e),n=Object.keys(t);return[...new Set([...r,...n])].every(a=>{let o=e[a],l=t[a];return typeof o=="function"&&typeof l=="function"?!0:o===l})}function yoe(e,...t){let r=t[0];return r&&r.target&&typeof r.target=="object"&&e in r.target?r.target[e]:r}function ER(e,t,r){let{length:n}=e;if(t<0||t>=n||r<0||r>=n)return e;let a=e[t],o=t-r;return o>0?[...e.slice(0,r),a,...e.slice(r,t),...e.slice(t+1,n)]:o<0?[...e.slice(0,t),...e.slice(t+1,r+1),a,...e.slice(r+1,n)]:e}function R4(e){try{return JSON.stringify(e)}catch{return Math.random()}}function woe(...e){let[t,r={}]=e,n=voe(r)?{form:r}:r,a=n.form,[o,l]=(0,rh.useState)(()=>typeof t=="function"?t({}):void 0),c=(0,rh.useMemo)(()=>R4(o),[o]),d=(0,rh.useRef)(c);d.current=c;let p=(0,rh.useContext)(dp),h=a||p,g=h&&h._init,{getFieldsValue:v,getInternalHooks:y}=h,{registerWatch:w}=y(cp),x=xt((F,C)=>{let D=n.preserve?C??v(!0):F??v(),S=typeof t=="function"?t(D):Fi(D,wn(t));R4(o)!==R4(S)&&l(S)}),k=typeof t=="function"?t:JSON.stringify(t);return(0,rh.useEffect)(()=>{g&&x()},[g,k]),(0,rh.useEffect)(()=>g?w((F,C)=>{x(F,C)}):void 0,[g]),o}var IR=woe,xoe=B(_()),uu=B(_()),Eoe=B(_()),koe=Eoe.createContext(null),Ov=koe;function q4(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",tel:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone(){let e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var W4=q4(),Coe=/%[sdj%]/g,Soe=()=>{};typeof process<"u"&&process.env;function V4(e){if(!e||!e.length)return null;let t={};return e.forEach(r=>{let n=r.field;t[n]=t[n]||[],t[n].push(r)}),t}function oo(e,...t){let r=0,n=t.length;return typeof e=="function"?e.apply(null,t):typeof e=="string"?e.replace(Coe,a=>{if(a==="%%")return"%";if(r>=n)return a;switch(a){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch{return"[Circular]"}break;default:return a}}):e}function Foe(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"||e==="tel"}function ea(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||Foe(t)&&typeof e=="string"&&!e)}function Doe(e,t,r){let n=[],a=0,o=e.length;function l(c){n.push(...c||[]),a++,a===o&&r(n)}e.forEach(c=>{t(c,l)})}function kR(e,t,r){let n=0,a=e.length;function o(l){if(l&&l.length){r(l);return}let c=n;n=n+1,c<a?t(e[c],o):r([])}o([])}function Aoe(e){let t=[];return Object.keys(e).forEach(r=>{t.push(...e[r]||[])}),t}var CR=class extends Error{constructor(e,t){super("Async Validation Error"),oe(this,"errors"),oe(this,"fields"),this.errors=e,this.fields=t}};function $oe(e,t,r,n,a){if(t.first){let g=new Promise((v,y)=>{let w=k=>(n(k),k.length?y(new CR(k,V4(k))):v(a)),x=Aoe(e);kR(x,r,w)});return g.catch(v=>v),g}let o=t.firstFields===!0?Object.keys(e):t.firstFields||[],l=Object.keys(e),c=l.length,d=0,p=[],h=new Promise((g,v)=>{let y=w=>{if(p.push.apply(p,w),d++,d===c)return n(p),p.length?v(new CR(p,V4(p))):g(a)};l.length||(n(p),g(a)),l.forEach(w=>{let x=e[w];o.indexOf(w)!==-1?kR(x,r,y):Doe(x,r,y)})});return h.catch(g=>g),h}function Boe(e){return!!(e&&e.message!==void 0)}function Ioe(e,t){let r=e;for(let n=0;n<t.length;n++){if(r==null)return r;r=r[t[n]]}return r}function SR(e,t){return r=>{let n;return e.fullFields?n=Ioe(t,e.fullFields):n=t[r.field||e.fullField],Boe(r)?(r.field=r.field||e.fullField,r.fieldValue=n,r):{message:typeof r=="function"?r():r,fieldValue:n,field:r.field||e.fullField}}}function FR(e,t){if(t){for(let r in t)if(t.hasOwnProperty(r)){let n=t[r];typeof n=="object"&&typeof e[r]=="object"?e[r]={...e[r],...n}:e[r]=n}}return e}var nh="enum",Moe=(e,t,r,n,a)=>{e[nh]=Array.isArray(e[nh])?e[nh]:[],e[nh].indexOf(t)===-1&&n.push(oo(a.messages[nh],e.fullField,e[nh].join(", ")))},Toe=Moe,joe=(e,t,r,n,a)=>{e.pattern&&(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||n.push(oo(a.messages.pattern.mismatch,e.fullField,t,e.pattern))):typeof e.pattern=="string"&&(new RegExp(e.pattern).test(t)||n.push(oo(a.messages.pattern.mismatch,e.fullField,t,e.pattern))))},_oe=joe,Poe=(e,t,r,n,a)=>{let o=typeof e.len=="number",l=typeof e.min=="number",c=typeof e.max=="number",d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,p=t,h=null,g=typeof t=="number",v=typeof t=="string",y=Array.isArray(t);if(g?h="number":v?h="string":y&&(h="array"),!h)return!1;y&&(p=t.length),v&&(p=t.replace(d,"_").length),o?p!==e.len&&n.push(oo(a.messages[h].len,e.fullField,e.len)):l&&!c&&p<e.min?n.push(oo(a.messages[h].min,e.fullField,e.min)):c&&!l&&p>e.max?n.push(oo(a.messages[h].max,e.fullField,e.max)):l&&c&&(p<e.min||p>e.max)&&n.push(oo(a.messages[h].range,e.fullField,e.min,e.max))},Noe=Poe,Ooe=(e,t,r,n,a,o)=>{e.required&&(!r.hasOwnProperty(e.field)||ea(t,o||e.type))&&n.push(oo(a.messages.required,e.fullField))},MR=Ooe,cx,Roe=(()=>{if(cx)return cx;let e="[a-fA-F\\d:]",t=w=>w&&w.includeBoundaries?`(?:(?<=\\s|^)(?=${e})|(?<=${e})(?=\\s|$))`:"",r="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",n="[a-fA-F\\d]{1,4}",a=`(?:${[`(?:${n}:){7}(?:${n}|:)`,`(?:${n}:){6}(?:${r}|:${n}|:)`,`(?:${n}:){5}(?::${r}|(?::${n}){1,2}|:)`,`(?:${n}:){4}(?:(?::${n}){0,1}:${r}|(?::${n}){1,3}|:)`,`(?:${n}:){3}(?:(?::${n}){0,2}:${r}|(?::${n}){1,4}|:)`,`(?:${n}:){2}(?:(?::${n}){0,3}:${r}|(?::${n}){1,5}|:)`,`(?:${n}:){1}(?:(?::${n}){0,4}:${r}|(?::${n}){1,6}|:)`,`(?::(?:(?::${n}){0,5}:${r}|(?::${n}){1,7}|:))`].join("|")})(?:%[0-9a-zA-Z]{1,})?`,o=new RegExp(`(?:^${r}$)|(?:^${a}$)`),l=new RegExp(`^${r}$`),c=new RegExp(`^${a}$`),d=w=>w&&w.exact?o:new RegExp(`(?:${t(w)}${r}${t(w)})|(?:${t(w)}${a}${t(w)})`,"g");d.v4=w=>w&&w.exact?l:new RegExp(`${t(w)}${r}${t(w)}`,"g"),d.v6=w=>w&&w.exact?c:new RegExp(`${t(w)}${a}${t(w)}`,"g");let p="(?:(?:[a-z]+:)?//)",h="(?:\\S+(?::\\S*)?@)?",g=d.v4().source,v=d.v6().source,y=`(?:${p}|www\\.)${h}(?:localhost|${g}|${v}|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?`;return cx=new RegExp(`(?:^${y}$)`,"i"),cx}),L4={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,tel:/^(\+[0-9]{1,3}[-\s\u2011]?)?(\([0-9]{1,4}\)[-\s\u2011]?)?([0-9]+[-\s\u2011]?)*[0-9]+$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},_v={integer(e){return _v.number(e)&&parseInt(e,10)===e},float(e){return _v.number(e)&&!_v.integer(e)},array(e){return Array.isArray(e)},regexp(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number(e){return isNaN(e)?!1:typeof e=="number"},object(e){return typeof e=="object"&&!_v.array(e)},method(e){return typeof e=="function"},email(e){return typeof e=="string"&&e.length<=320&&!!e.match(L4.email)},tel(e){return typeof e=="string"&&e.length<=32&&!!e.match(L4.tel)},url(e){return typeof e=="string"&&e.length<=2048&&!!e.match(Roe())},hex(e){return typeof e=="string"&&!!e.match(L4.hex)}},Loe=(e,t,r,n,a)=>{if(e.required&&t===void 0){MR(e,t,r,n,a);return}let o=["integer","float","array","regexp","object","method","email","tel","number","date","url","hex"],l=e.type;o.indexOf(l)>-1?_v[l](t)||n.push(oo(a.messages.types[l],e.fullField,e.type)):l&&typeof t!==e.type&&n.push(oo(a.messages.types[l],e.fullField,e.type))},zoe=Loe,Hoe=(e,t,r,n,a)=>{(/^\s+$/.test(t)||t==="")&&n.push(oo(a.messages.whitespace,e.fullField))},qoe=Hoe,tr={required:MR,whitespace:qoe,type:zoe,range:Noe,enum:Toe,pattern:_oe},Woe=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(ea(t)&&!e.required)return r();tr.required(e,t,n,o,a)}r(o)},Voe=Woe,Uoe=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(t==null&&!e.required)return r();tr.required(e,t,n,o,a,"array"),t!=null&&(tr.type(e,t,n,o,a),tr.range(e,t,n,o,a))}r(o)},Koe=Uoe,Goe=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(ea(t)&&!e.required)return r();tr.required(e,t,n,o,a),t!==void 0&&tr.type(e,t,n,o,a)}r(o)},Xoe=Goe,Yoe=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(ea(t,"date")&&!e.required)return r();if(tr.required(e,t,n,o,a),!ea(t,"date")){let l;t instanceof Date?l=t:l=new Date(t),tr.type(e,l,n,o,a),l&&tr.range(e,l.getTime(),n,o,a)}}r(o)},Qoe=Yoe,Zoe="enum",Joe=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(ea(t)&&!e.required)return r();tr.required(e,t,n,o,a),t!==void 0&&tr[Zoe](e,t,n,o,a)}r(o)},ese=Joe,tse=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(ea(t)&&!e.required)return r();tr.required(e,t,n,o,a),t!==void 0&&(tr.type(e,t,n,o,a),tr.range(e,t,n,o,a))}r(o)},rse=tse,nse=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(ea(t)&&!e.required)return r();tr.required(e,t,n,o,a),t!==void 0&&(tr.type(e,t,n,o,a),tr.range(e,t,n,o,a))}r(o)},ase=nse,ise=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(ea(t)&&!e.required)return r();tr.required(e,t,n,o,a),t!==void 0&&tr.type(e,t,n,o,a)}r(o)},ose=ise,sse=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(t===""&&(t=void 0),ea(t)&&!e.required)return r();tr.required(e,t,n,o,a),t!==void 0&&(tr.type(e,t,n,o,a),tr.range(e,t,n,o,a))}r(o)},lse=sse,use=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(ea(t)&&!e.required)return r();tr.required(e,t,n,o,a),t!==void 0&&tr.type(e,t,n,o,a)}r(o)},cse=use,dse=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(ea(t,"string")&&!e.required)return r();tr.required(e,t,n,o,a),ea(t,"string")||tr.pattern(e,t,n,o,a)}r(o)},pse=dse,fse=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(ea(t)&&!e.required)return r();tr.required(e,t,n,o,a),ea(t)||tr.type(e,t,n,o,a)}r(o)},mse=fse,hse=(e,t,r,n,a)=>{let o=[],l=Array.isArray(t)?"array":typeof t;tr.required(e,t,n,o,a,l),r(o)},gse=hse,vse=(e,t,r,n,a)=>{let o=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(ea(t,"string")&&!e.required)return r();tr.required(e,t,n,o,a,"string"),ea(t,"string")||(tr.type(e,t,n,o,a),tr.range(e,t,n,o,a),tr.pattern(e,t,n,o,a),e.whitespace===!0&&tr.whitespace(e,t,n,o,a))}r(o)},bse=vse,yse=(e,t,r,n,a)=>{let o=e.type,l=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(ea(t,o)&&!e.required)return r();tr.required(e,t,n,l,a,o),ea(t,o)||tr.type(e,t,n,l,a)}r(l)},dx=yse,Nv={string:bse,method:ose,number:lse,boolean:Xoe,regexp:mse,integer:ase,float:rse,array:Koe,object:cse,enum:ese,pattern:pse,date:Qoe,url:dx,hex:dx,email:dx,tel:dx,required:gse,any:Voe},Pv=class U4{constructor(t){oe(this,"rules",null),oe(this,"_messages",W4),this.define(t)}define(t){if(!t)throw new Error("Cannot configure a schema with no rules");if(typeof t!="object"||Array.isArray(t))throw new Error("Rules must be an object");this.rules={},Object.keys(t).forEach(r=>{let n=t[r];this.rules[r]=Array.isArray(n)?n:[n]})}messages(t){return t&&(this._messages=FR(q4(),t)),this._messages}validate(t,r={},n=()=>{}){let a=t,o=r,l=n;if(typeof o=="function"&&(l=o,o={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(null,a),Promise.resolve(a);function c(h){let g=[],v={};function y(w){Array.isArray(w)?g=g.concat(...w):g.push(w)}for(let w=0;w<h.length;w++)y(h[w]);g.length?(v=V4(g),l(g,v)):l(null,a)}if(o.messages){let h=this.messages();h===W4&&(h=q4()),FR(h,o.messages),o.messages=h}else o.messages=this.messages();let d={};(o.keys||Object.keys(this.rules)).forEach(h=>{let g=this.rules[h],v=a[h];g.forEach(y=>{let w=y;typeof w.transform=="function"&&(a===t&&(a={...a}),v=a[h]=w.transform(v),v!=null&&(w.type=w.type||(Array.isArray(v)?"array":typeof v))),typeof w=="function"?w={validator:w}:w={...w},w.validator=this.getValidationMethod(w),w.validator&&(w.field=h,w.fullField=w.fullField||h,w.type=this.getType(w),d[h]=d[h]||[],d[h].push({rule:w,value:v,source:a,field:h}))})});let p={};return $oe(d,o,(h,g)=>{let v=h.rule,y=(v.type==="object"||v.type==="array")&&(typeof v.fields=="object"||typeof v.defaultField=="object");y=y&&(v.required||!v.required&&h.value),v.field=h.field;function w(F,C){return{...C,fullField:`${v.fullField}.${F}`,fullFields:v.fullFields?[...v.fullFields,F]:[F]}}function x(F=[]){let C=Array.isArray(F)?F:[F];!o.suppressWarning&&C.length&&U4.warning("async-validator:",C),C.length&&v.message!==void 0&&v.message!==null&&(C=[].concat(v.message));let D=C.map(SR(v,a));if(o.first&&D.length)return p[v.field]=1,g(D);if(!y)g(D);else{if(v.required&&!h.value)return v.message!==void 0?D=[].concat(v.message).map(SR(v,a)):o.error&&(D=[o.error(v,oo(o.messages.required,v.field))]),g(D);let S={};v.defaultField&&Object.keys(h.value).map(j=>{S[j]=v.defaultField}),S={...S,...h.rule.fields};let A={};Object.keys(S).forEach(j=>{let $=S[j],P=Array.isArray($)?$:[$];A[j]=P.map(w.bind(null,j))});let I=new U4(A);I.messages(o.messages),h.rule.options&&(h.rule.options.messages=o.messages,h.rule.options.error=o.error),I.validate(h.value,h.rule.options||o,j=>{let $=[];D&&D.length&&$.push(...D),j&&j.length&&$.push(...j),g($.length?$:null)})}}let k;if(v.asyncValidator)k=v.asyncValidator(v,h.value,x,h.source,o);else if(v.validator){try{k=v.validator(v,h.value,x,h.source,o)}catch(F){console.error?.(F),o.suppressValidatorError||setTimeout(()=>{throw F},0),x(F.message)}k===!0?x():k===!1?x(typeof v.message=="function"?v.message(v.fullField||v.field):v.message||`${v.fullField||v.field} fails`):k instanceof Array?x(k):k instanceof Error&&x(k.message)}k&&k.then&&k.then(()=>x(),F=>x(F))},h=>{c(h)},a)}getType(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!Nv.hasOwnProperty(t.type))throw new Error(oo("Unknown rule type %s",t.type));return t.type||"string"}getValidationMethod(t){if(typeof t.validator=="function")return t.validator;let r=Object.keys(t),n=r.indexOf("message");return n!==-1&&r.splice(n,1),r.length===1&&r[0]==="required"?Nv.required:Nv[this.getType(t)]||void 0}};oe(Pv,"register",function(e,t){if(typeof t!="function")throw new Error("Cannot register a validator by type, validator is not a function");Nv[e]=t}),oe(Pv,"warning",Soe),oe(Pv,"messages",W4),oe(Pv,"validators",Nv);var wse=Pv,xse=wse,DR=B(_()),Bi="'${name}' is not a valid ${type}",TR={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Bi,method:Bi,array:Bi,object:Bi,number:Bi,date:Bi,boolean:Bi,integer:Bi,float:Bi,regexp:Bi,email:Bi,tel:Bi,url:Bi,hex:Bi},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},AR=xse;function Ese(e,t){return e.replace(/\\?\$\{\w+\}/g,r=>{if(r.startsWith("\\"))return r.slice(1);let n=r.slice(2,-1);return t[n]})}var $R="CODE_LOGIC_ERROR";async function K4(e,t,r,n,a){let o={...r};if(delete o.ruleIndex,AR.warning=()=>{},o.validator){let g=o.validator;o.validator=(...v)=>{try{return g(...v)}catch(y){return console.error(y),Promise.reject($R)}}}let l=null;o&&o.type==="array"&&o.defaultField&&(l=o.defaultField,delete o.defaultField);let c=new AR({[e]:[o]}),d=wc(TR,n.validateMessages);c.messages(d);let p=[];try{await Promise.resolve(c.validate({[e]:t},{...n}))}catch(g){g.errors&&(p=g.errors.map(({message:v},y)=>{let w=v===$R?d.default:v;return DR.isValidElement(w)?DR.cloneElement(w,{key:`error_${y}`}):w}))}if(!p.length&&l&&Array.isArray(t)&&t.length>0)return(await Promise.all(t.map((g,v)=>K4(`${e}.${v}`,g,l,n,a)))).reduce((g,v)=>[...g,...v],[]);let h={...r,name:e,enum:(r.enum||[]).join(", "),...a};return p.map(g=>typeof g=="string"?Ese(g,h):g)}function kse(e,t,r,n,a,o){let l=e.join("."),c=r.map((p,h)=>{let g=p.validator,v={...p,ruleIndex:h};return g&&(v.validator=(y,w,x)=>{let k=!1,F=g(y,w,(...C)=>{Promise.resolve().then(()=>{xa(!k,"Your validator function has already return a promise. `callback` will be ignored."),k||x(...C)})});k=F&&typeof F.then=="function"&&typeof F.catch=="function",xa(k,"`callback` is deprecated. Please return a promise instead."),k&&F.then(()=>{x()}).catch(C=>{x(C||" ")})}),v}).sort(({warningOnly:p,ruleIndex:h},{warningOnly:g,ruleIndex:v})=>!!p==!!g?h-v:p?1:-1),d;if(a===!0)d=new Promise(async(p,h)=>{for(let g=0;g<c.length;g+=1){let v=c[g],y=await K4(l,t,v,n,o);if(y.length){h([{errors:y,rule:v}]);return}}p([])});else{let p=c.map(h=>K4(l,t,h,n,o).then(g=>({errors:g,rule:h})));d=(a?Sse(p):Cse(p)).then(h=>Promise.reject(h))}return d.catch(p=>p),d}async function Cse(e){return Promise.all(e).then(t=>[].concat(...t))}async function Sse(e){let t=0;return new Promise(r=>{e.forEach(n=>{n.then(a=>{a.errors.length&&r([a]),t+=1,t===e.length&&r([])})})})}var jR=e=>{let t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},Fse=class{constructor(e){oe(this,"namePathList",[]),oe(this,"taskId",0),oe(this,"watcherList",new Set),oe(this,"form"),this.form=e}register(e){return this.watcherList.add(e),()=>{this.watcherList.delete(e)}}notify(e){e.forEach(t=>{this.namePathList.every(r=>!mx(r,t))&&this.namePathList.push(t)}),this.doBatch()}doBatch(){this.taskId+=1;let e=this.taskId;jR(()=>{if(e===this.taskId&&this.watcherList.size){let t=this.form.getForm(),r=t.getFieldsValue(),n=t.getFieldsValue(!0);this.watcherList.forEach(a=>{a(r,n,this.namePathList)}),this.namePathList=[]}})}};async function Dse(){return new Promise(e=>{jR(()=>{pr(()=>{e()})})})}function G4(){return G4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},G4.apply(this,arguments)}var up=[],jv=[];function z4(e,t,r,n,a,o){return typeof e=="function"?e(t,r,"source"in o?{source:o.source}:{}):n!==a}var _R=class extends uu.PureComponent{constructor(e){if(super(e),oe(this,"state",{resetCount:0}),oe(this,"cancelRegisterFunc",null),oe(this,"mounted",!1),oe(this,"touched",!1),oe(this,"dirty",!1),oe(this,"validatePromise"),oe(this,"prevValidating"),oe(this,"errors",up),oe(this,"warnings",jv),oe(this,"cancelRegister",()=>{let{preserve:t,isListField:r,name:n}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(r,t,wn(n)),this.cancelRegisterFunc=null}),oe(this,"getNamePath",()=>{let{name:t,fieldContext:r}=this.props,{prefixName:n=[]}=r;return t!==void 0?[...n,...t]:[]}),oe(this,"getRules",()=>{let{rules:t=[],fieldContext:r}=this.props;return t.map(n=>typeof n=="function"?n(r):n)}),oe(this,"refresh",()=>{this.mounted&&this.setState(({resetCount:t})=>({resetCount:t+1}))}),oe(this,"metaCache",null),oe(this,"triggerMetaEvent",t=>{let{onMetaChange:r}=this.props;if(r){let n={...this.getMeta(),destroy:t};yc(this.metaCache,n)||r(n),this.metaCache=n}else this.metaCache=null}),oe(this,"onStoreChange",(t,r,n)=>{let{shouldUpdate:a,dependencies:o=[],onReset:l}=this.props,{store:c}=n,d=this.getNamePath(),p=this.getValue(t),h=this.getValue(c),g=r&&ih(r,d);switch(n.type==="valueUpdate"&&n.source==="external"&&!yc(p,h)&&(this.touched=!0,this.dirty=!0,this.validatePromise=null,this.errors=up,this.warnings=jv,this.triggerMetaEvent()),n.type){case"reset":if(!r||g){this.touched=!1,this.dirty=!1,this.validatePromise=void 0,this.errors=up,this.warnings=jv,this.triggerMetaEvent(),l?.(),this.refresh();return}break;case"remove":{if(a&&z4(a,t,c,p,h,n)){this.reRender();return}break}case"setField":{let{data:v}=n;if(g){"touched"in v&&(this.touched=v.touched),"validating"in v&&!("originRCField"in v)&&(this.validatePromise=v.validating?Promise.resolve([]):null),"errors"in v&&(this.errors=v.errors||up),"warnings"in v&&(this.warnings=v.warnings||jv),this.dirty=!0,this.triggerMetaEvent(),this.reRender();return}else if("value"in v&&ih(r,d,!0)){this.reRender();return}if(a&&!d.length&&z4(a,t,c,p,h,n)){this.reRender();return}break}case"dependenciesUpdate":{if(o.map(wn).some(v=>ih(n.relatedFields,v))){this.reRender();return}break}default:if(g||(!o.length||d.length||a)&&z4(a,t,c,p,h,n)){this.reRender();return}break}a===!0&&this.reRender()}),oe(this,"validateRules",t=>{let r=this.getNamePath(),n=this.getValue(),{triggerName:a,validateOnly:o=!1,delayFrame:l}=t||{},c=Promise.resolve().then(async()=>{if(!this.mounted)return[];let{validateFirst:d=!1,messageVariables:p,validateDebounce:h}=this.props;l&&await Dse();let g=this.getRules();if(a&&(g=g.filter(y=>y).filter(y=>{let{validateTrigger:w}=y;return w?H4(w).includes(a):!0})),h&&a&&(await new Promise(y=>{setTimeout(y,h)}),this.validatePromise!==c))return[];let v=kse(r,n,g,t,d,p);return v.catch(y=>y).then((y=up)=>{if(this.validatePromise===c){this.validatePromise=null;let w=[],x=[];y.forEach?.(({rule:{warningOnly:k},errors:F=up})=>{k?x.push(...F):w.push(...F)}),this.errors=w,this.warnings=x,this.triggerMetaEvent(),this.reRender()}}),v});return o||(this.validatePromise=c,this.dirty=!0,this.errors=up,this.warnings=jv,this.triggerMetaEvent(),this.reRender()),c}),oe(this,"isFieldValidating",()=>!!this.validatePromise),oe(this,"isFieldTouched",()=>this.touched),oe(this,"isFieldDirty",()=>{if(this.dirty||this.props.initialValue!==void 0)return!0;let{fieldContext:t}=this.props,{getInitialValue:r}=t.getInternalHooks(cp);return r(this.getNamePath())!==void 0}),oe(this,"getErrors",()=>this.errors),oe(this,"getWarnings",()=>this.warnings),oe(this,"isListField",()=>this.props.isListField),oe(this,"isList",()=>this.props.isList),oe(this,"isPreserve",()=>this.props.preserve),oe(this,"getMeta",()=>(this.prevValidating=this.isFieldValidating(),{touched:this.isFieldTouched(),validating:this.prevValidating,errors:this.errors,warnings:this.warnings,name:this.getNamePath(),validated:this.validatePromise===null})),oe(this,"getOnlyChild",t=>{if(typeof t=="function"){let n=this.getMeta();return{...this.getOnlyChild(t(this.getControlled(),n,this.props.fieldContext)),isFunction:!0}}let r=Hr(t);return r.length!==1||!uu.isValidElement(r[0])?{child:r,isFunction:!1}:{child:r[0],isFunction:!1}}),oe(this,"getValue",t=>{let{getFieldsValue:r}=this.props.fieldContext,n=this.getNamePath();return Fi(t||r(!0),n)}),oe(this,"getControlled",(t={})=>{let{name:r,trigger:n="onChange",validateTrigger:a,getValueFromEvent:o,normalize:l,valuePropName:c="value",getValueProps:d,fieldContext:p}=this.props,h=a!==void 0?a:p.validateTrigger,g=this.getNamePath(),{getInternalHooks:v,getFieldsValue:y}=p,{dispatch:w}=v(cp),x=this.getValue(),k=d||(S=>({[c]:S})),F=t[n],C=r!==void 0?k(x):{},D={...t,...C};return D[n]=(...S)=>{this.touched=!0,this.dirty=!0,this.triggerMetaEvent();let A=this.getValue(),I;o?I=o(...S):I=yoe(c,...S),l&&(I=l(I,A,y(!0))),I!==A&&w({type:"updateValue",namePath:g,value:I}),F&&F(...S)},H4(h||[]).forEach(S=>{let A=D[S];D[S]=(...I)=>{A&&A(...I);let{rules:j}=this.props;j&&j.length&&w({type:"validateField",namePath:g,triggerName:S})}}),D}),e.fieldContext){let{getInternalHooks:t}=e.fieldContext,{initEntityValue:r}=t(cp);r(this)}}componentDidMount(){let{shouldUpdate:e,fieldContext:t}=this.props;if(this.mounted=!0,t){let{getInternalHooks:r}=t,{registerField:n}=r(cp);this.cancelRegisterFunc=n(this)}e===!0&&this.reRender()}componentWillUnmount(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}reRender(){this.mounted&&this.forceUpdate()}render(){let{resetCount:e}=this.state,{children:t}=this.props,{child:r,isFunction:n}=this.getOnlyChild(t),a;return n?a=r:uu.isValidElement(r)?a=uu.cloneElement(r,this.getControlled(r.props)):(xa(!r,"`children` of Field is not validate ReactElement."),a=r),uu.createElement(uu.Fragment,{key:e},a)}};oe(_R,"contextType",dp);function Ase({name:e,...t}){let r=uu.useContext(dp),n=uu.useContext(Ov),a=e!==void 0?wn(e):void 0,o=t.isListField??!!n,l="keep";return o||(l=`_${(a||[]).join("_")}`),uu.createElement(_R,G4({key:l,name:a,isListField:o},t,{fieldContext:r}))}var Z4=Ase,lu=B(_());function $se({name:e,initialValue:t,children:r,rules:n,validateTrigger:a,isListField:o}){let l=lu.useContext(dp),c=lu.useContext(Ov),d=lu.useRef({keys:[],id:0}).current,p=lu.useMemo(()=>[...wn(l.prefixName)||[],...wn(e)],[l.prefixName,e]),h=lu.useMemo(()=>({...l,prefixName:p}),[l,p]),g=lu.useMemo(()=>({getKey:y=>{let w=p.length,x=y[w];return[d.keys[x],y.slice(w+1)]}}),[d,p]);if(typeof r!="function")return xa(!1,"Form.List only accepts function as children."),null;let v=(y,w,{source:x})=>x==="internal"?!1:y!==w;return lu.createElement(Ov.Provider,{value:g},lu.createElement(dp.Provider,{value:h},lu.createElement(Z4,{name:[],shouldUpdate:v,rules:n,validateTrigger:a,initialValue:t,isList:!0,isListField:o??!!c},({value:y=[],onChange:w},x)=>{let{getFieldValue:k}=l,F=()=>k(p||[])||[],C={add:(S,A)=>{let I=F();A>=0&&A<=I.length?(d.keys=[...d.keys.slice(0,A),d.id,...d.keys.slice(A)],w([...I.slice(0,A),S,...I.slice(A)])):(d.keys=[...d.keys,d.id],w([...I,S])),d.id+=1},remove:S=>{let A=F(),I=new Set(Array.isArray(S)?S:[S]);I.size<=0||(d.keys=d.keys.filter((j,$)=>!I.has($)),w(A.filter((j,$)=>!I.has($))))},move(S,A){if(S===A)return;let I=F();S<0||S>=I.length||A<0||A>=I.length||(d.keys=ER(d.keys,S,A),w(ER(I,S,A)))}},D=y||[];return Array.isArray(D)||(D=[]),r(D.map((S,A)=>{let I=d.keys[A];return I===void 0&&(d.keys[A]=d.id,I=d.keys[A],d.id+=1),{name:A,key:I,isListField:!0}}),C,x)})))}var PR=$se,BR=B(_());function Bse(e){let t=!1,r=e.length,n=[];return e.length?new Promise((a,o)=>{e.forEach((l,c)=>{l.catch(d=>(t=!0,d)).then(d=>{r-=1,n[c]=d,!(r>0)&&(t&&o(n),a(n))})})}):Promise.resolve([])}var X4="__@field_split__";function px(e){return e.map(t=>`${typeof t}:${t}`).join(X4)}var Ise=class{constructor(){oe(this,"kvs",new Map)}set(e,t){this.kvs.set(px(e),t)}get(e){return this.kvs.get(px(e))}getAsPrefix(e){let t=px(e),r=t+X4,n=[],a=this.kvs.get(t);return a!==void 0&&n.push(a),this.kvs.forEach((o,l)=>{l.startsWith(r)&&n.push(o)}),n}update(e,t){let r=this.get(e),n=t(r);n?this.set(e,n):this.delete(e)}delete(e){this.kvs.delete(px(e))}map(e){return[...this.kvs.entries()].map(([t,r])=>{let n=t.split(X4);return e({key:n.map(a=>{let[,o,l]=a.match(/^([^:]*):(.*)$/);return o==="number"?Number(l):l}),value:r})})}toJSON(){let e={};return this.map(({key:t,value:r})=>(e[t.join(".")]=r,null)),e}},ah=Ise,Mse=class{constructor(e){oe(this,"formHooked",!1),oe(this,"forceRootUpdate"),oe(this,"subscribable",!0),oe(this,"store",{}),oe(this,"fieldEntities",[]),oe(this,"initialValues",{}),oe(this,"callbacks",{}),oe(this,"validateMessages",null),oe(this,"preserve",null),oe(this,"lastValidatePromise",null),oe(this,"watcherCenter",new Fse(this)),oe(this,"getForm",()=>({getFieldValue:this.getFieldValue,getFieldsValue:this.getFieldsValue,getFieldError:this.getFieldError,getFieldWarning:this.getFieldWarning,getFieldsError:this.getFieldsError,isFieldsTouched:this.isFieldsTouched,isFieldTouched:this.isFieldTouched,isFieldValidating:this.isFieldValidating,isFieldsValidating:this.isFieldsValidating,resetFields:this.resetFields,setFields:this.setFields,setFieldValue:this.setFieldValue,setFieldsValue:this.setFieldsValue,validateFields:this.validateFields,submit:this.submit,_init:!0,getInternalHooks:this.getInternalHooks})),oe(this,"getInternalHooks",t=>t===cp?(this.formHooked=!0,{dispatch:this.dispatch,initEntityValue:this.initEntityValue,registerField:this.registerField,useSubscribe:this.useSubscribe,setInitialValues:this.setInitialValues,destroyForm:this.destroyForm,setCallbacks:this.setCallbacks,setValidateMessages:this.setValidateMessages,getFields:this.getFields,setPreserve:this.setPreserve,getInitialValue:this.getInitialValue,registerWatch:this.registerWatch}):(xa(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)),oe(this,"useSubscribe",t=>{this.subscribable=t}),oe(this,"prevWithoutPreserves",null),oe(this,"setInitialValues",(t,r)=>{if(this.initialValues=t||{},r){let n=wc(t,this.store);this.prevWithoutPreserves?.map(({key:a})=>{n=oi(n,a,Fi(t,a))}),this.prevWithoutPreserves=null,this.updateStore(n)}}),oe(this,"destroyForm",t=>{if(t)this.updateStore({});else{let r=new ah;this.getFieldEntities(!0).forEach(n=>{this.isMergedPreserve(n.isPreserve())||r.set(n.getNamePath(),!0)}),this.prevWithoutPreserves=r}}),oe(this,"getInitialValue",t=>{let r=Fi(this.initialValues,t);return t.length?wc(r):r}),oe(this,"setCallbacks",t=>{this.callbacks=t}),oe(this,"setValidateMessages",t=>{this.validateMessages=t}),oe(this,"setPreserve",t=>{this.preserve=t}),oe(this,"registerWatch",t=>this.watcherCenter.register(t)),oe(this,"notifyWatch",(t=[])=>{this.watcherCenter.notify(t)}),oe(this,"timeoutId",null),oe(this,"warningUnhooked",()=>{}),oe(this,"updateStore",t=>{this.store=t}),oe(this,"getFieldEntities",(t=!1)=>t?this.fieldEntities.filter(r=>r.getNamePath().length):this.fieldEntities),oe(this,"getFieldsMap",(t=!1)=>{let r=new ah;return this.getFieldEntities(t).forEach(n=>{let a=n.getNamePath();r.set(a,n)}),r}),oe(this,"getFieldEntitiesForNamePathList",(t,r=!1)=>{if(!t)return this.getFieldEntities(!0);let n=this.getFieldsMap(!0);return r?t.flatMap(a=>{let o=wn(a),l=n.getAsPrefix(o);return l.length?l:[{INVALIDATE_NAME_PATH:o}]}):t.map(a=>{let o=wn(a);return n.get(o)||{INVALIDATE_NAME_PATH:wn(a)}})}),oe(this,"getFieldsValue",(t,r)=>{this.warningUnhooked();let n,a;if(t===!0||Array.isArray(t)?(n=t,a=r):t&&typeof t=="object"&&(a=t.filter),n===!0&&!a)return this.store;let o=this.getFieldEntitiesForNamePathList(Array.isArray(n)?n:null,!0),l=[],c=[];o.forEach(p=>{let h=p.INVALIDATE_NAME_PATH||p.getNamePath();if(p.isList?.()){c.push(h);return}if(!a)l.push(h);else{let g="getMeta"in p?p.getMeta():null;a(g)&&l.push(h)}});let d=xR(this.store,l.map(wn));return c.forEach(p=>{Fi(d,p)||(d=oi(d,p,[]))}),d}),oe(this,"getFieldValue",t=>{this.warningUnhooked();let r=wn(t);return Fi(this.store,r)}),oe(this,"getFieldsError",t=>(this.warningUnhooked(),this.getFieldEntitiesForNamePathList(t).map((r,n)=>r&&!r.INVALIDATE_NAME_PATH?{name:r.getNamePath(),errors:r.getErrors(),warnings:r.getWarnings()}:{name:wn(t[n]),errors:[],warnings:[]}))),oe(this,"getFieldError",t=>{this.warningUnhooked();let r=wn(t);return this.getFieldsError([r])[0].errors}),oe(this,"getFieldWarning",t=>{this.warningUnhooked();let r=wn(t);return this.getFieldsError([r])[0].warnings}),oe(this,"isFieldsTouched",(...t)=>{this.warningUnhooked();let[r,n]=t,a,o=!1;t.length===0?a=null:t.length===1?Array.isArray(r)?(a=r.map(wn),o=!1):(a=null,o=r):(a=r.map(wn),o=n);let l=this.getFieldEntities(!0),c=g=>g.isFieldTouched();if(!a)return o?l.every(g=>c(g)||g.isList()):l.some(c);let d=new ah;a.forEach(g=>{d.set(g,[])}),l.forEach(g=>{let v=g.getNamePath();a.forEach(y=>{y.every((w,x)=>v[x]===w)&&d.update(y,w=>[...w,g])})});let p=g=>g.some(c),h=d.map(({value:g})=>g);return o?h.every(p):h.some(p)}),oe(this,"isFieldTouched",t=>(this.warningUnhooked(),this.isFieldsTouched([t]))),oe(this,"isFieldsValidating",t=>{this.warningUnhooked();let r=this.getFieldEntities();if(!t)return r.some(a=>a.isFieldValidating());let n=t.map(wn);return r.some(a=>{let o=a.getNamePath();return ih(n,o)&&a.isFieldValidating()})}),oe(this,"isFieldValidating",t=>(this.warningUnhooked(),this.isFieldsValidating([t]))),oe(this,"resetWithFieldInitialValue",(t={})=>{let r=new ah,n=this.getFieldEntities(!0);n.forEach(l=>{let{initialValue:c}=l.props,d=l.getNamePath();if(c!==void 0){let p=r.get(d)||new Set;p.add({entity:l,value:c}),r.set(d,p)}});let a=l=>{l.forEach(c=>{let{initialValue:d}=c.props;if(d!==void 0){let p=c.getNamePath();if(this.getInitialValue(p)!==void 0)xa(!1,`Form already set 'initialValues' with path '${p.join(".")}'. Field can not overwrite it.`);else{let h=r.get(p);if(h&&h.size>1)xa(!1,`Multiple Field with path '${p.join(".")}' set 'initialValue'. Can not decide which one to pick.`);else if(h){let g=this.getFieldValue(p);!c.isListField()&&(!t.skipExist||g===void 0)&&this.updateStore(oi(this.store,p,[...h][0].value))}}}})},o;t.entities?o=t.entities:t.namePathList?(o=[],t.namePathList.forEach(l=>{let c=r.get(l);c&&o.push(...[...c].map(d=>d.entity))})):o=n,a(o)}),oe(this,"resetFields",t=>{this.warningUnhooked();let r=this.store;if(!t){this.updateStore(wc(this.initialValues)),this.resetWithFieldInitialValue(),this.notifyObservers(r,null,{type:"reset"}),this.notifyWatch();return}let n=t.map(wn);n.forEach(a=>{let o=this.getInitialValue(a);this.updateStore(oi(this.store,a,o))}),this.resetWithFieldInitialValue({namePathList:n}),this.notifyObservers(r,n,{type:"reset"}),this.notifyWatch(n)}),oe(this,"setFields",t=>{this.warningUnhooked();let r=this.store,n=[];t.forEach(a=>{let{name:o,...l}=a,c=wn(o);n.push(c),"value"in l&&this.updateStore(oi(this.store,c,l.value)),this.notifyObservers(r,[c],{type:"setField",data:a})}),this.notifyWatch(n)}),oe(this,"getFields",()=>this.getFieldEntities(!0).map(t=>{let r=t.getNamePath(),n={...t.getMeta(),name:r,value:this.getFieldValue(r)};return Object.defineProperty(n,"originRCField",{value:!0}),n})),oe(this,"initEntityValue",t=>{let{initialValue:r}=t.props;if(r!==void 0){let n=t.getNamePath();Fi(this.store,n)===void 0&&this.updateStore(oi(this.store,n,r))}}),oe(this,"isMergedPreserve",t=>(t!==void 0?t:this.preserve)??!0),oe(this,"registerField",t=>{this.fieldEntities.push(t);let r=t.getNamePath();if(this.notifyWatch([r]),t.props.initialValue!==void 0){let n=this.store;this.resetWithFieldInitialValue({entities:[t],skipExist:!0}),this.notifyObservers(n,[t.getNamePath()],{type:"valueUpdate",source:"internal"})}return(n,a,o=[])=>{if(this.fieldEntities=this.fieldEntities.filter(l=>l!==t),!this.isMergedPreserve(a)&&(!n||o.length>1)){let l=n?void 0:this.getInitialValue(r);if(r.length&&this.getFieldValue(r)!==l&&this.fieldEntities.every(c=>!mx(c.getNamePath(),r))){let c=this.store;this.updateStore(oi(c,r,l,!0)),this.notifyObservers(c,[r],{type:"remove"}),this.triggerDependenciesUpdate(c,r)}}this.notifyWatch([r])}}),oe(this,"dispatch",t=>{switch(t.type){case"updateValue":{let{namePath:r,value:n}=t;this.updateValue(r,n);break}case"validateField":{let{namePath:r,triggerName:n}=t;this.validateFields([r],{triggerName:n});break}default:}}),oe(this,"notifyObservers",(t,r,n)=>{if(this.subscribable){let a={...n,store:this.getFieldsValue(!0)};this.getFieldEntities().forEach(({onStoreChange:o})=>{o(t,r,a)})}else this.forceRootUpdate()}),oe(this,"triggerDependenciesUpdate",(t,r)=>{let n=this.getDependencyChildrenFields(r);return n.length&&this.validateFields(n,{delayFrame:!0}),this.notifyObservers(t,n,{type:"dependenciesUpdate",relatedFields:[r,...n]}),n}),oe(this,"updateValue",(t,r)=>{let n=wn(t),a=this.store;this.updateStore(oi(this.store,n,r)),this.notifyObservers(a,[n],{type:"valueUpdate",source:"internal"}),this.notifyWatch([n]);let o=this.triggerDependenciesUpdate(a,n),{onValuesChange:l}=this.callbacks;if(l){let c=xR(this.store,[n]),d=this.getFieldsValue(),p=oi(d,n,Fi(c,n));l(c,p)}this.triggerOnFieldsChange([n,...o])}),oe(this,"setFieldsValue",t=>{this.warningUnhooked();let r=this.store;if(t){let n=wc(this.store,t);this.updateStore(n)}this.notifyObservers(r,null,{type:"valueUpdate",source:"external"}),this.notifyWatch()}),oe(this,"setFieldValue",(t,r)=>{this.setFields([{name:t,value:r,errors:[],warnings:[],touched:!0}])}),oe(this,"getDependencyChildrenFields",t=>{let r=new Set,n=[],a=new ah;this.getFieldEntities().forEach(l=>{let{dependencies:c}=l.props;(c||[]).forEach(d=>{let p=wn(d);a.update(p,(h=new Set)=>(h.add(l),h))})});let o=l=>{(a.get(l)||new Set).forEach(c=>{if(!r.has(c)){r.add(c);let d=c.getNamePath();c.isFieldDirty()&&d.length&&(n.push(d),o(d))}})};return o(t),n}),oe(this,"triggerOnFieldsChange",(t,r)=>{let{onFieldsChange:n}=this.callbacks;if(n){let a=this.getFields();if(r){let l=new ah;r.forEach(({name:c,errors:d})=>{l.set(c,d)}),a.forEach(c=>{c.errors=l.get(c.name)||c.errors})}let o=a.filter(({name:l})=>ih(t,l));o.length&&n(o,a)}}),oe(this,"validateFields",(t,r)=>{this.warningUnhooked();let n,a;Array.isArray(t)||typeof t=="string"||typeof r=="string"?(n=t,a=r):a=t;let o=!!n,l=o?n.map(wn):[],c=[...l],d=[],p=String(Date.now()),h=new Set,{recursive:g,dirty:v}=a||{};this.getFieldEntities(!0).forEach(k=>{let F=k.getNamePath();if(o||((!k.isList()||!l.some(C=>mx(C,F,!0)))&&c.push(F),l.push(F)),!(!k.props.rules||!k.props.rules.length)&&!(v&&!k.isFieldDirty())&&(h.add(F.join(p)),!o||ih(l,F,g))){let C=k.validateRules({validateMessages:{...TR,...this.validateMessages},...a});d.push(C.then(()=>({name:F,errors:[],warnings:[]})).catch(D=>{let S=[],A=[];return D.forEach?.(({rule:{warningOnly:I},errors:j})=>{I?A.push(...j):S.push(...j)}),S.length?Promise.reject({name:F,errors:S,warnings:A}):{name:F,errors:S,warnings:A}}))}});let y=Bse(d);this.lastValidatePromise=y,y.catch(k=>k).then(k=>{let F=k.map(({name:C})=>C);this.notifyObservers(this.store,F,{type:"validateFinish"}),this.triggerOnFieldsChange(F,k)});let w=y.then(()=>this.lastValidatePromise===y?Promise.resolve(this.getFieldsValue(c)):Promise.reject([])).catch(k=>{let F=k.filter(D=>D&&D.errors.length),C=F[0]?.errors?.[0];return Promise.reject({message:C,values:this.getFieldsValue(l),errorFields:F,outOfDate:this.lastValidatePromise!==y})});w.catch(k=>k);let x=l.filter(k=>h.has(k.join(p)));return this.triggerOnFieldsChange(x),w}),oe(this,"submit",()=>{this.warningUnhooked(),this.validateFields().then(t=>{let{onFinish:r}=this.callbacks;if(r)try{r(t)}catch(n){console.error(n)}}).catch(t=>{let{onFinishFailed:r}=this.callbacks;r&&r(t)})}),this.forceRootUpdate=e}};function Tse(e){let t=BR.useRef(null),[,r]=BR.useState({});if(!t.current)if(e)t.current=e;else{let n=()=>{r({})},a=new Mse(n);t.current=a.getForm()}return[t.current]}var J4=Tse,Po=B(_()),fx=B(_()),Y4=fx.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),NR=({validateMessages:e,onFormChange:t,onFormFinish:r,children:n})=>{let a=fx.useContext(Y4),o=fx.useRef({});return fx.createElement(Y4.Provider,{value:{...a,validateMessages:{...a.validateMessages,...e},triggerFormChange:(l,c)=>{t&&t(l,{changedFields:c,forms:o.current}),a.triggerFormChange(l,c)},triggerFormFinish:(l,c)=>{r&&r(l,{values:c,forms:o.current}),a.triggerFormFinish(l,c)},registerForm:(l,c)=>{l&&(o.current={...o.current,[l]:c}),a.registerForm(l,c)},unregisterForm:l=>{let c={...o.current};delete c[l],o.current=c,a.unregisterForm(l)}}},n)},jse=Y4;function Q4(){return Q4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Q4.apply(this,arguments)}var _se=(e,t)=>{let{name:r,initialValues:n,fields:a,form:o,preserve:l,children:c,component:d="form",validateMessages:p,validateTrigger:h="onChange",onValuesChange:g,onFieldsChange:v,onFinish:y,onFinishFailed:w,clearOnDestroy:x,...k}=e,F=Po.useRef(null),C=Po.useContext(jse),[D]=J4(o),{useSubscribe:S,setInitialValues:A,setCallbacks:I,setValidateMessages:j,setPreserve:$,destroyForm:P}=D.getInternalHooks(cp);Po.useImperativeHandle(t,()=>({...D,nativeElement:F.current})),Po.useEffect(()=>(C.registerForm(r,D),()=>{C.unregisterForm(r)}),[C,D,r]),j({...C.validateMessages,...p}),I({onValuesChange:g,onFieldsChange:(O,...W)=>{C.triggerFormChange(r,O),v&&v(O,...W)},onFinish:O=>{C.triggerFormFinish(r,O),y&&y(O)},onFinishFailed:w}),$(l);let N=Po.useRef(null);A(n,!N.current),N.current||(N.current=!0),Po.useEffect(()=>()=>P(x),[]);let R,U=typeof c=="function";if(U){let O=D.getFieldsValue(!0);R=c(O,D)}else R=c;S(!U);let H=Po.useRef(null);Po.useEffect(()=>{boe(H.current||[],a||[])||D.setFields(a||[]),H.current=a},[a,D]);let q=Po.useMemo(()=>({...D,validateTrigger:h}),[D,h]),L=Po.createElement(Ov.Provider,{value:null},Po.createElement(dp.Provider,{value:q},R));return d===!1?L:Po.createElement(d,Q4({},k,{ref:F,onSubmit:O=>{O.preventDefault(),O.stopPropagation(),D.submit()},onReset:O=>{O.preventDefault(),D.resetFields(),k.onReset?.(O)}}),L)},Pse=_se,Nse=xoe.forwardRef(Pse),oh=Nse;oh.FormProvider=NR;oh.Field=Z4;oh.List=PR;oh.useForm=J4;oh.useWatch=IR;var Ose=oh,cu=B(_()),Rse=cu.createContext({labelAlign:"right",layout:"horizontal",itemRef:()=>{}}),Lse=cu.createContext(null),zse=e=>{let t=wr(e,["prefixCls"]);return cu.createElement(NR,{...t})},Hse=cu.createContext({prefixCls:""}),so=cu.createContext({}),eF=({children:e,status:t,override:r})=>{let n=cu.useContext(so),a=cu.useMemo(()=>{let o={...n};return r&&delete o.isFormItemInput,t&&(delete o.status,delete o.hasFeedback,delete o.feedbackIcon),o},[t,r,n]);return cu.createElement(so.Provider,{value:a},e)},tF=cu.createContext(void 0);var OR=B(_()),qse=(e,t,r,n)=>{let a=OR.useContext(wt),{variant:o,[e]:l}=a,c=OR.useContext(tF),d=n?a[n]:void 0,p=l?.variant??d?.variant,h=typeof t<"u"||r===!1||typeof c<"u"||typeof p<"u"||typeof o<"u",g;typeof t<"u"?g=t:r===!1?g="borderless":g=c??p??o??"outlined";let v=QS.includes(g);return[g,v,h]},du=qse;function Rv(...e){return e.find(t=>t!==void 0)}var RR=B(_()),Wse=e=>{let{space:t,form:r,children:n}=e;if(!ir(n))return null;let a=n;return r&&(a=RR.default.createElement(eF,{override:!0,status:!0},a)),t&&(a=RR.default.createElement(E4,null,a)),a},sh=Wse;var LR=B(_()),Vse={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},Use=Vse;function rF(){return rF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rF.apply(this,arguments)}var Kse=(e,t)=>LR.createElement(Ut,rF({},e,{ref:t,icon:Use})),Gse=LR.forwardRef(Kse),Lv=Gse;var nl=B(_()),Ii=B(_());function Xse(e){return!!(e.addonBefore||e.addonAfter)}function Yse(e){return!!(e.prefix||e.suffix||e.allowClear)}function zR(e,t,r){let n=t.cloneNode(!0),a=Object.create(e,{target:{value:n},currentTarget:{value:n}});return n.value=r,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(n.selectionStart=t.selectionStart,n.selectionEnd=t.selectionEnd),n.setSelectionRange=(...o)=>{t.setSelectionRange(...o)},a}function hx(e,t,r,n){if(!r)return;let a=t;if(t.type==="click"){a=zR(t,e,""),r(a);return}if(e.type!=="file"&&n!==void 0){a=zR(t,e,n),r(a);return}r(a)}function sF(){return sF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sF.apply(this,arguments)}var Qse=Ii.default.forwardRef((e,t)=>{let{inputElement:r,children:n,prefixCls:a,prefix:o,suffix:l,addonBefore:c,addonAfter:d,className:p,style:h,disabled:g,readOnly:v,focused:y,triggerFocus:w,allowClear:x,value:k,handleReset:F,hidden:C,classes:D,classNames:S,dataAttrs:A,styles:I,components:j,onClear:$}=e,P=n??r,N=j?.affixWrapper||"span",R=j?.groupWrapper||"span",U=j?.wrapper||"span",H=j?.groupAddon||"span",q=(0,Ii.useRef)(null),L=Y=>{q.current?.contains(Y.target)&&w?.()},O=Yse(e),W=(0,Ii.cloneElement)(P,{value:k,className:te(P.props?.className,!O&&S?.variant)||null}),z=(0,Ii.useRef)(null);if(Ii.default.useImperativeHandle(t,()=>({nativeElement:z.current||q.current})),O){let Y=null;if(x){let V=!g&&!v&&k&&!(typeof x=="object"&&x.disabled),X=`${a}-clear-icon`,Q=typeof x=="object"&&x?.clearIcon?x.clearIcon:"\u2716";Y=Ii.default.createElement("button",{type:"button",onClick:re=>{F?.(re),$?.()},onMouseDown:re=>re.preventDefault(),className:te(X,{[`${X}-hidden`]:!V,[`${X}-has-suffix`]:!!l},S?.clear),style:I?.clear},Q)}let G=`${a}-affix-wrapper`,Z=te(G,{[`${a}-disabled`]:g,[`${G}-disabled`]:g,[`${G}-focused`]:y,[`${G}-readonly`]:v,[`${G}-input-with-clear-btn`]:l&&x&&k},D?.affixWrapper,S?.affixWrapper,S?.variant),T=(l||x)&&Ii.default.createElement("span",{className:te(`${a}-suffix`,S?.suffix),style:I?.suffix},Y,l);W=Ii.default.createElement(N,sF({className:Z,style:I?.affixWrapper,onClick:L},A?.affixWrapper,{ref:q}),o&&Ii.default.createElement("span",{className:te(`${a}-prefix`,S?.prefix),style:I?.prefix},o),W,T)}if(Xse(e)){let Y=`${a}-group`,G=`${Y}-addon`,Z=`${Y}-wrapper`,T=te(`${a}-wrapper`,Y,D?.wrapper,S?.wrapper),V=te(Z,{[`${Z}-disabled`]:g},D?.group,S?.groupWrapper);W=Ii.default.createElement(R,{className:V,ref:z},Ii.default.createElement(U,{className:T},c&&Ii.default.createElement(H,{className:G},c),W,d&&Ii.default.createElement(H,{className:G},d)))}return Ii.default.cloneElement(W,{className:te(W.props?.className,p)||null,style:{...W.props?.style,...h},hidden:C})}),YR=Qse,lo=B(_()),Zse=B(_());function QR(e,t){return Zse.useMemo(()=>{let r={};t&&(r.show=typeof t=="object"&&t.formatter?t.formatter:!!t),r={...r,...e};let{show:n,...a}=r;return{...a,show:!!n,showFormatter:typeof n=="function"?n:void 0,strategy:a.strategy||(o=>o.length)}},[e,t])}var Jse=B(_());function ZR({countConfig:e,value:t,maxLength:r}){return Jse.useMemo(()=>{let n=e.max??r,a=e.strategy(t),o=!!n&&a>n,l=Number(n)>0,c=e.show?e.showFormatter?e.showFormatter({value:t,count:a,maxLength:n}):`${a}${l?` / ${n}`:""}`:void 0;return{mergedMax:n,isOutOfRange:o,dataCount:c}},[e,r,t])}var zv=B(_());function JR({countConfig:e,getTarget:t}){let[r,n]=zv.useState(null),a=zv.useRef(t);return zv.useEffect(()=>{a.current=t},[t]),zv.useEffect(()=>{r&&(a.current()?.setSelectionRange(...r),n(null))},[r]),zv.useCallback((o,l)=>{let c=o;return!l&&e.exceedFormatter&&e.max&&e.strategy(o)>e.max&&(c=e.exceedFormatter(o,{max:e.max}),o!==c&&n([a.current()?.selectionStart||0,a.current()?.selectionEnd||0])),c},[e])}function eL(e,t){let[r,n]=yr(e,t),a=r==null?"":String(r);return{value:r,setValue:n,formatValue:a}}function gx(){return gx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gx.apply(this,arguments)}var ele=(0,lo.forwardRef)((e,t)=>{let{autoComplete:r,onChange:n,onFocus:a,onBlur:o,onPressEnter:l,onKeyDown:c,onKeyUp:d,prefixCls:p="rc-input",disabled:h,htmlSize:g,className:v,maxLength:y,suffix:w,showCount:x,count:k,type:F="text",classes:C,classNames:D,styles:S,onCompositionStart:A,onCompositionEnd:I,...j}=e,[$,P]=(0,lo.useState)(!1),N=(0,lo.useRef)(!1),R=(0,lo.useRef)(!1),U=(0,lo.useRef)(null),H=(0,lo.useRef)(null),q=le=>{U.current&&k5(U.current,le)},{setValue:L,formatValue:O}=eL(e.defaultValue,e.value),W=QR(k,x),{isOutOfRange:z,dataCount:Y}=ZR({countConfig:W,value:O,maxLength:y}),G=JR({countConfig:W,getTarget:()=>U.current});(0,lo.useImperativeHandle)(t,()=>({focus:q,blur:()=>{U.current?.blur()},setSelectionRange:(le,fe,we)=>{U.current?.setSelectionRange(le,fe,we)},select:()=>{U.current?.select()},input:U.current,nativeElement:H.current?.nativeElement||U.current})),(0,lo.useEffect)(()=>{R.current&&(R.current=!1),P(le=>le&&h?!1:le)},[h]);let Z=(le,fe,we)=>{let _e=G(fe,N.current);we.source==="compositionEnd"&&fe===_e||(L(_e),U.current&&hx(U.current,le,n,_e))},T=le=>{Z(le,le.target.value,{source:"change"})},V=le=>{N.current=!1,Z(le,le.currentTarget.value,{source:"compositionEnd"}),I?.(le)},X=le=>{l&&le.key==="Enter"&&!R.current&&!le.nativeEvent.isComposing&&(R.current=!0,l(le)),c?.(le)},Q=le=>{le.key==="Enter"&&(R.current=!1),d?.(le)},re=le=>{P(!0),a?.(le)},J=le=>{R.current&&(R.current=!1),P(!1),o?.(le)},se=le=>{L(""),q(),U.current&&hx(U.current,le,n)},ue=z&&`${p}-out-of-range`,ae=()=>{let le=wr(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return lo.default.createElement("input",gx({autoComplete:r},le,{onChange:T,onFocus:re,onBlur:J,onKeyDown:X,onKeyUp:Q,className:te(p,{[`${p}-disabled`]:h},D?.input),style:S?.input,ref:U,size:g,type:F,onCompositionStart:fe=>{N.current=!0,A?.(fe)},onCompositionEnd:V}))},he=()=>w||W.show?lo.default.createElement(lo.default.Fragment,null,W.show&&lo.default.createElement("span",{className:te(`${p}-show-count-suffix`,{[`${p}-show-count-has-suffix`]:!!w},D?.count),style:{...S?.count}},Y),w):null;return lo.default.createElement(YR,gx({},j,{prefixCls:p,className:te(v,ue),handleReset:se,value:O,focused:$,triggerFocus:q,suffix:he(),disabled:h,classes:C,classNames:D,styles:S,ref:H}),ae())}),tle=ele,uo=B(_()),al=B(_()),rle=`
|
|
161
|
-
min-height:0 !important;
|
|
162
|
-
max-height:none !important;
|
|
163
|
-
height:0 !important;
|
|
164
|
-
visibility:hidden !important;
|
|
165
|
-
overflow:hidden !important;
|
|
166
|
-
position:absolute !important;
|
|
167
|
-
z-index:-1000 !important;
|
|
168
|
-
top:0 !important;
|
|
169
|
-
right:0 !important;
|
|
170
|
-
pointer-events: none !important;
|
|
171
|
-
`,nle=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],nF={},co;function ale(e,t=!1){let r=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&nF[r])return nF[r];let n=window.getComputedStyle(e),a=n.getPropertyValue("box-sizing")||n.getPropertyValue("-moz-box-sizing")||n.getPropertyValue("-webkit-box-sizing"),o=parseFloat(n.getPropertyValue("padding-bottom"))+parseFloat(n.getPropertyValue("padding-top")),l=parseFloat(n.getPropertyValue("border-bottom-width"))+parseFloat(n.getPropertyValue("border-top-width")),c={sizingStyle:nle.map(d=>`${d}:${n.getPropertyValue(d)}`).join(";"),paddingSize:o,borderSize:l,boxSizing:a};return t&&r&&(nF[r]=c),c}function ile(e,t=!1,r=null,n=null){co||(co=document.createElement("textarea"),co.setAttribute("tab-index","-1"),co.setAttribute("aria-hidden","true"),co.setAttribute("name","hiddenTextarea"),document.body.appendChild(co)),e.getAttribute("wrap")?co.setAttribute("wrap",e.getAttribute("wrap")):co.removeAttribute("wrap");let{paddingSize:a,borderSize:o,boxSizing:l,sizingStyle:c}=ale(e,t);co.setAttribute("style",`${c};${rle}`),co.value=e.value||e.placeholder||"";let d,p,h,g=co.scrollHeight;if(l==="border-box"?g+=o:l==="content-box"&&(g-=a),r!==null||n!==null){co.value=" ";let y=co.scrollHeight-a;r!==null&&(d=y*r,l==="border-box"&&(d=d+a+o),g=Math.max(d,g)),n!==null&&(p=y*n,l==="border-box"&&(p=p+a+o),h=g>p?void 0:"hidden",g=Math.min(p,g))}let v={height:g,overflowY:h,resize:"none"};return d&&(v.minHeight=d),p&&(v.maxHeight=p),v}function lF(){return lF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lF.apply(this,arguments)}var aF=0,iF=1,oF=2,ole=al.forwardRef((e,t)=>{let{prefixCls:r,defaultValue:n,value:a,autoSize:o,onResize:l,className:c,style:d,disabled:p,onChange:h,onInternalAutoSize:g,...v}=e,[y,w]=yr(n,a),x=y??"",k=q=>{w(q.target.value),h?.(q)},F=al.useRef(null);al.useImperativeHandle(t,()=>({textArea:F.current}));let[C,D]=al.useMemo(()=>o&&typeof o=="object"?[o.minRows,o.maxRows]:[],[o]),S=!!o,[A,I]=al.useState(oF),[j,$]=al.useState(),P=()=>{I(aF)};Jt(()=>{S&&P()},[a,C,D,S]),Jt(()=>{if(A===aF)I(iF);else if(A===iF){let q=ile(F.current,!1,C,D);I(oF),$(q)}},[A]);let N=al.useRef(void 0),R=()=>{N.current!==void 0&&pr.cancel(N.current)},U=q=>{A===oF&&(l?.(q),o&&(R(),N.current=pr(()=>{P()})))};al.useEffect(()=>R,[]);let H={...d,...S?j:null};return(A===aF||A===iF)&&(H.overflowY="hidden",H.overflowX="hidden"),al.createElement(Ea,{onResize:U,disabled:!(o||l)},al.createElement("textarea",lF({},v,{ref:F,style:H,className:te(r,c,{[`${r}-disabled`]:p}),disabled:p,value:x,onChange:k})))}),sle=ole;function uF(){return uF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},uF.apply(this,arguments)}var lle=uo.default.forwardRef(({defaultValue:e,value:t,onFocus:r,onBlur:n,onChange:a,allowClear:o,maxLength:l,onCompositionStart:c,onCompositionEnd:d,suffix:p,prefixCls:h="rc-textarea",showCount:g,count:v,className:y,style:w,disabled:x,hidden:k,classNames:F,styles:C,onResize:D,onClear:S,onPressEnter:A,readOnly:I,autoSize:j,onKeyDown:$,...P},N)=>{let[R,U]=uo.default.useState(!1),H=uo.default.useRef(!1),[q,L]=uo.default.useState(null),O=(0,uo.useRef)(null),W=(0,uo.useRef)(null),z=()=>W.current?.textArea||null,{setValue:Y,formatValue:G}=eL(e,t),Z=QR(v,g),{isOutOfRange:T,dataCount:V}=ZR({countConfig:Z,value:G,maxLength:l}),X=JR({countConfig:Z,getTarget:()=>W.current?.textArea||null}),Q=()=>{z()?.focus()};(0,uo.useImperativeHandle)(N,()=>({resizableTextArea:W.current,focus:Q,blur:()=>{z()?.blur()},nativeElement:O.current?.nativeElement||z()})),(0,uo.useEffect)(()=>{U(De=>!x&&De)},[x]);let re=(De,Ce)=>{let qe=X(Ce,H.current);Y(qe),hx(De.currentTarget,De,a,qe)},J=De=>{H.current=!0,c?.(De)},se=De=>{H.current=!1,re(De,De.currentTarget.value),d?.(De)},ue=De=>{re(De,De.target.value)},ae=De=>{De.key==="Enter"&&A&&!De.nativeEvent.isComposing&&A(De),$?.(De)},he=De=>{U(!0),r?.(De)},le=De=>{U(!1),n?.(De)},fe=De=>{Y(""),Q();let Ce=z();Ce&&hx(Ce,De,a)},we=p;Z.show&&(we=uo.default.createElement(uo.default.Fragment,null,we,uo.default.createElement("span",{className:te(`${h}-data-count`,F?.count),style:C?.count},V)));let _e=De=>{D?.(De),z()?.style.height&&L(!0)},$e=!j&&!g&&!o;return uo.default.createElement(YR,{ref:O,value:G,allowClear:o,handleReset:fe,suffix:we,prefixCls:h,classNames:{...F,affixWrapper:te(F?.affixWrapper,{[`${h}-show-count`]:g,[`${h}-textarea-allow-clear`]:o})},disabled:x,focused:R,className:te(y,T&&`${h}-out-of-range`),style:{...w,...q&&!$e?{height:"auto"}:{}},dataAttrs:typeof V=="string"?{affixWrapper:{"data-count":V}}:void 0,styles:C,hidden:k,readOnly:I,onClear:S},uo.default.createElement(sle,uF({},P,{autoSize:j,maxLength:l,onKeyDown:ae,onChange:ue,onFocus:he,onBlur:le,onCompositionStart:J,onCompositionEnd:se,className:te(F?.textarea),style:{resize:w?.resize,...C?.textarea},disabled:x,prefixCls:h,onResize:_e,ref:W,readOnly:I})))}),ule=lle,cle=tle,HR=B(_()),cF=e=>{let{allowClear:t,clearIcon:r,contextAllowClear:n,contextClearIcon:a,defaultAllowClear:o,componentName:l}=e;return(0,HR.useMemo)(()=>t??n??o?{clearIcon:Rv(kt(t)?t?.clearIcon:r,kt(n)?n?.clearIcon:a,HR.default.createElement(Lv,null)),disabled:(kt(t)?t?.disabled:void 0)??(kt(n)?n?.disabled:void 0)}:!1,[t,r,n,a,o])},qR=B(_());function vx(e,t){let r=(0,qR.useRef)([]),n=()=>{r.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute("type")==="password"&&e.current?.input.hasAttribute("value")&&e.current?.input.removeAttribute("value")}))};return(0,qR.useEffect)(()=>(t&&n(),()=>r.current.forEach(a=>{a&&clearTimeout(a)})),[t]),n}function pp(e){return _t(e,{inputAffixPadding:e.paddingXXS})}var fp=e=>{let{controlHeight:t,fontSize:r,lineHeight:n,lineWidth:a,lineWidthFocus:o,controlHeightSM:l,controlHeightLG:c,fontSizeLG:d,lineHeightLG:p,paddingSM:h,controlPaddingHorizontalSM:g,controlPaddingHorizontal:v,colorFillAlter:y,colorPrimaryHover:w,colorPrimary:x,controlOutlineWidth:k,controlOutline:F,colorErrorOutline:C,colorWarningOutline:D,colorBgContainer:S,inputFontSize:A,inputFontSizeLG:I,inputFontSizeSM:j}=e,$=A||r,P=j||$,N=I||d,R=Math.round((t-$*n)/2*10)/10-a,U=Math.round((l-P*n)/2*10)/10-a,H=Math.ceil((c-N*p)/2*10)/10-a;return{lineWidthFocus:o===0?0:a,paddingBlock:Math.max(R,0),paddingBlockSM:Math.max(U,0),paddingBlockLG:Math.max(H,0),paddingInline:h-a,paddingInlineSM:g-a,paddingInlineLG:v-a,addonBg:y,activeBorderColor:x,hoverBorderColor:w,activeShadow:`0 0 0 ${k}px ${F}`,errorActiveShadow:`0 0 0 ${k}px ${C}`,warningActiveShadow:`0 0 0 ${k}px ${D}`,hoverBg:S,activeBg:S,inputFontSize:$,inputFontSizeLG:N,inputFontSizeSM:P}},dle=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),bx=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorderDisabled,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":{...dle(_t(e,{hoverBorderColor:e.colorBorderDisabled,hoverBg:e.colorBgContainerDisabled}))}}),dF=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),WR=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...dF(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),tL=(e,t)=>({"&-outlined":{...dF(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...bx(e)},...WR(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorErrorAffix}),...WR(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarningAffix}),...t}}),VR=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),ple=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${ve(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...VR(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...VR(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...bx(e)}}}}),rL="&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)",nL=(e,t)=>({outline:`${ve(e.lineWidthFocus)} ${e.lineType} ${t}`,outlineOffset:ve(e.calc(e.lineWidth).mul(-1).equal()),transition:["outline-offset","outline"].map(r=>`${r} 0s`).join(", ")}),UR=(e,t)=>({"&, & input, & textarea":{color:t.color},[rL]:nL(e,t.color),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),aL=(e,t)=>{let{componentCls:r}=e;return{"&-borderless":{background:"transparent",border:"none",paddingBlock:e.calc(e.paddingBlock).add(e.lineWidth).equal(),[`&${r}-sm, &${r}-affix-wrapper-sm`]:{paddingBlock:e.calc(e.paddingBlockSM).add(e.lineWidth).equal()},[`&${r}-lg, &${r}-affix-wrapper-lg`]:{paddingBlock:e.calc(e.paddingBlockLG).add(e.lineWidth).equal()},"&:focus, &:focus-within":{outline:"none"},[rL]:nL(e,e.activeBorderColor),[`&${r}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${r}-status-error`]:UR(e,{color:e.colorError,affixColor:e.colorErrorAffix}),[`&${r}-status-warning`]:UR(e,{color:e.colorWarning,affixColor:e.colorWarningAffix}),...t}}},iL=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:t?.inputColor??"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),KR=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...iL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),oL=(e,t)=>({"&-filled":{...iL(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...bx(e)},...KR(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorErrorAffix}),...KR(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarningAffix}),...t}}),GR=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),fle=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}},...GR(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...GR(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${ve(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ve(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ve(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${ve(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ve(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ve(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),sL=(e,t)=>({background:e.colorBgContainer,borderWidth:`${ve(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),XR=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...sL(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),lL=(e,t)=>({"&-underlined":{...sL(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"},...XR(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorErrorAffix}),...XR(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarningAffix}),...t}}),uL=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),pF=e=>{let{paddingBlockLG:t,lineHeightLG:r,borderRadiusLG:n,paddingInlineLG:a}=e;return{padding:`${ve(t)} ${ve(a)}`,fontSize:e.inputFontSizeLG,lineHeight:r,borderRadius:n}},fF=e=>({padding:`${ve(e.paddingBlockSM)} ${ve(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),mF=(e,t={})=>({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${ve(e.paddingBlock)} ${ve(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...uL(e.colorTextPlaceholder),"&-lg":{...pF(e),...t.largeStyle},"&-sm":{...fF(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:"rtl"}}),mle=e=>{let{componentCls:t,antCls:r}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:{...pF(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{...fF(e)},[`&-lg ${r}-select-single`]:{height:e.controlHeightLG},[`&-sm ${r}-select-single`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${ve(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${r}-select`]:{margin:`${ve(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${ve(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${r}-select-single:not(${r}-select-customize-input):not(${r}-pagination-size-changer)`]:{backgroundColor:"inherit",border:`${ve(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}},[`${r}-cascader-picker`]:{margin:`-9px ${ve(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${r}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${r}-select`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${r}-select`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:"block",...n4(),[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
172
|
-
& > ${t}-affix-wrapper,
|
|
173
|
-
& > ${t}-number-affix-wrapper,
|
|
174
|
-
& > ${r}-picker-range
|
|
175
|
-
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:"none"},[`& > ${r}-select,
|
|
176
|
-
& > ${r}-select-auto-complete ${t},
|
|
177
|
-
& > ${r}-cascader-picker ${t},
|
|
178
|
-
& > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${r}-select-focused`]:{zIndex:1},[`& > ${r}-select > ${r}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
179
|
-
& > ${r}-select:first-child,
|
|
180
|
-
& > ${r}-select-auto-complete:first-child ${t},
|
|
181
|
-
& > ${r}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
|
|
182
|
-
& > ${r}-select:last-child,
|
|
183
|
-
& > ${r}-cascader-picker:last-child ${t},
|
|
184
|
-
& > ${r}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${r}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{}}}}},hle=e=>{let{componentCls:t,controlHeightSM:r,lineWidth:n,calc:a}=e,o=a(r).sub(a(n).mul(2)).sub(16).div(2).equal();return{[t]:{...fr(e),...mF(e),...tL(e),...oL(e),...aL(e),...lL(e),'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:r,paddingTop:o,paddingBottom:o}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}}}},gle=e=>{let{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorIcon},"&:focus-visible":{color:e.colorIcon,borderRadius:e.borderRadiusSM,...ao(e)},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${ve(e.inputAffixPadding)}`}}}},vle=e=>{let{componentCls:t,inputAffixPadding:r,colorTextDescription:n,motionDurationSlow:a,colorIcon:o,colorIconHover:l}=e,c=`${t}-affix-wrapper`,d=`${t}-affix-wrapper-disabled`;return{[c]:{...mF(e),display:"inline-flex","&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:n,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:r},"&-suffix":{marginInlineStart:r},"&-password-icon":{display:"inline-flex",color:o,cursor:"pointer",transition:`all ${a}`,"&:hover":{color:l}}},...gle(e)},[`${t}-underlined`]:{borderRadius:0},[d]:{[`${t}-password-icon`]:{color:o,cursor:"not-allowed","&:hover":{color:o}}}}},ble=e=>{let{componentCls:t,borderRadiusLG:r,borderRadiusSM:n}=e;return{[`${t}-group`]:{...fr(e),...mle(e),"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:r,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:n}},...ple(e),...fle(e),[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}}},yle=e=>{let{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},cL=Et(["Input","Shared"],e=>{let t=_t(e,pp(e));return[hle(t),vle(t)]},fp,{resetFont:!1}),yx=Et(["Input","Component"],e=>{let t=_t(e,pp(e));return[ble(t),yle(t),th(t,{focus:!0,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},fp,{resetFont:!1});function wle(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var xle=(0,nl.forwardRef)((e,t)=>{let{prefixCls:r,bordered:n=!0,status:a,size:o,disabled:l,onBlur:c,onFocus:d,suffix:p,allowClear:h,addonAfter:g,addonBefore:v,className:y,style:w,styles:x,rootClassName:k,onChange:F,classNames:C,variant:D,...S}=e,{getPrefixCls:A,direction:I,allowClear:j,autoComplete:$,className:P,style:N,classNames:R,styles:U}=jt("input"),H=A("input",r),q=(0,nl.useRef)(null),L=Qn(H),[O,W]=cL(H,k);yx(H,L);let{compactSize:z,compactItemClassnames:Y}=tl(H,I),G=Rn(Me=>o??z??Me),Z=nl.default.useContext(ci),T=l??Z,V={...e,size:G,disabled:T},X=lt(N),Q=lt(w),[re,J]=Tt([R,C],[U,X,x,Q],{props:V}),{status:se,hasFeedback:ue,feedbackIcon:ae}=(0,nl.useContext)(so),he=Qm(se,a),le=wle(e)||!!ue,fe=(0,nl.useRef)(le),we=vx(q,!0),_e=Me=>{we(),c?.(Me)},$e=Me=>{we(),d?.(Me)},De=Me=>{we(),F?.(Me)},Ce=(ue||p)&&nl.default.createElement(nl.default.Fragment,null,p,ue&&ae),qe=cF({allowClear:h,contextAllowClear:j,componentName:"Input"}),[Ae,Be]=du("input",D,n);return nl.default.createElement(cle,{ref:ln(t,q),prefixCls:H,autoComplete:$,...S,disabled:T,onBlur:_e,onFocus:$e,style:J.root,styles:J,suffix:Ce,allowClear:qe,className:te(y,k,W,L,Y,P,re.root),onChange:De,addonBefore:v&&nl.default.createElement(sh,{form:!0,space:!0},v),addonAfter:g&&nl.default.createElement(sh,{form:!0,space:!0},g),classNames:{...re,input:te({[`${H}-sm`]:G==="small",[`${H}-lg`]:G==="large",[`${H}-rtl`]:I==="rtl"},re.input,O),variant:te({[`${H}-${Ae}`]:Be},rp(H,he)),affixWrapper:te({[`${H}-affix-wrapper-sm`]:G==="small",[`${H}-affix-wrapper-lg`]:G==="large",[`${H}-affix-wrapper-rtl`]:I==="rtl"},O),wrapper:te({[`${H}-group-rtl`]:I==="rtl"},O),groupWrapper:te({[`${H}-group-wrapper-sm`]:G==="small",[`${H}-group-wrapper-lg`]:G==="large",[`${H}-group-wrapper-rtl`]:I==="rtl",[`${H}-group-wrapper-${Ae}`]:Be},rp(`${H}-group-wrapper`,he,ue),O)}})}),lh=xle,kc=B(_()),Ele=B(_()),kle=e=>{let{componentCls:t,paddingLG:r}=e,n=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical","@media (hover: none) and (pointer: coarse)":{resize:"none"},[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[n]:{position:"relative","&-show-count":{[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
|
|
185
|
-
&-allow-clear > ${t},
|
|
186
|
-
&-affix-wrapper${n}-has-feedback ${t}
|
|
187
|
-
`]:{paddingInlineEnd:r},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${n}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},Cle=Et(["Input","TextArea"],e=>{let t=_t(e,pp(e));return kle(t)},fp,{resetFont:!1}),Sle=(0,Ele.forwardRef)((e,t)=>{let{prefixCls:r,bordered:n=!0,size:a,disabled:o,status:l,allowClear:c,classNames:d,rootClassName:p,className:h,style:g,styles:v,variant:y,showCount:w,onMouseDown:x,onResize:k,...F}=e,{getPrefixCls:C,direction:D,allowClear:S,autoComplete:A,className:I,style:j,classNames:$,styles:P}=jt("textArea"),N=kc.useContext(ci),R=o??N,{status:U,hasFeedback:H,feedbackIcon:q}=kc.useContext(so),L=Qm(U,l),O=lt(j),W=lt(g),[z,Y]=Tt([$,d],[P,O,v,W],{props:e}),G=kc.useRef(null);kc.useImperativeHandle(t,()=>({resizableTextArea:G.current?.resizableTextArea,focus:De=>{k5(G.current?.resizableTextArea?.textArea,De)},blur:()=>G.current?.blur(),nativeElement:G.current?.nativeElement||null}));let Z=C("input",r),T=Qn(Z),[V,X]=cL(Z,p);Cle(Z,T);let{compactSize:Q,compactItemClassnames:re}=tl(Z,D),J=Rn(De=>a??Q??De),[se,ue]=du("textArea",y,n),ae=cF({allowClear:c,contextAllowClear:S,componentName:"TextArea"}),[he,le]=kc.useState(!1),[fe,we]=kc.useState(!1),_e=De=>{le(!0),x?.(De);let Ce=()=>{le(!1),document.removeEventListener("mouseup",Ce)};document.addEventListener("mouseup",Ce)},$e=De=>{if(k?.(De),he&&xr(getComputedStyle)){let Ce=G.current?.nativeElement?.querySelector("textarea");Ce&&getComputedStyle(Ce).resize==="both"&&we(!0)}};return kc.createElement(ule,{autoComplete:A,...F,style:Y.root,styles:Y,disabled:R,allowClear:ae,className:te(X,T,h,p,re,I,z.root,{[`${Z}-textarea-affix-wrapper-resize-dirty`]:fe}),classNames:{...z,textarea:te({[`${Z}-sm`]:J==="small",[`${Z}-lg`]:J==="large"},V,z.textarea,he&&`${Z}-mouse-active`),variant:te({[`${Z}-${se}`]:ue},rp(Z,L)),affixWrapper:te(`${Z}-textarea-affix-wrapper`,{[`${Z}-affix-wrapper-rtl`]:D==="rtl",[`${Z}-affix-wrapper-sm`]:J==="small",[`${Z}-affix-wrapper-lg`]:J==="large",[`${Z}-textarea-show-count`]:w||e.count?.show},V)},prefixCls:Z,suffix:H&&kc.createElement("span",{className:`${Z}-textarea-suffix`},q),showCount:w,ref:G,onResize:$e,onMouseDown:_e})}),Hv=Sle;var dL=B(_()),Fle={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},Dle=Fle;function hF(){return hF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hF.apply(this,arguments)}var Ale=(e,t)=>dL.createElement(Ut,hF({},e,{ref:t,icon:Dle})),$le=dL.forwardRef(Ale),bF=$le,pL=B(_()),Ble={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},Ile=Ble;function gF(){return gF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gF.apply(this,arguments)}var Mle=(e,t)=>pL.createElement(Ut,gF({},e,{ref:t,icon:Ile})),Tle=pL.forwardRef(Mle),yF=Tle,fL=B(_()),jle={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},_le=jle;function vF(){return vF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vF.apply(this,arguments)}var Ple=(e,t)=>fL.createElement(Ut,vF({},e,{ref:t,icon:_le})),Nle=fL.forwardRef(Ple),wF=Nle;var mL=B(_()),xF=B(_()),Ole=e=>{let{getPrefixCls:t,direction:r}=(0,xF.useContext)(wt),{prefixCls:n,className:a}=e,o=t("input-group",n),l=t("input"),[c,d]=yx(l),p=te(o,d,{[`${o}-lg`]:e.size==="large",[`${o}-sm`]:e.size==="small",[`${o}-compact`]:e.compact,[`${o}-rtl`]:r==="rtl"},c,a),h=(0,xF.useContext)(so),g=(0,xF.useMemo)(()=>({...h,isFormItemInput:!1}),[h]);return mL.createElement(so.Provider,{value:g},mL.createElement(O4.Compact,{className:p,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},e.children))},Rle=Ole,di=B(_()),Lle=e=>{let{componentCls:t,paddingXS:r}=e;return{[t]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:r,[`${t}-input-wrapper`]:{position:"relative",[`${t}-mask-icon`]:{position:"absolute",zIndex:"1",top:"50%",right:"50%",transform:"translate(50%, -50%)",pointerEvents:"none"},[`${t}-mask-input`]:{color:"transparent",caretColor:e.colorText,"&::selection":{color:"transparent"}},[`${t}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":"none",margin:0},[`${t}-mask-input[type=number]`]:{"-moz-appearance":"textfield"}},"&-rtl":{direction:"rtl"},[`${t}-input`]:{textAlign:"center",paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},zle=Et(["Input","OTP"],e=>{let t=_t(e,pp(e));return Lle(t)},fp),mp=B(_()),Hle="\u2022",qle=mp.forwardRef((e,t)=>{let{className:r,value:n,onChange:a,onActiveChange:o,index:l,mask:c,onFocus:d,type:p,...h}=e,{getPrefixCls:g}=mp.useContext(wt),v=g("otp"),y=typeof c=="string"?c:Hle,w=mp.useRef(null);mp.useImperativeHandle(t,()=>w.current);let x=D=>{a(l,D.target.value)},k=()=>{pr(()=>{let D=w.current?.input;document.activeElement===D&&D&&D.select()})},F=D=>{d?.(D),k()},C=D=>{let{key:S,ctrlKey:A,metaKey:I}=D;S==="ArrowLeft"?o(l-1):S==="ArrowRight"?o(l+1):S==="z"&&(A||I)?D.preventDefault():S==="Backspace"&&!n&&o(l-1),k()};return mp.createElement("span",{className:`${v}-input-wrapper`,role:"presentation"},c&&n!==""&&n!==void 0&&mp.createElement("span",{className:`${v}-mask-icon`,"aria-hidden":"true"},y),mp.createElement(lh,{"aria-label":`OTP Input ${l+1}`,...h,type:p??(c?"password":"text"),ref:w,value:n,onInput:x,onFocus:F,onKeyDown:C,onMouseDown:k,onMouseUp:k,className:te(r,{[`${v}-mask-input`]:c})}))}),Wle=qle;function wx(e){return(e||"").split("")}var Vle=e=>{let{index:t,prefixCls:r,separator:n,className:a,style:o}=e,l=xr(n)?n(t):n;return l?di.createElement("span",{className:te(`${r}-separator`,a),style:o},l):null},Ule=di.forwardRef((e,t)=>{let{prefixCls:r,length:n=6,size:a,defaultValue:o,value:l,onChange:c,formatter:d,separator:p,variant:h,disabled:g,status:v,autoFocus:y,mask:w,type:x,autoComplete:k,onInput:F,onFocus:C,inputMode:D,classNames:S,styles:A,className:I,style:j,...$}=e,{classNames:P,styles:N,getPrefixCls:R,direction:U,style:H,className:q}=jt("otp"),L=R("otp",r),[O]=du("otp",h,void 0,"input"),W={...e,length:n,variant:O},z=lt(H),Y=lt(j),[G,Z]=Tt([P,S],[N,z,A,Y],{props:W}),T=no($,{aria:!0,data:!0,attr:!0}),[V,X]=zle(L),Q=Rn(Ae=>a??Ae),re=di.useContext(so),J=Qm(re.status,v),se=di.useMemo(()=>({...re,status:J,hasFeedback:!1,feedbackIcon:null}),[re,J]),ue=di.useRef(null),ae=di.useRef({});di.useImperativeHandle(t,()=>({focus:()=>{ae.current[0]?.focus()},blur:()=>{for(let Ae=0;Ae<n;Ae+=1)ae.current[Ae]?.blur()},nativeElement:ue.current}));let he=Ae=>d?d(Ae):Ae,[le,fe]=di.useState(()=>wx(he(o||"")));di.useEffect(()=>{l!==void 0&&fe(wx(l))},[l]);let we=xt(Ae=>{fe(Ae),F&&F(Ae),c&&Ae.length===n&&Ae.every(Be=>Be)&&Ae.some((Be,Me)=>le[Me]!==Be)&&c(Ae.join(""))}),_e=xt((Ae,Be)=>{let Me=Xr(le);for(let He=0;He<Ae;He+=1)Me[He]||(Me[He]="");Be.length<=1?Me[Ae]=Be:Me=Me.slice(0,Ae).concat(wx(Be)),Me=Me.slice(0,n);for(let He=Me.length-1;He>=0&&!Me[He];He-=1)Me.pop();let Ue=he(Me.map(He=>He||" ").join(""));return Me=wx(Ue).map((He,Ie)=>He===" "&&!Me[Ie]?Me[Ie]:He),Me}),$e=(Ae,Be)=>{let Me=_e(Ae,Be),Ue=Math.min(Ae+Be.length,n-1);Ue!==Ae&&Me[Ae]!==void 0&&ae.current[Ue]?.focus(),we(Me)},De=Ae=>{ae.current[Ae]?.focus()},Ce=(Ae,Be)=>{for(let Me=0;Me<Be;Me+=1)if(!ae.current[Me]?.input?.value){ae.current[Me]?.focus();break}C?.(Ae)},qe={variant:O,disabled:g,status:J,mask:w,type:x,inputMode:D,autoComplete:k};return di.createElement("div",{...T,ref:ue,className:te(I,L,{[`${L}-sm`]:Q==="small",[`${L}-lg`]:Q==="large",[`${L}-rtl`]:U==="rtl"},X,V,q,G.root),style:Z.root,role:"group"},di.createElement(so.Provider,{value:se},Array.from({length:n}).map((Ae,Be)=>{let Me=`otp-${Be}`,Ue=le[Be]||"";return di.createElement(di.Fragment,{key:Me},di.createElement(Wle,{ref:He=>{ae.current[Be]=He},index:Be,size:Q,htmlSize:1,className:te(G.input,`${L}-input`),style:Z.input,onChange:$e,value:Ue,onActiveChange:De,autoFocus:Be===0&&y,onFocus:He=>Ce(He,Be),...qe}),Be<n-1&&di.createElement(Vle,{separator:p,index:Be,prefixCls:L,className:te(G.separator),style:Z.separator}))})))}),Kle=Ule,pu=B(_()),hL=B(_()),Gle=e=>e?pu.createElement(yF,null):pu.createElement(bF,null),Xle={click:"onClick",hover:"onMouseOver"},Yle=pu.forwardRef((e,t)=>{let{disabled:r,action:n="click",visibilityToggle:a=!0,iconRender:o,prefixCls:l,inputPrefixCls:c,suffix:d,className:p,style:h,classNames:g,styles:v,variant:y,...w}=e,{getPrefixCls:x,className:k,style:F,classNames:C,styles:D,iconRender:S}=jt("inputPassword"),[A]=du("inputPassword",y,e.bordered,"input"),[I]=Jd("global"),j=pu.useContext(ci),$=r??j,P={...e,disabled:$,variant:A},N=lt(F),R=lt(h),[U,H]=Tt([C,g],[D,N,v,R],{props:P}),q=kt(a)&&a.visible!==void 0,[L,O]=(0,hL.useState)(()=>q?a.visible:!1),W=(0,hL.useRef)(null);pu.useEffect(()=>{q&&O(a.visible)},[q,a]);let z=vx(W),Y=()=>{if($)return;L&&z();let re=!L;q||O(re),kt(a)&&a.onVisibleChange?.(re)},G=re=>{let J=Xle[n]||"",se=(o||S||Gle)(L),ue=kt(a)?a.tabIndex:void 0;return pu.createElement("span",{key:"passwordIcon",role:"button",tabIndex:$?-1:ue??0,className:`${re}-icon`,"aria-disabled":$,"aria-pressed":L,"aria-label":L?I.hide:I.show,onMouseDown:ae=>{ae.preventDefault()},onMouseUp:ae=>{ae.preventDefault()},onKeyDown:ae=>{(ae.key==="Enter"||ae.key===" ")&&(ae.preventDefault(),ae.repeat||Y())},[J]:Y},se)},Z=x("input",c),T=x("input-password",l),V=a&&G(T),X=te(T,k,p,{[`${T}-${e.size}`]:!!e.size}),Q={...w,type:L?"text":"password",prefixCls:Z,suffix:pu.createElement(pu.Fragment,null,V,d),disabled:$,className:X,classNames:U,styles:H,variant:A};return pu.createElement(lh,{ref:ln(t,W),...Q})}),Qle=Yle,Cc=B(_()),Zle=e=>{let{componentCls:t,antCls:r,calc:n,max:a}=e,o=`${t}-btn`,[l,c]=pn(r,"input-search"),d=e.inputFontSizeSM??e.fontSize,p=a(e.controlHeightSM,n(d).mul(e.lineHeight).add(n(e.paddingBlockSM).mul(2)).add(n(e.lineWidth).mul(2)).equal());return{[t]:{[l("btn-height")]:ve(e.controlHeight),width:"100%",[o]:{height:c("btn-height"),"&:focus-visible":{zIndex:5},[`&${r}-btn-icon-only`]:{width:c("btn-height")},"&-filled":{background:e.colorFillTertiary,"&:not(:disabled)":{"&:hover":{background:e.colorFillSecondary},"&:active":{background:e.colorFill}}}},[`&${t}-large`]:{[l("btn-height")]:ve(e.controlHeightLG)},[`&${t}-small`]:{[l("btn-height")]:ve(e.controlHeightSM)},[`&${t}-small ${o}`]:{minHeight:p,[`&${e.antCls}-btn-icon-only`]:{minWidth:p}}}}},Jle=Et(["Input","Search"],e=>{let t=_t(e,pp(e));return Zle(t)},fp),eue=Cc.forwardRef((e,t)=>{let{prefixCls:r,inputPrefixCls:n,className:a,size:o,style:l,enterButton:c=!1,searchIcon:d,addonAfter:p,loading:h,disabled:g,onSearch:v,onChange:y,onCompositionStart:w,onCompositionEnd:x,variant:k,onPressEnter:F,classNames:C,styles:D,hidden:S,...A}=e,{direction:I,getPrefixCls:j,className:$,style:P,classNames:N,styles:R,searchIcon:U}=jt("inputSearch"),H=Cc.useContext(ci),q=g??H,[L,,O]=du("inputSearch",k,e.bordered),W=O?L:void 0,[z]=du("inputSearch",k,e.bordered,"input"),Y={...e,enterButton:c,variant:W},G=lt(P),Z=lt(l),[T,V]=Tt([N,C],[R,G,D,Z],{props:Y},{button:{_default:"root"}}),X=Cc.useRef(!1),Q=j("input-search",r),re=j("input",n),[J,se]=Jle(Q),{compactSize:ue}=tl(Q,I),ae=Rn(Je=>o??ue??Je),he=Cc.useRef(null),le=Je=>{Je?.target&&Je.type==="click"&&v&&v(Je.target.value,Je,{source:"clear"}),y?.(Je)},fe=Je=>{document.activeElement===he.current?.input&&Je.preventDefault()},we=Je=>{v&&v(he.current?.input?.value,Je,{source:"input"})},_e=Je=>{X.current||h||(F?.(Je),we(Je))},$e=typeof c=="boolean"?Rv(d,U,Cc.createElement(wF,null)):null,De=`${Q}-btn`,Ce=te(De,{[`${De}-${W}`]:W}),qe,Ae=c||{},Be=Ae.type&&Ae.type.__ANT_BUTTON===!0;if(Be||Ae.type==="button"){let Je=Ae.props;qe=fn(Ae,{disabled:q||Je.disabled||!Be&&h,onMouseDown:gt=>{Je.onMouseDown?.(gt),fe(gt)},onClick:gt=>{Ae?.props?.onClick?.(gt),we(gt)},key:"enterButton",...Be?{className:te(Ce,Je.className),loading:h||Je.loading,size:ae}:{}})}else qe=Cc.createElement(Iv,{classNames:T.button,styles:V.button,className:Ce,color:c?"primary":"default",size:ae,disabled:g,key:"enterButton",onMouseDown:fe,onClick:we,loading:h,icon:$e,variant:W==="borderless"||W==="filled"||W==="underlined"?"text":c?"solid":void 0},c);p&&(qe=[qe,fn(p,{key:"addonAfter"})]);let Me=te(Q,se,{[`${Q}-rtl`]:I==="rtl",[`${Q}-${ae}`]:!!ae,[`${Q}-with-button`]:!!c},a,$,J,T.root),Ue=Je=>{X.current=!0,w?.(Je)},He=Je=>{X.current=!1,x?.(Je)},Ie=no(A,{data:!0}),Ne=wr({...A,classNames:wr(T,["button","root"]),styles:wr(V,["button","root"]),prefixCls:re,type:"search",size:ae,variant:z,onPressEnter:_e,onCompositionStart:Ue,onCompositionEnd:He,onChange:le,disabled:g},Object.keys(Ie));return Cc.createElement(Fv,{className:Me,style:V.root,...Ie,hidden:S},Cc.createElement(lh,{ref:ln(he,t),...Ne}),qe)}),tue=eue,uh=lh;uh.Group=Rle;uh.Search=tue;uh.TextArea=Hv;uh.Password=Qle;uh.OTP=Kle;var EF=uh;var gL=B(_(),1),rue=B(_(),1),nue={folder:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"}],["path",{d:"M2 10h20"}]],terminal:[["path",{d:"M12 19h8"}],["path",{d:"m4 17 6-6-6-6"}]],explorer:[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1"}]],more:[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"12",cy:"5",r:"1"}],["circle",{cx:"12",cy:"19",r:"1"}]],plus:[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]],close:[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]],git:[["path",{d:"M15 6a9 9 0 0 0-9 9V3"}],["circle",{cx:"18",cy:"6",r:"3"}],["circle",{cx:"6",cy:"18",r:"3"}]],branch:[["path",{d:"M15 6a9 9 0 0 0-9 9V3"}],["circle",{cx:"18",cy:"6",r:"3"}],["circle",{cx:"6",cy:"18",r:"3"}]],rail:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}]],splitHorizontal:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M12 3v18"}]],splitVertical:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M3 12h18"}]],copy:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]],trash:[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]],hash:[["line",{x1:"4",x2:"20",y1:"9",y2:"9"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21"}]],merge:[["circle",{cx:"18",cy:"18",r:"3"}],["circle",{cx:"6",cy:"6",r:"3"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9"}]],check:[["path",{d:"M20 6 9 17l-5-5"}]],chevronLeft:[["path",{d:"m12 19-7-7 7-7"}],["path",{d:"M19 12H5"}]],eye:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]],chevronDown:[["path",{d:"m6 9 6 6 6-6"}]]};function aue(e){return nue[e==="back"?"chevronLeft":e]?.map(([t,r],n)=>rue.createElement(t,{...r,key:n}))}var ne=B(Ee(),1),vL=gL.createContext("default"),kF=vL.Provider;function iue(e){return e?"branch":"task"}function Fe({name:e,size:t=14,className:r,strokeWidth:n=1.8,slot:a}){let o=gL.useContext(vL)==="lucide"?aue(e):void 0,l=o?2:n,c={width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:l,style:{width:t,height:t,strokeWidth:l},strokeLinecap:"round",strokeLinejoin:"round",className:r,"aria-hidden":!0,"data-wand-icon":e,"data-icon":a??e};if(o)return(0,ne.jsx)("svg",{...c,"data-wand-icon-family":"lucide",children:o});switch(e){case"archive":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("rect",{x:"3",y:"4",width:"18",height:"4",rx:"1"}),(0,ne.jsx)("path",{d:"M5 8v11a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8"}),(0,ne.jsx)("path",{d:"M10 12h4"})]});case"audio":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("path",{d:"M9 18V5l11-2v13"}),(0,ne.jsx)("circle",{cx:"7",cy:"18",r:"3"}),(0,ne.jsx)("circle",{cx:"18",cy:"16",r:"3"})]});case"back":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("rect",{x:"9",y:"3",width:"12",height:"18",rx:"2"}),(0,ne.jsx)("path",{d:"M15 18h.01"}),(0,ne.jsx)("path",{d:"M6 8L2 12l4 4M2 12h8"})]});case"bell":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9M10 21h4"})});case"user":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("circle",{cx:"12",cy:"7.5",r:"3.5"}),(0,ne.jsx)("path",{d:"M5 20v-1a7 7 0 0 1 14 0v1"})]});case"users":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("circle",{cx:"9",cy:"7.5",r:"3"}),(0,ne.jsx)("path",{d:"M3.5 20v-1a5.5 5.5 0 0 1 11 0v1M16 5a3 3 0 0 1 0 5.5M20.5 20v-1a5.5 5.5 0 0 0-3.5-5.1"})]});case"binary":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M12 3l8 9-8 9-8-9 8-9z"})});case"board":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("rect",{x:"3.5",y:"4",width:"4",height:"12",rx:"1"}),(0,ne.jsx)("rect",{x:"10",y:"4",width:"4",height:"16",rx:"1"}),(0,ne.jsx)("rect",{x:"16.5",y:"4",width:"4",height:"8",rx:"1"})]});case"brain":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M12 5a3 3 0 0 0-5.8 1A4 4 0 0 0 4 13a4 4 0 0 0 8 5V5Zm0 0a3 3 0 0 1 5.8 1A4 4 0 0 1 20 13a4 4 0 0 1-8 5M8 10l4 2 4-2"})});case"branch":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("circle",{cx:"6",cy:"6",r:"2.5"}),(0,ne.jsx)("circle",{cx:"6",cy:"18",r:"2.5"}),(0,ne.jsx)("circle",{cx:"18",cy:"8",r:"2.5"}),(0,ne.jsx)("path",{d:"M6 8.5v7M18 10.5c0 4-6 2.5-6 6.5"})]});case"calendar":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("rect",{x:"4",y:"5",width:"16",height:"16",rx:"2"}),(0,ne.jsx)("path",{d:"M8 3v4M16 3v4M4 10h16M8 14h2M14 14h2M8 18h2M14 18h2"})]});case"chat":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("path",{d:"M5.5 4h13a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H9l-5.5 3V6a2 2 0 0 1 2-2Z"}),(0,ne.jsx)("path",{d:"M8 9h8"})]});case"check":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M20 6L9 17l-5-5"})});case"chevron":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M6 9l6 6 6-6"})});case"chevronDown":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M6 9l6 6 6-6"})});case"chevronUp":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M6 15l6-6 6 6"})});case"chevronLeft":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M15 6l-6 6 6 6"})});case"circle":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("circle",{cx:"12",cy:"12",r:"7"})});case"clipboard":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("rect",{x:"8",y:"3",width:"8",height:"4",rx:"1"}),(0,ne.jsx)("path",{d:"M16 5h2a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V7a2 2 0 012-2h2"})]});case"close":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M6 6l12 12M18 6L6 18"})});case"copy":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2"}),(0,ne.jsx)("path",{d:"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"})]});case"cpu":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"}),(0,ne.jsx)("rect",{x:"10",y:"10",width:"4",height:"4",rx:".5"}),(0,ne.jsx)("path",{d:"M9 3v3M15 3v3M9 18v3M15 18v3M3 9h3M3 15h3M18 9h3M18 15h3"})]});case"download":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M7 10l5 5 5-5M12 15V3"})});case"edit":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("path",{d:"M12 20h9"}),(0,ne.jsx)("path",{d:"M16.5 3.5a2.1 2.1 0 013 3L8 18l-4 1 1-4z"})]});case"enter":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("path",{d:"M9 10l-5 5 5 5"}),(0,ne.jsx)("path",{d:"M4 15h11a5 5 0 005-5V4"})]});case"explorer":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M14 3.5H6.5a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V9L14 3.5ZM14 3.5V9h5.5M8.5 13h7M8.5 16.5h5"})});case"eye":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("path",{d:"M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12z"}),(0,ne.jsx)("circle",{cx:"12",cy:"12",r:"3"})]});case"file":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("path",{d:"M14 3H6a2 2 0 00-2 2v14a2 2 0 002 2h12a2 2 0 002-2V9z"}),(0,ne.jsx)("path",{d:"M14 3v6h6"})]});case"folder":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M20.5 18a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2H10l2 3h6.5a2 2 0 0 1 2 2v9Z"})});case"gear":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("path",{d:"m9.5 3-.6 2.5-2.2 1.3-2.5-.7-2.5 4.3 1.9 1.8v2.6l-1.9 1.8 2.5 4.3 2.5-.7 2.2 1.3.6 2.5h5l.6-2.5 2.2-1.3 2.5.7 2.5-4.3-1.9-1.8v-2.6l1.9-1.8-2.5-4.3-2.5.7-2.2-1.3L14.5 3Z",transform:"translate(2 1) scale(.833333)"}),(0,ne.jsx)("circle",{cx:"12",cy:"12",r:"3"})]});case"git":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,ne.jsx)("path",{d:"M12 3v6M12 15v6"})]});case"hash":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M4 9h16M4 15h16M10 3L8 21M16 3l-2 18"})});case"history":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,ne.jsx)("path",{d:"M12 7v5l3.5 2"})]});case"home":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M4 11l8-7 8 7v9a2 2 0 01-2 2h-4v-7H10v7H6a2 2 0 01-2-2z"})});case"image":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),(0,ne.jsx)("circle",{cx:"9",cy:"9",r:"2"}),(0,ne.jsx)("path",{d:"m21 15-4.5-4.5L5 21"})]});case"info":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,ne.jsx)("path",{d:"M12 11v5M12 8h.01"})]});case"keyboard":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("rect",{x:"2",y:"6",width:"20",height:"12",rx:"2"}),(0,ne.jsx)("path",{d:"M6 10h.01M10 10h.01M14 10h.01M18 10h.01M6 14h.01M18 14h.01M9 14h6"})]});case"keycaps":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("rect",{x:"3",y:"4",width:"8",height:"6",rx:"1.5"}),(0,ne.jsx)("rect",{x:"14",y:"4",width:"7",height:"6",rx:"1.5"}),(0,ne.jsx)("rect",{x:"3",y:"13",width:"18",height:"7",rx:"1.5"}),(0,ne.jsx)("path",{d:"M9 16.5h6"})]});case"lock":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("rect",{x:"4",y:"11",width:"16",height:"10",rx:"2"}),(0,ne.jsx)("path",{d:"M8 11V7a4 4 0 0 1 8 0v4M12 15v2"})]});case"unlock":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("rect",{x:"4",y:"11",width:"16",height:"10",rx:"2"}),(0,ne.jsx)("path",{d:"M8 11V7a4 4 0 0 1 7.8-1.2M12 15v2"})]});case"logout":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4M16 17l5-5-5-5M21 12H9"})});case"markdown":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),(0,ne.jsx)("path",{d:"M7 15V9l3 4 3-4v6"})]});case"merge":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("circle",{cx:"6",cy:"6",r:"2.5"}),(0,ne.jsx)("circle",{cx:"6",cy:"18",r:"2.5"}),(0,ne.jsx)("circle",{cx:"18",cy:"18",r:"2.5"}),(0,ne.jsx)("path",{d:"M6 8.5v7M8.5 18H15.5M8.5 6c6 0 7.5 5 7.5 9.5"})]});case"milestone":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("path",{d:"M5 21V4"}),(0,ne.jsx)("path",{d:"M5 5h11l-1.6 3.5L16 12H5z"})]});case"pin":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"m9 3 6 0-1 5 4 4v2h-5v7l-1-2-1 2v-7H6v-2l4-4z"})});case"more":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("circle",{cx:"12",cy:"5",r:"1"}),(0,ne.jsx)("circle",{cx:"12",cy:"12",r:"1"}),(0,ne.jsx)("circle",{cx:"12",cy:"19",r:"1"})]});case"paperclip":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M21.44 11.05 12.25 20.24a6 6 0 0 1-8.49-8.49l8.84-8.84a4 4 0 1 1 5.66 5.66L9.41 17.41a2 2 0 1 1-2.83-2.83l8.84-8.83"})});case"parallel":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("path",{d:"M12 3l9 5-9 5-9-5 9-5z"}),(0,ne.jsx)("path",{d:"M3 13l9 5 9-5"}),(0,ne.jsx)("path",{d:"M3 17l9 5 9-5"})]});case"pdf":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("path",{d:"M14 3H6a2 2 0 00-2 2v14a2 2 0 002 2h12a2 2 0 002-2V9z"}),(0,ne.jsx)("path",{d:"M14 3v6h6M8 13h5M8 17h8"})]});case"plus":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M12 5v14M5 12h14"})});case"question":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,ne.jsx)("path",{d:"M9.8 9a2.5 2.5 0 113.5 2.3c-.9.4-1.3 1-1.3 2.2M12 17h.01"})]});case"rail":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"3"}),(0,ne.jsx)("path",{d:"M7 4v16"}),(0,ne.jsx)("path",{d:"M11 8h6M11 12h6M11 16h4"})]});case"refresh":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("path",{d:"M21 12a9 9 0 11-3-6.7"}),(0,ne.jsx)("path",{d:"M21 3v6h-6"})]});case"resume":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M1 4v6h6M3.5 15A9 9 0 109 3.6L3 10"})});case"search":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,ne.jsx)("path",{d:"M20 20l-3.5-3.5"})]});case"server":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("rect",{x:"2",y:"3",width:"20",height:"8",rx:"2"}),(0,ne.jsx)("rect",{x:"2",y:"13",width:"20",height:"8",rx:"2"}),(0,ne.jsx)("path",{d:"M6 7h.01M6 17h.01"})]});case"shield":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})});case"shieldCheck":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),(0,ne.jsx)("path",{d:"M9 12l2 2 4-4"})]});case"sigma":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M18 4H6l7 8-7 8h12"})});case"sliders":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("path",{d:"M4 7h10M18 7h2"}),(0,ne.jsx)("circle",{cx:"16",cy:"7",r:"2"}),(0,ne.jsx)("path",{d:"M4 17h2M10 17h10"}),(0,ne.jsx)("circle",{cx:"8",cy:"17",r:"2"})]});case"spark":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("path",{d:"M12 2v4M12 18v4M4.9 4.9l2.8 2.8M16.3 16.3l2.8 2.8M2 12h4M18 12h4M4.9 19.1l2.8-2.8M16.3 7.7l2.8-2.8"}),(0,ne.jsx)("circle",{cx:"12",cy:"12",r:"3"})]});case"sparkle":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("path",{d:"M12 3l1.3 3.8L17 8.1l-3.7 1.3L12 13l-1.3-3.6L7 8.1l3.7-1.3L12 3z"}),(0,ne.jsx)("path",{d:"M18 13l.7 2 2 .7-2 .7-.7 2-.7-2-2-.7 2-.7.7-2z"})]});case"splitHorizontal":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),(0,ne.jsx)("path",{d:"M12 4v16M6 9l3 3-3 3M18 9l-3 3 3 3"})]});case"splitVertical":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),(0,ne.jsx)("path",{d:"M3 12h18M9 7l3 3 3-3M9 17l3-3 3 3"})]});case"stop":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})});case"task":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("rect",{x:"5",y:"4",width:"14",height:"16",rx:"2"}),(0,ne.jsx)("path",{d:"M9 9h6M9 13h6M9 17h4"})]});case"terminal":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("rect",{x:"2.5",y:"3.5",width:"19",height:"17",rx:"3"}),(0,ne.jsx)("path",{d:"m5 7 5 5-5 5M12 17h7"})]});case"trash":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6"})});case"up":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M12 19V5M5 12l7-7 7 7"})});case"video":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),(0,ne.jsx)("path",{d:"m10 9 5 3-5 3z"})]});case"warning":return(0,ne.jsxs)("svg",{...c,children:[(0,ne.jsx)("path",{d:"M12 3l10 18H2L12 3z"}),(0,ne.jsx)("path",{d:"M12 10v5M12 18h.01"})]});case"wrench":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M14.7 6.3a4 4 0 1 1 4 4l-9 9-3.5 1 1-3.5 7.5-7.5z"})});case"zap":return(0,ne.jsx)("svg",{...c,children:(0,ne.jsx)("path",{d:"M13 2L4 14h7l-1 8 9-12h-7l1-8z"})})}}var oue=e=>{let t=e?.algorithm?jm(e.algorithm):mv,r={...vc,...e?.token};return B5(r,{override:e?.token},t,N5)},sue=oue;function lue(e){let{sizeUnit:t,sizeStep:r}=e,n=r-2;return{sizeXXL:t*(n+10),sizeXL:t*(n+6),sizeLG:t*(n+2),sizeMD:t*(n+2),sizeMS:t*(n+1),size:t*n,sizeSM:t*n,sizeXS:t*(n-1),sizeXXS:t*(n-1)}}var uue=(e,t)=>{let r=t??Hm(e),n=r.fontSizeSM,a=r.controlHeight-4;return{...r,...lue(t??e),...P5(n),controlHeight:a,..._5({...r,controlHeight:a})}},cue=uue,No=(e,t)=>new nn(e).setA(t).toRgbString(),hp=(e,t)=>new nn(e).lighten(t).toHexString(),bL=e=>{let t=Lm(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},due=(e,t,r)=>{let n=e||"#000",a=t||"#fff";return{colorBgBase:n,colorTextBase:a,colorShadow:r||"rgba(255, 255, 255, 0.2)",colorText:No(a,.85),colorTextSecondary:No(a,.65),colorTextTertiary:No(a,.45),colorTextQuaternary:No(a,.25),colorFill:No(a,.18),colorFillSecondary:No(a,.12),colorFillTertiary:No(a,.08),colorFillQuaternary:No(a,.04),colorBgSolid:No(a,.95),colorBgSolidHover:No(a,1),colorBgSolidActive:No(a,.9),colorBgElevated:hp(n,12),colorBgContainer:hp(n,8),colorBgLayout:hp(n,0),colorBgSpotlight:hp(n,26),colorBgBlur:No(a,.04),colorBorder:hp(n,26),colorBorderDisabled:hp(n,26),colorBorderSecondary:hp(n,19)}},pue=(e,t)=>{let r=Object.keys(fv).map(l=>{let c=Lm(e[l],{theme:"dark"});return Array.from({length:10},()=>1).reduce((d,p,h)=>(d[`${l}-${h+1}`]=c[h],d[`${l}${h+1}`]=c[h],d),{})}).reduce((l,c)=>(l={...l,...c},l),{}),n=t??Hm(e),a=j5(e,{generateColorPalettes:bL,generateNeutralColorPalettes:due}),o=li.reduce((l,c)=>{let d=e[c];if(d){let p=bL(d);l[`${c}Hover`]=p[7],l[`${c}Active`]=p[5]}return l},{});return{...n,...r,...a,...o,colorPrimaryBg:a.colorPrimaryBorder,colorPrimaryBgHover:a.colorPrimaryBorderHover}},fue=pue;function mue(){let[e,t,r,n]=ui();return{theme:e,token:t,hashId:r,cssVar:n}}var hue={defaultSeed:Qd.token,useToken:mue,defaultAlgorithm:Hm,darkAlgorithm:fue,compactAlgorithm:cue,getDesignToken:sue,defaultConfig:Qd,_internalContext:hv},xx=hue;var $F=Zt((e,t)=>{(function(r,n){typeof e=="object"&&typeof t<"u"?t.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs=n()})(e,(function(){"use strict";var r=1e3,n=6e4,a=36e5,o="millisecond",l="second",c="minute",d="hour",p="day",h="week",g="month",v="quarter",y="year",w="date",x="Invalid Date",k=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,F=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(q){var L=["th","st","nd","rd"],O=q%100;return"["+q+(L[(O-20)%10]||L[O]||L[0])+"]"}},D=function(q,L,O){var W=String(q);return!W||W.length>=L?q:""+Array(L+1-W.length).join(O)+q},S={s:D,z:function(q){var L=-q.utcOffset(),O=Math.abs(L),W=Math.floor(O/60),z=O%60;return(L<=0?"+":"-")+D(W,2,"0")+":"+D(z,2,"0")},m:function q(L,O){if(L.date()<O.date())return-q(O,L);var W=12*(O.year()-L.year())+(O.month()-L.month()),z=L.clone().add(W,g),Y=O-z<0,G=L.clone().add(W+(Y?-1:1),g);return+(-(W+(O-z)/(Y?z-G:G-z))||0)},a:function(q){return q<0?Math.ceil(q)||0:Math.floor(q)},p:function(q){return{M:g,y,w:h,d:p,D:w,h:d,m:c,s:l,ms:o,Q:v}[q]||String(q||"").toLowerCase().replace(/s$/,"")},u:function(q){return q===void 0}},A="en",I={};I[A]=C;var j="$isDayjsObject",$=function(q){return q instanceof U||!(!q||!q[j])},P=function q(L,O,W){var z;if(!L)return A;if(typeof L=="string"){var Y=L.toLowerCase();I[Y]&&(z=Y),O&&(I[Y]=O,z=Y);var G=L.split("-");if(!z&&G.length>1)return q(G[0])}else{var Z=L.name;I[Z]=L,z=Z}return!W&&z&&(A=z),z||!W&&A},N=function(q,L){if($(q))return q.clone();var O=typeof L=="object"?L:{};return O.date=q,O.args=arguments,new U(O)},R=S;R.l=P,R.i=$,R.w=function(q,L){return N(q,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var U=(function(){function q(O){this.$L=P(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[j]=!0}var L=q.prototype;return L.parse=function(O){this.$d=(function(W){var z=W.date,Y=W.utc;if(z===null)return new Date(NaN);if(R.u(z))return new Date;if(z instanceof Date)return new Date(z);if(typeof z=="string"&&!/Z$/i.test(z)){var G=z.match(k);if(G){var Z=G[2]-1||0,T=(G[7]||"0").substring(0,3);return Y?new Date(Date.UTC(G[1],Z,G[3]||1,G[4]||0,G[5]||0,G[6]||0,T)):new Date(G[1],Z,G[3]||1,G[4]||0,G[5]||0,G[6]||0,T)}}return new Date(z)})(O),this.init()},L.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},L.$utils=function(){return R},L.isValid=function(){return this.$d.toString()!==x},L.isSame=function(O,W){var z=N(O);return this.startOf(W)<=z&&z<=this.endOf(W)},L.isAfter=function(O,W){return N(O)<this.startOf(W)},L.isBefore=function(O,W){return this.endOf(W)<N(O)},L.$g=function(O,W,z){return R.u(O)?this[W]:this.set(z,O)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(O,W){var z=this,Y=!!R.u(W)||W,G=R.p(O),Z=function(ue,ae){var he=R.w(z.$u?Date.UTC(z.$y,ae,ue):new Date(z.$y,ae,ue),z);return Y?he:he.endOf(p)},T=function(ue,ae){return R.w(z.toDate()[ue].apply(z.toDate("s"),(Y?[0,0,0,0]:[23,59,59,999]).slice(ae)),z)},V=this.$W,X=this.$M,Q=this.$D,re="set"+(this.$u?"UTC":"");switch(G){case y:return Y?Z(1,0):Z(31,11);case g:return Y?Z(1,X):Z(0,X+1);case h:var J=this.$locale().weekStart||0,se=(V<J?V+7:V)-J;return Z(Y?Q-se:Q+(6-se),X);case p:case w:return T(re+"Hours",0);case d:return T(re+"Minutes",1);case c:return T(re+"Seconds",2);case l:return T(re+"Milliseconds",3);default:return this.clone()}},L.endOf=function(O){return this.startOf(O,!1)},L.$set=function(O,W){var z,Y=R.p(O),G="set"+(this.$u?"UTC":""),Z=(z={},z[p]=G+"Date",z[w]=G+"Date",z[g]=G+"Month",z[y]=G+"FullYear",z[d]=G+"Hours",z[c]=G+"Minutes",z[l]=G+"Seconds",z[o]=G+"Milliseconds",z)[Y],T=Y===p?this.$D+(W-this.$W):W;if(Y===g||Y===y){var V=this.clone().set(w,1);V.$d[Z](T),V.init(),this.$d=V.set(w,Math.min(this.$D,V.daysInMonth())).$d}else Z&&this.$d[Z](T);return this.init(),this},L.set=function(O,W){return this.clone().$set(O,W)},L.get=function(O){return this[R.p(O)]()},L.add=function(O,W){var z,Y=this;O=Number(O);var G=R.p(W),Z=function(X){var Q=N(Y);return R.w(Q.date(Q.date()+Math.round(X*O)),Y)};if(G===g)return this.set(g,this.$M+O);if(G===y)return this.set(y,this.$y+O);if(G===p)return Z(1);if(G===h)return Z(7);var T=(z={},z[c]=n,z[d]=a,z[l]=r,z)[G]||1,V=this.$d.getTime()+O*T;return R.w(V,this)},L.subtract=function(O,W){return this.add(-1*O,W)},L.format=function(O){var W=this,z=this.$locale();if(!this.isValid())return z.invalidDate||x;var Y=O||"YYYY-MM-DDTHH:mm:ssZ",G=R.z(this),Z=this.$H,T=this.$m,V=this.$M,X=z.weekdays,Q=z.months,re=z.meridiem,J=function(ae,he,le,fe){return ae&&(ae[he]||ae(W,Y))||le[he].slice(0,fe)},se=function(ae){return R.s(Z%12||12,ae,"0")},ue=re||function(ae,he,le){var fe=ae<12?"AM":"PM";return le?fe.toLowerCase():fe};return Y.replace(F,(function(ae,he){return he||(function(le){switch(le){case"YY":return String(W.$y).slice(-2);case"YYYY":return R.s(W.$y,4,"0");case"M":return V+1;case"MM":return R.s(V+1,2,"0");case"MMM":return J(z.monthsShort,V,Q,3);case"MMMM":return J(Q,V);case"D":return W.$D;case"DD":return R.s(W.$D,2,"0");case"d":return String(W.$W);case"dd":return J(z.weekdaysMin,W.$W,X,2);case"ddd":return J(z.weekdaysShort,W.$W,X,3);case"dddd":return X[W.$W];case"H":return String(Z);case"HH":return R.s(Z,2,"0");case"h":return se(1);case"hh":return se(2);case"a":return ue(Z,T,!0);case"A":return ue(Z,T,!1);case"m":return String(T);case"mm":return R.s(T,2,"0");case"s":return String(W.$s);case"ss":return R.s(W.$s,2,"0");case"SSS":return R.s(W.$ms,3,"0");case"Z":return G}return null})(ae)||G.replace(":","")}))},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(O,W,z){var Y,G=this,Z=R.p(W),T=N(O),V=(T.utcOffset()-this.utcOffset())*n,X=this-T,Q=function(){return R.m(G,T)};switch(Z){case y:Y=Q()/12;break;case g:Y=Q();break;case v:Y=Q()/3;break;case h:Y=(X-V)/6048e5;break;case p:Y=(X-V)/864e5;break;case d:Y=X/a;break;case c:Y=X/n;break;case l:Y=X/r;break;default:Y=X}return z?Y:R.a(Y)},L.daysInMonth=function(){return this.endOf(g).$D},L.$locale=function(){return I[this.$L]},L.locale=function(O,W){if(!O)return this.$L;var z=this.clone(),Y=P(O,W,!0);return Y&&(z.$L=Y),z},L.clone=function(){return R.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},q})(),H=U.prototype;return N.prototype=H,[["$ms",o],["$s",l],["$m",c],["$H",d],["$W",p],["$M",g],["$y",y],["$D",w]].forEach((function(q){H[q[1]]=function(L){return this.$g(L,q[0],q[1])}})),N.extend=function(q,L){return q.$i||(q(L,U,N),q.$i=!0),N},N.locale=P,N.isDayjs=$,N.unix=function(q){return N(1e3*q)},N.en=I[A],N.Ls=I,N.p={},N}))}),gue=Zt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.call=c,e.default=void 0,e.note=o,e.noteOnce=p,e.preMessage=void 0,e.resetWarned=l,e.warning=a,e.warningOnce=d;var t={},r=[],n=g=>{r.push(g)};e.preMessage=n;function a(g,v){}function o(g,v){}function l(){t={}}function c(g,v,y){!v&&!t[y]&&(g(!1,y),t[y]=!0)}function d(g,v){c(a,g,v)}function p(g,v){c(o,g,v)}d.preMessage=n,d.resetWarned=l,d.noteOnce=p;var h=e.default=d}),dh=Zt((e,t)=>{function r(n){return n&&n.__esModule?n:{default:n}}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}),vue=Zt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},r=e.default=t}),xL=Zt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.commonLocale=void 0;var t=e.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0}}),bue=Zt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=xL(),r={...t.commonLocale,locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Last year",nextYear:"Next year",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},n=e.default=r}),EL=Zt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},r=e.default=t}),kL=Zt(e=>{"use strict";var t=dh().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(bue()),n=t(EL()),a={lang:{placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"],...r.default},timePickerLocale:{...n.default}},o=e.default=a}),yue=Zt(e=>{"use strict";var t=dh().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(kL()),n=e.default=r.default}),wue=Zt(e=>{"use strict";var t=dh().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(vue()),n=t(yue()),a=t(kL()),o=t(EL()),l="${label} is not a valid ${type}",c={locale:"en",Pagination:r.default,DatePicker:a.default,TimePicker:o.default,Calendar:n.default,global:{placeholder:"Please select",close:"Close",sortable:"sortable",show:"Show",hide:"Hide"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Carousel:{prevSlide:"Previous slide",nextSlide:"Next slide"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:l,method:l,array:l,object:l,number:l,date:l,boolean:l,integer:l,float:l,regexp:l,email:l,url:l,hex:l},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}},d=e.default=c}),xue=Zt((e,t)=>{t.exports=wue()}),Eue=Zt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t={items_per_page:"\u6761/\u9875",jump_to:"\u8DF3\u81F3",jump_to_confirm:"\u786E\u5B9A",page:"\u9875",prev_page:"\u4E0A\u4E00\u9875",next_page:"\u4E0B\u4E00\u9875",prev_5:"\u5411\u524D 5 \u9875",next_5:"\u5411\u540E 5 \u9875",prev_3:"\u5411\u524D 3 \u9875",next_3:"\u5411\u540E 3 \u9875",page_size:"\u9875\u7801"},r=e.default=t}),kue=Zt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=xL(),r={...t.commonLocale,locale:"zh_CN",today:"\u4ECA\u5929",now:"\u6B64\u523B",backToToday:"\u8FD4\u56DE\u4ECA\u5929",ok:"\u786E\u5B9A",timeSelect:"\u9009\u62E9\u65F6\u95F4",dateSelect:"\u9009\u62E9\u65E5\u671F",weekSelect:"\u9009\u62E9\u5468",clear:"\u6E05\u9664",week:"\u5468",month:"\u6708",year:"\u5E74",previousMonth:"\u4E0A\u4E2A\u6708",nextMonth:"\u4E0B\u4E2A\u6708",monthSelect:"\u9009\u62E9\u6708\u4EFD",yearSelect:"\u9009\u62E9\u5E74\u4EFD",decadeSelect:"\u9009\u62E9\u5E74\u4EE3",previousYear:"\u4E0A\u4E00\u5E74",nextYear:"\u4E0B\u4E00\u5E74",previousDecade:"\u4E0A\u4E00\u5E74\u4EE3",nextDecade:"\u4E0B\u4E00\u5E74\u4EE3",previousCentury:"\u4E0A\u4E00\u4E16\u7EAA",nextCentury:"\u4E0B\u4E00\u4E16\u7EAA",yearFormat:"YYYY\u5E74",cellDateFormat:"D",monthBeforeYear:!1},n=e.default=r}),CL=Zt(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t={placeholder:"\u8BF7\u9009\u62E9\u65F6\u95F4",rangePlaceholder:["\u5F00\u59CB\u65F6\u95F4","\u7ED3\u675F\u65F6\u95F4"]},r=e.default=t}),SL=Zt(e=>{"use strict";var t=dh().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(kue()),n=t(CL()),a={lang:{placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F",yearPlaceholder:"\u8BF7\u9009\u62E9\u5E74\u4EFD",quarterPlaceholder:"\u8BF7\u9009\u62E9\u5B63\u5EA6",monthPlaceholder:"\u8BF7\u9009\u62E9\u6708\u4EFD",weekPlaceholder:"\u8BF7\u9009\u62E9\u5468",rangePlaceholder:["\u5F00\u59CB\u65E5\u671F","\u7ED3\u675F\u65E5\u671F"],rangeYearPlaceholder:["\u5F00\u59CB\u5E74\u4EFD","\u7ED3\u675F\u5E74\u4EFD"],rangeMonthPlaceholder:["\u5F00\u59CB\u6708\u4EFD","\u7ED3\u675F\u6708\u4EFD"],rangeQuarterPlaceholder:["\u5F00\u59CB\u5B63\u5EA6","\u7ED3\u675F\u5B63\u5EA6"],rangeWeekPlaceholder:["\u5F00\u59CB\u5468","\u7ED3\u675F\u5468"],...r.default},timePickerLocale:{...n.default}};a.lang.ok="\u786E\u5B9A";var o=e.default=a}),Cue=Zt(e=>{"use strict";var t=dh().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(SL()),n=e.default=r.default}),Sue=Zt(e=>{"use strict";var t=dh().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(Eue()),n=t(Cue()),a=t(SL()),o=t(CL()),l="${label}\u4E0D\u662F\u4E00\u4E2A\u6709\u6548\u7684${type}",c={locale:"zh-cn",Pagination:r.default,DatePicker:a.default,TimePicker:o.default,Calendar:n.default,global:{placeholder:"\u8BF7\u9009\u62E9",close:"\u5173\u95ED",sortable:"\u53EF\u6392\u5E8F",show:"\u663E\u793A",hide:"\u9690\u85CF"},Table:{filterTitle:"\u7B5B\u9009",filterConfirm:"\u786E\u5B9A",filterReset:"\u91CD\u7F6E",filterEmptyText:"\u65E0\u7B5B\u9009\u9879",filterCheckAll:"\u5168\u9009",filterSearchPlaceholder:"\u5728\u7B5B\u9009\u9879\u4E2D\u641C\u7D22",emptyText:"\u6682\u65E0\u6570\u636E",selectAll:"\u5168\u9009\u5F53\u9875",selectInvert:"\u53CD\u9009\u5F53\u9875",selectNone:"\u6E05\u7A7A\u6240\u6709",selectionAll:"\u5168\u9009\u6240\u6709",sortTitle:"\u6392\u5E8F",expand:"\u5C55\u5F00\u884C",collapse:"\u5173\u95ED\u884C",triggerDesc:"\u70B9\u51FB\u964D\u5E8F",triggerAsc:"\u70B9\u51FB\u5347\u5E8F",cancelSort:"\u53D6\u6D88\u6392\u5E8F"},Modal:{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",justOkText:"\u77E5\u9053\u4E86"},Tour:{Next:"\u4E0B\u4E00\u6B65",Previous:"\u4E0A\u4E00\u6B65",Finish:"\u7ED3\u675F\u5BFC\u89C8"},Popconfirm:{cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A"},Transfer:{titles:["",""],searchPlaceholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",itemUnit:"\u9879",itemsUnit:"\u9879",remove:"\u5220\u9664",selectCurrent:"\u5168\u9009\u5F53\u9875",removeCurrent:"\u5220\u9664\u5F53\u9875",selectAll:"\u5168\u9009\u6240\u6709",deselectAll:"\u53D6\u6D88\u5168\u9009",removeAll:"\u5220\u9664\u5168\u90E8",selectInvert:"\u53CD\u9009\u5F53\u9875"},Upload:{uploading:"\u6587\u4EF6\u4E0A\u4F20\u4E2D",removeFile:"\u5220\u9664\u6587\u4EF6",uploadError:"\u4E0A\u4F20\u9519\u8BEF",previewFile:"\u9884\u89C8\u6587\u4EF6",downloadFile:"\u4E0B\u8F7D\u6587\u4EF6"},Empty:{description:"\u6682\u65E0\u6570\u636E"},Icon:{icon:"\u56FE\u6807"},Text:{edit:"\u7F16\u8F91",copy:"\u590D\u5236",copied:"\u590D\u5236\u6210\u529F",expand:"\u5C55\u5F00",collapse:"\u6536\u8D77"},Carousel:{prevSlide:"\u4E0A\u4E00\u5F20\u5E7B\u706F\u7247",nextSlide:"\u4E0B\u4E00\u5F20\u5E7B\u706F\u7247"},Form:{optional:"\uFF08\u53EF\u9009\uFF09",defaultValidateMessages:{default:"\u5B57\u6BB5\u9A8C\u8BC1\u9519\u8BEF${label}",required:"\u8BF7\u8F93\u5165${label}",enum:"${label}\u5FC5\u987B\u662F\u5176\u4E2D\u4E00\u4E2A[${enum}]",whitespace:"${label}\u4E0D\u80FD\u4E3A\u7A7A\u5B57\u7B26",date:{format:"${label}\u65E5\u671F\u683C\u5F0F\u65E0\u6548",parse:"${label}\u4E0D\u80FD\u8F6C\u6362\u4E3A\u65E5\u671F",invalid:"${label}\u662F\u4E00\u4E2A\u65E0\u6548\u65E5\u671F"},types:{string:l,method:l,array:l,object:l,number:l,date:l,boolean:l,integer:l,float:l,regexp:l,email:l,url:l,hex:l},string:{len:"${label}\u987B\u4E3A${len}\u4E2A\u5B57\u7B26",min:"${label}\u6700\u5C11${min}\u4E2A\u5B57\u7B26",max:"${label}\u6700\u591A${max}\u4E2A\u5B57\u7B26",range:"${label}\u987B\u5728${min}-${max}\u5B57\u7B26\u4E4B\u95F4"},number:{len:"${label}\u5FC5\u987B\u7B49\u4E8E${len}",min:"${label}\u6700\u5C0F\u503C\u4E3A${min}",max:"${label}\u6700\u5927\u503C\u4E3A${max}",range:"${label}\u987B\u5728${min}-${max}\u4E4B\u95F4"},array:{len:"\u987B\u4E3A${len}\u4E2A${label}",min:"\u6700\u5C11${min}\u4E2A${label}",max:"\u6700\u591A${max}\u4E2A${label}",range:"${label}\u6570\u91CF\u987B\u5728${min}-${max}\u4E4B\u95F4"},pattern:{mismatch:"${label}\u4E0E\u6A21\u5F0F\u4E0D\u5339\u914D${pattern}"}}},QRCode:{expired:"\u4E8C\u7EF4\u7801\u8FC7\u671F",refresh:"\u70B9\u51FB\u5237\u65B0",scanned:"\u5DF2\u626B\u63CF"},ColorPicker:{presetEmpty:"\u6682\u65E0",transparent:"\u65E0\u8272",singleColor:"\u5355\u8272",gradientColor:"\u6E10\u53D8\u8272"}},d=e.default=c}),Fue=Zt((e,t)=>{t.exports=Sue()}),Due=Zt((e,t)=>{(function(r,n){typeof e=="object"&&typeof t<"u"?t.exports=n($F()):typeof define=="function"&&define.amd?define(["dayjs"],n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_locale_zh_cn=n(r.dayjs)})(e,(function(r){"use strict";function n(l){return l&&typeof l=="object"&&"default"in l?l:{default:l}}var a=n(r),o={name:"zh-cn",weekdays:"\u661F\u671F\u65E5_\u661F\u671F\u4E00_\u661F\u671F\u4E8C_\u661F\u671F\u4E09_\u661F\u671F\u56DB_\u661F\u671F\u4E94_\u661F\u671F\u516D".split("_"),weekdaysShort:"\u5468\u65E5_\u5468\u4E00_\u5468\u4E8C_\u5468\u4E09_\u5468\u56DB_\u5468\u4E94_\u5468\u516D".split("_"),weekdaysMin:"\u65E5_\u4E00_\u4E8C_\u4E09_\u56DB_\u4E94_\u516D".split("_"),months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),ordinal:function(l,c){return c==="W"?l+"\u5468":l+"\u65E5"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5E74M\u6708D\u65E5",LLL:"YYYY\u5E74M\u6708D\u65E5Ah\u70B9mm\u5206",LLLL:"YYYY\u5E74M\u6708D\u65E5ddddAh\u70B9mm\u5206",l:"YYYY/M/D",ll:"YYYY\u5E74M\u6708D\u65E5",lll:"YYYY\u5E74M\u6708D\u65E5 HH:mm",llll:"YYYY\u5E74M\u6708D\u65E5dddd HH:mm"},relativeTime:{future:"%s\u5185",past:"%s\u524D",s:"\u51E0\u79D2",m:"1 \u5206\u949F",mm:"%d \u5206\u949F",h:"1 \u5C0F\u65F6",hh:"%d \u5C0F\u65F6",d:"1 \u5929",dd:"%d \u5929",M:"1 \u4E2A\u6708",MM:"%d \u4E2A\u6708",y:"1 \u5E74",yy:"%d \u5E74"},meridiem:function(l,c){var d=100*l+c;return d<600?"\u51CC\u6668":d<900?"\u65E9\u4E0A":d<1100?"\u4E0A\u5348":d<1300?"\u4E2D\u5348":d<1800?"\u4E0B\u5348":"\u665A\u4E0A"}};return a.default.locale(o,null,!0),o}))}),FL={};Jl(FL,{MOTION_DWELL_FAILED_MS:()=>fh,MOTION_DWELL_RESULT_SENTENCE_MS:()=>DL,MOTION_DWELL_SENT_MS:()=>ph,MOTION_PROCESSING_STAGGER_MS:()=>AL,readMotionTokenMs:()=>Wv,useReducedMotion:()=>ua});var yL=B(_(),1),ph=720,fh=1500,DL=1200,AL=150;function Wv(e){if(typeof document>"u")return 0;let t=getComputedStyle(document.documentElement).getPropertyValue(e).trim(),r=Number.parseFloat(t);return Number.isFinite(r)?r*(t.endsWith("ms")?1:1e3):0}function ua(){let e=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,[t,r]=yL.useState(e);return yL.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let n=window.matchMedia("(prefers-reduced-motion: reduce)"),a=()=>r(n.matches);return n.addEventListener("change",a),a(),()=>n.removeEventListener("change",a)},[]),t}var $L={};Jl($L,{PopupOwnerProvider:()=>Cx,PortalContainerProvider:()=>hh,REACT_UI_PORTALS_ID:()=>Vv,documentPortalContainer:()=>Uv,useParentPopupOwner:()=>mh,usePortalContainer:()=>Ra});var kx=B(_(),1),BL=B(Ee(),1),Vv="wand-react-ui-portals",IL=(0,kx.createContext)(null),ML=(0,kx.createContext)(null);function Cx({owner:e,children:t}){return(0,BL.jsx)(ML.Provider,{value:e,children:t})}function mh(){return(0,kx.useContext)(ML)}function hh({container:e,children:t}){return(0,BL.jsx)(IL.Provider,{value:e,children:t})}function Uv(){if(!(typeof document>"u"))return document.getElementById(Vv)??void 0}function Ra(){return(0,kx.useContext)(IL)??Uv()}var TL={};Jl(TL,{WandUiBoundary:()=>or,WandUiMeasurementProvider:()=>Gv,WandUiProvider:()=>La,getWandTerminalTheme:()=>Sc,getWandTheme:()=>Kv,installWandThemeTokens:()=>AF,wandTheme:()=>gh});var ch=B(_(),1),gp=B(_()),wL=B(_()),S7e=B(gue()),F7e=B(_());function Aue(){}var $ue=Aue,Bue=$ue,Iue=B(_()),Mue=(0,Iue.createContext)(void 0),jL=Mue,Tue=B(xue()),CF=B(_()),jue={locale:"en",Conversations:{create:"New chat"},Sender:{stopLoading:"Stop loading",speechRecording:"Speech recording"},Actions:{feedbackLike:"Like",feedbackDislike:"Dislike",audio:"Play audio",audioRunning:"Audio playing",audioError:"Playback error",audioLoading:"Loading audio"},Bubble:{editableOk:"OK",editableCancel:"Cancel"},Mermaid:{zoomIn:"Zoom in",zoomOut:"Zoom out",zoomReset:"Reset",download:"Download",code:"Code",image:"Image"},Folder:{selectFile:"Please select a file",loadError:"Failed to load file",noService:"File content service not configured",loadFailed:"Failed to load file"}},SF=jue,_ue=(e,t)=>{let r=CF.useContext(jL),n=CF.useMemo(()=>{let o=t||SF?.[e]||Tue.default?.[e],l=r?.[e]??{};return{...typeof o=="function"?o():o,...l||{}}},[e,t,r]),a=CF.useMemo(()=>{let o=r?.locale;return r?.exist&&!o?SF.locale:o},[r]);return[n,a]},Pue=_ue,Nue="internalMark",Oue=e=>{let{locale:t={},children:r,_ANT_MARK__:n}=e,a=wL.useMemo(()=>({...t,exist:!0}),[t]);return wL.createElement(jL.Provider,{value:a},r)},Rue=Oue,Lue=B(_()),zue=Lue.default.createContext({}),_L=zue,Hue=B(_()),que="ant";function Wue(){let{getPrefixCls:e,direction:t,csp:r,iconPrefixCls:n,theme:a}=Hue.default.useContext(Gm.ConfigContext);return{theme:a,getPrefixCls:e,direction:t,csp:r,iconPrefixCls:n}}var Vue=Wue,Uue=e=>{let{actions:t,attachments:r,bubble:n,conversations:a,prompts:o,sender:l,suggestion:c,thoughtChain:d,welcome:p,fileCard:h,think:g,theme:v,locale:y,children:w,mermaid:x,codeHighlighter:k,iconPrefixCls:F,...C}=e,D=gp.default.useMemo(()=>({actions:t,attachments:r,bubble:n,conversations:a,prompts:o,sender:l,suggestion:c,thoughtChain:d,fileCard:h,think:g,mermaid:x,codeHighlighter:k,welcome:p}),[t,r,n,a,o,l,c,d,p,x,g,h,k]),S=w;y&&(S=gp.default.createElement(Rue,{locale:y,_ANT_MARK__:Nue},S));let{layer:A}=gp.default.useContext(xc),I=gp.default.useMemo(()=>({prefixCls:F,csp:C.csp,layer:A?"antdx":void 0}),[F,C.csp,A]);return(F||C.csp)&&(S=gp.default.createElement(Vm.Provider,{value:I},S)),gp.default.createElement(_L.Provider,{value:D},gp.default.createElement(Gm,Dn({},C,{theme:v,locale:y}),S))},Kue=Uue;function Gue(){let e=Kue,t=typeof e=="function"?e:e?.default;if(typeof t!="function")throw new Error("@ant-design/x/es/x-provider \u672A\u5BFC\u51FA XProvider \u7EC4\u4EF6");return t}var PL=Gue(),NL=B(Fue(),1),Xue={locale:"zh-cn",Conversations:{create:"\u65B0\u5BF9\u8BDD"},Sender:{stopLoading:"\u505C\u6B62\u8BF7\u6C42",speechRecording:"\u6B63\u5728\u5F55\u97F3"},Actions:{feedbackLike:"\u559C\u6B22",feedbackDislike:"\u4E0D\u559C\u6B22",audio:"\u64AD\u653E\u8BED\u97F3",audioRunning:"\u8BED\u97F3\u64AD\u653E\u4E2D",audioError:"\u64AD\u653E\u51FA\u9519\u4E86",audioLoading:"\u6B63\u5728\u52A0\u8F7D\u8BED\u97F3"},Bubble:{editableOk:"\u786E\u8BA4",editableCancel:"\u53D6\u6D88"},Mermaid:{zoomIn:"\u653E\u5927",zoomOut:"\u7F29\u5C0F",zoomReset:"\u91CD\u7F6E",download:"\u4E0B\u8F7D",code:"\u4EE3\u7801",image:"\u56FE\u7247"},Folder:{selectFile:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u6587\u4EF6",loadError:"\u6587\u4EF6\u52A0\u8F7D\u5931\u8D25",noService:"\u672A\u914D\u7F6E\u6587\u4EF6\u5185\u5BB9\u670D\u52A1",loadFailed:"\u52A0\u8F7D\u6587\u4EF6\u5931\u8D25"}},OL=Xue,Yue=B($F(),1),D7e=B(Due(),1),BF="wand-theme",Ex=[{id:"warm",name:"\u6696\u767D\u94DC\u8272",dark:!1,primary:"#b8562f",primaryHover:"#9e4b29",primaryActive:"#873e23",link:"#9e4b29",focus:"#b8562f",text:"#29241f",secondary:"#6b5e54",background:"#faf8f5",surface:"#fffdfa",sidebar:"#f4f0e9",selected:"#ebe0d3",hover:"#ece6dd",border:"#ebe5dd",terminal:"#17120f",terminalText:"#f4eee6",terminalCursor:"#d88d60"},{id:"blue",name:"\u77F3\u58A8\u84DD",dark:!1,primary:"#395f87",primaryHover:"#2e4f73",primaryActive:"#24415f",link:"#395f87",focus:"#395f87",text:"#252d36",secondary:"#546477",background:"#f6f8fa",surface:"#fcfdff",sidebar:"#edf1f6",selected:"#dee7f1",hover:"#e6ecf3",border:"#dfe6ee",terminal:"#141b24",terminalText:"#e5edf7",terminalCursor:"#93b9e6"},{id:"forest",name:"\u68EE\u6797\u7EFF",dark:!1,primary:"#3c6750",primaryHover:"#2f5441",primaryActive:"#254534",link:"#3c6750",focus:"#3c6750",text:"#253029",secondary:"#526759",background:"#f7f9f6",surface:"#fcfdfa",sidebar:"#edf2eb",selected:"#dfe9dd",hover:"#e7eee4",border:"#dfe7dc",terminal:"#142019",terminalText:"#e7f0e5",terminalCursor:"#a0cba4"},{id:"mauve",name:"\u96FE\u7D2B",dark:!1,primary:"#735583",primaryHover:"#604570",primaryActive:"#50395e",link:"#735583",focus:"#735583",text:"#302934",secondary:"#675b6d",background:"#f9f7fa",surface:"#fefcfe",sidebar:"#f1edf4",selected:"#e8dfed",hover:"#eee7f1",border:"#e7dfea",terminal:"#201923",terminalText:"#f0e7f5",terminalCursor:"#c7a9dc"},{id:"graphite",name:"\u6DF1\u8272\u77F3\u58A8",dark:!0,primary:"#47678e",primaryHover:"#4f7399",primaryActive:"#3c587a",link:"#b0c9e9",focus:"#a5c5ef",text:"#e5e9ef",secondary:"#b0b9c7",background:"#191d23",surface:"#232830",sidebar:"#1e232a",selected:"#303f51",hover:"#2c333e",border:"#3b4452",terminal:"#11151a",terminalText:"#e5e9ef",terminalCursor:"#a5c5ef"}];function RL(e){return Ex.find(t=>t.id===e)?.id??"warm"}function IF(e){return Ex.find(t=>t.id===e)??Ex[0]}function Que(e,t){return{...e.dark?{algorithm:t}:{},token:{colorPrimary:e.primary,colorPrimaryHover:e.primaryHover,colorPrimaryActive:e.primaryActive,colorPrimaryText:e.link,colorPrimaryTextHover:e.dark?"#c5d8f1":e.primaryHover,colorPrimaryTextActive:e.dark?"#dbe6f5":e.primaryActive,colorPrimaryBg:e.selected,colorPrimaryBgHover:e.hover,colorPrimaryBorder:e.focus,colorLink:e.link,colorLinkHover:e.dark?"#c5d8f1":e.primaryHover,colorLinkActive:e.dark?"#dbe6f5":e.primaryActive,lineWidthFocus:2,controlOutline:e.focus,controlOutlineWidth:2,colorInfo:e.primary,colorInfoText:e.link,colorInfoBg:e.selected,colorSuccess:"#4f7a58",colorSuccessText:e.dark?"#9acda5":"#456d4e",colorSuccessTextHover:e.dark?"#b3dfbc":"#3b5f43",colorSuccessTextActive:e.dark?"#c7e8cd":"#2f5036",colorSuccessBg:e.dark?"#24392d":"#eff6ed",colorWarning:"#8b640d",colorWarningText:e.dark?"#ddbc72":"#8b640d",colorWarningBg:e.dark?"#3b3221":"#fff6dd",colorError:"#b7342e",colorErrorHover:"#9f2a25",colorErrorActive:"#87201d",colorErrorBg:e.dark?"#3c2728":"#fff1ee",colorErrorBgHover:e.dark?"#4b2c2e":"#ffe9e4",colorErrorBgFilledHover:e.dark?"#4b2c2e":"#ffe7e2",colorErrorBgActive:e.dark?"#522e30":"#ffddd6",colorErrorBorder:e.dark?"#ae645f":"#d87c70",colorErrorBorderHover:e.dark?"#f3978e":"#b7342e",colorErrorText:e.dark?"#f3978e":"#b7342e",colorErrorTextHover:e.dark?"#ffb7af":"#9f2a25",colorErrorTextActive:e.dark?"#ffd1cb":"#87201d",colorText:e.text,colorTextSecondary:e.secondary,colorTextDescription:e.secondary,colorTextPlaceholder:e.secondary,colorBgLayout:e.background,colorBgContainer:e.surface,colorBgElevated:e.surface,colorBorderSecondary:e.border,borderRadius:8,fontFamily:'-apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif',fontSize:14,fontSizeSM:12,zIndexPopupBase:20010},components:{Layout:{siderBg:e.sidebar,headerBg:e.surface,bodyBg:e.background},Menu:{itemBg:"transparent",subMenuItemBg:"transparent",itemSelectedBg:e.selected,itemSelectedColor:e.link,itemHoverBg:e.hover},Tree:{nodeHoverBg:e.hover,directoryNodeSelectedBg:e.selected,directoryNodeSelectedColor:e.link},Button:{primaryShadow:"none"}}}}function Zue(e,t){return{"bg-primary":e.colorBgLayout,"bg-secondary":e.colorFillAlter,"bg-tertiary":e.colorFillSecondary,"bg-elevated":e.colorBgContainer,"bg-surface":e.colorBgContainer,"bg-sidebar":t.sidebar,"bg-terminal":t.terminal,"bg-hover":t.hover,"bg-active":t.selected,"sidebar-rail":t.id==="warm"?"#eeede9":t.sidebar,"sidebar-surface":t.id==="warm"?"#f7f6f2":t.surface,"sidebar-hover":t.id==="warm"?"#eeece7":t.hover,"sidebar-selected":t.id==="warm"?"#e9e3f4":t.selected,"sidebar-accent":t.id==="warm"?"#6a5486":t.link,"border-subtle":e.colorBorderSecondary,"border-default":e.colorBorder,"border-strong":e.colorTextTertiary,border:e.colorBorder,"border-focus":t.focus,"text-primary":e.colorText,"text-secondary":e.colorTextSecondary,"text-tertiary":e.colorTextTertiary,"text-muted":e.colorTextSecondary,"text-inverse":e.colorTextLightSolid,"text-link":e.colorLink,accent:t.link,"accent-solid":e.colorPrimary,"accent-hover":e.colorPrimaryTextHover,"accent-solid-hover":e.colorPrimaryHover,"accent-active":e.colorPrimaryTextActive,"accent-strong":e.colorPrimaryTextActive,"accent-muted":t.selected,"accent-soft":e.colorPrimaryBorder,success:e.colorSuccessText,"success-hover":e.colorSuccessTextHover,"success-muted":e.colorSuccessBg,warning:e.colorWarningText,"warning-muted":e.colorWarningBg,danger:e.colorErrorText,"danger-hover":e.colorErrorTextHover,"danger-muted":e.colorErrorBg,info:e.colorInfoText,"info-muted":e.colorInfoBg,permission:e.colorWarningText,"permission-muted":e.colorWarningBg,thinking:e.colorTextSecondary,"syntax-keyword":t.dark?"#cfb4ed":"#8250df","syntax-string":t.dark?"#9acda5":"#0a7d37","syntax-number":t.dark?"#ddbc72":"#965100","syntax-comment":t.secondary,"syntax-operator":t.dark?"#f1a9ce":"#b2085f","selection-bg":t.dark?"#364965":t.selected,"find-highlight-bg":t.dark?"#54461b":"#fff5bd","find-active-bg":t.dark?"#644324":"#ffdbc0","font-sans":e.fontFamily,"font-mono":e.fontFamilyCode,"font-size-2xs":"12px","font-size-xs":`${e.fontSizeSM}px`,"font-size-sm":`${e.fontSize}px`,"font-size-base":`${e.fontSize}px`,"font-size-lg":`${e.fontSizeLG}px`,"font-size-xl":`${e.fontSizeHeading3}px`,"font-weight-regular":400,"font-weight-medium":500,"font-weight-semibold":e.fontWeightStrong,"font-weight-bold":e.fontWeightStrong,"line-height-tight":e.lineHeightHeading3,"line-height-base":e.lineHeight,"line-height-relaxed":e.lineHeight,"radius-xs":`${e.borderRadiusSM}px`,"radius-sm":`${e.borderRadius}px`,"radius-md":`${e.borderRadiusLG}px`,"radius-lg":`${e.borderRadiusLG}px`,"radius-full":"9999px","control-radius":`${e.borderRadius}px`,"shadow-xs":e.boxShadowTertiary,"shadow-sm":e.boxShadowTertiary,"shadow-md":e.boxShadowSecondary,"shadow-lg":e.boxShadowSecondary,"shadow-xl":e.boxShadow,"shadow-elevated":e.boxShadowSecondary,"float-bg":e.colorBgElevated,"float-border":e.colorBorderSecondary,"float-radius":`${e.borderRadiusLG}px`,"float-shadow":e.boxShadowSecondary,"scrollbar-thumb":e.colorTextQuaternary,"scrollbar-hover":e.colorTextTertiary,"scrollbar-active":e.colorTextSecondary,"scrollbar-track":"transparent"}}function Jue(e){return`:root { ${Object.entries(e).map(([t,r])=>`--${t}: ${r};`).join(" ")} }`}function LL(){try{return RL(window.localStorage.getItem(BF))}catch{return"warm"}}var FF=LL(),DF=new Set;function zL(e){if(e!==FF){FF=e;for(let t of DF)t()}}var po={subscribe(e){return DF.add(e),()=>{DF.delete(e)}},getSnapshot:()=>FF,getServerSnapshot:()=>"warm"};function ece(e){let t=RL(e),r=!0;try{window.localStorage.setItem(BF,t)}catch{r=!1}return zL(t),r}typeof window<"u"&&window.addEventListener("storage",e=>{(e.key===BF||e.key===null)&&zL(LL())});var qv=B(Ee(),1);Yue.default.locale("zh-cn");var MF=ch.createContext(!1);function Kv(e){return Que(IF(e),xx.darkAlgorithm)}var gh=Kv("warm");function Sc(e=po.getSnapshot()){let t=IF(e);return{background:t.terminal,foreground:t.terminalText,cursor:t.terminalCursor,selectionBackground:t.dark?"#364965":"#49413d"}}function AF(e=document){let t=po.getSnapshot(),r=IF(t),n=xx.getDesignToken(Kv(t)),a=e.getElementById("wand-theme-tokens");a||(a=e.createElement("style"),a.id="wand-theme-tokens",e.head.appendChild(a)),a.textContent=Jue(Zue(n,r)),e.documentElement.dataset.wandTheme=t,e.documentElement.style.colorScheme=r.dark?"dark":"light",e.querySelector('meta[name="theme-color"]')?.setAttribute("content",r.background)}typeof document<"u"&&(AF(),po.subscribe(()=>AF()));function La({children:e}){let t=ch.useSyncExternalStore(po.subscribe,po.getSnapshot,po.getServerSnapshot),r=ch.useMemo(()=>Kv(t),[t]),n=Ra(),a=ua(),o=ch.useMemo(()=>{let l=typeof document>"u"?null:getComputedStyle(document.documentElement),c=(d,p)=>l?.getPropertyValue(d).trim()||p;return{...r,cssVar:{key:a?"wand-ui-reduced":"wand-ui"},token:{...r.token,motion:!0,motionDurationFast:a?"0.00001s":c("--motion-fast","0.12s"),motionDurationMid:a?"0.00001s":c("--motion-normal","0.22s"),motionDurationSlow:a?"0.00001s":c("--motion-normal","0.22s"),motionEaseInOut:c("--ease-in-out-smooth","ease-in-out"),motionEaseOut:c("--ease-out-expo","ease-out")}}},[a,r]);return(0,qv.jsx)(MF.Provider,{value:!0,children:(0,qv.jsx)(PL,{locale:{...NL.default,...OL},theme:o,getPopupContainer:()=>n??document.body,children:e})})}function or({children:e}){return ch.useContext(MF)?e:(0,qv.jsx)(La,{children:e})}function Gv({children:e}){let t=ch.useSyncExternalStore(po.subscribe,po.getSnapshot,po.getServerSnapshot),r=Kv(t);return(0,qv.jsx)(MF.Provider,{value:!0,children:(0,qv.jsx)(PL,{locale:{...NL.default,...OL},theme:{...r,cssVar:{key:"wand-ui-measurement"},token:{...r.token,motion:!1}},children:e})})}var tce=B(_(),1),Sx=B(Ee(),1);function vp({className:e,size:t="md",inputSize:r=t,variant:n="outline",inputProps:a,startSlot:o,endSlot:l,clearable:c,clearLabel:d="\u6E05\u9664\u8F93\u5165",onClear:p,ref:h,...g}){let v=tce.useCallback(w=>{let x=w?.input??null;if(typeof h=="function")return h(x);h&&(h.current=x)},[h]),y=a?.["aria-invalid"]??g["aria-invalid"];return(0,Sx.jsx)(or,{children:(0,Sx.jsx)(EF,{...g,...a,status:y===!0||y==="true"?"error":void 0,variant:n==="outline"?"outlined":"filled",ref:v,prefix:o,suffix:l,allowClear:c?{clearIcon:(0,Sx.jsx)("span",{"aria-label":d,children:(0,Sx.jsx)(Fe,{name:"close",size:14})})}:!1,onClear:p,size:r==="sm"?"small":r==="lg"?"large":"middle",className:ct("wand-ui-input",e)})})}var VL={};Jl(VL,{hasOpenOwnedPopupSurface:()=>Dx,hasOpenPopupSurface:()=>bp,isWandPopupOwnedBy:()=>yp,popupOffset:()=>Dc,popupPlacement:()=>Fc,registerPopupDismiss:()=>Xv,registerPopupOwner:()=>vh,usePopupDismiss:()=>Ln});var HL=B(_(),1);function Fc(e,t){return e==="top"||e==="bottom"?t==="center"?e:`${e}${t==="end"?"Right":"Left"}`:t==="center"?e:`${e}${t==="end"?"Bottom":"Top"}`}function Dc(e,t){return e==="left"?[-t,0]:e==="right"?[t,0]:[0,e==="top"?-t:t]}var ms=[];function UL(){for(let e=ms.length-1;e>=0;e-=1)if(ms[e]?.priority==="blocking")return ms[e];return ms.at(-1)}function bp(){return ms.length>0||Array.from(document.querySelectorAll("[role=dialog],[data-wand-dialog-surface],.ant-select-dropdown,.ant-dropdown,.ant-popover")).some(e=>e.getClientRects().length&&getComputedStyle(e).visibility!=="hidden")}function qL(e){e.key!=="Escape"||e.isComposing||!ms.length||(e.preventDefault(),e.stopImmediatePropagation(),UL()?.dismiss())}function WL(){UL()?.dismiss()}function Xv(e,t="normal"){ms.length||(document.addEventListener("keydown",qL,!0),window.addEventListener("popstate",WL));let r={dismiss:e,priority:t};return ms.push(r),()=>{let n=ms.indexOf(r);n>=0&&ms.splice(n,1),ms.length||(document.removeEventListener("keydown",qL,!0),window.removeEventListener("popstate",WL))}}var Fx=new Map;function vh(e,t){return!t||e===t?()=>{}:(Fx.set(e,t),()=>{Fx.get(e)===t&&Fx.delete(e)})}function yp(e,t){let r=e instanceof Element?e.closest("[data-wand-popup-owner]")?.getAttribute("data-wand-popup-owner"):null,n=new Set;for(;r&&!n.has(r);){if(r===t)return!0;n.add(r),r=Fx.get(r)??null}return!1}function Dx(e){return!e.length||typeof document>"u"?!1:Array.from(document.querySelectorAll("[data-wand-popup-owner]")).some(t=>t.getClientRects().length>0&&getComputedStyle(t).visibility!=="hidden"&&e.some(r=>yp(t,r)))}function Ln(e,t,r="normal"){let n=(0,HL.useRef)(t);n.current=t,(0,HL.useEffect)(()=>e?Xv(()=>n.current(),r):void 0,[e,r])}var rce=B(_()),nce=rce.default.createContext(void 0),Ax=nce,ace=B(_()),fu=100,ice=10,KL=fu*ice,L7e=KL+fu,GL={Modal:fu,Drawer:fu,Popover:fu,Popconfirm:fu,Tooltip:fu,Tour:fu,FloatButton:fu},oce={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},sce=e=>e in GL,TF=(e,t)=>{let[,r]=ui(),n=ace.default.useContext(Ax),a=sce(e),o;if(t!==void 0)o=[t,t];else{let l=n??0;a?l+=(n?0:r.zIndexPopupBase)+GL[e]:l+=oce[e],o=[n===void 0?t:l,l]}return o};var Oo=B(_()),lce=B(_()),uce=e=>{let{children:t,prefixCls:r,id:n,classNames:a,styles:o,className:l,style:c}=e;return lce.createElement("div",{id:n,className:te(`${r}-container`,a?.container,l),style:{...o?.container,...c},role:"tooltip"},typeof t=="function"?t():t)},Qv=uce,bh=B(_()),XL=B(_()),yh={shiftX:64,adjustY:1},wh={adjustX:1,shiftY:!0},Ro=[0,0],cce={left:{points:["cr","cl"],overflow:wh,offset:[-4,0],targetOffset:Ro},right:{points:["cl","cr"],overflow:wh,offset:[4,0],targetOffset:Ro},top:{points:["bc","tc"],overflow:yh,offset:[0,-4],targetOffset:Ro},bottom:{points:["tc","bc"],overflow:yh,offset:[0,4],targetOffset:Ro},topLeft:{points:["bl","tl"],overflow:yh,offset:[0,-4],targetOffset:Ro},leftTop:{points:["tr","tl"],overflow:wh,offset:[-4,0],targetOffset:Ro},topRight:{points:["br","tr"],overflow:yh,offset:[0,-4],targetOffset:Ro},rightTop:{points:["tl","tr"],overflow:wh,offset:[4,0],targetOffset:Ro},bottomRight:{points:["tr","br"],overflow:yh,offset:[0,4],targetOffset:Ro},rightBottom:{points:["bl","br"],overflow:wh,offset:[4,0],targetOffset:Ro},bottomLeft:{points:["tl","bl"],overflow:yh,offset:[0,4],targetOffset:Ro},leftBottom:{points:["br","bl"],overflow:wh,offset:[-4,0],targetOffset:Ro}};function jF(){return jF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jF.apply(this,arguments)}var dce=bh.forwardRef((e,t)=>{let{trigger:r=["hover","focus"],mouseEnterDelay:n=0,mouseLeaveDelay:a=.1,prefixCls:o="rc-tooltip",children:l,onVisibleChange:c,afterVisibleChange:d,motion:p,placement:h="right",align:g={},destroyOnHidden:v=!1,defaultVisible:y,getTooltipContainer:w,arrowContent:x,overlay:k,id:F,showArrow:C=!0,classNames:D,styles:S,...A}=e,I=Xs(F),j=(0,XL.useRef)(null);(0,XL.useImperativeHandle)(t,()=>j.current);let $={...A};"visible"in e&&($.popupVisible=e.visible);let P=bh.useMemo(()=>{if(!C)return!1;let R=C===!0?{}:C;return{...R,className:te(R.className,D?.arrow),style:{...R.style,...S?.arrow},content:R.content??x}},[C,D?.arrow,S?.arrow,x]),N=({open:R})=>{let U=bh.Children.only(l),H={"aria-describedby":[U.props["aria-describedby"],k&&R?I:void 0].filter(Boolean).join(" ")||void 0};return bh.cloneElement(U,H)};return bh.createElement(Wm,jF({popupClassName:D?.root,prefixCls:o,popup:bh.createElement(Qv,{key:"content",prefixCls:o,id:I,classNames:D,styles:S},k),action:r,builtinPlacements:cce,popupPlacement:h,ref:j,popupAlign:g,getPopupContainer:w,onOpenChange:c,afterOpenChange:d,popupMotion:p,defaultPopupVisible:y,autoDestroy:v,mouseLeaveDelay:a,popupStyle:S?.root,mouseEnterDelay:n,arrow:P,uniqueContainerClassName:D?.uniqueContainer,uniqueContainerStyle:S?.uniqueContainer},$),N)}),pce=dce,fce=pce;function $x(e){let{sizePopupArrow:t,borderRadiusXS:r,borderRadiusOuter:n}=e,a=t/2,o=0,l=a,c=n*1/Math.sqrt(2),d=a-n*(1-1/Math.sqrt(2)),p=a-r*(1/Math.sqrt(2)),h=n*(Math.sqrt(2)-1)+r*(1/Math.sqrt(2)),g=2*a-p,v=h,y=2*a-c,w=d,x=2*a-o,k=l,F=a*Math.sqrt(2)+n*(Math.sqrt(2)-2),C=n*(Math.sqrt(2)-1),D=`polygon(${C}px 100%, 50% ${C}px, ${2*a-C}px 100%, ${C}px 100%)`,S=`path('M ${o} ${l} A ${n} ${n} 0 0 0 ${c} ${d} L ${p} ${h} A ${r} ${r} 0 0 1 ${g} ${v} L ${y} ${w} A ${n} ${n} 0 0 0 ${x} ${k} Z')`;return{arrowShadowWidth:F,arrowPath:S,arrowPolygon:D}}var ZL=(e,t,r)=>{let{sizePopupArrow:n,arrowPolygon:a,arrowPath:o,arrowShadowWidth:l,borderRadiusXS:c,calc:d}=e,p={content:'""',position:"absolute",width:l,height:l,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${ve(c)} 0`},transform:"translateY(50%) rotate(-135deg)",zIndex:0,background:"transparent"};return r&&(p.boxShadow=r),{pointerEvents:"none",width:n,height:n,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:n,height:d(n).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[a,o]},content:'""'},"&::after":p}},JL=8;function Zv(e){let{contentRadius:t,limitVerticalRadius:r}=e,n=t>12?t+2:12;return{arrowOffsetHorizontal:n,arrowOffsetVertical:r?JL:n}}var mce=(e,t,r)=>{let{componentCls:n,boxShadowPopoverArrow:a,arrowOffsetVertical:o,arrowOffsetHorizontal:l,antCls:c}=e,[d]=pn(c,"tooltip"),{arrowDistance:p=0,arrowShadow:h=!0}=r||{};return{[n]:{[`${n}-arrow`]:[{position:"absolute",zIndex:1,display:"block",...ZL(e,t,h?a:!1),"&:before":{background:t}}],[[`&-placement-top > ${n}-arrow`,`&-placement-topLeft > ${n}-arrow`,`&-placement-topRight > ${n}-arrow`].join(",")]:{bottom:p,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{[d("arrow-offset-x")]:l,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:l}}},"&-placement-topRight":{[d("arrow-offset-x")]:`calc(100% - ${ve(l)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:l}}},[[`&-placement-bottom > ${n}-arrow`,`&-placement-bottomLeft > ${n}-arrow`,`&-placement-bottomRight > ${n}-arrow`].join(",")]:{top:p,transform:"translateY(-100%)"},[`&-placement-bottom > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{[d("arrow-offset-x")]:l,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:l}}},"&-placement-bottomRight":{[d("arrow-offset-x")]:`calc(100% - ${ve(l)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:l}}},[[`&-placement-left > ${n}-arrow`,`&-placement-leftTop > ${n}-arrow`,`&-placement-leftBottom > ${n}-arrow`].join(",")]:{right:{_skip_check_:!0,value:p},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${n}-arrow`]:{top:o},[`&-placement-leftBottom > ${n}-arrow`]:{bottom:o},[[`&-placement-right > ${n}-arrow`,`&-placement-rightTop > ${n}-arrow`,`&-placement-rightBottom > ${n}-arrow`].join(",")]:{left:{_skip_check_:!0,value:p},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${n}-arrow`]:{top:o},[`&-placement-rightBottom > ${n}-arrow`]:{bottom:o}}}},Bx=mce;function hce(e,t,r,n){if(n===!1)return{adjustX:!1,adjustY:!1};let a=kt(n)?n:{},o={};switch(e){case"top":case"bottom":o.shiftX=t.arrowOffsetHorizontal*2+r,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=t.arrowOffsetVertical*2+r,o.shiftX=!0,o.adjustX=!0;break}let l={...o,...a};return l.shiftX||(l.adjustX=!0),l.shiftY||(l.adjustY=!0),l}var YL={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},gce={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},vce=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function ez(e){let{arrowWidth:t,autoAdjustOverflow:r,arrowPointAtCenter:n,offset:a,borderRadius:o,visibleFirst:l}=e,c=t/2,d={},p=Zv({contentRadius:o,limitVerticalRadius:!0});return Object.keys(YL).forEach(h=>{let g={...n&&gce[h]||YL[h],offset:[0,0],dynamicInset:!0};switch(d[h]=g,vce.has(h)&&(g.autoArrow=!1),h){case"top":case"topLeft":case"topRight":g.offset[1]=-c-a;break;case"bottom":case"bottomLeft":case"bottomRight":g.offset[1]=c+a;break;case"left":case"leftTop":case"leftBottom":g.offset[0]=-c-a;break;case"right":case"rightTop":case"rightBottom":g.offset[0]=c+a;break}if(n)switch(h){case"topLeft":case"bottomLeft":g.offset[0]=-p.arrowOffsetHorizontal-c;break;case"topRight":case"bottomRight":g.offset[0]=p.arrowOffsetHorizontal+c;break;case"leftTop":case"rightTop":g.offset[1]=-p.arrowOffsetHorizontal*2+c;break;case"leftBottom":case"rightBottom":g.offset[1]=p.arrowOffsetHorizontal*2-c;break}g.overflow=hce(h,p,t,r),l&&(g.htmlRegion="visibleFirst")}),d}var bce=B(_()),yce=bce.default.createContext(!1),wce=yce,xce=B(_()),Ece=(e,t)=>{let r=n=>typeof n=="boolean"?{show:n}:n||{};return xce.default.useMemo(()=>{let n=r(e),a=r(t);return{...a,...n,show:n.show??a.show??!0}},[e,t])},Ix=Ece,Yv=B(_()),QL="50%",kce=e=>{let{calc:t,componentCls:r,tooltipMaxWidth:n,tooltipColor:a,tooltipBg:o,tooltipBorderRadius:l,zIndexPopup:c,controlHeight:d,dropShadowPopover:p,paddingSM:h,paddingXS:g,arrowOffsetHorizontal:v,sizePopupArrow:y,antCls:w}=e,[x,k]=pn(w,"tooltip"),F=t(l).add(y).add(v).equal(),C={minWidth:t(l).mul(2).add(y).equal(),minHeight:d,padding:`${ve(e.calc(h).div(2).equal())} ${ve(g)}`,color:k("overlay-color",a),textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:o,borderRadius:l,boxSizing:"border-box"},D={[x("valid-offset-x")]:k("arrow-offset-x","var(--arrow-x)"),transformOrigin:[k("valid-offset-x",QL),`var(--arrow-y, ${QL})`].join(" ")};return[{[r]:{...fr(e),position:"absolute",zIndex:c,display:"block",width:"max-content",maxWidth:n,visibility:"visible",filter:p,...D,"&-hidden":{display:"none"},[x("arrow-background-color")]:o,[`${r}-container`]:[C,y4(e,!0)],[`&:has(~ ${r}-unique-container)`]:{[`${r}-container`]:{border:"none",background:"transparent"}},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:F},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${r}-inner`]:{borderRadius:e.min(l,JL)}},[`${r}-content`]:{position:"relative"},...Ec(e,(S,{darkColor:A})=>({[`&${r}-${S}`]:{[`${r}-container`]:{backgroundColor:A},[`${r}-arrow`]:{[x("arrow-background-color")]:A}}})),"&-rtl":{direction:"rtl"}}},Bx(e,k("arrow-background-color"),{arrowShadow:!1}),{[`${r}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}},{[`${r}-unique-container`]:{...C,...D,position:"absolute",zIndex:t(c).sub(1).equal(),filter:p,"&-hidden":{display:"none"},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},Cce=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...Zv({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...$x(_t(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),tz=(e,t,r=!0)=>Et("Tooltip",n=>{let{borderRadius:a,colorTextLightSolid:o,colorBgSpotlight:l,maxWidth:c}=n,d=_t(n,{tooltipMaxWidth:c,tooltipColor:o,tooltipBorderRadius:a,tooltipBg:l});return[kce(d),Sv(n,"zoom-big-fast")]},Cce,{resetStyle:!1,injectStyle:r})(e,t),Sce=li.map(e=>`${e}-inverse`),Fce=["success","processing","error","default","warning"];function wp(e,t=!0){return t?[].concat(Xr(Sce),Xr(li)).includes(e):li.includes(e)}function _F(e){return Fce.includes(e)}var rz=(e,t,r)=>{let n=wp(r),[a]=pn(e,"tooltip"),o=te({[`${t}-${r}`]:r&&n}),l={},c={},d=k4(r).toRgb(),p=(.299*d.r+.587*d.g+.114*d.b)/255<.5?"#FFF":"#000";return r&&!n&&(l.background=r,l[a("overlay-color")]=p,c[a("arrow-background-color")]=r),{className:o,overlayStyle:l,arrowStyle:c}},Dce=e=>{let{prefixCls:t,className:r,placement:n="top",title:a,color:o,overlayInnerStyle:l,classNames:c,styles:d}=e,{getPrefixCls:p}=Yv.useContext(wt),h=p("tooltip",t),g=p(),v=Qn(h),[y,w]=tz(h,v),x=rz(g,h,o),k=x.arrowStyle,F=Yv.useMemo(()=>({container:{...l,...x.overlayStyle}}),[l,x.overlayStyle]),C={...e,placement:n},[D,S]=Tt([c],[F,d],{props:C}),A=te(v,y,w,h,`${h}-pure`,`${h}-placement-${n}`,r,x.className);return Yv.createElement("div",{className:A,style:k},Yv.createElement("div",{className:`${h}-arrow`}),Yv.createElement(Qv,{...e,className:y,prefixCls:h,classNames:D,styles:S},a))},Ace=Dce,$ce=Oo.forwardRef((e,t)=>{let{prefixCls:r,openClassName:n,getTooltipContainer:a,color:o,children:l,afterOpenChange:c,arrow:d,destroyTooltipOnHide:p,destroyOnHidden:h,title:g,overlay:v,trigger:y,builtinPlacements:w,autoAdjustOverflow:x=!0,motion:k,getPopupContainer:F,placement:C="top",mouseEnterDelay:D,mouseLeaveDelay:S,rootClassName:A,styles:I,classNames:j,onOpenChange:$,overlayInnerStyle:P,overlayStyle:N,overlayClassName:R,...U}=e,[,H]=ui(),q=e["data-popover-inject"],{getPopupContainer:L,getPrefixCls:O,direction:W,...z}=jt("tooltip"),{className:Y,style:G,classNames:Z,styles:T,arrow:V,trigger:X,mouseEnterDelay:Q,mouseLeaveDelay:re}=q?{}:z,J=D??Q??.1,se=S??re??.1,ue=Ix(d,V),ae=ue.show,he=y||X||"hover",le=F||a||L,fe=h??!!p,we=Oo.useContext(wce),_e=D5("Tooltip"),$e=Oo.useRef(null),De=()=>{$e.current?.forceAlign()};Oo.useImperativeHandle(t,()=>({forceAlign:De,nativeElement:$e.current?.nativeElement,popupElement:$e.current?.popupElement}));let[Ce,qe]=yr(e.defaultOpen??!1,e.open),Ae=!g&&!v&&g!==0,Be=Rt=>{qe(Ae?!1:Rt),!Ae&&$&&$(Rt)},Me=Oo.useMemo(()=>w||ez({arrowPointAtCenter:ue?.pointAtCenter??!1,autoAdjustOverflow:x,arrowWidth:ae?H.sizePopupArrow:0,borderRadius:H.borderRadius,offset:H.marginXXS,visibleFirst:!0}),[ue,w,H,ae,x]),Ue=Oo.useMemo(()=>g===0?g:v||g||"",[v,g]),He=Oo.createElement(sh,{space:!0,form:!0},xr(Ue)?Ue():Ue),Ie={...e,trigger:he,builtinPlacements:Me,getPopupContainer:le,destroyOnHidden:fe,mouseEnterDelay:J,mouseLeaveDelay:se},Ne=lt(G),Je=lt(N),[gt,et]=Tt([Z,j],[T,Ne,I,Je],{props:Ie}),Ve=O("tooltip",r),Se=O(),Pe=Ce;(!("open"in e)&&Ae||we)&&(Pe=!1);let dt=Oo.isValidElement(l)&&!yv(l)?l:Oo.createElement("span",null,l),at=dt.props,Ke=!at.className||typeof at.className=="string"?te(at.className,n||`${Ve}-open`):at.className,je=Qn(Ve),[rt,$t]=tz(Ve,je,!q),Bt=rz(Se,Ve,o),Kr=Bt.arrowStyle,zt=te(je,rt,$t),$r=te(R,{[`${Ve}-rtl`]:W==="rtl"},Bt.className,A,zt,Y,gt.root),[Kt,St]=TF("Tooltip",U.zIndex),nr={...et.container,...P,...Bt.overlayStyle},Sr=Oo.createElement(fce,{unique:!0,...U,zIndex:Kt,showArrow:ae,placement:C,mouseEnterDelay:J,mouseLeaveDelay:se,prefixCls:Ve,classNames:{root:$r,container:gt.container,arrow:gt.arrow,uniqueContainer:te(zt,gt.container)},styles:{root:{...Kr,...et.root},container:nr,uniqueContainer:nr,arrow:et.arrow},ref:$e,overlay:He,visible:Pe,onVisibleChange:Be,afterVisibleChange:c,arrowContent:Oo.createElement("span",{className:`${Ve}-arrow-content`}),motion:{motionName:np(Se,"zoom-big-fast",typeof k?.motionName=="string"?k?.motionName:void 0),motionDeadline:1e3},trigger:he,builtinPlacements:Me,getTooltipContainer:le,destroyOnHidden:fe},Pe&&!U.disabled?fn(dt,{className:Ke}):dt);return Oo.createElement(Ax.Provider,{value:St},Sr)}),PF=$ce;PF._InternalPanelDoNotUseOrYouWillBeFired=Ace;PF.UniqueProvider=H5;var Lo=PF;var NF=B(_()),Mx=e=>ir(e)?xr(e)?e():e:null,il=B(_()),nz="50%",Bce=e=>{let{componentCls:t,popoverColor:r,titleMinWidth:n,fontWeightStrong:a,innerPadding:o,dropShadowPopover:l,colorTextHeading:c,borderRadiusLG:d,zIndexPopup:p,titleMarginBottom:h,colorBgElevated:g,popoverBg:v,titleBorderBottom:y,innerContentPadding:w,titlePadding:x,antCls:k}=e,[F,C]=pn(k,"tooltip");return[{[t]:{...fr(e),position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:p,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",filter:l,[F("valid-offset-x")]:C("arrow-offset-x","var(--arrow-x)"),transformOrigin:[C("valid-offset-x",nz),`var(--arrow-y, ${nz})`].join(" "),[F("arrow-background-color")]:g,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-container`]:{backgroundColor:v,backgroundClip:"padding-box",borderRadius:d,padding:o},[`${t}-title`]:{minWidth:n,marginBottom:h,color:c,fontWeight:a,borderBottom:y,padding:x},[`${t}-content`]:{color:r,padding:w}}},Bx(e,C("arrow-background-color"),{arrowShadow:!1}),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block"}}]},Ice=e=>{let{componentCls:t,antCls:r}=e,[n]=pn(r,"tooltip");return{[t]:li.map(a=>{let o=e[`${a}6`];return{[`&${t}-${a}`]:{[n("arrow-background-color")]:o,[`${t}-inner`]:{backgroundColor:o},[`${t}-arrow`]:{background:"transparent"}}}})}},Mce=e=>{let{lineWidth:t,controlHeight:r,fontHeight:n,padding:a,wireframe:o,zIndexPopupBase:l,borderRadiusLG:c,marginXS:d,lineType:p,colorSplit:h,paddingSM:g}=e,v=r-n,y=v/2,w=v/2-t,x=a;return{titleMinWidth:177,zIndexPopup:l+30,...$x(e),...Zv({contentRadius:c,limitVerticalRadius:!0}),innerPadding:o?0:12,titleMarginBottom:o?0:d,titlePadding:o?`${y}px ${x}px ${w}px`:0,titleBorderBottom:o?`${t}px ${p} ${h}`:"none",innerContentPadding:o?`${g}px ${x}px`:0}},cz=Et("Popover",e=>{let{colorBgElevated:t,colorText:r}=e,n=_t(e,{popoverBg:t,popoverColor:r});return[Bce(n),Ice(n),Sv(n,"zoom-big")]},Mce,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]}),dz=e=>{let{title:t,content:r,prefixCls:n,classNames:a,styles:o}=e;return!ir(t)&&!ir(r)?null:il.createElement(il.Fragment,null,ir(t)&&il.createElement("div",{className:te(`${n}-title`,a?.title),style:o?.title},t),ir(r)&&il.createElement("div",{className:te(`${n}-content`,a?.content),style:o?.content},r))},Tce=e=>{let{hashId:t,prefixCls:r,className:n,style:a,placement:o="top",title:l,content:c,children:d,classNames:p,styles:h}=e,g=Mx(l),v=Mx(c),y={...e,placement:o},[w,x]=Tt([p],[h],{props:y}),k=te(t,r,`${r}-pure`,`${r}-placement-${o}`,n);return il.createElement("div",{className:k,style:a},il.createElement("div",{className:`${r}-arrow`}),il.createElement(Qv,{...e,className:t,prefixCls:r,classNames:w,styles:x},d||il.createElement(dz,{prefixCls:r,title:g,content:v,classNames:w,styles:x})))},jce=e=>{let{prefixCls:t,className:r,...n}=e,{getPrefixCls:a}=il.useContext(wt),o=a("popover",t),[l,c]=cz(o);return il.createElement(Tce,{...n,prefixCls:o,hashId:l,className:te(r,c)})},_ce=jce,Pce=NF.forwardRef((e,t)=>{let{prefixCls:r,title:n,content:a,overlayClassName:o,placement:l="top",trigger:c,children:d,mouseEnterDelay:p,mouseLeaveDelay:h,onOpenChange:g,overlayStyle:v={},styles:y,classNames:w,motion:x,arrow:k,...F}=e,{getPrefixCls:C,className:D,style:S,classNames:A,styles:I,arrow:j,trigger:$,mouseEnterDelay:P,mouseLeaveDelay:N}=jt("popover"),R=p??P??.1,U=h??N??.1,H=C("popover",r),[q,L]=cz(H),O=C(),W=Ix(k,j),z=c||$||"hover",Y={...e,placement:l,trigger:z,mouseEnterDelay:R,mouseLeaveDelay:U,overlayStyle:v,styles:y,classNames:w},G=lt(S),Z=lt(v),[T,V]=Tt([A,w],[I,G,y,Z],{props:Y}),X=te(o,q,L,D,T.root),[Q,re]=yr(e.defaultOpen??!1,e.open),J=ae=>{re(ae),g?.(ae)},se=Mx(n),ue=Mx(a);return NF.createElement(Lo,{unique:!1,arrow:W,placement:l,trigger:z,mouseEnterDelay:R,mouseLeaveDelay:U,...F,prefixCls:H,classNames:{root:X,container:T.container,arrow:T.arrow},styles:{root:V.root,container:V.container,arrow:V.arrow},ref:t,open:Q,onOpenChange:J,overlay:ir(se)||ir(ue)?NF.createElement(dz,{prefixCls:H,title:se,content:ue,classNames:T,styles:V}):null,motion:{motionName:np(O,"zoom-big",typeof x?.motionName=="string"?x?.motionName:void 0)},"data-popover-inject":!0},d)}),pz=Pce;pz._InternalPanelDoNotUseOrYouWillBeFired=_ce;var Eh=pz,az=B(_(),1),OF=B(Ee(),1);function ol({trigger:e,triggerActions:t="click",children:r,ariaLabel:n,align:a="center",side:o="bottom",sideOffset:l=8,className:c,open:d,contentId:p,contentRole:h,popupOwner:g=p??n,onOpenChange:v}){let y=Ra(),w=az.useRef(null),[x,k]=az.useState(!1),F=d??x,C=D=>{k(D),v?.(D)};return Ln(F,()=>{C(!1),w.current?.nativeElement?.focus({preventScroll:!0})}),(0,OF.jsx)(or,{children:(0,OF.jsx)(Eh,{ref:w,open:F,onOpenChange:C,trigger:t,arrow:!1,placement:Fc(o,a),destroyOnHidden:!0,getPopupContainer:()=>y??document.body,align:{offset:Dc(o,l)},classNames:{root:ct("wand-ui-popover-content",c)},content:(0,OF.jsx)("div",{id:p,role:h,"aria-label":n,"data-wand-popup-owner":g,children:r}),children:e})})}var Ac=B(_()),Mi=B(_()),$c=B(_()),iz=(e,t)=>{if(!e)return null;let r={left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth,top:e.offsetTop,bottom:e.parentElement.clientHeight-e.clientHeight-e.offsetTop,height:e.clientHeight};return t?{left:0,right:0,width:0,top:r.top,bottom:r.bottom,height:r.height}:{left:r.left,right:r.right,width:r.width,top:0,bottom:0,height:0}},xh=e=>e!==void 0?`${e}px`:void 0;function Nce(e){let{prefixCls:t,containerRef:r,value:n,getValueIndex:a,motionName:o,onMotionStart:l,onMotionEnd:c,direction:d,vertical:p=!1}=e,h=$c.useRef(null),[g,v]=$c.useState(n),y=j=>{let $=a(j),P=r.current?.querySelectorAll(`.${t}-item`)[$];return P?.offsetParent&&P},[w,x]=$c.useState(null),[k,F]=$c.useState(null);Jt(()=>{if(g!==n){let j=y(g),$=y(n),P=iz(j,p),N=iz($,p);v(n),x(P),F(N),j&&$?l():c()}},[n]);let C=$c.useMemo(()=>xh(p?w?.top??0:d==="rtl"?-w?.right:w?.left),[p,d,w]),D=$c.useMemo(()=>xh(p?k?.top??0:d==="rtl"?-k?.right:k?.left),[p,d,k]),S=()=>p?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"},A=()=>p?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"},I=()=>{x(null),F(null),c()};return!w||!k?null:$c.createElement(Yn,{visible:!0,motionName:o,motionAppear:!0,onAppearStart:S,onAppearActive:A,onVisibleChanged:I},({className:j,style:$},P)=>{let N={...$,"--thumb-start-left":C,"--thumb-start-width":xh(w?.width),"--thumb-active-left":D,"--thumb-active-width":xh(k?.width),"--thumb-start-top":C,"--thumb-start-height":xh(w?.height),"--thumb-active-top":D,"--thumb-active-height":xh(k?.height)},R={ref:ln(h,P),style:N,className:te(`${t}-thumb`,j)};return $c.createElement("div",R)})}function Tx(){return Tx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Tx.apply(this,arguments)}function Oce(e){if(typeof e.title<"u")return e.title;if(typeof e.label!="object")return e.label?.toString()}function Rce(e){return e.map(t=>{if(typeof t=="object"&&t!==null){let r=Oce(t);return{...t,value:t.value,title:r}}return{label:t?.toString(),title:t?.toString(),value:t}})}var Lce=({prefixCls:e,className:t,style:r,styles:n,classNames:a,data:o,disabled:l,checked:c,label:d,title:p,value:h,name:g,onChange:v,onFocus:y,onBlur:w,onKeyDown:x,onKeyUp:k,onMouseDown:F,itemRender:C=D=>D})=>{let D=A=>{l||v(A,h)},S=Mi.createElement("label",{className:te(t,{[`${e}-item-disabled`]:l}),style:r,onMouseDown:F},Mi.createElement("input",{name:g,className:`${e}-item-input`,type:"radio",disabled:l,checked:c,onChange:D,onFocus:y,onBlur:w,onKeyDown:x,onKeyUp:k}),Mi.createElement("div",{className:te(`${e}-item-label`,a?.label),title:p,style:n?.label},d));return C(S,{item:o})},zce=Mi.forwardRef((e,t)=>{let{prefixCls:r="rc-segmented",direction:n,vertical:a,options:o=[],disabled:l,defaultValue:c,value:d,name:p,onChange:h,className:g="",style:v,styles:y,classNames:w,motionName:x="thumb-motion",itemRender:k,...F}=e,C=Mi.useRef(null),D=Mi.useMemo(()=>ln(C,t),[C,t]),S=Mi.useMemo(()=>Rce(o),[o]),[A,I]=yr(c??S[0]?.value,d),[j,$]=Mi.useState(!1),P=(T,V)=>{I(V),h?.(V)},N=wr(F,["children"]),[R,U]=Mi.useState(!1),[H,q]=Mi.useState(!1),L=()=>{q(!0)},O=()=>{q(!1)},W=()=>{U(!1)},z=T=>{T.key==="Tab"&&U(!0)},Y=T=>{let V=S.filter(se=>se.value===A||!se.disabled),X=V.findIndex(se=>se.value===A),Q=V.length,re=(X+T+Q)%Q,J=V[re];J&&J.value!==A&&(I(J.value),h?.(J.value))},G=T=>{switch(T.key){case"ArrowLeft":case"ArrowUp":Y(-1);break;case"ArrowRight":case"ArrowDown":Y(1);break}},Z=T=>{let{value:V,disabled:X}=T;return Mi.createElement(Lce,Tx({},T,{name:p,data:T,itemRender:k,key:V,prefixCls:r,className:te(T.className,`${r}-item`,w?.item,{[`${r}-item-selected`]:V===A&&!j,[`${r}-item-selected-text`]:V===A,[`${r}-item-focused`]:H&&R&&V===A}),style:y?.item,classNames:w,styles:y,checked:V===A,onChange:P,onFocus:L,onBlur:O,onKeyDown:G,onKeyUp:z,onMouseDown:W,disabled:!!l||!!X}))};return Mi.createElement("div",Tx({role:"radiogroup","aria-label":"segmented control",tabIndex:l?void 0:0,"aria-orientation":a?"vertical":"horizontal",style:v},N,{className:te(r,{[`${r}-rtl`]:n==="rtl",[`${r}-disabled`]:l,[`${r}-vertical`]:a},g),ref:D}),Mi.createElement("div",{className:`${r}-group`},Mi.createElement(Nce,{vertical:a,prefixCls:r,value:A,containerRef:C,motionName:`${r}-${x}`,direction:n,getValueIndex:T=>S.findIndex(V=>V.value===T),onMotionStart:()=>{$(!0)},onMotionEnd:()=>{$(!1)}}),S.map(Z)))}),Hce=zce,qce=Hce;function oz(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}var sz=e=>({background:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}),Wce={overflow:"hidden",...Zd},Vce=e=>{let{componentCls:t,motionDurationSlow:r,motionEaseInOut:n,motionDurationMid:a}=e,o=e.calc(e.controlHeight).sub(e.calc(e.trackPadding).mul(2)).equal(),l=e.calc(e.controlHeightLG).sub(e.calc(e.trackPadding).mul(2)).equal(),c=e.calc(e.controlHeightSM).sub(e.calc(e.trackPadding).mul(2)).equal();return{[t]:{...fr(e),display:"inline-block",padding:e.trackPadding,color:e.itemColor,background:e.trackBg,borderRadius:e.borderRadius,transition:`all ${a}`,...Ai(e),[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-vertical`]:{[`${t}-group`]:{flexDirection:"column"},[`${t}-thumb`]:{width:"100%",height:0,padding:`0 ${ve(e.paddingXXS)}`}},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${a}`,borderRadius:e.borderRadiusSM,transform:"translateZ(0)","&-selected":{...sz(e),color:e.itemSelectedColor},"&-selected-text":{color:e.itemSelectedColor,transition:`color ${a}`},"&-focused":ao(e),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,pointerEvents:"none",transition:["opacity","background-color"].map(d=>`${d} ${a}`).join(", ")},[`&:not(${t}-item-selected):not(${t}-item-selected-text):not(${t}-item-disabled)`]:{"&:hover, &:active":{color:e.itemHoverColor},"&:hover::after":{opacity:1,backgroundColor:e.itemHoverBg},"&:active::after":{opacity:1,backgroundColor:e.itemActiveBg}},"&-label":{minHeight:o,lineHeight:ve(o),padding:`0 ${ve(e.segmentedPaddingHorizontal)}`,...Wce},"&-icon + *":{marginInlineStart:e.calc(e.marginSM).div(2).equal()},"&-icon > svg":{display:"inline-block",verticalAlign:"middle",marginBlockEnd:"0.2em"},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:{...sz(e),position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${ve(e.paddingXXS)} 0`,borderRadius:e.borderRadiusSM,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}},[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:l,lineHeight:ve(l),padding:`0 ${ve(e.segmentedPaddingHorizontal)}`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:c,lineHeight:ve(c),padding:`0 ${ve(e.segmentedPaddingHorizontalSM)}`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}},...oz(`&-disabled ${t}-item`,e),...oz(`${t}-item-disabled`,e),[`${t}-thumb-motion-appear-active`]:{willChange:"transform, width",transition:["transform","width"].map(d=>`${d} ${r} ${n}`).join(", ")},[`&${t}-shape-round`]:{borderRadius:9999,[`${t}-item, ${t}-thumb`]:{borderRadius:9999}}}}},Uce=e=>{let{colorTextLabel:t,colorText:r,colorFillSecondary:n,colorBgElevated:a,colorFill:o,lineWidthBold:l,colorBgLayout:c}=e;return{trackPadding:l,trackBg:c,itemColor:t,itemHoverColor:r,itemHoverBg:n,itemSelectedBg:a,itemActiveBg:o,itemSelectedColor:r}},Kce=Et("Segmented",e=>{let{lineWidth:t,calc:r}=e,n=_t(e,{segmentedPaddingHorizontal:r(e.controlPaddingHorizontal).sub(t).equal(),segmentedPaddingHorizontalSM:r(e.controlPaddingHorizontalSM).sub(t).equal()});return Vce(n)},Uce);function Gce(e){return kt(e)&&!!e?.icon}var Xce=Ac.forwardRef((e,t)=>{let r=Xs(),{prefixCls:n,className:a,rootClassName:o,block:l,options:c=[],size:d,style:p,vertical:h,orientation:g,shape:v="default",name:y=r,styles:w,classNames:x,...k}=e,{getPrefixCls:F,direction:C,className:D,style:S,classNames:A,styles:I}=jt("segmented"),j={...e,options:c,size:d,shape:v},$=lt(S),P=lt(p),[N,R]=Tt([A,x],[I,$,w,P],{props:j}),U=F("segmented",n),[H,q]=Kce(U),L=Rn(d),O=Ac.useMemo(()=>c.map(G=>{if(Gce(G)){let{icon:Z,label:T,...V}=G;return{...V,label:Ac.createElement(Ac.Fragment,null,Ac.createElement("span",{className:te(`${U}-item-icon`,N.icon),style:R.icon},Z),ir(T)&&Ac.createElement("span",null,T))}}return G}),[c,U,N.icon,R.icon]),[,W]=el(g,h),z=te(a,o,D,N.root,{[`${U}-block`]:l,[`${U}-sm`]:L==="small",[`${U}-lg`]:L==="large",[`${U}-vertical`]:W,[`${U}-shape-${v}`]:v==="round"},H,q),Y=(G,{item:Z})=>{if(!Z.tooltip)return G;let T=kt(Z.tooltip)?Z.tooltip:{title:Z.tooltip};return Ac.createElement(Lo,{...T},G)};return Ac.createElement(qce,{...k,name:y,className:z,style:R.root,classNames:N,styles:R,itemRender:Y,options:O,ref:t,prefixCls:U,direction:C,vertical:W})}),Yce=Xce,fz=Yce,xp=B(_(),1);function Qce(e,t,r){if(!e||r)return[t];let n=Math.min(e.left,t.left),a=Math.max(e.left+e.width,t.left+t.width),o={left:n,width:a-n};return o.left===t.left&&o.width===t.width?[t]:[o,t]}var Jv=B(Ee(),1);function lz(e,t){let r=e.querySelector(`[data-stretch-value="${CSS.escape(t)}"]`)?.closest(".ant-segmented-item");return r?{left:r.offsetLeft,width:r.offsetWidth}:null}function uz(e,t){return Math.abs(e.left-t.left)<1&&Math.abs(e.width-t.width)<1}function RF({tabs:e,value:t,ariaLabel:r,className:n,onValueChange:a}){let o=xp.useRef(null),l=xp.useRef(null),c=xp.useRef(null),d=xp.useRef(null),p=ua(),[h,g]=xp.useState(null),v=e.map(y=>y.value).join("\0");return xp.useLayoutEffect(()=>{let y=o.current;if(!y)return;let w=lz(y,t);if(!w)return;let x=c.current,k=x&&l.current?{left:x.offsetLeft,width:x.offsetWidth}:l.current,F=Qce(k,w,p);l.current=w,d.current=F[1]??null,g(F[0]??w),x&&F[1]&&uz({left:x.offsetLeft,width:x.offsetWidth},F[0])&&(d.current=null,g(w))},[p,v,t]),xp.useEffect(()=>{let y=o.current;if(!y||typeof ResizeObserver>"u")return;let w=new ResizeObserver(()=>{if(d.current)return;let x=lz(y,t);x&&(l.current=x,g(x))});return w.observe(y),()=>w.disconnect()},[v,t]),(0,Jv.jsx)(or,{children:(0,Jv.jsxs)("div",{ref:o,className:ct("wand-ui-stretch-tabs",n),onKeyDown:y=>{if(y.key!=="Home"&&y.key!=="End")return;y.preventDefault();let w=e[y.key==="Home"?0:e.length-1];w&&(a(w.value),o.current?.querySelector(`[data-stretch-value="${CSS.escape(w.value)}"]`)?.closest(".ant-segmented-item")?.querySelector("input")?.focus({preventScroll:!0}))},children:[h?(0,Jv.jsx)("span",{ref:c,className:"wand-ui-stretch-indicator",onTransitionEnd:y=>{if(y.target!==y.currentTarget||!h||p||y.propertyName!=="left"&&y.propertyName!=="width")return;let w=y.currentTarget;if(!uz({left:w.offsetLeft,width:w.offsetWidth},h))return;let x=d.current;x&&(d.current=null,g(x))},style:{left:h.left,width:h.width},"aria-hidden":"true"}):null,(0,Jv.jsx)(fz,{value:t,onChange:a,"aria-label":r,options:e.map(y=>({value:y.value,label:(0,Jv.jsx)("span",{"data-stretch-value":y.value,children:y.label})}))})]})})}var ka=B(_()),Zce=B(_()),Jce=Zce.createContext({}),LF=Jce,ede=e=>{let{antCls:t,componentCls:r,iconCls:n,avatarBg:a,avatarColor:o,containerSize:l,containerSizeLG:c,containerSizeSM:d,textFontSize:p,textFontSizeLG:h,textFontSizeSM:g,iconFontSize:v,iconFontSizeLG:y,iconFontSizeSM:w,borderRadius:x,borderRadiusLG:k,borderRadiusSM:F,lineWidth:C,lineType:D}=e,S=(A,I,j,$)=>({width:A,height:A,borderRadius:"50%",fontSize:I,[`&${r}-square`]:{borderRadius:$},[`&${r}-icon`]:{fontSize:j,[`> ${n}`]:{margin:0}}});return{[r]:{...fr(e),position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",overflow:"hidden",color:o,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:a,border:`${ve(C)} ${D} transparent`,"&-image":{background:"transparent"},[`${t}-image-img`]:{display:"block"},...S(l,p,v,x),"&-lg":{...S(c,h,y,k)},"&-sm":{...S(d,g,w,F)},"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}}}},tde=e=>{let{componentCls:t,groupBorderColor:r,groupOverlapping:n,groupSpace:a}=e;return{[`${t}-group`]:{display:"inline-flex",[t]:{borderColor:r},"> *:not(:first-child)":{marginInlineStart:n}},[`${t}-group-popover`]:{[`${t} + ${t}`]:{marginInlineStart:a}}}},rde=e=>{let{controlHeight:t,controlHeightLG:r,controlHeightSM:n,fontSize:a,fontSizeLG:o,fontSizeXL:l,fontSizeHeading3:c,marginXS:d,marginXXS:p,colorBorderBg:h}=e;return{containerSize:t,containerSizeLG:r,containerSizeSM:n,textFontSize:a,textFontSizeLG:a,textFontSizeSM:a,iconFontSize:Math.round((o+l)/2),iconFontSizeLG:c,iconFontSizeSM:a,groupSpace:p,groupOverlapping:-d,groupBorderColor:h}},hz=Et("Avatar",e=>{let{colorTextLightSolid:t,colorTextPlaceholder:r}=e,n=_t(e,{avatarBg:r,avatarColor:t});return[ede(n),tde(n)]},rde),nde=ka.forwardRef((e,t)=>{let{prefixCls:r,shape:n,size:a,src:o,srcSet:l,icon:c,className:d,rootClassName:p,style:h,alt:g,draggable:v,children:y,crossOrigin:w,gap:x=4,onError:k,...F}=e,[C,D]=ka.useState(1),[S,A]=ka.useState(!1),[I,j]=ka.useState(!0),$=ka.useRef(null),P=ka.useRef(null),N=ln(t,$),{getPrefixCls:R,className:U,style:H}=jt("avatar"),q=ka.useContext(LF),L=()=>{if(!P.current||!$.current)return;let le=P.current.offsetWidth,fe=$.current.offsetWidth;le!==0&&fe!==0&&x*2<fe&&D(fe-x*2<le?(fe-x*2)/le:1)};ka.useEffect(()=>{A(!0)},[]),ka.useEffect(()=>{j(!0),D(1)},[o,l]),ka.useEffect(L,[x]);let O=()=>{k?.()!==!1&&j(!1)},W=Rn(le=>a??q?.size??le??"medium"),z=Object.keys(kt(W)?W||{}:{}).some(le=>tp.includes(le)),Y=ir(c),G=h4(z),Z=ka.useMemo(()=>{if(!kt(W))return{};let le=tp.find(we=>G[we]),fe=W[le];return fe?{width:fe,height:fe,fontSize:fe&&(Y||ir(y))?fe/2:18}:{}},[G,W,Y,y]),T=R("avatar",r),V=Qn(T),[X,Q]=hz(T,V),re=te({[`${T}-lg`]:W==="large",[`${T}-sm`]:W==="small"}),J=ka.isValidElement(o),se=n||q?.shape||"circle",ue=te(T,re,U,`${T}-${se}`,{[`${T}-image`]:J||o&&I,[`${T}-icon`]:Y},Q,V,d,p,X),ae=Oa(W)?{width:W,height:W,fontSize:Y?W/2:18}:{},he;if(typeof o=="string"&&I)he=ka.createElement("img",{src:o,draggable:v,srcSet:l,onError:O,alt:g,crossOrigin:w});else if(J)he=o;else if(Y)he=c;else if(S||C!==1){let le=`scale(${C})`,fe={msTransform:le,WebkitTransform:le,transform:le};he=ka.createElement(Ea,{onResize:L},ka.createElement("span",{className:`${T}-string`,ref:P,style:fe},y))}else he=ka.createElement("span",{className:`${T}-string`,style:{opacity:0},ref:P},y);return ka.createElement("span",{...F,style:{...ae,...Z,...H,...h},className:ue,ref:N},he)}),gz=nde,fo=B(_()),mz=e=>{let{size:t,shape:r}=fo.useContext(LF),n=fo.useMemo(()=>({size:e.size||t,shape:e.shape||r}),[e.size,e.shape,t,r]);return fo.createElement(LF.Provider,{value:n},e.children)},ade=fo.forwardRef((e,t)=>{let{getPrefixCls:r,direction:n}=fo.useContext(wt),{prefixCls:a,className:o,rootClassName:l,style:c,maxCount:d,maxStyle:p,size:h,shape:g,maxPopoverPlacement:v,maxPopoverTrigger:y,children:w,max:x}=e,k=r("avatar",a),F=`${k}-group`,C=Qn(k),[D,S]=hz(k,C),A=te(F,{[`${F}-rtl`]:n==="rtl"},S,C,o,l,D),I=Hr(w).map((N,R)=>fn(N,{key:`avatar-key-${R}`})),j=fo.useRef(null);fo.useImperativeHandle(t,()=>({nativeElement:j.current}));let $=x?.count||d,P=I.length;if($&&$<P){let N=I.slice(0,$),R=I.slice($,P),U=x?.style||p,H=x?.popover?.trigger||y||"hover",q=x?.popover?.placement||v||"top",L={content:R,...x?.popover,placement:q,trigger:H,rootClassName:te(`${F}-popover`,x?.popover?.rootClassName)};return N.push(fo.createElement(Eh,{key:"avatar-popover-key",destroyOnHidden:!0,...L},fo.createElement(gz,{style:U},`+${P-$}`))),fo.createElement(mz,{shape:g,size:h},fo.createElement("div",{ref:j,className:A,style:c},N))}return fo.createElement(mz,{shape:g,size:h},fo.createElement("div",{ref:j,className:A,style:c},I))}),ide=ade,vz=gz;vz.Group=ide;var Ti=vz;var Bc=B(_()),kh=B(_()),eb=B(_()),kp=B(_()),bz=e=>{let{prefixCls:t,value:r,current:n,offset:a=0}=e,o;return a&&(o={position:"absolute",top:`${a}00%`,left:0}),kp.createElement("span",{style:o,className:te(`${t}-only-unit`,{current:n})},r)};function ode(e,t,r){let n=e,a=0;for(;(n+10)%10!==t;)n+=r,a+=r;return a}var sde=e=>{let{prefixCls:t,count:r,value:n}=e,a=Number(n),o=Math.abs(r),[l,c]=kp.useState(a),[d,p]=kp.useState(o),h=()=>{c(a),p(o)};kp.useEffect(()=>{let y=setTimeout(h,1e3);return()=>clearTimeout(y)},[a]);let g,v;if(l===a||Number.isNaN(a)||Number.isNaN(l))g=[kp.createElement(bz,{...e,key:a,current:!0})],v={transition:"none"};else{g=[];let y=a+10,w=[];for(let F=a;F<=y;F+=1)w.push(F);let x=d<o?1:-1,k=w.findIndex(F=>F%10===l);g=(x<0?w.slice(0,k+1):w.slice(k)).map((F,C)=>{let D=F%10;return kp.createElement(bz,{...e,key:F,value:D,offset:x<0?C-k:C,current:C===k})}),v={transform:`translateY(${-ode(l,a,x)}00%)`}}return kp.createElement("span",{className:`${t}-only`,style:v,onTransitionEnd:h},g)},lde=sde,ude=eb.forwardRef((e,t)=>{let{prefixCls:r,count:n,className:a,motionClassName:o,style:l,title:c,show:d,component:p="sup",children:h,...g}=e,{getPrefixCls:v}=eb.useContext(wt),y=v("scroll-number",r),w={...g,"data-show":d,style:l,className:te(y,a,o),title:c},x=n;if(n&&Number(n)%1===0){let k=String(n).split("");x=eb.createElement("bdi",null,k.map((F,C)=>eb.createElement(lde,{prefixCls:y,count:Number(n),value:F,key:k.length-C})))}return l?.borderColor&&(w.style={...l,boxShadow:`0 0 0 1px ${l.borderColor} inset`}),h?fn(h,k=>({className:te(`${y}-custom-component`,k?.className,o)})):eb.createElement(p,{...w,ref:t},x)}),cde=ude,dde=new Ct("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),pde=new Ct("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),fde=new Ct("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),mde=new Ct("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),hde=new Ct("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),gde=new Ct("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),vde=e=>{let{componentCls:t,iconCls:r,antCls:n,badgeShadowSize:a,textFontSize:o,textFontSizeSM:l,statusSize:c,dotSize:d,textFontWeight:p,indicatorHeight:h,indicatorHeightSM:g,marginXS:v,calc:y}=e,w=`${n}-scroll-number`,x=Ec(e,(k,{darkColor:F})=>({[`&${t} ${t}-color-${k}`]:{background:F,[`&:not(${t}-count)`]:{color:F},"a:hover &":{background:F}}}));return{[t]:{...fr(e),position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:h,height:h,color:e.badgeTextColor,fontWeight:p,fontSize:o,lineHeight:ve(h),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:y(h).div(2).equal(),boxShadow:`0 0 0 ${ve(a)} ${e.badgeShadowColor}`,transition:`background-color ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:g,height:g,fontSize:l,lineHeight:ve(g),borderRadius:y(g).div(2).equal()},[`${t}-multiple-words`]:{paddingInline:e.paddingInline,bdi:{unicodeBidi:"plaintext"}},[`${t}-dot`]:{zIndex:e.indicatorZIndex,width:d,minWidth:d,height:d,background:e.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${ve(a)} ${e.badgeShadowColor}`},[`${t}-count, ${t}-dot, ${w}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${r}-spin`]:{animationName:gde,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:c,height:c,verticalAlign:"middle",borderRadius:"50%"},[`${t}-status-success`]:{backgroundColor:e.colorSuccess},[`${t}-status-processing`]:{overflow:"visible",color:e.colorInfoTextHover,backgroundColor:e.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:a,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:dde,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${t}-status-default`]:{backgroundColor:e.colorTextPlaceholder},[`${t}-status-error`]:{backgroundColor:e.colorError},[`${t}-status-warning`]:{backgroundColor:e.colorWarning},[`${t}-status-text`]:{marginInlineStart:v,color:e.colorText,fontSize:e.fontSize}},...x,[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:pde,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:fde,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:mde,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:hde,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${w}-custom-component, ${t}-count`]:{transform:"none"},[`${w}-custom-component, ${w}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[w]:{overflow:"hidden",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack}`,[`${w}-only`]:{position:"relative",display:"inline-block",height:h,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${w}-only-unit`]:{height:h,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${w}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${w}-custom-component`]:{transform:"translate(-50%, -50%)"}}}}},yz=e=>{let{fontHeight:t,lineWidth:r,marginXS:n,colorBorderBg:a}=e,o=t,l=r,c=e.colorTextLightSolid,d=e.colorError,p=e.colorErrorHover;return _t(e,{badgeFontHeight:o,badgeShadowSize:l,badgeTextColor:c,badgeColor:d,badgeColorHover:p,badgeShadowColor:a,badgeProcessingDuration:"1.2s",badgeRibbonOffset:n,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},wz=e=>{let{fontSize:t,lineHeight:r,fontSizeSM:n,lineWidth:a,paddingXS:o}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*r)-2*a,indicatorHeightSM:t,dotSize:n/2,textFontSize:n,textFontSizeSM:n,textFontWeight:"normal",statusSize:n/2,paddingInline:o}},bde=Et("Badge",e=>{let t=yz(e);return vde(t)},wz),yde=Bc.forwardRef((e,t)=>{let{prefixCls:r,scrollNumberPrefixCls:n,children:a,status:o,text:l,color:c,count:d=null,overflowCount:p=99,dot:h=!1,size:g="medium",title:v,offset:y,style:w,className:x,rootClassName:k,classNames:F,styles:C,showZero:D=!1,...S}=e,{getPrefixCls:A,direction:I,className:j,style:$,classNames:P,styles:N}=jt("badge"),R=A("badge",r),[U,H]=bde(R),q={...e,overflowCount:p,size:g,dot:h,showZero:D},L=d>p?`${p}+`:d,O=L==="0"||L===0||l==="0"||l===0,W=d===null||O&&!D,z=(Yr(o)||Yr(c))&&W,Y=Yr(o)||!O,G=!!(!a&&z&&(l||Y||!W)),Z=(0,kh.useMemo)(()=>{if(!y)return;let Ie=Number.parseInt(y[0],10);return{marginTop:y[1],insetInlineEnd:-Ie}},[y]),T=(0,kh.useMemo)(()=>({...Z,...$,...w}),[Z,w,$]),V=G?"root":"indicator",X=lt($,V),Q=lt(w,V),[re,J]=Tt([P,F],[N,X,C,Q],{props:q}),se=h&&!O,ue=se?"":L,ae=(0,kh.useMemo)(()=>(!ir(ue)&&!ir(l)||O&&!D)&&!se,[ue,O,D,se,l]),he=(0,kh.useRef)(d);ae||(he.current=d);let le=he.current,fe=(0,kh.useRef)(ue);ae||(fe.current=ue);let we=fe.current,_e=(0,kh.useRef)(se);ae||(_e.current=se);let $e=Di(le)||Oa(le)?le:void 0,De=v===null||v===!1?void 0:v??$e,Ce=!ae&&(l===0?D:!!l&&l!==!0),qe=Ce?Bc.createElement("span",{className:`${R}-status-text`},l):null,Ae=kt(le)?fn(le,Ie=>({style:{...T,...Ie.style}})):void 0,Be=wp(c,!1),Me=te(re.indicator,{[`${R}-status-dot`]:z,[`${R}-status-${o}`]:!!o,[`${R}-color-${c}`]:Be}),Ue={};c&&!Be&&(Ue.color=c,Ue.background=c);let He=te(R,{[`${R}-status`]:z,[`${R}-not-a-wrapper`]:!a,[`${R}-rtl`]:I==="rtl"},x,k,j,re.root,U,H);if(G){let Ie=J.root?.color;return Bc.createElement("span",{ref:t,...S,className:He,style:{...Z,...J.root}},Bc.createElement("span",{className:Me,style:{...J.indicator,...Ue}}),Ce&&Bc.createElement("span",{style:{color:Ie},className:`${R}-status-text`},l))}return Bc.createElement("span",{ref:t,...S,className:He,style:J.root},a,Bc.createElement(Yn,{visible:!ae,motionName:`${R}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:Ie})=>{let Ne=A("scroll-number",n),Je=_e.current,gt=te(re.indicator,{[`${R}-dot`]:Je,[`${R}-count`]:!Je,[`${R}-count-sm`]:g==="small",[`${R}-multiple-words`]:!Je&&we&&we.toString().length>1,[`${R}-status-${o}`]:!!o,[`${R}-color-${c}`]:Be}),et={...Z,...J.indicator};return c&&!Be&&(et=et||{},et.background=c),Bc.createElement(cde,{prefixCls:Ne,show:!ae,motionClassName:Ie,className:gt,count:we,title:De,style:et,key:"scrollNumber"},Ae)}),qe)}),wde=yde,Ep=B(_()),xde=e=>{let{antCls:t,badgeFontHeight:r,marginXS:n,badgeRibbonOffset:a,calc:o}=e,l=`${t}-ribbon`,c=`${t}-ribbon-wrapper`,d=Ec(e,(p,{darkColor:h})=>({[`&${l}-color-${p}`]:{background:h,color:h}}));return{[c]:{position:"relative"},[l]:{...fr(e),position:"absolute",top:n,padding:`0 ${ve(e.paddingXS)}`,color:e.colorPrimary,lineHeight:ve(r),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${l}-content`]:{color:e.badgeTextColor},[`${l}-corner`]:{position:"absolute",top:"100%",width:a,height:a,color:"currentcolor",border:`${ve(o(a).div(2).equal())} solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter},...d,[`&${l}-placement-end`]:{insetInlineEnd:o(a).mul(-1).equal(),borderEndEndRadius:0,[`${l}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${l}-placement-start`]:{insetInlineStart:o(a).mul(-1).equal(),borderEndStartRadius:0,[`${l}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}}}},Ede=Et(["Badge","Ribbon"],e=>{let t=yz(e);return xde(t)},wz),kde=Ep.forwardRef((e,t)=>{let{className:r,prefixCls:n,style:a,color:o,children:l,text:c,placement:d="end",rootClassName:p,styles:h,classNames:g}=e,{getPrefixCls:v,direction:y,className:w,style:x,classNames:k,styles:F}=jt("ribbon"),C=v("ribbon",n),D=`${C}-wrapper`,[S,A]=Ede(C,D),I={...e,placement:d},j=lt(x,"indicator"),$=lt(a,"indicator"),[P,N]=Tt([k,g],[F,j,h,$],{props:I}),R=wp(o,!1),U=te(C,`${C}-placement-${d}`,{[`${C}-rtl`]:y==="rtl",[`${C}-color-${o}`]:R},r,w,P.indicator),H={},q={};o&&!R&&(H.background=o,q.color=o);let L=Ep.useRef(null);return Ep.useImperativeHandle(t,()=>({nativeElement:L.current})),Ep.createElement("div",{ref:L,className:te(D,p,S,A,P.root),style:N.root},l,Ep.createElement("div",{className:te(U,S),style:{...H,...N.indicator}},Ep.createElement("span",{className:te(`${C}-content`,P.content),style:N.content},c),Ep.createElement("div",{className:`${C}-corner`,style:q})))}),Cde=kde,xz=wde;xz.Ribbon=Cde;var ji=xz;var zo=B(_());function Sde(e,t,r){var n=r||{},a=n.noTrailing,o=a===void 0?!1:a,l=n.noLeading,c=l===void 0?!1:l,d=n.debounceMode,p=d===void 0?void 0:d,h,g=!1,v=0;function y(){h&&clearTimeout(h)}function w(k){var F=k||{},C=F.upcomingOnly,D=C===void 0?!1:C;y(),g=!D}function x(){for(var k=arguments.length,F=new Array(k),C=0;C<k;C++)F[C]=arguments[C];var D=this,S=Date.now()-v;if(g)return;function A(){v=Date.now(),t.apply(D,F)}function I(){h=void 0}!c&&p&&!h&&A(),y(),p===void 0&&S>e?c?(v=Date.now(),o||(h=setTimeout(p?I:A,e))):A():o!==!0&&(h=setTimeout(p?I:A,p===void 0?e-S:e))}return x.cancel=w,x}function Fde(e,t,r){var n=r||{},a=n.atBegin,o=a===void 0?!1:a;return Sde(e,t,{debounceMode:o!==!1})}var Ez=B(_()),Ch=B(_()),Sh=B(_()),jx=100,Fz=jx/5,Dz=jx/2-Fz/2,zF=Dz*2*Math.PI,kz=50,Cz=e=>{let{dotClassName:t,style:r,hasCircleCls:n}=e;return Sh.createElement("circle",{className:te(`${t}-circle`,{[`${t}-circle-bg`]:n}),r:Dz,cx:kz,cy:kz,strokeWidth:Fz,style:r})},Dde=({percent:e,prefixCls:t})=>{let r=`${t}-dot`,n=`${r}-holder`,a=`${n}-hidden`,[o,l]=Sh.useState(!1);Jt(()=>{e!==0&&l(!0)},[e]);let c=Math.max(Math.min(e,100),0);if(!o)return null;let d={strokeDashoffset:`${zF/4}`,strokeDasharray:`${zF*c/100} ${zF*(100-c)/100}`};return Sh.createElement("span",{className:te(n,`${r}-progress`,{[a]:c<=0})},Sh.createElement("svg",{viewBox:`0 0 ${jx} ${jx}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c},Sh.createElement(Cz,{dotClassName:r,hasCircleCls:!0}),Sh.createElement(Cz,{dotClassName:r,style:d})))},Ade=Dde;function $de(e){let{prefixCls:t,percent:r=0,className:n,style:a}=e,o=`${t}-dot`,l=`${o}-holder`,c=`${l}-hidden`;return Ch.createElement(Ch.Fragment,null,Ch.createElement("span",{className:te(l,n,r>0&&c),style:a},Ch.createElement("span",{className:te(o,`${t}-dot-spin`)},[1,2,3,4].map(d=>Ch.createElement("i",{className:`${t}-dot-item`,key:d})))),Ch.createElement(Ade,{prefixCls:t,percent:r}))}function Bde(e){let{prefixCls:t,indicator:r,percent:n,className:a,style:o}=e,l=`${t}-dot`;return r&&Ez.isValidElement(r)?fn(r,c=>({className:te(c.className,l,a),style:{...c.style,...o},percent:n})):Ez.createElement($de,{prefixCls:t,percent:n,className:a,style:o})}var Ide=new Ct("antSpinMove",{to:{opacity:1}}),Mde=new Ct("antRotate",{to:{transform:"rotate(405deg)"}}),Tde=e=>{let{componentCls:t}=e,r=`${t}-section`;return{[t]:{...fr(e),position:"relative","&-rtl":{direction:"rtl"},[`&${r}, > ${r}`]:{display:"flex",alignItems:"center",flexDirection:"column",gap:e.paddingSM,color:e.colorPrimary},[`&${r}`]:{display:"inline-flex"},[`> ${r}`]:{position:"absolute",top:"50%",left:{_skip_check_:!0,value:"50%"},transform:"translate(-50%, -50%)",zIndex:1},[`${t}-description`]:{fontSize:e.fontSize,lineHeight:1},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},"&-spinning":{[`${t}-description`]:{textShadow:`0 0px 5px ${e.colorBgContainer}`},[`${t}-container`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-fullscreen":{position:"fixed",inset:0,backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,opacity:0,pointerEvents:"none",transition:`all ${e.motionDurationMid}`,[`&${t}-spinning`]:{opacity:1,pointerEvents:"auto"},[`> ${r}`]:{color:e.colorWhite,[`${t}-description`]:{color:e.colorTextLightSolid}}}}}},jde=e=>{let{componentCls:t,antCls:r,motionDurationSlow:n}=e,[a,o]=pn(r,"spin");return{[t]:{[a("dot-holder-size")]:e.dotSize,[a("dot-item-size")]:`calc((${o("dot-holder-size")} - ${e.marginXXS} / 2) / 2)`,[`${t}-dot`]:{"&-holder":{width:"1em",height:"1em",fontSize:o("dot-holder-size"),display:"inline-block",transition:["transform","opacity"].map(l=>`${l} ${n} ease`).join(", "),transformOrigin:"50% 50%",lineHeight:1,"&-hidden":{transform:"scale(0.3)",opacity:0}},position:"relative",display:"inline-block",fontSize:o("dot-holder-size"),width:"1em",height:"1em","&-spin":{transform:"rotate(45deg)",animationName:Mde,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-item":{position:"absolute",display:"block",width:o("dot-item-size"),height:o("dot-item-size"),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:Ide,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-progress":{position:"absolute",left:"50%",top:0,transform:"translateX(-50%)"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(l=>`${l} ${n} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}}}}},_de=e=>{let{componentCls:t}=e,[r]=pn(e.antCls,"spin");return{[t]:{"&-sm":{[r("dot-holder-size")]:e.dotSizeSM},"&-lg":{[r("dot-holder-size")]:e.dotSizeLG}}}},Pde=e=>{let{controlHeightLG:t,controlHeight:r}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:r}},Nde=Et("Spin",e=>{let t=_t(e,{spinDotDefault:e.colorTextDescription});return[Tde(t),jde(t),_de(t)]},Pde),HF=B(_()),Ode=200,Sz=[[30,.05],[70,.03],[96,.01]];function Rde(e,t){let[r,n]=HF.useState(0),a=HF.useRef(null),o=t==="auto";return HF.useEffect(()=>(o&&e&&(n(0),a.current=setInterval(()=>{n(l=>{let c=100-l;for(let d=0;d<Sz.length;d+=1){let[p,h]=Sz[d];if(l<=p)return l+c*h}return l})},Ode)),()=>{a.current&&(clearInterval(a.current),a.current=null)}),[o,e]),o?r:t}var Az;function Lde(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}var $z=zo.forwardRef((e,t)=>{let{prefixCls:r,spinning:n=!0,delay:a=0,className:o,rootClassName:l,size:c,tip:d,description:p,wrapperClassName:h,style:g,children:v,fullscreen:y=!1,indicator:w,percent:x,classNames:k,styles:F,...C}=e,{getPrefixCls:D,direction:S,indicator:A,className:I,style:j,classNames:$,styles:P}=jt("spin"),N=D("spin",r),[R,U]=Nde(N),[H,q]=zo.useState(()=>n&&!Lde(n,a)),L=Rde(H,x);zo.useEffect(()=>{if(n){let J=Fde(a,()=>{q(!0)});return J(),()=>{J?.cancel?.()}}q(!1)},[a,n]);let O=Rn(J=>c??J),W=p??d,z={...e,size:O,spinning:H,tip:W,description:W,fullscreen:y,children:v,percent:L},Y=lt(j),[G,Z]=Tt([$,k],[P,Y,F],{props:z}),T=w??A??Az,V=typeof v<"u",X=V||y,Q=zo.createElement(zo.Fragment,null,zo.createElement(Bde,{className:te(G.indicator),style:Z.indicator,prefixCls:N,indicator:T,percent:L}),W&&zo.createElement("div",{className:te(`${N}-description`,G.tip,G.description),style:{...Z.tip,...Z.description}},W)),re=zo.useRef(null);return zo.useImperativeHandle(t,()=>({nativeElement:re.current})),zo.createElement("div",{ref:re,className:te(N,{[`${N}-sm`]:O==="small",[`${N}-lg`]:O==="large",[`${N}-spinning`]:H,[`${N}-rtl`]:S==="rtl",[`${N}-fullscreen`]:y},l,G.root,y&&G.mask,X?h:[`${N}-section`,G.section],I,o,R,U),style:{...Z.root,...X?{}:Z.section,...y?Z.mask:{},...g},"aria-live":"polite","aria-busy":H,...C},H&&(X?zo.createElement("div",{className:te(`${N}-section`,G.section),style:Z.section},Q):Q),V&&zo.createElement("div",{className:te(`${N}-container`,G.container),style:Z.container},v))});$z.setDefaultIndicator=e=>{Az=e};var _i=$z;var Iz={};Jl(Iz,{installReactUiStyles:()=>Fh,installStyleSheet:()=>Ca});var zde=__wandCssTextPool[0],Hde=__wandCssTextPool[1],qde=__wandCssTextPool[2],Wde=__wandCssTextPool[3],Vde=__wandCssTextPool[4],Ude=__wandCssTextPool[5],Kde=__wandCssTextPool[6],Gde=__wandCssTextPool[7],Xde=__wandCssTextPool[8],Bz="wand-react-ui-styles",Yde=[zde,Wde,Hde,Vde,Ude,Gde,Xde,"",Kde,qde].join("");function Fh(e=document){if(e.getElementById(Bz))return;let t=e.createElement("style");t.id=Bz,t.textContent=Yde,e.head.appendChild(t)}function Ca(e,t,r=document){if(r.getElementById(e))return;let n=r.createElement("style");n.id=e,n.textContent=t,r.head.appendChild(n)}var Pz="wand-hr",nb=2,QF="wand-ops",Nz="e_wand_ops",Qde="\u52E4\u52B3\u7684\u521D\u4E8C",ZF="\u7CFB\u7EDF\u7528\u6237";function Oz(e){return e?.systemKey===QF}var JF="wand-default",Rz="e_wand_default",Lz="\u9ED8\u8BA4\u7528\u6237";function zz(e){return e?.systemKey===JF}function Zde(e){return e?.systemKey===q5}function e3(e){let t=e?.systemKey;return t===QF||t===JF||t===q5||t===Pz}var WF=8,VF=20;function Jde(e){return Oz(e)||Zde(e)||e.systemKey===Pz?[ZF]:zz(e)?[Lz]:e.tags??[]}function epe(e){if(!Array.isArray(e))throw new Error("\u5458\u5DE5\u6807\u7B7E\u5FC5\u987B\u662F\u6570\u7EC4\u3002");let t=[];for(let r of e){if(typeof r!="string")throw new Error("\u5458\u5DE5\u6807\u7B7E\u5FC5\u987B\u662F\u6587\u5B57\u3002");let n=r.trim();if(n){if(n.length>VF)throw new Error(`\u6BCF\u4E2A\u5458\u5DE5\u6807\u7B7E\u4E0D\u80FD\u8D85\u8FC7 ${VF} \u4E2A\u5B57\u7B26\u3002`);if(/[,,、\x00-\x1f\x7f]/.test(n))throw new Error("\u5458\u5DE5\u6807\u7B7E\u4E0D\u80FD\u5305\u542B\u5206\u9694\u7B26\u6216\u63A7\u5236\u5B57\u7B26\u3002");if(n===ZF||n===Lz)throw new Error(`\u300C${n}\u300D\u662F\u5185\u7F6E\u6807\u7B7E\uFF0C\u4E0D\u53EF\u81EA\u5B9A\u4E49\u3002`);t.includes(n)||t.push(n)}}if(t.length>WF)throw new Error(`\u6700\u591A ${WF} \u4E2A\u5458\u5DE5\u6807\u7B7E\u3002`);return t}function tpe(e){return epe(e.split(/[,,、\n]+/))}var rpe=[{id:Rz,systemKey:JF,avatar:"plush-cat:v1:silver"},{id:Nz,systemKey:QF,avatar:"plush-cat:v1:orange"}];function t3(e){return rpe.find(t=>t.id===e.id&&t.systemKey===e.systemKey)?.avatar??null}function npe(e){return t3(e)??e.avatar??""}function r3(e){return t3(e)!==null}var Sa=B(Ee(),1);function Hz({activity:e,pawColor:t}){return e==="idle"?null:(0,Sa.jsx)("svg",{className:"wand-avatar-file-fallback",viewBox:"0 0 100 100","aria-hidden":"true","data-file-prop":e,children:e==="reading"?(0,Sa.jsxs)(Sa.Fragment,{children:[(0,Sa.jsx)("path",{d:"M25 70Q38 67 50 73Q62 67 75 70V90Q62 87 50 93Q38 87 25 90Z",fill:"#426a70"}),(0,Sa.jsx)("path",{d:"M25 71Q38 69 50 74Q62 69 75 71L74 74Q61 71 50 77Q39 71 26 74Z",fill:"#fff3d5"}),(0,Sa.jsx)("circle",{cx:"25",cy:"84",r:"4.2",fill:t}),(0,Sa.jsx)("circle",{cx:"75",cy:"84",r:"4.2",fill:t}),(0,Sa.jsx)("path",{d:"M50 77v15m-20-14 1 9m38-9-1 9",stroke:"#dba758",strokeWidth:"1"})]}):(0,Sa.jsxs)(Sa.Fragment,{children:[(0,Sa.jsx)("path",{d:"M28 75L70 72L74 92L31 95Z",fill:"#426a70"}),(0,Sa.jsx)("path",{d:"M31 76L68 74L70 76L32 78Z",fill:"#fff3d5"}),(0,Sa.jsx)("path",{d:"M34 78l2 12",stroke:"#626c78",strokeWidth:"1"}),(0,Sa.jsx)("path",{d:"M53 77L59 66",stroke:"#dba758",strokeWidth:"3",strokeLinecap:"round"}),(0,Sa.jsx)("path",{d:"M53 77L51 79L55 78Z",fill:"#626c78"}),(0,Sa.jsx)("circle",{cx:"30",cy:"86",r:"4.2",fill:t}),(0,Sa.jsx)("circle",{cx:"56",cy:"72",r:"4",fill:t})]})})}var ape=B(_(),1),_x=B(Ee(),1);function $h(){let e=ua();return ape.useLayoutEffect(()=>Ca("wand-avatar-thinking",`
|
|
188
|
-
.wand-avatar-thinking{position:absolute;left:var(--plush-thinking-x,4px);top:var(--plush-thinking-y,0px);transform:translate(-50%,-50%);z-index:2;line-height:0;color:var(--text-secondary);pointer-events:none}
|
|
189
|
-
.wand-avatar-thinking .ant-spin{display:block;color:inherit;line-height:0}
|
|
190
|
-
.wand-avatar-thinking .ant-spin-dot{font-size:24px}
|
|
191
|
-
.wand-avatar-thinking .ant-spin-dot-spin{animation-duration:var(--motion-spin)}
|
|
192
|
-
.wand-avatar-thinking[data-reduced-motion="true"] .ant-spin-dot-spin{animation:none}
|
|
193
|
-
.wand-plush-avatar[data-render-state="paused"] .ant-spin-dot-spin{animation-play-state:paused}
|
|
194
|
-
`),[]),(0,_x.jsx)("span",{className:"wand-avatar-thinking","data-reduced-motion":e,"aria-hidden":"true",children:(0,_x.jsx)(_i,{size:"small",indicator:(0,_x.jsx)("svg",{className:"ant-spin-dot-spin",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",stroke:"var(--bg-primary)",strokeWidth:"0.6",children:[1,.9,.75,.6,.45,.3,.2,.15].map((t,r)=>(0,_x.jsx)("rect",{x:"10.5",y:"1",width:"3",height:"6",rx:"1.5",opacity:t,transform:`rotate(${r*45} 12 12)`},r))})})})}var hs=B(_(),1),ipe=[[[.17,0,0],[.47,.06,-.02],[.78,.22,-.065],[1.035,.27,-.1],[1.13,.19,-.12],[1.07,.075,-.132],[.93,.11,-.105],[.96,.21,-.078]],[[.195,-.013,0],[.5,-.025,-.03],[.79,-.09,-.06],[1.04,-.14,-.105],[1.11,-.27,-.12],[1.03,-.36,-.1],[.91,-.32,-.072],[.94,-.23,-.062]],[[.17,-.026,0],[.39,-.07,-.015],[.56,-.18,-.04],[.73,-.31,-.08],[.78,-.44,-.11],[.68,-.48,-.097],[.6,-.39,-.075]],[[.195,-.039,0],[.46,.06,-.03],[.66,.11,-.04],[.8,.035,-.05],[.78,-.06,-.06],[.69,-.09,-.065]]];function ope(e,t){let r=ipe[e];if(!r)throw new RangeError("Unknown Chuer whisker");let n=r[0],a=t>0;return r.map(([o,l,c])=>[t*(n[0]+(o-n[0])*(a?.94:1)),n[1]+(l-n[1])*(a?e%2?.85:1.08:1),c*(a?.92:1)])}function spe(e,t,r){let n=ope(e,t),a=l=>`${50+l[0]*36} ${50-(r+l[1])*36}`,o=`M${a(n[0])}`;for(let l=0;l<n.length-1;l++){let c=n[l],d=n[l+1],p=n[l-1]??[2*c[0]-d[0],2*c[1]-d[1],2*c[2]-d[2]],h=n[l+2]??[2*d[0]-c[0],2*d[1]-c[1],2*d[2]-c[2]],g=[c[0]+(d[0]-p[0])/6,c[1]+(d[1]-p[1])/6,0],v=[d[0]-(h[0]-c[0])/6,d[1]-(h[1]-c[1])/6,0];o+=`C${a(g)} ${a(v)} ${a(d)}`}return o}var lpe={silver:{breed:"sculpted-huniu",pattern:"silver-tabby",coat:"#bdc2c0",dark:"#535d5b",pale:"#ece9e1",iris:"#819374",innerEar:"#c8b3ad",nose:"#a27667",head:[.9,.85,.58],ear:[.26,.34,.32],earX:.58,earY:.65,eyeX:.335,eyeY:.11,eyeWidth:.204,eyeUpper:.152,eyeLower:.139,pupilWidth:.086,pupilHeight:.12,cheekDepth:.036,noseY:-.205,noseWidth:.101,noseHeight:.074,muzzleY:-.315,mouthY:-.375,chinY:-.535,chinDepth:.065,chinWidth:.265,chinHeight:.16,jawDepth:.018,muzzleDepth:.089,furLength:.67},orange:{breed:"sculpted-chuer",pattern:"brown-tabby-white",coat:"#81735c",dark:"#37382e",pale:"#e9e3d5",iris:"#929d6d",innerEar:"#b6a18e",nose:"#a77f76",head:[.96,.78,.455],ear:[.245,.21,.31],earX:.62,earY:.62,eyeX:.365,eyeY:.075,eyeWidth:.193,eyeUpper:.105,eyeLower:.128,pupilWidth:.065,pupilHeight:.104,cheekDepth:.069,noseY:-.055,noseWidth:.081,noseHeight:.052,muzzleY:-.18,mouthY:-.277,chinY:-.445,chinDepth:.115,chinWidth:.29,chinHeight:.17,jawDepth:.025,muzzleDepth:.086,furLength:1.62}},upe={silver:[{points:[[-.04,.75],[-.1,.61],[-.07,.43],[-.045,.28]],width:.035,opacity:.82},{points:[[.06,.74],[.105,.59],[.07,.41],[.04,.27]],width:.032,opacity:.76},{points:[[-.37,.67],[-.32,.54],[-.25,.43],[-.205,.32]],width:.035,opacity:.58},{points:[[.36,.67],[.31,.52],[.24,.43],[.2,.32]],width:.034,opacity:.57},{points:[[-.3,.55],[-.19,.575],[-.1,.5]],width:.026,opacity:.51},{points:[[.3,.55],[.19,.56],[.1,.49]],width:.025,opacity:.49},{points:[[-.49,.04],[-.65,-.015],[-.8,.02],[-.9,.095]],width:.04,opacity:.67},{points:[[.49,.04],[.66,-.02],[.8,.02],[.9,.09]],width:.04,opacity:.67},{points:[[-.57,-.16],[-.72,-.19],[-.9,-.12]],width:.035,opacity:.5},{points:[[.57,-.16],[.73,-.19],[.9,-.12]],width:.035,opacity:.5}],orange:[{points:[[-.035,.71],[-.09,.55],[-.045,.37],[-.075,.22]],width:.067,opacity:.9},{points:[[.04,.72],[.105,.55],[.065,.35],[.09,.19]],width:.067,opacity:.9},{points:[[-.38,.68],[-.34,.53],[-.26,.4],[-.2,.29]],width:.062,opacity:.75},{points:[[.37,.68],[.33,.52],[.27,.39],[.21,.29]],width:.06,opacity:.74},{points:[[-.33,.54],[-.2,.565],[-.11,.46]],width:.048,opacity:.62},{points:[[.32,.535],[.19,.545],[.12,.46]],width:.045,opacity:.61},{points:[[-.55,.33],[-.7,.23],[-.93,.27]],width:.065,opacity:.64},{points:[[.55,.33],[.71,.23],[.94,.27]],width:.065,opacity:.64},{points:[[-.53,-.04],[-.71,-.12],[-.97,-.065]],width:.068,opacity:.69},{points:[[.53,-.04],[.72,-.1],[.97,-.045]],width:.062,opacity:.64}]};function UF(e){return lpe[e.coat]}function cpe(e,t){let r=(t+.045)/e.head[1],n=Math.max(0,1-(r/.8)**2)**3;return e.head[0]*(1+.025*Math.exp(-(((r+.12)/.82)**2))-.038*n)}var ab=[{id:"heart",label:"\u5FC3\u5F62"},{id:"triangle",label:"\u5706\u89D2\u4E09\u89D2"},{id:"diamond",label:"\u83F1\u5F62"},{id:"round",label:"\u5706\u5F62"},{id:"square",label:"\u5706\u89D2\u65B9\u5F62"},{id:"capsule",label:"\u80F6\u56CA"}],Ic=[{id:"coral",label:"\u73CA\u745A",color:"#E99589"},{id:"sage",label:"\u7070\u7EFF",color:"#A9BDA7"},{id:"lavender",label:"\u6DE1\u7D2B",color:"#BFB0D9"},{id:"cream",label:"\u5976\u6CB9",color:"#E8D8B8"},{id:"blue",label:"\u96FE\u84DD",color:"#A9C6D5"},{id:"ochre",label:"\u8D6D\u9EC4",color:"#D4AE65"}],ib=[{id:"none",label:"\u65E0\u773C\u955C"},{id:"gold",label:"\u91D1\u6846\u773C\u955C"},{id:"ink",label:"\u9ED1\u6846\u773C\u955C"}],ob=[{id:"none",label:"\u65E0\u5E3D\u5B50"},{id:"beanie",label:"\u9488\u7EC7\u5E3D"},{id:"beret",label:"\u8D1D\u96F7\u5E3D"}];function qz(e){return"kind"in e&&e.kind==="dog"}function sb(e){return e==="plush-dog:v1:shiba:red-scarf"?{version:1,kind:"dog",breed:"shiba",scarf:"red"}:null}function KF(e){return"kind"in e&&e.kind==="cat"}function lb(e){return e==="plush-cat:v1:silver"?{version:1,kind:"cat",coat:"silver"}:e==="plush-cat:v1:orange"?{version:1,kind:"cat",coat:"orange"}:null}function Lx(e){let t=npe(e);return sb(t)??lb(t)??cb({...e,avatar:t})}function Px(e,t){return e.some(r=>r.id===t)}function Bh(e){let t=e.split(":");if(t.length!==6||t[0]!=="plush"||t[1]!=="v1")return null;let[,,r,n,a,o]=t;return!Px(ab,r)||!Px(Ic,n)||!Px(ib,a)||!Px(ob,o)?null:{version:1,shape:r,color:n,glasses:a,hat:o}}function n3(e){let t=`plush:v${e.version}:${e.shape}:${e.color}:${e.glasses}:${e.hat}`;if(!Bh(t))throw new Error("\u6BDB\u7ED2\u5934\u50CF\u914D\u7F6E\u65E0\u6548\u3002");return t}function dpe(e){let t=2166136261;for(let r=0;r<e.length;r+=1)t=Math.imul(t^e.charCodeAt(r),16777619);return t=Math.imul(t^t>>>16,2246822507),t=Math.imul(t^t>>>13,3266489909),(t^t>>>16)>>>0}function ub({id:e,name:t}){let r=(e??"").trim()||(t??"").trim()||"member",n=(a,o)=>o[dpe(`plush:v1:${r}:${a}`)%o.length].id;return{version:1,shape:n("shape",ab),color:n("color",Ic),glasses:n("glasses",ib),hat:n("hat",ob)}}function cb(e){let t=e.avatar??"";return t.startsWith("data:image/")||/^cat:\d+$/.test(t)?null:Bh(t)??ub(e)}var ut=B(Ee(),1),Nx=ep.plushAvatarChunkSrc,Wz=3,Vz=1,ppe=[750,2e3],tb=null,GF=!1,Mz=0,Dh=new Set,un={status:"idle",assetPath:Nx.split("?")[0],attempts:0,cycleAttempts:0,maxCycleAttempts:Wz,onlineRecoveries:0,maxOnlineRecoveries:Vz,startedAt:0,finishedAt:0};globalThis.__wandPlushLoaderDiagnostics=()=>({...un});function fpe(){return new Promise((e,t)=>{let r=document.createElement("script"),n=!1,a=c=>{n||(n=!0,window.clearTimeout(o),r.onload=r.onerror=null,c?(r.remove(),t(c)):e(globalThis.__wandPlushRuntime))},o=window.setTimeout(()=>a("timeout"),15e3);r.async=!0,r.onload=()=>a(globalThis.__wandPlushRuntime?void 0:"loaded-missing-runtime"),r.onerror=()=>a("download");let l=un.attempts<=1?Nx:`${Nx}${Nx.includes("?")?"&":"?"}wandPlushRetry=${un.attempts}`;try{r.src=l,document.head.append(r)}catch{a("download")}})}function mpe(){let e=globalThis;return e.__wandPlushRuntime?(un.status="ready",un.failure=void 0,Promise.resolve(e.__wandPlushRuntime)):tb||(GF?Promise.reject(un.failure):(un.status="loading",un.startedAt=Date.now(),un.finishedAt=0,un.cycleAttempts=0,tb=(async()=>{for(let t=0;t<Wz;t++){if(t&&await new Promise(r=>window.setTimeout(r,ppe[t-1])),e.__wandPlushRuntime)return un.status="ready",un.failure=void 0,un.finishedAt=Date.now(),e.__wandPlushRuntime;un.attempts++,un.cycleAttempts++;try{let r=await fpe();return un.status="ready",un.failure=void 0,un.finishedAt=Date.now(),r}catch(r){un.failure=r==="timeout"||r==="loaded-missing-runtime"?r:"download"}}throw GF=!0,un.status="failed",un.finishedAt=Date.now(),un.failure})().finally(()=>{tb=null}),tb))}function Uz(e){if(tb||un.status!=="failed"||!Dh.size||e&&Mz>=Vz)return!1;e&&(un.onlineRecoveries=++Mz),GF=!1;for(let t of Dh)t();return!0}var Tz=()=>{Uz(!0)};function hpe(){return Uz(!1)}var gpe=2500,Kz=650,vpe=1e3,Ox=!1,Ah=!1,Rx=!1,XF=0,Gz=0,qF=!1,Cp=new Set;function jz(){document.hidden||a3()}function a3(){if(Ah)return;if(!Cp.size){Rx=!1;return}if(document.hidden){document.addEventListener("visibilitychange",jz,{once:!0});return}if(qF)return;qF=!0;let e=()=>{if(qF=!1,Ah)return;if(!Cp.size){Rx=!1;return}if(document.hidden){document.addEventListener("visibilitychange",jz,{once:!0});return}Ah=!0;let t=[...Cp];Cp.clear();for(let r of t)r()};typeof window.requestIdleCallback=="function"?window.requestIdleCallback(e,{timeout:vpe}):window.setTimeout(e,0)}function YF(){Ox||(Ox=!0,window.clearTimeout(XF),XF=0,window.removeEventListener("load",YF),Gz=window.setTimeout(a3,Kz))}function bpe(){if(!(Ah||Rx||!Cp.size)){if(Rx=!0,Ox||document.readyState==="complete"){Ox=!0,Gz=window.setTimeout(a3,Kz);return}window.addEventListener("load",YF,{once:!0}),XF=window.setTimeout(YF,Math.max(0,gpe-performance.now()))}}function ype(e){return Ah?(e(),()=>{}):(Cp.add(e),bpe(),()=>{Cp.delete(e)})}var Xz=__wandCssTextPool[9],wpe={heart:"M50 84C42 80 13 61 13 35C13 13 37 9 50 27C63 9 87 13 87 35C87 61 58 80 50 84Z",triangle:"M42 20Q50 7 58 20L86 68Q95 86 76 87H24Q5 86 14 68Z",diamond:"M41 15Q50 6 59 15L85 41Q94 50 85 59L59 85Q50 94 41 85L15 59Q6 50 15 41Z",round:"M88 50A38 38 0 1 1 12 50A38 38 0 1 1 88 50Z",square:"M32 14H68Q86 14 86 32V68Q86 86 68 86H32Q14 86 14 68V32Q14 14 32 14Z",capsule:"M50 9Q79 9 79 39V61Q79 91 50 91Q21 91 21 61V39Q21 9 50 9Z"};function Yz({config:e}){let t=hs.useId();if(qz(e))return(0,ut.jsxs)("svg",{className:"wand-plush-avatar-fallback",viewBox:"0 0 100 100","aria-hidden":"true",children:[(0,ut.jsx)("path",{d:"M17 42L21 9Q23 4 28 10L43 28H57L72 10Q77 4 79 9L83 42V65Q83 84 50 85Q17 84 17 65Z",fill:"#cb803f"}),(0,ut.jsx)("path",{d:"M24 17L27 35L36 30ZM76 17L73 35L64 30Z",fill:"#eebf90"}),(0,ut.jsx)("path",{d:"M18 58Q30 58 37 47Q50 43 63 47Q70 58 82 58V65Q82 81 50 82Q18 81 18 65",fill:"#fff0da"}),(0,ut.jsx)("ellipse",{cx:"35",cy:"45",rx:"4",ry:"5",fill:"#29201b"}),(0,ut.jsx)("ellipse",{cx:"65",cy:"45",rx:"4",ry:"5",fill:"#29201b"}),(0,ut.jsx)("path",{d:"M44 58Q50 55 56 58Q57 63 50 65Q43 63 44 58Z",fill:"#29201b"}),(0,ut.jsx)("path",{d:"M50 65v4m-10 0q10 9 20 0",fill:"none",stroke:"#66402b",strokeWidth:"2",strokeLinecap:"round"}),(0,ut.jsx)("path",{d:"M24 77Q50 87 76 77L78 86Q50 97 22 86Z",fill:"#c43f3b"}),(0,ut.jsx)("path",{d:"M62 83L77 86L73 98L60 93Z",fill:"#ae302d"})]});if(KF(e)){let n=e.coat==="silver",a=UF(e),{coat:o,dark:l,pale:c,iris:d,innerEar:p,nose:h}=a,g=k=>50+k*36,v=k=>50-k*36,y=[];for(let k of[-1,1])for(let F=0;F<=48;F++){let C=(k<0?F:48-F)/48*Math.PI,D=Math.cos(C)*a.head[1]-.045,S=!n&&D<.2&&D>-.55&&F%3===0?.035:0;y.push([g(k*(Math.sin(C)*cpe(a,D)+S)),v(D)])}let w=y.map(([k,F],C)=>`${C?"L":"M"}${k} ${F}`).join(" ")+"Z",x=k=>Array.from({length:65},(F,C)=>{let D=C/64*Math.PI*2,S=Math.cos(D),A=Math.sin(D);return`${C?"L":"M"}${g(k*a.eyeX+S*a.eyeWidth)} ${v(a.eyeY+Math.sign(A)*Math.pow(Math.abs(A),.82)*(A>=0?a.eyeUpper:a.eyeLower)+k*S*.018)}`}).join(" ")+"Z";return(0,ut.jsxs)("svg",{className:"wand-plush-avatar-fallback",viewBox:"0 0 100 100","aria-hidden":"true",children:[(0,ut.jsxs)("defs",{children:[(0,ut.jsx)("clipPath",{id:t,children:(0,ut.jsx)("path",{d:w})}),(0,ut.jsxs)("radialGradient",{id:`${t}-jaw`,cx:"50",cy:v(a.chinY),r:a.chinWidth*56,gradientUnits:"userSpaceOnUse",children:[(0,ut.jsx)("stop",{offset:"0",stopColor:c}),(0,ut.jsx)("stop",{offset:".65",stopColor:c,stopOpacity:".97"}),(0,ut.jsx)("stop",{offset:"1",stopColor:c,stopOpacity:".86"})]})]}),[-1,1].map(k=>(0,ut.jsxs)("g",{transform:`translate(${g(k*a.earX)} ${v(a.earY)}) rotate(${k*16})`,children:[(0,ut.jsx)("path",{d:"M-.18 -.93 Q0 -1.22 .18 -.93 L.87 .48 Q1.03 .8 .66 .83 Q0 .92 -.66 .83 Q-1.03 .8 -.87 .48Z",transform:`scale(${a.ear[0]*36} ${a.ear[1]*36})`,fill:o}),(0,ut.jsx)("path",{d:"M-.18 -.93 Q0 -1.22 .18 -.93 L.87 .48 Q1.03 .8 .66 .83 Q0 .92 -.66 .83 Q-1.03 .8 -.87 .48Z",transform:`translate(0 .7) scale(${a.ear[0]*21} ${a.ear[1]*23})`,fill:p})]},k)),(0,ut.jsx)("path",{d:w,fill:o}),(0,ut.jsxs)("g",{clipPath:`url(#${t})`,children:[(0,ut.jsx)("path",{d:n?"M16 63Q25 57 32 57Q35 53 44 53Q50 51 56 53Q65 53 68 57Q75 57 84 63L78 94H22Z":"M10 64Q24 61 28 62Q34 64 40 54Q47 53 48 48Q49 40 52 45Q53 53 61 53Q63 61 76 62L89 66L82 94H16Z",fill:`url(#${t}-jaw)`}),upe[e.coat].map((k,F)=>(0,ut.jsx)("path",{d:k.points.map(([C,D],S)=>`${S?"L":"M"}${g(C)} ${v(D)}`).join(" "),fill:"none",stroke:l,strokeWidth:k.width*56,opacity:k.opacity,strokeLinecap:"round",strokeLinejoin:"round"},F))]}),[-1,1].map(k=>(0,ut.jsxs)("g",{children:[(0,ut.jsx)("path",{d:x(k),fill:d,stroke:"#354134",strokeWidth:".8"}),(0,ut.jsx)("ellipse",{cx:g(k*a.eyeX-k*.008),cy:v(a.eyeY),rx:a.pupilWidth*36,ry:a.pupilHeight*36,fill:"#152018"}),(0,ut.jsx)("ellipse",{cx:g(k*a.eyeX-.041),cy:v(a.eyeY+.048),rx:".54",ry:".75",fill:"#f5f2df"}),(n?[0,1,2]:[0,1,2,3]).map(F=>(0,ut.jsx)("path",{"data-whisker":n?"straight":"curly",d:n?`M${g(k*.18)} ${v(a.muzzleY-F*.013)}Q${g(k*.63)} ${v(a.muzzleY+.115-F*.074)} ${g(k*(.97+F%2*.09))} ${v(a.muzzleY+.19-F*.143)}`:spe(F,k,a.muzzleY),fill:"none",stroke:"#eae5d8",strokeWidth:n?".3":".36"},F))]},k)),(0,ut.jsx)("path",{d:`M${g(-a.noseWidth)} ${v(a.noseY+a.noseHeight*.4)}Q50 ${v(a.noseY+a.noseHeight*.65)} ${g(a.noseWidth)} ${v(a.noseY+a.noseHeight*.4)}L50 ${v(a.noseY-a.noseHeight*.7)}Z`,fill:h,stroke:"#665344",strokeWidth:".45"}),(0,ut.jsx)("path",{d:`M50 ${v(a.noseY-a.noseHeight*.6)}V${v(a.mouthY+.035)}m-4 1q4-1 8 0`,fill:"none",stroke:"#665344",strokeWidth:".6",strokeLinecap:"round"})]})}let r=Ic.find(n=>n.id===e.color)?.color??"#ecb6a3";return(0,ut.jsxs)("svg",{className:"wand-plush-avatar-fallback",viewBox:"0 0 100 100","aria-hidden":"true",children:[(0,ut.jsx)("path",{d:wpe[e.shape],fill:r}),(0,ut.jsx)("ellipse",{cx:"38",cy:"51",rx:"2.6",ry:"4",fill:"#25211e"}),(0,ut.jsx)("ellipse",{cx:"62",cy:"51",rx:"2.6",ry:"4",fill:"#25211e"}),(0,ut.jsx)("path",{d:"M45 62Q50 68 55 62",fill:"none",stroke:"#25211e",strokeWidth:"2.3",strokeLinecap:"round"}),e.glasses!=="none"?(0,ut.jsxs)("g",{fill:"none",stroke:e.glasses==="gold"?"#a88143":"#302d29",strokeWidth:e.glasses==="gold"?1.4:2.2,children:[(0,ut.jsx)("circle",{cx:"38",cy:"50",r:"10"}),(0,ut.jsx)("circle",{cx:"62",cy:"50",r:"10"}),(0,ut.jsx)("path",{d:"M48 49Q50 47 52 49M28 48H18M72 48H82"})]}):null,e.hat==="beanie"?(0,ut.jsxs)("g",{fill:"#b96843",children:[(0,ut.jsx)("path",{d:"M23 28Q24 2 50 2Q76 2 77 28Z"}),(0,ut.jsx)("rect",{x:"20",y:"21",width:"60",height:"10",rx:"4"}),(0,ut.jsx)("circle",{cx:"50",cy:"4",r:"7"})]}):null,e.hat==="beret"?(0,ut.jsxs)("g",{fill:"#e9dfca",children:[(0,ut.jsx)("ellipse",{cx:"51",cy:"19",rx:"33",ry:"12",transform:"rotate(12 51 19)"}),(0,ut.jsx)("path",{d:"M54 9L55 3",stroke:"#d4c6a9",strokeWidth:"4"})]}):null]})}function i3({config:e,size:t=32,className:r=""}){return hs.useEffect(()=>{Ca("wand-plush-avatar-styles",Xz)},[]),(0,ut.jsx)("span",{className:`wand-plush-avatar ${r}`.trim(),"data-plush-avatar":"","data-avatar-config":JSON.stringify(e),"data-renderer":"static","aria-hidden":"true",style:{width:t,height:t},children:(0,ut.jsx)(Yz,{config:e})})}function Ih({config:e,size:t=32,className:r="",speaking:n=!1,thinking:a=!1,loading:o=!1,fileActivity:l="idle",interactive:c=!1,onRendererChange:d}){let p=hs.useRef(null),h=hs.useRef(null),g=ua(),[v,y]=hs.useState("deferred"),[w,x]=hs.useState("static"),[k,F]=hs.useState(),C=JSON.stringify(e),D=hs.useRef({config:e,size:t,speaking:n,thinking:a,fileActivity:l,interactive:c,reducedMotion:g}),S=hs.useRef(d);return S.current=d,D.current={config:e,size:t,speaking:n,thinking:a,fileActivity:l,interactive:c,reducedMotion:g},hs.useEffect(()=>{Ca("wand-plush-avatar-styles",Xz);let A=p.current;if(!A)return;let I=!0,j=!1,$=!1,P="",N=null,R=null,U=null,H=(W,z)=>{let Y=`${W}:${z??""}`;P!==Y&&(P=Y,S.current?.(W,z))},q=()=>{!I||j||h.current||(j=!0,$=!1,U?.disconnect(),y("loading"),x("static"),F(void 0),H("loading"),mpe().then(W=>{j=!1,I&&(h.current=W.attach(A,D.current,(z,Y,G)=>{I&&(y(z),x(Y),F(G),H(z,G))}))},()=>{j=!1,$=!0,I&&(y("fallback"),x("fallback"),F("runtime-load"),H("fallback","runtime-load"))}))},L=()=>{if(!(!I||j||h.current)){if(R?.(),R=null,document.hidden){let W=()=>{document.hidden||(document.removeEventListener("visibilitychange",W),R=null,L())};document.addEventListener("visibilitychange",W),R=()=>document.removeEventListener("visibilitychange",W);return}if(c||Ah){q();return}N||(N=ype(()=>{N=null,q()}))}};U=new IntersectionObserver(W=>{if(W.some(z=>z.isIntersecting)){L();return}N?.(),N=null},{rootMargin:"48px"}),U.observe(A);let O=()=>{$&&q()};return Dh.size||window.addEventListener("online",Tz),Dh.add(O),()=>{Dh.delete(O),Dh.size||window.removeEventListener("online",Tz),I=!1,U?.disconnect(),N?.(),N=null,R?.(),R=null,h.current?.dispose(),h.current=null}},[]),hs.useEffect(()=>{h.current?.update(D.current)},[C,t,n,a,l,c,g]),(0,ut.jsxs)("span",{className:`wand-plush-avatar ${r}`.trim(),"data-plush-avatar":"","data-avatar-config":C,"data-avatar-breed":KF(e)?UF(e).breed:void 0,"data-file-activity":l,"data-renderer":v,"data-render-state":w,"data-fallback-reason":k,title:v==="fallback"?k==="webgl-unavailable"?"\u9759\u6001\u5934\u50CF \xB7 \u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 3D":k==="runtime-load"?"\u9759\u6001\u5934\u50CF \xB7 3D \u7EC4\u4EF6\u672A\u80FD\u52A0\u8F7D":"\u9759\u6001\u5934\u50CF \xB7 3D \u6682\u4E0D\u53EF\u7528":void 0,"aria-hidden":"true",style:{width:t,height:t},children:[v==="webgl"?null:(0,ut.jsx)(Yz,{config:e}),(0,ut.jsx)("canvas",{ref:p,width:t,height:t}),l!=="idle"?(0,ut.jsx)(Hz,{activity:l,pawColor:KF(e)?UF(e).coat:qz(e)?"#cb803f":Ic.find(A=>A.id===e.color)?.color??"#ecb6a3"}):o||a||v==="loading"?(0,ut.jsx)($h,{}):null]})}var rb=[{name:"\u6A58\u732B",base:"#F0923A",dark:"#C46A1A",light:"#F0923A"},{name:"\u94F6\u6E10\u5C42",base:"#9EAAB8",dark:"#6B7B8D",light:"#C5CED8",eye:"#3F8F55"},{name:"\u5976\u725B\u732B",base:"#F4F1EA",dark:"#2F2F33",light:"#F4F1EA"},{name:"\u9ED1\u732B",base:"#3A3A40",dark:"#1E1E22",light:"#55555C",eye:"#E9C63F"},{name:"\u66B9\u7F57",base:"#E9DCC4",dark:"#6B4A36",light:"#F4ECDD",eye:"#3F7FD8"},{name:"\u84DD\u732B",base:"#7C8BA6",dark:"#56627A",light:"#98A6BE",eye:"#E0A43A"},{name:"\u4E09\u82B1",base:"#F2E6D4",dark:"#C46A1A",light:"#3A3A40"},{name:"\u6A31\u7C89",base:"#F2B8C6",dark:"#C9788D",light:"#F8D3DC"}],Qr="";function xpe(e){let t=rb[e%rb.length],r=t.base,n=t.dark,a=t.light??t.base,o="#FFFFFF",l=t.eye??"#2D2D2D",c="#F28B9A";return[[Qr,n,Qr,Qr,Qr,Qr,Qr,Qr,n,Qr],[n,r,n,Qr,Qr,Qr,Qr,n,r,n],[n,r,r,r,r,r,r,r,r,n],[r,r,o,l,r,r,o,l,r,r],[r,r,o,o,r,r,o,o,r,r],[r,r,r,r,c,c,r,r,r,r],[r,n,r,a,r,r,a,r,n,r],[Qr,r,r,r,r,r,r,r,r,Qr],[Qr,Qr,r,n,r,r,n,r,Qr,Qr],[Qr,Qr,Qr,r,Qr,Qr,r,Qr,Qr,Qr]]}function Qz(e,t){let r=0;for(let n=0;n<e.length;n+=1)r=(r<<5)-r+e.charCodeAt(n)|0;return Math.abs(r)%t}function Zz(e){let t=/^cat:(\d+)$/.exec(e.avatar??"");return t?Number(t[1])%rb.length:Qz(e.id||e.name||"member",rb.length)}var Epe="#FFFFFF",_z=[{name:"\u8D6D\u6A59",from:"#A8471F",to:"#7E3214"},{name:"\u6E56\u84DD",from:"#2F6DB5",to:"#1F4E8A"},{name:"\u677E\u7EFF",from:"#2E7D5B",to:"#1C5B41"},{name:"\u7D2B\u68E0",from:"#6B4EA8",to:"#4F3883"},{name:"\u975B\u9752",from:"#2C6E7F",to:"#1B4F5E"},{name:"\u7EDB\u7EA2",from:"#B03A48",to:"#872633"},{name:"\u82A5\u9EC4",from:"#8A6A16",to:"#674D0D"},{name:"\u77F3\u9752",from:"#4A5B8C",to:"#34426A"}],kpe=/^cat:(\d+)$/;function Cpe({id:e,name:t}){return(e??"").trim()||(t??"").trim()||"member"}function Spe({id:e,name:t}){let r=(t??"").trim()||(e??"").trim(),n=Array.from(r)[0]??"";return n?/^[a-z]$/.test(n)?n.toUpperCase():n:"?"}function db(e){let t=_z[Qz(Cpe(e),_z.length)];return{from:t.from,to:t.to,text:Epe,glyph:Spe(e)}}function zx(e){return{background:`linear-gradient(135deg, ${e.from}, ${e.to})`,color:e.text}}function Jz(e){let t=e.avatar??"";return t.startsWith("data:image/")?{kind:"upload",src:t}:!e.id&&!e.name?null:kpe.test(t)?{kind:"cat",coat:Zz({id:e.id??"",name:e.name??"",avatar:t})}:{kind:"generated",face:db(e)}}var ta=B(Ee(),1);function eH({coat:e}){let t=xpe(e),r=new Map;for(let n=0;n<t.length;n+=1){let a=t[n];for(let o=0;o<a.length;o+=1){let l=a[o];if(!l)continue;let c=r.get(l);c?c.push(`M${o} ${n}h1v1h-1z`):r.set(l,[`M${o} ${n}h1v1h-1z`])}}return(0,ta.jsx)("svg",{className:"wand-team-avatar-cat",width:"74%",height:"74%",viewBox:"0 0 10 10",shapeRendering:"crispEdges","aria-hidden":"true",children:[...r].map(([n,a])=>(0,ta.jsx)("path",{d:a.join(""),fill:n},n))})}function Hx({face:e,size:t}){return(0,ta.jsx)("span",{className:"wand-generated-avatar-glyph","aria-hidden":"true",style:{display:"block",fontSize:Math.max(10,Math.round(t*.42)),fontWeight:600,lineHeight:1,color:e.text},children:e.glyph})}function qx(e,t){let r=sb(e.avatar??"")??lb(e.avatar??"")??Bh(e.avatar??"");if(r)return{style:{background:"transparent"},icon:(0,ta.jsx)(Ih,{config:r,size:t})};let n=Jz(e)??{kind:"generated",face:db(e)};return n.kind==="upload"?{src:n.src}:n.kind==="cat"?{icon:(0,ta.jsx)(eH,{coat:n.coat})}:{style:zx(n.face),icon:(0,ta.jsx)(Hx,{face:n.face,size:t})}}function tH({member:e,size:t="md",state:r="idle",showProvider:n=!1,className:a}){let o={sm:36,md:48,lg:56}[t],l=r==="done"?"var(--success)":r==="failed"?"var(--danger)":r==="waiting"?"var(--warning)":r==="working"?"var(--info)":void 0,c=e.employeeId?Lx({...e,id:e.employeeId}):null,d=c?{style:{background:"transparent"},icon:(0,ta.jsx)(Ih,{config:c,size:o})}:qx(e,o);return(0,ta.jsx)(or,{children:(0,ta.jsx)(ji,{className:ct("wand-team-avatar",a),"data-size":t,"data-state":r==="idle"?void 0:r,"data-leader":e.isLeader||void 0,title:e.name,offset:[-o/2,-4],count:e.isLeader?(0,ta.jsx)("span",{"aria-hidden":"true",style:{color:"var(--warning)"},children:"\u265B"}):void 0,children:(0,ta.jsx)(ji,{offset:[0,o],count:r==="done"?(0,ta.jsx)(Ti,{size:16,style:{background:l},icon:(0,ta.jsx)("span",{children:"\u2713"})}):n?(0,ta.jsx)(Ti,{size:18,shape:"square",icon:(0,ta.jsx)(Js,{provider:e.agent.provider})}):void 0,children:(0,ta.jsx)(Ti,{shape:"square",size:o,src:d.src,style:{...d.style,outline:l?`2px solid ${l}`:void 0,outlineOffset:1},icon:d.icon})})})})}function Fpe({members:e,max:t=5,size:r="sm"}){let n=[...e].sort((a,o)=>Number(o.isLeader)-Number(a.isLeader));return(0,ta.jsx)(or,{children:(0,ta.jsx)(Ti.Group,{className:"wand-team-avatar-stack","data-size":r,max:{count:t},children:n.map((a,o)=>(0,ta.jsx)(tH,{member:a,size:r},a.id||o))})})}async function o3(e,t){let r=URL.createObjectURL(e);try{let n=await new Promise((d,p)=>{let h=new Image;h.onload=()=>d(h),h.onerror=()=>p(new Error("\u56FE\u7247\u8BFB\u53D6\u5931\u8D25\u3002")),h.src=r}),a=document.createElement("canvas");a.width=96,a.height=96;let o=a.getContext("2d");if(!o)throw new Error("\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u56FE\u7247\u88C1\u526A\u3002");let l=Math.min(n.naturalWidth,n.naturalHeight);o.drawImage(n,(n.naturalWidth-l)/2,(n.naturalHeight-l)/2,l,l,0,0,96,96);let c=a.toDataURL("image/jpeg",.8);if(c.length>t)throw new Error("\u56FE\u7247\u592A\u5927\uFF0C\u8BF7\u6362\u4E00\u5F20\u3002");return c}finally{URL.revokeObjectURL(r)}}var ra={open:!1,tab:"profile",nested:null,detail:!1,revision:0},s3=new Set;function Mh(e){ra={...e,revision:ra.revision+1};for(let t of s3)t()}var mo={open(e){Mh({open:!0,tab:e??"profile",nested:null,detail:e!==void 0})},close(){!ra.open&&ra.nested===null||Mh({...ra,open:!1,nested:null,detail:!1})},closeTopmost(){return ra.nested!==null?(Mh({...ra,nested:null}),!0):ra.open&&ra.detail?(Fa.showDirectory(),!0):this.closeIfOpen()},closeIfOpen(){return ra.open?(this.close(),!0):!1},isOpen(){return ra.open}},Fa={subscribe(e){return s3.add(e),()=>s3.delete(e)},getSnapshot(){return ra},setTab(e){ra.tab===e&&ra.detail||Mh({...ra,tab:e,detail:!0})},showDirectory(){ra.detail&&Mh({...ra,detail:!1,nested:null})},setNested(e){ra.nested!==e&&Mh({...ra,nested:e})}},l3="\u6211",Dpe=6e4,Ape=/^data:image\/(png|jpeg|webp);base64,[A-Za-z0-9+/=]+$/,$pe=/^cat:(\d{1,2})$/,rH=24;function nH(e){return typeof e=="string"?e.trim():""}function Bpe(e){return $pe.test(e)||Ape.test(e)||!!(Bh(e)??lb(e)??sb(e))}function Ipe(e){let t=nH(e);return!t||t.length<=Dpe&&Bpe(t)?t:""}function u3(e){if(!e||typeof e!="object")return;let t=e,r=nH(t.name).slice(0,rH),n=Ipe(t.avatar);if(!(!r&&!n))return{...r?{name:r}:{},...n?{avatar:n}:{}}}function ca(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Th(e){return ca(e)?e:{}}function Ge(e,t=""){return typeof e=="string"?e:t}function Da(e,t=0){return typeof e=="number"&&Number.isFinite(e)?e:t}async function gs(e){try{let t=await e.json();return ca(t)?t:{error:"\u670D\u52A1\u7AEF\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6570\u636E\uFF0C\u8BF7\u91CD\u8BD5\u3002"}}catch(t){if(t instanceof Error&&t.name==="AbortError")throw t;return{error:e.ok?"\u670D\u52A1\u7AEF\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6570\u636E\uFF0C\u8BF7\u91CD\u8BD5\u3002":`\u8BF7\u6C42\u5931\u8D25\uFF08${e.status}\uFF09`}}}var aH={sessions:"sessions","structured-sessions":"sessions",commands:"sessions","session-list":"sessions","session-directories":"sessions",conversations:"conversations","wand-tasks":"tasks","wand-task-agent-defaults":"tasks",tasks:"tasks","workspace-tasks":"tasks",workspaces:"tasks","wand-milestones":"tasks",missions:"tasks","scheduled-tasks":"tasks",files:"files",upload:"files",directory:"files","session-files":"files","file-preview":"files","file-read":"files","file-write":"files","recent-paths":"files",settings:"settings",config:"settings","user-profile":"settings","auto-update":"settings","update-channel":"settings",models:"models","model-groups":"models","local-models":"models",login:"authentication",logout:"authentication","app-login":"authentication","session-check":"authentication","set-password":"authentication",update:"server_update","update-status":"server_update","check-update":"server_update","android-apk-update":"app_update","android-apk":"app_update","macos-app-update":"app_update","macos-dmg-update":"app_update","macos-dmg":"app_update","ios-ipa-update":"app_update","ios-ipa":"app_update","provider-cli-updates":"provider_update","daemon-maintenance":"daemon_update","storage-cleanup":"storage",git:"repository",github:"repository"};function Mpe(e){let t=e.split("?")[0].split("/")[2]??"";return Object.prototype.hasOwnProperty.call(aH,t)?aH[t]:"api"}function c3(e){let t;try{t=new URL(e,"https://wand.invalid").pathname}catch{return"api"}return Mpe(t)}var iH=null,pb=new Map,d3=0;function f3(e){iH=e}function Tpe(e,t){let r=new TextEncoder;return r.encode(e).length<=t?e:new TextDecoder().decode(r.encode(e).subarray(0,t-3)).replace(/\uFFFD$/,"")+"\u2026"}function p3(e,t){return Tpe(e.replace(/\b(Bearer|Basic)\s+[^\s"',;]+/gi,"$1 [REDACTED]").replace(/((?:authorization|cookie|set-cookie)\s*:\s*)[^\r\n]+/gi,"$1[REDACTED]").replace(/(["']?(?:password|passwd|api[_-]?key|access[_-]?token|refresh[_-]?token|token|secret)["']?\s*[:=]\s*)(?:"[^"\r\n]*"|'[^'\r\n]*'|[^\s&,;\r\n}]+)/gi,"$1[REDACTED]").replace(/(https?:\/\/)[^\s/@]+:[^\s/@]+@/gi,"$1[REDACTED]@"),t)}function mu(e,t,r){try{let n=iH;if(!n||!n.ready()||!n.secure()||d3>=2||!(t instanceof Error)&&typeof t!="string"||t instanceof Error&&(t.name==="AbortError"||t.name==="CancellationError"))return;let a=t instanceof Error?t.name:"Error",o=r??(e==="update_failed"?"server_update":e==="websocket_error"?"realtime":e==="http_5xx"?"api":e==="startup_failed"?"startup":"runtime"),l=`${o}:${e}:${a}`,c=Date.now();if(c-(pb.get(l)??0)<5*6e4)return;pb.size>=32&&pb.delete(pb.keys().next().value),pb.set(l,c);let d=n.version(),p={schema:1,source:"web",event:e,feature:o,version:/^\d+\.\d+\.\d+(?:[-+][A-Za-z0-9.-]{1,80})?$/.test(d)?d:"0.0.0",error:{name:p3(a,128),message:p3(t instanceof Error?t.message:t,8192),stack:p3(t instanceof Error?t.stack??"":"",16384)}};if(new TextEncoder().encode(JSON.stringify(p)).length>32768)return;d3++,Promise.resolve().then(()=>n.fetch("/api/feedback/client",{method:"POST",credentials:"same-origin",redirect:"error",headers:{"Content-Type":"application/json"},body:JSON.stringify(p),signal:AbortSignal.timeout(3e3)})).then(h=>h.body?.cancel()).catch(()=>{}).finally(()=>{d3--})}catch{}}function m3(e){let t=n=>{n.error instanceof Error&&mu("uncaught_exception",n.error)},r=n=>mu("unhandled_rejection",n.reason);return e.addEventListener("error",t),e.addEventListener("unhandledrejection",r),()=>{e.removeEventListener("error",t),e.removeEventListener("unhandledrejection",r)}}var Aa=class extends Error{constructor(e,t,r){super(e),oe(this,"status",t),this.name="HttpResponseError",t>=500&&mu("http_5xx",this,r)}};function h3(){let e=globalThis.crypto;if(typeof e?.randomUUID=="function")return e.randomUUID();if(typeof e?.getRandomValues!="function")throw new Error("\u5F53\u524D\u6D4F\u89C8\u5668\u65E0\u6CD5\u751F\u6210\u8BF7\u6C42\u6807\u8BC6\uFF0C\u8BF7\u4F7F\u7528\u652F\u6301\u5B89\u5168\u968F\u673A\u6570\u7684\u6D4F\u89C8\u5668\u3002");let t=e.getRandomValues(new Uint8Array(16));t[6]=t[6]&15|64,t[8]=t[8]&63|128;let r=Array.from(t,n=>n.toString(16).padStart(2,"0"));return`${r.slice(0,4).join("")}-${r.slice(4,6).join("")}-${r.slice(6,8).join("")}-${r.slice(8,10).join("")}-${r.slice(10).join("")}`}async function Dt(e){let t;try{t=await e.json()}catch(n){throw n instanceof Error&&n.name==="AbortError"?n:new Aa(e.ok?"\u670D\u52A1\u7AEF\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6570\u636E\uFF0C\u8BF7\u91CD\u8BD5\u3002":`\u8BF7\u6C42\u5931\u8D25\uFF08${e.status}\uFF09`,e.status,c3(e.url))}let r=ca(t)&&typeof t.error=="string"?t.error:"";if(!e.ok||r)throw new Aa(r||`\u8BF7\u6C42\u5931\u8D25\uFF08${e.status}\uFF09`,e.status,c3(e.url));if(t===null||typeof t!="object")throw new Aa("\u670D\u52A1\u7AEF\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u6570\u636E\uFF0C\u8BF7\u91CD\u8BD5\u3002",e.status,c3(e.url));return t}async function yt(e,t){let r;try{r=await fetch(e,t)}catch(n){throw n instanceof Error&&n.name==="AbortError"?n:new Aa("\u65E0\u6CD5\u8FDE\u63A5\u670D\u52A1\u3002\u8BF7\u68C0\u67E5\u7F51\u7EDC\u6216\u786E\u8BA4 Wand \u670D\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u7136\u540E\u91CD\u8BD5\u3002",0)}return Dt(r)}function mn(e,t="POST"){return{method:t,headers:{"content-type":"application/json"},body:JSON.stringify(e)}}var Wx=B(Ee(),1);function Sp({className:e,style:t}){return(0,Wx.jsxs)("svg",{className:e,style:{width:24,height:24,flexShrink:0,...t},viewBox:`0 0 ${Bo.viewport} ${Bo.viewport}`,"aria-hidden":"true",focusable:"false","data-wand-brand":"pixel-cat",children:[(0,Wx.jsx)("rect",{width:Bo.viewport,height:Bo.viewport,rx:"24",fill:Bo.background}),(0,Wx.jsx)("g",{transform:`translate(${Bo.inset} ${Bo.inset})`,children:Bo.paths.map(({fill:r,d:n})=>(0,Wx.jsx)("path",{fill:r,d:n},r))})]})}var g3=B(Ee(),1);function Te({className:e,kind:t="secondary",size:r="medium",type:n="button",ref:a,...o}){return(0,g3.jsx)(or,{children:(0,g3.jsx)(rl,{...o,ref:a,htmlType:n,type:t==="soft"?void 0:t==="primary"||t==="danger"?"primary":t==="ghost"?"text":"default",color:t==="soft"?"default":void 0,danger:t==="danger",variant:t==="soft"?"filled":void 0,size:r==="medium"?"middle":r,className:ct("wand-ui-button",`wand-ui-button-${t}`,r!=="medium"&&`wand-ui-button-${r}`,e)})})}function Er({className:e,kind:t="ghost",size:r="small",children:n,...a}){return(0,g3.jsx)(Te,{...a,kind:t,size:r,className:ct("wand-ui-icon-button",e),children:n})}var oH=B(_()),jpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},_pe=jpe;function v3(){return v3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},v3.apply(this,arguments)}var Ppe=(e,t)=>oH.createElement(Ut,v3({},e,{ref:t,icon:_pe})),Npe=oH.forwardRef(Ppe),b3=Npe;var sH=B(_()),Ope={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},Rpe=Ope;function y3(){return y3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},y3.apply(this,arguments)}var Lpe=(e,t)=>sH.createElement(Ut,y3({},e,{ref:t,icon:Rpe})),zpe=sH.forwardRef(Lpe),w3=zpe;var lH=B(_()),Hpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"},qpe=Hpe;function x3(){return x3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},x3.apply(this,arguments)}var Wpe=(e,t)=>lH.createElement(Ut,x3({},e,{ref:t,icon:qpe})),Vpe=lH.forwardRef(Wpe),E3=Vpe;var uH=B(_()),Upe={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},Kpe=Upe;function k3(){return k3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},k3.apply(this,arguments)}var Gpe=(e,t)=>uH.createElement(Ut,k3({},e,{ref:t,icon:Kpe})),Xpe=uH.forwardRef(Gpe),Mc=Xpe;var hn=B(_()),Vx=(e,t,r)=>({background:e,[`${r}-icon`]:{color:t}}),Ype=e=>{let{componentCls:t,motionDurationSlow:r,marginXS:n,marginSM:a,fontSize:o,fontSizeLG:l,lineHeight:c,motionEaseInOutCirc:d,borderRadius:p,withDescriptionIconSize:h,colorText:g,colorTextHeading:v,withDescriptionPadding:y,defaultPadding:w,lineWidth:x,lineType:k,colorSuccessBorder:F,colorWarningBorder:C,colorErrorBorder:D,colorInfoBorder:S}=e;return{[t]:{...fr(e),position:"relative",display:"flex",alignItems:"center",padding:w,wordWrap:"break-word",borderRadius:p,borderWidth:ve(x),borderStyle:k,[`&${t}-success`]:{borderColor:F},[`&${t}-info`]:{borderColor:S},[`&${t}-warning`]:{borderColor:C},[`&${t}-error`]:{borderColor:D},[`&${t}-filled`]:{borderColor:"transparent"},[`&${t}-rtl`]:{direction:"rtl"},[`${t}-section`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:n,lineHeight:0},"&-description":{display:"none",fontSize:o,lineHeight:c},"&-title":{color:v},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:["max-height","opacity","padding-top","padding-bottom","margin-bottom"].map(A=>`${A} ${r} ${d}`).join(", ")},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0},[`&${t}-with-description`]:{alignItems:"flex-start",padding:y,[`${t}-icon`]:{marginInlineEnd:a,fontSize:h,lineHeight:0},[`${t}-title`]:{display:"block",marginBottom:n,color:v,fontSize:l},[`${t}-description`]:{display:"block",color:g}},[`&${t}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}}},Qpe=e=>{let{componentCls:t,colorSuccess:r,colorSuccessBg:n,colorWarning:a,colorWarningBg:o,colorError:l,colorErrorBg:c,colorInfo:d,colorInfoBg:p}=e;return{[t]:{"&-success":Vx(n,r,t),"&-info":Vx(p,d,t),"&-warning":Vx(o,a,t),"&-error":{...Vx(c,l,t),[`${t}-description > pre`]:{margin:0,padding:0}}}}},Zpe=e=>{let{componentCls:t,iconCls:r,motionDurationMid:n,marginXS:a,fontSizeIcon:o,colorIcon:l,colorIconHover:c}=e;return{[t]:{[`${t}-actions`]:{marginInlineStart:a},[`${t}-close-icon`]:{marginInlineStart:a,padding:0,overflow:"hidden",fontSize:o,lineHeight:ve(o),backgroundColor:"transparent",border:"none",cursor:"pointer",...Ai(e),[`${r}-close`]:{color:l,transition:`color ${n}`,"&:hover":{color:c}}},"&-close-text":{color:l,transition:`color ${n}`,"&:hover":{color:c}}}}},Jpe=e=>({borderRadius:e.borderRadiusLG,withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`}),efe=Et("Alert",e=>[Ype(e),Qpe(e),Zpe(e)],Jpe),tfe=e=>{let{icon:t,type:r,className:n,style:a,successIcon:o,infoIcon:l,warningIcon:c,errorIcon:d}=e;return hn.createElement("span",{className:n,style:a},t??{success:o??hn.createElement(E3,null),info:l??hn.createElement(b3,null),error:d??hn.createElement(Lv,null),warning:c??hn.createElement(w3,null)}[r])},rfe=e=>{let{isClosable:t,prefixCls:r,closeIcon:n,handleClose:a,ariaProps:o,className:l,style:c}=e,d=n===!0||n===void 0?hn.createElement(Mc,null):n;return t?hn.createElement("button",{type:"button",onClick:a,className:te(`${r}-close-icon`,l),tabIndex:0,style:c,...o},d):null},nfe=hn.forwardRef((e,t)=>{let{description:r,prefixCls:n,message:a,title:o,banner:l,className:c,rootClassName:d,style:p,onMouseEnter:h,onMouseLeave:g,onClick:v,afterClose:y,showIcon:w,closable:x,closeText:k,closeIcon:F,action:C,id:D,styles:S,classNames:A,...I}=e,j=o??a,[$,P]=hn.useState(!1),N=hn.useRef(null);hn.useImperativeHandle(t,()=>({nativeElement:N.current}));let{getPrefixCls:R,direction:U,variant:H,closable:q,closeIcon:L,className:O,style:W,classNames:z,styles:Y,successIcon:G,infoIcon:Z,warningIcon:T,errorIcon:V}=jt("alert"),X=R("alert",n),[Q,re]=efe(X),{onClose:J,afterClose:se}=kt(x)?x:{},ue=Ue=>{P(!0),(J??e.onClose)?.(Ue)},ae=hn.useMemo(()=>e.type!==void 0?e.type:l?"warning":"info",[e.type,l]),he=e.variant??H??"outlined",le=hn.useMemo(()=>kt(x)||k?!0:typeof x=="boolean"?x:F!==!1&&Yr(F)?!0:!!q,[k,F,x,q]),fe=l&&w===void 0?!0:w,we={...e,prefixCls:X,variant:he,type:ae,showIcon:fe,closable:le},_e=lt(W),$e=lt(p),[De,Ce]=Tt([z,A],[Y,_e,S,$e],{props:we}),qe=te(X,`${X}-${ae}`,`${X}-${he}`,{[`${X}-with-description`]:ir(r),[`${X}-no-icon`]:!fe,[`${X}-banner`]:!!l,[`${X}-rtl`]:U==="rtl"},O,c,d,De.root,re,Q),Ae=no(I,{aria:!0,data:!0}),Be=hn.useMemo(()=>kt(x)&&x.closeIcon?x.closeIcon:k||(F!==void 0?F:kt(q)&&q.closeIcon?q.closeIcon:L),[F,x,q,k,L]),Me=hn.useMemo(()=>{let Ue=x??q;return kt(Ue)?no(Ue,{data:!0,aria:!0}):{}},[x,q]);return hn.createElement(Yn,{visible:!$,motionName:`${X}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:Ue=>({maxHeight:Ue.offsetHeight}),onLeaveEnd:se??y},({className:Ue,style:He},Ie)=>hn.createElement("div",{id:D,ref:ln(N,Ie),"data-show":!$,className:te(qe,Ue),style:{...Ce.root,...He},onMouseEnter:h,onMouseLeave:g,onClick:v,role:"alert",...Ae},fe?hn.createElement(tfe,{className:te(`${X}-icon`,De.icon),style:Ce.icon,description:r,icon:e.icon,prefixCls:X,type:ae,successIcon:G,infoIcon:Z,warningIcon:T,errorIcon:V}):null,hn.createElement("div",{className:te(`${X}-section`,De.section),style:Ce.section},ir(j)?hn.createElement("div",{className:te(`${X}-title`,De.title),style:Ce.title},j):null,ir(r)?hn.createElement("div",{className:te(`${X}-description`,De.description),style:Ce.description},r):null),ir(C)?hn.createElement("div",{className:te(`${X}-actions`,De.actions),style:Ce.actions},C):null,hn.createElement(rfe,{className:De.close,style:Ce.close,isClosable:le,prefixCls:X,closeIcon:Be,handleClose:ue,ariaProps:Me})))}),cH=nfe;function afe(e,t,r){return t=bc(t),O5(e,vv()?Reflect.construct(t,r||[],bc(e).constructor):t.apply(e,r))}var C3=B(_()),ife=(function(e){function t(){var r;return nu(this,t),r=afe(this,t,arguments),r.state={error:void 0,info:{}},r}return gv(t,e),au(t,[{key:"componentDidCatch",value:function(r,n){this.setState({error:r,info:n})}},{key:"render",value:function(){let{message:r,title:n,description:a,id:o,children:l}=this.props,{error:c,info:d}=this.state,p=n??r,h=d?.componentStack||null,g=Yr(p)?p:c?.toString(),v=Yr(a)?a:h;return c?C3.createElement(cH,{id:o,type:"error",title:g,description:C3.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},v)}):l}}])})(C3.PureComponent),ofe=ife,dH=cH;dH.ErrorBoundary=ofe;var za=dH;var S3=B(_()),pH=["wrap","nowrap","wrap-reverse"],fH=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],mH=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],sfe=(e,t)=>{let r=t.wrap===!0?"wrap":t.wrap;return{[`${e}-wrap-${r}`]:r&&pH.includes(r)}},lfe=(e,t)=>{let r={};return mH.forEach(n=>{r[`${e}-align-${n}`]=t.align===n}),r[`${e}-align-stretch`]=!t.align&&!!t.vertical,r},ufe=(e,t)=>{let r={};return fH.forEach(n=>{r[`${e}-justify-${n}`]=t.justify===n}),r},cfe=(e,t)=>te({...sfe(e,t),...lfe(e,t),...ufe(e,t)}),dfe=cfe,pfe=e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},ffe=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-medium, &-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},mfe=e=>{let{componentCls:t}=e,r={};return pH.forEach(n=>{r[`${t}-wrap-${n}`]={flexWrap:n}}),r},hfe=e=>{let{componentCls:t}=e,r={};return mH.forEach(n=>{r[`${t}-align-${n}`]={alignItems:n}}),r},gfe=e=>{let{componentCls:t}=e,r={};return fH.forEach(n=>{r[`${t}-justify-${n}`]={justifyContent:n}}),r},vfe=()=>({}),bfe=Et("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:n}=e,a=_t(e,{flexGapSM:t,flexGap:r,flexGapLG:n});return[pfe(a),ffe(a),mfe(a),hfe(a),gfe(a)]},vfe,{resetStyle:!1}),yfe=S3.default.forwardRef((e,t)=>{let{prefixCls:r,rootClassName:n,className:a,style:o,flex:l,gap:c,vertical:d,orientation:p,component:h="div",children:g,...v}=e,{flex:y,direction:w,getPrefixCls:x}=S3.default.useContext(wt),k=x("flex",r),[F,C]=bfe(k),[,D]=el(p,d??y?.vertical),S=te(a,n,y?.className,k,F,C,dfe(k,{...e,vertical:D}),{[`${k}-rtl`]:w==="rtl",[`${k}-gap-${c}`]:lp(c),[`${k}-vertical`]:D}),A={...y?.style,...o};return Yr(l)&&(A.flex=l),Yr(c)&&!lp(c)&&(A.gap=c),S3.default.createElement(h,{ref:t,className:S,style:A,...wr(v,["justify","wrap","align"])},g)}),Xe=yfe,hH=B(_()),wfe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},xfe=wfe;function F3(){return F3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},F3.apply(this,arguments)}var Efe=(e,t)=>hH.createElement(Ut,F3({},e,{ref:t,icon:xfe})),kfe=hH.forwardRef(Efe),$3=kfe,gH=B(_()),Cfe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},Sfe=Cfe;function D3(){return D3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},D3.apply(this,arguments)}var Ffe=(e,t)=>gH.createElement(Ut,D3({},e,{ref:t,icon:Sfe})),Dfe=gH.forwardRef(Ffe),B3=Dfe,vH=B(_()),Afe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},$fe=Afe;function A3(){return A3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},A3.apply(this,arguments)}var Bfe=(e,t)=>vH.createElement(Ut,A3({},e,{ref:t,icon:$fe})),Ife=vH.forwardRef(Bfe),I3=Ife;var bH=B(_()),Mfe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},Tfe=Mfe;function M3(){return M3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},M3.apply(this,arguments)}var jfe=(e,t)=>bH.createElement(Ut,M3({},e,{ref:t,icon:Tfe})),_fe=bH.forwardRef(jfe),T3=_fe;var yH=B(_()),mr=B(_()),hu=B(_()),Pfe=(e,t,r,n)=>{let{titleMarginBottom:a,fontWeightStrong:o}=n;return{marginBottom:a,color:r,fontWeight:o,fontSize:e,lineHeight:t}},Nfe=e=>{let t=[1,2,3,4,5],r={};return t.forEach(n=>{r[`
|
|
195
|
-
h${n}&,
|
|
196
|
-
div&-h${n},
|
|
197
|
-
div&-h${n} > textarea,
|
|
198
|
-
h${n}
|
|
199
|
-
`]=Pfe(e[`fontSizeHeading${n}`],e[`lineHeightHeading${n}`],e.colorTextHeading,e)}),r},Ofe=e=>{let{componentCls:t}=e;return{[`&${`${t}-link`}`]:{...R5(e),userSelect:"text",[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none",[`${t}-actions`]:{pointerEvents:"auto"}}}}}},Rfe=e=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:`${ve(e.lineWidth)} ${e.lineType} rgba(100, 100, 100, 0.2)`,borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:`${ve(e.lineWidth)} ${e.lineType} rgba(100, 100, 100, 0.2)`,borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:Pm[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:`${ve(e.lineWidth)} ${e.lineType} rgba(100, 100, 100, 0.2)`,borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85},table:{width:"100%",textAlign:"start",borderCollapse:"separate",borderSpacing:0,marginBlock:"1em","th, td":{padding:ve(e.padding),overflowWrap:"break-word",borderBottom:`${ve(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},"thead > tr:first-child > th:first-child":{borderStartStartRadius:e.borderRadiusLG},"thead > tr:first-child > th:last-child":{borderStartEndRadius:e.borderRadiusLG},"thead > tr > th":{textAlign:"start",position:"relative",color:e.colorTextHeading,fontWeight:e.fontWeightStrong,backgroundColor:e.colorFillAlter,transition:`background-color ${e.motionDurationMid} ease`,"&:not(:last-child)::before":{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:e.colorSplit,transform:"translateY(-50%)",content:'""'}},"tbody > tr":{"> th, > td":{transition:`background-color ${e.motionDurationMid} ease`},"&:hover > th, &:hover > td":{backgroundColor:e.colorFillAlter}}}}),Lfe=e=>{let{componentCls:t,paddingSM:r}=e,n=r;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(n).div(-2).add(1).equal(),marginBottom:e.calc(n).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:"normal",fontSize:e.fontSize,fontStyle:"normal",pointerEvents:"none"},[`&${t}-edit-content textarea`]:{margin:"0!important",fontSize:"inherit",lineHeight:"inherit",fontFamily:"inherit",fontWeight:"inherit",MozTransition:"none",height:"1em"}}}},zfe=e=>({[`${e.componentCls}-copy-success`]:{"&, &:hover, &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),Hfe=()=>({"a&-ellipsis, span&-ellipsis":{display:"inline-block",maxWidth:"100%"},"&-ellipsis-single-line":{...Zd,"a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),qfe=e=>{let{componentCls:t,titleMarginTop:r}=e;return{[t]:{color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${t}-secondary, &${t}-link${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success, &${t}-link${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning, &${t}-link${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger, &${t}-link${t}-danger`]:{color:e.colorErrorText,[`&${t}-link:active, &${t}-link:focus`]:{color:e.colorErrorTextActive},[`&${t}-link:hover`]:{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"div&, p":{marginBottom:"1em"},...Nfe(e),[`& + h1${t}, & + h2${t}, & + h3${t}, & + h4${t}, & + h5${t}`]:{marginTop:r},"div, ul, li, p, h1, h2, h3, h4, h5":{"+ h1, + h2, + h3, + h4, + h5":{marginTop:r}},...Rfe(e),...Ofe(e),[`${t}-actions`]:{display:"inline"},[`
|
|
200
|
-
${t}-expand,
|
|
201
|
-
${t}-collapse,
|
|
202
|
-
${t}-edit,
|
|
203
|
-
${t}-copy
|
|
204
|
-
`]:{...R5(e),marginInlineStart:e.marginXXS},[`${t}-actions-start`]:{[`
|
|
205
|
-
${t}-expand,
|
|
206
|
-
${t}-collapse,
|
|
207
|
-
${t}-edit,
|
|
208
|
-
${t}-copy:not(${t}-copy-icon-only)
|
|
209
|
-
`]:{marginInlineStart:0,marginInlineEnd:e.marginXXS}},...Lfe(e),...zfe(e),...Hfe(),"&-rtl":{direction:"rtl"}}}},Wfe=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),AH=Et("Typography",qfe,Wfe),Vfe=e=>{let{prefixCls:t,"aria-label":r,className:n,style:a,classNames:o,styles:l,direction:c,maxLength:d,autoSize:p=!0,value:h,onSave:g,onCancel:v,onEnd:y,component:w,enterIcon:x=hu.createElement(B3,null)}=e,k=hu.useRef(null),F=hu.useRef(!1),C=hu.useRef(null),[D,S]=hu.useState(h);hu.useEffect(()=>{S(h)},[h]),hu.useEffect(()=>{if(k.current?.resizableTextArea){let{textArea:L}=k.current.resizableTextArea;L.focus();let{length:O}=L.value;L.setSelectionRange(O,O)}},[]);let A=({target:L})=>{S(L.value.replace(/[\n\r]/g,""))},I=()=>{F.current=!0},j=()=>{F.current=!1},$=({keyCode:L})=>{F.current||(C.current=L)},P=()=>{g(D.trim())},N=({keyCode:L,ctrlKey:O,altKey:W,metaKey:z,shiftKey:Y})=>{C.current!==L||F.current||O||W||z||Y||(L===On.ENTER?(P(),y?.()):L===On.ESC&&v())},R=()=>{P()},[U,H]=AH(t),q=te(t,`${t}-edit-content`,{[`${t}-rtl`]:c==="rtl",[`${t}-${w}`]:!!w},n,o.root,U,H);return hu.createElement("div",{className:q,style:{...l.root,...a}},hu.createElement(Hv,{ref:k,maxLength:d,value:D,onChange:A,onKeyDown:$,onKeyUp:N,onCompositionStart:I,onCompositionEnd:j,onBlur:R,"aria-label":r,rows:1,autoSize:p,className:o.textarea,style:l.textarea}),x!==null?fn(x,{className:`${t}-edit-content-confirm`}):null)},Ufe=Vfe,Kfe=B(_()),Gfe=(e,t)=>{let r=!1,n=a=>{a.stopPropagation(),a.preventDefault(),a.clipboardData?.clearData(),a.clipboardData?.setData("text/plain",e),t&&a.clipboardData?.setData("text/html",e),r=!0};try{return document.addEventListener("copy",n,{capture:!0}),document.execCommand("copy"),r}catch{return!1}finally{document.removeEventListener("copy",n,{capture:!0})}},Xfe=async(e,t)=>{try{return t?await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:"text/html"}),"text/plain":new Blob([e],{type:"text/plain"})})]):await navigator.clipboard.writeText(e),!0}catch{return!1}};async function Yfe(e,t){if(typeof e!="string")return!1;let r=t?.format==="text/html";return!!(await Xfe(e,r)||Gfe(e,r))}var Qfe=Yfe,Zfe=(e,t={})=>!Yr(e)&&t?.skipEmpty?[]:Array.isArray(e)?e:[e],$H=Zfe,Jfe=({copyConfig:e,children:t})=>{let[r,n]=Nm(!1),[a,o]=Kfe.useState(!1),l={};e.format&&(l.format=e.format);let c=xt(async d=>{d?.preventDefault(),d?.stopPropagation(),o(!0);try{let p=xr(e.text)?await e.text():e.text;await Qfe(p||$H(t,{skipEmpty:!0}).join("")||"",l),o(!1),n(!0,!0),n(!1,{ms:3e3}),e.onCopy?.(d)}catch(p){throw o(!1),p}});return{copied:r,copyLoading:a,onClick:c}},eme=Jfe,tme=B(_()),rme=(e,t)=>{let r=!!e;return tme.useMemo(()=>{let n={...t,...r&&kt(e)?e:null};return[r,n]},[r,e,t])},j3=rme,wH=B(_()),nme=e=>{let t=(0,wH.useRef)(void 0);return(0,wH.useEffect)(()=>{t.current=e}),t.current},ame=nme,xH=B(_()),ime=(e,t,r)=>(0,xH.useMemo)(()=>e===!0?{title:t??r}:(0,xH.isValidElement)(e)?{title:e}:kt(e)?{title:t??r,...e}:{title:e},[e,t,r]),ome=ime,sme=B(_()),BH=(e,t,r,n,a)=>{let{getPrefixCls:o,direction:l,className:c,style:d,classNames:p,styles:h}=jt("typography"),g=n??l,v=o("typography",e),y={...a,prefixCls:v,direction:g},w=(0,sme.useMemo)(()=>({root:c}),[c]),x=lt(d),[k,F]=Tt([w,p,t],[h,x,r],{props:y});return[k,F,v,g]},Gx=B(_()),IH=Gx.forwardRef((e,t)=>{let{component:r="article",className:n,rootClassName:a,children:o,direction:l,style:c,classNames:d,styles:p,prefixCls:h,...g}=e,[v,y]=AH(h),w=te(h,{[`${h}-rtl`]:l==="rtl"},n,a,v,y,d?.root),x={...p?.root,...c};return Gx.createElement(r,{...g,className:w,style:x,ref:t},o)}),lme=Gx.forwardRef((e,t)=>{let{prefixCls:r,className:n,rootClassName:a,direction:o,classNames:l,styles:c,...d}=e,[p,h,g,v]=BH(r,l,c,o,e);return Gx.createElement(IH,{ref:t,className:te(n,a),direction:v,classNames:p,styles:h,prefixCls:g,...d})}),ume=lme,fb=B(_()),EH=e=>e===!1?[!1,!1]:$H(e);function _3(e,t,r){return e===!0||e===void 0?t:e||r&&t}function cme(e){let t=document.createElement("em");e.appendChild(t);let r=e.getBoundingClientRect(),n=t.getBoundingClientRect();return e.removeChild(t),r.left>n.left||n.right>r.right||r.top>n.top||n.bottom>r.bottom}var z3=e=>["string","number"].includes(typeof e),dme=e=>{let{prefixCls:t,copied:r,locale:n,iconOnly:a,tooltips:o,icon:l,tabIndex:c,onCopy:d,loading:p,className:h,style:g}=e,v=EH(o),y=EH(l),{copied:w,copy:x}=n??{},k=r?w:x,F=_3(v[r?1:0],k),C=typeof F=="string"?F:k;return fb.createElement(Lo,{title:F},fb.createElement("button",{type:"button",className:te(`${t}-copy`,h,{[`${t}-copy-success`]:r,[`${t}-copy-icon-only`]:a}),style:g,onClick:d,"aria-label":C,tabIndex:c},r?_3(y[1],fb.createElement(T3,null),!0):_3(y[0],p?fb.createElement(Dv,null):fb.createElement(I3,null),!0)))},pme=dme,Or=B(_()),Ux=Or.forwardRef(({style:e,children:t},r)=>{let n=Or.useRef(null);return Or.useImperativeHandle(r,()=>({isExceed:()=>{let a=n.current;return a.scrollHeight>a.clientHeight},getHeight:()=>n.current.clientHeight})),Or.createElement("span",{"aria-hidden":!0,ref:n,style:{position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)",...e}},t)}),fme=e=>e.reduce((t,r)=>t+(z3(r)?String(r).length:1),0);function kH(e,t){let r=0,n=[];for(let a=0;a<e.length;a+=1){if(r===t)return n;let o=e[a],l=z3(o)?String(o).length:1,c=r+l;if(c>t){let d=t-r;return n.push(String(o).slice(0,d)),n}n.push(o),r=c}return e}var P3=0,N3=1,O3=2,R3=3,CH=4,Kx={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function mme(e){let{enableMeasure:t,width:r,text:n,children:a,rows:o,expanded:l,measureDeps:c,miscDeps:d,onEllipsis:p}=e,h=Or.useMemo(()=>Hr(n),[n]),g=Or.useMemo(()=>fme(h),[n]),v=Or.useMemo(()=>a(h,!1),[n].concat(Xr(c))),[y,w]=Or.useState(null),x=Or.useRef(null),k=Or.useRef(null),F=Or.useRef(null),C=Or.useRef(null),D=Or.useRef(null),[S,A]=Or.useState(!1),[I,j]=Or.useState(P3),[$,P]=Or.useState(0),[N,R]=Or.useState(null);Jt(()=>{j(t&&r&&g?N3:P3)},[r,n,o,t,h].concat(Xr(c))),Jt(()=>{if(I===N3){j(O3);let L=k.current&&getComputedStyle(k.current).whiteSpace;R(L)}else if(I===O3){let L=!!F.current?.isExceed();j(L?R3:CH),w(L?[0,g]:null),A(L);let O=F.current?.getHeight()||0,W=o===1?0:C.current?.getHeight()||0,z=D.current?.getHeight()||0,Y=Math.max(O,W+z);P(Y+1),p(L)}},[I]);let U=y?Math.ceil((y[0]+y[1])/2):0;Jt(()=>{let[L,O]=y||[0,0];if(L!==O){let W=(x.current?.getHeight()||0)>$,z=U;O-L===1&&(z=W?L:O),w(W?[L,z]:[z,O])}},[y,U]);let H=Or.useMemo(()=>{if(!t)return a(h,!1);if(I!==R3||!y||y[0]!==y[1]){let L=a(h,!1);return[CH,P3].includes(I)?L:Or.createElement("span",{style:{...Kx,WebkitLineClamp:o}},L)}return a(l?h:kH(h,y[0]),S)},[l,I,y,h].concat(Xr(d))),q={width:r,margin:0,padding:0,whiteSpace:N==="nowrap"?"normal":"inherit"};return Or.createElement(Or.Fragment,null,H,I===O3&&Or.createElement(Or.Fragment,null,Or.createElement(Ux,{style:{...q,...Kx,WebkitLineClamp:o},ref:F},v),Or.createElement(Ux,{style:{...q,...Kx,WebkitLineClamp:o-1},ref:C},v),Or.createElement(Ux,{style:{...q,...Kx,WebkitLineClamp:1},ref:D},a([],!0))),I===R3&&y&&y[0]!==y[1]&&Or.createElement(Ux,{style:{...q,top:400},ref:x},a(kH(h,U),!0)),I===N3&&Or.createElement("span",{style:{whiteSpace:"inherit"},ref:k}))}var hme=B(_()),gme=({enableEllipsis:e,isEllipsis:t,disabled:r,children:n,tooltipProps:a})=>!a?.title||!e?n:hme.createElement(Lo,{...a,disabled:!t||r},n),vme=gme;function bme({mark:e,code:t,underline:r,delete:n,strong:a,keyboard:o,italic:l},c){let d=c;function p(h,g){g&&(d=mr.createElement(h,{},d))}return p("strong",a),p("u",r),p("del",n),p("code",t),p("mark",e),p("kbd",o),p("i",l),d}var yme="...",SH=["delete","mark","code","underline","strong","keyboard","italic"],wme=mr.forwardRef((e,t)=>{let{prefixCls:r,className:n,style:a,classNames:o,styles:l,direction:c,type:d,disabled:p,children:h,ellipsis:g,editable:v,copyable:y,actions:w,component:x,title:k,onMouseEnter:F,onMouseLeave:C,...D}=e,[S]=Jd("Text"),A=mr.useRef(null),I=mr.useRef(null),[j,$,P,N]=BH(r,o,l,c,e),R=wr(D,SH),[U,H]=j3(v),[q,L]=yr(!1,H.editing),{triggerType:O=["icon"]}=H,W=ot=>{ot&&H.onStart?.(),L(ot)},z=ame(q);Jt(()=>{!q&&z&&I.current?.focus()},[q]);let Y=ot=>{ot?.preventDefault(),W(!0)},G=ot=>{H.onChange?.(ot),W(!1)},Z=()=>{H.onCancel?.(),W(!1)},[T,V]=j3(y),{placement:X="end"}=w??{},{copied:Q,copyLoading:re,onClick:J}=eme({copyConfig:V,children:h}),[se,ue]=mr.useState(!1),[ae,he]=mr.useState(!1),[le,fe]=mr.useState(!1),[we,_e]=mr.useState(!1),[$e,De]=mr.useState(!0),[Ce,qe]=j3(g,{expandable:!1,symbol:ot=>ot?S?.collapse:S?.expand}),[Ae,Be]=yr(qe.defaultExpanded||!1,qe.expanded),Me=Ce&&(!Ae||qe.expandable==="collapsible"),{rows:Ue=1}=qe,He=mr.useMemo(()=>Me&&(qe.suffix!==void 0||qe.onEllipsis||qe.expandable||U||T),[Me,qe,U,T]);Jt(()=>{Ce&&!He&&(ue(C5("webkitLineClamp")),he(C5("textOverflow")))},[He,Ce]);let[Ie,Ne]=mr.useState(Me),Je=mr.useMemo(()=>He?!1:Ue===1?ae:se,[He,Ue,se,ae]);Jt(()=>{Ne(Je&&Me)},[Je,Me]);let gt=ome(qe.tooltip,H.text,h),et=Ie&&!!gt.title,Ve=Me&&(Ie?et&&we:le),Se=Me&&Ue===1&&Ie,Pe=Me&&Ue>1&&Ie,dt=(ot,vt)=>{Be(vt.expanded),qe.onExpand?.(ot,vt)},[at,Ke]=mr.useState(0),[je,rt]=Nm(!1),$t=mr.useRef(!1),Bt=({offsetWidth:ot})=>{Ke(ot)},Kr=ot=>{fe(ot),le!==ot&&qe.onEllipsis?.(ot)},zt=mr.useCallback(()=>{let ot=A.current;if(Ce&&et&&ot){let vt=cme(ot);_e(Oe=>Oe===vt?Oe:vt)}},[Ce,et]);mr.useEffect(()=>{$t.current&&zt()},[zt,h,Pe,$e,at]),mr.useEffect(()=>{let ot=A.current;if(typeof IntersectionObserver>"u"||!ot||!et||!Me)return;let vt=new IntersectionObserver(()=>{De(!!ot.offsetParent)});return vt.observe(ot),()=>{vt.disconnect()}},[et,Me]);let $r=mr.useMemo(()=>{if(!(!Ce||Ie))return[H.text,h,k,gt.title].find(z3)},[Ce,Ie,k,gt.title,Ve,H.text]);if(q)return mr.createElement(Ufe,{value:H.text??(typeof h=="string"?h:""),onSave:G,onCancel:Z,onEnd:H.onEnd,prefixCls:P,className:n,style:a,direction:N,component:x,maxLength:H.maxLength,autoSize:H.autoSize,enterIcon:H.enterIcon,classNames:j,styles:$});let Kt=()=>{let{expandable:ot,symbol:vt}=qe;return ot?mr.createElement("button",{type:"button",key:"expand",className:te(`${P}-${Ae?"collapse":"expand"}`,j.action),style:$.action,onClick:Oe=>dt(Oe,{expanded:!Ae}),"aria-label":Ae?S.collapse:S?.expand},xr(vt)?vt(Ae):vt):null},St=()=>{if(!U)return;let{icon:ot,tooltip:vt,tabIndex:Oe}=H,Qe=Hr(vt)[0]||S?.edit,it=typeof Qe=="string"?Qe:"";return O.includes("icon")?mr.createElement(Lo,{key:"edit",title:vt===!1?"":Qe},mr.createElement("button",{type:"button",ref:I,className:te(`${P}-edit`,j.action),style:$.action,onClick:Y,"aria-label":it,tabIndex:Oe},ot||mr.createElement($3,{role:"button"}))):null},nr=()=>T?mr.createElement(pme,{key:"copy",...V,prefixCls:P,copied:Q,locale:S,onCopy:J,loading:re,iconOnly:!ir(h),className:j.action,style:$.action}):null,Sr=ot=>{let vt=ot&&Kt(),Oe=St(),Qe=nr();return!vt&&!Oe&&!Qe?null:mr.createElement("span",{key:"operations",className:te(`${P}-actions`,j.actions,{[`${P}-actions-start`]:X==="start"}),style:$.actions,onMouseEnter:()=>rt(!0,!0),onMouseLeave:()=>rt(!1,{ms:500})},vt,Oe,Qe)},Rt=ot=>[ot&&!Ae&&mr.createElement("span",{"aria-hidden":!0,key:"ellipsis"},yme),qe.suffix];return mr.createElement(Ea,{onResize:Bt,disabled:!Me},ot=>mr.createElement(vme,{tooltipProps:gt,enableEllipsis:Me,isEllipsis:Ve,disabled:je},mr.createElement(IH,{onMouseEnter:vt=>{$t.current=!0,zt(),F?.(vt)},onMouseLeave:vt=>{$t.current=!1,C?.(vt)},className:te({[`${P}-${d}`]:d,[`${P}-disabled`]:p,[`${P}-ellipsis`]:Ce,[`${P}-ellipsis-single-line`]:Se,[`${P}-ellipsis-multiple-line`]:Pe,[`${P}-link`]:x==="a"},n),classNames:j,styles:$,prefixCls:P,style:{...a,WebkitLineClamp:Pe?Ue:void 0},component:x,ref:ln(ot,A,t),direction:N,onClick:O.includes("text")?Y:void 0,"aria-label":$r?.toString(),title:k,...R},mr.createElement(mme,{enableMeasure:Me&&!Ie,text:h,rows:Ue,width:at,onEllipsis:Kr,expanded:Ae,measureDeps:[X],miscDeps:[Q,Ae,re,U,T,X,S].concat(Xr(SH.map(vt=>e[vt])))},(vt,Oe)=>bme(e,mr.createElement(mr.Fragment,null,X==="start"?Sr(Oe):null,vt.length>0&&Oe&&!Ae&&$r?mr.createElement("span",{key:"show-content","aria-hidden":!0},vt):vt,Rt(Oe),X==="start"?null:Sr(Oe)))))))}),Xx=wme,xme=yH.forwardRef((e,t)=>{let{ellipsis:r,rel:n,children:a,navigate:o,...l}=e,c={...l,rel:n===void 0&&l.target==="_blank"?"noopener noreferrer":n};return yH.createElement(Xx,{...c,ref:t,ellipsis:!!r,component:"a"},a)}),Eme=xme,FH=B(_()),kme=FH.forwardRef((e,t)=>{let{children:r,...n}=e;return FH.createElement(Xx,{ref:t,...n,component:"div"},r)}),Cme=kme,L3=B(_()),Sme=L3.forwardRef((e,t)=>{let{ellipsis:r,children:n,...a}=e,o=L3.useMemo(()=>kt(r)?wr(r,["expandable","rows"]):r,[r]);return L3.createElement(Xx,{ref:t,...a,ellipsis:o,component:"span"},n)}),Fme=Sme,DH=B(_()),Dme=[1,2,3,4,5],Ame=DH.forwardRef((e,t)=>{let{level:r=1,children:n,...a}=e,o=Dme.includes(r)?`h${r}`:"h1";return DH.createElement(Xx,{ref:t,...a,component:o},n)}),$me=Ame,mb=ume;mb.Text=Fme;mb.Link=Eme;mb.Title=$me;mb.Paragraph=Cme;var Pt=mb;var Bme=2,Ime=8,Mme=4;function Tme(e){let t=e.engine==="sdk"?"|sdk":"";return`${e.provider}|${e.model}|${e.thinkingEffort}|${e.mode}|${e.kind}${t}`}var jH=6e4,jme=["running","awaiting_approval","waiting_user"];function _H(e,t){return _o(t===void 0?e.agents?.[0]?.provider:t)}function PH(e,t){let r=ou(e,t);return e==="pi"&&(t==="sdk"||t==="core")?r:`${r} CLI`}var _me=__wandCssTextPool[10];function NH(){Ca("wand-avatar-editor-styles",_me)}var $a=B(_(),1),ze=B(Ee(),1);function jc({employee:e,provider:t,engine:r,size:n="md",className:a="",renderMode:o="live",speaking:l=!1,thinking:c=!1,loading:d=!1,fileActivity:p="idle"}){let h=_H(e,t),g=t===void 0?e.agents?.[0]?.engine:r,v=h?PH(h,g):"",y={sm:36,md:48,lg:56,xl:88,chat:48,composer:72}[n],w=y<=36?14:y>=56?20:18,x=Lx(e),k=x?null:qx(e,y);return(0,ze.jsx)(or,{children:(0,ze.jsx)(ji,{className:`wand-team-avatar wand-employee-avatar ${a}`.trim(),"data-size":n,title:e.name,offset:[0,y-w/2],count:h?(0,ze.jsx)("span",{role:"img","aria-label":v,title:v,className:"wand-employee-avatar-provider",children:(0,ze.jsx)(Ti,{size:w,shape:"square",icon:h==="pi"&&(g==="sdk"||g==="core")?(0,ze.jsx)(Sp,{style:{width:14,height:14}}):(0,ze.jsx)(Js,{provider:h})})}):void 0,children:x?o==="static"?(0,ze.jsx)("span",{style:{position:"relative",display:"inline-flex"},children:(0,ze.jsx)(i3,{config:x,size:y})}):(0,ze.jsx)(Ih,{config:x,size:y,speaking:l,thinking:c,loading:d,fileActivity:p}):(0,ze.jsxs)("span",{style:{position:"relative",display:"inline-flex"},children:[(0,ze.jsx)(Ti,{shape:"square",size:y,src:k?.src,style:k?.style,icon:k?.icon}),o==="static"?null:d||c?(0,ze.jsx)($h,{}):null]})})})}var Pme={heart:"M12 20C10 18 3 13 3 8.5C3 3 10 2 12 7C14 2 21 3 21 8.5C21 13 14 18 12 20Z",triangle:"M9 5Q12 1 15 5L21 16Q23 20 18 20H6Q1 20 3 16Z",diamond:"M10 3Q12 1 14 3L21 10Q23 12 21 14L14 21Q12 23 10 21L3 14Q1 12 3 10Z",round:"M12 3a9 9 0 1 1 0 18a9 9 0 1 1 0-18Z",square:"M7 3H17Q21 3 21 7V17Q21 21 17 21H7Q3 21 3 17V7Q3 3 7 3Z",capsule:"M12 2Q19 2 19 9V15Q19 22 12 22Q5 22 5 15V9Q5 2 12 2Z"};function Nme({field:e,id:t}){return e==="color"?(0,ze.jsx)("span",{className:"wand-avatar-color",style:{background:Ic.find(r=>r.id===t)?.color}}):e==="shape"?(0,ze.jsx)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:(0,ze.jsx)("path",{d:Pme[t]})}):t==="none"?(0,ze.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,ze.jsx)("circle",{cx:"12",cy:"12",r:"8",fill:"none"}),(0,ze.jsx)("path",{d:"M6 18L18 6",fill:"none"})]}):e==="glasses"?(0,ze.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",style:{color:t==="gold"?"#9b7135":"currentColor"},children:[(0,ze.jsx)("circle",{cx:"6.5",cy:"12",r:"4.5",fill:"none"}),(0,ze.jsx)("circle",{cx:"17.5",cy:"12",r:"4.5",fill:"none"}),(0,ze.jsx)("path",{d:"M11 12h2M2 10H0M22 10h2",fill:"none"})]}):(0,ze.jsx)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:t==="beanie"?(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)("path",{d:"M5 15C5 3 19 3 19 15Z"}),(0,ze.jsx)("rect",{x:"4",y:"15",width:"16",height:"4",rx:"1"}),(0,ze.jsx)("circle",{cx:"12",cy:"3",r:"2"})]}):(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)("path",{d:"M3 13C0 4 21 3 22 11C22 16 6 18 3 13Z"}),(0,ze.jsx)("path",{d:"M7 17h11M14 5l1-3",fill:"none"})]})})}function Yx({field:e,label:t,options:r,config:n,onChange:a,disabled:o}){let l=$a.useId();return(0,ze.jsxs)("fieldset",{className:"wand-avatar-options",disabled:o,children:[(0,ze.jsxs)("legend",{children:[t,(0,ze.jsx)("span",{children:r.find(c=>c.id===n[e])?.label})]}),(0,ze.jsx)("div",{className:"wand-avatar-option-row",children:r.map(c=>(0,ze.jsxs)("label",{className:"wand-avatar-option","data-selected":n[e]===c.id,children:[(0,ze.jsx)("input",{type:"radio",name:l,value:c.id,checked:n[e]===c.id,"aria-label":c.label,onChange:()=>a({...n,[e]:c.id})}),(0,ze.jsx)("span",{className:"wand-avatar-option-mark",children:(0,ze.jsx)(Nme,{field:e,id:c.id})}),(0,ze.jsx)("span",{className:"wand-avatar-option-name",children:c.label})]},c.id))})]})}function Ome({avatar:e,name:t,employeeId:r="",disabled:n,onChange:a,onBusyChange:o}){let l={id:r||"employee-draft",name:t,avatar:e},c=$a.useRef(null),d=$a.useRef(null),p=$a.useRef(null),[h,g]=$a.useState(!1),[v,y]=$a.useState(!1),[w,x]=$a.useState(()=>cb(l)??ub(l)),[k,F]=$a.useState(""),[C,D]=$a.useState(!1),[S,A]=$a.useState(!1),I=$a.useRef(0),j=$a.useRef(e),$=n||C;$a.useEffect(()=>{NH()},[]),$a.useEffect(()=>()=>{++I.current},[]),$a.useEffect(()=>{o?.(C)},[C,o]),$a.useEffect(()=>{++I.current,D(!1),v&&j.current!==e&&(y(!1),A(!1),F("\u5934\u50CF\u5DF2\u66F4\u65B0\uFF0C\u8BF7\u91CD\u65B0\u6253\u5F00\u634F\u8138\u3002"))},[e]),$a.useEffect(()=>{if(v){let q=requestAnimationFrame(()=>p.current?.querySelector("input:checked")?.focus());return()=>cancelAnimationFrame(q)}},[v]);let P=()=>{y(!1),A(!1),c.current?.focus({preventScroll:!0})};Ln(v,P);let N=()=>{g(!1),F(""),j.current=e,x(cb(l)??ub(l)),y(!0)},R=()=>{g(!1),F(""),d.current?.click()},U=q=>{let L=q.target.files?.[0];if(q.target.value="",!L)return;if(!/^image\/(png|jpeg|webp)$/.test(L.type)||L.size>10*1024*1024){F("\u8BF7\u9009\u62E9 10 MB \u4EE5\u5185\u7684 PNG\u3001JPEG \u6216 WebP \u56FE\u7247\u3002");return}D(!0),F("");let O=++I.current;o3(L,jH).then(W=>{O===I.current&&(y(!1),A(!1),a(W))}).catch(W=>{O===I.current&&F(W instanceof Error?W.message:"\u56FE\u7247\u5904\u7406\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002")}).finally(()=>{O===I.current&&D(!1)})},H=e.startsWith("data:image/")?"\u5DF2\u4E0A\u4F20\u56FE\u7247":e.startsWith("plush:v1:")?"\u81EA\u5B9A\u4E49\u6BDB\u7ED2\u5934\u50CF":/^cat:/.test(e)?"\u50CF\u7D20\u732B\u5934\u50CF":"\u81EA\u52A8\u6BDB\u7ED2\u5934\u50CF";return(0,ze.jsxs)("section",{className:"wand-avatar-editor","aria-label":"\u5458\u5DE5\u5934\u50CF",children:[(0,ze.jsxs)(Xe,{align:"center",gap:10,className:"wand-avatar-editor-summary",children:[(0,ze.jsx)(ol,{open:h&&!$,onOpenChange:g,align:"start",ariaLabel:"\u5934\u50CF\u64CD\u4F5C",trigger:(0,ze.jsxs)(rl,{ref:c,className:"wand-avatar-editor-trigger",type:"text",disabled:$,"aria-label":"\u7F16\u8F91\u5458\u5DE5\u5934\u50CF","aria-haspopup":"true","aria-expanded":h||v,children:[(0,ze.jsx)(jc,{employee:l,provider:"",size:"lg"}),(0,ze.jsx)("span",{className:"wand-avatar-edit-mark",children:(0,ze.jsx)(Fe,{name:"edit",size:10})})]}),children:(0,ze.jsxs)(Xe,{vertical:!0,gap:2,children:[(0,ze.jsxs)(Te,{kind:"ghost",onClick:R,children:[(0,ze.jsx)(Fe,{name:"image",size:14}),"\u4E0A\u4F20\u56FE\u7247"]}),(0,ze.jsx)(Te,{kind:"ghost",onClick:N,children:"\u634F\u8138"})]})}),(0,ze.jsxs)(Xe,{vertical:!0,gap:2,style:{flex:1,minWidth:0},children:[(0,ze.jsx)(Pt.Text,{children:"\u5934\u50CF"}),(0,ze.jsx)(Pt.Text,{type:"secondary",className:"wand-avatar-editor-caption",children:C?"\u6B63\u5728\u5904\u7406\u56FE\u7247\u2026":H})]}),(0,ze.jsx)(Te,{kind:"ghost",size:"small",disabled:$,onClick:N,children:"\u634F\u8138"}),(0,ze.jsx)(Te,{kind:"ghost",size:"small",disabled:$,onClick:R,children:"\u4E0A\u4F20"}),e?(0,ze.jsx)(Te,{kind:"ghost",size:"small",disabled:$,onClick:()=>{P(),F(""),a("")},children:"\u6062\u590D\u9ED8\u8BA4"}):null]}),(0,ze.jsx)(Pt.Text,{type:"secondary",className:"wand-avatar-upload-hint",children:"PNG\u3001JPEG \u6216 WebP \xB7 \u6700\u5927 10 MB"}),(0,ze.jsx)("input",{ref:d,type:"file",accept:"image/png,image/jpeg,image/webp",hidden:!0,tabIndex:-1,"aria-label":"\u4E0A\u4F20\u5934\u50CF\u56FE\u7247",onChange:U}),v?(0,ze.jsxs)("div",{ref:p,className:"wand-avatar-sculpt",role:"region","aria-label":"\u634F\u8138",onKeyDown:q=>{q.key==="Escape"&&(q.preventDefault(),q.stopPropagation(),P())},children:[(0,ze.jsxs)("div",{className:"wand-avatar-sculpt-preview",children:[(0,ze.jsx)(Ih,{config:w,size:156,interactive:!0,speaking:S}),(0,ze.jsx)(Pt.Text,{type:"secondary",children:"\u5B9E\u65F6\u9884\u89C8"}),(0,ze.jsx)(Te,{kind:"ghost",size:"small","aria-pressed":S,disabled:$,onClick:()=>A(q=>!q),children:S?"\u505C\u6B62\u9884\u89C8":"\u9884\u89C8\u8BF4\u8BDD\u52A8\u4F5C"})]}),(0,ze.jsxs)("div",{className:"wand-avatar-sculpt-controls",children:[(0,ze.jsx)(Yx,{field:"shape",label:"\u9020\u578B",options:ab,config:w,disabled:$,onChange:x}),(0,ze.jsx)(Yx,{field:"color",label:"\u989C\u8272",options:Ic,config:w,disabled:$,onChange:x}),(0,ze.jsx)(Yx,{field:"glasses",label:"\u773C\u955C",options:ib,config:w,disabled:$,onChange:x}),(0,ze.jsx)(Yx,{field:"hat",label:"\u5E3D\u5B50",options:ob,config:w,disabled:$,onChange:x})]}),(0,ze.jsxs)(Xe,{className:"wand-avatar-sculpt-footer",align:"center",wrap:!0,gap:8,justify:"space-between",children:[(0,ze.jsx)(Pt.Text,{type:"secondary",children:"\u4FDD\u5B58\u5458\u5DE5\u540E\u751F\u6548"}),(0,ze.jsxs)(Xe,{gap:6,children:[(0,ze.jsx)(Te,{kind:"ghost",disabled:$,onClick:P,children:"\u53D6\u6D88"}),(0,ze.jsx)(Te,{kind:"primary",disabled:$,onClick:()=>{a(n3(w)),P()},children:"\u4F7F\u7528\u8FD9\u4E2A\u5934\u50CF"})]})]})]}):null,k?(0,ze.jsx)(za,{type:"error",showIcon:!0,role:"alert",title:k}):null]})}var Tc=B(_(),1);function jh(e,t={}){let r=null,n=null,a=0,o=0,l=!1,c=new Set,d=()=>{for(let h of[...c])h()},p=h=>{let g=r===null||!t.equals?.(r,h);r=h,g&&d()};return{peek:()=>r,load:h=>{if(!h?.force&&r!==null&&!l){let w=h?.maxAgeMs;if(w===void 0||Date.now()-o<=w)return Promise.resolve(r)}if(n)return n;let g=a,v;try{v=e()}catch(w){v=Promise.reject(w)}let y;return y=v.then(w=>(n===y&&(n=null),g!==a?r??w:(o=Date.now(),l=!1,p(w),w)),w=>{throw n===y&&(n=null),w}),n=y,y},publish(h){a++,n=null,p(h)},invalidate(){a++,n=null,r=null,o=0,l=!1},stale(){l=!0},subscribe(h){return c.add(h),()=>{c.delete(h)}}}}function Rme(e,t){if(r3(e)){let o={};for(let l of["name","duty","prompt","agents","systemSessionLimit","maxConcurrentTasks"])t[l]!==void 0&&Object.assign(o,{[l]:l==="maxConcurrentTasks"?t.maxConcurrentTasks??nb:t[l]});return o}if(e3(e))return{agents:t.agents??e.agents,...t.systemSessionLimit!==void 0?{systemSessionLimit:t.systemSessionLimit}:{},...t.maxConcurrentTasks!==void 0?{maxConcurrentTasks:t.maxConcurrentTasks??nb}:{}};let r={name:t.name??e.name,duty:t.duty??e.duty,prompt:t.prompt??e.prompt,avatar:t.avatar??e.avatar,tags:t.tags??e.tags??[],agents:t.agents??e.agents},n=t.systemSessionLimit!==void 0?t.systemSessionLimit:e.systemSessionLimit;n!==void 0&&(r.systemSessionLimit=n);let a=t.maxConcurrentTasks!==void 0?t.maxConcurrentTasks:e.maxConcurrentTasks;return a!==void 0&&(r.maxConcurrentTasks=a??nb),r}var H3=new Set,Lme=new Set,MH=new Map;function hb(e){let t=MH.get(e);if(!t){let r=e?"?includeArchived=1":"";t=jh(async()=>(await yt(`/api/silicon-employees${r}`,{cache:"no-store"})).employees??[]),MH.set(e,t)}return t}function zme(){hb(!1).invalidate(),hb(!0).invalidate();for(let e of Lme)e()}function TH(e=!1){return hb(e).peek()}function q3(e){return hb(!1).peek()?.find(t=>t.id===e)??null}function gu(e){zme();for(let t of H3)t(e)}function Qx(e){return H3.add(e),()=>{H3.delete(e)}}var OH={list(e){return hb(e?.includeArchived===!0).load()},get(e){return yt(`/api/silicon-employees/${encodeURIComponent(e)}`,{cache:"no-store"})},async draft(e){return(await yt("/api/silicon-employees/draft",mn({expectation:e}))).draft},async create(e){let t=await yt("/api/silicon-employees",mn(e));return gu(t.id),t},async update(e,t){let r=await yt(`/api/silicon-employees/${encodeURIComponent(e)}`,mn(t,"PUT"));return gu(r.id),r},async archive(e){await yt(`/api/silicon-employees/${encodeURIComponent(e)}/archive`,{method:"POST"}),gu(e)},async unarchive(e){await yt(`/api/silicon-employees/${encodeURIComponent(e)}/unarchive`,{method:"POST"}),gu(e)},async remove(e){await yt(`/api/silicon-employees/${encodeURIComponent(e)}`,{method:"DELETE"}),gu(e)}};function W3(e){let t=e?.includeArchived===!0,[r,n]=Tc.useState(()=>TH(t)??[]),a=e?.enabled!==!1,[o,l]=Tc.useState(()=>a&&TH(t)===null),[c,d]=Tc.useState(null),p=Tc.useRef(!1),h=Tc.useRef(a),g=Tc.useRef(0);h.current=a;let v=Tc.useCallback(()=>{if(!p.current||!h.current)return;let y=++g.current,w=()=>p.current&&h.current&&g.current===y;l(!0),OH.list({includeArchived:t}).then(x=>{w()&&(n(x),d(null))}).catch(x=>{w()&&d(x instanceof Error?x.message:String(x))}).finally(()=>{w()&&l(!1)})},[t]);return Tc.useEffect(()=>{if(!a){l(!1);return}p.current=!0,v();let y=Qx(v);return()=>{p.current=!1,g.current++,y()}},[v,a]),{employees:r,loading:o,error:c,reload:v}}var Fp=jh(async()=>yt("/api/config",{credentials:"same-origin"}));function gb(){return Fp.peek()}function vb(){return Fp.load()}function V3(e){return Fp.subscribe(e)}function Hme(e){let t=Fp.peek();if(!t){Fp.invalidate();return}Fp.publish({...t,...e})}function U3(){Fp.invalidate()}typeof window<"u"&&window.addEventListener("wand-settings-config-saved",e=>{let t=e.detail;t&&typeof t=="object"&&Hme(t)});function Y3(e){return`${Math.max(0,Math.ceil(e*2))}px 0px 0px 0px`}var qH=-1;function WH(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function qme(e){let t=e.scrollHeight-(e.scrollTop+e.clientHeight);return t<=24?qH:-(Math.round(t)+2)}function Wme(e,t){let r=WH(e);if(r===void 0||r===qH)return{top:t.scrollHeight,needsEarlier:!1};if(r>=0)return{top:r,needsEarlier:!1};let n=t.scrollHeight-t.clientHeight-(-r-2);return{top:Math.max(0,n),needsEarlier:n<0}}function Vme(e,t){return e.messageId??`${e.requestId??""}:${e.role}:${e.createdAt??""}:${e.author?.id??""}:${t}`}function K3(e){let t=new Date(e??"");return Number.isFinite(t.getTime())?t.toLocaleDateString([],{year:"numeric",month:"long",day:"numeric"}):""}function Ume(e){let t=new Date(e??"");return Number.isFinite(t.getTime())?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1}):""}function Kme(e,t){if(!e||!t||e.notice||t.notice||e.role!==t.role||e.role!=="user"&&(!e.author?.id||e.author.id!==t.author?.id)||e.conversationTarget?.runId!==t.conversationTarget?.runId)return!1;let r=Date.parse(t.createdAt??"")-Date.parse(e.createdAt??"");return r>=0&&r<5*6e4&&K3(e.createdAt)===K3(t.createdAt)}function Gme(e,t){if(!e)return[];if(!e.length)return[...t];let r=t.indexOf(e[e.length-1]);if(r<0)return[];let n=Math.min(r+1,e.length);return e.slice(-n).every((a,o)=>a===t[r+1-n+o])?t.slice(r+1):[]}function Q3(e){if(e.task.status==="archived")return"\u5DF2\u5F52\u6863";let t=e.runs[0];return t?{running:"\u8FDB\u884C\u4E2D",waiting_user:"\u7B49\u4F60\u56DE\u590D",awaiting_approval:"\u7B49\u4F60\u6279\u51C6",done:"\u5B8C\u6210",failed:"\u5931\u8D25",stopped:"\u5DF2\u505C\u6B62"}[t.status]??"":e.startup?.state==="failed"?"\u542F\u52A8\u5931\u8D25":"\u5F85\u5F00\u5DE5"}var G3=new Set;function Z3(e){for(let t of G3)t(e)}function Xme(e){return G3.add(e),()=>{G3.delete(e)}}function Yme(e){let t=/^[\p{L}\p{N}_.:-]{1,64}$/u.test(e.name)?e.name:"\u5DE5\u5177\u8C03\u7528";switch(e.activity?.kind){case"read_file":return`\u8BFB\u53D6\u6587\u4EF6 \xB7 ${t}`;case"edit_file":return`\u4FEE\u6539\u6587\u4EF6 \xB7 ${t}`;case"run_command":return`\u8FD0\u884C\u547D\u4EE4 \xB7 ${t}`;default:return t}}function VH(e){if(e.archived||["failed","stopped","done","exited"].includes(e.status??"")||!(e.structuredState?.inFlight||e.ptyRunning))return null;let t=e.messages??[],r=e.structuredState?.activeRequestId,n=Date.parse(e.structuredState?.turnStartedAt??e.turnStartedAt??""),a=t.length-1;for(;a>=0&&!(t[a].role==="user"&&(t[a].content??[]).some(v=>v.type==="text"&&!v.__subagent&&v.text.trim()));)a--;let o=t[a];if(r&&o?.requestId&&o.requestId!==r)return null;let l=!!(r&&o?.requestId===r),c=v=>{if(v.author?.sessionId&&v.author.sessionId!==e.id)return!1;if(r&&v.requestId)return v.requestId===r;if(l)return!0;let y=Date.parse(v.createdAt??"");return Number.isFinite(n)&&Number.isFinite(y)&&y>=n},d=new Map,p=new Set,h=null;for(let v=a+1;v<t.length;v++){let y=t[v];if(c(y))for(let w of y.content??[])w.__subagent||(w.type==="tool_result"&&(p.add(w.tool_use_id),h=null),y.role==="assistant"&&(w.type==="tool_use"?(d.set(w.id,w),h=null):!y.completedAt&&w.type==="text"&&w.text.trim()?h={kind:"output",label:"\u6B63\u5728\u8F93\u51FA"}:!y.completedAt&&w.type==="thinking"&&(h={kind:"thinking",label:"\u6B63\u5728\u601D\u8003"})))}let g=[...d.values()].reverse().find(v=>!p.has(v.id));return g?.semantic?.kind==="question_request"||g?.name==="AskUserQuestion"?{kind:"waiting",toolId:g.id,label:"\u7B49\u5F85\u4F60\u7684\u8F93\u5165"}:g?{kind:"tool",toolId:g.id,label:Yme(g)}:h}var UH=6e4,J3=new Set(["failed","stopped","exited","done"]),Qme=new Set(["waiting-input","waiting_input","waiting_user","awaiting_approval"]),Zme=new Set(["running","thinking","waiting-input","waiting_input","awaiting_approval","waiting_user"]);function Dp(e){if(!e)return null;let t=new Date(e).getTime();return Number.isFinite(t)?t:null}function Jx(e){return e?Dp(e.structuredState?.turnStartedAt)??Dp(e.turnStartedAt):null}function Jme(e){if(!e)return null;let t=e.structuredState?.lastActivityAt;return Dp(t)??Dp(e.lastActivityAt)??Dp(e.lastActivityAt)}function KH(e){if(!e||e.archived)return!1;let t=e;if(t.archived||J3.has(t.status??""))return!1;if(t.permissionBlocked||t.pendingEscalation||t.structuredState?.inFlight)return!0;let r=e.status;return typeof r=="string"&&Zme.has(r)}function GH(e){return!e||e.archived||J3.has(e.status??"")?!1:!!e.structuredState?.inFlight||e.ptyRunning===!0}function Ap(e,t=!1){return!e||e.archived||J3.has(e.status??"")?"idle":e.permissionBlocked||e.pendingEscalation||Qme.has(e.status??"")?"waiting":(t?KH(e):GH(e))?!t&&VH(e)?.kind==="waiting"?"waiting":"executing":(e.queuedMessages?.length??0)>0||t&&e.status==="starting"?"received":"idle"}function XH(e,t,r=!1){if(!(r?KH(e):GH(e)))return 0;let n=Jme(e);return n===null?0:Math.max(0,t-n)}function yb(e){let t=Math.max(0,Math.floor(e/1e3));if(t<60)return`${t} \u79D2`;let r=Math.floor(t/60);if(r<60)return`${r} \u5206\u949F`;let n=Math.floor(r/60),a=r%60;return a?`${n} \u5C0F\u65F6 ${a} \u5206\u949F`:`${n} \u5C0F\u65F6`}var RH={received:"\u5DF2\u63A5\u6536",executing:"\u6B63\u5728\u6267\u884C",waiting:"\u7B49\u5F85\u4F60\u7684\u8F93\u5165",idle:""};function wb(e,t=!1){let r=Ap(e,t),n={phase:r,stage:r,label:RH[r],action:null,active:r!=="idle"};if(!e||e.archived)return n;if(e.status==="failed"||e.status==="stopped")return{...n,stage:e.status,label:e.status==="failed"?"\u6267\u884C\u5931\u8D25":"\u5DF2\u505C\u6B62",active:!1};if(r==="received")return{...n,label:"\u5DF2\u63A5\u6536 \xB7 \u6392\u961F\u4E2D"};if(r==="waiting")return{...n,label:e.permissionBlocked||e.pendingEscalation||e.status==="awaiting_approval"?"\u7B49\u5F85\u4F60\u786E\u8BA4\u64CD\u4F5C":RH.waiting};if(r!=="executing"||t)return n;if(e.structuredState?.phase==="background")return{...n,stage:"background",label:"\u7B49\u5F85\u540E\u53F0\u4EFB\u52A1"};let a=VH(e);return a?{...n,stage:a.kind,label:a.kind==="tool"?"\u6B63\u5728\u4F7F\u7528\u5DE5\u5177":a.label,action:a.kind==="tool"?a.label:null,toolId:a.toolId}:n}function ehe(e,t,r=!1){let n=wb(e,r);if(!n.label)return"";let a=[n.label];if(n.action&&a.push(n.action),!n.active||n.phase==="received")return a.join(" \xB7 ");let o=r?Dp(e?.turnStartedAt)??Dp(e?.startedAt):Jx(e);o!==null&&a.push(`\u5DF2\u8FD0\u884C ${yb(Math.max(0,t-o))}`);let l=XH(e,t,r);return l>=UH&&a.push(`\u5DF2 ${yb(l)}\u65E0\u65B0\u6D88\u606F`),a.join(" \xB7 ")}var LH=B(_(),1);function the(e){let[t,r]=LH.useState(()=>Date.now());return LH.useEffect(()=>{if(!e)return;r(Date.now());let n=window.setInterval(()=>r(Date.now()),1e3),a=()=>{document.visibilityState==="visible"&&r(Date.now())};return document.addEventListener("visibilitychange",a),()=>{window.clearInterval(n),document.removeEventListener("visibilitychange",a)}},[e]),t}var Zx=B(Ee(),1),rhe={received:"enter",executing:"spark",tool:"wrench",output:"enter",thinking:"spark",background:"history",waiting:"shield",failed:"warning",stopped:"stop",idle:"spark"};function xb(e){let t=e.activity,r=e.runMode===!0,n=wb(t,r),a=the(n.active&&n.phase!=="received"),o=ua(),l=ehe(t,a,r);if(!l)return null;let c=n.phase==="waiting",d=n.active&&n.phase!=="received"&&XH(t,a,r)>=UH;return(0,Zx.jsxs)("div",{className:`chat-running-bar${c?" is-waiting":""}`,"data-phase":n.stage,"data-source-session":r?void 0:t?.id,"data-silent":d?"true":void 0,role:"status","aria-live":"polite",children:[(0,Zx.jsx)("span",{className:`chat-running-pulse${o||!n.active?" is-instant":""}`,"data-phase":n.stage,"aria-hidden":"true",children:(0,Zx.jsx)(Fe,{name:rhe[n.stage],size:13})}),(0,Zx.jsx)("span",{className:"chat-running-text",children:l})]})}var zH=B(_(),1),X3=new Set,sl={name:"",avatar:"",loaded:!1};function YH(e){if(!(e.name===sl.name&&e.avatar===sl.avatar&&e.loaded===sl.loaded)){sl=e;for(let t of X3)t()}}function e7(e){let t=u3(e);return{name:t?.name??"",avatar:t?.avatar??"",loaded:!0}}function QH(){let e=gb();e&&YH(e7(e.userProfile))}var HH=gb();HH&&(sl=e7(HH.userProfile));V3(QH);function nhe(){return vb().then(QH,()=>{})}typeof window<"u"&&window.addEventListener("wand-settings-config-saved",e=>{gb()||YH(e7(e.detail?.userProfile))});var bb={subscribe(e){return X3.add(e),()=>{X3.delete(e)}},getSnapshot(){return sl},refresh(){nhe()}};function _h(){let e=zH.useSyncExternalStore(bb.subscribe,bb.getSnapshot,bb.getSnapshot);return zH.useEffect(()=>{bb.refresh()},[]),e}function ZH(){return{id:"user",name:sl.name||"\u6211",...sl.avatar?{avatar:sl.avatar}:{}}}function ahe(e){let t=ZH();if(e?.role!=="user")return{id:"",name:"",avatar:t.avatar};let r=e.author;return!r||r.id!=="user"?t:{...t,name:sl.loaded?t.name:r.name||t.name}}var $p=B(Ee(),1);function t7({title:e,members:t,size:r=48}){let n=_h(),a=Math.ceil(Math.sqrt(t.length+1)),o=(r-4-(a-1))/a;return(0,$p.jsxs)("span",{className:"conversation-group-avatar conversation-group-mosaic",role:"img","aria-label":`\u7FA4\u804A\uFF1A${e}\uFF1B${n.name||"\u6211"}\u3001${t.map(l=>l.name).join("\u3001")}`,style:{width:r,height:r,gridTemplateColumns:`repeat(${a}, minmax(0, 1fr))`},children:[(0,$p.jsx)("span",{className:"conversation-group-cell","aria-hidden":"true",children:(0,$p.jsx)("span",{style:{width:36,height:36,transform:`scale(${o/36})`},children:(0,$p.jsx)(jc,{employee:{id:"user",name:n.name||"\u6211",avatar:n.avatar},provider:"",size:"sm"})})}),t.map(l=>(0,$p.jsx)("span",{className:"conversation-group-cell","aria-hidden":"true",title:l.name,children:(0,$p.jsx)("span",{style:{width:36,height:36,transform:`scale(${o/36})`},children:(0,$p.jsx)(jc,{employee:{id:l.employeeId||l.id,name:l.name,avatar:l.avatar},provider:"",size:"sm"})})},l.id))]})}function ihe(e){return e>=1e6?`${(e/1e6).toFixed(1).replace(/\.0$/,"")}M`:e>=1e3?`${(e/1e3).toFixed(1).replace(/\.0$/,"")}k`:String(Math.round(e))}function r7(e){let t,r={};for(let n of e)if(n.role==="user"&&(r={}),!(n.role!=="assistant"||!n.usage)){for(let a of["inputTokens","outputTokens","cacheReadInputTokens","cacheCreationInputTokens","reasoningOutputTokens","totalCostUsd"]){let o=n.usage[a];typeof o=="number"&&Number.isFinite(o)&&o>=0&&(r[a]=(r[a]??0)+o)}n.usage.estimated&&(r.estimated=!0),t={...r}}return t}function ohe(e){if(!e)return[];let t=[],r=[["inputTokens","\u8F93\u5165",!1],["cacheReadInputTokens","\u7F13\u5B58\u547D\u4E2D",!1],["cacheCreationInputTokens","\u7F13\u5B58\u5199\u5165",!1],["outputTokens","\u8F93\u51FA",!0],["reasoningOutputTokens","\u63A8\u7406",!0]];for(let[a,o,l]of r){let c=e[a];if(typeof c!="number"||!Number.isFinite(c)||c<=0)continue;let d=e.estimated===!0&&l?"\u2248":"";t.push({key:a,label:o,value:d+ihe(c),title:`${o} ${d}${Math.round(c)} Token${d?"\uFF08\u4F30\u7B97\uFF09":""}`})}let n=e.totalCostUsd;return typeof n=="number"&&Number.isFinite(n)&&n>0&&t.push({key:"totalCostUsd",label:"\u8D39\u7528",value:`$${n.toFixed(4).replace(/0+$/,"").replace(/\.$/,"")}`,title:`\u8D39\u7528 $${n}`}),!t.length&&e.estimated===!0&&t.push({key:"pending",label:"\u7528\u91CF",value:"\u7EDF\u8BA1\u4E2D\u2026",title:"\u6B63\u5728\u7EDF\u8BA1\u7528\u91CF\uFF0C\u5C1A\u65E0\u53EF\u663E\u793A\u7684\u8BA1\u6570"}),t}function she(e){if(e.role!=="assistant"||!e.createdAt||!e.completedAt)return null;let t=Date.parse(e.completedAt)-Date.parse(e.createdAt);return!Number.isFinite(t)||t<=0?null:t<1e3?"\u4E0D\u8DB3 1 \u79D2":yb(t)}var JH=B(_(),1);function lhe(e){return!e.webgl||!e.webglWithoutCaveat||e.maxTextureSize>0&&e.maxTextureSize<2048||e.cores!==void 0&&e.cores<4||e.memoryGb!==void 0&&e.memoryGb<4?"static":"live"}function eq(e,t){let r={alpha:!0,antialias:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:t};return e.getContext("webgl2",r)??e.getContext("webgl",r)}function uhe(){let e=globalThis.navigator,t=e&&Number.isFinite(e.hardwareConcurrency)?e.hardwareConcurrency:void 0,r=e&&Number.isFinite(e.deviceMemory)?e.deviceMemory:void 0;if(typeof document>"u")return{cores:t,memoryGb:r,webgl:!1,webglWithoutCaveat:!1,maxTextureSize:0};let n=document.createElement("canvas");try{let a=eq(n,!0),o=a??eq(n,!1),l=o&&Number(o.getParameter(o.MAX_TEXTURE_SIZE))||0;return o?.getExtension("WEBGL_lose_context")?.loseContext(),{cores:t,memoryGb:r,maxTextureSize:l,webgl:!!o,webglWithoutCaveat:!!a}}catch{return{cores:t,memoryGb:r,webgl:!1,webglWithoutCaveat:!1,maxTextureSize:0}}}var e2=null;function che(){return e2||(e2=lhe(uhe())),e2}function dhe(){return e2}var Ho=B(Ee(),1);function n7({usage:e,activity:t,employeeName:r,legacyStatus:n=!1,showName:a=!0}){let o=ohe(e);return!r&&!o.length&&Ap(t)==="idle"?null:(0,Ho.jsxs)("div",{className:"composer-usage-line",role:"status","aria-label":r?`${r}\uFF0C\u72B6\u6001\u4E0E\u7528\u91CF`:"\u6700\u8FD1\u4E00\u8F6E\u7528\u91CF",tabIndex:0,title:o.map(l=>l.title).join(" \xB7 "),children:[r&&a?(0,Ho.jsxs)("span",{className:"composer-identity-name",title:r,children:[r,"\uFF1A"]}):null,n?(0,Ho.jsx)("span",{"data-composer-running-host":""}):(0,Ho.jsx)(xb,{activity:t}),o.length?(0,Ho.jsx)(ol,{side:"top",ariaLabel:"\u6700\u8FD1\u4E00\u8F6E\u7528\u91CF\u8BE6\u60C5",trigger:(0,Ho.jsx)(Te,{kind:"ghost",size:"small",className:"composer-usage-caption",children:"\u7528\u91CF"}),children:(0,Ho.jsx)("div",{className:"composer-usage-details",children:o.map(l=>(0,Ho.jsxs)("span",{className:"composer-usage-metric",title:l.title,children:[l.label," ",(0,Ho.jsx)("span",{className:"composer-usage-number",children:l.value})]},l.key))})}):null]})}function phe(){let[e,t]=JH.useState(()=>dhe()??"pending");return JH.useEffect(()=>{e==="pending"&&t(che())},[e]),e}function a7({employee:e,thinking:t=!1,fileActivity:r="idle"}){let n=phe(),a=t&&r==="idle",o=n!=="live",l=n==="pending";return(0,Ho.jsxs)("span",{className:"composer-floating-avatar",role:"img","aria-label":`${e.name}${r==="reading"?"\uFF0C\u6B63\u5728\u67E5\u770B\u6587\u4EF6":r==="writing"?"\uFF0C\u6B63\u5728\u7F16\u5199\u6587\u4EF6":""}`,"data-file-activity":r,"data-avatar-choice":n,children:[(0,Ho.jsx)(jc,{employee:e,provider:"",size:"composer",renderMode:o?"static":"live",loading:l,thinking:a,fileActivity:r}),o&&(l||a)?(0,Ho.jsx)($h,{}):null]})}var vu=B(_(),1),fhe=B(er(),1),mhe=B(Ee(),1);function i7({owner:e,input:t,surface:r,phase:n,pending:a,locked:o,forceExpanded:l,onDismiss:c,popupOwners:d=[]}){let[p,h]=vu.useState(!1),[g,v]=vu.useState(!1),y=vu.useRef({input:t,surface:r,locked:o,phase:n,popupOwners:d,onDismiss:c});y.current={input:t,surface:r,locked:o,phase:n,popupOwners:d,onDismiss:c},vu.useLayoutEffect(()=>{h(!1),v(!1)},[e]),vu.useEffect(()=>{(n==="failed"||n==="unknown")&&(v(!0),h(!0)),n==="sent"&&!a&&(v(!1),h(!1),t()?.blur())},[n,a]);let w=p||g||!!o||!!l||n==="sending",x=vu.useRef(w);x.current=w,vu.useEffect(()=>{let F=t(),C=r();if(!F||!C)return;let D=new Set,S=U=>{if(!(U.target instanceof Node)||!C.contains(U.target))return;let{owner:H,active:q}=U.detail;q?D.add(H):D.delete(H)},A=()=>{h(!0)},I=()=>{v(!1),h(!0)},j=U=>{let H=y.current;D.size||H.locked||["sending","failed","unknown"].includes(H.phase)||(h(!1),F.blur(),H.onDismiss?.(U))},$=U=>U instanceof Node&&(C.contains(U)||y.current.popupOwners.some(H=>yp(U,H))),P=U=>{$(U.target)||j("outside")},N=U=>{U.key!=="Escape"||!x.current||U.defaultPrevented||U.isComposing||bp()||!C.contains(document.activeElement)||Dx(y.current.popupOwners)||(U.preventDefault(),U.stopPropagation(),j("escape"))},R=()=>{bp()||j("back")};return document.addEventListener("wand-composer-focus-borrow",S),F.addEventListener("focus",A),F.addEventListener("input",I),document.addEventListener("pointerdown",P),document.addEventListener("keydown",N,!0),window.addEventListener("popstate",R),()=>{document.removeEventListener("wand-composer-focus-borrow",S),F.removeEventListener("focus",A),F.removeEventListener("input",I),document.removeEventListener("pointerdown",P),document.removeEventListener("keydown",N,!0),window.removeEventListener("popstate",R)}},[e]);let k=vu.useRef(e);return k.current=e,vu.useLayoutEffect(()=>{let F=t();F&&(F.tabIndex=w?0:-1)},[w,e]),{expanded:w,open:()=>{(0,fhe.flushSync)(()=>h(!0));let F=t();k.current!==e||!F||(F.focus({preventScroll:!0}),requestAnimationFrame(()=>{k.current===e&&F===y.current.input()&&F.isConnected&&document.activeElement===document.body&&F.focus({preventScroll:!0})}))}}}function o7({text:e,attachments:t,placeholder:r,disabled:n,onOpen:a}){let o=t?`\u8349\u7A3F \xB7 ${t} \u4E2A\u9644\u4EF6`:e?`\u8349\u7A3F \xB7 ${e.length} \u5B57`:r;return(0,mhe.jsx)(Te,{kind:"ghost",className:"composer-compact-entry",disabled:n,"aria-label":e||t?"\u7F16\u8F91\u672A\u53D1\u9001\u8349\u7A3F\u53CA\u9644\u4EF6":"\u5C55\u5F00\u6587\u5B57\u8F93\u5165",onClick:a,children:o})}function s7(e,t=[]){if(Ap(e)!=="executing")return"idle";let r=t.length-1;for(;r>=0&&t[r].role!=="user";)r--;let n=new Map,a=new Set;for(let o=r+1;o<t.length;o++){let l=t[o];for(let c of l.content??[]){if(c.__subagent||(c.type==="tool_result"&&a.add(c.tool_use_id),c.type!=="tool_use"||l.completedAt))continue;let d=c.activity?.kind;(d==="read_file"||d==="edit_file")&&n.set(c.id,d==="read_file"?"reading":"writing")}}return[...n].reverse().find(([o])=>!a.has(o))?.[1]??"idle"}var l7=null,t2=new Set,Eb={open(e,t){l7={...e,trigger:t},t2.forEach(r=>r())},close(){l7=null,t2.forEach(e=>e())}},u7={subscribe(e){return t2.add(e),()=>{t2.delete(e)}},getSnapshot(){return l7},getServerSnapshot(){return null}};function kb(e){let t=null;return{preload(){if(t)return;let r=e();t=r,r.catch(()=>{t===r&&(t=null)})},load(){let r=t;return t=null,r??e()},clear(){t=null}}}var c7=new Set;function ho(){for(let e of c7)e()}function vs(e){return c7.add(e),()=>{c7.delete(e)}}function r2(e){return ho(),e}function _c(e){return Dt(e).then(r2)}function d7(e){return typeof e=="number"&&Number.isFinite(e)?Math.max(0,Math.floor(e)):0}function hhe(e){return e==="dirty"||e==="conflict"||e==="empty"||e==="unavailable"?e:"ready"}function ghe(e){let t=Th(e),r=Ge(t.taskId).trim(),n=Ge(t.branch).trim(),a=Ge(t.path).trim();if(!r||!n||!a)return null;let o=Array.isArray(t.commits)?t.commits.flatMap(l=>{let c=Th(l),d=Ge(c.hash).trim();return d?[{hash:d,shortHash:Ge(c.shortHash,d.slice(0,7)),subject:Ge(c.subject)}]:[]}):[];return{taskId:r,taskName:Ge(t.taskName,n),taskStatus:t.taskStatus==="done"?"done":"active",branch:n,path:a,baseRef:Ge(t.baseRef),state:hhe(t.state),actionable:t.actionable===!0,reason:Ge(t.reason),aheadCount:d7(t.aheadCount),hasUncommittedChanges:t.hasUncommittedChanges===!0,hasConflicts:t.hasConflicts===!0,commits:o}}function vhe(e){let t=Th(e);return{workspaceId:Ge(t.workspaceId),repoRoot:Ge(t.repoRoot),targetBranch:Ge(t.targetBranch),worktrees:Array.isArray(t.worktrees)?t.worktrees.map(ghe).filter(r=>r!==null):[]}}var bhe=class{constructor(e=(t,r)=>globalThis.fetch(t,r)){oe(this,"fetchImpl",e),oe(this,"startupGroups",kb(()=>this.readTaskGroups()))}preloadTaskGroups(){this.startupGroups.preload()}clearPreload(){this.startupGroups.clear()}async list(){let e=await Dt(await this.fetchImpl("/api/workspaces",{credentials:"same-origin"})),t=Array.isArray(e)?e:e.workspaces;return Array.isArray(t)?t.map(r=>{let n=Th(r);return{...r,sessionCount:d7(n.sessionCount),worktreeCount:d7(n.worktreeCount)}}):[]}listTaskGroups(e){return e===void 0?this.startupGroups.load():this.readTaskGroups(e)}async readTaskGroups(e){let t=`?revision=${encodeURIComponent(e??"")}&includeArchived=1`,r=await Dt(await this.fetchImpl(`/api/tasks${t}`,{credentials:"same-origin"}));if(Array.isArray(r))return{groups:r,unchanged:!1};let n=r&&typeof r=="object"?r:{};return{groups:Array.isArray(n.groups)?n.groups:[],revision:typeof n.revision=="string"?n.revision:void 0,unchanged:n.unchanged===!0}}async get(e){return Dt(await this.fetchImpl(`/api/workspaces/${encodeURIComponent(e)}`,{credentials:"same-origin"}))}async create(e){return _c(await this.fetchImpl("/api/workspaces",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(e)}))}async update(e,t){return Dt(await this.fetchImpl(`/api/workspaces/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(t)}))}async remove(e,t=!1){await Dt(await this.fetchImpl(`/api/workspaces/${encodeURIComponent(e)}${t?"?cascade=1":""}`,{method:"DELETE",credentials:"same-origin"}))}async renameDirectory(e,t){await Dt(await this.fetchImpl("/api/session-directories/name",{method:"PUT",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,name:t})}))}async saveLayout(e,t){return(await Dt(await this.fetchImpl(`/api/workspaces/${encodeURIComponent(e)}/layout`,{method:"PUT",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({layout:t})}))).layout??null}async listTasks(e){let t=await Dt(await this.fetchImpl(`/api/workspaces/${encodeURIComponent(e)}/tasks`,{credentials:"same-origin"}));return Array.isArray(t)?t:[]}async createTask(e,t){return _c(await this.fetchImpl(`/api/workspaces/${encodeURIComponent(e)}/tasks`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(t)}))}async createStandaloneTask(e){return _c(await this.fetchImpl("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(e)}))}async getTask(e){return Dt(await this.fetchImpl(`/api/workspace-tasks/${encodeURIComponent(e)}`,{credentials:"same-origin"}))}async updateTask(e,t){return _c(await this.fetchImpl(`/api/workspace-tasks/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(t)}))}async deleteTask(e,t=!1){await _c(await this.fetchImpl(`/api/workspace-tasks/${encodeURIComponent(e)}${t?"?cascade=1":""}`,{method:"DELETE",credentials:"same-origin"}))}async archiveTask(e){return _c(await this.fetchImpl(`/api/workspace-tasks/${encodeURIComponent(e)}/archive`,{method:"POST",credentials:"same-origin"}))}async organizeByTitle(e,t=[],r="auto"){return this.organizeTasks({taskIds:e,sessionIds:t,mode:r})}async organizeTarget(e,t="auto"){return this.organizeTasks({target:e,mode:t})}async organizeTasks(e){return _c(await this.fetchImpl("/api/tasks/organize-by-title",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}))}async prepareConversationOrganization(e){return(await Dt(await this.fetchImpl("/api/sessions/auto-organize",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"preview",...e})}))).preview}async startConversationOrganization(e,t=!1){try{return(await Dt(await this.fetchImpl("/api/sessions/auto-organize",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"start",token:e,force:t})}))).job}catch(r){try{return(await Dt(await this.fetchImpl(`/api/sessions/auto-organize/by-token/${encodeURIComponent(e)}`,{credentials:"same-origin"}))).job}catch{throw r}}}async conversationOrganizationJobByToken(e){return(await Dt(await this.fetchImpl(`/api/sessions/auto-organize/by-token/${encodeURIComponent(e)}`,{credentials:"same-origin"}))).job}async conversationOrganizationJob(e){return(await Dt(await this.fetchImpl(`/api/sessions/auto-organize/${encodeURIComponent(e)}`,{credentials:"same-origin"}))).job}async watchConversationOrganization(e,t,r){let n=e,a="";for(;;){r?.throwIfAborted(),t?.(n);let o=`${n.result.createdTasks.length}:${n.result.movedSessions.length}`;if(o!==a&&o!=="0:0"&&(a=o,r2(n.result)),n.status!=="running")return n;await new Promise(l=>setTimeout(l,800)),n=(await Dt(await this.fetchImpl(`/api/sessions/auto-organize/${encodeURIComponent(n.id)}`,{credentials:"same-origin",signal:r}))).job}}async cancelConversationOrganization(e){await Dt(await this.fetchImpl(`/api/sessions/auto-organize/${encodeURIComponent(e)}/cancel`,{method:"POST",credentials:"same-origin"}))}async moveSession(e,t){await _c(await this.fetchImpl(`/api/workspace-tasks/${encodeURIComponent(e)}/sessions`,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:t})}))}async saveTaskLayout(e,t,r){let n=await Dt(await this.fetchImpl(`/api/workspace-tasks/${encodeURIComponent(e)}/layout`,{method:"PUT",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({layout:t,layoutRevision:r})}));return{layout:n.layout??null,layoutRevision:n.layoutRevision}}async listWorktrees(e,t={}){let r=await Dt(await this.fetchImpl(`/api/workspaces/${encodeURIComponent(e)}/worktrees`,{credentials:"same-origin",signal:t.signal}));return vhe(r)}async deleteSessions(e){let t=[...new Set(e.filter(n=>typeof n=="string"&&n.trim().length>0))];if(t.length===0)return;let r=await Dt(await this.fetchImpl("/api/sessions/batch-delete",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({sessionIds:t})}));if(Array.isArray(r.failed)&&r.failed.length>0)throw new Error(`\u6709 ${r.failed.length} \u4E2A\u7EC8\u7AEF\u65E0\u6CD5\u5173\u95ED\u3002`)}async archiveSession(e,t){await Dt(await this.fetchImpl(`/api/sessions/${encodeURIComponent(e)}/${t?"archive":"unarchive"}`,{method:"POST",credentials:"same-origin"}))}async batchArchiveSessions(e,t){let r=[...new Set(e.filter(a=>typeof a=="string"&&a.trim().length>0))];if(r.length===0)return;let n=await Dt(await this.fetchImpl("/api/sessions/batch-archive",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({sessionIds:r,archived:t})}));if(Array.isArray(n.failed)&&n.failed.length>0)throw new Error(`\u6709 ${n.failed.length} \u4E2A\u4F1A\u8BDD\u672A\u80FD\u5F52\u6863\u3002`)}},an=new bhe;vs(()=>an.clearPreload());var tq=B(_()),yhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},whe=yhe;function p7(){return p7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p7.apply(this,arguments)}var xhe=(e,t)=>tq.createElement(Ut,p7({},e,{ref:t,icon:whe})),Ehe=tq.forwardRef(xhe),f7=Ehe;var rq=B(_()),khe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},Che=khe;function m7(){return m7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},m7.apply(this,arguments)}var She=(e,t)=>rq.createElement(Ut,m7({},e,{ref:t,icon:Che})),Fhe=rq.forwardRef(She),h7=Fhe;var nq=B(_()),Dhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},Ahe=Dhe;function g7(){return g7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g7.apply(this,arguments)}var $he=(e,t)=>nq.createElement(Ut,g7({},e,{ref:t,icon:Ahe})),Bhe=nq.forwardRef($he),Ph=Bhe;var v7=B(_(),1);function Ihe(e){let t=new Map;function r(a){let o=t.get(a);return o||(o={detail:null,listeners:new Set},t.set(a,o)),o}function n(a){let o=r(a);if(o.pending)return o.pending;let l=e.getTask(a).then(c=>{if(c.id!==a)throw new Error("\u4EFB\u52A1\u8BE6\u60C5\u4E0E\u8BF7\u6C42\u4E0D\u5339\u914D\u3002");if(t.get(a)===o&&o.pending===l){o.detail=c;for(let d of o.listeners)d()}return c}).finally(()=>{o.pending===l&&(o.pending=void 0,o.listeners.size===0&&t.get(a)===o&&t.delete(a))});return o.pending=l,l}return{load:n,reload(a){return r(a).pending=void 0,n(a)},getSnapshot(a){return a?t.get(a)?.detail??null:null},subscribe(a,o){if(!a)return()=>{};let l=r(a);return l.listeners.add(o),l.timer||(n(a).catch(()=>{}),l.timer=setInterval(()=>{n(a).catch(()=>{})},4e3)),()=>{l.listeners.delete(o),!(l.listeners.size>0)&&(clearInterval(l.timer),t.get(a)===l&&t.delete(a))}}}}var bs=Ihe(an);function x7(e){let t=(0,v7.useCallback)(n=>bs.subscribe(e,n),[e]),r=(0,v7.useCallback)(()=>bs.getSnapshot(e),[e]);return(0,v7.useSyncExternalStore)(t,r,()=>null)}var aq=B(_()),Mhe=(0,aq.forwardRef)((e,t)=>{let{prefixCls:r,className:n,children:a,destroyOnHidden:o=!1,size:l,style:c,supportMotion:d}=e,p=l===0||typeof l=="string"&&Number.parseFloat(l)===0,h=te(`${r}-panel`,{[`${r}-panel-hidden`]:p,[`${r}-panel-transition`]:d},n),g=l!==void 0;return aq.default.createElement("div",{ref:t,className:h,style:{...c,flexBasis:g?l:"auto",flexGrow:g?0:1}},!(o&&p)&&a)}),The=()=>null,jhe=The,qo=B(_()),iq=B(_());function _he(e){if(kt(e))return{...e,showCollapsibleIcon:e.showCollapsibleIcon===void 0?"auto":e.showCollapsibleIcon};let t=!!e;return{start:t,end:t,showCollapsibleIcon:"auto"}}function Phe(e){return iq.useMemo(()=>Hr(e).filter(t=>iq.isValidElement(t)).map(t=>{let{props:r}=t,{collapsible:n,...a}=r;return{...a,collapsible:_he(n)}}),[e])}var Nhe=Phe,Ohe=B(_());function oq(e,t){return e.collapsible&&t.collapsible?e.showCollapsibleIcon===!0||t.showCollapsibleIcon===!0?!0:e.showCollapsibleIcon==="auto"||t.showCollapsibleIcon==="auto"?"auto":!1:e.collapsible?e.showCollapsibleIcon:t.collapsible?t.showCollapsibleIcon:!1}function Rhe(e,t,r){return Ohe.useMemo(()=>{let n=[];for(let a=0;a<e.length-1;a+=1){let o=e[a],l=e[a+1],c=t[a],d=t[a+1],{resizable:p=!0,min:h,collapsible:g}=o,{resizable:v=!0,min:y,collapsible:w}=l,x=p&&v&&(c!==0||!h)&&(d!==0||!y),k=!!g.end&&c>0,F=!!w.start&&d===0&&c>0,C=k||F,D=!!w.start&&d>0,S=!!g.end&&c===0&&d>0,A=D||S,I=oq({collapsible:k,showCollapsibleIcon:g.showCollapsibleIcon},{collapsible:F,showCollapsibleIcon:w.showCollapsibleIcon}),j=oq({collapsible:D,showCollapsibleIcon:w.showCollapsibleIcon},{collapsible:S,showCollapsibleIcon:g.showCollapsibleIcon});n[a]={resizable:x,startCollapsible:!!(r?A:C),endCollapsible:!!(r?C:A),showStartCollapsibleIcon:r?j:I,showEndCollapsibleIcon:r?I:j}}return n},[t,e,r])}var b7=B(_()),Bp=B(_());function Lhe(e,t,r){let n=e.map((w,x)=>w===0?0:t[x]??0),a=e.map((w,x)=>w===0?0:r[x]??1),o=n.some((w,x)=>w>a[x]),l=n.reduce((w,x)=>w+x,0),c=a.reduce((w,x)=>w+x,0);if(o||l>1||c<1)return e;let d=e.map((w,x)=>Math.min(a[x],Math.max(n[x],w))),p=d.reduce((w,x)=>w+x,0);if(p===1)return d;let h=p<1,g=d.map((w,x)=>h?a[x]-w:w-n[x]),v=g.reduce((w,x)=>w+x,0),y=1-p;return d.map((w,x)=>w+y*(g[x]/v))}function zhe(e,t,r){let n=0,a=[];e.forEach((w,x)=>{w===void 0?a.push(x):n+=w});let o=1-n,l=a.length;if(e.length&&!a.length&&n!==1){if(n===0){let k=1/e.length;return e.map(()=>k)}let w=1/n,x=e.map(k=>k*w);return Lhe(x,t,r)}if(o<0){let w=1/n;return e.map(x=>x===void 0?0:x*w)}let c=0,d=0,p=0,h=1;for(let w of a){let x=t[w]||0,k=r[w]||1;c+=x,d+=k,p=Math.max(p,x),h=Math.min(h,k)}if(c>1&&d<1){let w=1/l;return e.map(x=>x===void 0?w:x)}let g=o/l;if(p<=g&&g<=h)return e.map(w=>w===void 0?g:w);let v=Xr(e),y=o-c;for(let w=0;w<l;w+=1){let x=a[w],k=t[x]||0,F=r[x]||1;v[x]=k;let C=F-k,D=Math.min(C,y);v[x]+=D,y-=D}return v}function n2(e){return Number(e.slice(0,-1))/100}function y7(e){return typeof e=="string"&&e.endsWith("%")}function Hhe(e,t){let r=e.map(y=>y.size),n=e.length,a=t||0,o=y=>y*a,[l,c]=Bp.default.useState(()=>e.map(y=>y.defaultSize)),d=Bp.default.useMemo(()=>r.some(Yr)?r:l,[n,l,r]),p=Bp.default.useMemo(()=>e.map(y=>y7(y.min)?n2(y.min):(y.min||0)/a),[e,a]),h=Bp.default.useMemo(()=>e.map(y=>y7(y.max)?n2(y.max):(y.max||a)/a),[e,a]),g=Bp.default.useMemo(()=>{let y=[];for(let w=0;w<n;w+=1){let x=d[w];if(y7(x))y[w]=n2(x);else if(x||x===0){let k=Number(x);Number.isNaN(k)||(y[w]=k/a)}else y[w]=void 0}return zhe(y,p,h)},[n,d,a,p,h]),v=Bp.default.useMemo(()=>g.map(o),[g,a]);return[Bp.default.useMemo(()=>t?v:d,[v,d,t]),v,g,p,h,c]}function qhe(e,t,r,n,a,o){let l=e.map(k=>[k.min,k.max]),c=n||0,d=k=>k*c;function p(k,F){return typeof k=="string"?d(n2(k)):k??F}let[h,g]=b7.useState([]),v=b7.useRef([]),[y,w]=b7.useState(null),x=()=>r.map(d);return[k=>{g(x()),w({index:k,confirmed:!1})},(k,F)=>{let C=null;if((!y||!y.confirmed)&&F!==0){if(F>0)C=k,w({index:k,confirmed:!0});else for(let R=k;R>=0;R-=1)if(h[R]>0&&t[R].resizable){C=R,w({index:R,confirmed:!0});break}}let D=C??y?.index??k,S=Xr(h),A=D+1,I=p(l[D][0],0),j=p(l[A][0],0),$=p(l[D][1],c),P=p(l[A][1],c),N=F;return S[D]+N<I&&(N=I-S[D]),S[A]-N<j&&(N=S[A]-j),S[D]+N>$&&(N=$-S[D]),S[A]-N>P&&(N=S[A]-P),S[D]+=N,S[A]-=N,a(S),S},()=>{w(null)},(k,F)=>{let C=x(),D=o?F==="start"?"end":"start":F,S=D==="start"?k:k+1,A=D==="start"?k+1:k,I=C[S],j=C[A];if(I!==0&&j!==0)C[S]=0,C[A]+=I,v.current[k]=I;else{let $=I+j,P=p(l[S][0],0),N=p(l[S][1],c),R=p(l[A][0],0),U=p(l[A][1],c),H=Math.max(P,$-U),q=Math.min(N,$-R),L=R||(q-H)/2,O=v.current[k],W=$-O;O&&O<=U&&O>=R&&W<=N&&W>=P?(C[A]=O,C[S]=W):(C[S]-=L,C[A]+=L)}return a(C),C},y?.index]}var Ha=B(_()),w7=e=>Oa(e)&&Number.isFinite(e)?Math.round(e):0,Whe=300,Vhe=e=>{let{prefixCls:t,rootPrefixCls:r,vertical:n,index:a,active:o,ariaNow:l,ariaMin:c,ariaMax:d,resizable:p,draggerIcon:h,draggerStyle:g,draggerClassName:v,collapsibleIcon:y,startCollapsible:w,endCollapsible:x,onDraggerDoubleClick:k,onOffsetStart:F,onOffsetUpdate:C,onOffsetEnd:D,onCollapse:S,lazy:A,containerSize:I,showStartCollapsibleIcon:j,showEndCollapsibleIcon:$}=e,P=`${t}-bar`,N=(0,Ha.useRef)(0),[R]=pn(r,"splitter"),[U,H]=(0,Ha.useState)(null),[q,L]=(0,Ha.useState)(0),O=n?0:q,W=n?q:0,z=ae=>{ae.stopPropagation();let he=Date.now(),le=he-N.current;le>0&&le<Whe||(N.current=he,p&&ae.currentTarget&&(H([ae.pageX,ae.pageY]),F(a)))},Y=ae=>{if(p&&ae.touches.length===1){let he=ae.touches[0];H([he.pageX,he.pageY]),F(a)}},G=ae=>{let he=I*l/100,le=he+ae,fe=Math.max(0,I*c/100),we=Math.min(I,I*d/100);return Math.max(fe,Math.min(we,le))-he},Z=xt((ae,he)=>{let le=G(n?he:ae);L(le)}),T=xt(()=>{C(a,O,W,!0),L(0),D(!0)}),V=(ae,he)=>{(ae.key==="Enter"||ae.key===" ")&&(ae.preventDefault(),S(a,he))},X=ae=>{switch(ae){case!0:return`${P}-collapse-bar-always-visible`;case!1:return`${P}-collapse-bar-always-hidden`;case"auto":return`${P}-collapse-bar-hover-only`}};Jt(()=>{if(!U)return;let ae={mousemove:he=>{let{pageX:le,pageY:fe}=he,we=le-U[0],_e=fe-U[1];A?Z(we,_e):C(a,we,_e)},mouseup:()=>{A?T():D(),H(null)},touchmove:he=>{if(he.touches.length===1){let le=he.touches[0],fe=le.pageX-U[0],we=le.pageY-U[1];A?Z(fe,we):C(a,fe,we)}},touchend:()=>{A?T():D(),H(null)}};for(let[he,le]of Object.entries(ae))window.addEventListener(he,le);return()=>{for(let[he,le]of Object.entries(ae))window.removeEventListener(he,le)}},[U,a,A]);let Q={[R("bar-preview-offset")]:`${q}px`},[re,J,se,ue]=Ha.default.useMemo(()=>{let ae=null,he=null,le=y?.start!==void 0,fe=y?.end!==void 0;return n?(ae=le?y.start:Ha.default.createElement(f7,null),he=fe?y.end:Ha.default.createElement(h7,null)):(ae=le?y.start:Ha.default.createElement(Ph,null),he=fe?y.end:Ha.default.createElement(sp,null)),[ae,he,le,fe]},[y,n]);return Ha.default.createElement("div",{className:P},A&&Ha.default.createElement("div",{className:te(`${P}-preview`,{[`${P}-preview-active`]:!!q}),style:Q}),Ha.default.createElement("div",{style:g?.default,className:te(`${P}-dragger`,{[`${P}-dragger-disabled`]:!p,[`${P}-dragger-active`]:o,[`${P}-dragger-customize`]:h!==void 0},v?.default,o&&v?.active),onMouseDown:z,onTouchStart:Y,onDoubleClick:()=>k?.(a),role:"separator","aria-disabled":!p,"aria-orientation":n?"horizontal":"vertical","aria-valuenow":w7(l),"aria-valuemin":w7(c),"aria-valuemax":w7(d)},h!==void 0?Ha.default.createElement("div",{className:te(`${P}-dragger-icon`)},h):null),w&&Ha.default.createElement("div",{className:te(`${P}-collapse-bar`,`${P}-collapse-bar-start`,{[`${P}-collapse-bar-customize`]:se},X(j)),role:"button",tabIndex:0,"aria-label":"Toggle start panel",onClick:()=>S(a,"start"),onKeyDown:ae=>V(ae,"start")},Ha.default.createElement("span",{className:te(`${P}-collapse-icon`,`${P}-collapse-start`)},re)),x&&Ha.default.createElement("div",{className:te(`${P}-collapse-bar`,`${P}-collapse-bar-end`,{[`${P}-collapse-bar-customize`]:ue},X($)),role:"button",tabIndex:0,"aria-label":"Toggle end panel",onClick:()=>S(a,"end"),onKeyDown:ae=>V(ae,"end")},Ha.default.createElement("span",{className:te(`${P}-collapse-icon`,`${P}-collapse-end`)},J)))},Uhe=Vhe,Cb={position:"absolute",top:"50%",left:{_skip_check_:!0,value:"50%"},transform:"translate(-50%, -50%)"},Khe=e=>{let{componentCls:t,colorFill:r,splitBarDraggableSize:n,splitBarSize:a,splitTriggerSize:o,controlItemBgHover:l,controlItemBgActive:c,controlItemBgActiveHover:d,colorPrimary:p,antCls:h,calc:g}=e,[,v]=pn(h,"splitter"),y=`${t}-bar`,w=`${t}-mask`,x=`${t}-panel`,k=g(o).div(2).equal(),F={position:"absolute",background:e.colorPrimary,opacity:.2,pointerEvents:"none",transition:"none",zIndex:1,display:"none"};return{[t]:{...fr(e),display:"flex",width:"100%",height:"100%",alignItems:"stretch",[`> ${y}`]:{flex:"none",position:"relative",userSelect:"none",[`${y}-dragger`]:{...Cb,zIndex:1,"&::before":{content:'""',background:l,...Cb},"&::after":{content:'""',background:r,...Cb},[`&:hover:not(${y}-dragger-active)`]:{"&::before":{background:c}},"&-active":{zIndex:2,"&::before":{background:d}},[`&-active${y}-dragger-customize`]:{[`${y}-dragger-icon`]:{color:p}},[`&-disabled${y}-dragger`]:{zIndex:0,"&, &:hover, &-active":{cursor:"default","&::before":{background:l}},"&::after":{display:"none"},[`${y}-dragger-icon`]:{display:"none"}},"&-customize":{[`${y}-dragger-icon`]:{...Cb,display:"flex",alignItems:"center",color:r},"&::after":{display:"none"}}},[`${y}-collapse-bar`]:{...Cb,zIndex:e.zIndexPopupBase,background:l,fontSize:e.fontSizeSM,borderRadius:e.borderRadiusXS,color:e.colorText,cursor:"pointer",opacity:0,display:"flex",alignItems:"center",justifyContent:"center","&:focus-visible":ao(e),[`&:hover:not(${y}-collapse-bar-customize)`]:{background:c},[`&:active:not(${y}-collapse-bar-customize)`]:{background:d},[`${y}-collapse-icon`]:{display:"flex",alignItems:"center"}},[`${y}-collapse-bar-customize`]:{background:"transparent"},"&:hover, &:active, &:focus-within":{[`${y}-collapse-bar-hover-only`]:{opacity:1}},[`${y}-collapse-bar-hover-only`]:{"@media(hover:none)":{opacity:1}},[`${y}-collapse-bar-always-hidden`]:{display:"none"},[`${y}-collapse-bar-always-visible`]:{opacity:1}},[w]:{position:"fixed",zIndex:e.zIndexPopupBase,inset:0,"&-horizontal":{cursor:"col-resize"},"&-vertical":{cursor:"row-resize"}},"&-horizontal":{flexDirection:"row",[`> ${y}`]:{width:0,[`${y}-preview`]:{height:"100%",width:a,...F,[`&${y}-preview-active`]:{display:"block",transform:`translate3d(${v("bar-preview-offset")}, 0, 0)`}},[`${y}-dragger`]:{cursor:"col-resize",height:"100%",width:o,"&::before":{height:"100%",width:a},"&::after":{height:n,width:a}},[`${y}-collapse-bar`]:{width:e.fontSizeSM,height:e.controlHeightSM,"&-start":{left:{_skip_check_:!0,value:"auto"},right:{_skip_check_:!0,value:k},transform:"translateY(-50%)"},"&-end":{left:{_skip_check_:!0,value:k},right:{_skip_check_:!0,value:"auto"},transform:"translateY(-50%)"}}}},"&-vertical":{flexDirection:"column",[`> ${y}`]:{height:0,[`${y}-preview`]:{height:a,width:"100%",...F,[`&${y}-preview-active`]:{display:"block",transform:`translate3d(0, ${v("bar-preview-offset")}, 0)`}},[`${y}-dragger`]:{cursor:"row-resize",width:"100%",height:o,"&::before":{width:"100%",height:a},"&::after":{width:n,height:a}},[`${y}-collapse-bar`]:{height:e.fontSizeSM,width:e.controlHeightSM,"&-start":{top:"auto",bottom:k,transform:"translateX(-50%)"},"&-end":{top:k,bottom:"auto",transform:"translateX(-50%)"}}}},[x]:{overflow:"auto",scrollbarWidth:"thin",boxSizing:"border-box","&-hidden":{overflow:"hidden"},[`&:has(${t}:only-child)`]:{overflow:"hidden"},"&-transition":{transition:`flex-basis ${e.motionDurationSlow} ${e.motionEaseInOut}`,...ap()}}}}},Ghe=e=>{let t=e.splitBarSize||2,r=e.splitTriggerSize||6,n=e.resizeSpinnerSize||20,a=e.splitBarDraggableSize??n;return{splitBarSize:t,splitTriggerSize:r,splitBarDraggableSize:a,resizeSpinnerSize:n}},Xhe=Et("Splitter",Khe,Ghe),Yhe=(e,t)=>{let{prefixCls:r,className:n,classNames:a,collapsible:o,style:l,styles:c,layout:d,orientation:p,vertical:h,children:g,destroyOnHidden:v,draggerIcon:y,collapsibleIcon:w,rootClassName:x,onDraggerDoubleClick:k,onResizeStart:F,onResize:C,onResizeEnd:D,lazy:S}=e,{getPrefixCls:A,direction:I,className:j,style:$,classNames:P,styles:N}=jt("splitter"),R=A("splitter",r),U=A(),H=Qn(R),[q,L]=Xhe(R,H),[O,W]=el(p,h,d),z=I==="rtl",Y=!W&&z,G=Nhe(g),[Z,T]=(0,qo.useState)(),V=et=>{let{offsetWidth:Ve,offsetHeight:Se}=et,Pe=W?Se:Ve;Pe!==0&&T(Pe)},[X,Q,re,J,se,ue]=Hhe(G,Z),ae=Rhe(G,Q,Y),[he,le,fe,we,_e]=qhe(G,ae,re,Z,ue,Y),$e=xt(et=>{he(et),F?.(Q)}),De=xt((et,Ve,Se)=>{let Pe=le(et,Ve);Se?D?.(Pe):C?.(Pe)}),Ce=xt(et=>{fe(),et||D?.(Q)}),qe=xt((et,Ve)=>{let Se=we(et,Ve);C?.(Se),D?.(Se);let Pe=Se.map(dt=>Math.abs(dt)<Number.EPSILON);e.onCollapse?.(Pe,Se)}),Ae={...e,vertical:W,orientation:O},Be=lt($),Me=lt(l),[Ue,He]=Tt([P,a],[N,Be,c,Me],{props:Ae},{dragger:{_default:"default"}}),Ie=te(R,n,`${R}-${O}`,{[`${R}-rtl`]:z},x,Ue.root,j,L,H,q),Ne=qo.default.useRef(null);qo.default.useImperativeHandle(t,()=>({nativeElement:Ne.current}));let Je=`${R}-mask`,gt=qo.default.useMemo(()=>{let et=[],Ve=0,Se=G.length;for(let Pe=0;Pe<Se;Pe+=1)Ve+=re[Pe],et.push(Ve);return et},[re,G.length]);return qo.default.createElement(Ea,{onResize:V},qo.default.createElement("div",{ref:Ne,style:He.root,className:Ie},G.map((et,Ve)=>{let Se={...et,className:te(Ue.panel,et.className),style:{...He.panel,...et.style}},Pe=qo.default.createElement(Mhe,{...Se,prefixCls:R,size:X[Ve],supportMotion:o?.motion&&_e===void 0,destroyOnHidden:et.destroyOnHidden??v}),dt=null,at=ae[Ve];if(at){let Ke=Number.isFinite(gt[Ve-1])?gt[Ve-1]:0,je=Number.isFinite(gt[Ve+1])?gt[Ve+1]:1,rt=Ke+J[Ve],$t=je-se[Ve+1],Bt=Ke+se[Ve],Kr=je-J[Ve+1];dt=qo.default.createElement(Uhe,{lazy:S,index:Ve,active:_e===Ve,prefixCls:R,rootPrefixCls:U,vertical:W,resizable:at.resizable,draggerStyle:He.dragger,draggerClassName:Ue.dragger,draggerIcon:y,collapsibleIcon:o?.icon||w,ariaNow:gt[Ve]*100,ariaMin:Math.max(rt,$t)*100,ariaMax:Math.min(Bt,Kr)*100,startCollapsible:at.startCollapsible,endCollapsible:at.endCollapsible,showStartCollapsibleIcon:at.showStartCollapsibleIcon,showEndCollapsibleIcon:at.showEndCollapsibleIcon,onDraggerDoubleClick:k,onOffsetStart:$e,onOffsetUpdate:(zt,$r,Kt,St)=>{let nr=W?Kt:$r;Y&&(nr=-nr),De(zt,nr,St)},onOffsetEnd:Ce,onCollapse:qe,containerSize:Z||0})}return qo.default.createElement(qo.default.Fragment,{key:`split-panel-${Ve}`},Pe,dt)}),Oa(_e)&&qo.default.createElement("div",{"aria-hidden":!0,className:te(Je,`${Je}-${O}`)})))},Qhe=qo.default.forwardRef(Yhe),Zhe=Qhe,sq=Zhe;sq.Panel=jhe;var Sb=sq;var Ip=null,An={open:!1,dismissable:!0,context:null,revision:0},a2=new Set;function lq(e,t){An={open:e,dismissable:!0,context:t,revision:An.revision+1};for(let r of a2)r()}function Jhe(e){if(!(!An.open||An.dismissable===e)){An={...An,dismissable:e};for(let t of a2)t()}}var Pc={open(e){let t=e.sessionId.trim();if(!Ip||!t)return!1;if(An.open&&An.context?.sessionId===t)return!0;let r={sessionId:t};return Ip.onOpen(r),lq(!0,r),!0},close(){if(!An.open||!An.context)return;let e=An.context;lq(!1,null),Ip?.onClose(e)},closeIfOpen(){return!An.open||!An.dismissable?!1:(this.close(),!0)},closeTopmost(){return An.open?(An.dismissable&&this.close(),!0):!1},isOpen(){return An.open},isCurrentLifecycle(e,t){return An.open&&An.revision===e&&An.context?.sessionId===t},setDismissable(e){Jhe(e)}},E7={subscribe(e){return a2.add(e),()=>a2.delete(e)},getSnapshot(){return An},getRuntime(){return Ip}};function k7(e){return Ip=e,()=>{Ip===e&&(An.open&&Pc.close(),Ip=null)}}var Nh=null,na={open:!1,dismissable:!0,context:null,revision:0},i2=new Set;function uq(e,t){na={open:e,dismissable:!0,context:t,revision:na.revision+1};for(let r of i2)r()}function e0e(e){if(!(!na.open||na.dismissable===e)){na={...na,dismissable:e};for(let t of i2)t()}}var Nc={open(e){let t=e.sessionId.trim();if(!t)return!1;let r={...e,sessionId:t};return na.open&&na.context?.sessionId===t&&na.context.intent===r.intent||(Nh?.onOpen(r),uq(!0,r)),!0},close(){if(!na.open||!na.context)return;let e=na.context;uq(!1,null),Nh?.onClose(e)},closeIfOpen(){return!na.open||!na.dismissable?!1:(this.close(),!0)},closeTopmost(){return na.open?(na.dismissable&&this.close(),!0):!1},isOpen(){return na.open},setDismissable(e){e0e(e)}},C7={subscribe(e){return i2.add(e),()=>i2.delete(e)},getSnapshot(){return na},getRuntime(){return Nh}};function S7(e){return Nh=e,()=>{Nh===e&&(na.open&&Nc.close(),Nh=null)}}var ys={open:!1,dismissable:!0,revision:0},Oh=null,o2=new Set;function cq(e){ys={open:e,dismissable:!0,revision:ys.revision+1};for(let t of o2)t()}var Mp={open(){return Oh?.onOpen(),cq(!0),!0},close(){ys.open&&(cq(!1),Oh?.onClose())},closeIfOpen(){return ys.open?ys.dismissable?(this.close(),!0):!1:!0},isOpen(){return ys.open},setDismissable(e){if(!(!ys.open||ys.dismissable===e)){ys={...ys,dismissable:e};for(let t of o2)t()}}},F7={subscribe(e){return o2.add(e),()=>o2.delete(e)},getSnapshot(){return ys},getRuntime(){return Oh}};function D7(e){return Oh=e,()=>{Oh===e&&(Oh=null)}}var Fb={open:!1,sessionId:"",revision:0},A7=new Set;function dq(e){Fb={...Fb,...e,revision:Fb.revision+1},A7.forEach(t=>t())}var Db={open(e=""){return dq({open:!0,sessionId:e}),!0},close(){Fb.open&&dq({open:!1})}},$7={subscribe(e){return A7.add(e),()=>A7.delete(e)},getSnapshot(){return Fb}};async function B7(e){let t=new TextEncoder().encode(e),r=globalThis.crypto?.subtle,n=r?new Uint8Array(await r.digest("SHA-256",t)):(await globalThis.__wandImportBrowserModule("7950d87a3f5a01bd")).default(t);return Array.from(n,a=>a.toString(16).padStart(2,"0")).join("")}var t0e="system-ai:",I7="\u8FD9\u662F\u7CFB\u7EDF\u8C03\u7528\u8BB0\u5F55\uFF0C\u53EA\u80FD\u67E5\u770B\u65E5\u5FD7\uFF0C\u4E0D\u80FD\u7EE7\u7EED\u53D1\u9001\u6216\u6062\u590D\u6267\u884C\u3002";function ws(e){return typeof e?.automationId=="string"&&e.automationId.startsWith(t0e)}var pq={"system-text":"unspecified","session-title":"auxiliary","task-title":"auxiliary","task-organize":"auxiliary","conversation-organize-job":"auxiliary","conversation-organize":"auxiliary","conversation-summary":"auxiliary","prompt-optimize":"auxiliary","git-commit":"auxiliary","git-tag":"auxiliary","git-fallback":"auxiliary","model-auto-assign":"auxiliary","user-memory":"auxiliary","employee-draft":"auxiliary",decision:"agent-call"},g$e=Object.keys(pq).filter(e=>pq[e]==="auxiliary");var Rh=null,s2=new Set;function M7(e){return Rh=e,s2.forEach(t=>t()),()=>{Rh===e&&(Rh=null,s2.forEach(t=>t()))}}function Tp(){if(!Rh)throw new Error("\u7FA4\u804A\u8F93\u5165\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA\u3002");return Rh}var Lh={discardScope:e=>Tp().discardScope?.(e),ready:()=>Rh!==null,subscribeReady:e=>(s2.add(e),()=>{s2.delete(e)}),read:e=>Tp().read(e),edit:(e,t)=>Tp().edit(e,t),submit:(e,t,r)=>Tp().submit(e,t,r),subscribe:e=>Tp().subscribe(e),revision:e=>Tp().read(e).revision,transfer:(e,t,r)=>Tp().transfer?.(e,t,r)??!1};var Wo=B(_(),1),T7=new Set;function l2(e){for(let t of T7)t(e)}function Hh(e){return T7.add(e),()=>{T7.delete(e)}}var j7=new Set;function Ab(e){hq();for(let t of j7)t(e)}function fq(e){return j7.add(e),()=>{j7.delete(e)}}var _7=new Set;function O7(e){for(let t of _7)t(e)}function mq(e){return _7.add(e),()=>{_7.delete(e)}}function r0e(e){return yt(Oc(e,"/live"))}var Oc=(e,t="")=>`/api/ai-team-runs/${encodeURIComponent(e)}${t}`,Rc=null,zh=null,P7=0,N7=new Set;function hq(){P7++,Rc=null,zh=null}var n0e=e=>new Promise(t=>{window.setTimeout(t,e)}),$b={list(){if(Rc)return Promise.resolve(Rc);if(!zh){let e=P7,t=yt("/api/ai-teams").then(r=>{if(e===P7){Rc=r;for(let n of N7)n()}return r}).finally(()=>{zh===t&&(zh=null)});zh=t}return zh},async create(e){let t=await yt("/api/ai-teams",mn(e));return hq(),t},async update(e,t){let r=await yt(`/api/ai-teams/${encodeURIComponent(e)}`,mn(t,"PUT"));return Ab(r.id),r},async remove(e){await yt(`/api/ai-teams/${encodeURIComponent(e)}`,{method:"DELETE"}),Ab(e)},runs(e={}){let t=new URLSearchParams;e.teamId&&t.set("teamId",e.teamId),e.activeOnly&&t.set("active","1"),e.limit&&t.set("limit",String(e.limit));let r=t.toString();return yt(`/api/ai-team-runs${r?`?${r}`:""}`)},runsForTask(e){return yt(`/api/wand-tasks/${encodeURIComponent(e)}/team-runs`)},runsForChat(e,t){return $b.runsForTask(e).then(r=>r.filter(n=>n.chatSessionId===t))},start(e,t,r){return yt(`/api/wand-tasks/${encodeURIComponent(e)}/team-runs`,mn({teamId:t,note:r}))},startDirect(e,t){return yt(`/api/ai-teams/${encodeURIComponent(e)}/runs`,mn({note:t.note,workspaceId:t.workspaceId}))},dispatchPlan(e){return yt("/api/team-dispatch/plan",mn({note:e.note,...e.maxMembers===void 0?{}:{maxMembers:e.maxMembers}}))},dispatchStart(e){return yt("/api/team-dispatch/start",mn({workspaceId:e.workspaceId,note:e.note,members:e.members}))},settle(e){return n0e(e==="error"?fh:ph)},detail(e){return yt(Oc(e))},live:r0e,subscribeAiTeamStepLive:mq,approve(e){return yt(Oc(e,"/approve"),mn({}))},reject(e,t){return yt(Oc(e,"/reject"),mn({feedback:t}))},reply(e,t){return yt(Oc(e,"/reply"),mn({text:t}))},continueRun(e,t){return yt(Oc(e,"/continue"),mn({extraSteps:t}))},completeStep(e,t,r){return yt(Oc(e,`/steps/${encodeURIComponent(t)}/complete`),mn({report:r}))},stop(e){return yt(Oc(e,"/stop"),mn({}))}};function a0e(e){let t=`${e.members.length} \u4EBA`;return{id:e.id,name:e.name,detail:e.description.trim()?`${t} \xB7 ${e.description.trim()}`:t}}function i0e(e){let[t,r]=Wo.useState(null);return Wo.useEffect(()=>{if(!e)return;let n=!0;return $b.list().then(a=>{n&&r(a)},()=>{n&&r([])}),()=>{n=!1}},[e]),t}function o0e(e){let[t,r]=Wo.useState(()=>Rc??[]),[n,a]=Wo.useState(e&&!Rc),[o,l]=Wo.useState(null),c=Wo.useRef(!1),d=Wo.useRef(e),p=Wo.useRef(0);d.current=e;let h=Wo.useCallback(()=>{if(!c.current||!d.current)return;let g=++p.current,v=()=>c.current&&d.current&&p.current===g;a(!0),$b.list().then(y=>{v()&&(r(y),l(null))},y=>{v()&&l(y instanceof Error?y.message:"\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}).finally(()=>{v()&&a(!1)})},[]);return Wo.useEffect(()=>{if(!e){a(!1);return}c.current=!0;let g=()=>{!c.current||!d.current||!Rc||(r(Rc),l(null))};N7.add(g),h();let v=fq(h);return()=>{c.current=!1,p.current++,N7.delete(g),v()}},[e,h]),{teams:t,loading:n,error:o,reload:h}}function R7(){let[e,t]=Wo.useState(0);return Wo.useEffect(()=>{let r=!0,n=()=>{$b.runs({activeOnly:!0}).then(o=>{r&&t(o.filter(l=>l.status!=="running").length)}).catch(()=>{})};n();let a=Hh(n);return()=>{r=!1,a()}},[]),e}function s0e(e,t){if(e&&e.id!==t.id&&(e=null),t.unchanged){if(!e)throw new Error("\u7F3A\u5C11\u5BF9\u8BDD\u540C\u6B65\u57FA\u7EBF\uFF0C\u8BF7\u91CD\u65B0\u8BFB\u53D6\u3002");return{...e,history:t.history}}let r=new Map((t.reset?[]:e?.messages??[]).map(o=>[o.messageId,o]));for(let o of t.messages??[])r.set(o.messageId,o);let n=(t.messageOrder??[]).map(o=>{let l=r.get(o);if(!l)throw new Error("\u5BF9\u8BDD\u540C\u6B65\u7F3A\u5C11\u6D88\u606F\uFF0C\u8BF7\u91CD\u65B0\u8BFB\u53D6\u3002");return l}),a=t.detail??e;if(!a||a.id!==t.id)throw new Error("\u5BF9\u8BDD\u540C\u6B65\u8EAB\u4EFD\u4E0D\u4E00\u81F4\u3002");return{...a,messages:n,history:t.history}}var Vo=B(_(),1),qh=jh(async()=>{let e=await yt("/api/sessions",{credentials:"same-origin"});if(!Array.isArray(e)||e.some(t=>!t||typeof t.id!="string"))throw new Error("Invalid session list response");return e});function l0e(){return qh.peek()}function Bb(e){return qh.load(e)}function d2(e){qh.publish(e)}var u0e=["automationId","engine","provider","sessionKind","runner","command","title","titleGenerating","status","completionRevision","viewedCompletionRevision","cwd","startedAt","workspaceTaskId","ptyBusy","ptyCommandRunning","archived","archivedAt","providerCliActive","providerCliExitCode","inFlight","executionStatus","queuedMessageCount","canArchive","employeeId","employeeName","employeeAvatar","teamChat","teamStep"];function p2(e){let t=[];for(let r of e){if(!r||typeof r!="object")continue;let n=r;if(typeof n.id!="string")continue;let a={id:n.id};for(let o of u0e)n[o]!==void 0&&(a[o]=n[o]);t.push(a)}return t}function c0e(e){return qh.subscribe(e)}function Ib(){qh.invalidate()}function d0e(){qh.stale()}var c2=class extends Error{constructor(e){super("\u9001\u8FBE\u672A\u786E\u8BA4\uFF0C\u8BF7\u5148\u6838\u5BF9\u8BB0\u5F55\uFF0C\u52FF\u91CD\u590D\u53D1\u9001\u3002"),oe(this,"requestId",e),oe(this,"__wandAmbiguousDelivery",!0)}};async function gq(e,t){let r=await fetch(e,t),n=await r.json();if(!r.ok)throw new Aa(n.error||"\u8BF7\u6C42\u5931\u8D25\u3002",r.status);if(!n||typeof n.requestId!="string"||!["pending","accepted","rejected"].includes(n.state))throw new Error("\u65E0\u6CD5\u786E\u8BA4\u63A5\u53D7\u56DE\u6267\u3002");return n}var vq="wand-conversation-requests-v1",ll=new Map;try{let e=JSON.parse(localStorage.getItem(vq)??"{}");Object.entries(e).slice(0,200).forEach(([t,r])=>{typeof r=="string"&&ll.set(t,r)})}catch{}function u2(){try{localStorage.setItem(vq,JSON.stringify(Object.fromEntries(ll)))}catch{}}var L7=new Set;function jp(){for(let e of L7)e()}var _p={list:()=>yt("/api/conversations").then(e=>e.conversations),systemSessions:e=>Bb({force:e?.fresh,maxAgeMs:e?.maxAgeMs}).then(t=>t.filter(r=>ws(r)&&!!r.employeeId)),peekSystemSessions:()=>{let e=l0e();return e?e.filter(t=>ws(t)&&!!t.employeeId):[]},async updateListState(e,t){let r=await yt(`/api/conversations/${encodeURIComponent(e)}/list-state`,mn(t,"PATCH"));return jp(),r},async remove(e){await yt(`/api/conversations/${encodeURIComponent(e)}`,{method:"DELETE"}),Lh.ready()&&Lh.discardScope(`conversation-draft:${location.origin}:local-owner:${e}:`),jp()},async detail(e,t=null,r=!1){let n=new URLSearchParams;t?.id===e&&t.history&&(n.set("since",t.history.revision),t.history.from&&n.set("from",t.history.from)),r&&n.set("older","1");try{let a=await yt(`/api/conversations/${encodeURIComponent(e)}/sync?${n}`);return s0e(t,a)}catch(a){if(a instanceof Aa&&a.status===404)return yt(`/api/conversations/${encodeURIComponent(e)}`);throw a}},receipt:e=>gq(`/api/conversations/requests/${encodeURIComponent(e)}`),async post(e,t){let r=await B7(e+"\0"+JSON.stringify(t)),n=ll.get(r);if(n)throw new c2(n);if(ll.size>=200)throw new Aa("\u8BF7\u5148\u6838\u5BF9\u672A\u786E\u8BA4\u8BF7\u6C42\uFF0C\u518D\u7EE7\u7EED\u63D0\u4EA4\u3002",400);let a=h3();ll.set(r,a),u2();try{let o=await gq(e,mn({...t,requestId:a}));if(o.requestId!==a||o.state==="pending")throw new c2(a);if(o.state==="rejected")throw new Aa(o.error||"\u8BF7\u6C42\u672A\u63A5\u53D7\u3002",400);return ll.delete(r),u2(),jp(),o}catch(o){throw o instanceof Aa&&o.status>=400&&o.status<500&&o.status!==408&&o.status!==409?(ll.delete(r),u2(),Object.assign(o,{httpStatus:o.status})):new c2(a)}},pending:()=>[...ll.values()],async reconcile(e){let t=await this.receipt(e);if(t.state!=="pending"){for(let[r,n]of ll)n===e&&ll.delete(r);u2(),jp()}return t}},p0e=6e4;function z7(e=!1,t=!0){let[r,n]=Vo.useState([]),[a,o]=Vo.useState([]),[l,c]=Vo.useState(""),[d,p]=Vo.useState(!1),h=Vo.useRef(0),g=Vo.useRef(0),v=Vo.useCallback(async(k=!1,F)=>{let C=++h.current,D=g.current;try{let[S,A]=await Promise.all([_p.list(),e?_p.systemSessions({fresh:k,maxAgeMs:F}):Promise.resolve([])]);C===h.current&&(n(S),p(!0),c("")),C===h.current&&D===g.current&&o(A)}catch(S){C===h.current&&c(S instanceof Error?S.message:"\u5BF9\u8BDD\u5217\u8868\u8BFB\u53D6\u5931\u8D25\u3002")}},[e]),y=Vo.useCallback(()=>{v(!0)},[v]),w=Vo.useCallback(()=>{v(!1,p0e)},[v]),x=Vo.useCallback(()=>{d0e(),v(!1)},[v]);return Vo.useEffect(()=>{if(e)return c0e(()=>{g.current++,o(_p.peekSystemSessions())})},[e]),Vo.useEffect(()=>{if(!t)return;v(),L7.add(w);let k=[Hh(w),vs(w),Qx(x)],F=window.setInterval(()=>{document.hidden||w()},3e4);return()=>{++h.current,L7.delete(w),k.forEach(C=>C()),clearInterval(F)}},[v,w,x,t]),{items:r,systemSessions:a,error:l,loaded:d,refresh:y}}async function Pp(e){if(typeof WandNative<"u"&&typeof WandNative.copyToClipboard=="function"){if(WandNative.copyToClipboard(e)!=="ok")throw new Error("\u590D\u5236\u5230\u7CFB\u7EDF\u526A\u8D34\u677F\u5931\u8D25\u3002");return}if(!globalThis.navigator?.clipboard?.writeText)throw new Error("\u5F53\u524D\u73AF\u5883\u65E0\u6CD5\u8BBF\u95EE\u526A\u8D34\u677F\u3002");await globalThis.navigator.clipboard.writeText(e)}function Mb(e){let t=e.trim().replace(/[\\/]+$/,"");return t.split(/[\\/]/).pop()||t||"file"}function Tb(e){let t=e.lastIndexOf(".");return t>0?e.slice(t).toLowerCase():""}function H7(e){let t=typeof e=="string"?{path:e}:e,r=t.path.trim();if(!r)return null;let n=new Set,a=[];for(let o of t.siblings??[]){let l=o.path.trim();!l||o.type==="dir"||n.has(l)||(n.add(l),a.push({path:l,name:o.name?.trim()||Mb(l),type:"file"}))}return{path:r,siblings:a}}function q7(e,t){let r=e?.siblings??[];if(r.length<2||!e)return null;let n=r.findIndex(l=>l.path===e.path);if(n<0)return null;let a=(n+t+r.length)%r.length,o=r[a];return o&&o.path!==e.path?o:null}function jb(e){return Number.isFinite(e)?Math.max(10,Math.min(22,Math.round(e))):13}function Wh(){return 13}function f0e(e){let t=typeof e=="number"&&Number.isFinite(e)?Math.max(0,e):0;if(t<1024)return`${Math.round(t)} B`;let r=["KB","MB","GB","TB"],n=t/1024,a=0;for(;n>=1024&&a<r.length-1;)n/=1024,a+=1;return`${n>=10?n.toFixed(0):n.toFixed(1)} ${r[a]}`}function m0e(e){return e.kind==="text"?e.lang||e.ext.replace(/^\./,"")||"text":{image:"\u56FE\u7247",pdf:"PDF",video:"\u89C6\u9891",audio:"\u97F3\u9891",binary:"\u4E8C\u8FDB\u5236"}[e.kind]||e.ext.replace(/^\./,"")||e.kind}function h0e(e){switch(e){case"image":case"pdf":case"video":case"audio":case"binary":return e;default:return"file"}}function W7(e){return e.lang==="markdown"||/\.(md|markdown|mdx)$/i.test(e.name)}function V7(e){return`'${e.replace(/'/g,"'\\''")}'`}var g0e=new Set(["abstract","as","async","await","break","case","catch","class","const","continue","default","def","delete","do","else","enum","export","extends","false","finally","fn","for","from","func","function","go","if","impl","import","in","instanceof","interface","let","match","mod","new","nil","null","of","package","pass","private","protected","pub","public","raise","readonly","return","self","static","struct","super","switch","throw","trait","true","try","type","typeof","undefined","unsafe","use","var","void","while","with","yield"]),v0e=/\/\/[^\n]*|#[^\n]*|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|`(?:[^`\\]|\\.)*`|\b(?:0x[\da-fA-F]+|0b[01]+|\d+(?:\.\d+)?)\b|\b[A-Za-z_$][\w$]*\b|[+\-*/%=<>!&|^~?:]+/g;function b0e(e){let t=[],r=0;for(let n of e.matchAll(v0e)){let a=n.index??0;a>r&&t.push({value:e.slice(r,a)});let o=n[0],l;o.startsWith("//")||o.startsWith("#")?l="comment":/^["'`]/.test(o)?l="string":/^(?:0x|0b|\d)/.test(o)?l="number":g0e.has(o)?l="keyword":/^[+\-*/%=<>!&|^~?:]+$/.test(o)&&(l="operator"),t.push({value:o,kind:l}),r=a+o.length}return r<e.length&&t.push({value:e.slice(r)}),t}function y0e(e){switch(e){case"image":case"pdf":case"video":case"audio":case"binary":return e;default:return"text"}}function U7(e,t=!1){return`/api/file-raw?${t?"download=1&":""}path=${encodeURIComponent(e)}`}function bq(e,t,r,n){let a=Mb(r),o=Da(t.size,-1),l={message:Ge(t.error,`${n} (HTTP ${e.status})`),status:e.status,size:o>=0?o:void 0,maxSize:Da(t.maxSize,-1)>=0?Da(t.maxSize):void 0};return e.status===413&&(l.download={path:r,name:a,url:U7(r,!0),size:l.size}),l}function f2(e,t){let r=ca(e)?e:{},n=Ge(r.path,t).trim()||t,a=Ge(r.name,Mb(n)),o=y0e(r.kind),l=o==="text"?Ge(r.content):void 0;return{kind:o,path:n,name:a,ext:Ge(r.ext,Tb(a)),size:Math.max(0,Da(r.size)),mime:Ge(r.mime)||void 0,lang:Ge(r.lang)||void 0,content:l,rawUrl:U7(n),url:U7(n,!0)}}var w0e=class{constructor(e=(t,r)=>globalThis.fetch(t,r)){oe(this,"fetchImpl",e)}async load(e,t={}){let r=await this.fetchImpl(`/api/file-preview?path=${encodeURIComponent(e)}`,{credentials:"same-origin",signal:t.signal}),n=await gs(r);return!r.ok||typeof n.error=="string"?{ok:!1,failure:bq(r,n,e,"\u52A0\u8F7D\u9884\u89C8\u5931\u8D25")}:{ok:!0,file:f2(n,e)}}async save(e,t){let r=await this.fetchImpl("/api/file-write",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,content:t})}),n=await gs(r);return!r.ok||typeof n.error=="string"?{ok:!1,failure:bq(r,n,e,"\u4FDD\u5B58\u6587\u4EF6\u5931\u8D25")}:{ok:!0,result:{path:Ge(n.path,e),size:Math.max(0,Da(n.size,new TextEncoder().encode(t).byteLength)),mtime:Ge(n.mtime)||void 0}}}},K7=new w0e;var bu=new Map,G7=new Set,x0e=0,X7=()=>{for(let e of G7)e()};function Y7(e){return G7.add(e),()=>{G7.delete(e)}}function Q7(){return[...bu.values()]}function E0e(e){bu.delete(e)&&X7()}function Z7(e,t={}){for(let[a,o]of bu)o.expiresAt!==null&&o.expiresAt<=Date.now()&&bu.delete(a);for(;bu.size>=20;)bu.delete(bu.keys().next().value);let r=`wand-toast-${++x0e}`,n=t.duration??3200;return bu.set(r,{id:r,message:e,options:t,expiresAt:n>0?Date.now()+n:null}),X7(),{id:r,dismiss(){bu.delete(r),X7()}}}var k0e=0,Lc=[],yq={activeDialog:null},J7=new Set;function wq(){yq={activeDialog:Lc[0]??null};for(let e of J7)e()}var gn={dialog(e){let t=++k0e;return new Promise(r=>{Lc=[...Lc,{id:t,options:e,resolve:r}],wq()})},toast(e,t={}){return Z7(e,t)},closeTopmost(){let e=Lc[0];return!e||e.options.dismissable===!1?!1:(xs.completeDialog(e.id,{dismissed:!0}),!0)}},xs={subscribe(e){return J7.add(e),()=>J7.delete(e)},getSnapshot(){return yq},cancelDialogRequest(e){let t=Lc.find(r=>r.options===e);t&&this.completeDialog(t.id,{dismissed:!0})},completeDialog(e,t){let r=Lc.find(n=>n.id===e);r&&(Lc=Lc.filter(n=>n.id!==e),wq(),r.resolve(t))}};var C0e="Failed to fetch";function Es(e,t){return!(e instanceof Error)||!e.message||e.message===C0e?t:e.message}function Np(e,t){return Es(e,t)}function zc(e){return e instanceof DOMException&&e.name==="AbortError"}function qa(e,t){return{message:Np(e,t)}}function xq(e=0){return{open:!1,revision:e,request:null,status:"idle",file:null,failure:null,editing:!1,draft:"",baseline:"",dirty:!1,saving:!1,wrap:!1,fontSize:Wh(),imageZoomed:!1}}function S0e(e){return e==="exit-edit"?{title:"\u653E\u5F03\u672A\u4FDD\u5B58\u7684\u4FEE\u6539\uFF1F",message:"\u5F53\u524D\u6587\u4EF6\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u9000\u51FA\u7F16\u8F91\u540E\u4F1A\u4E22\u5931\u3002"}:e==="replace"?{title:"\u5207\u6362\u9884\u89C8\u6587\u4EF6\uFF1F",message:"\u5F53\u524D\u6587\u4EF6\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u5207\u6362\u540E\u4F1A\u4E22\u5931\u3002"}:{title:"\u653E\u5F03\u672A\u4FDD\u5B58\u7684\u4FEE\u6539\uFF1F",message:"\u5F53\u524D\u6587\u4EF6\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u5173\u95ED\u540E\u4F1A\u4E22\u5931\u3002"}}var F0e={async confirmDiscard(e){let t=S0e(e),r=await gn.dialog({title:t.title,description:t.message,tone:"warning",actions:[{label:"\u7EE7\u7EED\u7F16\u8F91",value:!1,kind:"secondary",autoFocus:!0},{label:"\u653E\u5F03\u4FEE\u6539",value:!0,kind:"danger"}],dismissable:!0});return r.dismissed===!1&&r.action===!0},async copyText(e){await Pp(e)},appendToComposer(){return!1},notify(e,t){gn.toast(e,{tone:t})},onSaved(){}};function D0e(e){let t=new Set,r=xq(),n=e.runtime??F0e,a=0,o=null;function l(v){r={...r,...v,revision:r.revision+1};for(let y of t)y()}function c(){o?.abort(),o=null,a+=1,r=xq(r.revision+1);for(let v of t)v()}async function d(v){if(!r.dirty||!r.request)return!0;try{return await n.confirmDiscard(v,r.request.path)}catch(y){return n.notify(qa(y,"\u65E0\u6CD5\u786E\u8BA4\u662F\u5426\u653E\u5F03\u4FEE\u6539\u3002").message,"error"),!1}}async function p(v){o?.abort();let y=new AbortController;o=y;let w=++a;l({open:!0,request:v,status:"loading",file:null,failure:null,editing:!1,draft:"",baseline:"",dirty:!1,saving:!1,wrap:!1,fontSize:Wh(),imageZoomed:!1});try{let x=await e.repository.load(v.path,{signal:y.signal});if(w!==a||y.signal.aborted||!r.open)return!1;if(o=null,x.ok===!1)return l({status:"error",failure:x.failure}),!1;let k=x.file.kind==="text"?x.file.content??"":"";return l({status:"ready",file:x.file,failure:null,draft:k,baseline:k}),!0}catch(x){return w!==a||y.signal.aborted||zc(x)||!r.open||(o=null,l({status:"error",failure:qa(x,"\u52A0\u8F7D\u9884\u89C8\u5931\u8D25")})),!1}}async function h(v,y){try{return await n.copyText(v),n.notify(y,"success"),!0}catch(w){return n.notify(qa(w,"\u590D\u5236\u5931\u8D25\u3002").message,"error"),!1}}async function g(v){if(!r.open)return!1;switch(v.type){case"close":return r.saving?!1:r.dirty?await d("close")?(c(),!0):!1:(c(),!0);case"navigate":{if(r.editing||r.saving)return!1;let y=q7(r.request,v.direction);return!y||!r.request?!1:p({...r.request,path:y.path})}case"edit.enter":{if(r.status!=="ready"||r.file?.kind!=="text"||r.saving)return!1;let y=r.file.content??"";return l({editing:!0,draft:y,baseline:y,dirty:!1,failure:null}),!0}case"edit.change":return!r.editing||r.saving?!1:(l({draft:v.value,dirty:v.value!==r.baseline,failure:null}),!0);case"edit.revert":return!r.editing||r.saving?!1:(l({draft:r.baseline,dirty:!1,failure:null}),!0);case"edit.exit":return!r.editing||r.saving||!await d("exit-edit")?!1:(l({editing:!1,draft:r.baseline,dirty:!1,failure:null}),!0);case"edit.save":{if(!r.editing||r.saving||r.file?.kind!=="text"||!r.request)return!1;if(r.draft===r.baseline)return n.notify("\u6CA1\u6709\u6539\u52A8","info"),!0;let y=r.request.path,w=r.draft;l({saving:!0,failure:null});try{let x=await e.repository.save(y,w);if(!r.open||r.request?.path!==y)return!1;if(x.ok===!1)return l({saving:!1,failure:x.failure}),n.notify(x.failure.message,"error"),!1;let k=r.file;l({saving:!1,file:k&&{...k,content:w,size:x.result.size},baseline:w,draft:w,dirty:!1,failure:null}),n.notify("\u5DF2\u4FDD\u5B58","success");try{await n.onSaved(y)}catch{}return!0}catch(x){if(!r.open||r.request?.path!==y)return!1;let k=qa(x,"\u4FDD\u5B58\u5931\u8D25\uFF1A\u7F51\u7EDC\u9519\u8BEF");return l({saving:!1,failure:k}),n.notify(k.message,"error"),!1}}case"copy.path":return r.file?h(r.file.path,"\u5DF2\u590D\u5236\u8DEF\u5F84"):!1;case"copy.content":return r.file?.kind==="text"?h(r.file.content??"","\u5DF2\u590D\u5236\u5185\u5BB9"):!1;case"composer.path":{if(!r.file)return!1;let y=n.appendToComposer(r.file.path);return n.notify(y?"\u5DF2\u7C98\u8D34\u5230\u8F93\u5165\u6846":"\u65E0\u6CD5\u7C98\u8D34\u5230\u8F93\u5165\u6846",y?"success":"error"),y}case"composer.cat":{if(!r.file)return!1;let y=n.appendToComposer(`cat -- ${V7(r.file.path)}`);return n.notify(y?"\u547D\u4EE4\u5DF2\u7C98\u8D34\u5230\u8F93\u5165\u6846":"\u65E0\u6CD5\u7C98\u8D34\u5230\u8F93\u5165\u6846",y?"success":"error"),y}case"view.wrap.toggle":return r.file?.kind!=="text"||r.editing?!1:(l({wrap:!r.wrap}),!0);case"view.font.adjust":return r.file?.kind!=="text"||r.editing?!1:(l({fontSize:jb(r.fontSize+v.delta)}),!0);case"view.image.zoom.toggle":return r.file?.kind!=="image"||r.editing?!1:(l({imageZoomed:!r.imageZoomed}),!0)}}return{controller:{async open(v){let y=H7(v);return y?r.open&&r.request?.path===y.path&&!r.dirty?(l({request:y}),!0):r.open&&r.dirty&&!await d("replace")?!1:p(y):!1},execute:g,closeIfOpen(){return r.open?(g({type:"close"}),!0):!1},closeTopmost(){return this.closeIfOpen()},isOpen(){return r.open}},store:{subscribe(v){return t.add(v),()=>t.delete(v)},getSnapshot(){return r}},configureRuntime(v){let y=n;return n=v,()=>{n===v&&(n=y)}}}}var eD=D0e({repository:K7}),ks=eD.controller,Op=eD.store,tD=eD.configureRuntime;var rD=B(_(),1),Hc=B(_(),1);function nD(e,t){return e?Array.from(e.querySelectorAll(t)).find(r=>!r.matches(":disabled, [aria-disabled='true']")&&r.getClientRects().length>0)??null:null}function A0e(e,t){let r=e.ownerDocument,n=r.defaultView?.MutationObserver;if(!n)return()=>{};let a=!0,o=new n(()=>{if(!a)return;let c=nD(e,"[data-wand-autofocus]");if(!c)return;let d=r.activeElement===(t??e);l(),d&&c.focus()});function l(){a&&(a=!1,o.disconnect(),r.removeEventListener("pointerdown",l,!0),r.removeEventListener("keydown",l,!0))}return r.addEventListener("pointerdown",l,!0),r.addEventListener("keydown",l,!0),o.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-wand-autofocus","disabled","aria-disabled","hidden","style","class"]}),l}function $0e(e,t,r,n,a,o){if(!e&&t.reason==="outside-press"&&(!r||a-n<500)){t.cancel();return}if(!e&&!r&&t.reason==="escape-key"){t.cancel();return}o(e)}var Wa=B(Ee(),1),B0e={info:"info",warning:"warning",danger:"warning",success:"check",question:"question"};function qc({open:e,title:t,description:r,children:n,width:a=520,styles:o,zIndex:l,className:c="wand-ui-dialog-content",overlayClassName:d="wand-ui-dialog-overlay",titleClassName:p="wand-ui-dialog-title",descriptionClassName:h="wand-ui-dialog-description",headerClassName:g="wand-ui-dialog-heading",closeLabel:v="\u5173\u95ED",closeContent:y=(0,Wa.jsx)(Fe,{name:"close",size:18}),testId:w,showClose:x=!0,dismissable:k=!0,onOpenChange:F,onEscape:C,dismissalPriority:D="normal",focusTriggerAfterClose:S,onAfterClose:A}){let I=Ra(),j=rD.useId(),$=(0,Hc.useRef)(null),P=(0,Hc.useRef)(0),N=(0,Hc.useRef)(null);Ln(e,()=>{C?C():k&&F(!1)},D),(0,Hc.useEffect)(()=>(e&&(P.current=performance.now()),()=>{N.current?.(),N.current=null}),[e]);let R=()=>{N.current?.();let q=$.current,L=nD(q,"[data-wand-autofocus]"),O=nD(q,"input, textarea, select, button, [tabindex='0']");(L??O)?.focus({preventScroll:!0}),q&&!L&&(N.current=A0e(q,O))},[U,H]=rD.useState(null);return rD.useEffect(()=>{if(!e||U)return;let q=!0;return globalThis.__wandImportBrowserModule("0f5fdbfe56fd9050").then(L=>{q&&H(()=>L.WandDialogModal)}),()=>{q=!1}},[e,U]),U?(0,Wa.jsx)(or,{children:(0,Wa.jsx)(U,{open:e,centered:!0,footer:null,destroyOnHidden:!0,getContainer:I??void 0,"aria-describedby":r?j:void 0,keyboard:!1,closable:!1,mask:{closable:k},width:a,styles:o,zIndex:l,focusable:{focusTriggerAfterClose:S??!A},afterClose:A,classNames:{container:`wand-ui-dialog-content ${c}`,mask:d},onCancel:q=>{let L=q.type==="keydown"?"escape-key":"outside-press";$0e(!1,{reason:L,cancel(){}},k,P.current,performance.now(),F)},afterOpenChange:q=>{q&&R()},modalRender:q=>(0,Wa.jsx)("div",{ref:$,"data-testid":w,"data-wand-dialog-surface":"","data-slot":"dialog-popup",children:q}),title:(0,Wa.jsxs)(Xe,{className:g,align:"flex-start",justify:"space-between",gap:"small",children:[(0,Wa.jsxs)(Xe,{vertical:!0,style:{flex:1,minWidth:0,overflowWrap:"anywhere"},children:[(0,Wa.jsx)(Pt.Text,{className:p,style:{fontSize:"inherit",fontWeight:"inherit"},children:t}),r&&(0,Wa.jsx)(Pt.Paragraph,{id:j,className:h,style:{margin:0,whiteSpace:"pre-wrap",fontWeight:"normal"},children:r})]}),x&&(0,Wa.jsx)(Te,{kind:"ghost",style:{flexShrink:0},"aria-label":v,disabled:!k,onClick:()=>F(!1),children:y})]}),children:n})}):(0,Wa.jsx)(or,{children:null})}function _b({open:e,title:t,description:r,tone:n="info",icon:a,actions:o,input:l,dismissable:c=!0,focusTriggerAfterClose:d,onAction:p,onDismiss:h}){let g=(0,Hc.useRef)(null),v=(0,Hc.useRef)(!1),[y,w]=(0,Hc.useState)(l?.value??"");(0,Hc.useEffect)(()=>{if(!e||!l)return;let C=requestAnimationFrame(()=>{g.current?.focus(),g.current?.select()});return()=>cancelAnimationFrame(C)},[e,!!l]);let x=o.find(C=>C.kind==="primary"||C.kind==="danger")??o.at(-1),k=C=>{C.key!=="Enter"||!x||v.current||C.nativeEvent.isComposing||C.nativeEvent.keyCode===229||(C.preventDefault(),p(x.value,y))},F=a==null||["","i","!","\u2713","?"].includes(String(a))?(0,Wa.jsx)(Fe,{name:B0e[n],size:18}):a;return(0,Wa.jsxs)(qc,{open:e,title:t,description:r,dismissable:c,showClose:!1,focusTriggerAfterClose:d,onOpenChange:C=>{C||h()},children:[(0,Wa.jsx)("div",{"aria-hidden":"true",className:"wand-ui-dialog-icon",children:F}),l&&(0,Wa.jsx)(vp,{ref:g,"data-wand-autofocus":"true","aria-label":l.label??t,autoComplete:"off",spellCheck:!1,placeholder:l.placeholder,value:y,onChange:C=>w(C.currentTarget.value),onCompositionStart:()=>{v.current=!0},onCompositionEnd:()=>{v.current=!1},onKeyDown:k}),(0,Wa.jsx)("div",{className:"wand-ui-dialog-actions",children:o.map((C,D)=>(0,Wa.jsx)(Te,{kind:C.kind,"data-wand-autofocus":C.autoFocus?"true":void 0,onClick:()=>p(C.value,l?y:void 0),children:C.label},`${C.label}:${D}`))})]})}var Rp=B(_(),1),Va=B(Ee(),1);function zn(e,t,r,n){let a=null,o=null;function l(){return a?Promise.resolve(a):(o||(o=e().then(c=>(a=c,c)).catch(c=>{throw o=null,c})),o)}return function(c){let d=Rp.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getSnapshot),p=r(d,c),h=n.dismissable?.(c)!==!1,[g,v]=Rp.useState(()=>a),[y,w]=Rp.useState(""),[x,k]=Rp.useState(0),F=Rp.useRef(!1);if(p&&(F.current=!0),Rp.useEffect(()=>{if(!p||g)return;let D=!0;return l().then(S=>{D&&v(()=>S)},()=>{D&&w("\u8D44\u6E90\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\uFF1B\u670D\u52A1\u66F4\u65B0\u540E\u53EF\u80FD\u9700\u8981\u91CD\u65B0\u52A0\u8F7D\u9875\u9762\u3002")}),()=>{D=!1}},[p,g,x]),Rp.useEffect(()=>{if(!p||g||!n.page||!h)return;let D=S=>{S.key!=="Escape"||S.defaultPrevented||S.isComposing||(S.preventDefault(),n.close())};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[p,g,h]),g&&F.current)return(0,Va.jsx)(g,{...c});if(!p)return null;let C=(0,Va.jsx)(Xe,{vertical:!0,gap:"small","aria-busy":!y,children:y?(0,Va.jsxs)(Va.Fragment,{children:[(0,Va.jsx)(za,{type:"error",showIcon:!0,title:y}),(0,Va.jsxs)(Xe,{gap:"small",children:[(0,Va.jsx)(Te,{onClick:()=>{w(""),k(D=>D+1)},children:"\u91CD\u8BD5"}),(0,Va.jsx)(Te,{onClick:()=>window.location.reload(),children:"\u91CD\u65B0\u52A0\u8F7D\u9875\u9762"})]})]}):(0,Va.jsxs)(Xe,{align:"center",gap:"small",role:"status",children:[(0,Va.jsx)(_i,{}),"\u6B63\u5728\u52A0\u8F7D",n.title,"\u2026"]})});return n.renderPending?n.renderPending(C,c,{failed:!!y}):n.inline?C:n.page?(0,Va.jsxs)(Xe,{vertical:!0,gap:"middle",component:"section","aria-label":n.title,style:{position:"absolute",inset:0,zIndex:8,background:"var(--bg-primary)",padding:"var(--wand-page-inset)",overflow:"auto"},children:[(0,Va.jsxs)(Xe,{align:"center",gap:"small",children:[h?(0,Va.jsx)(Te,{kind:"soft",onClick:n.close,children:"\u8FD4\u56DE"}):null,(0,Va.jsx)("h1",{children:n.title})]}),C]}):(0,Va.jsx)(qc,{open:!0,title:n.title,onOpenChange:D=>{D||n.close()},children:C})}}var I0e={subscribe:()=>()=>{},getSnapshot:()=>null};function Vh(e,t){return zn(()=>e().then(r=>function({enabled:n,...a}){return(0,Va.jsx)(r,{...a})}),I0e,(r,n)=>n.enabled!==!1,{...t,inline:!0,close:()=>{}})}var m2=kb(()=>yt("/api/wand-tasks"));vs(()=>m2.clear());function aD(){m2.preload()}function iD(){m2.clear()}function M0e(e){return e?yt(`/api/wand-tasks?workspaceId=${encodeURIComponent(e)}`):m2.load()}var oD="wand:page-route",sD=new Set(["view","session","workspace","workspaceTask","window","tab","task","run","team","settings","range","sidebar","sidebarQuery","workspaceView","conversation","conversationTask","conversationRun","chatFilter","chatActivity","chatQuery","directoryTab","directoryQuery","boardView","q","directory","sort","filters","scheduleView","scheduleQuery","scheduleFilter","scheduleRange","scheduleDate","teamQuery","teamFilter","teamPage","settingsNested"]),Eq=["sidebarMode","display","zoom","hideCompleted","queue","expandedTask","boardCollapsed","scheduleExpanded"],T0e=[{views:["taskboard","issues"],keys:["boardView","q","sort","filters","directory","task"]},{views:["teams","teamchat"],keys:["team","teamQuery","teamFilter","teamPage","run"]},{views:["schedules","calendar"],keys:["scheduleView","scheduleQuery","scheduleFilter","scheduleRange","scheduleDate","range"]},{views:["chats","contacts"],keys:["conversation","conversationTask","conversationRun","chatFilter","chatActivity","chatQuery","directoryTab","directoryQuery"]}],j0e=new Set([...Eq,"embed","reactUi","nativeInput","reactShell","backToNative","switchServer","passthrough"]);function Hn(){return typeof window>"u"?"":window.location.search}function go(e){return typeof window>"u"?()=>{}:(window.addEventListener("popstate",e),window.addEventListener(oD,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(oD,e)})}var _0e=256,P0e=300,h2=null,Uh=null;function N0e(e,t){let r=new URLSearchParams(e);for(let o of Eq)r.delete(o);let n=t.view;if(n&&n!==r.get("view")){for(let o of T0e)if(!o.views.includes(n))for(let l of o.keys)l in t||r.delete(l)}for(let[o,l]of Object.entries(t))l===null||l===""||l.length>_0e?r.delete(o):r.set(o,l);let a=r.toString();return a?`?${a}`:""}function kq(e,t){let r=new URL(window.location.href);r.search=N0e(r.search,e);let n=`${r.pathname}${r.search}${r.hash}`;n!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&(window.history[t==="push"?"pushState":"replaceState"](window.history.state,"",n),window.dispatchEvent(new Event(oD)))}function lD(){Uh&&(clearTimeout(Uh),Uh=null);let e=h2;h2=null,e&&typeof window<"u"&&kq(e,"replace")}function uD(e){typeof window>"u"||(h2={...h2,...e},Uh&&clearTimeout(Uh),Uh=setTimeout(lD,P0e))}typeof window<"u"&&window.addEventListener("pagehide",lD);function Ua(e,t="push"){typeof window>"u"||(lD(),kq(e,t))}function cD(e,t){let r=new URLSearchParams(e),n=r.get("session");return r.get("view")==="workspace"&&n&&t&&t!==n?"replace":"push"}function Lp(e){let t=e.trim();t&&Ua({view:"workspace",session:t,task:null,workspace:null,workspaceTask:null,window:null,tab:null})}function yu(e=Hn()){return[...new URLSearchParams(e).keys()].some(t=>sD.has(t))}function dD(e){let t=new URL(e),r=new URL(t.pathname,t.origin);for(let[n,a]of t.searchParams)sD.has(n)&&r.searchParams.append(n,a);return r.href}function pD(e){return[...new Set(new URLSearchParams(e).keys())].filter(t=>!sD.has(t)&&!j0e.has(t))}var Uo=B(_(),1);function Pb(){return Uo.useSyncExternalStore(go,Hn,()=>"")}function fD(e,t,r=l=>l,n=String,a="replace",o=0){let l=Uo.useSyncExternalStore(go,()=>new URLSearchParams(Hn()).get(e),()=>null),c=Uo.useRef({fallback:t,parse:r,serialize:n});c.current={fallback:t,parse:r,serialize:n};let d=F=>{if(F===null)return c.current.fallback;try{return c.current.parse(F)}catch{return c.current.fallback}},p=Uo.useMemo(()=>d(l),[e,l]),[h,g]=Uo.useState(null),v=Uo.useRef(null),y=Uo.useRef(null),w=Uo.useCallback(F=>{let C=c.current.serialize(F),D=c.current.serialize(c.current.fallback);Ua({[e]:C===D?null:C},a)},[e,a]),x=Uo.useCallback(()=>{v.current&&(clearTimeout(v.current),v.current=null);let F=y.current;y.current=null,F&&w(F.value),g(null)},[w]);Uo.useEffect(()=>{y.current&&(v.current&&(clearTimeout(v.current),v.current=null),y.current=null,g(null))},[l]),Uo.useEffect(()=>()=>{v.current&&clearTimeout(v.current),y.current=null},[]);let k=Uo.useCallback(F=>{let C=y.current?y.current.value:d(new URLSearchParams(Hn()).get(e)),D=typeof F=="function"?F(C):F;if(!o){w(D);return}y.current={value:D},g({value:D}),v.current&&clearTimeout(v.current),v.current=setTimeout(x,o)},[e,w,x,o]);return[h?h.value:p,k]}var O0e=JSON.stringify;function R0e(e,t){return r=>e.includes(r)?r:t}var Nb=B(_(),1),L0e=B(er(),1),xn=B(Ee(),1);function zp({active:e,from:t,to:r,size:n=18}){let a=ua();return(0,xn.jsx)("span",{className:"conversation-morph-icon",style:{width:n,height:n},"aria-hidden":"true",children:[t,r].map((o,l)=>(0,xn.jsx)("span",{"data-active":l===1===e,style:{opacity:l===1===e?1:0,transform:a?"none":l===1===e?"rotate(0) scale(1)":`rotate(${l?-18:18}deg) scale(.9)`,transition:a?"none":void 0},children:(0,xn.jsx)(Fe,{name:o,size:n})},l))})}function z0e({phase:e,disabled:t,onClick:r}){let n=ua(),a={idle:"\u660E\u786E\u6279\u51C6\u672C\u8F6E\u8BA1\u5212",sending:"\u6279\u51C6\u4E2D",sent:"\u5DF2\u6279\u51C6",result:"\u6279\u51C6\u5DF2\u63A5\u53D7",failed:"\u6279\u51C6\u5931\u8D25",unknown:"\u6279\u51C6\u672A\u786E\u8BA4"};return(0,xn.jsx)(Te,{className:"conversation-approval","aria-label":a[e],disabled:t,onClick:r,style:{minWidth:96,height:44,flexShrink:0},children:(0,xn.jsx)("span",{"data-approval-phase":e,style:{display:"grid"},"aria-live":"polite",children:Object.entries(a).map(([o,l])=>(0,xn.jsx)("span",{"aria-hidden":o!==e,style:{gridArea:"1 / 1",opacity:o===e?1:0,transition:n?"none":"opacity var(--motion-fast) var(--ease-in-out-smooth)"},children:l},o))})})}var mD=["\u53D1\u9001\u6D88\u606F","\u53D1\u9001\u5E76\u5F00\u59CB\u65B0\u5DE5\u4F5C","\u53D1\u9001\u4E2D","\u5DF2\u63A5\u53D7","\u64CD\u4F5C\u5931\u8D25","\u9001\u8FBE\u672A\u786E\u8BA4","\u505C\u6B62\u672C\u8F6E","\u6D3E\u53D1\u4EFB\u52A1","\u786E\u8BA4\u7EE7\u7EED\u6B64\u4EFB\u52A1"];function H0e(e){return mD.includes(e)?mD:[...mD,e]}function q0e({phase:e,stops:t,disabled:r,label:n,onClick:a,showLabel:o=!1,disabledReason:l,descriptionId:c}){return(0,xn.jsxs)(Er,{kind:"primary",className:`conversation-submit conversation-composer-control${o?" conversation-submit-labelled":""}`,"aria-label":n,title:r&&l?l:n,"aria-describedby":c,disabled:r,onClick:a,children:[(0,xn.jsxs)("span",{className:"conversation-submit-slots","data-phase":e,children:[(0,xn.jsx)("span",{"data-slot":"idle",children:(0,xn.jsx)(zp,{active:t,from:"up",to:"stop"})}),(0,xn.jsx)("span",{"data-slot":"sending",children:(0,xn.jsx)(Fe,{name:"refresh"})}),(0,xn.jsx)("span",{"data-slot":"sent",children:(0,xn.jsx)(Fe,{name:"check"})}),(0,xn.jsx)("span",{"data-slot":"failed",children:(0,xn.jsx)(Fe,{name:"warning"})}),(0,xn.jsx)("span",{"data-slot":"unknown",children:(0,xn.jsx)(Fe,{name:"question"})})]}),o?(0,xn.jsx)("span",{className:"conversation-submit-labels","aria-hidden":"true",children:H0e(n).map(d=>(0,xn.jsx)("span",{className:"conversation-submit-label","data-active":d===n||void 0,children:d},d))}):null]})}function hD({open:e,owner:t,anchorRef:r,triggerRef:n,onClose:a,direction:o="down",focusKey:l,children:c}){let d=ua(),p=Nb.useRef(null),h=Nb.useRef(a);h.current=a;let g=mh(),v=Ra();Nb.useLayoutEffect(()=>e?vh(t,g):void 0,[e,t,g]),Ln(e,()=>{h.current(),n.current?.focus({preventScroll:!0})}),Nb.useEffect(()=>{if(!e)return;let w=x=>{r.current?.contains(x.target)||yp(x.target,t)||h.current()};return document.addEventListener("pointerdown",w,!0),()=>{document.removeEventListener("pointerdown",w,!0)}},[e,r,n,t]),Nb.useLayoutEffect(()=>{let w=r.current,x=p.current;if(!e||!w||!x)return;let k=o==="up"?w.closest(".conversation-composer")??w:w,F=()=>{let P=w.closest(".sidebar,.conversation-root")?.getBoundingClientRect(),N=k.getBoundingClientRect(),R=P?.left??0,U=P?.right??window.innerWidth,H=Math.min(o==="up"?N.width:360,U-R-24,window.innerWidth-24),q=o==="up"?N.left:Math.max(R+12,Math.min(N.right-H,U-H-12));x.style.width=`${H}px`,x.style.left=`${Math.max(12,Math.min(q,window.innerWidth-H-12))}px`,x.style.right="auto";let L=o==="up"||window.innerHeight-N.bottom<Math.min(x.scrollHeight,280)&&N.top>window.innerHeight-N.bottom;x.style.top=L?"auto":`${N.bottom+4}px`,x.style.bottom=L?`${window.innerHeight-N.top+4}px`:"auto",x.style.maxHeight=`${Math.max(80,Math.min(window.innerHeight*.66,(L?N.top:window.innerHeight-N.bottom)-16))}px`};F();let C=!1,D=!1,S=0,A=()=>{if(C||D)return D;let P=Array.from(x.querySelectorAll("input,button,[tabindex='0']")).find(N=>!N.matches(":disabled")&&!N.closest("[hidden],[inert]")&&N.getClientRects().length&&getComputedStyle(N).visibility==="visible");return P?.focus({preventScroll:!0}),D=!!P&&document.activeElement===P,D};S=requestAnimationFrame(()=>{if(A()||C)return;let P=x.getAnimations();P.length&&Promise.allSettled(P.map(N=>N.finished)).then(()=>{C||(S=requestAnimationFrame(A))})});let I=()=>{C=!0,cancelAnimationFrame(S)},j=new MutationObserver(()=>{C||D||(cancelAnimationFrame(S),S=requestAnimationFrame(A))});j.observe(x,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["disabled","hidden","inert"]}),document.addEventListener("pointerdown",I,!0),document.addEventListener("keydown",I,!0);let $=new ResizeObserver(F);return $.observe(w),$.observe(x),k!==w&&$.observe(k),window.addEventListener("resize",F),window.addEventListener("scroll",F,!0),()=>{I(),j.disconnect(),document.removeEventListener("pointerdown",I,!0),document.removeEventListener("keydown",I,!0),$.disconnect(),window.removeEventListener("resize",F),window.removeEventListener("scroll",F,!0)}},[e,r,o,l]);let y=(0,xn.jsx)("div",{ref:p,id:t,className:`conversation-panel conversation-panel-${o}`,"data-open":e,"data-wand-popup-owner":t,"aria-hidden":!e,inert:!e,style:{position:"fixed",transition:d?"none":void 0},children:(0,xn.jsx)(Cx,{owner:t,children:c})});return typeof document>"u"?y:(0,L0e.createPortal)(y,v??document.body)}var Kh=B(_()),g2=e=>{if(!e)return;let{closable:t,closeIcon:r}=e;return{closable:t,closeIcon:r}},Sq={},Cq=(e,t)=>{if(!e&&(e===!1||t===!1||t===null))return!1;if(!Yr(e)&&!Yr(t))return null;let r={closeIcon:typeof t!="boolean"&&Yr(t)?t:void 0};return kt(e)&&(r={...r,...e}),r},W0e=(e,t,r)=>e===!1?!1:e?w5(r,t,e):t===!1?!1:t?w5(r,t):r.closable?r:!1,V0e=(e,t,r)=>{let{closeIconRender:n}=t,{closeIcon:a,...o}=e,l=a,c=no(o,!0);return Yr(l)&&(n&&(l=n(l)),l=Kh.default.isValidElement(l)?Kh.default.cloneElement(l,{"aria-label":r,...l.props,...c}):Kh.default.createElement("span",{"aria-label":r,...c},l)),[l,{"aria-label":r,...c}]},Fq=(e,t,r=Sq,n="Close")=>{let a=Cq(e?.closable,e?.closeIcon),o=Cq(t?.closable,t?.closeIcon),l={closeIcon:Kh.default.createElement(Mc,null),...r},c=W0e(a,o,l),d=typeof c!="boolean"?!!c?.disabled:!1;if(c===!1)return[!1,null,d,{}];let[p,h]=V0e(c,l,n);return[!0,p,d,h]},gD=(e,t,r=Sq)=>{let[n]=Jd("global",tu.global);return Kh.default.useMemo(()=>Fq(e,t,{closeIcon:Kh.default.createElement(Mc,null),...r},n.close),[e,t,r,n.close])};var Pi=B(_()),Ob=B(_()),U0e=e=>{let{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:n,componentCls:a,calc:o}=e,l=o(n).sub(r).equal(),c=o(t).sub(r).equal();return{[a]:{...fr(e),display:"inline-block",height:"auto",paddingInline:l,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",backgroundColor:e.defaultBg,border:`${ve(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${a}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${a}-close-icon`]:{marginInlineStart:c,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${a}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive},"&-disabled":{cursor:"not-allowed",[`&:not(${a}-checkable-checked)`]:{color:e.colorTextDisabled,"&:hover":{backgroundColor:"transparent"}},[`&${a}-checkable-checked`]:{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled},"&:hover, &:active":{backgroundColor:e.colorBgContainerDisabled,color:e.colorTextDisabled},[`&:not(${a}-checkable-checked):hover`]:{color:e.colorTextDisabled}},"&-group":{display:"flex",flexWrap:"wrap",gap:e.paddingXS}},"&-hidden":{display:"none"},"> svg":{display:"inline-block",verticalAlign:"middle",marginBlockEnd:"0.2em"},[`> ${e.iconCls} + span, > span + ${e.iconCls}, > svg + span, > span + svg`]:{marginInlineStart:l}},[`&${e.componentCls}-solid`]:{borderColor:"transparent",color:e.colorTextLightSolid,backgroundColor:e.colorBgSolid,[`&${a}-default`]:{color:e.solidTextColor}},[`${a}-filled`]:{borderColor:"transparent",backgroundColor:e.tagBorderlessBg},[`&${a}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",backgroundColor:e.colorBgContainerDisabled,a:{cursor:"not-allowed",pointerEvents:"none",color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}},"a&":{"&:hover, &:active":{color:e.colorTextDisabled}},[`&${a}-outlined`]:{borderColor:e.colorBorderDisabled},[`&${a}-solid, &${a}-filled`]:{color:e.colorTextDisabled,[`${a}-close-icon`]:{color:e.colorTextDisabled}},[`${a}-close-icon`]:{cursor:"not-allowed",color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}}}}},vD=e=>{let{lineWidth:t,fontSizeIcon:r,calc:n}=e,a=e.fontSizeSM;return _t(e,{tagFontSize:a,tagLineHeight:ve(n(e.lineHeightSM).mul(a).equal()),tagIconSize:n(r).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},bD=e=>{let t=lx(new op(e.colorBgSolid),"#fff")?"#000":"#fff";return{defaultBg:new nn(e.colorFillTertiary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText,solidTextColor:t}},yD=Et("Tag",e=>{let t=vD(e);return U0e(t)},bD),K0e=Ob.forwardRef((e,t)=>{let{prefixCls:r,style:n,className:a,checked:o,children:l,icon:c,onChange:d,onClick:p,onKeyDown:h,disabled:g,...v}=e,{getPrefixCls:y,tag:w}=Ob.useContext(wt),x=Ob.useContext(ci),k=g??x,F=j=>{k||(d?.(!o),p?.(j))},C=j=>{h?.(j),!(j.defaultPrevented||k)&&j.key===" "&&(j.preventDefault(),j.repeat||d?.(!o))},D=y("tag",r),[S,A]=yD(D),I=te(D,`${D}-checkable`,{[`${D}-checkable-checked`]:o,[`${D}-checkable-disabled`]:k},w?.className,a,S,A);return Ob.createElement("span",{...v,ref:t,role:"checkbox","aria-checked":o,"aria-disabled":k||void 0,tabIndex:k?-1:0,style:{...w?.style,...n},className:I,onClick:F,onKeyDown:C},c,Ob.createElement("span",null,l))}),Dq=K0e,Gh=B(_()),G0e=Gh.default.forwardRef((e,t)=>{let{id:r,prefixCls:n,rootClassName:a,className:o,style:l,classNames:c,styles:d,disabled:p,options:h,value:g,defaultValue:v,onChange:y,multiple:w,...x}=e,{getPrefixCls:k,direction:F,className:C,style:D,classNames:S,styles:A}=jt("tag"),I=k("tag",n),j=`${I}-checkable-group`,$=Qn(I),[P,N]=yD(I,$),R=lt(D),U=lt(l),[H,q]=Tt([S,c],[A,R,d,U],{props:e}),L=(0,Gh.useMemo)(()=>Array.isArray(h)?h.map(Z=>kt(Z)?Z:{value:Z,label:Z}):[],[h]),[O,W]=yr(v,g),z=(Z,T)=>{let V=null;if(w){let X=O||[];V=Z?[].concat(Xr(X),[T.value]):X.filter(Q=>Q!==T.value)}else V=Z?T.value:null;W(V),y?.(V)},Y=Gh.default.useRef(null);(0,Gh.useImperativeHandle)(t,()=>({nativeElement:Y.current}));let G=no(x,{aria:!0,data:!0});return Gh.default.createElement("div",{...G,className:te(j,C,a,{[`${j}-disabled`]:p,[`${j}-rtl`]:F==="rtl"},P,N,o,H.root),style:q.root,id:r,ref:Y},L.map(Z=>Gh.default.createElement(Dq,{key:Z.value,className:te(`${j}-item`,H.item,Z.className),style:{...q.item,...Z.style},checked:w?(O||[]).includes(Z.value):O===Z.value,onChange:T=>z(T,Z),disabled:p},Z.label)))}),X0e=G0e,Y0e=B(_());function Q0e(e,t){let{color:r,variant:n,bordered:a}=e;return Y0e.useMemo(()=>{let o=r?.endsWith("-inverse"),l;n?l=n:o?l="solid":a===!1?l="filled":l=t||"filled";let c=o?r?.replace("-inverse",""):r;c===void 0&&l==="solid"&&(c="default");let d=wp(c),p=_F(c),h={};if(!d&&!p&&c)if(l==="solid")h.backgroundColor=r;else{let g=new nn(c).toHsl();g.l=.95,h.backgroundColor=new nn(g).toHexString(),h.color=r,l==="outlined"&&(h.borderColor=r)}return[l,c,d,p,h]},[r,n,a,t])}var Z0e=e=>Ec(e,(t,{textColor:r,lightBorderColor:n,lightColor:a,darkColor:o})=>({[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:a,borderColor:n,color:r},[`&${e.componentCls}-solid`]:{backgroundColor:o,borderColor:o,color:e.colorTextLightSolid},[`&${e.componentCls}-filled`]:{backgroundColor:a,color:r}}})),J0e=qm(["Tag","preset"],e=>{let t=vD(e);return Z0e(t)},bD);function ege(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}var v2=(e,t,r)=>{let n=ege(r);return{[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:e[`color${n}Bg`],borderColor:e[`color${n}Border`],color:e[`color${r}`]},[`&${e.componentCls}-solid`]:{backgroundColor:e[`color${r}`],borderColor:e[`color${r}`]},[`&${e.componentCls}-filled`]:{backgroundColor:e[`color${n}Bg`],color:e[`color${r}`]}}}},tge=qm(["Tag","status"],e=>{let t=vD(e);return[v2(t,"success","Success"),v2(t,"processing","Info"),v2(t,"error","Error"),v2(t,"warning","Warning")]},bD),rge=Pi.forwardRef((e,t)=>{let{prefixCls:r,className:n,rootClassName:a,style:o,children:l,icon:c,color:d,variant:p,onClose:h,bordered:g,disabled:v,href:y,target:w,styles:x,classNames:k,...F}=e,{getPrefixCls:C,direction:D,className:S,variant:A,style:I,classNames:j,styles:$}=jt("tag"),[P,N,R,U,H]=Q0e(e,A),q=R||U,L=Pi.useContext(ci),O=v??L,{tag:W}=Pi.useContext(wt),[z,Y]=Pi.useState(!0),G=wr(F,["closeIcon","closable"]),Z={...e,color:N,variant:P,disabled:O},T=lt(I),V=lt(o),[X,Q]=Tt([j,k],[$,T,x,V],{props:Z}),re=Pi.useMemo(()=>{let Ce=Q.root;return O||(Ce={...H,...Ce}),Ce},[Q.root,H,O]),J=C("tag",r),[se,ue]=yD(J),ae=te(J,S,X.root,`${J}-${P}`,{[`${J}-${N}`]:q,[`${J}-hidden`]:!z,[`${J}-rtl`]:D==="rtl",[`${J}-disabled`]:O},n,a,se,ue),he=Ce=>{O||(Ce.stopPropagation(),h?.(Ce),!Ce.defaultPrevented&&(y&&Ce.preventDefault(),Y(!1)))},le=Ce=>{(Ce.key==="Enter"||Ce.key===" ")&&(Ce.preventDefault(),Ce.repeat||Ce.currentTarget.click())},[,fe]=gD(g2(e),g2(W),{closable:!1,closeIconRender:Ce=>{let qe=Pi.createElement("span",{role:"button",tabIndex:O?-1:0,"aria-disabled":O||void 0,className:te(`${J}-close-icon`,X.close),onClick:he,onKeyDown:le,style:Q.close},Ce);return L5(Ce,qe,Ae=>({onClick:Be=>{Ae?.onClick?.(Be),he(Be)},onKeyDown:Be=>{Ae?.onKeyDown?.(Be),Be.defaultPrevented||le(Be)},role:"button",tabIndex:O?-1:0,"aria-disabled":O||void 0,className:te(Ae?.className,`${J}-close-icon`,X.close),style:{...Q.close,...Ae?.style}}))}}),we=xr(F.onClick)||l&&l.type==="a",_e=fn(c,{className:te(Pi.isValidElement(c)?c.props?.className:void 0,X.icon),style:Q.icon}),$e=_e?Pi.createElement(Pi.Fragment,null,_e,ir(l)&&Pi.createElement("span",{className:X.content,style:Q.content},l)):l,De=Pi.createElement(y?"a":"span",{...G,ref:t,className:ae,style:re,href:O?void 0:y,target:w,onClick:O?void 0:G.onClick,...y&&O?{"aria-disabled":!0}:{}},$e,fe,R&&Pi.createElement(J0e,{key:"preset",prefixCls:J}),U&&Pi.createElement(tge,{key:"status",prefixCls:J}));return we?Pi.createElement(eh,{component:"Tag"},De):De}),wD=rge;wD.CheckableTag=Dq;wD.CheckableTagGroup=X0e;var Xh=wD;var qr=B(_(),1),Cs=B(Ee(),1),ED=qr.createContext(null);function Yh({children:e,contextTrigger:t,triggers:r=["click"],open:n,defaultOpen:a=!1,onOpenChange:o,closeOnSelect:l=!0}){let c=Ra(),d=qr.useRef(null),p=qr.useRef(null),h=qr.useRef(null),g=qr.useCallback(V=>{let X=p.current;if(p.current=V,V||!X)return;let Q=h.current;h.current=null;let re=document.activeElement;Q?.isConnected&&(re===document.body||re&&X.contains(re))&&Q.focus({preventScroll:!0})},[]),[v,y]=qr.useState(a),[w,x]=qr.useState(()=>new Map),k=qr.useCallback((V,X,Q)=>(x(re=>new Map(re).set(V,{item:X,marker:Q})),()=>x(re=>{let J=new Map(re);return J.delete(V),J})),[]),F=n??v,C=V=>{V&&(h.current=null),y(V),o?.(V)},[D,S]=qr.useState(null),A=qr.useRef(null),I=qr.useCallback(()=>D?Promise.resolve():(A.current||(A.current=globalThis.__wandImportBrowserModule("a16a3779a5201ce1").then(V=>{S(()=>V.DropdownSurface)})),A.current),[D]);qr.useEffect(()=>{F&&I()},[F,I]);let j=qr.Children.toArray(e).filter(qr.isValidElement),$=j.find(V=>V.type===Hp),P=j.find(V=>V.type===qp);if(Ln(F,()=>{C(!1),d.current?.focus({preventScroll:!0})}),!$&&!t||!P)return null;let{align:N="start",side:R="bottom",sideOffset:U=6,container:H,collisionPadding:q=12,popupOwner:L,className:O,children:W,...z}=P.props,Y={items:[...w.values()].sort((V,X)=>{if(!V.marker||!X.marker)return 0;let Q=V.marker.compareDocumentPosition(X.marker);return Q&Node.DOCUMENT_POSITION_FOLLOWING?-1:Q&Node.DOCUMENT_POSITION_PRECEDING?1:0}).map(V=>V.item),selectable:!1,onClick:()=>{l&&(h.current=d.current,C(!1))}},G=t??qr.cloneElement($,{"aria-haspopup":"menu","aria-expanded":F,"aria-controls":z.id}),Z=(t??$)?.props,T=qr.cloneElement(t??$,{"aria-haspopup":"menu","aria-expanded":F,"aria-controls":z.id,onClick:V=>{Z?.onClick?.(V),r.includes("click")&&C(!0)},onMouseEnter:V=>{Z?.onMouseEnter?.(V),r.includes("hover")&&C(!0)},onContextMenu:V=>{Z?.onContextMenu?.(V),r.includes("contextMenu")&&C(!0)}});return(0,Cs.jsxs)(or,{children:[(0,Cs.jsx)(ED.Provider,{value:k,children:W}),D?(0,Cs.jsx)(D,{trigger:G,triggerRef:d,open:F,onOpenChange:(V,X)=>{X.source==="menu"&&!l||C(V)},triggers:r,getPopupContainer:()=>H??c??document.body,placement:Fc(R,N),destroyOnHidden:!0,autoFocus:!0,align:{offset:Dc(R,U),overflow:{adjustX:!0,adjustY:!0,shiftX:q,shiftY:q}},classNames:{root:ct("wand-ui-dropdown-content",O)},menu:Y,popupRender:V=>(0,Cs.jsx)("div",{...z,ref:g,"data-wand-popup-owner":L??z.id,children:V})}):T]})}function Hp({render:e,className:t,...r}){return e?qr.cloneElement(e,{...r,className:ct("wand-ui-dropdown-trigger",e.props.className,t)}):(0,Cs.jsx)(Te,{...r,type:r.type??"button",className:ct("wand-ui-dropdown-trigger",t)})}function qp(e){return null}function Ba({className:e,icon:t,iconSlot:r="start",hint:n,tone:a,children:o,onSelect:l,onClick:c,...d}){let p=qr.useContext(ED),h=qr.useId(),g=qr.useRef(null),{type:v,...y}=d,w=qr.useRef({onSelect:l,onClick:c});w.current={onSelect:l,onClick:c};let x=qr.useMemo(()=>({...y,key:h,danger:a==="danger",className:ct("wand-ui-dropdown-item",e),icon:t?(0,Cs.jsx)(Fe,{name:t,slot:r,size:15}):void 0,label:(0,Cs.jsxs)(Cs.Fragment,{children:[o,n!=null?(0,Cs.jsx)("span",{className:"wand-ui-dropdown-item-hint",children:n}):null]}),onClick:({domEvent:k})=>{w.current.onClick?.(k),w.current.onSelect?.()}}),[h,d.id,d.disabled,d.title,e,a,t,r,n,o]);return qr.useLayoutEffect(()=>p?.(h,x,g.current),[p,h,x]),(0,Cs.jsx)("span",{hidden:!0,ref:g})}function Qh({className:e}){let t=qr.useContext(ED),r=qr.useId(),n=qr.useRef(null);return qr.useLayoutEffect(()=>t?.(r,{key:r,type:"divider",className:e},n.current),[t,r,e]),(0,Cs.jsx)("span",{hidden:!0,ref:n})}var xD=B(_(),1),b2=B(Ee(),1);function Wp({className:e,size:t="md",variant:r="soft",dismissible:n=!1,open:a,onOpenChange:o,onDismiss:l,closeLabel:c="Dismiss",onClick:d,children:p,...h}){let[g,v]=xD.useState(!0),y=a??g,w=xD.useRef(y);xD.useEffect(()=>{w.current&&!y&&l?.(),w.current=y},[y,l]);let x=h.kind??(r==="destructive"?"danger":r);if(!n)return(0,b2.jsx)(Te,{...h,onClick:d,kind:x,size:t==="sm"?"small":t==="lg"?"large":"medium",className:ct("wand-ui-chip",e),children:p});if(!y)return null;let k=()=>{v(!1),o?.(!1)};return(0,b2.jsx)(or,{children:(0,b2.jsx)(Xh,{className:ct("wand-ui-chip",e),closeIcon:(0,b2.jsx)("span",{"aria-label":c,children:"\xD7"}),closable:!h.disabled,color:x==="primary"?"var(--accent-solid)":x==="danger"?"error":void 0,onClick:F=>{d?.(F),h.disabled||k()},onClose:k,children:p})})}var Aq=B(Ee(),1);function Rb({open:e,size:t=18}){return(0,Aq.jsx)("span",{className:"sidebar-toggle-morph","data-open":e?"true":"false","aria-hidden":"true",children:(0,Aq.jsx)(zp,{active:e,from:"rail",to:"close",size:t})})}var $q=B(_(),1),y2=B(Ee(),1);function kD({label:e="\u590D\u5236\u5F53\u524D\u9875\u9762\u94FE\u63A5",menuItem:t=!1}){let r=Pb(),[n,a]=$q.useState("idle");$q.useEffect(()=>a("idle"),[r]);let o=()=>{a("pending"),Promise.resolve().then(()=>navigator.clipboard.writeText(dD(window.location.href))).then(()=>a("done"),()=>a("failed"))},l=n==="pending"?"\u6B63\u5728\u590D\u5236\u2026":n==="done"?"\u94FE\u63A5\u5DF2\u590D\u5236":n==="failed"?"\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5":e;return t?(0,y2.jsx)(Ba,{icon:"copy","aria-label":e,disabled:n==="pending",onSelect:o,children:l}):(0,y2.jsxs)(Te,{kind:"ghost",size:"small","aria-label":e,title:e,disabled:n==="pending",style:{minWidth:144},onClick:o,children:[(0,y2.jsx)(Fe,{name:"copy",slot:"start"}),(0,y2.jsx)("span",{"aria-live":"polite",children:l})]})}function CD(){let e=null,t=!1;return{open(r){e=r,t=!1},clear(){e=null,t=!1},loaded(r){e===r&&(t=!0)},isOpen(r){return e===r},isLoaded(r){return e===r&&t}}}function w2(e,t){return t.completionRevision===void 0&&t.viewedCompletionRevision===void 0?{}:{completionRevision:Math.max(e?.completionRevision??0,t.completionRevision??0),viewedCompletionRevision:Math.max(e?.viewedCompletionRevision??0,t.viewedCompletionRevision??0)}}function Ni(e){return(e.completionRevision??0)>(e.viewedCompletionRevision??0)&&!e.archived&&!e.ptyBusy&&!e.ptyCommandRunning&&!e.inFlight&&!e.structuredState?.inFlight&&!e.permissionBlocked&&!e.pendingEscalation&&!(typeof e.providerCliExitCode=="number"&&e.providerCliExitCode!==0)&&["idle","running","exited"].includes(e.status??"")}function x2(e,t){if(e.type==="pane")return t(e);let[r,n]=e.children;return{...e,children:[x2(r,t),x2(n,t)]}}function nge(e,t,r){return Mq(e,t,0,r)}function Mq(e,t,r,n){if(e.type==="pane")return e;if(r>=t.length)return{...e,ratio:n};let a=t[r]??0,[o,l]=e.children,c=Mq(a===0?o:l,t,r+1,n);return{...e,children:a===0?[c,l]:[o,c]}}function age(e){let t=Math.max(0,e.tabs.length-1),r=e.tabs.length===0?0:Math.min(Math.max(0,e.active),t);return r===e.active?e:{type:"pane",active:r,tabs:e.tabs}}function Tq(e){if(e.type==="pane")return e;let[t,r]=e.children.map(Tq),n=t.type==="pane"&&t.tabs.length===0,a=r.type==="pane"&&r.tabs.length===0;return n&&a?t:n?r:a?t:{...e,children:[t,r]}}function DD(e,t){let r=x2(e,n=>n.tabs.findIndex(a=>a.id===t)<0?n:{type:"pane",active:n.active,tabs:n.tabs.filter(a=>a.id!==t)});return Tq(x2(r,n=>age(n)))}function ul(e,t){return e.type==="pane"?e.tabs.find(r=>r.id===t):ul(e.children[0],t)??ul(e.children[1],t)}function ige(e){return{id:`tab-${e}`,kind:"session",sessionId:e}}function Zh(e){return{type:"pane",tabs:[e],active:0}}function Ko(e){return e.type==="pane"?e.tabs:[...Ko(e.children[0]),...Ko(e.children[1])]}function vo(e){return Ko(e).filter(t=>t.kind==="session").map(t=>t.sessionId)}function Oi(e,t){if(t){let r=ul(e,t);if(r)return r}return e.type==="pane"?e.tabs[e.active]??e.tabs[0]:Oi(e.children[0])??Oi(e.children[1])}function Up(e){return!e||e.windows.length===0?null:e.windows.find(t=>t.id===e.activeWindowId)??e.windows[0]??null}function Ss(e){let t=Up(e);return t?Oi(t.layout,t.activeTabId):void 0}function Bq(e){return!!(e&&e.type==="windows"&&Array.isArray(e.windows))}function Lb(e,t){let r=e||"window",n=2;for(;t.has(r);)r=`${e||"window"}-${n++}`;return t.add(r),r}function E2(e){return e.kind==="session"?`window-${e.sessionId}`:`window-${e.id}`}function SD(e,t,r){if(e.type==="pane"){let d=e.tabs.filter(g=>r.has(g.id)||g.kind==="session"&&!t.has(g.sessionId)?!1:(r.add(g.id),!0));if(d.length===0)return{node:{type:"pane",tabs:[],active:0},extras:[]};let p=e.tabs[e.active],h=p&&d.some(g=>g.id===p.id)?p:d[0];return{node:Zh(h),extras:d.filter(g=>g.id!==h.id)}}let n=SD(e.children[0],t,r),a=SD(e.children[1],t,r),o=Ko(n.node).length===0,l=Ko(a.node).length===0,c=[...n.extras,...a.extras];return o&&l?{node:n.node,extras:c}:o?{node:a.node,extras:c}:l?{node:n.node,extras:c}:{node:{...e,children:[n.node,a.node]},extras:c}}function wu(e,t,r){let n=new Set(t),a=Bq(e)?e.windows:e?[{id:"window-legacy",layout:e}]:[],o=new Set,l=new Set,c=[];for(let h of a){let g=SD(h.layout,n,o);if(Ko(g.node).length>0){let v=Lb(h.id,l),y=Oi(g.node,h.activeTabId);c.push({id:v,layout:g.node,activeTabId:y?.id})}for(let v of g.extras){let y=Lb(E2(v),l);c.push({id:y,layout:Zh(v),activeTabId:v.id})}}for(let h of t){let g=ige(h);if(o.has(g.id))continue;o.add(g.id);let v=Lb(E2(g),l);c.push({id:v,layout:Zh(g),activeTabId:g.id})}let d=Bq(e)?e.activeWindowId:null,p=(r?c.find(h=>vo(h.layout).includes(r)):void 0)?.id??c.find(h=>h.id===d)?.id??c[0]?.id??null;return{type:"windows",windows:c,activeWindowId:p}}function k2(e,t){return!e.windows.some(r=>r.id===t)||e.activeWindowId===t?e:{...e,activeWindowId:t}}function oge(e,t,r){let n=e.activeWindowId!==t,a=e.windows.map(o=>o.id!==t||!ul(o.layout,r)||o.activeTabId===r?o:(n=!0,{...o,activeTabId:r}));return n?{...e,activeWindowId:t,windows:a}:e}function sge(e,t,r,n){let a=e.windows.map(o=>o.id===t?{...o,layout:r,activeTabId:Oi(r,n??o.activeTabId)?.id}:o);return{...e,windows:a}}function jq(e,t){for(let r of e.windows){let n=Ko(r.layout).find(a=>a.kind==="session"&&a.sessionId===t);if(n)return n}}function FD(e,t,r,n){return e.type==="pane"?e.tabs.some(a=>a.id===t)?{type:"split",dir:n,ratio:.5,children:[e,Zh(r)]}:e:ul(e.children[0],t)?{...e,children:[FD(e.children[0],t,r,n),e.children[1]]}:ul(e.children[1],t)?{...e,children:[e.children[0],FD(e.children[1],t,r,n)]}:e}function AD(e,t,r,n,a){let o=jq(e,t),l=e.windows.find(v=>v.id===r),c=l&&Oi(l.layout,n??l.activeTabId);if(!o||!c||o.id===c.id)return e;let d=e.windows.map(v=>ul(v.layout,o.id)?{...v,layout:DD(v.layout,o.id)}:v).filter(v=>Ko(v.layout).length>0),p=d.findIndex(v=>v.id===r);if(p<0)return e;let h=d[p],g={...h,layout:FD(h.layout,c.id,o,a),activeTabId:o.id};return d=d.map((v,y)=>y===p?g:v),{...e,windows:d,activeWindowId:r}}function lge(e,t){let r=e.windows.findIndex(p=>vo(p.layout).includes(t));if(r<0)return e;let n=e.windows[r],a=jq(e,t);if(!a)return e;if(Ko(n.layout).length<=1)return k2(e,n.id);let o=DD(n.layout,a.id),l=new Set(e.windows.map(p=>p.id)),c={id:Lb(E2(a),l),layout:Zh(a),activeTabId:a.id},d=[...e.windows];return d.splice(r,1,{...n,layout:o,activeTabId:Oi(o)?.id},c),{...e,windows:d,activeWindowId:c.id}}function uge(e,t,r,n){return n.length===0?null:e.activeWindowId!==r?n.some(a=>a.id===e.activeWindowId)?e.activeWindowId:n[0].id:n[Math.max(0,t-1)]?.id??n[0].id}function C2(e,t){let r=e.windows.findIndex(a=>a.id===t);if(r<0)return e;let n=e.windows.filter(a=>a.id!==t);return{...e,windows:n,activeWindowId:uge(e,r,t,n)}}function $D(e,t){let r=e.windows.findIndex(c=>vo(c.layout).includes(t));if(r<0)return e;let n=e.windows[r],a=Ko(n.layout).find(c=>c.kind==="session"&&c.sessionId===t);if(!a)return e;let o=DD(n.layout,a.id);if(Ko(o).length===0)return C2(e,n.id);let l=e.windows.map((c,d)=>d===r?{...n,layout:o,activeTabId:Oi(o,n.activeTabId)?.id}:c);return{...e,windows:l}}function cge(e,t){let r=e.windows.findIndex(h=>h.id===t);if(r<0)return e;let n=e.windows[r],a=Ko(n.layout);if(a.length<=1)return e;let o=new Set(e.windows.filter(h=>h.id!==t).map(h=>h.id)),l=a.map(h=>({id:Lb(E2(h),o),layout:Zh(h),activeTabId:h.id})),c=Oi(n.layout,n.activeTabId)??a[0],d=l[a.findIndex(h=>h.id===c.id)]??l[0],p=[...e.windows];return p.splice(r,1,...l),{...e,windows:p,activeWindowId:d?.id??null}}function dge(e){let t=[],r=[];for(let n of e)n.teamStep&&(n.teamStep.runFinished&&!Ni(n)?r:t).push(n);return{live:t,history:r}}function pge(e){return e.filter(t=>!t.teamStep)}var Iq=26;function fge(e){let t=(e.title||"").replace(/\s+/g," ").trim();return t?Array.from(t).length<=Iq?t:`${Array.from(t).slice(0,Iq-1).join("")}\u2026`:e.kind==="leader"?"\u8D1F\u8D23\u4EBA\u56DE\u5408":e.memberName||"\u56E2\u961F\u4F1A\u8BDD"}function mge(e){return e.teamChat?.chatTitle?.trim()||e.title?.trim()||"\u4EFB\u52A1\u5904\u7406\u7FA4"}function S2(e){switch(e){case"claude":return"Claude";case"codex":return"Codex";case"opencode":return"OpenCode";case"grok":return"Grok";case"qoder":return"Qoder";case"pi":return"Pi";default:return"\u7EC8\u7AEF"}}function xu(e){return e.provider==="claude"||e.provider==="codex"||e.provider==="opencode"||e.provider==="grok"||e.provider==="qoder"||e.provider==="pi"?e.provider:iu(e.command)??void 0}function _q(e){let t=e.trim().toLowerCase();return!t||t==="\u4F1A\u8BDD"||t==="wand \u4F1A\u8BDD"||t==="claude"||t==="codex"||t==="opencode"||t==="grok"||t==="qoder"||t==="pi"||t==="\u7EC8\u7AEF"||/^(claude|codex|opencode|grok|qoder|pi|终端)\s+\d+$/i.test(t)}function Pq(e){let t=(e.title||"").trim().toLowerCase(),r=(e.cwd||"").replace(/\\/g,"/").replace(/\/+$/,"").split("/").filter(Boolean).at(-1)?.toLowerCase()??"";return!!r&&t===r}function Kp(e){return e.map((t,r)=>({session:t,index:r,startedAt:Date.parse(t.startedAt||"")})).sort((t,r)=>{let n=Number.isFinite(t.startedAt),a=Number.isFinite(r.startedAt);return n&&a&&t.startedAt!==r.startedAt?t.startedAt-r.startedAt:n!==a?n?-1:1:t.index-r.index}).map(({session:t})=>t)}function Gp(e,t){let r=(e.title||"").trim();return!_q(r)&&!Pq(e)?r:`${S2(xu(e))} ${t+1}`}function zb(e,t,r){return e.teamStep?fge(e.teamStep):e.teamChat?mge(e):Gp(Hb(e,r),t)}function Hb(e,t){let r=(t||"").trim();return _q(r)||Pq({...e,title:r})?e:{...e,title:r}}var Vp=B(Ee(),1);function Jh({session:e,className:t,size:r}){let n=xu(e);return n?r===void 0?(0,Vp.jsx)(Js,{provider:n,className:t}):(0,Vp.jsx)("span",{className:t?`sidebar-provider-mark ${t}`:"sidebar-provider-mark","data-mark-size":r,title:n,style:{display:"inline-flex",width:r,height:r,fontSize:r,lineHeight:0},children:(0,Vp.jsx)(Js,{provider:n})}):(0,Vp.jsx)(Fe,{name:"terminal",size:r??13,className:t})}function hge({teamChat:e}){let t=Array.from({length:Math.min(Math.max(e.memberCount,1),2)},(r,n)=>db({id:`${e.runId}#${n}`,name:e.teamName}));return(0,Vp.jsx)(Ti.Group,{className:"workspace-session-team-cats",size:18,children:t.map((r,n)=>(0,Vp.jsx)(Ti,{shape:"square",size:18,style:zx(r),icon:(0,Vp.jsx)(Hx,{face:r,size:18})},n))})}var gge=new Set(["claude","codex","opencode","grok","qoder","pi"]);function Nq(e){return e.sessionKind==="structured"||e.runner==="claude-cli-print"}function F2(e){return!e||e.status!=="running"||Nq(e)?!1:e.provider&&gge.has(e.provider)?e.ptyBusy===!0:e.ptyCommandRunning===!0}function e0(e){if(!e||e.archived)return{active:!1,inFlight:!1,ptyRunning:!1,permissionBlocked:!1};let t=!!e.permissionBlocked,r=Nq(e)&&!!e.structuredState?.inFlight,n=F2(e)&&(!e.provider||e.providerCliActive!==!1);return{active:r||n||t,inFlight:r,ptyRunning:n,permissionBlocked:t}}var cl=B(_(),1),Oq="wand.sidebar.displayMode",D2=["full","folded","active"],vge=new Set(["failed","waiting-input","waiting_input","permission-blocked","reconnecting"]);function bge(e){return D2.includes(e)?e:"full"}function yge(e){let t=D2.indexOf(e);return D2[(t+1)%D2.length]}function t0(e){return vge.has(String(e.status??""))}function Wc(e){return e.archived?!1:e.ptyBusy===!0||e.inFlight===!0||e.status==="thinking"||F2(e)}function Xp(e){return!e.archived&&!Wc(e)&&!t0(e)&&(e.executionStatus==="queued"||e.status==="queued")}function Vc(e){return!e.archived&&(t0(e)||Wc(e)||Xp(e)||Ni(e))}function wge(e,t){return e.map(r=>{let n=c=>Vc(c),a=new Set(r.tasks.filter(c=>c.executionStatus==="queued"||c.executionStatus==="running"||c.sessions.some(n)).map(c=>c.id));for(let c of[...a]){let d=r.tasks.find(h=>h.id===c)?.parentWorkspaceTaskId,p=new Set;for(;d&&!p.has(d);)p.add(d),a.add(d),d=r.tasks.find(h=>h.id===d)?.parentWorkspaceTaskId}let o=r.tasks.filter(c=>a.has(c.id)).map(c=>({...c,sessions:c.sessions.filter(n),archivedSessions:[]})),l=r.standaloneSessions.filter(n);return{...r,tasks:o,standaloneSessions:l,archivedSessions:[]}}).filter(r=>r.tasks.length>0||r.standaloneSessions.length>0)}function xge(){let[e,t]=cl.useState(()=>{try{return bge(window.localStorage.getItem(Oq))}catch{return"full"}}),r=cl.useCallback(a=>{t(a);try{window.localStorage.setItem(Oq,a)}catch{return}},[]),n=cl.useCallback(()=>r(yge(e)),[e,r]);return[e,n,r]}var Fs=cl.createContext(null);function Ege(e,t,r){return e===t?r:{}}function BD(e,t,r,n,a,o=!0){return a?!0:e==="full"?t:r??(e==="active"?o:n)}function ID(){let[e,,t]=xge(),[r,n]=fD("sidebarQuery","",void 0,void 0,"replace",250),[a,o]=cl.useState({}),[l,c]=cl.useState({}),d=cl.useCallback(g=>{c(v=>Ege(e,g,v)),t(g)},[e,t]),p=cl.useCallback((g,v)=>{o(y=>({...y,[g]:v}))},[]),h=cl.useCallback((g,v)=>{c(y=>({...y,[g]:v}))},[]);return cl.useMemo(()=>({mode:e,query:r,setMode:d,setQuery:n,normal:a,setNormal:p,overrides:l,setOverride:h}),[e,r,d,a,p,l,h])}var A2={workspaceId:null,workspaceName:"",taskId:null,taskName:"",cwd:"",layout:null,layoutRevision:void 0},qb=A2,$2=new Set,Wr={subscribe(e){return $2.add(e),()=>{$2.delete(e)}},getSnapshot(){return qb},getServerSnapshot(){return A2}};function dl(e){qb={...qb,...e};for(let t of $2)t()}function MD(){if(qb!==A2){qb=A2;for(let e of $2)e()}}var Yp=null,Ka={open:!1,dismissable:!0,initialCwd:"",initialEmployeeId:"",initialKind:"",workspaceId:"",workspaceTaskId:"",taskName:"",newTask:!1,revision:0},B2=new Set,Rq=new Map;function Lq(e,t="",r="",n="",a="",o="",l="",c=!1){Ka={open:e,dismissable:!0,initialCwd:e?t.trim():"",initialEmployeeId:e?r.trim():"",initialKind:e?n:"",workspaceId:e?a.trim():"",workspaceTaskId:e?o.trim():"",taskName:e?l.trim():"",newTask:e&&c,revision:Ka.revision+1};for(let d of B2)d()}function kge(e){if(!(!Ka.open||Ka.dismissable===e)){Ka={...Ka,dismissable:e};for(let t of B2)t()}}var Ia={open(e={}){return!Yp||Ka.open&&!Ka.dismissable?!1:(Yp.onOpen(),Lq(!0,e.initialCwd,e.initialEmployeeId,e.initialKind??"",e.workspaceId,e.workspaceTaskId,e.taskName,e.newTask),!0)},close(){Ka.open&&(Lq(!1),Yp?.onClose())},closeIfOpen(){return!Ka.open||!Ka.dismissable?!1:(this.close(),!0)},closeTopmost(){return Ka.open?(Ka.dismissable&&this.close(),!0):!1},isOpen(){return Ka.open},setDismissable(e){kge(e)},getUnknownCreation(e){return Rq.get(e)},markUnknownCreation(e){Rq.set(e.scope,e)}},pl={subscribe(e){return B2.add(e),()=>B2.delete(e)},getSnapshot(){return Ka},getRuntime(){return Yp}};function jD(e){return Yp=e,()=>{Yp===e&&(Ka.open&&Ia.close(),Yp=null)}}var r0=null,Ri={open:!1,dismissable:!0,initialCwd:"",initialKind:"task",revision:0},I2=new Set;function TD(e){Ri={...Ri,...e,revision:Ri.revision+1};for(let t of I2)t()}function Cge(e){if(!(!Ri.open||Ri.dismissable===e)){Ri={...Ri,dismissable:e};for(let t of I2)t()}}var Qp={open(e,t="task"){return Ia.open({initialCwd:e,newTask:t==="task"}),r0?.onOpen(),TD({open:!0,dismissable:!0,initialCwd:e??"",initialKind:t}),!0},close(){Ia.close(),Ri.open&&(TD({open:!1}),r0?.onClose())},closeIfOpen(){return Ia.closeIfOpen(),!Ri.open||!Ri.dismissable?!1:(this.close(),!0)},isOpen(){return Ri.open||Ia.isOpen()},setDismissable(e){Ia.setDismissable(e),Cge(e)}},Ga={subscribe(e){return I2.add(e),()=>I2.delete(e)},getSnapshot(){return Ri},getRuntime(){return r0},consumeOpen(){Ri.open&&TD({open:!1})}};function _D(e){return r0=e,()=>{r0===e&&(Ri.open&&Qp.close(),r0=null)}}var Zp=B(_(),1),zq=Zp.createContext(void 0),n0=Zp.createContext(!0);function PD(){let e=Zp.useContext(n0),t=Zp.useContext(Fs),[r,n]=Zp.useState(!1);return Zp.useEffect(()=>{n(!1)},[e,t?.mode,t?.query]),[e&&r,n]}function ND(){return Zp.useContext(zq)}var Uc=B(_(),1);function OD({sessionId:e,taskId:t,intoNewTask:r,open:n,onMoved:a}){let[o,l]=Uc.useState([]),[c,d]=Uc.useState(!1),[p,h]=Uc.useState(!1),[g,v]=Uc.useState(""),[y,w]=Uc.useState(0),x=Uc.useRef(!1),k=Uc.useRef(null);Uc.useEffect(()=>{if(!n)return;let C=!1;return d(!0),v(""),an.listTaskGroups().then(({groups:D})=>{C||l(D.flatMap(S=>S.tasks.filter(A=>A.id!==t).map(A=>({id:A.id,label:`${S.workspaceName} / ${A.name}`}))))}).catch(D=>{C||v(Es(D,"\u65E0\u6CD5\u52A0\u8F7D\u4EFB\u52A1\u3002"))}).finally(()=>{C||d(!1)}),()=>{C=!0}},[n,t,y]);let F=async(C,D,S)=>{if(x.current)return;x.current=!0,h(!0),v("");try{await C()}catch(I){v(Es(I,S)),x.current=!1,h(!1);return}a?.();let A=Ga.getRuntime();A?.toast(D,"success");try{await A?.refreshSessions()}catch(I){A?.toast(Es(I,"\u5F52\u5C5E\u5DF2\u66F4\u65B0\uFF0C\u4F46\u5217\u8868\u5237\u65B0\u5931\u8D25\uFF0C\u8BF7\u5237\u65B0\u5217\u8868\u3002"),"danger")}finally{x.current=!1,h(!1)}};return{targets:o,loading:c,busy:p,error:g,move:C=>{let D=o.find(S=>S.id===C);return D?F(()=>an.moveSession(C,e),`\u5DF2\u79FB\u81F3 ${D.label}\uFF0C\u8FD0\u884C\u76EE\u5F55\u4E0D\u53D8`,"\u65E0\u6CD5\u79FB\u52A8\u4F1A\u8BDD\u3002"):Promise.resolve()},summarize:()=>r?F(async()=>{if(k.current?.sessionId!==e||k.current.workspaceId!==r.workspaceId){let C=r.synthetic||r.global?await an.createStandaloneTask({worktree:!1,cwd:r.workspaceCwd}):await an.createTask(r.workspaceId,{worktree:!1});k.current={sessionId:e,workspaceId:r.workspaceId,id:C.id}}await an.moveSession(k.current.id,e),k.current=null},"\u5DF2\u5F52\u7EB3\u4E3A\u65B0\u4EFB\u52A1\uFF0C\u7A0D\u540E\u6309\u4F1A\u8BDD\u5185\u5BB9\u81EA\u52A8\u547D\u540D","\u65E0\u6CD5\u5F52\u7EB3\u4E3A\u65B0\u4EFB\u52A1\u3002"):Promise.resolve(),retry:()=>w(C=>C+1)}}function Sge(e,t){for(let r of e){let n=r.tasks.find(a=>a.sessions.some(o=>o.id===t));if(n)return{group:r,task:n}}return null}function RD(e,t){let r=t.trim();if(!r)return null;for(let n of e){let a=n.tasks.find(o=>o.id===r);if(a)return{group:n,task:a}}return null}function M2(e,t){let r={workspaceId:e.task.workspaceId,workspaceName:e.group.global?"":e.group.workspaceName,taskId:e.task.id,taskName:e.task.name,cwd:e.task.cwd};return t&&(r.preferredSessionId=t),r}async function LD(e,t){let r=Ga.getRuntime(),n=e.trim();if(!r||!n){t(e);return}try{let a=await an.listTaskGroups(),o=Sge(a.groups,n);if(!o){let l=a.groups.find(c=>c.standaloneSessions.some(d=>d.id===n&&!d.teamChat));if(!l){t(e);return}l.synthetic||l.global?r.closeWorkspace():r.openWorkspace({id:l.workspaceId,name:l.workspaceName,cwd:l.workspaceCwd,layout:null,createdAt:l.createdAt??"",lastOpenedAt:null}),r.selectSession(n);return}if(Wr.getSnapshot().taskId===o.task.id){t(e);return}await r.openTask(M2(o,n)),r.selectSession(n)}catch{t(e)}}function Vq(e){return e.ptyBusy||e.ptyCommandRunning||e.inFlight||e.structuredState?.inFlight||e.permissionBlocked||e.pendingEscalation||e.queuedMessages?.length||e.queuedMessageCount||["thinking","initializing","starting","reconnecting","permission-blocked","waiting-input","waiting_input"].includes(e.status??"")?!0:e.status==="running"&&(e.sessionKind==="structured"||e.runner==="claude-cli-print")}var qn=B(_(),1),Fge=B(er(),1),Kc=B(Ee(),1),Dge=500;function P2({row:e,menu:t,open:r,onOpenChange:n,label:a,title:o,description:l,error:c,className:d,disabled:p=!1,rowRef:h}){let g=ND(),v=Ra(),y=qn.useContext(n0),w=p||!y,x=r&&!w,k=qn.useId(),F=qn.useRef(null),C=qn.useRef(null),D=qn.useRef(null),S=qn.useRef(null),A=qn.useRef(!1),I=qn.useRef(null),j=qn.useRef(null),$=qn.useRef(!1),[P,N]=qn.useState([]),R=()=>{I.current!==null&&clearTimeout(I.current),I.current=null,j.current=null},U=T=>{let V=C.current;T.length&&V?.parentElement&&V.parentElement.appendChild(V),N(T),t.onOpenChange?.(T)},H=()=>{let T=S.current;T?.isConnected?T.focus({preventScroll:!0}):D.current?.querySelector("button,a[href]")?.focus({preventScroll:!0})};Ln(x,()=>{n(!1),H()}),Ln(x&&P.length>0,()=>{U([]),F.current?.querySelector(".ant-dropdown-menu-submenu-title")?.focus({preventScroll:!0})}),qn.useEffect(()=>(x||(R(),N([])),w&&r&&n(!1),R),[x,w]),qn.useEffect(()=>(document.addEventListener("scroll",R,!0),()=>{R(),document.removeEventListener("scroll",R,!0)}),[]),qn.useEffect(()=>{if(!x)return;let T=!1,V=()=>{T||F.current?.querySelector('[role="menuitem"]:not([aria-disabled="true"])')?.focus({preventScroll:!0})},X=requestAnimationFrame(()=>{V();let re=F.current?.closest(".ant-dropdown");Promise.allSettled(re?.getAnimations({subtree:!0}).map(J=>J.finished)??[]).then(V)}),Q=()=>{T=!0,cancelAnimationFrame(X)};return document.addEventListener("pointerdown",Q,!0),document.addEventListener("keydown",Q,!0),()=>{Q(),document.removeEventListener("pointerdown",Q,!0),document.removeEventListener("keydown",Q,!0)}},[x]);let q=(T,V,X)=>{S.current=X,A.current=!0,D.current?.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:T,clientY:V,button:2})),A.current=!1},[L,O]=qn.useState(null),W=qn.useRef(null),z=qn.useRef(null),Y=qn.useCallback(()=>L?Promise.resolve():(W.current||(W.current=globalThis.__wandImportBrowserModule("a16a3779a5201ce1").then(T=>{O(()=>T.DropdownSurface)})),W.current),[L]);qn.useEffect(()=>{if(!L)return;let T=z.current;T&&(z.current=null,q(T.x,T.y,T.target))},[L]);let G=qn.cloneElement(e,{ref:T=>{D.current=T,h&&(h.current=T),typeof e.props.ref=="function"?e.props.ref(T):e.props.ref&&(e.props.ref.current=T)},tabIndex:e.props.tabIndex??-1,"aria-haspopup":w?void 0:"menu","aria-expanded":w?void 0:x,"aria-controls":x?k:void 0,"aria-description":w?void 0:"\u53F3\u952E\u3001\u957F\u6309\u6216\u6309 Shift+F10 \u6253\u5F00\u64CD\u4F5C\u83DC\u5355","data-sidebar-menu-open":x||void 0,onContextMenu:T=>{T.preventDefault(),T.stopPropagation(),R(),!A.current&&!$.current&&(S.current=T.target.closest("button,a[href],[tabindex]")??D.current),!w&&$.current&&!A.current&&n(!0),e.props.onContextMenu?.(T),!w&&!L&&(z.current={x:T.clientX,y:T.clientY,target:T.target},Y())},onKeyDown:T=>{if(e.props.onKeyDown?.(T),!(w||T.defaultPrevented||T.nativeEvent.isComposing)&&(T.key==="ContextMenu"||T.shiftKey&&T.key==="F10")){T.preventDefault(),T.stopPropagation(),R();let V=T.target,X=V.getBoundingClientRect();q(X.left+12,X.bottom,V)}},onPointerDown:T=>{if(e.props.onPointerDown?.(T),R(),$.current=!1,w||T.pointerType!=="touch")return;let V={x:T.clientX,y:T.clientY};j.current=V;let X=T.target.closest("button,a[href],[tabindex]")??D.current;I.current=setTimeout(()=>{I.current=null,$.current=!0,q(V.x,V.y,X)},Dge)},onPointerMove:T=>{e.props.onPointerMove?.(T),j.current&&Math.hypot(T.clientX-j.current.x,T.clientY-j.current.y)>8&&R()},onPointerUp:T=>{R(),$.current&&(T.preventDefault(),T.stopPropagation()),e.props.onPointerUp?.(T)},onTouchEnd:T=>{$.current&&(T.preventDefault(),T.stopPropagation()),e.props.onTouchEnd?.(T)},onPointerCancel:T=>{R(),e.props.onPointerCancel?.(T)},onClickCapture:T=>{$.current?($.current=!1,T.preventDefault(),T.stopPropagation()):e.props.onClickCapture?.(T)}}),Z=[...o?[{key:"context",type:"group",label:(0,Kc.jsxs)("div",{className:"sidebar-menu-heading",children:[(0,Kc.jsx)("strong",{title:o,children:o}),l?(0,Kc.jsx)("span",{title:l,children:l}):null]}),children:[]}]:[],...t.items??[],...c?[{key:"action-error",disabled:!0,label:(0,Kc.jsx)("span",{role:"alert",className:"sidebar-menu-error",children:c})}]:[]];return(0,Kc.jsxs)(or,{children:[L?(0,Kc.jsx)(L,{trigger:G,open:x,disabled:w,triggers:["contextMenu"],onOpenChange:(T,V)=>{V.source==="trigger"&&n(T)},getPopupContainer:()=>v??document.body,placement:"bottomLeft",destroyOnHidden:!0,align:{overflow:{adjustX:!0,adjustY:!0,shiftX:12,shiftY:12}},classNames:{root:ct("sidebar-row-menu",d)},styles:{root:{minWidth:"min(224px, calc(100vw - 24px))",maxWidth:"min(288px, calc(100vw - 24px))"},itemContent:{whiteSpace:"normal",overflowWrap:"anywhere"}},menu:{...t,id:k,"aria-label":a,selectable:!1,items:Z,openKeys:P,onOpenChange:U,triggerSubMenuAction:"click",getPopupContainer:()=>C.current??v??document.body,builtinPlacements:{rightTop:{points:["tl","tr"],overflow:{adjustX:!0,adjustY:!0,shiftX:12,shiftY:12}},leftTop:{points:["tr","tl"],overflow:{adjustX:!0,adjustY:!0,shiftX:12,shiftY:12}},...t.builtinPlacements},style:{maxHeight:"calc(100dvh - 24px)",overflowY:"auto",overscrollBehavior:"contain",...t.style}},popupRender:T=>(0,Kc.jsx)("div",{ref:F,"data-wand-popup-owner":g,onKeyDown:V=>{V.key==="Tab"&&!V.nativeEvent.isComposing&&(n(!1),H(),V.stopPropagation())},children:T})}):G,x&&(0,Fge.createPortal)((0,Kc.jsx)("div",{ref:C,className:"sidebar-menu-submenus","data-wand-popup-owner":g}),v??document.body)]})}var zD=B(_(),1),Age=B(Ee(),1);function Ub({title:e,selector:t,children:r}){let n=zD.useRef(null),a=Ra(),[o,l]=zD.useState(!1);return Ln(o,()=>l(!1)),(0,Age.jsx)(Lo,{title:e,open:o,trigger:["hover","focus"],placement:"bottom",align:{overflow:{adjustX:!0,adjustY:!0,shiftX:!0,shiftY:!0}},getPopupContainer:()=>a??document.body,onOpenChange:c=>{let d=n.current?.querySelector(t);l(c&&!!d&&d.scrollWidth>d.clientWidth)},children:zD.cloneElement(r,{ref:n,title:void 0,onPointerDownCapture:c=>{l(!1),r.props.onPointerDownCapture?.(c)},onContextMenuCapture:c=>{l(!1),r.props.onContextMenuCapture?.(c)},onKeyDownCapture:c=>{(c.key==="ContextMenu"||c.key==="F10"&&c.shiftKey)&&l(!1),r.props.onKeyDownCapture?.(c)}})})}var Jp=B(_(),1);async function $ge(e){let t=typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null,r=await gn.dialog({title:`\u5220\u9664\u4F1A\u8BDD\u300C${e}\u300D\uFF1F`,description:"\u5C06\u505C\u6B62\u6B64\u4F1A\u8BDD\u5E76\u5220\u9664\u8BB0\u5F55\uFF0C\u65E0\u6CD5\u64A4\u9500\u3002\u4EFB\u52A1\u548C\u5176\u4ED6\u4F1A\u8BDD\u4FDD\u7559\u3002",focusTriggerAfterClose:t?!1:void 0,actions:[{label:"\u53D6\u6D88",value:!1,autoFocus:!0},{label:"\u5220\u9664\u4F1A\u8BDD",value:!0,kind:"danger"}]});return t&&await new Promise(n=>requestAnimationFrame(()=>{t.isConnected&&!t.closest('[inert], [aria-hidden="true"]')&&(document.activeElement===document.body||document.activeElement?.closest('[role="dialog"]'))&&t.focus({preventScroll:!0}),n()})),r.dismissed!==!0&&!!r.action}var Ds=B(Ee(),1);function qD({row:e,session:t,label:r,disabled:n,intoNewTask:a,onOpen:o,onArchive:l,onDelete:c}){let[d,p]=PD(),[h,g]=Jp.useState(!1),[v,y]=Jp.useState(null),[w,x]=Jp.useState(""),k=Jp.useRef(!1),F=Jp.useRef(null),C=t.archived===!0,D=ws(t),S=C||t.canArchive!==!1&&!Vq(t),A=OD({sessionId:t.id,taskId:t.workspaceTaskId,intoNewTask:a,open:d&&h,onMoved:()=>p(!1)}),I=v!==null||A.busy;Jp.useEffect(()=>{d||g(!1)},[d]);let j=async $=>{if(!(k.current||I||$==="archive"&&!S)){k.current=!0,x("");try{if($==="delete"&&(p(!1),F.current?.querySelector("button,a[href]")?.focus({preventScroll:!0}),!await $ge(r)))return;y($),$==="archive"?await l?.(!C):await c?.(),p(!1)}catch(P){x(Es(P,$==="delete"?"\u65E0\u6CD5\u5220\u9664\u4F1A\u8BDD\u3002":C?"\u65E0\u6CD5\u6062\u590D\u4F1A\u8BDD\u3002":"\u65E0\u6CD5\u5F52\u6863\u4F1A\u8BDD\u3002")),$==="delete"&&F.current?.contains(document.activeElement)&&p(!0)}finally{k.current=!1,y(null)}}};return(0,Ds.jsx)(P2,{row:Jp.cloneElement(e,{"aria-busy":I||void 0,draggable:I?!1:e.props.draggable}),rowRef:F,disabled:n,open:d,onOpenChange:$=>{(!$||!I)&&p($)},label:`\u4F1A\u8BDD ${r} \u7684\u64CD\u4F5C`,title:r,description:D?"\u7CFB\u7EDF\u8C03\u7528 \xB7 \u53EA\u8BFB\u8BB0\u5F55":C?"\u5DF2\u5F52\u6863\u4F1A\u8BDD":void 0,className:"workspace-session-menu",error:w,menu:{multiple:!0,onOpenChange:$=>{g($.includes("move")),$.includes("move")&&x("")},items:[{key:"open",disabled:I,icon:(0,Ds.jsx)(Fe,{name:"chat"}),label:"\u6253\u5F00\u4F1A\u8BDD"},...t.cwd?.trim()?[{key:"copy-cwd",disabled:I,icon:(0,Ds.jsx)(Fe,{name:"copy"}),label:"\u590D\u5236\u5DE5\u4F5C\u76EE\u5F55"}]:[],...!C&&!D?[{key:"move",disabled:I,icon:(0,Ds.jsx)(Fe,{name:"folder"}),label:"\u79FB\u52A8\u5230\u4EFB\u52A1",popupClassName:"workspace-session-move-menu",children:[{key:"move-context",type:"group",label:"\u4FDD\u7559\u8FD0\u884C\u76EE\u5F55",children:[]},...a?[{key:"new-task",disabled:I,icon:(0,Ds.jsx)(Fe,{name:"plus"}),label:A.busy?"\u6B63\u5728\u79FB\u52A8\u2026":"\u5F52\u7EB3\u4E3A\u65B0\u4EFB\u52A1"},{key:"move-divider",type:"divider"}]:[],...A.loading?[{key:"loading",disabled:!0,label:(0,Ds.jsx)("span",{role:"status",children:"\u6B63\u5728\u52A0\u8F7D\u4EFB\u52A1\u2026"})}]:A.targets.length?A.targets.map($=>({key:`target:${$.id}`,disabled:I,icon:(0,Ds.jsx)(Fe,{name:"folder"}),label:$.label,title:$.label})):A.error?[]:[{key:"empty",disabled:!0,label:"\u8BF7\u5148\u521B\u5EFA\u53E6\u4E00\u4E2A\u4EFB\u52A1\u3002"}],...A.error?[{key:"move-error",disabled:!0,label:(0,Ds.jsx)("span",{role:"alert",className:"sidebar-menu-error",children:A.error})},{key:"retry",disabled:I||A.loading,icon:(0,Ds.jsx)(Fe,{name:"refresh"}),label:"\u91CD\u65B0\u52A0\u8F7D\u4EFB\u52A1"}]:[]]}]:[],...l&&S?[{key:"archive",disabled:I,icon:(0,Ds.jsx)(Fe,{name:C?"resume":"archive"}),label:v==="archive"?C?"\u6B63\u5728\u6062\u590D\u2026":"\u6B63\u5728\u5F52\u6863\u2026":C?"\u6062\u590D\u4F1A\u8BDD":"\u5F52\u6863\u4F1A\u8BDD"}]:[],...c?[{key:"danger-divider",type:"divider"},{key:"delete",disabled:I,danger:!0,icon:(0,Ds.jsx)(Fe,{name:"trash"}),label:"\u5220\u9664\u4F1A\u8BDD\u2026"}]:[]],onClick:({key:$,domEvent:P})=>{P.stopPropagation(),!I&&(x(""),$==="open"?(p(!1),o()):$==="copy-cwd"&&t.cwd?.trim()?Pp(t.cwd).then(()=>p(!1)).catch(N=>x(Es(N,"\u65E0\u6CD5\u590D\u5236\u5DE5\u4F5C\u76EE\u5F55\u3002"))):$==="archive"||$==="delete"?j($):$==="new-task"?A.summarize():$==="retry"?A.retry():$.startsWith("target:")&&A.move($.slice(7)))}}})}var Bge=B(Ee(),1);function WD({active:e,onChange:t,label:r="\u53EA\u770B\u6D3B\u52A8\u4F1A\u8BDD"}){return(0,Bge.jsx)(Te,{kind:"outline",size:"small",className:"sidebar-activity-filter","aria-label":r,"aria-pressed":e,title:"\u6392\u961F\u4E2D\u3001\u5728\u8DD1\u3001\u5F85\u5904\u7406\u53CA\u5C1A\u672A\u67E5\u770B\u7684\u521A\u5B8C\u6210\u5185\u5BB9",onClick:()=>t(!e),children:"\u6D3B\u52A8"})}async function VD(e,t){let r=[...new Set(e.filter(a=>a.trim().length>0))];if(!r.length)return;await an.deleteSessions(r);let n=Ga.getRuntime();try{let a=Wr.getSnapshot();if(n&&t&&a.taskId===t.id&&a.layout){let o=r.reduce((l,c)=>$D(l,c),a.layout);await n.saveTaskLayout(o)}}finally{await n?.refreshSessions()}}async function UD(e,t){await an.batchArchiveSessions([e],t),await Ga.getRuntime()?.refreshSessions()}var i0=B(_(),1),Wb=B(Ee(),1);function KD({open:e,size:t=16,className:r=""}){return(0,Wb.jsx)("span",{className:"sidebar-disclosure-chevron","data-open":e,"aria-hidden":"true",children:(0,Wb.jsx)(Fe,{name:"chevronDown",size:t,className:r})})}function Ige(e,t=!1){let r=i0.useContext(Fs),n=`wand.sidebar.${e}`,a=()=>{try{let p=window.localStorage.getItem(n);return p===null?t:p==="true"}catch{return t}},[o,l]=i0.useState(a),c=r?.normal[e]??o,d=p=>{l(p),r?.setNormal(e,p);try{window.localStorage.setItem(n,String(p))}catch{return}};return[c,()=>d(!c),d]}function Mge(e,t=!1,r=!1,n,a=!0){let o=i0.useContext(Fs),[l,,c]=Ige(e,t),[d,p]=i0.useState(()=>{try{return window.localStorage.getItem(`wand.sidebar.${e}`)!==null}catch{return!1}}),h=d||o?.normal[e]!==void 0;return[BD(o?.mode??"full",h?!l:n??!l,o?.overrides[e],r,!!o?.query.trim(),a),g=>{o?.query.trim()||(!o||o.mode==="full"?(p(!0),c(!g)):o.setOverride(e,g))}]}function Vb(e,t){let r=e.closest(".sidebar-peek-body, .sidebar-body");if(!r){t();return}let n=e.getBoundingClientRect().top,a=e.getAttribute("aria-controls"),o=a?r.querySelector(`[id="${CSS.escape(a)}"]`):null;e.getAttribute("aria-expanded")==="true"&&o?.contains(document.activeElement)&&e.focus({preventScroll:!0});let l=r.querySelector(":scope > .sidebar-scroll-compensation");l||(l=document.createElement("div"),l.className="sidebar-scroll-compensation",l.setAttribute("aria-hidden","true"),l.inert=!0,r.append(l));let c=l,d=()=>{if(!e.isConnected){g();return}let v=e.getBoundingClientRect().top-n;if(Math.abs(v)<1)return;let y=r.scrollTop+v,w=Math.max(0,y-(r.scrollHeight-r.clientHeight));w&&(c.style.height=`${c.offsetHeight+w}px`),r.scrollTop=y},p=typeof ResizeObserver>"u"?null:new ResizeObserver(d),h=r.firstElementChild;h&&p?.observe(h);let g=()=>{p?.disconnect(),c.remove(),r.removeEventListener("wheel",g),r.removeEventListener("touchstart",g),r.removeEventListener("pointerdown",g),r.removeEventListener("keydown",g),window.removeEventListener("resize",g)};r.addEventListener("wheel",g,{once:!0,passive:!0}),r.addEventListener("touchstart",g,{once:!0,passive:!0}),r.addEventListener("pointerdown",g,{once:!0}),r.addEventListener("keydown",g,{once:!0}),window.addEventListener("resize",g,{once:!0}),t(),requestAnimationFrame(d)}function GD(e,t,r){if(e.target!==e.currentTarget||e.nativeEvent.isComposing||e.key!=="ArrowRight"&&e.key!=="ArrowLeft")return;e.preventDefault();let n=e.key==="ArrowRight";n!==t&&Vb(e.currentTarget,()=>r(n))}function Kb({id:e,open:t,children:r}){let n=i0.useRef(null);return i0.useLayoutEffect(()=>{let a=n.current;if(!a)return;let o=a.closest(".sidebar"),l=a.closest(".workspaces-panel"),c=o??l,d=[c?.querySelector(`[aria-controls="${CSS.escape(e)}"]`)],p=a.parentElement?.closest(".wand-sidebar-disclosure");for(;p;)d.push(c?.querySelector(`[aria-controls="${CSS.escape(p.id)}"]`)),p=p.parentElement?.closest(".wand-sidebar-disclosure");d.push(...Array.from(a.closest(".sidebar-peek")?.querySelectorAll(".sidebar-peek-header button")??[]),...Array.from(c?.querySelectorAll(".sidebar-list-actions button, .sidebar-header-actions button")??[]));let h=()=>{d.find(g=>g?.isConnected&&!g.matches(":disabled")&&!g.closest('[inert], [aria-hidden="true"]')&&g.getClientRects().length>0&&getComputedStyle(g).visibility!=="hidden")?.focus({preventScroll:!0})};return!t&&a.contains(document.activeElement)&&h(),()=>{a.contains(document.activeElement)&&(h(),queueMicrotask(()=>{document.activeElement!==document.body&&!a.contains(document.activeElement)||h()}))}},[e,t]),(0,Wb.jsx)("div",{ref:n,id:e,className:"wand-sidebar-disclosure","data-open":t,inert:!t,"aria-hidden":!t,children:(0,Wb.jsx)(or,{children:(0,Wb.jsx)(T4,{ghost:!0,destroyOnHidden:!0,activeKey:t?[e]:[],items:[{key:e,label:null,showArrow:!1,collapsible:"disabled",children:r,styles:{header:{display:"none"},body:{padding:0}}}]})})})}var fMe=B(Ee(),1);function XD(e){if(e!=="none")return e==="queued"?"var(--text-secondary)":e==="failed"?"var(--danger, #b24f45)":e==="permission"||e==="waiting-input"||e==="reconnecting"?"var(--warning, #a96a2f)":e==="thinking"?"var(--info, #4a6fa5)":"var(--success, #4f7a58)"}function N2(e){return e.permissionBlocked||e.status==="permission-blocked"?"permission":e.status==="waiting-input"||e.status==="waiting_input"?"waiting-input":e.status==="reconnecting"?"reconnecting":e.status==="failed"?"failed":Wc(e)?e.status==="thinking"?"thinking":"running":Xp(e)?"queued":Ni(e)?"just-completed":"none"}function Gb(e){switch(e.status){case"failed":return{label:"\u5931\u8D25",icon:"warning",tone:"warning"};case"permission-blocked":return{label:"\u7B49\u5F85\u6388\u6743",icon:"shield",tone:"warning"};case"waiting-input":case"waiting_input":return{label:"\u7B49\u5F85\u56DE\u7B54",icon:"question",tone:"warning"};case"reconnecting":return{label:"\u91CD\u8FDE\u4E2D",icon:"refresh",tone:"warning"}}if(Wc(e))return e.status==="thinking"?{label:"\u601D\u8003\u4E2D",icon:"brain",tone:"accent"}:{label:"\u8FD0\u884C\u4E2D",icon:"refresh",tone:"accent",spinning:!0};if(Xp(e))return{label:"\u6392\u961F\u4E2D",icon:"history",tone:"muted"};if(Ni(e))return{label:"\u521A\u5B8C\u6210",icon:"check",tone:"success"};switch(e.status){case"exited":return{label:"\u5DF2\u7ED3\u675F",icon:"stop",tone:"muted"};case"stopped":return{label:"\u5DF2\u505C\u6B62",icon:"stop",tone:"muted"};case"idle":case"running":return{label:"\u7A7A\u95F2",icon:"circle",tone:"muted"};default:return{label:"\u72B6\u6001\u672A\u77E5",icon:"question",tone:"muted"}}}function Tge(e,t){let r=e.filter(t0).length,n=e.filter(Wc).length,a=t?.queuedExecutionCount??e.filter(Xp).length,o=n>0||t?.executionStatus==="running",l=t?.executionStatus==="queued"||e.some(Xp),c=e.filter(d=>!t0(d)&&!Wc(d)&&Ni(d)).length;return{label:r?"\u5F85\u5904\u7406":o?"\u8FD0\u884C\u4E2D":l?"\u6392\u961F\u4E2D":c?"\u521A\u5B8C\u6210":"",tone:r?"warning":o?"accent":l?"muted":c?"success":"muted",description:`\u5F53\u524D\u5339\u914D ${e.length} \u4E2A\u4F1A\u8BDD\uFF0C${r} \u4E2A\u5F85\u5904\u7406\uFF0C${n} \u4E2A\u8FD0\u884C\u4E2D${a?`\uFF0C${a} \u6761\u6392\u961F\u4E2D`:""}\uFF0C${c} \u4E2A\u521A\u5B8C\u6210`}}function Uq(e,t){return t.standaloneSessions.length>0&&t.standaloneSessions.every(r=>e.sessionIds.includes(r.id))}function jge(e,t){let r=new Set(t.standaloneSessions.map(n=>n.id));return{...e,sessionIds:Uq(e,t)?e.sessionIds.filter(n=>!r.has(n)):[...new Set([...e.sessionIds,...r])]}}function Kq(e){return`${e.workspaceName} - \u672A\u5206\u7EC4\u4EFB\u52A1`}function _ge(e){return{id:`ungrouped:${e.workspaceId}`,workspaceId:e.workspaceId,name:Kq(e),cwd:e.workspaceCwd,worktree:null,isolated:!1,layout:null,status:"active",createdAt:e.createdAt??"",lastOpenedAt:null,canArchive:!1,sessions:e.standaloneSessions,archivedSessions:e.archivedSessions}}function Eu(e,...t){let r=e.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);if(r.length===0)return!0;let n=t.filter(Boolean).join(" ").toLocaleLowerCase();return r.every(a=>n.includes(a))}function Pge(e,t,r,n={}){return t.archived||t.status==="done"?[]:e.tasks.some(a=>a.id===t.parentWorkspaceTaskId&&Eu(r,a.name))||Eu(r,e.workspaceName,e.workspaceCwd,t.name,t.cwd)?t.sessions:t.sessions.filter(a=>Eu(r,a.title,n[a.id],a.cwd,a.provider,a.employeeName,a.teamStep?.title,a.teamStep?.memberName,a.teamChat?.chatTitle))}function Nge(e,t,r={}){let n=new Map(e.flatMap(p=>p.tasks.map(h=>[h.id,p.workspaceId]))),a=new Map(e.flatMap(p=>p.tasks.map(h=>[h.id,h]))),o=p=>{let h=p,g=new Set([h.id]);for(;h.parentWorkspaceTaskId&&a.has(h.parentWorkspaceTaskId)&&!g.has(h.parentWorkspaceTaskId);)h=a.get(h.parentWorkspaceTaskId),g.add(h.id);return n.get(h.id)},l=e.map(p=>({...p,tasks:e.flatMap(h=>h.tasks.filter(g=>g.parentWorkspaceTaskId?o(g)===p.workspaceId:h.workspaceId===p.workspaceId))})).map(p=>{let h=p.tasks,g=new Set(h.filter(y=>!y.archived&&y.status!=="done"&&(y.sessions.length>0||y.executionStatus==="queued"||y.executionStatus==="running"||t.trim()&&Eu(t,y.name,y.cwd))).map(y=>y.id)),v=new Map(h.map(y=>[y.id,y]));for(let y of[...g]){let w=v.get(y)?.parentWorkspaceTaskId,x=new Set;for(;w&&!x.has(w);)x.add(w),g.add(w),w=v.get(w)?.parentWorkspaceTaskId}return{...p,workspaceName:p.global?"\u672A\u5F52\u5C5E\u5DE5\u4F5C\u533A":p.workspaceName,tasks:h.filter(y=>g.has(y.id))}}).filter(p=>p.tasks.length>0||p.standaloneSessions.length>0||!!(t.trim()&&p.archivedSessions?.length)).sort((p,h)=>+!!p.global-+!!h.global);if(!t.trim())return l;let c=(...p)=>Eu(t,...p),d=p=>[p.title,p.cwd,p.provider,r[p.id]].filter(Boolean).join(" ");return l.flatMap(p=>{let h=p.workspaceName;if(c(h,p.workspaceCwd))return[p];let g=p.tasks.filter(F=>c(h,F.name,F.cwd,...F.sessions.map(d),...(F.archivedSessions??[]).map(d))),v=new Set(g.map(F=>F.id));for(let F of p.tasks)F.parentWorkspaceTaskId&&g.some(C=>C.id===F.parentWorkspaceTaskId)&&v.add(F.id);for(let F of g){let C=F.parentWorkspaceTaskId,D=new Set;for(;C&&!D.has(C);)D.add(C),v.add(C),C=p.tasks.find(S=>S.id===C)?.parentWorkspaceTaskId}let y=p.tasks.filter(F=>v.has(F.id)),w=Kq(p),x=p.standaloneSessions.filter(F=>c(w,d(F))),k=p.archivedSessions?.filter(F=>c(w,d(F)));return y.length||x.length||k?.length||c(w)?[{...p,tasks:y,standaloneSessions:x,archivedSessions:k}]:[]})}var fl=B(_(),1);function Oge(e,t,r,n,a){let o=t.length;if(!o||!Number.isFinite(e)||e<=0)return{titles:!1,count:0};let l=Number.isFinite(n)?Math.max(0,n):0;if(t.every(d=>Number.isFinite(d)&&d>0)&&t.reduce((d,p)=>d+p,0)+l*(o-1)<=e)return{titles:!0,count:o};if(!Number.isFinite(r)||r<=0)return{titles:!1,count:0};if(r*o+l*(o-1)<=e)return{titles:!1,count:o};let c=0;for(let d=0;d<o;d++){let p=a(o-d);if(!Number.isFinite(p)||p<=0||d*(r+l)+p>e)break;c=d}return{titles:!1,count:c}}var $n=B(Ee(),1),Rge=__wandCssTextPool[11];function Lge({session:e}){let t=N2(e),r=XD(t)??"var(--text-tertiary)";return(0,$n.jsx)("span",{className:"sidebar-session-preview-status",style:{color:r},"aria-hidden":"true",children:t==="just-completed"?(0,$n.jsx)(Fe,{name:"check",size:8}):(0,$n.jsx)(ji,{color:r})})}function YD({sessions:e,expanded:t,selectedSessionId:r,liveTitles:n,label:a,className:o="",disabled:l=!1,expansionRef:c,onActivate:d,onExpand:p}){let h=fl.useRef(null),g=fl.useRef(null),v=fl.useRef(null),y=fl.useRef(null),w=fl.useRef(null),[x,k]=fl.useState({titles:!1,count:0}),[F,C]=fl.useState(!1),[D,S]=fl.useState(null),A=e.map((H,q)=>zb(H,q,n?.[H.id])),I=JSON.stringify(e.map((H,q)=>[H.id,A[q]]));if(fl.useLayoutEffect(()=>{Ca("wand-sidebar-session-preview",Rge)},[]),fl.useLayoutEffect(()=>{let H=h.current,q=g.current;if(!H||!q||!v.current||!y.current||!w.current)return;let L=!0,O=()=>{if(!L)return;let z=getComputedStyle(H),Y=Number.parseFloat(z.columnGap)||0,G=(Number.parseFloat(z.paddingInlineStart)||0)+(Number.parseFloat(z.paddingInlineEnd)||0),Z=H.clientWidth-G,T=v.current.getBoundingClientRect().width,V=T>0&&T*e.length+Y*(e.length-1)<=Z;C(re=>re===V?re:V);let X=V&&q.children.length===e.length?Array.from(q.children).map(re=>re.getBoundingClientRect().width):Array(e.length).fill(0),Q=Oge(Z,X,T,Y,re=>(w.current.textContent=`+${re}`,y.current.getBoundingClientRect().width));k(re=>re.titles===Q.titles&&re.count===Q.count?re:Q)};O();let W=typeof ResizeObserver>"u"?null:new ResizeObserver(O);return W?.observe(H),W?.observe(q),window.addEventListener("resize",O),document.fonts?.ready.then(O),document.fonts?.addEventListener("loadingdone",O),()=>{L=!1,W?.disconnect(),window.removeEventListener("resize",O),document.fonts?.removeEventListener("loadingdone",O)}},[I,F]),!e.length)return null;let j=e.slice(0,x.count),$=e.length-j.length,P=e.slice(j.length).some(H=>H.id===r),N=(H,q,L)=>(0,$n.jsxs)("span",{className:"sidebar-session-tag-content",children:[(0,$n.jsx)(Lge,{session:H}),(0,$n.jsx)(Jh,{session:H,size:14}),L?(0,$n.jsx)("span",{className:"sidebar-session-tag-title",children:A[q]}):null]}),R=()=>{c?.current?.focus({preventScroll:!0})},U=`\u8FD8\u6709 ${$} \u4E2A\u5339\u914D\u4F1A\u8BDD${P?"\uFF0C\u5305\u542B\u5F53\u524D\u4F1A\u8BDD":""}\uFF0C\u5C55\u5F00\u5B8C\u6574\u5217\u8868`;return(0,$n.jsx)(or,{children:(0,$n.jsx)("div",{className:`sidebar-session-preview ${o}`,"data-expanded":t,inert:t||l,"aria-hidden":t||void 0,children:(0,$n.jsx)("div",{className:"sidebar-session-preview-clip",children:(0,$n.jsxs)("div",{ref:h,className:"sidebar-session-preview-row","data-title-mode":x.titles?"full":"icons","data-total-count":e.length,"data-visible-count":j.length,role:"group","aria-label":a,children:[j.map((H,q)=>{let L=Gb(H),O=xu(H),W=O?ou(O,H.engine):"\u7EC8\u7AEF",z=`${A[q]} \xB7 ${W} \xB7 ${L.label}`;return(0,$n.jsx)(Lo,{title:z,open:t||D===H.id?!1:void 0,children:(0,$n.jsx)(Wp,{size:"sm",kind:"ghost",className:"sidebar-session-tag","data-preview-session-id":H.id,"data-titles":x.titles,"aria-label":z,"aria-pressed":H.id===r,disabled:l,onMouseEnter:()=>S(Y=>Y===H.id?null:Y),onFocus:()=>S(Y=>Y===H.id?null:Y),onClick:Y=>{S(H.id),Y.stopPropagation(),d(H)},children:N(H,q,x.titles)})},H.id)}),$>0?(0,$n.jsx)(Lo,{title:U,open:t?!1:void 0,children:(0,$n.jsxs)(Wp,{size:"sm",kind:"ghost",className:"sidebar-session-more","data-hidden-count":$,"data-contains-current":P,"aria-label":U,"aria-expanded":t,"aria-controls":c?.current?.getAttribute("aria-controls")??void 0,disabled:l||!p,onClick:H=>{H.stopPropagation(),R(),p?.()},children:["+",$]})}):null,(0,$n.jsxs)("div",{className:"sidebar-session-preview-measure-clip","aria-hidden":"true",inert:!0,children:[(0,$n.jsx)("div",{ref:g,className:"sidebar-session-preview-measure",children:F?e.map((H,q)=>(0,$n.jsx)(Wp,{size:"sm",kind:"ghost",tabIndex:-1,className:"sidebar-session-tag","data-titles":"true",children:N(H,q,!0)},H.id)):null}),(0,$n.jsx)(Wp,{ref:v,size:"sm",kind:"ghost",tabIndex:-1,className:"sidebar-session-tag",children:N(e[0],0,!1)}),(0,$n.jsx)(Wp,{ref:y,size:"sm",kind:"ghost",tabIndex:-1,className:"sidebar-session-more",children:(0,$n.jsxs)("span",{ref:w,children:["+",e.length]})})]})]})})})})}var zge=B(_(),1),T2=B(Ee(),1),Hge=__wandCssTextPool[12];function O2({id:e,open:t,label:r,toggleRef:n,toggleClassName:a="",disabled:o=!1,hasSessions:l=!0,reserve:c=!1,inlineToggle:d=!1,onOpenChange:p,children:h}){return zge.useLayoutEffect(()=>{Ca("wand-sidebar-session-area",Hge)},[]),!l&&!c?null:(0,T2.jsxs)("div",{className:"sidebar-session-area","data-empty":!l||void 0,"data-inline-toggle":d||void 0,children:[l&&!d?(0,T2.jsx)(Er,{ref:n,className:`sidebar-session-area-toggle ${a}`,disabled:o,"aria-label":`${t?"\u6536\u8D77":"\u5C55\u5F00"}${r}\u7684\u4F1A\u8BDD\u5217\u8868`,"aria-expanded":t,"aria-controls":e,onClick:g=>{g.stopPropagation(),Vb(g.currentTarget,()=>p(!t))},onKeyDown:g=>GD(g,t,p),children:(0,T2.jsx)(KD,{open:t,size:14})}):null,(0,T2.jsx)("div",{className:"sidebar-session-area-content",children:h})]})}var qge=8,Hq=["terminal","blank-terminal"];function _2(e){if(e.employeeId)return{key:`employee:${e.employeeId}`,kind:"employee"};if(e.teamChat)return{key:`team:${e.teamChat.teamId||e.teamChat.runId}`,kind:"team"};if(e.teamStep)return{key:`team-run:${e.teamStep.runId}`,kind:"team"};let t=String(e.provider??"");return e.sessionKind==="pty"&&t&&t!=="shell"?{key:"terminal",kind:"terminal"}:e.sessionKind==="pty"?{key:"blank-terminal",kind:"blank-terminal"}:{key:`cli:${t}`,kind:"cli"}}function Gq(e){return e.startedAt??""}function qq(e){let t=Date.parse(Gq(e));return Number.isFinite(t)?t:0}function o0(e,t){return qq(t.session)-qq(e.session)||e.session.id.localeCompare(t.session.id)}function Wge(e){let t=[],r=new Set,n=(o,l,c)=>{l.archived||r.has(l.id)||(r.add(l.id),t.push({group:o,taskName:c,session:l}))},a=new Map(e.flatMap(o=>o.tasks.map(l=>[l.id,l])));for(let o of e){for(let l of o.tasks)if(!(l.archived||l.status==="done"))for(let c of l.sessions)n(o,c,[a.get(l.parentWorkspaceTaskId??"")?.name,l.name].filter(Boolean).join(" \u2192 "));for(let l of o.standaloneSessions)n(o,l,null)}return t.sort(o0)}function Vge(e,t,r){let n=t[0];if(!n)return"\u4F1A\u8BDD";let a=n.session;switch(e){case"employee":return r.find(o=>o.id===a.employeeId)?.name?.trim()||a.employeeName?.trim()||"\u5458\u5DE5";case"team":{for(let o of t){let l=o.session.teamChat?.teamName?.trim()||o.session.teamStep?.teamName?.trim();if(l)return l}return"AI \u56E2\u961F"}case"terminal":return"PTY \u7EC8\u7AEF";case"blank-terminal":return"\u7A7A\u767D\u7EC8\u7AEF";default:return S2(a.provider)}}function Uge(e,t={}){let r=t.employees??[],n=Math.max(0,t.limit??qge),a=[...e].sort(o0),o=new Map,l=C=>{let{key:D,kind:S}=_2(C.session),A=o.get(D);A?A.entries.push(C):o.set(D,{kind:S,entries:[C]})};for(let C of a)l(C);let c=a.filter(C=>!j2(C)),d=a.filter(j2),p=c.slice(0,n),h=Xq(a,t),g=[...h.filter(C=>!j2(C)).slice(0,n),...h.filter(j2)],v=h.find(C=>C.session.id===t.selectedSessionId);v&&!g.includes(v)&&g.push(v);let y=new Set([...p,...d,...g].map(C=>_2(C.session).key)),w=new Map;for(let C of g){let{key:D}=_2(C.session),S=w.get(D);S?S.push(C):w.set(D,[C])}let x=[...o.entries()].filter(([C])=>y.has(C)).map(([C,D])=>{let S=D.entries,A=(w.get(C)??[]).sort(o0);return{key:C,kind:D.kind,title:Vge(D.kind,S,r),employeeId:D.kind==="employee"?S[0].session.employeeId??null:null,entries:A,latestSession:S[0].session,totalCount:S.length,latestStartedAt:Gq(S[0].session),activeCount:A.filter(I=>Vc(I.session)).length,showsHeader:!0}}),k=x.filter(C=>C.entries.length>0&&!Hq.includes(C.kind)).sort((C,D)=>Date.parse(D.latestStartedAt||"")-Date.parse(C.latestStartedAt||"")||C.key.localeCompare(D.key)),F=Hq.map(C=>x.find(D=>D.kind===C&&D.entries.length>0)).filter(C=>!!C);return[...k,...F]}function j2(e){let t=_2(e.session).kind;return t==="terminal"||t==="blank-terminal"}function Kge(e,t){let r=e.session,n=t.find(a=>a.id===r.employeeId);return[r.title,e.taskName,e.group.workspaceName,n?.name,r.employeeName,r.teamChat?.teamName,r.teamStep?.teamName,r.teamStep?.memberName].filter(Boolean).join(" ").toLowerCase()}function Xq(e,t={}){let r=t.query?.trim().toLowerCase()??"",n=t.employees??[];return e.filter(a=>r&&!Kge(a,n).includes(r)?!1:t.activeOnly?Vc(a.session):!0)}function QD(e,t,r=[]){let n=e.tasks.find(o=>o.id===t.workspaceTaskId)??e.tasks.find(o=>o.sessions.some(l=>l.id===t.id));if(n)return n;let a=r.find(o=>o.workspaceId===e.workspaceId);if(a)return a.tasks.find(o=>o.id===t.workspaceTaskId)??a.tasks.find(o=>o.sessions.some(l=>l.id===t.id))}var a0=null,HD=new Set;function Gge(e){a0&&e&&a0.kind===e.kind&&a0.message===e.message||a0===null&&e===null||(a0=e?{...e}:null,HD.forEach(t=>t()))}function R2(){return a0}function ZD(e){return HD.add(e),()=>HD.delete(e)}var Wq=B(_(),1),Xa=B(Ee(),1);function JD({label:e,count:t,totalCount:r=t,description:n,activity:a,containsCurrent:o=!1,avatarNode:l,action:c,expanded:d=!0,onToggle:p,onSetOpen:h,onActivate:g,toggleRef:v,collapsedPreview:y,children:w}){let x=Wq.useId(),k=Wq.useId(),F=y!==void 0,C=S=>{h?h(S):S!==d&&p?.()},D=(0,Xa.jsx)(Kb,{id:x,open:d,children:(0,Xa.jsx)("div",{className:"im-sidebar-group-inner",style:{paddingInlineStart:4},children:w})});return(0,Xa.jsxs)("div",{className:`im-sidebar-group${d?" is-expanded":""}`,onKeyDown:S=>{if(S.key!=="Escape"||S.defaultPrevented||!d||!h&&!p||!S.currentTarget.contains(S.target))return;S.preventDefault(),S.stopPropagation();let A=S.currentTarget.querySelector(F?".sidebar-session-area-toggle":".wand-sidebar-group-toggle");A?.focus({preventScroll:!0}),A&&Vb(A,()=>C(!1))},children:[(0,Xa.jsxs)(Xe,{align:"center",gap:4,className:"im-sidebar-group-header",children:[(0,Xa.jsx)(Ub,{title:`${e} \xB7 ${n??`${r} \u4E2A\u4F1A\u8BDD`}`,selector:".im-sidebar-group-title",children:(0,Xa.jsxs)(Te,{ref:F?void 0:v,kind:"ghost",type:"button",className:"wand-sidebar-group-toggle",style:{flex:1,minWidth:0,height:"auto",justifyContent:"flex-start",whiteSpace:"normal"},"aria-expanded":g?void 0:d,"aria-controls":g?void 0:x,"aria-describedby":k,"aria-label":g?`\u6253\u5F00${e}\u7684\u5BF9\u8BDD`:`${e} \xB7 \u663E\u793A ${t} \u4E2A\u4F1A\u8BDD\uFF0C\u5171 ${r} \u4E2A\u4F1A\u8BDD${o?" \xB7 \u5305\u542B\u5F53\u524D\u4F1A\u8BDD":""}`,title:`${e} \xB7 ${n??`${t} \u4E2A\u4F1A\u8BDD`}${o?" \xB7 \u5305\u542B\u5F53\u524D\u4F1A\u8BDD":""}`,onClick:S=>g?g():Vb(S.currentTarget,()=>C(!d)),onKeyDown:g?void 0:S=>GD(S,d,C),children:[F?null:(0,Xa.jsx)(KD,{open:d}),(0,Xa.jsx)("span",{className:"im-sidebar-group-avatar","aria-hidden":"true",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:36,height:36,flexShrink:0},children:l}),(0,Xa.jsx)(Pt.Text,{ellipsis:!0,className:"im-sidebar-group-title",style:{flex:1,textAlign:"start"},children:e}),(0,Xa.jsxs)("span",{className:"im-sidebar-group-meta",children:[(0,Xa.jsx)(Pt.Text,{type:"secondary",className:"im-sidebar-group-count",title:`\u663E\u793A ${t} / \u5171 ${r} \u4E2A\u4F1A\u8BDD`,children:t===r?t:`${t}/${r}`}),(0,Xa.jsx)("span",{className:`im-sidebar-group-attention-slot tone-${a?.tone??"muted"}`,title:a?.label,"aria-label":a?.label||void 0,children:a?.label?(0,Xa.jsx)(ji,{status:a.tone==="warning"?"warning":a.tone==="success"?"success":"processing"}):null})]})]})}),c?(0,Xa.jsx)("span",{className:"im-sidebar-group-action",children:c}):null]}),(0,Xa.jsxs)("span",{id:k,className:"sidebar-visually-hidden",hidden:!0,children:[n,o?"\uFF0C\u5305\u542B\u5F53\u524D\u4F1A\u8BDD":""]}),F?(0,Xa.jsxs)(O2,{id:x,open:d,label:e,toggleRef:v,hasSessions:t>0,onOpenChange:C,children:[y,D]}):D]})}var Xge=B(_(),1),ef=B(Ee(),1);function eA({id:e,avatarNode:t,title:r,titleGenerating:n=!1,state:a,glow:o,summary:l,active:c=!1,onClick:d}){let p=o??(a.label==="\u8FD0\u884C\u4E2D"?"running":a.label==="\u601D\u8003\u4E2D"?"thinking":a.label==="\u521A\u5B8C\u6210"?"just-completed":a.tone==="warning"?"permission":a.label==="\u5931\u8D25"?"failed":"none"),h=Xge.useId();return(0,ef.jsx)(Ub,{title:`${r} \xB7 ${l}`,selector:".im-sidebar-item-name",children:(0,ef.jsxs)(Te,{kind:c?"soft":"ghost",type:"button",className:`session-item wand-sidebar-session-row${c?" active":""}`,style:{width:"100%",height:"auto",whiteSpace:"normal",justifyContent:"flex-start",padding:8},"data-session-id":e,"aria-current":c?"page":void 0,"aria-describedby":h,title:`${r} \xB7 ${l}`,onClick:d,children:[(0,ef.jsx)("span",{className:ct("im-sidebar-item-avatar-wrap",p!=="none"&&`wand-logo-glow glow-${p}`),style:{width:28,height:28,display:"inline-flex",flexShrink:0},"data-glow":p,"aria-hidden":"true",children:(0,ef.jsx)(ji,{dot:p!=="none",color:XD(p),children:t})}),(0,ef.jsxs)(Xe,{vertical:!0,className:"im-sidebar-item-body",style:{minWidth:0,textAlign:"start",flex:1},children:[(0,ef.jsx)(Pt.Text,{ellipsis:!0,className:ct("im-sidebar-item-name",n&&"title-generating"),"aria-busy":n||void 0,"aria-label":n?`${r}\uFF0CAI \u6B63\u5728\u751F\u6210\u6807\u9898`:void 0,title:n?"AI \u6B63\u5728\u751F\u6210\u6807\u9898":void 0,children:r}),(0,ef.jsx)(Pt.Text,{ellipsis:!0,type:"secondary",id:h,className:"im-sidebar-item-summary",style:{fontSize:12},children:l})]})]})})}var tf=B(_(),1);function z2(){Ca("wand-sidebar-layout",__wandCssTextPool[13])}var L2=B(Ee(),1);function H2({value:e,children:t,animate:r=!0}){tf.useLayoutEffect(()=>{z2()},[]);let n=tf.useContext(Fs),a=ua(),o=tf.useRef({value:e,children:t,scope:n}),[l,c]=tf.useState(null),[d,p]=tf.useState(!1);return tf.useLayoutEffect(()=>{let h=0;return a||!r?(c(null),p(!1)):o.current.value!==e&&(c(o.current),p(!0),h=requestAnimationFrame(()=>p(!1))),()=>cancelAnimationFrame(h)},[e,a,r]),tf.useLayoutEffect(()=>{o.current={value:e,children:t,scope:n}}),(0,L2.jsxs)("div",{className:"sidebar-projection-swap","data-entering":d,children:[(0,L2.jsx)("div",{className:"sidebar-projection-current",children:t}),l?(0,L2.jsx)("div",{className:"sidebar-projection-old","aria-hidden":"true",inert:!0,onTransitionEnd:h=>{h.target===h.currentTarget&&h.propertyName==="opacity"&&c(null)},children:(0,L2.jsx)(Fs.Provider,{value:l.scope,children:l.children})}):null]})}var rf=null,tA=new Set;function Yq(e){rf=e;for(let t of tA)t()}var Gc={subscribe(e){return tA.add(e),()=>tA.delete(e)},getSnapshot(){return rf},open(e,t,r=null){if(rf?.sessionId===e&&rf.toolId===t){this.close();return}Yq({sessionId:e,toolId:t,trigger:r})},isOpen(){return rf!==null},close(){let e=rf?.trigger;Yq(null),e?.isConnected&&e.focus({preventScroll:!0})},closeIfOpen(){return rf?(this.close(),!0):!1}};var nA="wand-chat-width",Yge="data-chat-width";function Qq(e){return e==="column"?"column":"full"}function Zq(){try{return Qq(window.localStorage.getItem(nA))}catch{return"full"}}function Jq(e){typeof document>"u"||document.documentElement.setAttribute(Yge,e)}var q2=Zq(),rA=new Set;Jq(q2);var Qge={subscribe(e){return rA.add(e),()=>{rA.delete(e)}},getSnapshot(){return q2},getServerSnapshot(){return"full"}};function eW(e){if(e!==q2){q2=e,Jq(e);for(let t of rA)t()}}function Zge(e){let t=Qq(e),r=!0;try{window.localStorage.setItem(nA,t)}catch{r=!1}return eW(t),r}typeof window<"u"&&window.addEventListener("storage",e=>{(e.key===nA||e.key===null)&&eW(Zq())});function Xc(){return typeof document<"u"&&document.documentElement?.dataset.wandPage==="settings"}function Jge(){return Xc()&&document.documentElement.dataset.wandSettingsAuth==="client"}var ml=B(_(),1);function eve(e){return e.pending?e.phase==="updating"?"\u5E95\u5C42\u7EC4\u4EF6\u6B63\u5728\u81EA\u52A8\u66F4\u65B0\u3002\u65E0\u9700\u64CD\u4F5C\u3002":e.phase==="retrying"?"\u5E95\u5C42\u7EC4\u4EF6\u66F4\u65B0\u5C1A\u672A\u5B8C\u6210\uFF0C\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002\u65E0\u9700\u64CD\u4F5C\u3002":"\u5E95\u5C42\u7EC4\u4EF6\u66F4\u65B0\u6B63\u5728\u7B49\u5F85\u6267\u884C\u4E0E\u961F\u5217\u7ED3\u675F\uFF0C\u5C4A\u65F6\u81EA\u52A8\u66F4\u65B0\u3002\u65E0\u9700\u64CD\u4F5C\u3002":""}var ku=B(Ee(),1);function aA({compact:e=!1,visible:t=!0}){let[r,n]=ml.useState({pending:!1,phase:"idle"}),[a,o]=ml.useState(!1),[l,c]=ml.useState(!1),[d,p]=ml.useState(""),h=ml.useRef(0),g=ml.useRef(!0),v=ml.useRef(!1),y=ml.useRef(null);Ln(a,()=>{o(!1),y.current?.focus()}),ml.useEffect(()=>{t||o(!1)},[t]),ml.useEffect(()=>{let C=!1;g.current=!0;let D,S=null,A=async()=>{if(C||S||document.hidden)return;D&&clearTimeout(D);let j=new AbortController;S=j;let $=h.current,P=setTimeout(()=>j.abort(),1e4);try{let N=await yt("/api/daemon-maintenance",{signal:j.signal,cache:"no-store"});!C&&$===h.current&&!v.current&&typeof N.pending=="boolean"&&["idle","waiting","updating","retrying"].includes(N.phase)&&n(N)}catch{}finally{clearTimeout(P),S=null,C||(D=setTimeout(()=>{A()},15e3))}},I=()=>{document.hidden||A()};return document.addEventListener("visibilitychange",I),A(),()=>{C=!0,g.current=!1,D&&clearTimeout(D),S?.abort(),document.removeEventListener("visibilitychange",I)}},[]);let w=async()=>{if(!v.current){v.current=!0,o(!1);try{let C=await gn.dialog({title:"\u5F3A\u5236\u66F4\u65B0\u5E95\u5C42\u7EC4\u4EF6\uFF1F",description:"\u5C06\u4E2D\u65AD\u5F53\u524D\u6240\u6709\u6B63\u5728\u6267\u884C\u7684\u7EC8\u7AEF\u548C\u6A21\u578B\u4EFB\u52A1\uFF0C\u5E76\u66F4\u65B0\u5E95\u5C42\u7EC4\u4EF6\u3002\u4F1A\u8BDD\u5386\u53F2\u4E0E\u6392\u961F\u6D88\u606F\u4F1A\u4FDD\u7559\uFF0C\u6392\u961F\u6D88\u606F\u53EF\u80FD\u5728\u66F4\u65B0\u540E\u7EE7\u7EED\u6267\u884C\u3002",actions:[{label:"\u53D6\u6D88",value:!1,autoFocus:!0},{label:"\u4E2D\u65AD\u5E76\u66F4\u65B0",value:!0,kind:"danger"}]});if(C.dismissed!==!1||!C.action||!g.current)return;h.current++,c(!0),p("");let D=await yt("/api/daemon-maintenance/force-update",{...mn({confirmInterrupt:!0}),signal:AbortSignal.timeout(6e4)});g.current&&n(D)}catch(C){g.current&&(p(C instanceof Error?C.message:"\u66F4\u65B0\u672A\u5B8C\u6210\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"),o(!0))}finally{v.current=!1,g.current&&c(!1)}}};if(!r.pending)return null;let x=l||r.phase==="updating",k=x?"\u7EC4\u4EF6\u66F4\u65B0\u4E2D":r.phase==="retrying"?"\u7EC4\u4EF6\u66F4\u65B0\u5F85\u91CD\u8BD5":"\u7EC4\u4EF6\u5F85\u66F4\u65B0",F=(0,ku.jsx)(Te,{kind:"ghost",size:"small",loading:l,disabled:x||r.canForceUpdate===!1,"data-daemon-update-action":!0,title:r.canForceUpdate===!1?"\u9700\u8981\u7BA1\u7406\u5458\u6743\u9650":void 0,onClick:()=>{w()},children:"\u5F3A\u5236\u66F4\u65B0"});return(0,ku.jsxs)(Xe,{className:"daemon-update-notice",align:"center",gap:4,children:[(0,ku.jsx)(Eh,{open:a,onOpenChange:o,trigger:"click",placement:"bottomLeft",content:(0,ku.jsxs)(Xe,{vertical:!0,gap:"small",style:{maxWidth:"min(280px, calc(100vw - 48px))"},children:[(0,ku.jsx)(Pt.Text,{children:l?"\u5E95\u5C42\u7EC4\u4EF6\u6B63\u5728\u66F4\u65B0\u3002\u65E0\u9700\u64CD\u4F5C\u3002":eve(r)}),d&&(0,ku.jsx)(Pt.Text,{type:"danger",role:"alert",children:d}),e&&F]}),children:(0,ku.jsxs)(Te,{ref:y,kind:"ghost",size:"small","data-daemon-update-status":!0,"aria-label":k,"aria-expanded":a,title:k,children:[(0,ku.jsx)(Fe,{name:"info",size:12}),(0,ku.jsx)("span",{hidden:e,role:"status","aria-live":"polite",children:k})]})}),!e&&F]})}var W2=new Map;function tW(e,t){if(t())return Promise.resolve();let r=W2.get(e);if(r)return r;let n=document.querySelector(`meta[name="wand-${e}-script"]`)?.content;if(!n)return Promise.reject(new Error("\u7EC4\u4EF6\u5730\u5740\u4E0D\u53EF\u7528\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u540E\u91CD\u8BD5\u3002"));let a=new Promise((o,l)=>{let c=document.createElement("script");c.src=n,c.async=!0;let d=!1,p=g=>{d||(d=!0,clearTimeout(h),c.onload=null,c.onerror=null,g?(c.remove(),l(g)):o())},h=setTimeout(()=>p(new Error("\u7EC4\u4EF6\u52A0\u8F7D\u8D85\u65F6\uFF0C\u8BF7\u91CD\u8BD5\u3002")),2e4);c.onload=()=>p(t()?void 0:new Error("\u7EC4\u4EF6\u52A0\u8F7D\u672A\u5B8C\u6210\uFF0C\u8BF7\u91CD\u8BD5\u3002")),c.onerror=()=>p(new Error("\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002")),document.head.appendChild(c)}).finally(()=>{W2.get(e)===a&&W2.delete(e)});return W2.set(e,a),a}async function tve(){let e=globalThis;return await tW("qrcode",()=>typeof e.QRCodeLib?.toCanvas=="function"),e.QRCodeLib}async function Yc(){await tW("xterm",()=>{let e=globalThis.XTermLib;return typeof e?.Terminal=="function"&&typeof e.FitAddon=="function"})}var s0=B(_(),1),At=B(Ee(),1),l0=null,Xb=null,rve=ep.aiTeamsChunkSrc;function rW(){if(l0)return Promise.resolve(l0);if(Xb)return Xb;let e=globalThis;return e.__wandAiTeamsChunk?(l0=e.__wandAiTeamsChunk,Promise.resolve(l0)):(Xb=Promise.all([globalThis.__wandImportBrowserModule("7f75952f913a9d96"),globalThis.__wandImportBrowserModule("b216e4997a446eba")]).then(([t,r])=>(t.installSharedLibraryBridge(),r.installAiTeamsHostBridge(),new Promise((n,a)=>{let o=document.createElement("script");o.src=rve,o.async=!0,o.onload=()=>{let l=e.__wandAiTeamsChunk;l?n(l):a(new Error("AI \u56E2\u961F\u811A\u672C\u6CA1\u6709\u6CE8\u518C\u7EC4\u4EF6"))},o.onerror=()=>{o.remove(),a(new Error("AI \u56E2\u961F\u811A\u672C\u4E0B\u8F7D\u5931\u8D25"))},document.head.appendChild(o)}))).then(t=>(l0=t,t),t=>{throw Xb=null,t}),Xb)}function u0(e=!0){let[t,r]=s0.useState(l0),[n,a]=s0.useState(""),[o,l]=s0.useState(0);s0.useEffect(()=>{if(t||!e)return;let d=!0;return rW().then(p=>{d&&r(p)},p=>{d&&a(Np(p,"AI \u56E2\u961F\u52A0\u8F7D\u5931\u8D25"))}),()=>{d=!1}},[t,o,e]);let c=s0.useCallback(()=>{a(""),l(d=>d+1)},[]);return{chunk:t,error:n,retry:c}}function nve({admin:e}){let[t,r]=s0.useState(!1),{chunk:n,error:a,retry:o}=u0(t);return(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)(Te,{kind:"secondary",onClick:()=>r(!0),children:`\u914D\u7F6E\u300C${W5}\u300D\u8C03\u7528\u94FE`}),n?(0,At.jsx)(n.DecisionChainEditor,{admin:e,open:t,onOpenChange:r,providerOptions:Ym.filter(l=>l.engine!=="sdk").map(l=>({value:l.provider,label:l.label}))}):(0,At.jsx)(qc,{open:t,onOpenChange:r,title:`${W5} \xB7 \u8C03\u7528\u94FE`,children:a?(0,At.jsx)(za,{type:"error",showIcon:!0,title:(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)("span",{children:"\u8C03\u7528\u94FE\u7F16\u8F91\u5668\u52A0\u8F7D\u5931\u8D25\u3002"}),(0,At.jsx)(Te,{kind:"soft",onClick:o,children:"\u91CD\u8BD5"})]})}):(0,At.jsxs)("div",{role:"status","aria-busy":"true",children:[(0,At.jsx)(_i,{}),"\u6B63\u5728\u52A0\u8F7D\u8C03\u7528\u94FE\u7F16\u8F91\u5668\u2026"]})})]})}function iA(e){let{chunk:t,error:r,retry:n}=u0();return t?(0,At.jsx)(t.AiTeamsPage,{...e}):(0,At.jsx)(Xe,{vertical:!0,gap:12,align:"center",justify:"center",component:"section",style:{height:"100%"},className:"task-board-native-page","aria-label":"AI \u56E2\u961F","aria-busy":!r,children:r?(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)(za,{type:"error",showIcon:!0,title:r}),(0,At.jsx)(Te,{kind:"soft",size:"small",onClick:n,children:"\u91CD\u8BD5"})]}):(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)(_i,{}),(0,At.jsx)("span",{role:"status",children:"\u6B63\u5728\u52A0\u8F7D AI \u56E2\u961F\u2026"})]})})}function ave(e){let{chunk:t,error:r,retry:n}=u0();return t?(0,At.jsx)(t.EmployeeListPage,{...e}):(0,At.jsxs)("div",{role:"status",children:[r||"\u6B63\u5728\u8BFB\u53D6\u5458\u5DE5\u8D44\u6599\u2026",r?(0,At.jsx)(Te,{onClick:n,children:"\u91CD\u8BD5"}):(0,At.jsx)(_i,{size:"small"})]})}function ive(e){let{chunk:t}=u0();return t?(0,At.jsx)(t.TaskTeamRunPanel,{...e}):null}async function ove(e,t){return(await rW()).chatAttachmentPrompt(e,t)}function sve(e){let{chunk:t,error:r,retry:n}=u0(e.active!==!1);if(t)return(0,At.jsx)(t.ConversationMessages,{...e});let a=e.active===!1;return(0,At.jsx)("div",{className:"conversation-messages-loading",role:a?void 0:"status","aria-hidden":a||void 0,style:{flex:"1 1 auto",minHeight:"100%",display:"flex",alignItems:"center"},children:a?null:(0,At.jsxs)(At.Fragment,{children:[r||"\u6B63\u5728\u8BFB\u53D6\u6D88\u606F\u7EC4\u4EF6\u2026",r?(0,At.jsx)(Te,{onClick:n,children:"\u91CD\u8BD5"}):null]})})}function oA(e){let{chunk:t,error:r,retry:n}=u0();return t?(0,At.jsx)(t.TeamChatPage,{...e}):(0,At.jsx)(Xe,{vertical:!0,gap:12,align:"center",justify:"center",component:"section",style:{height:"100%"},className:"task-board-native-page","aria-label":"\u7FA4\u804A","aria-busy":!r,children:r?(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)(za,{type:"error",showIcon:!0,title:r}),(0,At.jsx)(Te,{kind:"soft",size:"small",onClick:n,children:"\u91CD\u8BD5"})]}):(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)(_i,{}),(0,At.jsx)("span",{role:"status",children:"\u6B63\u5728\u52A0\u8F7D\u7FA4\u804A\u2026"})]})})}var lve=500;function aW(e,t,r={}){if(!t)return[];let n=r.caseSensitive===!0,a=n?e:e.toLowerCase();if(a.length!==e.length)return uve(e,t);let o=n?t:t.toLowerCase(),l=[],c=1,d=0,p=a.indexOf(o);for(;p!==-1;)c+=iW(e,d,p),d=p,l.push({start:p,end:p+o.length,line:c}),p=a.indexOf(o,p+o.length);return l}function uve(e,t){let r=[],n=1,a=0,o=e.indexOf(t);for(;o!==-1;)n+=iW(e,a,o),a=o,r.push({start:o,end:o+t.length,line:n}),o=e.indexOf(t,o+t.length);return r}function iW(e,t,r){let n=0;for(let a=t;a<r;a+=1)e.charCodeAt(a)===10&&(n+=1);return n}function cve(e,t,r){return t<=0?0:(((e%t+t)%t+r)%t+t)%t}function nW(e,t,r){return{message:Ge(t.error,`${r} (HTTP ${e.status})`),status:e.status,size:Da(t.size,-1)>=0?Da(t.size):void 0,maxSize:Da(t.maxSize,-1)>=0?Da(t.maxSize):void 0}}function dve(e,t,r){return{message:Ge(e.error,r),path:Ge(e.path,t)||t,size:Da(e.size,-1)>=0?Da(e.size):void 0,mtime:Ge(e.mtime)||void 0}}var pve=class{constructor(e=(t,r)=>globalThis.fetch(t,r)){oe(this,"fetchImpl",e)}async load(e,t={}){let r=await this.fetchImpl(`/api/file-preview?path=${encodeURIComponent(e)}`,{credentials:"same-origin",signal:t.signal}),n=await gs(r);if(!r.ok||typeof n.error=="string")return{ok:!1,failure:nW(r,n,"\u6253\u5F00\u6587\u4EF6\u5931\u8D25")};let a=f2(n,e);if(a.kind!=="text")return{ok:!1,failure:{message:"\u4EC5\u652F\u6301\u7F16\u8F91\u6587\u672C\u6587\u4EF6\u3002",status:415,size:a.size}};let o=a.content??"";return{ok:!0,file:{path:a.path,name:a.name,ext:a.ext||Tb(a.name),lang:a.lang,size:a.size??0,mime:a.mime,mtime:Ge(n.mtime)||void 0,baseline:o,draft:o,dirty:!1}}}async save(e,t,r={}){let n={path:e,content:t};r.overwrite||(r.expectedMtime&&(n.expectedMtime=r.expectedMtime),typeof r.expectedSize=="number"&&Number.isFinite(r.expectedSize)&&(n.expectedSize=r.expectedSize));let a=await this.fetchImpl("/api/file-write",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}),o=await gs(a);return a.status===409?{ok:!1,conflict:dve(o,e,"\u6587\u4EF6\u5DF2\u88AB\u5916\u90E8\u4FEE\u6539\u3002")}:!a.ok||typeof o.error=="string"?{ok:!1,failure:nW(a,o,"\u4FDD\u5B58\u6587\u4EF6\u5931\u8D25")}:{ok:!0,result:{path:Ge(o.path,e),size:Math.max(0,Da(o.size,new TextEncoder().encode(t).byteLength)),mtime:Ge(o.mtime)||void 0}}}},fve=new pve;function sA(e=0){return{open:!1,revision:e,activePath:null,tabs:[],file:null,status:"idle",failure:null,saving:!1,fontSize:Wh(),wrap:!1,preview:!1,findOpen:!1,findQuery:"",findCaseSensitive:!1,findIndex:0}}function mve(e,t){return e==="switch"?{title:"\u5207\u6362\u6587\u4EF6\uFF1F",message:`${t}\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u5207\u6362\u540E\u4F1A\u4E22\u5931\u3002`}:e==="replace"?{title:"\u5173\u95ED\u7F16\u8F91\u5668\uFF1F",message:`${t}\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u5173\u95ED\u540E\u4F1A\u4E22\u5931\u3002`}:{title:"\u5173\u95ED\u6587\u4EF6\uFF1F",message:`${t}\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u5173\u95ED\u540E\u4F1A\u4E22\u5931\u3002`}}function hve(e){return`\u300C${e}\u300D`}var gve={async confirmDiscard(e,t){let r=mve(e,hve(t.split("/").pop()||t)),n=await gn.dialog({title:r.title,description:r.message,tone:"warning",actions:[{label:"\u7EE7\u7EED\u7F16\u8F91",value:!1,kind:"secondary",autoFocus:!0},{label:"\u653E\u5F03\u4FEE\u6539",value:!0,kind:"danger"}],dismissable:!0});return"action"in n&&n.action===!0},async confirmConflict(e){let t=await gn.dialog({title:"\u78C1\u76D8\u6587\u4EF6\u5DF2\u66F4\u6539",description:`\u300C${e}\u300D\u5728\u6253\u5F00\u540E\u88AB\u5916\u90E8\u4FEE\u6539\u3002\u91CD\u65B0\u52A0\u8F7D\u4F1A\u4E22\u5F03\u5F53\u524D\u8349\u7A3F\uFF1B\u8986\u76D6\u4F1A\u7528\u7F16\u8F91\u5668\u5185\u5BB9\u66FF\u6362\u78C1\u76D8\u6587\u4EF6\u3002`,tone:"warning",actions:[{label:"\u53D6\u6D88",value:"cancel",kind:"secondary",autoFocus:!0},{label:"\u91CD\u65B0\u52A0\u8F7D",value:"reload",kind:"secondary"},{label:"\u4ECD\u8981\u8986\u76D6",value:"overwrite",kind:"danger"}],dismissable:!0});return"action"in t?t.action:"cancel"},notify(e,t){gn.toast(e,{tone:t})},onSaved(){}};function vve(e){let t=new Set,r=sA(),n=e.runtime??gve,a=0,o=null,l=new Map;function c(S){r={...r,...S,revision:r.revision+1};for(let A of t)A()}function d(S){return S?W7(S):!1}function p(S){let A=[];for(let I of l.values())A.push({path:I.path,name:I.name,dirty:I.dirty});return A}function h(S){c({tabs:p(r.activePath),file:S!==void 0?S:r.activePath?l.get(r.activePath)??null:null})}async function g(S,A){let I=A??(r.activePath?l.get(r.activePath)??null:null);if(!I||!I.dirty)return!0;try{return await n.confirmDiscard(S,I.path)}catch(j){return n.notify(qa(j,"\u65E0\u6CD5\u786E\u8BA4\u662F\u5426\u653E\u5F03\u4FEE\u6539\u3002").message,"error"),!1}}async function v(){let S=[...l.values()].filter(j=>j.dirty);if(S.length===0)return!0;let A=S.slice(0,3).map(j=>j.name).join("\u3001"),I=`${S.length} \u4E2A\u672A\u4FDD\u5B58\u6587\u4EF6\uFF08${A}${S.length>3?"\u2026":""}\uFF09`;try{return await n.confirmDiscard("replace",I)}catch(j){return n.notify(qa(j,"\u65E0\u6CD5\u786E\u8BA4\u662F\u5426\u653E\u5F03\u4FEE\u6539\u3002").message,"error"),!1}}async function y(){await v()&&(l.clear(),o?.abort(),o=null,c(sA(r.revision+1)))}async function w(S){o?.abort();let A=new AbortController;o=A;let I=++a;c({open:!0,activePath:S,status:"loading",file:null,failure:null,findIndex:0});try{let j=await e.repository.load(S,{signal:A.signal});return I!==a||A.signal.aborted||!r.open?!1:(o=null,j.ok===!1||!j.file?(c({status:"error",failure:j.failure??{message:"\u6253\u5F00\u6587\u4EF6\u5931\u8D25"}}),!1):(l.set(S,j.file),c({status:"ready",file:j.file,failure:null,preview:d(j.file),tabs:p(S)}),!0))}catch(j){return I!==a||A.signal.aborted||zc(j)||!r.open||(o=null,c({status:"error",failure:qa(j,"\u6253\u5F00\u6587\u4EF6\u5931\u8D25")})),!1}}async function x(S){if(!n.confirmConflict)return"cancel";try{return await n.confirmConflict(S)}catch(A){return n.notify(qa(A,"\u65E0\u6CD5\u786E\u8BA4\u662F\u5426\u8986\u76D6\u5916\u90E8\u4FEE\u6539\u3002").message,"error"),"cancel"}}function k(S,A,I,j){let $=l.get(S);if(!$)return;let P={...$,baseline:A,draft:$.draft,dirty:$.draft!==A,size:I,mtime:j};l.set(S,P);let N=r.activePath?l.get(r.activePath)??null:null;c({saving:!1,file:N,failure:null,tabs:p(r.activePath)})}async function F(S,A){c({saving:!0,failure:null});let I=S.draft;try{let j=await e.repository.save(S.path,I,{expectedMtime:S.mtime,expectedSize:S.size,overwrite:A.overwrite});if(!(l.get(S.path)??null))return c({saving:!1}),!1;if(j.ok===!1&&"conflict"in j){c({saving:!1,failure:{message:j.conflict.message,status:409,size:j.conflict.size}}),n.notify(j.conflict.message,"warning");let $=await x(S.path);if($==="reload"){let P=await w(S.path);return P&&n.notify("\u5DF2\u91CD\u65B0\u52A0\u8F7D\u78C1\u76D8\u6587\u4EF6","info"),P}if($==="overwrite"){let P=l.get(S.path);return P?F(P,{overwrite:!0}):!1}return!1}if(j.ok===!1)return c({saving:!1,failure:j.failure}),n.notify(j.failure.message,"error"),!1;k(S.path,I,j.result.size,j.result.mtime),n.notify("\u5DF2\u4FDD\u5B58","success");try{await n.onSaved?.(S.path)}catch{}return!0}catch(j){return c({saving:!1,failure:qa(j,"\u4FDD\u5B58\u5931\u8D25\uFF1A\u7F51\u7EDC\u9519\u8BEF")}),n.notify(qa(j,"\u4FDD\u5B58\u5931\u8D25\uFF1A\u7F51\u7EDC\u9519\u8BEF").message,"error"),!1}}function C(){let S=r.activePath?l.get(r.activePath):null;return aW(S?.draft??"",r.findQuery,{caseSensitive:r.findCaseSensitive}).length}async function D(S){switch(S.type){case"close":{if(r.saving)return!1;let A=S.path??r.activePath;if(!A)return!0;let I=l.get(A);if(I?.dirty&&!await g("close",I))return!1;l.delete(A);let j=p(null).filter(P=>P.path!==A);if(j.length===0)return c(sA(r.revision+1)),!0;let $=r.activePath===A?j[0].path:r.activePath;return c({activePath:$,file:$?l.get($)??null:null,preview:d($?l.get($):null),tabs:j,status:$?"ready":"idle",findIndex:0}),!0}case"activate":{if(r.saving)return!1;if(r.activePath===S.path)return!0;let A=l.get(S.path)??null;return c({activePath:S.path,file:A,status:A?"ready":"loading",failure:null,preview:d(A),findIndex:0}),A?!0:w(S.path)}case"change":{if(!r.activePath)return!1;let A=l.get(r.activePath);if(!A)return!1;let I={...A,draft:S.value,dirty:S.value!==A.baseline};return l.set(A.path,I),h(I),!0}case"revert":{if(!r.activePath)return!1;let A=l.get(r.activePath);if(!A)return!1;let I={...A,draft:A.baseline,dirty:!1};return l.set(A.path,I),h(I),!0}case"save":{if(!r.activePath||r.saving)return!1;let A=l.get(r.activePath);return A?A.dirty?F(A,{overwrite:!1}):(n.notify("\u6CA1\u6709\u6539\u52A8","info"),!0):!1}case"wrap.toggle":return c({wrap:!r.wrap}),!0;case"preview.toggle":{let A=r.activePath?l.get(r.activePath):null;if(!A||!d(A))return!1;let I=!r.preview;return c({preview:I,...I?{findOpen:!1}:{}}),!0}case"font.adjust":return c({fontSize:jb(r.fontSize+S.delta)}),!0;case"find.open":return c({findOpen:!0}),!0;case"find.close":return r.findOpen&&c({findOpen:!1}),!0;case"find.set":return S.query===r.findQuery||c({findQuery:S.query,findOpen:!0,findIndex:0}),!0;case"find.step":{if(!r.findQuery)return!1;let A=C();return A===0?!1:(c({findIndex:cve(r.findIndex,A,S.delta)}),!0)}case"find.case.toggle":return c({findCaseSensitive:!r.findCaseSensitive,findIndex:0}),!0}}return{controller:{async open(S){let A=S.trim();return!A||r.saving?!1:l.has(A)?r.activePath===A?(c({open:!0}),!0):D({type:"activate",path:A}):w(A)},execute:D,closeAll(){y()},isActive(){return r.open&&r.activePath!==null},hasDirty(){for(let S of l.values())if(S.dirty)return!0;return!1}},store:{subscribe(S){return t.add(S),()=>t.delete(S)},getSnapshot(){return r}},configureRuntime(S){let A=n;return n=S,()=>{n===S&&(n=A)}}}}var oW=vve({repository:fve}),Yb=oW.controller,Qc=oW.store;var sW=B(_(),1),Qb=B(_(),1),bve=B(er(),1),Zb=B(Ee(),1),Jb=Qb.createContext(null);function c0({children:e}){let t=Qb.useContext(Jb),r=Qb.useId(),n=t?.registerChrome;Qb.useLayoutEffect(()=>n?.(r),[n,r]);let a=(0,Zb.jsx)(kF,{value:"lucide",children:(0,Zb.jsx)("div",{className:"wand-workbar-host",children:e})});return t?(0,bve.createPortal)(a,t.chromeHost):a}function d0(){let e=Qb.useContext(Jb);return e?(0,Zb.jsx)(Er,{ref:e.trigger,"aria-label":"\u6253\u5F00\u7EC8\u7AEF",title:"\u6253\u5F00\u7EC8\u7AEF\uFF08\u8FD0\u884C\u5728 Wand / PTY \u4E3B\u673A\uFF09","aria-expanded":e.open,"aria-controls":"quick-terminal-panel","data-pressed":e.open||void 0,onClick:e.show,children:(0,Zb.jsx)(Fe,{name:"terminal",size:18})}):null}function lA({visible:e}){return e?(0,Zb.jsx)(d0,{}):null}var Zc=B(Ee(),1),uA=sW.createContext(!1);function cA(){let e=sW.useSyncExternalStore(pl.subscribe,pl.getSnapshot,pl.getSnapshot);return e.open?(0,Zc.jsx)(c0,{children:(0,Zc.jsxs)(Xe,{align:"center",gap:12,className:"new-work-heading unified-new-work-heading",children:[(0,Zc.jsxs)(Te,{kind:"ghost","aria-label":"\u8FD4\u56DE\u539F\u9875\u9762",disabled:!e.dismissable,onClick:()=>Ia.close(),children:[(0,Zc.jsx)(Fe,{name:"chevronLeft",size:18}),(0,Zc.jsx)("span",{children:"\u8FD4\u56DE"})]}),(0,Zc.jsx)("span",{className:"new-work-page-label",title:e.taskName||void 0,children:e.taskName?`\u65B0\u5EFA\u5DE5\u4F5C \xB7 ${e.taskName}`:"\u65B0\u5EFA\u4F1A\u8BDD"}),(0,Zc.jsx)("div",{className:"workbar-spacer"}),(0,Zc.jsx)(d0,{})]})}):null}function e1(e){return e.replace(/https?:\/\/[^\s,。;]+/gi,"[\u670D\u52A1\u5730\u5740]").replace(/(?:Bearer\s+\S+|(?:token|password|connectionCode|appToken)\s*[:=]\s*\S+)/gi,"[\u51ED\u636E\u5DF2\u9690\u85CF]").replace(/(?:\/[\w.~-]+){2,}/g,"[\u8DEF\u5F84]")}var Jc=B(_(),1);function yve(e){let t=[],r=[];for(let n of e)n.archived?r.push(n):t.push(n);return{active:t,archived:r}}function lW(e,t=[]){let r=new Map;for(let o of e)r.has(o.id)||r.set(o.id,o);let{active:n,archived:a}=yve([...r.values()]);for(let o of t)r.has(o.id)||(r.set(o.id,o),a.push(o));return{active:n,archived:a}}function wve(e){let{active:t,archived:r}=lW(e.sessions,e.archivedSessions);return{...e,sessions:t,archivedSessions:r}}function xve(e){return e.map(t=>{let r=lW(t.standaloneSessions,t.archivedSessions);return{...t,tasks:t.tasks.map(wve),standaloneSessions:r.active,archivedSessions:r.archived}})}var dA={groups:[],loading:!0,error:""};function Eve(e,t={}){let r=new Set,n=t.subscribeChanges??vs,a=t.setInterval??setInterval,o=t.clearInterval??clearInterval,l=dA,c,d=0,p,h=!1,g,v;function y(x){if(!(l.groups===x.groups&&l.loading===x.loading&&l.error===x.error)){l=x;for(let k of r)k()}}function w(x){if(p)return x&&(h=!0),p;let k=d,F=Promise.resolve().then(async()=>{if(k===d)do{h=!1;try{let C=await e.listTaskGroups(c);if(k!==d)return;c=C.revision??(C.unchanged?c:void 0),y({groups:C.unchanged?l.groups:xve(C.groups),loading:!0,error:""})}catch(C){if(k!==d)return;y({...l,error:e1(Es(C,"\u65E0\u6CD5\u52A0\u8F7D\u4EFB\u52A1\u5217\u8868\u3002"))})}}while(h&&k===d)}).finally(()=>{k!==d||p!==F||(p=void 0,y({...l,loading:!1}))});return p=F,y({...l,loading:!0}),F}return{getSnapshot:()=>l,getServerSnapshot:()=>dA,reload:()=>w(!0),subscribe(x){return r.add(x),r.size===1&&(v=n(()=>{w(!0)}),g=a(()=>{w(!1)},6e3),w(!1)),()=>{r.delete(x),!(r.size>0)&&(v?.(),v=void 0,g!==void 0&&o(g),g=void 0,d+=1,p=void 0,h=!1,c=void 0,l=dA)}}}}var hl=Eve(an),kve=Object.freeze({groups:[],loading:!0,error:""});function pA(e=0){let t=(0,Jc.useSyncExternalStore)(hl.subscribe,hl.getSnapshot,hl.getServerSnapshot),r=(0,Jc.useRef)(e);return(0,Jc.useEffect)(()=>{r.current!==e&&(r.current=e,hl.reload())},[e]),{...t,reload:hl.reload}}function fA(){let[e,t]=(0,Jc.useState)(!1);(0,Jc.useEffect)(()=>{if(e)return;let a=!1,o=()=>{a||t(!0)},l=typeof window<"u"&&typeof window.requestIdleCallback=="function",c=l?window.requestIdleCallback(o,{timeout:1500}):window.setTimeout(o,0);return()=>{a=!0,l?window.cancelIdleCallback(c):window.clearTimeout(c)}},[e]);let r=(0,Jc.useCallback)(a=>e?hl.subscribe(a):()=>{},[e]),n=(0,Jc.useCallback)(()=>e?hl.getSnapshot():kve,[e]);return(0,Jc.useSyncExternalStore)(r,n,n)}var Cve=B(_(),1),uW="wand-conversations-local-owner-v1";function mA(e){return e==="active"||e==="archived"?e:"all"}function Sve(){let e={};try{let t=JSON.parse(localStorage.getItem(uW)??"{}");t&&typeof t=="object"&&!Array.isArray(t)&&(e=t)}catch{}return{mode:e.mode==="tasks"?"tasks":"chats",active:e.active??null,selectedId:typeof e.selectedId=="string"?e.selectedId:"",directory:!1,listFilter:mA(e.listFilter),activityOnly:e.activityOnly===!0,targets:e.targets??{},filters:e.filters??{},scrolls:e.scrolls??{},focusRequest:null}}function cW(e){let t=new URLSearchParams(Hn());if(!yu())return e;let r=t.get("view"),n=t.get("conversation")??"",a=t.get("conversationTask")??"",o=t.get("conversationRun");return{...e,mode:t.get("sidebar")==="tasks"?"tasks":t.get("sidebar")==="chats"||r==="chats"||r==="contacts"?"chats":"tasks",active:r==="chats"||r==="contacts",directory:r==="contacts",selectedId:n,listFilter:mA(t.get("chatFilter")),activityOnly:t.get("chatActivity")==="true",filters:{"list-query":t.get("chatQuery")??"",...n?{[n]:a}:{}},targets:n?{[n]:a&&o?{taskId:a,runId:o}:null}:{},focusRequest:e.selectedId===n?e.focusRequest:null}}var Dr=cW(Sve()),nf=0,V2=new Set;function Go(e){Dr={...Dr,...e};try{localStorage.setItem(uW,JSON.stringify({...Dr,directory:!1,focusRequest:null}))}catch{}let t={};"mode"in e&&(t.sidebar=Dr.mode),("active"in e||"directory"in e||"selectedId"in e)&&(t.view=Dr.directory?"contacts":Dr.active?"chats":"workspace",t.sidebar=Dr.mode,t.conversation=Dr.selectedId),"listFilter"in e&&(t.chatFilter=Dr.listFilter==="all"?null:Dr.listFilter),"activityOnly"in e&&(t.chatActivity=Dr.activityOnly?"true":null),"filters"in e&&(t.chatQuery=Dr.filters["list-query"]??"",t.conversationTask=Dr.filters[Dr.selectedId]??""),"targets"in e&&(t.conversationTask=Dr.targets[Dr.selectedId]?.taskId??"",t.conversationRun=Dr.targets[Dr.selectedId]?.runId??"");let r="selectedId"in e||"active"in e||"directory"in e;!r&&Object.keys(e).every(n=>n==="filters")?uD(t):Ua(t,r?"push":"replace");for(let n of V2)n()}go(()=>{let e=cW(Dr);(e.selectedId!==Dr.selectedId||e.active!==Dr.active)&&++nf,Dr=e;for(let t of V2)t()});var Ar={subscribe:e=>(V2.add(e),()=>{V2.delete(e)}),getSnapshot:()=>Dr,selectionRevision:()=>nf,select:(e,t=!1)=>{let r=++nf;Go({selectedId:e,active:!0,directory:!1,focusRequest:t?{id:e,revision:r}:null})},openTask:(e,t,r)=>{++nf,Go({selectedId:e,active:!0,directory:!1,focusRequest:null,filters:{...Dr.filters,[e]:t},targets:{...Dr.targets,[e]:r?{taskId:t,runId:r}:null}})},consumeFocus:e=>{Dr.focusRequest?.revision===e&&Go({focusRequest:null})},show:()=>{++nf,Go({active:!0,directory:!1,focusRequest:null})},suspend:()=>{++nf,Go({active:!1,directory:!1,focusRequest:null})},directory:e=>{++nf,Go({directory:e,active:e?!0:Dr.active,focusRequest:null})},mode:e=>Go({mode:e,active:e==="chats",directory:!1,focusRequest:null}),listFilter:e=>Go({listFilter:mA(e)}),activityOnly:e=>Go({activityOnly:e}),target:(e,t)=>Go({targets:{...Dr.targets,[e]:t}}),filter:(e,t)=>Go({filters:{...Dr.filters,[e]:t}}),scroll:(e,t)=>Go({scrolls:{...Dr.scrolls,[e]:t}})};function p0(){return Cve.useSyncExternalStore(Ar.subscribe,Ar.getSnapshot,Ar.getSnapshot)}function Fve(e,t,r=!1){return`conversation-draft:${typeof location>"u"?"server":location.origin}:local-owner:${e||"unselected"}:${r?"dispatch":t?`${t.taskId}:${t.runId}`:"talk"}`}var Dve="taskboard",Ave="teams",$ve="teamchat",Bve="schedules",Ive="calendar",K2={board:Dve,teams:Ave,teamchat:$ve,schedules:Bve,calendar:Ive},Xo={open:!1,page:"board",workspaceId:"",sessionId:"",runId:"",teamId:"",calendarRange:"month",revision:0},hA=new Set,dW=!1;function U2(e){Xo={...Xo,...e,revision:Xo.revision+1},hA.forEach(t=>t())}function Mve(e){let t=new URLSearchParams(e).get("view");return t==="issues"||Object.values(K2).includes(t??"")}function Tve(e){let t=new URLSearchParams(e).get("view");return Object.keys(K2).find(r=>K2[r]===t)??"board"}function jve(e){return new URLSearchParams(e).get("run")??""}function pW(){let e=Hn(),t=Mve(e),r=Tve(e),n=new URLSearchParams(e),a=r==="teamchat"?jve(e):"",o=r==="teams"?n.get("team")??"":"",l=n.get("range")==="week"?"week":"month";t===Xo.open&&r===Xo.page&&a===Xo.runId&&o===Xo.teamId&&l===Xo.calendarRange||U2({open:t,page:r,runId:a,teamId:o,calendarRange:l})}function t1(){dW||typeof window>"u"||(dW=!0,go(pW),pW())}var En={open(e="",t="",r="board",n="",a=""){t1();let o=new URLSearchParams(Hn());Ua({view:K2[r],run:r==="teamchat"?n:null,...r==="teams"&&a?{team:a}:{},...r==="board"&&!o.has("directory")&&e?{directory:e}:{}}),U2({open:!0,page:r,workspaceId:r==="calendar"?"":e,sessionId:r==="calendar"?"":t,runId:r==="teamchat"?n:"",teamId:r==="teams"&&(a||o.get("team"))||""})},calendarRange(e){Ua({range:e}),Xo.calendarRange!==e&&U2({calendarRange:e})},close(){t1(),Xo.open&&(Ua({view:"workspace"}),Xo.open&&U2({open:!1}))}},gl={subscribe(e){return hA.add(e),()=>{hA.delete(e)}},getSnapshot(){return Xo}};var _ve="wand-model-group/",Pve="wand-auto-assign/auto",r1="wand-openrouter-free",ed=`${r1}/auto`,fW="wand-decision/laya";function td(e){return e?.startsWith(_ve)===!0}function Cu(e){return e?.trim()===Pve}function gA(e){return e?.startsWith(`${r1}/`)===!0}function Nve(e){return e===fW}var rd="\u514D\u8D39\u5206\u7EC4",yW="opencode-free",Ove="\u514D\u8D39\u5206\u7EC4";function Rve(e){return/^opencode\/[a-z0-9][a-z0-9._-]*$/.test(e)&&e!=="opencode/default"&&e!=="opencode/auto"}function Lve(e){return e.id===yW&&e.provider==="opencode"}var f0="\u667A\u80FD\u5206\u914D",yA="openrouter-free";function zve(e){return e.id===yA&&e.provider==="pi"||Lve(e)}var G2=32,vA=32,Hve=/^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$/;function qve(e){if(!Array.isArray(e)||e.length>G2*Zs.length+2)throw new Error("\u6A21\u578B\u5206\u7EC4\u5FC5\u987B\u662F\u6709\u754C\u6570\u7EC4\u3002");let t=new Set,r=new Set,n=new Map;return e.map(a=>{if(!a||typeof a!="object"||Array.isArray(a))throw new Error("\u6A21\u578B\u5206\u7EC4\u683C\u5F0F\u65E0\u6548\u3002");let o=a,l=typeof o.id=="string"?o.id.trim():"",c=typeof o.name=="string"?o.name.trim():"";if(!Hve.test(l)||!f4(o.provider))throw new Error("\u6A21\u578B\u5206\u7EC4\u6807\u8BC6\u6216\u5DE5\u5177\u65E0\u6548\u3002");let d=o.provider;if(!c||c.length>40||/[\x00-\x1f\x7f]/.test(c))throw new Error("\u5206\u7EC4\u540D\u79F0\u9700\u4E3A 1\u201340 \u4E2A\u5B57\u7B26\u3002");let p=l===yA,h=l===yW,g=p||h;if(p&&(d!=="pi"||c!==rd)||h&&(d!=="opencode"||c!==Ove))throw new Error("\u514D\u8D39\u5206\u7EC4\u7684\u5DE5\u5177\u4E0E\u540D\u79F0\u4E0D\u53EF\u4FEE\u6539\u3002");if(!g&&d==="pi"&&c===rd)throw new Error("\u514D\u8D39\u5206\u7EC4\u662F\u5185\u7F6E\u5206\u7EC4\uFF0C\u8BF7\u76F4\u63A5\u8C03\u6574\u5B83\u7684\u987A\u5E8F\u3002");let v=`${d}/${l}`,y=`${d}/${c}`;if(t.has(v)||r.has(y))throw new Error("\u540C\u4E00\u5DE5\u5177\u7684\u5206\u7EC4\u6807\u8BC6\u6216\u540D\u79F0\u4E0D\u80FD\u91CD\u590D\u3002");t.add(v),r.add(y);let w=(n.get(d)??0)+(g?0:1);if(w>G2)throw new Error(`\u6BCF\u4E2A\u5DE5\u5177\u6700\u591A ${G2} \u4E2A\u5206\u7EC4\u3002`);if(n.set(d,w),!Array.isArray(o.models)||!g&&!o.models.length||o.models.length>(g?128:vA))throw new Error(`\u5206\u7EC4\u9700\u5305\u542B 1\u2013${vA} \u4E2A\u6A21\u578B\uFF1B\u514D\u8D39\u5206\u7EC4\u53EF\u7559\u7A7A\u4F7F\u7528\u81EA\u52A8\u987A\u5E8F\u3002`);let x=o.models.map(k=>{let F=typeof k=="string"?k.trim():"";if(!F||F==="default"||F.length>256||/[\s\x00-\x1f\x7f]/.test(F)||td(F)||Cu(F)||F===ed||F.startsWith("-"))throw new Error("\u7EC4\u5185\u5FC5\u987B\u662F\u5177\u4F53\u6A21\u578B ID\uFF0C\u4E0D\u80FD\u5D4C\u5957\u5206\u7EC4\u6216\u4F7F\u7528\u9ED8\u8BA4\u503C\u3002");if(gA(F)&&d!=="pi")throw new Error("\u514D\u8D39\u6A21\u578B\u4EC5\u5C5E\u4E8E Pi\u3002");if(p&&!F.startsWith(`${r1}/`)||h&&!Rve(F))throw new Error("\u514D\u8D39\u5206\u7EC4\u53EA\u80FD\u5305\u542B\u5BF9\u5E94\u514D\u8D39\u6C60\u4E2D\u7684\u6A21\u578B\u3002");return F});if(new Set(x).size!==x.length)throw new Error("\u540C\u4E00\u5206\u7EC4\u4E2D\u7684\u6A21\u578B\u4E0D\u80FD\u91CD\u590D\u3002");return{id:l,provider:d,name:c,models:x}})}function Wve(e,t){let r=new Set(e);return[...new Set([...t.filter(n=>r.has(n)),...e])]}var af="default";function mW(e){if(!Array.isArray(e))return[];let t=[];for(let r of e){if(!r||typeof r!="object")continue;let n=r,a=typeof n.effort=="string"?n.effort.trim().toLowerCase():"";if(!/^[a-z][a-z0-9_-]{0,31}$/.test(a))continue;let o=typeof n.description=="string"?n.description.trim():"";t.push(o?{effort:a,description:o}:{effort:a})}return t}function Vve(e){let t=typeof e.id=="string"?e.id.trim():"";if(!t)return null;let r=typeof e.label=="string"&&e.label.trim()?e.label.trim():t;return{value:t,label:r,...typeof e.group=="string"&&e.group?{group:e.group}:{}}}var hW=[["claude","models","defaultModel"],["codex","codexModels","defaultCodexModel"],["opencode","opencodeModels","defaultOpenCodeModel"],["grok","grokModels","defaultGrokModel"],["qoder","qoderModels","defaultQoderModel"],["pi","piModels","defaultPiModel"]];function wW(e){let t=e&&typeof e=="object"?e:{},r=t.defaultModels&&typeof t.defaultModels=="object"?t.defaultModels:{},n={},a={},o={};for(let[d,p,h]of hW){let g=Array.isArray(t[p])?t[p]:[],v=g.map(Vve).filter(x=>x!==null),y=(typeof r[d]=="string"?r[d]:typeof t[h]=="string"?t[h]:"").trim();y&&(a[d]=y),v.some(x=>x.value===af)||v.unshift({value:af,label:y?`\u8DDF\u968F\u670D\u52A1\u7AEF\u9ED8\u8BA4\uFF08${y===ed?rd:td(y)?v.find(x=>x.value===y)?.label||"\u6A21\u578B\u5206\u7EC4":Cu(y)?v.find(x=>x.value===y)?.label||f0:y}\uFF09`:"\u8DDF\u968F\u670D\u52A1\u7AEF\u9ED8\u8BA4"}),n[d]=v;let w={};for(let x of g){let k=typeof x.id=="string"?x.id.trim():"",F=mW(x.reasoningEfforts);if(!k||!F.length)continue;let C=typeof x.defaultReasoningEffort=="string"?x.defaultReasoningEffort.trim():"";w[k]=C?{efforts:F,defaultEffort:C}:{efforts:F}}Object.keys(w).length&&(o[d]=w)}let l=t.thinkingEfforts&&typeof t.thinkingEfforts=="object"?t.thinkingEfforts:{},c={};for(let[d]of hW){let p=mW(l[d]);p.length&&(c[d]=p)}return{byProvider:n,defaultModels:a,effortsByProvider:c,modelEfforts:o,refreshedAt:typeof t.refreshedAt=="string"?t.refreshedAt:""}}function gW(e,t){return!e||!t?[]:e.byProvider[t]??[]}var Uve=/^跟随.*默认$/,Kve=/\s*[((][^(())]*默认[^(())]*[))]\s*$/;function Gve(e,t,r){let n=(r??"").trim(),a=c=>c===ed?rd:td(c)||Cu(c)?gW(e,t).find(d=>d.value===c)?.label||(Cu(c)?f0:"\u6A21\u578B\u5206\u7EC4"):c;if(n&&n!==af)return a(n);let o=e?.defaultModels?.[t??""]?.trim();if(o)return a(o);let l=(gW(e,t).find(c=>c.value===af)?.label.trim()??"").replace(Kve,"").trim();return Uve.test(l)?"":l}function Xve(e,t,r){if(!e)return{efforts:[]};let n=e.modelEfforts[t],a=r?n?.[r]:void 0,o=n?.[af],l=a?.efforts.length?a:o;return l?.efforts.length?l:{efforts:e.effortsByProvider[t]??[]}}function Yve(e,t){let r=e?.byProvider[t];return r&&r.length>0?r:[{value:af,label:"\u8DDF\u968F\u670D\u52A1\u7AEF\u9ED8\u8BA4"}]}var Qve=6e4,Zve=6e4,n1=null,xW=0,vW=0,bA=new Set;function Jve(e){return bA.add(e),()=>{bA.delete(e)}}function bW(e){return JSON.stringify({refreshedAt:e.refreshedAt,byProvider:e.byProvider,defaultModels:e.defaultModels,effortsByProvider:e.effortsByProvider,modelEfforts:e.modelEfforts})}function m0(e){let t=wW(e),r=n1!==null&&bW(n1)===bW(t);if(n1=t,xW=Date.now(),r)return t;for(let n of bA)n(t);return typeof window<"u"&&window.dispatchEvent(new CustomEvent("wand-model-catalog",{detail:e})),t}function wA(){typeof window>"u"||vW||(vW=window.setInterval(()=>{yt("/api/models",{credentials:"same-origin"}).then(e=>{m0(e)}).catch(()=>{})},Qve))}function EW(){return n1&&Date.now()-xW<Zve?n1:null}async function ebe(e){return EW()||m0(await yt("/api/models",{signal:e,credentials:"same-origin"}))}var tbe={claude:{standard:"low",deep:"medium",max:"max"},codex:{standard:"low",deep:"medium",max:"xhigh"},opencode:{standard:"low",deep:"high",max:"max"},grok:{standard:"low",deep:"high",max:"xhigh"},qoder:{standard:"low",deep:"high",max:"max"},pi:{standard:"low",deep:"high",max:"max"}},rbe={auto:"\u81EA\u52A8",none:"\u5173\u95ED",minimal:"\u6700\u4F4E",low:"\u4F4E",medium:"\u4E2D",high:"\u9AD8",xhigh:"\u8D85\u9AD8",max:"\u6781\u9AD8",ultra:"\u6781\u9650",ultracode:"\u6781\u9650\u4EE3\u7801"};function nbe(e,t){let r=tbe[e];return r?.standard===t?"standard":r?.deep===t?"deep":r?.max===t?"max":`${e}:${t}`}function xA(e){return rbe[e]??e}function EA(e,t,r){if(!t.map(l=>l.effort.trim().toLowerCase()).filter(l=>/^[a-z][a-z0-9_-]{0,31}$/.test(l)).length)return null;let n=t.map(l=>({effort:l.effort.trim().toLowerCase(),description:l.description?.trim()||""})).filter(l=>/^[a-z][a-z0-9_-]{0,31}$/.test(l.effort)&&l.effort!=="off");if(!n.length)return[{id:"off",label:"auto",hint:"\u8FD9\u4E2A\u6A21\u578B\u4E0D\u80FD\u8C03\u601D\u8003\u6DF1\u5EA6"}];let a=[{id:"off",label:"auto",hint:r?`\u4F7F\u7528\u6A21\u578B\u9ED8\u8BA4\u6863\u4F4D\uFF08${r}\uFF09`:"\u4F7F\u7528\u6A21\u578B\u9ED8\u8BA4\u6863\u4F4D"}],o=new Set(["off"]);for(let l of n){let c=nbe(e,l.effort);o.has(c)||(o.add(c),a.push({id:c,label:l.effort,hint:l.description||l.effort}))}return a}var nd=null,Ya={open:!1,dismissable:!0,initialPath:"",revision:0},X2=new Set;function kW(e,t=Ya.initialPath){Ya={open:e,dismissable:!0,initialPath:t,revision:Ya.revision+1};for(let r of X2)r()}function abe(e){if(!(!Ya.open||Ya.dismissable===e)){Ya={...Ya,dismissable:e};for(let t of X2)t()}}var ad={open(e){if(!nd)return!1;let t=(e??nd.getInitialPath()).trim();return t?(nd.onOpen?.(),kW(!0,t),!0):!1},close(){Ya.open&&(kW(!1),nd?.onClose?.())},closeIfOpen(){return!Ya.open||!Ya.dismissable?!1:(this.close(),!0)},closeTopmost(){return Ya.open?(Ya.dismissable&&this.close(),!0):!1},isOpen(){return Ya.open},setDismissable(e){abe(e)},async choose(e){let t=e.trim(),r=nd;return!Ya.open||!r||!t?!1:(await r.applySelection(t),this.close(),!0)}},kA={subscribe(e){return X2.add(e),()=>X2.delete(e)},getSnapshot(){return Ya}};function CA(e){return nd=e,()=>{nd===e&&(Ya.open&&ad.close(),nd=null)}}var CW=B(_()),Y2=B(_());function SA(){return SA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},SA.apply(this,arguments)}var ibe=(0,Y2.forwardRef)((e,t)=>{let{prefixCls:r="rc-checkbox",className:n,style:a,checked:o,disabled:l,defaultChecked:c=!1,type:d="checkbox",title:p,onChange:h,...g}=e,v=(0,Y2.useRef)(null),y=(0,Y2.useRef)(null),[w,x]=yr(c,o);(0,Y2.useImperativeHandle)(t,()=>({focus:C=>{v.current?.focus(C)},blur:()=>{v.current?.blur()},input:v.current,nativeElement:y.current}));let k=te(r,n,{[`${r}-checked`]:w,[`${r}-disabled`]:l}),F=C=>{l||("checked"in e||x(C.target.checked),h?.({target:{...e,type:d,checked:C.target.checked},stopPropagation(){C.stopPropagation()},preventDefault(){C.preventDefault()},nativeEvent:C.nativeEvent}))};return CW.createElement("span",{className:k,title:p,style:a,ref:y},CW.createElement("input",SA({},g,{className:`${r}-input`,ref:v,onChange:F,disabled:l,checked:!!w,type:d})))}),FA=ibe,obe=B(_());function DA(e){let t=obe.default.useRef(null),r=()=>{pr.cancel(t.current),t.current=null};return[()=>{r(),t.current=pr(()=>{t.current=null})},n=>{t.current&&(n.stopPropagation(),r()),e?.(n)}]}var As=B(_()),sbe=B(_()),lbe=sbe.default.createContext(null),SW=lbe,ube=e=>{let{checkboxCls:t,checkboxSize:r,lineWidth:n}=e,a=`${t}-wrapper`,o="@media (hover: hover) and (pointer: fine)";return[{[`${t}-group`]:{...fr(e),display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[a]:{...fr(e),display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${a}`]:{marginInlineStart:0}},[t]:{...fr(e),position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"center",boxSizing:"border-box",display:"block",width:r,height:r,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${ve(n)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,flex:"none",...ap(),"&:after":{boxSizing:"border-box",position:"absolute",top:`calc(${r} / 2 - ${n})`,insetInlineStart:`calc(${r} / 4 - ${n})`,display:"table",width:e.calc(r).div(14).mul(5).equal(),height:e.calc(r).div(14).mul(8).equal(),border:`${ve(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`,...ax()},[`${t}-input`]:{position:"absolute",inset:`calc(-1 * (${n}))`,zIndex:1,cursor:"pointer",opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:ao(e),"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}}},{[o]:{[`
|
|
210
|
-
${a}:not(${a}-disabled),
|
|
211
|
-
${t}:not(${t}-disabled)
|
|
212
|
-
`]:{[`&:hover ${t}`]:{borderColor:e.colorPrimary}},[`${a}:not(${a}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}}},{[`${t}-checked`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`,...ax()},[o]:{[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}}},{[t]:{"&-indeterminate":{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'},[o]:{[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorBgContainer,borderColor:e.colorPrimary}}}}},{[`${a}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate::after`]:{background:e.colorTextDisabled}}}]};function cbe(e,t){let r=_t(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return ube(r)}var FW=Et("Checkbox",(e,{prefixCls:t})=>[cbe(t,e)]),dbe=(e,t)=>{let{prefixCls:r,children:n,indeterminate:a=!1,onMouseEnter:o,onMouseLeave:l,skipGroup:c=!1,disabled:d,rootClassName:p,className:h,style:g,classNames:v,styles:y,name:w,value:x,checked:k,defaultChecked:F,onChange:C,...D}=e,{getPrefixCls:S,direction:A,className:I,style:j,classNames:$,styles:P}=jt("checkbox"),N=As.useContext(SW),{isFormItemInput:R}=As.useContext(so),U=As.useContext(ci),H=d??N?.disabled??U,[q,L]=yr(F,k),O=q,W=xt(we=>{L(we.target.checked),C?.(we),!c&&N?.toggleOption&&N.toggleOption({label:n,value:x})});N&&!c&&(O=N.value.includes(x));let z=As.useRef(null),Y=jo(t,z);As.useEffect(()=>{if(!(c||!N))return N.registerValue(x),()=>{N.cancelValue(x)}},[x,c]),As.useEffect(()=>{z.current?.input&&(z.current.input.indeterminate=a)},[a]);let G=S("checkbox",r),Z=Qn(G),[T,V]=FW(G,Z),X={...D},Q={...e,indeterminate:a,disabled:H,checked:O},re=lt(j),J=lt(g),[se,ue]=Tt([$,v],[P,re,y,J],{props:Q}),ae=te(`${G}-wrapper`,{[`${G}-rtl`]:A==="rtl",[`${G}-wrapper-checked`]:O,[`${G}-wrapper-disabled`]:H,[`${G}-wrapper-in-form-item`]:R},I,h,se.root,p,V,Z,T),he=te(se.icon,{[`${G}-indeterminate`]:a},Bv,T),[le,fe]=DA(X.onClick);return As.createElement(eh,{component:"Checkbox",disabled:H},As.createElement("label",{className:ae,style:ue.root,onMouseEnter:o,onMouseLeave:l,onClick:le},As.createElement(FA,{...X,name:!c&&N?N.name:w,checked:O,onClick:fe,onChange:W,prefixCls:G,className:he,style:ue.icon,disabled:H,ref:Y,value:x}),ir(n)&&As.createElement("span",{className:te(`${G}-label`,se.label),style:ue.label},n)))},pbe=As.forwardRef(dbe),DW=pbe,id=B(_()),fbe=id.forwardRef((e,t)=>{let{defaultValue:r,children:n,options:a=[],prefixCls:o,className:l,rootClassName:c,style:d,onChange:p,role:h="group",...g}=e,{getPrefixCls:v,direction:y}=id.useContext(wt),[w,x]=yr(r||[],g.value),k=w||[],[F,C]=id.useState([]),D=id.useMemo(()=>a.map(O=>Di(O)||Oa(O)?{label:O,value:O}:O).filter(O=>Yr(O)&&Yr(O.value)),[a]),S=O=>{C(W=>W.filter(z=>z!==O))},A=O=>{C(W=>[].concat(Xr(W),[O]))},I=O=>{let W=k.indexOf(O.value),z=Xr(k);W===-1?z.push(O.value):z.splice(W,1),x(z),p?.(z.filter(Y=>F.includes(Y)).sort((Y,G)=>{let Z=D.findIndex(V=>V.value===Y),T=D.findIndex(V=>V.value===G);return Z-T}))},j=v("checkbox",o),$=`${j}-group`,P=Qn(j),[N,R]=FW(j,P),U=wr(g,["value","disabled"]),H=Array.isArray(D)&&D.length>0?D.map(O=>id.createElement(DW,{prefixCls:j,key:O.value.toString(),disabled:"disabled"in O?O.disabled:g.disabled,value:O.value,checked:k.includes(O.value),onChange:O.onChange,className:te(`${$}-item`,O.className),style:O.style,title:O.title,id:O.id,required:O.required},O.label)):n,q=id.useMemo(()=>({toggleOption:I,value:k,disabled:g.disabled,name:g.name,registerValue:A,cancelValue:S}),[I,k,g.disabled,g.name,A,S]),L=te($,{[`${$}-rtl`]:y==="rtl"},l,c,R,P,N);return id.createElement("div",{className:L,style:d,role:h,...U,ref:t},id.createElement(SW.Provider,{value:q},H))}),mbe=fbe,AA=DW;AA.Group=mbe;AA.__ANT_CHECKBOX=!0;var $A=AA;var AW=B(_(),1),$W=B(Ee(),1);function BA({value:e,onValueChange:t,onSearch:r,label:n,placeholder:a=n,disabled:o,className:l,inputRef:c,listId:d,activeOptionId:p}){let h=AW.useRef(null),g=c??h,v=AW.useRef(!1),y=()=>{v.current=!1,t(""),r?.(""),g.current?.focus()};return(0,$W.jsx)(vp,{className:ct("wand-ui-search",l),startSlot:(0,$W.jsx)(Fe,{name:"search",size:16}),clearable:!!e,clearLabel:"\u6E05\u7A7A\u641C\u7D22",onClear:y,ref:g,type:"search","aria-label":n,placeholder:a,value:e,disabled:o,autoComplete:"off",spellCheck:!1,role:d?"combobox":void 0,"aria-expanded":d?!0:void 0,"aria-autocomplete":d?"list":void 0,"aria-controls":d,"aria-activedescendant":p,onCompositionStart:()=>{v.current=!0},onCompositionEnd:w=>{v.current=!1,r?.(w.currentTarget.value)},onChange:w=>{let x=w.currentTarget.value;t(x),v.current||r?.(x)},onKeyDown:w=>{v.current||w.nativeEvent.isComposing||w.key==="Escape"&&e&&(w.preventDefault(),w.stopPropagation(),y())}})}var vl=B(_()),of=B(_()),Q2=B(_()),h0=void 0;function hbe(e,t){let{prefixCls:r,invalidate:n,item:a,renderItem:o,responsive:l,responsiveDisabled:c,registerSize:d,itemKey:p,className:h,style:g,children:v,display:y,order:w,component:x="div",...k}=e,F=l&&!y;function C(j){d(p,j)}Q2.useEffect(()=>()=>{C(null)},[]);let D=o&&a!==h0?o(a,{index:w}):v,S;n||(S={opacity:F?0:1,height:F?0:h0,overflowY:F?"hidden":h0,order:l?w:h0,pointerEvents:F?"none":h0,position:F?"absolute":h0});let A={};F&&(A["aria-hidden"]=!0);let I=Q2.createElement(x,Dn({className:te(!n&&r,h),style:{...S,...g}},A,k,{ref:t}),D);return l&&(I=Q2.createElement(Ea,{onResize:({offsetWidth:j})=>{C(j)},disabled:c},I)),I}var gbe=Q2.forwardRef(hbe),a1=gbe,BW=B(_()),vbe=B(er());function bbe(e){if(typeof MessageChannel>"u")pr(e);else{let t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0)}}function ybe(){let e=BW.useRef(null);return t=>{e.current||(e.current=[],bbe(()=>{(0,vbe.unstable_batchedUpdates)(()=>{e.current.forEach(r=>{r()}),e.current=null})})),e.current.push(t)}}function g0(e,t){let[r,n]=BW.useState(t),a=xt(o=>{e(()=>{n(o)})});return[r,a]}var i1=B(_()),wbe=B(_()),Z2=wbe.default.createContext(null),xbe=(e,t)=>{let r=i1.useContext(Z2);if(!r){let{component:c="div",...d}=e;return i1.createElement(c,Dn({},d,{ref:t}))}let{className:n,...a}=r,{className:o,...l}=e;return i1.createElement(Z2.Provider,{value:null},i1.createElement(a1,Dn({ref:t,className:te(n,o)},a,l)))},Ebe=i1.forwardRef(xbe),kbe=Ebe,IW="responsive",MW="invalidate";function Cbe(e){return`+ ${e.length} ...`}function Sbe(e,t){let{prefixCls:r="rc-overflow",data:n=[],renderItem:a,renderRawItem:o,itemKey:l,itemWidth:c=10,ssr:d,style:p,className:h,maxCount:g,renderRest:v,renderRawRest:y,prefix:w,suffix:x,component:k="div",itemComponent:F,onVisibleChange:C,...D}=e,S=d==="full",A=ybe(),[I,j]=g0(A,null),$=I||0,[P,N]=g0(A,new Map),[R,U]=g0(A,0),[H,q]=g0(A,0),[L,O]=g0(A,0),[W,z]=g0(A,0),[Y,G]=(0,of.useState)(null),[Z,T]=(0,of.useState)(null),V=vl.useMemo(()=>Z===null&&S?Number.MAX_SAFE_INTEGER:Z||0,[Z,I]),[X,Q]=(0,of.useState)(!1),re=`${r}-item`,J=Math.max(R,H),se=g===IW,ue=n.length&&se,ae=g===MW,he=ue||typeof g=="number"&&n.length>g,le=(0,of.useMemo)(()=>{let Se=n;return ue?I===null&&S?Se=n:Se=n.slice(0,Math.min(n.length,$/c)):typeof g=="number"&&(Se=n.slice(0,g)),Se},[n,c,I,g,ue]),fe=(0,of.useMemo)(()=>ue?n.slice(V+1):n.slice(le.length),[n,le,ue,V]),we=(0,of.useCallback)((Se,Pe)=>typeof l=="function"?l(Se):(l&&Se?.[l])??Pe,[l]),_e=(0,of.useCallback)(a||(Se=>Se),[a]);function $e(Se,Pe,dt){Z===Se&&(Pe===void 0||Pe===Y)||(T(Se),dt||(Q(Se<n.length-1),C?.(Se)),Pe!==void 0&&G(Pe))}function De(Se,Pe){j(Pe.clientWidth)}function Ce(Se,Pe){N(dt=>{let at=new Map(dt);return Pe===null?at.delete(Se):at.set(Se,Pe),at})}function qe(Se,Pe){q(Pe),U(H)}function Ae(Se,Pe){O(Pe)}function Be(Se,Pe){z(Pe)}function Me(Se){return P.get(we(le[Se],Se))}Jt(()=>{if($&&typeof J=="number"&&le){let Se=L+W,Pe=le.length,dt=Pe-1;if(!Pe){$e(0,null);return}for(let at=0;at<Pe;at+=1){let Ke=Me(at);if(S&&(Ke=Ke||0),Ke===void 0){$e(at-1,void 0,!0);break}if(Se+=Ke,dt===0&&Se<=$||at===dt-1&&Se+Me(dt)<=$){$e(dt,null);break}else if(Se+J>$){$e(at-1,Se-Ke-W+H);break}}x&&Me(0)+W>$&&G(null)}},[$,P,H,L,W,we,le]);let Ue=X&&!!fe.length,He={};Y!==null&&ue&&(He={position:"absolute",top:0,insetInlineStart:Y});let Ie={prefixCls:re,responsive:ue,component:F,invalidate:ae},Ne=o?(Se,Pe)=>{let dt=we(Se,Pe);return vl.createElement(Z2.Provider,{key:dt,value:{...Ie,order:Pe,item:Se,itemKey:dt,registerSize:Ce,display:Pe<=V}},o(Se,Pe))}:(Se,Pe)=>{let dt=we(Se,Pe);return vl.createElement(a1,Dn({},Ie,{order:Pe,key:dt,item:Se,renderItem:_e,itemKey:dt,registerSize:Ce,display:Pe<=V}))},Je={order:Ue?V:Number.MAX_SAFE_INTEGER,className:`${re}-rest`,registerSize:qe,display:Ue},gt=v||Cbe,et=y?vl.createElement(Z2.Provider,{value:{...Ie,...Je}},y(fe)):vl.createElement(a1,Dn({},Ie,Je),typeof gt=="function"?gt(fe):gt),Ve=vl.createElement(k,Dn({className:te(!ae&&r,h),style:p,ref:t},D),w&&vl.createElement(a1,Dn({},Ie,{responsive:se,responsiveDisabled:!ue,order:-1,className:`${re}-prefix`,registerSize:Ae,display:!0}),w),le.map(Ne),he?et:null,x&&vl.createElement(a1,Dn({},Ie,{responsive:se,responsiveDisabled:!ue,order:V,className:`${re}-suffix`,registerSize:Be,display:!0,style:He}),x));return se?vl.createElement(Ea,{onResize:De,disabled:!ue},Ve):Ve}var J2=vl.forwardRef(Sbe);J2.Item=kbe;J2.RESPONSIVE=IW;J2.INVALIDATE=MW;var Fbe=J2,sf=Fbe;var cf=B(_()),TA=B(_()),Bs=TA.createContext(null);function Dbe(e,t){let r={...e};return Object.keys(t).forEach(n=>{let a=t[n];a!==void 0&&(r[n]=a)}),r}function u1({children:e,locked:t,...r}){let n=TA.useContext(Bs),a=Om(()=>Dbe(n,r),[n,r],(o,l)=>!t&&(o[0]!==l[0]||!yc(o[1],l[1],!0)));return TA.createElement(Bs.Provider,{value:a},e)}var E0=B(_()),Abe=[],zW=E0.createContext(null);function i6(){return E0.useContext(zW)}var HW=E0.createContext(Abe);function k0(e){let t=E0.useContext(HW);return E0.useMemo(()=>e!==void 0?[...t,e]:t,[t,e])}var qW=E0.createContext(null),TW=B(_());function WA(e,t){return Hr(e).map((r,n)=>{if(TW.isValidElement(r)){let{key:a}=r,o=r.props?.eventKey??a;return o==null&&(o=`tmp_key-${[...t,n].join("-")}`),TW.cloneElement(r,{key:o,eventKey:o})}return r})}function r6(){return r6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r6.apply(this,arguments)}var $be=cf.forwardRef((e,t)=>{let{className:r,title:n,eventKey:a,children:o,...l}=e,{prefixCls:c,classNames:d,styles:p}=cf.useContext(Bs),h=`${c}-item-group`;return cf.createElement("li",r6({ref:t,role:"presentation"},l,{onClick:g=>g.stopPropagation(),className:te(h,r)}),cf.createElement("div",{role:"presentation",className:te(`${h}-title`,d?.listTitle),style:p?.listTitle,title:typeof n=="string"?n:void 0},n),cf.createElement("ul",{role:"group",className:te(`${h}-list`,d?.list),style:p?.list},o))}),Bbe=cf.forwardRef((e,t)=>{let{eventKey:r,children:n}=e,a=k0(r),o=WA(n,a);return i6()?o:cf.createElement($be,r6({ref:t},wr(e,["warnKey"])),o)}),VA=Bbe,Rr=B(_()),Ibe=B(_()),Mbe=B(er()),WW=B(_()),VW=WW.createContext(null);function UW(e,t){return`${e}-${t}`}function KW(e){let t=WW.useContext(VW);return UW(t,e)}var Tbe=B(_()),jbe=Tbe.createContext({}),UA=jbe,IA=B(_()),{LEFT:jA,RIGHT:_A,UP:PA,DOWN:e6,ENTER:t6,ESC:GW,HOME:o1,END:s1}=On,jW=[PA,e6,jA,_A];function _be(e,t,r,n){let a="prev",o="next",l="children",c="parent";if(e==="inline"&&n===t6)return{inlineTrigger:!0};let d={[PA]:a,[e6]:o},p={[jA]:r?o:a,[_A]:r?a:o,[e6]:l,[t6]:l},h={[PA]:a,[e6]:o,[t6]:l,[GW]:c,[jA]:r?l:c,[_A]:r?c:l};switch({inline:d,horizontal:p,vertical:h,inlineSub:d,horizontalSub:h,verticalSub:h}[`${e}${t?"":"Sub"}`]?.[n]){case a:return{offset:-1,sibling:!0};case o:return{offset:1,sibling:!0};case c:return{offset:-1,sibling:!1};case l:return{offset:1,sibling:!1};default:return null}}function Pbe(e){let t=e;for(;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function Nbe(e,t){let r=e||document.activeElement;for(;r;){if(t.has(r))return r;r=r.parentElement}return null}function KA(e,t){return dv(e,!0).filter(r=>t.has(r))}function _W(e,t,r,n=1){if(!e)return null;let a=KA(e,t),o=a.length,l=a.findIndex(c=>r===c);return n<0?l===-1?l=o-1:l-=1:n>0&&(l+=1),l=(l+o)%o,a[l]}var n6=(e,t)=>{let r=new Set,n=new Map,a=new Map;return e.forEach(o=>{let l=document.querySelector(`[data-menu-id='${UW(t,o)}']`);l&&(r.add(l),a.set(l,o),n.set(o,l))}),{elements:r,key2element:n,element2key:a}};function Obe(e,t,r,n,a,o,l,c,d,p){let h=IA.useRef(void 0),g=IA.useRef(void 0);g.current=t;let v=()=>{pr.cancel(h.current)};return IA.useEffect(()=>()=>{v()},[]),y=>{let{which:w}=y;if([...jW,t6,GW,o1,s1].includes(w)){let x=o(),k=n6(x,n),{elements:F,key2element:C,element2key:D}=k,S=C.get(t),A=Nbe(S,F),I=D.get(A),j=_be(e,l(I,!0).length===1,r,w);if(!j&&w!==o1&&w!==s1)return;(jW.includes(w)||[o1,s1].includes(w))&&y.preventDefault();let $=P=>{if(P){let N=P,R=P.querySelector("a");R?.getAttribute("href")&&(N=R);let U=D.get(P);c(U),v(),h.current=pr(()=>{g.current===U&&N.focus()})}};if([o1,s1].includes(w)||j.sibling||!A){let P;!A||e==="inline"?P=a.current:P=Pbe(A);let N,R=KA(P,F);w===o1?N=R[0]:w===s1?N=R[R.length-1]:N=_W(P,F,A,j.offset),$(N)}else if(j.inlineTrigger)d(I);else if(j.offset>0)d(I,!0),v(),h.current=pr(()=>{k=n6(x,n);let P=A.getAttribute("aria-controls"),N=document.getElementById(P),R=_W(N,k.elements);$(R)},5);else if(j.offset<0){let P=l(I,!0),N=P[P.length-2],R=C.get(N);d(N,!1),$(R)}}p?.(y)}}var MA=B(_()),bl=B(_());function Rbe(e){Promise.resolve().then(e)}var GA="__RC_UTIL_PATH_SPLIT__",PW=e=>e.join(GA),Lbe=e=>e.split(GA),NA="rc-menu-more";function zbe(){let[,e]=MA.useState({}),t=(0,bl.useRef)(new Map),r=(0,bl.useRef)(new Map),[n,a]=MA.useState([]),o=(0,bl.useRef)(0),l=(0,bl.useRef)(!1),c=()=>{l.current||e({})},d=(0,bl.useCallback)((x,k)=>{let F=PW(k);r.current.set(F,x),t.current.set(x,F),o.current+=1;let C=o.current;Rbe(()=>{C===o.current&&c()})},[]),p=(0,bl.useCallback)((x,k)=>{let F=PW(k);r.current.delete(F),t.current.delete(x)},[]),h=(0,bl.useCallback)(x=>{a(x)},[]),g=(0,bl.useCallback)((x,k)=>{let F=t.current.get(x)||"",C=Lbe(F);return k&&n.includes(C[0])&&C.unshift(NA),C},[n]),v=(0,bl.useCallback)((x,k)=>x.filter(F=>F!==void 0).some(F=>g(F,!0).includes(k)),[g]),y=()=>{let x=[...t.current.keys()];return n.length&&x.push(NA),x},w=(0,bl.useCallback)(x=>{let k=`${t.current.get(x)}${GA}`,F=new Set;return[...r.current.keys()].forEach(C=>{C.startsWith(k)&&F.add(r.current.get(C))}),F},[]);return MA.useEffect(()=>()=>{l.current=!0},[]),{registerPath:d,unregisterPath:p,refreshOverflowKeys:h,isSubPathKey:v,getKeyPath:g,getKeys:y,getSubPathKeys:w}}var NW=B(_());function l1(e){let t=NW.useRef(e);t.current=e;let r=NW.useCallback((...n)=>t.current?.(...n),[]);return e?r:void 0}var Yo=B(_()),Hbe=B(_());function XW(e,t,r,n){let{activeKey:a,onActive:o,onInactive:l}=Hbe.useContext(Bs),c={active:a===e};return t||(c.onMouseEnter=d=>{r?.({key:e,domEvent:d}),o(e)},c.onMouseLeave=d=>{n?.({key:e,domEvent:d}),l(e)}),c}var qbe=B(_());function YW(e){let{mode:t,rtl:r,inlineIndent:n}=qbe.useContext(Bs);if(t!=="inline")return null;let a=e;return r?{paddingRight:a*n}:{paddingLeft:a*n}}var Wbe=B(_());function QW({icon:e,props:t,children:r}){let n;return e===null||e===!1?null:(typeof e=="function"?n=Wbe.createElement(e,{...t}):typeof e!="boolean"&&(n=e),n||r||null)}function a6({item:e,...t}){return Object.defineProperty(t,"item",{get:()=>(xa(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function c1(){return c1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c1.apply(this,arguments)}var Vbe=class extends Yo.Component{render(){let{title:e,attribute:t,elementRef:r,...n}=this.props,a=wr(n,["eventKey","popupClassName","popupOffset","onTitleClick"]);return xa(!t,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),Yo.createElement(sf.Item,c1({},t,{title:typeof e=="string"?e:void 0},a,{ref:r}))}},Ube=Yo.forwardRef((e,t)=>{let{style:r,className:n,eventKey:a,warnKey:o,disabled:l,itemIcon:c,children:d,itemData:p,role:h,onMouseEnter:g,onMouseLeave:v,onClick:y,onKeyDown:w,onFocus:x,...k}=e,F=KW(a),{prefixCls:C,onItemClick:D,disabled:S,overflowDisabled:A,itemIcon:I,selectedKeys:j,onActive:$}=Yo.useContext(Bs),{_internalRenderMenuItem:P}=Yo.useContext(UA),N=`${C}-item`,R=Yo.useRef(null),U=Yo.useRef(null),H=S||l,q=jo(t,U),L=k0(a),O=J=>{let se=p||{key:a||"",label:d,itemIcon:c,extra:e.extra,title:e.title};return{key:a,keyPath:[...L].reverse(),item:R.current,domEvent:J,itemData:p||se}},W=c||I,{active:z,...Y}=XW(a,H,g,v),G=j.includes(a),Z=YW(L.length),T=J=>{if(H)return;let se=O(J);y?.(a6(se)),D(se)},V=J=>{if(w?.(J),J.which===On.ENTER){let se=O(J);y?.(a6(se)),D(se)}},X=J=>{$(a),x?.(J)},Q={};e.role==="option"&&(Q["aria-selected"]=G);let re=Yo.createElement(Vbe,c1({ref:R,elementRef:q,role:h===null?"none":h||"menuitem",tabIndex:l?null:-1,"data-menu-id":A&&F?null:F},wr(k,["extra"]),Y,Q,{component:"li","aria-disabled":l,style:{...Z,...r},className:te(N,{[`${N}-active`]:z,[`${N}-selected`]:G,[`${N}-disabled`]:H},n),onClick:T,onKeyDown:V,onFocus:X}),d,Yo.createElement(QW,{props:{...e,isSelected:G},icon:W}));return P&&(re=P(re,e,{selected:G})),re});function Kbe(e,t){let{eventKey:r}=e,n=i6(),a=k0(r);return Yo.useEffect(()=>{if(n)return n.registerPath(r,a),()=>{n.unregisterPath(r,a)}},[a]),n?null:Yo.createElement(Ube,c1({},e,{ref:t}))}var C0=Yo.forwardRef(Kbe),cn=B(_()),OA=B(_());function RA(){return RA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},RA.apply(this,arguments)}var Gbe=({className:e,children:t,...r},n)=>{let{prefixCls:a,mode:o,rtl:l}=OA.useContext(Bs);return OA.createElement("ul",RA({className:te(a,l&&`${a}-rtl`,`${a}-sub`,`${a}-${o==="inline"?"inline":"vertical"}`,e),role:"menu"},r,{"data-menu-list":!0,ref:n}),t)},Xbe=OA.forwardRef(Gbe),ZW=Xbe,v0=B(_()),Qa={adjustX:1,adjustY:1},Ybe={topLeft:{points:["bl","tl"],overflow:Qa},topRight:{points:["br","tr"],overflow:Qa},bottomLeft:{points:["tl","bl"],overflow:Qa},bottomRight:{points:["tr","br"],overflow:Qa},leftTop:{points:["tr","tl"],overflow:Qa},leftBottom:{points:["br","bl"],overflow:Qa},rightTop:{points:["tl","tr"],overflow:Qa},rightBottom:{points:["bl","br"],overflow:Qa}},Qbe={topLeft:{points:["bl","tl"],overflow:Qa},topRight:{points:["br","tr"],overflow:Qa},bottomLeft:{points:["tl","bl"],overflow:Qa},bottomRight:{points:["tr","br"],overflow:Qa},rightTop:{points:["tr","tl"],overflow:Qa},rightBottom:{points:["br","bl"],overflow:Qa},leftTop:{points:["tl","tr"],overflow:Qa},leftBottom:{points:["bl","br"],overflow:Qa}};function JW(e,t,r){if(t)return t;if(r)return r[e]||r.other}var Zbe={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Jbe({prefixCls:e,visible:t,children:r,popup:n,popupStyle:a,popupClassName:o,popupOffset:l,disabled:c,mode:d,onVisibleChange:p}){let{getPopupContainer:h,rtl:g,subMenuOpenDelay:v,subMenuCloseDelay:y,builtinPlacements:w,triggerSubMenuAction:x,forceSubMenuRender:k,rootClassName:F,motion:C,defaultMotions:D}=v0.useContext(Bs),[S,A]=v0.useState(!1),I=g?{...Qbe,...w}:{...Ybe,...w},j=Zbe[d],$=JW(d,C,D),P=v0.useRef($);d!=="inline"&&(P.current=$);let N={...P.current,leavedClassName:`${e}-hidden`,removeOnLeave:!1,motionAppear:!0},R=v0.useRef(void 0);return v0.useEffect(()=>(R.current=pr(()=>{A(t)}),()=>{pr.cancel(R.current)}),[t]),v0.createElement(Wm,{prefixCls:e,popupClassName:te(`${e}-popup`,{[`${e}-rtl`]:g},o,F),stretch:d==="horizontal"?"minWidth":null,getPopupContainer:h,builtinPlacements:I,popupPlacement:j,popupVisible:S,popup:n,popupStyle:a,popupAlign:l&&{offset:l},action:c?[]:[x],mouseEnterDelay:v,mouseLeaveDelay:y,onPopupVisibleChange:p,forceRender:k,popupMotion:N,fresh:!0},r)}var lf=B(_());function LA(){return LA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},LA.apply(this,arguments)}function e1e({id:e,open:t,keyPath:r,children:n}){let a="inline",{prefixCls:o,forceSubMenuRender:l,motion:c,defaultMotions:d,mode:p}=lf.useContext(Bs),h=lf.useRef(!1);h.current=p===a;let[g,v]=lf.useState(!h.current),y=h.current?t:!1;lf.useEffect(()=>{h.current&&v(!1)},[p]);let w={...JW(a,c,d)};r.length>1&&(w.motionAppear=!1);let x=w.onVisibleChanged;return w.onVisibleChanged=k=>(!h.current&&!k&&v(!0),x?.(k)),g?null:lf.createElement(u1,{mode:a,locked:!h.current},lf.createElement(Yn,LA({visible:y},w,{forceRender:l,removeOnLeave:!1,leavedClassName:`${o}-hidden`}),({className:k,style:F})=>lf.createElement(ZW,{id:e,className:k,style:F},n)))}function d1(){return d1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d1.apply(this,arguments)}var t1e=cn.forwardRef((e,t)=>{let{style:r,className:n,styles:a,classNames:o,title:l,itemTitle:c,eventKey:d,warnKey:p,disabled:h,internalPopupClose:g,children:v,itemIcon:y,expandIcon:w,popupClassName:x,popupOffset:k,popupStyle:F,onClick:C,onMouseEnter:D,onMouseLeave:S,onTitleClick:A,onTitleMouseEnter:I,onTitleMouseLeave:j,popupRender:$,...P}=e,N=KW(d),{prefixCls:R,mode:U,openKeys:H,disabled:q,overflowDisabled:L,activeKey:O,selectedKeys:W,itemIcon:z,expandIcon:Y,onItemClick:G,onOpenChange:Z,onActive:T,popupRender:V}=cn.useContext(Bs),{_internalRenderSubMenuItem:X}=cn.useContext(UA),{isSubPathKey:Q}=cn.useContext(qW),re=k0(),J=`${R}-submenu`,se=q||h,ue=cn.useRef(null),ae=cn.useRef(null),he=y??z,le=w??Y,fe=H.includes(d),we=!L&&fe,_e=Q(W,d),{active:$e,...De}=XW(d,se,I,j),[Ce,qe]=cn.useState(!1),Ae=je=>{se||qe(je)},Be=je=>{Ae(!0),D?.({key:d,domEvent:je})},Me=je=>{Ae(!1),S?.({key:d,domEvent:je})},Ue=cn.useMemo(()=>$e||(U!=="inline"?Ce||Q([O],d):!1),[U,$e,O,Ce,d,Q]),He=YW(re.length),Ie=je=>{se||(A?.({key:d,domEvent:je}),U==="inline"&&Z(d,!fe))},Ne=l1(je=>{C?.(a6(je)),G(je)}),Je=je=>{U!=="inline"&&Z(d,je)},gt=()=>{T(d)},et=N&&`${N}-popup`,Ve=cn.useMemo(()=>cn.createElement(QW,{icon:U!=="horizontal"?le:void 0,props:{...e,isOpen:we,isSubMenu:!0}},cn.createElement("i",{className:`${J}-arrow`})),[U,le,e,we,J]),Se=cn.createElement("div",d1({role:"menuitem",style:He,className:`${J}-title`,tabIndex:se?null:-1,ref:ue,title:c??(typeof l=="string"?l:null),"data-menu-id":L&&N?null:N,"aria-expanded":we,"aria-haspopup":!0,"aria-controls":et,"aria-disabled":se,onClick:Ie,onFocus:gt},De),l,Ve),Pe=cn.useRef(U);U!=="inline"&&re.length>1?Pe.current="vertical":Pe.current=U;let dt=Pe.current,at=cn.useMemo(()=>{let je=cn.createElement(u1,{classNames:o,styles:a,mode:dt==="horizontal"?"vertical":dt},cn.createElement(ZW,{id:et,ref:ae},v)),rt=$||V;return rt?rt(je,{item:e,keys:re}):je},[$,V,re,et,v,e,dt]);if(!L){let je=Pe.current;Se=cn.createElement(Jbe,{mode:je,prefixCls:J,visible:!g&&we&&U!=="inline",popupClassName:x,popupOffset:k,popupStyle:F,popup:at,disabled:se,onVisibleChange:Je},Se)}let Ke=cn.createElement(sf.Item,d1({ref:t,role:"none"},P,{component:"li",style:r,className:te(J,`${J}-${U}`,n,{[`${J}-open`]:we,[`${J}-active`]:Ue,[`${J}-selected`]:_e,[`${J}-disabled`]:se}),onMouseEnter:Be,onMouseLeave:Me}),Se,!L&&cn.createElement(e1e,{id:et,open:we,keyPath:re},v));return X&&(Ke=X(Ke,e,{selected:_e,active:Ue,open:we,disabled:se})),cn.createElement(u1,{classNames:o,styles:a,onItemClick:Ne,mode:U==="horizontal"?"vertical":U,itemIcon:he,expandIcon:le},Ke)}),r1e=cn.forwardRef((e,t)=>{let{eventKey:r,children:n}=e,a=k0(r),o=WA(n,a),l=i6();cn.useEffect(()=>{if(l)return l.registerPath(r,a),()=>{l.unregisterPath(r,a)}},[a]);let c;return l?c=o:c=cn.createElement(t1e,d1({ref:t},e),o),cn.createElement(HW.Provider,{value:a},c)}),o6=r1e,od=B(_()),OW=B(_());function XA({className:e,style:t}){let{prefixCls:r}=OW.useContext(Bs);return i6()?null:OW.createElement("li",{role:"separator",className:te(`${r}-item-divider`,e),style:t})}function x0(){return x0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},x0.apply(this,arguments)}function zA(e,t,r){let{item:n,group:a,submenu:o,divider:l}=t;return(e||[]).map((c,d)=>{if(c&&typeof c=="object"){let{label:p,children:h,key:g,type:v,extra:y,...w}=c,x=g??`tmp-${d}`;if(h||v==="group"){if(v==="group")return od.createElement(a,x0({key:x},w,{title:p}),zA(h,t,r));let{title:F,...C}=w;return od.createElement(o,x0({key:x},C,{title:p,itemTitle:typeof F=="string"?F:void 0}),zA(h,t,r))}if(v==="divider")return od.createElement(l,x0({key:x},w));let k=!!y||y===0;return od.createElement(n,x0({key:x},w,{extra:y,itemData:{...c,key:x}}),k?od.createElement(od.Fragment,null,od.createElement("span",{className:`${r}-item-label`},p),od.createElement("span",{className:`${r}-item-extra`},y)):p)}return null}).filter(c=>c)}function RW(e,t,r,n,a){let o=e,l={divider:XA,item:C0,group:VA,submenu:o6,...n};return t&&(o=zA(t,l,a)),WA(o,r)}function HA(){return HA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},HA.apply(this,arguments)}var uf=[],n1e=Rr.forwardRef((e,t)=>{let{prefixCls:r="rc-menu",rootClassName:n,style:a,className:o,styles:l,classNames:c,tabIndex:d=0,items:p,children:h,direction:g,id:v,mode:y="vertical",inlineCollapsed:w,disabled:x,disabledOverflow:k,subMenuOpenDelay:F=.1,subMenuCloseDelay:C=.1,forceSubMenuRender:D,defaultOpenKeys:S,openKeys:A,activeKey:I,defaultActiveFirst:j,selectable:$=!0,multiple:P=!1,defaultSelectedKeys:N,selectedKeys:R,onSelect:U,onDeselect:H,inlineIndent:q=24,motion:L,defaultMotions:O,triggerSubMenuAction:W="hover",builtinPlacements:z,itemIcon:Y,expandIcon:G,overflowedIndicator:Z="...",overflowedIndicatorPopupClassName:T,getPopupContainer:V,onClick:X,onOpenChange:Q,onKeyDown:re,openAnimation:J,openTransitionName:se,_internalRenderMenuItem:ue,_internalRenderSubMenuItem:ae,_internalComponents:he,popupRender:le,...fe}=e,[we,_e]=Rr.useMemo(()=>[RW(h,p,uf,he,r),RW(h,p,uf,{},r)],[h,p,he]),[$e,De]=Rr.useState(!1),Ce=Rr.useRef(null),qe=Xs(),Ae=v??`rc-menu-uuid-${qe}`,Be=g==="rtl",[Me,Ue]=yr(S,A),He=Me||uf,Ie=(ft,It=!1)=>{function dr(){Ue(ft),Q?.(ft)}It?(0,Mbe.flushSync)(dr):dr()},[Ne,Je]=Rr.useState(He),gt=Rr.useRef(!1),[et,Ve]=Rr.useMemo(()=>(y==="inline"||y==="vertical")&&w?["vertical",w]:[y,!1],[y,w]),Se=et==="inline",[Pe,dt]=Rr.useState(et),[at,Ke]=Rr.useState(Ve);Rr.useEffect(()=>{dt(et),Ke(Ve),gt.current&&(Se?Ue(Ne):Ie(uf))},[et,Ve]);let[je,rt]=Rr.useState(0),$t=je>=we.length-1||Pe!=="horizontal"||k;Rr.useEffect(()=>{Se&&Je(He)},[He]),Rr.useEffect(()=>(gt.current=!0,()=>{gt.current=!1}),[]);let{registerPath:Bt,unregisterPath:Kr,refreshOverflowKeys:zt,isSubPathKey:$r,getKeyPath:Kt,getKeys:St,getSubPathKeys:nr}=zbe(),Sr=Rr.useMemo(()=>({registerPath:Bt,unregisterPath:Kr}),[Bt,Kr]),Rt=Rr.useMemo(()=>({isSubPathKey:$r}),[$r]);Rr.useEffect(()=>{zt($t?uf:we.slice(je+1).map(ft=>ft.key))},[je,$t]);let[ot,vt]=yr(I||j&&we[0]?.key,I),Oe=l1(ft=>{vt(ft)}),Qe=l1(()=>{vt(void 0)});(0,Ibe.useImperativeHandle)(t,()=>({list:Ce.current,focus:ft=>{let It=St(),{elements:dr,key2element:Cn,element2key:_a}=n6(It,Ae),sr=KA(Ce.current,dr),ri;ot&&It.includes(ot)?ri=ot:ri=sr[0]?_a.get(sr[0]):we.find(Fr=>!Fr.props.disabled)?.key;let Pa=Cn.get(ri);ri&&Pa&&Pa?.focus?.(ft)},findItem:({key:ft})=>{let It=St(),{key2element:dr}=n6(It,Ae);return dr.get(ft)||null}}));let[it,Re]=yr(N||[],R),Ze=Rr.useMemo(()=>Array.isArray(it)?it:it==null?uf:[it],[it]),pt=ft=>{if($){let{key:It}=ft,dr=Ze.includes(It),Cn;P?dr?Cn=Ze.filter(sr=>sr!==It):Cn=[...Ze,It]:Cn=[It],Re(Cn);let _a={...ft,selectedKeys:Cn};dr?H?.(_a):U?.(_a)}!P&&He.length&&Pe!=="inline"&&Ie(uf)},Ht=l1(ft=>{X?.(a6(ft)),pt(ft)}),qt=l1((ft,It)=>{let dr=He.filter(Cn=>Cn!==ft);if(It)dr.push(ft);else if(Pe!=="inline"){let Cn=nr(ft);dr=dr.filter(_a=>!Cn.has(_a))}yc(He,dr,!0)||Ie(dr,!0)}),Jr=Obe(Pe,ot,Be,Ae,Ce,St,Kt,vt,(ft,It)=>{let dr=It??!He.includes(ft);qt(ft,dr)},re);Rr.useEffect(()=>{De(!0)},[]);let Tr=Rr.useMemo(()=>({_internalRenderMenuItem:ue,_internalRenderSubMenuItem:ae}),[ue,ae]),Gt=Pe!=="horizontal"||k?we:we.map((ft,It)=>Rr.createElement(u1,{key:ft.key,overflowDisabled:It>je,classNames:c,styles:l},ft)),Lr=Rr.createElement(sf,HA({id:v,ref:Ce,prefixCls:`${r}-overflow`,component:"ul",itemComponent:C0,className:te(r,`${r}-root`,`${r}-${Pe}`,o,{[`${r}-inline-collapsed`]:at,[`${r}-rtl`]:Be},n),dir:g,style:a,role:"menu",tabIndex:d,data:Gt,renderRawItem:ft=>ft,renderRawRest:ft=>{let It=ft.length,dr=It?we.slice(-It):null;return Rr.createElement(o6,{eventKey:NA,title:Z,disabled:$t,internalPopupClose:It===0,popupClassName:T},dr)},maxCount:Pe!=="horizontal"||k?sf.INVALIDATE:sf.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:ft=>{rt(ft)},onKeyDown:Jr},fe));return Rr.createElement(UA.Provider,{value:Tr},Rr.createElement(VW.Provider,{value:Ae},Rr.createElement(u1,{prefixCls:r,rootClassName:n,classNames:c,styles:l,mode:Pe,openKeys:He,rtl:Be,disabled:x,motion:$e?L:null,defaultMotions:$e?O:null,activeKey:ot,onActive:Oe,onInactive:Qe,selectedKeys:Ze,inlineIndent:q,subMenuOpenDelay:F,subMenuCloseDelay:C,forceSubMenuRender:D,builtinPlacements:z,triggerSubMenuAction:W,getPopupContainer:V,itemIcon:Y,expandIcon:G,onItemClick:Ht,onOpenChange:qt,popupRender:le},Rr.createElement(qW.Provider,{value:Rt},Lr),Rr.createElement("div",{style:{display:"none"},"aria-hidden":!0},Rr.createElement(zW.Provider,{value:Sr},_e)))))}),a1e=n1e,p1=a1e;p1.Item=C0;p1.SubMenu=o6;p1.ItemGroup=VA;p1.Divider=XA;var YA=p1,$s=B(_()),LW=B(_()),{ESC:i1e,TAB:o1e}=On;function s1e({visible:e,triggerRef:t,onVisibleChange:r,autoFocus:n,overlayRef:a}){let o=LW.useRef(!1),l=()=>{e&&(t.current?.focus?.(),r?.(!1))},c=()=>a.current?.focus?(a.current.focus(),o.current=!0,!0):!1,d=p=>{switch(p.keyCode){case i1e:l();break;case o1e:{let h=!1;o.current||(h=c()),h?p.preventDefault():l();break}}};LW.useEffect(()=>e?(window.addEventListener("keydown",d),n&&pr(c,3),()=>{window.removeEventListener("keydown",d),o.current=!1}):()=>{o.current=!1},[e])}var b0=B(_()),l1e=(0,b0.forwardRef)((e,t)=>{let{overlay:r,arrow:n,prefixCls:a}=e,o=(0,b0.useMemo)(()=>{let c;return typeof r=="function"?c=r():c=r,c},[r]),l=ln(t,Ys(o));return b0.default.createElement(b0.default.Fragment,null,n&&b0.default.createElement("div",{className:`${a}-arrow`}),b0.default.cloneElement(o,{ref:ru(o)?l:void 0}))}),u1e=l1e,y0={adjustX:1,adjustY:1},w0=[0,0],c1e={topLeft:{points:["bl","tl"],overflow:y0,offset:[0,-4],targetOffset:w0},top:{points:["bc","tc"],overflow:y0,offset:[0,-4],targetOffset:w0},topRight:{points:["br","tr"],overflow:y0,offset:[0,-4],targetOffset:w0},bottomLeft:{points:["tl","bl"],overflow:y0,offset:[0,4],targetOffset:w0},bottom:{points:["tc","bc"],overflow:y0,offset:[0,4],targetOffset:w0},bottomRight:{points:["tr","br"],overflow:y0,offset:[0,4],targetOffset:w0}},d1e=c1e;function qA(){return qA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qA.apply(this,arguments)}var p1e=$s.default.forwardRef((e,t)=>{let{arrow:r=!1,prefixCls:n="rc-dropdown",transitionName:a,animation:o,align:l,placement:c="bottomLeft",placements:d=d1e,getPopupContainer:p,showAction:h,hideAction:g,overlayClassName:v,overlayStyle:y,visible:w,trigger:x=["hover"],autoFocus:k,overlay:F,children:C,onVisibleChange:D,disabled:S,...A}=e,[I,j]=$s.default.useState(),$="visible"in e?w:I,P=o?`${n}-${o}`:a,N=$s.default.useRef(null),R=$s.default.useRef(null),U=$s.default.useRef(null);$s.default.useImperativeHandle(t,()=>N.current);let H=X=>{j(X),D?.(X)};s1e({visible:$,triggerRef:U,onVisibleChange:H,autoFocus:k,overlayRef:R});let q=X=>{let{onOverlayClick:Q}=e;j(!1),Q&&Q(X)},L=()=>$s.default.createElement(u1e,{ref:R,overlay:F,prefixCls:n,arrow:r}),O=()=>typeof F=="function"?L:L(),W=()=>{let{minOverlayWidthMatchTrigger:X,alignPoint:Q}=e;return"minOverlayWidthMatchTrigger"in e?X:!Q},z=()=>{let{openClassName:X}=e;return X!==void 0?X:`${n}-open`},Y=C,G=te(Y.props?.className,$&&z()),Z={className:G,ref:ln(U,Ys(Y))},T=ru(Y)?$s.default.cloneElement(Y,Z):$s.default.createElement("span",{className:G,ref:U},$s.default.cloneElement(Y,{className:G})),V=g;return!V&&x.indexOf("contextMenu")!==-1&&(V=["click"]),$s.default.createElement(Wm,qA({builtinPlacements:d},A,{prefixCls:n,ref:N,popupClassName:te(v,{[`${n}-show-arrow`]:r}),popupStyle:y,action:x,showAction:h,hideAction:V,popupPlacement:c,popupAlign:l,popupMotion:{motionName:P},popupVisible:$,stretch:W()?"minWidth":"",popup:O(),onOpenChange:H,onPopupClick:q,getPopupContainer:p}),T)}),f1e=p1e,QA=f1e;var eV=B(_()),m1e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},h1e=m1e;function ZA(){return ZA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ZA.apply(this,arguments)}var g1e=(e,t)=>eV.createElement(Ut,ZA({},e,{ref:t,icon:h1e})),v1e=eV.forwardRef(g1e),JA=v1e;var tV=B(_()),b1e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},y1e=b1e;function e9(){return e9=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e9.apply(this,arguments)}var w1e=(e,t)=>tV.createElement(Ut,e9({},e,{ref:t,icon:y1e})),x1e=tV.forwardRef(w1e),t9=x1e;var Su=B(_()),df=B(_()),f1=B(_()),E1e=B(_()),o9=(0,E1e.createContext)(null),k1e=B(_()),Li=B(_()),aa=B(_()),s6=B(_()),C1e=e=>{let{activeTabOffset:t,horizontal:r,rtl:n,indicator:a={}}=e,{size:o,align:l="center"}=a,[c,d]=(0,s6.useState)(),p=(0,s6.useRef)(void 0),h=s6.default.useCallback(v=>typeof o=="function"?o(v):typeof o=="number"?o:v,[o]);function g(){pr.cancel(p.current)}return(0,s6.useEffect)(()=>{let v={};if(t)if(r){v.width=h(t.width);let y=n?"right":"left";l==="start"&&(v[y]=t[y]),l==="center"&&(v[y]=t[y]+t.width/2,v.transform=n?"translateX(50%)":"translateX(-50%)"),l==="end"&&(v[y]=t[y]+t.width,v.transform="translateX(-100%)")}else v.height=h(t.height),l==="start"&&(v.top=t.top),l==="center"&&(v.top=t.top+t.height/2,v.transform="translateY(-50%)"),l==="end"&&(v.top=t.top+t.height,v.transform="translateY(-100%)");return g(),p.current=pr(()=>{c&&v&&Object.keys(v).every(y=>{let w=v[y],x=c[y];return typeof w=="number"&&typeof x=="number"?Math.round(w)===Math.round(x):w===x})||d(v)}),g},[JSON.stringify(t),r,n,l,h]),{style:c}},S1e=C1e,F1e=B(_()),rV={width:0,height:0,left:0,top:0};function D1e(e,t,r){return(0,F1e.useMemo)(()=>{let n=new Map,a=t.get(e[0]?.key)||rV,o=a.left+a.width;for(let l=0;l<e.length;l+=1){let{key:c}=e[l],d=t.get(c);d||(d=t.get(e[l-1]?.key)||rV);let p=n.get(c)||{...d};p.right=o-p.left-p.width,n.set(c,p)}return n},[e.map(n=>n.key).join("_"),t,r])}var nV=B(_());function aV(e,t){let r=nV.useRef(e),[,n]=nV.useState({});function a(o){let l=typeof o=="function"?o(r.current):o;l!==r.current&&t(l,r.current),r.current=l,n({})}return[r.current,a]}var A1e=B(_()),pf=B(_()),$1e=.1,iV=.01,c6=20,oV=.995**c6;function B1e(e,t){let[r,n]=(0,pf.useState)(),[a,o]=(0,pf.useState)(0),[l,c]=(0,pf.useState)(0),[d,p]=(0,pf.useState)(),h=(0,pf.useRef)(void 0);function g(F){let{screenX:C,screenY:D}=F.touches[0];n({x:C,y:D}),window.clearInterval(h.current)}function v(F){if(!r)return;let{screenX:C,screenY:D}=F.touches[0];n({x:C,y:D});let S=C-r.x,A=D-r.y;t(S,A);let I=Date.now();o(I),c(I-a),p({x:S,y:A})}function y(){if(r&&(n(null),p(null),d)){let F=d.x/l,C=d.y/l,D=Math.abs(F),S=Math.abs(C);if(Math.max(D,S)<$1e)return;let A=F,I=C;h.current=window.setInterval(()=>{if(Math.abs(A)<iV&&Math.abs(I)<iV){window.clearInterval(h.current);return}A*=oV,I*=oV,t(A*c6,I*c6)},c6)}}let w=(0,pf.useRef)(void 0);function x(F){let{deltaX:C,deltaY:D}=F,S,A=Math.abs(C),I=Math.abs(D);A===I?S=w.current==="x"?C:D:A>I?(S=C,w.current="x"):(S=D,w.current="y"),t(-S,-S)&&F.preventDefault()}let k=(0,pf.useRef)(null);k.current={onTouchStart:g,onTouchMove:v,onTouchEnd:y,onWheel:x},A1e.useEffect(()=>{function F(A){k.current.onTouchStart(A)}function C(A){k.current.onTouchMove(A)}function D(A){k.current.onTouchEnd(A)}function S(A){k.current.onWheel(A)}return document.addEventListener("touchmove",C,{passive:!1}),document.addEventListener("touchend",D,{passive:!0}),e.current.addEventListener("touchstart",F,{passive:!0}),e.current.addEventListener("wheel",S,{passive:!1}),()=>{document.removeEventListener("touchmove",C),document.removeEventListener("touchend",D)}},[])}var F0=B(_());function fV(e){let[t,r]=(0,F0.useState)(0),n=(0,F0.useRef)(0),a=(0,F0.useRef)(void 0);return a.current=e,HS(()=>{a.current?.()},[t]),()=>{n.current===t&&(n.current+=1,r(n.current))}}function I1e(e){let t=(0,F0.useRef)([]),[,r]=(0,F0.useState)({}),n=(0,F0.useRef)(typeof e=="function"?e():e),a=fV(()=>{let l=n.current;t.current.forEach(c=>{l=c(l)}),t.current=[],n.current=l,r({})});function o(l){t.current.push(l),a()}return[n.current,o]}var M1e=B(_()),sV={width:0,height:0,left:0,top:0,right:0};function T1e(e,t,r,n,a,o,{tabs:l,tabPosition:c,rtl:d}){let p,h,g;return["top","bottom"].includes(c)?(p="width",h=d?"right":"left",g=Math.abs(r)):(p="height",h="top",g=-r),(0,M1e.useMemo)(()=>{if(!l.length)return[0,0];let v=l.length,y=v;for(let x=0;x<v;x+=1){let k=e.get(l[x].key)||sV;if(Math.floor(k[h]+k[p])>Math.floor(g+t)){y=x-1;break}}let w=0;for(let x=v-1;x>=0;x-=1)if((e.get(l[x].key)||sV)[h]<g){w=x+1;break}return w>y?[0,-1]:[w,y]},[e,t,n,a,o,g,c,l.map(v=>v.key).join("_"),d])}function lV(e){let t;return e instanceof Map?(t={},e.forEach((r,n)=>{t[n]=r})):t=e,JSON.stringify(t)}var j1e="TABS_DQ";function mV(e){return String(e).replace(/"/g,j1e)}function s9(e,t,r,n){return!(!r||n||e===!1||e===void 0&&(t===!1||t===null))}var uV=B(_()),_1e=uV.forwardRef((e,t)=>{let{prefixCls:r,editable:n,locale:a,style:o}=e;return!n||n.showAdd===!1?null:uV.createElement("button",{ref:t,type:"button",className:`${r}-nav-add`,style:o,"aria-label":a?.addAriaLabel||"Add tab",onClick:l=>{n.onEdit("add",{event:l})}},n.addIcon||"+")}),hV=_1e,r9=B(_()),P1e=r9.forwardRef((e,t)=>{let{position:r,prefixCls:n,extra:a}=e;if(!a)return null;let o,l={};return typeof a=="object"&&!r9.isValidElement(a)?l=a:l.right=a,r==="right"&&(o=l.right),r==="left"&&(o=l.left),o?r9.createElement("div",{className:`${n}-extra-content`,ref:t},o):null}),cV=P1e,yl=B(_()),l6=B(_());function a9(){return a9=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a9.apply(this,arguments)}var N1e=yl.forwardRef((e,t)=>{let{prefixCls:r,id:n,tabs:a,locale:o,mobile:l,more:c={},style:d,className:p,editable:h,tabBarGutter:g,rtl:v,removeAriaLabel:y,onTabClick:w,getPopupContainer:x,popupClassName:k,popupStyle:F,classNames:C,styles:D}=e,[S,A]=(0,l6.useState)(!1),[I,j]=(0,l6.useState)(null),{icon:$="More",popupRender:P}=c,N=`${n}-more-popup`,R=`${r}-dropdown`,U=I!==null?`${N}-${I}`:null,H=o?.dropdownAriaLabel;function q(T,V){T.preventDefault(),T.stopPropagation(),h.onEdit("remove",{key:V,event:T})}let L=yl.createElement(YA,{onClick:({key:T,domEvent:V})=>{w(T,V),A(!1)},prefixCls:`${R}-menu`,id:N,tabIndex:-1,role:"listbox","aria-activedescendant":U,selectedKeys:[I],"aria-label":H!==void 0?H:"expanded dropdown"},a.map(T=>{let{closable:V,disabled:X,closeIcon:Q,key:re,label:J}=T,se=s9(V,Q,h,X);return yl.createElement(C0,{key:re,id:`${N}-${re}`,role:"option","aria-controls":n&&`${n}-panel-${re}`,disabled:X},yl.createElement("span",null,J),se&&yl.createElement("button",{type:"button","aria-label":y||"remove",tabIndex:0,className:te(`${R}-menu-item-remove`,C?.remove),style:D?.remove,onClick:ue=>{ue.stopPropagation(),q(ue,re)}},Q||h.removeIcon||"\xD7"))})),O=P?P(L,{restTabs:a,onClose:()=>A(!1)}):L;function W(T){let V=a.filter(re=>!re.disabled),X=V.findIndex(re=>re.key===I)||0,Q=V.length;for(let re=0;re<Q;re+=1){X=(X+T+Q)%Q;let J=V[X];if(!J.disabled){j(J.key);return}}}function z(T){let{which:V}=T;if(!S){[On.DOWN,On.SPACE,On.ENTER].includes(V)&&(A(!0),T.preventDefault());return}switch(V){case On.UP:W(-1),T.preventDefault();break;case On.DOWN:W(1),T.preventDefault();break;case On.ESC:A(!1);break;case On.SPACE:case On.ENTER:I!==null&&w(I,T);break}}(0,l6.useEffect)(()=>{let T=document.getElementById(U);T?.scrollIntoView&&T.scrollIntoView(!1)},[U,I]),(0,l6.useEffect)(()=>{S||j(null)},[S]);let Y={marginInlineStart:g};a.length||(Y.visibility="hidden",Y.order=1);let G=te(k,{[`${R}-rtl`]:v}),Z=l?null:yl.createElement(QA,a9({prefixCls:R,overlay:O,visible:a.length?S:!1,onVisibleChange:A,overlayClassName:G,overlayStyle:F,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:x},c),yl.createElement("button",{type:"button",className:`${r}-nav-more`,style:Y,"aria-haspopup":"listbox","aria-controls":N,id:`${n}-more`,"aria-expanded":S,onKeyDown:z},$));return yl.createElement("div",{className:te(`${r}-nav-operations`,p),style:d,ref:t},Z,yl.createElement(hV,{prefixCls:r,locale:o,editable:h}))}),O1e=yl.memo(N1e,(e,t)=>t.tabMoving),Fu=B(_()),R1e=e=>{let{prefixCls:t,id:r,active:n,focus:a,tab:{key:o,label:l,disabled:c,closeIcon:d,icon:p},closable:h,renderWrapper:g,removeAriaLabel:v,editable:y,onClick:w,onFocus:x,onBlur:k,onKeyDown:F,onMouseDown:C,onMouseUp:D,styles:S,classNames:A,tabCount:I,currentPosition:j}=e,$=`${t}-tab`,P=s9(h,d,y,c);function N(L){c||w(L)}function R(L){L.preventDefault(),L.stopPropagation(),y.onEdit("remove",{key:o,event:L})}let U=Fu.useMemo(()=>p&&typeof l=="string"?Fu.createElement("span",null,l):l,[l,p]),H=Fu.useRef(null);Fu.useEffect(()=>{a&&H.current&&H.current.focus()},[a]);let q=Fu.createElement("div",{key:o,"data-node-key":mV(o),className:te($,A?.item,{[`${$}-with-remove`]:P,[`${$}-active`]:n,[`${$}-disabled`]:c,[`${$}-focus`]:a}),style:S?.item,onClick:N},Fu.createElement("div",{ref:H,role:"tab","aria-selected":n,id:r&&`${r}-tab-${o}`,className:`${$}-btn`,"aria-controls":r&&`${r}-panel-${o}`,"aria-disabled":c,tabIndex:c?null:n?0:-1,onClick:L=>{L.stopPropagation(),N(L)},onKeyDown:F,onMouseDown:C,onMouseUp:D,onFocus:x,onBlur:k},a&&Fu.createElement("div",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},`Tab ${j} of ${I}`),p&&Fu.createElement("span",{className:`${$}-icon`},p),l&&U),P&&Fu.createElement("button",{type:"button","aria-label":v||"remove",tabIndex:n?0:-1,className:te(`${$}-remove`,A?.remove),style:S?.remove,onClick:L=>{L.stopPropagation(),R(L)}},d||y.removeIcon||"\xD7"));return g?g(q):q},L1e=R1e;function i9(){return i9=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i9.apply(this,arguments)}var z1e=(e,t)=>{let{offsetWidth:r,offsetHeight:n,offsetTop:a,offsetLeft:o}=e,{width:l,height:c,left:d,top:p}=e.getBoundingClientRect();return Math.abs(l-r)<1?[l,c,d-t.left,p-t.top]:[r,n,o,a]},S0=e=>{let{offsetWidth:t=0,offsetHeight:r=0}=e.current||{};if(e.current){let{width:n,height:a}=e.current.getBoundingClientRect();if(Math.abs(n-t)<1)return[n,a]}return[t,r]},u6=(e,t)=>e[t?0:1],H1e=Li.forwardRef((e,t)=>{let{className:r,style:n,id:a,animated:o,activeKey:l,rtl:c,extra:d,editable:p,locale:h,tabPosition:g,tabBarGutter:v,children:y,onTabClick:w,onTabScroll:x,indicator:k,classNames:F,styles:C}=e,{prefixCls:D,tabs:S}=Li.useContext(o9),A=(0,aa.useRef)(null),I=(0,aa.useRef)(null),j=(0,aa.useRef)(null),$=(0,aa.useRef)(null),P=(0,aa.useRef)(null),N=(0,aa.useRef)(null),R=(0,aa.useRef)(null),U=g==="top"||g==="bottom",[H,q]=aV(0,(Oe,Qe)=>{U&&x&&x({direction:Oe>Qe?"left":"right"})}),[L,O]=aV(0,(Oe,Qe)=>{!U&&x&&x({direction:Oe>Qe?"top":"bottom"})}),[W,z]=(0,aa.useState)([0,0]),[Y,G]=(0,aa.useState)([0,0]),[Z,T]=(0,aa.useState)([0,0]),[V,X]=(0,aa.useState)([0,0]),[Q,re]=I1e(new Map),J=D1e(S,Q,Y[0]),se=u6(W,U),ue=u6(Y,U),ae=u6(Z,U),he=u6(V,U),le=Math.floor(se)<Math.floor(ue+ae),fe=le?se-he:se-ae,we=`${D}-nav-operations-hidden`,_e=0,$e=0;U&&c?(_e=0,$e=Math.max(0,ue-fe)):(_e=Math.min(0,fe-ue),$e=0);function De(Oe){return Oe<_e?_e:Oe>$e?$e:Oe}let Ce=(0,aa.useRef)(null),[qe,Ae]=(0,aa.useState)();function Be(){Ae(Date.now())}function Me(){Ce.current&&clearTimeout(Ce.current)}B1e($,(Oe,Qe)=>{function it(Re,Ze){Re(pt=>De(pt+Ze))}return le?(U?it(q,Oe):it(O,Qe),Me(),Be(),!0):!1}),(0,aa.useEffect)(()=>(Me(),qe&&(Ce.current=setTimeout(()=>{Ae(0)},100)),Me),[qe]);let[Ue,He]=T1e(J,fe,U?H:L,ue,ae,he,{...e,tabs:S}),Ie=xt((Oe=l)=>{let Qe=J.get(Oe)||{width:0,height:0,left:0,right:0,top:0};if(U){let it=H;c?Qe.right<H?it=Qe.right:Qe.right+Qe.width>H+fe&&(it=Qe.right+Qe.width-fe):Qe.left<-H?it=-Qe.left:Qe.left+Qe.width>-H+fe&&(it=-(Qe.left+Qe.width-fe)),O(0),q(De(it))}else{let it=L;Qe.top<-L?it=-Qe.top:Qe.top+Qe.height>-L+fe&&(it=-(Qe.top+Qe.height-fe)),q(0),O(De(it))}}),[Ne,Je]=(0,aa.useState)(),[gt,et]=(0,aa.useState)(!1),Ve=S.filter(Oe=>!Oe.disabled).map(Oe=>Oe.key),Se=Oe=>{let Qe=Ve.indexOf(Ne||l),it=Ve.length,Re=(Qe+Oe+it)%it,Ze=Ve[Re];Je(Ze)},Pe=(Oe,Qe)=>{let it=Ve.indexOf(Oe),Re=S.find(Ze=>Ze.key===Oe);s9(Re?.closable,Re?.closeIcon,p,Re?.disabled)&&(Qe.preventDefault(),Qe.stopPropagation(),p.onEdit("remove",{key:Oe,event:Qe}),it===Ve.length-1?Se(-1):Se(1))},dt=(Oe,Qe)=>{et(!0),Qe.button===1&&Pe(Oe,Qe)},at=Oe=>{let{code:Qe}=Oe,it=c&&U,Re=Ve[0],Ze=Ve[Ve.length-1];switch(Qe){case"ArrowLeft":{U&&Se(it?1:-1);break}case"ArrowRight":{U&&Se(it?-1:1);break}case"ArrowUp":{Oe.preventDefault(),U||Se(-1);break}case"ArrowDown":{Oe.preventDefault(),U||Se(1);break}case"Home":{Oe.preventDefault(),Je(Re);break}case"End":{Oe.preventDefault(),Je(Ze);break}case"Enter":case"Space":{Oe.preventDefault(),w(Ne??l,Oe);break}case"Backspace":case"Delete":{Pe(Ne,Oe);break}}},Ke={};U?Ke.marginInlineStart=v:Ke.marginTop=v;let je=S.map((Oe,Qe)=>{let{key:it}=Oe;return Li.createElement(L1e,{id:a,prefixCls:D,key:it,tab:Oe,classNames:{item:F?.item,remove:F?.remove},styles:{item:Qe===0?C?.item:{...Ke,...C?.item},remove:C?.remove},closable:Oe.closable,editable:p,active:it===l,focus:it===Ne,renderWrapper:y,removeAriaLabel:h?.removeAriaLabel,tabCount:Ve.length,currentPosition:Qe+1,onClick:Re=>{w(it,Re)},onKeyDown:at,onFocus:()=>{gt||Je(it),Ie(it),Be(),$.current&&(c||($.current.scrollLeft=0),$.current.scrollTop=0)},onBlur:()=>{Je(void 0)},onMouseDown:Re=>dt(it,Re),onMouseUp:()=>{et(!1)}})}),rt=()=>re(()=>{let Oe=new Map,Qe=P.current?.getBoundingClientRect();return S.forEach(({key:it})=>{let Re=P.current?.querySelector(`[data-node-key="${mV(it)}"]`);if(Re){let[Ze,pt,Ht,qt]=z1e(Re,Qe);Oe.set(it,{width:Ze,height:pt,left:Ht,top:qt})}}),Oe});(0,aa.useEffect)(()=>{rt()},[S.map(Oe=>Oe.key).join("_")]);let $t=fV(()=>{let Oe=S0(A),Qe=S0(I),it=S0(j);z([Oe[0]-Qe[0]-it[0],Oe[1]-Qe[1]-it[1]]);let Re=S0(R);T(Re);let Ze=S0(N);X(Ze);let pt=S0(P);G([pt[0]-Re[0],pt[1]-Re[1]]),rt()}),Bt=S.slice(0,Ue),Kr=S.slice(He+1),zt=[...Bt,...Kr],$r=J.get(l),{style:Kt}=S1e({activeTabOffset:$r,horizontal:U,indicator:k,rtl:c});(0,aa.useEffect)(()=>{Ie()},[l,_e,$e,lV($r),lV(J),U]),(0,aa.useEffect)(()=>{$t()},[c]);let St=!!zt.length,nr=`${D}-nav-wrap`,Sr,Rt,ot,vt;return U?c?(Rt=H>0,Sr=H!==$e):(Sr=H<0,Rt=H!==_e):(ot=L<0,vt=L!==_e),Li.createElement(Ea,{onResize:$t},Li.createElement("div",{ref:jo(t,A),role:"tablist","aria-orientation":U?"horizontal":"vertical",className:te(`${D}-nav`,r,F?.header),style:{...C?.header,...n},onKeyDown:()=>{Be()}},Li.createElement(cV,{ref:I,position:"left",extra:d,prefixCls:D}),Li.createElement(Ea,{onResize:$t},Li.createElement("div",{className:te(nr,{[`${nr}-ping-left`]:Sr,[`${nr}-ping-right`]:Rt,[`${nr}-ping-top`]:ot,[`${nr}-ping-bottom`]:vt}),ref:$},Li.createElement(Ea,{onResize:$t},Li.createElement("div",{ref:P,className:`${D}-nav-list`,style:{transform:`translate(${H}px, ${L}px)`,transition:qe?"none":void 0}},je,Li.createElement(hV,{ref:R,prefixCls:D,locale:h,editable:p,style:{...je.length===0?void 0:Ke,visibility:St?"hidden":null}}),Li.createElement("div",{className:te(`${D}-ink-bar`,F?.indicator,{[`${D}-ink-bar-animated`]:o.inkBar}),style:{...Kt,...C?.indicator}}))))),Li.createElement(O1e,i9({},e,{removeAriaLabel:h?.removeAriaLabel,ref:N,prefixCls:D,tabs:zt,className:!St&&we,popupStyle:C?.popup,tabMoving:!!qe})),Li.createElement(cV,{ref:j,position:"right",extra:d,prefixCls:D})))}),dV=H1e,q1e=({renderTabBar:e,...t})=>e?e(t,dV):k1e.createElement(dV,t),W1e=q1e,m1=B(_()),n9=B(_()),V1e=n9.forwardRef((e,t)=>{let{prefixCls:r,className:n,style:a,id:o,active:l,tabKey:c,children:d}=e,p=n9.Children.count(d)>0;return n9.createElement("div",{id:o&&`${o}-panel-${c}`,role:"tabpanel",tabIndex:l&&p?0:-1,"aria-labelledby":o&&`${o}-tab-${c}`,"aria-hidden":!l,style:a,className:te(r,l&&`${r}-active`,n),ref:t},d)}),U1e=V1e;function d6(){return d6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d6.apply(this,arguments)}var K1e=e=>{let{id:t,activeKey:r,animated:n,tabPosition:a,destroyOnHidden:o,bodyStyle:l,bodyClassName:c,contentStyle:d,contentClassName:p}=e,{prefixCls:h,tabs:g}=m1.useContext(o9),v=n.tabPane,y=`${h}-body`,w=`${h}-content`;return m1.createElement("div",{className:te(`${y}-holder`)},m1.createElement("div",{className:te(y,`${y}-${a}`,{[`${y}-animated`]:v},c),style:l},g.map(x=>{let{key:k,forceRender:F,style:C,className:D,destroyOnHidden:S,...A}=x,I=k===r;return m1.createElement(Yn,d6({key:k,visible:I,forceRender:F,removeOnLeave:!!(o??S),leavedClassName:`${w}-hidden`},n.tabPaneMotion),({style:j,className:$},P)=>m1.createElement(U1e,d6({},A,{prefixCls:w,id:t,tabKey:k,animated:v,active:I,style:{...d,...C,...j},className:te(p,D,$),ref:P})))})))},G1e=K1e;function X1e(e={inkBar:!0,tabPane:!1}){let t;return e===!1?t={inkBar:!1,tabPane:!1}:e===!0?t={inkBar:!0,tabPane:!1}:t={inkBar:!0,...typeof e=="object"?e:{}},t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}function h1(){return h1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},h1.apply(this,arguments)}var pV=0,Y1e=df.forwardRef((e,t)=>{let{id:r,prefixCls:n="rc-tabs",className:a,items:o,direction:l,activeKey:c,defaultActiveKey:d,editable:p,animated:h,tabPosition:g="top",tabBarGutter:v,tabBarStyle:y,tabBarExtraContent:w,locale:x,more:k,destroyOnHidden:F,renderTabBar:C,onChange:D,onTabClick:S,onTabScroll:A,getPopupContainer:I,popupClassName:j,indicator:$,classNames:P,styles:N,...R}=e,U=df.useMemo(()=>(o||[]).filter(J=>J&&typeof J=="object"&&"key"in J),[o]),H=l==="rtl",q=X1e(h),[L,O]=(0,f1.useState)(!1);(0,f1.useEffect)(()=>{O(YS())},[]);let[W,z]=yr(d??U[0]?.key,c),[Y,G]=(0,f1.useState)(()=>U.findIndex(J=>J.key===W));(0,f1.useEffect)(()=>{let J=U.findIndex(se=>se.key===W);J===-1&&(J=Math.max(0,Math.min(Y,U.length-1)),z(U[J]?.key)),G(J)},[U.map(J=>J.key).join("_"),W,Y]);let[Z,T]=yr(null,r);(0,f1.useEffect)(()=>{r||(T(`rc-tabs-${pV}`),pV+=1)},[]);function V(J,se){S?.(J,se);let ue=J!==W;z(J),ue&&D?.(J)}let X={id:Z,activeKey:W,animated:q,tabPosition:g,rtl:H,mobile:L},Q={...X,editable:p,locale:x,more:k,tabBarGutter:v,onTabClick:V,onTabScroll:A,extra:w,style:y,getPopupContainer:I,popupClassName:te(j,P?.popup),indicator:$,styles:N,classNames:P},re=df.useMemo(()=>({tabs:U,prefixCls:n}),[U,n]);return df.createElement(o9.Provider,{value:re},df.createElement("div",h1({ref:t,id:r,className:te(n,`${n}-${g}`,{[`${n}-mobile`]:L,[`${n}-editable`]:p,[`${n}-rtl`]:H},a)},R),df.createElement(W1e,h1({},Q,{renderTabBar:C})),df.createElement(G1e,h1({destroyOnHidden:F},X,{bodyStyle:N?.body,bodyClassName:P?.body,contentStyle:N?.content,contentClassName:P?.content,animated:q}))))}),Q1e=Y1e,Z1e=Q1e,J1e={motionAppear:!1,motionEnter:!0,motionLeave:!0};function eye(e,t={inkBar:!0,tabPane:!1}){let r;return t===!1?r={inkBar:!1,tabPane:!1}:t===!0?r={inkBar:!0,tabPane:!0}:r={inkBar:!0,...kt(t)?t:{}},r.tabPane&&(r.tabPaneMotion={...J1e,motionName:np(e,"switch")}),r}var tye=B(_());function rye(e){return e.filter(t=>t)}function nye(e,t){if(e)return e.map(n=>({...n,destroyOnHidden:n.destroyOnHidden??n.destroyInactiveTabPane}));let r=Hr(t).map(n=>{if(tye.isValidElement(n)){let{key:a,props:o}=n,{tab:l,...c}=o||{};return{key:String(a),...c,label:l}}return null});return rye(r)}var aye=nye,iye=e=>{let{componentCls:t,motionDurationSlow:r}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${r}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${r}`}}}}},[nx(e,"slide-up"),nx(e,"slide-down")]]},oye=iye,sye=e=>{let{componentCls:t,tabsCardPadding:r,cardBg:n,cardGutter:a,colorBorderSecondary:o,itemSelectedColor:l}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:r,background:n,border:`${ve(e.lineWidth)} ${e.lineType} ${o}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:l,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:ao(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:"none"},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:ve(a)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${ve(e.borderRadiusLG)} ${ve(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${ve(e.borderRadiusLG)} ${ve(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:ve(a)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${ve(e.borderRadiusLG)} 0 0 ${ve(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${ve(e.borderRadiusLG)} ${ve(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},lye=e=>{let{antCls:t,componentCls:r,itemHoverColor:n,dropdownEdgeChildVerticalPadding:a}=e;return{[`${r}-dropdown`]:{...fr(e),position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`&${t}-slide-down-enter${t}-slide-down-enter-active${r}-dropdown-placement-bottomLeft,
|
|
213
|
-
&${t}-slide-down-appear${t}-slide-down-appear-active${r}-dropdown-placement-bottomLeft,
|
|
214
|
-
&${t}-slide-down-enter${t}-slide-down-enter-active${r}-dropdown-placement-bottom,
|
|
215
|
-
&${t}-slide-down-appear${t}-slide-down-appear-active${r}-dropdown-placement-bottom,
|
|
216
|
-
&${t}-slide-down-enter${t}-slide-down-enter-active${r}-dropdown-placement-bottomRight,
|
|
217
|
-
&${t}-slide-down-appear${t}-slide-down-appear-active${r}-dropdown-placement-bottomRight`]:{animationName:J5},[`&${t}-slide-up-enter${t}-slide-up-enter-active${r}-dropdown-placement-topLeft,
|
|
218
|
-
&${t}-slide-up-appear${t}-slide-up-appear-active${r}-dropdown-placement-topLeft,
|
|
219
|
-
&${t}-slide-up-enter${t}-slide-up-enter-active${r}-dropdown-placement-top,
|
|
220
|
-
&${t}-slide-up-appear${t}-slide-up-appear-active${r}-dropdown-placement-top,
|
|
221
|
-
&${t}-slide-up-enter${t}-slide-up-enter-active${r}-dropdown-placement-topRight,
|
|
222
|
-
&${t}-slide-up-appear${t}-slide-up-appear-active${r}-dropdown-placement-topRight`]:{animationName:tx},[`&${t}-slide-down-leave${t}-slide-down-leave-active${r}-dropdown-placement-bottomLeft,
|
|
223
|
-
&${t}-slide-down-leave${t}-slide-down-leave-active${r}-dropdown-placement-bottom,
|
|
224
|
-
&${t}-slide-down-leave${t}-slide-down-leave-active${r}-dropdown-placement-bottomRight`]:{animationName:ex},[`&${t}-slide-up-leave${t}-slide-up-leave-active${r}-dropdown-placement-topLeft,
|
|
225
|
-
&${t}-slide-up-leave${t}-slide-up-leave-active${r}-dropdown-placement-top,
|
|
226
|
-
&${t}-slide-up-leave${t}-slide-up-leave-active${r}-dropdown-placement-topRight`]:{animationName:rx},[`${r}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${ve(a)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":{...Zd,display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${ve(e.paddingXXS)} ${ve(e.paddingSM)}`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}}}}}},uye=e=>{let{componentCls:t,margin:r,colorBorderSecondary:n,horizontalMargin:a,verticalItemPadding:o,verticalItemMargin:l,motionDurationSlow:c,calc:d}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:a,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${ve(e.lineWidth)} ${e.lineType} ${n}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:["width","left","right"].map(p=>`${p} ${c}`).join(", ")}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav,
|
|
227
|
-
> div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:r,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-body-holder, > div > ${t}-body-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:d(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:o,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:l},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:["height","top"].map(p=>`${p} ${c}`).join(", ")}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-body-holder, > div > ${t}-body-holder`]:{marginLeft:{_skip_check_:!0,value:ve(d(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${ve(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-body > ${t}-content`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-body-holder, > div > ${t}-body-holder`]:{order:0,marginRight:{_skip_check_:!0,value:d(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${ve(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-body > ${t}-content`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},cye=e=>{let{componentCls:t,cardPaddingSM:r,cardPaddingLG:n,cardHeightSM:a,cardHeightLG:o,horizontalItemPaddingSM:l,horizontalItemPaddingLG:c}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:l,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:c,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:a,minHeight:a}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${ve(e.borderRadius)} ${ve(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${ve(e.borderRadius)} ${ve(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${ve(e.borderRadius)} ${ve(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${ve(e.borderRadius)} 0 0 ${ve(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:o,minHeight:o}}}}}},dye=e=>{let{componentCls:t,itemActiveColor:r,itemHoverColor:n,iconCls:a,tabsHorizontalItemMargin:o,horizontalItemPadding:l,itemSelectedColor:c,itemColor:d}=e,p=`${t}-tab`;return{[p]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:l,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:d,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:r}},"&-btn":{outline:"none",transition:`all ${e.motionDurationSlow}`,[`${p}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM},[`${p}-icon > svg`]:{display:"inline-block",verticalAlign:"middle",marginBlockEnd:"0.2em"}},"&-remove":{flex:"none",lineHeight:1,marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading},...Ai(e)},"&:hover":{color:n},[`&${p}-active ${p}-btn`]:{color:c},[`&${p}-focus ${p}-btn:focus-visible`]:ao(e),[`&${p}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${p}-disabled ${p}-btn, &${p}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${p}-remove ${a}`]:{margin:0,verticalAlign:"middle"},[`${a}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${p} + ${p}`]:{margin:{_skip_check_:!0,value:o}}}},pye=e=>{let{componentCls:t,tabsHorizontalItemMarginRTL:r,iconCls:n,cardGutter:a,calc:o}=e;return{[`${t}-rtl`]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:r},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[n]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:e.marginSM}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:e.marginXS},marginLeft:{_skip_check_:!0,value:o(e.marginXXS).mul(-1).equal()},[n]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-body-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-body-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:a},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},fye=e=>{let{componentCls:t,tabsCardPadding:r,cardHeight:n,cardGutter:a,itemHoverColor:o,itemActiveColor:l,colorBorderSecondary:c}=e;return{[t]:{...fr(e),display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:r,background:"transparent",border:0,color:e.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:{minWidth:n,minHeight:n,marginLeft:{_skip_check_:!0,value:a},background:"transparent",border:`${ve(e.lineWidth)} ${e.lineType} ${c}`,borderRadius:`${ve(e.borderRadiusLG)} ${ve(e.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:o},"&:active, &:focus:not(:focus-visible)":{color:l},...Ai(e,-3)}},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"},...dye(e),[`${t}-body`]:{position:"relative",width:"100%"},[`${t}-body-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-content`]:{...Ai(e),"&-hidden":{display:"none"}}},[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:"auto"}}}}}},mye=e=>{let{cardHeight:t,cardHeightSM:r,cardHeightLG:n,controlHeight:a,controlHeightLG:o}=e,l=t||o,c=r||a,d=n||o+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:l,cardHeightSM:c,cardHeightLG:d,cardPadding:`${(l-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(c-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(d-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}},hye=Et("Tabs",e=>{let t=_t(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${ve(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${ve(e.horizontalItemGutter)}`});return[cye(t),pye(t),uye(t),lye(t),sye(t),fye(t),oye(t)]},mye),gye=()=>null,vye=gye,bye=Su.forwardRef((e,t)=>{let{type:r,className:n,rootClassName:a,size:o,onEdit:l,hideAdd:c,centered:d,addIcon:p,removeIcon:h,moreIcon:g,more:v,popupClassName:y,children:w,items:x,animated:k,style:F,indicatorSize:C,indicator:D,classNames:S,styles:A,destroyInactiveTabPane:I,destroyOnHidden:j,tabPlacement:$,tabPosition:P,...N}=e,{prefixCls:R}=N,{getPrefixCls:U,direction:H,getPopupContainer:q,className:L,style:O,classNames:W,styles:z}=jt("tabs"),{tabs:Y}=Su.useContext(wt),G=U("tabs",R),Z=Qn(G),[T,V]=hye(G,Z),X=Su.useRef(null);Su.useImperativeHandle(t,()=>({nativeElement:X.current}));let Q;r==="editable-card"&&(Q={onEdit:(De,{key:Ce,event:qe})=>{l?.(De==="add"?qe:Ce,De)},removeIcon:h??Y?.removeIcon??Su.createElement(Mc,null),addIcon:(p??Y?.addIcon)||Su.createElement(JA,null),showAdd:c!==!0});let re=U(),J=Rn(o),se=aye(x,w),ue=eye(G,k),ae={align:D?.align??Y?.indicator?.align,size:D?.size??C??Y?.indicator?.size??Y?.indicatorSize},he=Su.useMemo(()=>{let De=$??P??void 0,Ce=H==="rtl";switch(De){case"start":return Ce?"right":"left";case"end":return Ce?"left":"right";default:return De}},[$,P,H]),le={...e,size:J,tabPlacement:he,items:se},fe=lt(O),we=lt(F),[_e,$e]=Tt([W,S],[z,fe,A,we],{props:le},{popup:{_default:"root"}});return Su.createElement(Z1e,{ref:X,direction:H,getPopupContainer:q,...N,items:se,className:te({[`${G}-large`]:J==="large",[`${G}-small`]:J==="small",[`${G}-card`]:["card","editable-card"].includes(r),[`${G}-editable-card`]:r==="editable-card",[`${G}-centered`]:d},L,n,a,_e.root,T,V,Z),classNames:{..._e,popup:te(y,T,V,Z,_e.popup?.root)},styles:{...$e,popup:$e.popup?.root},style:$e.root,editable:Q,more:{icon:Y?.more?.icon??Y?.moreIcon??g??Su.createElement(t9,null),transitionName:`${re}-slide-up`,...v},prefixCls:G,animated:ue,indicator:ae,destroyOnHidden:j??I,tabPosition:he})}),gV=bye;gV.TabPane=vye;var l9=gV;var vV=B(_()),yye={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},wye=yye;function u9(){return u9=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u9.apply(this,arguments)}var xye=(e,t)=>vV.createElement(Ut,u9({},e,{ref:t,icon:wye})),Eye=vV.forwardRef(xye),c9=Eye;var bo=B(_()),D0=B(_()),kye=B(_()),p6=kye.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),Cye=e=>{let{antCls:t,componentCls:r,colorText:n,footerBg:a,headerHeight:o,headerPadding:l,headerColor:c,footerPadding:d,fontSize:p,bodyBg:h,headerBg:g}=e;return{[r]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:h,"&, *":{boxSizing:"border-box"},[`&${r}-has-sider`]:{flexDirection:"row",[`> ${r}, > ${r}-content`]:{width:0}},[`${r}-header, &${r}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${r}-header`]:{height:o,padding:l,color:c,lineHeight:ve(o),background:g,[`${t}-menu`]:{lineHeight:"inherit"}},[`${r}-footer`]:{padding:d,color:n,fontSize:p,background:a},[`${r}-content`]:{flex:"auto",color:n,minHeight:0}}},yV=e=>{let{colorBgLayout:t,controlHeight:r,controlHeightLG:n,colorText:a,controlHeightSM:o,marginXXS:l,colorTextLightSolid:c,colorBgContainer:d}=e,p=n*1.25;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:r*2,headerPadding:`0 ${p}px`,headerColor:a,footerPadding:`${o}px ${p}px`,footerBg:t,siderBg:"#001529",triggerHeight:n+l*2,triggerBg:"#002140",triggerColor:c,zeroTriggerWidth:n,zeroTriggerHeight:n,lightSiderBg:d,lightTriggerBg:d,lightTriggerColor:a}},wV=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]],f6=Et("Layout",Cye,yV,{deprecatedTokens:wV}),Sye=e=>{let{componentCls:t,siderBg:r,motionDurationMid:n,motionDurationSlow:a,antCls:o,triggerHeight:l,triggerColor:c,triggerBg:d,headerHeight:p,zeroTriggerWidth:h,zeroTriggerHeight:g,borderRadiusLG:v,lightSiderBg:y,lightTriggerColor:w,lightTriggerBg:x,bodyBg:k}=e;return{[t]:{position:"relative",minWidth:0,background:r,transition:`all ${n}, background 0s`,"&-has-trigger":{paddingBottom:l},"&-right":{order:1},[`${t}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${o}-menu${o}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${t}-children`]:{overflow:"hidden"},[`${t}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:l,color:c,lineHeight:ve(l),textAlign:"center",background:d,cursor:"pointer",transition:`all ${n}`},[`${t}-zero-width-trigger`]:{position:"absolute",top:p,insetInlineEnd:e.calc(h).mul(-1).equal(),zIndex:1,width:h,height:g,color:c,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:r,borderRadius:`0 ${ve(v)} ${ve(v)} 0`,cursor:"pointer",transition:`background-color ${a} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${a}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:e.calc(h).mul(-1).equal(),borderRadius:`${ve(v)} 0 0 ${ve(v)}`}},"&-light":{background:y,[`${t}-trigger`]:{color:w,background:x},[`${t}-zero-width-trigger`]:{color:w,background:x,border:`${ve(e.lineWidth)} ${e.lineType} ${k}`,borderInlineStart:0}}}}},Fye=Et(["Layout","Sider"],Sye,yV,{deprecatedTokens:wV}),bV={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px",xxxl:"1839.98px"},Dye=e=>!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(Number(e)),m6=bo.createContext({}),Aye=(()=>{let e=0;return(t="")=>(e+=1,`${t}${e}`)})(),$ye=bo.forwardRef((e,t)=>{let{prefixCls:r,className:n,trigger:a,children:o,defaultCollapsed:l=!1,theme:c="dark",style:d={},collapsible:p=!1,reverseArrow:h=!1,width:g=200,collapsedWidth:v=80,zeroWidthTriggerStyle:y,breakpoint:w,onCollapse:x,onBreakpoint:k,classNames:F,styles:C,...D}=e,{siderHook:S}=(0,D0.useContext)(p6),[A,I]=yr(l,e.collapsed),[j,$]=(0,D0.useState)(!1),P=(ae,he)=>{I(ae),x?.(ae,he)},N={...e,collapsed:A,defaultCollapsed:l,theme:c,style:d,collapsible:p,reverseArrow:h,width:g,collapsedWidth:v,zeroWidthTriggerStyle:y,breakpoint:w,onCollapse:x,onBreakpoint:k},[R,U]=Tt([F],[C],{props:N}),{getPrefixCls:H,direction:q}=(0,D0.useContext)(wt),L=H("layout-sider",r),[O,W]=Fye(L),z=(0,D0.useRef)(null);z.current=ae=>{$(ae.matches),k?.(ae.matches),A!==ae.matches&&P(ae.matches,"responsive")},(0,D0.useEffect)(()=>{function ae(le){return z.current?.(le)}let he;return typeof window?.matchMedia<"u"&&w&&w in bV&&(he=window.matchMedia(`screen and (max-width: ${bV[w]})`),xr(he?.addEventListener)&&he.addEventListener("change",ae),ae(he)),()=>{xr(he?.removeEventListener)&&he.removeEventListener("change",ae)}},[w]),(0,D0.useEffect)(()=>{let ae=Aye("ant-sider-");return S.addSider(ae),()=>S.removeSider(ae)},[]);let Y=()=>{P(!A,"clickTrigger")},G=wr(D,["collapsed"]),Z=A?v:g,T=Dye(Z)?`${Z}px`:String(Z),V=Number.parseFloat(String(v||0))===0?bo.createElement("span",{onClick:Y,className:te(`${L}-zero-width-trigger`,`${L}-zero-width-trigger-${h?"right":"left"}`),style:y},a||bo.createElement(c9,null)):null,X=q==="rtl"==!h,Q={expanded:X?bo.createElement(sp,null):bo.createElement(Ph,null),collapsed:X?bo.createElement(Ph,null):bo.createElement(sp,null)}[A?"collapsed":"expanded"],re=a!==null?V||bo.createElement("div",{className:`${L}-trigger`,onClick:Y,style:{width:T}},a||Q):null,J={...d,flex:`0 0 ${T}`,maxWidth:T,minWidth:T,width:T},se=te(L,`${L}-${c}`,{[`${L}-collapsed`]:!!A,[`${L}-has-trigger`]:p&&a!==null&&!V,[`${L}-below`]:!!j,[`${L}-zero-width`]:Number.parseFloat(T)===0},n,R.root,O,W),ue=bo.useMemo(()=>({siderCollapsed:A}),[A]);return bo.createElement(m6.Provider,{value:ue},bo.createElement("aside",{className:se,...G,style:{...U.root,...J},ref:t},bo.createElement("div",{className:te(`${L}-children`,R.body),style:U.body},o),p||j&&V?re:null))}),h6=$ye;var sd={open:!1,src:"",label:"",items:[],current:0},m9=new Set,d9;function p9(e){sd={...sd,...e};for(let t of m9)t()}function f9(e){return e.startsWith("data:image/")||e.startsWith("blob:")||e.startsWith("/")||/^https?:\/\//i.test(e)}var wl={afterClosed(){if(sd.open)return;let e=d9;d9=void 0,e?.()},subscribe(e){return m9.add(e),()=>m9.delete(e)},getSnapshot(){return sd},isOpen(){return sd.open},close(){p9({open:!1,src:"",label:"",items:[],current:0})},closeIfOpen(){return sd.open?(this.close(),!0):!1},open(e,t=""){return this.openGroup([{src:e,label:t}])},openGroup(e,t=0,r){let n=e[t];if(!Number.isInteger(t)||!n||!f9(n.src.trim()))return!1;let a=e.map(l=>({src:l.src.trim(),label:l.label?.trim()||"\u56FE\u7247"})).filter(l=>f9(l.src)),o=e.slice(0,t).filter(l=>f9(l.src.trim())).length;return d9=r,p9({open:!0,items:a,current:o,src:a[o].src,label:a[o].label}),!0},select(e){let t=sd.items[e];!sd.open||!Number.isInteger(e)||!t||p9({current:e,src:t.src,label:t.label||"\u56FE\u7247"})}};var Bye=".markdown-content img, .wand-markdown-preview img, .inline-tool-image-thumb, .user-attachment-thumb";function h9(e){e.focus({preventScroll:!0});let t=e.closest(".chat-message")??e.closest('[data-chat-renderer="canonical"]')??e.closest(".wand-markdown-preview, .markdown-content, .chat-activity-detail-section"),r=t?Array.from(t.querySelectorAll(Bye)).filter(a=>!a.closest('[hidden], [inert], [data-image-state="error"]')&&!(a.complete&&a.naturalWidth===0)):[e],n=r.indexOf(e);return n<0?wl.open(e.currentSrc||e.src,e.alt):wl.openGroup(r.map(a=>({src:a.currentSrc||a.src,label:a.alt})),n)}var xl={open:!1,mode:"url",value:"",previewUrl:null,sourceLabel:"",error:null},g9=new Set;function Is(e={}){xl={...xl,...e};for(let t of g9)t()}function Iye(e){return["localhost","127.0.0.1","[::1]","::1"].includes(e.toLowerCase())}function xV(e){try{let t=new URL(e.trim());return t.protocol!=="http:"||!Iye(t.hostname)?null:`/api/local-preview/127.0.0.1/${t.port||"80"}${t.pathname==="/"?"/":t.pathname}${t.search}`}catch{return null}}function EV(e){let t=e.trim();if(!t)throw new Error("\u8BF7\u8F93\u5165\u672C\u5730\u7AEF\u53E3\u6216\u5730\u5740\u3002");if(/^\d{1,5}$/.test(t)){let a=Number(t);if(a<1||a>65535)throw new Error("\u7AEF\u53E3\u53F7\u5FC5\u987B\u662F 1\u201365535\u3002");return`/api/local-preview/127.0.0.1/${a}/`}let r=/^https?:\/\//i.test(t)?t:`http://${t}`,n=xV(r);if(!n)throw new Error("\u53EA\u5141\u8BB8\u9884\u89C8\u672C\u673A\uFF08localhost\uFF09HTTP \u670D\u52A1\u3002");return n}function Mye(e){let t=new TextEncoder().encode(e),r="";for(let n of t)r+=String.fromCharCode(n);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function kV(e){let t=e.trim();return t.startsWith("/")?`/api/local-file/${Mye(t)}/`:null}function CV(e){let t=e.trim();if(g1(t))return t;if(!t)throw new Error("\u8BF7\u8F93\u5165\u6587\u4EF6\u6216\u76EE\u5F55\u8DEF\u5F84\u3002");return kV(t)??(()=>{throw new Error("\u8BF7\u8F93\u5165\u670D\u52A1\u7AEF\u6587\u4EF6\u8DEF\u5F84\u3002")})()}function Tye(e){try{return Is({open:!0,mode:"file",value:e,previewUrl:CV(e),sourceLabel:e.trim(),error:null}),!0}catch(t){return Is({open:!0,mode:"file",value:e,error:t instanceof Error?t.message:"\u65E0\u6CD5\u6253\u5F00\u672C\u5730\u6587\u4EF6\u9884\u89C8\u3002"}),!1}}function jye(e){try{return Is({open:!0,mode:"url",value:e,previewUrl:EV(e),sourceLabel:e.trim(),error:null}),!0}catch(t){return Is({open:!0,mode:"url",value:e,error:t instanceof Error?t.message:"\u65E0\u6CD5\u6253\u5F00\u672C\u5730\u9884\u89C8\u3002"}),!1}}function g1(e){return/^\/api\/local-file\/[A-Za-z0-9_-]+\/$/.test(e)||/^\/api\/session-file\/[^/?#]+\?path=[^&#]+&mode=preview$/.test(e)}var El={openPreview(e,t="HTML \u9884\u89C8"){return g1(e)?(Is({open:!0,mode:"file",value:e,previewUrl:e,sourceLabel:t,error:null}),!0):!1},subscribe(e){return g9.add(e),()=>g9.delete(e)},getSnapshot(){return xl},isOpen(){return xl.open},closeIfOpen(){return xl.open?(this.close(),!0):!1},show(e=""){Is({open:!0,value:e,error:null})},close(){Is({open:!1,error:null})},setMode(e){e!==xl.mode&&Is({mode:e,error:null})},setValue(e){Is({value:e,error:null})},openUrl:jye,openFile:Tye,submit(){try{let e=xl.mode==="url"?EV(xl.value):CV(xl.value);Is({previewUrl:e,sourceLabel:xl.value.trim(),error:null})}catch(e){Is({error:e instanceof Error?e.message:"\u65E0\u6CD5\u6253\u5F00\u672C\u5730\u9884\u89C8\u3002"})}}};function _ye(e,t){return e.index===t.index&&e.name===t.name&&e.size===t.size&&e.sizeLabel===t.sizeLabel&&e.previewUrl===t.previewUrl}function Pye(e,t){if(e.target!==t.target||e.items.length!==t.items.length)return!1;for(let r=0;r<e.items.length;r+=1)if(!_ye(e.items[r],t.items[r]))return!1;return!0}var Nye=class extends Vs{constructor(){super(Pye)}},g6=new Nye;function W6(e,t,r){if(e===null||typeof e!="object")return t?.kind==="value"&&Object.is(t.value,e)?t:{revision:r(),kind:"value",value:e};let n=Array.isArray(e)?"array":"object",a=Object.keys(e),o=Array.isArray(e)?e.length:void 0,l=t?.kind===n&&t.length===o&&a.length===t.keys?.length&&a.every((d,p)=>d===t.keys[p]),c=a.map((d,p)=>W6(e[d],l?t.children[p]:void 0,r));return l&&c.every((d,p)=>d===t.children[p])?t:{revision:r(),kind:n,keys:a,length:o,children:c}}var jU=class{constructor(){oe(this,"generation",0),oe(this,"revision",0),oe(this,"sessionId",null),oe(this,"messages",[]),oe(this,"rows",[]),oe(this,"structure")}reset(){this.generation++,this.sessionId=null,this.messages=[],this.rows=[],this.structure=void 0}prepare(e,t,r,n){let a=this.sessionId===e,o=()=>++this.revision,l=t.map((h,g)=>W6(h,a?this.messages[g]:void 0,o)),c=r(l.map(h=>h.revision)),d=l.map((h,g)=>W6({message:h.revision,dependencies:c[g]},a?this.rows[g]:void 0,o)),p=W6(n,a?this.structure:void 0,o);return{generation:this.generation,sessionId:e,messages:l,rows:d,structure:p,changedIndices:d.flatMap((h,g)=>!a||h!==this.rows[g]?[g]:[]),structureChanged:!a||p!==this.structure}}commit(e){e.generation===this.generation&&(this.sessionId=e.sessionId,this.messages=e.messages,this.rows=e.rows,this.structure=e.structure)}};function Oye(e,t){return e===!1?!1:e===!0?!0:!t}function Rye(e){if(!e)return!1;var t=e;if(t.__wandAmbiguousDelivery===!0||t.errorCode==="duplicate_idempotency_key"||t.errorCode==="duplicate_queued_message")return!0;if(typeof t.httpStatus=="number")return t.httpStatus>=500||t.httpStatus===408||t.httpStatus===409;var r=t.message==null?"":String(t.message);return r?/failed to fetch|networkerror|load failed|network connection was lost|aborted|aborterror|err_network|err_connection/i.test(r):!1}function R9(e){return!e}function SV(e){let t=e.attachments.map(r=>[r.name,r.size,r.file.lastModified||0].join(":")).join("|");return e.text.trim()+"\0"+t}var Lye=class{constructor(e){oe(this,"dependencies",e),oe(this,"sessions",new Map),oe(this,"listeners",new Set),oe(this,"revision",0)}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}notify(){for(let e of this.listeners)e()}session(e){let t=this.sessions.get(e);if(!t){let r="";try{r=this.dependencies.storage().getItem("wand-draft-"+e)??""}catch{}t={text:r,attachments:[],memoryOnly:!1,revision:++this.revision,submissions:new Map},this.sessions.set(e,t)}return t}read(e){let t=e?this.session(e):null;return{text:t?.text??"",attachments:t?.attachments.slice()??[],memoryOnly:t?.memoryOnly??!1,revision:t?.revision??0,recovery:t?.recovery?.payload??null,queueRetrieval:t?.queueRetrieval?{text:t.queueRetrieval.text,status:t.queueRetrieval.status}:null}}isCurrentRevision(e,t){return this.sessions.get(e)?.revision===t}writeText(e,t,r,n){if(t.text!==r&&(t.revision=++this.revision),t.text=r,n===!1){t.memoryOnly=!0;try{this.dependencies.storage().removeItem("wand-draft-"+e)}catch{}}else if(Oye(n,this.dependencies.isUnloading())){t.memoryOnly=!1;try{this.dependencies.storage().setItem("wand-draft-"+e,r)}catch{}}}edit(e,t){if(!e||"text"in t&&t.expectedRevision!==void 0&&!this.sessions.has(e))return!1;let r=this.session(e);if("text"in t){if(t.expectedRevision!==void 0&&t.expectedRevision!==r.revision)return!1;this.writeText(e,r,t.text,t.persist)}else if("preserve"in t)this.writeText(e,r,t.preserve,!r.memoryOnly);else if("addAttachment"in t)r.attachments.push(t.addAttachment),r.revision=++this.revision;else if("removeAttachment"in t){if(t.removeAttachment<0||t.removeAttachment>=r.attachments.length)return!1;let[n]=r.attachments.splice(t.removeAttachment,1);this.dependencies.disposeAttachment(n),r.revision=++this.revision}else{if("acknowledgeRevision"in t)return r.revision!==t.acknowledgeRevision?!1:(r.attachments.forEach(this.dependencies.disposeAttachment),r.attachments=[],this.edit(e,{clear:!0}));if("forgetRecovery"in t)r.recovery?.payload.attachments.forEach(this.dependencies.disposeAttachment),r.recovery=void 0,r.revision=++this.revision;else if("recoverCapture"in t){let n=r.recovery;return n?(r.recovery=void 0,this.edit(e,{restore:n.payload,persist:n.persist})):!1}else if("restore"in t){let n=t.restore.text,a=r.text;this.writeText(e,r,a&&a!==n?n?n+`
|
|
228
|
-
`+a:a:n,t.persist),t.restore.attachments.length>0&&(r.attachments=[...t.restore.attachments,...r.attachments.filter(o=>!t.restore.attachments.includes(o))],r.revision=++this.revision)}else{r.revision=++this.revision,r.text="",r.memoryOnly=!1;try{this.dependencies.storage().removeItem("wand-draft-"+e)}catch{}}}return this.notify(),!0}beginQueueRetrieval(e,t){let r=this.session(e);if(r.queueRetrieval)return null;let n={};return r.queueRetrieval={text:t,status:"pending",token:n},this.notify(),n}finishQueueRetrieval(e,t,r){let n=this.sessions.get(e)?.queueRetrieval;return!n||n.token!==t?!1:(n.status=r,this.notify(),!0)}restoreQueueRetrieval(e){let t=this.sessions.get(e);if(!t?.queueRetrieval||t.queueRetrieval.status!=="confirmed")return!1;let r=t.queueRetrieval.text;return t.queueRetrieval=void 0,this.edit(e,{restore:{text:r,attachments:[]},persist:!t.memoryOnly})}dismissQueueRetrieval(e){let t=this.sessions.get(e);!t?.queueRetrieval||t.queueRetrieval.status==="pending"||(t.queueRetrieval=void 0,this.notify())}transfer(e,t,r){let n=this.sessions.get(e);if(!n||n.revision!==r||n.submissions.size)return!1;let a=this.session(t);return a.text||a.attachments.length||a.submissions.size?!1:(a.attachments=n.attachments,a.revision=++this.revision,n.attachments=[],this.writeText(t,a,n.text,!n.memoryOnly),this.edit(e,{clear:!0}),this.notify(),!0)}pendingSubmission(e,t){return e?this.session(e).submissions.get(SV(t))??null:null}submit(e,t,r){let n=this.session(e),a={text:t,attachments:n.attachments.slice()},o=SV(a),l=n.submissions.get(o);if(l)return l;n.attachments=[],this.edit(e,{clear:!0});let c=Promise.resolve().then(()=>r(a)).then(d=>(a.attachments.forEach(this.dependencies.disposeAttachment),d),d=>{if(this.sessions.get(e)===n){let p=!Rye(d);e.startsWith("conversation-draft:")&&(n.text||n.attachments.length)?(n.recovery?.payload.attachments.forEach(this.dependencies.disposeAttachment),n.recovery={payload:a,persist:p},n.revision=++this.revision,this.notify()):this.edit(e,{restore:a,persist:p})}else a.attachments.forEach(this.dependencies.disposeAttachment);throw d}).finally(()=>{n.submissions.get(o)===c&&n.submissions.delete(o)});return n.submissions.set(o,c),c}discardScope(e){for(let[t,r]of this.sessions)if(t.startsWith(e)){new Set([...r.attachments,...r.recovery?.payload.attachments??[]]).forEach(this.dependencies.disposeAttachment),this.sessions.delete(t);try{this.dependencies.storage().removeItem("wand-draft-"+t)}catch{}}try{let t=this.dependencies.storage();for(let r=(t.length??0)-1;r>=0;r--){let n=t.key?.(r);n?.startsWith("wand-draft-"+e)&&t.removeItem(n)}}catch{}this.notify()}retain(e){for(let[t,r]of this.sessions)if(!(e.has(t)||t.startsWith("conversation-draft:"))){r.attachments.forEach(this.dependencies.disposeAttachment),this.sessions.delete(t);try{this.dependencies.storage().removeItem("wand-draft-"+t)}catch{}}}},zye=class{constructor(){oe(this,"versions",new Map)}read(e){return{...this.versions.get(e)??{revision:0,epoch:0}}}advance(e,t){let r=this.read(e);return t==="server"?r.epoch+=1:r.revision+=1,this.versions.set(e,r),{...r}}filter(e,t,r){let n=this.read(t);if(n.revision===r.revision&&n.epoch===r.epoch)return e;let{queuedMessages:a,...o}=e;return o}rollback(e,t,r,n,a){let o=this.read(e);if(o.epoch!==n.epoch||!a&&o.revision!==n.revision)return null;let l=r.slice();if(a){l=t.slice();let c=l[a.index]===a.text?a.index:l.lastIndexOf(a.text);if(c<0)return null;l.splice(c,1)}return this.advance(e,"local"),l}},FV=8,N1=12,_$=96*1024;function Hye(e){return Math.max(0,e.scrollHeight-e.clientHeight-Math.abs(e.scrollTop))}function qye(e){return e.clientHeight>0&&Hye(e)<e.clientHeight*2}var Wye=class{constructor(){oe(this,"attempt","")}canAttempt(e,t,r=!1){return r||this.attempt!==`${e}\0${t}`}attempted(e,t){this.attempt=`${e}\0${t}`}},Lt=new Lye({storage:()=>localStorage,isUnloading:()=>!!m.pageUnloading,disposeAttachment:e=>{e.previewUrl&&URL.revokeObjectURL(e.previewUrl)}}),Ja=new zye,P$=ep.configPath,L9="wand-chat-expand-state-v1",v6=[function(){},function(){localStorage.setItem("wand-sidebar-pinned","true"),localStorage.setItem("wand-sidebar-collapsed","false")}];(function(){try{var e=localStorage.getItem("wand-ls-schema"),t=e==null?0:parseInt(e,10);t>=0||(t=0);for(var r=t;r<v6.length;r++)try{v6[r]()}catch{}t<v6.length&&localStorage.setItem("wand-ls-schema",String(v6.length))}catch{}})();function O1(e,t){try{var r=localStorage.getItem(e);return r==="true"?!0:r==="false"?!1:t}catch{return t}}function Vr(e,t){try{localStorage.setItem(e,String(!!t))}catch{}}var m={selectedId:(function(){try{var e=new URL(window.location.href),t=e.searchParams.get("session");if(t)return t}catch{}if(yu())return null;try{return localStorage.getItem("wand-selected-session")||null}catch{return null}})(),pollTimer:null,config:null,sessions:[],terminal:null,terminalFitAddon:null,terminalWriteQueue:Promise.resolve(),terminalWriteGeneration:0,terminalRestoreGeneration:0,terminalRestoring:!1,terminalStatesBySession:{},terminalSessionId:null,terminalOutput:"",terminalLiveStreamSessions:{},terminalHealthTimer:null,terminalAutoFollow:!0,terminalProgrammaticScrollUntil:0,showTerminalJumpToBottom:!1,terminalViewportEl:null,terminalViewportScrollHandler:null,terminalViewportTouchHandler:null,terminalViewportTouchStartHandler:null,terminalComposing:!1,composerComposing:!1,composerCompositionGeneration:0,composerCompositionTarget:null,resizeObserver:null,resizeHandler:null,resizeTimer:null,inputQueue:Promise.resolve(),pendingMessages:[],messageQueue:[],crossSessionQueue:(function(){try{var e=localStorage.getItem("wand-cross-session-queue"),t=e?JSON.parse(e):[];return Array.isArray(t)?t:[]}catch{return[]}})(),structuredInputQueue:[],queueBarExpanded:!1,queueBarDrag:null,queueBarPromoting:!1,pageUnloading:!1,promptOptimizeRequest:null,actionError:null,loginPending:!1,loginChecked:!1,loginLockUntil:0,loginLockTicker:0,sessionsDrawerOpen:O1("wand-sidebar-open",!1),sidebarPinned:O1("wand-sidebar-pinned",!0),sidebarCollapsed:O1("wand-sidebar-collapsed",!1),chatMode:"managed",chatModels:(function(){try{var e=localStorage.getItem("wand-chat-model")||"",t={};return Zs.forEach(function(n){t[n]=localStorage.getItem("wand-chat-model-"+n)||(n==="claude"?e:"")}),t}catch{var r={};return Zs.forEach(function(n){r[n]=""}),r}})(),chatModel:(function(){try{return localStorage.getItem("wand-chat-model")||""}catch{return""}})(),chatThinking:(function(){try{var e=localStorage.getItem("wand-thinking-effort")||"off";return e==="off"||e==="standard"||e==="deep"||e==="max"||V5(e)?e:"off"}catch{return"off"}})(),availableModels:[],availableCodexModels:[],availableOpenCodeModels:[],availableGrokModels:[],availableQoderModels:[],availablePiModels:[],providerThinkingEfforts:{},modelCatalogRevision:"",modelsRefreshing:!1,sessionTool:"claude",preferredCommand:"claude",lastResize:{cols:0,rows:0},isOnline:navigator.onLine,ws:null,wsConnected:!1,lastWsMessageAt:0,wsHeartbeatCheckTimer:null,_updateBubbleShown:!1,notificationHistory:{},notifSound:(function(){try{var e=localStorage.getItem("wand-notif-sound");return e===null?!0:e==="true"}catch{return!0}})(),notifVolume:(function(){try{var e=localStorage.getItem("wand-notif-volume");return e===null?80:Math.max(0,Math.min(100,parseInt(e,10)||80))}catch{return 80}})(),notifBubble:(function(){try{var e=localStorage.getItem("wand-notif-bubble");return e===null?!0:e==="true"}catch{return!0}})(),toolContentCache:{},lastSeqBySession:{},chatResyncPendingBySession:{},currentView:"terminal",terminalScale:(function(){try{var e=localStorage.getItem("wand-terminal-scale");return e?parseFloat(e):1}catch{return 1}})(),terminalBaseFontSize:13,filePanelOpen:(function(){try{return localStorage.getItem("wand-file-panel-open")==="true"}catch{return!1}})(),topbarMoreOpen:!1,gitStatus:null,gitStatusSessionId:null,gitStatusLastFetchAt:0,turnActiveBySession:{},chatStickToBottom:!0,chatUnreadCount:0,chatUnreadStartIndex:-1,chatScrollThreshold:160,chatIsProgrammaticScroll:!1,chatProgrammaticScrollUntil:0,chatScrollElement:null,chatScrollHandler:null,chatScrollWheelHandler:null,chatScrollTouchStartHandler:null,chatScrollTouchMoveHandler:null,chatTouchStartY:0,chatInitialRenderDone:!1,lastForegroundSyncAt:0,foregroundSyncTimer:null,wsReconnectAttempts:0,wsReconnectTimer:null,currentMessages:[],chatRenderCache:new jU,chatRenderEpoch:0,chatRenderPendingToken:null,lastRenderedMsgCount:0,lastRenderedEmpty:null,renderPending:!1,chatPageSize:FV,chatRenderedCount:FV,chatRenderWindowMessageCount:0,currentTask:null,terminalInteractive:!1,claudeHistory:[],claudeHistoryLoaded:!1,claudeHistoryExpanded:!1,claudeHistoryExpandedDirs:{},sessionsManageMode:!1,selectedSessionIds:{},selectedClaudeHistoryIds:{},codexHistory:[],codexHistoryLoaded:!1,codexHistoryExpandedDirs:{},selectedCodexHistoryIds:{},askUserSelections:{},workingDir:(function(){try{var e=localStorage.getItem("wand-working-dir");return e||""}catch{return""}})()};(function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var e=function(){m.pageUnloading=!0};window.addEventListener("pagehide",e),window.addEventListener("beforeunload",e),window.addEventListener("pageshow",function(){m.pageUnloading=!1})}})();var z9="\u4E2D\u6587",V6={\u4E2D\u6587:{"agentRun.count":"{count} \u4E2A\u5B50 Agent","agentRun.subagent":"\u5B50 Agent","agentRun.status.failed":"\u5931\u8D25","agentRun.status.running":"\u8FD0\u884C\u4E2D","agentRun.status.background":"\u8FD0\u884C\u72B6\u6001\u672A\u77E5","agentRun.status.backgroundDone":"\u8FD0\u884C\u72B6\u6001\u672A\u77E5","agentRun.status.interrupted":"\u5DF2\u4E2D\u65AD","agentRun.status.pending":"\u672A\u5B8C\u6210","agentRun.status.completed":"\u5DF2\u5B8C\u6210","agentRun.noOutput":"\uFF08\u65E0\u8F93\u51FA\uFF09","agentRun.noTask":"\u672A\u63D0\u4F9B\u4EFB\u52A1\u8BF4\u660E","agentRun.agent_list":"\u5B50 Agent \u5217\u8868","agentRun.process":"\u8FC7\u7A0B","agentRun.process_count":"{count} \u6B65","agentRun.result.done":"\u6700\u7EC8\u7ED3\u8BBA","agentRun.result.failed":"\u5931\u8D25\u539F\u56E0","agentRun.receipt.action":"\u4EC5\u6709\u6D3E\u53D1\u56DE\u6267","agentRun.receipt.note":"\u4EC5\u6536\u5230\u540E\u53F0\u6D3E\u53D1\u56DE\u6267\uFF0C\u5C1A\u65E0\u53EF\u5173\u8054\u7684\u539F\u751F\u7EC8\u6001\u6216\u7ED3\u679C\uFF1B\u5F53\u524D\u8FD0\u884C\u72B6\u6001\u672A\u77E5\uFF0C\u4E3B\u4F1A\u8BDD\u72B6\u6001\u4E0D\u80FD\u8BC1\u660E\u5B50\u4EFB\u52A1\u4ECD\u5728\u6267\u884C\u6216\u5DF2\u5B8C\u6210\u3002","agentRun.receipt.run":"\u540E\u53F0\u4EFB\u52A1","agentRun.receipt.output":"\u8F93\u51FA\u6587\u4EF6","agentRun.waiting":"\u7B49\u5F85\u5B50 Agent \u8F93\u51FA\u2026","agentRun.summary_aria":"\u5B50 Agent\uFF0C{count} \u4E2A\uFF0C{status}\u3002\u6700\u540E\u52A8\u4F5C\uFF1A{latest}","history.expand":"\u5C55\u5F00\u5386\u53F2\u5BF9\u8BDD","history.collapse":"\u6536\u8D77\u5386\u53F2\u5BF9\u8BDD","stop.confirm.title":"\u505C\u6B62\u4EFB\u52A1","stop.confirm.message":"\u786E\u5B9A\u8981\u505C\u6B62\u5F53\u524D\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u5417\uFF1F","stop.confirm.ok":"\u505C\u6B62","stop.confirm.cancel":"\u53D6\u6D88"},English:{"agentRun.count":"{count} subagents","agentRun.subagent":"Subagent","agentRun.status.failed":"Failed","agentRun.status.running":"Running","agentRun.status.background":"Run status unknown","agentRun.status.backgroundDone":"Run status unknown","agentRun.status.interrupted":"Interrupted","agentRun.status.pending":"No result","agentRun.status.completed":"Done","agentRun.noOutput":"(no output)","agentRun.noTask":"No task description","agentRun.agent_list":"Subagents","agentRun.process":"Process","agentRun.process_count":"{count} steps","agentRun.result.done":"Final result","agentRun.result.failed":"Failure reason","agentRun.receipt.action":"Dispatch receipt only","agentRun.receipt.note":"Only a background dispatch receipt is available, without a correlated native terminal event or result. The run status is unknown; the parent session status cannot establish whether the child is running or finished.","agentRun.receipt.run":"Background task","agentRun.receipt.output":"Output file","agentRun.waiting":"Waiting for subagent output\u2026","agentRun.summary_aria":"Subagents, {count}, {status}. Last action: {latest}","history.expand":"Show earlier conversation","history.collapse":"Hide earlier conversation","stop.confirm.title":"Stop task","stop.confirm.message":"Stop the task that's currently running?","stop.confirm.ok":"Stop","stop.confirm.cancel":"Cancel"}};function _U(){var e=m.config&&typeof m.config.language=="string"?m.config.language.trim():"";if(!e)return z9;if(V6[e])return e;var t=e.toLowerCase();return t==="english"||t==="en"||t.indexOf("english")===0||t.indexOf("\u82F1")===0?"English":t==="\u4E2D\u6587"||t==="zh"||t.indexOf("zh")===0||t.indexOf("\u4E2D")===0||t.indexOf("chinese")===0?"\u4E2D\u6587":"English"}function B1(e,t){var r=_U(),n=V6[r]||V6[z9],a=n&&e in n?n[e]:null;if(a==null){var o=V6[z9];a=o&&e in o?o[e]:e}if(t&&typeof a=="string")for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(a=a.split("{"+l+"}").join(t[l]));return a}var Vye={shield:'<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/>',shieldCheck:'<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/><polyline points="9 12 11 14 15 10"/>',cpu:'<rect x="7" y="7" width="10" height="10" rx="2"/><path d="M9 1v3"/><path d="M15 1v3"/><path d="M9 20v3"/><path d="M15 20v3"/><path d="M20 9h3"/><path d="M20 15h3"/><path d="M1 9h3"/><path d="M1 15h3"/><rect x="10" y="10" width="4" height="4" rx="1"/>',brain:'<path d="M9.5 4.5a3 3 0 0 0-4.7 3.1 3.3 3.3 0 0 0 .3 6.1A3 3 0 0 0 8 19h1.5V4.5z"/><path d="M14.5 4.5a3 3 0 0 1 4.7 3.1 3.3 3.3 0 0 1-.3 6.1A3 3 0 0 1 16 19h-1.5V4.5z"/><path d="M9.5 8H7.8"/><path d="M14.5 8h1.7"/><path d="M9.5 13H7.6"/><path d="M14.5 13h1.9"/>',keyboard:'<rect x="2" y="6" width="20" height="12" rx="2"/><path d="M6 10h.01M10 10h.01M14 10h.01M18 10h.01M6 14h.01M18 14h.01M9 14h6"/>',terminal:'<polyline points="4 7 9 12 4 17"/><line x1="12" y1="17" x2="20" y2="17"/>',chat:'<path d="M21 12a8 8 0 0 1-12.9 6.3L3 20l1.7-5.1A8 8 0 1 1 21 12z"/>',folder:'<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/>',chevronDown:'<polyline points="6 9 12 15 18 9"/>',chevronRight:'<polyline points="9 6 15 12 9 18"/>',wrench:'<path d="M14.7 6.3a4 4 0 1 1 4 4l-9 9-3.5 1 1-3.5 7.5-7.5z"/>',sliders:'<path d="M4 7h10M18 7h2"/><circle cx="16" cy="7" r="2"/><path d="M4 17h2M10 17h10"/><circle cx="8" cy="17" r="2"/>',sparkle:'<path d="M12 3l1.3 3.8L17 8.1l-3.7 1.3L12 13l-1.3-3.6L7 8.1l3.7-1.3L12 3z"/><path d="M18 13l.7 2 2 .7-2 .7-.7 2-.7-2-2-.7 2-.7.7-2z"/>',spark:'<path d="M12 2v4M12 18v4M4.9 4.9l2.8 2.8M16.3 16.3l2.8 2.8M2 12h4M18 12h4M4.9 19.1l2.8-2.8M16.3 7.7l2.8-2.8"/><circle cx="12" cy="12" r="3"/>',info:'<circle cx="12" cy="12" r="9"/><path d="M12 11v5M12 8h.01"/>',warning:'<path d="M12 3l10 18H2L12 3z"/><path d="M12 10v5M12 18h.01"/>',question:'<circle cx="12" cy="12" r="9"/><path d="M9.8 9a2.5 2.5 0 1 1 3.5 2.3c-.9.4-1.3 1-1.3 2.2M12 17h.01"/>',check:'<path d="M20 6 9 17l-5-5"/>',circle:'<circle cx="12" cy="12" r="7"/>',close:'<path d="M18 6 6 18"/><path d="M6 6l12 12"/>',paw:'<circle cx="7.5" cy="9" r="2" fill="currentColor" stroke="none"/><circle cx="12" cy="6.8" r="2" fill="currentColor" stroke="none"/><circle cx="16.5" cy="9" r="2" fill="currentColor" stroke="none"/><circle cx="18" cy="13.3" r="1.8" fill="currentColor" stroke="none"/><path d="M7.2 16.3c.5-2.9 2.3-4.8 4.8-4.8s4.3 1.9 4.8 4.8c.3 1.8-.9 3.2-2.6 2.6-.8-.3-1.4-.6-2.2-.6s-1.4.3-2.2.6c-1.7.6-2.9-.8-2.6-2.6z" fill="currentColor" stroke="none"/>',refresh:'<polyline points="23 4 23 10 17 10"/><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"/>',signal:'<path d="M2 12a15 15 0 0 1 20 0"/><path d="M5 16a10 10 0 0 1 14 0"/><path d="M9 20a4 4 0 0 1 6 0"/><circle cx="12" cy="20" r="0.5" fill="currentColor"/>',file:'<path d="M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"/><polyline points="14 3 14 9 20 9"/>',sigma:'<polyline points="18 4 6 4 13 12 6 20 18 20"/>',x:'<path d="M18 6 6 18"/><path d="M6 6l12 12"/>',plus:'<line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/>',paperclip:'<path d="M21.44 11.05 12.25 20.24a6 6 0 0 1-8.49-8.49l8.84-8.84a4 4 0 1 1 5.66 5.66L9.41 17.41a2 2 0 1 1-2.83-2.83l8.84-8.83"/>'};function U6(e,t){var r=Vye[e];if(!r)return"";t=t||{};var n=t.size||14,a=t.strokeWidth||1.8,o=t.cls?' class="'+t.cls+'"':"",l=t.fill||"none";return"<svg"+o+' width="'+n+'" height="'+n+'" viewBox="0 0 24 24" fill="'+l+'" stroke="currentColor" stroke-width="'+a+'" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">'+r+"</svg>"}function N$(e){if(!e)return null;let t=e.querySelector(".chat-messages");if(t)return t;let r=document.createElement("div");return r.className="chat-messages",e.appendChild(r),r}var PU=null;function Uye(e){PU=e}function Kye(){return PU}var v9=B(_(),1),Gye=B(si(),1),H9=B(er(),1),Ts=B(Ee(),1),Ef=new Map;function Xye({attrs:e,source:t}){let r=v9.useRef(null),n=l=>({phase:l.dataset.phase||"idle",queued:l.classList.contains("queue-mode"),disabled:l.disabled,label:l.getAttribute("aria-label")||void 0,title:l.title}),[a,o]=v9.useState(()=>n(t));return v9.useLayoutEffect(()=>{let l=r.current;if(!l)return;let c=()=>o(p=>{let h=n(l);return p.phase===h.phase&&p.queued===h.queued&&p.disabled===h.disabled&&p.label===h.label&&p.title===h.title?p:h}),d=new MutationObserver(()=>(0,H9.flushSync)(c));return d.observe(l,{attributes:!0,attributeFilter:["data-phase","class","disabled","aria-label","title"]}),c(),()=>d.disconnect()},[]),(0,Ts.jsx)(rl,{...e,ref:r,htmlType:"button",size:"middle","data-phase":a.phase,"aria-label":a.label,title:a.title,className:[...Array.from(t.classList).filter(l=>l!=="queue-mode"&&!l.startsWith("ant-btn")),a.queued&&"queue-mode"].filter(Boolean).join(" "),type:a.queued?"default":"primary",danger:a.phase==="running"||a.phase==="failed",disabled:a.disabled,loading:a.phase==="sending",icon:a.phase==="sending"?void 0:(0,Ts.jsx)(Fe,{name:a.phase==="running"?"stop":a.phase==="sent"?"check":"up",size:15})})}function NU(e){let t=Ef.get(e);return t?t.key:e.matches("button[data-antd-control]")?JSON.stringify(["library-button",e.id||null,Array.from(e.classList).filter(r=>!/^(is-|selected$|copied$)/.test(r)),e.getAttribute("data-action"),e.getAttribute("data-tool-use-id"),e.getAttribute("data-question-index"),e.getAttribute("data-option-index"),e.getAttribute("data-agent-run-id"),e.getAttribute("data-agent-task-id"),e.getAttribute("onclick")]):null}function Yye(e,t){return Ef.has(e)&&t.matches("button[data-antd-control]")}function O$(e,t,r){let n=e.querySelector("button");n?.classList.contains("copied")&&(t=t.cloneNode(!0),t.classList.add("copied"),t.textContent=n.textContent),r.source=t;let a={};for(let l of Array.from(t.attributes))!["class","type","data-antd-control","style","disabled"].includes(l.name)&&!l.name.startsWith("on")&&(a[l.name]=l.value);let o=Array.from(t.attributes).filter(l=>l.name.startsWith("on"));if(t.id==="send-input-button"){(0,H9.flushSync)(()=>r.root.render((0,Ts.jsx)(La,{children:(0,Ts.jsx)(Xye,{attrs:a,source:t})})));return}(0,H9.flushSync)(()=>r.root.render((0,Ts.jsx)(La,{children:(0,Ts.jsx)(rl,{...a,htmlType:"button",size:t.hasAttribute("data-composer-control")?"middle":"small",block:t.classList.contains("ask-user-option"),type:t.dataset.antdControl==="primary"||t.classList.contains("ask-user-option")&&t.classList.contains("selected")?"primary":t.id==="todo-progress-toggle"?"text":"default",disabled:t.disabled,className:t.className||void 0,ref:l=>{if(l){for(let c of o)l.setAttribute(c.name,c.value);t.hasAttribute("style")&&(l.style.cssText=t.style.cssText)}},children:t.classList.contains("ask-user-option")?(0,Ts.jsxs)(Xe,{vertical:!0,gap:"small",align:"start",children:[(0,Ts.jsx)(Pt.Text,{strong:!0,children:t.dataset.optionLabel||t.querySelector(".ask-user-option-label")?.textContent}),t.querySelector(".ask-user-option-desc")&&(0,Ts.jsx)(Pt.Text,{type:"secondary",children:t.querySelector(".ask-user-option-desc")?.textContent})]}):t.classList.contains("prompt-optimize-btn")?(0,Ts.jsx)(Xe,{component:"span",align:"center",gap:4,dangerouslySetInnerHTML:{__html:t.innerHTML}}):(0,Ts.jsx)("span",{dangerouslySetInnerHTML:{__html:t.innerHTML}})})})))}function OU(e,t,r){let n=e.parentElement,a=n&&Ef.get(n);if(!n||!a?.source){e.textContent=t,e.classList.toggle("copied",r);return}e.classList.remove("copied");let o=a.source.cloneNode(!0);o.textContent=t,o.classList.toggle("copied",r),O$(n,o,a)}function Qye(e,t){let r=Ef.get(e);return!r||!t.matches("button[data-antd-control]")?!1:(O$(e,t,r),!0)}function R1(e){Ca("wand-browser-control-motion",`
|
|
229
|
-
/* These actions carry business summaries, not a one-line button label. */
|
|
230
|
-
.ant-btn.agent-run-summary, .ant-btn.agent-run-agent, .ant-btn.ask-user-option { height:auto; white-space:normal; }
|
|
231
|
-
.ant-btn.agent-run-summary > span:not([class]), .ant-btn.agent-run-agent > span:not([class]) { display:flex; align-items:center; gap:8px; width:100%; min-width:0; }
|
|
232
|
-
.ant-btn.code-copy { width:80px; flex-shrink:0; }
|
|
233
|
-
`);for(let[t,r]of Ef)t.isConnected||(r.root.unmount(),Ef.delete(t));e.querySelectorAll("button[data-antd-control]").forEach(t=>{t.closest(".input-composer")&&t.setAttribute("data-composer-control","");let r=document.createElement("span");r.style.display="contents";let n={root:(0,Gye.createRoot)(r),key:NU(t)};t.replaceWith(r),Ef.set(r,n),O$(r,t,n)})}var OE=null;function Zye(e){OE=e}var Jye=e=>{OE?.presentChat(e)},RU=e=>{OE?.refreshChatPresentation(e)},ewe=(e,t,r)=>OE?.patchChatPresentation(e,t,r)??!1,Bu=null,L1=0,z1=0,oE=new Map,sE=new WeakMap,H1=null;function kf(){Bu=null,oE.clear(),sE=new WeakMap,L1++}function twe(){oE.clear(),sE=new WeakMap}function LU(e){let t=Bu?.root;return!!t&&e.some(r=>Array.from(r.removedNodes).some(n=>n===t||n instanceof Element&&n.contains(t)))}function zU(){H1&&LU(H1.takeRecords())&&kf()}function R$(e){if(typeof HTMLElement>"u")return null;zU();let t=e||document.querySelector("#chat-output > .chat-messages"),r=m.currentView||"chat";return!t?.isConnected||r!=="chat"?(kf(),null):((!Bu||Bu.root!==t||Bu.sessionId!==m.selectedId||Bu.view!==r)&&(kf(),Bu={id:++L1,sessionId:m.selectedId,view:r,root:t},H1||(H1=new MutationObserver(n=>{LU(n)&&kf()}),H1.observe(document,{childList:!0,subtree:!0}))),Bu)}function L$(e){return zU(),!!e&&Bu===e&&e.root.isConnected&&m.selectedId===e.sessionId&&(m.currentView||"chat")===e.view&&document.querySelector("#chat-output > .chat-messages")===e.root}if(typeof document<"u"){for(let e of["focusin","pointerdown","wheel","touchstart"])document.addEventListener(e,()=>{z1++},{capture:!0,passive:!0});document.addEventListener("keydown",e=>{e.key==="Tab"&&z1++},!0),window.addEventListener("blur",()=>{z1++}),window.addEventListener("pagehide",kf),window.addEventListener("beforeunload",kf)}function DV(e){return!Array.isArray(e?.content)||!e.content.some(t=>t?.__processing||t?.__queued)}function rwe(e){return JSON.stringify([e?.role,e?.author?.id||null,!!e?.notice])}function nwe(e,t,r){let n=R$(r);if(!n)return null;let a=Array.isArray(e.messages)?e.messages:[],o=new Map,l=new Map,c=0;for(let g of a)DV(g)&&(o.set(g,c++),l.set(g,(l.get(g)||0)+1));let d=new Map;function p(g){for(let v of["uuid","id","messageId","turnId"])if(typeof g?.[v]=="string"&&g[v])return JSON.stringify([v,g[v]]);return null}for(let g of t){let v=p(g);v&&d.set(v,(d.get(v)||0)+1)}let h=new Map;return{messages:t.map(g=>{if(!DV(g))return null;let v=p(g),y=o.get(g),w=null;!v&&y!==void 0&&e.sessionKind!=="structured"&&l.get(g)===1&&(w=sE.get(g)||"reference:"+ ++L1,sE.set(g,w));let x=v&&d.get(v)===1?"id:"+v:!v&&e.sessionKind==="structured"&&y!==void 0?"structured:"+((e.messageOffset||0)+y):w;if(!x)return null;let k=rwe(g),F=oE.get(x),C=F?.guard===k?F:{key:"view:"+n.id+":turn:"+ ++L1,displayKey:"source:"+x+":"+ ++L1,guard:k,blockOffset:0},D=y===0&&Number.isInteger(e.leadingBlockOffset)?e.leadingBlockOffset:0,S={...C,blockOffset:D};return h.set(x,S),S}),commit(){L$(n)&&(oE=h)}}}function awe(e,t){if(!e||typeof HTMLElement>"u")return e;let r=document.createElement("template");return r.innerHTML=e,Array.from(r.content.children).forEach((n,a)=>{n.setAttribute("data-chat-key",JSON.stringify(["block",t,a]))}),r.innerHTML}function b6(e){let t=NU(e);if(t)return t;if(e.matches(".chat-file-attachment"))return"attachment:"+e.getAttribute("data-path");let r=e.getAttribute("data-chat-key");if(r)return r;let n=e.getAttribute("data-entry-key");if(n)return"entry:"+n;if(e.classList.contains("agent-run-agent")||e.classList.contains("agent-run-detail-panel"))return e.tagName+":agent:"+e.getAttribute("data-agent-run-id")+":"+e.getAttribute("data-agent-task-id");let a=e.getAttribute("data-expand-key");if(a)return"expand:"+a;let o=e.getAttribute("data-tool-use-id");return o?e.tagName+":tool:"+o:e.matches("a[href]")?"link:"+e.getAttribute("href"):e.matches(".ask-user-option")?e.tagName+":option:"+e.getAttribute("data-question-index")+":"+e.getAttribute("data-option-index"):e.matches("button, summary, [role='button']")?"control:"+q9(e)+":"+(e.getAttribute("onclick")||""):null}function AV(e){return e instanceof Element&&e.matches(".assistant-reply-disclosure, .assistant-reply-host, .msg-copy-btn")}function q9(e){return e instanceof Element?e.tagName+":"+Array.from(e.classList).filter(t=>!/^(?:is-|collapsed$|expanded$|selected$|copied$|visible$|inline-tool-open$|assistant-reply-(?:collapsed|expanded)$)/.test(t)).join(" "):String(e.nodeType)}function iwe(e,t){let r=e instanceof HTMLDetailsElement?e.open:null,n=e.matches(".code-copy, .msg-copy-btn")&&e.classList.contains("copied"),a=e.matches(".msg-copy-btn")&&e.classList.contains("visible"),o=e.matches(".chat-message")?["assistant-reply-collapsed","assistant-reply-expanded"].filter(l=>e.classList.contains(l)):[];n&&o.push("copied"),a&&o.push("visible");for(let l of Array.from(e.attributes))!t.hasAttribute(l.name)&&l.name!=="open"&&l.name!=="data-x-presentation"&&e.removeAttribute(l.name);for(let l of Array.from(t.attributes)){if(l.name==="open"&&r!==null)continue;let c=l.name==="class"&&o.length?Array.from(new Set(l.value.split(/\s+/).concat(o))).join(" "):l.value;e.getAttribute(l.name)!==c&&e.setAttribute(l.name,c)}r!==null&&(e.open=r),n&&e.classList.add("copied"),a&&e.classList.add("visible")}function z$(e,t){if(e.isEqualNode(t))return;if(!(e instanceof Element)||!(t instanceof Element)){e.nodeValue!==t.nodeValue&&(e.nodeValue=t.nodeValue);return}if(Qye(e,t)||(iwe(e,t),e.matches(".code-copy.copied, .msg-copy-btn.copied")))return;let r=e.scrollLeft,n=e.scrollTop,a=owe(e);ewe(e,t,z$)||HU(e,t),e instanceof HTMLElement&&e.matches(".chat-activity-timeline")&&Jye(e),e.scrollLeft!==r&&(e.scrollLeft=r);let o=a?.node.isConnected&&e.contains(a.node)?n+a.node.getBoundingClientRect().top-e.getBoundingClientRect().top-a.top:n;e.scrollTop!==o&&(e.scrollTop=o)}function owe(e){if(!e.matches(".chat-activity-timeline")||e.closest("[inert]"))return null;let t=e.getBoundingClientRect(),r=o=>{let l=o.getBoundingClientRect();return l.bottom>t.top&&l.top<t.bottom},n=document.activeElement,a=n instanceof HTMLElement&&e.contains(n)&&r(n)?n:Array.from(e.querySelectorAll(".chat-call")).find(r);return a?{node:a,top:a.getBoundingClientRect().top-t.top}:null}function HU(e,t){let r=Array.from(e.childNodes).filter(p=>!AV(p)),n=Array.from(t.childNodes),a=new Map,o=new Set;for(let p of r){let h=p instanceof Element?b6(p):null;h&&(a.has(h)?o.add(h):a.set(h,p))}let l=new Set;for(let p of n){let h=p instanceof Element?b6(p):null;h&&(l.has(h)&&o.add(h),l.add(h))}let c=new Set,d=e.firstChild;for(;d&&AV(d);)d=d.nextSibling;n.forEach((p,h)=>{let g=p instanceof Element?b6(p):null,v=g&&!o.has(g)?a.get(g):void 0;if(!g){let y=x=>!(x instanceof Element&&b6(x))&&q9(x)===q9(p),w=r.filter(y);w.length===1&&n.filter(y).length===1?v=w[0]:r.length===n.length&&r[h]&&y(r[h])&&(v=r[h])}if(v&&(c.has(v)||v.nodeType!==p.nodeType||v instanceof Element&&p instanceof Element&&v.tagName!==p.tagName&&!Yye(v,p))&&(v=void 0),v){if(c.add(v),z$(v,p),v!==d)if(v instanceof Element&&v.contains(document.activeElement))for(;d&&d!==v;){let y=d.nextSibling;e.appendChild(d),d=y}else e.insertBefore(v,d);d=v.nextSibling}else e.insertBefore(p,d),c.add(p)});for(let p of r)!c.has(p)&&p.parentNode===e&&e.removeChild(p)}function qU(e,t){return z$(e,t),e}function swe(e,t){let r=document.createElement(e.tagName);r.innerHTML=t,HU(e,r)}function lwe(e,t){let r=document.createElement("template");r.innerHTML=t;let n=Array.from(e.children),a=new Map;for(let d of n){let p=d.getAttribute("data-chat-owner");p&&a.set(p,d)}let o=Array.from(r.content.children),l=new Set,c=e.firstElementChild;for(let d of o){let p=d.getAttribute("data-chat-owner"),h=p?a.get(p):null;if(h&&!l.has(h)){if(qU(h,d),l.add(h),h!==c)if(h.contains(document.activeElement))for(;c&&c!==h;){let g=c.nextElementSibling;e.appendChild(c),c=g}else e.insertBefore(h,c);c=h.nextElementSibling}else e.insertBefore(d,c),l.add(d)}for(let d of n)!l.has(d)&&d.parentElement===e&&d.remove()}function $V(e){return e instanceof HTMLElement&&e.isConnected&&!e.closest("[hidden], [inert], .assistant-reply-collapsed .chat-message-content")&&!e.matches(":disabled, [aria-disabled='true']")&&e.getClientRects().length>0&&e.matches("button, a[href], summary, [tabindex]")}function uwe(e){let t=R$(e);if(!t)return null;let r=document.activeElement,n=r instanceof HTMLElement&&e.contains(r)?r:null,a=n?.closest(".chat-message"),o=!a||a.getAttribute("data-chat-owner")?.startsWith("view:"+t.id+":")?n:null,l=z1,c=o?[o.closest(".chat-tool-card, .inline-terminal, .inline-diff"),o.closest(".chat-call"),o.closest(".chat-activity"),o.closest(".agent-run-process"),o.closest(".agent-run"),a]:[],d=[];for(let y of c){let w=y?.querySelector(".chat-tool-header[tabindex], .term-header, .diff-header, .chat-call-button, .chat-process-summary, .agent-run-process-summary, .agent-run-summary, .assistant-reply-disclosure");w&&w!==o&&d.push(w)}let p=e.getBoundingClientRect(),h=o?.getBoundingClientRect(),g=o&&h&&h.bottom>p.top&&h.top<p.bottom?{node:o,top:h.top-p.top}:null,v=()=>L$(t)&&l===z1;return{anchor:g,current:v,finish(){if(!o||!v()||$V(o)||!document.hasFocus())return;let y=document.activeElement;if(y!==o&&y!==document.body)return;let w=d.find($V);w?w.focus({preventScroll:!0}):(e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0}))}}}var WU=B(si(),1),VU=B(er(),1);function cwe(){Bb().catch(()=>{});let e=new URLSearchParams(Hn()),t=e.get("view");(t==="taskboard"||t==="issues")&&(aD(),globalThis.__wandImportBrowserModule("91408c351070d6d7").catch(()=>{})),(e.get("sidebar")==="tasks"||!e.has("sidebar")&&Ar.getSnapshot().mode==="tasks")&&(an.preloadTaskGroups(),globalThis.__wandImportBrowserModule("5f635cbcab701433").catch(()=>{}))}function lE(){iD(),an.clearPreload()}go(lE);async function dwe(e,t={}){let r=Uw(e),n;try{n=await fetch(r?"/api/login/ticket":"/api/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r?{ticket:e}:{password:e}),credentials:"same-origin"})}catch{return{ok:!1,kind:r?"unknown":"offline",message:r?"\u7968\u636E\u767B\u5F55\u7ED3\u679C\u672A\u77E5\uFF1B\u8BF7\u5148\u5237\u65B0\u6838\u5BF9\u767B\u5F55\u72B6\u6001\uFF0C\u4E0D\u8981\u91CD\u590D\u63D0\u4EA4\u3002":t.networkMessage??"\u767B\u5F55\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u8BD5\u3002"}}if(n.status===429){let o=await n.json().catch(()=>null),l=o&&typeof o.retryAfter=="number"?Math.max(1,Math.ceil(o.retryAfter)):0;return{ok:!1,kind:"rejected",message:o&&typeof o.error=="string"?o.error:"\u767B\u5F55\u5C1D\u8BD5\u6B21\u6570\u8FC7\u591A\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002",retryAfterMs:l?l*1e3:void 0}}if(!n.ok){if(r){let o=await n.json().catch(()=>null);return{ok:!1,kind:"rejected",message:o&&typeof o.error=="string"?o.error:"\u7968\u636E\u767B\u5F55\u672A\u786E\u8BA4\uFF1B\u8BF7\u5148\u5237\u65B0\u6838\u5BF9\u767B\u5F55\u72B6\u6001\uFF0C\u4E0D\u8981\u81EA\u52A8\u91CD\u8BD5\u3002"}}return{ok:!1,kind:"rejected",message:"\u5BC6\u7801\u9519\u8BEF\uFF0C\u8BF7\u91CD\u8BD5\u3002",credentialInvalid:!0}}let a;try{a=await fetch("/api/config",{credentials:"same-origin"})}catch{return{ok:!1,kind:"unknown",message:r?"\u7968\u636E\u767B\u5F55\u7ED3\u679C\u672A\u77E5\uFF1B\u8BF7\u5148\u5237\u65B0\u6838\u5BF9\u767B\u5F55\u72B6\u6001\uFF0C\u4E0D\u8981\u91CD\u590D\u63D0\u4EA4\u3002":"\u767B\u5F55\u7ED3\u679C\u672A\u786E\u8BA4\uFF1B\u8BF7\u5148\u5237\u65B0\u6838\u5BF9\u767B\u5F55\u72B6\u6001\uFF0C\u4E0D\u8981\u91CD\u590D\u63D0\u4EA4\u3002"}}return a.ok?{ok:!0,config:await a.json().catch(()=>null)}:{ok:!1,kind:"cookie-not-stored",message:t.cookieMessage??"\u767B\u5F55\u72B6\u6001\u672A\u80FD\u4FDD\u5B58\uFF0C\u8BF7\u91CD\u8BD5\u3002"}}function pwe(e,t){e&&Uw(t)&&k8(e)}function UU(e,t,r,n){return e==="pty"&&!!r&&t==="running"&&!n}function W9(e,t=new Map){if(e===null||typeof e!="object")return e;let r=t.get(e);if(r!==void 0)return r;if(Array.isArray(e)){let a=[];t.set(e,a);for(let o of e)a.push(W9(o,t));return a}let n={};t.set(e,n);for(let[a,o]of Object.entries(e))n[a]=W9(o,t);return n}function KU(e,t=new Set){if(e===null||typeof e!="object"||t.has(e))return e;t.add(e);for(let r of Object.values(e))KU(r,t);return Object.freeze(e)}function BV(e,t,r){let n=W9({auth:e.auth,viewport:e.viewport,capabilities:e.capabilities,layout:e.layout,selected:e.selected,sidebar:e.sidebar,topbar:e.topbar,legacyVisibility:e.legacyVisibility,revision:t});return r?KU(n):n}function fwe(e){let t=e??0;if(!Number.isFinite(t)||t<0||t>200)throw new RangeError("batchMs must be between 0 and 200 milliseconds");return t}function mwe(e){let t=globalThis.reportError;if(typeof t=="function"){t(e);return}console.error("[wand-ui-store] subscriber failed",e)}function hwe(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}var gwe=class{constructor(e){oe(this,"readSnapshot"),oe(this,"applyAction"),oe(this,"batchMs"),oe(this,"freezeSnapshots"),oe(this,"listeners",new Set),oe(this,"snapshot"),oe(this,"disposed",!1),oe(this,"pending",!1),oe(this,"scheduleGeneration",0),oe(this,"timer",null),this.readSnapshot=e.readSnapshot,this.applyAction=e.applyAction,this.batchMs=fwe(e.batchMs),this.freezeSnapshots=e.freezeSnapshots!==!1,this.snapshot=BV(this.readSnapshot(),0,this.freezeSnapshots)}getSnapshot(){return this.snapshot}subscribe(e){if(this.disposed)return()=>{};this.listeners.add(e);let t=!0;return()=>{t&&(t=!1,this.listeners.delete(e))}}dispatch(e){if(this.disposed)throw new Error("UiStore has been disposed");let t=this.applyAction(e);if(this.publish({sync:!0,reason:`action:${e.type}`}),!!hwe(t))return Promise.resolve(t).then(r=>(this.publish({sync:!0,reason:`action-settled:${e.type}`}),r),r=>{throw this.publish({sync:!0,reason:`action-settled:${e.type}`}),r})}publish(e={}){if(this.disposed)return;if(e.sync){this.cancelPendingPublish(),this.flush();return}if(this.pending)return;this.pending=!0;let t=++this.scheduleGeneration;if(this.batchMs===0){queueMicrotask(()=>this.flushScheduled(t));return}this.timer=setTimeout(()=>this.flushScheduled(t),this.batchMs)}dispose(){this.disposed||(this.disposed=!0,this.cancelPendingPublish(),this.listeners.clear())}isDisposed(){return this.disposed}flushScheduled(e){this.disposed||!this.pending||e!==this.scheduleGeneration||(this.pending=!1,this.timer=null,this.flush())}cancelPendingPublish(){this.pending=!1,this.scheduleGeneration+=1,this.timer!==null&&clearTimeout(this.timer),this.timer=null}flush(){if(!this.disposed){this.snapshot=BV(this.readSnapshot(),this.snapshot.revision+1,this.freezeSnapshots);for(let e of[...this.listeners])try{e()}catch(t){mwe(t)}}}},vwe=class{constructor(e){oe(this,"store"),oe(this,"unsubscribeLegacy"),this.store=new gwe({readSnapshot:e.readSnapshot,applyAction:e.applyAction,batchMs:e.batchMs,freezeSnapshots:e.freezeSnapshots});let t=e.subscribeLegacy(r=>this.publish({reason:r}));this.unsubscribeLegacy=typeof t=="function"?t:()=>{}}getSnapshot(){return this.store.getSnapshot()}subscribe(e){return this.store.subscribe(e)}dispatch(e){return this.store.dispatch(e)}publish(e){this.store.publish(e)}dispose(){this.store.dispose();let e=this.unsubscribeLegacy;this.unsubscribeLegacy=()=>{},e()}};function GU(e){return e.width>=640?e.coarsePointer&&e.height<480:!0}var bwe={idle:"\u7A7A\u95F2",stopped:"\u5DF2\u505C\u6B62",running:"\u8FD0\u884C\u4E2D",thinking:"\u601D\u8003\u4E2D","waiting-input":"\u7B49\u5F85\u8F93\u5165",waiting_input:"\u7B49\u5F85\u8F93\u5165",reconnecting:"\u91CD\u8FDE\u4E2D",exited:"\u5DF2\u9000\u51FA",failed:"\u5DF2\u5931\u8D25"};function IV(e,t=0){if(!e)return t;let r=new Date(e).getTime();return Number.isFinite(r)?r:t}function ywe(e){return e?Object.values(e).filter(Boolean).length:0}function wwe(e){return e.config?"authenticated":e.loginChecked?"anonymous":"booting"}function XU(e){let t=Ge(e.sessionSource).toLowerCase();return t==="automation"||t==="startup"}function xwe(e){if(e.permissionBlocked)return"\u7B49\u5F85\u6388\u6743";let t=e.sessionKind==="structured"?"structured":"pty";if(t==="structured"&&e.structuredState?.inFlight)return e.structuredState.phase==="background"?"\u540E\u53F0\u4EFB\u52A1\u4E2D":"\u601D\u8003\u4E2D";if(Ni(e))return"\u521A\u5B8C\u6210";let r=Ge(e.status,"idle");return UU(t,r,e.provider??"",!!e.ptyBusy)||t==="pty"&&!e.provider&&r==="running"&&!e.ptyCommandRunning?"\u7A7A\u95F2":bwe[r]??r}function Ewe(e){if(e.permissionBlocked)return"permission-blocked";let t=e.sessionKind==="structured"?"structured":"pty";if(t==="structured"&&e.structuredState?.inFlight)return"running";if(Ni(e))return"just-completed";let r=Ge(e.status);return UU(t,r,e.provider??"",!!e.ptyBusy)||t==="pty"&&!e.provider&&r==="running"&&!e.ptyCommandRunning?"idle":r}function YU(e){return Ge(e.workingDir)||Ge(e.config?.defaultCwd)||Ge(e.config?.cwd)||"/tmp"}function kwe(e){return Ge(e.title)||Ge(e.description)||Ge(e.summary)||Ge(e.command)||"Wand \u4F1A\u8BDD"}function Cwe(e,t,r){let n=Ge(e.id),a=Ge(e.provider),o=_o(a)??(a||iu(e.command)||"terminal"),l=Ge(e.status,"idle"),c=e.sessionKind==="structured"?"structured":"pty",d=!!(e.worktree?.enabled??e.worktreeEnabled),p=XU(e)?"automation":"wand",h=e0(e),g=a==="pi"&&c==="structured"?e.structuredState?.engine==="core"?"sdk":"cli":void 0;return{id:n,source:p,provider:o,...g?{engine:g}:{},kind:c,title:kwe(e),description:Ge(e.description),cwd:Ge(e.cwd,YU(t)),status:l,statusLabel:xwe(e),active:n!==""&&n===t.selectedId,selected:!!r[n],resumable:c!=="structured"&&l!=="running"&&!!e.claudeSessionId,permissionBlocked:h.permissionBlocked,inFlight:h.inFlight,turnActive:h.inFlight||h.ptyRunning,titleGenerating:!!e.titleGenerating,...e.employeeId?{employeeId:e.employeeId}:{},...e.employeeName?{employeeName:e.employeeName}:{},...e.employeeAvatar?{employeeAvatar:e.employeeAvatar}:{},...e.startedAt?{startedAt:e.startedAt}:{},...e.endedAt?{endedAt:e.endedAt}:{},...(()=>{let v=Ge(e.structuredState?.turnStartedAt)||Ge(e.turnStartedAt),y=Ge(e.structuredState?.lastActivityAt)||Ge(e.lastActivityAt);return{...v?{turnStartedAt:v}:{},...y?{lastActivityAt:y}:{}}})(),...e.claudeSessionId?{claudeSessionId:e.claudeSessionId}:{},...e.workspaceId?{workspaceId:e.workspaceId}:{},...e.workspaceTaskId?{workspaceTaskId:e.workspaceTaskId}:{},...e.archived?{archived:!0}:{},...d?{worktree:{enabled:!0,branch:Ge(e.worktree?.branch??e.worktreeBranch)||void 0,path:Ge(e.worktree?.path??e.worktreePath)||void 0,mergeStatus:Ge(e.worktree?.mergeStatus??e.worktreeMergeStatus)||void 0}}:{}}}function MV(e,t){let r=new Map;return t.forEach((n,a)=>{n.id&&r.set(n.id,a)}),e.sort((n,a)=>{let o=IV(n.startedAt),l=IV(a.startedAt);return o!==l?l-o:(r.get(a.id)??0)-(r.get(n.id)??0)})}function QU(e,t){let r=e.sessions??[],n=e.selectedSessionIds??{},a=r.map(S=>Cwe(S,e,n)),o=a.find(S=>S.id===e.selectedId)??null,l=r.find(S=>S.id===e.selectedId)??null,c=MV(a.filter(S=>S.source==="wand"),r),d=MV(a.filter(S=>S.source==="automation"),r),p=t.width<=768,h=GU({width:t.width,height:t.height??Number.POSITIVE_INFINITY,coarsePointer:t.coarsePointer??!1}),g=!!e.sessionsDrawerOpen,v=!!e.sidebarPinned,y=!h&&v&&!!e.sidebarCollapsed,w=!!e.filePanelOpen,x=o?.kind==="structured"||e.currentView==="chat"?"chat":"terminal",k=!!e.sessionsManageMode,F=ywe(n),C=o?.cwd??YU(e),D=o&&e.gitStatusSessionId===o.id&&e.gitStatus?.isGit?{branch:Ge(e.gitStatus.branch,"?"),modifiedCount:Number(e.gitStatus.modifiedCount)||0,clean:(Number(e.gitStatus.modifiedCount)||0)===0}:null;return{auth:{phase:wwe(e)},viewport:{mobile:p,online:typeof e.isOnline=="boolean"?e.isOnline:t.online,embedTerminal:t.embedTerminal,nativeInput:t.nativeInput},capabilities:{backToNative:t.backToNative,switchServer:t.switchServer},layout:{sessionsDrawerOpen:g,sidebarPinned:v,sidebarCollapsed:y,sidebarDrawer:h,sidebarAnchored:!h&&(v||g),sessionsBackdropVisible:g&&(h||!v),filePanelOpen:w,filePanelBackdropVisible:w&&p,topbarMoreOpen:!!e.topbarMoreOpen,currentView:x},selected:o,sidebar:{interactiveCount:r.filter(S=>!XU(S)).length,totalCount:c.length+d.length,manageMode:k,selectedCount:F,groups:[{kind:"wand",label:"Wand \u4F1A\u8BDD",expanded:!0,entries:c},{kind:"automation",label:"\u81EA\u52A8\u5316",expanded:k||!!t.automationExpanded,entries:d}]},topbar:{title:o?.title??"Wand \u63A7\u5236\u53F0",description:o?.description??"",statusLabel:o?.statusLabel??"",statusTone:l?Ewe(l):"",cwd:C,currentTask:Ge(e.currentTask?.title)||Ge(l?.currentTaskTitle),titleGenerating:!!l?.titleGenerating,git:D},legacyVisibility:{terminal:!!o&&x==="terminal",chat:!!o&&x==="chat",blank:!o,composer:!!o&&!ws(l)}}}var Swe=class{constructor(e,t){oe(this,"name"),oe(this,"port"),oe(this,"rememberedSlot",null),oe(this,"mounted",!1),oe(this,"disposed",!1),oe(this,"generation",0),this.name=e,this.port=t}mount(e){if(this.disposed)throw new Error(`${this.name} has been disposed`);if(this.rememberedSlot&&this.rememberedSlot!==e)throw new Error(`${this.name} cannot switch to a different slot`);if(this.mounted)return this.currentLease();if(!this.rememberedSlot&&e.childNodes.length!==0)throw new Error(`${this.name} requires an empty React slot`);return this.port.mount(e),this.rememberedSlot=e,this.mounted=!0,this.generation+=1,this.currentLease()}unmount(e){if(e&&this.rememberedSlot&&e!==this.rememberedSlot)throw new Error(`${this.name} cannot unmount a different slot`);if(!this.mounted||!this.rememberedSlot)return;let t=this.rememberedSlot;this.mounted=!1,this.generation+=1,this.port.unmount?.(t)}currentLease(){if(!this.mounted||!this.rememberedSlot||this.disposed)throw new Error(`${this.name} is not mounted`);return Object.freeze({slot:this.rememberedSlot,generation:this.generation})}isCurrent(e){return!this.disposed&&this.mounted&&this.rememberedSlot===e.slot&&this.generation===e.generation}isMounted(){return!this.disposed&&this.mounted}dispose(){if(!this.disposed)try{this.unmount()}finally{this.disposed=!0}}};function Fwe(e,t){switch(t.type){case"nav.home":return e.goHome();case"nav.refresh":return e.refreshPage();case"session.new":return e.openNewSession();case"session.newAt":return e.openNewSession(t.cwd);case"missions.open":return e.openMissions?.();case"workspace.new":return e.openNewProject?.();case"workspace.newAt":return e.openNewProject?.(t.cwd);case"session.quickStart.claude":return e.quickStartClaudeTerminal();case"session.quickStart.codex":return e.quickStartCodexTerminal();case"session.quickStart.opencode":return e.quickStartOpenCodeTerminal();case"session.quickStart.structured":return e.quickStartStructuredSession();case"session.select":return t.focusInput===!1?e.selectSession(t.id,{focusInput:!1}):e.selectSession(t.id);case"session.resume":return e.resumeSession(t.id);case"session.resumeHistory":return e.resumeHistory(t.provider,t.id,t.cwd);case"session.delete":return e.deleteItem(t.target,t.id);case"session.merge":return e.mergeSession(t.id);case"session.cleanup":return e.cleanupSession(t.id);case"session.manage.toggle":return e.toggleManageMode();case"session.manage.select":return e.toggleManagedSelection(t.target,t.id);case"session.manage.selectAll":return e.selectAllManaged();case"session.manage.clear":return e.clearManagedSelection();case"session.manage.deleteSelected":return e.deleteManagedSelection();case"layout.drawer.toggle":return e.toggleSessionsDrawer();case"layout.drawer.open":return e.openSessionsDrawer?e.openSessionsDrawer():e.toggleSessionsDrawer();case"layout.drawer.close":return e.closeSessionsDrawer();case"layout.drawer.pin":return e.toggleSidebarPin();case"layout.drawer.collapse":return e.toggleSidebarCollapsed();case"layout.drawer.expandGroup":return e.expandSidebarGroup(t.group);case"layout.drawer.group.set":return e.setSidebarGroupExpanded(t.group,t.expanded);case"layout.files.toggle":return e.toggleFilePanel();case"layout.files.close":return e.closeFilePanel();case"folderPicker.open":return e.openFolderPicker();case"topbar.menu.toggle":return e.toggleTopbarMenu();case"topbar.copy":return e.copyTopbarField(t.field);case"topbar.gitCommit":return e.openGitCommit();case"settings.open":return e.openSettings();case"native.back":return e.backToNative();case"native.switchServer":return e.switchServer();case"auth.logout":return e.logout();default:return Dwe(t)}}function Dwe(e){throw new Error(`Unsupported UI action: ${JSON.stringify(e)}`)}var Awe=B(_(),1),$we=B(_(),1),b9=B(Ee(),1),ZU="",V9=new Set;function py(e){ZU=e,V9.forEach(t=>t())}var Bwe=e=>(V9.add(e),()=>{V9.delete(e)}),TV=()=>ZU,Iwe=["taskboard","issues","teams","teamchat","schedules","calendar","workspace","chats","contacts"];function Mwe(){let e=Pb(),t=$we.useSyncExternalStore(Bwe,TV,TV),r=pD(e),n=new URLSearchParams(e),a=n.has("view")&&!Iwe.includes(n.get("view")),o=n.get("settings"),l=o&&!["directory","profile","notifications","display","ai","local-models","general","connectors","security","presets","about"].includes(o),c=a||l;return!t&&!r.length&&!c?null:(0,b9.jsx)("div",{style:{flexShrink:0,padding:8,zIndex:30},children:(0,b9.jsx)(za,{type:"warning",showIcon:!0,role:"alert",title:t||(c?"\u94FE\u63A5\u4E2D\u7684\u9875\u9762\u6216\u8BBE\u7F6E\u9879\u65E0\u6548":"\u94FE\u63A5\u542B\u6709\u4E0D\u652F\u6301\u7684\u53C2\u6570\uFF0C\u5DF2\u5FFD\u7565"),action:(0,b9.jsx)(Te,{size:"small",onClick:()=>{py(""),Ua(Object.fromEntries([...r.map(d=>[d,null]),...["view","settings","session","workspace","workspaceTask","window","tab","conversation","conversationTask","conversationRun"].map(d=>[d,null]),["view","workspace"]]))},children:"\u8FD4\u56DE\u5DE5\u4F5C\u533A"})})})}var js=B(_());function Twe(e,t,r){return typeof r=="boolean"?r:e.length?!0:Hr(t).some(n=>n.type===h6)}var RE=({suffixCls:e,tagName:t,displayName:r})=>n=>js.forwardRef((a,o)=>js.createElement(n,{ref:o,suffixCls:e,tagName:t,...a})),H$=js.forwardRef((e,t)=>{let{prefixCls:r,suffixCls:n,className:a,tagName:o,...l}=e,{getPrefixCls:c}=js.useContext(wt),d=c("layout",r),[p,h]=f6(d),g=n?`${d}-${n}`:d;return js.createElement(o,{className:te(r||g,a,p,h),ref:t,...l})}),jwe=js.forwardRef((e,t)=>{let{direction:r}=js.useContext(wt),[n,a]=js.useState([]),{prefixCls:o,className:l,rootClassName:c,children:d,hasSider:p,tagName:h,style:g,...v}=e,y=wr(v,["suffixCls"]),{getPrefixCls:w,className:x,style:k}=jt("layout"),F=w("layout",o),C=Twe(n,d,p),[D,S]=f6(F),A=te(F,{[`${F}-has-sider`]:C,[`${F}-rtl`]:r==="rtl"},x,l,c,D,S),I=js.useMemo(()=>({siderHook:{addSider:j=>{a($=>[].concat(Xr($),[j]))},removeSider:j=>{a($=>$.filter(P=>P!==j))}}}),[]);return js.createElement(p6.Provider,{value:I},js.createElement(h,{ref:t,className:A,style:{...k,...g},...y},d))}),_we=RE({tagName:"div",displayName:"Layout"})(jwe),Pwe=RE({suffixCls:"header",tagName:"header",displayName:"Header"})(H$),Nwe=RE({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(H$),Owe=RE({suffixCls:"content",tagName:"main",displayName:"Content"})(H$),Rwe=_we,q0=Rwe;q0.Header=Pwe;q0.Footer=Nwe;q0.Content=Owe;q0.Sider=h6;q0._InternalSiderContext=m6;var uE=q0,v1=B(_(),1),U9=B(Ee(),1),q$=zn(()=>globalThis.__wandImportBrowserModule("8bc3bf586a2b73fe").then(e=>e.ComposerAttachmentsHost),g6,e=>e.mounts.length>0,{title:"\u9644\u4EF6",close:()=>{},renderPending:()=>(0,U9.jsx)(U9.Fragment,{})}),W$=zn(()=>globalThis.__wandImportBrowserModule("4a6ed04ec80dea3c").then(e=>e.PiExecutionHost),Gc,e=>e!==null,{title:"\u6267\u884C\u8BE6\u60C5",close:()=>Gc.close()}),LE=zn(()=>globalThis.__wandImportBrowserModule("70e00ced5ceba32d").then(e=>e.SettingsHost),Fa,(e,t)=>e.open||t.presentation==="page",{title:"\u8BBE\u7F6E",page:!0,close:()=>mo.close(),dismissable:e=>e.presentation!=="page"}),Lwe=zn(()=>globalThis.__wandImportBrowserModule("e280bc3e8ac49e67").then(e=>e.CodeEditorHost),Qc,e=>e.open,{title:"\u6587\u4EF6\u7F16\u8F91\u5668",page:!0,close:()=>{Yb.execute({type:"close"})}}),zwe=zn(()=>globalThis.__wandImportBrowserModule("91408c351070d6d7").then(e=>e.TaskBoardHost),gl,e=>e.open&&e.page!=="teams"&&e.page!=="teamchat",{title:"\u4EFB\u52A1\u770B\u677F",page:!0,close:()=>En.close()}),Hwe=zn(()=>globalThis.__wandImportBrowserModule("4bd2adb3495d6dd4").then(e=>e.NewSessionHost),pl,e=>e.open,{title:"\u65B0\u5EFA\u4F1A\u8BDD",page:!0,close:()=>Ia.close(),renderPending:e=>(0,U9.jsx)("section",{"aria-label":"\u65B0\u5EFA\u4F1A\u8BDD\u52A0\u8F7D",style:{position:"absolute",inset:0,zIndex:8,background:"var(--bg-primary)",padding:"var(--wand-page-inset)"},children:e})}),V$=zn(()=>globalThis.__wandImportBrowserModule("349206312bb65200").then(e=>e.FolderPickerHost),kA,e=>e.open,{title:"\u9009\u62E9\u76EE\u5F55",close:()=>ad.close()}),U$=zn(()=>globalThis.__wandImportBrowserModule("608565cf9381774c").then(e=>e.QuickCommitHost),E7,e=>e.open,{title:"\u5FEB\u901F\u63D0\u4EA4",close:()=>Pc.close()}),K$=zn(()=>globalThis.__wandImportBrowserModule("4574de49797344ae").then(e=>e.WorktreeMergeHost),C7,e=>e.open,{title:"\u5408\u5E76\u5DE5\u4F5C\u6811",close:()=>Nc.close()}),G$=zn(()=>globalThis.__wandImportBrowserModule("20b70b89cf3b3846").then(e=>e.FilePreviewHost),Op,e=>e.open,{title:"\u6587\u4EF6\u9884\u89C8",close:()=>{ks.execute({type:"close"})}}),X$=zn(()=>globalThis.__wandImportBrowserModule("5a62d8f81561e955").then(e=>e.LocalPreviewHost),El,e=>e.open,{title:"\u672C\u5730\u9884\u89C8",close:()=>El.close()}),Y$=zn(()=>globalThis.__wandImportBrowserModule("ddc5d213cdc1ffeb").then(e=>e.ImageViewerHost),wl,e=>e.open,{title:"\u56FE\u7247",close:()=>wl.close()}),Q$=zn(()=>globalThis.__wandImportBrowserModule("79f6d648c25a1c7b").then(e=>e.MissionsHost),F7,e=>e.open,{title:"\u4EFB\u52A1",close:()=>Mp.close()}),Z$=zn(()=>globalThis.__wandImportBrowserModule("b14b581260fe30bf").then(e=>e.WorkspacesHost),Ga,e=>e.open,{title:"\u5DE5\u4F5C\u533A",close:()=>Qp.close()}),J$=zn(()=>globalThis.__wandImportBrowserModule("90c5a1669e510ab4").then(e=>e.GithubIssuesHost),$7,e=>e.open,{title:"GitHub Issues",close:()=>Db.close()}),y9=B(_(),1),Bn=B(_(),1),da=B(_(),1);function qwe(e){return e.flatMap(t=>[...t.tasks.flatMap(r=>[...r.sessions,...r.archivedSessions??[]]),...t.standaloneSessions,...t.archivedSessions??[]])}function Wwe(e,t,r,n){let a=new Set([e.sessionId,e.communicationSessionId,...e.historySessionIds??[],...e.tasks.flatMap(o=>o.runs.map(l=>l.chatSessionId))].filter(Boolean));return t.some(o=>(e.kind==="dm"?o.employeeId===e.peerEmployeeId&&!o.teamChat:a.has(o.id))&&Vc(o))?!0:e.tasks.some(o=>{if(o.task.status==="archived")return!1;let l=o.runs[0];return l?["running","waiting_user","awaiting_approval","failed"].includes(l.status):o.startup?.state==="pending"||o.startup?.state==="failed"})}function Vwe(e,t=[]){let r=new Map,n=new Set,a=(o,l,c,d=!1)=>{if(!l.employeeId||l.teamChat||n.has(l.id))return;n.add(l.id);let p=r.get(l.employeeId)??[];p.push({group:o,session:l,taskName:c,archived:d||l.archived===!0}),r.set(l.employeeId,p)};for(let o of e){for(let l of o.tasks){for(let c of l.sessions)a(o,c,l.name,l.archived===!0);for(let c of l.archivedSessions??[])a(o,c,l.name,!0)}for(let l of o.standaloneSessions)a(o,l,null);for(let l of o.archivedSessions??[])a(o,l,null,!0)}for(let o of t)ws(o)&&a({workspaceId:`system-calls:${o.employeeId}`,workspaceName:"\u7CFB\u7EDF\u8C03\u7528\u8BB0\u5F55",workspaceCwd:o.cwd??"",synthetic:!0,tasks:[],standaloneSessions:[]},o,null);for(let o of r.values())o.sort(o0);return r}function JU(e,t){let r=e.session;return[r.title??"",t[r.id]??"",e.taskName??"",e.group.workspaceName,r.cwd??"",r.employeeName??"",r.teamStep?.title??"",ou(xu(r),r.engine)]}function eK(e,t,r,n,a={},o=!1,l=null){return e.kind!=="dm"||!e.peerEmployeeId?[]:(t.get(e.peerEmployeeId)??[]).filter(c=>(r==="archived"?!c.archived:r==="active"&&c.archived)||o&&!Vc(c.session)?!1:Eu(n,e.title,e.name,...JU(c,a)))}function Uwe(e,t,r,n={}){return eK(e,t,r,"",n).flatMap(a=>JU(a,n))}var Le=B(Ee(),1),Kwe=Vh(()=>globalThis.__wandImportBrowserModule("03a539f59a10f2c6").then(e=>e.GroupEditor),{title:"\u7FA4\u804A",renderPending:()=>(0,Le.jsx)(Le.Fragment,{})});function Gwe({activePage:e,teamAttention:t,onNavigate:r}){let n=[{value:"chats",label:"\u5BF9\u8BDD",icon:"chat"},{value:"tasks",label:"\u5DE5\u4F5C\u533A",icon:"folder"},{value:"board",label:"\u4EFB\u52A1\u770B\u677F",icon:"board",id:"task-board-button"},{value:"teams",label:"\u56E2\u961F",icon:"users",id:"ai-teams-button"},{value:"calendar",label:"\u5B9A\u65F6",icon:"calendar",id:"global-calendar-button"}],a=e==="schedules"?"calendar":e;return(0,Le.jsx)(Xe,{component:"nav",vertical:!0,gap:4,className:"conversation-navigation","aria-label":"\u529F\u80FD\u5BFC\u822A",children:n.map(o=>(0,Le.jsxs)(Er,{id:"id"in o?o.id:void 0,"data-stretch-value":o.value,"aria-label":o.label,title:o.label,kind:a===o.value?"soft":"ghost","aria-current":a===o.value?"page":void 0,"aria-pressed":a===o.value,onClick:()=>r(o.value),children:[(0,Le.jsx)("span",{className:"sidebar-nav-icon","aria-hidden":"true",children:o.value==="teams"?(0,Le.jsx)(ji,{count:t,size:"small",children:(0,Le.jsx)(Fe,{name:o.icon,size:18})}):(0,Le.jsx)(Fe,{name:o.icon,size:18})}),(0,Le.jsx)("span",{className:"sidebar-nav-label","aria-hidden":"true",children:o.value==="board"?"\u4EFB\u52A1":o.label})]},o.value))})}function Xwe({enabled:e,onNavigate:t,onCreateSession:r}){let n=p0(),[a,o]=da.useState("closed"),l=da.useRef(null),c=da.useRef(null);return da.useEffect(()=>{o("closed")},[e,n.mode]),(0,Le.jsxs)(Xe,{ref:l,align:"center",className:"conversation-sidebar-tools",style:{position:"relative"},children:[(0,Le.jsxs)(Er,{ref:c,className:"conversation-create-button","aria-label":n.mode==="tasks"?"\u65B0\u5EFA\u4F1A\u8BDD":a==="closed"?"\u53D1\u8D77\u7FA4\u804A":"\u5173\u95ED\u7FA4\u804A\u8868\u5355","aria-expanded":a!=="closed","aria-controls":"conversation-create-panel",onClick:()=>n.mode==="tasks"?r?.():o(a==="closed"?"group":"closed"),children:[(0,Le.jsx)(zp,{active:a!=="closed",from:"plus",to:"close"}),(0,Le.jsx)("span",{className:"conversation-create-label",children:a==="closed"?"\u53D1\u8D77\u7FA4\u804A":"\u5173\u95ED"})]}),(0,Le.jsx)(hD,{open:e&&a!=="closed",owner:"conversation-create-panel",focusKey:a,anchorRef:l,triggerRef:c,onClose:()=>o("closed"),children:(0,Le.jsx)("div",{hidden:a!=="group",children:(0,Le.jsx)(Kwe,{open:e&&a==="group",enabled:e&&a==="group",owner:"conversation-create-panel",onCancel:()=>o("closed"),onCreated:d=>{o("closed"),Ar.select(d,!0),t()}})})})]})}function jV(e,t=new Date){let r=new Date(e);return!e||!Number.isFinite(r.getTime())?"":r.toDateString()===t.toDateString()?r.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1}):r.toLocaleDateString([],{...r.getFullYear()!==t.getFullYear()?{year:"numeric"}:{},month:"2-digit",day:"2-digit"})}function eB(e){return!!e.dissolvedAt||(e.tasks??[]).some(t=>t.task.status==="archived")}function Ywe(e){return e==="archived"?"\u5DF2\u5F52\u6863":e==="active"?"\u672A\u5F52\u6863":"\u6700\u8FD1\u804A\u5929"}function K9(e,t,r,n,a){let o=r.trim().toLowerCase();return e.filter(l=>{let c=eB(l);return(t==="archived"?!c:t==="active"&&c)||a&&!a(l)?!1:o?[l.title,l.preview,...l.tasks.map(d=>d.task.title),...n?.(l)??[]].join(" ").toLowerCase().includes(o):!0})}function Qwe(e,t,r,n,a){let o=e.filter(eB).length,l=e.length-o;return{total:e.length,active:l,archived:o,scope:K9(e,t,"",n,a).length,matches:K9(e,t,r,n,a).length}}function Zwe({compact:e,enabled:t=!0,onNavigate:r,onOpenSession:n,selectedSessionId:a=null,sessionTitles:o={}}){let{items:l,systemSessions:c,error:d,loaded:p,refresh:h}=z7(!0,t),{groups:g}=fA(),v=da.useMemo(()=>Vwe(g,c),[g,c]),y=da.useMemo(()=>[...qwe(g),...c],[g,c]),{employees:w}=W3({enabled:t}),x=p0(),k=(x.filters["list-query"]??"").trim().toLowerCase(),F=x.listFilter,[C,D]=da.useState(""),S=da.useRef(null),[A,I]=da.useState(!1),j=da.useRef([]);A||(j.current=l.map(z=>z.id));let $=new Map(j.current.map((z,Y)=>[z,Y])),P=l.slice().sort((z,Y)=>{let G=$.get(z.id)??-1,Z=$.get(Y.id)??-1;return+!!Y.pinnedAt-+!!z.pinnedAt||(Y.pinnedAt??"").localeCompare(z.pinnedAt??"")||(G<0?l.length:G)-(Z<0?l.length:Z)}),N=z=>Uwe(z,v,F,o),R=x.activityOnly?z=>Wwe(z,y,x.active===!0?x.selectedId:null,a):void 0,U=K9(P,F,k,N,R),H=Qwe(l,F,k,N,R),q=p?`${x.activityOnly?"\u6D3B\u52A8 \xB7 ":""}${Ywe(F)}\u5171 ${H.scope} \u4E2A\u5BF9\u8BDD${k?`\uFF0C\u641C\u7D22\u5339\u914D ${H.matches} \u4E2A`:""}\uFF1B\u5168\u90E8 ${H.total}\uFF0C\u672A\u5F52\u6863 ${H.active}\uFF0C\u5DF2\u5F52\u6863 ${H.archived}`:d?"\u5BF9\u8BDD\u6570\u91CF\u5C1A\u672A\u52A0\u8F7D":"\u6B63\u5728\u8BFB\u53D6\u5BF9\u8BDD\u6570\u91CF",L=z=>{Ar.select(z),r()},O=async(z,Y)=>{D("");try{await _p.updateListState(z.id,Y)}catch(G){D(G instanceof Error?G.message:"\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002")}},W=async z=>{let Y=await gn.dialog({title:`\u5220\u9664\u5BF9\u8BDD\u300C${z.title}\u300D\uFF1F`,description:z.kind==="group"?`\u5C06\u5220\u9664\u8FD9\u4E2A\u7FA4\u804A\u3001${z.tasks.length} \u4E2A\u5173\u8054\u4EFB\u52A1\uFF0C\u4EE5\u53CA\u5B83\u4EEC\u7684\u6D88\u606F\u3001\u6267\u884C\u8BB0\u5F55\u548C\u8D44\u6E90\u6587\u4EF6\u3002\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002`:"\u5C06\u6C38\u4E45\u5220\u9664\u6B64\u79C1\u804A\u7684\u6D88\u606F\u8BB0\u5F55\u548C\u4F1A\u8BDD\u6587\u4EF6\u3002\u5458\u5DE5\u8D44\u6599\u53CA\u5DF2\u7ECF\u6D3E\u51FA\u7684\u7FA4\u804A\u4EFB\u52A1\u4FDD\u7559\u3002\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002",actions:[{label:"\u53D6\u6D88",value:!1,autoFocus:!0},{label:"\u5220\u9664\u5BF9\u8BDD",value:!0,kind:"danger"}]});if(Y.dismissed!==!0&&Y.action)try{await _p.remove(z.id),Ar.getSnapshot().selectedId===z.id&&Ar.select("")}catch(G){D(G instanceof Error?G.message:"\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002")}};return(0,Le.jsxs)("div",{className:"conversation-sidebar-list",onPointerEnter:()=>I(!0),onPointerLeave:()=>I(!1),onFocusCapture:()=>I(!0),onBlurCapture:z=>{z.currentTarget.contains(z.relatedTarget)||I(!1)},children:[e?null:(0,Le.jsxs)("div",{className:"conversation-list-tools",children:[(0,Le.jsx)("div",{className:"conversation-search-host",children:(0,Le.jsx)(BA,{inputRef:S,className:"conversation-search-input",label:"\u641C\u7D22\u5BF9\u8BDD\u6216\u4EFB\u52A1",value:x.filters["list-query"]??"",onValueChange:z=>Ar.filter("list-query",z)})}),(0,Le.jsxs)(Xe,{vertical:!0,align:"stretch",gap:4,className:"conversation-list-section",children:[(0,Le.jsxs)(Xe,{align:"center",gap:6,className:"conversation-filter-row",children:[(0,Le.jsx)(RF,{className:"conversation-list-filter",ariaLabel:"\u5BF9\u8BDD\u5F52\u6863\u7B5B\u9009",tabs:[{value:"all",label:"\u5168\u90E8"},{value:"active",label:"\u672A\u5F52\u6863"},{value:"archived",label:"\u5DF2\u5F52\u6863"}],value:F,onValueChange:Ar.listFilter}),(0,Le.jsx)(WD,{active:x.activityOnly,label:"\u53EA\u770B\u6D3B\u52A8\u5BF9\u8BDD",onChange:Ar.activityOnly})]}),(0,Le.jsx)(Pt.Text,{type:"secondary",className:"conversation-list-count",title:q,"aria-label":q,children:p?k?`\u5339\u914D ${H.matches} / ${H.scope}`:`${H.scope} \u4E2A\u5BF9\u8BDD`:d?"\u6570\u91CF\u672A\u52A0\u8F7D":"\u8BFB\u53D6\u4E2D\u2026"})]})]}),d?(0,Le.jsxs)(Pt.Text,{type:"danger",role:"status",children:[d,(0,Le.jsx)(Te,{size:"small",onClick:h,children:"\u91CD\u65B0\u8BFB\u53D6"})]}):null,C?(0,Le.jsx)(Pt.Paragraph,{type:"danger",role:"alert",children:C}):null,(0,Le.jsxs)(H2,{value:`${F}:${x.activityOnly}`,children:[U.map(z=>(0,Le.jsx)(Jwe,{item:z,employee:w.find(Y=>Y.id===z.peerEmployeeId)??null,compact:e,query:k,enabled:t,filter:F,selected:x.selectedId===z.id&&x.active!==!1,onSelect:()=>L(z.id),sessionEntries:eK(z,v,F,k,o,x.activityOnly,a),sessionTitles:o,selectedSessionId:a,onOpenSession:n,onUpdate:Y=>O(z,Y),onRemove:()=>W(z)},z.id)),p&&!U.length?(0,Le.jsxs)("div",{className:"conversation-list-empty",role:"status",children:[(0,Le.jsx)(Fe,{name:k?"search":"chat",size:20}),(0,Le.jsx)(Pt.Paragraph,{type:"secondary",children:k?"\u6CA1\u6709\u5339\u914D\u7684\u5BF9\u8BDD\u6216\u4EFB\u52A1":x.activityOnly?"\u73B0\u5728\u6CA1\u6709\u7B26\u5408\u7B5B\u9009\u6761\u4EF6\u7684\u6D3B\u52A8\u5BF9\u8BDD\u3002":F==="archived"?"\u8FD8\u6CA1\u6709\u5DF2\u5F52\u6863\u7684\u5BF9\u8BDD\uFF0C\u89E3\u6563\u7FA4\u804A\u6216\u5F52\u6863\u4EFB\u52A1\u540E\u4F1A\u51FA\u73B0\u5728\u8FD9\u91CC\u3002":F==="active"?"\u8FD8\u6CA1\u6709\u672A\u5F52\u6863\u7684\u5BF9\u8BDD\u3002":"\u8FD8\u6CA1\u6709\u5BF9\u8BDD\uFF0C\u53EF\u4EE5\u4ECE\u901A\u8BAF\u5F55\u627E\u4E00\u4F4D\u5458\u5DE5\u3002"}),k?(0,Le.jsx)(Te,{kind:"ghost",size:"small",onClick:()=>{Ar.filter("list-query",""),S.current?.focus({preventScroll:!0})},children:"\u6E05\u7A7A\u641C\u7D22"}):null]}):null]})]})}function Jwe({item:e,employee:t,compact:r,query:n,enabled:a,filter:o,selected:l,onSelect:c,onUpdate:d,onRemove:p,sessionEntries:h,sessionTitles:g,selectedSessionId:v,onOpenSession:y}){let w=t??(e.peerEmployeeId?q3(e.peerEmployeeId):null)??(e.peerEmployeeId?{id:e.peerEmployeeId,name:e.title}:null),x=_h().name||"\u6211",[k,F]=da.useState(!1),[C,D]=da.useState(!1),[S,A]=da.useState(!1),I=da.useRef(null),j=da.useRef(null),$=da.useId(),[P,N]=da.useState(!1);da.useEffect(()=>{F(!1),N(!1)},[a,r,n,o]);let R=async G=>{if(!S){A(!0),F(!1),(I.current?.querySelector(".conversation-row-open")??I.current?.querySelector("button"))?.focus({preventScroll:!0});try{await G()}finally{A(!1)}}},U=n?e.tasks.filter(G=>G.task.title.toLowerCase().includes(n)):e.tasks,H=!r&&!e.dissolvedAt&&(e.kind!=="dm"||C)&&(C||!!n&&U.length>0),q=!r&&e.kind==="dm"&&P,L=h.map(G=>G.session),O=()=>{D(!1),N(!P)},W=async()=>{await hl.reload(),jp()},z=eB(e),Y=(0,Le.jsxs)("div",{ref:I,className:`conversation-row conversation-row-${e.kind}`,"aria-current":l?"page":void 0,"data-pinned":!!e.pinnedAt,"data-archived":z||void 0,"data-conversation-id":e.id,"aria-busy":S||void 0,children:[(0,Le.jsx)(Er,{className:"conversation-row-avatar conversation-avatar-button","aria-label":w&&!r?`\u67E5\u770B${e.title}\u7684\u8D44\u6599`:`\u6253\u5F00${e.title}`,onClick:G=>w&&!r?Eb.open(w,G.currentTarget):c(),children:w?(0,Le.jsx)(jc,{employee:w,size:"sm"}):e.kind==="group"?(0,Le.jsx)(t7,{title:e.title,members:e.team?.members??[],size:36}):(0,Le.jsx)(Ti,{size:36,icon:(0,Le.jsx)(Fe,{name:"chat",size:16})})}),r?null:(0,Le.jsx)(Ub,{title:e.title,selector:".conversation-row-title",children:(0,Le.jsx)(Te,{kind:"ghost",className:"conversation-row-open",title:e.title,onClick:c,children:(0,Le.jsxs)("span",{className:"conversation-row-copy",children:[(0,Le.jsxs)("span",{className:"conversation-row-topline",children:[(0,Le.jsx)("span",{className:"conversation-row-title",children:e.title}),jV(e.messageAt)?(0,Le.jsx)("time",{className:"conversation-row-time",dateTime:e.messageAt,children:jV(e.messageAt)}):null]}),(0,Le.jsxs)("span",{className:"conversation-row-bottomline",children:[z?(0,Le.jsx)("span",{className:"conversation-archived-tag",children:"\u5DF2\u5F52\u6863"}):null,(0,Le.jsx)("span",{className:"conversation-row-preview",children:e.dissolvedAt?"\u7FA4\u804A\u5DF2\u89E3\u6563 \xB7 \u70B9\u51FB\u67E5\u770B\u6216\u6062\u590D":e.preview||(e.kind==="group"?`${x} + ${e.team?.members.length??0} \u4F4D\u5458\u5DE5`:"\u79C1\u804A")}),e.pinnedAt?(0,Le.jsx)("span",{className:"conversation-pin",title:"\u5DF2\u7F6E\u9876","aria-label":"\u5DF2\u7F6E\u9876",children:(0,Le.jsx)(Fe,{name:"pin",size:13})}):null]})]})})}),r?null:(0,Le.jsx)(Er,{className:"conversation-row-more","aria-label":`${e.title}\u7684\u83DC\u5355`,"aria-haspopup":"menu","aria-expanded":k,onClick:G=>{if(G.stopPropagation(),k){F(!1);return}let Z=G.currentTarget.getBoundingClientRect();G.currentTarget.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:Z.right,clientY:Z.bottom,button:2}))},children:(0,Le.jsx)(Fe,{name:"more",size:16})})]});return(0,Le.jsxs)("div",{className:"conversation-list-item",onKeyDown:G=>{G.key!=="Escape"||G.defaultPrevented||!q||k||!G.currentTarget.contains(G.target)||(G.preventDefault(),G.stopPropagation(),j.current?.focus({preventScroll:!0}),N(!1))},children:[(0,Le.jsx)(P2,{row:Y,rowRef:I,open:k,disabled:!a,onOpenChange:G=>{(!G||!S)&&F(G)},label:"\u5BF9\u8BDD\u83DC\u5355",title:e.title,className:"conversation-row-menu",menu:{items:[{key:"open",disabled:S,icon:(0,Le.jsx)(Fe,{name:"chat"}),label:"\u6253\u5F00\u5BF9\u8BDD"},...w?[{key:"profile",disabled:S,icon:(0,Le.jsx)(Fe,{name:"info"}),label:"\u67E5\u770B\u5458\u5DE5\u8D44\u6599"}]:[],{key:"pin",disabled:S,icon:(0,Le.jsx)(Fe,{name:"pin"}),label:e.pinnedAt?"\u53D6\u6D88\u7F6E\u9876":"\u7F6E\u9876"},...e.kind==="dm"?[{key:"sessions",disabled:S,icon:(0,Le.jsx)(Fe,{name:"chat"}),label:q?"\u6536\u8D77\u4F1A\u8BDD":`\u67E5\u770B ${L.length} \u4E2A\u4F1A\u8BDD`}]:[],...!e.dissolvedAt&&e.tasks.length>0?[{key:"tasks",disabled:S,icon:(0,Le.jsx)(Fe,{name:"task"}),label:C?"\u6536\u8D77\u4EFB\u52A1":`\u67E5\u770B ${e.tasks.length} \u4E2A\u4EFB\u52A1`}]:[],{key:"danger-divider",type:"divider"},...e.kind==="group"?[{key:"dissolve",disabled:S,icon:(0,Le.jsx)(Fe,{name:e.dissolvedAt?"resume":"archive"}),label:e.dissolvedAt?"\u6062\u590D\u7FA4\u804A":"\u89E3\u6563\u7FA4\u804A\u2026"}]:[],{key:"delete",disabled:S,danger:!0,icon:(0,Le.jsx)(Fe,{name:"trash"}),label:e.kind==="group"?"\u5220\u9664\u7FA4\u804A\u2026":"\u5220\u9664\u5BF9\u8BDD\u2026"}],onClick:({key:G})=>{S||(F(!1),G==="open"?c():G==="profile"&&w?Eb.open(w,I.current?.querySelector("button")??null):G==="tasks"?(N(!1),D(!C)):G==="sessions"?O():G==="pin"?R(()=>d({pinned:!e.pinnedAt})):G==="delete"?R(p):G==="dissolve"&&R(async()=>{if(e.dissolvedAt){await d({dissolved:!1});return}let Z=await gn.dialog({title:`\u89E3\u6563\u7FA4\u804A\u300C${e.title}\u300D\uFF1F`,description:"\u7FA4\u804A\u5C06\u5F52\u6863\u5E76\u4FDD\u7559\u5728\u4F1A\u8BDD\u5217\u8868\u3002\u5386\u53F2\u8BB0\u5F55\u548C\u5173\u8054\u4EFB\u52A1\u4FDD\u7559\uFF0C\u6062\u590D\u540E\u53EF\u7EE7\u7EED\u804A\u5929\u3002",actions:[{label:"\u53D6\u6D88",value:!1,autoFocus:!0},{label:"\u89E3\u6563\u7FA4\u804A",value:!0,kind:"danger"}]});Z.dismissed!==!0&&Z.action&&await d({dissolved:!0})}))}}}),!r&&e.kind==="dm"?(0,Le.jsxs)(O2,{id:$,open:q,label:e.title,toggleRef:j,toggleClassName:"conversation-session-toggle",disabled:!a||S,hasSessions:L.length>0,reserve:!0,onOpenChange:G=>{D(!1),N(G)},children:[(0,Le.jsx)(YD,{sessions:L,expanded:q||H,label:`${e.title}\u7684\u4F1A\u8BDD\u9884\u89C8`,className:"sidebar-session-preview-person",disabled:!a||S,liveTitles:g,selectedSessionId:v,expansionRef:j,onExpand:()=>{D(!1),N(!0)},onActivate:G=>{D(!1),N(!1),y?.(G.id)}}),(0,Le.jsx)(Kb,{id:$,open:q,children:(0,Le.jsx)(n0.Provider,{value:a&&!r&&q,children:(0,Le.jsxs)("div",{className:"conversation-person-sessions",role:"group","aria-label":`${e.title}\u7684\u4F1A\u8BDD\u5217\u8868`,children:[h.map((G,Z)=>{let T=G.session,V=zb(T,Z,g[T.id]);return(0,Le.jsx)(qD,{session:{...T,archived:G.archived},label:V,disabled:!a||S,intoNewTask:T.workspaceTaskId?void 0:G.group,onOpen:()=>y?.(T.id),onArchive:async X=>{await UD(T.id,X),await W()},onDelete:async()=>{await VD([T.id],QD(G.group,T)??null),await W()},row:(0,Le.jsx)("div",{className:"conversation-person-session",children:(0,Le.jsx)(eA,{id:T.id,title:V,titleGenerating:T.titleGenerating,avatarNode:(0,Le.jsx)(Jh,{session:T,size:14}),state:Gb(T),glow:N2(T),summary:`${ou(xu(T),T.engine)} \xB7 ${Gb(T).label}`,active:T.id===v,onClick:()=>y?.(T.id)})})},T.id)}),L.length?null:(0,Le.jsx)(Pt.Paragraph,{type:"secondary",className:"sidebar-group-empty",children:"\u6682\u65E0\u7B26\u5408\u6761\u4EF6\u7684\u4F1A\u8BDD"})]})})})]}):null,!r&&e.kind!=="dm"&&!e.dissolvedAt&&e.tasks.length>0?(0,Le.jsxs)(Te,{kind:"ghost",className:"conversation-task-toggle","aria-expanded":H,onClick:()=>D(!C),children:[(0,Le.jsx)(Fe,{name:"chevronDown",size:12}),e.tasks.length," \u4E2A\u4EFB\u52A1",H?" \xB7 \u6536\u8D77":""]}):null,H?U.map(G=>(0,Le.jsxs)(Te,{kind:"ghost",className:"conversation-task-row",onClick:()=>{c(),Ar.filter(e.id,G.task.id)},children:[(0,Le.jsx)(Fe,{name:"task"}),(0,Le.jsx)("span",{className:"conversation-row-title",children:G.task.title}),(0,Le.jsx)("span",{className:"conversation-row-status","data-archived":G.task.status==="archived"||void 0,children:Q3(G)})]},G.task.id)):null]})}var gf=B(_(),1),e5e=B(_(),1),tK={items:[]},rK=tK,G9=new Set,y6=0,w9=null,x9=null;function t5e(e){rK=e;for(let t of G9)t()}function X9(){x9||(x9=yt("/api/attention").then(e=>{t5e({items:Array.isArray(e.items)?e.items:[]})}).catch(()=>{}).finally(()=>{x9=null}))}function r5e(e){return G9.add(e),y6+=1,y6===1&&(w9=Hh(()=>X9()),X9()),()=>{G9.delete(e),y6-=1,y6===0&&(w9?.(),w9=null)}}function n5e(){return(0,e5e.useSyncExternalStore)(r5e,()=>rK.items,()=>tK.items)}var Zr=B(Ee(),1);function a5e(e){return e.map(t=>t.entries.map(r=>`${r.id}:${r.status}`).join(",")).join("|")}function nK(){let e=n5e(),t=ai(),r=a5e(t.sidebar.groups);return gf.useEffect(()=>{X9()},[r]),e}function aK(e,t,r){if(r(),e.sessionId){En.close(),t({type:"session.select",id:e.sessionId});return}En.open("","","teams")}function iK({items:e,onOpen:t}){return(0,Zr.jsx)(or,{children:(0,Zr.jsx)("ul",{className:"wand-attention-list",children:e.map(r=>(0,Zr.jsx)("li",{children:(0,Zr.jsx)(Te,{kind:"ghost",className:"wand-attention-item",onClick:()=>t(r),children:(0,Zr.jsxs)("span",{children:[(0,Zr.jsx)("strong",{children:r.title}),(0,Zr.jsx)("br",{}),r.detail]})})},r.id))})})}function i5e({open:e,onToggle:t,compact:r=!1}){let n=nK(),a=Ci(),o=gf.useRef(null);if(r)return(0,Zr.jsx)(ol,{open:e,onOpenChange:d=>{d!==e&&t(),d||o.current?.focus({preventScroll:!0})},side:"right",align:"start",contentId:"sidebar-notifications",ariaLabel:"\u901A\u77E5",trigger:(0,Zr.jsx)(Er,{ref:o,className:"sidebar-notification-button",title:"\u901A\u77E5","aria-label":n.length?`\u901A\u77E5\uFF0C${n.length} \u4E2A\u62A5\u9519`:"\u901A\u77E5","aria-expanded":e,"aria-controls":"sidebar-notifications",kind:"ghost",children:(0,Zr.jsx)(ji,{count:n.length,size:"small",children:(0,Zr.jsx)(Fe,{name:"bell",size:20})})}),children:(0,Zr.jsxs)("div",{className:"sidebar-notification-content",children:[(0,Zr.jsx)(Pt.Text,{strong:!0,children:"\u901A\u77E5"}),n.length?(0,Zr.jsx)(iK,{items:n,onOpen:d=>aK(d,a,t)}):(0,Zr.jsx)(Pt.Paragraph,{type:"secondary",children:"\u6682\u65E0\u9700\u8981\u5904\u7406\u7684\u901A\u77E5"})]})});if(n.length===0)return null;let l=`${n.length} \u4E2A\u62A5\u9519`,c=e?`${l}\uFF0C\u6536\u8D77\u6E05\u5355`:`${l}\uFF0C\u70B9\u5F00\u67E5\u770B`;return(0,Zr.jsxs)(Te,{kind:"ghost",type:"button",className:ct("sidebar-attention-badge",e&&"is-open"),title:c,"aria-label":c,"aria-expanded":e,"aria-controls":"sidebar-attention-list",onClick:t,children:[(0,Zr.jsx)(Fe,{name:"info",size:12,className:"sidebar-attention-badge-icon"}),(0,Zr.jsx)("span",{className:"sidebar-attention-badge-label",children:l}),(0,Zr.jsx)(Fe,{name:"chevronDown",size:11,className:"sidebar-attention-badge-chevron"})]})}function o5e(){let e=nK(),t=Ci(),[r,n]=gf.useState(!1),a=gf.useCallback(()=>n(!1),[]),o=gf.useId(),l=gf.useRef(null);if(gf.useEffect(()=>{e.length===0&&n(!1)},[e.length]),e.length===0)return null;let c=`${e.length} \u4E2A\u62A5\u9519`,d=r?`${c}\uFF0C\u6536\u8D77\u6E05\u5355`:`${c}\uFF0C\u70B9\u5F00\u67E5\u770B`;return(0,Zr.jsxs)("section",{className:"home-attention","aria-label":"\u9700\u8981\u5904\u7406\u7684\u62A5\u9519",onKeyDown:p=>{p.key!=="Escape"||p.defaultPrevented||p.nativeEvent.isComposing||!r||(p.preventDefault(),p.stopPropagation(),n(!1),l.current?.focus({preventScroll:!0}))},children:[(0,Zr.jsxs)(Te,{kind:"ghost",type:"button",className:"home-attention-trigger",ref:l,"aria-controls":o,"aria-expanded":r,"aria-label":d,title:d,onClick:()=>n(p=>!p),children:[(0,Zr.jsx)(Fe,{name:"info",size:13,className:"home-attention-trigger-icon"}),(0,Zr.jsx)("span",{children:c}),(0,Zr.jsx)(Fe,{name:"chevronDown",size:13,className:"home-attention-trigger-chevron"})]}),(0,Zr.jsx)(Kb,{id:o,open:r,children:(0,Zr.jsx)(iK,{items:e,onOpen:p=>aK(p,t,a)})})]})}var kn=B(_(),1);function s5e(){let e="(hover: hover) and (pointer: fine)",t=()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(e).matches,[r,n]=kn.useState(t);return kn.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let a=window.matchMedia(e),o=()=>n(a.matches);return a.addEventListener("change",o),()=>a.removeEventListener("change",o)},[]),r}function l5e(e,t,r,n){let[a,o]=kn.useState(!1),[l,c]=kn.useState(!1),d=kn.useRef(0),p=kn.useRef(0),h=kn.useRef(null),g=kn.useRef(null),v=kn.useRef(!1),y=ua(),w=kn.useCallback(()=>{window.clearTimeout(d.current),window.clearTimeout(p.current)},[]),x=kn.useCallback(()=>{w(),v.current=!1,o(!1)},[w]),k=kn.useCallback($=>{window.clearTimeout(p.current),window.clearTimeout(d.current),v.current=!0,d.current=window.setTimeout(()=>{c(!0),o(!0)},$)},[]),F=kn.useCallback(()=>{if(window.clearTimeout(d.current),window.clearTimeout(p.current),v.current=!1,y){o(!1);return}p.current=window.setTimeout(()=>o(!1),Wv("--motion-normal"))},[y]),C=kn.useCallback($=>{e&&k($)},[e,k]),D=kn.useCallback($=>$ instanceof Node&&r.current?.contains($)===!0,[r]);kn.useEffect(()=>{e||(w(),v.current=!1,o(!1),c(!1))},[e,w]),kn.useEffect(()=>w,[w]),kn.useEffect(()=>{y&&(w(),e&&v.current&&c(!0),o(e&&v.current))},[y,e,w]);let S=kn.useCallback($=>{if(!($ instanceof Element))return!1;let P=$.closest("[data-wand-popup-owner]")?.dataset.wandPopupOwner;return P?Array.from(r.current?.querySelectorAll("[data-sidebar-popup-owner]")??[]).some(N=>N.dataset.sidebarPopupOwner===P):!1},[r]),A=kn.useCallback($=>$ instanceof Node&&(r.current?.contains($)===!0||t.current?.contains($)===!0),[r,t]);kn.useEffect(()=>{if(!a)return;let $=N=>{if(N.key!=="Escape"||N.defaultPrevented)return;let R=document.activeElement;A(R)&&(S(N.target)||(N.preventDefault(),N.stopPropagation(),g.current=h.current,x(),h.current?.focus({preventScroll:!0})))},P=N=>{let R=N.target;R instanceof Node&&(r.current?.contains(R)||t.current?.contains(R)||S(R)||x())};return document.addEventListener("keydown",$),document.addEventListener("pointerdown",P,!0),()=>{document.removeEventListener("keydown",$),document.removeEventListener("pointerdown",P,!0)}},[a,x,A,S,r,t]);let I=kn.useCallback($=>{S($.relatedTarget)||(g.current=null,F())},[F,S]),j=($,P)=>{if(!e||D($)||S($))return;let N=$ instanceof Element?$.closest("[data-sidebar-directory-id]"):null,R=N?.dataset.sidebarDirectoryId;if(!N||!R||!t.current?.contains(N)){F();return}g.current!==N&&(h.current=N,n(R,N),C(y?0:P))};return{mounted:l,open:a,close:x,triggerBindings:{onKeyDown:$=>{if($.key!=="Tab"||$.shiftKey||!a||$.defaultPrevented||document.activeElement!==h.current)return;let P=r.current?.querySelector("button, [tabindex='0']");P&&($.preventDefault(),P.focus({preventScroll:!0}))},onPointerOver:$=>j($.target,Wv("--motion-fast")),onClick:$=>{let P=$.target instanceof Element?$.target.closest("[data-sidebar-directory-id]"):null;if(g.current=null,a&&P===h.current){x();return}j($.target,0)},onPointerLeave:I,onFocusCapture:$=>j($.target,0),onBlurCapture:$=>{A($.relatedTarget)||S($.relatedTarget)||F()}},surfaceBindings:{onKeyDown:$=>{if($.key!=="Tab"||!$.shiftKey)return;let P=r.current?.querySelector("button, [tabindex='0']");document.activeElement===P&&($.preventDefault(),h.current?.focus({preventScroll:!0}))},onPointerEnter:()=>{v.current=!0,window.clearTimeout(p.current)},onPointerLeave:I,onFocusCapture:()=>{v.current=!0,window.clearTimeout(p.current)},onBlurCapture:$=>{A($.relatedTarget)||S($.relatedTarget)||x()}}}}var E9=B(_(),1);function u5e(e,t){let r=E9.useRef(null),n=E9.useRef(t);return n.current=t,E9.useEffect(()=>{let a=r.current;if(!e||!a)return;let o=document.activeElement instanceof HTMLElement?document.activeElement:null;a.focus({preventScroll:!0});let l=c=>{if(!(c.defaultPrevented||!a.contains(c.target))){if(c.key==="Tab"){let d=[],p=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT);for(;p.nextNode();){let v=p.currentNode;v instanceof HTMLElement&&v.tabIndex>=0&&!v.matches(":disabled")&&!v.closest('[inert], [aria-hidden="true"]')&&v.getClientRects().length>0&&getComputedStyle(v).visibility!=="hidden"&&d.push(v)}let h=d[0],g=d[d.length-1];(!h||(c.shiftKey?document.activeElement===h||document.activeElement===a:document.activeElement===g||document.activeElement===a))&&(c.preventDefault(),(c.shiftKey?g:h)?.focus({preventScroll:!0}));return}c.key==="Escape"&&(c.preventDefault(),n.current())}};return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l),a.contains(document.activeElement)&&o?.focus({preventScroll:!0})}},[e]),r}var w6=B(_(),1),_V=8,x6=.28,c5e=50,PV=.35,d5e=56;function p5e({drawerRef:e,backdropRef:t,enabled:r,isOpen:n,onOpen:a,onClose:o}){let l=w6.useRef(a),c=w6.useRef(o);l.current=a,c.current=o;let d=w6.useRef({phase:"idle",startX:0,startY:0,startTime:0,currentX:0,currentY:0,initialOpen:!1,samples:[],drawerWidth:320,cleanups:[]});w6.useEffect(()=>{if(!r||typeof window>"u")return;let p=d.current,h=()=>{let F=e.current;return F&&F.offsetWidth>0?F.offsetWidth:Math.min(344,Math.max(260,window.innerWidth-24))},g=F=>{if(!(F instanceof Element))return!1;let C=F.closest("input, textarea, select, [contenteditable='true']");return!!(C&&document.activeElement===C||F.closest(".ant-tabs-nav, pre, code, [data-scroll-x], [data-no-drawer-gesture]"))},v=()=>{let F=e.current,C=t.current;F&&(F.style.transform="",F.style.transition="",F.style.willChange="",F.style.pointerEvents="",delete F.dataset.drawerGesture),C&&(C.style.opacity="",C.style.transition="",C.style.willChange="",C.style.pointerEvents="",delete C.dataset.drawerGesture)},y=F=>{if(F.touches.length!==1||p.phase==="animating")return;let C=F.touches[0];if(!C||g(F.target))return;let D=Math.max(d5e,Math.round(window.innerWidth*.16)),S=C.clientX<=D,A=e.current,I=t.current,j=A&&A.contains(F.target)||I&&I.contains(F.target);!n&&!S||n&&!j||(p.phase="tracking",p.startX=C.clientX,p.startY=C.clientY,p.startTime=Date.now(),p.currentX=C.clientX,p.currentY=C.clientY,p.initialOpen=n,p.drawerWidth=h(),p.samples=[{x:C.clientX,y:C.clientY,time:p.startTime}])},w=F=>{if(p.phase==="idle"||p.phase==="animating")return;let C=F.touches[0];if(!C)return;let D=Date.now(),S=C.clientX-p.startX,A=C.clientY-p.startY;if(p.phase==="tracking"){let U=Math.abs(S),H=Math.abs(A);if(U<_V&&H<_V)return;if(H>=U){p.phase="idle";return}if(!p.initialOpen&&S<=0){p.phase="idle";return}if(p.initialOpen&&S>=0){p.phase="idle";return}p.phase="dragging";let q=e.current,L=t.current;q&&(q.dataset.drawerGesture="active",q.style.display="flex",q.style.willChange="transform",q.style.transition="none",q.style.pointerEvents="auto"),L&&(L.dataset.drawerGesture="active",L.style.display="block",L.style.willChange="opacity",L.style.transition="none",L.style.pointerEvents="auto")}if(p.phase!=="dragging")return;F.cancelable&&F.preventDefault(),p.currentX=C.clientX,p.currentY=C.clientY,p.samples.push({x:C.clientX,y:C.clientY,time:D});let I=D-140;for(;p.samples.length>2&&(p.samples[0]?.time??0)<I;)p.samples.shift();let j=p.drawerWidth,$=0,P=0;p.initialOpen?($=Math.min(1,Math.max(0,1+S/j)),P=Math.min(0,Math.max(-j,S))):($=Math.min(1,Math.max(0,S/j)),P=-j+S,P=Math.min(0,P));let N=e.current,R=t.current;N&&(N.style.transform=`translate3d(${P}px, 0, 0)`),R&&(R.style.opacity=String($*.98))},x=()=>{if(p.phase!=="dragging"){p.phase="idle";return}p.phase="animating";let F=Date.now(),C=p.samples,D=0,S=0;if(C.length>=2){let G=C[0],Z=C[C.length-1],T=Math.max(1,Z.time-G.time);if(D=(Z.x-G.x)/T,C.length>=3){let V=C[Math.floor(C.length/2)],X=Math.max(1,V.time-G.time),Q=Math.max(1,Z.time-V.time),re=(V.x-G.x)/X;S=((Z.x-V.x)/Q-re)/Q}}let A=D+S*c5e,I=p.drawerWidth,j=p.currentX-p.startX,$=p.initialOpen?Math.max(0,1+j/I):Math.max(0,j/I);$=Math.min(1,$);let P=!1;p.initialOpen?A<=-x6?P=!1:A>=x6?P=!0:P=$>=1-PV:A>=x6?P=!0:A<=-x6?P=!1:P=$>=PV;let N=window.matchMedia("(prefers-reduced-motion: reduce)").matches,R=e.current,U=t.current,H=()=>{v(),p.phase="idle",P?l.current():c.current()};if(N||!R){H();return}let q=P?0:-I,L=P?1:0,O=Math.abs((P?0:-I)-(p.initialOpen?j:-I+j)),W=Math.round(Math.min(260,Math.max(140,O/Math.max(.8,Math.abs(A)*1.5))));R.style.transition=`transform ${W}ms cubic-bezier(0.16, 1, 0.3, 1)`,R.style.transform=`translate3d(${q}px, 0, 0)`,U&&(U.style.transition=`opacity ${W}ms cubic-bezier(0.16, 1, 0.3, 1)`,U.style.opacity=String(L));let z=null,Y=G=>{G.target!==R||G.propertyName!=="transform"||(R.removeEventListener("transitionend",Y),z&&clearTimeout(z),H())};R.addEventListener("transitionend",Y),z=setTimeout(()=>{R.removeEventListener("transitionend",Y),H()},W+40)},k=()=>{p.phase==="dragging"&&v(),p.phase="idle"};return document.addEventListener("touchstart",y,{passive:!0}),document.addEventListener("touchmove",w,{passive:!1}),document.addEventListener("touchend",x,{passive:!0}),document.addEventListener("touchcancel",k,{passive:!0}),()=>{document.removeEventListener("touchstart",y),document.removeEventListener("touchmove",w),document.removeEventListener("touchend",x),document.removeEventListener("touchcancel",k),v()}},[r,n,e,t])}var ke=B(Ee(),1),oK="\u5408\u5E76\u5230\u4E3B\u5206\u652F\u2026",sK="\u91CD\u8BD5 worktree \u6E05\u7406",lK="\u5220\u9664\u4F1A\u8BDD",f5e=Vh(()=>globalThis.__wandImportBrowserModule("5f635cbcab701433").then(e=>e.WorkspacesPanel),{title:"\u5DE5\u4F5C\u533A",renderPending:()=>(0,ke.jsx)("div",{role:"status",style:{padding:12,fontSize:12,color:"var(--text-secondary)"},children:"\u6B63\u5728\u52A0\u8F7D\u5DE5\u4F5C\u533A\u2026"})}),m5e=Bn.lazy(()=>globalThis.__wandImportBrowserModule("6cd6c4f4aa02b1ec").then(e=>({default:e.SidebarPeek})));function uK(e){return e.source.endsWith("-history")?e.source:"session"}function cK(e){return e.source.endsWith("-history")}function dK(e){if(!cK(e))return null;let t=e.source.slice(0,-8);return t==="codex"||t==="opencode"||t==="qoder"?t:"claude"}function tB(e,t){let r=uK(e);if(t)return{primary:{type:"session.manage.select",target:r,id:e.id},resume:null,delete:null,merge:null,cleanup:null};let n=dK(e),a=n?{type:"session.resumeHistory",provider:n,id:e.id,cwd:e.cwd}:null,o=e.worktree?.enabled&&e.worktree.mergeStatus==="merged"?{type:"session.cleanup",id:e.id}:null,l=e.worktree?.enabled&&e.worktree.branch&&e.worktree.path&&e.worktree.mergeStatus!=="merged"?{type:"session.merge",id:e.id}:null;return{primary:a??{type:"session.select",id:e.id},resume:a??(e.resumable?{type:"session.resume",id:e.id}:null),delete:{type:"session.delete",target:r,id:e.id},merge:l,cleanup:o}}function E6({action:e,dispatch:t,actionName:r,label:n,icon:a,className:o,disabled:l,data:c}){return(0,ke.jsx)(Er,{className:ct("session-action-btn",o),"data-action":r,"data-session-id":c?.sessionId,"data-claude-session-id":c?.historyId,"data-cwd":c?.cwd,"aria-label":n,title:n,disabled:l,onClick:d=>{d.stopPropagation(),t(e)},children:(0,ke.jsx)(Fe,{name:a})})}function h5e({entry:e,dispatch:t}){let r=uK(e);return(0,ke.jsx)("span",{className:"wand-session-manage-check",onClick:n=>n.stopPropagation(),children:(0,ke.jsx)(or,{children:(0,ke.jsx)($A,{"data-action":"toggle-selection","data-kind":r==="session"?"sessions":r==="codex-history"?"codex":"history","data-id":e.id,checked:e.selected,"aria-label":`\u9009\u62E9\u4F1A\u8BDD ${e.title}`,onChange:()=>{t({type:"session.manage.select",target:r,id:e.id})}})})})}function g5e({entry:e}){if(!e.worktree?.enabled)return null;let t={ready:"\u53EF\u5408\u5E76",checking:"\u68C0\u67E5\u4E2D",merging:"\u5408\u5E76\u4E2D",merged:"\u5DF2\u5408\u5E76",failed:"\u5408\u5E76\u5931\u8D25"},r=[e.worktree.branch&&`Worktree: ${e.worktree.branch}`,e.worktree.path&&`Path: ${e.worktree.path}`].filter(Boolean).join(`
|
|
234
|
-
`);return(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsx)(Xh,{className:"session-kind-badge worktree",title:r||void 0,children:"Worktree"}),e.worktree.mergeStatus&&(0,ke.jsx)(Xh,{className:ct("session-kind-badge worktree-merge",e.worktree.mergeStatus),children:t[e.worktree.mergeStatus]??e.worktree.mergeStatus})]})}function v5e(e){let t=e.endedAt??e.startedAt;if(!t)return"";let r=new Date(t);if(!Number.isFinite(r.getTime()))return"";if(!e.endedAt&&e.turnActive){let a=e.turnStartedAt??e.startedAt;if(!a)return"";let o=new Date(a).getTime();if(!Number.isFinite(o))return"";let l=Math.max(0,Math.floor((Date.now()-o)/1e3)),c=Math.floor(l/3600),d=Math.floor(l%3600/60),p=l%60;return c>0?`${c}:${String(d).padStart(2,"0")}:${String(p).padStart(2,"0")}`:`${String(d).padStart(2,"0")}:${String(p).padStart(2,"0")}`}let n=Math.max(0,Date.now()-r.getTime());return n<6e4?"\u521A\u521A":n<36e5?`${Math.floor(n/6e4)}\u5206\u949F\u524D`:n<864e5?`${Math.floor(n/36e5)}\u5C0F\u65F6\u524D`:n<6048e5?`${Math.floor(n/864e5)}\u5929\u524D`:r.toLocaleDateString([],{month:"numeric",day:"numeric"})}function b5e({entry:e}){let t=e.engine==="sdk"?Ev:kv(e.provider),r=_o(e.provider);return(0,ke.jsx)("span",{className:ct("session-provider-mark",`provider-${r??"generic"}`,e.engine==="sdk"&&"provider-engine-sdk"),"aria-hidden":"true",title:t,children:(0,ke.jsx)(Js,{provider:r})})}function NV({path:e}){return e?(0,ke.jsx)(Pt.Text,{ellipsis:!0,type:"secondary",className:"session-path",style:{maxWidth:160,fontSize:12},title:e,"aria-label":e,children:e}):null}function y5e({entry:e,manageMode:t,dispatch:r}){let n=tB(e,t),a=cK(e),o=dK(e)??"claude",l=a?{historyId:e.id,cwd:e.cwd}:{sessionId:e.id},c=()=>{r(n.primary)},d=v5e(e),p=!a&&(e.permissionBlocked||e.inFlight||e.turnActive||["thinking","waiting-input","waiting_input","reconnecting"].includes(e.status)),h=e.permissionBlocked||["waiting-input","waiting_input","reconnecting"].includes(e.status),g=a?"none":e.permissionBlocked?"permission":e.status==="waiting-input"||e.status==="waiting_input"?"waiting-input":e.status==="reconnecting"?"reconnecting":e.status==="failed"?"failed":e.inFlight||e.turnActive&&e.status==="running"?e.status==="thinking"?"thinking":"running":e.status==="running"&&e.provider&&e.kind==="pty"&&!e.ptyBusy?"none":e.status==="running"?"running":e.status==="thinking"?"thinking":Ni(e)?"just-completed":"none";return(0,ke.jsx)("div",{className:ct("session-item",a&&"non-wand-session",e.active&&"active",t&&e.selected&&"selected",t&&"session-managing",p&&"status-prominent",h&&"status-prominent-warning"),style:{marginBlock:4},"data-session-id":a?void 0:e.id,"data-claude-history-id":a?e.id:void 0,"data-provider":a?o:void 0,"data-cwd":a?e.cwd:void 0,children:(0,ke.jsx)("div",{className:"session-item-content",children:(0,ke.jsxs)(Xe,{align:"center",gap:4,className:"session-item-row",children:[t&&(0,ke.jsx)(h5e,{entry:e,dispatch:r}),(0,ke.jsxs)(Te,{kind:e.active?"soft":"ghost",className:"session-main wand-sidebar-history-action",style:{flex:1,minWidth:0,height:"auto",whiteSpace:"normal",padding:8,display:"flex",flexDirection:"column",alignItems:"stretch",textAlign:"start"},"aria-current":e.active?"page":void 0,onClick:c,children:[(0,ke.jsxs)(Xe,{align:"center",gap:"small",className:"session-title-row",children:[(0,ke.jsx)("span",{className:ct("session-leading-slot",g!=="none"&&`wand-logo-glow glow-${g}`),"data-glow":g,style:{display:"inline-flex",width:20,height:20,flexShrink:0},children:(0,ke.jsx)(b5e,{entry:e})}),(0,ke.jsx)("div",{className:ct(a?"session-command claude-history-preview":"session-title",e.titleGenerating&&"title-generating"),"aria-busy":e.titleGenerating||void 0,"aria-label":e.titleGenerating?`${e.title}\uFF0CAI \u6B63\u5728\u751F\u6210\u6807\u9898`:void 0,style:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title})]}),e.description&&(0,ke.jsx)("div",{className:"session-description",children:e.description}),(0,ke.jsxs)(Xe,{gap:"small",wrap:!0,className:"session-meta",style:{fontSize:12},children:[(0,ke.jsx)("span",{className:"session-leading-slot session-time",children:d}),a?(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsxs)("span",{className:"session-context session-context-recoverable",children:[(0,ke.jsx)(Fe,{name:"history",size:11}),"\u53EF\u6062\u590D"]}),(0,ke.jsx)(NV,{path:e.cwd})]}):(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsx)(NV,{path:e.cwd}),(0,ke.jsx)(g5e,{entry:e})]})]})]}),!t&&(0,ke.jsxs)(Xe,{align:"center",gap:2,className:"session-actions",children:[n.resume&&(0,ke.jsx)(E6,{action:n.resume,dispatch:r,actionName:a?o==="claude"?"resume-history":`resume-${o}-history`:"resume",label:a?`\u6062\u590D\u6B64 ${kv(o)} \u4F1A\u8BDD`:"\u6062\u590D\u4F1A\u8BDD",icon:"resume",data:l}),n.merge&&(0,ke.jsx)(E6,{action:n.merge,dispatch:r,actionName:"worktree-merge",label:oK,icon:"merge",className:"merge-btn",disabled:e.status==="running"||e.worktree?.mergeStatus==="merging",data:l}),n.cleanup&&(0,ke.jsx)(E6,{action:n.cleanup,dispatch:r,actionName:"worktree-cleanup",label:sK,icon:"trash",className:"merge-btn",data:l}),n.delete&&(0,ke.jsx)(E6,{action:n.delete,dispatch:r,actionName:a?o==="claude"?"delete-history":`delete-${o}-history`:"delete-session",label:lK,icon:"trash",className:"delete-btn",data:l})]})]})})})}var w5e={load:"\u52A0\u8F7D\u5931\u8D25",sync:"\u672A\u540C\u6B65"};function x5e(){let e=Bn.useSyncExternalStore(ZD,R2,R2),[t,r]=Bn.useState(!1);if(Bn.useEffect(()=>{e||r(!1)},[e]),!e)return null;let n=w5e[e.kind];return(0,ke.jsx)(Te,{kind:"ghost",type:"button",className:ct("sidebar-list-error",t&&"is-retrying"),title:`${e1(e.message)}\uFF5C\u70B9\u51FB\u91CD\u65B0\u52A0\u8F7D`,"aria-label":`${n}\uFF1A${e1(e.message)}\uFF0C\u70B9\u51FB\u91CD\u65B0\u52A0\u8F7D`,disabled:t,onClick:()=>{r(!0),e.retry().finally(()=>r(!1))},children:(0,ke.jsx)(Fe,{name:"refresh",size:18,className:"sidebar-list-error-icon"})})}function E5e(){return{action:{type:"workspace.new"},label:"\u65B0\u5EFA\u4F1A\u8BDD",ariaLabel:"\u65B0\u5EFA\u4F1A\u8BDD"}}function k5e(e){switch(e.type){case"session.select":case"session.resume":case"session.resumeHistory":case"nav.home":case"auth.logout":case"native.back":case"native.switchServer":return!0;default:return!1}}async function C5e(e,t){let r=await gn.dialog({title:"\u9000\u51FA\u767B\u5F55\uFF1F",focusTriggerAfterClose:!1,description:"\u9000\u51FA\u540E\u9700\u8981\u91CD\u65B0\u8FDE\u63A5\u3002\u6B63\u5728\u8FD0\u884C\u7684\u4EFB\u52A1\u4F1A\u7EE7\u7EED\u6267\u884C\u3002",actions:[{label:"\u53D6\u6D88",value:!1,autoFocus:!0},{label:"\u9000\u51FA\u767B\u5F55",value:!0,kind:"danger"}]});r.dismissed!==!0&&r.action?e():t?.()}function S5e({active:e,onToggle:t}){let r=e?"\u5C55\u5F00\u5B8C\u6574\u4FA7\u8FB9\u680F":"\u6536\u8D77\u4E3A\u7A84\u680F";return(0,ke.jsxs)(Er,{className:ct("sidebar-compact-toggle",e&&"active"),kind:"ghost",size:"small","aria-label":r,"aria-pressed":e,"data-pressed":e||void 0,title:r,onClick:t,children:[(0,ke.jsx)(Fe,{name:"chevronLeft",className:"sidebar-collapse-direction"}),(0,ke.jsx)("span",{className:"sidebar-compact-toggle-label",children:e?"\u5C55\u5F00":"\u6536\u8D77"})]})}function F5e({group:e,manageMode:t,dispatch:r}){if(e.entries.length===0)return null;let n=(0,ke.jsx)("section",{className:ct("session-group",e.kind==="automation"&&"automation-session-list",e.kind==="history"&&"non-wand-session-list"),children:e.entries.map(l=>(0,ke.jsx)(y5e,{entry:l,manageMode:t,dispatch:r},`${l.source}:${l.id}`))});if(e.kind==="wand")return n;let a=e.kind==="automation",o=l=>{t||r({type:"layout.drawer.group.set",group:a?"automation":"history",expanded:l})};return(0,ke.jsx)("div",{className:ct(a?"automation-session-group":"non-wand-session-group",t&&"manage-mode"),children:(0,ke.jsx)(JD,{label:e.label,count:e.entries.length,description:a?"\u7531\u81EA\u52A8\u5316\u6216\u542F\u52A8\u4EFB\u52A1\u521B\u5EFA\uFF0C\u4E0D\u53C2\u4E0E\u666E\u901A Wand \u4F1A\u8BDD\u6392\u5E8F":"\u672C\u673A\u539F\u751F\u4F1A\u8BDD\uFF0C\u4E0D\u53C2\u4E0E Wand \u4F1A\u8BDD\u6392\u5E8F",avatarNode:(0,ke.jsx)(Fe,{name:a?"zap":"history"}),expanded:t||e.expanded,onToggle:()=>o(!e.expanded),onSetOpen:o,children:n})})}function D5e(){let e=ai(),t=p0(),[r,n]=Bn.useState(()=>new Set([t.mode])),a=r.has(t.mode);Bn.useLayoutEffect(()=>{a||n(X=>new Set(X).add(t.mode))},[a,t.mode]);let o=Ci(),l=Bn.useSyncExternalStore(gl.subscribe,gl.getSnapshot,gl.getSnapshot),c=Bn.useSyncExternalStore(Fa.subscribe,Fa.getSnapshot,Fa.getSnapshot),d=R7(),p=_h().name||l3,[h,g]=Bn.useState(!1),v=Bn.useRef(null),y=ID(),{query:w,setQuery:x}=y,[k,F]=Bn.useState(!1),C=!e.layout.sidebarDrawer&&(c.open||t.directory||l.open||e.layout.filePanelOpen),D=!e.layout.sidebarDrawer&&e.layout.sidebarPinned&&e.layout.sidebarCollapsed,S=ct("sidebar sidebar-refined",e.layout.sessionsDrawerOpen&&"open",!e.layout.sidebarDrawer&&e.layout.sidebarAnchored&&"pinned",D&&!C&&"collapsed",C&&"context-rail",t.mode==="chats"&&!C&&"sidebar-home"),A=E5e(),I=e.layout.sessionsDrawerOpen||!e.layout.sidebarDrawer&&e.layout.sidebarAnchored,j=I&&(e.layout.sidebarDrawer||!e.layout.sidebarPinned),$=u5e(j,()=>{o({type:"layout.drawer.close"})}),P=Bn.useRef(null);p5e({drawerRef:$,backdropRef:P,enabled:e.layout.sidebarDrawer||j,isOpen:e.layout.sessionsDrawerOpen,onOpen:()=>{o({type:"layout.drawer.open"})},onClose:()=>{o({type:"layout.drawer.close"})}});let N=Bn.useRef(null),R=Bn.useRef(null),U=s5e(),[H,q]=Bn.useState(null),L=Bn.useCallback((X,Q)=>{let re=$.current?.getBoundingClientRect().top??0,J=Math.max(8,Math.min(Q.getBoundingClientRect().top-re,window.innerHeight-re-300)),se=Q.dataset.sidebarDirectoryName??"\u76EE\u5F55";q(ue=>ue?.id===X&&ue.name===se&&ue.top===J?ue:{id:X,name:se,top:J})},[$]),O=l5e(I&&!C&&D&&U&&!h,$,R,L),W=Bn.useRef({...t.scrolls});Bn.useLayoutEffect(()=>{let X=N.current;if(!X)return;let Q=`sidebar:${t.mode}:${D?"compact":"full"}`;return X.scrollTop=W.current[Q]??0,()=>{W.current[Q]=X.scrollTop,Ar.scroll(Q,X.scrollTop)}},[D,t.mode]);let z=()=>{O.close(),j&&o({type:"layout.drawer.close"})},Y=X=>{k5e(X)&&(mo.close(),En.close(),Ar.suspend()),X.type==="nav.home"&&Ar.show(),z(),o(X)},G=()=>{mo.close(),En.close(),Ar.suspend(),z()},Z=X=>{if(X.type==="session.select"||X.type==="session.resume"||X.type==="session.resumeHistory"){Y(X);return}o(X)};Bn.useEffect(()=>{g(!1)},[I,D,C,t.mode,t.directory]),Bn.useEffect(()=>{I||F(!1)},[I]);let T=e.sidebar.groups.filter(X=>X.kind==="history").map(X=>({...X,entries:w.trim()?X.entries.filter(Q=>Eu(w,Q.title,Q.description,Q.cwd,Q.provider)):X.entries})).map(X=>(0,ke.jsx)(F5e,{group:X,manageMode:!1,dispatch:Z},X.kind)),V=(X,Q)=>(0,ke.jsx)(f5e,{compact:X,directoryId:Q,peekDirectoryId:O.open?H?.id:void 0,onExpand:()=>{O.close(),o({type:"layout.drawer.collapse"})},onNavigate:G,onOpenDialog:z,searchQuery:w,surfacesEnabled:Q?I&&O.open:I&&!D&&!C&&t.mode==="tasks",onSearchChange:x,selectedSessionId:e.selected?.id??null,sessionTitles:Object.fromEntries(e.sidebar.groups.flatMap(re=>re.entries.map(J=>[J.id,J.title]))),sessionTitleGenerating:Object.fromEntries(e.sidebar.groups.flatMap(re=>re.entries.map(J=>[J.id,J.titleGenerating]))),extraGroups:T},Q??"sidebar-tree");return(0,ke.jsxs)(Fs.Provider,{value:y,children:[(0,ke.jsx)("div",{id:"sessions-drawer-backdrop",ref:P,className:ct("drawer-backdrop",e.layout.sessionsBackdropVisible&&"open"),"aria-hidden":"true",style:{position:"fixed",inset:0,background:"var(--bg-overlay)",zIndex:19999,display:e.layout.sessionsBackdropVisible?void 0:"none"},onClick:()=>{o({type:"layout.drawer.close"})}}),(0,ke.jsxs)(uE.Sider,{id:"sessions-drawer",ref:$,className:S,width:C?56:"min(344px, calc(100vw - 24px))",collapsedWidth:112,collapsed:D&&!C,theme:"light",style:{position:j?"fixed":"relative",top:j?"var(--wand-safe-top, 0px)":void 0,bottom:j?"var(--wand-safe-bottom, 0px)":void 0,left:0,display:I?void 0:"none",zIndex:j?2e4:2,height:"100%",overflow:"visible"},styles:{body:{display:"flex",flexDirection:"row",height:"100%",minHeight:0}},"aria-label":"\u4E3B\u5BFC\u822A\u4E0E\u4F1A\u8BDD\u5217\u8868",role:j?"dialog":void 0,"aria-modal":j||void 0,"aria-hidden":!I||void 0,inert:!I,tabIndex:-1,...O.triggerBindings,children:[(0,ke.jsxs)(Xe,{vertical:!0,align:"center",className:"sidebar-navigation-rail",children:[(0,ke.jsxs)("div",{className:"sidebar-rail-scroll",children:[(0,ke.jsx)(Sp,{className:"sidebar-brand-mark",style:{width:"var(--conversation-brand-size, 24px)",height:"var(--conversation-brand-size, 24px)"}}),(0,ke.jsx)(Gwe,{activePage:c.open?null:l.open?l.page==="board"?"board":l.page==="schedules"?"schedules":l.page==="calendar"?"calendar":"teams":t.directory?"teams":t.mode,teamAttention:d,onNavigate:X=>{F(!1),mo.close(),O.close(),X==="board"||X==="teams"||X==="schedules"||X==="calendar"?En.open(X==="calendar"?"":e.selected?.workspaceId??"",X==="calendar"?"":e.selected?.id??"",X):(En.close(),X==="contacts"?Ar.directory(!0):(Ar.mode(X),X==="chats"?Ar.show():Ar.suspend())),X!=="chats"&&X!=="tasks"&&z()}}),(0,ke.jsxs)(Xe,{vertical:!0,align:"center",gap:4,className:"sidebar-rail-notices",children:[(0,ke.jsx)(i5e,{compact:!0,open:k,onToggle:()=>F(X=>!X)}),(0,ke.jsx)(x5e,{}),(0,ke.jsx)(aA,{compact:!0,visible:I})]})]}),(0,ke.jsxs)(Yh,{open:h,onOpenChange:g,modal:!1,children:[(0,ke.jsx)(Hp,{ref:v,render:(0,ke.jsxs)(Er,{kind:c.open?"soft":"ghost","aria-current":c.open?"page":void 0,id:"settings-button",className:"sidebar-profile-button",title:`${p} \xB7 \u8BBE\u7F6E`,"aria-label":"\u8D26\u6237\u4E0E\u8BBE\u7F6E",children:[(0,ke.jsx)(Fe,{name:"gear",size:18}),(0,ke.jsx)("span",{className:"sidebar-nav-label","aria-hidden":"true",children:"\u8BBE\u7F6E"})]})}),(0,ke.jsxs)(qp,{id:"sidebar-account-menu",className:"sidebar-tools-menu","aria-label":"\u8D26\u6237\u4E0E\u8BBE\u7F6E",side:"right",align:"end",sideOffset:6,children:[(0,ke.jsx)(Ba,{icon:"user",onClick:()=>{g(!1),mo.close(),En.close(),Ar.directory(!0),z()},children:"\u5458\u5DE5\u4E0E\u901A\u8BAF\u5F55"}),(0,ke.jsx)(Ba,{id:"sidebar-settings-entry",icon:"gear",onClick:()=>{g(!1),F(!1),Y({type:"settings.open"})},children:"\u8BBE\u7F6E"}),(0,ke.jsx)(Qh,{}),(0,ke.jsx)(kD,{menuItem:!0}),(0,ke.jsx)(Ba,{id:"logout-button",icon:"logout",tone:"danger",onClick:()=>{g(!1),C5e(()=>Y({type:"auth.logout"}),()=>{requestAnimationFrame(()=>v.current?.focus({preventScroll:!0}))})},children:"\u9000\u51FA\u767B\u5F55"})]})]})]}),(0,ke.jsxs)(Xe,{vertical:!0,className:"sidebar-list-panel",hidden:C,inert:C,children:[(0,ke.jsx)(Xe,{vertical:!0,gap:"small",className:"sidebar-header",style:{padding:D?"8px 4px":"10px 12px",flexShrink:0},children:(0,ke.jsxs)(Xe,{vertical:D,align:"center",justify:"space-between",gap:"small",className:"sidebar-header-primary",children:[(0,ke.jsx)(Xe,{align:"center",gap:"small",className:"sidebar-header-main",children:(0,ke.jsx)(Pt.Text,{strong:!0,className:"sidebar-title",hidden:D,style:{whiteSpace:"nowrap"},children:t.mode==="tasks"?"\u5DE5\u4F5C\u533A":"\u5BF9\u8BDD"})}),(0,ke.jsxs)(Xe,{align:"center",gap:4,vertical:D,className:"sidebar-header-actions",children:[(0,ke.jsx)("div",{hidden:t.mode!=="chats",children:(0,ke.jsx)(Xwe,{enabled:I&&!C&&t.mode==="chats",onCreateSession:()=>Y(A.action),onNavigate:()=>{En.close(),z()}})}),!e.layout.sidebarDrawer&&(0,ke.jsx)(S5e,{active:D,onToggle:()=>{O.close(),o({type:"layout.drawer.collapse"})}}),e.layout.sidebarDrawer&&(0,ke.jsx)(Er,{id:"close-drawer-button",className:"sidebar-close","aria-label":"\u5173\u95ED\u4FA7\u680F",title:"\u5173\u95ED\u4FA7\u680F",size:"medium",onClick:()=>{o({type:"layout.drawer.close"})},children:(0,ke.jsx)(Rb,{open:!0})})]})]})}),(0,ke.jsx)(Xe,{hidden:t.mode!=="tasks",vertical:!0,className:"sidebar-feature-nav",style:{padding:D?"0 4px 8px":"0 12px 8px",flexShrink:0},children:(0,ke.jsxs)(Te,{id:"drawer-new-session-button",className:"sidebar-new-task",kind:"primary",title:A.label,"aria-label":A.ariaLabel,onClick:()=>Y(A.action),children:[(0,ke.jsx)(Fe,{name:"plus",size:18}),(0,ke.jsx)("span",{hidden:D,children:A.label})]})}),(0,ke.jsx)("div",{className:"sidebar-body",ref:N,style:{flex:1,minHeight:0,overflow:"auto",padding:D?4:"0 8px"},children:(0,ke.jsx)("div",{id:"sessions-panel",children:(0,ke.jsx)("div",{className:"sessions-list",id:"sessions-list",children:(0,ke.jsxs)(H2,{value:t.mode,children:[r.has("chats")?(0,ke.jsx)("div",{hidden:t.mode!=="chats",inert:t.mode!=="chats",children:(0,ke.jsx)(Zwe,{compact:D,enabled:I&&!C&&t.mode==="chats",selectedSessionId:e.selected?.id??null,sessionTitles:Object.fromEntries(e.sidebar.groups.flatMap(X=>X.entries.map(Q=>[Q.id,Q.title]))),onNavigate:()=>{En.close(),z()},onOpenSession:X=>{En.close(),Ar.suspend(),z(),LD(X,Q=>{o({type:"session.select",id:Q})})}})}):null,r.has("tasks")?(0,ke.jsx)("div",{hidden:t.mode!=="tasks",inert:t.mode!=="tasks",children:V(D)}):null]})})})}),D&&U&&O.mounted&&H?(0,ke.jsx)(Bn.Suspense,{fallback:null,children:(0,ke.jsx)(m5e,{title:H.name,top:H.top,open:O.open,surfaceRef:R,onExpand:()=>{O.close(),o({type:"layout.drawer.collapse"})},...O.surfaceBindings,children:(0,ke.jsx)("div",{className:"sessions-list",children:V(!1,H.id)})})}):null,(e.layout.sidebarDrawer||e.capabilities.backToNative||e.capabilities.switchServer)&&(0,ke.jsx)(Xe,{vertical:D,align:"center",justify:"space-between",gap:"small",className:"sidebar-footer",style:{flexShrink:0,padding:D?8:"8px 16px",borderTop:"1px solid var(--border-subtle)"},children:(0,ke.jsxs)(Xe,{component:"nav",wrap:!0,gap:4,vertical:D,className:"sidebar-footer-actions","aria-label":"\u4FA7\u680F\u5FEB\u6377\u64CD\u4F5C",children:[e.layout.sidebarDrawer&&(0,ke.jsxs)(Er,{id:"file-panel-toggle-btn",title:"\u67E5\u770B\u6587\u4EF6","aria-label":"\u6587\u4EF6","aria-pressed":e.layout.filePanelOpen,onClick:()=>Y({type:"layout.files.toggle"}),children:[(0,ke.jsx)(Fe,{name:"explorer",size:16}),(0,ke.jsx)("span",{children:"\u6587\u4EF6"})]}),e.capabilities.backToNative&&(0,ke.jsxs)(Er,{id:"back-to-native-button",title:"\u8FD4\u56DE App \u539F\u751F\u754C\u9762","aria-label":"\u8FD4\u56DE App",onClick:()=>Y({type:"native.back"}),children:[(0,ke.jsx)(Fe,{name:"back",size:16}),(0,ke.jsx)("span",{hidden:D,children:"\u8FD4\u56DEApp"})]}),e.capabilities.switchServer&&(0,ke.jsxs)(Er,{id:"switch-server-button",title:"\u5207\u6362\u670D\u52A1\u5668","aria-label":"\u5207\u6362\u670D\u52A1\u5668",onClick:()=>Y({type:"native.switchServer"}),children:[(0,ke.jsx)(Fe,{name:"server",size:16}),(0,ke.jsx)("span",{hidden:D,children:"\u5207\u6362"})]})]})})]})]})]})}var Y9=B(_(),1),A0=B(Ee(),1);function pK({id:e="topbar-git-badge",className:t}={}){let r=ai(),n=Ci(),a=r.topbar.git;if(!a)return null;let o=`${a.branch} \xB7 ${a.clean?"\u5DE5\u4F5C\u533A\u5E72\u51C0":`${a.modifiedCount} \u4E2A\u6587\u4EF6\u5F85\u63D0\u4EA4`}`;return(0,A0.jsxs)(Te,{id:e,className:t,kind:"ghost",size:"small",title:o,"aria-label":"\u5FEB\u6377\u63D0\u4EA4",onClick:()=>{n({type:"topbar.gitCommit"})},children:[(0,A0.jsx)(Fe,{name:"git",slot:"start",size:14,className:"topbar-git-icon"}),(0,A0.jsx)("span",{className:"topbar-git-branch",children:a.branch}),a.clean?(0,A0.jsx)("span",{className:"topbar-git-clean","aria-hidden":"true",children:(0,A0.jsx)(Fe,{name:"check",size:11})}):(0,A0.jsxs)("span",{className:"topbar-git-count",children:["\xB7",a.modifiedCount]})]})}var Ot=B(Ee(),1);function A5e(e,t){let r=[];return e.claudeSessionId&&r.push({action:{type:"topbar.copy",field:"providerSessionId"},actionName:"copy-claude-session-id",label:e.provider==="codex"?"\u590D\u5236 Codex thread ID":e.provider==="opencode"?"\u590D\u5236 OpenCode session ID":`\u590D\u5236 ${ou(e.provider,e.engine)} \u4F1A\u8BDD ID`,icon:"copy"}),e.cwd&&r.push({action:{type:"topbar.copy",field:"cwd"},actionName:"copy-cwd",label:"\u590D\u5236\u5DE5\u4F5C\u76EE\u5F55",icon:"folder"}),r.push({action:{type:"topbar.copy",field:"sessionId"},actionName:"copy-session-id",label:"\u590D\u5236\u4F1A\u8BDD ID",icon:"hash"}),t?.merge&&r.push({action:t.merge,actionName:"worktree-merge",label:oK,icon:"merge",dividerBefore:!0,disabled:e.status==="running"||e.worktree?.mergeStatus==="merging"}),t?.cleanup&&r.push({action:t.cleanup,actionName:"worktree-cleanup",label:sK,icon:"trash"}),t?.delete&&r.push({action:t.delete,actionName:"delete-session",label:lK,icon:"trash",tone:"danger"}),r}function fK({selected:e,actions:t,onAction:r}){return(0,Ot.jsx)(Ot.Fragment,{children:A5e(e,t).map(n=>(0,Ot.jsxs)(Y9.Fragment,{children:[n.dividerBefore?(0,Ot.jsx)(Qh,{}):null,(0,Ot.jsx)(Ba,{"data-action":n.actionName,icon:n.icon,tone:n.tone??"default",disabled:n.disabled,onClick:()=>r(n.action),children:n.label})]},n.actionName))})}function $5e({terminalActionVisible:e=!0}={}){let t=ai(),r=Ci(),n=t.layout.topbarMoreOpen,a=Y9.useRef(n);Y9.useEffect(()=>{a.current=n},[n]);let o=(0,Ot.jsx)(mK,{snapshot:t,onAction:r,terminalActionVisible:e,onMoreOpenChange:l=>{l!==a.current&&(a.current=l,r({type:"topbar.menu.toggle"}))},gitBadge:(0,Ot.jsx)(pK,{})});return e?(0,Ot.jsx)(c0,{children:o}):o}function mK({snapshot:e,onAction:t,onMoreOpenChange:r,gitBadge:n,measurement:a=!1,terminalActionVisible:o=!0}){let l=e.selected,c=e.layout.topbarMoreOpen,d=l?tB(l,!1):null,p=g=>a?void 0:g,h=g=>{t?.(g)};return(0,Ot.jsxs)(Xe,{align:"center",gap:"small",wrap:!0,className:ct("main-header-row",(l?.turnActive||l?.permissionBlocked)&&"is-running",l?.permissionBlocked&&"is-permission-blocked"),style:{flexShrink:0,padding:"8px var(--wand-page-inset, 20px)",borderBottom:"1px solid var(--border-subtle)"},children:[(0,Ot.jsxs)(Xe,{align:"center",gap:"small",className:"topbar-left",children:[(e.layout.sidebarDrawer||!e.layout.sidebarAnchored)&&(0,Ot.jsx)(Er,{id:p("sessions-toggle-button"),className:ct("floating-sidebar-toggle",e.layout.sessionsDrawerOpen&&"active"),"aria-label":e.layout.sessionsDrawerOpen?"\u5173\u95ED\u4F1A\u8BDD\u4FA7\u680F":"\u6253\u5F00\u4F1A\u8BDD\u4FA7\u680F","aria-expanded":e.layout.sessionsDrawerOpen,"aria-controls":a?void 0:"sessions-drawer","data-pressed":e.layout.sessionsDrawerOpen||void 0,onClick:()=>{t?.({type:"layout.drawer.toggle"})},children:(0,Ot.jsx)(Rb,{open:e.layout.sessionsDrawerOpen,size:18})}),!e.layout.sidebarAnchored&&(0,Ot.jsx)(Sp,{className:"topbar-brand",style:{width:24,height:24}})]}),(0,Ot.jsx)(Xe,{vertical:!0,gap:2,className:"topbar-center",style:{flex:"1 1 0",minWidth:0},children:l?(0,Ot.jsx)(Ot.Fragment,{children:(0,Ot.jsxs)(Xe,{align:"center",gap:8,className:"topbar-title-row",children:[(0,Ot.jsx)(Pt.Text,{ellipsis:!0,className:ct("topbar-session-title",e.topbar.titleGenerating&&"title-generating"),title:[e.topbar.title,e.topbar.titleGenerating&&"AI \u6B63\u5728\u751F\u6210\u6807\u9898",e.topbar.description].filter(Boolean).join(`
|
|
235
|
-
`),"aria-label":e.topbar.titleGenerating?`${e.topbar.title}\uFF0CAI \u6B63\u5728\u751F\u6210\u6807\u9898`:void 0,"aria-busy":e.topbar.titleGenerating||void 0,style:{minWidth:0,maxWidth:520,fontWeight:"var(--font-weight-semibold)"},children:e.topbar.title}),(0,Ot.jsx)(Pt.Text,{className:ct("current-task",!e.topbar.currentTask&&"hidden"),id:p("current-task"),title:e.topbar.currentTask||void 0,hidden:!e.topbar.currentTask,children:e.topbar.currentTask})]})}):(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)("span",{className:"topbar-tagline",children:e.topbar.title||"Wand \u63A7\u5236\u53F0"}),(0,Ot.jsx)("span",{className:"current-task hidden",id:p("current-task")})]})}),(0,Ot.jsxs)(Xe,{align:"center",gap:4,className:"topbar-right",children:[!a&&(0,Ot.jsx)(lA,{visible:o}),(0,Ot.jsx)(Er,{id:p("topbar-file-button"),kind:"ghost",size:"medium","aria-label":"\u6587\u4EF6","aria-pressed":e.layout.filePanelOpen,"data-pressed":e.layout.filePanelOpen||void 0,title:"\u67E5\u770B\u6587\u4EF6\uFF08\u53EF\u4FEE\u6539\u8DEF\u5F84\uFF09",onClick:()=>{t?.({type:"layout.files.toggle"})},children:(0,Ot.jsx)(Fe,{name:"explorer",size:18})}),(0,Ot.jsx)(Er,{id:p("topbar-local-preview-button"),kind:"ghost",size:"medium","aria-label":"\u672C\u5730\u9884\u89C8",title:"\u6253\u5F00\u672C\u673A Web \u670D\u52A1\u6216 HTML \u6587\u4EF6",onClick:a?void 0:()=>El.show(),children:(0,Ot.jsx)(Fe,{name:"eye",size:18})}),(0,Ot.jsx)("span",{id:p("topbar-git-slot"),className:"topbar-git-slot",children:n}),l&&(0,Ot.jsx)("div",{className:"topbar-more-wrap",children:a?(0,Ot.jsx)(Er,{kind:"ghost",size:"medium",children:(0,Ot.jsx)(Fe,{name:"more",size:18})}):(0,Ot.jsxs)(Yh,{open:c,onOpenChange:r,children:[(0,Ot.jsx)(Hp,{render:(0,Ot.jsx)(Er,{id:p("topbar-more-button"),kind:"ghost",size:"medium","aria-label":"\u5F53\u524D\u4F1A\u8BDD\u64CD\u4F5C",title:"\u5F53\u524D\u4F1A\u8BDD\u64CD\u4F5C","data-pressed":c||void 0,children:(0,Ot.jsx)(Fe,{name:"more",size:18})})}),(0,Ot.jsx)(qp,{id:p("topbar-more-menu"),"aria-label":"\u5F53\u524D\u4F1A\u8BDD",align:"end",sideOffset:6,children:(0,Ot.jsx)(fK,{selected:l,actions:d,onAction:h})})]})})]})]})}var vn=B(Ee(),1);function hK({windowActions:e}){let t=ai(),r=Ci(),n=y9.useSyncExternalStore(Wr.subscribe,Wr.getSnapshot,Wr.getServerSnapshot),[a,o]=y9.useState(!1);y9.useEffect(()=>o(!1),[t.selected?.id,n.taskId,n.layout?.activeWindowId]);let l=()=>o(!1),c=d=>{l(),r(d)};return(0,vn.jsxs)("div",{className:"workbar-actions",children:[(0,vn.jsx)("span",{className:"workbar-secondary-action",children:(0,vn.jsx)(pK,{id:"workspace-tab-git-badge"})}),(0,vn.jsx)(d0,{}),(0,vn.jsx)(Er,{className:"workbar-secondary-action","aria-label":"\u6587\u4EF6",title:"\u6253\u5F00\u6587\u4EF6\u9762\u677F","aria-pressed":t.layout.filePanelOpen,onClick:()=>{r({type:"layout.files.toggle"})},children:(0,vn.jsx)(Fe,{name:"explorer",size:18})}),(0,vn.jsxs)(Yh,{open:a,onOpenChange:o,children:[(0,vn.jsx)(Hp,{render:(0,vn.jsx)(Er,{"aria-label":"\u5F53\u524D\u4F1A\u8BDD\u4E0E\u7A97\u53E3\u64CD\u4F5C",title:"\u66F4\u591A\u64CD\u4F5C",children:(0,vn.jsx)(Fe,{name:"more",size:18})})}),(0,vn.jsxs)(qp,{align:"end","aria-label":"\u5F53\u524D\u4F1A\u8BDD\u4E0E\u7A97\u53E3\u64CD\u4F5C",children:[(0,vn.jsx)(Ba,{icon:"explorer",onSelect:()=>c({type:"layout.files.toggle"}),children:"\u6587\u4EF6"}),(0,vn.jsx)(Ba,{icon:"eye",onSelect:()=>{l(),El.show()},children:"\u672C\u5730\u9884\u89C8"}),t.topbar.git&&(0,vn.jsxs)(Ba,{icon:"git",onSelect:()=>c({type:"topbar.gitCommit"}),children:["\u5FEB\u6377\u63D0\u4EA4 \xB7 ",t.topbar.git.branch]}),t.selected&&(0,vn.jsxs)(vn.Fragment,{children:[(0,vn.jsx)(Qh,{}),(0,vn.jsx)(fK,{selected:t.selected,actions:tB(t.selected,!1),onAction:c})]}),e&&(0,vn.jsxs)(vn.Fragment,{children:[(0,vn.jsx)(Qh,{}),e(l)]})]})]})]})}function gK(){let e=ai(),t=Ci();return e.layout.sidebarDrawer||!e.layout.sidebarAnchored?(0,vn.jsx)(Er,{"aria-label":e.layout.sessionsDrawerOpen?"\u5173\u95ED\u4F1A\u8BDD\u4FA7\u680F":"\u6253\u5F00\u4F1A\u8BDD\u4FA7\u680F","aria-expanded":e.layout.sessionsDrawerOpen,"aria-controls":"sessions-drawer",onClick:()=>{t({type:"layout.drawer.toggle"})},children:(0,vn.jsx)(Rb,{open:e.layout.sessionsDrawerOpen,size:18})}):null}var $0=B(_(),1),Cr=B(Ee(),1);function B5e({status:e}){let t=e==="running"||e==="thinking",r=e==="waiting-input"?"\u7B49\u5F85\u8F93\u5165":e==="failed"?"\u5931\u8D25":t?"\u8FD0\u884C\u4E2D":e==="stopped"||e==="exited"?"\u5DF2\u7ED3\u675F":"\u7A7A\u95F2";return(0,Cr.jsx)("span",{"aria-label":r,title:r,children:(0,Cr.jsx)(ji,{status:e==="failed"?"error":t?"processing":"default",className:ct("workspace-tab-dot",t?"running":"idle"),"aria-hidden":!0})})}function I5e({className:e,...t}={}){return(0,Cr.jsx)(Te,{kind:"ghost","aria-label":"\u5DE5\u4F5C\u7A97\u53E3\u64CD\u4F5C",title:"\u5DE5\u4F5C\u7A97\u53E3\u64CD\u4F5C",...t,className:ct("workspace-tab-more",e),children:(0,Cr.jsx)(Fe,{name:"more",size:18})})}function M5e({children:e,onFiles:t,onClose:r}){return(0,Cr.jsxs)("div",{className:"workbar-actions",children:[e,(0,Cr.jsx)(Te,{kind:"ghost","aria-label":"\u6253\u5F00\u7EC8\u7AEF",children:(0,Cr.jsx)(Fe,{name:"terminal",size:18})}),(0,Cr.jsx)(Te,{kind:"ghost",className:"workbar-secondary-action","aria-label":"\u6587\u4EF6",onClick:t,children:(0,Cr.jsx)(Fe,{name:"explorer",size:18})}),(0,Cr.jsx)(I5e,{onClick:r})]})}function zE({mobile:e,taskName:t,variant:r="task",activeWindowId:n,windows:a,movingDir:o,closingWindowId:l,onSelectWindow:c,onCloseWindow:d,onNewSession:p,onCancelMove:h,leading:g,actions:v}){let y=r==="standalone",w=a.find(x=>x.id===n);return(0,Cr.jsxs)(Xe,{align:"center",gap:8,className:"workspace-tab-bar","data-session-tabs":r,children:[(0,Cr.jsx)("h1",{className:"workbar-accessible-title",children:w?.label||t||"\u5DE5\u4F5C\u7A97\u53E3"}),g,(0,Cr.jsxs)(Xe,{align:"center",gap:8,className:"workspace-tab-bar-list",children:[(0,Cr.jsx)(or,{children:(0,Cr.jsx)(Gm,{theme:{components:{Tabs:{itemSelectedColor:"var(--text-link)",itemActiveColor:"var(--text-link)",itemHoverColor:"var(--text-link)"}}},children:(0,Cr.jsx)(l9,{className:"wand-workspace-tabs",type:"editable-card",hideAdd:!0,tabBarStyle:{marginBottom:0},style:{flex:1,minWidth:0},"aria-label":y?"\u672A\u5206\u7EC4\u4F1A\u8BDD\u6807\u7B7E":`\u4EFB\u52A1 ${t} \u7684\u5DE5\u4F5C\u7A97\u53E3\u6807\u7B7E`,activeKey:n??void 0,items:a.map(x=>({key:x.id,closable:y||!e,label:(0,Cr.jsxs)("span",{className:ct("wand-workspace-tab-label",o&&!x.containsMoving&&"move-target",x.containsMoving&&"moving-source"),title:o&&!x.containsMoving?`\u628A\u5F53\u524D\u7EC8\u7AEF\u79FB\u5165\u300C${x.label}\u300D`:`${x.label}${x.count>1?"\uFF08\u5206\u5C4F\u5DE5\u4F5C\u7A97\u53E3\uFF09":""}${x.titleGenerating?" \xB7 AI \u6B63\u5728\u751F\u6210\u6807\u9898":""}`,children:[(0,Cr.jsx)(B5e,{status:x.status}),x.session?(0,Cr.jsx)(Jh,{session:x.session,className:"workspace-tab-logo"}):null,(0,Cr.jsx)("span",{className:x.titleGenerating?"title-generating":void 0,"aria-busy":x.titleGenerating||void 0,children:x.label})]}),closeIcon:(0,Cr.jsx)("span",{title:y?"\u5173\u95ED\u5E76\u5220\u9664\u4F1A\u8BDD":"\u5173\u95ED\u5DE5\u4F5C\u7A97\u53E3\uFF08\u5C06\u7ED3\u675F\u5E76\u5220\u9664\u5176\u4E2D\u4F1A\u8BDD\uFF09","aria-label":`${y?"\u5173\u95ED\u5E76\u5220\u9664\u4F1A\u8BDD":"\u5173\u95ED\u5DE5\u4F5C\u7A97\u53E3"} ${x.label}`,"aria-busy":l===x.id,"aria-disabled":l!=null,children:(0,Cr.jsx)(Fe,{name:"close",size:12})})})),onChange:o?void 0:x=>c?.(x),onTabClick:o?x=>c?.(x):void 0,onEdit:(x,k)=>{k==="remove"&&typeof x=="string"&&!l&&d?.(x)}})})}),(0,Cr.jsx)(Te,{kind:"ghost",type:"button",className:"workspace-tab-add",title:y?"\u5728\u5F53\u524D\u76EE\u5F55\u65B0\u5EFA Agent \u6216\u7A7A\u767D\u7EC8\u7AEF":"\u65B0\u5EFA Agent \u6216\u7A7A\u767D\u7EC8\u7AEF\uFF08\u5728\u540C\u4E00 worktree\uFF09","aria-label":"\u65B0\u5EFA Agent \u6216\u7A7A\u767D\u7EC8\u7AEF",onClick:p,children:(0,Cr.jsx)(Fe,{name:"plus",size:18})})]}),(0,Cr.jsx)("div",{className:"workbar-spacer"}),o?(0,Cr.jsxs)(Te,{kind:"ghost",className:"workspace-tab-move-hint",title:"\u9009\u62E9\u76EE\u6807\u7A97\u53E3 \xB7 Esc \u53D6\u6D88",onClick:h,children:[(0,Cr.jsx)(Fe,{name:"close",size:14}),(0,Cr.jsx)("span",{children:"\u9009\u62E9\u76EE\u6807 \xB7 Esc \u53D6\u6D88"})]}):null,v??(0,Cr.jsx)(M5e,{})]})}function T5e({mobile:e,taskName:t,session:r}){return(0,Cr.jsx)(zE,{mobile:e,taskName:t,activeWindowId:r.id,windows:[{id:r.id,label:Gp(r,0),status:r.status,count:1,session:r}]})}function j5e({mobile:e,session:t}){return(0,Cr.jsx)(zE,{mobile:e,variant:"standalone",taskName:"",activeWindowId:t.id,windows:[{id:t.id,label:Gp(t,0),status:t.status,count:1,session:t}]})}var b1=B(_(),1);function _5e(e,t,r){if(!t||t.source!=="wand"&&t.source!=="automation"||t.workspaceTaskId||t.archived)return null;let n=e.find(a=>a.standaloneSessions.some(o=>o.id===t.id));if(n){let a=Kp(n.standaloneSessions.filter(o=>{let l=r?.get(o.id);return!o.archived&&!o.teamChat&&!o.workspaceTaskId&&(!r||!!l)&&!l?.archived&&!l?.workspaceTaskId}));return a.some(o=>o.id===t.id)?{group:n,sessions:a}:null}return e.some(a=>a.archivedSessions?.some(o=>o.id===t.id)||a.tasks.some(o=>[...o.sessions,...o.archivedSessions??[]].some(l=>l.id===t.id)))?null:{group:null,sessions:[{id:t.id,title:t.title,cwd:t.cwd,status:t.status,provider:xu(t),sessionKind:t.kind,startedAt:t.startedAt}]}}var k6=B(Ee(),1);function P5e({fallback:e=null}={}){let t=ai(),r=Ci(),{groups:n,loading:a,reload:o}=pA(),l=t.selected,[c,d]=b1.useState(null),p=b1.useRef(!1),h=b1.useRef(null),g=h.current;g&&t.selected?.id!==g.ownerId&&(t.selected||t.sidebar.groups.some(F=>F.entries.some(C=>C.id===g.ownerId)))&&(g.navigatedAway=!0);let v=b1.useRef(t);v.current=t,b1.useEffect(()=>{l?.id&&!(a&&n.length===0)&&!n.some(F=>F.standaloneSessions.some(C=>C.id===l.id))&&o()},[l?.id,o]);let y=new Map(t.sidebar.groups.flatMap(F=>F.entries.map(C=>[C.id,C]))),w=_5e(n,l,y);if(!w||!l)return e;let x=w.sessions.map(F=>{let C=y.get(F.id);return{...Hb(F,C?.title),status:C?.status??F.status}}),k=w.group;return(0,k6.jsx)(c0,{children:(0,k6.jsx)(zE,{mobile:t.viewport.mobile,variant:"standalone",taskName:"",leading:(0,k6.jsx)(gK,{}),actions:(0,k6.jsx)(hK,{}),activeWindowId:l.id,closingWindowId:c,windows:x.map((F,C)=>({id:F.id,label:Gp(F,C),status:F.status,count:1,session:F,titleGenerating:F.id===l.id&&t.topbar.titleGenerating})),onSelectWindow:F=>{F!==l.id&&r({type:"session.select",id:F,focusInput:!1})},onCloseWindow:F=>{let C=Ga.getRuntime(),D=x.findIndex(A=>A.id===F);if(!C||p.current||D<0)return;p.current=!0;let S={ownerId:l.id,navigatedAway:!1};h.current=S,d(F),(async()=>{try{if(!await C.closeTaskSessions([F],"terminal"))return;let A=v.current;if(!S.navigatedAway&&l.id===F&&(!A.selected||A.selected.id===F)){let I=new Map(A.sidebar.groups.flatMap($=>$.entries.map(P=>[P.id,P]))),j=[...x.slice(D+1),...x.slice(0,D).reverse()].find($=>{let P=I.get($.id);return P&&!P.archived&&!P.workspaceTaskId});await r(j?{type:"session.select",id:j.id,focusInput:!1}:{type:"nav.home"})}await o()}catch(A){C.toast(A instanceof Error?A.message:"\u5173\u95ED\u4F1A\u8BDD\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002","danger")}finally{h.current=null,p.current=!1,d(null)}})()},onNewSession:()=>Ia.open({initialCwd:l.cwd||k?.workspaceCwd,workspaceId:k?!k.synthetic&&!k.global?k.workspaceId:void 0:l.workspaceId})})})}var yo=B(Ee(),1);function C6(){return Ga.getRuntime()}function N5e(e,t){return e!==null&&JSON.stringify(e)===JSON.stringify(t)}function O5e(e,t){let r=vo(e.layout),n=Oi(e.layout,e.activeTabId),a=n?.kind==="session"?n.sessionId:r[0],o=a?t.get(a):void 0,l=o?Gp(o.session,o.index):"\u5DE5\u4F5C\u7A97\u53E3";return{label:r.length>1?`${l} \xB7 ${r.length}`:l,status:o?.session.status,count:r.length,session:o?.session}}function R5e({fallback:e=null}={}){let t=$0.useSyncExternalStore(Wr.subscribe,Wr.getSnapshot,Wr.getServerSnapshot),r=ai(),n=Ci(),a=r.viewport.mobile,[o,l]=$0.useState(null),[c,d]=$0.useState(null),p=r.selected?.id??null,h=x7(t.taskId);$0.useEffect(()=>{l(null)},[t.taskId]),$0.useEffect(()=>{if(!o)return;let $=P=>{P.key==="Escape"&&l(null)};return window.addEventListener("keydown",$),()=>window.removeEventListener("keydown",$)},[o]);let g=new Map(r.sidebar.groups.flatMap($=>$.entries.map(P=>[P.id,P.title]))),v=Kp(h?.sessions??[]).map($=>Hb($,g.get($.id))),y=h?.cwd??t.cwd,w=v.map($=>$.id),x=t.layout??h?.layout??null,k=wu(x,w,p),F=new Map(v.map(($,P)=>[$.id,{session:$,index:P}]));if($0.useEffect(()=>{!t.taskId||!h||N5e(x,k)||C6()?.saveTaskLayout(k,{automatic:!0})},[x,t.taskId,h,k]),a)return e;if(!t.taskId)return(0,yo.jsx)(P5e,{fallback:e});if(k.windows.length===0)return e;let C=$=>{let P=C6();if(!P)return;if(o){let U=Oi($.layout,$.activeTabId),H=AD(k,o.sessionId,$.id,U?.id,o.dir);if(H!==k){P.saveTaskLayout(H);let q=Ss(H);q?.kind==="session"&&n({type:"session.select",id:q.sessionId})}l(null);return}let N=k2(k,$.id);P.saveTaskLayout(N);let R=Oi($.layout,$.activeTabId);R?.kind==="session"&&n({type:"session.select",id:R.sessionId,focusInput:!1})},D=$=>{let P=Ss(k);P?.kind!=="session"||k.windows.length<2||l({sessionId:P.sessionId,dir:$})},S=async $=>{let P=C6();if(!P||c)return;let N=vo($.layout);d($.id);try{if(!await P.closeTaskSessions(N,"window")||Wr.getSnapshot().taskId!==t.taskId)return;let R=C2(k,$.id);P.saveTaskLayout(R);let U=Ss(R);U?.kind==="session"&&n({type:"session.select",id:U.sessionId}),l(null),t.taskId&&bs.load(t.taskId).catch(()=>{}),P.toast(N.length>1?`\u5DF2\u5173\u95ED ${N.length} \u4E2A\u7EC8\u7AEF`:"\u5DF2\u5173\u95ED\u7EC8\u7AEF","success")}finally{d(null)}},A=()=>{C6()?.closeWorkspace(),n({type:"nav.home"})},I=()=>Ia.open({initialCwd:y,workspaceId:t.workspaceId||void 0,workspaceTaskId:t.taskId||void 0,taskName:t.taskName||void 0}),j=k.windows.find($=>$.id===k.activeWindowId);return(0,yo.jsx)(c0,{children:(0,yo.jsx)(zE,{mobile:a,taskName:t.taskName,activeWindowId:k.activeWindowId,windows:k.windows.map($=>({id:$.id,...O5e($,F),titleGenerating:vo($.layout).includes(p??"")&&r.topbar.titleGenerating,containsMoving:!!(o&&vo($.layout).includes(o.sessionId))})),movingDir:o?.dir,closingWindowId:c,onSelectWindow:$=>{let P=k.windows.find(N=>N.id===$);P&&C(P)},onCloseWindow:$=>{let P=k.windows.find(N=>N.id===$);P&&S(P)},onNewSession:I,onCancelMove:()=>l(null),leading:(0,yo.jsx)(gK,{}),actions:(0,yo.jsx)(hK,{windowActions:$=>(0,yo.jsxs)(yo.Fragment,{children:[k.windows.length>1&&(0,yo.jsxs)(yo.Fragment,{children:[(0,yo.jsx)(Ba,{icon:"splitHorizontal",onSelect:()=>{$(),D("h")},children:"\u79FB\u52A8\u5F53\u524D\u4F1A\u8BDD\u5E76\u5DE6\u53F3\u5206\u5C4F"}),(0,yo.jsx)(Ba,{icon:"splitVertical",onSelect:()=>{$(),D("v")},children:"\u79FB\u52A8\u5F53\u524D\u4F1A\u8BDD\u5E76\u4E0A\u4E0B\u5206\u5C4F"})]}),j&&(0,yo.jsx)(Ba,{icon:"close",disabled:c!==null,onSelect:()=>{$(),S(j)},children:"\u5173\u95ED\u5F53\u524D\u5DE5\u4F5C\u7A97\u53E3"}),(0,yo.jsx)(Ba,{icon:"back",onSelect:()=>{$(),A()},children:"\u9000\u51FA\u4EFB\u52A1\u6807\u7B7E\u7EC4"})]})})})})}function Q9(e){return typeof e=="string"?e.trim().replace(/^v/,"").split("+")[0]:""}function L5e(e,t){let r=e.previousInstanceId.trim(),n=Q9(e.expectedVersion),a=t.serverInstanceId.trim(),o=Q9(t.packageVersion||t.currentVersion),l=!r||a.length>0&&a!==r,c=!n||o===n;return{ready:l&&c,instanceReady:l,versionReady:c,currentInstanceId:a,currentVersion:o}}function z5e(e){return e.lastError?`\u670D\u52A1\u6682\u4E0D\u53EF\u7528\uFF0C\u6B63\u5728\u7EE7\u7EED\u7B49\u5F85\uFF08${e.attempts}/${e.maxAttempts}\uFF09\u2026`:e.attempts===0?e.mode==="auto-update"?"\u6B63\u5728\u7B49\u5F85\u66F4\u65B0\u5B8C\u6210\u5E76\u91CD\u542F\u670D\u52A1\u2026":"\u6B63\u5728\u7B49\u5F85\u670D\u52A1\u91CD\u65B0\u542F\u52A8\u2026":!e.readiness.instanceReady&&!e.readiness.versionReady?`\u6B63\u5728\u7B49\u5F85\u65B0\u670D\u52A1\u5B9E\u4F8B\u548C\u76EE\u6807\u7248\u672C\uFF08${e.attempts}/${e.maxAttempts}\uFF09\u2026`:e.readiness.instanceReady?e.readiness.versionReady?`\u6B63\u5728\u7B49\u5F85\u670D\u52A1\u5C31\u7EEA\uFF08${e.attempts}/${e.maxAttempts}\uFF09\u2026`:`\u65B0\u670D\u52A1\u5DF2\u542F\u52A8\uFF0C\u6B63\u5728\u7B49\u5F85\u7248\u672C ${e.target.expectedVersion||e.latestVersion||"\u76EE\u6807\u7248\u672C"}\uFF08${e.attempts}/${e.maxAttempts}\uFF09\u2026`:`\u76EE\u6807\u7248\u672C\u5DF2\u5C31\u7EEA\uFF0C\u6B63\u5728\u7B49\u5F85\u65B0\u670D\u52A1\u5B9E\u4F8B\uFF08${e.attempts}/${e.maxAttempts}\uFF09\u2026`}function rB(e){let t=e.mode==="auto-update",r=t?"\u81EA\u52A8\u66F4\u65B0\u4E2D":e.target.expectedVersion?"\u6B63\u5728\u5B8C\u6210\u66F4\u65B0":"\u670D\u52A1\u6B63\u5728\u91CD\u542F",n=t?`${e.currentVersion||"-"} \u2192 ${e.latestVersion||"-"}
|
|
236
|
-
\u6B63\u5728\u4E0B\u8F7D\u5E76\u5B89\u88C5\u65B0\u7248\u672C\uFF0C\u5B8C\u6210\u540E\u5C06\u81EA\u52A8\u91CD\u542F\u3002`:e.target.expectedVersion?"\u5B89\u88C5\u5B8C\u6210\u5E76\u542F\u52A8\u65B0\u7248\u672C\u540E\u5C06\u81EA\u52A8\u5237\u65B0\u9875\u9762\u3002":"\u670D\u52A1\u6062\u590D\u540E\u5C06\u81EA\u52A8\u5237\u65B0\u9875\u9762\u3002",a="";return e.phase==="checking"?a=`\u6B63\u5728\u68C0\u67E5\u670D\u52A1\u72B6\u6001\uFF08${e.attempts}/${e.maxAttempts}\uFF09\u2026`:e.phase==="ready"?a="\u65B0\u670D\u52A1\u548C\u76EE\u6807\u7248\u672C\u5747\u5DF2\u5C31\u7EEA\uFF0C\u6B63\u5728\u5237\u65B0\u9875\u9762\u2026":e.phase==="timed-out"?a=e.lastError||"\u7B49\u5F85\u670D\u52A1\u91CD\u542F\u8D85\u65F6\uFF0C\u8BF7\u624B\u52A8\u5237\u65B0\u9875\u9762\u3002":e.phase==="waiting"&&(a=z5e(e)),e.phase==="timed-out"&&(r=t||e.target.expectedVersion?"\u66F4\u65B0\u672A\u5B8C\u6210":"\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA",n="\u8BF7\u67E5\u770B\u5931\u8D25\u539F\u56E0\uFF0C\u624B\u52A8\u5237\u65B0\u540E\u6838\u5BF9\u670D\u52A1\u72B6\u6001\u3002"),{title:r,description:n,liveStatus:a}}function H5e(e){let t=ca(e)?e:{};return{serverInstanceId:Ge(t.serverInstanceId),packageVersion:Ge(t.packageVersion),currentVersion:Ge(t.currentVersion)}}var OV=class extends Error{constructor(e,t=0){super(e),oe(this,"status",t),this.name="RestartOverlayRepositoryError"}},q5e=class{constructor(e=(t,r)=>globalThis.fetch(t,r)){oe(this,"fetchImpl",e)}async loadConfig(e={}){let t=await this.fetchImpl("/api/config",{credentials:"same-origin",signal:e.signal}),r;try{r=await t.json()}catch{throw new OV(`\u670D\u52A1\u72B6\u6001\u54CD\u5E94\u65E0\u6548\uFF08HTTP ${t.status}\uFF09\u3002`,t.status)}let n=ca(r)?r:{};if(!t.ok||typeof n.error=="string")throw new OV(Ge(n.error)||`\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA\uFF08HTTP ${t.status}\uFF09\u3002`,t.status);let a=H5e(n);if(e.expectedVersion){let o=await this.fetchImpl("/api/update-status",{credentials:"same-origin",signal:e.signal,cache:"no-store"});if(o.ok){let l=await o.json();ca(l)&&l.version===e.expectedVersion&&ca(l.status)&&l.status.phase==="failed"&&(a.updateFailure=Ge(l.status.message)||"\u66F4\u65B0\u5931\u8D25\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5\u3002",mu("update_failed",new Error(a.updateFailure)))}}return a}},W5e=new q5e,nB=2e3,cE=180,V5e=nB,U5e=nB*cE;function RV(e=0){return{open:!1,mode:"restart",phase:"idle",currentVersion:"",latestVersion:"",target:{previousInstanceId:"",expectedVersion:""},attempts:0,maxAttempts:cE,readiness:{ready:!1,instanceReady:!1,versionReady:!1,currentInstanceId:"",currentVersion:""},lastError:"",revision:e}}function S6(e){return typeof e=="string"?e.trim():""}function K5e(e){let t=RV(),r=null,n=null,a=null,o=null,l=0,c=new Set;function d(S){t={...t,...S,revision:t.revision+1};for(let A of c)A()}function p(){r!==null&&(e.clock.clearInterval(r),r=null)}function h(){n!==null&&(e.clock.clearTimeout(n),n=null)}function g(){a!==null&&(e.clock.clearTimeout(a),a=null)}function v(S=new DOMException("Restart probe cancelled.","AbortError")){g();let A=o;o=null,A?.abort(S)}function y(){p(),h()}function w(){y(),v()}function x(S){S!==l||!t.open||t.phase==="ready"||t.phase==="timed-out"||(y(),v(),d({phase:"timed-out"}))}function k(S){d({phase:"timed-out",lastError:Np(S,"\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA\u3002")})}function F(){try{e.reloadPage()}catch(S){k(S)}}async function C(S){if(S!==l||!t.open||t.phase==="timed-out"||t.phase==="ready")return;o!==null&&v(new DOMException("Restart probe timed out.","TimeoutError"));let A=new AbortController;o=A;let I=t.attempts+1;d({phase:"checking",attempts:I,lastError:""});let j=()=>{},$=new Promise((N,R)=>{let U=()=>{j(),R(A.signal.reason instanceof Error?A.signal.reason:new DOMException("Restart probe cancelled.","AbortError"))};j=()=>A.signal.removeEventListener("abort",U),A.signal.addEventListener("abort",U,{once:!0})});a=e.clock.setTimeout(()=>{S!==l||o!==A||A.abort(new DOMException("Restart probe timed out.","TimeoutError"))},V5e);let P=!1;try{let N=await Promise.race([e.repository.loadConfig({signal:A.signal,expectedVersion:t.target.expectedVersion}),$]);if(A.signal.aborted||S!==l||o!==A||!t.open)return;if(N.updateFailure){y(),d({phase:"timed-out",lastError:N.updateFailure});return}let R=L5e(t.target,N);P=R.ready,d({phase:R.ready?"ready":"waiting",readiness:R,lastError:""}),R.ready&&(y(),F())}catch(N){if(S!==l||o!==A||!t.open)return;if(A.signal.aborted&&A.signal.reason instanceof DOMException){if(A.signal.reason.name!=="TimeoutError")return;d({phase:"waiting",lastError:"\u670D\u52A1\u72B6\u6001\u68C0\u67E5\u8D85\u65F6\uFF0C\u6B63\u5728\u91CD\u8BD5\u3002"})}else d({phase:"waiting",lastError:Np(N,"\u670D\u52A1\u5C1A\u672A\u5C31\u7EEA\u3002")})}finally{j(),o===A&&(g(),o=null)}!P&&S===l&&t.open&&I>=cE&&x(S)}function D(S,A,I,j,$){l+=1,w();let P={previousInstanceId:S6(j),expectedVersion:Q9($)};t={open:!0,mode:S,phase:"waiting",currentVersion:S6(A),latestVersion:S6(I),target:P,attempts:0,maxAttempts:cE,readiness:{ready:!1,instanceReady:!P.previousInstanceId,versionReady:!P.expectedVersion,currentInstanceId:"",currentVersion:""},lastError:"",revision:t.revision+1};for(let R of c)R();let N=l;r=e.clock.setInterval(()=>{C(N)},nB),n=e.clock.setTimeout(()=>x(N),U5e)}return{showRestart(S,A){D("restart","",S6(A),S,A)},showAutoUpdate(S,A,I){D("auto-update",S,A,I,A)},manualRefresh(){t.open&&F()},isOpen(){return t.open},subscribe(S){return c.add(S),()=>c.delete(S)},getSnapshot(){return t},dispose(){if(l+=1,w(),!(!t.open&&t.phase==="idle")){t=RV(t.revision+1);for(let S of c)S()}}}}var G5e={setInterval(e,t){return globalThis.setInterval(()=>{e()},t)},clearInterval(e){globalThis.clearInterval(e)},setTimeout(e,t){return globalThis.setTimeout(()=>{e()},t)},clearTimeout(e){globalThis.clearTimeout(e)}},Il=K5e({repository:W5e,clock:G5e,reloadPage:()=>globalThis.location.reload()});function X5e(e,t){Il.showRestart(e,t)}function Y5e(e,t,r){Il.showAutoUpdate(e,t,r)}var kr=B(Ee(),1),Q5e=Vh(()=>globalThis.__wandImportBrowserModule("5efc2e6b76e3291b").then(e=>e.ConversationHome),{title:"\u804A\u5929"}),Z5e=Vh(()=>globalThis.__wandImportBrowserModule("fcc0972fcce206cc").then(e=>e.WorkspaceWindow),{title:"\u5206\u5C4F\u7EC8\u7AEF",renderPending:e=>(0,kr.jsx)("div",{className:"workspace-window",style:{flex:1,minHeight:0,minWidth:0},children:e})}),J5e=zn(()=>globalThis.__wandImportBrowserModule("7a48036819d5122b").then(e=>e.ScheduledTasksPage),gl,(e,t)=>e.open&&(e.page==="schedules"||e.page==="calendar")&&t.visible,{title:"\u5B9A\u65F6",page:!0,close:()=>En.close()});function exe(e){return{terminal:`terminal-container ${e.terminal?"active":"hidden"}`,chat:`chat-container ${e.chat?"active":"hidden"}`,blank:`blank-chat${e.blank?"":" hidden"}`,composer:`input-panel${e.composer?"":" hidden"}`}}function txe({className:e,queueRef:t,workspaceTask:r,workspaceProject:n}){return(0,kr.jsxs)(Xe,{vertical:!0,id:"blank-chat",className:e,style:{flex:1,minHeight:0,overflow:"auto",padding:24,position:"relative",display:e.includes("hidden")?"none":void 0},children:[(0,kr.jsx)("div",{className:"blank-chat-attention",children:(0,kr.jsx)(o5e,{})}),(0,kr.jsxs)(Xe,{vertical:!0,align:"center",justify:"center",gap:"middle",style:{flex:1},children:[(0,kr.jsx)(Sp,{style:{width:48,height:48}}),(0,kr.jsx)(Pt.Title,{level:2,children:r?.taskName||n?.workspaceName||"\u5F00\u59CB\u65B0\u7684\u5DE5\u4F5C"}),(0,kr.jsx)(Te,{id:"welcome-new-work",kind:"primary",onClick:()=>Ia.open({initialCwd:r?.cwd||n?.cwd,workspaceId:r?.workspaceId||n?.workspaceId,workspaceTaskId:r?.taskId,taskName:r?.taskName}),children:"\u65B0\u5EFA\u5DE5\u4F5C"})]}),(0,kr.jsx)("div",{id:"cross-session-queue-host",ref:t})]})}function rxe({legacyRefs:e}={}){let t=v1.useSyncExternalStore(Qc.subscribe,Qc.getSnapshot,Qc.getSnapshot),r=v1.useSyncExternalStore(Fa.subscribe,Fa.getSnapshot,Fa.getSnapshot),n=ai(),a=p0(),o=Ci(),l=v1.useSyncExternalStore(gl.subscribe,gl.getSnapshot,gl.getSnapshot),c=exe(n.legacyVisibility),d=v1.useSyncExternalStore(Wr.subscribe,Wr.getSnapshot,Wr.getServerSnapshot),p=!!d.taskId&&Up(d.layout)?.layout.type==="split",h=v1.useSyncExternalStore(pl.subscribe,pl.getSnapshot,pl.getSnapshot),g=!h.open&&!r.open&&!l.open&&!t.open&&(a.active===!0||a.active===null&&!p&&!n.selected&&!d.workspaceId),v=h.open||r.open||g||l.open||t.open;return(0,kr.jsxs)(Xe,{component:"main",vertical:!0,inert:n.layout.sessionsBackdropVisible,className:`main-content${n.layout.filePanelOpen&&!r.open?" file-panel-open":""}${p?" main-content-in-split":""}${g?" main-content-conversation":""}${l.open?" task-board-main-content":""}${v?" main-content-page-layer":""}`,style:{flex:1,minWidth:0,minHeight:0,position:"relative",overflow:"hidden"},children:[!v&&(0,kr.jsx)(R5e,{fallback:(0,kr.jsx)($5e,{})}),h.open&&!r.open&&(0,kr.jsx)(cA,{}),(0,kr.jsx)(d4,{explorerRef:e?.fileExplorer,suspended:r.open||h.open}),(0,kr.jsx)("div",{id:"output",inert:v,className:c.terminal,ref:e?.terminal,style:{flex:1,minHeight:0,position:"relative",overflow:"hidden",display:n.legacyVisibility.terminal&&!p?"flex":"none"}}),(0,kr.jsx)("div",{id:"chat-output",inert:v,className:c.chat,ref:e?.chat,style:{flex:1,minHeight:0,position:"relative",overflow:"hidden",display:n.legacyVisibility.chat&&!p?"flex":"none",flexDirection:"column"}}),(0,kr.jsx)(txe,{className:`${c.blank}${p||h.open||g||r.open?" hidden":""}`,queueRef:e?.crossSessionQueue,workspaceTask:d.taskId&&d.workspaceId?{workspaceId:d.workspaceId,workspaceName:d.workspaceName,taskId:d.taskId,taskName:d.taskName,cwd:d.cwd}:void 0,workspaceProject:!d.taskId&&d.workspaceId?{workspaceId:d.workspaceId,workspaceName:d.workspaceName,cwd:d.cwd}:void 0}),(0,kr.jsx)("div",{inert:v,className:c.composer,ref:e?.composer,style:{flexShrink:0,position:"relative",display:n.legacyVisibility.composer&&!p?void 0:"none"}}),p?(0,kr.jsx)("div",{style:{display:"contents"},inert:h.open||g||r.open,"aria-hidden":h.open||g||r.open,children:(0,kr.jsx)(Z5e,{})}):null,(0,kr.jsx)("div",{style:{display:"contents",visibility:r.open?"hidden":void 0},inert:r.open,"aria-hidden":r.open,children:(0,kr.jsx)(Lwe,{})}),(0,kr.jsx)(Q5e,{enabled:g,visible:g,sidebarOpen:n.layout.sessionsDrawerOpen,onOpenSidebar:n.layout.sidebarDrawer?()=>{o({type:"layout.drawer.toggle"})}:void 0,onOpenSession:Lp}),(0,kr.jsxs)("div",{style:{display:"contents",visibility:r.open?"hidden":void 0},inert:r.open,"aria-hidden":r.open,children:[l.open&&l.page==="teamchat"?(0,kr.jsx)(oA,{runId:l.runId,sidebarOpen:n.layout.sessionsDrawerOpen,onBack:()=>En.close(),onOpenSidebar:n.layout.sidebarDrawer?()=>{o({type:"layout.drawer.toggle"})}:void 0,onOpenSession:Lp}):l.open&&l.page==="teams"?(0,kr.jsx)(iA,{sidebarOpen:n.layout.sessionsDrawerOpen,onBack:()=>En.close(),onOpenSidebar:n.layout.sidebarDrawer?()=>{o({type:"layout.drawer.toggle"})}:void 0,onOpenSession:Lp}):l.open&&l.page==="board"?(0,kr.jsx)(zwe,{sidebarOpen:n.layout.sessionsDrawerOpen,onBack:()=>En.close(),onOpenSidebar:n.layout.sidebarDrawer?()=>{o({type:"layout.drawer.toggle"})}:void 0,onOpenSession:Lp}):null,(0,kr.jsx)(J5e,{visible:l.open&&(l.page==="schedules"||l.page==="calendar")&&!r.open,view:l.page==="calendar"?"calendar":"list",calendarMode:l.calendarRange,onViewChange:y=>En.open("","",y==="calendar"?"calendar":"schedules"),onCalendarModeChange:y=>En.calendarRange(y),sidebarOpen:n.layout.sessionsDrawerOpen,onBack:()=>En.close(),onOpenSidebar:n.layout.sidebarDrawer?()=>{o({type:"layout.drawer.toggle"})}:void 0,onOpenSession:Lp})]}),(0,kr.jsx)(uA.Provider,{value:!0,children:(0,kr.jsx)(Hwe,{})}),(0,kr.jsx)(LE,{showRestart:Il.showRestart})]})}var Mr=B(_(),1),LV=B(er(),1),Z9=null;function nxe(e){Z9=e}function Du(){if(!Z9)throw new Error("\u7EC8\u7AEF\u8FD0\u884C\u65F6\u672A\u5C31\u7EEA\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002");return Z9}function axe(){Ca("wand-quick-terminal",`
|
|
237
|
-
.quick-terminal-workspace { min-width:0; min-height:0; }
|
|
238
|
-
.quick-terminal-toolbar .wand-ui-icon-button { flex:none; }
|
|
239
|
-
.quick-terminal-split > .ant-splitter-panel { overflow:hidden; min-width:0; min-height:0; }
|
|
240
|
-
.quick-terminal-split[data-dragging="false"] > .ant-splitter-panel { transition:flex-basis var(--motion-normal) var(--ease-out-expo); }
|
|
241
|
-
.quick-terminal-panel { opacity:0; transition:opacity var(--motion-quick-exit) var(--ease-in-out-smooth); }
|
|
242
|
-
.quick-terminal-panel[data-open="true"] { opacity:1; transition-duration:var(--motion-normal); }
|
|
243
|
-
.quick-terminal-surface .pooled-terminal-wrap { width:100%; height:100%; overflow:hidden; }
|
|
244
|
-
@media(prefers-reduced-motion:reduce) { .quick-terminal-split > .ant-splitter-panel,.quick-terminal-panel { transition:none !important; } }
|
|
245
|
-
`)}var aB="wand.quick-terminal.v1";function ixe(e){return e==="bottom"?"bottom":"right"}function zV(e){try{let t=JSON.parse(e.getItem(aB)||"{}");return{dock:ixe(t?.dock),sessionId:typeof t?.sessionId=="string"?t.sessionId:"",...t?.creationPending===!0?{creationPending:!0}:{}}}catch{return{dock:"right",sessionId:""}}}function oxe(e,t){try{return e.setItem(aB,JSON.stringify(t)),!0}catch{return!1}}async function sxe(e){return typeof navigator<"u"&&navigator.locks?navigator.locks.request(aB,e):e()}async function HV(e,t,r=fetch){let n=await r(e?`/api/sessions/${encodeURIComponent(e)}`:"/api/sessions",e?{credentials:"same-origin"}:{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({kind:"pty",shell:!0,cwd:t||"~",sessionSource:"interactive"})});if(!n.ok)throw new Error(e?"\u65E0\u6CD5\u8FDE\u63A5\u539F\u7EC8\u7AEF\u3002\u8BF7\u68C0\u67E5\u8FDE\u63A5\u6216\u5728\u4F1A\u8BDD\u5217\u8868\u4E2D\u786E\u8BA4\u5B83\u662F\u5426\u5DF2\u7ED3\u675F\uFF1B\u4E0D\u4F1A\u81EA\u52A8\u65B0\u5EFA\u8FDB\u7A0B\u3002":"\u521B\u5EFA\u7EC8\u7AEF\u672A\u786E\u8BA4\u3002\u8BF7\u5148\u5728\u4F1A\u8BDD\u5217\u8868\u4E2D\u68C0\u67E5\uFF0C\u907F\u514D\u91CD\u590D\u521B\u5EFA\u3002\u5237\u65B0\u9875\u9762\u4E0D\u4F1A\u81EA\u52A8\u91CD\u8BD5\u3002");let a=await n.json();if(!a||typeof a.id!="string"||!a.id||a.sessionKind!=="pty"||a.provider)throw new Error("\u7EC8\u7AEF\u54CD\u5E94\u65E0\u6548\uFF0C\u8BF7\u5728\u4F1A\u8BDD\u5217\u8868\u4E2D\u786E\u8BA4\uFF1B\u4E0D\u4F1A\u81EA\u52A8\u91CD\u590D\u521B\u5EFA\u3002");return{id:a.id,cwd:typeof a.cwd=="string"?a.cwd:t,status:a.status}}var ur=B(Ee(),1);function k9({host:e}){let t=Mr.useCallback(r=>{r&&r.appendChild(e)},[e]);return(0,ur.jsx)("div",{ref:t,style:{width:"100%",height:"100%",minWidth:0,minHeight:0,overflow:"hidden"}})}function lxe({children:e}){return typeof document>"u"?(0,ur.jsx)(ur.Fragment,{children:e}):(0,ur.jsx)(uxe,{children:e})}function uxe({children:e}){let t=ai(),[r,n]=Mr.useState(()=>{try{return zV(localStorage)}catch{return{dock:"right",sessionId:""}}}),a=Mr.useRef(r),[o,l]=Mr.useState(!1),[c,d]=Mr.useState(!1),[p,h]=Mr.useState(!1),[g,v]=Mr.useState(""),[y,w]=Mr.useState("\u672A\u8FDE\u63A5"),[x,k]=Mr.useState(r.creationPending?"\u4E0A\u6B21\u521B\u5EFA\u7EC8\u7AEF\u672A\u786E\u8BA4\uFF0C\u8BF7\u5148\u5728\u4F1A\u8BDD\u5217\u8868\u68C0\u67E5\uFF1B\u4E0D\u4F1A\u91CD\u590D\u521B\u5EFA\u3002":""),[F,C]=Mr.useState(!1),[D,S]=Mr.useState(!1),[A,I]=Mr.useState(null),[j,$]=Mr.useState(!1),[P,N]=Mr.useState(()=>new Set),R=Mr.useCallback(ue=>(N(ae=>new Set(ae).add(ue)),()=>N(ae=>{let he=new Set(ae);return he.delete(ue),he})),[]),U=P.size>0,H=Mr.useRef(null),q=Mr.useRef(null),L=Mr.useRef(""),O=Mr.useRef(!1),W=Mr.useRef(!1),[z]=Mr.useState(()=>document.createElement("div")),[Y]=Mr.useState(()=>document.createElement("div")),[G]=Mr.useState(()=>document.createElement("div")),Z=Mr.useRef(null),T=ue=>{a.current=ue,n(ue);let ae=!1;try{ae=oxe(localStorage,ue)}catch{}C(!ae)};Mr.useLayoutEffect(()=>{axe(),z.style.width="100%";for(let ae of[Y,G])Object.assign(ae.style,{width:"100%",height:"100%",minWidth:"0",minHeight:"0",display:"flex",flexDirection:"column"});let ue=new ResizeObserver(ae=>S(ae[0].contentRect.width<680));return H.current&&ue.observe(H.current),()=>ue.disconnect()},[z,Y,G]);let V=Mr.useCallback(()=>{if(!W.current||!L.current)return;let ue=document.activeElement;(ue===q.current||ue===document.body||G.contains(ue))&&Du().focus(L.current),W.current=!1},[G]);Mr.useLayoutEffect(()=>{o&&V()},[o,V]),Mr.useEffect(()=>Du().observe(ue=>{if(!(!L.current||ue.sessionId&&ue.sessionId!==L.current))if(ue.type==="init"){let ae=["stopped","exited","failed"].includes(ue.data?.status||"");w(ae?"\u8FDB\u7A0B\u5DF2\u7ED3\u675F":"\u5DF2\u8FDE\u63A5"),k(""),ue.data?.cwd&&v(ue.data.cwd),ae||V()}else ue.type==="disconnected"?w("\u5DF2\u65AD\u5F00 \xB7 \u81EA\u52A8\u91CD\u8FDE\u4E2D"):ue.type==="connected"||ue.type==="resync_required"?w("\u8FDE\u63A5\u4E2D"):ue.type==="pty_error"||ue.type==="error"?(w("\u8FDE\u63A5\u5F02\u5E38"),k("\u7EC8\u7AEF\u64CD\u4F5C\u672A\u786E\u8BA4\uFF0C\u8BF7\u68C0\u67E5\u8F93\u51FA\u540E\u91CD\u65B0\u8FDE\u63A5\uFF1B\u4E0D\u4F1A\u81EA\u52A8\u91CD\u53D1\u8F93\u5165\u3002")):(ue.type==="ended"||ue.type==="status"&&["stopped","exited","failed"].includes(ue.data?.status||""))&&w("\u8FDB\u7A0B\u5DF2\u7ED3\u675F")}),[V]),Mr.useEffect(()=>()=>{L.current&&(Du().retain(L.current,!1),Du().dispose(L.current))},[]);let X=async()=>{if(l(!0),d(!1),W.current=!0,L.current){o&&V();return}if(!O.current){O.current=!0,h(!0),w("\u8FDE\u63A5\u4E2D");try{let ue=Wr.getSnapshot(),ae=t.selected?.worktree?.path||ue.cwd||t.selected?.cwd||"~",he=await sxe(async()=>{let le=a.current;try{let we=zV(localStorage);(we.sessionId||we.creationPending)&&(le=we)}catch{}if(!le.sessionId&&le.creationPending)throw new Error("\u4E0A\u6B21\u521B\u5EFA\u7EC8\u7AEF\u672A\u786E\u8BA4\uFF0C\u8BF7\u5148\u5728\u4F1A\u8BDD\u5217\u8868\u68C0\u67E5\uFF1B\u4E0D\u4F1A\u91CD\u590D\u521B\u5EFA\u3002");le.sessionId||T({...le,creationPending:!0});let fe=await HV(le.sessionId,ae);return T({dock:a.current.dock,sessionId:fe.id}),fe});if(L.current=he.id,v(he.cwd),await Yc(),!Z.current)throw new Error("\u7EC8\u7AEF\u5BB9\u5668\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u91CD\u65B0\u8FDE\u63A5\u3002");if(Du().retain(he.id,!0),!Du().mount(he.id,Z.current))throw new Error("\u7EC8\u7AEF\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u8FDE\u63A5\u3002")}catch(ue){w("\u8FDE\u63A5\u5931\u8D25"),k(ue instanceof Error?ue.message:"\u7EC8\u7AEF\u8FDE\u63A5\u5931\u8D25")}finally{O.current=!1,h(!1)}}},Q=()=>{W.current=!1,d(!1),l(!1),q.current?.focus({preventScroll:!0})},re=D?"bottom":r.dock,J=ue=>{T({...r,dock:ue}),I(null)},se=async()=>{if(!L.current)if(r.sessionId)try{let ue=await HV(r.sessionId,"~");L.current=ue.id,v(ue.cwd),Du().retain(ue.id,!0)}catch{k("\u539F\u7EC8\u7AEF\u6682\u4E0D\u53EF\u7528\uFF0C\u8BF7\u68C0\u67E5\u8FDE\u63A5\u6216\u5728\u4F1A\u8BDD\u5217\u8868\u786E\u8BA4\uFF1B\u4E0D\u4F1A\u81EA\u52A8\u65B0\u5EFA\u3002");return}else{k("\u8BF7\u5148\u5728\u4F1A\u8BDD\u5217\u8868\u786E\u8BA4\u539F\u7EC8\u7AEF\uFF0C\u907F\u514D\u91CD\u590D\u521B\u5EFA\u8FDB\u7A0B\u3002");return}try{await Yc(),Z.current&&Du().mount(L.current,Z.current),Du().reconnect(L.current),w("\u8FDE\u63A5\u4E2D"),k("")}catch{k("\u7EC8\u7AEF\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u8FDE\u63A5\u3002")}};return(0,ur.jsx)(Jb.Provider,{value:{open:o,show:()=>{X()},trigger:q,chromeHost:z,registerChrome:R},children:(0,ur.jsxs)(Xe,{vertical:!0,ref:H,className:"quick-terminal-workspace",style:{flex:1,minWidth:0,minHeight:0,overflow:"hidden"},children:[(0,ur.jsxs)(Xe,{align:"center",justify:"end",className:"quick-terminal-toolbar",style:{padding:U?0:"2px var(--wand-page-inset, 20px)",borderBottom:U?void 0:"1px solid var(--border-subtle)",flexShrink:0},children:[(0,ur.jsx)("div",{style:{width:"100%",display:U?void 0:"none"},children:(0,ur.jsx)(k9,{host:z})}),!U&&(0,ur.jsx)(d0,{})]}),(0,ur.jsxs)(Sb,{orientation:re==="right"?"horizontal":"vertical",className:"quick-terminal-split","data-dragging":j,onResizeStart:()=>$(!0),onResizeEnd:()=>$(!1),style:{flex:1,minHeight:0,minWidth:0},onResize:ue=>{let ae=ue[0]+ue[1];o&&ae&&I(ue[1]/ae*100)},children:[(0,ur.jsx)(Sb.Panel,{min:o?"20%":0,size:o?`${100-(A??(re==="right"?40:35))}%`:"100%",children:(0,ur.jsx)(k9,{host:Y})}),(0,ur.jsx)(Sb.Panel,{min:o?"25%":0,max:"70%",size:o?`${A??(re==="right"?40:35)}%`:0,resizable:o,children:(0,ur.jsx)(k9,{host:G})})]},re),(0,LV.createPortal)(e,Y),(0,LV.createPortal)((0,ur.jsxs)("section",{id:"quick-terminal-panel","aria-label":"\u5FEB\u6377\u7EC8\u7AEF","aria-hidden":!o,inert:!o,className:"quick-terminal-panel","data-open":o,"data-dock":re,style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0,minWidth:0,overflow:"hidden",background:"var(--bg-primary)"},children:[(0,ur.jsxs)(Xe,{align:"center",gap:8,wrap:!0,style:{padding:"6px 8px",flexShrink:0,borderBottom:"1px solid var(--border-subtle)"},children:[(0,ur.jsx)(Pt.Text,{strong:!0,children:"\u7EC8\u7AEF"}),(0,ur.jsx)(Pt.Text,{type:"secondary",role:"status",children:p?"\u8FDE\u63A5\u4E2D":y}),(0,ur.jsx)(Pt.Text,{ellipsis:{tooltip:g||"\u670D\u52A1\u7AEF\u4E3B\u76EE\u5F55"},title:g||"\u670D\u52A1\u7AEF\u4E3B\u76EE\u5F55",style:{flex:"1 1 100px",minWidth:0},children:g||"\u670D\u52A1\u7AEF\u4E3B\u76EE\u5F55"}),(0,ur.jsxs)(Yh,{open:c&&o,onOpenChange:d,children:[(0,ur.jsx)(Hp,{render:(0,ur.jsxs)(Te,{kind:"ghost","aria-label":`\u505C\u9760\u4F4D\u7F6E\uFF1A${r.dock==="right"?"\u53F3\u4FA7":"\u5E95\u90E8"}`,children:["\u505C\u9760\u4F4D\u7F6E\uFF1A",r.dock==="right"?"\u53F3\u4FA7":"\u5E95\u90E8"]})}),(0,ur.jsxs)(qp,{"aria-label":"\u505C\u9760\u4F4D\u7F6E",align:"end",children:[(0,ur.jsx)(Ba,{onSelect:()=>J("right"),hint:r.dock==="right"?"\u5DF2\u9009":void 0,children:"\u53F3\u4FA7"}),(0,ur.jsx)(Ba,{onSelect:()=>J("bottom"),hint:r.dock==="bottom"?"\u5DF2\u9009":void 0,children:"\u5E95\u90E8"})]})]}),(0,ur.jsx)(Er,{"aria-label":"\u5173\u95ED\u7EC8\u7AEF\u9762\u677F",title:"\u4EC5\u9690\u85CF\u9762\u677F\uFF0C\u547D\u4EE4\u7EE7\u7EED\u8FD0\u884C\uFF1B\u7ED3\u675F shell \u8BF7\u5728\u7EC8\u7AEF\u8F93\u5165 exit",onClick:Q,children:(0,ur.jsx)(Fe,{name:"close",size:16})})]}),(0,ur.jsxs)(Pt.Text,{type:"secondary",style:{padding:"2px 8px",fontSize:12},children:["Wand / PTY \u4E3B\u673A \xB7 \u5173\u95ED\u4EC5\u9690\u85CF \xB7 \u7ED3\u675F shell \u8F93\u5165 exit",D&&r.dock==="right"?" \xB7 \u7A84\u7A97\u4E34\u65F6\u5E95\u90E8\u663E\u793A":""]}),F&&(0,ur.jsx)(za,{type:"warning",title:"\u672C\u9875\u5DF2\u5E94\u7528\uFF0C\u4F46\u5BA2\u6237\u7AEF\u5B58\u50A8\u4E0D\u53EF\u7528\uFF0C\u5237\u65B0\u540E\u53EF\u80FD\u65E0\u6CD5\u6062\u590D\u4F4D\u7F6E\u6216\u7EC8\u7AEF\u3002"}),x&&(0,ur.jsx)(za,{type:"error",title:x,action:L.current||r.sessionId?(0,ur.jsx)(Te,{onClick:()=>{se()},children:"\u91CD\u65B0\u8FDE\u63A5"}):void 0}),!x&&y!=="\u5DF2\u8FDE\u63A5"&&y!=="\u8FDB\u7A0B\u5DF2\u7ED3\u675F"&&L.current&&(0,ur.jsx)(Te,{kind:"ghost",onClick:()=>{se()},children:"\u91CD\u65B0\u8FDE\u63A5\u539F\u7EC8\u7AEF"}),(0,ur.jsx)("div",{ref:Z,className:"quick-terminal-surface",style:{flex:1,minWidth:0,minHeight:0,position:"relative",overflow:"hidden"}})]}),G)]})})}var Zo=B(Ee(),1),cxe=zn(()=>globalThis.__wandImportBrowserModule("6ed5e5176549288a").then(e=>e.EmployeeProfileHost),u7,e=>e!==null,{title:"\u5458\u5DE5\u8D44\u6599",close:()=>Eb.close(),renderPending:()=>(0,Zo.jsx)(Zo.Fragment,{})});function dxe(e){let t=["main-layout"];return e.sessionsDrawerOpen&&t.push("sidebar-open"),e.sidebarAnchored&&t.push("sidebar-pinned"),e.sidebarPinned&&e.sidebarCollapsed&&t.push("sidebar-collapsed"),t.join(" ")}function pxe({legacyRefs:e}={}){let t=ai();return(0,Zo.jsxs)(uE,{className:"app-container",style:{position:"fixed",top:"calc(var(--app-viewport-top, 0px) + var(--conversation-frame-top, 0px))",left:"var(--conversation-frame-inline, 0px)",right:"var(--conversation-frame-inline, 0px)",height:"calc(var(--app-viewport-height, 100dvh) - var(--conversation-frame-top, 0px) - var(--conversation-frame-bottom, 0px))",overflow:"hidden",paddingTop:"var(--wand-safe-top, 0px)",paddingBottom:"var(--wand-safe-bottom, 0px)"},children:[(0,Zo.jsx)(Mwe,{}),(0,Zo.jsxs)(uE,{hasSider:!0,className:dxe(t.layout.sidebarDrawer?{...t.layout,sidebarAnchored:!1,sidebarCollapsed:!1}:t.layout),style:{flex:1,minHeight:0},children:[(0,Zo.jsx)(D5e,{}),(0,Zo.jsx)(lxe,{children:(0,Zo.jsx)(rxe,{legacyRefs:e})}),(0,Zo.jsx)(cxe,{mobile:t.viewport.mobile})]})]})}function fxe({store:e,legacyRefs:t}){return Awe.useLayoutEffect(()=>z2(),[]),(0,Zo.jsx)(La,{children:(0,Zo.jsx)(S8,{store:e,children:(0,Zo.jsx)(pxe,{legacyRefs:t})})})}var mxe="wand-automation-sessions-expanded",hxe="wand-non-wand-sessions-expanded",J9=new Set;function ja(e){for(let t of[...J9])t(e)}function vK(){let e=typeof WandNative>"u"?void 0:WandNative;return{width:window.innerWidth,height:window.innerHeight,coarsePointer:typeof window.matchMedia=="function"&&window.matchMedia("(pointer: coarse)").matches,online:navigator.onLine,embedTerminal:document.documentElement.classList.contains("is-wand-embed-terminal"),nativeInput:!!(window.__wandImeNative||window.__wandIosNative),backToNative:typeof e?.backToNative=="function",switchServer:typeof e?.switchServer=="function",automationExpanded:O1(mxe,!1),historyExpanded:O1(hxe,!1)}}function gxe(e){J9.add(e);let t=()=>e("viewport:resize"),r=()=>e("network:online"),n=()=>e("network:offline");return window.addEventListener("resize",t),window.addEventListener("online",r),window.addEventListener("offline",n),()=>{J9.delete(e),window.removeEventListener("resize",t),window.removeEventListener("online",r),window.removeEventListener("offline",n)}}function vxe(e,t={}){return new vwe({readSnapshot:()=>QU(m,vK()),applyAction:r=>Fwe(e,r),subscribeLegacy:gxe,batchMs:t.batchMs,freezeSnapshots:t.freezeSnapshots})}function bK(e){return e?.sessionKind==="structured"&&e.provider==="pi"}function iB(){let e=m.sessions.find(l=>l.id===m.selectedId),t=document.querySelector("[data-pi-settings-host]"),r=document.querySelector("[data-pi-settings-toggle-host]"),n=document.getElementById("input-box");if(!t||!r||!n||!bK(e)||m.terminalInteractive){Gn.clear();return}let a=n.value,o=Gn.isExpanded(e.id)||Xg(a)&&!m.composerComposing&&!Gn.isDismissed(e.id,a);Gn.sync([{key:"pi-settings",target:t,toggleTarget:r,sessionId:e.id,draft:a,open:o,onSaved:(l,c)=>{let d=m.sessions.find(p=>p.id===l);d&&(d.piSettings=c,ja("pi-settings"))},returnFocus:()=>{if(m.selectedId===e.id){if(Gn.openedBy()==="toggle"){r.querySelector("button")?.focus();return}n.focus()}}}])}function bxe(e,t){return!bK(t)||m.terminalInteractive?!1:Xg(e)?(iB(),Gn.reopen(),Gn.focusControl(),!0):(Gn.dismiss(),!1)}function yxe(e){let t=Gn.getSnapshot().mounts[0];return!t||!t.open||e.isComposing||e.keyCode===229?!1:e.key==="Escape"?(e.preventDefault(),e.stopPropagation(),Gn.dismiss(),t.returnFocus(),!0):Gn.openedBy()==="toggle"&&!Xg(t.draft)?!1:(e.key==="ArrowDown"||e.key==="ArrowUp"||e.key==="Enter")&&!e.shiftKey?(e.preventDefault(),e.stopPropagation(),Gn.focusControl(e.key==="ArrowUp"),!0):!1}var qV=Object.freeze({mode:"shortcuts",ctrl:!1,shift:!1,open:!1}),B0=new Map,C9=new Set,Za={read(e){return e?B0.get(e)??qV:qV},subscribe(e){return C9.add(e),()=>{C9.delete(e)}},update(e,t){if(!e)return;let r=this.read(e),n={...r,...t};if(!(n.mode===r.mode&&n.ctrl===r.ctrl&&n.shift===r.shift&&n.open===r.open)){B0.delete(e),B0.set(e,Object.freeze(n)),B0.size>128&&B0.delete(B0.keys().next().value);for(let a of C9)a()}},toggle(e,t){this.update(e,{[t]:!this.read(e)[t]})}};function J1(e,t){let r=Za.read(e);return{ctrl:t.ctrl||r.ctrl,shift:t.shift||r.shift,alt:t.alt}}function HE(e,t){let{ctrl:r,shift:n,alt:a}=t;if(!r&&!n&&!a)return null;let o=1+(n?1:0)+(a?2:0)+(r?4:0),l={up:"A",down:"B",right:"C",left:"D",home:"H",end:"F"}[e];if(l)return`\x1B[1;${o}${l}`;let c={insert:2,delete:3,pageup:5,pagedown:6}[e];if(c)return`\x1B[${c};${o}~`;if(e==="tab"&&n)return"\x1B[Z";if(e.length!==1)return null;let d=n?e.toUpperCase():e;if(r){let p=d.toLowerCase();if(p>="a"&&p<="z")return String.fromCharCode(p.charCodeAt(0)-96);let h={" ":0,"@":0,"[":27,"\\":28,"]":29,"^":30,_:31};return h[d]===void 0?null:String.fromCharCode(h[d])}return a?"\x1B"+d:d}function wxe(e,t,r){return t?.inputType!=="insertText"||t.data!==e||e.length!==1||e.charCodeAt(0)>127?null:HE(e,r)}function xxe(){let e=new Map;return{begin(t){let r=new Map;return e.set(t,r),{isCurrent:()=>e.get(t)===r,changed:n=>r.has(n),merge(n,a){let o={...n};if(a)for(let l of r.get(n.id)??[])l in a?o[l]=a[l]:delete o[l];return o},finish(){e.get(t)===r&&e.delete(t)}}},record(t){for(let r of e.values()){let n=r.get(t.id);n||r.set(t.id,n=new Set);for(let a of Object.keys(t))a!=="id"&&n.add(a);if("messages"in t)for(let a of["messages","messageOffset","messageTotal","leadingBlockOffset","leadingBlockTotal"])n.add(a);("permissionBlocked"in t||"pendingEscalation"in t)&&(n.add("permissionBlocked"),n.add("pendingEscalation"))}},reset(){e.clear()}}}function ei(e,t){return e instanceof Error?e.message:t??String(e)}var K6=new Map;function Exe(e){for(let t of K6.get(e)??[])t()}function kxe(e,t=400){return new Promise(r=>{let n=K6.get(e)??new Set;K6.set(e,n);let a=c=>{clearTimeout(l),n.delete(o),n.size||K6.delete(e),r(c)},o=()=>a(!0),l=setTimeout(()=>a(!1),t);n.add(o)})}function WV(e){if(!e||!Array.isArray(e.content))return 0;for(var t=0,r=0;r<e.content.length;r++){var n=e.content[r];if(n){if(typeof n.text=="string"&&(t+=n.text.length),typeof n.thinking=="string"&&(t+=n.thinking.length),typeof n.content=="string")t+=n.content.length;else if(Array.isArray(n.content))for(var a=0;a<n.content.length;a++){var o=n.content[a];o&&typeof o.text=="string"&&(t+=o.text.length)}if(n.input)try{t+=JSON.stringify(n.input).length}catch{}}}return t}function yK(e,t,r="unknown"){return e?t?r==="latest"||WV(t)>=WV(e)?t:Object.assign({},e,{usage:t.usage||e.usage}):e:t}function Cxe(e,t,r,n,a="unknown"){return r>0&&e?.role===t?.role&&Array.isArray(t?.content)&&t.content.length>=n?t:yK(e,t,a)}function Sxe(e,t,r){return e?.role==="assistant"&&t?.role==="assistant"?yK(e,t,r):t||e}function Fxe(e,t,r,n,a,o,l="unknown"){var c=e&&typeof e.messageOffset=="number"?e.messageOffset:0,d=e&&typeof e.leadingBlockOffset=="number"?e.leadingBlockOffset:0,p=e&&typeof e.leadingBlockTotal=="number"?e.leadingBlockTotal:0,h=e&&Array.isArray(e.messages)?e.messages:[],g=typeof n=="number"?n:r+t.length;if(l!=="latest"&&h.length&&g<(e.messageTotal||0))return{messages:h,messageOffset:c,messageTotal:e.messageTotal,leadingBlockOffset:d,leadingBlockTotal:p};if(h.length&&r>c&&a>0){var v=h[r-c],y=t[0];if(v?.role===y?.role&&Array.isArray(v.content)&&Array.isArray(y.content)&&v.content.length>=a&&(v.content.length<=o||l==="latest")){var w=l==="latest"?v.content.slice(0,o):v.content.slice();if(y.content.forEach(function(R,U){w[a+U]=R}),w.length>=o&&Array.from(w).every(function(R){return R!==void 0})){var x=t.slice();x[0]=Object.assign({},y,{content:w});var k=e$(e,x,r,n,l);return k.messages[r-k.messageOffset]=x[0],{...k,leadingBlockOffset:d,leadingBlockTotal:p}}}return{messages:t,messageOffset:r,messageTotal:g,leadingBlockOffset:a,leadingBlockTotal:o}}var F=t,C=!1,D=a,S=o;if(h.length&&t.length&&r===c&&!(l==="latest"&&a===0)&&!(d===0&&a===0)){var A=h[0],I=t[0];if(A?.role===I?.role&&Array.isArray(A.content)&&Array.isArray(I.content)){var j=Math.min(d,a),$=l==="latest"&&o>0?Math.max(o,a+I.content.length):Math.max(d+A.content.length,a+I.content.length),P=new Array($-j);A.content.forEach(function(R,U){d+U<$&&(P[d+U-j]=R)}),I.content.forEach(function(R,U){P[a+U-j]=R}),Array.from(P).every(function(R){return R!==void 0})&&(F=t.slice(),F[0]=Object.assign({},I,{content:P}),C=!0,D=j,S=l==="latest"?Math.max(o,$):Math.max(p,o,$))}}var N=e$(e,F,r,n,l);return C&&N.messageOffset===r&&(N.messages[0]=F[0]),N.messageOffset<r&&(D=d,S=p),{...N,leadingBlockOffset:D,leadingBlockTotal:S}}function e$(e,t,r,n,a="unknown"){var o=r||0,l=typeof n=="number"?n:Math.max(o+t.length,t.length),c=e&&Array.isArray(e.messages)?e.messages:[],d=e&&typeof e.messageOffset=="number"?e.messageOffset:0,p=e&&typeof e.messageTotal=="number"?e.messageTotal:d+c.length;if(a!=="latest"&&t.length===0&&c.length>0&&l===0)return{messages:c,messageOffset:d,messageTotal:p};if(a!=="latest"&&c.length>0&&l<p)return{messages:c,messageOffset:d,messageTotal:p};if(c.length===0)return{messages:t,messageOffset:o,messageTotal:l};if(a==="latest"&&l===0)return{messages:[],messageOffset:0,messageTotal:0};var h=a==="latest"?Math.min(d+c.length,l):d+c.length,g=o+t.length;if(o>h||d>g)return{messages:t,messageOffset:o,messageTotal:l};for(var v=Math.min(d,o),y=Math.max(h,g),w=[],x=v;x<y;x++){var k=x>=d&&x<h?c[x-d]:void 0,F=x>=o&&x<g?t[x-o]:void 0;w.push(Sxe(k,F,a))}return{messages:w,messageOffset:v,messageTotal:a==="latest"?l:Math.max(p,l,v+w.length)}}var Dxe=B(si(),1),kl=B(Ee(),1);function Axe(e,t,r){let n=document.createElement("div");n.dataset.chatLoadState=t?"failed":"loading",e.replaceChildren(n);let a=(0,Dxe.createRoot)(n);return a.render((0,kl.jsx)(or,{children:(0,kl.jsx)(Xe,{vertical:!0,gap:"small",style:{padding:"var(--wand-page-inset)",minHeight:144},"aria-busy":!t,children:t?(0,kl.jsxs)(kl.Fragment,{children:[(0,kl.jsx)(za,{type:"error",showIcon:!0,title:"\u4F1A\u8BDD\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\uFF1B\u670D\u52A1\u66F4\u65B0\u540E\u53EF\u80FD\u9700\u8981\u91CD\u65B0\u52A0\u8F7D\u9875\u9762\u3002"}),(0,kl.jsxs)(Xe,{gap:"small",children:[(0,kl.jsx)(Te,{onClick:r,children:"\u91CD\u8BD5"}),(0,kl.jsx)(Te,{onClick:()=>window.location.reload(),children:"\u91CD\u65B0\u52A0\u8F7D\u9875\u9762"})]})]}):(0,kl.jsxs)(Xe,{align:"center",gap:"small",role:"status",children:[(0,kl.jsx)(_i,{}),"\u6B63\u5728\u52A0\u8F7D\u4F1A\u8BDD\u7EC4\u4EF6\u2026"]})})})),()=>{a.unmount(),n.remove()}}function oB(){return t$??(t$=Kye())}var t$=null,F6=null,dd=null,cd=null,dE=0,q1=null;function pE(e){return dE===e.generation&&m.selectedId===e.sessionId&&(m.chatRenderEpoch||0)===e.epoch&&(m.currentView||"chat")==="chat"&&e.root.isConnected&&document.querySelector("#chat-output > .chat-messages")===e.root}function fE(){q1?.dispose(),q1=null}function wK(e,t){pE(e)&&(q1?.root===e.root&&q1.failed===t||(fE(),q1={root:e.root,failed:t,dispose:Axe(e.root,t,()=>{!dd||!pE(dd)||(cd=null,oa(!0))})}))}function $xe(){F6||(F6=globalThis.__wandImportBrowserModule("f11e12767426d28a").then(e=>{t$=e;let t=dd;return dd=null,cd=null,e.clearActivityDetailState(),fE(),t&&pE(t)&&e.renderChat(t.force),e}).catch(e=>{let t=dd;return t&&pE(t)?(cd=t,wK(t,!0)):fE(),console.warn("[wand] chat component download failed"),Promise.reject(e)}).finally(()=>{F6=null}),F6.catch(()=>{}))}function oa(e=!1){let t=oB();if(t){t.renderChat(e);return}if(!m.selectedId||(m.currentView||"chat")!=="chat")return;let r=N$(document.getElementById("chat-output"));if(!r)return;let n={sessionId:m.selectedId,epoch:m.chatRenderEpoch||0,generation:dE,root:r,force:!!e||!!dd?.force};dd=n,!(cd&&cd.generation===dE&&cd.sessionId===m.selectedId&&cd.root===r)&&(wK(n,!1),$xe())}function L0(e=!1){let t=oB();t?t.scheduleChatRender(e):oa()}function qE(){dE++,dd=null,cd=null,fE(),oB()?.clearActivityDetailState()}typeof window<"u"&&(window.__scheduleChatRender=()=>L0(!0));function W1(e,t=0){if(t>4||!e)return null;if(typeof e=="string"){let r=e.trim();if(!/^[\[{]/.test(r)||!/"type"\s*:\s*"image(?:_url)?"/.test(r))return null;try{return W1(JSON.parse(r),t+1)}catch{return null}}if(Array.isArray(e))return e.some(r=>mE(r)||W1(r?.text,t+1))?e:null;if(typeof e=="object"){let r=e;return mE(r)?[r]:W1(r.content,t+1)}return null}function mE(e){if(!e||typeof e!="object")return"";if(e.type==="image"){let t=e.source||{},r=t.type==="base64"?t.data:e.data,n=t.media_type||e.mimeType||e.mime_type||"image/png";return typeof r=="string"&&/^image\/[a-z0-9.+-]+$/i.test(n)?`data:${n};base64,${r}`:typeof t.url=="string"?t.url:typeof e.url=="string"?e.url:""}return e.type==="image_url"?typeof e.image_url=="string"?e.image_url:e.image_url?.url||"":""}function sB(e){let t=W1(e);return t?t.flatMap(r=>{let n=mE(r);return n?[{src:n}]:r?.type==="text"?sB(r.text):[]}):[]}function ey(e){if(!e)return"";let t=W1(e);return t?t.map(r=>r?.type==="text"?ey(r.text):mE(r)?"":JSON.stringify(r)).filter(Boolean).join(`
|
|
246
|
-
`):typeof e=="string"?e:Array.isArray(e)?e.map(r=>{if(!r||typeof r!="object")return"";if(r.type==="text"&&typeof r.text=="string")return ey(r.text);if(r.type==="image"||r.type==="image_url")return"";try{return JSON.stringify(r)}catch{return""}}).filter(Boolean).join(`
|
|
247
|
-
`):""}function Bxe(e){if(!e)return"";let t=e.preview||"";return sB(e.content).length||/"type"\s*:\s*"image(?:_url)?"/.test(t)||/(?:data:image\/[\w.+-]+;base64,|\/(?:9j|wAB)|iVBORw0KGgo)[A-Za-z0-9+/=]{16,}/.test(t)?"\u56FE\u7247\u7ED3\u679C \xB7 \u5C55\u5F00\u67E5\u770B":t}var I1=/\bgpt-\d+(?:\.\d+)?(?:\s+[a-z0-9.-]+)?\s+·\s+\d+%\s+left\s+·\s+(?:\/|~\/).+/i,VV=/^(?:thinking|working|running|planning|applying|reading|searching|inspecting|reviewing|summarizing|editing|updating|writing|completed)\b/i;function Ixe(e){if(!e)return!1;var t=String(e).trim();return t?!!(t.indexOf("\u2500\u2500\u2500\u2500")===0||t==="\u276F"||t==="\u203A"||/^[╭╰│┌└┐┘├┤┬┴┼─═]{2,}$/.test(t)||/^[▁▂▃▄▅▆▇█▔▕▏▐]+$/.test(t)||t.indexOf("esc to interrupt")!==-1||t.indexOf("Claude Code v")!==-1||/^Sonnet\b/.test(t)||t.indexOf("Failed to install Anthropic")!==-1||t.indexOf("Claude Code has switched")!==-1||t.indexOf("? for shortcuts")!==-1||t.indexOf("Claude is waiting")!==-1||t.indexOf("[wand]")!==-1||t.indexOf("0;")===0||t.indexOf("9;")===0||t.indexOf("ctrl+g")!==-1||t.indexOf("/effort")!==-1||/^Using .* for .* session/.test(t)||t.indexOf("Press ")===0&&t.indexOf(" for")!==-1||t.indexOf("type ")===0&&t.indexOf(" to ")!==-1||t.indexOf("auto mode is unavailable")!==-1||/MCP server.*failed/i.test(t)||t.indexOf("Germinating")!==-1||t.indexOf("Doodling")!==-1||t.indexOf("Brewing")!==-1||t.indexOf("Permissions")!==-1&&t.indexOf("mode")!==-1||t.indexOf("\u25CF")===0&&t.indexOf("\xB7")!==-1||t.indexOf("[>")===0||t.indexOf("[<")===0||t.indexOf("Captured Claude session ID")!==-1||/^>_\s*OpenAI Codex\b/.test(t)||/^OpenAI Codex\b/i.test(t)||/^(model|directory):\s+/i.test(t)||/^(tip|context):\s+/i.test(t)||/^work(tree|space):\s+/i.test(t)||/^(approvals?|sandbox|provider|session id):\s+/i.test(t)||/^(thinking|working)(\.\.\.|…)?$/i.test(t)||/^[•◦·]\s+Working\b/i.test(t)||/^[•◦·]\s+(Running|Planning|Applying|Reading|Searching)\b/i.test(t)||/^[•◦·]\s+(Inspecting|Reviewing|Summarizing|Editing|Updating|Writing)\b/i.test(t)||/^[•◦·]\s+Completed\b/i.test(t)||/^(ctrl|enter|tab|shift|esc|alt)\+/i.test(t)||/\b(open|close|toggle) (chat|terminal)\b/i.test(t)||/\b(approve|deny)\b.*\b(permission|approval)\b/i.test(t)||/^(use|press) .* (to|for) .*/i.test(t)||/^(?:token|context window|remaining context|conversation):\s+/i.test(t)||/^(?:cwd|path):\s+\//i.test(t)||/^[<>│┆╎].*[<>│┆╎]$/.test(t)&&t.length<8):!1}function Mxe(e){if(!e)return!1;var t=String(e).trim();return t?!!(t.indexOf("\u2500\u2500\u2500\u2500")===0||t==="\u276F"||t==="?"||t.indexOf("Claude Code v")!==-1||t.indexOf("Opus")!==-1&&t.indexOf("with")!==-1||t.indexOf("Sonnet")!==-1&&t.indexOf("with")!==-1||t.indexOf("API Usage")!==-1||t.indexOf("Billing")!==-1||t.indexOf("for shortcuts")!==-1||t.indexOf("/effort")!==-1||/^[▸▐▝▘▗▖█▌▍▎▏▔▁▂▃▄▅▆▇██]/.test(t)):!1}function I0(e){var t=String(e||"").trim();return!!(!t||Ixe(t)||I1.test(t)||/^[╭╰│┌└┐┘├┤┬┴┼─═]/.test(t)||/^\[>[0-9;?]*u$/i.test(t)||/^M+$/i.test(t)||/^(?:OpenAI Codex|Codex)\b/i.test(t)||/^(?:tokens?|context window|remaining context|approvals?|sandbox|provider|session id):\s*/i.test(t)||/^(?:thinking|working)\s*(?:\.\.\.|…)?$/i.test(t)||/^[•◦·]\s+(?:thinking|working|running|planning|applying|reading|searching|inspecting|reviewing|summarizing|editing|updating|writing|completed)\b/i.test(t)||/^(?:model|directory|tip|context|cwd|path):\s+/i.test(t))}function Txe(e){return!e||e.indexOf("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")===0||e==="\u276F"||e.indexOf("esc to interrupt")!==-1||e.indexOf("Claude Code v")!==-1||e.indexOf("Sonnet")!==-1||e.indexOf("~/")===0||e.indexOf("\u25CF high")!==-1||e.indexOf("Failed to install Anthropic marketplace")!==-1||e.indexOf("Claude Code has switched from npm to native installer")!==-1||e.indexOf("Fluttering")!==-1||e.indexOf("? for shortcuts")!==-1||e.indexOf("0;")===0||e.indexOf("9;")===0||e.indexOf("Claude is waiting")!==-1||e.indexOf("\u2722")!==-1||e.indexOf("\u2733")!==-1||e.indexOf("\u2736")!==-1||e.indexOf("\u273B")!==-1||e.indexOf("\u273D")!==-1||e.indexOf("\u2590")===0||e.indexOf("\u259D")===0||e.indexOf("\u2598")===0||(e==="lu"||e==="ue"||e==="tr"||e==="ti"||e==="g"||e==="n"||e==="i\u2026"||e==="\u2026"||e==="uts"||e==="lt"||e==="rg"||e==="\xB7")&&e.length<4||e.indexOf("\u273DF")===0||e.indexOf("\u273BF")===0||e.indexOf("npm WARN")!==-1||e.indexOf("npm notice")!==-1||e.indexOf("added ")!==-1&&e.indexOf(" packages")!==-1||e.indexOf("audited ")!==-1||e.indexOf("found ")!==-1&&e.indexOf(" vulnerabilities")!==-1||e.indexOf("Using ")!==-1&&e.indexOf(" for ")!==-1&&e.indexOf("session")!==-1||e.indexOf("You can use")!==-1||e.indexOf("Press ")!==-1&&e.indexOf(" for")!==-1||e.indexOf("type ")===0&&e.indexOf(" to ")!==-1||e.indexOf("[wand]")===0||e.indexOf("Captured Claude session ID")!==-1||e.indexOf("\u23F5")!==-1||e.indexOf("acceptedit")!==-1||e.indexOf("shift+tab")!==-1||e.indexOf("tabtocycle")!==-1||e.indexOf("ctrl+g")!==-1||e.indexOf("/effort")!==-1||e.indexOf("Opus")!==-1&&e.indexOf("model")!==-1||e.indexOf("Haiku")!==-1||e.indexOf("to cycle")!==-1||e.indexOf("high \xB7")!==-1||e.indexOf("high\xB7")!==-1||e.indexOf("medium \xB7")!==-1||e.indexOf("medium\xB7")!==-1||e.indexOf("low \xB7")!==-1||e.indexOf("low\xB7")!==-1}function jxe(e){return String(e||"").replace(/\x1b\][^\x07]*(\x07|\x1b\\)/g,"").replace(/\x1b\[(\d+)C/g,function(t,r){return" ".repeat(Number(r)||1)}).replace(/\x1b\[[0-9;?]*[AB]/g,`
|
|
248
|
-
`).replace(/\x1b\[[0-9;?]*[su]/g,"").replace(/\x1b\[[0-9;?]*[HfJKr]/g,`
|
|
249
|
-
`).replace(/\x1bM/g,`
|
|
250
|
-
`).replace(/\x1b\[[0-9;?]*[ST]/g,`
|
|
251
|
-
`).replace(/\x1b\[[0-9;?]*[a-zA-Z]/g,"").replace(/\x1b[><=ePX^_]/g,"").replace(/[\u00a0\u200b-\u200d\ufeff]/g," ").replace(/[\x00-\x08\x0b\x0c\x0e-\x1f]/g,"").replace(/\r\n?/g,`
|
|
252
|
-
`).replace(/[ \t]+\n/g,`
|
|
253
|
-
`).replace(/\n{3,}/g,`
|
|
254
|
-
|
|
255
|
-
`)}function xK(e,t){var r=[];if(!e)return r;var n=String(e||""),a=`
|
|
256
|
-
`,o="\r",l="\x1B";if(/^codex\b/.test(String(t||"").trim())){let Kt=function(Re){return String(Re||"").replace(/\x1b\][^\x07]*(\x07|\x1b\\)/g,"").replace(/\x1b\[(\d+)C/g,function(Ze,pt){return" ".repeat(Number(pt)||1)}).replace(/\x1b\[[0-9;?]*[AB]/g,a).replace(/\x1b\[[0-9;?]*[su]/g,"").replace(/\x1b\[[0-9;?]*[HfJKr]/g,a).replace(/\x1bM/g,a).replace(/\x1b\[[0-9;?]*[ST]/g,a).replace(/\x1b\[[0-9;?]*[a-zA-Z]/g,"").replace(/\x1b[><=ePX^_]/g,"").replace(/[\u00a0\u200b-\u200d\ufeff]/g," ").replace(/[\x00-\x08\x0b\x0c\x0e-\x1f]/g,"").replace(/[ \t]+\n/g,a)},St=function(Re){return String(Re||"").replace(/\s+/g," ").replace(/[M]+$/g,"").trim()},nr=function(Re){return String(Re||"").replace(/^›\s*/,"").replace(/^>\s*/,"").trim()},Sr=function(Re){var Ze=String(Re||"").trim();if(!/^›(?:\s|$)/.test(Ze)||I1.test(Ze))return null;var pt=St(nr(Ze));return!pt||I0(pt)?null:pt},Rt=function(Re){var Ze=String(Re||"").trim();if(!/^[•◦·⏺]/.test(Ze))return null;var pt=Ze.replace(/^[•◦·]\s*/,"").replace(/^⏺\s+/,"").replace(/^│\s*/,"").trim();return!pt||/^[•◦·⏺]$/.test(pt)||(pt=pt.replace(/\s*\(\d+[smh]?\s*•\s*esc to interrupt\)[\s\S]*$/i,"").replace(/(?:[a-z]{1,6})?›[\s\S]*$/,"").replace(/\s{2,}gpt-\d[\s\S]*$/i,"").replace(/\b(?:OpenAI Codex|model:|directory:|Tip:)\b[\s\S]*$/i,""),pt=St(pt),!pt||pt.length<2||VV.test(pt)||I0(pt))?null:pt},ot=function(Re){var Ze=St(Re);return!Ze||I0(Ze)||/^[•◦·⏺›]/.test(Ze)||/^[\[\]<>0-9;?]+u?$/i.test(Ze)||/^[╭╰│┌└┐┘├┤┬┴┼─═]/.test(Ze)||Ze.length>500?null:Ze},vt=function(Re,Ze){if(Re.indexOf(Ze)!==0)return!1;var pt=Re.slice(Ze.length);return/^[a-z]{1,4}$/i.test(pt)},Oe=function(Re){for(var Ze=[],pt=0;pt<Re.length;pt++){var Ht=St(Re[pt]);if(!(!Ht||Ht.length<2||I0(Ht))){var qt=Ze[Ze.length-1];if(!qt){Ze.push(Ht);continue}if(Ht!==qt){if(Ht.indexOf(qt)===0){Ze[Ze.length-1]=Ht;continue}if(qt.indexOf(Ht)===0){vt(qt,Ht)&&(Ze[Ze.length-1]=Ht);continue}Ze.push(Ht)}}}return Ze.join(a).trim()},Qe=function(Re){for(var Ze=0;Ze<Re.length;Ze++){var pt=String(Re[Ze]||"").trim();if(pt){var Ht=Sr(pt);if(Ht)return Ht;if(pt==="\u203A")for(var qt=Ze+1;qt<Re.length;qt++){var Jr=St(Re[qt]);if(!(!Jr||I1.test(Jr)||I0(Jr)))return Jr}}}return null},it=function(Re){for(var Ze=[],pt=!1,Ht=0;Ht<Re.length;Ht++){var qt=String(Re[Ht]||"").trim();if(!qt){if(pt)break;continue}var Jr=Rt(qt);if(Jr){Ze.push(Jr),pt=!0;continue}if(pt){if(qt==="\u203A"||/^›(?:\s|$)/.test(qt)||I1.test(qt)||I0(qt))break;Ze.push(St(qt))}}return Ze};for(var c=Kt,d=St,p=nr,h=Sr,g=Rt,v=ot,y=vt,w=Oe,x=Qe,k=it,F=[],C=0,D=n.replace(/\r\n?/g,a).split(a),S=0;S<D.length;S++)for(var A=Kt(D[S]),I=A.split(a),j=0;j<I.length;j++){var $=String(I[j]||"").trim();if($){var P=Sr($);if(P){F.push({kind:"user",order:C++,text:P});continue}var N=Rt($);if(N){F.push({kind:"assistant",order:C++,text:N});continue}var R=ot($);R&&F.push({kind:"echo",order:C++,text:R})}}for(var U=F.filter(function(Re,Ze,pt){var Ht=pt[Ze-1];return!Ht||Ht.kind!==Re.kind||Ht.text!==Re.text}),H=U.filter(function(Re){return Re.kind==="user"}),q=U.filter(function(Re){return Re.kind==="assistant"}),L=U.filter(function(Re){return Re.kind==="echo"}),O=jxe(n),W=O.split(a).map(function(Re){return String(Re||"").trimEnd()}),z=Qe(W),Y=H.length?H[H.length-1]:null,G=L.map(function(Re){return Re.text}).filter(function(Re){return Re.length>=3}),Z=null,T=G.length-1;T>=0;T--)if(G[T]!==z){Z=G[T];break}!Z&&G.length&&(Z=G[G.length-1]);for(var V=Y?Y.text:Z,X=q.filter(function(Re){return!Y||Re.order>Y.order}).map(function(Re){return Re.text}),Q=[],re=O.match(/^[ \t]*[•◦·⏺][ \t]*(.+)$/gm)||[],J=0;J<re.length;J++){var se=St(re[J].replace(/^[ \t]*[•◦·⏺][ \t]*/,""));se&&(VV.test(se)||I1.test(se)||/\b(?:OpenAI Codex|model:|directory:|Tip:|esc to interrupt)\b/i.test(se)||Q.push(se))}var ue=Oe(X)||Oe(it(W))||(Q.length?Q[Q.length-1]:null);return V&&r.push({role:"user",content:V}),ue&&r.push({role:"assistant",content:ue}),!r.length&&Y?r.push({role:"user",content:Y.text}):!r.length&&Z&&r.push({role:"user",content:Z}),r}for(var ae="\0",he="\b",le="\v",fe="\f",we="",_e="",$e="\xA0",De="\x07",Ce=new RegExp(l+"\\[[0-9;?]*[a-zA-Z]|"+l+"\\][^"+De+"]*("+De+"|"+l+"\\\\\\\\)|"+l+"[><=eP_X^]|["+ae+"-"+he+le+fe+we+"-"+_e+"]|"+$e+"|"+o,"g"),qe=n.replace(Ce,function(Kt){return Kt===$e?" ":Kt===o?a:""}).split(o).join(a),Ae=qe.split(a).map(function(Kt){return Kt.trim()}).filter(Boolean),Be=[/thinking with high effort/i,/thinking with medium effort/i,/thinking with low effort/i,new RegExp("thought for [0-9]+s","i"),new RegExp("Sauteed for [0-9]+m","i"),/Germinating/i,/Doodling/i,/Brewing/i],Me=[],Ue=[],He=[],Ie=0;Ie<Ae.length;Ie++){var Ne=Ae[Ie],Je=Ne.replace(/^❯\s*/,"");if(Je.indexOf('Try"')===0||Je.indexOf('Try "')===0){Me.push(Je);continue}for(var gt=!1,et=0;et<Be.length;et++)if(Be[et].test(Ne)){gt=!0,He.push(Ne);break}if(!gt&&!Txe(Ne)){if(Ne.indexOf("\u25CF")===0){if(Ne=Ne.slice(1).trim(),!Ne)continue;Ue.push(Ne);continue}Ne.length<3&&!/^[a-zA-Z]{3}$/.test(Ne)||Ue.push(Ne)}}if(He.length>0){var Ve=He[He.length-1],Se=Ve.match(new RegExp("for ([0-9]+[ms]+| [0-9]+m [0-9]+s)","i")),Pe=Se?"\u6DF1\u5EA6\u601D\u8003 "+Se[0].replace(/for /i,""):"\u6DF1\u5EA6\u601D\u8003\u4E2D...";r.push({role:"thinking",content:Pe,type:"deep-thought"})}if(Me.length>0){var dt=Me[Me.length-1].replace(/^Try\s*/,"").trim();r.push({role:"prompt",content:dt,type:"suggestion"})}if(!Ue.length)return r;for(var at=[],Ke=null,je=[],Ie=0;Ie<Ue.length;Ie++)if(Ne=Ue[Ie],Ne.indexOf("\u276F")===0){var rt=Ne.replace(/^❯\s*/,"").trim();if(rt.indexOf('Try"')===0||rt.indexOf('Try "')===0)continue;Ke!==null&&je.length>0&&(at.push({user:Ke,assistantLines:je}),je=[]),rt?Ke=rt:(Ke!==null&&je.length>0&&(at.push({user:Ke,assistantLines:je}),je=[]),Ke=null)}else Ke!==null&&(Ne.indexOf("\u23FA")!==-1&&(Ne.indexOf("Hi!")!==-1||Ne.indexOf("Hello")!==-1||Ne.indexOf("What")!==-1||Ne.indexOf("working")!==-1)?je.push(Ne):Ne.indexOf("\u23FA")===0?je.push(Ne.slice(1).trim()||Ne):Ne.length>=8&&Ne.indexOf("\u2722")===-1&&Ne.indexOf("\u2733")===-1&&Ne.indexOf("\u2736")===-1&&Ne.indexOf("\u273B")===-1&&Ne.indexOf("\u273D")===-1&&Ne.indexOf("\u2590")!==0&&Ne.indexOf("\u259D")!==0&&Ne.indexOf("\u2598")!==0&&Ne.indexOf("esctointerrupt")===-1&&Ne.indexOf("?for")!==0&&Ne.indexOf("? for")!==0&&je.push(Ne));if(Ke!==null&&je.length>0&&at.push({user:Ke,assistantLines:je}),at.length===0){for(var $t="",Bt=-1,Ie=0;Ie<Ue.length;Ie++)if(Ne=Ue[Ie],!(Ne.indexOf('Try"')===0||Ne.indexOf('Try "')===0)&&Ne.indexOf("Failed to install")===-1&&Ne.indexOf("ctrl+g")===-1&&Ne.indexOf("\u25CF ")!==0&&!(Ne.length<2||Ne.length>100)&&/^[a-zA-Z]/.test(Ne)){$t=Ne.trim(),Bt=Ie;break}if($t&&Bt>=0){var Kr=Ue.slice(Bt+1).filter(function(Kt){return Kt.length>=8});Kr.length>0&&at.push({user:$t,assistantLines:Kr})}}for(var zt=0;zt<at.length;zt++)if(r.push({role:"user",content:at[zt].user}),at[zt].assistantLines.length>0){var $r=_xe(at[zt].assistantLines.join(a));r.push({role:"assistant",content:$r})}return r}function _xe(e){if(!e)return"";for(var t=`
|
|
257
|
-
`,r=e.split(t),n=[],a=!1,o=0;o<r.length;o++){var l=r[o],c=l.trim();if(!(!a&&!c)){if(a=!0,c.indexOf("\u23FA")===0&&c.length>2){n.push(c.slice(1).trim());continue}if(c.indexOf("\u25CF")===0){if(c=c.slice(1).trim(),!c)continue;l=c}n.push(l)}}for(;n.length>0&&!n[n.length-1].trim();)n.pop();for(var d=[],p={},h=0;h<n.length;h++){var g=n[h].replace(/\s+/g,"");g.length>5&&p[g]||(g.length>5&&(p[g]=!0),d.push(n[h]))}return d.join(t)}var EK=null;function lB(e){EK=e}var r$=0;function fy(e){r$++;try{return e()}finally{r$--}}var n$=0;function Pxe(){let e=n$;return()=>e===n$}function kK(){r$||(n$++,EK?.())}var CK=null;function uB(e){CK=e}function Nxe(){return CK?.()??Promise.resolve(!1)}var Oxe=B(si(),1),Rxe=B(er(),1),S9=B(Ee(),1),y1=new Map,D6=new Set;function Lxe(){for(let[t,r]of y1)t.isConnected||(r.unmount(),y1.delete(t));let e=document.querySelector("[data-login-controls]");!e||y1.has(e)||D6.has(e)||(D6.add(e),Promise.all([globalThis.__wandImportBrowserModule("75fb0efeeb030780"),globalThis.__wandImportBrowserModule("fc7dd2f84cb9b470"),globalThis.__wandImportBrowserModule("d0fff09448324ac0")]).then(([{LoginForm:t},{renderLoginVisual:r},{renderWandBrandMarkup:n}])=>{if(D6.delete(e),!e.isConnected||y1.has(e))return;let a=(0,Oxe.createRoot)(e);y1.set(e,a);let o=(0,S9.jsx)("div",{dangerouslySetInnerHTML:{__html:r(n("brand-logo"))}}),l="http://"+location.host+location.pathname;(0,Rxe.flushSync)(()=>a.render((0,S9.jsx)(La,{children:(0,S9.jsx)(t,{checking:e.dataset.checking==="true",switchServer:e.dataset.switchServer==="true",visual:o,httpHref:l})})))}).catch(()=>{D6.delete(e),e.textContent="\u767B\u5F55\u754C\u9762\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u52A0\u8F7D\u9875\u9762\u3002"}))}var zxe={piExecution:Gc,folderPicker:ad,imageViewer:wl,localPreview:El,missions:Mp,newSession:Ia,quickCommit:Pc,settings:mo,worktreeMerge:Nc,workspaces:Qp};function Hxe(e){return!e?.isOpen()||e.closeIfOpen()}function fi(e=[]){let t=new Set(e);for(let[r,n]of Object.entries(zxe))if(!t.has(r)&&!Hxe(n))return!1;return!0}function SK(e,t){return e?'<pre class="inline-tool-result-text" style="max-height: 300px; overflow-y: auto;">'+_u(e)+"</pre>":'<span class="inline-tool-empty">\u65E0\u8F93\u51FA</span>'}function FK(e){var t=String(e||"").trim();return t.length<=24?t||"\u672A\u9009\u62E9\u4F1A\u8BDD":t.slice(0,21)+"..."}function DK(e,t){e.closest(".inline-tool-image")?.setAttribute("data-image-state",t)}var Au=B(_(),1),qxe=B(si(),1),M1=B(er(),1),Wxe=B(_(),1),Hi=B(Ee(),1),AK=Wxe.forwardRef(({mode:e,hasDraft:t,disabled:r,onToggle:n},a)=>{let o=e==="keyboard",l=o?"\u5207\u6362\u5230\u5FEB\u6377\u952E":"\u5207\u6362\u5230\u952E\u76D8\u8F93\u5165"+(t?" \xB7 \u6709\u8349\u7A3F":"");return(0,Hi.jsxs)(Te,{ref:a,kind:"soft",className:"pty-input-mode-toggle","data-mode":e,"aria-label":l,title:l,"aria-controls":"input-box terminal-shortcuts",disabled:r,onPointerDown:c=>c.preventDefault(),onClick:n,children:[(0,Hi.jsx)(zp,{from:"keyboard",to:"keycaps",active:o}),(0,Hi.jsxs)("span",{className:"pty-input-mode-label","aria-hidden":"true",children:[(0,Hi.jsxs)("span",{"data-active":!o,children:["\u952E\u76D8",t?(0,Hi.jsx)("i",{className:"pty-draft-dot"}):null]}),(0,Hi.jsx)("span",{"data-active":o,children:"\u5FEB\u6377\u952E"})]})]})});function $K({collapsed:e,hasDraft:t,disabled:r,onToggle:n}){let a=e?"\u5C55\u5F00\u7EC8\u7AEF\u6309\u952E"+(t?" \xB7 \u6709\u8349\u7A3F":""):"\u6536\u8D77\u7EC8\u7AEF\u6309\u952E";return(0,Hi.jsx)(Te,{kind:"soft",className:"pty-dock-toggle","data-collapsed":e,"aria-label":a,title:a,"aria-expanded":!e,"aria-controls":"terminal-shortcuts",disabled:r,onPointerDown:o=>o.preventDefault(),onClick:n,children:e?(0,Hi.jsxs)(Hi.Fragment,{children:[(0,Hi.jsx)(Fe,{name:"keyboard",size:16}),(0,Hi.jsxs)("span",{children:["\u6309\u952E",t?(0,Hi.jsx)("i",{className:"pty-draft-dot"}):null]}),(0,Hi.jsx)(Fe,{name:"chevronUp",size:14})]}):(0,Hi.jsx)(Fe,{name:"chevronDown",size:16})})}var UV=B(Ee(),1);function BK({ctrl:e,shift:t,disabled:r,onToggle:n}){return(0,UV.jsx)("div",{className:"pty-modifier-buttons",role:"group","aria-label":"\u6301\u7EED\u7EC4\u5408\u952E",children:["ctrl","shift"].map(a=>{let o=a==="ctrl"?e:t,l=a==="ctrl"?"Ctrl":"Shift";return(0,UV.jsx)(Te,{className:"pty-modifier-toggle",kind:"soft","data-modifier":a,"aria-pressed":o,"aria-label":`${l} ${o?"\u5DF2\u6301\u7EED\u5F00\u542F\uFF0C\u518D\u70B9\u5173\u95ED":"\u70B9\u51FB\u6301\u7EED\u5F00\u542F"}`,title:`${l} ${o?"\u5DF2\u6301\u7EED\u5F00\u542F\uFF0C\u518D\u70B9\u5173\u95ED":"\u70B9\u51FB\u6301\u7EED\u5F00\u542F\uFF0C\u53EF\u4E0E\u5B57\u6BCD\u548C\u65B9\u5411\u952E\u7EC4\u5408"}`,disabled:r,onPointerDown:c=>c.preventDefault(),onClick:()=>n(a),children:l},a)})})}var zi=B(Ee(),1),A6=new Map;function KV({host:e,input:t,resize:r}){let[,n]=Au.useReducer(S=>S+1,0);Au.useEffect(()=>Lt.subscribe(n),[]),Au.useEffect(()=>Za.subscribe(n),[]),Au.useLayoutEffect(()=>{let S=e.querySelector(".composer-inline-config");if(!S)return;let A=()=>{let j=S.getBoundingClientRect();e.style.setProperty("--composer-runtime-width",`${Math.ceil(j.width)}px`),e.style.setProperty("--composer-runtime-height",`${Math.ceil(j.height)}px`)};A();let I=new ResizeObserver(A);return I.observe(S),()=>I.disconnect()},[e]),Au.useEffect(()=>{let S=new MutationObserver(n),A=e.querySelector("#send-input-button");A&&S.observe(A,{attributes:!0,attributeFilter:["data-phase"]}),S.observe(t,{attributes:!0,attributeFilter:["disabled","readonly","placeholder"]});let I=e.querySelector(".terminal-shortcuts");I&&S.observe(I,{attributes:!0,attributeFilter:["hidden"]});let j=0,$=()=>{j=requestAnimationFrame(n)};return t.addEventListener("compositionstart",n),t.addEventListener("compositionend",$),()=>{S.disconnect(),cancelAnimationFrame(j),t.removeEventListener("compositionstart",n),t.removeEventListener("compositionend",$)}},[e,t]);let a=m.selectedId??"",o=Lt.read(a),l=e.querySelector("#send-input-button")?.dataset.phase??"idle",c=e.querySelector(".terminal-shortcuts"),d=!!c&&!c.hidden,p=Za.read(a),h=Au.useRef(null),g=Au.useRef(null),v=l==="failed"||l==="unknown"||!!o.recovery,y=v?"keyboard":p.mode,w=t.readOnly||!!o.recovery||m.composerComposing,x=()=>{g.current={owner:a,start:t.selectionStart,end:t.selectionEnd,direction:t.selectionDirection,scroll:t.scrollTop}};Au.useEffect(()=>{d&&v&&Za.update(a,{mode:"keyboard"})},[a,d,v]);let k=i7({owner:a,input:()=>t,surface:()=>e,phase:l,pending:!!o.text||!!o.attachments.length,locked:w,forceExpanded:d&&y==="keyboard",onDismiss:S=>{d&&(x(),Za.update(a,{mode:"shortcuts"}),(S==="escape"||S==="back")&&requestAnimationFrame(()=>(h.current?.offsetParent?h.current:e.querySelector(".pty-dock-toggle"))?.focus({preventScroll:!0})))},popupOwners:["composer-plus-popover","composer-main",`wand-pi-settings-${a}`,`wand-pi-codemode-${a}`,`pty-extra-keys-${a}`]}),F=d&&!p.open&&y==="shortcuts"&&!p.ctrl&&!p.shift;Au.useLayoutEffect(()=>{e.dataset.composerExpanded=String(k.expanded),d?e.dataset.ptyInputMode=y:delete e.dataset.ptyInputMode,F?e.dataset.ptyCollapsed="true":delete e.dataset.ptyCollapsed;let S=d?y==="keyboard":k.expanded;t.tabIndex=S?0:-1;let A=e.querySelector(".composer-input-wrap");A&&(A.inert=!S),c&&(c.inert=d&&(S||F),c.setAttribute("aria-hidden",String(!d||S||F)));let I=e.querySelector("[data-pty-extra-keys-host]");I&&(I.inert=!d||S||F);let j=e.querySelector("[data-composer-rail-host]");j&&(j.inert=d&&!S);let $=e.querySelector(".composer-editor-controls");$&&($.inert=!S),r(t)},[e,t,c,r,k.expanded,d,y,F]);let C=()=>{if(!(w||l==="sending"||v||m.composerComposing))if(fd(),y==="keyboard")x(),t.blur(),(0,M1.flushSync)(()=>Za.update(a,{mode:"shortcuts"})),h.current?.focus({preventScroll:!0});else{(0,M1.flushSync)(()=>Za.update(a,{mode:"keyboard"})),k.open();let S=g.current;S?.owner===a&&(t.setSelectionRange(S.start,S.end,S.direction),t.scrollTop=S.scroll)}},D=()=>{if(!m.composerComposing){if(fd(),F){Za.update(a,{open:!0});return}y==="keyboard"&&(x(),t.blur()),Za.update(a,{open:!1,mode:"shortcuts",ctrl:!1,shift:!1})}};return(0,zi.jsxs)(zi.Fragment,{children:[(0,M1.createPortal)((0,zi.jsx)(zi.Fragment,{children:d?(0,zi.jsxs)(zi.Fragment,{children:[(0,zi.jsx)($K,{collapsed:F,hasDraft:!!o.text||!!o.attachments.length,disabled:v&&!F,onToggle:D}),(0,zi.jsx)(AK,{ref:h,mode:y,hasDraft:!!o.text||!!o.attachments.length,disabled:w||l==="sending"||v,onToggle:C}),(0,zi.jsx)(BK,{ctrl:p.ctrl,shift:p.shift,disabled:m.composerComposing,onToggle:S=>{m.composerComposing||Za.toggle(a,S)}})]}):null}),e.querySelector(".composer-main-row")),(0,M1.createPortal)((0,zi.jsx)(o7,{text:o.text,attachments:o.attachments.length,placeholder:t.placeholder,disabled:t.disabled,onOpen:k.open}),e.querySelector(".composer-actions-left"))]})}function Vxe(e){for(let[l,c]of A6)l.isConnected||(c.root.unmount(),A6.delete(l));let t=document.querySelector(".input-composer"),r=t?.querySelector("#input-box");if(!t||!r)return;let n=A6.get(t);if(n){n.root.render((0,zi.jsx)(La,{children:(0,zi.jsx)(KV,{host:t,input:r,resize:e})}));return}let a=document.createElement("span");t.appendChild(a);let o=(0,qxe.createRoot)(a);A6.set(t,{root:o,chrome:a}),(0,M1.flushSync)(()=>o.render((0,zi.jsx)(La,{children:(0,zi.jsx)(KV,{host:t,input:r,resize:e})})))}var G6=null,w1=null,a$=new Map;function Uxe(){return G6?Promise.resolve(G6):(w1||(w1=globalThis.__wandImportBrowserModule("2a86f5afb165815d").then(e=>(G6=e,w1=null,e),e=>{throw w1=null,e})),w1)}function IK(e){let t=(a$.get(e)??0)+1;return a$.set(e,t),t}function WE(e,t){let r=IK(e);Uxe().then(n=>{a$.get(e)===r&&t(n)},()=>{e.textContent="\u901A\u77E5\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u52A0\u8F7D\u9875\u9762\u3002"})}function cB(e){IK(e),G6?.clearNoticeView(e)}function Kxe(e){WE(e,t=>t.paintOfflineNotice(e))}function dB(e,t,r){WE(e,n=>n.paintBootNotice(e,t,r))}function Gxe(e,t){WE(e,r=>r.paintNotificationNotice(e,t))}function Xxe(e,t,r){WE(e,n=>n.paintUpdateNotice(e,t,r))}var i$="wand-active-task",Yxe="wand-selected-session";function W0(e){try{e?localStorage.setItem(i$,e):localStorage.removeItem(i$)}catch{}}function Qxe(){try{return(localStorage.getItem(i$)||"").trim()}catch{return""}}var Zxe=e2e();async function Jxe(e=Zxe,t=()=>!0){if(GV()||!t()||await Nxe()||!t())return;let r=Qxe();if(!r||GV())return;let n=Ga.getRuntime();if(n)try{let a=await an.listTaskGroups();if(!t())return;let o=RD(a.groups,r);if(!o||o.task.status==="done"){W0(null);return}await n.openTask({...M2(o,e||void 0),navigationCurrent:t}),e&&t()&&n.selectSession(e)}catch{}}function e2e(){try{return(localStorage.getItem(Yxe)||"").trim()||null}catch{return null}}function GV(){return typeof document<"u"&&document.documentElement?.classList?.contains("is-wand-embed-terminal")===!0}function t2e(e){try{let t=e&&e._core&&e._core._renderService&&e._core._renderService.dimensions&&e._core._renderService.dimensions.css?e._core._renderService.dimensions.css.cell:null,r=Number(t&&t.width),n=Number(t&&t.height);return!(r>0)||!(n>0)?null:{width:r,height:n}}catch{return null}}function M0(e){let t=parseInt(e||"",10);return Number.isFinite(t)?t:null}function r2e(e){if(Number(e&&e.options&&e.options.scrollback)===0)return 0;try{if(!e.element||!e.element.querySelector(".xterm-decoration-overview-ruler"))return 0}catch{return 0}let t=Number(e.options&&e.options.overviewRuler&&e.options.overviewRuler.width);return t>0?t:14}function MK(e){let t=e&&e.element,r=t&&t.parentElement;if(!r||typeof getComputedStyle!="function")return null;let n=t2e(e);if(!n)return null;let a=getComputedStyle(r),o=getComputedStyle(t),l=M0(a.getPropertyValue("width")),c=M0(a.getPropertyValue("height"));if(l===null||c===null)return null;let d=(M0(o.getPropertyValue("padding-left"))||0)+(M0(o.getPropertyValue("padding-right"))||0),p=(M0(o.getPropertyValue("padding-top"))||0)+(M0(o.getPropertyValue("padding-bottom"))||0),h=Math.max(0,l-d-r2e(e)),g=c-p;return g>0?{cols:Math.max(2,Math.floor(h/n.width)),rows:Math.max(1,Math.floor(g/n.height))}:null}function md(e,t){let r=MK(e);if(r){if(r.cols!==e.cols||r.rows!==e.rows){try{e._core&&e._core._renderService&&e._core._renderService.clear()}catch{}e.resize(r.cols,r.rows)}return}t&&typeof t.fit=="function"&&t.fit()}function n2e(e,t){return fetch(e,{...t,headers:{...t?.headers,"X-Wand-Tool-Projection":"compact"}})}var F9=0,$6=0,XV=0,x1=0,hE=[],gE=[];function pB(){return window.__wandIosNative===!0}function TK(e){XV=Math.max(XV,Date.now()+(e||1800))}function jK(e,t){setTimeout(function(){var r=document.activeElement;X6(r)&&r!==t||TK(e)},30)}function a2e(e){return Math.max(window.innerHeight||0,e&&e.height||0,document.documentElement&&document.documentElement.clientHeight||0,document.body&&document.body.clientHeight||0)}function i2e(e){var t=document.documentElement,r=Math.max(window.innerWidth||0,e&&e.width||0,t&&t.clientWidth||0),n=a2e(e);return!F9||Math.abs(r-F9)>8?(F9=r,$6=n):n>$6&&($6=n),Math.max(1,Math.round($6||n||1))}function o2e(e,t,r,n){return e||!pB()?!1:t>0||n>r+1}function T0(e){var t=window.visualViewport;if(t){var r=document.documentElement;if(r.classList.toggle("is-keyboard-open",!!e),window.__wandImeNative){r.style.setProperty("--app-viewport-top","0px"),r.style.setProperty("--app-viewport-height",Math.round(t.height)+"px");return}var n=i2e(t),a=Math.max(0,Math.round(t.offsetTop||0)),o=Math.max(1,Math.round(t.height));(!e&&pB()||o2e(e,a,o,n))&&(a=0,o=Math.max(o,n)),r.style.setProperty("--app-viewport-top",a+"px"),r.style.setProperty("--app-viewport-height",o+"px"),(e||(window.scrollY||0)>0)&&$$()}}function X6(e){if(!e)return!1;var t=e.tagName;if(t==="TEXTAREA"||t==="SELECT")return!0;if(t==="INPUT"){var r=(e.getAttribute("type")||"text").toLowerCase();return!/^(button|checkbox|color|file|hidden|image|radio|range|reset|submit)$/i.test(r)}return!!e.isContentEditable}function s2e(){if(!("visualViewport"in window)||window.__wandViewportHandlersBound)return;window.__wandViewportHandlersBound=!0;var e=window.visualViewport,t=e.height,r=!1,n=Math.max(window.innerWidth||0,e.width||0),a=Math.max(window.innerHeight||0,e.height||0);function o(){return Math.max(window.innerHeight||0,e.height||0)}function l(){var y=Math.max(window.innerWidth||0,e.width||0),w=o();if(Math.abs(y-n)>8){n=y,a=w;return}w>a&&(a=w)}function c(y,w){var x=document.activeElement,k=x===y||X6(x),F=a-e.height,C=a-(window.innerHeight||e.height||0),D=Date.now()<x1;return D?!!(k&&(F>120||C>120)):!!(w>80||k&&(F>120||C>120)||r&&(F>80||w>32))}function d(){hE.forEach(function(y){clearTimeout(y)}),hE=[60,180,360,620,900].map(function(y){return setTimeout(function(){T0(r)},y)})}function p(){gE.forEach(function(y){clearTimeout(y)}),gE=[0,50,120,220,360,560].map(function(y){return setTimeout(function(){h();var w=document.getElementById("input-box");w&&document.activeElement===w&&BE(w)},y)})}function h(){if(e){var y=document.getElementById("input-box"),w=window.innerHeight-e.height-e.offsetTop;l();var x=c(y,w),k=Math.abs(e.height-t)>8;if(T0(x),x&&(!r||k)&&aCe(e,y)&&BE(y),!r&&x){var F=m.terminalAutoFollow;qi("keyboard-open",{forceReplay:!0}),window.__wandImeNative||setTimeout(function(){T0(!0)},220),d(),F&&setTimeout(function(){m.terminal&&m.terminalAutoFollow&&Dl("force")},220)}if(r&&!x){var C=!!window.__wandImeNative;C||(TK(2200),x1=Date.now()+1200,T0(!1),$$()),d(),setTimeout(function(){C||(T0(!1),$$()),qi("keyboard-close",{forceReplay:!0}),Dl("keyboard")},200)}k&&r===x&&qi("viewport"),r=x,t=e.height}}var g=null;function v(){g!==null&&cancelAnimationFrame(g),g=requestAnimationFrame(function(){g=null,h()})}e.addEventListener("resize",v),e.addEventListener("scroll",v),document.addEventListener("visibilitychange",function(){document.visibilityState==="visible"&&(v(),setTimeout(v,240),setTimeout(v,720))}),window.addEventListener("pageshow",function(y){y&&y.persisted&&(v(),setTimeout(v,240))}),document.addEventListener("focusout",function(y){!y||!y.target||X6(y.target)&&(jK(1600,y.target),pB()&&(x1=Math.max(x1,Date.now()+1200)),setTimeout(v,80),setTimeout(v,420))}),document.addEventListener("focusin",function(y){!y||!y.target||!X6(y.target)||p()}),window.addEventListener("wand-ios-ime-state",function(y){var w=y&&y.detail&&y.detail.state;w==="hidden"&&(x1=Date.now()+900),p(),d()}),h()}function l2e(){var e=document.getElementById("output");if(e){var t=document.createElement("div");t.className="terminal-resize-handle",t.setAttribute("role","separator"),t.setAttribute("aria-orientation","horizontal"),t.setAttribute("aria-label","\u8C03\u6574\u7EC8\u7AEF\u9AD8\u5EA6"),t.innerHTML='<span aria-hidden="true">⋮</span>',e.appendChild(t);var r=!1,n=0,a=0;t.addEventListener("mousedown",function(o){r=!0,n=o.clientY,a=e.getBoundingClientRect().height,document.body.style.cursor="ns-resize",document.body.style.userSelect="none",o.preventDefault()}),m.resizeMouseMove=function(o){if(r){var l=o.clientY-n,c=Math.max(200,Math.min(a+l,window.innerHeight-200));e.style.height=c+"px",e.style.flex="none",Mu()}},document.addEventListener("mousemove",m.resizeMouseMove),m.resizeMouseUp=function(){r&&(r=!1,document.body.style.cursor="",document.body.style.userSelect="",Mu())},document.addEventListener("mouseup",m.resizeMouseUp),t.addEventListener("touchstart",function(o){r=!0,n=o.touches[0].clientY,a=e.getBoundingClientRect().height,o.preventDefault()},{passive:!1}),m.resizeTouchMove=function(o){if(r){var l=o.touches[0].clientY-n,c=Math.max(200,Math.min(a+l,window.innerHeight-200));e.style.height=c+"px",e.style.flex="none",Mu(),o.preventDefault()}},document.addEventListener("touchmove",m.resizeTouchMove,{passive:!1}),m.resizeTouchEnd=function(){r&&(r=!1,Mu())},document.addEventListener("touchend",m.resizeTouchEnd)}}function u2e(){var e=document.getElementById("output");if(e){var t=!xo();m.resizeHandler=function(){Mu(!0);var r=!xo();t!==r&&(t=r,!r&&m.sidebarPinned&&m.sessionsDrawerOpen?(m.sessionsDrawerOpen=!1,Vr("wand-sidebar-open",!1),Bf()):r&&m.sidebarPinned&&!m.sessionsDrawerOpen&&(m.sessionsDrawerOpen=!0,Vr("wand-sidebar-open",!0),Bf()))},window.addEventListener("resize",m.resizeHandler),window.visualViewport&&(m.visualViewportHandler=function(){Mu(!0)},window.visualViewport.addEventListener("resize",m.visualViewportHandler)),m.visibilityHandler=function(){document.hidden||qi("visibility",{forceReplay:!0})},document.addEventListener("visibilitychange",m.visibilityHandler),m.orientationHandler=function(){qi("orientation",{forceReplay:!0})},window.addEventListener("orientationchange",m.orientationHandler),requestAnimationFrame(function(){Mu(!0)})}}function c2e(){m.terminalHealthTimer||(m.terminalHealthTimer=setInterval(function(){if(!(!m.terminal||m.currentView!=="terminal"||document.hidden)){var e=m.sessions.find(function(t){return t.id===m.selectedId});!e||e.sessionKind==="structured"||qi("health")}},5e3))}function d2e(){m.terminalHealthTimer&&(clearInterval(m.terminalHealthTimer),m.terminalHealthTimer=null)}function my(){d2e(),hE.forEach(function(a){clearTimeout(a)}),hE=[],gE.forEach(function(a){clearTimeout(a)}),gE=[],m.resizeTimer&&(clearTimeout(m.resizeTimer),m.resizeTimer=null),m.resizeObserver&&(m.resizeObserver.disconnect(),m.resizeObserver=null),m.resizeHandler&&(window.removeEventListener("resize",m.resizeHandler),m.resizeHandler=null),m.visualViewportHandler&&window.visualViewport&&(window.visualViewport.removeEventListener("resize",m.visualViewportHandler),m.visualViewportHandler=null),m.visibilityHandler&&(document.removeEventListener("visibilitychange",m.visibilityHandler),m.visibilityHandler=null),m.orientationHandler&&(window.removeEventListener("orientationchange",m.orientationHandler),m.orientationHandler=null),[["mousemove","resizeMouseMove"],["mouseup","resizeMouseUp"],["touchmove","resizeTouchMove"],["touchend","resizeTouchEnd"]].forEach(function(a){m[a[1]]&&(document.removeEventListener(a[0],m[a[1]]),m[a[1]]=null)});var e=document.getElementById("output");if(m.terminalViewportEl&&(m.terminalViewportScrollHandler&&m.terminalViewportEl.removeEventListener("scroll",m.terminalViewportScrollHandler),m.terminalViewportTouchHandler&&m.terminalViewportEl.removeEventListener("touchmove",m.terminalViewportTouchHandler),m.terminalViewportTouchStartHandler&&m.terminalViewportEl.removeEventListener("touchstart",m.terminalViewportTouchStartHandler)),e&&(m.terminalWheelHandler&&e.removeEventListener("wheel",m.terminalWheelHandler,!0),m.terminalClickHandler&&e.removeEventListener("click",m.terminalClickHandler)),m.terminalViewportEl=null,m.terminalViewportScrollHandler=null,m.terminalViewportTouchHandler=null,m.terminalViewportTouchStartHandler=null,m.terminalWheelHandler=null,m.terminalClickHandler=null,m.terminalScrollbarHideTimer&&(clearTimeout(m.terminalScrollbarHideTimer),m.terminalScrollbarHideTimer=null),m.terminalScrollbarEl&&m.terminalScrollbarEl.parentNode&&m.terminalScrollbarEl.parentNode.removeChild(m.terminalScrollbarEl),m.terminalScrollbarEl=null,m.terminalScrollbarDragging=!1,m.terminalScrollbarRafPending=!1,m.terminal&&(typeof m.terminal.dispose=="function"?m.terminal.dispose():typeof m.terminal.destroy=="function"&&m.terminal.destroy(),m.terminal=null),e)for(var t=e.querySelectorAll(".terminal-scroll-wrap"),r=0;r<t.length;r++){var n=t[r];n.parentNode===e&&e.removeChild(n)}m.terminalSessionId=null,m.terminalFitAddon=null,m.terminalWriteQueue=Promise.resolve(),m.terminalRestoring=!1,m.terminalWriteGeneration=(m.terminalWriteGeneration||0)+1,m.terminalRestoreGeneration=(m.terminalRestoreGeneration||0)+1,m.terminalOutput="",m.terminalAutoFollow=!0,m.showTerminalJumpToBottom=!1,Ps(),m.softResyncTimer&&(clearTimeout(m.softResyncTimer),m.softResyncTimer=null),m.lastResize={cols:0,rows:0}}function hy(e,t){if(!(!m.selectedId||m.terminalRestoring)){var r=m.sessions.find(function(a){return a.id===m.selectedId});if(!(!r||r.status!=="running")&&!cr(r)){e=Math.max(20,Math.min(Math.floor(e),1e3)),t=Math.max(5,Math.min(Math.floor(t),500));var n={cols:e,rows:t};(m.lastResize.cols!==n.cols||m.lastResize.rows!==n.rows)&&(m.lastResize=n,m.ws&&m.ws.readyState===WebSocket.OPEN?m.ws.send(JSON.stringify({type:"pty_resize",sessionId:m.selectedId,cols:n.cols,rows:n.rows})):n2e("/api/sessions/"+m.selectedId+"/resize",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(n)}).catch(function(){}))}}}function qi(e,t){if(!m.terminal||m.terminalRestoring)return!1;var r=document.getElementById("output");if(!r||r.offsetWidth===0||r.offsetHeight===0)return ty(e||"fit-retry"),!1;var n=m.terminalAutoFollow;return requestAnimationFrame(function(){requestAnimationFrame(function(){!m.terminal||m.terminalRestoring||(m.terminalFitAddon&&typeof m.terminalFitAddon.fit=="function"&&md(m.terminal,m.terminalFitAddon),hy(m.terminal.cols,m.terminal.rows),n&&m.terminalAutoFollow?Dl("force"):Ps())})}),!0}function ty(e,t){if(!m.terminal)return;var r=0,n=8;function a(){if(m.terminal){var o=document.getElementById("output");if(o&&o.offsetHeight,o&&o.offsetWidth>0&&o.offsetHeight>0){qi(e);return}++r>=n||(r<=4?requestAnimationFrame(a):setTimeout(a,32))}}a()}function Mu(e){m.resizeTimer&&(clearTimeout(m.resizeTimer),m.resizeTimer=null);var t=e?0:100;m.resizeTimer=setTimeout(function(){m.resizeTimer=null,requestAnimationFrame(p2e)},t)}function p2e(){!m.terminal||m.terminalRestoring||(m.terminalAutoFollow&&Dl("force"),hy(m.terminal.cols,m.terminal.rows))}var vf=B(er(),1),_K=B(si(),1),Cl=B(_(),1),f2e=B(er(),1),Qo=B(Ee(),1),B6=[{key:"enter",label:"Enter",title:"\u53D1\u9001\u56DE\u8F66"},{key:"up",label:"\u2191",title:"\u65B9\u5411\u952E\u4E0A"},{key:"down",label:"\u2193",title:"\u65B9\u5411\u952E\u4E0B"},{key:"left",label:"\u2190",title:"\u65B9\u5411\u952E\u5DE6"},{key:"right",label:"\u2192",title:"\u65B9\u5411\u952E\u53F3"},{key:"escape",label:"Esc",title:"Escape"},{key:"tab",label:"Tab",title:"Tab"},{key:"ctrl_c",label:"Ctrl+C",title:"Ctrl+C \xB7 \u4E2D\u65AD"},{key:"home",label:"Home",title:"\u884C\u9996"},{key:"end",label:"End",title:"\u884C\u5C3E"},{key:"backspace",label:"\u232B",title:"\u9000\u683C"},{key:"delete",label:"Del",title:"\u5220\u9664\u540E\u4E00\u5B57\u7B26"},{key:"pageup",label:"PgUp",title:"\u4E0A\u4E00\u9875"},{key:"pagedown",label:"PgDn",title:"\u4E0B\u4E00\u9875"}];function m2e(e,t,r){let n=0,a=0;for(let o of t){let l=n+(a?r:0)+o;if(l>e+.5)break;n=l,a++}return a}function PK({disabled:e,onKey:t,owner:r=""}){let n=Cl.useRef(null),a=Cl.useRef(null),[o,l]=Cl.useState(B6.length),[c,d]=Cl.useState(null),[p,h]=Cl.useState(!1),g=Cl.useRef(null),v=Cl.useSyncExternalStore(Za.subscribe,()=>Za.read(r),()=>Za.read(r));Cl.useEffect(()=>{(v.mode!=="shortcuts"||e)&&h(!1)},[v.mode,e]),Cl.useEffect(()=>{h(!1)},[r]),Cl.useLayoutEffect(()=>{let w=n.current,x=a.current;if(!w||!x)return;let k=()=>{let D=w.clientWidth;if(!D)return;let S=parseFloat(getComputedStyle(w).columnGap)||0,A=Array.from(x.querySelectorAll("button"),I=>I.getBoundingClientRect().width);A.every(I=>I>0)&&l(m2e(D,A,S))};k();let F=new ResizeObserver(k);F.observe(w),F.observe(x);let C=!0;return document.fonts.ready.then(()=>{C&&k()}),d(r?w.closest(".input-composer")?.querySelector("[data-pty-extra-keys-host]")??null:null),()=>{C=!1,F.disconnect()}},[r]);let y=B6.slice(o);return(0,Qo.jsxs)(Qo.Fragment,{children:[(0,Qo.jsxs)(Xe,{ref:n,gap:4,wrap:!1,role:"group","aria-label":"PTY \u5FEB\u6377\u952E",className:"terminal-shortcuts-row",children:[B6.map(({key:w,label:x,title:k},F)=>(0,Qo.jsx)(rl,{"data-terminal-key":w,hidden:F>=o,disabled:e,title:k,"aria-label":k,onMouseDown:C=>{C.button===0&&C.preventDefault()},onClick:()=>t?.(w),children:x},w)),(0,Qo.jsx)("div",{className:"terminal-shortcuts-measure","aria-hidden":"true",inert:!0,children:(0,Qo.jsx)(Xe,{ref:a,gap:4,wrap:!1,className:"terminal-shortcuts-row terminal-shortcuts-probe",children:B6.map(({key:w,label:x})=>(0,Qo.jsx)(rl,{tabIndex:-1,children:x},w))})})]}),c?(0,f2e.createPortal)((0,Qo.jsx)(ol,{side:"top",ariaLabel:"\u5176\u4ED6\u7EC8\u7AEF\u6309\u952E",popupOwner:`pty-extra-keys-${r}`,open:p,onOpenChange:h,trigger:(0,Qo.jsx)(Te,{ref:g,className:"pty-extra-keys-trigger",kind:"soft","aria-label":"\u66F4\u591A\u7EC8\u7AEF\u6309\u952E",title:"\u66F4\u591A\u7EC8\u7AEF\u6309\u952E",disabled:e||!y.length,"aria-expanded":p,style:{visibility:y.length?void 0:"hidden"},children:(0,Qo.jsx)(Fe,{name:"more",size:18})}),children:(0,Qo.jsx)("div",{className:"pty-extra-keys-grid",role:"group","aria-label":"\u672A\u663E\u793A\u7684\u7EC8\u7AEF\u6309\u952E",children:y.map(({key:w,label:x,title:k})=>(0,Qo.jsx)(Te,{title:k,"aria-label":k,"data-extra-terminal-key":w,onClick:()=>{t?.(w),h(!1),g.current?.focus({preventScroll:!0})},children:x},w))})}),c):null]})}var h2e=B(_(),1),g2e=B(er(),1),v2e=Object.freeze({revision:0,mounts:Object.freeze([])}),b2e=class{constructor(){oe(this,"snapshot",v2e),oe(this,"listeners",new Set),oe(this,"subscribe",e=>(this.listeners.add(e),()=>this.listeners.delete(e))),oe(this,"getSnapshot",()=>this.snapshot)}sync(e){this.snapshot=Object.freeze({revision:this.snapshot.revision+1,mounts:Object.freeze(e.slice())});for(let t of this.listeners)t()}clear(){this.snapshot.mounts.length!==0&&this.sync([])}},V1=new b2e,Y6=B(Ee(),1),YV="\u53D1\u9001\u56DE\u8F66\u5230\u7EC8\u7AEF\uFF08\u76F8\u5F53\u4E8E Enter\uFF09";function NK({disabled:e,hint:t,onSubmit:r}){return(0,Y6.jsxs)(Te,{className:"wand-composer-rail-submit",kind:"soft",size:"medium",disabled:e,title:t??YV,"aria-label":t??YV,onClick:r,children:[(0,Y6.jsx)(Fe,{name:"enter",slot:"start",size:14}),(0,Y6.jsx)("span",{children:"\u53D1\u9001"})]})}function fB(){return(0,h2e.useSyncExternalStore)(V1.subscribe,V1.getSnapshot,V1.getSnapshot).mounts.map(e=>(0,g2e.createPortal)((0,Y6.jsx)(NK,{disabled:e.disabled,hint:e.hint,onSubmit:e.onSubmit}),e.target,e.key))}var wo=B(Ee(),1),OK=0;function mB(e,t,r){let n=document.createElement("div");n.dataset.terminalCreationMeasure="true",n.setAttribute("aria-hidden","true"),n.inert=!0,Object.assign(n.style,{position:"fixed",left:"-10000px",top:"0",width:`${t}px`,visibility:"hidden",pointerEvents:"none",contain:"layout style"}),document.body.appendChild(n);let a;try{return a=(0,_K.createRoot)(n,{identifierPrefix:`wand-terminal-measure-${++OK}-`}),(0,vf.flushSync)(()=>a.render((0,wo.jsx)(Gv,{children:(0,wo.jsx)(uE,{children:e})}))),n.querySelector(r)?.getBoundingClientRect().height??0}finally{try{(0,vf.flushSync)(()=>a?.unmount())}finally{n.remove()}}}function y2e(e,t){return mB((0,wo.jsx)(mK,{snapshot:e,measurement:!0}),t,".main-header-row")}function w2e(e,t){return mB((0,wo.jsx)(T5e,{...e}),t,".workspace-tab-bar")}function x2e(e,t){return mB((0,wo.jsx)(j5e,{...e}),t,'[data-session-tabs="standalone"]')}function E2e(e){let t=[],r=[],n=(l,c,d)=>{let p=l.style.getPropertyValue(c),h=l.style.getPropertyPriority(c);r.push(()=>p?l.style.setProperty(c,p,h):l.style.removeProperty(c)),l.style.setProperty(c,d,"important")},a,o=()=>{try{(0,vf.flushSync)(()=>a?.unmount())}finally{for(let l of t)l.remove();for(let l of r.reverse())l()}};try{let l=e.querySelector(".composer-top-row");l&&n(l,"display","none");let c=e.querySelector(".input-composer");if(c){let y=c.className;r.push(()=>{c.className=y}),c.classList.add("is-terminal-interactive");let w=c.dataset.ptyInputMode;r.push(()=>{w===void 0?delete c.dataset.ptyInputMode:c.dataset.ptyInputMode=w}),c.dataset.ptyInputMode="shortcuts";let x=c.dataset.ptyCollapsed;r.push(()=>{x===void 0?delete c.dataset.ptyCollapsed:c.dataset.ptyCollapsed=x}),c.dataset.ptyCollapsed="true";for(let k of["--motion-normal","--motion-fast","--motion-quick-exit","--motion-morph"])n(c,k,"0s")}let d=e.querySelector(".input-textarea");if(d){n(d,"min-height","");let y=parseFloat(getComputedStyle(d).minHeight);n(d,"height",`${Number.isFinite(y)?y:40}px`)}let p=[],h=c?.querySelector(".composer-main-row");if(h&&!h.querySelector(".pty-input-mode-toggle")){let y=document.createElement("span");y.style.display="contents",t.push(y),h.appendChild(y),p.push((0,vf.createPortal)((0,wo.jsxs)(wo.Fragment,{children:[(0,wo.jsx)($K,{collapsed:!0,onToggle:()=>{}}),(0,wo.jsx)(AK,{mode:"shortcuts",onToggle:()=>{}}),(0,wo.jsx)(BK,{ctrl:!1,shift:!1,onToggle:()=>{}})]}),y))}let g=e.querySelector(".terminal-shortcuts");if(g?.hidden&&!document.documentElement.classList.contains("is-wand-native-input")){let y=document.createElement("div");y.className="terminal-shortcuts",t.push(y),g.before(y),p.push((0,vf.createPortal)((0,wo.jsx)(PK,{disabled:!1}),y))}let v=e.querySelector("[data-composer-rail-host]");if(v&&!document.documentElement.classList.contains("is-wand-embed-terminal")&&!v.querySelector(".wand-composer-rail-submit")){let y=document.createElement("span");y.style.display="contents",t.push(y),v.appendChild(y),p.push((0,vf.createPortal)((0,wo.jsx)(NK,{}),y))}if(p.length){let y=document.createElement("div");t.push(y),y.dataset.terminalCreationMeasure="true",y.inert=!0,document.body.appendChild(y),a=(0,_K.createRoot)(y,{identifierPrefix:`wand-terminal-measure-${++OK}-`}),(0,vf.flushSync)(()=>a.render((0,wo.jsx)(Gv,{children:p})))}return o}catch(l){throw o(),l}}function RK(e,t){if(!Number.isFinite(e.deltaY)||e.deltaY===0||(t.accumulatedPixels+=e.deltaY,Math.abs(t.accumulatedPixels)<40))return 0;let r=t.accumulatedPixels<0?1:-1;return t.accumulatedPixels=0,r}function LK(e,t){let r=1,n=l=>{l.preventDefault(),r=1},a=l=>{l.preventDefault();let c=l.scale;typeof c=="number"&&Number.isFinite(c)&&(r=c)},o=l=>{l.preventDefault(),r>=1.08?t(1):r<=.92&&t(-1),r=1};e.addEventListener("gesturestart",n),e.addEventListener("gesturechange",a),e.addEventListener("gestureend",o)}var k2e=180,QV=80,C2e=80,S2e=180;function zK(e,t,r,n=Date.now()){if(!Number.isFinite(e.deltaY)||e.deltaY===0)return 0;var a=e.deltaY<0?-1:1,o=Math.abs(qK(e,r));return o===0||((t.direction!==a||n-t.lastEventAt>S2e)&&(t.accumulatedPixels=0),t.direction=a,t.lastEventAt=n,t.accumulatedPixels+=o,t.accumulatedPixels<QV)||n-t.lastPageAt<C2e?0:(t.accumulatedPixels%=QV,t.lastPageAt=n,a)}var ZV=60,F2e=80;function D2e(e,t,r=Date.now()){if(!Number.isFinite(e)||e===0||(t.accumulatedPixels+=e,Math.abs(t.accumulatedPixels)<ZV)||r-t.lastPageAt<F2e)return 0;var n=t.accumulatedPixels>0?1:-1;return t.accumulatedPixels-=n*ZV,t.lastPageAt=r,n}function HK(e,t,r,n,a=Date.now()){if(!Number.isFinite(e.deltaY)||e.deltaY===0)return 0;var o=qK(e,n);if(!Number.isFinite(o)||o===0)return 0;a-t.lastEventAt>k2e&&(t.accumulatedPixels=0),t.lastEventAt=a;var l=Number.isFinite(r)&&r>0?r:16;t.accumulatedPixels+=o;var c=Math.trunc(t.accumulatedPixels/l);return c===0?0:(t.accumulatedPixels-=c*l,c)}function hB(e){return e<0?"\x1B[5~":e>0?"\x1B[6~":""}function qK(e,t){return e.deltaMode===1?e.deltaY*16:e.deltaMode===2?e.deltaY*Math.max(1,t):e.deltaY}function ry(e){let t=typeof e=="string"?e.trim():"";return!t||!fi(["localPreview"])?!1:g1(t)?El.openPreview(t):t.startsWith("/")?El.openFile(t):El.openUrl(t)}var Tu=new Map;function WK(e){return{...e.base,data:e.prefix+e.base.data,pending:[...e.base.pending,...e.live?[{type:"data",data:e.live}]:[]],historyBefore:e.before}}function VK(e,t){let r=Tu.get(e);return r?.base===t&&!r.stale?WK(r):null}function UK(e,t){Tu.delete(e),!(!t||t.version!==1||!Number.isSafeInteger(t.historyBefore)||!Number.isSafeInteger(t.historyRevision))&&Tu.set(e,{base:t,prefix:"",before:t.historyBefore,revision:t.historyRevision,live:"",stale:!1,resyncRequested:!1,loading:!1})}function A2e(e,t){let r=Tu.get(e);!r||r.stale||(r.live+=t,r.live.length>2e5&&(r.live="",r.stale=!0))}async function KK(e,t){let r=Tu.get(e);if(!r||r.loading||r.before<=0)return;if(r.stale){if(!r.resyncRequested&&m.ws?.readyState===WebSocket.OPEN)try{m.ws.send(JSON.stringify({type:"resync",sessionId:e})),r.resyncRequested=!0}catch{}return}r.loading=!0;let n=r.before;try{let a=await fetch(`/api/sessions/${encodeURIComponent(e)}/pty-history?before=${n}&revision=${r.revision}`,{credentials:"same-origin"});if(a.status===409){Tu.delete(e),m.ws?.readyState===WebSocket.OPEN&&m.ws.send(JSON.stringify({type:"resync",sessionId:e}));return}let o=await Dt(a);if(Tu.get(e)!==r||r.stale||r.before!==n||!Number.isSafeInteger(o.start)||o.start<0||o.start>=n||o.before!==n||o.revision!==r.revision||typeof o.data!="string"||o.separator!==""&&o.separator!==`\r
|
|
258
|
-
`)return;let l=o.data+o.separator+r.prefix;await t({...WK(r),data:l+r.base.data,historyBefore:o.start},n-o.start)&&Tu.get(e)===r&&!r.stale&&r.before===n&&(r.prefix=l,r.before=o.start)}catch{}finally{r.loading=!1}}function $2e(e){Tu.delete(e)}var I6=new WeakMap,B2e=64*1024;function GK(e,t,r,n,a,o){let l=I6.get(e);if(l&&l.tail===r&&l.current()&&n()&&l.chars+t.length<=B2e)return l.chunks.push(t),l.chars+=t.length,l.consumed.push(o),l.tail;let c={chunks:[t],chars:t.length,tail:Promise.resolve(),current:n,consumed:[o]};return c.tail=r.catch(()=>{}).then(async()=>{I6.get(e)===c&&I6.delete(e);try{if(!n())return;await new Promise((d,p)=>{try{e.write(c.chunks.join(""),d)}catch(h){p(h)}}),n()&&a()}finally{for(let d of c.consumed)try{d()}catch{}}}),I6.set(e,c),c.tail}po.subscribe(()=>{m.terminal&&(m.terminal.options.theme=Sc())});function VE(e){m.workingDir=e;try{localStorage.setItem("wand-working-dir",e)}catch{}I2e(e)}function I2e(e){return fetch("/api/recent-paths",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({path:e})}).then(function(t){return Dt(t)}).catch(function(t){console.warn("[wand] \u8BB0\u5F55\u6700\u8FD1\u8DEF\u5F84\u5931\u8D25\uFF1A"+ei(t,"\u672A\u77E5\u9519\u8BEF"))})}function gy(e,t){var r=m.sessions.find(function(a){return a.id===m.selectedId});if(r){var n=r[e];if(!n){Ye("\u5F53\u524D\u4F1A\u8BDD\u6CA1\u6709\u53EF\u590D\u5236\u7684\u5185\u5BB9\u3002","error");return}AX(String(n),null,function(){Ye(t||"\u5DF2\u590D\u5236","info")})}}function Jo(){return!m.terminal||!m.terminal.element?null:(m.terminalViewportEl=m.terminal.element.querySelector(".xterm-viewport"),m.terminalViewportEl)}function Ps(){var e=document.getElementById("terminal-jump-bottom"),t=!!m.selectedId&&m.currentView==="terminal"&&!m.terminalAutoFollow&&!o$();m.showTerminalJumpToBottom=t,e&&e.classList.toggle("visible",t);var r=document.getElementById("output");r&&r.classList.toggle("has-jump-btn",t)}function o$(){if(m.terminal?.buffer?.active){var e=m.terminal.buffer.active;return e.viewportY>=e.baseY}var t=Jo();if(!t)return!0;var r=t.scrollHeight-t.clientHeight-t.scrollTop;return r<=2}function s$(e){if(m.terminal){var t=Jo();if(t){var r=e?500:120;m.terminalProgrammaticScrollUntil=Math.max(m.terminalProgrammaticScrollUntil,Date.now()+r),e?t.scrollTo({top:t.scrollHeight,behavior:"smooth"}):m.terminal.scrollToBottom()}}}function T1(){m.terminalAutoFollow=!1,m.terminalProgrammaticScrollUntil=0,Ps()}function Dl(e){if(m.terminal){var t=e==="force";if(t){m.terminalAutoFollow=!0,s$(!1),Ps();return}if(!m.terminalAutoFollow){Ps();return}s$(!1),Ps()}}function JV(){if(!D9){var e=typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):function(t){return window.setTimeout(t,16)};D9=e(function(){D9=0,Dl()})}}function Q6(e){if(!(m.terminal!==e||m.terminalAutoFollow!==!1||Date.now()<m.terminalProgrammaticScrollUntil||e.buffer.active.type!=="normal")&&!(e.buffer.active.viewportY>12||!m.selectedId)){var t=m.selectedId;KK(t,async function(r){return m.terminal!==e||m.selectedId!==t?!1:(yE(t,r,m.terminalOutput,!0),await m.terminalWriteQueue,m.terminal===e&&m.selectedId===t)})}}function M2e(e,t){var r=null,n=0,a=16,o=0,l=0,c={accumulatedPixels:0,lastPageAt:0};function d(){try{var v=e.querySelector(".xterm-screen");if(v&&t.rows>0){var y=v.clientHeight/t.rows;if(y>4)return y}}catch{}var w=getComputedStyle(e).getPropertyValue("--term-row-height").trim(),x=parseFloat(w);return x>0?x:16}function p(){try{return!!t.element&&t.element.classList.contains("enable-mouse-events")}catch{return!1}}function h(v,y){var w=t.cols||80,x=t.rows||24,k=1,F=1;try{var C=e.querySelector(".xterm-screen");if(C){var D=C.getBoundingClientRect();D.width>0&&D.height>0&&(k=Math.min(w,Math.max(1,Math.floor((y.clientX-D.left)/(D.width/w))+1)),F=Math.min(x,Math.max(1,Math.floor((y.clientY-D.top)/(D.height/x))+1)))}}catch{}var S=v>0?65:64;return"\x1B[<"+S+";"+k+";"+F+"M"}e.addEventListener("touchstart",function(v){if(v.touches.length!==1){r=null;return}var y=v.touches[0];r=y.identifier,n=y.clientY,a=d(),o=0,l=0,c.accumulatedPixels=0,c.lastPageAt=0},{passive:!0}),e.addEventListener("touchmove",function(v){if(r!==null){for(var y=null,w=0;w<v.touches.length;w++)if(v.touches[w].identifier===r){y=v.touches[w];break}if(y){v.cancelable&&v.preventDefault();var x=y.clientY-n;if(n=y.clientY,x!==0){l+=Math.abs(x);var k=t.buffer.active.type==="alternate";if(k){var F=D2e(-x,c,Date.now());if(F!==0){var C=p()?h(F,y):hB(F);C&&j1(C)}return}o-=x;var D=Math.trunc(o/a);D!==0&&(o-=D*a,t.scrollLines(D)),l>8&&(T1(),x>0&&Q6(t))}}}},{passive:!1});function g(){r=null}e.addEventListener("touchend",g,{passive:!0}),e.addEventListener("touchcancel",g,{passive:!0})}function T2e(e){var t=document.createElement("div");t.className="terminal-scrollbar";var r=document.createElement("div");r.className="terminal-scrollbar-track";var n=document.createElement("div");n.className="terminal-scrollbar-thumb",r.appendChild(n),t.appendChild(r),e.appendChild(t),m.terminalScrollbarEl=t,m.terminalScrollbarHideTimer=null,m.terminalScrollbarDragging=!1,m.terminalScrollbarRafPending=!1;function a(){m.terminalScrollbarHideTimer&&(clearTimeout(m.terminalScrollbarHideTimer),m.terminalScrollbarHideTimer=null),t.classList.add("visible")}function o(){m.terminalScrollbarDragging||(m.terminalScrollbarHideTimer&&clearTimeout(m.terminalScrollbarHideTimer),m.terminalScrollbarHideTimer=setTimeout(function(){m.terminalScrollbarHideTimer=null,m.terminalScrollbarDragging||t.classList.remove("visible")},1500))}function l(){m.terminalScrollbarRafPending=!1;var x=Jo();if(x){var k=x.scrollHeight,F=x.clientHeight;if(k<=F){t.classList.remove("visible");return}var C=r.clientHeight,D=Math.max(28,F/k*C),S=k-F,A=x.scrollTop/S,I=A*(C-D);n.style.height=D+"px",n.style.top=I+"px"}}function c(){m.terminalScrollbarRafPending||(m.terminalScrollbarRafPending=!0,requestAnimationFrame(l))}var d=Jo();d&&d.addEventListener("scroll",function(){a(),c(),o()},{passive:!0}),r.addEventListener("mousedown",function(x){if(x.target!==n){x.preventDefault();var k=Jo();if(k){var F=r.getBoundingClientRect(),C=(x.clientY-F.top)/F.height,D=k.scrollHeight-k.clientHeight;k.scrollTop=C*D}}});var p=0,h=0;n.addEventListener("mousedown",function(x){x.preventDefault(),x.stopPropagation(),m.terminalScrollbarDragging=!0,n.classList.add("dragging"),p=x.clientY;var k=Jo();h=k?k.scrollTop:0,document.addEventListener("mousemove",g),document.addEventListener("mouseup",v)});function g(x){x.preventDefault();var k=Jo();if(k){var F=r.clientHeight,C=k.scrollHeight,D=k.clientHeight,S=C-D;if(!(S<=0)){var A=Math.max(28,D/C*F),I=F-A;if(!(I<=0)){var j=x.clientY-p,$=j/I*S;k.scrollTop=h+$}}}}function v(){m.terminalScrollbarDragging=!1,n.classList.remove("dragging"),document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",v),o()}n.addEventListener("touchstart",function(x){if(x.touches.length===1){x.stopPropagation(),m.terminalScrollbarDragging=!0,n.classList.add("dragging"),p=x.touches[0].clientY;var k=Jo();h=k?k.scrollTop:0,document.addEventListener("touchmove",y,{passive:!1}),document.addEventListener("touchend",w),document.addEventListener("touchcancel",w)}},{passive:!1});function y(x){if(x.touches.length===1){x.preventDefault();var k=Jo();if(k){var F=r.clientHeight,C=k.scrollHeight,D=k.clientHeight,S=C-D;if(!(S<=0)){var A=Math.max(28,D/C*F),I=F-A;if(!(I<=0)){var j=x.touches[0].clientY-p,$=j/I*S;k.scrollTop=h+$}}}}}function w(){m.terminalScrollbarDragging=!1,n.classList.remove("dragging"),document.removeEventListener("touchmove",y),document.removeEventListener("touchend",w),document.removeEventListener("touchcancel",w),o()}t.addEventListener("mouseenter",function(){a()}),t.addEventListener("mouseleave",function(){m.terminalScrollbarDragging||o()}),c()}var j2e=150,_2e=30,P2e=160*1024,N2e=192*1024,D9=0,O2e=120,R2e=120,L2e=800,z2e=1500,H2e=5e3,q2e=3e3;function XK(e){return m.terminal?(m.terminal.refresh(0,Math.max(0,m.terminal.rows-1)),!0):!1}function W2e(e){m.softResyncTimer&&clearTimeout(m.softResyncTimer),m.softResyncTimer=setTimeout(function(){m.softResyncTimer=null,XK()},typeof e=="number"?e:0)}function U1(e){return!e||e.length<=N2e?e:e.slice(-P2e)}function YK(e){return!m.ws||m.ws.readyState!==WebSocket.OPEN?!1:(m.ws.send(JSON.stringify(e)),!0)}function j1(e,t){return!m.selectedId||!e||m.terminalRestoring?!1:YK({type:"pty_input",sessionId:m.selectedId,data:e,shortcutKey:t,userInput:m.terminalInteractive===!0})}function eU(e,t){!e||!(t>0)||YK({type:"pty_ack",sessionId:e,bytes:t})}var gB=0;function vE(e,t){var r=typeof e=="number"?e:Date.now(),n=r+(typeof t=="number"?t:z2e);return new Promise(function(a){(function o(){var l=Date.now(),c=gB,d=c>r?Math.max(c+R2e,r+O2e):r+L2e;if(l>=d||l>=n){a(null);return}setTimeout(o,Math.max(10,Math.min(60,d-l)))})()})}function V2e(e){var t=Date.now(),r=t+q2e,n=t+(typeof e=="number"?e:H2e);return new Promise(function(a){(function o(){var l=Date.now();if(l>=n){a(null);return}if(l>=r&&gB>t){vE(l).then(function(){a(null)});return}setTimeout(o,50)})()})}function bE(e,t,r,n){if(!e||t==null||t==="")return r&&n&&eU(n,r),Promise.resolve();var a=String(t);gB=Date.now();var o=m.terminalWriteGeneration||0,l=m.terminalWriteQueue||Promise.resolve();return m.terminalWriteQueue=GK(e,a,l,function(){return e===m.terminal&&o===(m.terminalWriteGeneration||0)},function(){m.terminalAutoFollow!==!1&&s$(!1)},function(){r&&n&&eU(n,r)}),m.terminalWriteQueue}function U2e(){m.terminal&&(m.terminal.reset(),m.terminal.clear())}function l$(e,t){return new Promise(function(r){if(!t){r(null);return}e.write(t,function(){r(null)})})}function yE(e,t,r,n=!1){if(!t||t.version!==1)return!1;if(e&&!n){var a=VK(e,t);m.terminalStatesBySession[e]=t,a?t=a:UK(e,t)}if(!m.terminal)return!0;var o=m.terminal;m.terminalWriteGeneration=(m.terminalWriteGeneration||0)+1;var l=(m.terminalRestoreGeneration||0)+1;m.terminalRestoreGeneration=l,m.terminalProgrammaticScrollUntil=Date.now()+400;var c=m.terminalWriteQueue||Promise.resolve();return m.terminalWriteQueue=c.catch(function(){}).then(async function(){if(!(o!==m.terminal||l!==m.terminalRestoreGeneration)){var d=m.terminalAutoFollow===!1,p=Jo(),h=Math.max(0,o.buffer.active.baseY-o.buffer.active.viewportY);!Number.isFinite(h)&&p&&(h=p.scrollHeight-p.clientHeight-p.scrollTop),m.terminalRestoring=!0;try{if(o.reset(),o.clear(),t.cols>0&&t.rows>0&&o.resize(t.cols,t.rows),await l$(o,String(t.data||"")),o!==m.terminal||l!==m.terminalRestoreGeneration)return;for(var g=Array.isArray(t.pending)?t.pending:[],v=0;v<g.length;v++){if(o!==m.terminal||l!==m.terminalRestoreGeneration)return;var y=g[v]||{};y.type==="resize"&&y.cols>0&&y.rows>0?o.resize(y.cols,y.rows):y.type==="data"&&await l$(o,String(y.data||""))}if(o!==m.terminal||l!==m.terminalRestoreGeneration)return;m.lastResize={cols:o.cols,rows:o.rows},m.terminalSessionId=e||null,m.terminalOutput=String(r||""),m.terminalProgrammaticScrollUntil=Date.now()+120,d&&h>0?(m.terminalAutoFollow=!1,m.terminalFitAddon&&typeof m.terminalFitAddon.fit=="function"&&md(o,m.terminalFitAddon),o.scrollToLine(Math.max(0,o.buffer.active.baseY-h))):(m.terminalAutoFollow=!0,m.terminalFitAddon&&typeof m.terminalFitAddon.fit=="function"&&md(o,m.terminalFitAddon),o.scrollToBottom()),Ps()}finally{o===m.terminal&&(m.terminalRestoring=!1)}o===m.terminal&&l===m.terminalRestoreGeneration&&hy(o.cols,o.rows)}}),!0}function ny(e,t,r){if(!m.terminal)return!1;var n=String(t||""),a=e||null,o=r||{},l=o.mode==="replace",c=m.terminalSessionId!==a,d=String(m.terminalOutput||""),p=!1;if(c||l){var h=m.terminal,g=(m.terminalWriteGeneration||0)+1;m.terminalWriteGeneration=g,m.terminalRestoreGeneration=(m.terminalRestoreGeneration||0)+1,m.terminalWriteQueue=(m.terminalWriteQueue||Promise.resolve()).catch(function(){}).then(async function(){if(!(h!==m.terminal||g!==m.terminalWriteGeneration)){m.terminalRestoring=!0;try{U2e(),await l$(h,n)}finally{h===m.terminal&&(m.terminalRestoring=!1)}}}),p=!!n||c}else if(n.startsWith(d)){var v=n.slice(d.length);v&&(bE(m.terminal,v),p=!0)}else return!1;return m.terminalSessionId=a,m.terminalOutput=n,o.scroll!==!1&&p&&Dl("output"),c&&hy(m.terminal.cols,m.terminal.rows),p}var M6=!1,$u=null,Ms=null;function QK(e,t){let r=e.parentElement;if(!r||!t&&e.offsetWidth>0&&e.offsetHeight>0)return function(){};let n=[],a=[],o=[],l=function(p,h,g){o.push({node:p,property:h,value:p.style.getPropertyValue(h),priority:p.style.getPropertyPriority(h)}),p.style.setProperty(h,g,"important")},c=function(p){if(!(p>0))return;let h=document.createElement("div");h.dataset.terminalCreationSpace="true",Object.assign(h.style,{height:`${p}px`,flexShrink:"0",visibility:"hidden"}),n.push(h),r.insertBefore(h,e)},d=function(){try{for(let p of a)p()}finally{for(let p of n)p.remove();for(let p of o.reverse())p.value?p.node.style.setProperty(p.property,p.value,p.priority):p.node.style.removeProperty(p.property)}};try{if(l(e,"display","flex"),l(e,"visibility","hidden"),t&&!document.documentElement.classList.contains("is-wand-embed-terminal")){let p="terminal-creation-measurement",h=QU({...m,selectedId:p,currentTask:null,gitStatus:null,currentView:"terminal",sessions:[{id:p,sessionKind:"pty",status:"running",cwd:t.cwd||m.workingDir,provider:t.kind==="shell"?void 0:t.provider,command:t.command||(t.kind==="shell"?"Shell":t.provider)}]},vK()),g={id:p,sessionKind:"pty",status:"running",provider:t.kind==="shell"?void 0:t.provider,command:t.command||(t.kind==="shell"?"Shell":t.provider),cwd:t.cwd,workspaceTaskId:t.workspaceTaskId},v=r.closest(".quick-terminal-workspace")?.querySelector(".quick-terminal-toolbar"),y=r.querySelector(".main-header-row, .workspace-tab-bar"),w=v?.clientWidth||r.clientWidth,x=h.viewport.mobile?y2e(h,w):t.workspaceTaskId?w2e({mobile:!1,taskName:Wr.getSnapshot().taskName,session:g},w):x2e({mobile:!1,session:g},w),k=v||y;k?(l(k,"box-sizing","border-box"),l(k,"height",`${x}px`),l(k,"min-height",`${x}px`),l(k,"max-height",`${x}px`)):c(x);for(let F of r.querySelectorAll(".workspace-mobile-navigation, .workspace-window"))l(F,"display","none")}for(let p of Array.from(r.children))if(!(!(p instanceof HTMLElement)||p===e)&&((p.id==="chat-output"||p.id==="blank-chat")&&l(p,"display","none"),p.classList.contains("input-panel"))){if(document.documentElement.classList.contains("is-wand-embed-terminal")&&document.documentElement.classList.contains("is-wand-native-input"))continue;getComputedStyle(p).display==="none"&&(l(p,"display","block"),l(p,"visibility","hidden")),t&&(l(p,"visibility","hidden"),a.push(E2e(p)))}}catch(p){throw d(),p}return d}function K2e(e){let t=document.getElementById("output");if(!t||!m.terminal)return null;let r=QK(t,e);try{return MK(m.terminal)}finally{r()}}function Ns(e){if(!e?.prepare&&Ar.getSnapshot().active===!0)return;Ms&&!Ms.wrap.isConnected&&Ms.release();var t=document.getElementById("output");if(!t||m.terminal||m.terminalInitializing)return;var r=m.sessions.find(function(D){return D.id===m.selectedId});if(!e?.prepare&&(!r||cr(r))||!e?.prepare&&$u&&$u===m.selectedId)return;if(typeof XTermLib>"u"||!XTermLib.Terminal){if(M6||$u===m.selectedId)return;M6=!0;let D=document.createElement("div");D.dataset.terminalLoadState="loading",D.setAttribute("role","status"),t.querySelector("[data-terminal-load-state]")?.remove(),D.textContent="\u6B63\u5728\u52A0\u8F7D\u7EC8\u7AEF\u2026",t.appendChild(D),Yc().then(()=>{M6=!1,$u=null,Ns(e)}).catch(()=>{if(M6=!1,m.terminal||Ms)return;let S=m.sessions.find(I=>I.id===m.selectedId),A=document.getElementById("output");if($u=S&&!cr(S)?S.id:null,A?.isConnected&&$u){A.querySelector("[data-terminal-load-state]")?.remove();let I=document.createElement("div");I.dataset.terminalLoadState="error";let j=document.createElement("button");j.type="button",j.dataset.antdControl="default",j.textContent="\u7EC8\u7AEF\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF0C\u70B9\u51FB\u91CD\u8BD5",I.appendChild(j),A.appendChild(I),R1(A),I.querySelector("button")?.addEventListener("click",()=>{$u=null,Ns()})}});return}m.terminalInitRetries=0,m.terminalInitializing=!0,t.querySelector("[data-terminal-load-state]")?.remove(),R1(t);var n=!!r&&!cr(r)&&m.currentView==="terminal";n&&(t.classList.remove("hidden"),t.classList.add("active"));for(var a=t.querySelectorAll(".terminal-scroll-wrap"),o=0;o<a.length;o++){var l=a[o];l.parentNode===t&&t.removeChild(l)}var c=document.createElement("div");c.className="terminal-scroll-wrap",t.appendChild(c);var d=getComputedStyle(c),p=d.getPropertyValue("--term-font-family").trim()||"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",h=m.terminalBaseFontSize,g=Math.max(8,Math.round(h*Number(m.terminalScale||1))),v=null,y=null,w=!1;let x={wrap:c,release:function(){if(w)return;w=!0;let D=Ms===x;if(D&&(Ms=null),v&&m.terminal===v){try{my()}catch{try{y?.dispose?.()}catch{}try{v?.dispose?.()}catch{}m.terminal=null,m.terminalFitAddon=null,c.remove()}window.__wandTerminal===v&&(window.__wandTerminal=null)}else{try{y?.dispose?.()}catch{}try{v?.dispose?.()}catch{}c.remove()}D&&!m.terminal&&(m.terminalInitializing=!1)}};Ms=x;let k=function(D){let S=Ms===x||v&&m.terminal===v;if(x.release(),S){console.error("[wand] xterm init failed:",D);let A=m.sessions.find(I=>I.id===m.selectedId);if(t.isConnected&&A&&!cr(A)){$u=A.id;let I=document.createElement("div");I.dataset.terminalLoadState="error";let j=document.createElement("button");j.type="button",j.dataset.antdControl="default",j.textContent="\u7EC8\u7AEF\u672A\u80FD\u6253\u5F00\uFF0C\u70B9\u51FB\u91CD\u8BD5",I.appendChild(j),t.appendChild(I),R1(t),I.querySelector("button")?.addEventListener("click",()=>{$u=null,Ns()})}}};try{v=new XTermLib.Terminal({cols:120,rows:36,allowProposedApi:!0,convertEol:!1,cursorBlink:!1,disableStdin:!1,fontFamily:p,fontSize:g,lineHeight:1.25,scrollback:5e3,theme:Sc()}),y=new XTermLib.FitAddon;var F=new XTermLib.Unicode11Addon;v.loadAddon(y),v.loadAddon(F),v.unicode.activeVersion="11";var C=document.fonts&&typeof document.fonts.ready=="object"?Promise.race([document.fonts.ready,new Promise(function(D){setTimeout(D,800)})]):Promise.resolve();C.then(function(){if(Ms!==x||!c.isConnected||document.getElementById("output")!==t||!e?.prepare&&Ar.getSnapshot().active===!0){x.release();return}let D=e?.prepare?QK(t):function(){};try{let H=function(){try{var q=c.querySelector(".xterm-screen");if(q&&v.rows>0){var L=q.clientHeight/v.rows;if(L>4)return L}}catch{}return Math.max(1,g*1.25)};var S=H;v.options.theme=Sc(),v.open(c),v.registerLinkProvider({provideLinks:function(q,L){for(var O=v.buffer.active.getLine(q),W=O?O.translateToString(!0):"",z=[],Y=/https?:\/\/(?:localhost|127\.0\.0\.1|\[::1\])(?::\d+)?(?:\/[^\s]+)?/gi,G;(G=Y.exec(W))!==null;){var Z=G.index+1,T=G.index+G[0].length;z.push({text:G[0],range:{start:{x:Z,y:q},end:{x:T,y:q}},activate:function(J,se){ry(se)}})}for(var V=/(^|[\s(\['"])(\/[^\s]+?\.(?:html?|\/))(?=$|[\s)\]'"])/gi;(G=V.exec(W))!==null;){var X=G[2],Q=G.index+G[1].length+1,re=G.index+G[1].length+X.length;z.push({text:X,range:{start:{x:Q,y:q},end:{x:re,y:q}},activate:function(J,se){ry(se)}})}L(z.length?z:void 0)}}),v.attachCustomKeyEventHandler(function(q){if(!m.terminalInteractive||q.defaultPrevented)return!1;let L=Za.read(m.selectedId);if(q.type!=="keydown"||q.isComposing||q.keyCode===229||q.metaKey||!L.ctrl&&!L.shift||q.ctrlKey&&q.key.toLowerCase()==="c"&&ly())return!0;let O=HE(AE(q),J1(m.selectedId,{ctrl:q.ctrlKey,shift:q.shiftKey,alt:q.altKey}));return O===null?!0:(q.preventDefault(),j1(O,L.ctrl&&q.key.length===1?"ctrl_"+q.key.toLowerCase():AE(q)),!1)});var A={direction:0,accumulatedPixels:0,lastEventAt:0,lastPageAt:0},I={accumulatedPixels:0,lastEventAt:0},j={accumulatedPixels:0};LK(c,function(q){uy(q*.25)}),c.addEventListener("wheel",function(q){if(q.ctrlKey||q.metaKey){q.preventDefault(),q.stopPropagation();var L=RK(q,j);L!==0&&uy(L*.25);return}if(!(Math.abs(q.deltaY)<=Math.abs(q.deltaX))){if(q.preventDefault(),q.stopPropagation(),v.buffer.active.type==="alternate"){var O=Jo(),W=zK(q,A,O?O.clientHeight:v.rows*H()),z=hB(W);z&&j1(z);return}q.deltaY<0&&T1();var Y=HK(q,I,H(),v.rows*H());Y!==0&&v.scrollLines(Y)}},{capture:!0,passive:!1});var $=c.querySelector(".xterm-helper-textarea");$&&($.readOnly=vd()?!0:!m.terminalInteractive),Hke(),$E(),m.terminal=v;try{window.__wandTerminal=v}catch{}m.terminalFitAddon=y,m.terminalWriteQueue=Promise.resolve(),m.terminalInitializing=!1,md(v,y),v.onData(function(q){j1(q)}),v.onBinary(function(q){m.terminalInteractive&&j1(q)}),v.onResize(function(q){hy(q.cols,q.rows)}),m.terminalAutoFollow=!0;var P=Jo();if(P&&(m.terminalViewportScrollHandler=function(){if(Date.now()<m.terminalProgrammaticScrollUntil){Ps();return}o$()?m.terminalAutoFollow=!0:T1(),Ps(),Q6(v)},P.addEventListener("scroll",m.terminalViewportScrollHandler,{passive:!0})),m.terminalWheelHandler=function(q){q.deltaY<0&&v.buffer.active.type==="normal"&&(T1(),Q6(v))},t.addEventListener("wheel",m.terminalWheelHandler,{capture:!0,passive:!0}),v.onScroll(function(){Date.now()<m.terminalProgrammaticScrollUntil||(o$()?m.terminalAutoFollow=!0:m.terminalAutoFollow&&T1(),Ps(),Q6(v))}),T2e(t),M2e(c,v),m.selectedId){var N=m.sessions.find(function(q){return q.id===m.selectedId}),R=N&&m.terminalStatesBySession[N.id],U=N&&(N.terminalState||R);N&&!yE(N.id,U,N.output||"")&&ny(N.id,N.output||"",{mode:"replace",scroll:!1})}else bE(v,`\u70B9\u51FB\u4E0A\u65B9\u300C\u65B0\u5BF9\u8BDD\u300D\u5F00\u59CB\u4F60\u7684\u7B2C\u4E00\u6B21\u5BF9\u8BDD\u3002\r
|
|
259
|
-
`);m.terminalClickHandler=function(q){if(!ly()){if(vd()){$E();return}m.terminalInteractive?v.focus():Ml(q)}},t.addEventListener("click",m.terminalClickHandler),Ps(),l2e(),u2e(),c2e(),qi("mount"),document.documentElement.classList.contains("is-wand-embed-terminal")&&[120,350,700].forEach(function(q){setTimeout(function(){m.terminal&&qi("embed-settle")},q)}),Ms===x&&(Ms=null)}finally{D()}}).catch(k)}catch(D){k(D)}}function G2e(e,t){return e===t?!0:!e||!t?!1:e.total===t.total&&e.command===t.command&&e.file===t.file&&e.tool===t.tool}function X2e(e,t){return e.key!==t.key||e.target!==t.target?!1:e.kind==="auto-approve"&&t.kind==="auto-approve"?e.sessionId===t.sessionId&&e.enabled===t.enabled&&e.pending===t.pending:e.kind==="permissions"&&t.kind==="permissions"?e.sessionId===t.sessionId&&e.pending===t.pending&&e.permission.requestId===t.permission.requestId&&e.permission.label===t.permission.label&&e.permission.autoApproving===t.permission.autoApproving:e.kind==="approval-stats"&&t.kind==="approval-stats"?G2e(e.stats,t.stats):!1}var Y2e=class extends Vs{constructor(){super(X2e)}},V0=new Y2e,Q2e=B(er(),1);function vy(e){let t=[];document.querySelectorAll(e.selector).forEach((n,a)=>{if(!n.isConnected)return;let o=e.build(n,a);o&&t.push(o)});let r=()=>{t.length===0?e.store.clear():e.store.sync(t)};e.flush?(0,Q2e.flushSync)(r):r()}function Z2e(e){return!e||e.autoApproveHidden?{visible:!1,enabled:!1}:{visible:!0,enabled:e.autoApproveEnabled}}function J2e(e){return e&&e.total>0?e:null}function e6e(e){let t=e.resolve();vy({selector:"[data-composer-badge-host]",store:V0,build(r,n){let a=r.dataset.composerBadgeHost,o=a||`composer-badge-${n}`;if(a==="auto-approve"){let{visible:l,enabled:c}=Z2e(t);if(r.classList.toggle("hidden",!l),!l||!t)return null;let d=t.sessionId;return{key:o,kind:"auto-approve",target:r,sessionId:d,pending:t.autoApprovePending,enabled:c,onToggle(){e.onToggleAutoApprove(d)}}}if(a==="permissions"){if(r.classList.toggle("hidden",!t?.permission),!t?.permission)return null;let{sessionId:l,permission:c}=t;return{key:o,kind:"permissions",target:r,sessionId:l,pending:t.permissionPending,permission:c,onAction(d){e.onPermissionAction(l,c.requestId,d)}}}if(a==="approval-stats"){let l=J2e(t?.approvalStats);return r.classList.toggle("hidden",!l),{key:o,kind:"approval-stats",target:r,stats:l}}return null}})}function ZK(e){if(!e||e.provider==="codex")return null;let t=e.pendingEscalation;if(!t&&!e.permissionBlocked)return null;let r=!!e.autoApprovePermissions,n=r?"\u81EA\u52A8\u6279\u51C6\u4E2D...":t?(t.reason||"\u7B49\u5F85\u6388\u6743")+(t.target?` \xB7 ${t.target}`:""):"\u7B49\u5F85\u6388\u6743";return{requestId:t?.requestId||null,label:n,autoApproving:r}}function t6e(e){var t=e&&e.messages;if(!t||t.length===0)return"";for(var r=t.length-1;r>=0;r--){var n=t[r];if(n.role==="assistant"){for(var a=n.content||[],o=0;o<a.length;o++)if(a[o].type==="text"&&a[o].text&&a[o].text.trim()){var l=a[o].text.trim();l=l.replace(/^#+\s+/gm,"").replace(/\*\*/g,"").replace(/`/g,"");var c=l.split(`
|
|
260
|
-
`)[0].trim();return c.slice(0,100)}}}return""}function r6e(e,t){let r=m.sessions.find(n=>n.id===e);r&&(r.output=U1((r.output||"")+t))}function JK(e,t){let r=m.sessions.find(n=>n.id===e);r&&(r.output=U1(t))}var on=new Map,vB=new Map,Os=new Set,u$=new Set;function j0(e){for(let t of Os){if(e.sessionId&&e.sessionId!==t)continue;let r=on.get(t);r&&["init","disconnected","connected","pty_error","resync_required","ended","error"].includes(e.type)&&(r.terminal.options.disableStdin=e.type!=="init"||["stopped","exited","failed"].includes(e.data?.status))}for(let t of u$)t(e)}function n6e(e){return u$.add(e),()=>{u$.delete(e)}}function a6e(e,t){t?Os.add(e):Os.delete(e)}function tU(e){return Os.has(e)}function i6e(e){on.get(e)?.terminal.focus()}function o6e(e){hd({type:"subscribe",mode:"add",sessionId:e,compactTools:!0,capabilities:{ptyAck:!0}})}function eG(e){return Math.round(Math.max(.5,Math.min(2,e))*4)/4}function bB(){return m.ws&&m.ws.readyState===WebSocket.OPEN?m.ws:null}function hd(e){let t=bB();t&&t.send(JSON.stringify(e))}function s6e(){return(typeof getComputedStyle=="function"?getComputedStyle(document.documentElement).getPropertyValue("--term-font-family").trim():"")||"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"}function c$(e=Number(m.terminalScale||1)){let t=m.terminalBaseFontSize||13;return Math.max(8,Math.round(t*e))}function A9(e,t){if(!on.get(e)?.restoring){if(Os.has(e)&&!bB()){j0({sessionId:e,type:"pty_error"});return}hd({type:"pty_input",sessionId:e,data:t,userInput:Os.has(e)||m.terminalInteractive===!0})}}function yB(e,t,r){let n=on.get(e);if(n?.restoring||!bB())return;let a=Math.max(20,Math.min(Math.floor(t),1e3)),o=Math.max(5,Math.min(Math.floor(r),500)),l=`${a}x${o}`;n?.lastSize!==l&&(n&&(n.lastSize=l),hd({type:"pty_resize",sessionId:e,cols:a,rows:o}))}function Z6(e){if(e.disposed||e.restoring||Os.has(e.sessionId)&&(e.container.clientWidth<=0||e.container.clientHeight<=0))return;try{md(e.terminal,e.fitAddon)}catch{}let t=Number(e.terminal.cols),r=Number(e.terminal.rows);t>0&&r>0&&yB(e.sessionId,t,r)}function d$(e){requestAnimationFrame(()=>{Z6(e),requestAnimationFrame(()=>Z6(e))}),window.setTimeout(()=>Z6(e),120)}function bf(e){return vB.get(e)??eG(Number(m.terminalScale||1))}function ay(e,t){let r=eG(t);vB.set(e,r);let n=on.get(e);return!n||n.disposed||(n.terminal.options.fontSize=c$(r),d$(n)),r}po.subscribe(()=>{for(let e of on.values())e.disposed||(e.terminal.options.theme=Sc())});function N0(e){return on.has(e)}function l6e(e){return!!on.get(e)?.terminal?.modes?.bracketedPasteMode}function p$(e,t,r=e.restoreGeneration){return!t||e.disposed||r!==e.restoreGeneration?Promise.resolve():new Promise(n=>{try{e.terminal.write(t,()=>n())}catch{n()}})}function UE(e,t){if(!e||!t)return!1;let r=on.get(e);if(r&&!r.disposed){if(r.container!==t){try{r.resizeObserver.disconnect()}catch{}t.appendChild(r.wrap),r.container=t,r.resizeObserver.observe(t)}return d$(r),!0}let n=globalThis.XTermLib;if(!n||!n.Terminal||!n.FitAddon)return!1;let a=document.createElement("div");a.className="terminal-scroll-wrap pooled-terminal-wrap",a.dataset.ptySessionId=e,t.appendChild(a);let o=null,l=null,c=null;try{let d=new n.Terminal({cols:120,rows:36,allowProposedApi:!0,convertEol:!1,cursorBlink:!1,disableStdin:Os.has(e),fontFamily:s6e(),fontSize:c$(bf(e)),lineHeight:1.25,scrollback:5e3,theme:Sc()});o=d;let p=new n.FitAddon;l=p;let h=null;try{n.Unicode11Addon&&(h=new n.Unicode11Addon,d.loadAddon(h),d.unicode.activeVersion="11")}catch{}d.loadAddon(p),d.open(a);try{md(d,p)}catch{}d.onData(S=>A9(e,S)),d.onBinary(S=>{(Os.has(e)||m.terminalInteractive)&&A9(e,S)}),d.onResize(S=>yB(e,S.cols,S.rows));let g=new ResizeObserver(()=>{let S=on.get(e);S&&Z6(S)});c=g,g.observe(t);let v={direction:0,accumulatedPixels:0,lastEventAt:0,lastPageAt:0},y={accumulatedPixels:0,lastEventAt:0},w=()=>{let S=on.get(e);!S||S.autoFollow||S.disposed||d.buffer.active.type!=="normal"||d.buffer.active.viewportY>12||KK(e,async A=>on.get(e)!==S?!1:(wE(e,A,"",!0),await S.writeQueue,on.get(e)===S))},x=()=>{try{let S=a.querySelector(".xterm-screen");if(S&&d.rows>0){let A=S.clientHeight/d.rows;if(A>4)return A}}catch{}return Math.max(1,c$(bf(e))*1.25)},k={accumulatedPixels:0};LK(a,S=>{ay(e,bf(e)+S*.25)}),a.addEventListener("wheel",S=>{if(S.ctrlKey||S.metaKey){S.preventDefault(),S.stopPropagation();let I=RK(S,k);I!==0&&ay(e,bf(e)+I*.25);return}if(Math.abs(S.deltaY)<=Math.abs(S.deltaX))return;if(S.preventDefault(),S.stopPropagation(),d.buffer.active.type==="alternate"){let I=zK(S,v,t.clientHeight||d.rows*x()),j=hB(I);j&&A9(e,j);return}if(S.deltaY<0){let I=on.get(e);I&&(I.autoFollow=!1)}let A=HK(S,y,x(),t.clientHeight||d.rows*x());if(A!==0&&d.scrollLines(A),S.deltaY<0&&w(),d.buffer.active.viewportY>=d.buffer.active.baseY){let I=on.get(e);I&&(I.autoFollow=!0)}},{capture:!0,passive:!1}),d.onScroll(()=>{let S=on.get(e);S&&d.buffer.active.viewportY>=d.buffer.active.baseY&&(S.autoFollow=!0)});let F={sessionId:e,terminal:d,fitAddon:p,wrap:a,container:t,resizeObserver:g,writeQueue:Promise.resolve(),wheelPagingState:v,wheelScrollState:y,autoFollow:!0,restoreGeneration:0,restoring:!1,disposed:!1};on.set(e,F);let C=m.sessions.find(S=>S.id===e),D=m.terminalStatesBySession?.[e];return wE(e,C?.terminalState??D,C?.output||"")||J6(e,C?.output||""),hd({type:"subscribe",mode:"add",sessionId:e,compactTools:!0,capabilities:{ptyAck:!0}}),d$(F),!0}catch(d){if(on.has(e))Tf(e);else{c?.disconnect();try{l?.dispose?.()}catch{}try{o?.dispose?.()}catch{}a.remove()}throw d}}function u6e(){for(let e of on.keys())hd({type:"subscribe",mode:"add",sessionId:e,compactTools:!0,capabilities:{ptyAck:!0}})}function c6e(e,t,r){r6e(e,t);let n=on.get(e);if(!n||n.disposed){r&&e&&hd({type:"pty_ack",sessionId:e,bytes:r});return}let a=n.restoreGeneration;n.writeQueue=GK(n.terminal,t,n.writeQueue,()=>!n.disposed&&a===n.restoreGeneration,()=>{n.autoFollow&&n.terminal.scrollToBottom()},()=>{r&&e&&hd({type:"pty_ack",sessionId:e,bytes:r})})}function J6(e,t){JK(e,t);let r=on.get(e);if(!r||r.disposed)return;let n=++r.restoreGeneration;r.writeQueue=r.writeQueue.catch(()=>{}).then(async()=>{if(!(r.disposed||n!==r.restoreGeneration)){r.restoring=!0;try{try{r.terminal.reset(),r.terminal.clear()}catch{}if(await p$(r,t,n),r.disposed||n!==r.restoreGeneration)return;try{r.terminal.scrollToBottom()}catch{}}finally{r.restoring=!1}}})}function wE(e,t,r="",n=!1){if(!t||t.version!==1)return!1;if(e&&!n){let l=VK(e,t);m.terminalStatesBySession[e]=t,l?t=l:UK(e,t)}n||JK(e,r);let a=on.get(e);if(!a||a.disposed)return!0;let o=++a.restoreGeneration;return a.writeQueue=a.writeQueue.catch(()=>{}).then(async()=>{if(a.disposed||o!==a.restoreGeneration)return;let l=!a.autoFollow,c=a.terminal.buffer.active.baseY-a.terminal.buffer.active.viewportY;a.restoring=!0;try{try{a.terminal.reset(),a.terminal.clear(),t.cols>0&&t.rows>0&&a.terminal.resize(t.cols,t.rows)}catch{}await p$(a,String(t.data||""),o);let d=Array.isArray(t.pending)?t.pending:[];for(let p of d){if(a.disposed||o!==a.restoreGeneration)return;if(p?.type==="resize"&&p.cols>0&&p.rows>0)try{a.terminal.resize(p.cols,p.rows)}catch{}else p?.type==="data"&&await p$(a,String(p.data||""),o)}if(a.disposed||o!==a.restoreGeneration)return;a.lastSize=`${a.terminal.cols}x${a.terminal.rows}`;try{md(a.terminal,a.fitAddon),l?(a.autoFollow=!1,a.terminal.scrollToLine(Math.max(0,a.terminal.buffer.active.baseY-c))):a.terminal.scrollToBottom()}catch{}}finally{a.restoring=!1}!a.disposed&&o===a.restoreGeneration&&yB(e,a.terminal.cols,a.terminal.rows)}),!0}function Tf(e){if(Os.has(e))return;vB.delete(e),$2e(e);let t=on.get(e);if(t){t.disposed=!0;try{t.resizeObserver.disconnect()}catch{}try{t.terminal.dispose()}catch{}t.wrap.parentNode&&t.wrap.parentNode.removeChild(t.wrap),on.delete(e),hd({type:"unsubscribe",sessionId:e})}}function by(){for(let e of[...on.keys()])Os.has(e)||Tf(e)}nxe({mount:UE,dispose:Tf,retain:a6e,focus:i6e,reconnect:o6e,observe:n6e});var f$=!1;function d6e(){f$=!1}function tG(e,t){return fetch(e,{...t,headers:{...t?.headers,"X-Wand-Tool-Projection":"compact"}})}function T6(e,t){if(e){m.turnActiveBySession||(m.turnActiveBySession={});var r=m.turnActiveBySession[e];m.turnActiveBySession[e]=t,r===!0&&!t&&yG()}}function m$(e){if(!(!m.ws||m.ws.readyState!==WebSocket.OPEN)){var t=m.chatResyncPendingBySession||(m.chatResyncPendingBySession={});if(!t[e]){t[e]=!0;try{m.ws.send(JSON.stringify({type:"resync",sessionId:e}))}catch(r){delete t[e],console.error("[wand] chat resync failed:",r)}}}}function j6(e){if(e!==m.selectedId)return null;var t=m.sessions.find(function(r){return r.id===e});return t?(m.currentMessages=es(t,Fl(t,t.output,!1)),t):null}function rG(){iG(),M6e(),bEe(),f6e(),!KE()&&(m.pollTimer=setInterval(Tl,1600))}var p6e=3e4,K1=null;function f6e(){K1===null&&(K1=setInterval(function(){var e=document.querySelectorAll(".session-time");e.length>0&&_0()},p6e))}function m6e(){K1!==null&&(clearInterval(K1),K1=null)}function wB(){m.wsReconnectTimer&&(clearTimeout(m.wsReconnectTimer),m.wsReconnectTimer=null)}var h6e=1e4,g6e=4e4;function v6e(){nG(),m.wsHeartbeatCheckTimer=setInterval(aG,h6e)}function nG(){m.wsHeartbeatCheckTimer&&(clearInterval(m.wsHeartbeatCheckTimer),m.wsHeartbeatCheckTimer=null)}function aG(){if(!(!m.ws||m.ws.readyState!==WebSocket.OPEN)&&m.lastWsMessageAt){var e=Date.now()-m.lastWsMessageAt;e>g6e&&xB("heartbeat-stale-"+Math.round(e/1e3)+"s")}}function xB(e){if(wB(),m.ws){var t=m.ws;try{t.onopen=null}catch{}try{t.onclose=null}catch{}try{t.onerror=null}catch{}try{t.onmessage=null}catch{}try{t.close()}catch{}m.ws=null}m.wsConnected=!1,m.wsReconnectAttempts=0,KE(e)}function rU(){if(!m.wsReconnectTimer&&!document.hidden){var e=m.wsReconnectAttempts||0,t=[500,1e3,2e3,4e3,8e3],r=t[e<t.length?e:t.length-1];m.wsReconnectAttempts=e+1,m.wsReconnectTimer=setTimeout(function(){m.wsReconnectTimer=null,m.config&&!m.ws&&!document.hidden&&KE("backoff")},r)}}function KE(e){if(!window.WebSocket)return!1;if(m.ws){if(m.ws.readyState===WebSocket.OPEN||m.ws.readyState===WebSocket.CONNECTING)return!0;m.ws.onopen=m.ws.onmessage=m.ws.onclose=m.ws.onerror=null;try{m.ws.close()}catch{}m.ws=null}var t=window.location.protocol==="https:"?"wss:":"ws:",r=t+"//"+window.location.host+"/ws";try{var n=new WebSocket(r);return m.ws=n,m.wsConnected=!1,n.onopen=function(){if(m.ws===n){try{window.__wandWs=n}catch{}m.wsConnected=!0,j0({type:"connected"}),m.lastWsMessageAt=Date.now(),m.wsReconnectAttempts=0,wB(),m.lastSeqBySession={},m.chatResyncPendingBySession={},f$&&(Ib(),gu(),mi({skipSelectedOutputReload:!0})),f$=!0,v6e(),ck(m.selectedId),u6e(),Xke(),ty("ws-reconnect")}},n.onmessage=function(a){if(m.ws===n){m.lastWsMessageAt=Date.now();try{var o=JSON.parse(a.data);if(o&&o.type==="ping"){if(m.ws&&m.ws.readyState===WebSocket.OPEN)try{m.ws.send(JSON.stringify({type:"pong",t:o.t}))}catch{}return}if(o&&o.type==="pty_error"){j0(o),Ye("\u7EC8\u7AEF\u64CD\u4F5C\u672A\u786E\u8BA4\u3002\u8BF7\u68C0\u67E5\u8F93\u51FA\u540E\u518D\u91CD\u8BD5\u3002","error"),o.sessionId&&m.ws&&m.ws.readyState===WebSocket.OPEN&&m.ws.send(JSON.stringify({type:"resync",sessionId:o.sessionId}));return}if(o&&o.type==="resync_required"&&o.sessionId){j0(o),m$(o.sessionId),m.lastSeqBySession||(m.lastSeqBySession={}),m.lastSeqBySession[o.sessionId]=0;return}if(o&&(o.type==="init"||o.type==="output")&&o.sessionId&&typeof o.seq=="number"){m.lastSeqBySession||(m.lastSeqBySession={});var l=m.lastSeqBySession[o.sessionId]||0;if(o.type==="init"){if(l>0&&o.seq<=l)return;m.lastSeqBySession[o.sessionId]=o.seq}else if(o.seq===l+1)m.lastSeqBySession[o.sessionId]=o.seq;else if(o.seq>l+1&&l>0){m$(o.sessionId),m.lastSeqBySession[o.sessionId]=0;return}else{if(l>0&&o.seq<=l)return;m.lastSeqBySession[o.sessionId]=o.seq}}o?.sessionId&&(o.type==="init"||Array.isArray(o.data?.messages))&&m.chatResyncPendingBySession&&delete m.chatResyncPendingBySession[o.sessionId],j0(o),b6e(o),o.type==="init"&&o.sessionId&&Exe(o.sessionId)}catch{}}},n.onclose=function(){m.ws===n&&(m.ws=null,m.wsConnected=!1,j0({type:"disconnected"}),nG(),rU())},n.onerror=function(){m.ws===n&&(mu("websocket_error",new Error("WebSocket transport error")),n.close())},!0}catch(a){return mu("websocket_error",a),rU(),!1}}function b6e(e){switch(e.type){case"output":if(e.sessionId&&typeof e.data?.chunk=="string"&&A2e(e.sessionId,e.data.chunk),e.data&&e.sessionId&&Object.prototype.hasOwnProperty.call(e.data,"isResponding")&&T6(e.sessionId,!!e.data.isResponding),e.data&&e.sessionId&&e.data.structuredState&&T6(e.sessionId,e.data.structuredState.inFlight===!0),e.data&&e.sessionId){var t=!!e.data.incremental,r={id:e.sessionId},n=!1;if(!t&&e.data.output!==void 0&&(r.output=e.data.output),Object.prototype.hasOwnProperty.call(e.data,"permissionBlocked")&&(r.permissionBlocked=!!e.data.permissionBlocked),Object.prototype.hasOwnProperty.call(e.data,"queuedMessages")&&(r.queuedMessages=e.data.queuedMessages||[],Ja.advance(e.sessionId,"server")),e.data.structuredState&&(r.structuredState=e.data.structuredState),e.data.sessionKind&&(r.sessionKind=e.data.sessionKind),Object.prototype.hasOwnProperty.call(e.data,"title")&&(r.title=e.data.title,n=!0),Object.prototype.hasOwnProperty.call(e.data,"description")&&(r.description=e.data.description,n=!0),Object.prototype.hasOwnProperty.call(e.data,"titleGenerating")&&(r.titleGenerating=!!e.data.titleGenerating,n=!0),Object.prototype.hasOwnProperty.call(e.data,"summary")&&(r.summary=e.data.summary),e.data.messages)r.messages=e.data.messages,typeof e.data.messageOffset=="number"&&(r.messageOffset=e.data.messageOffset),typeof e.data.messageTotal=="number"&&(r.messageTotal=e.data.messageTotal),typeof e.data.leadingBlockOffset=="number"&&(r.leadingBlockOffset=e.data.leadingBlockOffset,r.leadingBlockTotal=e.data.leadingBlockTotal);else if(t&&e.data.lastMessage){var a=m.sessions.find(function(Y){return Y.id===e.sessionId});if(a){var o=Array.isArray(a.messages)?a.messages.slice():[],l=e.data.messageCount,c=typeof a.messageOffset=="number"?a.messageOffset:0,d=c+o.length,p=e.data.lastMessage,h=m.chatResyncPendingBySession?.[e.sessionId];h||!Number.isInteger(l)||!(l===d&&o.length>0||l===d+1)?m$(e.sessionId):(l===d+1?o.push(p):o[o.length-1]=Cxe(o[o.length-1],p,o.length===1&&a.leadingBlockOffset||0,a.leadingBlockTotal||0,"latest"),r.messages=o,r.messageOffset=c,r.messageTotal=l,r.leadingBlockOffset=a.leadingBlockOffset||0,r.leadingBlockTotal=a.leadingBlockTotal||0,o.length===1&&(r.leadingBlockOffset=0,r.leadingBlockTotal=Array.isArray(p.content)?p.content.length:0))}}var g=t&&e.data.chunk&&!e.data.lastMessage&&!r.messages&&r.output===void 0&&!e.data.structuredState&&!e.data.sessionKind&&!n;if(g){if(e.data.permissionBlocked!==void 0){var v=m.sessions.find(function(Y){return Y.id===e.sessionId});v&&!!v.permissionBlocked!=!!e.data.permissionBlocked&&(rr(r,"latest"),e.sessionId===m.selectedId&&ud())}}else if((r.output!==void 0||r.messages||t||e.data.permissionBlocked!==void 0||r.title||r.description||r.titleGenerating!==void 0)&&(rr(r,"latest"),n&&_0(),e.sessionId===m.selectedId)){var y=m.sessions.find(function(Y){return Y.id===e.sessionId})||r;j6(e.sessionId),ud(),y.sessionKind==="structured"||e.data.sessionKind==="structured"?oa():L0()}}e.sessionId===m.selectedId&&m.terminal&&e.data&&tU(e.sessionId)&&(e.data.chunk&&vU(e.sessionId)?(bE(m.terminal,String(e.data.chunk)),m.terminalOutput=U1((m.terminalOutput||"")+String(e.data.chunk)),JV()):!e.data.incremental&&Object.prototype.hasOwnProperty.call(e.data,"output")&&ny(e.sessionId,e.data.output||"",{mode:"append"})),e.sessionId===m.selectedId&&m.terminal&&e.data&&!N0(e.sessionId)?e.data.chunk&&vU(e.sessionId)?(m.terminalLiveStreamSessions[e.sessionId]=!0,bE(m.terminal,e.data.chunk,e.ptyBytes,e.sessionId),m.terminalSessionId=e.sessionId,e.data.output?m.terminalOutput=U1(String(e.data.output)):m.terminalOutput=U1((m.terminalOutput||"")+String(e.data.chunk)),JV()):!e.data.incremental&&Object.prototype.hasOwnProperty.call(e.data,"output")&&ny(e.sessionId,e.data.output||"",{mode:"append"}):e.data&&N0(e.sessionId)?e.data.chunk?c6e(e.sessionId,String(e.data.chunk),e.ptyBytes):!e.data.incremental&&Object.prototype.hasOwnProperty.call(e.data,"output")?(J6(e.sessionId,String(e.data.output||"")),e.ptyBytes&&m.ws.send(JSON.stringify({type:"pty_ack",sessionId:e.sessionId,bytes:e.ptyBytes}))):e.ptyBytes&&m.ws.send(JSON.stringify({type:"pty_ack",sessionId:e.sessionId,bytes:e.ptyBytes})):e.ptyBytes&&m.ws&&m.ws.readyState===WebSocket.OPEN&&m.ws.send(JSON.stringify({type:"pty_ack",sessionId:e.sessionId,bytes:e.ptyBytes}));break;case"started":e.data&&e.data.id?rr(e.data):rr({id:e.sessionId,status:"running"}),_0(),ho();break;case"ended":{yG();var w=e.data&&e.data.status?e.data.status:"exited",x=e.data&&Object.prototype.hasOwnProperty.call(e.data,"permissionBlocked")?!!e.data.permissionBlocked:!1,k={id:e.sessionId,status:w,permissionBlocked:x};for(let Y of["completionRevision","viewedCompletionRevision"])typeof e.data?.[Y]=="number"&&(k[Y]=e.data[Y]);e.data&&e.data.messages&&(k.messages=e.data.messages,typeof e.data.messageOffset=="number"&&(k.messageOffset=e.data.messageOffset),typeof e.data.leadingBlockOffset=="number"&&(k.leadingBlockOffset=e.data.leadingBlockOffset,k.leadingBlockTotal=e.data.leadingBlockTotal),typeof e.data.messageTotal=="number"&&(k.messageTotal=e.data.messageTotal)),e.data&&e.data.structuredState&&(k.structuredState=e.data.structuredState),e.data&&e.data.queuedMessages&&(k.queuedMessages=e.data.queuedMessages),rr(k,"latest"),typeof e.data?.completionRevision=="number"&&ho(),m.currentView==="terminal"&&TE(m.sessions.find(Y=>Y.id===e.sessionId)),e.sessionId===m.selectedId&&(j6(e.sessionId),L0(!0));var F=m.sessions.find(function(Y){return Y.id===e.sessionId}),C=e.data&&e.data.exitCode,D=C!=null&&C!==0,S=F&&F.summary||"",A=F?t6e(F):"",I=D?"\u4EFB\u52A1\u5F02\u5E38\u7ED3\u675F":"\u4EFB\u52A1\u5DF2\u5B8C\u6210",j="";S?(j=S,A&&!D&&(j+=`
|
|
261
|
-
`+A)):j=F&&F.command||e.sessionId,aEe(e.sessionId,I,j),hG(e.sessionId),w$(),(e.sessionId!==m.selectedId||document.hidden)&&b$({title:I,body:j,type:D?"warning":"success",duration:6e3,actionLabel:"\u67E5\u770B",action:function(){In(e.sessionId)}}),m.messageQueue=[],m.pendingMessages=[];var $=m.sessions.find(function(Y){return Y.id===e.sessionId}),P=e.sessionId===m.selectedId?m.sessions.find(function(Y){return Y.id===m.selectedId}):null,N=!!($&&$.sessionKind==="structured"||P&&P.sessionKind==="structured");N&&e.sessionId===m.selectedId?(hU(),ME(e.sessionId)):N||(m.structuredInputQueue=[],ME(m.selectedId),pd()),e.sessionId===m.selectedId&&(N||Af(!1),m.currentTask=null,ud()),e.sessionId===m.selectedId&&Dy(),_0(),YE(),e.sessionId===m.selectedId&&(N||Nu(e.sessionId));break}case"init":if(e.sessionId===m.selectedId&&e.data){m.chatRenderTimer&&(clearTimeout(m.chatRenderTimer),m.chatRenderTimer=null),rr(e.data,"latest"),j6(e.sessionId),oa(!0),ud(),Sl();var R=e.data.output||"";tU(e.sessionId)&&(yE(e.sessionId,e.data.terminalState,R)||nU(R,e.sessionId,"replace")),N0(e.sessionId)?wE(e.sessionId,e.data.terminalState,R)||J6(e.sessionId,R):yE(e.sessionId,e.data.terminalState,R)||(nU(R,e.sessionId,"replace"),ty("init"))}else if(e.data&&N0(e.sessionId)){rr(e.data,"latest");var U=e.data.output||"";wE(e.sessionId,e.data.terminalState,U)||J6(e.sessionId,U)}e.data&&e.data.structuredState&&e.data.structuredState.inFlight===!0&&DE(e.sessionId);break;case"usage":break;case"task":e.sessionId===m.selectedId&&(m.currentTask=e.data||null,ud()),rEe(e.sessionId,e.data||null),x$(e.sessionId),_0();break;case"status":if(e.sessionId&&e.data){var H={id:e.sessionId};for(let G of["completionRevision","viewedCompletionRevision"])typeof e.data[G]=="number"&&(H[G]=e.data[G]);if(Object.prototype.hasOwnProperty.call(e.data,"status")&&(H.status=e.data.status),Object.prototype.hasOwnProperty.call(e.data,"exitCode")&&(H.exitCode=e.data.exitCode),Object.prototype.hasOwnProperty.call(e.data,"providerCliActive")&&(H.providerCliActive=!!e.data.providerCliActive),Object.prototype.hasOwnProperty.call(e.data,"providerCliExitCode")&&(H.providerCliExitCode=e.data.providerCliExitCode),Object.prototype.hasOwnProperty.call(e.data,"ptyBusy")&&(H.ptyBusy=!!e.data.ptyBusy),Object.prototype.hasOwnProperty.call(e.data,"ptyCommandRunning")&&(H.ptyCommandRunning=e.data.ptyCommandRunning===!0,ho()),e.data.structuredState)H.structuredState=e.data.structuredState;else if(Object.prototype.hasOwnProperty.call(e.data,"status")){var a=m.sessions.find(function(Z){return Z.id===e.sessionId});a&&a.sessionKind==="structured"&&(H.structuredState=Object.assign({},a.structuredState||{},{inFlight:e.data.status==="running"}))}if(Object.prototype.hasOwnProperty.call(e.data,"queuedMessages")&&(H.queuedMessages=e.data.queuedMessages||[],Ja.advance(e.sessionId,"server")),Object.prototype.hasOwnProperty.call(e.data,"permissionBlocked")&&(H.permissionBlocked=!!e.data.permissionBlocked),e.data.pendingEscalation?H.pendingEscalation=e.data.pendingEscalation:e.data.permissionRequest&&(H.pendingEscalation={scope:e.data.permissionRequest.scope,target:e.data.permissionRequest.target,reason:e.data.permissionRequest.prompt}),e.data.pendingEscalation||e.data.permissionRequest){var q=m.sessions.find(function(G){return G.id===e.sessionId}),L=q&&(q.summary||q.command)||e.sessionId,O=e.data.pendingEscalation?e.data.pendingEscalation.reason||"\u9700\u8981\u6743\u9650\u5BA1\u6279":e.data.permissionRequest.prompt||"\u9700\u8981\u6743\u9650\u5BA1\u6279",W=e.data.pendingEscalation?e.data.pendingEscalation.target:e.data.permissionRequest.target,z=L;W?z+=`
|
|
262
|
-
`+O+" \xB7 "+W:z+=`
|
|
263
|
-
`+O,nEe(e.sessionId,z),e.sessionId!==m.selectedId&&b$({title:"\u9700\u8981\u4F60\u7684\u6388\u6743",body:z,type:"warning",duration:0,actionLabel:"\u53BB\u5904\u7406",action:function(){In(e.sessionId)}})}e.data.permissionBlocked===!1&&(H.pendingEscalation=null),e.data.approvalStats&&(H.approvalStats=e.data.approvalStats);var n=!1;Object.prototype.hasOwnProperty.call(e.data,"title")&&(H.title=e.data.title,n=!0),Object.prototype.hasOwnProperty.call(e.data,"description")&&(H.description=e.data.description,n=!0),Object.prototype.hasOwnProperty.call(e.data,"summary")&&(H.summary=e.data.summary),Object.prototype.hasOwnProperty.call(e.data,"titleGenerating")&&(H.titleGenerating=!!e.data.titleGenerating,n=!0),H.structuredState&&T6(e.sessionId,H.structuredState.inFlight===!0),H.structuredState&&H.structuredState.inFlight===!0&&DE(e.sessionId),Object.prototype.hasOwnProperty.call(e.data,"ptyBusy")&&T6(e.sessionId,!!e.data.ptyBusy),Array.isArray(e.data.messages)&&(H.messages=e.data.messages,["messageOffset","messageTotal","leadingBlockOffset","leadingBlockTotal"].forEach(function(G){typeof e.data[G]=="number"&&(H[G]=e.data[G])})),rr(H,"latest"),typeof e.data.completionRevision=="number"&&(ho(),m.currentView==="terminal"&&TE(m.sessions.find(G=>G.id===e.sessionId))),n&&_0(),x$(e.sessionId),w$(),e.sessionId===m.selectedId&&(ud(),e.data.approvalStats&&Sl(),(H.structuredState||H.messages||Object.prototype.hasOwnProperty.call(H,"ptyBusy")||Object.prototype.hasOwnProperty.call(H,"ptyCommandRunning"))&&(H.structuredState&&!H.structuredState.inFlight&&hU(),j6(e.sessionId),L0()))}break;case"notification":e.data&&(e.data.kind==="models"?CX():e.data.kind==="update"?mG(e.data.current||"-",e.data.latest||"-"):e.data.kind==="auto-update-start"?cEe(e.data.current||"-",e.data.latest||"-",e.data.previousInstanceId||null):e.data.kind==="auto-update-restart"?oy(e.data.previousInstanceId||null,e.data.latest||null):e.data.kind==="restart"?oy():e.data.kind==="conversation-session-preview"&&typeof e.data.sessionId=="string"&&typeof e.data.conversationId=="string"&&typeof e.data.preview?.text=="string"?Z3(e.data):e.data.kind==="conversations-changed"?l2({runId:"",taskId:""}):e.data.kind==="ai-team-run"&&typeof e.data.runId=="string"?l2({runId:e.data.runId,taskId:String(e.data.taskId||"")}):e.data.kind==="ai-team-definition"&&typeof e.data.teamId=="string"?Ab(e.data.teamId):e.data.kind==="silicon-employee-definition"&&typeof e.data.employeeId=="string"?gu(e.data.employeeId):e.data.kind==="task-retention"?(ho(),mi({skipSelectedOutputReload:!0})):e.data.kind==="ai-team-step-live"&&typeof e.data.runId=="string"&&O7({runId:e.data.runId,taskId:String(e.data.taskId||""),steps:Array.isArray(e.data.steps)?e.data.steps:[]}));break}}function ud(){ja("task:update"),Sl()}function Sl(){var e=m.sessions.find(function(t){return t.id===m.selectedId});e6e({resolve:function(){return e?{sessionId:e.id,autoApprovePending:tE.has(e.id),permissionPending:eE.has(e.id),permission:ZK(e),autoApproveHidden:m8e(e),autoApproveEnabled:!!e.autoApprovePermissions,approvalStats:e.approvalStats||null}:null},onToggleAutoApprove:function(t){w6e(t)},onPermissionAction:function(t,r,n){y6e(t,r,n)}})}var eE=new Set;async function y6e(e,t,r){if(e!==m.selectedId||eE.has(e))return;let n=m.sessions.find(function(c){return c.id===e}),a=ZK(n);if(!a||a.autoApproving||a.requestId!==t){Sl();return}if(r==="approve-turn"&&!t)return;let o="/api/sessions/"+encodeURIComponent(e),l=r==="approve-turn"?o+"/escalations/"+encodeURIComponent(t)+"/resolve":o+(r==="approve"?"/approve-permission":"/deny-permission");eE.add(e),Sl();try{let c=await tG(l,{method:"POST",credentials:"same-origin",...r==="approve-turn"?{headers:{"content-type":"application/json"},body:JSON.stringify({resolution:"approve_turn"})}:{}}),d=await Dt(c);if(d.id!==e)throw new Error("\u6388\u6743\u54CD\u5E94\u4E0E\u5F53\u524D\u64CD\u4F5C\u7684\u4F1A\u8BDD\u4E0D\u4E00\u81F4\u3002");rr(d),ud()}catch(c){Ye(ei(c,"\u65E0\u6CD5\u5B8C\u6210\u6388\u6743\u64CD\u4F5C\u3002"),"error")}finally{eE.delete(e),Sl()}}var tE=new Set;async function w6e(e){if(!e||e!==m.selectedId||tE.has(e))return;let t=m.sessions.find(function(r){return r.id===e});if(t){if(t.provider==="codex"){Ye("Codex \u4F1A\u8BDD\u56FA\u5B9A\u4EE5 full-access PTY \u542F\u52A8\uFF0C\u4E0D\u652F\u6301\u5207\u6362\u81EA\u52A8\u6279\u51C6\u3002","info");return}tE.add(e),Sl();try{let r=await tG("/api/sessions/"+encodeURIComponent(e)+"/toggle-auto-approve",{method:"POST",credentials:"same-origin"}),n=await Dt(r);if(n.id!==e)throw new Error("\u81EA\u52A8\u6279\u51C6\u54CD\u5E94\u4E0E\u5F53\u524D\u64CD\u4F5C\u7684\u4F1A\u8BDD\u4E0D\u4E00\u81F4\u3002");rr(n),m.selectedId===e&&Ye(n.autoApprovePermissions?"\u81EA\u52A8\u6279\u51C6\u5DF2\u5F00\u542F":"\u81EA\u52A8\u6279\u51C6\u5DF2\u5173\u95ED","info")}catch(r){Ye(ei(r,"\u65E0\u6CD5\u5207\u6362\u81EA\u52A8\u6279\u51C6\u3002"),"error")}finally{tE.delete(e),Sl()}}}function x6e(){Sl()}function nU(e,t,r){return m.terminal?ny(t||m.selectedId,e,{mode:r||"append"}):!1}function iG(){m.pollTimer&&(clearInterval(m.pollTimer),m.pollTimer=null),yEe(),m6e()}function E6e(e,t){return e.target===t.target&&e.message===t.message}var k6e=class extends Vs{constructor(){super(E6e)}},U0=new k6e;function xE(e){m.actionError=e,oG()}function oG(){vy({selector:"[data-composer-action-error-host]",store:U0,flush:!0,build(e){let t=m.actionError;return t?{key:"action-error",target:e,message:t}:null}})}var C6e=B(_(),1),h$=B(er(),1),S6e=B(si(),1),g$=null,Iu=null;function EB(e){if(Iu)throw new Error("Cannot replace browser shell commands after mount");g$=e}function GE(){return Iu!==null}function F6e(e,t){for(;e.firstChild;)t.appendChild(e.firstChild)}function D6e(e){let t=document.createElement("template");t.innerHTML=e;let r=[{name:"BrowserTerminalSlot",selector:"#output",key:"terminal"},{name:"BrowserChatSlot",selector:"#chat-output",key:"chat"},{name:"BrowserComposerSlot",selector:".input-panel",key:"composer"},{name:"BrowserFileExplorerSlot",selector:"#file-explorer",key:"fileExplorer"},{name:"BrowserCrossSessionQueueSlot",selector:"#cross-session-queue-host",key:"crossSessionQueue"}],n={},a=r.map(({name:o,selector:l,key:c})=>{let d=t.content.querySelector(l);if(!d)throw new Error(`${o} seed is missing ${l}`);let p=new Swe(o,{mount(h){F6e(d,h)}});return n[c]=h=>{h?p.mount(h):p.unmount()},p});return{refs:n,hosts:a}}function A6e(e,t){if(!g$)throw new Error("Browser shell commands were not configured");if(Iu){if(Iu.app!==e)throw new Error("React shell cannot move to a different #app root");return(0,h$.flushSync)(()=>Iu?.store.publish({sync:!0,reason:"legacy:render"})),"updated"}let r=D6e(t()),n=vxe(g$,{batchMs:0});e.replaceChildren(),e.dataset.reactShell="enabled";let a=(0,S6e.createRoot)(e);Iu={app:e,root:a,store:n,hosts:r.hosts};try{(0,h$.flushSync)(()=>a.render(C6e.createElement(fxe,{store:n,legacyRefs:r.refs})))}catch(o){Iu=null,n.dispose();for(let l of r.hosts)l.dispose();throw delete e.dataset.reactShell,o}return"mounted"}function aU(){let e=Iu;if(e){Iu=null,(0,h$.flushSync)(()=>e.root.unmount()),e.store.dispose();for(let t of e.hosts)t.dispose();delete e.app.dataset.reactShell}}function yy(e){var t=e||{};m.chatRenderCache?.reset(),m.chatRenderEpoch=(m.chatRenderEpoch||0)+1,m.chatRenderPendingToken=null,m.lastRenderedMsgCount=0,m.lastRenderedEmpty=null,m.renderPending=!1,t.preserveStickState||(m.chatRenderedCount=m.chatPageSize,m.chatRenderWindowMessageCount=0,kf(),m.askUserSelections={}),m.chatScrollElement&&(m.chatScrollHandler&&m.chatScrollElement.removeEventListener("scroll",m.chatScrollHandler),m.chatScrollWheelHandler&&m.chatScrollElement.removeEventListener("wheel",m.chatScrollWheelHandler),m.chatScrollTouchStartHandler&&m.chatScrollElement.removeEventListener("touchstart",m.chatScrollTouchStartHandler),m.chatScrollTouchMoveHandler&&m.chatScrollElement.removeEventListener("touchmove",m.chatScrollTouchMoveHandler)),m.chatScrollElement=null,m.chatScrollHandler=null,m.chatScrollWheelHandler=null,m.chatScrollTouchStartHandler=null,m.chatScrollTouchMoveHandler=null,m.chatIsProgrammaticScroll=!1,t.preserveStickState||(m.chatStickToBottom=!0,m.chatUnreadCount=0,m.chatUnreadStartIndex=-1,m.chatInitialRenderDone=!1)}function ts(){return m.workingDir||FCe()}window.addEventListener("online",function(){m.isOnline=!0,EE()});window.addEventListener("offline",function(){m.isOnline=!1,EE()});function EE(){var e=document.getElementById("offline-banner");if(!m.isOnline&&!e){var t=document.createElement("div");t.id="offline-banner",t.className="offline-banner",t.style.cssText="position:fixed;top:var(--wand-safe-top);left:50%;transform:translateX(-50%);z-index:20030;width:min(440px,calc(100vw - 32px))",document.body.appendChild(t),Kxe(t)}else m.isOnline&&e&&(cB(e),e.remove())}function $6e(){if(!Xc()){var e=document.getElementById("app");e&&dB(e)}}function B6e(){var e=document.getElementById("app");e&&dB(e,"\u754C\u9762\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u91CD\u8BD5")}function E1(e,t){if(m.config&&!document.hidden){var r=t&&t.immediate===!0,n=Date.now();!r&&n-m.lastForegroundSyncAt<1500||(m.lastForegroundSyncAt=n,m.foregroundSyncTimer&&(clearTimeout(m.foregroundSyncTimer),m.foregroundSyncTimer=null),I6e(e,r))}}function I6e(e,t){return!m.config||document.hidden?Promise.resolve():(t||aG(),t?xB("resume-force"):(!m.ws||m.ws.readyState!==WebSocket.OPEN&&m.ws.readyState!==WebSocket.CONNECTING)&&KE(),m.selectedId&&wy(m.selectedId,{force:!0}),mi({skipSelectedOutputReload:!0}).catch(function(r){console.error("[wand] foreground sync failed:",e,r)}))}function M6e(){window.__wandForegroundSyncBound||(window.__wandForegroundSyncBound=!0,document.addEventListener("visibilitychange",function(){document.hidden?wB():(E1("visibility"),ty("visibility"))}),window.addEventListener("focus",function(){E1("focus")}),window.addEventListener("pageshow",function(){E1("pageshow")}),window.addEventListener("resume",function(){E1("resume")}),window.addEventListener("wand-android-resume",function(){E1("android-resume",{immediate:!0}),ty("android-resume")}),window.addEventListener("wand-ime-state",function(e){var t=e&&e.detail&&e.detail.state;if(t==="shown"||t==="hidden")try{qi("native-ime-"+t,{forceReplay:!0}),Dl("native-ime")}catch{}}),window.addEventListener("wand-android-network",function(e){var t=e&&e.detail&&e.detail.state;if(t==="lost"){m.isOnline=!1;try{EE()}catch{}return}if(t==="available"||t==="changed"||t==="validated"){m.isOnline=!0;try{EE()}catch{}xB("android-network-"+t)}}))}function T6e(){if(Xc())return;let e=Pxe();fetch("/api/session-check",{credentials:"same-origin"}).then(function(t){return t.ok?t.json():{authed:!1}}).then(function(t){if(!t||!t.authed)return m.loginChecked=!0,yf(),null;let r=vb();return cwe(),r.catch(function(n){if(lE(),Ib(),n&&typeof n.status=="number"&&n.status>0)return m.loginChecked=!0,yf(),null;throw n})}).then(function(t){t&&(m.config=t,Fy(t),m.loginChecked=!0,requestAnimationFrame(function(){if(m.config===t){try{yf({skipShellChrome:!0})}catch{}rG(),mi({reuseSnapshot:!0,skipSelectedOutputReload:yu()}).then(function(){if(m.config!==t||!e())return;let r=Hn();return Jxe(void 0,()=>m.config===t&&e()&&Hn()===r)}),CX(),J6e(),t.updateAvailable&&t.latestVersion&&mG(t.currentVersion||"-",t.latestVersion),pG&&C8e(),y$&&S8e()}}))}).catch(function(){if(lE(),m.loginChecked=!0,!navigator.onLine){var t=document.getElementById("app");t&&dB(t,"\u65E0\u6CD5\u8FDE\u63A5\u5230\u670D\u52A1\u5668","\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8FDE\u63A5\u6216\u786E\u8BA4 Wand \u670D\u52A1\u6B63\u5728\u8FD0\u884C\u3002"),window.addEventListener("online",function(){location.reload()},{once:!0});return}yf()})}document.addEventListener("click",function(e){if(!xo()&&!m.sidebarPinned&&!m.sidebarCollapsed&&m.sessionsDrawerOpen){var t=e.target;!t||!(t instanceof Element)||t.closest("#sessions-drawer")||t.closest("#sessions-toggle-button")||t.closest(".floating-sidebar-toggle")||t.closest(".sidebar-tile-bubble")||t.closest(".modal-backdrop, .modal-overlay, .modal-container, [role='dialog'], [role='menu'], .topbar-more-menu, .sidebar-header-overflow, .path-suggestions")||y8e()}},!0);$6e();T6e();function yf(e){if(Xc())return;let t=document.getElementById("app");t&&cB(t);var r=e&&e.skipShellChrome,n=document.getElementById("app");if(n){var a=m.config!==null,o=GE(),l=!a||!o&&!!document.getElementById("output");l&&my(),!a&&o&&aU(),document.documentElement.classList.add("no-transition"),m.sidebarPinned&&!m.sidebarCollapsed&&!xo()&&(m.sessionsDrawerOpen=!0,Vr("wand-sidebar-open",!0));var c,d=!1;if(a){try{c=A6e(n,_6e)}catch(p){console.error("[wand] React shell mount failed",p),aU(),document.documentElement.classList.remove("no-transition"),B6e();return}d=c==="mounted"}else n.innerHTML=j6e(),d=!0;d&&(yy(),vCe()),Bf(),bX(),mI(G0()),Sl(),oG(),gI(),r||Dy(),document.body.offsetHeight,requestAnimationFrame(function(){a&&fa(document.getElementById("input-box")),document.documentElement.classList.remove("no-transition")}),a&&m.selectedId&&m.gitStatusSessionId!==m.selectedId&&wy(m.selectedId),NX()}}function j6e(){return'<div data-login-controls style="height:100%" data-checking="'+!m.loginChecked+'" data-switch-server="'+pX()+'"></div>'}function _6e(){var e=m.sessions.find(function(r){return r.id===m.selectedId}),t=Lt.read(m.selectedId).text;return'<div class="file-explorer" id="file-explorer"></div><div id="output" class="terminal-container'+(m.selectedId?"":" hidden")+' active"><div class="terminal-scale-overlay" aria-label="\u7EC8\u7AEF\u7F29\u653E\u63A7\u4EF6"><button data-antd-control id="terminal-scale-down-top" class="terminal-scale-overlay-btn terminal-scale-btn" type="button" title="\u7F29\u5C0F" aria-label="\u7F29\u5C0F\u7EC8\u7AEF\u5B57\u53F7">\u2212</button><span class="terminal-scale-overlay-label terminal-scale-label" id="terminal-scale-label-top">'+Math.round(m.terminalScale*100)+'%</span><button data-antd-control id="terminal-scale-up-top" class="terminal-scale-overlay-btn terminal-scale-btn" type="button" title="\u653E\u5927" aria-label="\u653E\u5927\u7EC8\u7AEF\u5B57\u53F7">+</button><span class="terminal-scale-overlay-divider"></span><button data-antd-control id="page-refresh-btn" class="terminal-scale-overlay-btn" type="button" title="\u5237\u65B0\u9875\u9762" aria-label="\u5237\u65B0\u9875\u9762">'+U6("refresh",{size:13,strokeWidth:2})+'</button></div><button data-antd-control id="terminal-jump-bottom" class="terminal-jump-bottom'+(m.showTerminalJumpToBottom?" visible":"")+'" type="button" title="\u56DE\u5230\u5E95\u90E8" aria-label="\u56DE\u5230\u5E95\u90E8"><svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 3.5v9M3.5 8l4.5 4.5L12.5 8"/></svg></button></div><div id="chat-output" class="chat-container hidden"><div id="chat-fold-bar" class="chat-fold-bar hidden" aria-live="polite"></div><button data-antd-control id="chat-unread-bubble" class="chat-unread-bubble" type="button" title="\u56DE\u5230\u6700\u65B0\u6D88\u606F" aria-label="\u56DE\u5230\u6700\u65B0\u6D88\u606F"><span class="chat-unread-bubble-icon"><svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 3.5v9M3.5 8l4.5 4.5L12.5 8"/></svg></span><span class="chat-unread-bubble-count" aria-hidden="true"></span></button></div><div id="chat-running-host"></div><div id="cross-session-queue-host"></div><div class="input-panel'+(m.selectedId?"":" hidden")+'"><div class="input-composer-row" data-pi-composer=""><span data-pi-settings-host=""></span><div class="input-composer'+(String(t||"").trim()?" has-text":"")+(m.terminalInteractive?" is-terminal-interactive":"")+'" role="group" aria-label="\u6D88\u606F\u7F16\u8F91\u5668"><div class="composer-top-row"><div id="todo-progress" class="todo-progress hidden"><button data-antd-control class="todo-progress-header" id="todo-progress-toggle" type="button" aria-expanded="false" aria-controls="todo-progress-body" aria-label="\u5C55\u5F00\u5F85\u529E\u5217\u8868"><span id="todo-progress-summary"></span></button></div><div class="todo-progress-body hidden" id="todo-progress-body"><div id="todo-progress-content"></div></div><div id="queue-bar-host" class="queue-bar-host" hidden></div></div><div class="composer-main-row"><div id="terminal-shortcuts" class="terminal-shortcuts" hidden></div><div class="composer-input-wrap"><span data-composer-avatar-host></span><span class="composer-attachments-host" data-composer-attachments-host="main"></span><div data-composer-sender><textarea id="input-box" class="input-textarea" aria-label="\u6D88\u606F\u8F93\u5165" placeholder="'+hX(e,m.terminalInteractive)+'" rows="1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" enterkeyhint="send">'+_u(t)+'</textarea></div></div><div class="composer-actions-left" role="group" aria-label="\u6DFB\u52A0\u5185\u5BB9\u4E0E\u6743\u9650"><button id="attach-btn" data-antd-control class="composer-attach-trigger" type="button" title="\u9644\u4EF6\u4E0E\u6267\u884C\u9009\u9879\uFF08\u601D\u8003\u6DF1\u5EA6\u3001\u6A21\u578B\u548C\u6743\u9650\uFF09" aria-label="\u66F4\u591A\u64CD\u4F5C" aria-haspopup="dialog" aria-controls="composer-plus-popover" aria-expanded="false">'+U6("plus",{size:18,strokeWidth:2.2})+'</button><div class="composer-inline-config"><span class="composer-config-host" data-composer-config-host="runtime"></span></div><input type="file" id="file-upload-input" multiple tabindex="-1" style="position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;clip:rect(0,0,0,0);pointer-events:none"><span class="composer-pi-settings-toggle-host" data-pi-settings-toggle-host=""></span><div class="composer-status-row" id="composer-status-row"><span class="composer-config-host" data-composer-config-host="mode"></span><span class="composer-badge-host" data-composer-badge-host="auto-approve"></span><span class="composer-badge-host hidden" data-composer-badge-host="permissions"></span><span class="composer-badge-host" data-composer-badge-host="approval-stats"></span><span class="composer-status-line" id="composer-status-line" role="status" aria-live="polite">'+_u(mX)+'</span></div></div><div class="composer-actions-right" role="group" aria-label="\u6A21\u578B\u4E0E\u53D1\u9001"><span class="composer-rail-host" data-pty-extra-keys-host></span><span class="composer-rail-host" data-composer-rail-host="pty"></span><button id="send-input-button" data-antd-control="primary" type="button" data-phase="idle" title="\u53D1\u9001" aria-label="\u53D1\u9001\u6D88\u606F"></button></div></div></div></div><div class="composer-plus-popover hidden" id="composer-plus-popover" data-wand-popup-owner="composer-plus-popover" role="dialog" aria-modal="false" aria-label="\u66F4\u591A\u64CD\u4F5C" aria-hidden="true"><span class="plus-popover-items-host" data-composer-popover-host="items"></span><button data-antd-control class="prompt-optimize-btn" id="prompt-optimize-btn" type="button" title="\u4F18\u5316\u63D0\u793A\u8BCD" aria-label="\u4F18\u5316\u63D0\u793A\u8BCD">'+U6("sparkle",{size:15,strokeWidth:1.9,cls:"prompt-optimize-icon"})+'<span class="prompt-optimize-label">\u4F18\u5316\u63D0\u793A\u8BCD</span></button><div class="plus-popover-sep" aria-hidden="true"></div><div class="plus-popover-trio-wrap"><p class="composer-settings-scope">\u6267\u884C\u9009\u9879 \xB7 \u5E94\u7528\u4E8E\u5F53\u524D\u4F1A\u8BDD\uFF1B\u6A21\u578B\u548C\u601D\u8003\u6DF1\u5EA6\u540C\u65F6\u8BB0\u4E3A\u6B64\u8BBE\u5907\u7684\u65B0\u4F1A\u8BDD\u504F\u597D\u3002\u5DF2\u542F\u52A8\u7684\u7EC8\u7AEF\u53C2\u6570\u4FDD\u6301\u4E0D\u53D8\u3002</p><span class="composer-config-host" data-composer-config-host="all"></span></div></div><span class="composer-action-error-host" data-composer-action-error-host="main"></span></div>'}var P6e=B(si(),1),$9=B(Ee(),1),iU=Promise.resolve(),kE=null;function N6e(e){let t=iU.then(()=>new Promise((r,n)=>{Fh();let a=document.createElement("div");a.dataset.wandOwnedDialogRoot="",document.body.appendChild(a);let o=document.createElement("div");a.appendChild(o);let l=Uv(),c=l??document.createElement("div");l||(c.className="wand-ui-portals",c.style.zIndex=String(gh.token?.zIndexPopupBase??20010),a.appendChild(c));let d=!1,p=(0,P6e.createRoot)(o,{onUncaughtError:g=>h(void 0,g)}),h=(g,v)=>{d||(d=!0,kE=null,queueMicrotask(()=>{p.unmount(),a.remove(),v?n(v):r(g)}))};kE=()=>{e.dismissable!==!1&&h({dismissed:!0})},p.render((0,$9.jsx)(hh,{container:c,children:(0,$9.jsx)(La,{children:(0,$9.jsx)(_b,{open:!0,title:e.title,description:e.description,tone:e.tone,icon:e.icon,actions:e.actions,input:e.input,dismissable:e.dismissable,onAction:(g,v)=>h({dismissed:!1,action:g,inputValue:v}),onDismiss:()=>h({dismissed:!0})})})}))}));return iU=t.then(()=>{},()=>{}),t}function O6e(){return kE?(kE(),!0):!1}var Cf=0,v$=null,G1=!1;function sG(){let e=window.__wandReactUi;return!e||typeof e.dialog!="function"||typeof e.toast!="function"?null:e}function R6e(e){switch(e){case"warning":case"danger":case"success":case"question":return e;case"error":return"danger";default:return"info"}}function L6e(e){switch(e){case"success":case"warning":case"error":return e;case"danger":return"error";default:return"info"}}function oU(e){switch(e){case"primary":case"outline":case"ghost":case"danger":return e;default:return"secondary"}}function z6e(e){return Array.isArray(e.buttons)&&e.buttons.length>0?e.buttons:[{label:"\u597D",value:!0,kind:"primary",autofocus:!0}]}function H6e(e){return e.cancelValue!==void 0?e.cancelValue:e.input?null:!1}function q6e(){if(typeof document>"u")return null;let e=document.activeElement;return e&&typeof e.focus=="function"?e:null}function W6e(){G1||(G1=!0,(typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):e=>setTimeout(()=>e(Date.now()),0))(()=>{if(G1=!1,Cf>0)return;let e=v$;if(v$=null,!(!e||!e.isConnected||typeof document>"u"||!document.contains(e)))try{e.focus()}catch{}}))}function V6e(){Cf=Math.max(0,Cf-1),Cf===0&&W6e()}function U6e(e){let t=sG();return t?lG(e,t):null}function sU(e){return lG(e,{dialog:N6e})}function lG(e,t){let r=Cf===0&&!G1?q6e():null,n=z6e(e),a=R6e(e.type),o=!!e.input,l={title:e.title?String(e.title):a==="danger"?"\u786E\u8BA4\u64CD\u4F5C":"\u63D0\u793A",description:e.message?String(e.message):void 0,tone:a,icon:e.icon==null?void 0:String(e.icon),actions:n.map(d=>({label:d.label==null?"":String(d.label),value:{button:d},kind:oU(d.kind),autoFocus:d.autofocus===!0||d.autoFocus===!0})),input:o?{value:e.inputValue==null?"":String(e.inputValue),placeholder:e.inputPlaceholder==null?void 0:String(e.inputPlaceholder),label:e.inputLabel==null?e.title==null?"\u8F93\u5165\u5185\u5BB9":String(e.title):String(e.inputLabel)}:void 0,dismissable:e.dismissable!==!1},c;try{c=Promise.resolve(t.dialog(l))}catch{return xs.cancelDialogRequest(l),null}return Cf===0&&!G1&&(v$=r),Cf+=1,c.then(d=>{if(d.dismissed===!0)return H6e(e);let p=d.action.button;return o&&oU(p.kind)==="primary"?d.inputValue??"":p.value}).catch(d=>{throw xs.cancelDialogRequest(l),d}).finally(V6e)}function K6e(e,t,r){let n=sG();if(!n)return!1;let a={tone:L6e(t),duration:r};try{return n.toast(e,a),!0}catch{return!1}}function X1(e,t){if(e){e.textContent=t,e.classList.remove("hidden");for(var r=e.previousElementSibling;r;){if(r.tagName==="INPUT"){r.setAttribute("data-error","true");break}r=r.previousElementSibling}}}function uG(e){if(e){e.textContent="",e.classList.add("hidden");for(var t=e.previousElementSibling;t;){if(t.tagName==="INPUT"){t.setAttribute("data-error","false");break}t=t.previousElementSibling}}}function Ye(e,t){var r=t==="error"||t==="danger",n=r?4e3:2200;K6e(e,t,n)||b$({title:e,type:r?"warning":t==="success"?"success":"info",duration:n})}function jf(e){e=e||{};var t=U6e(e);return t?t.catch(function(){return sU(e)}):sU(e)}function G6e(e,t){return t=t||{},jf({title:t.title||"\u63D0\u793A",message:typeof e=="string"?e:String(e??""),type:t.type||"info",dismissable:t.dismissable,buttons:[{label:t.okLabel||"\u597D",value:void 0,kind:"primary",autofocus:!0}]})}function kB(e,t){t=t||{};var r=!!t.danger||t.type==="danger";return jf({title:t.title||(r?"\u786E\u8BA4\u64CD\u4F5C":"\u8BF7\u786E\u8BA4"),message:typeof e=="string"?e:String(e??""),type:t.type||(r?"danger":"question"),cancelValue:!1,dismissable:t.dismissable,buttons:[{label:t.cancelLabel||"\u53D6\u6D88",value:!1,kind:"secondary"},{label:t.okLabel||(r?"\u5220\u9664":"\u786E\u5B9A"),value:!0,kind:r?"danger":"primary",autofocus:!r}]}).then(function(n){return n===!0})}function X6e(e,t,r){return r=r||{},jf({title:r.title||"\u8BF7\u8F93\u5165",message:typeof e=="string"?e:String(e??""),type:r.type||"question",input:!0,inputValue:t==null?"":String(t),inputPlaceholder:r.placeholder||"",cancelValue:null,dismissable:r.dismissable,buttons:[{label:r.cancelLabel||"\u53D6\u6D88",value:null,kind:"secondary"},{label:r.okLabel||"\u786E\u5B9A",value:void 0,kind:"primary"}]}).then(function(n){return n==null?null:String(n)})}window.wandAlert=G6e;window.wandConfirm=kB;window.wandPrompt=X6e;window.openWandDialog=jf;window.showToast=Ye;var ju=[],cG=0,Y6e=6,Q6e=16;function b$(e){if((e.actionLabel||e.playSound)&&gG(),!m.notifBubble)return{dismiss:function(){}};var t=++cG,r=e.type||"info",n=e.duration!==void 0?e.duration:8e3,a=document.createElement("div");a.className="notification-bubble",a.setAttribute("data-nid",String(t)),document.body.appendChild(a),Gxe(a,e);var o={id:t,el:a};ju.push(o),CB();var l=a.querySelector(".notification-bubble-close");if(l&&(l.onclick=function(){_1(t)}),e.actionLabel&&e.action){var c=a.querySelector(".notification-bubble-actions button");c&&(c.onclick=function(){e.action(),_1(t)})}return n>0&&setTimeout(function(){_1(t)},n),{dismiss:function(){_1(t)}}}function _1(e){for(var t=-1,r=0;r<ju.length;r++)if(ju[r].id===e){t=r;break}if(t!==-1){var n=ju[t];n.el.classList.add("slide-out"),ju.splice(t,1),CB(),setTimeout(function(){cB(n.el),n.el.parentNode&&n.el.parentNode.removeChild(n.el)},300)}}function CB(){for(var e=Q6e,t=0;t<ju.length;t++)ju[t].el.style.top=e+"px",e+=ju[t].el.offsetHeight+Y6e}try{lU=navigator.userAgent.match(/WandPlatform\/macOS/),B9=window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.wandNative||null,lU&&B9&&typeof window.WandNative>"u"&&(window.WandNative={downloadUpdate:function(e,t,r){try{B9.postMessage({type:"downloadUpdate",url:String(e||""),fileName:String(t||"wand-update.dmg"),source:String(r||"local")})}catch{}}})}catch{}var lU,B9,_f=typeof WandNative<"u"&&typeof WandNative.sendNotification=="function",iy=navigator.userAgent.match(/WandApp\/([^\s]+)/),dG=/WandPlatform\/macOS/.test(navigator.userAgent),Z6e=!!iy&&!dG,pG=iy&&Z6e?iy[1]:null,y$=iy&&dG?iy[1]:null;function w$(){if(_f){var e=m.sessions.some(function(t){return!t.archived&&(t.status==="running"||t.status==="thinking"||t.status==="initializing")});if(typeof WandNative.setKeepScreenOn=="function")try{WandNative.setKeepScreenOn(e)}catch{}if(e){if(typeof WandNative.startKeepAlive=="function")try{WandNative.startKeepAlive()}catch{}}else if(typeof WandNative.stopKeepAlive=="function")try{WandNative.stopKeepAlive()}catch{}}}function fG(){if(_f&&typeof WandNative.getPermission=="function")try{return WandNative.getPermission()}catch{}return null}function J6e(){if(_f){var e=fG();if(e==="default"||e==="denied")try{WandNative.requestPermission()}catch{}return}typeof Notification<"u"&&Notification.permission==="default"&&Notification.requestPermission()}function eEe(e){var t=e||{};return!(t.onlyWhenHidden&&!document.hidden||t.skipWhenSelectedSessionId&&t.skipWhenSelectedSessionId===m.selectedId&&!document.hidden)}function tEe(e,t){if(!e||!t||t<=0)return!1;var r=m.notificationHistory[e]||0,n=Date.now();return n-r<t?!0:(m.notificationHistory[e]=n,!1)}function XE(e,t,r){var n=r||{},a=n.tag||"";if(eEe(n)&&!tEe(a,n.minIntervalMs||0)){if(_f){var o=fG();if(o!=="granted")return;try{var l=a;n.kind&&(l=n.kind+(a?":"+a:"")),WandNative.sendNotification(e||"Wand",t||"",l||"")}catch{}return}if(!(typeof Notification>"u"||Notification.permission!=="granted")&&document.hidden)try{var c=new Notification(e,{body:t||"",icon:n.icon||C8,tag:a||void 0});c.onclick=function(){window.focus(),c.close(),n.onClick&&n.onClick()},setTimeout(function(){c.close()},1e4)}catch{}}}function rEe(e,t){if(!(!t||!t.title)){var r=m.sessions.find(function(a){return a.id===e});if(r){var n=r.summary||r.command||e;XE("\u4EFB\u52A1\u8FDB\u884C\u4E2D",n+`
|
|
264
|
-
`+t.title,{kind:"task",tag:"wand-task-"+e+"-"+t.title,minIntervalMs:9e4,onlyWhenHidden:!0,skipWhenSelectedSessionId:e,onClick:function(){e!==m.selectedId&&In(e)}})}}}function mG(e,t){!m.config||m.config.canManageSettings===!1||(lEe(e||"-",t||"-"),XE("Wand \u53D1\u73B0\u65B0\u7248\u672C","\u5F53\u524D "+(e||"-")+" \u2192 \u6700\u65B0 "+(t||"-"),{kind:"update",tag:"wand-update",minIntervalMs:3e5}))}function nEe(e,t){XE("\u9700\u8981\u4F60\u7684\u6388\u6743",t,{kind:"permission",tag:"wand-perm-"+e,minIntervalMs:6e4,onlyWhenHidden:!0,skipWhenSelectedSessionId:e,onClick:function(){e!==m.selectedId&&In(e)}})}function aEe(e,t,r){XE(t,r,{kind:"task-ended",tag:"wand-ended-"+e,minIntervalMs:1e4,onClick:function(){e!==m.selectedId&&In(e)}})}var wf={},iEe=30;function uU(e){if(!e)return"";var t=String(e).replace(/^#+\s+/gm,"").replace(/\*\*/g,"").replace(/`/g,"").trim(),r=t.split(`
|
|
265
|
-
`)[0].trim();return r.length>100&&(r=r.slice(0,100)+"\u2026"),r}function x$(e){!_f||typeof WandNative.updateSessionProgress!="function"||e&&(wf[e]&&clearTimeout(wf[e]),wf[e]=setTimeout(function(){delete wf[e],oEe(e)},iEe))}function oEe(e){var t=m.sessions.find(function(A){return A.id===e});if(t){var r=t.summary||t.command||e,n=t.status||"running";if(n==="idle"||n==="archived"||n==="exited"){hG(e);return}for(var a=null,o="",l="",c=[],d=t.messages||[],p=d.length-1;p>=0;p--){var h=d[p];if(!(!h.content||!Array.isArray(h.content))){if(!l&&h.role==="assistant")for(var g=h.content.length-1;g>=0;g--){var v=h.content[g];if(v&&v.type==="text"&&v.text&&v.text.trim()){l=uU(v.text);break}}if(h.role==="user"){var y=h.content.some(function(A){return A&&A.__queued});if(!y)for(var w=0;w<h.content.length;w++){var x=h.content[w];if(x&&x.type==="text"&&x.text&&x.text.trim()){var k=uU(x.text);o||(o=k),c.length<4&&c.push(k);break}}}if(!a)for(var F=h.content.length-1;F>=0;F--){var C=h.content[F];if(C&&C.type==="tool_use"&&C.name==="TodoWrite"&&C.input&&C.input.todos){a=C.input.todos;break}}if(a&&c.length>=4&&l)break}}c.reverse();var D="";e===m.selectedId&&m.currentTask&&m.currentTask.title&&(D=m.currentTask.title);var S={sessionLabel:r,status:n,currentTask:D,latestUserText:o,latestAssistantText:l,todos:a||[],recentUserTexts:c};try{WandNative.updateSessionProgress(e,JSON.stringify(S))}catch{}}}function hG(e){if(!(!_f||typeof WandNative.clearSessionProgress!="function")){wf[e]&&(clearTimeout(wf[e]),delete wf[e]);try{WandNative.clearSessionProgress(e)}catch{}}}window.handleNativeBack=function(){if(Il.isOpen()||O6e())return!0;var e=window.__wandReactUi;if(e&&typeof e.closeTopmost=="function")try{if(e.closeTopmost())return!0}catch{}var t=window.__wandReactFilePreview;if(t&&typeof t.closeTopmost=="function")try{if(t.closeTopmost())return!0}catch{}if(Gc.closeIfOpen()||wl.closeIfOpen())return!0;var r=window.__wandReactQuickCommit;if(r&&typeof r.closeTopmost=="function")try{if(r.closeTopmost())return!0}catch{}var n=window.__wandReactNewSession;if(n&&typeof n.closeTopmost=="function")try{if(n.closeTopmost())return!0}catch{}var a=window.__wandReactFolderPicker;if(a&&typeof a.closeTopmost=="function")try{if(a.closeTopmost())return!0}catch{}var o=window.__wandReactWorktreeMerge;if(o&&typeof o.closeTopmost=="function")try{if(o.closeTopmost())return!0}catch{}var l=window.__wandReactSettings;if(l&&typeof l.closeTopmost=="function")try{if(l.closeTopmost())return!0}catch{}return m.filePanelOpen&&xU()?(X0(!1),!0):m.sessionsDrawerOpen&&xo()?(eg(),!0):xU()&&m.selectedId?(m.selectedId=null,xd(),m.sessionsDrawerOpen=!0,Vr("wand-sidebar-open",!0),yf(),!0):!1};function gG(){m.notifSound&&sEe()}function sEe(){try{let a=function(o,l,c){var d=r.createOscillator(),p=r.createGain();d.type="sine",d.frequency.value=o,p.gain.setValueAtTime(0,r.currentTime+l),p.gain.linearRampToValueAtTime(.5*n,r.currentTime+l+.04),p.gain.exponentialRampToValueAtTime(.001,r.currentTime+l+c),d.connect(p),p.connect(r.destination),d.start(r.currentTime+l),d.stop(r.currentTime+l+c)};var e=a,t=window.AudioContext||window.webkitAudioContext;if(!t)return!1;var r=new t;r.state==="suspended"&&r.resume();var n=(m.notifVolume||0)/100;return a(523,0,.25),a(659,.12,.3),setTimeout(function(){r.close()},600),!0}catch{return!1}}function lEe(e,t){if(m._updateBubbleShown)return;m._updateBubbleShown=!0,gG();var r=++cG,n=document.createElement("div");n.className="notification-bubble update-card",n.setAttribute("data-nid",String(r)),document.body.appendChild(n),Xxe(n,e,t);var a={id:r,el:n};ju.push(a),CB();var o=n.querySelector(".update-card-close");o&&(o.onclick=function(){_1(r),m._updateBubbleShown=!1});var l=n.querySelector("#update-bubble-action"),c=n.querySelector(".update-card-action-label"),d=n.querySelector("#update-card-subtitle"),p=n.querySelector("#update-card-status"),h=n.querySelector("#update-card-progress");function g(x,k){if(p){if(p.textContent=x||"",p.classList.remove("hidden","error","success"),!x){p.classList.add("hidden");return}k&&p.classList.add(k)}}function v(x){d&&(d.textContent=x||"")}function y(x){h&&h.classList.toggle("active",!!x)}function w(x){y(!1),n.classList.remove("is-busy","is-success"),v("\u66F4\u65B0\u672A\u5B8C\u6210"),g(x,"error"),l.disabled=!1,c&&(c.textContent="\u91CD\u8BD5")}l&&(l.onclick=function(){l.disabled=!0,n.classList.add("is-busy"),c&&(c.textContent="\u66F4\u65B0\u4E2D\u2026"),v("\u6B63\u5728\u4E0B\u8F7D\u5E76\u5B89\u88C5\u65B0\u7248\u672C\u2026"),y(!0),g(""),fetch("/api/update",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin"}).then(function(x){return Dt(x)}).then(function(x){if(n.classList.add("is-success"),v((x.message||"\u66F4\u65B0\u5B8C\u6210")+"\uFF0C\u6B63\u5728\u91CD\u542F\u670D\u52A1\u2026"),g(""),c&&(c.textContent="\u6B63\u5728\u91CD\u542F\u2026"),x.detachedUpdate){oy(x.previousInstanceId||null,x.version||null);return}if(x.restartRequired===!1){y(!1),n.classList.remove("is-busy"),l.disabled=!1,c&&(c.textContent="\u5DF2\u5B8C\u6210");return}uEe(w)}).catch(function(x){mu("update_failed",x),w(x instanceof Aa?ei(x,"\u66F4\u65B0\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002"):"\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8FDE\u63A5\u540E\u91CD\u8BD5")})})}function uEe(e){fetch("/api/restart",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin"}).then(function(t){return Dt(t)}).then(function(){oy()}).catch(function(t){if(t instanceof Aa&&t.status>0){e(ei(t,"\u91CD\u542F\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002"));return}oy()})}function oy(e,t){X5e(e,t)}function cEe(e,t,r){Y5e(e,t,r)}var dEe={setTimeout:(e,t)=>globalThis.setTimeout(e,t),clearTimeout:e=>globalThis.clearTimeout(e),setInterval:(e,t)=>globalThis.setInterval(e,t),clearInterval:e=>globalThis.clearInterval(e)};function pEe(e){let t=e.timers??dEe,r=null,n=null;function a(){r!==null||!e.selectedSessionId()||(r=t.setTimeout(()=>{r=null;let c=e.selectedSessionId();c&&e.refresh(c)},e.coalesceMs))}function o(){n===null&&(n=t.setInterval(()=>{if(e.hidden())return;let c=e.selectedSessionId();c&&e.refresh(c)},e.pollMs))}function l(){r!==null&&(t.clearTimeout(r),r=null),n!==null&&(t.clearInterval(n),n=null)}return{schedule:a,startPolling:o,stop:l}}var I9=0;function SB(){return I9=Math.max(Date.now(),I9+1),I9}function fEe(){let e=new Map;return{accept(t,r,n){if(!t||!r)return!1;let a=e.get(t);return a&&n<a.requestedAt?!1:(e.set(t,{status:r,requestedAt:n}),!0)},peek(t){return t?e.get(t)?.status??null:null},forget(t){e.delete(t)}}}var rE=null,_6=null,P6=null,nE=null;function mEe(e){let t=[];for(let r of e)r.type!=="file"||typeof r.path!="string"||!r.path.trim()||t.push({path:r.path,...typeof r.name=="string"&&r.name?{name:r.name}:{},type:"file"});return t}function hEe(){return fi()}function FB(e){_6?.(),rE=e,_6=tD({confirmDiscard:e.confirmDiscard,async copyText(r){if(!await e.copyText(r))throw new Error("\u590D\u5236\u5931\u8D25\u3002")},appendToComposer:e.appendToComposer,notify:e.notify,onSaved:e.onSaved});let t=!1;return()=>{t||rE!==e||(t=!0,nE=null,ks.closeIfOpen(),_6?.(),_6=null,rE=null)}}function gEe(e){let t=rE,r=typeof e=="string"?e.trim():"";return!t||!r||Il.isOpen()||!hEe()?!1:(ks.open({path:r,siblings:mEe(t.getSiblings(r))}),!0)}function Pf(e){if(!ks.isOpen())return!0;let t=Op.getSnapshot();return t.saving?!1:t.dirty?(nE=e,P6||(P6=ks.execute({type:"close"}),P6.then(r=>{let n=nE;if(nE=null,P6=null,!(!r||!n))try{n()}catch(a){console.warn("[wand] Failed to continue overlay open intent",a)}})),!1):(ks.closeIfOpen(),!ks.isOpen())}function vEe(){ja("topbar:git")}var DB=pEe({coalesceMs:1200,pollMs:2e4,selectedSessionId:function(){return m.selectedId},hidden:function(){return document.hidden},refresh:function(e){wy(e,{force:!0})}}),AB=fEe(),k1=new Map;function $B(e,t,r){m.gitStatus=t||null,m.gitStatusSessionId=t?e:null,r&&(m.gitStatusLastFetchAt=Date.now()),vEe()}function vG(e,t,r){AB.accept(e,t,r??SB())&&e===m.selectedId&&$B(e,t,!0)}function bG(e){$B(e,e?AB.peek(e):null,!1)}function yG(){DB.schedule()}function bEe(){DB.startPolling()}function yEe(){DB.stop()}function wy(e,t){if(!e)return Promise.resolve(null);var r=t&&t.force,n=Date.now();if(!r&&m.gitStatusSessionId===e&&m.gitStatus&&n-m.gitStatusLastFetchAt<1e3)return Promise.resolve(m.gitStatus);if(!r&&k1.has(e))return k1.get(e);var a=SB(),o=fetch("/api/sessions/"+encodeURIComponent(e)+"/git-status",{credentials:"same-origin"}).then(function(l){if(!l.ok)throw new Error("git-status "+l.status);return l.json()}).then(function(l){return vG(e,l||{isGit:!1},a),l}).catch(function(){var l=AB.peek(e);return e===m.selectedId&&$B(e,l,!1),null}).finally(function(){k1.get(e)===o&&k1.delete(e)});return k1.set(e,o),o}k7({onOpen:function(){fi(["quickCommit"])},onClose:function(){},onArchived:function(){Tl()},nextStatusRequestTime:SB,onStatusLoaded:function(e,t,r){vG(e,t,r)},toast:function(e,t){Ye(e,t)}});function BB(){if(m.selectedId){var e=m.selectedId,t=function(){fi(["quickCommit"])&&Pc.open({sessionId:e})};Pf(t)&&t()}}var wEe=B(si(),1),cU=B(Ee(),1),H0=new Map;function xEe(e){if(!e)return"";let t=e.structuredState,r=wb(e);return JSON.stringify([e.id??"",e.archived===!0,r.stage,r.label,r.action,r.toolId,t?.activeRequestId??"",e.status??"",e.ptyRunning?"1":"0",e.permissionBlocked?"1":"0",e.pendingEscalation?"1":"0",t?.inFlight?"1":"0",t?.phase??"",t?.turnStartedAt??"",t?.lastActivityAt??"",e.turnStartedAt??"",e.lastActivityAt??"",e.queuedMessages?.length??0])}function EEe(){for(let[e,t]of H0)e.isConnected||(t.root.unmount(),H0.delete(e))}function kEe(e,t){EEe();let r=xEe(t),n=H0.get(e);n&&n.lastKey===r||(n?n.lastKey=r:(n={root:(0,wEe.createRoot)(e),lastKey:r},H0.set(e,n)),n.root.render((0,cU.jsx)(La,{children:(0,cU.jsx)(xb,{activity:t??null})})))}function CEe(e){let t=H0.get(e);t&&(t.root.unmount(),H0.delete(e)),e.replaceChildren()}var SEe=B(si(),1),FEe=B(er(),1),dU=B(Ee(),1),N6=new Map;function DEe(e,t,r,n=""){for(let[l,c]of N6)l.isConnected||(c.root.unmount(),N6.delete(l));let a=N6.get(e);if(a&&a.disabled===t&&a.onKey===r&&a.owner===n)return;let o=a?.root??(0,SEe.createRoot)(e);N6.set(e,{root:o,disabled:t,onKey:r,owner:n}),(0,FEe.flushSync)(()=>o.render((0,dU.jsx)(La,{children:(0,dU.jsx)(PK,{disabled:t,onKey:r,owner:n})})))}var AEe="\x1B[200~",$Ee="\x1B[201~";function wG(e,t=!0){if(!e)return"";let r=e.replace(/\r?\n/g,"\r");if(!t)return r;let n=r.replace(/\u001b/g,"\u241B");return`${AEe}${n}${$Ee}`}function BEe(e){return e?/^[a-zA-Z0-9_./:@%+,=-]+$/.test(e)?e:`'${e.replace(/'/g,"'\\''")}'`:""}function IEe(e,t=!0){return wG(BEe(e),t)}function MEe(e){let t=String(e||"").trim().toLowerCase();return t==="claude"||t==="pi"}var TEe=/\.(?:png|jpe?g|gif|webp|bmp|svg)$/i;function xG(e){return e?sy(e.mimeType)||TEe.test(e.savedPath||e.originalName||""):!1}function EG(e,t={}){let r=t.bracketedPaste!==!1,n=MEe(t.provider),a=[];for(let o of e||[]){let l=typeof o?.savedPath=="string"?o.savedPath:"";if(!l)continue;let c=xG(o);a.push({data:IEe(l,r),shortcutKey:"paste",...c?{image:!0}:{}}),(!c||n)&&a.push({data:" "})}return a}function sy(e){return typeof e=="string"&&e.toLowerCase().startsWith("image/")}function jEe(e){switch(String(e||"").toLowerCase()){case"image/jpeg":case"image/jpg":return".jpg";case"image/gif":return".gif";case"image/webp":return".webp";case"image/bmp":return".bmp";case"image/svg+xml":return".svg";default:return".png"}}function _Ee(e){if(!e.active()){V1.clear();return}let t=[];document.querySelectorAll("[data-composer-rail-host]").forEach((r,n)=>{r.isConnected&&t.push({key:r.dataset.composerRailHost||`composer-rail-${n}`,target:r,onSubmit(){e.submit(),e.focusInput()}})}),V1.sync(t)}function PEe(e,t){return e.target===t.target&&e.interactiveVisible===t.interactiveVisible&&e.interactiveOn===t.interactiveOn}var NEe=class extends Vs{constructor(){super(PEe)}},K0=new NEe,OEe="[data-composer-popover-host]";function REe(e){vy({selector:OEe,store:K0,flush:!0,build(t){return{key:"composer-popover-items",target:t,...e.resolve(),onAttach:e.onAttach,onToggleInteractive:e.onToggleInteractive}}})}function LEe(e,t){if(!e||!t)return null;for(var r=t;r&&r.parentNode&&r.parentNode!==e;)r=r.parentNode;return!r||r.parentNode!==e?null:r}function zEe(e,t){if(!e)return null;for(var r=0;r<t.length;r++){var n=LEe(e,t[r]);if(n)return n}return null}var gd=null,M9=!1,CE=new Map,SE=new Map;function kG(){gd||M9||(M9=!0,globalThis.__wandImportBrowserModule("843c2750657d433e").then(e=>{gd=e,CE.forEach(t=>e.paintQueueBar(...t)),SE.forEach(t=>e.paintCrossSessionQueue(...t)),CE.clear(),SE.clear()}).catch(()=>{M9=!1}))}function HEe(...e){if(kG(),gd){gd.paintQueueBar(...e);return}CE.set(e[0],e)}function qEe(...e){if(kG(),gd){gd.paintCrossSessionQueue(...e);return}SE.set(e[0],e)}function E$(e){CE.delete(e),SE.delete(e),gd?gd.clearQueueView(e):e.replaceChildren()}function Vi(e,t){return fetch(e,{...t,headers:{...t?.headers,"X-Wand-Tool-Projection":"compact"}})}function fa(e){if(e){e.style.minHeight="";var t=window.getComputedStyle(e),r=parseFloat(t.minHeight||""),n=Number.isFinite(r)?r:40,a=parseFloat(t.maxHeight||""),o=Number.isFinite(a)?Math.max(n,a):120,l=wd(),c=e.classList.contains("is-terminal-passthrough")&&e.closest(".input-composer")?.dataset.composerExpanded!=="true";if(c||!e.value||e.value.trim()===""){e.style.height=n+"px",e.style.minHeight=n+"px",e.style.overflowY=l?"auto":"hidden",e.scrollTop=0,e.classList.remove("has-multiline-draft","has-clipped-draft"),e.closest(".input-composer")?.classList.remove("is-expanded"),Mf(e);return}var d=e.scrollTop,p=e.selectionStart===e.value.length&&e.selectionEnd===e.value.length;e.style.overflowY="hidden",e.style.height=n+"px";var h=e.scrollHeight,g=Math.max(n,Math.min(h,o)),v=h>o,y=h>n+1;if(e.style.height=g+"px",e.style.minHeight=n+"px",e.style.overflowY=v||l?"auto":"hidden",e.classList.toggle("has-multiline-draft",y),e.classList.toggle("has-clipped-draft",v),e.closest(".input-composer")?.classList.toggle("is-expanded",y),v)if(p)BE(e);else{var w=Math.max(0,e.scrollHeight-e.clientHeight);e.scrollTop=Math.min(d,w)}else e.scrollTop=0;Mf(e)}}var P1=!1;function CG(e){return!e||e.archived?!1:cr(e)?!!(e.structuredState&&e.structuredState.inFlight):e.status==="running"}function SG(){return m.sessions.some(CG)}function WEe(){var e=m.sessions.filter(CG);if(e.length===0)return null;if(m.selectedId){var t=e.find(function(r){return r.id===m.selectedId});if(t)return t}return e.sort(function(r,n){return(Date.parse(n.startedAt)||0)-(Date.parse(r.startedAt)||0)}),e[0]}function FG(e){if(!e)return"";for(var t=Array.isArray(e.queuedMessages)?e.queuedMessages:[],r=t.length-1;r>=0;r--){var n=typeof t[r]=="string"?t[r].trim():"";if(n)return n}for(var a=Array.isArray(e.messages)?e.messages:[],o=a.length-1;o>=0;o--){var l=a[o];if(!(!l||l.role!=="user"||!Array.isArray(l.content))){var c=l.content.filter(function(h){return h&&h.type==="text"&&typeof h.text=="string"}).map(function(h){return h.text});if(c.length)return c.join(`
|
|
266
|
-
`).trim();for(var d=0;d<l.content.length;d++){var p=l.content[d];if(p&&p.type==="tool_result"&&typeof p.content=="string")return p.content.trim()}return""}}return""}function DG(e,t,r,n){var a=m.sessions.find(function(l){return l.id===e}),o=a&&Array.isArray(a.queuedMessages)?a.queuedMessages:[];return Ja.rollback(e,o,[],n,{text:t,index:r})}function VEe(e,t){var r=typeof t=="string"?t.trim():"";if(r&&FG(e)===r)return Ye("\u4E0E\u4E0A\u4E00\u6761\u6D88\u606F\u76F8\u540C\uFF0C\u5DF2\u5FFD\u7565\uFF0C\u4E0D\u4F1A\u52A0\u5165\u6392\u961F\u3002","warning"),Promise.resolve();var n=typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Date.now().toString(36)+"-"+Math.random().toString(36).slice(2,10),a=Array.isArray(e.queuedMessages)?e.queuedMessages.slice():[],o=a.slice();o.push(t);var l=Ja.advance(e.id,"local");rr({id:e.id,queuedMessages:o}),e.id===m.selectedId&&pa();var c=e.title||FK(e.command)||"\u5F53\u524D\u4F1A\u8BDD";return Ye("\u5DF2\u52A0\u5165\u300C"+c+"\u300D\u7684\u5F85\u53D1\u9001\u961F\u5217\uFF08\u4FDD\u7559\u4E0A\u4E0B\u6587\uFF09\u3002","info"),Vi("/api/structured-sessions/"+e.id+"/messages",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({input:t,idempotencyKey:n})}).then(function(d){return d.ok?d.json():d.json().catch(function(){return{error:"\u8BF7\u6C42\u5931\u8D25"}}).then(function(p){throw new Error(p&&p.error||"\u65E0\u6CD5\u6392\u961F\u6D88\u606F\u3002")})}).then(function(d){d&&d.id&&(d=Ja.filter(d,e.id,l),rr(d),d.id===m.selectedId&&pa())}).catch(function(d){var p=DG(e.id,t,a.length,l);p&&rr({id:e.id,queuedMessages:p}),e.id===m.selectedId&&pa(),Ye(d&&d.message||"\u6392\u961F\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002","error")})}function UEe(e){var t=WEe();if(t&&cr(t)){VEe(t,e);return}if(m.crossSessionQueue.length>=10){Ye("\u6392\u961F\u6D88\u606F\u5DF2\u6EE1\uFF08\u6700\u591A 10 \u6761\uFF09\uFF0C\u8BF7\u7B49\u5F85\u5F53\u524D\u4F1A\u8BDD\u5B8C\u6210\u3002","warning");return}var r="csq-"+Date.now()+"-"+Math.random().toString(36).slice(2,8);m.crossSessionQueue.push({id:r,text:e,cwd:ts(),mode:m.chatMode||"managed",tool:bd(),queuedAt:Date.now()}),Pu(),Al()}function KEe(e){if(P1){m.crossSessionQueue.unshift(e),R9(!!m.pageUnloading)&&Pu(),Al();return}P1=!0,Vi("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(jl({kind:"pty",command:e.tool,cwd:e.cwd,mode:e.mode,initialInput:e.text}))}).then(function(t){return Dt(t)}).then(function(t){return P1=!1,Ey(t)}).catch(function(t){P1=!1,Ye(t&&t.message||"\u65E0\u6CD5\u542F\u52A8\u6392\u961F\u4F1A\u8BDD\u3002","error"),m.crossSessionQueue.unshift(e),R9(!!m.pageUnloading)&&Pu(),Al()})}function GEe(e){var t=m.crossSessionQueue.findIndex(function(n){return n.id===e});if(!(t<0)){var r=m.crossSessionQueue.splice(t,1)[0];Pu(),Al(),Vi("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(jl({kind:"pty",command:r.tool,cwd:r.cwd,mode:r.mode,initialInput:r.text}))}).then(function(n){return Dt(n)}).then(function(n){return Ey(n)}).catch(function(n){Ye(n&&n.message||"\u65E0\u6CD5\u542F\u52A8\u6392\u961F\u4F1A\u8BDD\u3002","error"),m.crossSessionQueue.splice(t,0,r),R9(!!m.pageUnloading)&&Pu(),Al()})}}function XEe(e){var t=m.crossSessionQueue.findIndex(function(r){return r.id===e});t<0||(m.crossSessionQueue.splice(t,1),Pu(),Al())}function YE(){if(m.config&&m.crossSessionQueue.length!==0&&!SG()&&!P1){var e=m.crossSessionQueue.shift();Pu(),KEe(e),Al()}}function AG(e){var t=Math.floor((Date.now()-e)/1e3);if(t<60)return t+"s";var r=Math.floor(t/60);return r<60?r+"m":Math.floor(r/60)+"h"}function Al(){try{YEe()}catch(e){console.error("[wand] cross-session queue render failed:",e)}finally{JEe()}}function YEe(){var e=document.querySelector(".cross-session-queue"),t=document.querySelector(".input-panel"),r=document.querySelector(".structured-status-bar"),n=document.querySelector(".input-composer"),a=document.getElementById("cross-session-queue-host");if(m.crossSessionQueue.length===0){e&&(E$(e),e.remove()),Pu();return}var o=t&&!t.classList.contains("hidden"),l=o?t:a;if(l){var c=o?zEe(l,[r,n]):null;e&&e.parentNode!==l&&(E$(e),e.remove(),e=null),e?o&&c&&e.nextSibling!==c&&l.insertBefore(e,c):(e=document.createElement("div"),e.className="cross-session-queue",c?l.insertBefore(e,c):l.appendChild(e)),qEe(e,m.crossSessionQueue.map(d=>({id:d.id,text:d.text,age:AG(d.queuedAt)})))}}var QEe=5e3,Y1=null;function ZEe(){if(m.crossSessionQueue.length===0){IB();return}var e=document.querySelectorAll(".queue-item-age");m.crossSessionQueue.forEach(function(t,r){e[r]&&(e[r].textContent=AG(t.queuedAt))}),YE()}function IB(){Y1!==null&&(clearInterval(Y1),Y1=null)}function JEe(){if(m.crossSessionQueue.length===0){IB();return}Y1===null&&(Y1=setInterval(ZEe,QEe))}document.addEventListener("click",function(e){var t=e.target;if(t.closest("#queue-clear-all")){e.preventDefault(),m.crossSessionQueue=[],Pu(),Al();return}var r=t.closest(".queue-item-send-now");if(r){e.preventDefault(),GEe(r.dataset.queueId);return}var n=t.closest(".queue-item-cancel");if(n){e.preventDefault(),XEe(n.dataset.queueId);return}});function eke(e){e=e||{};var t=document.getElementById("input-box"),r=t?t.value:"",n=r.trim();if(m.selectedId){hk(r,m.selectedId)&&Nf(e);return}if(n&&SG()){t&&(t.value=""),Mf(t),UEe(n);return}var a=m.chatMode||"managed",o=ts(),l=bd();Vi("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(jl({kind:"pty",command:l,provider:l,cwd:o,mode:a,initialInput:n||void 0}))}).then(function(c){return Dt(c)}).then(function(c){return Of(c.id),!m.selectedId&&t&&(t.value=""),Ey(c)}).catch(function(c){Ye(ei(c,l==="codex"?"\u65E0\u6CD5\u542F\u52A8 Codex \u4F1A\u8BDD\u3002":"\u65E0\u6CD5\u542F\u52A8 Claude \u4F1A\u8BDD\u3002"),"error")})}var k$=0;function MB(e){var t=k$,r=document.activeElement;return function(){return m.selectedId===e&&k$===t&&(document.activeElement===r||document.activeElement===document.body)}}function tke(e,t){k$++;var r=m.sessions.find(function(a){return a.id===e}),n=cr(r);n?m.currentView="chat":m.currentView="terminal",n||m.terminal||Ns(),gI(),ZE(),Ed(e),t?.focusInput!==!1&&m.terminalInteractive?wd()||NB():t?.focusInput!==!1&&Ml(!0),!n&&r&&xy(r)&&rke(r,t),n||qi("view-switch",{forceReplay:!0}),ja("session:view")}var O6=null;function rke(e,t){if(!(!e||O6===e.id||!xy(e))){var r=MB(e.id);O6=e.id,HB(e.id).then(function(n){if(!(!n||m.selectedId!==e.id))return rr(n),hi(),ck(n.id),Nu(n.id).then(function(){m.selectedId===e.id&&(ZE(),t?.focusInput!==!1&&r()&&m.terminalInteractive&&!wd()&&NB())})}).finally(function(){O6===e.id&&(O6=null)})}}function nke(e,t,r,n){Lt.edit(e,{restore:{text:t,attachments:r},persist:n}),Ed(e),Ta()}function ake(e,t){if(!(!e||!wd())){var r=function(){if(!(m.selectedId!==t||!e.isConnected||e.disabled))try{e.focus({preventScroll:!0})}catch{e.focus()}};r(),requestAnimationFrame(r)}}function pU(e,t,r){var n=_G(r);if(e&&t){nke(e,t,[],!1),Wi("\u8FD9\u6BB5\u8F93\u5165\u6CA1\u6709\u9001\u5230\u7EC8\u7AEF\uFF08"+n+"\uFF09\uFF0C\u5DF2\u653E\u56DE\u8F93\u5165\u6846\uFF1B\u91CD\u8BD5\u524D\u5148\u770B\u7EC8\u7AEF\u91CC\u662F\u5426\u7559\u4E0B\u534A\u884C\u3002",e);return}Wi("\u56DE\u8F66\u6CA1\u6709\u9001\u5230\u7EC8\u7AEF\uFF08"+n+"\uFF09\u3002",e)}function Nf(e){e=e||{};var t=!!e.interrupt,r=document.documentElement.classList.contains("is-wand-embed-terminal");if(m.terminalInteractive&&!r){var n=document.getElementById("input-box"),a=n?n.value:"",o=m.selectedId,l=m.currentView;return n&&a?(n.value="",If("",!0),fa(n),ia(a,"interactive_text",l,o).then(function(){return ia("\r","enter_text",l,o)}).catch(function(k){pU(o,a,k)})):ia("\r","enter_text",l,o).catch(function(k){pU(o,"",k)})}var c=document.getElementById("input-box"),d=G0(),p=d&&d.id||m.selectedId,h=m.currentView,g=c?c.value:TX(p),v=$y(p);if(m.promptOptimizeRequest&&m.promptOptimizeRequest.sessionId===p||bxe(g,d)||!p||!hk(g,p))return Promise.resolve();var y=Lt.pendingSubmission(p,{text:g,attachments:v});if(y)return y;c&&m.selectedId===p&&(c.value="",fa(c)),Ta(),ake(c,p);var w=IG("\u6B63\u5728\u53D1\u9001\u2026",p,"\u5DF2\u53D1\u9001"),x=Lt.submit(p,g,function(k){var F=k.attachments;return Promise.resolve().then(function(){return F.length?IX(p,F).catch(function(C){throw new Error("\u9644\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF1A"+(C&&C.message||C))}):[]}).then(function(C){var D=!!g.trim(),S=IU(C)+(D?g:C.length?"\u8BF7\u67E5\u770B\u9644\u4EF6\u3002":""),A=null;if(!cr(d)&&C.length){var I=C.filter(function(N){return xG({savedPath:N&&N.savedPath,mimeType:N&&(N.mimeType||N.type),originalName:N&&N.originalName})});if(I.length){var j=C.filter(function(N){return I.indexOf(N)<0}),$=IU(j)+(D?g:j.length?"\u8BF7\u67E5\u770B\u9644\u4EF6\u3002":"");A=EG(I,{bracketedPaste:CI(d.id,d.provider),provider:d.provider||iu(d.command||"")}),$&&A.push({data:$,shortcutKey:"enter_text"}),A.push({data:"\r",shortcutKey:"enter_text"})}}if(p===m.selectedId&&_X(),cr(d))return oke(S,c,d,{interrupt:t,composerCaptured:!0});var P=A||Fke(d,S);if(m.selectedId!==p)throw new Error("\u53D1\u9001\u524D\u4F1A\u8BDD\u5DF2\u5207\u6362\uFF0C\u539F\u8349\u7A3F\u5DF2\u6062\u590D\u3002");if(!m.wsConnected)throw new Error("\u7F51\u7EDC\u5DF2\u65AD\u5F00\uFF0C\u6D88\u606F\u672A\u53D1\u9001\uFF0C\u539F\u8349\u7A3F\u5DF2\u6062\u590D\u3002");return Ske(d).then(function(N){if(!N){var R=new Error("\u4F1A\u8BDD\u5C1A\u672A\u51C6\u5907\u597D\uFF0C\u6D88\u606F\u672A\u53D1\u9001\u3002");throw R.__wandComposerReported=!0,R}if(m.selectedId!==p)throw new Error("\u53D1\u9001\u524D\u4F1A\u8BDD\u5DF2\u5207\u6362\uFF0C\u539F\u8349\u7A3F\u5DF2\u6062\u590D\u3002");return YG(),$ke(P,"enter_text",A?0:30,h,N.id||p,!!A)})}).then(function(C){return DE(p,w),C})}).catch(function(k){Ed(p),k&&k.__wandComposerReported||Wi(_G(k),p)}).finally(function(){Ta()});return By(),x}var R6={},ike=350;function oke(e,t,r,n){n=n||{};var a=!!n.interrupt;if(!e)return Promise.resolve();if(!r)return Promise.reject(new Error("\u4F1A\u8BDD\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6216\u65B0\u5EFA\u4F1A\u8BDD\u3002"));var o=!!(r.structuredState&&r.structuredState.inFlight&&r.status==="running");if(o&&!a&&FG(r)===e.trim())return n.composerCaptured||(t&&r.id===m.selectedId&&(t.value="",fa(t)),PE(r.id,"",!0)),Wi("\u4E0E\u4E0A\u4E00\u6761\u6D88\u606F\u76F8\u540C\uFF0C\u672A\u52A0\u5165\u6392\u961F\u3002",r.id),Promise.resolve();var l=Date.now(),c=!n.composerCaptured,d=R6[r.id],p=typeof d=="number"?d:d&&d.at||0,h=typeof d=="number"?e:d&&d.input;if(c&&h===e&&l-p<ike)return Promise.resolve();var g=c?{at:l,input:e}:null;g&&(R6[r.id]=g),r.id===m.selectedId&&jB(!1);var v=o&&a,y=o&&!a,w=Ja.read(r.id),x=-1,k=rk(Array.isArray(r.messages)?r.messages.slice():[]),F;if(y){var C=Array.isArray(r.queuedMessages)?r.queuedMessages.slice():[];if(x=C.length,C.push(e),w=Ja.advance(r.id,"local"),F={id:r.id,queuedMessages:C},rr(F),r.id===m.selectedId){var D=m.sessions.find(function($){return $.id===r.id})||r;m.currentMessages=es(D,Fl(D,D.output,!1)),oa(!0),pd()}r.id===m.selectedId?F$(C.length>1?"\u5DF2\u52A0\u5165\u6392\u961F\uFF08\u5171 "+C.length+" \u6761\u7B49\u5F85\uFF09":"\u5DF2\u52A0\u5165\u961F\u5217\uFF0C\u5C06\u6309\u6267\u884C\u5668\u652F\u6301\u7684\u65F6\u673A\u81EA\u52A8\u53D1\u9001\u3002",r.id):Ye(C.length>1?"\u5DF2\u52A0\u5165\u300C"+(r.title||"\u8BE5\u4F1A\u8BDD")+"\u300D\u6392\u961F\uFF08\u5171 "+C.length+" \u6761\u7B49\u5F85\uFF09":"\u5DF2\u52A0\u5165\u300C"+(r.title||"\u8BE5\u4F1A\u8BDD")+"\u300D\u7684\u5F85\u53D1\u9001\u961F\u5217\u3002","info")}else{var S={role:"user",content:[{type:"text",text:e}]};k.push(S);var A=Object.assign({},r.structuredState||{},{inFlight:!0});rr({id:r.id,status:"running",messages:k,structuredState:A}),r.id===m.selectedId&&(m.currentMessages=es(Object.assign({},r,{status:"running",messages:k,structuredState:A}),k),YG(),oa(!0),v&&F$("\u5DF2\u4E2D\u65AD\u4E0A\u4E00\u6761\u56DE\u590D\uFF0C\u6B63\u5728\u5904\u7406\u65B0\u6D88\u606F\u2026",r.id))}n.composerCaptured||(t&&r.id===m.selectedId&&(t.value="",fa(t)),PE(r.id,"",!0));var I=typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Date.now().toString(36)+"-"+Math.random().toString(36).slice(2,10),j=!1;return Vi("/api/structured-sessions/"+r.id+"/messages",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({input:e,interrupt:v||void 0,idempotencyKey:I})}).then(function($){return $.ok?(j=!0,$.json()):$.json().catch(function(){return{error:"\u8BF7\u6C42\u5931\u8D25"}}).then(function(P){var N=new Error(P&&P.error||"\u65E0\u6CD5\u53D1\u9001\u7ED3\u6784\u5316\u6D88\u606F\u3002");throw N.errorCode=P&&P.errorCode,N.httpStatus=$.status,N})}).then(function($){if($&&$.error)throw new Error($.error);if($&&$.id&&($=Ja.filter($,r.id,w),rr($),$.id===m.selectedId)){var P=m.sessions.find(function(N){return N.id===$.id})||$;m.currentMessages=es(P,Fl(P,$.output,!1)),oa(!0),pd()}}).catch(function($){if(j&&($=_B($)),$&&$.errorCode==="duplicate_idempotency_key"){r.id===m.selectedId?Wi($.message||"\u68C0\u6D4B\u5230\u91CD\u590D\u53D1\u9001\uFF0C\u5DF2\u62E6\u622A\u3002",r.id):Ye($.message||"\u68C0\u6D4B\u5230\u91CD\u590D\u53D1\u9001\uFF0C\u5DF2\u62E6\u622A\u3002","warning");return}if(g&&R6[r.id]===g&&delete R6[r.id],y){var P=DG(r.id,e,x,w);if(P&&rr({id:r.id,queuedMessages:P}),r.id===m.selectedId){var N=m.sessions.find(function(q){return q.id===r.id})||r;m.currentMessages=es(N,Fl(N,N.output,!1)),oa(!0),pd()}}else{var R=k.slice(0,-1);rr({id:r.id,status:r.status,messages:R,structuredState:Object.assign({},r.structuredState||{},{inFlight:!1})}),r.id===m.selectedId&&(m.currentMessages=es(Object.assign({},r,{messages:R,structuredState:Object.assign({},r.structuredState||{},{inFlight:!1})}),R),oa(!0))}var U=$&&$.message||"",H=U==="Failed to fetch"||U==="NetworkError when attempting to fetch resource."||U==="Load failed"||/aborted|aborterror|networkerror|failed to fetch/i.test(U);throw H&&($.__wandAmbiguousDelivery=!0,Wi("\u7F51\u7EDC\u4E2D\u65AD\uFF0C\u8FD9\u6761\u6D88\u606F\u53EF\u80FD\u5DF2\u9001\u8FBE\uFF1B\u8349\u7A3F\u5DF2\u56DE\u586B\uFF0C\u91CD\u8BD5\u524D\u8BF7\u5148\u770B\u4F1A\u8BDD\u5185\u5BB9\u3002",r.id),$.__wandComposerReported=!0),$})}var FE=null,C$="",C1=0,Sf=null,fU=0,S$=0,$G="",aE=new Set;function TB(e){return e==="failed"?fh:ph}function ske(e,t){return!t&&e0(e).active?"running":"idle"}function lke(){var e=document.getElementById("send-input-button");return e&&e.getAttribute("data-phase")||"idle"}function BG(e){var t=e===void 0?m.selectedId:e;return!!Sf&&Sf===t}function uke(e){return mX}function cke(e,t,r,n){return e==="running"?{title:"\u505C\u6B62\u751F\u6210",label:"\u505C\u6B62\u751F\u6210"}:e==="sending"?{title:"\u6B63\u5728\u53D1\u9001\u2026",label:"\u6B63\u5728\u53D1\u9001\u2026"}:e==="sent"?{title:n||"\u5DF2\u53D1\u9001",label:"\u5DF2\u53D1\u9001"}:e==="failed"?{title:n||"\u53D1\u9001\u5931\u8D25",label:"\u53D1\u9001\u5931\u8D25"}:{title:t,label:r}}function dke(e,t,r){var n=document.getElementById("composer-status-line");if(n){var a=e==="sending"||e==="sent"||e==="failed",o=a&&t?t:uke(r);n.textContent!==o&&(n.textContent=o);var l=a?e:"",c=(n.getAttribute("data-tone")||"")!==l;c&&n.removeAttribute("data-tone"),l&&c&&(n.offsetWidth,n.setAttribute("data-tone",l))}}function pke(){var e=document.getElementById("composer-status-line");return!!e&&e.getClientRects().length>0}function QE(e,t,r,n){C1&&(clearTimeout(C1),C1=0),FE=e,C$=t||"",Sf=n===void 0?m.selectedId||null:n||null,Ta(),e==="failed"&&(!BG()||!pke())&&Ye(t||"\u64CD\u4F5C\u672A\u5B8C\u6210\u3002","error"),!(r<=0)&&(C1=window.setTimeout(function(){C1=0,FE=null,C$="",Sf=null,Ta()},r))}function IG(e,t,r){return fU+=1,S$=fU,$G=r||"\u5DF2\u53D1\u9001",QE("sending",e,0,t),S$}function F$(e,t){QE("sent",e,TB("sent"),t)}function Wi(e,t){QE("failed",e,TB("failed"),t)}function DE(e,t){FE!=="sending"||!Sf||e&&e!==Sf||t!==void 0&&t!==S$||QE("sent",$G||"\u5DF2\u53D1\u9001",TB("sent"),Sf)}function pd(){pa()}var fke=10;function mke(){return!!m.queueBarExpanded}function jB(e){!!m.queueBarExpanded!=!!e&&(m.queueBarExpanded=!!e,pa())}var mU=null;function pa(){var e=document.getElementById("queue-bar-host");if(e){var t=m.sessions.find(function(c){return c.id===m.selectedId});mU!==(t?.id??null)&&(mU=t?.id??null,m.queueBarExpanded=!1,m.queueBarDrag&&jG(null));var r=t&&t.sessionKind==="structured",n=r?iI(t):[];n=Array.isArray(n)?n:[];var a=t?Lt.read(t.id).queueRetrieval:null;if(!r||n.length===0&&!a){e.hidden=!0,E$(e),m.queueBarExpanded=!1;return}if(!m.queueBarDrag){e.hidden=!1;var o=!!(t.structuredState&&t.structuredState.inFlight&&t.status==="running"),l=n.length>=fke;HEe(e,n,o,l,{expanded:!!m.queueBarExpanded,onExpandedChange:jB,busy:Ff.has(t.id)||Df.has(t.id),retrieval:a,steering:t.provider==="pi"&&t.structuredState?.engine==="core"})}}}function hke(e,t,r){var n=m.sessions.find(function(l){return l.id===e.id})||e,a=Ja.rollback(e.id,n.queuedMessages||[],t,r);if(a&&rr({id:e.id,queuedMessages:a}),e.id===m.selectedId){var o=m.sessions.find(function(l){return l.id===e.id})||e;m.currentMessages=es(o,Fl(o,o.output,!1)),oa(!0),pa()}}var Ff=new Set,Df=new Set;async function gke(e){var t=m.sessions.find(function(g){return g.id===m.selectedId}),r=t&&t.queuedMessages&&t.queuedMessages[e];if(!(typeof r!="string"||Ff.has(t.id)||Df.has(t.id))){var n=t.id,a=Lt.beginQueueRetrieval(n,r);if(a){var o=Ja.advance(n,"local");Ff.add(n),pa();var l=!1;try{var c=await Vi("/api/structured-sessions/"+encodeURIComponent(n)+"/queued/"+e,{method:"DELETE",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({expectedText:r})});if(!c.ok){l=c.status>=400&&c.status<500&&c.status!==408;var d=await c.json().catch(function(){return{}});throw new Error(d&&d.error||"\u53D6\u56DE\u6392\u961F\u6D88\u606F\u5931\u8D25\u3002")}var p=await c.json();if(p.id!==n||!Array.isArray(p.queuedMessages))throw new Error("\u53D6\u56DE\u7ED3\u679C\u6682\u4E0D\u53EF\u7528\uFF0C\u8BF7\u68C0\u67E5\u6392\u961F\u5185\u5BB9\u3002");if(!m.sessions.some(function(g){return g.id===n}))return;var h=Ja.filter({id:n,queuedMessages:p.queuedMessages},n,o);if(h.queuedMessages&&rr(h),!Lt.finishQueueRetrieval(n,a,"confirmed"))return;(m.selectedId!==n||!m.composerComposing)&&MG(n)}catch(g){Lt.finishQueueRetrieval(n,a,l?"rejected":"unknown"),m.selectedId===n&&(Wi(ei(g,"\u53D6\u56DE\u7ED3\u679C\u672A\u77E5\uFF0C\u539F\u6587\u5DF2\u4FDD\u7559\uFF0C\u672A\u81EA\u52A8\u91CD\u8BD5\u3002"),n),Nu(n))}finally{Ff.delete(n),m.selectedId===n&&pa()}}}}function MG(e){if(!(m.selectedId===e&&m.composerComposing)&&Lt.restoreQueueRetrieval(e)&&m.selectedId===e){Ed(e);var t=document.getElementById("input-box");if(t){Mf(t);try{t.focus({preventScroll:!0})}catch{t.focus()}}pa()}}function vke(e){var t=m.sessions.find(function(n){return n.id===m.selectedId}),r=t?.queuedMessages?.[e];typeof r=="string"&&TG(t.id,"/"+e,{expectedText:r})}function bke(){var e=m.sessions.find(function(t){return t.id===m.selectedId});e?.queuedMessages?.length&&TG(e.id,"",{expectedQueue:e.queuedMessages.slice()})}async function TG(e,t,r){if(!(Ff.has(e)||Df.has(e))){Df.add(e);var n=Ja.advance(e,"local");pa();try{var a=await Vi("/api/structured-sessions/"+encodeURIComponent(e)+"/queued"+t,{method:"DELETE",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}),o=await a.json();if(!a.ok)throw new Error(o.error||"\u65E0\u6CD5\u66F4\u65B0\u6392\u961F\u6D88\u606F\u3002");if(o.id!==e||!Array.isArray(o.queuedMessages))throw new Error("\u961F\u5217\u56DE\u6267\u65E0\u6548\uFF0C\u8BF7\u6838\u5BF9\u6700\u65B0\u72B6\u6001\u3002");m.sessions.some(function(l){return l.id===e})&&rr(Ja.filter(o,e,n))}catch(l){m.selectedId===e&&(Wi(ei(l,"\u961F\u5217\u66F4\u65B0\u7ED3\u679C\u672A\u77E5\uFF0C\u672A\u81EA\u52A8\u91CD\u8BD5\u3002"),e),Nu(e))}finally{Df.delete(e),m.selectedId===e&&pa()}}}function yke(e){if(!m.queueBarPromoting){var t=m.sessions.find(function(p){return p.id===m.selectedId});if(!(!t||Ff.has(t.id)||Df.has(t.id))){var r=Array.isArray(t.queuedMessages)?t.queuedMessages.slice():[];if(!(e<0||e>=r.length)){var n=r[e],a=r.slice(0,e).concat(r.slice(e+1)),o=!!(t.structuredState&&t.structuredState.inFlight&&t.status==="running");m.queueBarPromoting=!0,a.length===0&&(m.queueBarExpanded=!1);var l=Ja.advance(t.id,"local");rr({id:t.id,queuedMessages:a});var c=typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Date.now().toString(36)+"-"+Math.random().toString(36).slice(2,10),d=IG(o?"\u6B63\u5728\u63D2\u961F\u53D1\u9001\uFF0C\u51C6\u5907\u6253\u65AD\u5F53\u524D\u56DE\u590D\u2026":"\u6B63\u5728\u53D1\u9001\u8FD9\u6761\u2026",t.id,o?"\u5DF2\u4E2D\u65AD\u4E0A\u4E00\u6761\u56DE\u590D\uFF0C\u8FD9\u6761\u7ACB\u5373\u53D1\u9001\u3002":"\u5DF2\u7ACB\u5373\u53D1\u9001\u8FD9\u6761\u6D88\u606F\u3002");Vi("/api/structured-sessions/"+t.id+"/queued/"+e+"/promote",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({expectedText:n,idempotencyKey:c})}).then(function(p){return p.ok?p.json():p.json().catch(function(){return{}}).then(function(h){throw new Error(h&&h.error||"\u7ACB\u5373\u53D1\u9001\u5931\u8D25")})}).then(function(p){if(p&&p.id&&(p=Ja.filter(p,t.id,l),rr(p),p.id===m.selectedId)){var h=m.sessions.find(function(g){return g.id===p.id})||p;m.currentMessages=es(h,Fl(h,p.output,!1)),oa(!0),pa()}DE(t.id,d),m.queueBarPromoting=!1}).catch(function(p){m.queueBarPromoting=!1,m.selectedId===t.id&&Nu(t.id),Wi(p&&p.message||"\u7ACB\u5373\u53D1\u9001\u7ED3\u679C\u672A\u77E5\uFF0C\u8BF7\u6838\u5BF9\u5BF9\u8BDD\uFF1B\u672A\u81EA\u52A8\u91CD\u8BD5\u3002",t.id)})}}}}function wke(e,t){var r=m.sessions.find(function(g){return g.id===m.selectedId});if(!(!r||Ff.has(r.id)||Df.has(r.id))){var n=Array.isArray(r.queuedMessages)?r.queuedMessages.slice():[];if(!(n.length<=1)&&t){var a=t.parentElement;if(a){var o=Number(t.getAttribute("data-index")),l=Array.prototype.slice.call(a.children),c=l.map(function(g){return g.getBoundingClientRect()}),d=3;c.length>=2&&(d=Math.max(0,c[1].top-c[0].top-c[0].height)),e.preventDefault();try{t.setPointerCapture(e.pointerId)}catch{}if(navigator&&navigator.vibrate)try{navigator.vibrate(8)}catch{}m.queueBarDrag={pointerId:e.pointerId,handleEl:t,itemEl:t,listEl:a,siblings:l,rects:c,origIndex:o,targetIndex:o,startY:e.clientY,gap:d,queueSnapshot:n,sessionId:r.id},t.classList.add("dragging"),l.forEach(function(g){g!==t&&g.classList.add("queue-bar-item-sliding")});var p=function(g){Eke(g)},h=function(g){jG(g)};m.queueBarDrag.moveHandler=p,m.queueBarDrag.upHandler=h,t.addEventListener("pointermove",p),t.addEventListener("pointerup",h),t.addEventListener("pointercancel",h)}}}}function xke(e,t,r,n){for(var a=r.length,o=[],l=0;l<a;l++)o.push(l);o.splice(e,1),o.splice(t,0,e);for(var c=r[0].top,d=1;d<a;d++)r[d].top<c&&(c=r[d].top);for(var p={},h=c,g=0;g<a;g++){var v=o[g];p[v]=h,h+=r[v].height+n}return p}function Eke(e){var t=m.queueBarDrag;if(!(!t||e.pointerId!==t.pointerId)){e.preventDefault();var r=e.clientY-t.startY;t.itemEl.style.transform="translateY("+r+"px)";for(var n=t.rects[t.origIndex].top+t.rects[t.origIndex].height/2+r,a=t.origIndex,o=0;o<t.rects.length;o++)if(o!==t.origIndex){var l=t.rects[o].top+t.rects[o].height/2;o<t.origIndex&&n<l?a=Math.min(a,o):o>t.origIndex&&n>l&&(a=Math.max(a,o))}if(a!==t.targetIndex){t.targetIndex=a;var c=xke(t.origIndex,a,t.rects,t.gap);t.siblings.forEach(function(d,p){if(p!==t.origIndex){var h=c[p]-t.rects[p].top;d.style.transform=h?"translateY("+h+"px)":""}})}}}function jG(e){var t=m.queueBarDrag;if(!(!t||e&&e.pointerId!==t.pointerId)){try{t.handleEl.releasePointerCapture(t.pointerId)}catch{}t.handleEl.removeEventListener("pointermove",t.moveHandler),t.handleEl.removeEventListener("pointerup",t.upHandler),t.handleEl.removeEventListener("pointercancel",t.upHandler);var r=t.origIndex,n=t.targetIndex,a=t.queueSnapshot;if(t.siblings.forEach(function(g){g.style.transform="",g.classList.remove("queue-bar-item-sliding")}),t.itemEl.classList.remove("dragging"),m.queueBarDrag=null,r===n){pa();return}for(var o=[],l=0;l<a.length;l++)o.push(l);o.splice(r,1),o.splice(n,0,r);var c=o.map(function(g){return a[g]}),d=m.sessions.find(function(g){return g.id===m.selectedId});if(!d||d.id!==t.sessionId){pa();return}var p=Array.isArray(d.queuedMessages)?d.queuedMessages:[];if(p.length!==a.length||p.some(function(g,v){return g!==a[v]})){pa(),Wi("\u6392\u961F\u5185\u5BB9\u5DF2\u66F4\u65B0\uFF0C\u8BF7\u91CD\u65B0\u62D6\u52A8\u6392\u5E8F\u3002",d.id);return}var h=Ja.advance(d.id,"local");rr({id:d.id,queuedMessages:c}),pa(),Vi("/api/structured-sessions/"+d.id+"/queued",{method:"PATCH",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({order:o,expectedQueue:a})}).then(function(g){if(!g.ok)return g.json().catch(function(){return{}}).then(function(v){throw new Error(v&&v.error||"\u6392\u5E8F\u5931\u8D25")})}).catch(function(g){hke(d,a,h),Wi(g&&g.message||"\u8C03\u6574\u6392\u961F\u987A\u5E8F\u5931\u8D25\u3002",d.id)})}}function kke(){var e=document.getElementById("queue-bar-host");!e||e.__queueDelegated||(e.__queueDelegated=!0,e.addEventListener("click",function(t){var r=t.target,n=r&&r.closest?r.closest("[data-action]"):null;if(n&&e.contains(n)){var a=n.getAttribute("data-action");if(a==="drag")return;if(t.preventDefault(),t.stopPropagation(),a==="edit"){var o=n.closest(".queue-bar-item");o&&gke(Number(o.getAttribute("data-index")))}else if(a==="promote-item"){var l=n.closest(".queue-bar-item");l&&yke(Number(l.getAttribute("data-index")))}else if(a==="delete"){var c=n.closest(".queue-bar-item");c&&vke(Number(c.getAttribute("data-index")))}else a==="clear-all"?bke():a==="restore-retrieved"?MG(m.selectedId):a==="dismiss-retrieved"&&(Lt.dismissQueueRetrieval(m.selectedId),pa());return}}),e.addEventListener("pointerdown",function(t){if(!(t.button!==void 0&&t.button!==0)){var r=t.target;if(!(r&&r.closest&&r.closest('[data-action="delete"], [data-action="edit"], [data-action="promote-item"], [data-action="clear-all"], [data-action="expand"]'))){var n=r&&r.closest?r.closest(".queue-bar-item"):null;n&&wke(t,n)}}}),e.addEventListener("keydown",function(t){t.key==="Escape"&&mke()&&(t.stopPropagation(),jB(!1))}))}function es(e,t){var r=Array.isArray(t)?rk(t):[],n=Array.isArray(r)?r.slice():[];if(!e||e.sessionKind!=="structured")return n;if(e.structuredState&&e.structuredState.inFlight){for(var a=null,o=n.length-1;o>=0;o--){var l=n[o];if(l.role!=="user"||!Array.isArray(l.content)||l.content.some(function(c){return c?.type!=="tool_result"})){a=l;break}}(!a||a.role!=="assistant")&&n.push({role:"assistant",content:[{type:"text",text:"",__processing:!0}]})}return n}function hU(){var e=m.sessions.find(function(t){return t.id===m.selectedId});tk(e),pd()}function _G(e){var t=G0(),r=t&&t.provider==="codex";return e&&(e.errorCode==="SESSION_NOT_RUNNING"||e.errorCode==="SESSION_NO_PTY")?r?"Codex \u4F1A\u8BDD\u5DF2\u7ED3\u675F\uFF1B\u82E5\u5B58\u5728 Codex \u5386\u53F2\u4F1A\u8BDD\uFF0C\u5C06\u5728\u4F60\u4E0B\u6B21\u53D1\u9001\u6D88\u606F\u65F6\u81EA\u52A8\u6062\u590D\u3002":"\u4F1A\u8BDD\u5DF2\u7ED3\u675F\uFF1B\u82E5\u5B58\u5728 Claude \u5386\u53F2\u4F1A\u8BDD\uFF0C\u5C06\u5728\u4F60\u4E0B\u6B21\u53D1\u9001\u6D88\u606F\u65F6\u81EA\u52A8\u6062\u590D\u3002":e&&e.errorCode==="SESSION_NOT_FOUND"?"\u4F1A\u8BDD\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6216\u65B0\u5EFA\u4F1A\u8BDD\u3002":e&&e.message||(r?"Codex \u4F1A\u8BDD\u6682\u4E0D\u53EF\u7528\uFF1B\u82E5\u5B58\u5728 Codex \u5386\u53F2\u4F1A\u8BDD\uFF0C\u5C06\u81EA\u52A8\u5C1D\u8BD5\u6062\u590D\u3002":"\u4F1A\u8BDD\u6682\u4E0D\u53EF\u7528\uFF1B\u82E5\u5B58\u5728 Claude \u5386\u53F2\u4F1A\u8BDD\uFF0C\u5C06\u81EA\u52A8\u5C1D\u8BD5\u6062\u590D\u3002")}function PG(e){var t=new Error(e&&e.error||"\u4F1A\u8BDD\u5DF2\u7ED3\u675F\u3002");return e&&typeof e=="object"&&(t.errorCode=e.errorCode||null,t.sessionId=e.sessionId||m.selectedId||null,t.sessionStatus=Object.prototype.hasOwnProperty.call(e,"sessionStatus")?e.sessionStatus:null),t}function NG(e){return e&&(e.errorCode==="SESSION_NOT_RUNNING"||e.errorCode==="SESSION_NO_PTY"||e.errorCode==="SESSION_NOT_FOUND")}function Cke(e,t){e&&rr({id:e,status:t||"exited"})}function xy(e){return!!(e&&!cr(e)&&Zs.indexOf(e.provider)!==-1&&e.status!=="running"&&e.claudeSessionId)}function Ske(e){if(!e)return Wi("\u4F1A\u8BDD\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6216\u65B0\u5EFA\u4F1A\u8BDD\u3002"),Promise.resolve(null);if(e.status==="running")return Promise.resolve(e);if(!xy(e)){var t=e&&Qs[e.provider]||"Provider";return Wi("\u8BE5\u4F1A\u8BDD\u6CA1\u6709\u53EF\u6062\u590D\u7684 "+t+" \u5386\u53F2\u4E0A\u4E0B\u6587\uFF0C\u8BF7\u65B0\u5EFA\u4F1A\u8BDD\u3002",e.id),Promise.resolve(null)}var r=MB(e.id);return HB(e.id).then(function(n){return n?(rr(n),hi(),ck(n.id),Nu(n.id).then(function(){return r()&&Ml(!0),cr(n)?n:V2e().then(function(){return n})})):null})}function Fke(e,t){return[t,"\r"]}function Dke(e){return typeof e=="string"?e?{data:e}:null:e&&typeof e.data=="string"&&e.data?{data:e.data,shortcutKey:e.shortcutKey,image:!!e.image}:null}var Ake=3e3;function _B(e){return Object.assign(new Error(ei(e,"\u8F93\u5165\u63D0\u4EA4\u7ED3\u679C\u672A\u77E5\u3002")),e,{__wandAmbiguousDelivery:!0})}function $ke(e,t,r,n,a,o){var l=(Array.isArray(e)?e:[]).map(Dke).filter(Boolean);if(l.length===0)return Promise.resolve();var c=typeof r=="number"?r:0,d=0;return l.reduce(function(p,h,g){var v=h.shortcutKey!==void 0?h.shortcutKey:t&&(g===0||g===l.length-1)?t:void 0;return p.then(function(){if(g>0){var y=l[g-1],w=o?vE(void 0,y&&y.image?Ake:void 0):c>0?new Promise(function(x){setTimeout(x,c)}):Promise.resolve();return w.then(function(){return ia(h.data,v,n,a)})}return ia(h.data,v,n,a)}).then(function(y){return d+=1,y})},Promise.resolve()).catch(function(p){throw d>0?_B(p):p})}var Bke=5e3,Ike=100;function gU(e){e&&(m.pendingMessages.length>=Ike&&m.pendingMessages.shift(),m.pendingMessages.push({input:e,at:Date.now()}))}function ia(e,t,r,n){var a=n||m.selectedId;if(!e||!a)return Promise.resolve();var o=r||m.currentView;if(o==="terminal"&&a===m.selectedId&&m.ws&&m.ws.readyState===WebSocket.OPEN){try{m.ws.send(JSON.stringify({type:"pty_input",sessionId:a,data:e,shortcutKey:t,userInput:!0}))}catch(c){return Promise.reject(c)}return Promise.resolve()}m.messageQueue.push(e);var l=m.inputQueue.then(function(){return Mke(e,t,r,a,!!n).finally(function(){var c=m.messageQueue.indexOf(e);c>-1&&m.messageQueue.splice(c,1)})});return m.inputQueue=l.catch(function(){}),l}function Mke(e,t,r,n,a){var o=n||m.selectedId;if(!o)return Promise.resolve();var l=r||m.currentView,c=m.sessions.find(function(g){return g.id===o}),d=!!c&&!cr(c)&&c.status==="running";if(!d){if(a){var p=new Error("\u76EE\u6807\u4F1A\u8BDD\u5DF2\u505C\u6B62\uFF0C\u6D88\u606F\u672A\u53D1\u9001\u3002");throw p.errorCode=c?"SESSION_NOT_RUNNING":"SESSION_NOT_FOUND",p}return m.wsConnected?(console.warn("[wand] postInput: session not running, skipping send",{sessionId:o}),Ye("\u4F1A\u8BDD\u672A\u8FD0\u884C\uFF0C\u6B63\u5728\u7B49\u5F85\u81EA\u52A8\u6062\u590D\u540E\u91CD\u8BD5\u3002","info"),Promise.resolve()):(gU(e),Promise.resolve())}if(!m.wsConnected){if(a)throw new Error("\u7F51\u7EDC\u5DF2\u65AD\u5F00\uFF0C\u6D88\u606F\u672A\u53D1\u9001\u3002");return gU(e),Promise.resolve()}var h=!1;return Vi("/api/sessions/"+o+"/input",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({input:e,view:l,shortcutKey:t||void 0})}).then(function(g){return g.ok?(h=!0,g.json()):g.json().catch(function(){return{error:"\u8BF7\u6C42\u5931\u8D25"}}).then(function(v){var y=PG(v);throw y.httpStatus=g.status,console.error("[wand] postInput: request failed",{status:g.status,errorCode:y.errorCode,message:y.message,sessionId:o}),NG(y)&&Cke(o,y.sessionStatus||"exited"),y})}).then(function(g){return g&&g.id&&(rr(g),g.id===m.selectedId&&(g.messages&&g.messages.length>0&&(m.currentMessages=g.messages),oa(!0))),g}).catch(function(g){throw h?_B(g):g})}function G0(){return m.sessions.find(function(e){return e.id===m.selectedId})||null}function PB(){return!!m.selectedId&&m.currentView==="terminal"}function vU(e){return!(!m.terminal||!e||e!==m.selectedId||m.terminalSessionId&&m.terminalSessionId!==e)}function OG(e){return!!e&&(!!e.isComposing||e.keyCode===229||!!m.composerComposing)}function RG(e){if(!m.terminalInteractive||!PB()||e.defaultPrevented||OG(e))return!1;var t=e.target;return t?!(t.closest&&t.closest("#input-box")||_ke(t)):!0}var Tke={Esc:"escape",ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right",Enter:"enter",Tab:"tab",Backspace:"backspace",Home:"home",End:"end",PageUp:"pageup",PageDown:"pagedown",Delete:"delete",Insert:"insert"," ":"space"},jke={space:" ",tab:" ",shift_tab:"\x1B[Z",backspace:"\x7F",home:"\x1B[H",end:"\x1B[F",pageup:"\x1B[5~",pagedown:"\x1B[6~",delete:"\x1B[3~",insert:"\x1B[2~"},bU={" ":0,"[":27,"\\":28,"]":29,"^":30,_:31};function _ke(e){return e?!!(e.closest&&e.closest('[role="dialog"], [role="alertdialog"], .wand-ui-select-trigger, .wand-ui-select-content, [role="listbox"], [role="option"], [data-wand-popup-owner], .terminal-shortcuts, .pty-input-mode-toggle, .pty-modifier-toggle, .composer-actions-left button, .composer-actions-right button')):!1}var Pke=new Set(["ctrl","alt","shift"]);function LG(e){return Pke.has(e)}function Nke(e){return jke[e]||""}function Oke(e){var t=e.toLowerCase();return t>="a"&&t<="z"?String.fromCharCode(t.charCodeAt(0)-96):Object.prototype.hasOwnProperty.call(bU,t)?String.fromCharCode(bU[t]):""}function AE(e){return Tke[e.key]||e.key}function Rke(e,t){return{ctrl:e.ctrlKey,alt:e.altKey,shift:e.shiftKey&&(t.length===1||t==="tab"),meta:e.metaKey}}function D$(e,t){e&&ia(e,t).catch(function(){})}function NB(){GG()}function Lke(){PB()&&Af(!m.terminalInteractive)}function zke(e=!1){fd(e);var t=document.getElementById("file-upload-input");t&&t.click()}function zG(e){return!!e&&!cr(e)&&e.status==="running"&&m.currentView==="terminal"}function OB(){return document.documentElement.classList.contains("is-wand-native-input")}function vd(){return OB()&&!document.documentElement.classList.contains("is-wand-terminal-passthrough")}function $E(){if(!vd())return!1;if(m.terminal&&m.terminal.element){var e=m.terminal.element.querySelector(".xterm-helper-textarea");if(e&&(e.readOnly=!0,e.setAttribute("aria-readonly","true"),document.activeElement===e))try{e.blur()}catch{}}return!0}var yU=!1;function Hke(){yU||!vd()||(yU=!0,document.addEventListener("focusin",function(e){var t=e.target;!t||!t.classList||!t.classList.contains("xterm-helper-textarea")||$E()},!0))}function Af(e,t){var r=t||{},n=!!e&&PB();if(m.terminalInteractive!==n){if(m.terminalInteractive=n,m.terminal&&m.terminal.element){var a=m.terminal.element.querySelector(".xterm-helper-textarea");a&&(a.readOnly=vd()?!0:!n)}n?(Kke(),r.focus!==!1&&!vd()&&NB(),r.announce!==!1&&Ye("\u7EC8\u7AEF\u4EA4\u4E92\u6A21\u5F0F\u5DF2\u5F00\u542F","info")):Gke(),Ta();var o=document.getElementById("input-box");o&&fa(o)}}function ZE(){var e=m.sessions.find(function(n){return n.id===m.selectedId}),t=zG(e),r=!t;if(r&&m.terminalInteractive){Af(!1);return}if(t&&!m.terminalInteractive){Af(!0,{announce:!1,focus:!1});return}Ta()}function Ta(e=!1){e||NE(fa);var t=m.sessions.find(function(H){return H.id===m.selectedId}),r=cr(t),n=t&&t.provider==="codex",a=r?!!(t&&t.structuredState&&t.structuredState.inFlight):!!t&&t.status==="running",o=document.getElementById("input-box"),l=document.querySelector(".input-composer"),c=m.promptOptimizeRequest,d=!!(c&&c.sessionId===m.selectedId),p=!!c,h=zG(t),g=!r&&!a&&xy(t);if(!e){REe({resolve:function(){return{interactiveVisible:!(r||m.currentView!=="terminal"||!t||h),interactiveOn:m.terminalInteractive}},onAttach:function(H){zke(H)},onToggleInteractive:Lke}),o&&(o.placeholder=hX(t,m.terminalInteractive),o.disabled=!r&&!!t&&!a&&!g,o.setAttribute("aria-disabled",o.disabled?"true":"false"),o.readOnly=d,o.setAttribute("aria-readonly",o.readOnly?"true":"false"),o.setAttribute("aria-busy",d?"true":"false"),o.classList.toggle("is-terminal-passthrough",!!m.terminalInteractive&&!document.documentElement.classList.contains("is-wand-embed-terminal"))),l&&(l.classList.toggle("is-optimizing",d),l.classList.toggle("is-terminal-interactive",!!m.terminalInteractive)),_Ee({active:function(){return!!m.terminalInteractive&&!document.documentElement.classList.contains("is-wand-embed-terminal")},submit:function(){Nf(void 0)},focusInput:function(){UB(document.getElementById("input-box"))}}),iB();var v=document.getElementById("prompt-optimize-btn");if(v){v.hidden=m.terminalInteractive,v.disabled=p,v.classList.toggle("is-loading",d),v.setAttribute("aria-busy",d?"true":"false"),v.setAttribute("aria-label",d?"\u6B63\u5728\u4F18\u5316\u63D0\u793A\u8BCD":p?"\u5176\u4ED6\u4F1A\u8BDD\u6B63\u5728\u4F18\u5316\u63D0\u793A\u8BCD":"\u4F18\u5316\u63D0\u793A\u8BCD"),v.setAttribute("title",d?"\u6B63\u5728\u4F18\u5316\u2026":p?"\u5176\u4ED6\u4F1A\u8BDD\u6B63\u5728\u4F18\u5316\u2026":"\u4F18\u5316\u63D0\u793A\u8BCD");var y=v.querySelector(".prompt-optimize-label");y&&(y.textContent=d?"\u4F18\u5316\u4E2D":"\u4F18\u5316")}}var w=document.getElementById("send-input-button"),x=r&&a;if(w){var k=!r&&!!t&&!a&&!g,F=o?o.value:"",C=$y(m.selectedId),D=hk(F,m.selectedId),S=!!(D&&Lt.pendingSubmission(m.selectedId,{text:F,attachments:C})),A=d||!D||S||k,I=BG(),j=I?C$:"",$=I&&FE||ske(t,D);$==="running"&&(A=!1),m.selectedId&&aE.has(m.selectedId)&&(A=!0),w.disabled!==A&&(w.disabled=A),w.getAttribute("aria-disabled")!==String(A)&&w.setAttribute("aria-disabled",String(A)),w.dataset.phase!==$&&(w.dataset.phase=$);var P=d?"\u6B63\u5728\u4F18\u5316\u63D0\u793A\u8BCD":r?x?"\u52A0\u5165\u5F85\u53D1\u9001\u961F\u5217":"\u53D1\u9001":n?a?"\u53D1\u9001\u7ED9 Codex":"Codex \u4F1A\u8BDD\u5DF2\u7ED3\u675F":!t||a||g?"\u53D1\u9001":"\u4F1A\u8BDD\u5DF2\u7ED3\u675F",N=d?"\u6B63\u5728\u4F18\u5316\u63D0\u793A\u8BCD":x?"\u52A0\u5165\u53D1\u9001\u961F\u5217":"\u53D1\u9001\u6D88\u606F",R=cke($,P,N,j);w.title!==R.title&&(w.title=R.title),w.getAttribute("aria-label")!==R.label&&w.setAttribute("aria-label",R.label),w.classList.toggle("queue-mode",x&&$!=="running"),dke($,j,n)}if(!e){var U=document.getElementById("output");U&&U.classList.toggle("interactive",!r&&m.terminalInteractive),Uke(),Vxe(fa),qke()}}function qke(){var e=document.getElementById("chat-running-host");if(e){var t=m.sessions.find(function(n){return n.id===m.selectedId}),r=!!t&&document.getElementById("chat-output")!=null&&!document.getElementById("chat-output").classList.contains("hidden");if(!r){CEe(e);return}kEe(e,t?{...t,ptyRunning:e0(t).ptyRunning,turnStartedAt:t.ptyTurnStartedAt,lastActivityAt:t.ptyLastActivityAt}:null)}}function ly(){var e=window.getSelection&&window.getSelection();if(!e||e.isCollapsed)return!1;var t=document.getElementById("output");if(!t)return!1;var r=e.anchorNode;return r&&r.nodeType===3&&(r=r.parentNode),!!(r&&t.contains(r))}function HG(e){if(RG(e)&&!e.metaKey){var t=AE(e);if(t){var r=Rke(e,t),n={...r,...J1(m.selectedId,r)};if(!LG(t)&&!(r.ctrl&&t.length===1&&t.toLowerCase()==="c"&&ly())){var a=RB(t,n);a&&(e.preventDefault(),D$(a,t))}}}}function Wke(){m.terminal&&W2e(500)}function Vke(e){var t=G0();if(!(!t||cr(t)||OB())&&t.status==="running"){if(e==="enter"){if(m.composerComposing||m.terminalComposing)return;var r=document.getElementById("input-box");m.terminalInteractive||hk(r?r.value:"",t.id)?Nf(void 0):D$("\r","enter_text");return}D$(RB(e,J1(t.id,{ctrl:!1,shift:!1})),e),Wke()}}function Uke(){var e=document.getElementById("terminal-shortcuts");if(e){var t=G0();e.hidden=!t||cr(t)||OB(),!e.hidden&&DEe(e,t.status!=="running",Vke,t.id)}}function Kke(){if(m.terminal&&m.terminal.element){var e=m.terminal.element.querySelector(".xterm-helper-textarea");e&&(e.readOnly=!!vd())}}function Gke(){if(document.removeEventListener("keydown",HG,!0),m.terminal&&m.terminal.element){var e=m.terminal.element.querySelector(".xterm-helper-textarea");e&&(e.readOnly=!0)}}function RB(e,t){var r=t||{ctrl:!1,alt:!1,shift:!1};if(LG(e))return"";var n=HE(e,r);if(n!==null)return n;if(e==="tab"&&r.shift)return"\x1B[Z";var a=Nke(e);if(a)return a;if(e.indexOf("ctrl_")===0)return String.fromCharCode(e.charCodeAt(e.length-1)-96);var o=O0(e);if(o)return o;if(!e)return"";var l=e.length===1?e:"";return l?(r.shift&&(l=l.toUpperCase()),r.ctrl?Oke(l):r.alt?"\x1B"+l:l):""}function O0(e){switch(e){case"yes":return"y\r";case"no":return"n\r";case"up":return"\x1B[A";case"down":return"\x1B[B";case"left":return"\x1B[D";case"right":return"\x1B[C";case"enter":return"\r";case"ctrl_c":return"";case"ctrl_d":return"";case"ctrl_l":return"\f";case"ctrl_u":return"";case"ctrl_k":return"\v";case"ctrl_w":return"";case"ctrl_z":return"";case"escape":return"\x1B";default:return""}}function Xke(){if(m.pendingMessages.length!==0){var e=G0();if(cr(e)){m.pendingMessages=[];return}var t=Date.now(),r=[],n=0;m.pendingMessages.forEach(function(o){if(typeof o=="string"){r.push(o);return}if(!(!o||typeof o.input!="string")){if(t-(o.at||0)>Bke){n++;return}r.push(o.input)}}),m.pendingMessages=[];var a=Promise.resolve();r.forEach(function(o){a=a.then(function(){return Yke(o).catch(function(){})})})}}function Yke(e){if(!e||!m.selectedId)return Promise.resolve();var t=m.selectedId;return Vi("/api/sessions/"+t+"/input",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({input:e,view:m.currentView})}).then(function(r){return r.ok?r.json():r.json().catch(function(){return{error:"\u8BF7\u6C42\u5931\u8D25"}}).then(function(n){var a=PG(n);if(a.httpStatus=r.status,NG(a))return null;throw a})}).then(function(r){return r&&r.id&&(rr(r),r.id===m.selectedId&&(r.messages&&r.messages.length>0&&(m.currentMessages=r.messages),oa(!0))),r})}function A$(){if(!(!m.selectedId||aE.has(m.selectedId))){var e=m.selectedId;return aE.add(e),Ta(),kB(B1("stop.confirm.message"),{title:B1("stop.confirm.title"),danger:!0,okLabel:B1("stop.confirm.ok"),cancelLabel:B1("stop.confirm.cancel")}).then(function(t){if(t&&m.selectedId===e){var r=m.sessions.find(function(a){return a.id===e});if(r){var n=cr(r)?Vi("/api/sessions/"+e+"/stop",{method:"POST",credentials:"same-origin"}).then(function(a){return Dt(a)}).then(function(a){if(!a||a.id!==e)throw new Error("\u505C\u6B62\u56DE\u590D\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u4F1A\u8BDD\u72B6\u6001\u3002");rr(a)}):ia(O0("ctrl_c"),"ctrl_c","chat",e);return n.then(function(){m.selectedId===e&&F$("\u5DF2\u8BF7\u6C42\u505C\u6B62\u5F53\u524D\u56DE\u590D\u3002"),Tl()})}}}).catch(function(t){m.selectedId===e?Wi(ei(t,"\u65E0\u6CD5\u505C\u6B62\u5F53\u524D\u56DE\u590D\u3002")):Ye(ei(t,"\u65E0\u6CD5\u505C\u6B62\u539F\u4F1A\u8BDD\u7684\u56DE\u590D\u3002"),"error")}).finally(function(){aE.delete(e),Ta()})}}function LB(e){var t=m.sessions.find(function(n){return n.id===e}),r=t&&t.claudeSessionId;setTimeout(function(){Vi("/api/sessions/"+e,{method:"DELETE",credentials:"same-origin"}).then(function(n){return n.json()}).then(function(n){if(n&&n.error)throw new Error(n.error);return Lt.retain(new Set(m.sessions.filter(function(a){return a.id!==e}).map(function(a){return a.id}))),m.selectedId===e&&(qE(),m.selectedId=null,xd()),r&&(m.claudeHistory=m.claudeHistory.filter(function(a){return a.claudeSessionId!==r}),m.codexHistory=m.codexHistory.filter(function(a){return a.claudeSessionId!==r})),Tl()}).catch(function(){xE("\u65E0\u6CD5\u5220\u9664\u4F1A\u8BDD\u3002")})},250)}function Qke(e,t){t&&t.classList.add("deleting"),setTimeout(function(){fetch("/api/claude-history/"+encodeURIComponent(e),{method:"DELETE",credentials:"same-origin"}).then(function(r){return r.json()}).then(function(r){if(r&&r.error)throw new Error(r.error);m.claudeHistory=m.claudeHistory.filter(function(n){return n.claudeSessionId!==e}),delete m.selectedClaudeHistoryIds[e],hi()}).catch(function(){t&&t.classList.remove("deleting"),xE("\u65E0\u6CD5\u5220\u9664\u4F1A\u8BDD\u3002")})},250)}function zB(e,t){Qke(e,t)}var T9=!1;function HB(e){return!e||T9?Promise.resolve(null):(T9=!0,Vi("/api/sessions/"+encodeURIComponent(e)+"/resume",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(jl({mode:m.chatMode||m.config.defaultMode||"default"}))}).then(function(t){return t.json()}).then(function(t){return t.error?(Ye(t.error,"error"),null):t}).catch(function(t){var r=t&&t.message||"\u65E0\u6CD5\u6062\u590D\u4F1A\u8BDD\u3002";return Ye(r,"error"),null}).finally(function(){T9=!1}))}function Ey(e){return!e||!e.id?Promise.resolve():(rr(e),Promise.resolve(In(e.id)))}function qB(e){return HB(e).then(function(t){return t?(t.claudeSessionId&&(t.provider==="codex"?m.codexHistory=m.codexHistory.filter(function(r){return r.claudeSessionId!==t.claudeSessionId}):m.claudeHistory=m.claudeHistory.filter(function(r){return r.claudeSessionId!==t.claudeSessionId})),Ey(t).then(function(){return t})):null})}function qG(e,t,r){return fetch("/api/"+e+"-sessions/"+encodeURIComponent(t)+"/resume",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(jl({mode:m.chatMode||m.config&&m.config.defaultMode||"default",cwd:r}))}).then(function(n){return n.json()}).then(function(n){return n.error?(Ye(n.error,"error"),null):n}).catch(function(n){return Ye(n&&n.message||"\u65E0\u6CD5\u6062\u590D\u4F1A\u8BDD\u3002","error"),null})}function Zke(e,t){return qG("codex",e,t)}function Jke(e,t){return qG("claude",e,t)}function WB(e,t,r){var n=e==="codex"?Zke(t,r):e==="claude"?Jke(t,r):fetch("/api/"+encodeURIComponent(e)+"-sessions/"+encodeURIComponent(t)+"/resume",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({mode:m.chatMode||m.config&&m.config.defaultMode||"default",cwd:r})}).then(function(a){return a.json()}).then(function(a){if(a&&a.error)throw new Error(a.error);return a});return n.then(function(a){return!a||!a.id?null:(e==="codex"?m.codexHistory=m.codexHistory.filter(function(o){return o.claudeSessionId!==t}):e==="claude"&&(m.claudeHistory=m.claudeHistory.filter(function(o){return o.claudeSessionId!==t})),Ey(a).then(function(){return pi(),a}))})}function JE(e,t){return fetch("/api/"+encodeURIComponent(e)+"-history/"+encodeURIComponent(t),{method:"DELETE",credentials:"same-origin"}).then(function(r){return r.json()}).then(function(r){if(!r||r.ok!==!0)throw new Error(r&&r.error||"\u65E0\u6CD5\u5220\u9664\u4F1A\u8BDD\u3002");return hi(),r})}function VB(e){return fetch("/api/codex-history/"+encodeURIComponent(e),{method:"DELETE",credentials:"same-origin"}).then(function(t){return t.json()}).then(function(t){if(!t||t.ok!==!0)throw new Error(t&&t.error||"\u65E0\u6CD5\u5220\u9664\u4F1A\u8BDD\u3002");return m.codexHistory=m.codexHistory.filter(function(r){return r.claudeSessionId!==e}),hi(),t})}function wd(){return"ontouchstart"in window||navigator.maxTouchPoints>0}function Ml(e){if(!m.terminalInteractive){var t=document.getElementById("input-box");!t||!m.selectedId||document.activeElement!==t&&(e&&wd()||UB(t))}}function WG(){var e=document.querySelector(".input-panel");e&&e.style.removeProperty("--keyboard-offset")}function VG(e){if(e){var t=e.selectionStart,r=e.selectionEnd;BE(e),typeof t=="number"&&typeof r=="number"&&e.setSelectionRange(t,r)}}function UG(e){!e||e.dataset.touchScrollBound==="true"||(e.dataset.touchScrollBound="true",e.addEventListener("touchstart",function(){e.scrollHeight<=e.clientHeight+1||(e.scrollTop<=0?e.scrollTop=1:e.scrollTop+e.clientHeight>=e.scrollHeight&&(e.scrollTop=Math.max(1,e.scrollHeight-e.clientHeight-1)))},{passive:!0}))}function KG(e){e&&(fa(e),VG(e))}function eCe(e){var t=e&&e.target?e.target:document.getElementById("input-box");t&&(WG(),KG(t))}function tCe(e){var t=e&&e.target?e.target:document.getElementById("input-box");WG(),t&&fa(t),jK(2200,t);var r=[80,200,380,620,900];r.forEach(function(n,a){setTimeout(function(){T0(!1),t&&t.value&&fa(t),a===1&&wd()&&(qi("keyboard-blur",{forceReplay:!0}),Dl("keyboard"))},n)})}function rCe(e){e&&(e.setSelectionRange(e.value.length,e.value.length),VG(e))}function UB(e){e&&(e.focus({preventScroll:!0}),rCe(e))}function nCe(e){UG(e),KG(e)}function S1(e){nCe(e)}function aCe(e,t){if(!e||!t||document.activeElement!==t)return!1;var r=window.innerHeight-e.height-e.offsetTop;if(r<=50)return!1;var n=t.getBoundingClientRect();return n.bottom>e.offsetTop+e.height-12}function BE(e){if(e){var t=e.scrollHeight>e.clientHeight+1;if(!t){e.scrollTop=0;return}e.scrollTop=e.scrollHeight}}function wU(){if(m.terminalInteractive){GG();return}if(!wd()){var e=document.getElementById("input-box");!e||!m.selectedId||document.activeElement===e||UB(e)}}function GG(){if(vd()){$E();return}var e=document.getElementById("output");e&&(e.setAttribute("tabindex","0"),e.focus(),m.terminal&&m.terminal.focus&&m.terminal.focus())}function iCe(){var e=document.querySelector(".input-panel"),t=document.querySelector(".chat-messages");if("virtualKeyboard"in navigator){var r=navigator.virtualKeyboard;r.addEventListener("geometrychange",function(){e&&e.style.removeProperty("padding-bottom")})}var n=document.getElementById("output");n&&n.addEventListener("click",function(){wU()}),t&&t.addEventListener("click",function(a){var o=a.target;o.tagName!=="A"&&o.tagName!=="BUTTON"&&!o.closest("button")&&!o.closest("[data-tool-toggle]")&&wU()}),document.addEventListener("click",function(a){if(wd()){var o=document.getElementById("input-box");if(!(!o||document.activeElement!==o)){var l=a.target;!l||typeof l.closest!="function"||l.closest(".input-panel")||o.blur()}}},!0)}function $$(){try{window.scrollTo(0,0)}catch{}document.scrollingElement&&(document.scrollingElement.scrollTop=0),document.documentElement&&(document.documentElement.scrollTop=0),document.body&&(document.body.scrollTop=0)}function oCe(){return Object.keys(m.selectedSessionIds).filter(function(e){return!!m.selectedSessionIds[e]})}function KB(){m.selectedSessionIds={},m.selectedClaudeHistoryIds={},m.selectedCodexHistoryIds={}}function GB(e){m.sessionsManageMode=typeof e=="boolean"?e:!m.sessionsManageMode,m.sessionsManageMode||KB(),hi()}function sCe(){return m.sessions.slice()}function XB(){var e={};sCe().forEach(function(t){e[t.id]=!0}),m.selectedSessionIds=e,m.selectedClaudeHistoryIds={},m.selectedCodexHistoryIds={},hi()}function YB(){KB(),hi()}function QB(e,t){if(!(!m.sessionsManageMode||!t)){var r=e==="history"?m.selectedClaudeHistoryIds:e==="codex"?m.selectedCodexHistoryIds:m.selectedSessionIds;r[t]?delete r[t]:r[t]=!0,hi()}}function ky(e,t){return kB(e,Object.assign({type:"danger",danger:!0,okLabel:"\u5220\u9664"},t||{}))}function ZB(){var e=oCe(),t=e.length;t&&ky("\u786E\u8BA4\u5220\u9664\u6240\u9009 "+t+" \u9879\u5417\uFF1F\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002",{title:"\u5220\u9664\u6240\u9009 "+t+" \u9879"}).then(function(r){r&&fetch("/api/sessions/batch-delete",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({sessionIds:e})}).then(function(n){return Dt(n)}).then(function(n){var a=n&&Array.isArray(n.failed)?n.failed:[];return a.length>0&&xE("\u6709 "+a.length+" \u4E2A\u4F1A\u8BDD\u672A\u80FD\u5220\u9664\uFF0C\u8BF7\u91CD\u8BD5\u3002"),e.indexOf(m.selectedId)!==-1&&a.indexOf(m.selectedId)===-1&&(m.selectedId=null,xd()),KB(),a.forEach(function(o){m.selectedSessionIds[o]=!0}),Tl()}).catch(function(n){xE(ei(n,"\u65E0\u6CD5\u6279\u91CF\u5220\u9664\u6240\u9009\u9879\u76EE\u3002"))})})}function xU(){return window.innerWidth<=768}function xo(){return GU({width:window.innerWidth,height:window.innerHeight,coarsePointer:typeof window.matchMedia=="function"&&window.matchMedia("(pointer: coarse)").matches})}function X0(e){m.filePanelOpen=e;try{localStorage.setItem("wand-file-panel-open",String(m.filePanelOpen))}catch{}m.filePanelOpen&&xo()&&(m.sessionsDrawerOpen=!1,Vr("wand-sidebar-open",!1)),$l()}function JB(){X0(!m.filePanelOpen)}function lCe(){ja("layout:files")}function $l(){Bf(),lCe()}function uCe(e){ja("layout:file-cwd")}function eI(){m.filePanelOpen&&X0(!1)}function uy(e){XG(m.terminalScale+e)}function XG(e){var t=Math.max(.5,Math.min(2,e));if(t=Math.round(t*4)/4,t!==m.terminalScale){m.terminalScale=t;try{localStorage.setItem("wand-terminal-scale",String(t))}catch{}dCe(),pCe()}}function cCe(e){if(!e||e.altKey||!(e.metaKey||e.ctrlKey)||m.currentView!=="terminal")return!1;var t=e.key==="="||e.key==="+"?.25:e.key==="-"||e.key==="_"?-.25:e.key==="0"?0:null;if(t===null)return!1;var r=e.target;return r&&r.closest&&r.closest("input, textarea, [contenteditable='true']")&&(!r.classList||!r.classList.contains("xterm-helper-textarea"))?!1:(e.preventDefault(),t===0?XG(1):uy(t),!0)}function dCe(){if(!(!m.terminal||!m.terminal.element)){var e=m.terminalBaseFontSize*m.terminalScale,t=Math.max(1,Math.round(e));m.terminal.options.fontSize=t,requestAnimationFrame(function(){!m.terminal||!m.terminalFitAddon||md(m.terminal,m.terminalFitAddon)})}}function pCe(){var e=document.getElementById("terminal-scale-label-top");e&&(e.textContent=Math.round(m.terminalScale*100)+"%")}function tI(e){var t=document.getElementById("input-box");if(!t)return!1;var r=t.value||"",n=r&&!r.endsWith(" ")&&!r.endsWith(`
|
|
267
|
-
`)?" ":"";t.value=r+n+e,t.dispatchEvent(new Event("input",{bubbles:!0}));try{t.focus(),t.setSelectionRange(t.value.length,t.value.length)}catch{}return!0}function rI(e){if(navigator.clipboard&&navigator.clipboard.writeText)return navigator.clipboard.writeText(e).then(function(){return!0}).catch(function(){return t()});return Promise.resolve(t());function t(){try{var r=document.createElement("textarea");r.value=e,r.style.position="fixed",r.style.left="-9999px",document.body.appendChild(r),r.select();var n=document.execCommand("copy");return document.body.removeChild(r),n}catch{return!1}}}function fCe(e){gEe(e)}function mCe(e,t){if(!(!m.selectedId||!e)){var r=m.selectedId+":"+e;if(m.toolContentCache[r]){t(null,m.toolContentCache[r]);return}fetch("/api/sessions/"+encodeURIComponent(m.selectedId)+"/tool-content/"+encodeURIComponent(e),{credentials:"same-origin"}).then(function(n){return Dt(n)}).then(function(n){m.toolContentCache[r]=n,t(null,n)}).catch(function(n){if(n instanceof Aa){t(ei(n,"\u52A0\u8F7D\u5931\u8D25")+"\uFF08HTTP "+n.status+"\uFF09",null);return}t(ei(n,"\u52A0\u8F7D\u5931\u8D25"),null)})}}function hCe(e){var t=m.config&&m.config.cardDefaults&&m.config.cardDefaults[e];return e==="thinking"&&t==null?!0:!!t}function nI(e,t,r,n){if(!(!e||e.dataset.truncated!=="true"||e.dataset.loaded==="true")){var a=e.dataset.toolUseId;a&&(t&&(t.innerHTML='<div class="tool-content-loading">\u52A0\u8F7D\u4E2D\u2026</div>'),e.dataset.loaded="loading",mCe(a,function(o,l){if(o){t&&(t.innerHTML=n||'<div class="tool-content-error">\u52A0\u8F7D\u5931\u8D25\uFF0C\u70B9\u51FB\u91CD\u8BD5</div>'),e.dataset.loaded="";return}e.dataset.truncated="false",e.dataset.loaded="true";var c=typeof l.content=="string"?l.content:JSON.stringify(l.content);r(c,l)}))}}window.__tcToggle=function(e,t){var r=t.closest(".chat-tool-card")||t.closest(".inline-diff");if(r){var n=r.classList.contains("collapsed");r.classList.toggle("collapsed");var a=n;t.setAttribute("aria-expanded",a?"true":"false");var o=r.querySelector(".chat-tool-body, .diff-body");o&&o.setAttribute("aria-hidden",a?"false":"true");var l=r.dataset.expandKind||"tool-card";if(Y0(r,l),n){var c=r.querySelector(".tool-use-result");nI(r,c,function(d){c&&(c.innerHTML='<pre class="tool-use-result-content">'+_u(d)+"</pre>")},`<div class="tool-content-error" onclick="__tcToggle(null, this.closest('.chat-tool-card,.inline-diff').querySelector('.chat-tool-header,.diff-header'))">\u52A0\u8F7D\u5931\u8D25\uFF0C\u70B9\u51FB\u91CD\u8BD5</div>`)}}e&&(e.preventDefault(),e.stopPropagation())};window.__openAuthorSession=function(e){typeof e=="string"&&e&&In(e)};window.__thinkingToggle=function(e){var t=e.classList.contains("collapsed");e.classList.toggle("collapsed",!t),e.classList.toggle("expanded",t),Y0(e,"thinking")};window.__piExecutionOpen=function(e,t){e.preventDefault(),e.stopPropagation();let r=t.dataset.toolId;!m.selectedId||!r||!fi(["piExecution"])||Gc.open(m.selectedId,r,t)};window.__agentRunToggle=function(e,t){e&&(e.preventDefault(),e.stopPropagation());var r=t&&t.closest?t.closest(".agent-run"):null;if(r){var n=r.getAttribute("data-expanded")!=="true";oI(r,"agent-run",n),Y0(r,"agent-run"),RU(r)}};window.__agentRunSelect=function(e,t){var r=t&&t.closest?t.closest(".agent-run"):null;if(r){var n=Array.prototype.slice.call(r.querySelectorAll(".agent-run-agent"));if(n.length){var a=e&&e.type==="keydown"?String(e.key||""):"";if(a){if(a!=="ArrowLeft"&&a!=="ArrowRight"&&a!=="Home"&&a!=="End")return;e&&(e.preventDefault(),e.stopPropagation());var o=n.indexOf(t);o<0&&(o=0);var l=o;a==="ArrowLeft"?l=(o-1+n.length)%n.length:a==="ArrowRight"?l=(o+1)%n.length:a==="Home"?l=0:a==="End"&&(l=n.length-1);var c=n[l];EU(r,n,c);try{c.focus()}catch{}return}e&&e.stopPropagation(),EU(r,n,t)}}};function EU(e,t,r){if(!(!e||!r)){for(var n=r.getAttribute("data-agent-task-id")||"",a=e.getAttribute("data-agent-run-id")||"",o=0;o<t.length;o++){var l=t[o]===r;t[o].classList.toggle("is-selected",l),t[o].setAttribute("aria-selected",l?"true":"false"),t[o].setAttribute("tabindex",l?"0":"-1")}for(var c=e.querySelectorAll(".agent-run-detail-panel"),d=0;d<c.length;d++){var p=c[d].getAttribute("data-agent-task-id")===n;c[d].classList.toggle("is-selected",p),p?c[d].removeAttribute("hidden"):c[d].setAttribute("hidden","")}a&&n&&ICe(a,n),RU(e)}}window.__openFilePreview=function(e){e&&fCe(e)};window.__openImageViewer=function(e,t){e instanceof HTMLImageElement?h9(e):e&&wl.open(String(e),typeof t=="string"?t:"")};window.__inlineToolImageState=function(e,t){e&&DK(e,t==="error"?"error":"ready")};window.__inlineToolToggle=function(e){var t=e.classList.toggle("inline-tool-open");e.setAttribute("aria-expanded",t?"true":"false");var r=e.querySelector(".inline-tool-expanded"),n=e.querySelector(".inline-tool-expanded-inner");r&&(r.inert=!t,t?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden","true"));var a=e.querySelector(".inline-tool-status");a&&(e.dataset.status==="error"?a.textContent="\u2717":e.dataset.status==="done"&&(a.textContent="\u2713")),t&&nI(e,n,function(o){e.dataset.result=o,n&&(n.innerHTML='<div class="inline-tool-result">'+SK(o,"")+"</div>")}),Y0(e,"inline-tool")};window.__inlineToolKeydown=function(e,t){e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),window.__inlineToolToggle(t))};window.__terminalExpand=function(e){var t=e.closest(".inline-terminal");if(t){var r=t.querySelector(".term-body");if(r){var n=r.style.display==="none";r.style.display=n?"block":"none",t.dataset.expanded=n?"true":"false",e.setAttribute("aria-expanded",n?"true":"false"),r.setAttribute("aria-hidden",n?"false":"true");var a=e.querySelector(".term-toggle-icon");if(a&&(a.textContent=n?"\u25BC":"\u25B6"),Y0(t,"terminal"),n){var o=r.querySelector(".term-output");nI(t,o,function(l){if(o){for(var c=l.split(`
|
|
268
|
-
`),d="",p=0;p<c.length;p++)!c[p]&&p===c.length-1||(d+='<div class="term-line">'+_u(c[p])+"</div>");o.innerHTML=d}})}}}};window.__askSelect=function(e,t,r,n){var a=m.askUserSelections[e];if(a||(a={submitted:!1},m.askUserSelections[e]=a),!a.submitted){var o=a[t]||[];if(n){var l=o.indexOf(r);l===-1?o.push(r):o.splice(l,1)}else o=o[0]===r?[]:[r];a[t]=o,window.__askRender(e)}};window.__askRender=function(e){var t=document.querySelector('[data-tool-use-id="'+e+'"]');if(t){var r=m.askUserSelections[e]||{};t.querySelectorAll(".ask-user-option").forEach(function(l){var c=parseInt(l.dataset.questionIndex,10),d=parseInt(l.dataset.optionIndex,10),p=(r[c]||[]).indexOf(d)!==-1;l.classList.toggle("selected",p)});var n=t.querySelector(".ask-user-submit");if(n){var a=t.querySelectorAll(".ask-user-question-group"),o=!0;a.forEach(function(l,c){(!r[c]||r[c].length===0)&&(o=!1)}),n.disabled=!o||!!r.submitted,r.submitted&&(n.textContent="\u5DF2\u63D0\u4EA4...",n.classList.add("ask-user-submitted"))}}};window.__askSubmit=function(e){var t=m.askUserSelections[e];if(!(!t||t.submitted||!m.selectedId)){var r=document.querySelector('[data-tool-use-id="'+e+'"]');if(r){var n=r.querySelectorAll(".ask-user-question-group"),a=[],o=!0;if(n.forEach(function(c,d){var p=t[d]||[];if(p.length===0){o=!1;return}var h=[];p.forEach(function(g){var v=c.querySelector('[data-option-index="'+g+'"]');v&&h.push(v.dataset.optionLabel)}),a.push(h.join(", "))}),!!o){t.submitted=!0,window.__askRender(e);var l=a.join(`
|
|
269
|
-
`);fetch("/api/sessions/"+m.selectedId+"/input",{method:"POST",headers:{"Content-Type":"application/json","X-Wand-Tool-Projection":"compact"},credentials:"same-origin",body:JSON.stringify({input:l+`
|
|
270
|
-
`,view:m.currentView})}).catch(function(c){console.error("[wand] Error sending answer:",c),t.submitted=!1,window.__askRender(e)})}}}};var ff=null;function gCe(){m.__globalListenersBound||(m.__globalListenersBound=!0,document.addEventListener("paste",function(e){P8e(e)&&e.stopPropagation()},!0),document.addEventListener("click",function(e){if(m.plusPopoverOpen){var t=document.getElementById("composer-plus-popover"),r=document.getElementById("attach-btn"),n=e.target;n&&typeof n.closest=="function"&&n.closest(".wand-composer-select-content")||t&&t.contains(e.target)||r&&r.contains(e.target)||fd()}}),document.addEventListener("keydown",function(e){if(e.key==="Escape"&&m.plusPopoverOpen){var t=e.target;if(t&&typeof t.closest=="function"&&t.closest(".wand-composer-select-content"))return;e.preventDefault(),fd(!0)}}),document.addEventListener("click",function(e){var t=e.target;!t||t.closest}),document.addEventListener("change",function(e){var t=e.target;if(!(!t||t.nodeType!==1)&&!(typeof t.matches!="function"||!t.matches("[data-mode-control]"))){var r=t.getAttribute("data-mode-control"),n=t.value;r==="mode"?FX(n):r==="model"?SX(n):r==="thinking"&&kX(n),t.closest&&t.closest("#composer-plus-popover")&&fd(!0)}}))}function vCe(){gCe(),ff&&(ff.disconnect(),ff=null),Lxe(),NE(S1),R1(document);var e=document.getElementById("login-button");if(e){e.addEventListener("click",P9);var t=document.getElementById("login-form");t&&t.addEventListener("submit",function(C){C.preventDefault(),P9()});var r=document.getElementById("login-switch-server-button");r&&r.addEventListener("click",ak);var n=document.getElementById("password");n&&(n.addEventListener("keydown",function(C){C.key==="Enter"&&P9()}),n.addEventListener("input",function(){n.dataset.error="false",n.setAttribute("aria-invalid","false");var C=document.getElementById("login-error");C&&uG(C)}),n.focus());return}var a=document.getElementById("send-input-button");a&&a.addEventListener("click",function(){if(pi(),lke()==="running"){A$();return}eke()});var o=document.getElementById("input-box");if(o){m.composerCompositionTarget!==o&&(m.composerCompositionGeneration+=1,m.composerCompositionTarget=o,m.composerComposing=!1,m.terminalComposing=!1),UG(o),o.addEventListener("keydown",F8e),o.addEventListener("paste",N8e),o.addEventListener("input",function(C){m.terminalComposing||MU(o,C)||(If(o.value,!0),S1(o),iB())}),o.addEventListener("compositionstart",function(){m.composerCompositionGeneration+=1,m.composerCompositionTarget=o,m.composerComposing=!0,m.terminalComposing=!!m.terminalInteractive}),o.addEventListener("compositionend",function(){var C=m.composerCompositionGeneration,D=m.terminalComposing;setTimeout(function(){if(C===m.composerCompositionGeneration){if(!o.isConnected){m.composerCompositionTarget===o&&(m.composerCompositionTarget=null),m.terminalComposing=!1,m.composerComposing=!1;return}D&&(m.terminalComposing=!1,m.terminalInteractive?MU(o):(S1(o),If(o.value,!0),Mf(o))),m.composerComposing=!1}},0)}),o.addEventListener("focus",function(){pi(),eCe({target:o})}),o.addEventListener("blur",tCe),S1(o);var l=o.closest(".composer-input-wrap");if(l&&typeof ResizeObserver<"u"){var c=-1;ff=new ResizeObserver(function(C){if(!o.isConnected){ff?.disconnect(),ff=null;return}var D=C[0]?C[0].contentRect.width:l.getBoundingClientRect().width;D<=0||Math.abs(D-c)<.5||(c=D,S1(o))}),ff.observe(l)}}var d=document.getElementById("attach-btn"),p=document.getElementById("file-upload-input"),h=document.getElementById("composer-plus-popover");d&&h&&(d.addEventListener("click",function(C){C.stopPropagation(),x8e(C.detail===0)}),h.addEventListener("keydown",function(C){var D=C.target;if(!(C.target instanceof HTMLSelectElement||C.target instanceof HTMLInputElement||D.matches('[role="combobox"], .wand-ui-select-trigger, .wand-ui-select-search-input')||typeof D.closest=="function"&&D.closest(".wand-composer-select-content"))&&["ArrowDown","ArrowUp","Home","End"].includes(C.key)){var S=Array.from(h.querySelectorAll('button:not([disabled]):not(.hidden), select:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(function(j){return j.getClientRects().length>0});if(S.length){C.preventDefault();var A=S.indexOf(document.activeElement),I=C.key==="Home"?0:C.key==="End"?S.length-1:C.key==="ArrowUp"?A<=0?S.length-1:A-1:(A+1)%S.length;S[I]?.focus()}}})),p&&p.addEventListener("change",function(){var C=p.files;C&&T$(C),p.value=""});var g=document.getElementById("prompt-optimize-btn");g&&(g.addEventListener("pointerdown",function(C){C.preventDefault()}),g.addEventListener("click",function(){fd(),O8e()}));var v=document.querySelector(".input-composer");v&&(v.addEventListener("dragover",function(C){C.preventDefault(),C.stopPropagation(),v.classList.add("drag-over")}),v.addEventListener("dragleave",function(C){C.preventDefault(),C.stopPropagation(),v.classList.remove("drag-over")}),v.addEventListener("drop",function(C){C.preventDefault(),C.stopPropagation(),v.classList.remove("drag-over");var D=C.dataTransfer&&C.dataTransfer.files;D&&T$(D)}));var y=document.getElementById("terminal-scale-down-top"),w=document.getElementById("terminal-scale-up-top");y&&y.addEventListener("click",function(){uy(-.25)}),w&&w.addEventListener("click",function(){uy(.25)});var x=document.getElementById("page-refresh-btn");x&&x.addEventListener("click",function(C){if(C&&C.shiftKey){location.reload();return}XK(),yy({preserveStickState:!0}),L0(!0)});var k=document.getElementById("terminal-jump-bottom");k&&k.addEventListener("click",function(){Dl("force")});var F=document.getElementById("chat-unread-bubble");F&&F.addEventListener("click",function(){yCe(!0)}),Ns(),iCe(),s2e(),kke(),pa()}function Bl(){var e=document.getElementById("chat-output");return e?.querySelector(".chat-messages")||null}function aI(e){var t=e||Bl();return t?Math.abs(t.scrollTop)<m.chatScrollThreshold:!0}function ek(e){e=e||{};var t=m.chatUnreadCount>0||m.chatUnreadStartIndex>=0;if(m.chatUnreadCount=0,m.chatUnreadStartIndex=-1,e.removeDivider!==!1){var r=Bl();if(r){var n=r.querySelector(".chat-unread-divider");n&&n.parentNode&&n.parentNode.removeChild(n)}}t&&_s()}function bCe(e){if(e||(e=Bl()),!!e){var t=e.querySelector(".chat-unread-divider");if(m.chatUnreadStartIndex<0||m.chatUnreadCount<=0){t&&t.parentNode&&t.parentNode.removeChild(t);return}for(var r=m.chatUnreadStartIndex,n=e.querySelectorAll(".chat-message"),a=null,o=0;o<n.length;o++){var l=n[o].getAttribute("data-msg-index");if(l!==null){var c=parseInt(l,10);if(!isNaN(c)&&c<r){a=n[o];break}}}var d=m.chatUnreadCount+" \u6761\u65B0\u6D88\u606F";t||(t=document.createElement("div"),t.className="chat-unread-divider",t.setAttribute("role","separator"),t.innerHTML='<span class="chat-unread-divider-line"></span><span class="chat-unread-divider-label"></span><span class="chat-unread-divider-line"></span>'),t.querySelector(".chat-unread-divider-label").textContent=d,a?(t.nextSibling!==a||t.parentNode!==e)&&e.insertBefore(t,a):(t.parentNode!==e||t.nextSibling!==null)&&e.appendChild(t)}}function _s(){var e=document.getElementById("chat-unread-bubble");if(e){var t=m.sessions.find(function(c){return c.id===m.selectedId}),r=!aI(),n=!!t&&m.currentView==="chat"&&r;e.classList.toggle("visible",n),e.classList.toggle("has-unread",m.chatUnreadCount>0);var a=e.querySelector(".chat-unread-bubble-count");a&&(m.chatUnreadCount>0?(a.textContent=m.chatUnreadCount>99?"99+":String(m.chatUnreadCount),a.classList.add("visible")):(a.textContent="",a.classList.remove("visible")));var o=m.chatUnreadCount>0?m.chatUnreadCount+" \u6761\u65B0\u6D88\u606F\uFF0C\u70B9\u51FB\u67E5\u770B":"\u56DE\u5230\u6700\u65B0\u6D88\u606F";e.setAttribute("aria-label",o),e.setAttribute("title",o);var l=document.getElementById("chat-output");l&&l.classList.toggle("has-jump-btn",n)}}function yCe(e){var t=Bl();if(!(!t||!t.isConnected)){m.chatIsProgrammaticScroll=!0;var r=function(){m.chatIsProgrammaticScroll=!1,m.chatStickToBottom=!0,ek({removeDivider:!0}),_s()};if(e&&typeof t.scrollTo=="function"){t.scrollTo({top:0,behavior:"smooth"}),setTimeout(r,260);return}t.scrollTop=0,requestAnimationFrame(r)}}function YG(){var e=Bl();m.chatStickToBottom=!0,ek({removeDivider:!0}),e&&e.isConnected&&(m.chatIsProgrammaticScroll=!0,m.chatProgrammaticScrollUntil=Date.now()+180,e.scrollTop=0,requestAnimationFrame(function(){m.chatIsProgrammaticScroll=!1})),_s()}function wCe(e){if(e!==Bl())return;let t=m.selectedId;m.chatStickToBottom=!1,m.chatIsProgrammaticScroll=!0,m.chatProgrammaticScrollUntil=0,requestAnimationFrame(()=>{m.selectedId===t&&Bl()===e&&(m.chatIsProgrammaticScroll=!1,_s())})}function QG(){var e=Bl();if(!e||!e.isConnected)return;if(m.chatScrollElement===e&&m.chatScrollHandler){_s();return}m.chatScrollElement&&(m.chatScrollHandler&&m.chatScrollElement.removeEventListener("scroll",m.chatScrollHandler),m.chatScrollWheelHandler&&m.chatScrollElement.removeEventListener("wheel",m.chatScrollWheelHandler),m.chatScrollTouchStartHandler&&m.chatScrollElement.removeEventListener("touchstart",m.chatScrollTouchStartHandler),m.chatScrollTouchMoveHandler&&m.chatScrollElement.removeEventListener("touchmove",m.chatScrollTouchMoveHandler)),m.chatScrollElement=e;function t(){m.chatStickToBottom=!1,e.querySelector(".chat-history-summary")&&oa(!0),_s()}m.chatScrollHandler=function(){if(e.isConnected){if(IE(),m.chatIsProgrammaticScroll||Date.now()<m.chatProgrammaticScrollUntil){_s();return}var r=aI(e);if(r)m.chatStickToBottom=!0,ek({removeDivider:!0});else{t();return}_s()}},m.chatScrollWheelHandler=function(r){m.chatIsProgrammaticScroll||r.deltaY<0&&t()},m.chatScrollTouchStartHandler=function(r){!r.touches||r.touches.length===0||(m.chatTouchStartY=r.touches[0].clientY)},m.chatScrollTouchMoveHandler=function(r){if(!m.chatIsProgrammaticScroll&&!(!r.touches||r.touches.length===0)){var n=r.touches[0].clientY-m.chatTouchStartY;n>4&&t()}},e.addEventListener("scroll",m.chatScrollHandler,{passive:!0}),e.addEventListener("wheel",m.chatScrollWheelHandler,{passive:!0}),e.addEventListener("touchstart",m.chatScrollTouchStartHandler,{passive:!0}),e.addEventListener("touchmove",m.chatScrollTouchMoveHandler,{passive:!0}),_s()}var j9=new Wye;function ZG(e=!1){var t=m.sessions.find(function(o){return o.id===m.selectedId});if(!(!t||m.currentView!=="chat")){var r=t.id+":"+(m.chatRenderEpoch||0),n=m.chatRenderedCount<m.currentMessages.length,a=n?"local:"+m.chatRenderedCount+":"+m.currentMessages.length:"server:"+(t.messageOffset||0)+":"+(t.leadingBlockOffset||0);j9.canAttempt(r,a,e)&&(n?(j9.attempted(r,a),m.chatRenderedCount=Math.min(m.currentMessages.length,m.chatRenderedCount+m.chatPageSize),oa(!0)):(t.messageOffset>0||t.leadingBlockOffset>0)&&b8e()&&j9.attempted(r,a))}}function IE(){if(!(document.hidden||m.currentView!=="chat")){var e=Bl();!e?.isConnected||!document.getElementById("chat-load-more-sentinel")||qye(e)&&ZG()}}var xf=null;function JG(){xf!==null&&cancelAnimationFrame(xf);var e=m.selectedId,t=m.chatRenderEpoch||0;xf=requestAnimationFrame(function(){xf=null,m.selectedId===e&&(m.chatRenderEpoch||0)===t&&IE()})}document.addEventListener("visibilitychange",function(){document.hidden||JG()});function kU(e,t,r){if(!(m.selectedId!==e||(m.chatRenderEpoch||0)!==t)){var n=document.getElementById("chat-load-more-sentinel"),a=n?.querySelector(".chat-load-more-btn");!n||!a||(n.dataset.historyLoad=r,OU(a,r==="loading"?"\u6B63\u5728\u52A0\u8F7D\u66F4\u65E9\u5185\u5BB9\u2026":r==="failed"?"\u52A0\u8F7D\u5931\u8D25 \xB7 \u70B9\u51FB\u91CD\u8BD5":"\u52A0\u8F7D\u66F4\u65E9\u7684\u6D88\u606F",!1),a.setAttribute("aria-busy",String(r==="loading")),r==="idle"&&JG())}}var F1=null,L6=null;function xCe(){xf!==null&&(cancelAnimationFrame(xf),xf=null),F1?.disconnect(),F1=null,L6?.disconnect(),L6=null;var e=document.getElementById("chat-load-more-sentinel"),t=Bl();if(!(!e||!t)){var r=e.querySelector(".chat-load-more-btn");r&&(r.onclick=function(){ZG(!0)});var n=m.selectedId,a=m.chatRenderEpoch||0,o=function(){return m.selectedId===n&&(m.chatRenderEpoch||0)===a&&t.isConnected&&e.isConnected&&document.getElementById("chat-load-more-sentinel")===e},l=function(){F1?.disconnect(),!(!o()||t.clientHeight<=0)&&(typeof IntersectionObserver<"u"&&(F1=new IntersectionObserver(function(c){o()&&c.some(function(d){return d.isIntersecting})&&IE()},{root:t,rootMargin:Y3(t.clientHeight)}),F1.observe(e)),IE())};l(),typeof ResizeObserver<"u"&&(L6=new ResizeObserver(l),L6.observe(t))}}function xd(){try{m.selectedId?localStorage.setItem("wand-selected-session",m.selectedId):localStorage.removeItem("wand-selected-session")}catch{}}function iI(e){return e&&Array.isArray(e.queuedMessages)?e.queuedMessages:m.structuredInputQueue}function ECe(){var e=m.sessions.find(function(t){return t.id===m.selectedId});return iI(e)}function tk(e){var t=iI(e);m.structuredInputQueue=Array.isArray(t)?t.slice():[]}function eX(e,t){return!!(e&&Array.isArray(e.content)&&e.content.some(function(r){return r&&typeof r=="object"&&r[t]}))}function kCe(e){return!!(e&&e.role==="user"&&eX(e,"__queued"))}function CCe(e){return!!(e&&e.role==="assistant"&&eX(e,"__processing"))}function rk(e){if(!Array.isArray(e))return[];for(var t=!1,r=[],n=0;n<e.length;n++){var a=e[n];if(kCe(a)||CCe(a)){t=!0;continue}r.push(a)}return t?r:e}function SCe(e,t){if(!e||!Array.isArray(e.messages))return e;var r=e.sessionKind||t&&t.sessionKind;if(r!=="structured")return e;var n=rk(e.messages);return n===e.messages?e:Object.assign({},e,{messages:n})}function tX(){try{if(!m.selectedId)return;var e=ECe();if(e.length===0){ME(m.selectedId);return}localStorage.setItem("wand-structured-queue",JSON.stringify({sessionId:m.selectedId,items:e}))}catch{}}function ME(e){try{var t=localStorage.getItem("wand-structured-queue");if(!t)return;var r=JSON.parse(t);(!e||!r||r.sessionId===e)&&localStorage.removeItem("wand-structured-queue")}catch{localStorage.removeItem("wand-structured-queue")}}function rX(){var e=m.sessions.find(function(n){return n.id===m.selectedId});if(e&&Array.isArray(e.queuedMessages)){tk(e),tX();return}if(e&&e.status!=="running"){m.structuredInputQueue=[],ME(e.id);return}try{var t=localStorage.getItem("wand-structured-queue");if(!t)return;var r=JSON.parse(t);if(!r||r.sessionId!==m.selectedId||!Array.isArray(r.items))return;m.structuredInputQueue=r.items.slice(0,10)}catch{m.structuredInputQueue=[]}}function Pu(){try{if(m.crossSessionQueue.length===0){localStorage.removeItem("wand-cross-session-queue");return}localStorage.setItem("wand-cross-session-queue",JSON.stringify(m.crossSessionQueue))}catch{}}function FCe(){return m.config&&m.config.defaultCwd||"/tmp"}function nX(){try{var e=localStorage.getItem(L9);if(!e)return{};var t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function DCe(e){try{if(!e||Object.keys(e).length===0){localStorage.removeItem(L9);return}localStorage.setItem(L9,JSON.stringify(e))}catch{}}function ACe(){var e=m.selectedId;if(!e)return{};var t=nX(),r=t[e];return r&&typeof r=="object"?r:{}}function aX(e){if(!e||!m.selectedId)return null;var t=ACe();return typeof t[e]=="boolean"?t[e]:null}function iX(e,t){if(!(!e||!m.selectedId)){var r=nX(),n=m.selectedId,a=r[n];(!a||typeof a!="object")&&(a={}),a[e]=!!t,r[n]=a,DCe(r)}}var B$="wand-agent-run-selection-v1";function $Ce(){try{var e=localStorage.getItem(B$);if(!e)return{};var t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function BCe(e){try{if(!e||Object.keys(e).length===0){localStorage.removeItem(B$);return}localStorage.setItem(B$,JSON.stringify(e))}catch{}}function ICe(e,t){if(!(!e||!t||!m.selectedId)){var r=$Ce(),n=m.selectedId,a=r[n];(!a||typeof a!="object")&&(a={}),a[e]=t,r[n]=a,BCe(r)}}function MCe(e,t){return e?e.uuid?"msg:"+e.uuid:e.id?"msg:"+e.id:e.messageId?"msg:"+e.messageId:e.turnId?"msg:"+e.turnId:"msg:"+(typeof t=="number"?t:0):"msg:unknown-"+(typeof t=="number"?t:0)}function TCe(e,t){for(var r=[],n=0;n<t.length;n++){var a=t[n];a==null||a===""||r.push(String(a))}return e+":"+r.join(":")}function oX(e){return!e||!e.dataset?"":e.dataset.expandKey||""}function jCe(e,t){if(!e)return!1;switch(t){case"tool-card":case"diff":return!e.classList.contains("collapsed");case"thinking":return e.classList.contains("expanded")&&!e.classList.contains("collapsed");case"inline-tool":return e.classList.contains("inline-tool-open");case"terminal":{var r=e.querySelector(".term-body");return r?r.style.display!=="none":e.dataset.expanded==="true"}case"agent-run":return e.getAttribute("data-expanded")==="true";case"activity":return e.getAttribute("data-expanded")==="true";default:return!1}}function oI(e,t,r){if(e)switch(t){case"tool-card":case"diff":{e.classList.toggle("collapsed",!r);break}case"thinking":{e.classList.toggle("collapsed",!r),e.classList.toggle("expanded",!!r);break}case"inline-tool":{e.classList.toggle("inline-tool-open",!!r),e.setAttribute("aria-expanded",r?"true":"false");var n=e.querySelector(".inline-tool-expanded");n&&(n.toggleAttribute("inert",!r),r?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden","true"));break}case"terminal":{var a=e.querySelector(".term-body");a&&(a.style.display=r?"block":"none"),e.dataset.expanded=r?"true":"false";var o=e.querySelector(".term-toggle-icon");o&&(o.textContent=r?"\u25BC":"\u25B6");break}case"activity":{e.setAttribute("data-expanded",r?"true":"false");var l=e.querySelector(".chat-activity-menu");l&&(l.toggleAttribute("inert",!r),r?l.removeAttribute("aria-hidden"):l.setAttribute("aria-hidden","true"));var c=e.querySelector(".chat-process-summary");c&&c.setAttribute("aria-expanded",r?"true":"false");break}case"agent-run":{e.setAttribute("data-expanded",r?"true":"false");var d=e.querySelector(".agent-run-summary");d&&d.setAttribute("aria-expanded",r?"true":"false");var p=e.querySelector(".agent-run-body");p&&p.setAttribute("aria-hidden",r?"false":"true");break}}}function Y0(e,t){var r=oX(e);r&&iX(r,jCe(e,t))}function _Ce(e){!e||!m.selectedId||e.querySelectorAll("[data-expand-key]").forEach(function(t){var r=oX(t),n=t.dataset.expandKind||"",a=aX(r);a===null||!n||oI(t,n,a)})}var PCe=new Set(["ready","checking","merging","merged","failed"]),hf=null;function mf(e){return typeof e!="string"?void 0:e.trim()||void 0}function NCe(e){return typeof e=="string"&&PCe.has(e)?e:void 0}function OCe(e,t){if(!e)return null;let r=mf(e.id);if(!r)return null;let n=ca(e.worktree)?e.worktree:{},a=ca(e.worktreeMergeInfo)?e.worktreeMergeInfo:{},o=mf(n.branch)??mf(e.worktreeBranch),l=mf(n.path)??mf(e.worktreePath),c=mf(a.targetBranch),d=mf(e.status),p=NCe(e.worktreeMergeStatus),h=p==="merged"&&a.cleanupDone===!1;return{sessionId:r,intent:t??(h?"cleanup":"merge"),...o?{sourceBranch:o}:{},...l?{worktreePath:l}:{},...c?{targetBranch:c}:{},...d?{sessionStatus:d}:{},...p?{mergeStatus:p}:{},cleanupPending:h}}function sX(){return fi(["worktreeMerge"])}function CU(e,t){let r=t instanceof Error&&t.message?`\uFF1A${t.message}`:"";e.toast(`Worktree \u5DF2\u66F4\u65B0\uFF0C\u4F46\u4F1A\u8BDD\u5217\u8868\u5237\u65B0\u5931\u8D25${r}`,"error")}function RCe(e,t){try{Promise.resolve(e.refreshSessions(t)).catch(r=>{CU(e,r)})}catch(r){CU(e,r)}}function LCe(e){return{onOpen(t){sX(),e.onOpen?.(t)},onClose(t){e.onClose?.(t)},onRepositoryChanged(t){RCe(e,t)},toast(t,r){e.toast(t,r)}}}function sI(e){if(hf?.dependencies===e)return hf.dispose;hf?.dispose();let t=S7(LCe(e)),r=!1,n={dependencies:e,dispose(){r||(r=!0,t(),hf===n&&(hf=null))}};return hf=n,n.dispose}function lX(e,t){let r=hf,n=e.trim();return!r||!n||!Pf(()=>{SU(r,n,t)})?!1:SU(r,n,t)}function SU(e,t,r){if(!sX())return!1;let n=OCe(e.dependencies.getSession(t),r);return n?Nc.open(n)?!0:(e.dependencies.toast("Worktree \u5408\u5E76\u754C\u9762\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5\u3002","error"),!1):(e.dependencies.toast("\u672A\u627E\u5230\u53EF\u64CD\u4F5C\u7684 worktree \u4F1A\u8BDD\u3002","error"),!1)}var zCe=Object.freeze({revision:0,mounts:Object.freeze([])}),HCe=class{constructor(){oe(this,"snapshot",zCe),oe(this,"listeners",new Set),oe(this,"subscribe",e=>(this.listeners.add(e),()=>this.listeners.delete(e))),oe(this,"getSnapshot",()=>this.snapshot)}sync(e){this.snapshot=Object.freeze({revision:this.snapshot.revision+1,mounts:Object.freeze(e.slice())});for(let t of this.listeners)t()}clear(){this.snapshot.mounts.length!==0&&this.sync([])}},Q0=new HCe;function qCe(e){return e==="mode"||e==="model"||e==="thinking"||e==="tool"}function WCe(e){return e==="mode"||e==="runtime"||e==="all"||e==="dropdown"}function VCe(e){let t=[];document.querySelectorAll("[data-composer-select-host]").forEach((r,n)=>{let a=r.dataset.modeControl,o=r.dataset.composerSelectScope;if(!qCe(a)||!WCe(o)||!r.isConnected)return;let l=e.resolve(a,o);t.push({key:r.dataset.composerSelectKey||`${o}-${a}-${n}`,target:r,control:a,scope:o,value:l.value,options:l.options,ariaLabel:l.ariaLabel,placeholder:l.placeholder,displayValue:l.displayValue,displayTitle:l.displayTitle,disabled:l.disabled,align:a==="mode"?"start":"end",onValueChange(c){e.onValueChange(a,c,o)}})}),Q0.sync(t)}function UCe(e,t){return e.groupTitle===t.groupTitle&&e.modeLabel===t.modeLabel&&e.modelFullLabel===t.modelFullLabel&&e.modelRefreshing===t.modelRefreshing&&e.thinkingValue===t.thinkingValue&&e.thinkingLabel===t.thinkingLabel&&e.toolVisible===t.toolVisible&&e.toolStatus===t.toolStatus&&e.toolDisabled===t.toolDisabled}function KCe(e,t){return e.target===t.target&&e.scope===t.scope&&UCe(e,t)}var GCe=class extends Vs{constructor(){super(KCe)}},Z0=new GCe;function XCe(e){return e==="mode"||e==="runtime"||e==="all"}function YCe(e){vy({selector:"[data-composer-config-host]",store:Z0,flush:!0,build(t){let r=t.dataset.composerConfigHost;return XCe(r)?{key:`composer-config-${r}`,target:t,scope:r,...e.resolve(r),onRefreshModels:e.onRefreshModels}:null}})}function QCe(e){vy({selector:"[data-composer-attachments-host]",store:g6,build(t){let r=e.resolve();return r.length===0?null:{key:"composer-attachments",target:t,items:r,onRemove:e.onRemove}}})}function uX(e){return e==="default"?"":e||""}function ZCe(e,t,r){let n=e||r;return t.some(a=>a.value===n)?n:r}var _9="default";function cX(e){let t=e.split(/\s+·\s+/);return t.length>1&&t[0].trim().toLocaleLowerCase()===t[1].trim().toLocaleLowerCase()&&t.splice(1,1),t.join(" \xB7 ")}var JCe=/^跟随.*默认$/,e8e=/\s*[((][^(())]*默认[^(())]*[))]\s*$/;function t8e(e,t,r){let n=(e??"").trim();if(n&&n!==_9)return n===ed?rd:(t.find(l=>l.id===n)?.label??"").trim()||(td(n)?"\u6A21\u578B\u5206\u7EC4":Cu(n)?f0:n);let a=(r??"").trim();if(a&&a!==_9)return a===ed?rd:(t.find(l=>l.id===a)?.label??"").trim()||(td(a)?"\u6A21\u578B\u5206\u7EC4":Cu(a)?f0:a);let o=(t.find(l=>l.id===_9)?.label??"").trim().replace(e8e,"").trim();return JCe.test(o)?"":o}function dX(e,t=0){return!!e&&e.sessionKind==="structured"&&e.status==="idle"&&!e.archived&&!e.structuredState?.inFlight&&!e.claudeSessionId&&!e.resumedFromSessionId&&!e.autoRecovered&&!e.automationId&&(!e.sessionSource||e.sessionSource==="interactive")&&!(e.messages?.length||e.messageCount||e.messageTotal||t)&&!e.queuedMessages?.length}function I$(e){return m4(e?.provider,e?.structuredState?.engine==="core"?"sdk":"cli")}var $f=xxe(),z6=new Map,nk=CD();async function TE(e){if(!e||!nk.isLoaded(e.id)||m.selectedId!==e.id||document.visibilityState!=="visible"||!Ni(e)||!document.getElementById(m.currentView==="chat"?"chat-output":"output")?.getClientRects().length||Array.from(document.querySelectorAll('[role="dialog"][aria-modal="true"]')).some(r=>r.getClientRects().length>0))return;let t=e.completionRevision;if(z6.get(e.id)!==t){z6.set(e.id,t);try{let r=await fetch("/api/sessions/"+encodeURIComponent(e.id)+"/completion/view",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({completionRevision:t})}),n=await Dt(r);rr({id:e.id,completionRevision:n.completionRevision,viewedCompletionRevision:n.viewedCompletionRevision},"latest"),hi(),ho()}catch{}finally{z6.get(e.id)===t&&z6.delete(e.id)}}}function FU(e){return e?[e.status??"",e.title??"",e.titleGenerating===!0?"1":"0",e.archived===!0?"1":"0",e.employeeId??"",e.employeeName??"",e.teamChat?"1":"0",e.teamStep?.title??""].join(""):""}function Ou(e,t){return fetch(e,{...t,headers:{...t?.headers,"X-Wand-Tool-Projection":"compact"}})}function r8e(){var e=document.getElementById("login-cert-hint");e&&e.classList.remove("hidden");var t=document.getElementById("login-cert-http-link");t&&(t.href="http://"+location.host+location.pathname,t.style.display=location.protocol==="https:"?"":"none")}function n8e(){var e=document.getElementById("login-cert-hint");e&&e.classList.add("hidden")}function M$(){m.loginLockTicker||(m.loginLockTicker=setTimeout(function(){m.loginLockTicker=0;var e=document.getElementById("login-button"),t=document.getElementById("login-error"),r=Math.ceil((m.loginLockUntil-Date.now())/1e3);if(r>0){if(M$(),m.loginPending||!e)return;e.disabled=!0,e.textContent="\u8BF7\u7B49\u5F85 "+r+"s",t&&X1(t,"\u767B\u5F55\u5C1D\u8BD5\u6B21\u6570\u8FC7\u591A\uFF0C\u8BF7\u7B49\u5F85 "+r+" \u79D2\u3002");return}m.loginLockUntil=0,e&&(e.disabled=!1,e.textContent="\u8FDB\u5165\u63A7\u5236\u53F0"),t&&X1(t,"\u73B0\u5728\u53EF\u4EE5\u518D\u8BD5\u4E00\u6B21\u4E86\u3002")},1e3))}function P9(){var e=document.getElementById("password"),t=document.getElementById("login-button"),r=document.getElementById("login-error");if(!(!e||!t||!r)){var n=Math.ceil((m.loginLockUntil-Date.now())/1e3);if(n>0){X1(r,"\u767B\u5F55\u5C1D\u8BD5\u6B21\u6570\u8FC7\u591A\uFF0C\u8BF7\u7B49\u5F85 "+n+" \u79D2\u3002"),M$();return}if(!m.loginPending){uG(r),n8e(),e.dataset.error="false",e.setAttribute("aria-invalid","false"),m.loginPending=!0,t.disabled=!0,t.textContent="\u767B\u5F55\u4E2D...";var a=e.value;pwe(e,a),dwe(a).then(function(o){if(!o.ok){o.retryAfterMs&&(m.loginLockUntil=Date.now()+o.retryAfterMs,M$()),o.kind==="cookie-not-stored"&&location.protocol==="https:"&&r8e(),o.credentialInvalid&&(e.dataset.error="true",e.setAttribute("aria-invalid","true")),X1(r,o.message);return}return m.config=o.config,Fy(m.config),Tl().then(function(){rG(),yf()})}).catch(function(o){X1(r,"\u767B\u5F55\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002")}).finally(function(){if(m.loginPending=!1,m.loginLockUntil>Date.now()){t.disabled=!0;return}m.loginLockUntil=0,t.disabled=!1,t.textContent="\u8FDB\u5165\u63A7\u5236\u53F0"})}}}function pX(){return typeof WandNative<"u"&&typeof WandNative.switchServer=="function"}function ak(){if(pX())try{WandNative.switchServer()}catch{}}function lI(){try{if(typeof WandNative<"u"&&typeof WandNative.backToNative=="function"){WandNative.backToNative();return}typeof window.__wandBackToNative=="function"&&window.__wandBackToNative()}catch{}}function fX(){lE(),$f.reset(),Ib(),U3(),d6e(),P0.clear(),iG(),IB(),Af(!1),my(),m.config=null,m.selectedId=null,xd(),m.sessions=[],m.claudeHistory=[],m.claudeHistoryLoaded=!1,m.claudeHistoryExpanded=!1,m.claudeHistoryExpandedDirs={},m.sessionsDrawerOpen=!1,Vr("wand-sidebar-open",!1),yf()}async function uI(){var e;try{e=await fetch("/api/logout",{method:"POST",credentials:"same-origin"})}catch(t){Ye(ei(t,"\u6CE8\u9500\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u8BD5\u3002"),"error");return}if(!e.ok){Ye("\u6CE8\u9500\u5931\u8D25\uFF08HTTP "+e.status+"\uFF09\uFF0C\u8BF7\u91CD\u8BD5\u3002","error");return}fX()}function a8e(){fX()}function Tl(){return mi()}function DU(e){return e==="full-access"?"\u5B8C\u5168\u8BBF\u95EE":e==="default"?"\u9ED8\u8BA4":e==="native"?"\u539F\u751F":e==="auto-edit"?"\u81EA\u52A8\u7F16\u8F91":e==="managed"?"\u6258\u7BA1":e}function bd(){return m.sessionTool||m.preferredCommand||"claude"}var mX="Enter \u53D1\u9001 \xB7 Shift+Enter \u6362\u884C";function hX(e,t){return ws(e)?I7:t?"\u952E\u76D8\u8F93\u5165\u76F4\u901A\u7EC8\u7AEF \xB7 Enter \u63D0\u4EA4":e&&(e.status==="exited"||e.status==="failed"||e.status==="stopped")?xy(e)?"\u8F93\u5165\u6D88\u606F\u4EE5\u7EE7\u7EED\u4F1A\u8BDD":"\u4F1A\u8BDD\u5DF2\u7ED3\u675F":cr(e)&&e.structuredState&&e.structuredState.inFlight?"\u56DE\u590D\u4E2D\uFF0C\u53EF\u7EE7\u7EED\u8F93\u5165":document.documentElement.classList.contains("is-wand-app")?"\u6253\u5B57\u6216\u6309\u4F4F\u8BF4\u8BDD":"\u8F93\u5165\u6D88\u606F\u2026"}function gX(e){return e==="codex"?["full-access"]:e==="opencode"||e==="grok"?["default","full-access","managed"]:e==="qoder"?["default","full-access","auto-edit","managed"]:["default","full-access","auto-edit","native","managed"]}function yd(e,t){var r=gX(e);if(r.indexOf(t)!==-1)return t;var n=m.config&&m.config.defaultMode?m.config.defaultMode:"default";return r.indexOf(n)!==-1?n:r[0]}function vX(e){return e?cr(e)||e.provider==="codex":!1}function i8e(e,t){if(!e||!e.is_error||!t||t.is_error)return!1;var r=ey(e.content).toLowerCase(),n=ey(t.content).toLowerCase();return r?r.indexOf("invalid pages parameter")!==-1&&n.length>0:!1}function cr(e){return!!e&&(e.sessionKind==="structured"||e.runner==="claude-cli-print")}function bX(){m.chatMode=yd("claude",m.chatMode),Eo()}var AU=Object.create(null),H6=Object.create(null),jE=Object.create(null),z0=new Map;async function o8e(e){let t=Ma(),r=Cv(e);if(!r||!dX(t,m.currentMessages?.length)||ik(t.id)||z0.get(t.id)?.pending||I$(t)===e)return;let n={pending:!0,status:"\u6B63\u5728\u5207\u6362\u5DE5\u5177\u2026",failed:!1};z0.set(t.id,n),Eo(),Ta();try{let a=await ok(t.id,async function(){let o=await Ou("/api/sessions/"+encodeURIComponent(t.id)+"/provider",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r.provider,engine:r.engine})}),l=await Dt(o);if(l.id!==t.id||l.employeeId!==t.employeeId||I$(l)!==e)throw new Error("\u672A\u6536\u5230\u6709\u6548\u7684\u5DE5\u5177\u5207\u6362\u56DE\u6267\uFF0C\u8BF7\u5237\u65B0\u4F1A\u8BDD\u6838\u5BF9\u3002");return l});a.latest&&m.sessions.some(function(o){return o.id===t.id})&&(rr(a.data),cI(t.id),m.selectedId===t.id&&(m.sessionTool=r.provider,m.chatMode=a.data.mode),n.status="\u5DF2\u5207\u6362\u4E3A "+r.label,hi())}catch(a){n.failed=!0,n.status=ei(a?.error??a,"\u5207\u6362\u5DE5\u5177\u5931\u8D25\uFF0C\u8BF7\u5237\u65B0\u6838\u5BF9\u3002")}finally{n.pending=!1,Eo(),Ta()}}function ik(e){return e&&jE[e]||null}function _E(e,t,r){if(e){var n=jE[e]||(jE[e]={});n[t]=r}}function cI(e){e&&delete jE[e]}function ok(e,t){var r=(H6[e]||0)+1;H6[e]=r;var n=AU[e]||Promise.resolve(),a=n.catch(function(){}).then(t);return AU[e]=a.catch(function(){}),a.then(function(o){return{data:o,latest:H6[e]===r}},function(o){return Promise.reject({error:o,latest:H6[e]===r})})}function cy(e,t){cI(e),Promise.resolve(mi()).catch(function(){}).finally(function(){Eo()}),Ye(t,"error")}function dI(e,t){if(!t.latest)return!1;var r=t.data;return r&&r.error?(cy(e,r.error),!1):!r||!r.id?(cy(e,"\u4F1A\u8BDD\u8BBE\u7F6E\u66F4\u65B0\u5931\u8D25"),!1):(rr(r),cI(e),Eo(),!0)}function sk(e,t){var r=f8e(e,t);return!r||r==="auto"?"\u81EA\u52A8":xA(r)}function dy(e,t){var r=t8e(e,fI(t),pI(Cy(t)));return r||"\u9ED8\u8BA4"}function s8e(e,t){var r=cX(dy(e,t)),n=r.search(/[((]/);n>0&&(r=r.slice(0,n).trim());var a=r.lastIndexOf("/");return a>=0&&a<r.length-1&&(r=r.slice(a+1).trim()),r}function l8e(e,t){var r=lk(t);return r.map(function(n){var a=n.id==="off"?"\u81EA\u52A8\uFF08\u6A21\u578B\u9ED8\u8BA4\uFF09":sk(n.id,t);return{value:n.id,label:a}})}function Eo(){var e=Ma(),t=m.chatMode||"default",r=wX(e);u8e(e,t,yX(e)||"",r)}function u8e(e,t,r,n){var a=bd();for(let[F,C]of z0)!C.pending&&!m.sessions.some(function(D){return D.id===F})&&z0.delete(F);let o=z0.get(e?.id),l=dX(e,m.currentMessages?.length),c=!!e||l,d=!!o?.pending;var p=d8e(r,e),h=uX(r),g=l8e(n,e),v=ZCe(n,g,"off"),y=DU(t),w=s8e(h,e),x=dy(h,e)||w,k=sk(v,e);YCe({resolve:function(){return{groupTitle:"\u6A21\u5F0F "+y+" \xB7 \u6A21\u578B "+x+" \xB7 \u601D\u8003 "+k,modeLabel:y,modelFullLabel:x,modelRefreshing:!!m.modelsRefreshing||d,toolVisible:c,toolStatus:o?.status,toolDisabled:d,thinkingValue:v,thinkingLabel:k}},onRefreshModels:function(){h8e()}}),VCe({resolve:function(F,C){if(F==="tool"){let D=I$(e);return{value:D,options:Ym.map(function(S){return{value:S.id,label:S.label}}),ariaLabel:"\u66F4\u6362\u6267\u884C\u5DE5\u5177",displayValue:d?"\u5207\u6362\u4E2D\u2026":o?.failed?"\u5207\u6362\u5931\u8D25":Cv(D)?.label,displayTitle:o?.status||Cv(D)?.description,disabled:!l||d||!!ik(e?.id)}}return F==="mode"?{value:t,disabled:d,options:gX(a).map(function(D){return{value:D,label:DU(D)}}),ariaLabel:"\u6A21\u5F0F",placeholder:y,displayValue:y}:F==="model"?{value:h,disabled:d,options:p,ariaLabel:"\u6A21\u578B",placeholder:w,displayValue:w,displayTitle:x}:{value:v,disabled:d,options:g,ariaLabel:"\u601D\u8003\u6DF1\u5EA6",placeholder:k,displayValue:C==="runtime"?"\u601D\u8003\uFF1A"+k:k}},onValueChange:function(F,C,D){F==="tool"?o8e(C):F==="mode"?FX(C):F==="model"?SX(C):kX(C),D==="all"&&requestAnimationFrame(function(){fd(!0)})}})}function J0(e){return e==="codex"||e==="opencode"||e==="grok"||e==="qoder"||e==="pi"?e:"claude"}function Cy(e){return J0(e&&e.provider||m.sessionTool||"claude")}function c8e(){var e=m.config&&m.config.defaultModels&&typeof m.config.defaultModels=="object"?m.config.defaultModels:{};return{claude:typeof e.claude=="string"?e.claude:m.config&&m.config.defaultModel||"",codex:typeof e.codex=="string"?e.codex:m.config&&m.config.defaultCodexModel||"",opencode:typeof e.opencode=="string"?e.opencode:m.config&&m.config.defaultOpenCodeModel||"",grok:typeof e.grok=="string"?e.grok:m.config&&m.config.defaultGrokModel||"",qoder:typeof e.qoder=="string"?e.qoder:m.config&&m.config.defaultQoderModel||"",pi:typeof e.pi=="string"?e.pi:m.config&&m.config.defaultPiModel||""}}function pI(e){var t=c8e(),r=J0(e);return r==="codex"?t.codex||"":r==="opencode"?t.opencode||"":r==="grok"?t.grok||"":r==="qoder"?t.qoder||"":r==="pi"?t.pi||"":t.claude||""}function Rs(e){var t=J0(e),r=m.chatModels&&typeof m.chatModels[t]=="string"?m.chatModels[t]:"";return!r&&t==="claude"&&(r=m.chatModel||""),r||""}function Sy(e,t){var r=J0(e),n=(t||"").trim();m.chatModels||(m.chatModels={},Zs.forEach(function(a){m.chatModels[a]=""})),m.chatModels[r]=n,m.chatModel=n;try{localStorage.setItem("wand-chat-model-"+r,n),localStorage.removeItem("wand-chat-model")}catch{}}function yX(e){var t=e&&e.id?ik(e.id):null;if(t&&Object.prototype.hasOwnProperty.call(t,"model"))return t.model||"";if(e&&e.selectedModel)return e.selectedModel;var r=Cy(e),n=Rs(r);return n||pI(r)||""}function fI(e){var t=J0(e&&e.provider||m.sessionTool||"claude");return t==="codex"?m.availableCodexModels||[]:t==="opencode"?m.availableOpenCodeModels||[]:t==="grok"?m.availableGrokModels||[]:t==="qoder"?m.availableQoderModels||[]:t==="pi"?(m.availablePiModels||[]).filter(function(r){return e?.sessionKind!=="pty"||!r.id.startsWith("wand-openrouter-free/")}):m.availableModels||[]}function d8e(e,t){for(var r=fI(t),n=uX(e),a=[{value:"",label:"\u9ED8\u8BA4 \xB7 "+dy("",t)}],o=0;o<r.length;o++){var l=r[o];if(l.id!=="default"){var c=cX(l.label||l.id),d=Cy(t)==="claude"?l.availability==="verified"?" \xB7 \u5DF2\u9A8C\u8BC1":l.availability==="stale"?" \xB7 \u5F85\u5237\u65B0":l.source==="models-api"?" \xB7 API \u5019\u9009":" \xB7 \u5019\u9009":"";a.push({value:l.id,label:c+d,group:l.group})}}return n&&!r.some(function(p){return p.id===n})&&a.push({value:n,label:n+"\uFF08\u81EA\u5B9A\u4E49\uFF09"}),a}function mI(e){Eo()}var iE=[{id:"off",label:"auto",hint:"\u4F7F\u7528 provider / \u6A21\u578B\u9ED8\u8BA4\u601D\u8003\u6863\u4F4D"},{id:"standard",label:"low",hint:"Claude/Codex: low \xB7 OpenCode variant: low"},{id:"deep",label:"medium",hint:"Claude/Codex: medium \xB7 OpenCode variant: high"},{id:"max",label:"max",hint:"Claude: max \xB7 Codex: xhigh \xB7 OpenCode variant: max"}];function p8e(e){var t=Cy(e),r=yX(e)||"default",n=fI(e),a=n.find(function(c){return c.id===r})||n.find(function(c){return c.id==="default"});if(a&&Array.isArray(a.reasoningEfforts)&&a.reasoningEfforts.length)return{provider:t,efforts:a.reasoningEfforts,defaultEffort:a.defaultReasoningEffort||""};var o=m.providerThinkingEfforts||{},l=Array.isArray(o[t])?o[t]:[];return{provider:t,efforts:l,defaultEffort:""}}function lk(e){var t=p8e(e),r=EA(t.provider,t.efforts,t.defaultEffort);return r||iE}function f8e(e,t){for(var r=lk(t),n=0;n<r.length;n++)if(r[n].id===e)return r[n].label;if(typeof e=="string"&&e.indexOf("codex:")===0)return e.slice(6);for(var a=0;a<iE.length;a++)if(iE[a].id===e)return iE[a].label;return"auto"}function wX(e){var t=e&&e.id?ik(e.id):null;return t&&Object.prototype.hasOwnProperty.call(t,"thinking")?t.thinking||"off":e&&e.thinkingEffort?e.thinkingEffort:m.chatThinking?m.chatThinking:"off"}function xX(e){m.chatThinking=e;try{localStorage.setItem("wand-thinking-effort",e)}catch{}}function Fy(e){var t=e&&typeof e=="object"?e.defaultThinkingEffort:"",r=t==="off"||t==="standard"||t==="deep"||t==="max"||V5(String(t||""));if(r){try{if(localStorage.getItem("wand-thinking-effort"))return}catch{}m.chatThinking!==t&&(m.chatThinking=t,Eo())}}function EX(e,t,r,n){return ok(e.id,function(){return n&&!n.ok?{error:n.error||"\u5207\u6362\u6A21\u578B\u5931\u8D25"}:Ou("/api/sessions/"+encodeURIComponent(e.id)+"/thinking-effort",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({thinkingEffort:t})}).then(function(a){return a.json()})}).then(function(a){dI(e.id,a)&&typeof Ye=="function"&&Ye(r||"\u5DF2\u5207\u6362\u601D\u8003\u6DF1\u5EA6 \u2192 "+sk(t,Ma()),"success")}).catch(function(a){a&&a.latest&&cy(e.id,"\u5207\u6362\u601D\u8003\u6DF1\u5EA6\u5931\u8D25")})}function kX(e){var t=(e||"off").trim(),r=Ma(),n=lk(r).some(function(a){return a.id===t});n||(t="off"),xX(t),r&&_E(r.id,"thinking",t),Eo(),r&&EX(r,t,"\u5DF2\u5207\u6362\u601D\u8003\u6DF1\u5EA6 \u2192 "+sk(t,r))}function m8e(e){if(!e)return!1;var t=e.mode;return t==="managed"||t==="full-access"}function CX(){return wA(),fetch("/api/models",{credentials:"same-origin"}).then(function(e){return e.json()}).then(function(e){return hI(e),m0(e),e}).catch(function(){return null})}function hI(e){return!e||!Array.isArray(e.models)?!1:(m.availableModels=e.models,m.availableCodexModels=Array.isArray(e.codexModels)?e.codexModels:[],m.availableOpenCodeModels=Array.isArray(e.opencodeModels)?e.opencodeModels:[],m.availableGrokModels=Array.isArray(e.grokModels)?e.grokModels:[],m.availableQoderModels=Array.isArray(e.qoderModels)?e.qoderModels:[],m.availablePiModels=Array.isArray(e.piModels)?e.piModels:[],m.providerThinkingEfforts=e.thinkingEfforts&&typeof e.thinkingEfforts=="object"?e.thinkingEfforts:{},e.revision&&(m.modelCatalogRevision=e.revision),mI(Ma()),!0)}typeof window<"u"&&window.addEventListener("wand-model-catalog",function(e){var t=e&&e.detail;!t||!Array.isArray(t.models)||t.revision&&t.revision===m.modelCatalogRevision||hI(t)});function h8e(){return m.modelsRefreshing?Promise.resolve(null):(m.modelsRefreshing=!0,Eo(),fetch("/api/models/refresh",{method:"POST",credentials:"same-origin"}).then(function(e){return e.ok?e.json():e.json().catch(function(){return{}}).then(function(t){throw new Error(t&&t.error?t.error:"\u5237\u65B0\u6A21\u578B\u5217\u8868\u5931\u8D25\u3002")})}).then(function(e){if(!hI(e))throw new Error("\u5237\u65B0\u6A21\u578B\u5217\u8868\u5931\u8D25\u3002");return m0(e),Ye("\u6A21\u578B\u5217\u8868\u5DF2\u5237\u65B0\u3002","success"),e}).catch(function(e){return Ye(e&&e.message?e.message:"\u5237\u65B0\u6A21\u578B\u5217\u8868\u5931\u8D25\u3002","error"),null}).finally(function(){m.modelsRefreshing=!1,Eo()}))}function Ma(){if(!m.selectedId)return null;for(var e=0;e<m.sessions.length;e++)if(m.sessions[e].id===m.selectedId)return m.sessions[e];return null}function SX(e){var t=(e||"").trim(),r=Ma(),n=Cy(r);Sy(n,t),r&&_E(r.id,"model",t);var a=!1;if(lk(r).some(function(c){return c.id===wX(r)})||(a=!0,xX("off"),r&&_E(r.id,"thinking","off")),Eo(),!!r){var o={ok:!1,error:""};if(ok(r.id,function(){return Ou("/api/sessions/"+encodeURIComponent(r.id)+"/model",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({model:t||null})}).then(function(c){return c.json()}).then(function(c){return o.ok=!!(c&&c.id&&!c.error),o.error=c&&c.error?c.error:"",c})}).then(function(c){if(!a&&dI(r.id,c)&&typeof Ye=="function"){var d=dy(t,Ma()||r),p=r.provider==="codex"?"\uFF08\u4E0B\u6B21\u5BF9\u8BDD\u751F\u6548\uFF09":"";Ye("\u5DF2\u5207\u6362\u6A21\u578B \u2192 "+d+p,"success")}}).catch(function(c){o.ok=!1,!a&&c&&c.latest&&cy(r.id,"\u5207\u6362\u6A21\u578B\u5931\u8D25")}),a){var l=dy(t,r);EX(r,"off","\u5DF2\u5207\u6362\u6A21\u578B \u2192 "+l+"\uFF1B\u601D\u8003\u6DF1\u5EA6\u5DF2\u56DE\u843D\u4E3A\u81EA\u52A8",o)}}}function FX(e){var t=yd(bd(),(e||"default").trim());m.chatMode=t,Eo();var r=Ma();if(!r||!r.id){Ye&&Ye("\u65B0\u4F1A\u8BDD\u6A21\u5F0F\uFF1A"+t,"info");return}_E(r.id,"mode",t),ok(r.id,function(){return Ou("/api/sessions/"+encodeURIComponent(r.id)+"/mode",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({mode:t})}).then(function(n){return n.json()})}).then(function(n){if(dI(r.id,n)&&typeof Ye=="function"){var a=m.sessions.find(function(c){return c.id===r.id})||r,o=a.mode||t;m.chatMode=yd(a.provider||bd(),o),Eo();var l=r.provider==="codex"?"\uFF08Codex \u56FA\u5B9A\u5168\u6743\u9650\uFF09":"";Ye("\u5DF2\u5207\u6362\u6A21\u5F0F \u2192 "+o+l,"success")}}).catch(function(n){n&&n.latest&&cy(r.id,"\u5207\u6362\u6A21\u5F0F\u5931\u8D25")})}function uk(e,t,r,n,a){var o=a&&a.provider||J0(m.sessionTool),l=(a&&a.model?String(a.model):"").trim(),c=l||Rs(o)||pI(o),d=m.chatThinking||"off",p=o==="codex"?"codex-cli-exec":o==="opencode"?"opencode-cli-run":o==="grok"?"grok-cli-headless":o==="qoder"?"qoder-cli-print":o==="pi"?"pi-cli-json":"claude-cli-print",h={kind:"structured",cwd:t||ts(),mode:r||m.chatMode||m.config&&m.config.defaultMode||"default",provider:o,runner:p,engine:a&&a.engine?a.engine:void 0,prompt:e||void 0,worktreeEnabled:n===!0,model:c||void 0,thinkingEffort:d,sessionSource:"interactive",workspaceId:a&&a.workspaceId,workspaceTaskId:a&&a.workspaceTaskId,systemPrompt:a&&a.systemPrompt,employeeId:a&&a.employeeId,respondImmediately:e?!0:void 0};return Ou("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(h)}).then(function(g){return g.json()}).then(function(g){if(g.error)throw new Error(g.error);return Of(g.id,!0),rr(g),Promise.resolve(In(g.id)).then(function(){return g})})}function gI(){var e=!!m.selectedId,t=document.getElementById("chat-output"),r=m.sessions.find(function(o){return o.id===m.selectedId}),n=cr(r),a=e&&(n||m.currentView!=="terminal");n?m.currentView="chat":e||(m.currentView="terminal"),t&&a&&N$(t),QG(),_s(),Ta(),ja("shell:view")}function rr(e,t="unknown"){if(!(!e||!e.id)){t==="latest"&&(Array.isArray(e.messages)||typeof e.output=="string")&&nk.loaded(e.id);var r=FU(m.sessions.find(function(h){return h.id===e.id})),n=m.sessions.find(function(h){return h.id===e.id})||null,a=Object.assign({},SCe(e,n),w2(n,e));if(t==="latest"&&Array.isArray(a.messages)&&typeof a.messageOffset!="number"&&(a.messageOffset=0,a.messageTotal=a.messages.length),Array.isArray(a.messages)&&typeof a.messageOffset=="number"){var o=a.messageOffset,l=typeof a.leadingBlockOffset=="number"?Fxe(n,a.messages,a.messageOffset,a.messageTotal,a.leadingBlockOffset,a.leadingBlockTotal||0,t):e$(n,a.messages,a.messageOffset,a.messageTotal,t);Object.assign(a,l),typeof a.leadingBlockOffset!="number"&&(a.leadingBlockOffset=l.messageOffset<o&&n?.leadingBlockOffset||0,a.leadingBlockTotal=a.messages[0]?.content?.length||0)}$f.record(a);var c=!1;m.sessions=m.sessions.map(function(h){return h.id!==a.id?h:(c=!0,Object.assign({},h,a))}),c||m.sessions.unshift(a);var d=FU(m.sessions.find(function(h){return h.id===e.id}));d!==r&&d2(p2(m.sessions));var p=m.sessions.find(function(h){return h.id===a.id})||a;p&&Array.isArray(p.queuedMessages)&&a.id===m.selectedId&&(tk(p),tX(),pd()),a.id===m.selectedId&&(ZE(),ud()),a.status&&a.status!=="running"&&m.crossSessionQueue.length>0&&setTimeout(YE,0)}}function ck(e){!e||!m.ws||m.ws.readyState!==WebSocket.OPEN||m.ws.send(JSON.stringify({type:"subscribe",mode:N0(e)?"add":"replace",sessionId:e,blockBudget:N1,byteBudget:_$,omitStructuredOutput:!0,compactTools:!0,capabilities:{ptyAck:!0}}))}function g8e(e,t){if(!e)return t;var r=Object.assign({},e,t,w2(e,t)),n=!Array.isArray(t.messages)&&typeof t.output!="string";if(n)return Array.isArray(e.messages)&&!Array.isArray(t.messages)&&(r.messages=e.messages),typeof e.output=="string"&&typeof t.output!="string"&&(r.output=e.output),r;var a=typeof t.output=="string"&&t.output.length>0;!a&&typeof e.output=="string"&&(r.output=e.output);var o=e.structuredState||null,l=t.structuredState||null,c=e.sessionKind==="structured"||t.sessionKind==="structured",d=!!(e.messages&&e.messages.length&&(function(){var v=e.messages[e.messages.length-1];return v&&v.role==="assistant"&&Array.isArray(v.content)&&v.content.some(function(y){return y&&y.__processing})})()),p=Array.isArray(t.messages)?c?rk(t.messages):t.messages:[],h=p.length>0&&(function(){var v=p[p.length-1];return v&&v.role==="assistant"&&Array.isArray(v.content)&&!v.content.some(function(y){return y&&y.__processing})})(),g=e.sessionKind==="structured"&&!!o&&o.inFlight===!0&&(!l||l.inFlight!==!0)&&d&&!!o.activeRequestId&&!!l&&!!l.activeRequestId&&l.activeRequestId===o.activeRequestId&&!h;return g&&(r.status=e.status||r.status,r.structuredState=Object.assign({},l||{},o,{inFlight:!0}),r.messages=e.messages),e.id===m.selectedId&&(e.permissionBlocked&&!t.permissionBlocked&&t.permissionBlocked!==!1&&(r.permissionBlocked=!0),e.pendingEscalation&&!t.pendingEscalation&&t.permissionBlocked!==!1&&(r.pendingEscalation=e.pendingEscalation)),r}function Fl(e,t,r){if(e&&e.messages&&e.messages.length>0)return e.messages;if(e&&e.sessionKind==="structured")return[];if(!r)return[];var n=typeof t=="string"?t:e&&e.output||"";return n?xK(n,e&&e.command):[]}function v8e(e){if(!e||!e.length)return null;if(m.selectedId){var t=e.find(function(a){return a.id===m.selectedId});return t?t.id:null}if(yu())return null;var r=e.find(function(a){return a.status==="running"});if(r)return r.id;var n=e.find(function(a){return!a.archived});return n?n.id:e[0].id}function mi(e){var t=e||{},r=$f.begin("list");return Bb({force:!t.reuseSnapshot}).then(function(n){if(r.isCurrent()){if(!Array.isArray(n)||n.some(function(h){return!h||typeof h.id!="string"}))throw new Error("Invalid session list response");var a=n.slice();m.sessions.forEach(function(h){r.changed(h.id)&&!a.some(function(g){return g.id===h.id})&&a.push(h)});var o=new Set(a.map(function(h){return h.id})),l=m.selectedId;Lt.retain(o),Object.keys(m.terminalStatesBySession).forEach(function(h){o.has(h)||delete m.terminalStatesBySession[h]}),m.sessions=a.map(function(h){var g=m.sessions.find(function(y){return y.id===h.id}),v=r.merge(h,g);return $f.record(v),g8e(g,v)}),d2(p2(m.sessions));var c=t.preserveNoSelection&&!m.selectedId?null:v8e(m.sessions);c!==void 0&&(m.selectedId=c),m.selectedId!==l&&(m.selectedId?Ed(m.selectedId):By()),rX(),pd(),xd(),Dy(),m.selectedId&&m.gitStatusSessionId!==m.selectedId&&wy(m.selectedId);var d=Promise.resolve();if(!t.skipSelectedOutputReload&&m.selectedId)d=Nu(m.selectedId);else if(m.selectedId){var p=m.sessions.find(function(h){return h.id===m.selectedId});cr(p)&&(yy({preserveStickState:!0}),L0(!0))}return d.then(function(){r.isCurrent()&&(m.crossSessionQueue.length>0&&YE(),Al(),w$())})}}).catch(function(n){if(r.isCurrent()){if(n&&n.status===401){a8e();return}var a=n&&n.message||"",o=a==="Failed to fetch"||a==="NetworkError when attempting to fetch resource."||a==="Load failed"||/aborted|aborterror|networkerror|failed to fetch/i.test(a);o||console.error("[wand] loadSessions failed:",n)}}).finally(function(){r.finish()})}var N9=null;function _0(){N9||(N9=setTimeout(function(){N9=null,hi()},200))}function hi(){ja("sessions:update"),Dy(),m.crossSessionQueue.length>0&&Al()}function Dy(){var e=m.sessions.find(function(r){return r.id===m.selectedId});e||(Af(!1),Ta()),x6e();var t=document.getElementById("output");!m.terminal&&t&&e&&!cr(e)&&Ns(),m.terminal&&t&&e&&!cr(e)&&!t.contains(m.terminal.element)&&(my(),Ns()),e||(m.terminalSessionId=null,m.terminalOutput=""),m.terminal&&e&&m.currentView==="terminal"&&Dl("view"),bX(),mI(Ma()),gI(),ZE(),ja("shell:chrome")}function Nu(e){var t=$f.begin("detail");m.chatRenderTimer&&(clearTimeout(m.chatRenderTimer),m.chatRenderTimer=null);var r=m.sessions.find(function(a){return a.id===e}),n="/api/sessions/"+e;return vX(r)&&(n+="?format=chat&blockBudget="+N1+"&byteBudget="+_$+"&output=omit"),Ou(n,{credentials:"same-origin"}).then(async function(a){if(!(!a||!t.isCurrent()||m.selectedId!==e))return a.status===404?{missing:!0}:Dt(a)}).then(function(a){if(!(!t.isCurrent()||m.selectedId!==e)&&a){if(a.missing){m.selectedId===e&&(qE(),m.selectedId=null,xd()),mi();return}if(a.id!==e)throw new Error("Session detail identity mismatch");if(a=t.merge(a,m.sessions.find(function(c){return c.id===e})),rr(a,"latest"),Dy(),m.terminal&&e===m.selectedId&&a.output!==void 0){var o=!!m.ws&&(m.ws.readyState===WebSocket.OPEN||m.ws.readyState===WebSocket.CONNECTING);o?qi("session-switch"):(ny(e,a.output,{mode:"append"}),qi("session-switch",{forceReplay:!0}))}var l=m.sessions.find(function(c){return c.id===e});m.currentMessages=es(l,Fl(l,a.output,!1)),oa(!1),a.sessionKind!=="structured"&&TE(l)}}).catch(function(a){t.isCurrent()&&console.error("[wand] loadOutput failed:",a)}).finally(function(){t.finish()})}var P0=new Map;function b8e(){var e=m.selectedId;if(!e||P0.has(e))return!1;var t=m.sessions.find(function(d){return d.id===e});if(!t)return!1;var r=typeof t.messageOffset=="number"?t.messageOffset:0,n=typeof t.leadingBlockOffset=="number"?t.leadingBlockOffset:0;if(r<=0&&n<=0)return!1;var a={},o=m.chatRenderEpoch||0,l=!1;P0.set(e,a),kU(e,o,"loading");var c=n>0?"/api/sessions/"+encodeURIComponent(e)+"/messages?turn="+r+"&blockOffset="+n+"&blockLimit="+N1+"&blockBudget="+N1:"/api/sessions/"+encodeURIComponent(e)+"/messages?before="+r+"&blockBudget="+N1;return c+="&byteBudget="+_$,Ou(c,{credentials:"same-origin"}).then(function(d){return Dt(d)}).then(function(d){if(P0.get(e)===a&&(t=m.sessions.find(function(g){return g.id===e}),!!t)){if(n>0&&d&&Array.isArray(d.blocks)&&t.messageOffset===r&&t.leadingBlockOffset===n&&d.turnIndex===r&&d.blockOffset<n&&d.blockOffset+d.blocks.length===n){var p=Array.isArray(t.messages)?t.messages.slice():[];if(!p.length)return;p[0]=Object.assign({},p[0],{content:d.blocks.concat(p[0].content)}),t.messages=p,t.leadingBlockOffset=d.blockOffset,t.leadingBlockTotal=d.blockTotal,l=!0,$f.record({id:e,messages:p,leadingBlockOffset:d.blockOffset,leadingBlockTotal:d.blockTotal}),e===m.selectedId&&(m.currentMessages=es(t,Fl(t,t.output,!1)),oa(!0));return}if(n===0&&d&&Array.isArray(d.messages)&&t.messageOffset===r&&Number.isSafeInteger(d.offset)&&d.offset>=0&&d.offset<r&&d.offset+d.messages.length===r&&Number.isSafeInteger(d.leadingBlockOffset)&&d.leadingBlockOffset>=0){var h=Array.isArray(t.messages)?t.messages:[];t.messages=d.messages.concat(h),t.messageOffset=d.offset,t.leadingBlockOffset=d.leadingBlockOffset,t.leadingBlockTotal=d.leadingBlockTotal,typeof d.total=="number"&&(t.messageTotal=d.total),l=!0,$f.record({id:e,messages:t.messages,messageOffset:t.messageOffset,messageTotal:t.messageTotal,leadingBlockOffset:t.leadingBlockOffset,leadingBlockTotal:t.leadingBlockTotal}),e===m.selectedId&&(m.currentMessages=es(t,Fl(t,t.output,!1)),oa(!0))}}}).catch(function(){}).finally(function(){if(P0.get(e)===a){P0.delete(e);var d=m.sessions.find(function(p){return p.id===e});(l||d&&(d.messageOffset||0)===r&&(d.leadingBlockOffset||0)===n)&&kU(e,o,l?"idle":"failed")}}),!0}function In(e,t){var r=m.sessions.find(function(g){return g.id===e});if(!r)return;Wr.getSnapshot().taskId&&!r.workspaceTaskId&&Ga.getRuntime()?.closeWorkspace(),nk.open(e);var n=m.selectedId;if(n&&n!==e){var a=document.getElementById("input-box");a&&Lt.edit(n,{preserve:a.value})}m.selectedId!==e&&(Gc.closeIfOpen(),my()),qE(),m.selectedId=e,xd(),t?.updateRoute!==!1&&kK(),m.toolContentCache={},m.messageQueue=[],m.pendingMessages=[],tk(r),rX(),pd(),yy(),m.currentMessages=[],m.chatRenderTimer&&(clearTimeout(m.chatRenderTimer),m.chatRenderTimer=null),_X();var o=document.querySelector(".structured-status-bar");o&&o.remove(),m._statusBarTimerId&&(clearInterval(m._statusBarTimerId),m._statusBarTimerId=null),m._statusBarStartTime=0;var l=document.querySelector(".input-composer");l&&l.classList.remove("in-flight");var c=r;m.preferredCommand=bd(),m.chatMode=yd("claude",c&&c.mode?c.mode:m.chatMode),m.terminalInteractive&&c&&c.status!=="running"&&Af(!1),hi(),tke(e,t);var d=MB(e);oa(!0),m.filePanelOpen&&uCe(c);let p=m.ws&&typeof m.ws.readyState=="number"&&vX(c)&&(m.ws.readyState===WebSocket.OPEN||m.ws.readyState===WebSocket.CONNECTING)?kxe(e):null;ck(e);var h=(p?p.then(function(g){if(!g&&m.selectedId===e&&d())return Nu(e)}):Nu(e)).then(function(){t?.focusInput!==!1&&d()&&Ml(!0)});return bG(e),wy(e,{force:!0}),h}function Ru(e){nk.clear(),e?.updateRoute!==!1&&kK(),m.selectedId&&(qE(),m.selectedId=null,m.currentTask=null,m.currentMessages=[],bG(null),xd(),yy(),pi(),hi())}function Bf(){ja("layout:drawer")}function vI(){var e=xo();if(!e){var t=m.sidebarPinned?!1:!m.sessionsDrawerOpen;m.sessionsDrawerOpen=t,t&&(m.sidebarCollapsed=!1,Vr("wand-sidebar-collapsed",!1)),Vr("wand-sidebar-open",m.sessionsDrawerOpen),$l(),tg();return}if(m.sessionsDrawerOpen=!m.sessionsDrawerOpen,Vr("wand-sidebar-open",m.sessionsDrawerOpen),m.sessionsDrawerOpen){m.filePanelOpen=!1;try{localStorage.setItem("wand-file-panel-open","false")}catch{}}$l()}function bI(){var e=xo();if(!e){if(m.sidebarPinned&&!m.sidebarCollapsed)return;m.sessionsDrawerOpen=!0,m.sidebarCollapsed=!1,Vr("wand-sidebar-collapsed",!1),Vr("wand-sidebar-open",!0),$l(),tg();return}if(!m.sessionsDrawerOpen){m.sessionsDrawerOpen=!0,Vr("wand-sidebar-open",!0),m.filePanelOpen=!1;try{localStorage.setItem("wand-file-panel-open","false")}catch{}$l()}}function eg(){var e=xo();if(!e){if(!m.sidebarPinned&&!m.sessionsDrawerOpen)return;m.sidebarPinned=!1,m.sessionsDrawerOpen=!1,Vr("wand-sidebar-pinned",!1),Vr("wand-sidebar-open",!1),$l(),tg();return}m.sessionsDrawerOpen&&(m.sessionsDrawerOpen=!1,Vr("wand-sidebar-open",!1),$l())}function y8e(){if(xo()){eg();return}m.sidebarPinned||m.sidebarCollapsed||!m.sessionsDrawerOpen||(m.sessionsDrawerOpen=!1,Vr("wand-sidebar-open",!1),$l(),tg())}function w8e(e){var t=e&&e.querySelector('button:not([disabled]):not(.hidden), select:not([disabled]), [tabindex]:not([tabindex="-1"])');if(t)try{t.focus({preventScroll:!0})}catch{t.focus()}}function DX(e,t=!1){var r=document.getElementById("composer-plus-popover"),n=document.getElementById("attach-btn");m.plusPopoverOpen=!!e,r&&(e&&r.classList.toggle("is-keyboard-open",!!t),r.classList.toggle("hidden",!e),r.setAttribute("aria-hidden",e?"false":"true")),n&&(n.classList.toggle("active",!!e),n.setAttribute("aria-expanded",e?"true":"false"),n.setAttribute("aria-label",e?"\u5173\u95ED\u66F4\u591A\u64CD\u4F5C":"\u66F4\u591A\u64CD\u4F5C"),n.setAttribute("title",e?"\u5173\u95ED":"\u66F4\u591A")),e&&t&&r&&requestAnimationFrame(function(){m.plusPopoverOpen&&r.isConnected&&w8e(r)})}function x8e(e=!1){DX(!m.plusPopoverOpen,!m.plusPopoverOpen&&!!e)}function fd(e=!1){if(m.plusPopoverOpen){var t=document.getElementById("attach-btn"),r=document.getElementById("composer-plus-popover"),n=!!e||!!(r&&r.contains(document.activeElement));if(n&&t)try{t.focus({preventScroll:!0})}catch{t.focus()}DX(!1,!1)}}function pi(){xo()&&m.sessionsDrawerOpen&&eg()}function tg(){var e=document.querySelector(".main-layout");if(e){var t=function(r){r.propertyName==="padding-left"&&(e.removeEventListener("transitionend",t),Mu(!0))};e.addEventListener("transitionend",t)}setTimeout(function(){Mu(!0)},350)}function dk(){var e=xo();m.sidebarPinned||(m.sidebarPinned=!0,Vr("wand-sidebar-pinned",!0)),m.sidebarCollapsed=!m.sidebarCollapsed,Vr("wand-sidebar-collapsed",m.sidebarCollapsed),m.sidebarCollapsed?m.sessionsDrawerOpen=!1:e?(m.sidebarPinned=!1,m.sessionsDrawerOpen=!0,Vr("wand-sidebar-pinned",!1)):m.sessionsDrawerOpen=!0,Vr("wand-sidebar-open",m.sessionsDrawerOpen),$l(),hi(),E8e(),tg()}function yI(){xo()||(m.sidebarPinned=!m.sidebarPinned,m.sessionsDrawerOpen=!0,Vr("wand-sidebar-pinned",m.sidebarPinned),Vr("wand-sidebar-open",!0),$l(),tg())}function E8e(){ja("layout:collapse-button")}function k8e(e){if(fi(["newSession"])){var t=window.__wandReactNewSession;if(t&&typeof t.open=="function")try{if(t.open(e?{initialCwd:e}:void 0))return}catch(n){console.warn("[wand] React new-session host unavailable",n)}try{var r=new URL(window.location.href).searchParams.get("reactUi")==="0";if(r){Ye("\u65B0\u5EFA\u4F1A\u8BDD\u754C\u9762\u5DF2\u88AB ?reactUi=0 \u7981\u7528\uFF1B\u79FB\u9664\u8BE5\u53C2\u6570\u5E76\u5237\u65B0\u540E\u5373\u53EF\u4F7F\u7528\u3002","error");return}if(window.localStorage.getItem("wand.reactUi.enabled")==="false"){window.localStorage.setItem("wand.reactUi.enabled","true"),Ye("\u6B63\u5728\u542F\u7528\u65B0\u5EFA\u4F1A\u8BDD\u754C\u9762\u2026","info"),window.setTimeout(function(){window.location.reload()},120);return}}catch{}Ye("\u65B0\u5EFA\u4F1A\u8BDD\u754C\u9762\u672A\u80FD\u542F\u52A8\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u540E\u91CD\u8BD5\u3002","error")}}function pk(e){var t=function(){k8e(e)};Pf(t)&&t()}function wI(e){lX(e,"merge")}function xI(e){lX(e,"cleanup")}function $U(){if(fi(["settings"])){var e=window.__wandReactSettings;if(e&&typeof e.open=="function"){var t=document.getElementById("settings-button");t&&t.focus({preventScroll:!0}),e.open();return}try{var r=new URL(window.location.href).searchParams.get("reactUi")==="0";if(r){Ye("\u8BBE\u7F6E\u754C\u9762\u5DF2\u88AB ?reactUi=0 \u7981\u7528\uFF1B\u79FB\u9664\u8BE5\u53C2\u6570\u5E76\u5237\u65B0\u540E\u5373\u53EF\u4F7F\u7528\u3002","error");return}if(window.localStorage.getItem("wand.reactUi.enabled")==="false"){window.localStorage.setItem("wand.reactUi.enabled","true"),Ye("\u6B63\u5728\u542F\u7528\u8BBE\u7F6E\u754C\u9762\u2026","info"),window.setTimeout(function(){window.location.reload()},120);return}}catch{}Ye("\u8BBE\u7F6E\u754C\u9762\u672A\u80FD\u542F\u52A8\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u540E\u91CD\u8BD5\u3002","error")}}function EI(){Pf($U)&&$U()}function AX(e,t,r){if(!e)return;function n(){if(r){r();return}if(t){var a=t.textContent;t.textContent="\u5DF2\u590D\u5236",setTimeout(function(){t.textContent=a},1500)}}if(_f&&typeof WandNative.copyToClipboard=="function")try{if(WandNative.copyToClipboard(e)==="ok"){n();return}}catch{}navigator.clipboard.writeText(e).then(n).catch(function(){var a=document.createElement("textarea");a.value=e,a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a),n()})}function C8e(){fetch("/api/auto-update",{credentials:"same-origin"}).then(function(e){return e.json()}).then(function(e){if(e.apk)return fetch("/api/android-apk-update?currentVersion="+encodeURIComponent(pG),{credentials:"same-origin"}).then(function(t){return t.json()}).then(function(t){if(!(!t.updateAvailable||!t.downloadUrl))try{WandNative.downloadUpdate(t.downloadUrl,t.fileName||"wand-update.apk",t.source||"local")}catch{}})}).catch(function(){})}function S8e(){y$&&fetch("/api/auto-update",{credentials:"same-origin"}).then(function(e){return e.json()}).then(function(e){if(e.dmg)return fetch("/api/macos-dmg-update?currentVersion="+encodeURIComponent(y$),{credentials:"same-origin"}).then(function(t){return t.json()}).then(function(t){if(!(!t.updateAvailable||!t.downloadUrl))try{WandNative.downloadUpdate(t.downloadUrl,t.fileName||"wand-update.dmg",t.source||"local")}catch{}})}).catch(function(){})}function jl(e,t){if(!e||typeof e!="object"||!m.terminal)return e;var r;try{r=K2e(t)}catch{}var n=r?.cols??m.terminal.cols,a=r?.rows??m.terminal.rows;return typeof n=="number"&&typeof a=="number"&&Number.isFinite(n)&&Number.isFinite(a)&&n>0&&a>0&&(e.cols=n,e.rows=a),e}async function Ay(){return m.terminal&&m.terminal.cols?Promise.resolve():(await Yc(),new Promise(function(e){var t=!1,r=function(){t||(t=!0,e())},n=setTimeout(r,2e3);try{Ns({prepare:!0})}catch{}requestAnimationFrame(function(){requestAnimationFrame(function(){m.terminal&&m.terminal.cols&&(clearTimeout(n),r())})})}))}function kI(){var e=bd(),t=U5(e),r=ts(),n=yd(e,m.config&&m.config.defaultMode?m.config.defaultMode:"default");return m.preferredCommand=e,m.chatMode=yd(e,m.chatMode),Ay().then(function(){return Ou("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(jl({kind:"pty",command:t,provider:e,cwd:r,mode:n,sessionSource:"interactive"},{kind:"pty",provider:e,command:t,cwd:r}))})}).then(function(a){return a.json()}).then(function(a){if(a.error){Ye(a.error,"error");return}var o=String(a.id);return Of(o,!0),mi({skipSelectedOutputReload:!0}).then(function(){In(o)})}).then(function(){Ml(!0)}).catch(function(){Ye("\u65E0\u6CD5\u542F\u52A8\u4F1A\u8BDD\u3002","error")})}function fk(e,t){var r=!!(t&&t.shell),n=r?"":t&&t.provider||bd(),a=(t&&t.model?String(t.model):"").trim(),o=r?"pty":t&&t.kind||m.config&&m.config.defaultSessionKind||"structured";if(o==="structured")return uk(t&&t.initialInput,e,t&&t.mode,!1,{workspaceId:t&&t.workspaceId,workspaceTaskId:t&&t.workspaceTaskId,provider:n,engine:t&&t.engine,model:a||void 0,systemPrompt:t&&t.systemPrompt,employeeId:t&&t.employeeId});var l=r?"default":yd(n,t&&t.mode||(m.config&&m.config.defaultMode?m.config.defaultMode:"default"));r||(m.preferredCommand=n,m.chatMode=yd(n,m.chatMode));var c=r?void 0:U5(n),d=r?{kind:"pty",shell:!0,cwd:e,mode:l,sessionSource:"interactive"}:{kind:"pty",command:c,provider:n,cwd:e,mode:l,model:a||void 0,initialInput:t&&t.initialInput,systemPrompt:t&&t.systemPrompt,sessionSource:"interactive"};return t&&t.workspaceId&&(d.workspaceId=t.workspaceId),t&&t.workspaceTaskId&&(d.workspaceTaskId=t.workspaceTaskId),Ay().then(function(){return Ou("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(jl(d,{kind:r?"shell":"pty",provider:r?void 0:n,command:c,cwd:e,workspaceTaskId:t?.workspaceTaskId}))})}).then(function(p){return p.json()}).then(function(p){if(p.error)throw new Error(String(p.error));if(!p.id)throw new Error("\u670D\u52A1\u7AEF\u672A\u8FD4\u56DE\u65B0\u4F1A\u8BDD ID\u3002");var h=String(p.id);return Of(h,!0),mi({skipSelectedOutputReload:!0}).then(function(){return In(h),h})}).then(function(p){return Ml(!0),p}).catch(function(p){throw Ye(p&&p.message?p.message:"\u65E0\u6CD5\u542F\u52A8\u4F1A\u8BDD\u3002","error"),p})}function F8e(e){if(OG(e)||yxe(e)||cCe(e))return;let t=Ma(),r=Za.read(m.selectedId);if(!cr(t)&&(r.ctrl||r.shift)&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&e.key.length===1&&!e.target?.readOnly){let w=HE(e.key,J1(m.selectedId,{ctrl:!1,shift:e.shiftKey}));if(w!==null){e.preventDefault(),r.ctrl||m.terminalInteractive?ia(w,r.ctrl?"ctrl_"+e.key.toLowerCase():"interactive_text").catch(function(){}):j$(e.target,w);return}}if(!cr(t)&&m.terminalInteractive&&(r.ctrl||r.shift)&&!e.metaKey&&!e.target?.readOnly){let w=AE(e);if(["up","down","left","right","home","end","pageup","pagedown","delete","tab"].includes(w)){e.preventDefault(),ia(RB(w,J1(m.selectedId,{ctrl:e.ctrlKey,shift:e.shiftKey,alt:e.altKey})),w).catch(function(){});return}}if(RG(e)){HG(e);return}if(e.key==="Enter"){if(m.promptOptimizeRequest&&m.promptOptimizeRequest.sessionId===m.selectedId){e.preventDefault();return}if(e.shiftKey){e.preventDefault();var n=document.getElementById("input-box");n&&j$(n,`
|
|
271
|
-
`);return}e.preventDefault();var a=!!(e.metaKey||e.ctrlKey);Nf(a?{interrupt:!0}:void 0);return}if(e.key==="Backspace"){if(m.terminalInteractive&&!document.documentElement.classList.contains("is-wand-embed-terminal")){e.preventDefault(),ia("\x7F","backspace").catch(function(){});return}setTimeout(function(){var w=document.getElementById("input-box");w&&If(w.value,!0)},0);return}if(e.key==="Escape"){if(e.preventDefault(),m.plusPopoverOpen||bp())return;var o=Ma();cr(o)?o&&o.structuredState&&o.structuredState.inFlight&&A$():ia(O0("escape"),"escape");return}if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="c"){var l=document.getElementById("input-box"),c=l&&l.selectionStart!==l.selectionEnd||ly();if(c)return;var d=Ma();if(cr(d)){e.preventDefault(),d&&d.structuredState&&d.structuredState.inFlight&&A$();return}e.preventDefault(),ia(O0("ctrl_c"),"ctrl_c");return}if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="d"){var p=document.getElementById("input-box"),h=p&&p.selectionStart!==p.selectionEnd||ly();if(h)return;var g=Ma();if(cr(g)){e.preventDefault();return}e.preventDefault(),ia(O0("ctrl_d"),"ctrl_d");return}if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="l"){e.preventDefault();var v=Ma();if(cr(v))return;ia(O0("ctrl_l"),"ctrl_l");return}if(!((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="a")&&!((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="v")){if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()==="x"){var n=document.getElementById("input-box"),y=n&&n.selectionStart!==n.selectionEnd;if(y)return;e.preventDefault(),ia("","ctrl_x");return}e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&setTimeout(function(){var w=document.getElementById("input-box");w&&If(w.value)},0)}}var D8e=10*1024*1024;function A8e(e){return e<1024?e+" B":e<1024*1024?(e/1024).toFixed(1)+" KB":(e/(1024*1024)).toFixed(1)+" MB"}function $8e(e){return/^image\/(png|jpe?g|gif|webp|bmp|svg\+xml)/.test(e)}function $X(e){var t=e?m.sessions.find(function(r){return r.id===e}):Ma();return m.currentView==="terminal"&&t&&!cr(t)&&t.status==="running"?t:null}function B8e(e){var t=e&&e.target;if(!t||typeof t.closest!="function")return null;var r=t.closest("[data-pty-session-id]");return r&&r.dataset.ptySessionId?r.dataset.ptySessionId:t.closest("#output, .xterm")||m.terminalInteractive&&t.closest("#input-box")?m.selectedId:null}function I8e(e,t){var r=typeof e.name=="string"?e.name.trim():"",n=sy(e.type),a=n?"clipboard-image-"+Date.now()+"-"+((t||0)+1)+jEe(e.type):"attachment-"+Date.now()+"-"+((t||0)+1),o=/\.(?:png|jpe?g|gif|webp|bmp|svg)$/i.test(r);return{file:e,name:n&&!o?a:r||a,size:e.size,previewUrl:null}}function BX(e){var t=[],r=Array.from(e||[]).slice(0,5);(e&&e.length||0)>5&&Ye("\u4E00\u6B21\u6700\u591A\u7C98\u8D34\u6216\u4E0A\u4F20 5 \u4E2A\u9644\u4EF6\u3002","warning");for(var n=0;n<r.length;n++){var a=r[n];if(a){if(a.size>D8e){Ye("\u6587\u4EF6\u8FC7\u5927\uFF08\u4E0A\u9650 10 MB\uFF09: "+(a.name||"\u526A\u8D34\u677F\u56FE\u7247"),"error");continue}t.push(I8e(a,n))}}return t}function CI(e,t){if(!t){var r=m.sessions.find(function(n){return n.id===e});t=r&&(r.provider||iu(r.command||""))}return String(t||"").toLowerCase()==="codex"?!0:N0(e)?l6e(e):!!(m.terminal&&m.terminal.modes&&m.terminal.modes.bracketedPasteMode)}var O9=Promise.resolve(),BU=0;function M8e(e,t){var r=O9;return O9=r.then(function(){return BU?vE():void 0}).then(function(){return e.reduce(function(n,a,o){var l=n.then(function(){return BU+=1,ia(a.data,a.shortcutKey,"terminal",t)});return o<e.length-1?l.then(vE):l},Promise.resolve())}),O9}function T8e(e,t,r,n){var a=EG(t,{bracketedPaste:r,provider:n});return a.length?M8e(a,e):Promise.resolve()}function mk(e,t){var r=$X(t);if(!r)return!1;var n=BX(e);if(!n.length)return!0;var a=r.id,o=r.provider||iu(r.command||""),l=n.filter(function(d){return sy(d.file&&d.file.type)}).length,c=CI(a,o);return Ye(l===n.length?"\u6B63\u5728\u7C98\u8D34\u56FE\u7247\u2026":"\u6B63\u5728\u4E0A\u4F20\u9644\u4EF6\u2026","info"),IX(a,n).then(function(d){return T8e(a,d,c,o).then(function(){var p=l===n.length?n.length+" \u5F20\u56FE\u7247":n.length+" \u4E2A\u9644\u4EF6",h=o==="codex"?"Codex":"CLI";Ye("\u5DF2\u5C06 "+p+"\u7C98\u8D34\u5230 "+h+" \u8F93\u5165\u533A\u3002","info")})}).catch(function(d){Ye("\u9644\u4EF6\u7C98\u8D34\u5931\u8D25: "+(d&&d.message||d),"error")}),!0}function T$(e){var t=Array.from(e||[]);if(t.length&&!(m.terminalInteractive&&mk(t)))for(var r=0;r<t.length;r++)j8e(t[r])}function j8e(e){if(e&&m.selectedId&&!(m.terminalInteractive&&mk([e]))){var t=BX([e]);if(t.length){var r=t[0];$8e(e.type)&&(r.previewUrl=URL.createObjectURL(e)),Lt.edit(m.selectedId,{addAttachment:r}),By()}}}function _8e(e){Lt.edit(m.selectedId,{removeAttachment:e}),By()}function $y(e){var t=e===void 0?m.selectedId:e;return Lt.read(t).attachments}function By(){var e=$y(m.selectedId);QCe({resolve:function(){return e.map(function(t,r){return{index:r,name:t.name,sizeLabel:A8e(t.size),size:t.size,previewUrl:t.previewUrl||null}})},onRemove:function(t){_8e(t)}}),Ta()}function IX(e,t){var r=t||$y(e);if(!r.length)return Promise.resolve([]);var n=new FormData;return r.forEach(function(a){n.append("files",a.file,a.name)}),fetch("/api/sessions/"+encodeURIComponent(e)+"/upload",{method:"POST",body:n,credentials:"same-origin"}).then(function(a){return a.ok?a.json():a.json().then(function(o){throw new Error(o.error||"\u4E0A\u4F20\u5931\u8D25")})}).then(function(a){return a.files||[]})}function IU(e){if(!e||!e.length)return"";var t=e.map(function(r){return r.savedPath});return`[\u9644\u4EF6\u5DF2\u4E0A\u4F20\uFF0C\u8BF7\u67E5\u770B\u4EE5\u4E0B\u6587\u4EF6:
|
|
272
|
-
`+t.join(`
|
|
273
|
-
`)+`]
|
|
274
|
-
|
|
275
|
-
`}function MU(e,t){if(!e||cr(Ma())||document.documentElement.classList.contains("is-wand-embed-terminal"))return!1;var r=e.value||"";if(!r)return!1;let n=Za.read(m.selectedId),a=t?.data??r,o=wxe(a,t,n);if(!m.terminalInteractive){if(!n.ctrl||o===null||!m.selectedId)return!1;let l=Math.max(0,e.selectionStart-a.length);return e.value=Lt.read(m.selectedId).text,e.setSelectionRange(l,l),fa(e),ia(o,"ctrl_"+a.toLowerCase()).catch(function(){}),!0}return ia(r===a&&o!==null?o:r,n.ctrl&&o!==null&&r===a?"ctrl_"+a.toLowerCase():"interactive_text").catch(function(){}),e.value="",fa(e),If("",!0),!0}function MX(e){var t=e&&e.clipboardData;if(!t)return[];var r=[],n=t.items;if(n){for(var a=0;a<n.length;a++)if(sy(n[a].type)){var o=n[a].getAsFile();o&&r.push(o)}}if(!r.length&&t.files)for(var l=0;l<t.files.length;l++)sy(t.files[l].type)&&r.push(t.files[l]);return r}function P8e(e){var t=B8e(e);if(!t||!$X(t))return!1;var r=MX(e);return r.length?(e.preventDefault(),mk(r,t)):!1}function N8e(e){var t=MX(e);if(t.length){if(e.preventDefault(),m.terminalInteractive&&mk(t))return;T$(t);return}var r=e.clipboardData&&e.clipboardData.getData("text");if(r){if(e.preventDefault(),m.terminalInteractive){var n=Ma(),a=n&&(n.provider||iu(n.command||""));ia(wG(r,CI(m.selectedId,a)),"paste").catch(function(){});return}var o=document.getElementById("input-box");o&&j$(o,r)}}function TX(e){return Lt.read(e).text}function PE(e,t,r,n){if(e&&(Lt.edit(e,{text:String(t||""),persist:n}),!r&&e===m.selectedId)){var a=document.getElementById("input-box");a&&(a.value=t,fa(a))}}function Of(e,t){if(e&&(Lt.edit(e,{clear:!0}),!t&&e===m.selectedId)){var r=document.getElementById("input-box");r&&(r.value="",fa(r),Mf(r))}}function If(e,t){PE(m.selectedId,e,t)}function j$(e,t){if(!e)return"";if(e.readOnly||m.promptOptimizeRequest&&m.promptOptimizeRequest.sessionId===m.selectedId)return e.value;var r=e.selectionStart===null?e.value.length:e.selectionStart,n=e.selectionEnd===null?r:e.selectionEnd;if(typeof e.setRangeText=="function")e.setRangeText(t,r,n,"end");else{var a=e.value;e.value=a.slice(0,r)+t+a.slice(n);var o=r+t.length;e.setSelectionRange(o,o)}return If(e.value,!0),fa(e),Mf(e),e.value}function Ed(e){if(!(!e||e!==m.selectedId)){var t=document.getElementById("input-box");if(t){var r=TX(e);t.value=r,fa(t);try{t.setSelectionRange(r.length,r.length)}catch{}}By()}}function hk(e,t){var r=t===void 0?m.selectedId:t;return ws(m.sessions.find(n=>n.id===r))||z0.get(r)?.pending?!1:!!String(e||"").trim()||$y(r).length>0}function O8e(){if(!m.promptOptimizeRequest){var e=document.getElementById("input-box"),t=document.getElementById("prompt-optimize-btn");if(e){var r=(e.value||"").trim(),n=m.selectedId;if(!r){typeof Ye=="function"&&Ye("\u8BF7\u5148\u8F93\u5165\u8981\u4F18\u5316\u7684\u5185\u5BB9\u3002","info"),e.focus();return}n&&Lt.edit(n,{text:e.value});var a={sessionId:n,revision:Lt.read(n).revision},o=document.activeElement===t,l=document.activeElement===e||o;m.promptOptimizeRequest=a,Ta();var c={text:r};n&&(c.sessionId=n),fetch("/api/optimize-prompt",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)}).then(function(d){return d.text().then(function(p){var h={};if(p)try{h=JSON.parse(p)}catch{}return{ok:d.ok,status:d.status,data:h}})}).then(function(d){if(!d.ok)throw new Error(d.data&&d.data.error||"\u63D0\u793A\u8BCD\u4F18\u5316\u5931\u8D25\uFF08HTTP "+d.status+"\uFF09\u3002");var p=d.data&&d.data.optimized||"";if(!p)throw new Error("Claude \u8FD4\u56DE\u4E3A\u7A7A\u3002");if(n&&!Lt.edit(n,{text:p,expectedRevision:a.revision})){Ye("\u539F\u8349\u7A3F\u5DF2\u4FEE\u6539\uFF0C\u4FDD\u7559\u6700\u65B0\u5185\u5BB9\u3002","info");return}if(n&&m.selectedId!==n){typeof Ye=="function"&&Ye("\u63D0\u793A\u8BCD\u5DF2\u5199\u56DE\u539F\u4F1A\u8BDD\u8349\u7A3F\u3002","info");return}var h=document.getElementById("input-box");h&&R8e(h,p,n)}).catch(function(d){typeof Ye=="function"&&Ye(d&&d.message||"\u63D0\u793A\u8BCD\u4F18\u5316\u5931\u8D25\u3002","error");var p=document.getElementById("prompt-optimize-btn");p&&m.selectedId===n&&(p.classList.add("is-error"),setTimeout(function(){p.isConnected&&p.classList.remove("is-error")},800))}).finally(function(){if(m.promptOptimizeRequest===a&&(m.promptOptimizeRequest=null),Ta(),l&&m.selectedId===n){var d=document.getElementById("input-box");if(d)try{d.focus({preventScroll:!0})}catch{d.focus()}}})}}}function R8e(e,t,r){if(e){var n=r||m.selectedId,a=String(t||"");if(PE(n,a,!0),!(n&&m.selectedId!==n)){e.value=a,fa(e);try{e.setSelectionRange(a.length,a.length)}catch{}}}}function Mf(e){var t=document.querySelector(".input-composer");if(t){var r=e||document.getElementById("input-box"),n=!!(r&&String(r.value||"").trim());t.classList.toggle("has-text",n),Ta(!0)}}function _u(e){return String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}m._statusBarTimerId=null;m._statusBarStartTime=0;var TU;function jX(e,t){TU?.(),TU=e&&t?Xv(t):void 0}function _X(){jX(!1);var e=document.getElementById("todo-progress"),t=document.getElementById("todo-progress-body");e&&(e.classList.remove("expanded"),e.classList.add("hidden")),t&&(t.classList.remove("expanded"),t.classList.add("hidden")),document.getElementById("todo-progress-toggle")?.setAttribute("aria-expanded","false")}function PX(e,t){var r=document.querySelector("[data-composer-running-host]"),n=document.querySelector(".structured-status-bar"),a=document.querySelector(".input-composer");if(n&&r&&n.parentElement!==r&&r.appendChild(n),!t||!cr(t)){n&&n.remove(),a&&a.classList.remove("in-flight"),clearInterval(m._statusBarTimerId),m._statusBarTimerId=null;return}var o=t.structuredState&&t.structuredState.inFlight,l=t.structuredState&&t.structuredState.phase==="background"?"\u540E\u53F0\u4EFB\u52A1\u4E2D":"\u56DE\u590D\u4E2D";if(o){var c=Jx(t);if(m._statusBarStartTime=c??0,a&&a.classList.add("in-flight"),!n&&r){var d=document.createElement("div");d.className="structured-status-bar",d.innerHTML='<span class="status-bar-dot"></span><span class="status-bar-label">'+l+'</span><span class="status-bar-timer">0.0s</span>',r.appendChild(d),n=d}else if(n&&n.classList.contains("completed")){n.classList.remove("completed"),n.style.animation="none",n.querySelector(".status-bar-label").textContent=l;var p=n.querySelector(".status-bar-dot");p&&(p.style.display="")}var h=n&&n.querySelector(".status-bar-label");h&&(h.textContent=l);var g=n&&n.querySelector(".status-bar-timer");g&&(g.hidden=c===null,c!==null&&(g.textContent=(Math.max(0,Date.now()-c)/1e3).toFixed(1)+"s")),c===null&&(clearInterval(m._statusBarTimerId),m._statusBarTimerId=null),!m._statusBarTimerId&&c!==null&&(m._statusBarTimerId=setInterval(function(){var F=document.querySelector(".structured-status-bar:not(.completed)");if(!F){clearInterval(m._statusBarTimerId),m._statusBarTimerId=null;return}var C=(Math.max(0,Date.now()-m._statusBarStartTime)/1e3).toFixed(1),D=F.querySelector(".status-bar-timer");D&&(D.textContent=C+"s")},100))}else if(clearInterval(m._statusBarTimerId),m._statusBarTimerId=null,a&&a.classList.remove("in-flight"),n&&!n.classList.contains("completed")){var v=m._statusBarStartTime?((Date.now()-m._statusBarStartTime)/1e3).toFixed(1):"0.0";n.classList.add("completed"),n.querySelector(".status-bar-label").textContent="\u5B8C\u6210";var y=new Date,w=function(C){return C<10?"0"+C:String(C)},x=w(y.getHours())+":"+w(y.getMinutes())+":"+w(y.getSeconds()),k=n.querySelector(".status-bar-timer");k&&(k.hidden=!1,k.textContent=x,k.title="\u8017\u65F6 "+v+"s");var p=n.querySelector(".status-bar-dot");p&&(p.style.display="none"),m._statusBarStartTime=0,setTimeout(function(){n.classList.contains("completed")&&n.parentNode&&n.remove()},3e3)}}function L8e(e,t,r){var n=String(e||""),a=Math.max(n.lastIndexOf("/"),n.lastIndexOf("\\")),o=a>=0?n.slice(0,a+1):"",l=a>=0?n.slice(a+1):n;return'<span class="'+t+' tail-marquee-path" title="'+_u(n)+'"'+(r||"")+'><span class="tail-marquee-path-inner"><span class="tail-marquee-prefix">'+_u(o)+'</span><span class="tail-marquee-leaf">'+_u(l)+"</span></span></span>"}var z8e=/\.(png|jpe?g|gif|webp|svg|avif|bmp|ico|heic|heif)$/i;function H8e(e){if(typeof e!="string")return!1;var t=e.trim().split(/[?#]/)[0];return z8e.test(t)}function q8e(e){if(e){var t=function(){try{var r=e.firstElementChild&&e.firstElementChild.classList&&e.firstElementChild.classList.contains("tail-marquee-path-inner")?e.firstElementChild:null;if(r){var n=Math.max(0,r.scrollWidth-e.clientWidth);e.classList.toggle("is-overflowing",n>1),e.style.setProperty("--tail-marquee-shift",n+"px");var a=Math.max(4.8,n/18);e.style.setProperty("--tail-marquee-duration",Math.max(6.8,a/.68)+"s");return}e.scrollWidth>e.clientWidth&&(e.scrollLeft=e.scrollWidth)}catch{}};t(),typeof requestAnimationFrame=="function"&&requestAnimationFrame(t)}}function NX(e){var t=e||document;!t||typeof t.querySelectorAll!="function"||t.querySelectorAll(".tail-marquee-path").forEach(function(r){q8e(r)})}var R0=B(Ee(),1),D1=new Map,q6=new Map,Q1=null,A1=null,ld=null;function W8e(){return Q1?Promise.resolve(Q1):(A1||(A1=globalThis.__wandImportBrowserModule("a1195decf69de8a4").then(e=>(Q1=e,A1=null,e),e=>{throw A1=null,e})),A1)}var Z1=null,$1=null;function V8e(){return Z1?Promise.resolve(Z1):($1||($1=globalThis.__wandImportBrowserModule("1cdc7dc11ebbb0be").then(e=>(Z1=e,$1=null,e),e=>{throw $1=null,e})),$1)}var U8e={subscribe:Lt.subscribe.bind(Lt),revision:()=>Lt.read(m.selectedId).revision,text:()=>Lt.read(m.selectedId).text,isComposing:()=>m.composerComposing};function OX(){for(let[n,a]of q6)n.isConnected||(a.unmount(),q6.delete(n));let e=document.querySelector("[data-composer-avatar-host]"),t=m.sessions.find(n=>n.id===m.selectedId),r=t?{...t,ptyRunning:e0(t).ptyRunning,turnStartedAt:t.ptyTurnStartedAt,lastActivityAt:t.ptyLastActivityAt}:void 0;if(e){let n=q6.get(e)??(0,WU.createRoot)(e);q6.set(e,n),(0,VU.flushSync)(()=>n.render((0,R0.jsxs)(R0.Fragment,{children:[t?.employeeId?(0,R0.jsx)(a7,{fileActivity:s7(r,t.messages),thinking:Ap(r)==="executing",employee:{id:t.employeeId,name:t.employeeName||"\u5458\u5DE5",avatar:t.employeeAvatar}}):null,(0,R0.jsx)(n7,{employeeName:t?.employeeId?t.employeeName||"\u5458\u5DE5":void 0,usage:r7(t?.messages??[]),activity:r,legacyStatus:t?.sessionKind==="structured"})]}))),PX(null,t)}}function NE(e){if(!Z1){ld=e,V8e().then(()=>{let p=ld;ld=null,p&&NE(p)},()=>{ld=null});return}Z1.mountComposerSurfaces(),OX();let t=m.sessions.find(p=>p.id===m.selectedId);Ca("wand-sender-owned-input","[data-composer-sender] .ant-sender-input { width:100%; }");for(let[p,h]of D1)p.isConnected||(h.root.unmount(),D1.delete(p));let r=document.querySelector("[data-composer-sender]");if(!r)return;let n=t?.sessionKind==="structured",a=D1.get(r);if(!n){if(a){let p=document.activeElement===a.input,h=r;h.moveBefore?h.moveBefore(a.input,null):(r.appendChild(a.input),p&&a.input.focus({preventScroll:!0})),a.root.unmount(),a.chrome.remove(),D1.delete(r),a.input.className="input-textarea"}return}if(a)return;if(!Q1){ld=e,W8e().then(()=>{let p=ld;ld=null,p&&NE(p)},()=>{ld=null});return}let o=r.querySelector("#input-box");if(!o)return;let l=document.createElement("div");r.appendChild(l);let c=(0,WU.createRoot)(l);D1.set(r,{root:c,chrome:l,input:o});let{ComposerSender:d}=Q1;(0,VU.flushSync)(()=>c.render((0,R0.jsx)(La,{children:(0,R0.jsx)(d,{input:o,resize:e,projection:U8e})})))}function K8e(e,t){let r=t.trim();if(!r)return e;let n=e.replace(/\\/g,"/").replace(/\/+$/,"");return n?`${n}/${r}`:`/${r}`}function _l(e){let t=e.replace(/\\/g,"/").replace(/\/+$/,"");if(!t||t==="/")return"/";let r=t.lastIndexOf("/");return r<=0?"/":t.slice(0,r)}function G8e(e){let t=e.replace(/\\/g,"/").replace(/\/+$/,""),r=t.lastIndexOf("/");return r<0?t:t.slice(r+1)}function SI(e,t){let r=t.replace(/\\/g,"/").replace(/\/+$/,""),n=e.replace(/\\/g,"/").replace(/\/+$/,"");return r?n===r||n.startsWith(`${r}/`):!1}function FI(e,t,r){return{message:Ge(t.error,`${r} (HTTP ${e.status})`),status:e.status}}function RX(e){let t=Ge(e.path),r=Ge(e.name);if(!t||!r)return null;let n=e.type==="dir"?"dir":"file",a={path:t,name:r,type:n};typeof e.size=="number"&&Number.isFinite(e.size)&&(a.size=e.size),typeof e.mtime=="string"&&e.mtime&&(a.mtime=e.mtime);let o=ca(e.gitStatus)?e.gitStatus:void 0;if(o){let l={},c=Ge(o.staged),d=Ge(o.unstaged);(c==="added"||c==="modified"||c==="deleted"||c==="renamed")&&(l.staged=c),(d==="modified"||d==="deleted")&&(l.unstaged=d),o.untracked&&(l.untracked=!0),a.gitStatus=l}return a}async function gk(e,t,r,n,a){let o=await e(t,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}),l=await gs(o);return!o.ok||typeof l.error=="string"?{ok:!1,failure:FI(o,l,n)}:{ok:!0,affectedPath:a}}var X8e=class{constructor(e=(t,r)=>globalThis.fetch(t,r)){oe(this,"fetchImpl",e)}async list(e,t){let r=await this.fetchImpl(`/api/directory?q=${encodeURIComponent(e)}&gitStatus=true`,{credentials:"same-origin",signal:t}),n=await gs(r);if(!r.ok||typeof n.error=="string")return{ok:!1,failure:FI(r,n,"\u8BFB\u53D6\u76EE\u5F55\u5931\u8D25")};let a=Array.isArray(n.items)?n.items:[],o=[];for(let l of a){let c=ca(l)?RX(l):null;c&&o.push(c)}return{ok:!0,entries:o,truncated:!!n.truncated,total:Da(n.total,o.length)}}async search(e,t,r,n=!1){let a=new URLSearchParams({q:e,cwd:t,depth:"5",limit:"80"});n&&a.set("includeGenerated","true");let o=await this.fetchImpl(`/api/file-search?${a.toString()}`,{credentials:"same-origin",signal:r}),l=await gs(o);if(!o.ok||typeof l.error=="string")return{ok:!1,failure:FI(o,l,"\u641C\u7D22\u5931\u8D25")};let c=Array.isArray(l.results)?l.results:[],d=[];for(let p of c){let h=ca(p)?RX(p):null;h&&d.push(h)}return{ok:!0,results:d,truncated:!!l.truncated}}createFile(e){return gk(this.fetchImpl,"/api/file-create",{path:e},"\u521B\u5EFA\u6587\u4EF6\u5931\u8D25",e)}createDir(e){return gk(this.fetchImpl,"/api/dir-create",{path:e},"\u521B\u5EFA\u6587\u4EF6\u5939\u5931\u8D25",e)}rename(e,t){return gk(this.fetchImpl,"/api/file-rename",{from:e,to:t},"\u91CD\u547D\u540D\u5931\u8D25",t)}delete(e){return gk(this.fetchImpl,"/api/file-delete",{path:e},"\u5220\u9664\u5931\u8D25",e)}},Y8e=new X8e,Q8e={openFile(){},notify(e,t){gn.toast(e,{tone:t})},async copyText(e){try{return await Pp(e),!0}catch{return!1}},async confirmDelete(e,t){let r=await gn.dialog({title:"\u786E\u8BA4\u5220\u9664",description:`\u786E\u5B9A\u8981\u5220\u9664${t?"\u6587\u4EF6\u5939":"\u6587\u4EF6"}\u300C${e}\u300D\u5417\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002`,tone:"warning",actions:[{label:"\u53D6\u6D88",value:!1,kind:"secondary",autoFocus:!0},{label:"\u5220\u9664",value:!0,kind:"danger"}],dismissable:!0});return r.dismissed===!1&&r.action===!0},async promptForName(e,t){let r=await gn.dialog({title:e,input:{value:t,label:"\u540D\u79F0"},actions:[{label:"\u53D6\u6D88",value:"",kind:"secondary"},{label:"\u786E\u8BA4",value:"confirm",kind:"primary",autoFocus:!0}],dismissable:!0});return r.dismissed===!0||r.action!=="confirm"?null:(r.inputValue??"").trim()||null}};function Z8e(e){let t=new Set,r={revision:0,root:"",activeDir:"",expanded:new Map,searchQuery:"",searchResults:null,searchFilter:"all",includeGenerated:!1,searchTruncated:!1,searchDurationMs:null,searching:!1,revealPath:null,busy:!1},n=e.runtime??Q8e,a=new Map,o=null;function l(D){r={...r,...D,revision:r.revision+1};for(let S of t)S()}function c(D){l({expanded:new Map(D)})}function d(D,S){return D?.message||S}async function p(D){a.get(D)?.abort();let S=new AbortController;a.set(D,S);let A=new Map(r.expanded);A.set(D,{entries:[],status:"loading"}),c(A);try{let I=await e.repository.list(D,S.signal);if(S.signal.aborted)return;let j=new Map(r.expanded);I.ok&&I.entries?j.set(D,{entries:I.entries,status:"loaded"}):j.set(D,{entries:[],status:"error",error:d(I.failure,"\u8BFB\u53D6\u76EE\u5F55\u5931\u8D25")}),c(j)}catch(I){if(S.signal.aborted||zc(I))return;let j=new Map(r.expanded);j.set(D,{entries:[],status:"error",error:qa(I,"\u8BFB\u53D6\u76EE\u5F55\u5931\u8D25").message}),c(j)}finally{a.delete(D)}}function h(D){D&&(r.root!==D&&(o?.abort(),l({root:D,activeDir:D,searchQuery:"",searchResults:null,searching:!1,searchError:"",searchDurationMs:null,searchTruncated:!1,revealPath:null})),r.expanded.has(D)||p(D))}async function g(D){if(o?.abort(),!D.trim()||!r.root){l({searchQuery:D,searchResults:null,searchDurationMs:null,searchTruncated:!1,searching:!1,searchError:""});return}let S=new AbortController;if(o=S,l({searchQuery:D,searching:!0,searchResults:null,searchTruncated:!1,searchError:"",revealPath:null}),await new Promise(I=>{let j=setTimeout(I,300);S.signal.addEventListener("abort",()=>{clearTimeout(j),I()},{once:!0})}),S.signal.aborted)return;let A=Date.now();try{let I=await e.repository.search(D.trim(),r.root,S.signal,r.includeGenerated);if(S.signal.aborted)return;l({searching:!1,searchResults:I.ok&&I.results?I.results:[],searchDurationMs:I.ok?Date.now()-A:null,searchTruncated:!!(I.ok&&I.truncated),searchError:I.ok?"":d(I.failure,"\u641C\u7D22\u6587\u4EF6\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002")})}catch(I){if(S.signal.aborted||zc(I))return;l({searching:!1,searchResults:[],searchDurationMs:null,searchError:qa(I,"\u641C\u7D22\u6587\u4EF6\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002").message})}}function v(){o?.abort(),o=null,l({searchQuery:"",searchResults:null,searchDurationMs:null,searchTruncated:!1,searching:!1,searchError:""})}async function y(D){let S=r.root;if(!S||!SI(D,S))return!1;v();let A=[],I=_l(D);for(;I!==S&&SI(I,S);){A.unshift(I);let N=_l(I);if(N===I)break;I=N}for(let N of A)r.expanded.has(N)||await p(N);let j=_l(D),$=D===S,P=$||w(j,D);return P&&!$&&!r.expanded.has(D)&&await p(D),l({activeDir:P?D:j,revealPath:D}),!0}function w(D,S){return r.expanded.get(D)?.entries.some(A=>A.path===S&&A.type==="dir")??!1}function x(D,S){let A=S.trim();return A?`${D.replace(/\/+$/,"")}/${A}`:D}function k(D){let S=new Set;for(let A of D){let I=_l(A);I&&r.expanded.has(I)&&S.add(I),r.root&&r.expanded.has(r.root)&&S.add(r.root),r.expanded.has(A)&&S.add(A)}for(let A of S)p(A)}function F(D){k([D])}async function C(D){switch(D.type){case"setRoot":return h(D.root),!0;case"navigate":return D.dir?(n.openDirectory?.(D.dir),!0):!1;case"toggle":{let S=new Map(r.expanded);return S.get(D.dir)?(S.delete(D.dir),c(S),!0):(await p(D.dir),!0)}case"expand":return await p(D.dir),!0;case"refresh":{let S=D.dir??r.root;return S?(await p(S),!0):!1}case"reveal":return y(D.path);case"reveal.done":return r.revealPath===null||l({revealPath:null}),!0;case"search.start":return await g(D.query),!0;case"search.filter":return r.searchFilter===D.filter||l({searchFilter:D.filter}),!0;case"search.scope":return r.includeGenerated===D.includeGenerated||(l({includeGenerated:D.includeGenerated}),await g(r.searchQuery)),!0;case"search.clear":return v(),!0;case"create.file":{let S=x(D.dir,D.name);l({busy:!0});try{let A=await e.repository.createFile(S);return A.ok?(n.notify("\u5DF2\u521B\u5EFA\u6587\u4EF6","success"),F(D.dir),n.openFile(S)):n.notify(d(A.failure,"\u521B\u5EFA\u6587\u4EF6\u5931\u8D25"),"error"),A.ok}finally{l({busy:!1})}}case"create.dir":{let S=x(D.dir,D.name);l({busy:!0});try{let A=await e.repository.createDir(S);return A.ok?(n.notify("\u5DF2\u521B\u5EFA\u6587\u4EF6\u5939","success"),F(D.dir)):n.notify(d(A.failure,"\u521B\u5EFA\u6587\u4EF6\u5939\u5931\u8D25"),"error"),A.ok}finally{l({busy:!1})}}case"rename":{l({busy:!0});try{let S=await e.repository.rename(D.from,D.to);return S.ok?(n.notify("\u5DF2\u91CD\u547D\u540D","success"),F(_l(D.from))):n.notify(d(S.failure,"\u91CD\u547D\u540D\u5931\u8D25"),"error"),S.ok}finally{l({busy:!1})}}case"move":{l({busy:!0});try{let S=await e.repository.rename(D.from,D.to);return S.ok?(n.notify("\u5DF2\u79FB\u52A8","success"),k([D.from,D.to])):n.notify(d(S.failure,"\u79FB\u52A8\u5931\u8D25"),"error"),S.ok}finally{l({busy:!1})}}case"delete":{let S=r.expanded.has(D.path)||r.activeDir===D.path,A=(r.expanded.get(_l(D.path))?.entries??[]).find(I=>I.path===D.path)?.type==="dir"||S;if(!await n.confirmDelete(D.path,A))return!1;l({busy:!0});try{let I=await e.repository.delete(D.path);return I.ok?(n.notify("\u5DF2\u5220\u9664","success"),F(_l(D.path))):n.notify(d(I.failure,"\u5220\u9664\u5931\u8D25"),"error"),I.ok}finally{l({busy:!1})}}}}return{controller:{setRoot(D){h(D)},execute:C},store:{subscribe(D){return t.add(D),()=>t.delete(D)},getSnapshot(){return r}},configureRuntime(D){let S=n;return n=D,()=>{n===D&&(n=S)}}}}var LX=Z8e({repository:Y8e}),DI=LX.controller,AI=LX.store;var $I=B(Ee(),1);function BI({id:e,icon:t,label:r,onClick:n}){return(0,$I.jsxs)(Te,{kind:"ghost",id:e,type:"button",onClick:n,children:[(0,$I.jsx)(Fe,{name:t,size:14,strokeWidth:1.8,className:"plus-popover-icon"}),(0,$I.jsx)("span",{className:"plus-popover-label",children:r})]})}function II(e){return e==="shell"?"":e===Xm?"pi":e}function MI(e){return e===Xm?"sdk":void 0}var Ui=B(_(),1),rs=B(Ee(),1);function TI({value:e,defaultValue:t,options:r,placeholder:n="\u8BF7\u9009\u62E9",displayValue:a,displayTitle:o,ariaLabel:l,id:c,"aria-describedby":d,"aria-invalid":p,triggerRef:h,disabled:g,triggerKind:v,searchable:y,searchPlaceholder:w="\u641C\u7D22",className:x,contentClassName:k,itemClassName:F,side:C="bottom",align:D="start",sideOffset:S=6,collisionPadding:A=12,popupOwner:I=l,onValueChange:j,onOpenChange:$}){let P=Ra(),N=mh();Ui.useEffect(()=>vh(I,N),[I,N]);let R=Ui.useId(),[U,H]=Ui.useState(t),q=e===void 0?U:e,[L,O]=Ui.useState(!1),W=Ui.useRef(!1),[z,Y]=Ui.useState(""),G=Ui.useRef(null),Z=Ui.useRef(null),T=Ui.useCallback(fe=>{if(!fe)return;let we=requestAnimationFrame(()=>{W.current&&fe.isConnected&&fe.focus({preventScroll:!0})});return()=>cancelAnimationFrame(we)},[]),V=a??r.find(fe=>fe.value===q)?.label??n,X=fe=>{W.current=fe,O(fe),fe||Y(""),$?.(fe)},Q=zX(r,z),re=[];Q.forEach((fe,we)=>{fe.group!==Q[we-1]?.group&&(fe.group||Q[we-1]?.group)&&re.push({type:"group",key:`group:${we}`,label:fe.group||"\u5176\u4ED6\u6A21\u578B",children:[]});let _e={key:fe.value,label:fe.label,title:fe.label,disabled:fe.disabled,role:"option","aria-selected":fe.value===q,className:ct("wand-ui-select-item",F)};re.push(_e)}),Ln(L,()=>{X(!1),G.current?.focus({preventScroll:!0})}),Ui.useEffect(()=>{g&&L&&X(!1)},[g,L]);let[J,se]=Ui.useState(null),ue=Ui.useRef(null),ae=Ui.useCallback(()=>J?Promise.resolve():(ue.current||(ue.current=globalThis.__wandImportBrowserModule("a16a3779a5201ce1").then(fe=>{se(()=>fe.DropdownSurface)})),ue.current),[J]);Ui.useEffect(()=>{L&&ae()},[L,ae]);let he=(0,rs.jsxs)(Te,{ref:fe=>{if(G.current=fe,typeof h=="function")return h(fe);h&&(h.current=fe)},kind:v,id:c,"aria-describedby":d,"aria-invalid":p,disabled:g,className:ct("wand-ui-select-trigger",x),"data-popup-open":L?"":void 0,"data-placeholder":q===void 0&&!a?"":void 0,"aria-controls":L?R:void 0,role:"combobox","aria-haspopup":"listbox","aria-expanded":L,"aria-label":l,title:o??V,children:[(0,rs.jsx)("span",{className:"wand-ui-select-value",children:V}),(0,rs.jsx)(Fe,{name:"chevronDown",size:14})]}),le=(0,rs.jsxs)(Te,{ref:fe=>{if(G.current=fe,typeof h=="function")return h(fe);h&&(h.current=fe)},kind:v,id:c,"aria-describedby":d,"aria-invalid":p,disabled:g,className:ct("wand-ui-select-trigger",x),"data-popup-open":L?"":void 0,"data-placeholder":q===void 0&&!a?"":void 0,"aria-controls":L?R:void 0,role:"combobox","aria-haspopup":"listbox","aria-expanded":L,"aria-label":l,title:o??V,onClick:()=>{g||X(!0)},children:[(0,rs.jsx)("span",{className:"wand-ui-select-value",children:V}),(0,rs.jsx)(Fe,{name:"chevronDown",size:14})]});return(0,rs.jsx)(or,{children:J?(0,rs.jsx)(J,{trigger:he,open:L,triggers:["click"],disabled:g,onOpenChange:(fe,we)=>{we.source==="trigger"&&X(fe)},getPopupContainer:()=>P??document.body,placement:Fc(C,D),destroyOnHidden:!0,align:{offset:Dc(C,S),overflow:{adjustX:!0,adjustY:!0,shiftX:A,shiftY:A}},classNames:{root:ct("wand-ui-select-content",y&&"wand-ui-select-searchable",k)},menu:{id:R,items:re,role:"listbox",selectable:!0,selectedKeys:q===void 0?[]:[q],onClick:({key:fe})=>{H(fe),j?.(fe),X(!1),G.current?.focus({preventScroll:!0})}},popupRender:fe=>(0,rs.jsxs)("div",{ref:Z,"data-wand-popup-owner":I,children:[y&&(0,rs.jsx)(vp,{ref:T,type:"search","aria-label":w,placeholder:w,value:z,onChange:we=>Y(we.currentTarget.value),startSlot:(0,rs.jsx)(Fe,{name:"search",size:14}),onKeyDown:we=>{if(!we.nativeEvent.isComposing&&(we.key==="ArrowDown"||we.key==="ArrowUp")){we.preventDefault();let _e=Z.current?.querySelectorAll('[role="option"]:not([aria-disabled="true"])');(we.key==="ArrowUp"?_e?.[_e.length-1]:_e?.[0])?.focus()}}}),Q.length?fe:(0,rs.jsx)("div",{role:"status",children:"\u6CA1\u6709\u5339\u914D\u7684\u9009\u9879"})]})}):le})}function zX(e,t){return t.trim()?e.filter(r=>J8e(eSe(r),t)):e.slice()}function J8e(e,t){return t.trim().toLowerCase().split(/\s+/).filter(Boolean).every(r=>e.toLowerCase().includes(r))}function eSe(e){return`${e.value} ${e.label} ${e.group??""}`}var HX=B(_(),1),qX=B(Ee(),1);function jI(){let[e,t]=HX.useState(null);return HX.useEffect(()=>{if(e)return;let r=!0,n=!1,a=()=>{n||(n=!0,globalThis.__wandImportBrowserModule("e4f0f5105c74ead9").then(l=>{n=!1,r&&t(()=>l.WandToastRegion)},()=>{n=!1}))},o=Y7(()=>{a()});return Q7().length>0&&a(),()=>{r=!1,o()}},[e]),(0,qX.jsx)(or,{children:e?(0,qX.jsx)(e,{}):null})}var tSe=()=>Na()&&window.document.documentElement;var nY="wand-legacy-pwa-cleanup-v1",rSe=["wand-static-","wand-runtime-"];function bk(e){if(!e)return!1;try{let t=new URL(e.scriptURL,location.href);return t.origin===location.origin&&t.pathname==="/sw.js"}catch{return!1}}function nSe(e){return bk(e.installing)||bk(e.waiting)||bk(e.active)}function aSe(){try{return localStorage.getItem(nY)==="done"}catch{return!1}}function iSe(){try{localStorage.setItem(nY,"done")}catch{}}async function oSe(){if(!("serviceWorker"in navigator))return!0;try{let e=(await navigator.serviceWorker.getRegistrations()).filter(nSe);return await Promise.all(e.map(t=>t.unregister())),!0}catch{return!1}}async function sSe(){if(!("caches"in window))return!0;try{let e=(await caches.keys()).filter(t=>rSe.some(r=>t.startsWith(r)));return await Promise.all(e.map(t=>caches.delete(t))),!0}catch{return!1}}async function lSe(){if(aSe())return;let e="serviceWorker"in navigator&&bk(navigator.serviceWorker.controller),[t,r]=await Promise.all([oSe(),sSe()]);!t||!r||(iSe(),e&&location.reload())}lSe();var uSe=B(si(),1),cSe="wand.reactUi.enabled";function WX(e){if(e==null||e==="")return null;let t=e.trim().toLowerCase();return["1","true","on","enabled"].includes(t)?!0:["0","false","off","disabled"].includes(t)?!1:null}function dSe(e=window){try{let r=WX(new URL(e.location.href).searchParams.get("reactUi"));if(r!=null)return r}catch{}let t=e.__wandFeatureFlags?.reactUi;if(typeof t=="boolean")return t;try{let r=WX(e.localStorage.getItem(cSe));if(r!=null)return r}catch{}return!0}var pSe=B(_(),1),rg=B(_(),1),aY=B(_(),1),ns=B(Ee(),1),fSe=aY.lazy(()=>globalThis.__wandImportBrowserModule("4d02d91878bb9936").then(e=>({default:e.RestartProgress})));function mSe({controller:e=Il}){let t=(0,rg.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot),r=rB(t),n=(0,rg.useRef)(null),a=(0,rg.useRef)(null),o=(0,rg.useRef)(null);(0,rg.useEffect)(()=>{if(!t.open)return;let d=a.current?.ownerDocument??document,p=h=>{a.current&&(h.stopPropagation(),a.current.contains(h.target)||(n.current??o.current)?.focus({preventScroll:!0}))};return d.addEventListener("focusin",p,!0),()=>{d.removeEventListener("focusin",p,!0)}},[t.open]),(0,rg.useEffect)(()=>{t.phase==="timed-out"&&n.current?.focus()},[t.phase]);let l=t.phase==="waiting"||t.phase==="checking",c=t.maxAttempts>0?Math.min(100,Math.round(Math.min(t.attempts,t.maxAttempts)/t.maxAttempts*100)):0;return(0,ns.jsx)(ns.Fragment,{children:(0,ns.jsx)(qc,{open:t.open,onOpenChange:()=>{},title:r.title,description:r.description,className:"wand-restart-surface",width:{xs:"calc(100vw - 32px)",sm:520},zIndex:(gh.token?.zIndexPopupBase??1e3)+2e3,styles:{wrapper:{padding:"max(16px, var(--wand-safe-top)) max(16px, var(--wand-safe-right)) max(16px, var(--wand-safe-bottom)) max(16px, var(--wand-safe-left))"}},testId:"restart-overlay",showClose:!1,dismissable:!1,dismissalPriority:"blocking",children:(0,ns.jsxs)(Xe,{ref:a,vertical:!0,align:"center",gap:"middle",className:"wand-restart-body","aria-busy":l,style:{paddingBlock:24},children:[t.phase!=="timed-out"?(0,ns.jsx)(_i,{size:"large","aria-hidden":"true"}):null,(0,ns.jsx)(Pt.Paragraph,{ref:o,className:"wand-restart-live",role:t.phase==="timed-out"?"alert":"status","aria-live":t.phase==="timed-out"?"assertive":"polite","data-wand-autofocus":t.phase==="timed-out"?void 0:"true",tabIndex:-1,children:r.liveStatus}),t.phase!=="timed-out"?(0,ns.jsxs)(ns.Fragment,{children:[(0,ns.jsx)(aY.Suspense,{fallback:null,children:(0,ns.jsx)(fSe,{percent:c})}),(0,ns.jsxs)(Pt.Text,{type:"secondary",className:"wand-restart-attempts",children:["\u5DF2\u68C0\u67E5 ",t.attempts," / ",t.maxAttempts," \u6B21"]})]}):(0,ns.jsx)(Te,{ref:n,className:"wand-restart-manual","data-wand-autofocus":"true",kind:"primary",onClick:()=>e.manualRefresh(),children:"\u624B\u52A8\u5237\u65B0"})]})})})}var hSe=B(_(),1),gSe=B(er(),1),vSe=B(Ee(),1);function bSe(){return(0,hSe.useSyncExternalStore)(Q0.subscribe,Q0.getSnapshot,Q0.getSnapshot).mounts.map(e=>(0,gSe.createPortal)((0,vSe.jsx)(TI,{value:e.value,options:e.options,ariaLabel:e.ariaLabel,popupOwner:e.scope==="dropdown"?"composer-plus-popover":"composer-main",placeholder:e.placeholder,displayValue:e.displayValue,displayTitle:e.displayTitle,disabled:e.disabled,triggerKind:e.scope==="runtime"?"ghost":void 0,searchable:e.control==="model",searchPlaceholder:"\u641C\u7D22\u6A21\u578B",className:`wand-composer-select-trigger wand-composer-select-trigger-${e.control}`,contentClassName:`wand-composer-select-content wand-composer-select-content-${e.control}`,itemClassName:"wand-composer-select-item",side:"top",align:e.align,sideOffset:8,collisionPadding:14,onValueChange:e.onValueChange}),e.target,e.key))}var ySe=B(_(),1),wSe=B(er(),1),as=B(Ee(),1);function xSe(e){return e==="mode"?"\u6743\u9650\u6A21\u5F0F":e==="runtime"?"\u6A21\u578B\u4E0E\u601D\u8003\u8BBE\u7F6E":"\u4F1A\u8BDD\u8BBE\u7F6E"}function vk(e,t){return(0,as.jsx)("span",{className:"composer-config-select-host","data-composer-select-host":"","data-composer-select-key":`${e}-${t}`,"data-composer-select-scope":e,"data-mode-control":t})}function ESe({mount:e}){let{scope:t}=e,r=t!=="runtime",n=t!=="mode",a=t==="all";return(0,as.jsxs)(Xe,{align:"center",gap:6,wrap:t!=="runtime",style:{flex:n?1:void 0,minWidth:0},className:`composer-config-controls composer-config-controls-${t}`,"data-config-scope":t,role:"group","aria-label":xSe(t),title:e.groupTitle,children:[n&&e.toolVisible&&(0,as.jsx)("span",{"data-mode-control-pill":"tool",style:{display:"inline-flex",width:120,flexShrink:t==="runtime"?1:0},"aria-live":"polite","aria-busy":e.toolDisabled||void 0,title:e.toolStatus,children:vk(t,"tool")}),r&&(0,as.jsx)("span",{"data-mode-control-pill":"mode",title:`\u6A21\u5F0F\uFF1A${e.modeLabel}${e.modeLabel==="\u5B8C\u5168\u8BBF\u95EE"?"\uFF1B\u8BF7\u6838\u5BF9\u6267\u884C\u4EFB\u52A1\u4E0E\u5DE5\u4F5C\u76EE\u5F55\u540E\u53D1\u9001":""}`,children:vk(t,"mode")}),n&&(0,as.jsxs)(as.Fragment,{children:[(0,as.jsx)("span",{"data-mode-control-pill":"model",style:{minWidth:t==="runtime"?0:120},title:`\u6A21\u578B\uFF1A${e.modelFullLabel}`,children:vk(t,"model")}),a&&(0,as.jsx)(Er,{size:"medium",type:"button","data-models-refresh":"","data-models-refresh-scope":t,"aria-label":e.modelRefreshing?"\u6B63\u5728\u5237\u65B0\u6A21\u578B\u5217\u8868":"\u5237\u65B0\u6A21\u578B\u5217\u8868",title:e.modelRefreshing?"\u6B63\u5728\u5237\u65B0\u6A21\u578B\u5217\u8868":"\u5237\u65B0\u6A21\u578B\u5217\u8868","aria-busy":e.modelRefreshing?"true":"false",disabled:e.modelRefreshing,onClick:e.onRefreshModels,children:(0,as.jsx)(Fe,{name:"refresh",size:13,strokeWidth:1.9})}),t==="runtime"?(0,as.jsx)("span",{className:"composer-runtime-separator","aria-hidden":"true",children:"\xB7"}):null,(0,as.jsx)("span",{"aria-label":`\u601D\u8003\u6DF1\u5EA6\uFF1A${e.thinkingLabel}`,"data-mode-control-pill":"thinking",style:{minWidth:68},"data-thinking":e.thinkingValue,title:`\u601D\u8003\u6DF1\u5EA6\uFF1A${e.thinkingLabel}`,children:vk(t,"thinking")})]})]})}function kSe(){return(0,ySe.useSyncExternalStore)(Z0.subscribe,Z0.getSnapshot,Z0.getSnapshot).mounts.map(e=>(0,wSe.createPortal)((0,as.jsx)(ESe,{mount:e}),e.target,e.key))}var _I=B(_(),1),VX=B(er(),1),wk=B(Ee(),1),CSe=e=>`wand-pi-settings-panel-${e.sessionId}`;function SSe({mount:e}){let t=e.open;return(0,wk.jsx)(Te,{kind:"ghost",type:"button",className:"btn-circle btn-circle-action composer-pi-settings-toggle","data-open":t?"true":"false","aria-expanded":t,"aria-controls":CSe(e),"aria-label":t?"\u6536\u8D77\u4F1A\u8BDD\u529F\u80FD\u8BBE\u7F6E":"\u4F1A\u8BDD\u529F\u80FD\u8BBE\u7F6E\uFF1ACodeMode / Skills / MCP",title:t?"\u6536\u8D77\u4F1A\u8BDD\u529F\u80FD\u8BBE\u7F6E":"\u4F1A\u8BDD\u529F\u80FD\u8BBE\u7F6E\uFF1ACodeMode / Skills / MCP",onClick:()=>{Gn.toggle(e.sessionId)},children:(0,wk.jsx)(Fe,{name:t?"close":"gear",size:17,strokeWidth:1.9})})}function FSe(){let e=_I.useSyncExternalStore(Gn.subscribe,Gn.getSnapshot,Gn.getSnapshot),[t,r]=_I.useState(null),n=e.mounts.some(a=>a.open);return _I.useEffect(()=>{if(!n||t)return;let a=!0;return globalThis.__wandImportBrowserModule("9ed60ee59dc91419").then(o=>{a&&r(()=>o.PiSettingsPanelHost)}),()=>{a=!1}},[n,t]),e.mounts.flatMap(a=>[(0,VX.createPortal)((0,wk.jsx)(SSe,{mount:a},`${a.sessionId}-toggle`),a.toggleTarget,`${a.key}-toggle`),...t?[(0,VX.createPortal)((0,wk.jsx)(t,{mount:a},a.sessionId),a.target,a.key)]:[]])}var DSe=B(_(),1),ASe=B(er(),1),kd=B(Ee(),1);function $Se({mount:e}){let t=`${e.interactiveOn?"is-on":""}${e.interactiveVisible?"":" hidden"}`;return(0,kd.jsxs)(kd.Fragment,{children:[(0,kd.jsx)(BI,{id:"plus-attach-item",icon:"paperclip",label:"\u4E0A\u4F20\u9644\u4EF6",onClick:r=>e.onAttach(r.detail===0)}),(0,kd.jsxs)(Te,{kind:"ghost",className:t,id:"terminal-interactive-toggle-top",type:"button","aria-pressed":e.interactiveOn?"true":"false",title:"\u7EC8\u7AEF\u4EA4\u4E92\u5F00\u542F\u65F6\uFF0C\u952E\u76D8\u76F4\u901A\u539F\u59CB\u7EC8\u7AEF\uFF1B\u5173\u95ED\u540E\u5728\u5BF9\u8BDD\u4E2D\u9605\u8BFB\u89E3\u6790\u540E\u7684\u8F93\u51FA",onClick:()=>e.onToggleInteractive(),children:[(0,kd.jsx)(Fe,{name:"keyboard",size:14,strokeWidth:1.8,className:"plus-popover-icon"}),(0,kd.jsx)("span",{className:"plus-popover-label",children:"\u7EC8\u7AEF\u4EA4\u4E92"}),(0,kd.jsx)("span",{className:"plus-popover-toggle-state",children:e.interactiveOn?"\u5F00":"\u5173"})]})]})}function BSe(){return(0,DSe.useSyncExternalStore)(K0.subscribe,K0.getSnapshot,K0.getSnapshot).mounts.map(e=>(0,ASe.createPortal)((0,kd.jsx)($Se,{mount:e}),e.target,e.key))}var ISe=B(_(),1),MSe=B(er(),1),RI=B(Ee(),1);function TSe({mount:e}){return(0,RI.jsx)(or,{children:(0,RI.jsx)(za,{id:"action-error",role:"alert",type:"error",title:e.message,showIcon:!0})})}function jSe(){return(0,ISe.useSyncExternalStore)(U0.subscribe,U0.getSnapshot,U0.getSnapshot).mounts.map(e=>(0,MSe.createPortal)((0,RI.jsx)(TSe,{mount:e}),e.target,e.key))}var _Se=B(_(),1),PSe=B(er(),1),ti=B(Ee(),1);function NSe({enabled:e,pending:t=!1,onToggle:r}){return(0,ti.jsxs)(Te,{id:"auto-approve-toggle",size:"medium",kind:e?"soft":"ghost","aria-pressed":e,"aria-busy":t||void 0,disabled:t,"aria-label":`\u81EA\u52A8\u6279\u51C6\u5DF2${e?"\u542F\u7528\uFF0C\u70B9\u51FB\u5173\u95ED":"\u5173\u95ED\uFF0C\u70B9\u51FB\u5F00\u542F"}`,onClick:r,children:[(0,ti.jsx)(Fe,{name:e?"shieldCheck":"shield",size:12}),e?"\u81EA\u52A8":"\u624B\u52A8"]})}function OSe({stats:e}){return e?(0,ti.jsx)(ol,{ariaLabel:"\u81EA\u52A8\u6279\u51C6\u7EDF\u8BA1",contentId:"approval-stats-popup",trigger:(0,ti.jsxs)(Te,{id:"approval-stats-badge",kind:"ghost",size:"medium","aria-label":"\u672C\u6B21\u4F1A\u8BDD\u81EA\u52A8\u6279\u51C6\u7EDF\u8BA1",children:[(0,ti.jsx)(Fe,{name:"shield",size:12}),e.total]}),children:(0,ti.jsxs)("div",{id:"approval-stats",children:["\u547D\u4EE4\u6267\u884C ",e.command," \xB7 \u6587\u4EF6\u5199\u5165 ",e.file," \xB7 \u5176\u4ED6\u5DE5\u5177 ",e.tool," \xB7 \u5408\u8BA1 ",e.total]})}):null}function RSe({permission:e,pending:t,onAction:r}){return(0,ti.jsxs)("span",{id:"permission-actions","aria-busy":t||void 0,children:[(0,ti.jsx)("span",{id:"permission-actions-label",role:"status","aria-live":"polite","aria-atomic":"true",children:e.label}),!e.autoApproving&&(0,ti.jsxs)(ti.Fragment,{children:[(0,ti.jsx)(Te,{id:"approve-permission-btn",size:"medium",kind:"primary",disabled:t,onClick:()=>r("approve"),children:"\u6279\u51C6"}),e.requestId&&(0,ti.jsx)(Te,{id:"approve-turn-permission-btn",size:"medium",disabled:t,onClick:()=>r("approve-turn"),children:"\u672C\u8F6E\u5141\u8BB8"}),(0,ti.jsx)(Te,{id:"deny-permission-btn",size:"medium",kind:"danger",disabled:t,onClick:()=>r("deny"),children:"\u62D2\u7EDD"})]})]})}function LSe(e,t){return e.kind==="permissions"?(0,ti.jsx)(RSe,{permission:e.permission,pending:e.pending,onAction:e.onAction}):e.kind==="auto-approve"?(0,ti.jsx)(NSe,{enabled:e.enabled,pending:e.pending,onToggle:e.onToggle}):(0,ti.jsx)(OSe,{stats:e.stats,revision:t})}function zSe(){let e=(0,_Se.useSyncExternalStore)(V0.subscribe,V0.getSnapshot,V0.getSnapshot);return e.mounts.map(t=>(0,PSe.createPortal)(LSe(t,e.revision),t.target,t.key))}var Ur=B(Ee(),1);function HSe({portalContainer:e,settingsPresentation:t="workspace"}){let r=(0,pSe.useSyncExternalStore)(xs.subscribe,xs.getSnapshot,xs.getSnapshot).activeDialog;return(0,Ur.jsxs)(hh,{container:e,children:[t==="workspace"?(0,Ur.jsxs)(Ur.Fragment,{children:[(0,Ur.jsx)(bSe,{}),(0,Ur.jsx)(kSe,{}),(0,Ur.jsx)(FSe,{}),(0,Ur.jsx)(W$,{}),(0,Ur.jsx)(BSe,{}),(0,Ur.jsx)(jSe,{}),(0,Ur.jsx)(q$,{}),(0,Ur.jsx)(zSe,{}),(0,Ur.jsx)(fB,{}),(0,Ur.jsx)(Q$,{}),(0,Ur.jsx)(Z$,{}),(0,Ur.jsx)(J$,{})]}):null,t==="page"?(0,Ur.jsx)(LE,{presentation:"page",showRestart:Il.showRestart}):null,t==="workspace"?(0,Ur.jsxs)(Ur.Fragment,{children:[(0,Ur.jsx)(V$,{}),(0,Ur.jsx)(U$,{}),(0,Ur.jsx)(K$,{}),(0,Ur.jsx)(G$,{}),(0,Ur.jsx)(X$,{}),(0,Ur.jsx)(Y$,{})]}):null,(0,Ur.jsx)(mSe,{}),(0,Ur.jsx)(jI,{}),r?(0,Ur.jsx)(_b,{open:!0,title:r.options.title,description:r.options.description,tone:r.options.tone,icon:r.options.icon,actions:r.options.actions,input:r.options.input,dismissable:r.options.dismissable,focusTriggerAfterClose:r.options.focusTriggerAfterClose,onAction:(n,a)=>{xs.completeDialog(r.id,{dismissed:!1,action:n,inputValue:a})},onDismiss:()=>{xs.completeDialog(r.id,{dismissed:!0})}},r.id):null]})}var qSe=["profile","notifications","display","ai","local-models","general","connectors","security","presets","about"];function WSe(e){let t=new URLSearchParams(e).get("settings");return t==="directory"||qSe.includes(t)?t:null}function VSe(){let e=!1,t=Fa.getSnapshot(),r=()=>{e=!0;let o=WSe(window.location.search),l=Fa.getSnapshot();o?((!l.open||(o==="directory"?l.detail:l.tab!==o||!l.detail))&&mo.open(o==="directory"?void 0:o),Fa.setNested(new URLSearchParams(window.location.search).get("settingsNested")==="environment"?"environment":null)):mo.close(),t=Fa.getSnapshot(),e=!1};r();let n=Fa.subscribe(()=>{let o=Fa.getSnapshot();e||((o.open!==t.open||o.tab!==t.tab||o.detail!==t.detail||o.nested!==t.nested)&&Ua({settings:o.open?o.detail?o.tab:"directory":null,settingsNested:o.open?o.nested:null}),t=o)}),a=go(r);return()=>{n(),a()}}var UX=B(Ee(),1),KX="overlay-root",USe="wand-react-ui-mount",PI=null;function GX(e,t,r){let n=document.getElementById(t);if(n&&n.parentElement===e)return n;let a=document.createElement("div");return a.id=t,a.className=r,e.appendChild(a),a}function KSe(){let e=document.getElementById(KX);if(e)return e;let t=document.createElement("div");return t.id=KX,t.dataset.wandUiRoot="",document.body.appendChild(t),t}function GSe(){window.__wandReactSettings=mo,window.__wandReactNewSession=Ia,window.__wandReactFolderPicker=ad,window.__wandReactQuickCommit=Pc,window.__wandReactWorktreeMerge=Nc,window.__wandReactRestartOverlay=Il,window.__wandReactFilePreview=ks,window.__wandReactMissions=Mp,window.__wandReactWorkspaces=Qp,window.__wandReactGithubIssues=Db,window.__wandReactTaskBoard=En,t1()}function XSe(){let e=KSe(),t=dSe(),r=Xc();if(!PI){r||VSe(),Fh();let n=GX(e,USe,"wand-ui-mount"),a=GX(e,Vv,"wand-ui-portals");PI=(0,uSe.createRoot)(n),PI.render((0,UX.jsx)(La,{children:(0,UX.jsx)(HSe,{portalContainer:a,settingsPresentation:r?"page":"workspace"})}))}return r?window.__wandReactSettings=mo:GSe(),e.dataset.reactUi=t?"enabled":"fallback",t?(window.__wandReactUi=gn,gn):(delete window.__wandReactUi,null)}var XX=null;function YSe(e){ja("working-dir")}var QSe={getInitialPath:ts,onOpen(){fi(["folderPicker"])},onClose(){},applySelection(e){VE(e),YSe(e)}};function YX(){return fi(["folderPicker"])?ad.open(ts())?!0:(Ye("\u5DE5\u4F5C\u76EE\u5F55\u9009\u62E9\u5668\u5C1A\u672A\u5C31\u7EEA\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u540E\u91CD\u8BD5\u3002","error"),!1):!1}function ZSe(){return Pf(()=>{YX()})?YX():!1}function JSe(){XX||(XX=CA(QSe))}var QX=null;function e4e(){QX||(QX=M7({discardScope:e=>Lt.discardScope(e),read:e=>Lt.read(e),edit:(e,t)=>Lt.edit(e,t),submit:(e,t,r)=>Lt.submit(e,t,r),subscribe:e=>Lt.subscribe(e),transfer:(e,t,r)=>Lt.transfer(e,t,r)}))}var ZX=null,t4e={onOpen(){fi(["newSession"]),m.sessionsDrawerOpen=!1,Vr("wand-sidebar-open",!1),Bf()},onClose(){},getContext(){return{effectiveCwd:ts(),selectedModels:{claude:Rs("claude"),codex:Rs("codex"),opencode:Rs("opencode"),grok:Rs("grok"),qoder:Rs("qoder"),pi:Rs("pi")},thinkingEffort:m.chatThinking||"off"}},rememberModel(e,t){Sy(e,t||"")},async prepareCreate(e,t){return e==="structured"?{}:(await Yc(),Ns({prepare:!0}),await Ay(),jl({},{kind:e,provider:t?.kind==="pty"?t.provider:void 0,command:t?.kind==="pty"?t.command:void 0,cwd:t?.cwd||ts(),workspaceTaskId:t?.workspaceTaskId}))},async completeCreate(e,t,r){if(m.chatMode=e.mode,e.kind!=="shell"&&(m.sessionTool=e.provider,m.preferredCommand=e.provider),Of(t.id,!0),VE(e.cwd),await mi({skipSelectedOutputReload:!0}),e.workspaceTaskId){await bs.reload(e.workspaceTaskId).catch(()=>{});let n=Ga.getRuntime();if(Wr.getSnapshot().taskId===e.workspaceTaskId&&n){let a=Wr.getSnapshot().layout,o=a?a.windows.flatMap(c=>vo(c.layout)):[],l=wu(a,[...o,t.id],t.id);n.saveTaskLayout(l)}ho()}if(Ar.suspend(),r&&!Lh.transfer(r.key,t.id,r.revision))throw new Error("\u65B0\u5DE5\u4F5C\u5DF2\u521B\u5EFA\uFF0C\u4F46\u8F93\u5165\u5DF2\u53D8\u5316\uFF0C\u8349\u7A3F\u4FDD\u7559\u3002\u8BF7\u4ECE\u4F1A\u8BDD\u5217\u8868\u6253\u5F00\u540E\u7EE7\u7EED\u3002");In(t.id),pi(),r&&(Ed(t.id),Nf(void 0)),window.setTimeout(()=>Ml(!0),0)}};function r4e(){ZX||(ZX=jD(t4e))}function n4e(){window.addEventListener("wand-settings-notifications-changed",e=>{let t=e.detail||{};typeof t.sound=="boolean"&&(m.notifSound=t.sound),typeof t.volume=="number"&&(m.notifVolume=t.volume),typeof t.bubble=="boolean"&&(m.notifBubble=t.bubble)}),window.addEventListener("wand-settings-config-saved",e=>{let t=e.detail;t&&(m.config||(m.config={}),Object.assign(m.config,t),Fy(t))})}function a4e(e){return e==="claude-history"?"history":e==="codex-history"?"codex":e==="opencode-history"||e==="qoder-history"?"history":"sessions"}function i4e(e,t){return ky(`\u786E\u8BA4\u5220\u9664\u8FD9\u6761 ${e==="codex-history"?"Codex":e==="opencode-history"?"OpenCode":e==="qoder-history"?"Qoder":e==="claude-history"?"Claude":"Wand"} \u4F1A\u8BDD\u5417\uFF1F`,{title:"\u5220\u9664\u4F1A\u8BDD"}).then(r=>{if(r)return e==="codex-history"?VB(t):e==="claude-history"?zB(t,null):e==="opencode-history"?JE("opencode",t):e==="qoder-history"?JE("qoder",t):LB(t)})}function iY(e){m.sessionTool=e,m.preferredCommand=e}function NI(e){return iY(e),kI()}function o4e(){return iY("claude"),uk().then(e=>(Ml(!0),e))}function s4e(e){let t=m.sessions.find(n=>n.id===m.selectedId);if(e==="cwd")return gy("cwd","\u5DE5\u4F5C\u76EE\u5F55\u5DF2\u590D\u5236");if(e==="sessionId")return gy("id","\u4F1A\u8BDD ID \u5DF2\u590D\u5236");let r=t?.provider;return gy("claudeSessionId",r==="codex"?"Codex thread ID \u5DF2\u590D\u5236":r==="opencode"?"OpenCode session ID \u5DF2\u590D\u5236":r==="grok"?"Grok \u4F1A\u8BDD ID \u5DF2\u590D\u5236":r==="qoder"?"Qoder \u4F1A\u8BDD ID \u5DF2\u590D\u5236":"Claude \u4F1A\u8BDD ID \u5DF2\u590D\u5236")}function l4e(){return{goHome:Ru,refreshPage:()=>window.location.reload(),openNewSession:e=>pk(e),openMissions:()=>{Mp.open()},openNewProject:e=>pk(e),quickStartClaudeTerminal:()=>NI("claude"),quickStartCodexTerminal:()=>NI("codex"),quickStartOpenCodeTerminal:()=>NI("opencode"),quickStartStructuredSession:o4e,selectSession:(e,t)=>{let r=In(e,t);return pi(),r},resumeSession:e=>qB(e).then(t=>(pi(),t)),resumeHistory:(e,t,r)=>WB(e,t,r),deleteItem:i4e,mergeSession:wI,cleanupSession:xI,toggleManageMode:GB,toggleManagedSelection:(e,t)=>QB(a4e(e),t),selectAllManaged:XB,clearManagedSelection:YB,deleteManagedSelection:ZB,toggleSessionsDrawer:vI,openSessionsDrawer:bI,closeSessionsDrawer:eg,toggleSidebarPin:yI,toggleSidebarCollapsed:dk,expandSidebarGroup:e=>{Vr(e==="automation"?"wand-automation-sessions-expanded":"wand-non-wand-sessions-expanded",!0),dk()},setSidebarGroupExpanded:(e,t)=>{Vr(e==="automation"?"wand-automation-sessions-expanded":"wand-non-wand-sessions-expanded",t)},toggleFilePanel:JB,closeFilePanel:eI,openFolderPicker:()=>{ZSe()},toggleTopbarMenu:()=>{m.topbarMoreOpen=!m.topbarMoreOpen},copyTopbarField:s4e,openGitCommit:BB,openSettings:EI,backToNative:lI,switchServer:ak,logout:uI}}function u4e(e){return{openFiles(){return e.isReady()?(e.setFilePanelOpen(!0),!0):!1},getCloseState(){return e.isSavingFile()?"busy":e.hasUnsavedFiles()?"unsaved":"ready"},getSelectedSessionId(){return e.isReady()?e.getSelectedSessionId():""}}}var JX=null;function c4e(){JX||(JX=D7({onOpen(){fi(["missions"]),pi()},onClose(){},effectiveCwd:ts,async openSession(e){await mi({skipSelectedOutputReload:!0}),m.sessions.some(t=>t.id===e)&&(In(e),pi())}}))}function d4e(e,t){let r=new Map;function n(d){let p=r.get(d);return p||(p={epoch:0,automaticBlocked:!1},r.set(d,p)),p}async function a(d,p){let h=await e.getTask(d);if(h.id!==d)throw new Error("\u4EFB\u52A1\u8BE6\u60C5\u4E0E\u8BF7\u6C42\u4E0D\u5339\u914D\u3002");return p.revision=h.layoutRevision??0,h}function o(d,p){d.pending?.resolve(p),d.pending=void 0}async function l(d,p){for(;p.pending;){let h=p.pending;p.pending=void 0;try{p.revision===void 0&&await a(d,p);let g=await e.saveTaskLayout(d,h.layout,p.revision);p.revision=g.layoutRevision,h.automatic||(p.automaticBlocked=!1),t.onSaved(d,g.layoutRevision),h.resolve("saved")}catch(g){let v=p.epoch,y=h.automatic&&g instanceof Aa&&g.status===409;p.automaticBlocked=!y,o(p,"failed"),p.revision=void 0,y||t.onError(d,g);try{let w=await a(d,p);p.epoch===v&&t.onRestore(d,w)}catch{}h.resolve("failed")}}}function c(d,p){p.running||(p.running=l(d,p).finally(()=>{p.running=void 0,p.pending&&c(d,p)}))}return{remember(d,p){let h=n(d);h.running||(h.revision=p??0)},canSaveAutomatically(d){return!r.get(d)?.automaticBlocked},save(d,p,h={}){let g=n(d);if(h.automatic&&g.automaticBlocked)return Promise.resolve("failed");g.epoch++,o(g,"superseded");let v=new Promise(y=>{g.pending={layout:p,resolve:y,automatic:h.automatic===!0}});return c(d,g),v},isSaving(d){return!!r.get(d)?.running},async flush(d){let p=r.get(d);for(;p?.running;)await p.running}}}var eY=null,Iy=0;function Lf(){return Wr.getSnapshot().taskId}var Rf=d4e(an,{onSaved(e,t){Lf()===e&&dl({layoutRevision:t})},onError(e,t){let r=t instanceof Error?t.message:"\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u8BD5\u3002";Ye(`\u4EFB\u52A1 ${e} \u7684\u5E03\u5C40\u672A\u4FDD\u5B58\uFF1A${r}`,"danger")},onRestore(e,t){if(Lf()!==e)return;let r=Kp(t.sessions).map(c=>c.id),n=Ss(t.layout),a=n?.kind==="session"?n.sessionId:r[0],o=wu(t.layout,r,a);Up(o)?.layout.type!=="split"&&by();let l=Ss(o);l?.kind==="session"?In(l.sessionId):Ru(),dl({layout:o,layoutRevision:t.layoutRevision})}});function OI(e,t,r){return r?.automatic&&!Rf.canSaveAutomatically(e)?Promise.resolve("failed"):(Lf()===e&&(Up(t)?.layout.type!=="split"&&by(),dl({layout:t})),Rf.save(e,t,r))}function p4e(){if(eY)return;let e=vs(()=>{let r=Lf();r&&Rf.flush(r).then(async()=>{let n=await bs.reload(r);Lf()===r&&(Rf.remember(r,n.layoutRevision),dl({taskName:n.name,cwd:n.cwd,workspaceId:n.workspaceId,layout:n.layout,layoutRevision:n.layoutRevision}))}).catch(()=>{})}),t=_D({onOpen(){fi(["workspaces"]),pi()},onClose(){},effectiveCwd:ts,openWorkspace(r){++Iy,W0(null),dl({workspaceId:r.id,workspaceName:r.name,taskId:null,taskName:"",cwd:r.cwd,provider:r.defaultProvider,layout:null}),ja("workspace:open"),Ru(),pi()},closeWorkspace(){++Iy,W0(null),MD(),ja("workspace:close")},refreshSessions:Tl,selectSession(r){In(r),pi()},async openTask(r){let n=++Iy,a=r.preferredSessionId||m.selectedId;W0(r.taskId),dl({workspaceId:r.workspaceId,workspaceName:r.workspaceName,taskId:r.taskId,taskName:r.taskName,cwd:r.cwd,provider:r.provider,layout:null,layoutRevision:void 0}),ja("workspace:open"),Ru({updateRoute:!r.restoreRoute});let o=Rf.isSaving(r.taskId);if(await Rf.flush(r.taskId),!(n!==Iy||r.navigationCurrent?.()===!1))return(o?bs.reload(r.taskId):bs.load(r.taskId)).then(l=>{if(n!==Iy||r.navigationCurrent?.()===!1)return;let c=Kp(l.sessions).map(v=>v.id),d=Ss(l.layout),p=a&&c.includes(a)?a:d?.kind==="session"&&c.includes(d.sessionId)?d.sessionId:c[0],h=c.length>0?wu(l.layout,c,p):wu(l.layout,[],null),g=Ss(h);g?.kind==="session"&&In(g.sessionId,{updateRoute:!r.restoreRoute}),Rf.remember(r.taskId,l.layoutRevision),dl({layout:h,layoutRevision:l.layoutRevision}),!r.restoreRoute&&JSON.stringify(h)!==JSON.stringify(l.layout)&&OI(r.taskId,h,{automatic:!0}),pi()}).catch(()=>{})},newTaskSession(r){return Promise.resolve(fk(r.cwd,{workspaceId:r.workspaceId,workspaceTaskId:r.taskId,shell:r.target==="shell",provider:II(r.target)||void 0,engine:MI(r.target),kind:r.target==="shell"?"pty":r.kind??"structured",model:r.model,employeeId:r.employeeId,initialInput:r.prompt})).then(async n=>{let a=typeof n=="string"&&n?n:n&&typeof n=="object"&&"id"in n&&typeof n.id=="string"&&n.id?n.id:void 0;if(a){if(!r.taskId)return ho(),a;if(await bs.reload(r.taskId).catch(()=>{}),Lf()===r.taskId){let o=Wr.getSnapshot().layout,l=o?o.windows.flatMap(d=>vo(d.layout)):[],c=wu(o,[...l,a],a);OI(r.taskId,c)}return ho(),a}})},startWorktreeMergeAgent(r){return fk(r.cwd,{workspaceId:r.workspaceId,provider:r.provider,mode:"managed",systemPrompt:r.systemPrompt,initialInput:r.prompt})},saveTaskLayout(r,n){let a=Lf();if(a)return OI(a,r,n)},async closeTaskSessions(r,n){let a=[...new Set(r.filter(Boolean))];if(a.length===0)return!0;let o=n==="window";if(!await ky(o&&a.length>1?`\u5173\u95ED\u8FD9\u4E2A\u5DE5\u4F5C\u7A97\u53E3\uFF1F\u5176\u4E2D\u7684 ${a.length} \u4E2A\u7EC8\u7AEF\u4F1A\u8BDD\u4F1A\u7ED3\u675F\u5E76\u88AB\u5220\u9664\u3002`:"\u5173\u95ED\u8FD9\u4E2A\u7EC8\u7AEF\uFF1F\u5F53\u524D\u4F1A\u8BDD\u4F1A\u7ED3\u675F\u5E76\u88AB\u5220\u9664\u3002",{title:o?"\u5173\u95ED\u5DE5\u4F5C\u7A97\u53E3":"\u5173\u95ED\u7EC8\u7AEF",okLabel:"\u5173\u95ED"}))return!1;try{return await an.deleteSessions(a),a.forEach(l=>Tf(l)),await mi({preserveNoSelection:!0}),!0}catch(l){return await mi({preserveNoSelection:!0}).catch(()=>{}),Ye(l instanceof Error?l.message:"\u65E0\u6CD5\u5173\u95ED\u7EC8\u7AEF\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002","danger"),!1}},mountSessionTerminal(r,n){return UE(r,n)},unmountSessionTerminal(r){Tf(r)},getSessionTerminalScale(r){return bf(r)},setSessionTerminalScale(r,n){return ay(r,n)},disposeAllSessionTerminals(){by()},modelPreference(r){return Rs(r)||""},rememberModelPreference(r,n){Sy(r,n||"")},toast(r,n){Ye(r,n)}});eY=()=>{e(),t()}}var tY=!1,zf=!1,ng=0,LI=0,yk=!1,zI=!1,Ty="";function My(){let e=new URLSearchParams(Hn());return JSON.stringify(["view","session","workspace","workspaceTask","window","tab"].map(t=>e.get(t)))}function HI(e="push",t=!1){!zf||ng&&!t||yk||(yk=!0,queueMicrotask(()=>{if(yk=!1,!zf||ng&&!t)return;let r=Wr.getSnapshot(),n=r.layout?.windows.find(l=>l.id===r.layout?.activeWindowId),a=new URLSearchParams(Hn());zI=!0;let o=e==="push"?cD(Hn(),m.selectedId||null):e;Ua({...a.has("view")?{}:{view:"workspace"},session:m.selectedId||null,workspace:r.workspaceId,workspaceTask:r.taskId,window:n?.id??null,tab:n?.activeTabId??null},o),zI=!1,Ty=My()}))}async function rY(){if(!yu()){zf=!0;let o=Ar.getSnapshot();return o.active===!0||o.directory?(Ua({view:o.directory?"contacts":"chats",sidebar:o.mode,conversation:o.selectedId,chatFilter:o.listFilter,chatActivity:String(o.activityOnly),chatQuery:o.filters["list-query"]??""},"replace"),Ty=My()):HI("replace"),!1}let e=++LI,t=My();Ty=t;let r=new URLSearchParams(Hn()),n=Ga.getRuntime();if(!n)return!0;ng++,py("");let a=()=>e===LI&&My()===t;try{let o=r.get("session"),l=r.get("workspace"),c=r.get("window"),d=r.get("tab"),p=o?m.sessions.find(g=>g.id===o):null;if(o&&!p)throw new Error("\u94FE\u63A5\u4E2D\u7684\u4F1A\u8BDD\u4E0D\u5B58\u5728\u3001\u5DF2\u5220\u9664\u6216\u65E0\u6743\u8BBF\u95EE\u3002");let h=r.get("workspaceTask")||p?.workspaceTaskId;if((c||d)&&!h)throw new Error("\u7A97\u53E3\u94FE\u63A5\u7F3A\u5C11\u6240\u5C5E\u4EFB\u52A1\uFF0C\u8BF7\u8FD4\u56DE\u5DE5\u4F5C\u533A\u91CD\u65B0\u9009\u62E9\u3002");if(h){let g=await an.getTask(h);if(!a())return!0;if(l&&g.workspaceId!==l)throw new Error("\u94FE\u63A5\u4E2D\u7684\u4EFB\u52A1\u4E0D\u5C5E\u4E8E\u6307\u5B9A\u5DE5\u4F5C\u533A\u3002");if(p&&p.workspaceTaskId!==h)throw new Error("\u94FE\u63A5\u4E2D\u7684\u4F1A\u8BDD\u4E0D\u5C5E\u4E8E\u6307\u5B9A\u4EFB\u52A1\u3002");if(await n.openTask({workspaceId:g.workspaceId,workspaceName:"",taskId:g.id,taskName:g.name,cwd:g.cwd,preferredSessionId:o||void 0,restoreRoute:!0,navigationCurrent:a}),!a())return!0;let v=Wr.getSnapshot().layout;if(v&&c){let w=v.windows.find(x=>x.id===c);if(!w)throw new Error("\u94FE\u63A5\u4E2D\u7684\u7A97\u53E3\u5DF2\u5173\u95ED\u6216\u4E0D\u5B58\u5728\u3002");if(d&&!ul(w.layout,d))throw new Error("\u94FE\u63A5\u4E2D\u7684\u7A97\u683C\u5DF2\u5173\u95ED\u6216\u4E0D\u5B58\u5728\u3002");if(o&&!vo(w.layout).includes(o))throw new Error("\u94FE\u63A5\u4E2D\u7684\u4F1A\u8BDD\u4E0D\u5728\u6307\u5B9A\u7A97\u53E3\u5185\u3002");v={...v,activeWindowId:c,windows:v.windows.map(x=>x.id===c&&d?{...x,activeTabId:d}:x)},dl({layout:v})}let y=Ss(v);o?await In(o,{focusInput:!1,updateRoute:!1}):y?.kind==="session"?await In(y.sessionId,{focusInput:!1,updateRoute:!1}):Ru({updateRoute:!1})}else{if(fy(()=>n.closeWorkspace()),l){let g=await an.list();if(!a())return!0;let v=g.find(y=>y.id===l);if(!v)throw new Error("\u94FE\u63A5\u4E2D\u7684\u5DE5\u4F5C\u533A\u4E0D\u5B58\u5728\u3001\u5DF2\u5220\u9664\u6216\u65E0\u6743\u8BBF\u95EE\u3002");if(p&&p.workspaceId!==l)throw new Error("\u94FE\u63A5\u4E2D\u7684\u4F1A\u8BDD\u4E0D\u5C5E\u4E8E\u6307\u5B9A\u5DE5\u4F5C\u533A\u3002");fy(()=>n.openWorkspace(v))}o?await In(o,{focusInput:!1,updateRoute:!1}):Ru({updateRoute:!1})}}catch(o){a()&&(fy(()=>n.closeWorkspace()),Ru({updateRoute:!1}),py(o instanceof Error?o.message:"\u94FE\u63A5\u76EE\u6807\u8BFB\u53D6\u5931\u8D25\uFF0C\u8BF7\u8FD4\u56DE\u5DE5\u4F5C\u533A\u91CD\u8BD5\u3002"))}finally{ng--,zf=!0}return!0}function f4e(){tY||(tY=!0,lB(()=>{(ng||!zf)&&(LI++,zf=!0),HI("push",!0)}),uB(rY),Wr.subscribe(()=>HI()),go(()=>{let e=My();!zf&&!ng||zI||e===Ty||(Ty=e,!yk&&rY())}))}f3({ready:()=>!!m.config&&!m.pageUnloading,version:()=>String(m.config?.currentVersion||m.config?.packageVersion||"0.0.0"),secure:()=>window.location.protocol==="https:"||["localhost","127.0.0.1","[::1]"].includes(window.location.hostname),fetch:(e,t)=>globalThis.fetch(e,t)});m3(window);e4e();n4e();EB(l4e());window.__wandDesktopTools=u4e({isReady:GE,setFilePanelOpen:X0,hasUnsavedFiles:()=>Yb.hasDirty()||Op.getSnapshot().dirty,isSavingFile:()=>Qc.getSnapshot().saving||Op.getSnapshot().saving,getSelectedSessionId:()=>m.selectedId||""});(function(){try{var e=navigator&&navigator.userAgent||"";/WandApp\//.test(e)&&document.documentElement.classList.add("is-wand-app"),/WandPlatform\/iOS/.test(e)&&document.documentElement.classList.add("is-wand-ios"),/WandPlatform\/Android/.test(e)&&document.documentElement.classList.add("is-wand-android"),/WandPlatform\/macOS/.test(e)&&document.documentElement.classList.add("is-wand-macos")}catch{}try{let t=new URL(window.location.href).searchParams;t.get("embed")==="terminal"&&(document.documentElement.classList.add("is-wand-embed-terminal"),t.get("nativeInput")==="1"&&document.documentElement.classList.add("is-wand-native-input"),t.get("passthrough")==="1"&&document.documentElement.classList.add("is-wand-terminal-passthrough"))}catch{}try{window.__wandNativeBackHooked=!0}catch{}try{window.__wandConfigPath=P$}catch{}})();XSe();r4e();c4e();p4e();f4e();JSe();sI({getSession(e){return m.sessions.find(t=>t.id===e)??null},refreshSessions(){return Tl()},toast(e,t){Ye(e,t)}});(function(){try{window.__openLocalPreview=e=>ry(String(e??""))}catch{}})();FB({getSiblings(e){let t=AI.getSnapshot(),r=t.expanded.get(_l(e))??t.expanded.get(t.activeDir);return r?r.entries:[]},confirmDiscard(e){let t=e==="replace";return jf({type:"warning",title:t?"\u5207\u6362\u9884\u89C8\u6587\u4EF6\uFF1F":"\u653E\u5F03\u672A\u4FDD\u5B58\u7684\u4FEE\u6539\uFF1F",message:t?"\u5F53\u524D\u6587\u4EF6\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u5207\u6362\u540E\u4F1A\u4E22\u5931\u3002":e==="exit-edit"?"\u5F53\u524D\u6587\u4EF6\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u9000\u51FA\u7F16\u8F91\u540E\u4F1A\u4E22\u5931\u3002":"\u5F53\u524D\u6587\u4EF6\u6709\u672A\u4FDD\u5B58\u7684\u6539\u52A8\uFF0C\u5173\u95ED\u540E\u4F1A\u4E22\u5931\u3002",buttons:[{label:"\u7EE7\u7EED\u7F16\u8F91",value:!1,kind:"secondary",autofocus:!0},{label:"\u653E\u5F03\u4FEE\u6539",value:!0,kind:"danger"}],cancelValue:!1}).then(r=>r===!0)},copyText:rI,appendToComposer:tI,notify(e,t){Ye(e,t)},onSaved(){return DI.execute({type:"refresh"}).then(function(){})}});export{zq as shared100_a,n0 as shared100_b,PD as shared100_c,ND as shared100_d,OD as shared100_e,RD as shared100_f,M2 as shared100_g,LD as shared100_h,t0 as shared101_a,Wc as shared101_b,Xp as shared101_c,Vc as shared101_d,wge as shared101_e,Fs as shared101_f,BD as shared101_g,ID as shared101_h,F2 as shared102_a,e0 as shared102_b,Wr as shared103_a,dl as shared103_b,MD as shared103_c,Ia as shared104_a,pl as shared104_b,jD as shared104_c,Qp as shared104_d,Ga as shared104_e,_D as shared104_f,z2 as shared105_a,H2 as shared105_b,Gc as shared106_a,Qge as shared107_a,Zge as shared107_b,Xc as shared107_c,Jge as shared107_d,aA as shared107_e,tve as shared108_a,Yc as shared108_b,nve as shared109_a,iA as shared109_b,ave as shared109_c,ive as shared109_d,ove as shared109_e,sve as shared109_f,oA as shared109_g,S8 as shared10_a,ai as shared10_b,Ci as shared10_c,lve as shared110_a,aW as shared110_b,Yb as shared110_c,Qc as shared110_d,Jb as shared111_a,c0 as shared111_b,d0 as shared111_c,lA as shared111_d,uA as shared111_e,cA as shared111_f,e1 as shared112_a,hl as shared112_b,pA as shared112_c,fA as shared112_d,Ar as shared113_a,p0 as shared113_b,Fve as shared113_c,t1 as shared114_a,En as shared114_b,gl as shared114_c,xA as shared115_a,EA as shared115_b,rd as shared115_c,f0 as shared115_d,yA as shared115_e,zve as shared115_f,G2 as shared115_g,vA as shared115_h,qve as shared115_i,Wve as shared115_j,af as shared115_k,wW as shared115_l,Gve as shared115_m,Xve as shared115_n,Yve as shared115_o,Jve as shared115_p,m0 as shared115_q,wA as shared115_r,EW as shared115_s,ebe as shared115_t,r1 as shared116_a,ed as shared116_b,fW as shared116_c,td as shared116_d,Cu as shared116_e,gA as shared116_f,Nve as shared116_g,ad as shared117_a,kA as shared117_b,CA as shared117_c,$A as shared118_a,FA as shared119_a,DA as shared119_b,_ as shared11_a,BA as shared120_a,l9 as shared121_a,QA as shared122_a,k0 as shared122_b,C0 as shared122_c,o6 as shared122_d,XA as shared122_e,VA as shared122_f,YA as shared122_g,sf as shared123_a,JA as shared124_a,t9 as shared125_a,p6 as shared126_a,f6 as shared126_b,m6 as shared126_c,h6 as shared126_d,c9 as shared127_a,h9 as shared128_a,wl as shared129_a,ct as shared12_a,xV as shared130_a,kV as shared130_b,g1 as shared130_c,El as shared130_d,g6 as shared131_a,K8e as shared132_a,_l as shared132_b,G8e as shared132_c,SI as shared132_d,DI as shared132_e,AI as shared132_f,BI as shared133_a,II as shared134_a,MI as shared134_b,TI as shared135_a,zX as shared135_b,jI as shared136_a,tSe as shared137_a,kt as shared13_$,ui as shared13_$a,dv as shared13_A,r4 as shared13_Aa,k5 as shared13_B,Mo as shared13_Ba,YZ as shared13_C,nu as shared13_Ca,C5 as shared13_D,au as shared13_Da,On as shared13_E,gv as shared13_Ea,xa as shared13_F,bc as shared13_Fa,yc as shared13_G,vv as shared13_Ga,Yr as shared13_H,O5 as shared13_Ha,ir as shared13_I,_t as shared13_Ia,YS as shared13_J,ZN as shared13_Ja,wr as shared13_K,li as shared13_Ka,no as shared13_L,zm as shared13_La,hJ as shared13_M,fv as shared13_Ma,Hr as shared13_N,vc as shared13_Na,w5 as shared13_O,nn as shared13_Oa,Fi as shared13_P,Lm as shared13_Pa,oi as shared13_Q,d5 as shared13_Qa,wc as shared13_R,Pm as shared13_Ra,er as shared13_S,j5 as shared13_Sa,si as shared13_T,_5 as shared13_Ta,qS as shared13_U,P5 as shared13_Ua,WS as shared13_V,Hm as shared13_Va,Lre as shared13_W,mv as shared13_Wa,Yn as shared13_X,Qd as shared13_Xa,Xr as shared13_Y,hv as shared13_Ya,Oa as shared13_Z,Ud as shared13_Za,Di as shared13__,N5 as shared13__a,te as shared13_a,xr as shared13_aa,Et as shared13_ab,zS as shared13_b,EJ as shared13_ba,a4 as shared13_bb,Vm as shared13_c,kJ as shared13_ca,qm as shared13_cb,c4 as shared13_d,pv as shared13_da,pn as shared13_db,One as shared13_e,lt as shared13_ea,Ec as shared13_eb,OO as shared13_f,eS as shared13_fa,eO as shared13_fb,Ut as shared13_g,Tt as shared13_ga,o4 as shared13_gb,xt as shared13_h,kN as shared13_ha,rO as shared13_hb,Na as shared13_i,D5 as shared13_ia,tu as shared13_ib,HS as shared13_j,gc as shared13_ja,Vte as shared13_jb,Jt as shared13_k,QS as shared13_ka,Jd as shared13_kb,iN as shared13_l,wt as shared13_la,IO as shared13_lb,yr as shared13_m,jt as shared13_ma,z5 as shared13_mb,pr as shared13_n,xc as shared13_na,Ea as shared13_nb,Nm as shared13_o,jm as shared13_oa,Wm as shared13_ob,Xs as shared13_p,ve as shared13_pa,yv as shared13_pb,Om as shared13_q,B5 as shared13_qa,L5 as shared13_qb,cN as shared13_r,$N as shared13_ra,fn as shared13_rb,ln as shared13_s,Ct as shared13_sa,H5 as shared13_sb,jo as shared13_t,Zd as shared13_ta,BO as shared13_tb,ru as shared13_u,fr as shared13_ua,ci as shared13_ub,pN as shared13_v,bv as shared13_va,Um as shared13_vb,Ys as shared13_w,n4 as shared13_wa,Cne as shared13_wb,fN as shared13_x,ao as shared13_xa,Gm as shared13_xb,E5 as shared13_y,Ai as shared13_ya,Qn as shared13_yb,cv as shared13_z,R5 as shared13_za,Ee as shared13_zb,t7 as shared14_a,r7 as shared14_b,she as shared14_c,n7 as shared14_d,a7 as shared14_e,s7 as shared14_f,i7 as shared14_g,o7 as shared14_h,Y3 as shared15_a,WH as shared15_b,qme as shared15_c,Wme as shared15_d,Vme as shared15_e,K3 as shared15_f,Ume as shared15_g,Kme as shared15_h,Gme as shared15_i,Q3 as shared15_j,Z3 as shared15_k,Xme as shared15_l,Jx as shared15_m,Ap as shared15_n,yb as shared15_o,wb as shared15_p,xb as shared15_q,bb as shared15_r,_h as shared15_s,ZH as shared15_t,ahe as shared15_u,l3 as shared16_a,rH as shared16_b,u3 as shared16_c,mo as shared16_d,Fa as shared16_e,$h as shared17_A,hpe as shared17_B,i3 as shared17_C,Ih as shared17_D,rb as shared17_E,Zz as shared17_F,db as shared17_G,zx as shared17_H,Jz as shared17_I,eH as shared17_J,Hx as shared17_K,qx as shared17_L,tH as shared17_M,Fpe as shared17_N,o3 as shared17_O,nb as shared17_a,Nz as shared17_b,Qde as shared17_c,ZF as shared17_d,Oz as shared17_e,Rz as shared17_f,zz as shared17_g,e3 as shared17_h,WF as shared17_i,VF as shared17_j,Jde as shared17_k,tpe as shared17_l,t3 as shared17_m,r3 as shared17_n,ab as shared17_o,Ic as shared17_p,ib as shared17_q,ob as shared17_r,sb as shared17_s,lb as shared17_t,Lx as shared17_u,Bh as shared17_v,n3 as shared17_w,ub as shared17_x,cb as shared17_y,Hz as shared17_z,ep as shared18_a,q5 as shared18_b,W5 as shared18_c,qne as shared18_d,Js as shared19_a,Ns as shared1_$,Mxe as shared1_$a,Zye as shared1_A,GB as shared1_Aa,dk as shared1_Ab,OU as shared1_B,XB as shared1_Ba,yI as shared1_Bb,R1 as shared1_C,YB as shared1_Ca,pk as shared1_Cb,twe as shared1_D,QB as shared1_Da,wI as shared1_Db,R$ as shared1_E,ky as shared1_Ea,xI as shared1_Eb,L$ as shared1_F,ZB as shared1_Fa,EI as shared1_Fb,nwe as shared1_G,X0 as shared1_Ga,AX as shared1_Gb,awe as shared1_H,JB as shared1_Ha,jl as shared1_Hb,qU as shared1_I,eI as shared1_Ia,Ay as shared1_Ib,swe as shared1_J,tI as shared1_Ja,kI as shared1_Jb,lwe as shared1_K,rI as shared1_Ka,fk as shared1_Kb,uwe as shared1_L,hCe as shared1_La,Of as shared1_Lb,OX as shared1_M,aI as shared1_Ma,Ed as shared1_Mb,fi as shared1_N,ek as shared1_Na,jX as shared1_Nb,SK as shared1_O,bCe as shared1_Oa,PX as shared1_Ob,FK as shared1_P,_s as shared1_Pa,L8e as shared1_Pb,DK as shared1_Q,wCe as shared1_Qa,H8e as shared1_Qb,lB as shared1_R,QG as shared1_Ra,NX as shared1_Rb,fy as shared1_S,xCe as shared1_Sa,uB as shared1_T,aX as shared1_Ta,W0 as shared1_U,iX as shared1_Ua,fB as shared1_V,MCe as shared1_Va,ry as shared1_W,TCe as shared1_Wa,VE as shared1_X,oI as shared1_Xa,gy as shared1_Y,Y0 as shared1_Ya,j2e as shared1_Z,_Ce as shared1_Za,_2e as shared1__,_u as shared1__a,jU as shared1_a,V0 as shared1_aa,sB as shared1_ab,Lt as shared1_b,bf as shared1_ba,ey as shared1_bb,P$ as shared1_c,ay as shared1_ca,Bxe as shared1_cb,Vr as shared1_d,UE as shared1_da,xK as shared1_db,m as shared1_e,Tf as shared1_ea,sI as shared1_eb,_U as shared1_f,by as shared1_fa,Q0 as shared1_fb,B1 as shared1_g,U0 as shared1_ga,Z0 as shared1_gb,U6 as shared1_h,EB as shared1_ha,TE as shared1_hb,py as shared1_i,GE as shared1_ia,ak as shared1_ib,q$ as shared1_j,ts as shared1_ja,lI as shared1_jb,W$ as shared1_k,Ye as shared1_ka,uI as shared1_kb,LE as shared1_l,jf as shared1_la,Tl as shared1_lb,V$ as shared1_m,x$ as shared1_ma,i8e as shared1_mb,U$ as shared1_n,FB as shared1_na,Rs as shared1_nb,K$ as shared1_o,Pf as shared1_oa,Sy as shared1_ob,G$ as shared1_p,BB as shared1_pa,Fy as shared1_pb,X$ as shared1_q,K0 as shared1_qa,uk as shared1_qb,Y$ as shared1_r,Nf as shared1_ra,Fl as shared1_rb,Q$ as shared1_s,es as shared1_sa,mi as shared1_sb,Z$ as shared1_t,LB as shared1_ta,In as shared1_tb,J$ as shared1_u,zB as shared1_ua,Ru as shared1_ub,rB as shared1_v,qB as shared1_va,Bf as shared1_vb,Il as shared1_w,WB as shared1_wa,vI as shared1_wb,ja as shared1_x,JE as shared1_xa,bI as shared1_xb,N$ as shared1_y,VB as shared1_ya,eg as shared1_yb,Uye as shared1_z,Ml as shared1_za,pi as shared1_zb,Zs as shared20_a,V5 as shared20_b,f4 as shared20_c,U5 as shared20_d,Qs as shared20_e,Ev as shared20_f,_o as shared20_g,kv as shared20_h,iu as shared20_i,Xm as shared20_j,Ym as shared20_k,Cv as shared20_l,m4 as shared20_m,ou as shared20_n,K5 as shared20_o,G5 as shared20_p,X5 as shared20_q,Y5 as shared20_r,Q5 as shared20_s,Jne as shared20_t,Ti as shared21_a,HO as shared22_a,tp as shared22_b,tae as shared22_c,aae as shared22_d,h4 as shared22_e,Eh as shared23_a,ol as shared23_b,fz as shared23_c,RF as shared23_d,vp as shared24_a,Fc as shared24_b,Dc as shared24_c,bp as shared24_d,Xv as shared24_e,vh as shared24_f,yp as shared24_g,Dx as shared24_h,Ln as shared24_i,VL as shared24_j,EF as shared25_a,yR as shared26_a,O4 as shared26_b,rp as shared27_a,Qm as shared27_b,lp as shared28_a,ux as shared28_b,rl as shared28_c,th as shared29_a,Bv as shared29_b,eh as shared29_c,$ie as shared29_d,sp as shared29_e,T4 as shared29_f,lx as shared29_g,Iv as shared29_h,uZ as shared2_a,cZ as shared2_b,Xg as shared2_c,el as shared30_a,tl as shared30_b,E4 as shared30_c,Fv as shared30_d,ip as shared30_e,op as shared30_f,k4 as shared30_g,Rn as shared31_a,np as shared31_b,b4 as shared31_c,w4 as shared31_d,y4 as shared31_e,Pae as shared31_f,J5 as shared31_g,ex as shared31_h,tx as shared31_i,rx as shared31_j,GO as shared31_k,XO as shared31_l,YO as shared31_m,QO as shared31_n,nx as shared31_o,ap as shared31_p,ax as shared31_q,ZO as shared31_r,Sv as shared31_s,Dv as shared32_a,Dn as shared33_a,cF as shared34_a,vx as shared34_b,pp as shared34_c,fp as shared34_d,bx as shared34_e,dF as shared34_f,tL as shared34_g,aL as shared34_h,oL as shared34_i,lL as shared34_j,uL as shared34_k,pF as shared34_l,fF as shared34_m,mF as shared34_n,yx as shared34_o,lh as shared34_p,Hv as shared34_q,du as shared35_a,dp as shared36_a,Ov as shared36_b,Z4 as shared36_c,PR as shared36_d,J4 as shared36_e,IR as shared36_f,Ose as shared36_g,Rse as shared36_h,Lse as shared36_i,zse as shared36_j,Hse as shared36_k,so as shared36_l,eF as shared36_m,tF as shared36_n,Rv as shared37_a,sh as shared38_a,Lv as shared39_a,Gn as shared3_a,bF as shared40_a,yF as shared40_b,wF as shared40_c,kF as shared41_a,iue as shared41_b,Fe as shared41_c,La as shared42_A,or as shared42_B,Gv as shared42_C,TL as shared42_D,Bue as shared42_a,SF as shared42_b,Pue as shared42_c,_L as shared42_d,que as shared42_e,Vue as shared42_f,$F as shared42_g,ph as shared42_h,fh as shared42_i,DL as shared42_j,AL as shared42_k,Wv as shared42_l,ua as shared42_m,FL as shared42_n,Vv as shared42_o,Cx as shared42_p,mh as shared42_q,hh as shared42_r,Uv as shared42_s,Ra as shared42_t,$L as shared42_u,Ex as shared42_v,po as shared42_w,ece as shared42_x,gh as shared42_y,Sc as shared42_z,xx as shared43_a,Qv as shared44_a,$x as shared44_b,ZL as shared44_c,Zv as shared44_d,Bx as shared44_e,ez as shared44_f,Ix as shared44_g,wp as shared44_h,_F as shared44_i,Lo as shared44_j,Ax as shared45_a,KL as shared45_b,TF as shared45_c,ji as shared46_a,_i as shared47_a,Fh as shared48_a,Ca as shared48_b,Iz as shared48_c,gb as shared49_a,vb as shared49_b,V3 as shared49_c,U3 as shared49_d,Vs as shared4_a,jh as shared50_a,Bme as shared50_b,Ime as shared50_c,Mme as shared50_d,Tme as shared50_e,jH as shared50_f,jme as shared50_g,_H as shared50_h,PH as shared50_i,NH as shared50_j,jc as shared50_k,Ome as shared50_l,Rme as shared50_m,q3 as shared50_n,gu as shared50_o,Qx as shared50_p,OH as shared50_q,W3 as shared50_r,f3 as shared51_a,mu as shared51_b,m3 as shared51_c,Aa as shared51_d,h3 as shared51_e,Dt as shared51_f,yt as shared51_g,mn as shared51_h,ca as shared52_a,Th as shared52_b,Ge as shared52_c,Da as shared52_d,gs as shared52_e,Sp as shared53_a,Te as shared54_a,Er as shared54_b,za as shared55_a,b3 as shared56_a,w3 as shared57_a,E3 as shared58_a,Mc as shared59_a,Zt as shared5_a,Jl as shared5_b,B as shared5_c,oe as shared5_d,Pt as shared60_a,Xe as shared61_a,$3 as shared61_b,B3 as shared61_c,I3 as shared61_d,T3 as shared62_a,Eb as shared63_a,u7 as shared63_b,bs as shared64_a,x7 as shared64_b,Sb as shared64_c,an as shared65_a,kb as shared66_a,ho as shared67_a,vs as shared67_b,r2 as shared67_c,f7 as shared68_a,h7 as shared69_a,Uw as shared6_a,k8 as shared6_b,Ph as shared70_a,Pc as shared71_a,E7 as shared71_b,k7 as shared71_c,Nc as shared72_a,C7 as shared72_b,S7 as shared72_c,Mp as shared73_a,F7 as shared73_b,D7 as shared73_c,Db as shared74_a,$7 as shared74_b,Bb as shared75_a,d2 as shared75_b,p2 as shared75_c,Ib as shared75_d,c2 as shared75_e,jp as shared75_f,_p as shared75_g,z7 as shared75_h,B7 as shared76_a,I7 as shared77_a,ws as shared77_b,M7 as shared78_a,Lh as shared78_b,l2 as shared79_a,Hh as shared79_b,Ab as shared79_c,fq as shared79_d,O7 as shared79_e,mq as shared79_f,$b as shared79_g,a0e as shared79_h,i0e as shared79_i,o0e as shared79_j,R7 as shared79_k,F_ as shared7_a,C8 as shared7_b,ks as shared80_a,Op as shared80_b,tD as shared80_c,Pp as shared81_a,f2 as shared82_a,K7 as shared82_b,Mb as shared83_a,Tb as shared83_b,H7 as shared83_c,q7 as shared83_d,jb as shared83_e,Wh as shared83_f,f0e as shared83_g,m0e as shared83_h,h0e as shared83_i,W7 as shared83_j,V7 as shared83_k,b0e as shared83_l,gn as shared84_a,xs as shared84_b,Y7 as shared85_a,Q7 as shared85_b,E0e as shared85_c,Z7 as shared85_d,Es as shared86_a,Np as shared86_b,zc as shared86_c,qa as shared86_d,zn as shared87_a,Vh as shared87_b,qc as shared88_a,_b as shared88_b,aD as shared89_a,iD as shared89_b,M0e as shared89_c,Bo as shared8_a,Rb as shared90_a,kD as shared90_b,Pb as shared91_a,fD as shared91_b,O0e as shared91_c,R0e as shared91_d,Hn as shared92_a,go as shared92_b,uD as shared92_c,Ua as shared92_d,cD as shared92_e,Lp as shared92_f,yu as shared92_g,dD as shared92_h,pD as shared92_i,zp as shared93_a,z0e as shared93_b,q0e as shared93_c,hD as shared93_d,Wp as shared94_a,Yh as shared94_b,Hp as shared94_c,qp as shared94_d,Ba as shared94_e,Qh as shared94_f,Xh as shared95_a,g2 as shared96_a,Fq as shared96_b,gD as shared96_c,Uge as shared97_A,Xq as shared97_B,JD as shared97_C,eA as shared97_D,QD as shared97_E,Gge as shared97_F,R2 as shared97_G,ZD as shared97_H,Vq as shared97_a,P2 as shared97_b,Ub as shared97_c,qD as shared97_d,WD as shared97_e,VD as shared97_f,UD as shared97_g,KD as shared97_h,Mge as shared97_i,Vb as shared97_j,GD as shared97_k,Kb as shared97_l,XD as shared97_m,N2 as shared97_n,Gb as shared97_o,Tge as shared97_p,Uq as shared97_q,jge as shared97_r,_ge as shared97_s,Eu as shared97_t,Pge as shared97_u,Nge as shared97_v,YD as shared97_w,O2 as shared97_x,o0 as shared97_y,Wge as shared97_z,nge as shared98_a,ul as shared98_b,vo as shared98_c,Oi as shared98_d,Up as shared98_e,Ss as shared98_f,wu as shared98_g,k2 as shared98_h,oge as shared98_i,sge as shared98_j,AD as shared98_k,lge as shared98_l,C2 as shared98_m,$D as shared98_n,cge as shared98_o,dge as shared98_p,pge as shared98_q,S2 as shared98_r,xu as shared98_s,Kp as shared98_t,Gp as shared98_u,zb as shared98_v,Hb as shared98_w,Jh as shared98_x,hge as shared98_y,CD as shared99_a,w2 as shared99_b,Ni as shared99_c,zO as shared9_a,Hne as shared9_b,d4 as shared9_c};
|